@nubisco/openbridge 1.4.2 → 1.5.2

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.
Files changed (42) hide show
  1. package/dist/__tests__/mcp.test.d.ts +2 -0
  2. package/dist/__tests__/mcp.test.d.ts.map +1 -0
  3. package/dist/__tests__/mcp.test.js +478 -0
  4. package/dist/__tests__/mcp.test.js.map +1 -0
  5. package/dist/access.d.ts +148 -0
  6. package/dist/access.d.ts.map +1 -0
  7. package/dist/access.js +401 -0
  8. package/dist/access.js.map +1 -0
  9. package/dist/auth.d.ts +9 -1
  10. package/dist/auth.d.ts.map +1 -1
  11. package/dist/auth.js +11 -0
  12. package/dist/auth.js.map +1 -1
  13. package/dist/index.js +8 -0
  14. package/dist/index.js.map +1 -1
  15. package/dist/mcp/index.d.ts +54 -0
  16. package/dist/mcp/index.d.ts.map +1 -0
  17. package/dist/mcp/index.js +181 -0
  18. package/dist/mcp/index.js.map +1 -0
  19. package/dist/mcp/oauth.d.ts +35 -0
  20. package/dist/mcp/oauth.d.ts.map +1 -0
  21. package/dist/mcp/oauth.js +323 -0
  22. package/dist/mcp/oauth.js.map +1 -0
  23. package/dist/mcp/tools.d.ts +39 -0
  24. package/dist/mcp/tools.d.ts.map +1 -0
  25. package/dist/mcp/tools.js +432 -0
  26. package/dist/mcp/tools.js.map +1 -0
  27. package/dist/server.d.ts.map +1 -1
  28. package/dist/server.js +67 -114
  29. package/dist/server.js.map +1 -1
  30. package/dist/services/bridge.d.ts +102 -0
  31. package/dist/services/bridge.d.ts.map +1 -0
  32. package/dist/services/bridge.js +191 -0
  33. package/dist/services/bridge.js.map +1 -0
  34. package/dist/token-cli.d.ts +10 -0
  35. package/dist/token-cli.d.ts.map +1 -0
  36. package/dist/token-cli.js +76 -0
  37. package/dist/token-cli.js.map +1 -0
  38. package/package.json +6 -5
  39. package/ui-dist/assets/{index-CL7JhxrS.css → index-9bWNU3bq.css} +2 -2
  40. package/ui-dist/assets/index-DIyesg4J.js +109 -0
  41. package/ui-dist/index.html +2 -2
  42. package/ui-dist/assets/index-Rvs_bO_V.js +0 -109
@@ -1,109 +0,0 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))r(n);new MutationObserver(n=>{for(const s of n)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function i(n){const s={};return n.integrity&&(s.integrity=n.integrity),n.referrerPolicy&&(s.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?s.credentials="include":n.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(n){if(n.ep)return;n.ep=!0;const s=i(n);fetch(n.href,s)}})();/**
2
- * @vue/shared v3.5.44
3
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
- * @license MIT
5
- **/function nh(e){const t=Object.create(null);for(const i of e.split(","))t[i]=1;return i=>i in t}const st={},ss=[],xr=()=>{},x_=()=>!1,xc=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Tc=e=>e.startsWith("onUpdate:"),Zt=Object.assign,sh=(e,t)=>{const i=e.indexOf(t);i>-1&&e.splice(i,1)},$b=Object.prototype.hasOwnProperty,ot=(e,t)=>$b.call(e,t),Ze=Array.isArray,Ln=e=>Po(e)==="[object Map]",on=e=>Po(e)==="[object Set]",A2=e=>Po(e)==="[object Date]",je=e=>typeof e=="function",St=e=>typeof e=="string",zi=e=>typeof e=="symbol",ut=e=>e!==null&&typeof e=="object",T_=e=>(ut(e)||je(e))&&je(e.then)&&je(e.catch),H_=Object.prototype.toString,Po=e=>H_.call(e),xb=e=>Po(e).slice(8,-1),N_=e=>Po(e)==="[object Object]",Hc=e=>St(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Kl=nh(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Nc=e=>{const t=Object.create(null);return i=>t[i]||(t[i]=e(i))},Tb=/-\w/g,yi=Nc(e=>e.replace(Tb,t=>t.slice(1).toUpperCase())),Hb=/\B([A-Z])/g,cn=Nc(e=>e.replace(Hb,"-$1").toLowerCase()),Pc=Nc(e=>e.charAt(0).toUpperCase()+e.slice(1)),mu=Nc(e=>e?`on${Pc(e)}`:""),di=(e,t)=>!Object.is(e,t),x0=(e,...t)=>{for(let i=0;i<e.length;i++)e[i](...t)},P_=(e,t,i,r=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:i})},Oc=e=>{const t=parseFloat(e);return isNaN(t)?e:t},Nb=e=>{const t=St(e)?Number(e):NaN;return isNaN(t)?e:t};let M2;const Rc=()=>M2||(M2=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function _i(e){if(Ze(e)){const t={};for(let i=0;i<e.length;i++){const r=e[i],n=St(r)?Ib(r):_i(r);if(n)for(const s in n)t[s]=n[s]}return t}else if(St(e)||ut(e))return e}const Pb=/;(?![^(]*\))/g,Ob=/:([^]+)/,Rb=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function Ib(e){const t={};return e.replace(Rb,i=>i.startsWith("/*")?"":i).split(Pb).forEach(i=>{if(i){const r=i.split(Ob);r.length>1&&(t[r[0].trim()]=r[1].trim())}}),t}function Le(e){let t="";if(St(e))t=e;else if(Ze(e))for(let i=0;i<e.length;i++){const r=Le(e[i]);r&&(t+=r+" ")}else if(ut(e))for(const i in e)e[i]&&(t+=i+" ");return t.trim()}function Db(e){if(!e)return null;let{class:t,style:i}=e;return t&&!St(t)&&(e.class=Le(t)),i&&(e.style=_i(i)),e}const Vb="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly",Zb=nh(Vb);function O_(e){return!!e||e===""}function Bb(e,t,i){if(e.length!==t.length)return!1;let r=!0;for(let n=0;r&&n<e.length;n++)r=hr(e[n],t[n],i);return r}function E2(e,t,i){if(e.size!==t.size)return!1;const r=Array.from(t),n=new Uint8Array(r.length);for(const s of e){let a=-1;for(let l=0;l<r.length;l++)if(!n[l]&&hr(s,r[l],i)){a=l;break}if(a<0)return!1;n[a]=1}return!0}function Fb(e,t,i){let r=Ln(e),n=Ln(t);if(r||n||(r=on(e),n=on(t),r||n))return r&&n?E2(e,t,i):!1;const s=Object.keys(e).length,a=Object.keys(t).length;if(s!==a)return!1;for(const l in e){const o=e.hasOwnProperty(l),c=t.hasOwnProperty(l);if(o&&!c||!o&&c||!hr(e[l],t[l],i))return!1}return String(e)===String(t)}function L2(e,t,i,r){i||(i=[new Map,new Map]);const[n,s]=i;if(n.has(e)||s.has(t))return n.get(e)===t&&s.get(t)===e;n.set(e,t),s.set(t,e);const a=r(e,t,i);return n.delete(e),s.delete(t),a}function hr(e,t,i){if(e===t)return!0;let r=A2(e),n=A2(t);return r||n?r&&n?e.getTime()===t.getTime():!1:(r=zi(e),n=zi(t),r||n?e===t:(r=Ze(e),n=Ze(t),r||n?r&&n?L2(e,t,i,Bb):!1:(r=ut(e),n=ut(t),r||n?!r||!n?!1:L2(e,t,i,Fb):String(e)===String(t))))}function ah(e,t){return e.findIndex(i=>hr(i,t))}const R_=e=>!!(e&&e.__v_isRef===!0),F=e=>St(e)?e:e==null?"":Ze(e)||ut(e)&&(e.toString===H_||!je(e.toString))?R_(e)?F(e.value):JSON.stringify(e,I_,2):String(e),I_=(e,t)=>R_(t)?I_(e,t.value):Ln(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((i,[r,n],s)=>(i[vu(r,s)+" =>"]=n,i),{})}:on(t)?{[`Set(${t.size})`]:[...t.values()].map(i=>vu(i))}:zi(t)?vu(t):ut(t)&&!Ze(t)&&!N_(t)?String(t):t,vu=(e,t="")=>{var i;return zi(e)?`Symbol(${(i=e.description)!=null?i:t})`:e};/**
6
- * @vue/reactivity v3.5.44
7
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
8
- * @license MIT
9
- **/let Xt;class D_{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!t&&Xt&&(Xt.active?(this.parent=Xt,this.index=(Xt.scopes||(Xt.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,i;if(this.scopes){const r=this.scopes.slice();for(t=0,i=r.length;t<i;t++)r[t].pause()}for(t=0,i=this.effects.length;t<i;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,i;if(this.scopes){const n=this.scopes.slice();for(t=0,i=n.length;t<i;t++)n[t].resume()}const r=this.effects.slice();for(t=0,i=r.length;t<i;t++)r[t].resume()}}run(t){if(this._active){const i=Xt;try{return Xt=this,t()}finally{Xt=i}}}on(){++this._on===1&&(this.prevScope=Xt,Xt=this)}off(){if(this._on>0&&--this._on===0){if(Xt===this)Xt=this.prevScope;else{let t=Xt;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let i,r;for(i=0,r=this.effects.length;i<r;i++)this.effects[i].stop();for(this.effects.length=0,i=0,r=this.cleanups.length;i<r;i++)this.cleanups[i]();if(this.cleanups.length=0,this.scopes){const n=this.scopes.slice();for(i=0,r=n.length;i<r;i++)n[i].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const n=this.parent.scopes.pop();n&&n!==this&&(this.parent.scopes[this.index]=n,n.index=this.index)}this.parent=void 0}}}function lh(e){return new D_(e)}function V_(){return Xt}function U0(e,t=!1){Xt&&Xt.cleanups.push(e)}let wt;const gu=new WeakSet;class Z_{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,Xt&&(Xt.active?Xt.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,gu.has(this)&&(gu.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||F_(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,$2(this),z_(this);const t=wt,i=cr;wt=this,cr=!0;try{return this.fn()}finally{U_(this),wt=t,cr=i,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)uh(t);this.deps=this.depsTail=void 0,$2(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?gu.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){f1(this)&&this.run()}get dirty(){return f1(this)}}let B_=0,ql,Gl;function F_(e,t=!1){if(e.flags|=8,t){e.next=Gl,Gl=e;return}e.next=ql,ql=e}function oh(){B_++}function ch(){if(--B_>0)return;if(Gl){let t=Gl;for(Gl=void 0;t;){const i=t.next;t.next=void 0,t.flags&=-9,t=i}}let e;for(;ql;){let t=ql;for(ql=void 0;t;){const i=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(r){e||(e=r)}t=i}}if(e)throw e}function z_(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function U_(e){let t,i=e.depsTail,r=i;for(;r;){const n=r.prevDep;r.version===-1?(r===i&&(i=n),uh(r),zb(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=n}e.deps=t,e.depsTail=i}function f1(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(W_(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function W_(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===ao)||(e.globalVersion=ao,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!f1(e))))return;e.flags|=2;const t=e.dep,i=wt,r=cr;wt=e,cr=!0;try{z_(e);const n=e.fn(e._value);(t.version===0||di(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(n){throw t.version++,n}finally{wt=i,cr=r,U_(e),e.flags&=-3}}function uh(e,t=!1){const{dep:i,prevSub:r,nextSub:n}=e;if(r&&(r.nextSub=n,e.prevSub=void 0),n&&(n.prevSub=r,e.nextSub=void 0),i.subs===e&&(i.subs=r,!r&&i.computed)){i.computed.flags&=-5;for(let s=i.computed.deps;s;s=s.nextDep)uh(s,!0)}!t&&!--i.sc&&i.map&&i.map.delete(i.key)}function zb(e){const{prevDep:t,nextDep:i}=e;t&&(t.nextDep=i,e.prevDep=void 0),i&&(i.prevDep=t,e.nextDep=void 0)}let cr=!0;const j_=[];function Ir(){j_.push(cr),cr=!1}function Dr(){const e=j_.pop();cr=e===void 0?!0:e}function $2(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const i=wt;wt=void 0;try{t()}finally{wt=i}}}let ao=0;class Ub{constructor(t,i){this.sub=t,this.dep=i,this.version=i.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ic{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!wt||!cr||wt===this.computed)return;let i=this.activeLink;if(i===void 0||i.sub!==wt)i=this.activeLink=new Ub(wt,this),wt.deps?(i.prevDep=wt.depsTail,wt.depsTail.nextDep=i,wt.depsTail=i):wt.deps=wt.depsTail=i,K_(i);else if(i.version===-1&&(i.version=this.version,i.nextDep)){const r=i.nextDep;r.prevDep=i.prevDep,i.prevDep&&(i.prevDep.nextDep=r),i.prevDep=wt.depsTail,i.nextDep=void 0,wt.depsTail.nextDep=i,wt.depsTail=i,wt.deps===i&&(wt.deps=r)}return i}trigger(t){this.version++,ao++,this.notify(t)}notify(t){oh();try{for(let i=this.subs;i;i=i.prevSub)i.sub.notify()&&i.sub.dep.notify()}finally{ch()}}}function K_(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)K_(r)}const i=e.dep.subs;i!==e&&(e.prevSub=i,i&&(i.nextSub=e)),e.dep.subs=e}}const W0=new WeakMap,us=Symbol(""),p1=Symbol(""),lo=Symbol("");function bi(e,t,i){if(cr&&wt){let r=W0.get(e);r||W0.set(e,r=new Map);let n=r.get(i);n||(r.set(i,n=new Ic),n.map=r,n.key=i),n.track()}}function Jr(e,t,i,r,n,s){const a=W0.get(e);if(!a){ao++;return}const l=o=>{o&&o.trigger()};if(oh(),t==="clear")a.forEach(l);else{const o=Ze(e),c=o&&Hc(i);if(o&&i==="length"){const u=Number(r);a.forEach((d,h)=>{(h==="length"||h===lo||!zi(h)&&h>=u)&&l(d)})}else switch((i!==void 0||a.has(void 0))&&l(a.get(i)),c&&l(a.get(lo)),t){case"add":o?c&&l(a.get("length")):(l(a.get(us)),Ln(e)&&l(a.get(p1)));break;case"delete":o||(l(a.get(us)),Ln(e)&&l(a.get(p1)));break;case"set":Ln(e)&&l(a.get(us));break}}ch()}function Wb(e,t){const i=W0.get(e);return i&&i.get(t)}function Cs(e){const t=rt(e);return t===e||(bi(t,"iterate",lo),Bi(e))?t:Vr(e)?Tr(e)?t.map(i=>Nn(ir(i))):t.map(Nn):t.map(ir)}function Dc(e){return bi(e=rt(e),"iterate",lo),e}function kr(e,t){return Vr(e)?Nn(Tr(e)?ir(t):t):ir(t)}const jb={__proto__:null,[Symbol.iterator](){return bu(this,Symbol.iterator,e=>kr(this,e))},concat(...e){return Cs(this).concat(...e.map(t=>Ze(t)?Cs(t):t))},entries(){return bu(this,"entries",e=>(e[1]=kr(this,e[1]),e))},every(e,t){return Ur(this,"every",e,t,void 0,arguments)},filter(e,t){return Ur(this,"filter",e,t,i=>i.map(r=>kr(this,r)),arguments)},find(e,t){return Ur(this,"find",e,t,i=>kr(this,i),arguments)},findIndex(e,t){return Ur(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ur(this,"findLast",e,t,i=>kr(this,i),arguments)},findLastIndex(e,t){return Ur(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ur(this,"forEach",e,t,void 0,arguments)},includes(...e){return yu(this,"includes",e)},indexOf(...e){return yu(this,"indexOf",e)},join(e){return Cs(this).join(e)},lastIndexOf(...e){return yu(this,"lastIndexOf",e)},map(e,t){return Ur(this,"map",e,t,void 0,arguments)},pop(){return Cl(this,"pop")},push(...e){return Cl(this,"push",e)},reduce(e,...t){return T2(this,"reduce",e,t)},reduceRight(e,...t){return T2(this,"reduceRight",e,t)},shift(){return Cl(this,"shift")},some(e,t){return Ur(this,"some",e,t,void 0,arguments)},splice(...e){return Cl(this,"splice",e)},toReversed(){return Cs(this).toReversed()},toSorted(e){return Cs(this).toSorted(e)},toSpliced(...e){return Cs(this).toSpliced(...e)},unshift(...e){return Cl(this,"unshift",e)},values(){return bu(this,"values",e=>kr(this,e))}};function bu(e,t,i){const r=Dc(e),n=r[t],s=n.call(r);if(r!==e&&!Bi(e)){if(s[Symbol.toStringTag]==="Array Iterator"){const a=Object.create(Object.getPrototypeOf(s));return a.next=()=>x2(s.next(),i),n!==q_[t]&&Object.defineProperties(a,{return:{get(){const l=s.return;return typeof l=="function"?l.bind(s):l}},throw:{get(){const l=s.throw;return typeof l=="function"?l.bind(s):l}}}),a}s._next=s.next,s.next=()=>x2(s._next(),i)}return s}function x2(e,t){return e.done||(e.value=t(e.value)),e}const q_=Array.prototype;function Ur(e,t,i,r,n,s){const a=Dc(e),l=a!==e&&!Bi(e),o=a[t];if(o!==q_[t]){const d=o.apply(e,s);return l?ir(d):d}let c=i;a!==e&&(l?c=function(d,h){return i.call(this,kr(e,d),h,e)}:i.length>2&&(c=function(d,h){return i.call(this,d,h,e)}));const u=o.call(a,c,r);return l&&n?n(u):u}function T2(e,t,i,r){const n=Dc(e),s=n!==e&&!Bi(e);let a=i,l=!1;n!==e&&(s?(l=r.length===0,a=function(c,u,d){return l&&(l=!1,c=kr(e,c)),i.call(this,c,kr(e,u),d,e)}):i.length>3&&(a=function(c,u,d){return i.call(this,c,u,d,e)}));const o=n[t](a,...r);return l?kr(e,o):o}function yu(e,t,i){const r=rt(e);bi(r,"iterate",lo);const n=r[t](...i);return(n===-1||n===!1)&&Vc(i[0])?(i[0]=rt(i[0]),r[t](...i)):n}function Cl(e,t,i=[]){Ir(),oh();const r=rt(e)[t].apply(e,i);return ch(),Dr(),r}const Kb=nh("__proto__,__v_isRef,__isVue"),G_=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(zi));function qb(e){zi(e)||(e=String(e));const t=rt(this);return bi(t,"has",e),t.hasOwnProperty(e)}class Y_{constructor(t=!1,i=!1){this._isReadonly=t,this._isShallow=i}get(t,i,r){if(i==="__v_skip")return t.__v_skip;const n=this._isReadonly,s=this._isShallow;if(i==="__v_isReactive")return!n;if(i==="__v_isReadonly")return n;if(i==="__v_isShallow")return s;if(i==="__v_raw")return r===(n?s?n5:em:s?Q_:J_).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(r)?t:void 0;const a=Ze(t);if(!n){let o;if(a&&(o=jb[i]))return o;if(i==="hasOwnProperty")return qb}const l=Reflect.get(t,i,At(t)?t:r);if((zi(i)?G_.has(i):Kb(i))||(n||bi(t,"get",i),s))return l;if(At(l)){const o=a&&Hc(i)?l:l.value;return n&&ut(o)?Hn(o):o}return ut(l)?n?Hn(l):ps(l):l}}class X_ extends Y_{constructor(t=!1){super(!1,t)}set(t,i,r,n){let s=t[i];const a=Ze(t)&&Hc(i);if(!this._isShallow){const c=Vr(s);if(!Bi(r)&&!Vr(r)&&(s=rt(s),r=rt(r)),!a&&At(s)&&!At(r))return c||(s.value=r),!0}const l=a?Number(i)<t.length:ot(t,i),o=Reflect.set(t,i,r,At(t)?t:n);return t===rt(n)&&o&&(l?di(r,s)&&Jr(t,"set",i,r):Jr(t,"add",i,r)),o}deleteProperty(t,i){const r=ot(t,i);t[i];const n=Reflect.deleteProperty(t,i);return n&&r&&Jr(t,"delete",i,void 0),n}has(t,i){const r=Reflect.has(t,i);return(!zi(i)||!G_.has(i))&&bi(t,"has",i),r}ownKeys(t){return bi(t,"iterate",Ze(t)?"length":us),Reflect.ownKeys(t)}}class Gb extends Y_{constructor(t=!1){super(!0,t)}set(t,i){return!0}deleteProperty(t,i){return!0}}const Yb=new X_,Xb=new Gb,Jb=new X_(!0);const _1=e=>e,i0=e=>Reflect.getPrototypeOf(e);function Qb(e,t,i){return function(...r){const n=this.__v_raw,s=rt(n),a=Ln(s),l=e==="entries"||e===Symbol.iterator&&a,o=e==="keys"&&a,c=n[e](...r),u=i?_1:t?Nn:ir;return!t&&bi(s,"iterate",o?p1:us),Zt(Object.create(c),{next(){const{value:d,done:h}=c.next();return h?{value:d,done:h}:{value:l?[u(d[0]),u(d[1])]:u(d),done:h}}})}}function r0(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function e5(e,t){const i={get(n){const s=this.__v_raw,a=rt(s),l=rt(n);e||(di(n,l)&&bi(a,"get",n),bi(a,"get",l));const{has:o}=i0(a),c=t?_1:e?Nn:ir;if(o.call(a,n))return c(s.get(n));if(o.call(a,l))return c(s.get(l));s!==a&&s.get(n)},get size(){const n=this.__v_raw;return!e&&bi(rt(n),"iterate",us),n.size},has(n){const s=this.__v_raw,a=rt(s),l=rt(n);return e||(di(n,l)&&bi(a,"has",n),bi(a,"has",l)),n===l?s.has(n):s.has(n)||s.has(l)},forEach(n,s){const a=this,l=a.__v_raw,o=rt(l),c=t?_1:e?Nn:ir;return!e&&bi(o,"iterate",us),l.forEach((u,d)=>n.call(s,c(u),c(d),a))}};return Zt(i,e?{add:r0("add"),set:r0("set"),delete:r0("delete"),clear:r0("clear")}:{add(n){const s=rt(this),a=i0(s),l=rt(n),o=!t&&!Bi(n)&&!Vr(n)?l:n;return a.has.call(s,o)||di(n,o)&&a.has.call(s,n)||di(l,o)&&a.has.call(s,l)||(s.add(o),Jr(s,"add",o,o)),this},set(n,s){!t&&!Bi(s)&&!Vr(s)&&(s=rt(s));const a=rt(this),{has:l,get:o}=i0(a);let c=l.call(a,n);c||(n=rt(n),c=l.call(a,n));const u=o.call(a,n);return a.set(n,s),c?di(s,u)&&Jr(a,"set",n,s):Jr(a,"add",n,s),this},delete(n){const s=rt(this),{has:a,get:l}=i0(s);let o=a.call(s,n);o||(n=rt(n),o=a.call(s,n)),l&&l.call(s,n);const c=s.delete(n);return o&&Jr(s,"delete",n,void 0),c},clear(){const n=rt(this),s=n.size!==0,a=n.clear();return s&&Jr(n,"clear",void 0,void 0),a}}),["keys","values","entries",Symbol.iterator].forEach(n=>{i[n]=Qb(n,e,t)}),i}function dh(e,t){const i=e5(e,t);return(r,n,s)=>n==="__v_isReactive"?!e:n==="__v_isReadonly"?e:n==="__v_isShallow"?t:n==="__v_raw"?r:Reflect.get(ot(i,n)&&n in r?i:r,n,s)}const t5={get:dh(!1,!1)},i5={get:dh(!1,!0)},r5={get:dh(!0,!1)};const J_=new WeakMap,Q_=new WeakMap,em=new WeakMap,n5=new WeakMap;function s5(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function ps(e){return Vr(e)?e:hh(e,!1,Yb,t5,J_)}function tm(e){return hh(e,!1,Jb,i5,Q_)}function Hn(e){return hh(e,!0,Xb,r5,em)}function hh(e,t,i,r,n){if(!ut(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const s=n.get(e);if(s)return s;const a=s5(xb(e));if(a===0)return e;const l=new Proxy(e,a===2?r:i);return n.set(e,l),l}function Tr(e){return Vr(e)?Tr(e.__v_raw):!!(e&&e.__v_isReactive)}function Vr(e){return!!(e&&e.__v_isReadonly)}function Bi(e){return!!(e&&e.__v_isShallow)}function Vc(e){return e?!!e.__v_raw:!1}function rt(e){const t=e&&e.__v_raw;return t?rt(t):e}function fh(e){return!ot(e,"__v_skip")&&Object.isExtensible(e)&&P_(e,"__v_skip",!0),e}const ir=e=>ut(e)?ps(e):e,Nn=e=>ut(e)?Hn(e):e;function At(e){return e?e.__v_isRef===!0:!1}function q(e){return im(e,!1)}function Zr(e){return im(e,!0)}function im(e,t){return At(e)?e:new a5(e,t)}class a5{constructor(t,i){this.dep=new Ic,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=i?t:rt(t),this._value=i?t:ir(t),this.__v_isShallow=i}get value(){return this.dep.track(),this._value}set value(t){const i=this._rawValue,r=this.__v_isShallow||Bi(t)||Vr(t);t=r?t:rt(t),di(t,i)&&(this._rawValue=t,this._value=r?t:ir(t),this.dep.trigger())}}function de(e){return At(e)?e.value:e}function l5(e){return je(e)?e():de(e)}const o5={get:(e,t,i)=>t==="__v_raw"?e:de(Reflect.get(e,t,i)),set:(e,t,i,r)=>{const n=e[t];return At(n)&&!At(i)?(n.value=i,!0):Reflect.set(e,t,i,r)}};function rm(e){return Tr(e)?e:new Proxy(e,o5)}class c5{constructor(t){this.__v_isRef=!0,this._value=void 0;const i=this.dep=new Ic,{get:r,set:n}=t(i.track.bind(i),i.trigger.bind(i));this._get=r,this._set=n}get value(){return this._value=this._get()}set value(t){this._set(t)}}function u5(e){return new c5(e)}function d5(e){const t=Ze(e)?new Array(e.length):{};for(const i in e)t[i]=sm(e,i);return t}class h5{constructor(t,i,r){this._object=t,this._defaultValue=r,this.__v_isRef=!0,this._value=void 0,this._key=zi(i)?i:String(i),this._raw=rt(t);let n=!0,s=t;if(!Ze(t)||zi(this._key)||!Hc(this._key))do n=!Vc(s)||Bi(s);while(n&&(s=s.__v_raw));this._shallow=n}get value(){let t=this._object[this._key];return this._shallow&&(t=de(t)),this._value=t===void 0?this._defaultValue:t}set value(t){if(this._shallow&&At(this._raw[this._key])){const i=this._object[this._key];if(At(i)){i.value=t;return}}this._object[this._key]=t}get dep(){return Wb(this._raw,this._key)}}class f5{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 nm(e,t,i){return At(e)?e:je(e)?new f5(e):ut(e)&&arguments.length>1?sm(e,t,i):q(e)}function sm(e,t,i){return new h5(e,t,i)}class p5{constructor(t,i,r){this.fn=t,this.setter=i,this._value=void 0,this.dep=new Ic(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=ao-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!i,this.isSSR=r}notify(){if(this.flags|=16,!(this.flags&8)&&wt!==this)return F_(this,!0),!0}get value(){const t=this.dep.track();return W_(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function _5(e,t,i=!1){let r,n;return je(e)?r=e:(r=e.get,n=e.set),new p5(r,n,i)}const n0={},j0=new WeakMap;let Qn;function m5(e,t=!1,i=Qn){if(i){let r=j0.get(i);r||j0.set(i,r=[]),r.push(e)}}function v5(e,t,i=st){const{immediate:r,deep:n,once:s,scheduler:a,augmentJob:l,call:o}=i,c=g=>n?g:Bi(g)||n===!1||n===0?Qr(g,1):Qr(g);let u,d,h,f,v=!1,p=!1;if(At(e)?(d=()=>e.value,v=Bi(e)):Tr(e)?(d=()=>c(e),v=!0):Ze(e)?(p=!0,v=e.some(g=>Tr(g)||Bi(g)),d=()=>e.map(g=>{if(At(g))return g.value;if(Tr(g))return c(g);if(je(g))return o?o(g,2):g()})):je(e)?t?d=o?()=>o(e,2):e:d=()=>{if(h){Ir();try{h()}finally{Dr()}}const g=Qn;Qn=u;try{return o?o(e,3,[f]):e(f)}finally{Qn=g}}:d=xr,t&&n){const g=d,E=n===!0?1/0:n;d=()=>Qr(g(),E)}const S=V_(),_=()=>{u.stop(),S&&S.active&&sh(S.effects,u)};if(s&&t){const g=t;t=(...E)=>{try{return g(...E)}finally{_()}}}let w=p?new Array(e.length).fill(n0):n0;const C=g=>{if(!(!(u.flags&1)||!u.dirty&&!g))if(t){const E=u.run();if(g||n||v||(p?E.some((T,L)=>di(T,w[L])):di(E,w))){const T=Qn;Ir();try{h&&h(),Qn=u;const L=[E,w===n0?void 0:p&&w[0]===n0?[]:w,f];w=E,o?o(t,3,L):t(...L)}finally{Qn=T,Dr()}}}else u.run()};return l&&l(C),u=new Z_(d),u.scheduler=a?()=>a(C,!1):C,f=g=>m5(g,!1,u),h=u.onStop=()=>{const g=j0.get(u);if(g){if(o)o(g,4);else for(const E of g)E();j0.delete(u)}},t?r?C(!0):w=u.run():a?a(C.bind(null,!0),!0):u.run(),_.pause=u.pause.bind(u),_.resume=u.resume.bind(u),_.stop=_,_}function Qr(e,t=1/0,i){if(t<=0||!ut(e)||e.__v_skip||(i=i||new Map,(i.get(e)||0)>=t))return e;if(i.set(e,t),t--,At(e))Qr(e.value,t,i);else if(Ze(e))for(let r=0;r<e.length;r++)Qr(e[r],t,i);else if(on(e)||Ln(e))e.forEach(r=>{Qr(r,t,i)});else if(N_(e)){for(const r in e)Qr(e[r],t,i);for(const r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Qr(e[r],t,i)}return e}/**
10
- * @vue/runtime-core v3.5.44
11
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
12
- * @license MIT
13
- **/function Oo(e,t,i,r){try{return r?e(...r):e()}catch(n){Ro(n,t,i)}}function rr(e,t,i,r){if(je(e)){const n=Oo(e,t,i,r);return n&&T_(n)&&n.catch(s=>{Ro(s,t,i)}),n}if(Ze(e)){const n=[];for(let s=0;s<e.length;s++)n.push(rr(e[s],t,i,r));return n}}function Ro(e,t,i,r=!0){const n=t?t.vnode:null,{errorHandler:s,throwUnhandledErrorInProduction:a}=t&&t.appContext.config||st;if(t){let l=t.parent;const o=t.proxy,c=`https://vuejs.org/error-reference/#runtime-${i}`;for(;l;){const u=l.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](e,o,c)===!1)return}l=l.parent}if(s){Ir(),Oo(s,null,10,[e,o,c]),Dr();return}}g5(e,i,n,r,a)}function g5(e,t,i,r=!0,n=!1){if(n)throw e;console.error(e)}const Li=[];let ar=-1;const Ar=[];let Sn=null,Ts=0;const am=Promise.resolve();let K0=null;function Kt(e){const t=K0||am;return e?t.then(this?e.bind(this):e):t}function b5(e){let t=ar+1,i=Li.length;for(;t<i;){const r=t+i>>>1,n=Li[r],s=oo(n);s<e||s===e&&n.flags&2?t=r+1:i=r}return t}function ph(e){if(!(e.flags&1)){const t=oo(e),i=Li[Li.length-1];!i||!(e.flags&2)&&t>=oo(i)?Li.push(e):Li.splice(b5(t),0,e),e.flags|=1,lm()}}function lm(){K0||(K0=am.then(um))}function y5(e){if(!Ze(e))Sn&&e.id===-1?Sn.splice(Ts+1,0,e):e.flags&1||(Ar.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)Ar.push(e[t]);lm()}function om(e,t,i,r=ar+1){for(;r<Li.length;r++){const n=Li[r];if(n&&n.flags&2){if(e&&n.id!==e.uid||t!==void 0&&!(n.id>=t))continue;Li.splice(r,1),r=e?r-1:ar,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function cm(e,t,i=0){if(Ar.length){let r=Ar,n=0;if(t){r=[];for(let a=0;a<Ar.length;a++){const l=Ar[a];(l.i!==void 0?!l.i||l.i.uid<i:t.has(l))?Ar[n++]=l:r.push(l)}}const s=[...new Set(r)].sort((a,l)=>oo(a)-oo(l));if(Ar.length=n,Sn){for(let a=0;a<s.length;a++)Sn.push(s[a]);return}for(Sn=s,Ts=0;Ts<Sn.length;Ts++){const a=Sn[Ts];a.flags&4&&(a.flags&=-2),a.flags&8||a(),a.flags&=-2}Sn=null,Ts=0}}let wu=!1;function w5(e,t){if(wu){e();return}const i=t===void 0?void 0:new Set(Ar);e(),wu=!0;try{om(void 0,t),cm(void 0,i,t)}finally{wu=!1}}const oo=e=>e.id==null?e.flags&2?-1:1/0:e.id;function um(e){try{for(ar=0;ar<Li.length;ar++){const t=Li[ar];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Oo(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;ar<Li.length;ar++){const t=Li[ar];t&&(t.flags&=-2)}ar=-1,Li.length=0,cm(),K0=null,(Li.length||Ar.length)&&um()}}let pi=null,dm=null;function q0(e){const t=pi;return pi=e,dm=e&&e.type.__scopeId||null,t}function te(e,t=pi,i){if(!t||e._n)return e;const r=(...n)=>{r._d&&Q0(-1);const s=q0(t),a=ln.length;let l;try{l=e(...n)}finally{for(let o=ln.length;o>a;o--)Sh();q0(s),r._d&&Q0(1)}return l};return r._n=!0,r._c=!0,r._d=!0,r}function ur(e,t){if(pi===null)return e;const i=zc(pi),r=e.dirs||(e.dirs=[]);for(let n=0;n<t.length;n++){let[s,a,l,o=st]=t[n];s&&(je(s)&&(s={mounted:s,updated:s}),s.deep&&Qr(a),r.push({dir:s,instance:i,value:a,oldValue:void 0,arg:l,modifiers:o}))}return e}function jn(e,t,i,r){const n=e.dirs,s=t&&t.dirs;for(let a=0;a<n.length;a++){const l=n[a];s&&(l.oldValue=s[a].value);let o=l.dir[r];o&&(Ir(),rr(o,i,8,[e.el,l,e,t]),Dr())}}function Ji(e,t){if(hi){let i=hi.provides;const r=hi.parent&&hi.parent.provides;r===i&&(i=hi.provides=Object.create(r)),i[e]=t}}function Mt(e,t,i=!1){const r=wi();if(r||ds){let n=ds?ds._context.provides:r?r.parent==null||r.ce?r.vnode.appContext&&r.vnode.appContext.provides:r.parent.provides:void 0;if(n&&e in n)return n[e];if(arguments.length>1)return i&&je(t)?t.call(r&&r.proxy):t}}function S5(){return!!(wi()||ds)}const C5=Symbol.for("v-scx"),k5=()=>Mt(C5);function A5(e,t){return _h(e,null,{flush:"sync"})}function De(e,t,i){return _h(e,t,i)}function _h(e,t,i=st){const{immediate:r,deep:n,flush:s,once:a}=i,l=Zt({},i),o=t&&r||!t&&s!=="post";let c;if(Fs){if(s==="sync"){const f=k5();c=f.__watcherHandles||(f.__watcherHandles=[])}else if(!o){const f=()=>{};return f.stop=xr,f.resume=xr,f.pause=xr,f}}const u=hi;l.call=(f,v,p)=>rr(f,u,v,p);let d=!1;s==="post"?l.scheduler=f=>{f.i=u,Ai(f,u&&u.suspense)}:s!=="sync"&&(d=!0,l.scheduler=(f,v)=>{v?f():ph(f)}),l.augmentJob=f=>{t&&(f.flags|=4),d&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const h=v5(e,t,l);return Fs&&(c?c.push(h):o&&h()),h}function M5(e,t,i){const r=this.proxy,n=St(e)?e.includes(".")?hm(r,e):()=>r[e]:e.bind(r,r);let s;je(t)?s=t:(s=t.handler,i=t);const a=Vo(this),l=_h(n,s.bind(r),i);return a(),l}function hm(e,t){const i=t.split(".");return()=>{let r=e;for(let n=0;n<i.length&&r;n++)r=r[i[n]];return r}}const bn=new WeakMap,fm=Symbol("_vte"),Zc=e=>e.__isTeleport,rs=e=>e&&(e.disabled||e.disabled===""),E5=e=>e&&(e.defer||e.defer===""),H2=e=>typeof SVGElement<"u"&&e instanceof SVGElement,N2=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,m1=(e,t)=>{const i=e&&e.to;return St(i)?t?t(i):null:i},L5={name:"Teleport",__isTeleport:!0,process(e,t,i,r,n,s,a,l,o,c){const{mc:u,pc:d,pbc:h,o:{insert:f,querySelector:v,createText:p,createComment:S,parentNode:_}}=c,w=rs(t.props);let{dynamicChildren:C}=t;const g=(L,V,P)=>{L.shapeFlag&16&&u(L.children,V,P,n,s,a,l,o)},E=(L=t)=>{const V=rs(L.props),P=L.target=m1(L.props,v),Y=v1(P,L,p,f);P&&(a!=="svg"&&H2(P)?a="svg":a!=="mathml"&&N2(P)&&(a="mathml"),n&&n.isCE&&(n.ce._teleportTargets||(n.ce._teleportTargets=new Set)).add(P),V||(g(L,P,Y),Dl(L,!1)))},T=L=>{const V=()=>{if(bn.get(L)===V){if(bn.delete(L),rs(L.props)){const P=_(L.el)||i;g(L,P,L.anchor),Dl(L,!0)}E(L)}};bn.set(L,V),Ai(V,s)};if(e==null){const L=t.el=p(""),V=t.anchor=p("");if(f(L,i,r),f(V,i,r),E5(t.props)||s&&s.pendingBranch){T(t);return}w&&(g(t,i,V),Dl(t,!0)),E()}else{t.el=e.el;const L=t.anchor=e.anchor,V=bn.get(e);if(V){V.flags|=8,bn.delete(e),T(t);return}t.targetStart=e.targetStart;const P=t.target=e.target,Y=t.targetAnchor=e.targetAnchor,W=rs(e.props),A=W?i:P,$=W?L:Y;if(a==="svg"||H2(P)?a="svg":(a==="mathml"||N2(P))&&(a="mathml"),C?(h(e.dynamicChildren,C,A,n,s,a,l),wh(e,t,!0)):o||d(e,t,A,$,n,s,a,l,!1),w)W?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):s0(t,i,L,c,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Z=m1(t.props,v);Z&&(t.target=Z,s0(t,Z,null,c,0))}else W&&s0(t,P,Y,c,1);Dl(t,w)}},remove(e,t,i,{um:r,o:{remove:n}},s){const{shapeFlag:a,children:l,anchor:o,targetStart:c,targetAnchor:u,target:d,props:h}=e,f=rs(h),v=s||!f,p=bn.get(e);if(p&&(p.flags|=8,bn.delete(e)),d&&(n(c),n(u)),s&&n(o),!p&&(f||d)&&a&16)for(let S=0;S<l.length;S++){const _=l[S];r(_,t,i,v,!!_.dynamicChildren)}},move:s0,hydrate:$5};function s0(e,t,i,{o:{insert:r},m:n},s=2){s===0&&(e.targetStart&&r(e.targetStart,t,i),r(e.targetAnchor,t,i),i=e.targetAnchor);const{el:a,anchor:l,shapeFlag:o,children:c,props:u}=e,d=s===2;if(d&&r(a,t,i),!bn.has(e)&&(!d||rs(u))&&o&16)for(let h=0;h<c.length;h++)n(c[h],t,i,2);d&&r(l,t,i)}function $5(e,t,i,r,n,s,{o:{nextSibling:a,parentNode:l,querySelector:o,insert:c,createText:u}},d){function h(S,_){let w=_;for(;w;){if(w&&w.nodeType===8){if(w.data==="teleport start anchor")t.targetStart=w;else if(w.data==="teleport anchor"){t.targetAnchor=w,S._lpa=t.targetAnchor&&a(t.targetAnchor);break}}w=a(w)}}function f(S,_){_.anchor=d(a(S),_,l(S),i,r,n,s)}const v=t.target=m1(t.props,o),p=rs(t.props);if(v){const S=v._lpa||v.firstChild;t.shapeFlag&16&&(p?(f(e,t),h(v,S),t.targetAnchor||v1(v,t,u,c,l(e)===v?e:null)):(t.anchor=a(e),h(v,S),t.targetAnchor||v1(v,t,u,c),d(S&&a(S),t,v,i,r,n,s))),Dl(t,p)}else p&&t.shapeFlag&16&&(f(e,t),t.targetStart=e,t.targetAnchor=a(e));return t.anchor&&a(t.anchor)}const dr=L5;function Dl(e,t){const i=e.ctx;if(i&&i.ut){let r,n;for(t?(r=e.el,n=e.anchor):(r=e.targetStart,n=e.targetAnchor);r&&r!==n;)r.nodeType===1&&r.setAttribute("data-v-owner",i.uid),r=r.nextSibling;i.ut()}}function v1(e,t,i,r,n=null){const s=t.targetStart=i(""),a=t.targetAnchor=i("");return s[fm]=a,e&&(r(s,e,n),r(a,e,n)),a}const Gi=Symbol("_leaveCb"),kl=Symbol("_enterCb");function x5(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return lt(()=>{e.isMounted=!0}),mi(()=>{e.isUnmounting=!0}),e}const ji=[Function,Array],pm={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:ji,onEnter:ji,onAfterEnter:ji,onEnterCancelled:ji,onBeforeLeave:ji,onLeave:ji,onAfterLeave:ji,onLeaveCancelled:ji,onBeforeAppear:ji,onAppear:ji,onAfterAppear:ji,onAppearCancelled:ji},T5={name:"BaseTransition",props:pm,setup(e,{slots:t}){const i=wi(),r=x5();return()=>{const n=t.default&&vm(t.default(),!0),s=n&&n.length?_m(n):i.subTree?z():void 0;if(!s)return;const a=rt(e),{mode:l}=a;if(r.isLeaving)return Su(s);const o=G0(s);if(!o)return Su(s);let c=g1(o,a,r,i,d=>c=d);o.type!==Qt&&Zs(o,c);let u=i.subTree&&G0(i.subTree);if(u&&u.type!==Qt&&!ns(u,o)&&co(i.subTree)){let d=g1(u,a,r,i);if(Zs(u,d),l==="out-in"&&o.type!==Qt)return r.isLeaving=!0,d.afterLeave=()=>{r.isLeaving=!1,i.job.flags&8||i.update(),delete d.afterLeave,u=void 0},Su(s);l==="in-out"&&o.type!==Qt?d.delayLeave=(h,f,v)=>{const p=mm(r,u);p[String(u.key)]=u,h[Gi]=()=>{f(),h[Gi]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{v(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return s}}};function _m(e){let t=e[0];if(e.length>1){for(const i of e)if(i.type!==Qt){t=i;break}}return t}const H5=T5;function mm(e,t){const{leavingVNodes:i}=e;let r=i.get(t.type);return r||(r=Object.create(null),i.set(t.type,r)),r}function g1(e,t,i,r,n){const{appear:s,mode:a,persisted:l=!1,onBeforeEnter:o,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:h,onLeave:f,onAfterLeave:v,onLeaveCancelled:p,onBeforeAppear:S,onAppear:_,onAfterAppear:w,onAppearCancelled:C}=t,g=String(e.key),E=mm(i,e),T=(P,Y)=>{P&&rr(P,r,9,Y)},L=(P,Y)=>{const W=Y[1];T(P,Y),Ze(P)?P.every(A=>A.length<=1)&&W():P.length<=1&&W()},V={mode:a,persisted:l,beforeEnter(P){let Y=o;if(!i.isMounted)if(s)Y=S||o;else return;P[Gi]&&P[Gi](!0);const W=E[g];if(W&&ns(e,W)){let A=W.el[Gi];if(!A){const $=co(W);A=$&&$.el[Gi]}A&&A()}T(Y,[P])},enter(P){if(E[g]===e)return;let Y=c,W=u,A=d;if(!i.isMounted)if(s)Y=_||c,W=w||u,A=C||d;else return;let $=!1;P[kl]=ie=>{$||($=!0,ie?T(A,[P]):T(W,[P]),V.delayedLeave&&V.delayedLeave(),P[kl]=void 0)};const Z=P[kl].bind(null,!1);Y?L(Y,[P,Z]):Z()},leave(P,Y){const W=String(e.key);if(P[kl]&&P[kl](!0),i.isUnmounting)return Y();T(h,[P]);let A=!1;P[Gi]=Z=>{A||(A=!0,Y(),Z?T(p,[P]):T(v,[P]),P[Gi]=void 0,E[W]===e&&delete E[W])};const $=P[Gi].bind(null,!1);E[W]=e,f?L(f,[P,$]):$()},clone(P){const Y=g1(P,t,i,r,n);return n&&n(Y),Y}};return V}function Su(e){if(Io(e))return e=Pn(e),e.children=null,e}function G0(e){if(!Io(e))return Zc(e.type)&&e.children?_m(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:i}=e;if(i){if(t&16)return i[0];if(t&32&&je(i.default))return i.default()}}function Zs(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const i=e.component.subTree;Zs(Zc(i.type)&&G0(i)||i,t)}else if(e.shapeFlag&128)e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback);else if(e.transition=t,e.type===ke&&Ze(e.children)){const i=xm(e.children,!1);i&&Zs(i,t)}}function vm(e,t=!1,i){let r=[],n=0;for(let s=0;s<e.length;s++){let a=e[s];const l=i==null?a.key:String(i)+String(a.key!=null?a.key:s);a.type===ke?(a.patchFlag&128&&n++,r=r.concat(vm(a.children,t,l))):(t||a.type!==Qt)&&r.push(l!=null?Pn(a,{key:l}):a)}if(n>1)for(let s=0;s<r.length;s++)r[s].patchFlag=-2;return r}function co(e){if(e.component)return co(e.component.subTree);if(e.type===ke){const t=Ze(e.children)&&xm(e.children,!1);return t?co(t):void 0}if(e.type!==Qt)return e}function Re(e,t){return je(e)?Zt({name:e.name},t,{setup:e}):e}function Pi(){const e=wi();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function mh(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function P2(e,t){let i;return!!((i=Object.getOwnPropertyDescriptor(e,t))&&!i.configurable)}const Y0=new WeakMap;function Yl(e,t,i,r,n=!1){if(Ze(e)){e.forEach((p,S)=>Yl(p,t&&(Ze(t)?t[S]:t),i,r,n));return}if(Vs(r)&&!n){r.shapeFlag&512&&r.type.__asyncResolved&&r.component.subTree.component&&Yl(e,t,i,r.component.subTree);return}const s=r.shapeFlag&4?zc(r.component):r.el,a=n?null:s,{i:l,r:o}=e,c=t&&t.r,u=l.refs===st?l.refs={}:l.refs,d=l.setupState,h=rt(d),f=d===st?x_:p=>P2(u,p)?!1:ot(h,p),v=(p,S)=>!(S&&P2(u,S));if(c!=null&&c!==o){if(O2(t),St(c))u[c]=null,f(c)&&(d[c]=null);else if(At(c)){const p=t;v(c,p.k)&&(c.value=null),p.k&&(u[p.k]=null)}}if(je(o))Oo(o,l,12,[a,u]);else{const p=St(o),S=At(o);if(p||S){const _=()=>{if(e.f){const w=p?f(o)?d[o]:u[o]:v()||!e.k?o.value:u[e.k];if(n)Ze(w)&&sh(w,s);else if(Ze(w))w.includes(s)||w.push(s);else if(p)u[o]=[s],f(o)&&(d[o]=u[o]);else{const C=[s];v(o,e.k)&&(o.value=C),e.k&&(u[e.k]=C)}}else p?(u[o]=a,f(o)&&(d[o]=a)):S&&(v(o,e.k)&&(o.value=a),e.k&&(u[e.k]=a))};if(a){const w=()=>{_(),Y0.delete(e)};w.id=-1,Y0.set(e,w),Ai(w,i)}else O2(e),_()}}}function O2(e){const t=Y0.get(e);t&&(t.flags|=8,Y0.delete(e))}const R2=e=>e.nodeType===8;Rc().requestIdleCallback;Rc().cancelIdleCallback;function N5(e,t){if(R2(e)&&e.data==="["){let i=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(R2(r))if(r.data==="]"){if(--i===0)break}else r.data==="["&&i++;r=r.nextSibling}}else t(e)}const Vs=e=>!!e.type.__asyncLoader;function P5(e){je(e)&&(e={loader:e});const{loader:t,loadingComponent:i,errorComponent:r,delay:n=200,hydrate:s,timeout:a,suspensible:l=!0,onError:o}=e;let c=null,u,d=0;const h=()=>(d++,c=null,f()),f=()=>{let v;return c||(v=c=t().catch(p=>{if(p=p instanceof Error?p:new Error(String(p)),o)return new Promise((S,_)=>{o(p,()=>S(h()),()=>_(p),d+1)});throw p}).then(p=>v!==c&&c?c:(p&&(p.__esModule||p[Symbol.toStringTag]==="Module")&&(p=p.default),u=p,p)))};return Re({name:"AsyncComponentWrapper",__asyncLoader:f,__asyncHydrate(v,p,S){const _=v.isConnected;let w=!1;(p.bu||(p.bu=[])).push(()=>w=!0);const C=()=>{w||!v.parentNode||_&&!v.isConnected||S()},g=s?()=>{const E=s(C,T=>N5(v,T));E&&(p.bum||(p.bum=[])).push(E)}:C;u?g():f().then(()=>!p.isUnmounted&&g())},get __asyncResolved(){return u},setup(){const v=hi;if(mh(v),u)return()=>a0(u,v);const p=E=>{c=null,Ro(E,v,13,!r)};if(l&&v.suspense||Fs)return f().then(E=>()=>a0(E,v)).catch(E=>(p(E),()=>r?G(r,{error:E}):null));const S=q(!1),_=q(),w=q(!!n);let C,g;return Oi(()=>{C!=null&&clearTimeout(C),g!=null&&clearTimeout(g)}),n&&(g=setTimeout(()=>{v.isUnmounted||(w.value=!1)},n)),a!=null&&(C=setTimeout(()=>{if(!v.isUnmounted&&!S.value&&!_.value){const E=new Error(`Async component timed out after ${a}ms.`);p(E),_.value=E}},a)),f().then(()=>{v.isUnmounted||(S.value=!0,v.parent&&Io(v.parent.vnode)&&v.parent.update())}).catch(E=>{if(v.isUnmounted){c=null;return}p(E),_.value=E}),()=>{if(S.value&&u)return a0(u,v);if(_.value&&r)return G(r,{error:_.value});if(i&&!w.value)return a0(i,v)}}})}function a0(e,t){const{ref:i,props:r,children:n,ce:s}=t.vnode,a=G(e,r,n);return a.ref=i,a.ce=s,delete t.vnode.ce,a}const Io=e=>e.type.__isKeepAlive;function O5(e,t){gm(e,"a",t)}function R5(e,t){gm(e,"da",t)}function gm(e,t,i=hi){const r=e.__wdc||(e.__wdc=()=>{let n=i;for(;n;){if(n.isDeactivated)return;n=n.parent}return e()});if(Bc(t,r,i),i){let n=i.parent;for(;n&&n.parent;)Io(n.parent.vnode)&&I5(r,t,i,n),n=n.parent}}function I5(e,t,i,r){const n=Bc(t,e,r,!0);Oi(()=>{sh(r[t],n)},i)}function Bc(e,t,i=hi,r=!1){if(i){const n=i[e]||(i[e]=[]),s=t.__weh||(t.__weh=(...a)=>{Ir();const l=Vo(i),o=rr(t,i,e,a);return l(),Dr(),o});return r?n.unshift(s):n.push(s),s}}const un=e=>(t,i=hi)=>{(!Fs||e==="sp")&&Bc(e,(...r)=>t(...r),i)},D5=un("bm"),lt=un("m"),V5=un("bu"),Z5=un("u"),mi=un("bum"),Oi=un("um"),B5=un("sp"),F5=un("rtg"),z5=un("rtc");function U5(e,t=hi){Bc("ec",e,t)}const vh="components",W5="directives";function uo(e,t){return gh(vh,e,!0,t)||e}const bm=Symbol.for("v-ndc");function Do(e){return St(e)?gh(vh,e,!1)||e:e||bm}function ym(e){return gh(W5,e)}function gh(e,t,i=!0,r=!1){const n=pi||hi;if(n){const s=n.type;if(e===vh){const l=M3(s,!1);if(l&&(l===t||l===yi(t)||l===Pc(yi(t))))return s}const a=I2(n[e]||s[e],t)||I2(n.appContext[e],t);return!a&&r?s:a}}function I2(e,t){return e&&(e[t]||e[yi(t)]||e[Pc(yi(t))])}function Fe(e,t,i,r){let n;const s=i&&i[r],a=Ze(e);if(a||St(e)){const l=a&&Tr(e);let o=!1,c=!1;l&&(o=!Bi(e),c=Vr(e),e=Dc(e)),n=new Array(e.length);for(let u=0,d=e.length;u<d;u++)n[u]=t(o?c?Nn(ir(e[u])):ir(e[u]):e[u],u,void 0,s&&s[u])}else if(typeof e=="number")if(!Number.isInteger(e)||e<0)n=[];else{n=new Array(e);for(let l=0;l<e;l++)n[l]=t(l+1,l,void 0,s&&s[l])}else if(ut(e))if(e[Symbol.iterator])n=Array.from(e,(l,o)=>t(l,o,void 0,s&&s[o]));else{const l=Object.keys(e);n=new Array(l.length);for(let o=0,c=l.length;o<c;o++){const u=l[o];n[o]=t(e[u],u,o,s&&s[o])}}else n=[];return i&&(i[r]=n),n}function wm(e,t){for(let i=0;i<t.length;i++){const r=t[i];if(Ze(r))for(let n=0;n<r.length;n++)e[r[n].name]=r[n].fn;else r&&(e[r.name]=r.key?(...n)=>{const s=r.fn(...n);return s&&(s.key=r.key),s}:r.fn)}return e}function He(e,t,i,r,n,s){if(i==null&&(i={}),pi.ce||pi.parent&&Vs(pi.parent)&&pi.parent.ce){const c=s!=null&&i.key==null?Zt({},i,{key:s}):i,u=Object.keys(c).length>0;return t!=="default"&&(c.name=t),m(),me(ke,null,[G("slot",c,r&&r())],u?-2:64)}let a=e[t];a&&a._c&&(a._d=!1);const l=ln.length;m();let o;try{const c=a&&Sm(a(i)),u=i.key||s||c&&c.key;o=me(ke,{key:(u&&!zi(u)?u:`_${t}`)+(!c&&r?"_fb":"")},c||(r?r():[]),c&&e._===1?64:-2)}catch(c){for(let u=ln.length;u>l;u--)Sh();throw c}finally{a&&a._c&&(a._d=!0)}return!n&&o.scopeId&&(o.slotScopeIds=[o.scopeId+"-s"]),o}function Sm(e){return e.some(t=>Bs(t)?!(t.type===Qt||t.type===ke&&!Sm(t.children)):!0)?e:null}const b1=e=>e?Wm(e)?zc(e):b1(e.parent):null,Xl=Zt(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=>b1(e.parent),$root:e=>b1(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Am(e),$forceUpdate:e=>e.f||(e.f=()=>{ph(e.update)}),$nextTick:e=>e.n||(e.n=Kt.bind(e.proxy)),$watch:e=>M5.bind(e)}),Cu=(e,t)=>e!==st&&!e.__isScriptSetup&&ot(e,t),j5={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:i,setupState:r,data:n,props:s,accessCache:a,type:l,appContext:o}=e;if(t[0]!=="$"){const h=a[t];if(h!==void 0)switch(h){case 1:return r[t];case 2:return n[t];case 4:return i[t];case 3:return s[t]}else{if(Cu(r,t))return a[t]=1,r[t];if(n!==st&&ot(n,t))return a[t]=2,n[t];if(ot(s,t))return a[t]=3,s[t];if(i!==st&&ot(i,t))return a[t]=4,i[t];y1&&(a[t]=0)}}const c=Xl[t];let u,d;if(c)return t==="$attrs"&&bi(e.attrs,"get",""),c(e);if((u=l.__cssModules)&&(u=u[t]))return u;if(i!==st&&ot(i,t))return a[t]=4,i[t];if(d=o.config.globalProperties,ot(d,t))return d[t]},set({_:e},t,i){const{data:r,setupState:n,ctx:s}=e;return Cu(n,t)?(n[t]=i,!0):r!==st&&ot(r,t)?(r[t]=i,!0):ot(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=i,!0)},has({_:{data:e,setupState:t,accessCache:i,ctx:r,appContext:n,props:s,type:a}},l){let o;return!!(i[l]||e!==st&&l[0]!=="$"&&ot(e,l)||Cu(t,l)||ot(s,l)||ot(r,l)||ot(Xl,l)||ot(n.config.globalProperties,l)||(o=a.__cssModules)&&o[l])},defineProperty(e,t,i){return i.get!=null?e._.accessCache[t]=0:ot(i,"value")&&this.set(e,t,i.value,null),Reflect.defineProperty(e,t,i)}};function Fr(){return K5().slots}function K5(e){const t=wi();return t.setupContext||(t.setupContext=Km(t))}function X0(e){return Ze(e)?e.reduce((t,i)=>(t[i]=null,t),{}):e}function Cm(e,t){return!e||!t?e||t:Ze(e)&&Ze(t)?e.concat(t):Zt({},X0(e),X0(t))}let y1=!0;function q5(e){const t=Am(e),i=e.proxy,r=e.ctx;y1=!1,t.beforeCreate&&D2(t.beforeCreate,e,"bc");const{data:n,computed:s,methods:a,watch:l,provide:o,inject:c,created:u,beforeMount:d,mounted:h,beforeUpdate:f,updated:v,activated:p,deactivated:S,beforeDestroy:_,beforeUnmount:w,destroyed:C,unmounted:g,render:E,renderTracked:T,renderTriggered:L,errorCaptured:V,serverPrefetch:P,expose:Y,inheritAttrs:W,components:A,directives:$,filters:Z}=t;if(c&&G5(c,r,null),a)for(const ce in a){const J=a[ce];je(J)&&(r[ce]=J.bind(i))}if(n){const ce=n.call(i,i);ut(ce)&&(e.data=ps(ce))}if(y1=!0,s)for(const ce in s){const J=s[ce],ae=je(J)?J.bind(i,i):je(J.get)?J.get.bind(i,i):xr,re=!je(J)&&je(J.set)?J.set.bind(i):xr,X=j({get:ae,set:re});Object.defineProperty(r,ce,{enumerable:!0,configurable:!0,get:()=>X.value,set:le=>X.value=le})}if(l)for(const ce in l)km(l[ce],r,i,ce);if(o){const ce=je(o)?o.call(i):o;Reflect.ownKeys(ce).forEach(J=>{Ji(J,ce[J])})}u&&D2(u,e,"c");function ne(ce,J){Ze(J)?J.forEach(ae=>ce(ae.bind(i))):J&&ce(J.bind(i))}if(ne(D5,d),ne(lt,h),ne(V5,f),ne(Z5,v),ne(O5,p),ne(R5,S),ne(U5,V),ne(z5,T),ne(F5,L),ne(mi,w),ne(Oi,g),ne(B5,P),Ze(Y))if(Y.length){const ce=e.exposed||(e.exposed={});Y.forEach(J=>{Object.defineProperty(ce,J,{get:()=>i[J],set:ae=>i[J]=ae,enumerable:!0})})}else e.exposed||(e.exposed={});E&&e.render===xr&&(e.render=E),W!=null&&(e.inheritAttrs=W),A&&(e.components=A),$&&(e.directives=$),P&&mh(e)}function G5(e,t,i=xr){Ze(e)&&(e=w1(e));for(const r in e){const n=e[r];let s;ut(n)?"default"in n?s=Mt(n.from||r,n.default,!0):s=Mt(n.from||r):s=Mt(n),At(s)?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>s.value,set:a=>s.value=a}):t[r]=s}}function D2(e,t,i){rr(Ze(e)?e.map(r=>r.bind(t.proxy)):e.bind(t.proxy),t,i)}function km(e,t,i,r){let n=r.includes(".")?hm(i,r):()=>i[r];if(St(e)){const s=t[e];je(s)&&De(n,s)}else if(je(e))De(n,e.bind(i));else if(ut(e))if(Ze(e))e.forEach(s=>km(s,t,i,r));else{const s=je(e.handler)?e.handler.bind(i):t[e.handler];je(s)&&De(n,s,e)}}function Am(e){const t=e.type,{mixins:i,extends:r}=t,{mixins:n,optionsCache:s,config:{optionMergeStrategies:a}}=e.appContext,l=s.get(t);let o;return l?o=l:!n.length&&!i&&!r?o=t:(o={},n.length&&n.forEach(c=>J0(o,c,a,!0)),J0(o,t,a)),ut(t)&&s.set(t,o),o}function J0(e,t,i,r=!1){const{mixins:n,extends:s}=t;s&&J0(e,s,i,!0),n&&n.forEach(a=>J0(e,a,i,!0));for(const a in t)if(!(r&&a==="expose")){const l=Y5[a]||i&&i[a];e[a]=l?l(e[a],t[a]):t[a]}return e}const Y5={data:V2,props:Z2,emits:Z2,methods:Vl,computed:Vl,beforeCreate:Ci,created:Ci,beforeMount:Ci,mounted:Ci,beforeUpdate:Ci,updated:Ci,beforeDestroy:Ci,beforeUnmount:Ci,destroyed:Ci,unmounted:Ci,activated:Ci,deactivated:Ci,errorCaptured:Ci,serverPrefetch:Ci,components:Vl,directives:Vl,watch:J5,provide:V2,inject:X5};function V2(e,t){return t?e?function(){return Zt(je(e)?e.call(this,this):e,je(t)?t.call(this,this):t)}:t:e}function X5(e,t){return Vl(w1(e),w1(t))}function w1(e){if(Ze(e)){const t={};for(let i=0;i<e.length;i++)t[e[i]]=e[i];return t}return e}function Ci(e,t){return e?[...new Set([].concat(e,t))]:t}function Vl(e,t){return e?Zt(Object.create(null),e,t):t}function Z2(e,t){return e?Ze(e)&&Ze(t)?[...new Set([...e,...t])]:Zt(Object.create(null),X0(e),X0(t??{})):t}function J5(e,t){if(!e)return t;if(!t)return e;const i=Zt(Object.create(null),e);for(const r in t)i[r]=Ci(e[r],t[r]);return i}function Mm(){return{app:null,config:{isNativeTag:x_,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 Q5=0;function e3(e,t){return function(r,n=null){je(r)||(r=Zt({},r)),n!=null&&!ut(n)&&(n=null);const s=Mm(),a=new WeakSet,l=[];let o=!1;const c=s.app={_uid:Q5++,_component:r,_props:n,_container:null,_context:s,_instance:null,version:L3,get config(){return s.config},set config(u){},use(u,...d){return a.has(u)||(u&&je(u.install)?(a.add(u),u.install(c,...d)):je(u)&&(a.add(u),u(c,...d))),c},mixin(u){return s.mixins.includes(u)||s.mixins.push(u),c},component(u,d){return d?(s.components[u]=d,c):s.components[u]},directive(u,d){return d?(s.directives[u]=d,c):s.directives[u]},mount(u,d,h){if(!o){const f=c._ceVNode||G(r,n);return f.appContext=s,h===!0?h="svg":h===!1&&(h=void 0),e(f,u,h),o=!0,c._container=u,u.__vue_app__=c,zc(f.component)}},onUnmount(u){l.push(u)},unmount(){o&&(rr(l,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide(u,d){return s.provides[u]=d,c},runWithContext(u){const d=ds;ds=c;try{return u()}finally{ds=d}}};return c}}let ds=null;function Em(e,t,i=st){const r=wi(),n=yi(t),s=cn(t),a=Lm(e,n),l=u5((o,c)=>{let u,d=st,h;return A5(()=>{const f=e[n];di(u,f)&&(u=f,c())}),{get(){return o(),i.get?i.get(u):u},set(f){const v=i.set?i.set(f):f;if(!di(v,u)&&!(d!==st&&di(f,d)))return;const p=r.vnode.props,S=!!(p&&(t in p||n in p||s in p)&&(`onUpdate:${t}`in p||`onUpdate:${n}`in p||`onUpdate:${s}`in p));S||(u=f,c()),r.emit(`update:${t}`,v),di(f,d)&&(di(f,v)&&!di(v,h)||S&&d!==st&&!di(v,u))&&c(),d=f,h=v}}});return l[Symbol.iterator]=()=>{let o=0;return{next(){return o<2?{value:o++?a||st:l,done:!1}:{done:!0}}}},l}const Lm=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${yi(t)}Modifiers`]||e[`${cn(t)}Modifiers`];function t3(e,t,...i){if(e.isUnmounted)return;const r=e.vnode.props||st;let n=i;const s=t.startsWith("update:"),a=s&&Lm(r,t.slice(7));a&&(a.trim&&(n=i.map(u=>St(u)?u.trim():u)),a.number&&(n=n.map(Oc)));let l,o=r[l=mu(t)]||r[l=mu(yi(t))];!o&&s&&(o=r[l=mu(cn(t))]),o&&rr(o,e,6,n);const c=r[l+"Once"];if(c){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,rr(c,e,6,n)}}const i3=new WeakMap;function $m(e,t,i=!1){const r=i?i3:t.emitsCache,n=r.get(e);if(n!==void 0)return n;const s=e.emits;let a={},l=!1;if(!je(e)){const o=c=>{const u=$m(c,t,!0);u&&(l=!0,Zt(a,u))};!i&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return!s&&!l?(ut(e)&&r.set(e,null),null):(Ze(s)?s.forEach(o=>a[o]=null):Zt(a,s),ut(e)&&r.set(e,a),a)}function Fc(e,t){return!e||!xc(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),ot(e,t[0].toLowerCase()+t.slice(1))||ot(e,cn(t))||ot(e,t))}function B2(e){const{type:t,vnode:i,proxy:r,withProxy:n,propsOptions:[s],slots:a,attrs:l,emit:o,render:c,renderCache:u,props:d,data:h,setupState:f,ctx:v,inheritAttrs:p}=e,S=q0(e);let _,w;try{if(i.shapeFlag&4){const g=n||r,E=g;_=Mr(c.call(E,g,u,d,f,h,v)),w=l}else{const g=t;_=Mr(g.length>1?g(d,{attrs:l,slots:a,emit:o}):g(d,null)),w=t.props?l:r3(l)}}catch(g){ln.length=0,Ro(g,e,1),_=G(Qt)}let C=_;if(w&&p!==!1){const g=Object.keys(w),{shapeFlag:E}=C;g.length&&E&7&&(s&&g.some(Tc)&&(w=n3(w,s)),C=Pn(C,w,!1,!0))}if(i.dirs&&(C=Pn(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(i.dirs):i.dirs),i.transition){const g=Zc(C.type)&&G0(C)||C;Zs(g,i.transition)}return _=C,q0(S),_}function xm(e,t=!0){let i;for(let r=0;r<e.length;r++){const n=e[r];if(Bs(n)){if(n.type!==Qt||n.children==="v-if"){if(i)return;i=n}}else return}return i}const r3=e=>{let t;for(const i in e)(i==="class"||i==="style"||xc(i))&&((t||(t={}))[i]=e[i]);return t},n3=(e,t)=>{const i={};for(const r in e)(!Tc(r)||!(r.slice(9)in t))&&(i[r]=e[r]);return i};function s3(e,t,i){const{props:r,children:n,component:s}=e,{props:a,children:l,patchFlag:o}=t,c=s.emitsOptions;if(t.dirs||t.transition)return!0;if(i&&o>=0){if(o&1024)return!0;if(o&16)return r?F2(r,a,c):!!a;if(o&8){const u=t.dynamicProps;for(let d=0;d<u.length;d++){const h=u[d];if(Tm(a,r,h)&&!Fc(c,h))return!0}}}else return(n||l)&&(!l||!l.$stable)?!0:r===a?!1:r?a?F2(r,a,c):!0:!!a;return!1}function F2(e,t,i){const r=Object.keys(t);if(r.length!==Object.keys(e).length)return!0;for(let n=0;n<r.length;n++){const s=r[n];if(!ot(e,s)||Tm(t,e,s)&&!Fc(i,s))return!0}return!1}function Tm(e,t,i){const r=e[i],n=t[i];return i==="style"&&ut(r)&&ut(n)?!hr(r,n):r!==n}function a3({vnode:e,parent:t,suspense:i},r){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.suspense.vnode.el=n.el=r,e=n),n===e)(e=t.vnode).el=r,t=t.parent;else break}i&&i.activeBranch===e&&(i.vnode.el=r)}const Hm={},Nm=()=>Object.create(Hm),Pm=e=>Object.getPrototypeOf(e)===Hm;function l3(e,t,i,r=!1){const n={},s=Nm();e.propsDefaults=Object.create(null),Om(e,t,n,s);for(const a in e.propsOptions[0])a in n||(n[a]=void 0);i?e.props=r?n:tm(n):e.type.props?e.props=n:e.props=s,e.attrs=s}function o3(e,t,i,r){const{props:n,attrs:s,vnode:{patchFlag:a}}=e,l=rt(n),[o]=e.propsOptions;let c=!1;if((r||a>0)&&!(a&16)){if(a&8){const u=e.vnode.dynamicProps;for(let d=0;d<u.length;d++){let h=u[d];if(Fc(e.emitsOptions,h))continue;const f=t[h];if(o)if(ot(s,h))f!==s[h]&&(s[h]=f,c=!0);else{const v=yi(h);n[v]=S1(o,l,v,f,e,!1)}else f!==s[h]&&(s[h]=f,c=!0)}}}else{Om(e,t,n,s)&&(c=!0);let u;for(const d in l)(!t||!ot(t,d)&&((u=cn(d))===d||!ot(t,u)))&&(o?i&&(i[d]!==void 0||i[u]!==void 0)&&(n[d]=S1(o,l,d,void 0,e,!0)):delete n[d]);if(s!==l)for(const d in s)(!t||!ot(t,d))&&(delete s[d],c=!0)}c&&Jr(e.attrs,"set","")}function Om(e,t,i,r){const[n,s]=e.propsOptions;let a=!1,l;if(t)for(let o in t){if(Kl(o))continue;const c=t[o];let u;n&&ot(n,u=yi(o))?!s||!s.includes(u)?i[u]=c:(l||(l={}))[u]=c:Fc(e.emitsOptions,o)||(!(o in r)||c!==r[o])&&(r[o]=c,a=!0)}if(s){const o=rt(i),c=l||st;for(let u=0;u<s.length;u++){const d=s[u];i[d]=S1(n,o,d,c[d],e,!ot(c,d))}}return a}function S1(e,t,i,r,n,s){const a=e[i];if(a!=null){const l=ot(a,"default");if(l&&r===void 0){const o=a.default;if(a.type!==Function&&!a.skipFactory&&je(o)){const{propsDefaults:c}=n;if(i in c)r=c[i];else{const u=Vo(n);r=c[i]=o.call(null,t),u()}}else r=o;n.ce&&n.ce._setProp(i,r)}a[0]&&(s&&!l?r=!1:a[1]&&(r===""||r===cn(i))&&(r=!0))}return r}const c3=new WeakMap;function Rm(e,t,i=!1){const r=i?c3:t.propsCache,n=r.get(e);if(n)return n;const s=e.props,a={},l=[];let o=!1;if(!je(e)){const u=d=>{o=!0;const[h,f]=Rm(d,t,!0);Zt(a,h),f&&l.push(...f)};!i&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!s&&!o)return ut(e)&&r.set(e,ss),ss;if(Ze(s))for(let u=0;u<s.length;u++){const d=yi(s[u]);z2(d)&&(a[d]=st)}else if(s)for(const u in s){const d=yi(u);if(z2(d)){const h=s[u],f=a[d]=Ze(h)||je(h)?{type:h}:Zt({},h),v=f.type;let p=!1,S=!0;if(Ze(v))for(let _=0;_<v.length;++_){const w=v[_],C=je(w)&&w.name;if(C==="Boolean"){p=!0;break}else C==="String"&&(S=!1)}else p=je(v)&&v.name==="Boolean";f[0]=p,f[1]=S,(p||ot(f,"default"))&&l.push(d)}}const c=[a,l];return ut(e)&&r.set(e,c),c}function z2(e){return e[0]!=="$"&&!Kl(e)}const bh=e=>e==="_"||e==="_ctx"||e==="$stable",yh=e=>Ze(e)?e.map(Mr):[Mr(e)],u3=(e,t,i)=>{if(t._n)return t;const r=te((...n)=>yh(t(...n)),i);return r._c=!1,r},Im=(e,t,i)=>{const r=e._ctx;for(const n in e){if(bh(n))continue;const s=e[n];if(je(s))t[n]=u3(n,s,r);else if(s!=null){const a=yh(s);t[n]=()=>a}}},Dm=(e,t)=>{const i=yh(t);e.slots.default=()=>i},Vm=(e,t,i)=>{for(const r in t)(i||!bh(r))&&(e[r]=t[r])},d3=(e,t,i)=>{const r=e.slots=Nm();if(e.vnode.shapeFlag&32){const n=t._;n?(Vm(r,t,i),i&&P_(r,"_",n,!0)):Im(t,r)}else t&&Dm(e,t)},h3=(e,t,i)=>{const{vnode:r,slots:n}=e;let s=!0,a=st;if(r.shapeFlag&32){const l=t._;l?i&&l===1?s=!1:Vm(n,t,i):(s=!t.$stable,Im(t,n)),a=t}else t&&(Dm(e,t),a={default:1});if(s)for(const l in n)!bh(l)&&a[l]==null&&delete n[l]},Ai=v3;function f3(e){return p3(e)}function p3(e,t){const i=Rc();i.__VUE__=!0;const{insert:r,remove:n,patchProp:s,createElement:a,createText:l,createComment:o,setText:c,setElementText:u,parentNode:d,nextSibling:h,setScopeId:f=xr,insertStaticContent:v}=e,p=(x,H,O,ee=null,Q=null,pe=null,we=void 0,y=null,k=!!H.dynamicChildren)=>{if(x===H)return;x&&!ns(x,H)&&(ee=U(x),le(x,Q,pe,!0),x=null),H.patchFlag===-2&&(k=!1,H.dynamicChildren=null),H.dynamicChildren&&x&&x.dynamicChildren&&x.dynamicChildren.hasOnce&&(H.dynamicChildren===ss&&(H.dynamicChildren=[]),H.dynamicChildren.hasOnce=!0);const{type:D,ref:N,shapeFlag:I}=H;switch(D){case Vn:S(x,H,O,ee);break;case Qt:_(x,H,O,ee);break;case Au:x==null&&w(H,O,ee,we);break;case ke:A(x,H,O,ee,Q,pe,we,y,k);break;default:I&1?E(x,H,O,ee,Q,pe,we,y,k):I&6?$(x,H,O,ee,Q,pe,we,y,k):(I&64||I&128)&&D.process(x,H,O,ee,Q,pe,we,y,k,ge)}N!=null&&Q?Yl(N,x&&x.ref,pe,H||x,!H):N==null&&x&&x.ref!=null&&Yl(x.ref,null,pe,x,!0)},S=(x,H,O,ee)=>{if(x==null)r(H.el=l(H.children),O,ee);else{const Q=H.el=x.el;H.children!==x.children&&c(Q,H.children)}},_=(x,H,O,ee)=>{x==null?r(H.el=o(H.children||""),O,ee):H.el=x.el},w=(x,H,O,ee)=>{[x.el,x.anchor]=v(x.children,H,O,ee,x.el,x.anchor)},C=({el:x,anchor:H},O,ee)=>{let Q;for(;x&&x!==H;)Q=h(x),r(x,O,ee),x=Q;r(H,O,ee)},g=({el:x,anchor:H})=>{let O;for(;x&&x!==H;)O=h(x),n(x),x=O;n(H)},E=(x,H,O,ee,Q,pe,we,y,k)=>{if(H.type==="svg"?we="svg":H.type==="math"&&(we="mathml"),x==null)T(H,O,ee,Q,pe,we,y,k);else{const D=x.el&&x.el._isVueCE?x.el:null;try{D&&D._beginPatch(),P(x,H,Q,pe,we,y,k)}finally{D&&D._endPatch()}}},T=(x,H,O,ee,Q,pe,we,y)=>{let k,D;const{props:N,shapeFlag:I,transition:R,dirs:B}=x;if(k=x.el=a(x.type,pe,N&&N.is,N),I&8?u(k,x.children):I&16&&V(x.children,k,null,ee,Q,ku(x,pe),we,y),B&&jn(x,null,ee,"created"),L(k,x,x.scopeId,we,ee),N){for(const Se in N)Se!=="value"&&!Kl(Se)&&s(k,Se,null,N[Se],pe,ee);"value"in N&&s(k,"value",null,N.value,pe),(D=N.onVnodeBeforeMount)&&mr(D,ee,x)}B&&jn(x,null,ee,"beforeMount");const K=_3(Q,R);K&&R.beforeEnter(k),r(k,H,O),((D=N&&N.onVnodeMounted)||K||B)&&Ai(()=>{try{D&&mr(D,ee,x),K&&R.enter(k),B&&jn(x,null,ee,"mounted")}finally{}},Q)},L=(x,H,O,ee,Q)=>{if(O&&f(x,O),ee)for(let pe=0;pe<ee.length;pe++)f(x,ee[pe]);if(Q){let pe=Q.subTree;if(H===pe||Bm(pe.type)&&(pe.ssContent===H||pe.ssFallback===H)){const we=Q.vnode;L(x,we,we.scopeId,we.slotScopeIds,Q.parent)}}},V=(x,H,O,ee,Q,pe,we,y,k=0)=>{for(let D=k;D<x.length;D++){const N=x[D]=y?Xr(x[D]):Mr(x[D]);p(null,N,H,O,ee,Q,pe,we,y)}},P=(x,H,O,ee,Q,pe,we)=>{const y=H.el=x.el;let{patchFlag:k,dynamicChildren:D,dirs:N}=H;k|=x.patchFlag&16;const I=x.props||st,R=H.props||st;let B;if(O&&Kn(O,!1),(B=R.onVnodeBeforeUpdate)&&mr(B,O,H,x),N&&jn(H,x,O,"beforeUpdate"),O&&Kn(O,!0),D&&(!x.dynamicChildren||x.dynamicChildren.length!==D.length)&&(k=0,we=!1,D=null),(I.innerHTML&&R.innerHTML==null||I.textContent&&R.textContent==null)&&u(y,""),D?Y(x.dynamicChildren,D,y,O,ee,ku(H,Q),pe):we||J(x,H,y,null,O,ee,ku(H,Q),pe,!1),k>0){if(k&16)W(y,I,R,O,Q);else if(k&2&&I.class!==R.class&&s(y,"class",null,R.class,Q),k&4&&s(y,"style",I.style,R.style,Q),k&8){const K=H.dynamicProps;for(let Se=0;Se<K.length;Se++){const Me=K[Se],Ve=I[Me],Ye=R[Me];(Ye!==Ve||Me==="value")&&s(y,Me,Ve,Ye,Q,O)}}k&1&&x.children!==H.children&&u(y,H.children)}else!we&&D==null&&W(y,I,R,O,Q);((B=R.onVnodeUpdated)||N)&&Ai(()=>{B&&mr(B,O,H,x),N&&jn(H,x,O,"updated")},ee)},Y=(x,H,O,ee,Q,pe,we)=>{for(let y=0;y<H.length;y++){const k=x[y],D=H[y],N=k.el||C1(k),I=N&&(k.type===ke||!ns(k,D)||k.shapeFlag&198)?d(N):O;p(k,D,I,null,ee,Q,pe,we,!0)}},W=(x,H,O,ee,Q)=>{if(H!==O){if(H!==st)for(const pe in H)!Kl(pe)&&!(pe in O)&&s(x,pe,H[pe],null,Q,ee);for(const pe in O){if(Kl(pe))continue;const we=O[pe],y=H[pe];we!==y&&pe!=="value"&&s(x,pe,y,we,Q,ee)}"value"in O&&s(x,"value",H.value,O.value,Q)}},A=(x,H,O,ee,Q,pe,we,y,k)=>{const D=H.el=x?x.el:l(""),N=H.anchor=x?x.anchor:l("");let{patchFlag:I,dynamicChildren:R,slotScopeIds:B}=H;B&&(y=y?y.concat(B):B),x==null?(r(D,O,ee),r(N,O,ee),V(H.children||[],O,N,Q,pe,we,y,k)):I>0&&I&64&&R&&x.dynamicChildren&&x.dynamicChildren.length===R.length?(Y(x.dynamicChildren,R,O,Q,pe,we,y),(H.key!=null||Q&&H===Q.subTree)&&wh(x,H,!0)):J(x,H,O,N,Q,pe,we,y,k)},$=(x,H,O,ee,Q,pe,we,y,k)=>{H.slotScopeIds=y,x==null?H.shapeFlag&512?Q.ctx.activate(H,O,ee,we,k):Z(H,O,ee,Q,pe,we,k):ie(x,H,k)},Z=(x,H,O,ee,Q,pe,we)=>{const y=x.component=S3(x,ee,Q);if(Io(x)&&(y.ctx.renderer=ge),C3(y,!1,we),y.asyncDep){if(Q&&Q.registerDep(y,ne,we,pe),!x.el){const k=y.subTree=G(Qt);_(null,k,H,O),x.placeholder=k.el}}else ne(y,x,H,O,Q,pe,we)},ie=(x,H,O)=>{const ee=H.component=x.component;if(s3(x,H,O))if(ee.asyncDep&&!ee.asyncResolved){H.el=x.el,H.placeholder=x.placeholder,ce(ee,H,O);return}else ee.next=H,ee.update();else H.el=x.el,H.placeholder=x.placeholder,ee.vnode=H},ne=(x,H,O,ee,Q,pe,we)=>{const y=()=>{if(x.isMounted){let{next:I,bu:R,u:B,parent:K,vnode:Se}=x;{const it=Zm(x);if(it){I&&(I.el=Se.el,ce(x,I,we)),it.asyncDep.then(()=>{Ai(()=>{x.isUnmounted||D()},Q)});return}}let Me=I,Ve;Kn(x,!1),I?(I.el=Se.el,ce(x,I,we)):I=Se,R&&x0(R),(Ve=I.props&&I.props.onVnodeBeforeUpdate)&&mr(Ve,K,I,Se),Kn(x,!0);const Ye=B2(x),Te=x.subTree;x.subTree=Ye,p(Te,Ye,d(Te.el),U(Te),x,Q,pe),I.el=Ye.el,Me===null&&a3(x,Ye.el),B&&Ai(B,Q),(Ve=I.props&&I.props.onVnodeUpdated)&&Ai(()=>mr(Ve,K,I,Se),Q)}else{let I;const{el:R,props:B}=H,{bm:K,m:Se,parent:Me,root:Ve,type:Ye}=x,Te=Vs(H);Kn(x,!1),K&&x0(K),!Te&&(I=B&&B.onVnodeBeforeMount)&&mr(I,Me,H),Kn(x,!0);{Ve.ce&&Ve.ce._hasShadowRoot()&&Ve.ce._injectChildStyle(Ye,x.parent?x.parent.type:void 0);const it=x.subTree=B2(x);p(null,it,O,ee,x,Q,pe),H.el=it.el}if(Se&&Ai(Se,Q),!Te&&(I=B&&B.onVnodeMounted)){const it=H;Ai(()=>mr(I,Me,it),Q)}(H.shapeFlag&256||Me&&Vs(Me.vnode)&&Me.vnode.shapeFlag&256)&&x.a&&Ai(x.a,Q),x.isMounted=!0,H=O=ee=null}};x.scope.on();const k=x.effect=new Z_(y);x.scope.off();const D=x.update=k.run.bind(k),N=x.job=k.runIfDirty.bind(k);N.i=x,N.id=x.uid,k.scheduler=()=>ph(N),Kn(x,!0),D()},ce=(x,H,O)=>{H.component=x;const ee=x.vnode.props;x.vnode=H,x.next=null,o3(x,H.props,ee,O),h3(x,H.children,O),Ir(),om(x),Dr()},J=(x,H,O,ee,Q,pe,we,y,k=!1)=>{const D=x&&x.children,N=x?x.shapeFlag:0,I=H.children,{patchFlag:R,shapeFlag:B}=H;if(R>0){if(R&128){re(D,I,O,ee,Q,pe,we,y,k);return}else if(R&256){ae(D,I,O,ee,Q,pe,we,y,k);return}}B&8?(N&16&&ye(D,Q,pe),I!==D&&u(O,I)):N&16?B&16?re(D,I,O,ee,Q,pe,we,y,k):ye(D,Q,pe,!0):(N&8&&u(O,""),B&16&&V(I,O,ee,Q,pe,we,y,k))},ae=(x,H,O,ee,Q,pe,we,y,k)=>{x=x||ss,H=H||ss;const D=x.length,N=H.length,I=Math.min(D,N);let R;for(R=0;R<I;R++){const B=H[R]=k?Xr(H[R]):Mr(H[R]);p(x[R],B,O,null,Q,pe,we,y,k)}D>N?ye(x,Q,pe,!0,!1,I):V(H,O,ee,Q,pe,we,y,k,I)},re=(x,H,O,ee,Q,pe,we,y,k)=>{let D=0;const N=H.length;let I=x.length-1,R=N-1;for(;D<=I&&D<=R;){const B=x[D],K=H[D]=k?Xr(H[D]):Mr(H[D]);if(ns(B,K))p(B,K,O,null,Q,pe,we,y,k);else break;D++}for(;D<=I&&D<=R;){const B=x[I],K=H[R]=k?Xr(H[R]):Mr(H[R]);if(ns(B,K))p(B,K,O,null,Q,pe,we,y,k);else break;I--,R--}if(D>I){if(D<=R){const B=R+1,K=B<N?H[B].el:ee;for(;D<=R;)p(null,H[D]=k?Xr(H[D]):Mr(H[D]),O,K,Q,pe,we,y,k),D++}}else if(D>R)for(;D<=I;)le(x[D],Q,pe,!0),D++;else{const B=D,K=D,Se=new Map;for(D=K;D<=R;D++){const Bt=H[D]=k?Xr(H[D]):Mr(H[D]);Bt.key!=null&&Se.set(Bt.key,D)}let Me,Ve=0;const Ye=R-K+1;let Te=!1,it=0;const Ot=new Array(Ye);for(D=0;D<Ye;D++)Ot[D]=0;for(D=B;D<=I;D++){const Bt=x[D];if(Ve>=Ye){le(Bt,Q,pe,!0);continue}let Rt;if(Bt.key!=null)Rt=Se.get(Bt.key);else for(Me=K;Me<=R;Me++)if(Ot[Me-K]===0&&ns(Bt,H[Me])){Rt=Me;break}Rt===void 0?le(Bt,Q,pe,!0):(Ot[Rt-K]=D+1,Rt>=it?it=Rt:Te=!0,p(Bt,H[Rt],O,null,Q,pe,we,y,k),Ve++)}const nr=Te?m3(Ot):ss;for(Me=nr.length-1,D=Ye-1;D>=0;D--){const Bt=K+D,Rt=H[Bt],pr=H[Bt+1],_r=Bt+1<N?pr.el||C1(pr):ee;Ot[D]===0?p(null,Rt,O,_r,Q,pe,we,y,k):Te&&(Me<0||D!==nr[Me]?X(Rt,O,_r,2):Me--)}}},X=(x,H,O,ee,Q=null)=>{const{el:pe,type:we,transition:y,children:k,shapeFlag:D}=x;if(D&6){X(x.component.subTree,H,O,ee);return}if(D&128){x.suspense.move(H,O,ee);return}if(D&64){we.move(x,H,O,ge);return}if(we===ke){r(pe,H,O);for(let I=0;I<k.length;I++)X(k[I],H,O,ee);r(x.anchor,H,O);return}if(we===Au){C(x,H,O);return}if(ee!==2&&D&1&&y)if(ee===0)y.persisted&&!pe[Gi]?r(pe,H,O):(y.beforeEnter(pe),r(pe,H,O),Ai(()=>y.enter(pe),Q));else{const{leave:I,delayLeave:R,afterLeave:B}=y,K=()=>{x.ctx.isUnmounted?n(pe):r(pe,H,O)},Se=()=>{const Me=pe._isLeaving||!!pe[Gi];pe._isLeaving&&pe[Gi](!0),y.persisted&&!Me?K():I(pe,()=>{K(),B&&B()})};R?R(pe,K,Se):Se()}else r(pe,H,O)},le=(x,H,O,ee=!1,Q=!1)=>{const{type:pe,props:we,ref:y,children:k,dynamicChildren:D,shapeFlag:N,patchFlag:I,dirs:R,cacheIndex:B,memo:K}=x;if((I===-2||D&&D.hasOnce)&&(Q=!1),y!=null&&(Ir(),Yl(y,null,O,x,!0),Dr()),B!=null&&(!x.ctx||x.ctx===H)&&(H.renderCache[B]=void 0),N&256){H.ctx.deactivate(x);return}const Se=N&1&&R,Me=!Vs(x);let Ve;if(Me&&(Ve=we&&we.onVnodeBeforeUnmount)&&mr(Ve,H,x),N&6)he(x.component,O,ee);else{if(N&128){x.suspense.unmount(O,ee);return}Se&&jn(x,null,H,"beforeUnmount"),N&64?x.type.remove(x,H,O,ge,ee):D&&!D.hasOnce&&(pe!==ke||I>0&&I&64)?ye(D,H,O,!1,!0):(pe===ke&&I&384||!Q&&N&16)&&ye(k,H,O),ee&&ve(x)}const Ye=K!=null&&B==null;(Me&&(Ve=we&&we.onVnodeUnmounted)||Se||Ye)&&Ai(()=>{Ve&&mr(Ve,H,x),Se&&jn(x,null,H,"unmounted"),Ye&&(x.el=null)},O)},ve=x=>{const{type:H,el:O,anchor:ee,transition:Q}=x,pe=H===ke;if(pe&&!Q){ue(O,ee);return}if(H===Au){g(x),Q&&!Q.persisted&&Q.afterLeave&&Q.afterLeave();return}const we=pe?co(x):x,y=()=>{pe?d(O)&&ue(O,ee):n(O),Q&&!Q.persisted&&Q.afterLeave&&Q.afterLeave()};if(we&&we.shapeFlag&1&&Q&&!Q.persisted){const{leave:k,delayLeave:D}=Q,N=we.el,I=()=>k(N,y);D?D(N,y,I):I()}else y()},ue=(x,H)=>{let O;for(;x!==H;)O=h(x),n(x),x=O;n(H)},he=(x,H,O)=>{const{bum:ee,scope:Q,job:pe,subTree:we,um:y,m:k,a:D}=x;U2(k),U2(D),ee&&x0(ee),Q.stop(),pe?(pe.flags|=8,le(we,x,H,O)):x.vnode.el&&we&&(we.transition=x.vnode.transition,le(we,x,H,O)),y&&Ai(y,H),Ai(()=>{x.isUnmounted=!0},H)},ye=(x,H,O,ee=!1,Q=!1,pe=0)=>{for(let we=pe;we<x.length;we++)le(x[we],H,O,ee,Q)},U=x=>{if(x.shapeFlag&6)return U(x.component.subTree);if(x.shapeFlag&128)return x.suspense.next();const H=h(x.anchor||x.el),O=H&&H[fm];return O?h(O):H},fe=(x,H,O)=>{const ee=x&&H._vnode?void 0:x&&x.component?x.component.uid:w3();w5(()=>{x==null?H._vnode&&le(H._vnode,null,null,!0):p(H._vnode||null,x,H,null,null,null,O),H._vnode=x},ee)},ge={p,um:le,m:X,r:ve,mt:Z,mc:V,pc:J,pbc:Y,n:U,o:e};return{render:fe,hydrate:void 0,createApp:e3(fe)}}function ku({type:e,props:t},i){return i==="svg"&&e==="foreignObject"||i==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:i}function Kn({effect:e,job:t},i){i?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function _3(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function wh(e,t,i=!1){const r=e.children,n=t.children;if(Ze(r)&&Ze(n))for(let s=0;s<r.length;s++){const a=r[s];let l=n[s];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=n[s]=Xr(n[s]),l.el=a.el),!i&&l.patchFlag!==-2&&wh(a,l)),l.type===Vn&&(l.patchFlag===-1&&(l=n[s]=Xr(l)),l.el=a.el),l.type===Qt&&!l.el&&(l.el=a.el)}}function m3(e){const t=e.slice(),i=[0];let r,n,s,a,l;const o=e.length;for(r=0;r<o;r++){const c=e[r];if(c!==0){if(n=i[i.length-1],e[n]<c){t[r]=n,i.push(r);continue}for(s=0,a=i.length-1;s<a;)l=s+a>>1,e[i[l]]<c?s=l+1:a=l;c<e[i[s]]&&(s>0&&(t[r]=i[s-1]),i[s]=r)}}for(s=i.length,a=i[s-1];s-- >0;)i[s]=a,a=t[a];return i}function Zm(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Zm(t)}function U2(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function C1(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?C1(t.subTree):null}const Bm=e=>e.__isSuspense;function v3(e,t){t&&t.pendingBranch?Ze(e)?t.effects.push(...e):t.effects.push(e):y5(e)}const ke=Symbol.for("v-fgt"),Vn=Symbol.for("v-txt"),Qt=Symbol.for("v-cmt"),Au=Symbol.for("v-stc"),ln=[];let Vi=null;function m(e=!1){ln.push(Vi=e?null:[])}function Sh(){ln.pop(),Vi=ln[ln.length-1]||null}let ho=1;function Q0(e,t=!1){ho+=e,e<0&&Vi&&t&&(Vi.hasOnce=!0)}function Fm(e){return e.dynamicChildren=ho>0?Vi||ss:null,Sh(),ho>0&&Vi&&Vi.push(e),e}function M(e,t,i,r,n,s){return Fm(b(e,t,i,r,n,s,!0))}function me(e,t,i,r,n){return Fm(G(e,t,i,r,n,!0))}function Bs(e){return e?e.__v_isVNode===!0:!1}function ns(e,t){return e.type===t.type&&e.key===t.key}const zm=({key:e})=>e??null,T0=({ref:e,ref_key:t,ref_for:i})=>(typeof e=="number"&&(e=""+e),e!=null?St(e)||At(e)||je(e)?{i:pi,r:e,k:t,f:!!i}:e:null);function b(e,t=null,i=null,r=0,n=null,s=e===ke?0:1,a=!1,l=!1){const o={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&zm(t),ref:t&&T0(t),scopeId:dm,slotScopeIds:null,children:i,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:s,patchFlag:r,dynamicProps:n,dynamicChildren:null,appContext:null,ctx:pi};return l?(ec(o,i),s&128&&e.normalize(o)):i&&(o.shapeFlag|=St(i)?8:16),ho>0&&!a&&Vi&&(o.patchFlag>0||s&6)&&o.patchFlag!==32&&Vi.push(o),o}const G=g3;function g3(e,t=null,i=null,r=0,n=null,s=!1){if((!e||e===bm)&&(e=Qt),Bs(e)){const l=Pn(e,t,!0);return i&&ec(l,i),ho>0&&!s&&Vi&&(l.shapeFlag&6?Vi[Vi.indexOf(e)]=l:Vi.push(l)),l.patchFlag=-2,l}if(E3(e)&&(e=e.__vccOpts),t){t=b3(t);let{class:l,style:o}=t;l&&!St(l)&&(t.class=Le(l)),ut(o)&&(Vc(o)&&!Ze(o)&&(o=Zt({},o)),t.style=_i(o))}const a=St(e)?1:Bm(e)?128:Zc(e)?64:ut(e)?4:je(e)?2:0;return b(e,t,i,r,n,a,s,!0)}function b3(e){return e?Vc(e)||Pm(e)?Zt({},e):e:null}function Pn(e,t,i=!1,r=!1){const{props:n,ref:s,patchFlag:a,children:l,transition:o}=e,c=t?Wt(n||{},t):n,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:c,key:c&&zm(c),ref:t&&t.ref?i&&s?Ze(s)?s.concat(T0(t)):[s,T0(t)]:T0(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ke?a===-1?16:a|16:a,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:o,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Pn(e.ssContent),ssFallback:e.ssFallback&&Pn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return o&&r&&Zs(u,o.clone(u)),u}function _e(e=" ",t=0){return G(Vn,null,e,t)}function z(e="",t=!1){return t?(m(),me(Qt,null,e)):G(Qt,null,e)}function Mr(e){return e==null||typeof e=="boolean"?G(Qt):Ze(e)?G(ke,null,e.slice()):Bs(e)?Xr(e):G(Vn,null,String(e))}function Xr(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Pn(e)}function ec(e,t){let i=0;const{shapeFlag:r}=e;if(t==null)t=null;else if(Ze(t))i=16;else if(typeof t=="object")if(r&65){const n=t.default;n&&(n._c&&(n._d=!1),ec(e,n()),n._c&&(n._d=!0));return}else{i=32;const n=t._;!n&&!Pm(t)?t._ctx=pi:n===3&&pi&&(pi.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(je(t)){if(r&65){ec(e,{default:t});return}t={default:t,_ctx:pi},i=32}else t=String(t),r&64?(i=16,t=[_e(t)]):i=8;e.children=t,e.shapeFlag|=i}function Wt(...e){const t={};for(let i=0;i<e.length;i++){const r=e[i];for(const n in r)if(n==="class")t.class!==r.class&&(t.class=Le([t.class,r.class]));else if(n==="style")t.style=_i([t.style,r.style]);else if(xc(n)){const s=t[n],a=r[n];a&&s!==a&&!(Ze(s)&&s.includes(a))?t[n]=s?[].concat(s,a):a:a==null&&s==null&&!Tc(n)&&(t[n]=a)}else n!==""&&(t[n]=r[n])}return t}function mr(e,t,i,r=null){rr(e,t,7,[i,r])}const y3=Mm();let Um=0;function w3(){return Um}function S3(e,t,i){const r=e.type,n=(t?t.appContext:e.appContext)||y3,s={uid:Um++,vnode:e,type:r,parent:t,appContext:n,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new D_(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(n.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:Rm(r,n),emitsOptions:$m(r,n),emit:null,emitted:null,propsDefaults:st,inheritAttrs:r.inheritAttrs,ctx:st,data:st,props:st,attrs:st,slots:st,refs:st,setupState:st,setupContext:null,suspense:i,suspenseId:i?i.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 s.ctx={_:s},s.root=t?t.root:s,s.emit=t3.bind(null,s),e.ce&&e.ce(s),s}let hi=null;const wi=()=>hi||pi;let tc,fo;{const e=Rc(),t=(i,r)=>{let n;return(n=e[i])||(n=e[i]=[]),n.push(r),s=>{n.length>1?n.forEach(a=>a(s)):n[0](s)}};tc=t("__VUE_INSTANCE_SETTERS__",i=>hi=i),fo=t("__VUE_SSR_SETTERS__",i=>Fs=i)}const Vo=e=>{const t=hi;return tc(e),e.scope.on(),()=>{e.scope.off(),tc(t)}},W2=()=>{hi&&hi.scope.off(),tc(null)};function Wm(e){return e.vnode.shapeFlag&4}let Fs=!1;function C3(e,t=!1,i=!1){t&&fo(t);const{props:r,children:n}=e.vnode,s=Wm(e);l3(e,r,s,t),d3(e,n,i||t);const a=s?k3(e,t):void 0;return t&&fo(!1),a}function k3(e,t){const i=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,j5);const{setup:r}=i;if(r){Ir();const n=e.setupContext=r.length>1?Km(e):null,s=Vo(e),a=Oo(r,e,0,[e.props,n]),l=T_(a);if(Dr(),s(),(l||e.sp)&&!Vs(e)&&mh(e),l){if(a.then(W2,W2),t)return a.then(o=>{fo(!0);try{j2(e,o,t)}finally{fo(!1)}}).catch(o=>{Ro(o,e,0)});e.asyncDep=a}else j2(e,a)}else jm(e)}function j2(e,t,i){je(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ut(t)&&(e.setupState=rm(t)),jm(e)}function jm(e,t,i){const r=e.type;e.render||(e.render=r.render||xr);{const n=Vo(e);Ir();try{q5(e)}finally{Dr(),n()}}}const A3={get(e,t){return bi(e,"get",""),e[t]}};function Km(e){const t=i=>{e.exposed=i||{}};return{attrs:new Proxy(e.attrs,A3),slots:e.slots,emit:e.emit,expose:t}}function zc(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(rm(fh(e.exposed)),{get(t,i){if(i in t)return t[i];if(i in Xl)return Xl[i](e)},has(t,i){return i in t||i in Xl}})):e.proxy}function M3(e,t=!0){return je(e)?e.displayName||e.name:e.name||t&&e.__name}function E3(e){return je(e)&&"__vccOpts"in e}const j=(e,t)=>_5(e,t,Fs);function $e(e,t,i){try{Q0(-1);const r=arguments.length;return r===2?ut(t)&&!Ze(t)?Bs(t)?G(e,null,[t]):G(e,t):G(e,null,t):(r>3?i=Array.prototype.slice.call(arguments,2):r===3&&Bs(i)&&(i=[i]),G(e,t,i))}finally{Q0(1)}}const L3="3.5.44";/**
14
- * @vue/runtime-dom v3.5.44
15
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
16
- * @license MIT
17
- **/let k1;const K2=typeof window<"u"&&window.trustedTypes;if(K2)try{k1=K2.createPolicy("vue",{createHTML:e=>e})}catch{}const qm=k1?e=>k1.createHTML(e):e=>e,$3="http://www.w3.org/2000/svg",x3="http://www.w3.org/1998/Math/MathML",Yr=typeof document<"u"?document:null,q2=Yr&&Yr.createElement("template"),T3={insert:(e,t,i)=>{t.insertBefore(e,i||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,i,r)=>{const n=t==="svg"?Yr.createElementNS($3,e):t==="mathml"?Yr.createElementNS(x3,e):i?Yr.createElement(e,{is:i}):Yr.createElement(e);return e==="select"&&r&&r.multiple!=null&&n.setAttribute("multiple",r.multiple),n},createText:e=>Yr.createTextNode(e),createComment:e=>Yr.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Yr.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,i,r,n,s){const a=i?i.previousSibling:t.lastChild;if(n&&(n===s||n.nextSibling))for(;t.insertBefore(n.cloneNode(!0),i),!(n===s||!(n=n.nextSibling)););else{q2.innerHTML=qm(r==="svg"?`<svg>${e}</svg>`:r==="mathml"?`<math>${e}</math>`:e);const l=q2.content;if(r==="svg"||r==="mathml"){const o=l.firstChild;for(;o.firstChild;)l.appendChild(o.firstChild);l.removeChild(o)}t.insertBefore(l,i)}return[a?a.nextSibling:t.firstChild,i?i.previousSibling:t.lastChild]}},pn="transition",Al="animation",po=Symbol("_vtc"),Gm={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},H3=Zt({},pm,Gm),N3=e=>(e.displayName="Transition",e.props=H3,e),Ch=N3((e,{slots:t})=>$e(H5,P3(e),t)),qn=(e,t=[])=>{Ze(e)?e.forEach(i=>i(...t)):e&&e(...t)},G2=e=>e?Ze(e)?e.some(t=>t.length>1):e.length>1:!1;function P3(e){const t={};for(const A in e)A in Gm||(t[A]=e[A]);if(e.css===!1)return t;const{name:i="v",type:r,duration:n,enterFromClass:s=`${i}-enter-from`,enterActiveClass:a=`${i}-enter-active`,enterToClass:l=`${i}-enter-to`,appearFromClass:o=s,appearActiveClass:c=a,appearToClass:u=l,leaveFromClass:d=`${i}-leave-from`,leaveActiveClass:h=`${i}-leave-active`,leaveToClass:f=`${i}-leave-to`}=e,v=O3(n),p=v&&v[0],S=v&&v[1],{onBeforeEnter:_,onEnter:w,onEnterCancelled:C,onLeave:g,onLeaveCancelled:E,onBeforeAppear:T=_,onAppear:L=w,onAppearCancelled:V=C}=t,P=(A,$,Z,ie)=>{A._enterCancelled=ie,Gn(A,$?u:l),Gn(A,$?c:a),Z&&Z()},Y=(A,$)=>{A._isLeaving=!1,Gn(A,d),Gn(A,f),Gn(A,h),$&&$()},W=A=>($,Z)=>{const ie=A?L:w,ne=()=>P($,A,Z);qn(ie,[$,ne]),Y2(()=>{Gn($,A?o:s),Wr($,A?u:l),G2(ie)||X2($,r,p,ne)})};return Zt(t,{onBeforeEnter(A){qn(_,[A]),Wr(A,s),Wr(A,a)},onBeforeAppear(A){qn(T,[A]),Wr(A,o),Wr(A,c)},onEnter:W(!1),onAppear:W(!0),onLeave(A,$){A._isLeaving=!0;const Z=()=>Y(A,$);Wr(A,d),A._enterCancelled?(Wr(A,h),ef(A)):(ef(A),Wr(A,h)),Y2(()=>{A._isLeaving&&(Gn(A,d),Wr(A,f),G2(g)||X2(A,r,S,Z))}),qn(g,[A,Z])},onEnterCancelled(A){P(A,!1,void 0,!0),qn(C,[A])},onAppearCancelled(A){P(A,!0,void 0,!0),qn(V,[A])},onLeaveCancelled(A){Y(A),qn(E,[A])}})}function O3(e){if(e==null)return null;if(ut(e))return[Mu(e.enter),Mu(e.leave)];{const t=Mu(e);return[t,t]}}function Mu(e){return Nb(e)}function Wr(e,t){t.split(/\s+/).forEach(i=>i&&e.classList.add(i)),(e[po]||(e[po]=new Set)).add(t)}function Gn(e,t){t.split(/\s+/).forEach(r=>r&&e.classList.remove(r));const i=e[po];i&&(i.delete(t),i.size||(e[po]=void 0))}function Y2(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let R3=0;function X2(e,t,i,r){const n=e._endId=++R3,s=()=>{n===e._endId&&r()};if(i!=null)return setTimeout(s,i);const{type:a,timeout:l,propCount:o}=I3(e,t);if(!a)return r();const c=a+"end";let u=0;const d=()=>{e.removeEventListener(c,h),s()},h=f=>{f.target===e&&++u>=o&&d()};setTimeout(()=>{u<o&&d()},l+1),e.addEventListener(c,h)}function I3(e,t){const i=window.getComputedStyle(e),r=v=>(i[v]||"").split(", "),n=r(`${pn}Delay`),s=r(`${pn}Duration`),a=J2(n,s),l=r(`${Al}Delay`),o=r(`${Al}Duration`),c=J2(l,o);let u=null,d=0,h=0;t===pn?a>0&&(u=pn,d=a,h=s.length):t===Al?c>0&&(u=Al,d=c,h=o.length):(d=Math.max(a,c),u=d>0?a>c?pn:Al:null,h=u?u===pn?s.length:o.length:0);const f=u===pn&&/\b(?:transform|all)(?:,|$)/.test(r(`${pn}Property`).toString());return{type:u,timeout:d,propCount:h,hasTransform:f}}function J2(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((i,r)=>Q2(i)+Q2(e[r])))}function Q2(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function ef(e){return(e?e.ownerDocument:document).body.offsetHeight}function D3(e,t,i){const r=e[po];r&&(t=(t?[t,...r]:[...r]).join(" ")),t==null?e.removeAttribute("class"):i?e.setAttribute("class",t):e.className=t}const ic=Symbol("_vod"),Ym=Symbol("_vsh"),kh={name:"show",beforeMount(e,{value:t},{transition:i}){e[ic]=e.style.display==="none"?"":e.style.display,i&&t?i.beforeEnter(e):Ml(e,t)},mounted(e,{value:t},{transition:i}){i&&t&&i.enter(e)},updated(e,{value:t,oldValue:i},{transition:r}){!t!=!i&&(r?t?(r.beforeEnter(e),Ml(e,!0),r.enter(e)):r.leave(e,()=>{Ml(e,!1)}):Ml(e,t))},beforeUnmount(e,{value:t}){Ml(e,t)}};function Ml(e,t){e.style.display=t?e[ic]:"none",e[Ym]=!t}const V3=Symbol(""),Z3=/(?:^|;)\s*display\s*:/;function B3(e,t,i){const r=e.style,n=St(i);let s=!1;if(i&&!n){if(t)if(St(t))for(const a of t.split(";")){const l=a.slice(0,a.indexOf(":")).trim();i[l]==null&&Zl(r,l,"")}else for(const a in t)i[a]==null&&Zl(r,a,"");for(const a in i){a==="display"&&(s=!0);const l=i[a];l!=null?z3(e,a,!St(t)&&t?t[a]:void 0,l)||Zl(r,a,l):Zl(r,a,"")}}else if(n){if(t!==i){const a=r[V3];a&&(i+=";"+a),r.cssText=i,s=Z3.test(i)}}else t&&e.removeAttribute("style");ic in e&&((!n||t!==i)&&(e[ic]=s?r.display:""),e[Ym]&&(r.display="none"))}const l0=/\s*!important$/;function Zl(e,t,i){if(Ze(i))i.forEach(r=>Zl(e,t,r));else if(i==null&&(i=""),t.startsWith("--"))l0.test(i)?e.setProperty(t,i.replace(l0,""),"important"):e.setProperty(t,i);else{const r=F3(e,t);l0.test(i)?e.setProperty(cn(r),i.replace(l0,""),"important"):e[r]=i}}const tf=["Webkit","Moz","ms"],Eu={};function F3(e,t){const i=Eu[t];if(i)return i;let r=yi(t);if(r!=="filter"&&r in e)return Eu[t]=r;r=Pc(r);for(let n=0;n<tf.length;n++){const s=tf[n]+r;if(s in e)return Eu[t]=s}return t}function z3(e,t,i,r){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&St(r)&&i===r}const rf="http://www.w3.org/1999/xlink";function nf(e,t,i,r,n,s=Zb(t)){r&&t.startsWith("xlink:")?i==null?e.removeAttributeNS(rf,t.slice(6,t.length)):e.setAttributeNS(rf,t,i):i==null||s&&!O_(i)?e.removeAttribute(t):e.setAttribute(t,s?"":zi(i)?String(i):i)}function sf(e,t,i,r,n){if(t==="innerHTML"||t==="textContent"){i!=null&&(e[t]=t==="innerHTML"?qm(i):i);return}const s=e.tagName;if(t==="value"&&s!=="PROGRESS"&&!s.includes("-")){const l=s==="OPTION"?e.getAttribute("value")||"":e.value,o=i==null?e.type==="checkbox"?"on":"":String(i);(l!==o||!("_value"in e))&&(e.value=o),i==null&&e.removeAttribute(t),e._value=i;return}let a=!1;if(i===""||i==null){const l=typeof e[t];l==="boolean"?i=O_(i):i==null&&l==="string"?(i="",a=!0):l==="number"&&(i=0,a=!0)}try{e[t]=i}catch{}a&&e.removeAttribute(n||t)}function en(e,t,i,r){e.addEventListener(t,i,r)}function U3(e,t,i,r){e.removeEventListener(t,i,r)}const af=Symbol("_vei");function W3(e,t,i,r,n=null){const s=e[af]||(e[af]={}),a=s[t];if(r&&a)a.value=r;else{const[l,o]=q3(t);if(r){const c=s[t]=X3(r,n);en(e,l,c,o)}else a&&(U3(e,l,a,o),s[t]=void 0)}}const j3=/(Once|Passive|Capture)$/,K3=/^on:?(?:Once|Passive|Capture)$/;function q3(e){let t,i;for(;(i=e.match(j3))&&!K3.test(e);)t||(t={}),e=e.slice(0,e.length-i[1].length),t[i[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):cn(e.slice(2)),t]}let Lu=0;const G3=Promise.resolve(),Y3=()=>Lu||(G3.then(()=>Lu=0),Lu=Date.now());function X3(e,t){const i=r=>{if(!r._vts)r._vts=Date.now();else if(r._vts<=i.attached)return;const n=i.value;if(Ze(n)){const s=r.stopImmediatePropagation;r.stopImmediatePropagation=()=>{s.call(r),r._stopped=!0};const a=n.slice(),l=[r];for(let o=0;o<a.length&&!r._stopped;o++){const c=a[o];c&&rr(c,t,5,l)}}else rr(n,t,5,[r])};return i.value=e,i.attached=Y3(),i}const lf=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,J3=(e,t,i,r,n,s)=>{const a=n==="svg";t==="class"?D3(e,r,a):t==="style"?B3(e,i,r):xc(t)?Tc(t)||W3(e,t,i,r,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Q3(e,t,r,a))?(sf(e,t,r),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&nf(e,t,r,a,s,t!=="value")):e._isVueCE&&(ey(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!St(r)))?sf(e,yi(t),r,s,t):(t==="true-value"?e._trueValue=r:t==="false-value"&&(e._falseValue=r),nf(e,t,r,a))};function Q3(e,t,i,r){if(r)return!!(t==="innerHTML"||t==="textContent"||t in e&&lf(t)&&je(i));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const n=e.tagName;if(n==="IMG"||n==="VIDEO"||n==="CANVAS"||n==="SOURCE")return!1}return lf(t)&&St(i)?!1:t in e}function ey(e,t){const i=e._def.props;if(!i)return!1;const r=yi(t);return Array.isArray(i)?i.some(n=>yi(n)===r):Object.keys(i).some(n=>yi(n)===r)}const On=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Ze(t)?i=>x0(t,i):t};function ty(e){e.target.composing=!0}function of(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Zi=Symbol("_assign"),o0=Symbol("_initialValue");function $u(e,t,i){return t&&(e=e.trim()),i&&(e=Oc(e)),e}const _o={created(e,{modifiers:{lazy:t,trim:i,number:r}},n){e.parentNode&&(e.type==="text"?e[o0]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[o0]=e.defaultValue.replace(/\r\n?/g,`
18
- `))),e[Zi]=On(n);const s=r||n.props&&n.props.type==="number";en(e,t?"change":"input",a=>{a.target.composing||e[Zi]($u(e.value,i,s))}),(i||s)&&en(e,"change",()=>{e.value=$u(e.value,i,s)}),t||(en(e,"compositionstart",ty),en(e,"compositionend",of),en(e,"change",of))},mounted(e,{value:t,modifiers:{trim:i,number:r}}){const n=t??"",s=e[o0];delete e[o0],s!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==s?e[Zi]($u(e.value,i,r)):e.value=n},beforeUpdate(e,{value:t,oldValue:i,modifiers:{lazy:r,trim:n,number:s}},a){if(e[Zi]=On(a),e.composing)return;const l=(s||e.type==="number")&&!/^0\d/.test(e.value)?Oc(e.value):e.value,o=t??"";if(l===o)return;const c=e.getRootNode();(c instanceof Document||c instanceof ShadowRoot)&&c.activeElement===e&&e.type!=="range"&&(r&&t===i||n&&e.value.trim()===o)||(e.value=o)}},Xm={deep:!0,created(e,t,i){e[Zi]=On(i),en(e,"change",()=>{const r=e._modelValue,n=zs(e),s=e.checked,a=e[Zi];if(Ze(r)){const l=ah(r,n),o=l!==-1;if(s&&!o)a(r.concat(n));else if(!s&&o){const c=[...r];c.splice(l,1),a(c)}}else if(on(r)){const l=new Set(r);s?l.add(n):l.delete(n),a(l)}else a(Jm(e,s))})},mounted:cf,beforeUpdate(e,t,i){e[Zi]=On(i),cf(e,t,i)}};function cf(e,{value:t,oldValue:i},r){e._modelValue=t;let n;if(Ze(t))n=ah(t,r.props.value)>-1;else if(on(t))n=t.has(r.props.value);else{if(t===i)return;n=hr(t,Jm(e,!0))}e.checked!==n&&(e.checked=n)}const iy={created(e,{value:t},i){e.checked=hr(t,i.props.value),e[Zi]=On(i),en(e,"change",()=>{e[Zi](zs(e))})},beforeUpdate(e,{value:t,oldValue:i},r){e[Zi]=On(r),t!==i&&(e.checked=hr(t,r.props.value))}},ry={deep:!0,created(e,{value:t,modifiers:{number:i}},r){e._modelValue=t,en(e,"change",()=>{const n=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>i?Oc(zs(o)):zs(o)),s=e.multiple,a=s?on(e._modelValue)?new Set(n):n:n[0],l=e._pendingValue=[s,s?Ze(a)?n.slice():n:a];try{e[Zi](a)}finally{Kt(()=>{e._pendingValue===l&&(e._pendingValue=void 0)})}}),e[Zi]=On(r)},mounted(e,{value:t}){uf(e,t)},beforeUpdate(e,{value:t},i){e._modelValue=t,e[Zi]=On(i)},updated(e,{value:t}){const i=e._pendingValue;e._pendingValue=void 0,(!i||i[0]!==e.multiple||!ny(t,i[1],i[0]))&&uf(e,t)}};function ny(e,t,i){if(!i||Ze(e))return hr(e,t);if(on(e)){if(e.size!==t.length)return!1;for(const r of t)if(!e.has(r))return!1;return!0}return!1}function uf(e,t){const i=e.multiple,r=Ze(t);if(!(i&&!r&&!on(t))){for(let n=0,s=e.options.length;n<s;n++){const a=e.options[n],l=zs(a);if(i)if(r){const o=typeof l;o==="string"||o==="number"?a.selected=t.some(c=>String(c)===String(l)):a.selected=ah(t,l)>-1}else a.selected=t.has(l);else if(hr(zs(a),t)){e.selectedIndex!==n&&(e.selectedIndex=n);return}}!i&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function zs(e){return"_value"in e?e._value:e.value}function Jm(e,t){const i=t?"_trueValue":"_falseValue";return i in e?e[i]:t}const df={created(e,t,i){c0(e,t,i,null,"created")},mounted(e,t,i){c0(e,t,i,null,"mounted")},beforeUpdate(e,t,i,r){c0(e,t,i,r,"beforeUpdate")},updated(e,t,i,r){c0(e,t,i,r,"updated")}};function sy(e,t){switch(e){case"SELECT":return ry;case"TEXTAREA":return _o;default:switch(t){case"checkbox":return Xm;case"radio":return iy;default:return _o}}}function c0(e,t,i,r,n){const a=sy(e.tagName,i.props&&i.props.type)[n];a&&a(e,t,i,r)}const ay=["ctrl","shift","alt","meta"],ly={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)=>ay.some(i=>e[`${i}Key`]&&!t.includes(i))},Qe=(e,t)=>{if(!e)return e;const i=e._withMods||(e._withMods={}),r=t.join(".");return i[r]||(i[r]=(n,...s)=>{for(let a=0;a<t.length;a++){const l=ly[t[a]];if(l&&l(n,t))return}return e(n,...s)})},oy={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},$i=(e,t)=>{const i=e._withKeys||(e._withKeys={}),r=t.join(".");return i[r]||(i[r]=n=>{if(!("key"in n))return;const s=cn(n.key);if(t.some(a=>a===s||oy[a]===s))return e(n)})},cy=Zt({patchProp:J3},T3);let hf;function uy(){return hf||(hf=f3(cy))}const Qm=(...e)=>{const t=uy().createApp(...e),{mount:i}=t;return t.mount=r=>{const n=hy(r);if(!n)return;const s=t._component;!je(s)&&!s.render&&!s.template&&(s.template=n.innerHTML),n.nodeType===1&&(n.textContent="");const a=i(n,!1,dy(n));return n instanceof Element&&(n.removeAttribute("v-cloak"),n.setAttribute("data-v-app","")),a},t};function dy(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function hy(e){return St(e)?document.querySelector(e):e}/*!
19
- * pinia v2.3.1
20
- * (c) 2025 Eduardo San Martin Morote
21
- * @license MIT
22
- */let e4;const Uc=e=>e4=e,t4=Symbol();function A1(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Jl;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Jl||(Jl={}));function fy(){const e=lh(!0),t=e.run(()=>q({}));let i=[],r=[];const n=fh({install(s){Uc(n),n._a=s,s.provide(t4,n),s.config.globalProperties.$pinia=n,r.forEach(a=>i.push(a)),r=[]},use(s){return this._a?i.push(s):r.push(s),this},_p:i,_a:null,_e:e,_s:new Map,state:t});return n}const i4=()=>{};function ff(e,t,i,r=i4){e.push(t);const n=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),r())};return!i&&V_()&&U0(n),n}function ks(e,...t){e.slice().forEach(i=>{i(...t)})}const py=e=>e(),pf=Symbol(),xu=Symbol();function M1(e,t){e instanceof Map&&t instanceof Map?t.forEach((i,r)=>e.set(r,i)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const i in t){if(!t.hasOwnProperty(i))continue;const r=t[i],n=e[i];A1(n)&&A1(r)&&e.hasOwnProperty(i)&&!At(r)&&!Tr(r)?e[i]=M1(n,r):e[i]=r}return e}const _y=Symbol();function my(e){return!A1(e)||!e.hasOwnProperty(_y)}const{assign:yn}=Object;function vy(e){return!!(At(e)&&e.effect)}function gy(e,t,i,r){const{state:n,actions:s,getters:a}=t,l=i.state.value[e];let o;function c(){l||(i.state.value[e]=n?n():{});const u=d5(i.state.value[e]);return yn(u,s,Object.keys(a||{}).reduce((d,h)=>(d[h]=fh(j(()=>{Uc(i);const f=i._s.get(e);return a[h].call(f,f)})),d),{}))}return o=r4(e,c,t,i,r,!0),o}function r4(e,t,i={},r,n,s){let a;const l=yn({actions:{}},i),o={deep:!0};let c,u,d=[],h=[],f;const v=r.state.value[e];!s&&!v&&(r.state.value[e]={});let p;function S(V){let P;c=u=!1,typeof V=="function"?(V(r.state.value[e]),P={type:Jl.patchFunction,storeId:e,events:f}):(M1(r.state.value[e],V),P={type:Jl.patchObject,payload:V,storeId:e,events:f});const Y=p=Symbol();Kt().then(()=>{p===Y&&(c=!0)}),u=!0,ks(d,P,r.state.value[e])}const _=s?function(){const{state:P}=i,Y=P?P():{};this.$patch(W=>{yn(W,Y)})}:i4;function w(){a.stop(),d=[],h=[],r._s.delete(e)}const C=(V,P="")=>{if(pf in V)return V[xu]=P,V;const Y=function(){Uc(r);const W=Array.from(arguments),A=[],$=[];function Z(ce){A.push(ce)}function ie(ce){$.push(ce)}ks(h,{args:W,name:Y[xu],store:E,after:Z,onError:ie});let ne;try{ne=V.apply(this&&this.$id===e?this:E,W)}catch(ce){throw ks($,ce),ce}return ne instanceof Promise?ne.then(ce=>(ks(A,ce),ce)).catch(ce=>(ks($,ce),Promise.reject(ce))):(ks(A,ne),ne)};return Y[pf]=!0,Y[xu]=P,Y},g={_p:r,$id:e,$onAction:ff.bind(null,h),$patch:S,$reset:_,$subscribe(V,P={}){const Y=ff(d,V,P.detached,()=>W()),W=a.run(()=>De(()=>r.state.value[e],A=>{(P.flush==="sync"?u:c)&&V({storeId:e,type:Jl.direct,events:f},A)},yn({},o,P)));return Y},$dispose:w},E=ps(g);r._s.set(e,E);const L=(r._a&&r._a.runWithContext||py)(()=>r._e.run(()=>(a=lh()).run(()=>t({action:C}))));for(const V in L){const P=L[V];if(At(P)&&!vy(P)||Tr(P))s||(v&&my(P)&&(At(P)?P.value=v[V]:M1(P,v[V])),r.state.value[e][V]=P);else if(typeof P=="function"){const Y=C(P,V);L[V]=Y,l.actions[V]=P}}return yn(E,L),yn(rt(E),L),Object.defineProperty(E,"$state",{get:()=>r.state.value[e],set:V=>{S(P=>{yn(P,V)})}}),r._p.forEach(V=>{yn(E,a.run(()=>V({store:E,app:r._a,pinia:r,options:l})))}),v&&s&&i.hydrate&&i.hydrate(E.$state,v),c=!0,u=!0,E}/*! #__NO_SIDE_EFFECTS__ */function Wc(e,t,i){let r,n;const s=typeof t=="function";typeof e=="string"?(r=e,n=s?i:t):(n=e,r=e.id);function a(l,o){const c=S5();return l=l||(c?Mt(t4,null):null),l&&Uc(l),l=e4,l._s.has(r)||(s?r4(r,t,n,l):gy(r,n,l)),l._s.get(r)}return a.$id=r,a}/*!
23
- * shared v11.3.0
24
- * (c) 2026 kazuya kawaguchi
25
- * Released under the MIT License.
26
- */function by(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}const rc=typeof window<"u",Zn=(e,t=!1)=>t?Symbol.for(e):Symbol(e),yy=(e,t,i)=>wy({l:e,k:t,s:i}),wy=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),jt=e=>typeof e=="number"&&isFinite(e),n4=e=>Ah(e)==="[object Date]",Us=e=>Ah(e)==="[object RegExp]",jc=e=>tt(e)&&Object.keys(e).length===0,ei=Object.assign,Sy=Object.create,vt=(e=null)=>Sy(e);let _f;const as=()=>_f||(_f=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:vt());function mf(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\//g,"&#x2F;").replace(/=/g,"&#x3D;")}function vf(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Cy(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(r,n,s)=>`${n}="${vf(s)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(r,n,s)=>`${n}='${vf(s)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1&#111;n$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(r=>{e=e.replace(r,"$1javascript&#58;")}),e}const ky=Object.prototype.hasOwnProperty;function Qi(e,t){return ky.call(e,t)}const Nt=Array.isArray,kt=e=>typeof e=="function",Pe=e=>typeof e=="string",at=e=>typeof e=="boolean",pt=e=>e!==null&&typeof e=="object",Ay=e=>pt(e)&&kt(e.then)&&kt(e.catch),s4=Object.prototype.toString,Ah=e=>s4.call(e),tt=e=>Ah(e)==="[object Object]",My=e=>e==null?"":Nt(e)||tt(e)&&e.toString===s4?JSON.stringify(e,null,2):String(e);function Mh(e,t=""){return e.reduce((i,r,n)=>n===0?i+r:i+t+r,"")}const u0=e=>!pt(e)||Nt(e);function H0(e,t){if(u0(e)||u0(t))throw new Error("Invalid value");const i=[{src:e,des:t}];for(;i.length;){const{src:r,des:n}=i.pop();Object.keys(r).forEach(s=>{s!=="__proto__"&&(pt(r[s])&&!pt(n[s])&&(n[s]=Array.isArray(r[s])?[]:vt()),u0(n[s])||u0(r[s])?n[s]=r[s]:i.push({src:r[s],des:n[s]}))})}}/*!
27
- * message-compiler v11.3.0
28
- * (c) 2026 kazuya kawaguchi
29
- * Released under the MIT License.
30
- */function Ey(e,t,i){return{line:e,column:t,offset:i}}function E1(e,t,i){return{start:e,end:t}}const ht={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14},Ly=17;function Kc(e,t,i={}){const{domain:r,messages:n,args:s}=i,a=e,l=new SyntaxError(String(a));return l.code=e,t&&(l.location=t),l.domain=r,l}function $y(e){throw e}const vr=" ",xy="\r",gi=`
31
- `,Ty="\u2028",Hy="\u2029";function Ny(e){const t=e;let i=0,r=1,n=1,s=0;const a=L=>t[L]===xy&&t[L+1]===gi,l=L=>t[L]===gi,o=L=>t[L]===Hy,c=L=>t[L]===Ty,u=L=>a(L)||l(L)||o(L)||c(L),d=()=>i,h=()=>r,f=()=>n,v=()=>s,p=L=>a(L)||o(L)||c(L)?gi:t[L],S=()=>p(i),_=()=>p(i+s);function w(){return s=0,u(i)&&(r++,n=0),a(i)&&i++,i++,n++,t[i]}function C(){return a(i+s)&&s++,s++,t[i+s]}function g(){i=0,r=1,n=1,s=0}function E(L=0){s=L}function T(){const L=i+s;for(;L!==i;)w();s=0}return{index:d,line:h,column:f,peekOffset:v,charAt:p,currentChar:S,currentPeek:_,next:w,peek:C,reset:g,resetPeek:E,skipToPeek:T}}const jr=void 0,Py=".",gf="'",Oy="tokenizer";function Ry(e,t={}){const i=t.location!==!1,r=Ny(e),n=()=>r.index(),s=()=>Ey(r.line(),r.column(),r.index()),a=s(),l=n(),o={currentType:13,offset:l,startLoc:a,endLoc:a,lastType:13,lastOffset:l,lastStartLoc:a,lastEndLoc:a,braceNest:0,inLinked:!1,text:""},c=()=>o,{onError:u}=t;function d(y,k,D,...N){const I=c();if(k.column+=D,k.offset+=D,u){const R=i?E1(I.startLoc,k):null,B=Kc(y,R,{domain:Oy,args:N});u(B)}}function h(y,k,D){y.endLoc=s(),y.currentType=k;const N={type:k};return i&&(N.loc=E1(y.startLoc,y.endLoc)),D!=null&&(N.value=D),N}const f=y=>h(y,13);function v(y,k){return y.currentChar()===k?(y.next(),k):(d(ht.EXPECTED_TOKEN,s(),0,k),"")}function p(y){let k="";for(;y.currentPeek()===vr||y.currentPeek()===gi;)k+=y.currentPeek(),y.peek();return k}function S(y){const k=p(y);return y.skipToPeek(),k}function _(y){if(y===jr)return!1;const k=y.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k===95}function w(y){if(y===jr)return!1;const k=y.charCodeAt(0);return k>=48&&k<=57}function C(y,k){const{currentType:D}=k;if(D!==2)return!1;p(y);const N=_(y.currentPeek());return y.resetPeek(),N}function g(y,k){const{currentType:D}=k;if(D!==2)return!1;p(y);const N=y.currentPeek()==="-"?y.peek():y.currentPeek(),I=w(N);return y.resetPeek(),I}function E(y,k){const{currentType:D}=k;if(D!==2)return!1;p(y);const N=y.currentPeek()===gf;return y.resetPeek(),N}function T(y,k){const{currentType:D}=k;if(D!==7)return!1;p(y);const N=y.currentPeek()===".";return y.resetPeek(),N}function L(y,k){const{currentType:D}=k;if(D!==8)return!1;p(y);const N=_(y.currentPeek());return y.resetPeek(),N}function V(y,k){const{currentType:D}=k;if(!(D===7||D===11))return!1;p(y);const N=y.currentPeek()===":";return y.resetPeek(),N}function P(y,k){const{currentType:D}=k;if(D!==9)return!1;const N=()=>{const R=y.currentPeek();return R==="{"?_(y.peek()):R==="@"||R==="|"||R===":"||R==="."||R===vr||!R?!1:R===gi?(y.peek(),N()):W(y,!1)},I=N();return y.resetPeek(),I}function Y(y){p(y);const k=y.currentPeek()==="|";return y.resetPeek(),k}function W(y,k=!0){const D=(I=!1,R="")=>{const B=y.currentPeek();return B==="{"||B==="@"||!B?I:B==="|"?!(R===vr||R===gi):B===vr?(y.peek(),D(!0,vr)):B===gi?(y.peek(),D(!0,gi)):!0},N=D();return k&&y.resetPeek(),N}function A(y,k){const D=y.currentChar();return D===jr?jr:k(D)?(y.next(),D):null}function $(y){const k=y.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k>=48&&k<=57||k===95||k===36}function Z(y){return A(y,$)}function ie(y){const k=y.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k>=48&&k<=57||k===95||k===36||k===45}function ne(y){return A(y,ie)}function ce(y){const k=y.charCodeAt(0);return k>=48&&k<=57}function J(y){return A(y,ce)}function ae(y){const k=y.charCodeAt(0);return k>=48&&k<=57||k>=65&&k<=70||k>=97&&k<=102}function re(y){return A(y,ae)}function X(y){let k="",D="";for(;k=J(y);)D+=k;return D}function le(y){let k="";for(;;){const D=y.currentChar();if(D==="\\"){const N=y.peek();N==="{"||N==="}"||N==="@"||N==="|"||N==="\\"?(k+=D+N,y.next(),y.next()):(y.resetPeek(),k+=D,y.next())}else{if(D==="{"||D==="}"||D==="@"||D==="|"||!D)break;if(D===vr||D===gi)if(W(y))k+=D,y.next();else{if(Y(y))break;k+=D,y.next()}else k+=D,y.next()}}return k}function ve(y){S(y);let k="",D="";for(;k=ne(y);)D+=k;const N=y.currentChar();if(N&&N!=="}"&&N!==jr&&N!==vr&&N!==gi&&N!==" "){const I=se(y);return d(ht.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,D+I),D+I}return y.currentChar()===jr&&d(ht.UNTERMINATED_CLOSING_BRACE,s(),0),D}function ue(y){S(y);let k="";return y.currentChar()==="-"?(y.next(),k+=`-${X(y)}`):k+=X(y),y.currentChar()===jr&&d(ht.UNTERMINATED_CLOSING_BRACE,s(),0),k}function he(y){return y!==gf&&y!==gi}function ye(y){S(y),v(y,"'");let k="",D="";for(;k=A(y,he);)k==="\\"?D+=U(y):D+=k;const N=y.currentChar();return N===gi||N===jr?(d(ht.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),N===gi&&(y.next(),v(y,"'")),D):(v(y,"'"),D)}function U(y){const k=y.currentChar();switch(k){case"\\":case"'":return y.next(),`\\${k}`;case"u":return fe(y,k,4);case"U":return fe(y,k,6);default:return d(ht.UNKNOWN_ESCAPE_SEQUENCE,s(),0,k),""}}function fe(y,k,D){v(y,k);let N="";for(let I=0;I<D;I++){const R=re(y);if(!R){d(ht.INVALID_UNICODE_ESCAPE_SEQUENCE,s(),0,`\\${k}${N}${y.currentChar()}`);break}N+=R}return`\\${k}${N}`}function ge(y){return y!=="{"&&y!=="}"&&y!==vr&&y!==gi}function se(y){S(y);let k="",D="";for(;k=A(y,ge);)D+=k;return D}function x(y){let k="",D="";for(;k=Z(y);)D+=k;return D}function H(y){const k=D=>{const N=y.currentChar();return N==="{"||N==="@"||N==="|"||N==="("||N===")"||!N||N===vr?D:(D+=N,y.next(),k(D))};return k("")}function O(y){S(y);const k=v(y,"|");return S(y),k}function ee(y,k){let D=null;switch(y.currentChar()){case"{":return k.braceNest>=1&&d(ht.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),y.next(),D=h(k,2,"{"),S(y),k.braceNest++,D;case"}":return k.braceNest>0&&k.currentType===2&&d(ht.EMPTY_PLACEHOLDER,s(),0),y.next(),D=h(k,3,"}"),k.braceNest--,k.braceNest>0&&S(y),k.inLinked&&k.braceNest===0&&(k.inLinked=!1),D;case"@":return k.braceNest>0&&d(ht.UNTERMINATED_CLOSING_BRACE,s(),0),D=Q(y,k)||f(k),k.braceNest=0,D;default:{let I=!0,R=!0,B=!0;if(Y(y))return k.braceNest>0&&d(ht.UNTERMINATED_CLOSING_BRACE,s(),0),D=h(k,1,O(y)),k.braceNest=0,k.inLinked=!1,D;if(k.braceNest>0&&(k.currentType===4||k.currentType===5||k.currentType===6))return d(ht.UNTERMINATED_CLOSING_BRACE,s(),0),k.braceNest=0,pe(y,k);if(I=C(y,k))return D=h(k,4,ve(y)),S(y),D;if(R=g(y,k))return D=h(k,5,ue(y)),S(y),D;if(B=E(y,k))return D=h(k,6,ye(y)),S(y),D;if(!I&&!R&&!B)return D=h(k,12,se(y)),d(ht.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,D.value),S(y),D;break}}return D}function Q(y,k){const{currentType:D}=k;let N=null;const I=y.currentChar();switch((D===7||D===8||D===11||D===9)&&(I===gi||I===vr)&&d(ht.INVALID_LINKED_FORMAT,s(),0),I){case"@":return y.next(),N=h(k,7,"@"),k.inLinked=!0,N;case".":return S(y),y.next(),h(k,8,".");case":":return S(y),y.next(),h(k,9,":");default:return Y(y)?(N=h(k,1,O(y)),k.braceNest=0,k.inLinked=!1,N):T(y,k)||V(y,k)?(S(y),Q(y,k)):L(y,k)?(S(y),h(k,11,x(y))):P(y,k)?(S(y),I==="{"?ee(y,k)||N:h(k,10,H(y))):(D===7&&d(ht.INVALID_LINKED_FORMAT,s(),0),k.braceNest=0,k.inLinked=!1,pe(y,k))}}function pe(y,k){let D={type:13};if(k.braceNest>0)return ee(y,k)||f(k);if(k.inLinked)return Q(y,k)||f(k);switch(y.currentChar()){case"{":return ee(y,k)||f(k);case"}":return d(ht.UNBALANCED_CLOSING_BRACE,s(),0),y.next(),h(k,3,"}");case"@":return Q(y,k)||f(k);default:{if(Y(y))return D=h(k,1,O(y)),k.braceNest=0,k.inLinked=!1,D;if(W(y))return h(k,0,le(y));break}}return D}function we(){const{currentType:y,offset:k,startLoc:D,endLoc:N}=o;return o.lastType=y,o.lastOffset=k,o.lastStartLoc=D,o.lastEndLoc=N,o.offset=n(),o.startLoc=s(),r.currentChar()===jr?h(o,13):pe(r,o)}return{nextToken:we,currentOffset:n,currentPosition:s,context:c}}const Iy="parser",Dy=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,Vy=/\\([\\@{}|])/g;function Zy(e,t){return t}function By(e,t,i){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{const r=parseInt(t||i,16);return r<=55295||r>=57344?String.fromCodePoint(r):"�"}}}function Fy(e={}){const t=e.location!==!1,{onError:i}=e;function r(_,w,C,g,...E){const T=_.currentPosition();if(T.offset+=g,T.column+=g,i){const L=t?E1(C,T):null,V=Kc(w,L,{domain:Iy,args:E});i(V)}}function n(_,w,C){const g={type:_};return t&&(g.start=w,g.end=w,g.loc={start:C,end:C}),g}function s(_,w,C,g){t&&(_.end=w,_.loc&&(_.loc.end=C))}function a(_,w){const C=_.context(),g=n(3,C.offset,C.startLoc);return g.value=w.replace(Vy,Zy),s(g,_.currentOffset(),_.currentPosition()),g}function l(_,w){const C=_.context(),{lastOffset:g,lastStartLoc:E}=C,T=n(5,g,E);return T.index=parseInt(w,10),_.nextToken(),s(T,_.currentOffset(),_.currentPosition()),T}function o(_,w){const C=_.context(),{lastOffset:g,lastStartLoc:E}=C,T=n(4,g,E);return T.key=w,_.nextToken(),s(T,_.currentOffset(),_.currentPosition()),T}function c(_,w){const C=_.context(),{lastOffset:g,lastStartLoc:E}=C,T=n(9,g,E);return T.value=w.replace(Dy,By),_.nextToken(),s(T,_.currentOffset(),_.currentPosition()),T}function u(_){const w=_.nextToken(),C=_.context(),{lastOffset:g,lastStartLoc:E}=C,T=n(8,g,E);return w.type!==11?(r(_,ht.UNEXPECTED_EMPTY_LINKED_MODIFIER,C.lastStartLoc,0),T.value="",s(T,g,E),{nextConsumeToken:w,node:T}):(w.value==null&&r(_,ht.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,gr(w)),T.value=w.value||"",s(T,_.currentOffset(),_.currentPosition()),{node:T})}function d(_,w){const C=_.context(),g=n(7,C.offset,C.startLoc);return g.value=w,s(g,_.currentOffset(),_.currentPosition()),g}function h(_){const w=_.context(),C=n(6,w.offset,w.startLoc);let g=_.nextToken();if(g.type===8){const E=u(_);C.modifier=E.node,g=E.nextConsumeToken||_.nextToken()}switch(g.type!==9&&r(_,ht.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,gr(g)),g=_.nextToken(),g.type===2&&(g=_.nextToken()),g.type){case 10:g.value==null&&r(_,ht.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,gr(g)),C.key=d(_,g.value||"");break;case 4:g.value==null&&r(_,ht.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,gr(g)),C.key=o(_,g.value||"");break;case 5:g.value==null&&r(_,ht.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,gr(g)),C.key=l(_,g.value||"");break;case 6:g.value==null&&r(_,ht.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,gr(g)),C.key=c(_,g.value||"");break;default:{r(_,ht.UNEXPECTED_EMPTY_LINKED_KEY,w.lastStartLoc,0);const E=_.context(),T=n(7,E.offset,E.startLoc);return T.value="",s(T,E.offset,E.startLoc),C.key=T,s(C,E.offset,E.startLoc),{nextConsumeToken:g,node:C}}}return s(C,_.currentOffset(),_.currentPosition()),{node:C}}function f(_){const w=_.context(),C=w.currentType===1?_.currentOffset():w.offset,g=w.currentType===1?w.endLoc:w.startLoc,E=n(2,C,g);E.items=[];let T=null;do{const P=T||_.nextToken();switch(T=null,P.type){case 0:P.value==null&&r(_,ht.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,gr(P)),E.items.push(a(_,P.value||""));break;case 5:P.value==null&&r(_,ht.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,gr(P)),E.items.push(l(_,P.value||""));break;case 4:P.value==null&&r(_,ht.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,gr(P)),E.items.push(o(_,P.value||""));break;case 6:P.value==null&&r(_,ht.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,gr(P)),E.items.push(c(_,P.value||""));break;case 7:{const Y=h(_);E.items.push(Y.node),T=Y.nextConsumeToken||null;break}}}while(w.currentType!==13&&w.currentType!==1);const L=w.currentType===1?w.lastOffset:_.currentOffset(),V=w.currentType===1?w.lastEndLoc:_.currentPosition();return s(E,L,V),E}function v(_,w,C,g){const E=_.context();let T=g.items.length===0;const L=n(1,w,C);L.cases=[],L.cases.push(g);do{const V=f(_);T||(T=V.items.length===0),L.cases.push(V)}while(E.currentType!==13);return T&&r(_,ht.MUST_HAVE_MESSAGES_IN_PLURAL,C,0),s(L,_.currentOffset(),_.currentPosition()),L}function p(_){const w=_.context(),{offset:C,startLoc:g}=w,E=f(_);return w.currentType===13?E:v(_,C,g,E)}function S(_){const w=Ry(_,ei({},e)),C=w.context(),g=n(0,C.offset,C.startLoc);return t&&g.loc&&(g.loc.source=_),g.body=p(w),e.onCacheKey&&(g.cacheKey=e.onCacheKey(_)),C.currentType!==13&&r(w,ht.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,_[C.offset]||""),s(g,w.currentOffset(),w.currentPosition()),g}return{parse:S}}function gr(e){if(e.type===13)return"EOF";const t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function zy(e,t={}){const i={ast:e,helpers:new Set};return{context:()=>i,helper:s=>(i.helpers.add(s),s)}}function bf(e,t){for(let i=0;i<e.length;i++)Eh(e[i],t)}function Eh(e,t){switch(e.type){case 1:bf(e.cases,t),t.helper("plural");break;case 2:bf(e.items,t);break;case 6:{Eh(e.key,t),t.helper("linked"),t.helper("type");break}case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function Uy(e,t={}){const i=zy(e);i.helper("normalize"),e.body&&Eh(e.body,i);const r=i.context();e.helpers=Array.from(r.helpers)}function Wy(e){const t=e.body;return t.type===2?yf(t):t.cases.forEach(i=>yf(i)),e}function yf(e){if(e.items.length===1){const t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{const t=[];for(let i=0;i<e.items.length;i++){const r=e.items[i];if(!(r.type===3||r.type===9)||r.value==null)break;t.push(r.value)}if(t.length===e.items.length){e.static=Mh(t);for(let i=0;i<e.items.length;i++){const r=e.items[i];(r.type===3||r.type===9)&&delete r.value}}}}function Hs(e){switch(e.t=e.type,e.type){case 0:{const t=e;Hs(t.body),t.b=t.body,delete t.body;break}case 1:{const t=e,i=t.cases;for(let r=0;r<i.length;r++)Hs(i[r]);t.c=i,delete t.cases;break}case 2:{const t=e,i=t.items;for(let r=0;r<i.length;r++)Hs(i[r]);t.i=i,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{const t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{const t=e;Hs(t.key),t.k=t.key,delete t.key,t.modifier&&(Hs(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{const t=e;t.i=t.index,delete t.index;break}case 4:{const t=e;t.k=t.key,delete t.key;break}}delete e.type}function jy(e,t){const{filename:i,breakLineCode:r,needIndent:n}=t,s=t.location!==!1,a={filename:i,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:n,indentLevel:0};s&&e.loc&&(a.source=e.loc.source);const l=()=>a;function o(p,S){a.code+=p}function c(p,S=!0){const _=S?r:"";o(n?_+" ".repeat(p):_)}function u(p=!0){const S=++a.indentLevel;p&&c(S)}function d(p=!0){const S=--a.indentLevel;p&&c(S)}function h(){c(a.indentLevel)}return{context:l,push:o,indent:u,deindent:d,newline:h,helper:p=>`_${p}`,needIndent:()=>a.needIndent}}function Ky(e,t){const{helper:i}=e;e.push(`${i("linked")}(`),Ws(e,t.key),t.modifier?(e.push(", "),Ws(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function qy(e,t){const{helper:i,needIndent:r}=e;e.push(`${i("normalize")}([`),e.indent(r());const n=t.items.length;for(let s=0;s<n&&(Ws(e,t.items[s]),s!==n-1);s++)e.push(", ");e.deindent(r()),e.push("])")}function Gy(e,t){const{helper:i,needIndent:r}=e;if(t.cases.length>1){e.push(`${i("plural")}([`),e.indent(r());const n=t.cases.length;for(let s=0;s<n&&(Ws(e,t.cases[s]),s!==n-1);s++)e.push(", ");e.deindent(r()),e.push("])")}}function Yy(e,t){t.body?Ws(e,t.body):e.push("null")}function Ws(e,t){const{helper:i}=e;switch(t.type){case 0:Yy(e,t);break;case 1:Gy(e,t);break;case 2:qy(e,t);break;case 6:Ky(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${i("interpolate")}(${i("list")}(${t.index}))`,t);break;case 4:e.push(`${i("interpolate")}(${i("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break}}const Xy=(e,t={})=>{const i=Pe(t.mode)?t.mode:"normal",r=Pe(t.filename)?t.filename:"message.intl";t.sourceMap;const n=t.breakLineCode!=null?t.breakLineCode:i==="arrow"?";":`
32
- `,s=t.needIndent?t.needIndent:i!=="arrow",a=e.helpers||[],l=jy(e,{filename:r,breakLineCode:n,needIndent:s});l.push(i==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(s),a.length>0&&(l.push(`const { ${Mh(a.map(u=>`${u}: _${u}`),", ")} } = ctx`),l.newline()),l.push("return "),Ws(l,e),l.deindent(s),l.push("}"),delete e.helpers;const{code:o,map:c}=l.context();return{ast:e,code:o,map:c?c.toJSON():void 0}};function Jy(e,t={}){const i=ei({},t),r=!!i.jit,n=!!i.minify,s=i.optimize==null?!0:i.optimize,l=Fy(i).parse(e);return r?(s&&Wy(l),n&&Hs(l),{ast:l,code:""}):(Uy(l,i),Xy(l,i))}/*!
33
- * core-base v11.3.0
34
- * (c) 2026 kazuya kawaguchi
35
- * Released under the MIT License.
36
- */function Qy(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(as().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(as().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Hr(e){return pt(e)&&Lh(e)===0&&(Qi(e,"b")||Qi(e,"body"))}const a4=["b","body"];function e7(e){return Bn(e,a4)}const l4=["c","cases"];function t7(e){return Bn(e,l4,[])}const o4=["s","static"];function i7(e){return Bn(e,o4)}const c4=["i","items"];function r7(e){return Bn(e,c4,[])}const u4=["t","type"];function Lh(e){return Bn(e,u4)}const d4=["v","value"];function d0(e,t){const i=Bn(e,d4);if(i!=null)return i;throw mo(t)}const h4=["m","modifier"];function n7(e){return Bn(e,h4)}const f4=["k","key"];function s7(e){const t=Bn(e,f4);if(t)return t;throw mo(6)}function Bn(e,t,i){for(let r=0;r<t.length;r++){const n=t[r];if(Qi(e,n)&&e[n]!=null)return e[n]}return i}const p4=[...a4,...l4,...o4,...c4,...f4,...h4,...d4,...u4];function mo(e){return new Error(`unhandled node type: ${e}`)}function Tu(e){return i=>a7(i,e)}function a7(e,t){const i=e7(t);if(i==null)throw mo(0);if(Lh(i)===1){const s=t7(i);return e.plural(s.reduce((a,l)=>[...a,wf(e,l)],[]))}else return wf(e,i)}function wf(e,t){const i=i7(t);if(i!=null)return e.type==="text"?i:e.normalize([i]);{const r=r7(t).reduce((n,s)=>[...n,L1(e,s)],[]);return e.normalize(r)}}function L1(e,t){const i=Lh(t);switch(i){case 3:return d0(t,i);case 9:return d0(t,i);case 4:{const r=t;if(Qi(r,"k")&&r.k)return e.interpolate(e.named(r.k));if(Qi(r,"key")&&r.key)return e.interpolate(e.named(r.key));throw mo(i)}case 5:{const r=t;if(Qi(r,"i")&&jt(r.i))return e.interpolate(e.list(r.i));if(Qi(r,"index")&&jt(r.index))return e.interpolate(e.list(r.index));throw mo(i)}case 6:{const r=t,n=n7(r),s=s7(r);return e.linked(L1(e,s),n?L1(e,n):void 0,e.type)}case 7:return d0(t,i);case 8:return d0(t,i);default:throw new Error(`unhandled node on format message part: ${i}`)}}const l7=e=>e;let h0=vt();function o7(e,t={}){let i=!1;const r=t.onError||$y;return t.onError=n=>{i=!0,r(n)},{...Jy(e,t),detectError:i}}function c7(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&Pe(e)){at(t.warnHtmlMessage)&&t.warnHtmlMessage;const r=(t.onCacheKey||l7)(e),n=h0[r];if(n)return n;const{ast:s,detectError:a}=o7(e,{...t,location:!1,jit:!0}),l=Tu(s);return a?l:h0[r]=l}else{const i=e.cacheKey;if(i){const r=h0[i];return r||(h0[i]=Tu(e))}else return Tu(e)}}let vo=null;function u7(e){vo=e}function d7(e,t,i){vo&&vo.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:i})}const h7=f7("function:translate");function f7(e){return t=>vo&&vo.emit(e,t)}const tn={INVALID_ARGUMENT:Ly,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23},p7=24;function rn(e){return Kc(e,null,void 0)}function $h(e,t){return t.locale!=null?Sf(t.locale):Sf(e.locale)}let Hu;function Sf(e){if(Pe(e))return e;if(kt(e)){if(e.resolvedOnce&&Hu!=null)return Hu;if(e.constructor.name==="Function"){const t=e();if(Ay(t))throw rn(tn.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Hu=t}else throw rn(tn.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw rn(tn.NOT_SUPPORT_LOCALE_TYPE)}function _7(e,t,i){return[...new Set([i,...Nt(t)?t:pt(t)?Object.keys(t):Pe(t)?[t]:[i]])]}function $1(e,t,i){const r=Pe(i)?i:go,n=e;n.__localeChainCache||(n.__localeChainCache=new Map);let s=n.__localeChainCache.get(r);if(!s){s=[];let a=[i];for(;Nt(a);)a=Cf(s,a,t);const l=Nt(t)||!tt(t)?t:t.default?t.default:null;a=Pe(l)?[l]:l,Nt(a)&&Cf(s,a,!1),n.__localeChainCache.set(r,s)}return s}function Cf(e,t,i){let r=!0;for(let n=0;n<t.length&&at(r);n++){const s=t[n];Pe(s)&&(r=m7(e,t[n],i))}return r}function m7(e,t,i){let r;const n=t.split("-");do{const s=n.join("-");r=v7(e,s,i),n.splice(-1,1)}while(n.length&&r===!0);return r}function v7(e,t,i){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!=="!";const n=t.replace(/!/g,"");e.push(n),(Nt(i)||tt(i))&&i[n]&&(r=i[n])}return r}const Fn=[];Fn[0]={w:[0],i:[3,0],"[":[4],o:[7]};Fn[1]={w:[1],".":[2],"[":[4],o:[7]};Fn[2]={w:[2],i:[3,0],0:[3,0]};Fn[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};Fn[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};Fn[5]={"'":[4,0],o:8,l:[5,0]};Fn[6]={'"':[4,0],o:8,l:[6,0]};const g7=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function b7(e){return g7.test(e)}function y7(e){const t=e.charCodeAt(0),i=e.charCodeAt(e.length-1);return t===i&&(t===34||t===39)?e.slice(1,-1):e}function w7(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function S7(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:b7(t)?y7(t):"*"+t}function C7(e){const t=[];let i=-1,r=0,n=0,s,a,l,o,c,u,d;const h=[];h[0]=()=>{a===void 0?a=l:a+=l},h[1]=()=>{a!==void 0&&(t.push(a),a=void 0)},h[2]=()=>{h[0](),n++},h[3]=()=>{if(n>0)n--,r=4,h[0]();else{if(n=0,a===void 0||(a=S7(a),a===!1))return!1;h[1]()}};function f(){const v=e[i+1];if(r===5&&v==="'"||r===6&&v==='"')return i++,l="\\"+v,h[0](),!0}for(;r!==null;)if(i++,s=e[i],!(s==="\\"&&f())){if(o=w7(s),d=Fn[r],c=d[o]||d.l||8,c===8||(r=c[0],c[1]!==void 0&&(u=h[c[1]],u&&(l=s,u()===!1))))return;if(r===7)return t}}const kf=new Map;function k7(e,t){return pt(e)?e[t]:null}function A7(e,t){if(!pt(e))return null;let i=kf.get(t);if(i||(i=C7(t),i&&kf.set(t,i)),!i)return null;const r=i.length;let n=e,s=0;for(;s<r;){const a=i[s];if(p4.includes(a)&&Hr(n)||!pt(n)||!Qi(n,a))return null;const l=n[a];if(l===void 0||kt(n))return null;n=l,s++}return n}const M7="11.3.0",qc=-1,go="en-US",nc="",Af=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function E7(){return{upper:(e,t)=>t==="text"&&Pe(e)?e.toUpperCase():t==="vnode"&&pt(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&Pe(e)?e.toLowerCase():t==="vnode"&&pt(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&Pe(e)?Af(e):t==="vnode"&&pt(e)&&"__v_isVNode"in e?Af(e.children):e}}let _4;function L7(e){_4=e}let m4;function $7(e){m4=e}let v4;function x7(e){v4=e}let g4=null;const T7=e=>{g4=e},H7=()=>g4;let b4=null;const Mf=e=>{b4=e},N7=()=>b4;let Ef=0;function P7(e={}){const t=kt(e.onWarn)?e.onWarn:by,i=Pe(e.version)?e.version:M7,r=Pe(e.locale)||kt(e.locale)?e.locale:go,n=kt(r)?go:r,s=Nt(e.fallbackLocale)||tt(e.fallbackLocale)||Pe(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:n,a=tt(e.messages)?e.messages:Nu(n),l=tt(e.datetimeFormats)?e.datetimeFormats:Nu(n),o=tt(e.numberFormats)?e.numberFormats:Nu(n),c=ei(vt(),e.modifiers,E7()),u=e.pluralRules||vt(),d=kt(e.missing)?e.missing:null,h=at(e.missingWarn)||Us(e.missingWarn)?e.missingWarn:!0,f=at(e.fallbackWarn)||Us(e.fallbackWarn)?e.fallbackWarn:!0,v=!!e.fallbackFormat,p=!!e.unresolving,S=kt(e.postTranslation)?e.postTranslation:null,_=tt(e.processor)?e.processor:null,w=at(e.warnHtmlMessage)?e.warnHtmlMessage:!0,C=!!e.escapeParameter,g=kt(e.messageCompiler)?e.messageCompiler:_4,E=kt(e.messageResolver)?e.messageResolver:m4||k7,T=kt(e.localeFallbacker)?e.localeFallbacker:v4||_7,L=pt(e.fallbackContext)?e.fallbackContext:void 0,V=e,P=pt(V.__datetimeFormatters)?V.__datetimeFormatters:new Map,Y=pt(V.__numberFormatters)?V.__numberFormatters:new Map,W=pt(V.__meta)?V.__meta:{};Ef++;const A={version:i,cid:Ef,locale:r,fallbackLocale:s,messages:a,modifiers:c,pluralRules:u,missing:d,missingWarn:h,fallbackWarn:f,fallbackFormat:v,unresolving:p,postTranslation:S,processor:_,warnHtmlMessage:w,escapeParameter:C,messageCompiler:g,messageResolver:E,localeFallbacker:T,fallbackContext:L,onWarn:t,__meta:W};return A.datetimeFormats=l,A.numberFormats=o,A.__datetimeFormatters=P,A.__numberFormatters=Y,__INTLIFY_PROD_DEVTOOLS__&&d7(A,i,W),A}const Nu=e=>({[e]:vt()});function xh(e,t,i,r,n){const{missing:s,onWarn:a}=e;if(s!==null){const l=s(e,i,t,n);return Pe(l)?l:t}else return t}function El(e,t,i){const r=e;r.__localeChainCache=new Map,e.localeFallbacker(e,i,t)}function O7(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function R7(e,t){const i=t.indexOf(e);if(i===-1)return!1;for(let r=i+1;r<t.length;r++)if(O7(e,t[r]))return!0;return!1}function Lf(e,...t){const{datetimeFormats:i,unresolving:r,fallbackLocale:n,onWarn:s,localeFallbacker:a}=e,{__datetimeFormatters:l}=e;if(!Pe(t[0])&&!n4(t[0])&&!jt(t[0]))return nc;const[o,c,u,d]=x1(...t),h=at(u.missingWarn)?u.missingWarn:e.missingWarn;at(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const f=!!u.part,v=$h(e,u),p=a(e,n,v);if(!Pe(o)||o==="")return new Intl.DateTimeFormat(v.replace(/!/g,""),d).format(c);let S={},_,w=null;const C="datetime format";for(let T=0;T<p.length&&(_=p[T],S=i[_]||{},w=S[o],!tt(w));T++)xh(e,o,_,h,C);if(!tt(w)||!Pe(_))return r?qc:o;let g=`${_}__${o}`;jc(d)||(g=`${g}__${JSON.stringify(d)}`);let E=l.get(g);return E||(E=new Intl.DateTimeFormat(_,ei({},w,d)),l.set(g,E)),f?E.formatToParts(c):E.format(c)}const y4=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function x1(...e){const[t,i,r,n]=e,s=vt();let a=vt(),l;if(Pe(t)){const o=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!o)throw rn(tn.INVALID_ISO_DATE_ARGUMENT);const c=o[3]?o[3].trim().startsWith("T")?`${o[1].trim()}${o[3].trim()}`:`${o[1].trim()}T${o[3].trim()}`:o[1].trim();l=new Date(c);try{l.toISOString()}catch{throw rn(tn.INVALID_ISO_DATE_ARGUMENT)}}else if(n4(t)){if(isNaN(t.getTime()))throw rn(tn.INVALID_DATE_ARGUMENT);l=t}else if(jt(t))l=t;else throw rn(tn.INVALID_ARGUMENT);return Pe(i)?s.key=i:tt(i)&&Object.keys(i).forEach(o=>{y4.includes(o)?a[o]=i[o]:s[o]=i[o]}),Pe(r)?s.locale=r:tt(r)&&(a=r),tt(n)&&(a=n),[s.key||"",l,s,a]}function $f(e,t,i){const r=e;for(const n in i){const s=`${t}__${n}`;r.__datetimeFormatters.has(s)&&r.__datetimeFormatters.delete(s)}}function xf(e,...t){const{numberFormats:i,unresolving:r,fallbackLocale:n,onWarn:s,localeFallbacker:a}=e,{__numberFormatters:l}=e;if(!jt(t[0]))return nc;const[o,c,u,d]=T1(...t),h=at(u.missingWarn)?u.missingWarn:e.missingWarn;at(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;const f=!!u.part,v=$h(e,u),p=a(e,n,v);if(!Pe(o)||o==="")return new Intl.NumberFormat(v.replace(/!/g,""),d).format(c);let S={},_,w=null;const C="number format";for(let T=0;T<p.length&&(_=p[T],S=i[_]||{},w=S[o],!tt(w));T++)xh(e,o,_,h,C);if(!tt(w)||!Pe(_))return r?qc:o;let g=`${_}__${o}`;jc(d)||(g=`${g}__${JSON.stringify(d)}`);let E=l.get(g);return E||(E=new Intl.NumberFormat(_,ei({},w,d)),l.set(g,E)),f?E.formatToParts(c):E.format(c)}const w4=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function T1(...e){const[t,i,r,n]=e,s=vt();let a=vt();if(!jt(t))throw rn(tn.INVALID_ARGUMENT);const l=t;return Pe(i)?s.key=i:tt(i)&&Object.keys(i).forEach(o=>{w4.includes(o)?a[o]=i[o]:s[o]=i[o]}),Pe(r)?s.locale=r:tt(r)&&(a=r),tt(n)&&(a=n),[s.key||"",l,s,a]}function Tf(e,t,i){const r=e;for(const n in i){const s=`${t}__${n}`;r.__numberFormatters.has(s)&&r.__numberFormatters.delete(s)}}const I7=e=>e,D7=e=>"",V7="text",Z7=e=>e.length===0?"":Mh(e),B7=My;function Pu(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function F7(e){var i,r;const t=jt(e.pluralIndex)?e.pluralIndex:-1;return jt((i=e.named)==null?void 0:i.count)?e.named.count:jt((r=e.named)==null?void 0:r.n)?e.named.n:t}function z7(e={}){var _,w,C,g;const t=e.locale,i=F7(e),r=Pe(t)&&kt((_=e.pluralRules)==null?void 0:_[t])?e.pluralRules[t]:Pu,n=r===Pu?void 0:Pu,s=E=>E[r(i,E.length,n)],a=e.list||[],l=E=>a[E],o=e.named||vt();jt(e.pluralIndex)&&(o.count||(o.count=e.pluralIndex),o.n||(o.n=e.pluralIndex));const c=E=>o[E];function u(E,T){const L=kt(e.messages)?e.messages(E,!!T):pt(e.messages)?e.messages[E]:!1;return L||(e.parent?e.parent.message(E):D7)}const d=E=>e.modifiers?e.modifiers[E]:I7,h=kt((w=e.processor)==null?void 0:w.normalize)?e.processor.normalize:Z7,f=kt((C=e.processor)==null?void 0:C.interpolate)?e.processor.interpolate:B7,v=Pe((g=e.processor)==null?void 0:g.type)?e.processor.type:V7,S={list:l,named:c,plural:s,linked:(E,...T)=>{const[L,V]=T;let P="text",Y="";T.length===1?pt(L)?(Y=L.modifier||Y,P=L.type||P):Pe(L)&&(Y=L||Y):T.length===2&&(Pe(L)&&(Y=L||Y),Pe(V)&&(P=V||P));const W=u(E,!0)(S),A=W===""||W===void 0?E:W,$=P==="vnode"&&Nt(A)&&Y?A[0]:A;return Y?d(Y)($,P):$},message:u,type:v,interpolate:f,normalize:h,values:ei(vt(),a,o)};return S}const Hf=()=>"",Xi=e=>kt(e);function Nf(e,...t){const{fallbackFormat:i,postTranslation:r,unresolving:n,messageCompiler:s,fallbackLocale:a,messages:l}=e,[o,c]=H1(...t),u=at(c.missingWarn)?c.missingWarn:e.missingWarn,d=at(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,h=at(c.escapeParameter)?c.escapeParameter:e.escapeParameter,f=!!c.resolvedMessage,v=Pe(c.default)||at(c.default)?at(c.default)?s?o:()=>o:c.default:i?s?o:()=>o:null,p=i||v!=null&&(Pe(v)||kt(v)),S=$h(e,c);h&&U7(c);let[_,w,C]=f?[o,S,l[S]||vt()]:S4(e,o,S,a,d,u),g=_,E=o;if(!f&&!(Pe(g)||Hr(g)||Xi(g))&&p&&(g=v,E=g),!f&&(!(Pe(g)||Hr(g)||Xi(g))||!Pe(w)))return n?qc:o;let T=!1;const L=()=>{T=!0},V=Xi(g)?g:C4(e,o,w,g,E,L);if(T)return g;const P=K7(e,w,C,c),Y=z7(P),W=W7(e,V,Y);let A=r?r(W,o):W;if(h&&Pe(A)&&(A=Cy(A)),__INTLIFY_PROD_DEVTOOLS__){const $={timestamp:Date.now(),key:Pe(o)?o:Xi(g)?g.key:"",locale:w||(Xi(g)?g.locale:""),format:Pe(g)?g:Xi(g)?g.source:"",message:A};$.meta=ei({},e.__meta,H7()||{}),h7($)}return A}function U7(e){Nt(e.list)?e.list=e.list.map(t=>Pe(t)?mf(t):t):pt(e.named)&&Object.keys(e.named).forEach(t=>{Pe(e.named[t])&&(e.named[t]=mf(e.named[t]))})}function S4(e,t,i,r,n,s){const{messages:a,onWarn:l,messageResolver:o,localeFallbacker:c}=e,u=c(e,r,i);let d=vt(),h,f=null;const v="translate";for(let p=0;p<u.length&&(h=u[p],d=a[h]||vt(),(f=o(d,t))===null&&(f=d[t]),!(Pe(f)||Hr(f)||Xi(f)));p++)if(!R7(h,u)){const S=xh(e,t,h,s,v);S!==t&&(f=S)}return[f,h,d]}function C4(e,t,i,r,n,s){const{messageCompiler:a,warnHtmlMessage:l}=e;if(Xi(r)){const c=r;return c.locale=c.locale||i,c.key=c.key||t,c}if(a==null){const c=()=>r;return c.locale=i,c.key=t,c}const o=a(r,j7(e,i,n,r,l,s));return o.locale=i,o.key=t,o.source=r,o}function W7(e,t,i){return t(i)}function H1(...e){const[t,i,r]=e,n=vt();if(!Pe(t)&&!jt(t)&&!Xi(t)&&!Hr(t))throw rn(tn.INVALID_ARGUMENT);const s=jt(t)?String(t):(Xi(t),t);return jt(i)?n.plural=i:Pe(i)?n.default=i:tt(i)&&!jc(i)?n.named=i:Nt(i)&&(n.list=i),jt(r)?n.plural=r:Pe(r)?n.default=r:tt(r)&&ei(n,r),[s,n]}function j7(e,t,i,r,n,s){return{locale:t,key:i,warnHtmlMessage:n,onError:a=>{throw s&&s(a),a},onCacheKey:a=>yy(t,i,a)}}function K7(e,t,i,r){const{modifiers:n,pluralRules:s,messageResolver:a,fallbackLocale:l,fallbackWarn:o,missingWarn:c,fallbackContext:u}=e,h={locale:t,modifiers:n,pluralRules:s,messages:(f,v)=>{let p=a(i,f);if(p==null&&(u||v)){const[,,S]=S4(u||e,f,t,l,o,c);p=a(S,f)}if(Pe(p)||Hr(p)){let S=!1;const w=C4(e,f,t,p,f,()=>{S=!0});return S?Hf:w}else return Xi(p)?p:Hf}};return e.processor&&(h.processor=e.processor),r.list&&(h.list=r.list),r.named&&(h.named=r.named),jt(r.plural)&&(h.pluralIndex=r.plural),h}Qy();/*!
37
- * vue-i18n v11.3.0
38
- * (c) 2026 kazuya kawaguchi
39
- * Released under the MIT License.
40
- */const q7="11.3.0";function G7(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(as().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(as().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(as().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(as().__INTLIFY_PROD_DEVTOOLS__=!1)}const Ri={UNEXPECTED_RETURN_TYPE:p7,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32};function Ui(e,...t){return Kc(e,null,void 0)}const N1=Zn("__translateVNode"),P1=Zn("__datetimeParts"),O1=Zn("__numberParts"),k4=Zn("__setPluralRules"),A4=Zn("__injectWithOption"),R1=Zn("__dispose");function bo(e){if(!pt(e)||Hr(e))return e;for(const t in e)if(Qi(e,t))if(!t.includes("."))pt(e[t])&&bo(e[t]);else{const i=t.split("."),r=i.length-1;let n=e,s=!1;for(let a=0;a<r;a++){if(i[a]==="__proto__")throw new Error(`unsafe key: ${i[a]}`);if(i[a]in n||(n[i[a]]=vt()),!pt(n[i[a]])){s=!0;break}n=n[i[a]]}if(s||(Hr(n)?p4.includes(i[r])||delete e[t]:(n[i[r]]=e[t],delete e[t])),!Hr(n)){const a=n[i[r]];pt(a)&&bo(a)}}return e}function Th(e,t){const{messages:i,__i18n:r,messageResolver:n,flatJson:s}=t,a=tt(i)?i:Nt(r)?vt():{[e]:vt()};if(Nt(r)&&r.forEach(l=>{if("locale"in l&&"resource"in l){const{locale:o,resource:c}=l;o?(a[o]=a[o]||vt(),H0(c,a[o])):H0(c,a)}else Pe(l)&&H0(JSON.parse(l),a)}),n==null&&s)for(const l in a)Qi(a,l)&&bo(a[l]);return a}function M4(e){return e.type}function E4(e,t,i){let r=pt(t.messages)?t.messages:vt();"__i18nGlobal"in i&&(r=Th(e.locale.value,{messages:r,__i18n:i.__i18nGlobal}));const n=Object.keys(r);n.length&&n.forEach(s=>{e.mergeLocaleMessage(s,r[s])});{if(pt(t.datetimeFormats)){const s=Object.keys(t.datetimeFormats);s.length&&s.forEach(a=>{e.mergeDateTimeFormat(a,t.datetimeFormats[a])})}if(pt(t.numberFormats)){const s=Object.keys(t.numberFormats);s.length&&s.forEach(a=>{e.mergeNumberFormat(a,t.numberFormats[a])})}}}function Pf(e){return G(Vn,null,e,0)}function yo(){return wi()}const Of="__INTLIFY_META__",Rf=()=>[],Y7=()=>!1;let If=0;function Df(e){return(t,i,r,n)=>e(i,r,yo()||void 0,n)}const X7=()=>{const e=yo();let t=null;return e&&(t=M4(e)[Of])?{[Of]:t}:null};function Hh(e={}){const{__root:t,__injectWithOption:i}=e,r=t===void 0,n=e.flatJson,s=rc?q:Zr;let a=at(e.inheritLocale)?e.inheritLocale:!0;const l=s(t&&a?t.locale.value:Pe(e.locale)?e.locale:go),o=s(t&&a?t.fallbackLocale.value:Pe(e.fallbackLocale)||Nt(e.fallbackLocale)||tt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),c=s(Th(l.value,e)),u=s(tt(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),d=s(tt(e.numberFormats)?e.numberFormats:{[l.value]:{}});let h=t?t.missingWarn:at(e.missingWarn)||Us(e.missingWarn)?e.missingWarn:!0,f=t?t.fallbackWarn:at(e.fallbackWarn)||Us(e.fallbackWarn)?e.fallbackWarn:!0,v=t?t.fallbackRoot:at(e.fallbackRoot)?e.fallbackRoot:!0,p=!!e.fallbackFormat,S=kt(e.missing)?e.missing:null,_=kt(e.missing)?Df(e.missing):null,w=kt(e.postTranslation)?e.postTranslation:null,C=t?t.warnHtmlMessage:at(e.warnHtmlMessage)?e.warnHtmlMessage:!0,g=!!e.escapeParameter;const E=t?t.modifiers:tt(e.modifiers)?e.modifiers:{};let T=e.pluralRules||t&&t.pluralRules,L;L=(()=>{r&&Mf(null);const B={version:q7,locale:l.value,fallbackLocale:o.value,messages:c.value,modifiers:E,pluralRules:T,missing:_===null?void 0:_,missingWarn:h,fallbackWarn:f,fallbackFormat:p,unresolving:!0,postTranslation:w===null?void 0:w,warnHtmlMessage:C,escapeParameter:g,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};B.datetimeFormats=u.value,B.numberFormats=d.value,B.__datetimeFormatters=tt(L)?L.__datetimeFormatters:void 0,B.__numberFormatters=tt(L)?L.__numberFormatters:void 0;const K=P7(B);return r&&Mf(K),K})(),El(L,l.value,o.value);function P(){return[l.value,o.value,c.value,u.value,d.value]}const Y=j({get:()=>l.value,set:B=>{L.locale=B,l.value=B}}),W=j({get:()=>o.value,set:B=>{L.fallbackLocale=B,o.value=B,El(L,l.value,B)}}),A=j(()=>c.value),$=j(()=>u.value),Z=j(()=>d.value);function ie(){return kt(w)?w:null}function ne(B){w=B,L.postTranslation=B}function ce(){return S}function J(B){B!==null&&(_=Df(B)),S=B,L.missing=_}const ae=(B,K,Se,Me,Ve,Ye)=>{P();let Te;try{__INTLIFY_PROD_DEVTOOLS__,r||(L.fallbackContext=t?N7():void 0),Te=B(L)}finally{__INTLIFY_PROD_DEVTOOLS__,r||(L.fallbackContext=void 0)}if(Se!=="translate exists"&&jt(Te)&&Te===qc||Se==="translate exists"&&!Te){const[it,Ot]=K();return t&&v?Me(t):Ve(it)}else{if(Ye(Te))return Te;throw Ui(Ri.UNEXPECTED_RETURN_TYPE)}};function re(...B){return ae(K=>Reflect.apply(Nf,null,[K,...B]),()=>H1(...B),"translate",K=>Reflect.apply(K.t,K,[...B]),K=>K,K=>Pe(K))}function X(...B){const[K,Se,Me]=B;if(Me&&!pt(Me))throw Ui(Ri.INVALID_ARGUMENT);return re(K,Se,ei({resolvedMessage:!0},Me||{}))}function le(...B){return ae(K=>Reflect.apply(Lf,null,[K,...B]),()=>x1(...B),"datetime format",K=>Reflect.apply(K.d,K,[...B]),()=>nc,K=>Pe(K)||Nt(K))}function ve(...B){return ae(K=>Reflect.apply(xf,null,[K,...B]),()=>T1(...B),"number format",K=>Reflect.apply(K.n,K,[...B]),()=>nc,K=>Pe(K)||Nt(K))}function ue(B){return B.map(K=>Pe(K)||jt(K)||at(K)?Pf(String(K)):K)}const ye={normalize:ue,interpolate:B=>B,type:"vnode"};function U(...B){return ae(K=>{let Se;const Me=K;try{Me.processor=ye,Se=Reflect.apply(Nf,null,[Me,...B])}finally{Me.processor=null}return Se},()=>H1(...B),"translate",K=>K[N1](...B),K=>[Pf(K)],K=>Nt(K))}function fe(...B){return ae(K=>Reflect.apply(xf,null,[K,...B]),()=>T1(...B),"number format",K=>K[O1](...B),Rf,K=>Pe(K)||Nt(K))}function ge(...B){return ae(K=>Reflect.apply(Lf,null,[K,...B]),()=>x1(...B),"datetime format",K=>K[P1](...B),Rf,K=>Pe(K)||Nt(K))}function se(B){T=B,L.pluralRules=T}function x(B,K){return ae(()=>{if(!B)return!1;const Se=Pe(K)?K:l.value,Me=Pe(K)?[Se]:$1(L,o.value,Se);for(let Ve=0;Ve<Me.length;Ve++){const Ye=ee(Me[Ve]);let Te=L.messageResolver(Ye,B);if(Te===null&&(Te=Ye[B]),Hr(Te)||Xi(Te)||Pe(Te))return!0}return!1},()=>[B],"translate exists",Se=>Reflect.apply(Se.te,Se,[B,K]),Y7,Se=>at(Se))}function H(B){let K=null;const Se=$1(L,o.value,l.value);for(let Me=0;Me<Se.length;Me++){const Ve=c.value[Se[Me]]||{},Ye=L.messageResolver(Ve,B);if(Ye!=null){K=Ye;break}}return K}function O(B){const K=H(B);return K??(t?t.tm(B)||{}:{})}function ee(B){return c.value[B]||{}}function Q(B,K){if(n){const Se={[B]:K};for(const Me in Se)Qi(Se,Me)&&bo(Se[Me]);K=Se[B]}c.value[B]=K,L.messages=c.value}function pe(B,K){c.value[B]=c.value[B]||{};const Se={[B]:K};if(n)for(const Me in Se)Qi(Se,Me)&&bo(Se[Me]);K=Se[B],H0(K,c.value[B]),L.messages=c.value}function we(B){return u.value[B]||{}}function y(B,K){u.value[B]=K,L.datetimeFormats=u.value,$f(L,B,K)}function k(B,K){u.value[B]=ei(u.value[B]||{},K),L.datetimeFormats=u.value,$f(L,B,K)}function D(B){return d.value[B]||{}}function N(B,K){d.value[B]=K,L.numberFormats=d.value,Tf(L,B,K)}function I(B,K){d.value[B]=ei(d.value[B]||{},K),L.numberFormats=d.value,Tf(L,B,K)}If++,t&&rc&&(De(t.locale,B=>{a&&(l.value=B,L.locale=B,El(L,l.value,o.value))}),De(t.fallbackLocale,B=>{a&&(o.value=B,L.fallbackLocale=B,El(L,l.value,o.value))}));const R={id:If,locale:Y,fallbackLocale:W,get inheritLocale(){return a},set inheritLocale(B){a=B,B&&t&&(l.value=t.locale.value,o.value=t.fallbackLocale.value,El(L,l.value,o.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:A,get modifiers(){return E},get pluralRules(){return T||{}},get isGlobal(){return r},get missingWarn(){return h},set missingWarn(B){h=B,L.missingWarn=h},get fallbackWarn(){return f},set fallbackWarn(B){f=B,L.fallbackWarn=f},get fallbackRoot(){return v},set fallbackRoot(B){v=B},get fallbackFormat(){return p},set fallbackFormat(B){p=B,L.fallbackFormat=p},get warnHtmlMessage(){return C},set warnHtmlMessage(B){C=B,L.warnHtmlMessage=B},get escapeParameter(){return g},set escapeParameter(B){g=B,L.escapeParameter=B},t:re,getLocaleMessage:ee,setLocaleMessage:Q,mergeLocaleMessage:pe,getPostTranslationHandler:ie,setPostTranslationHandler:ne,getMissingHandler:ce,setMissingHandler:J,[k4]:se};return R.datetimeFormats=$,R.numberFormats=Z,R.rt=X,R.te=x,R.tm=O,R.d=le,R.n=ve,R.getDateTimeFormat=we,R.setDateTimeFormat=y,R.mergeDateTimeFormat=k,R.getNumberFormat=D,R.setNumberFormat=N,R.mergeNumberFormat=I,R[A4]=i,R[N1]=U,R[P1]=ge,R[O1]=fe,R}function J7(e){const t=Pe(e.locale)?e.locale:go,i=Pe(e.fallbackLocale)||Nt(e.fallbackLocale)||tt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:t,r=kt(e.missing)?e.missing:void 0,n=at(e.silentTranslationWarn)||Us(e.silentTranslationWarn)?!e.silentTranslationWarn:!0,s=at(e.silentFallbackWarn)||Us(e.silentFallbackWarn)?!e.silentFallbackWarn:!0,a=at(e.fallbackRoot)?e.fallbackRoot:!0,l=!!e.formatFallbackMessages,o=tt(e.modifiers)?e.modifiers:{},c=e.pluralizationRules,u=kt(e.postTranslation)?e.postTranslation:void 0,d=Pe(e.warnHtmlInMessage)?e.warnHtmlInMessage!=="off":!0,h=!!e.escapeParameterHtml,f=at(e.sync)?e.sync:!0;let v=e.messages;if(tt(e.sharedMessages)){const E=e.sharedMessages;v=Object.keys(E).reduce((L,V)=>{const P=L[V]||(L[V]={});return ei(P,E[V]),L},v||{})}const{__i18n:p,__root:S,__injectWithOption:_}=e,w=e.datetimeFormats,C=e.numberFormats,g=e.flatJson;return{locale:t,fallbackLocale:i,messages:v,flatJson:g,datetimeFormats:w,numberFormats:C,missing:r,missingWarn:n,fallbackWarn:s,fallbackRoot:a,fallbackFormat:l,modifiers:o,pluralRules:c,postTranslation:u,warnHtmlMessage:d,escapeParameter:h,messageResolver:e.messageResolver,inheritLocale:f,__i18n:p,__root:S,__injectWithOption:_}}function I1(e={}){const t=Hh(J7(e)),{__extender:i}=e,r={id:t.id,get locale(){return t.locale.value},set locale(n){t.locale.value=n},get fallbackLocale(){return t.fallbackLocale.value},set fallbackLocale(n){t.fallbackLocale.value=n},get messages(){return t.messages.value},get datetimeFormats(){return t.datetimeFormats.value},get numberFormats(){return t.numberFormats.value},get availableLocales(){return t.availableLocales},get missing(){return t.getMissingHandler()},set missing(n){t.setMissingHandler(n)},get silentTranslationWarn(){return at(t.missingWarn)?!t.missingWarn:t.missingWarn},set silentTranslationWarn(n){t.missingWarn=at(n)?!n:n},get silentFallbackWarn(){return at(t.fallbackWarn)?!t.fallbackWarn:t.fallbackWarn},set silentFallbackWarn(n){t.fallbackWarn=at(n)?!n:n},get modifiers(){return t.modifiers},get formatFallbackMessages(){return t.fallbackFormat},set formatFallbackMessages(n){t.fallbackFormat=n},get postTranslation(){return t.getPostTranslationHandler()},set postTranslation(n){t.setPostTranslationHandler(n)},get sync(){return t.inheritLocale},set sync(n){t.inheritLocale=n},get warnHtmlInMessage(){return t.warnHtmlMessage?"warn":"off"},set warnHtmlInMessage(n){t.warnHtmlMessage=n!=="off"},get escapeParameterHtml(){return t.escapeParameter},set escapeParameterHtml(n){t.escapeParameter=n},get pluralizationRules(){return t.pluralRules||{}},__composer:t,t(...n){return Reflect.apply(t.t,t,[...n])},rt(...n){return Reflect.apply(t.rt,t,[...n])},te(n,s){return t.te(n,s)},tm(n){return t.tm(n)},getLocaleMessage(n){return t.getLocaleMessage(n)},setLocaleMessage(n,s){t.setLocaleMessage(n,s)},mergeLocaleMessage(n,s){t.mergeLocaleMessage(n,s)},d(...n){return Reflect.apply(t.d,t,[...n])},getDateTimeFormat(n){return t.getDateTimeFormat(n)},setDateTimeFormat(n,s){t.setDateTimeFormat(n,s)},mergeDateTimeFormat(n,s){t.mergeDateTimeFormat(n,s)},n(...n){return Reflect.apply(t.n,t,[...n])},getNumberFormat(n){return t.getNumberFormat(n)},setNumberFormat(n,s){t.setNumberFormat(n,s)},mergeNumberFormat(n,s){t.mergeNumberFormat(n,s)}};return r.__extender=i,r}function Q7(e,t,i){return{beforeCreate(){const r=yo();if(!r)throw Ui(Ri.UNEXPECTED_ERROR);const n=this.$options;if(n.i18n){const s=n.i18n;if(n.__i18n&&(s.__i18n=n.__i18n),s.__root=t,this===this.$root)this.$i18n=Vf(e,s);else{s.__injectWithOption=!0,s.__extender=i.__vueI18nExtend,this.$i18n=I1(s);const a=this.$i18n;a.__extender&&(a.__disposer=a.__extender(this.$i18n))}}else if(n.__i18n)if(this===this.$root)this.$i18n=Vf(e,n);else{this.$i18n=I1({__i18n:n.__i18n,__injectWithOption:!0,__extender:i.__vueI18nExtend,__root:t});const s=this.$i18n;s.__extender&&(s.__disposer=s.__extender(this.$i18n))}else this.$i18n=e;n.__i18nGlobal&&E4(t,n,n),this.$t=(...s)=>this.$i18n.t(...s),this.$rt=(...s)=>this.$i18n.rt(...s),this.$te=(s,a)=>this.$i18n.te(s,a),this.$d=(...s)=>this.$i18n.d(...s),this.$n=(...s)=>this.$i18n.n(...s),this.$tm=s=>this.$i18n.tm(s),i.__setInstance(r,this.$i18n)},mounted(){},unmounted(){const r=yo();if(!r)throw Ui(Ri.UNEXPECTED_ERROR);const n=this.$i18n;delete this.$t,delete this.$rt,delete this.$te,delete this.$d,delete this.$n,delete this.$tm,n.__disposer&&(n.__disposer(),delete n.__disposer,delete n.__extender),i.__deleteInstance(r),delete this.$i18n}}}function Vf(e,t){e.locale=t.locale||e.locale,e.fallbackLocale=t.fallbackLocale||e.fallbackLocale,e.missing=t.missing||e.missing,e.silentTranslationWarn=t.silentTranslationWarn||e.silentFallbackWarn,e.silentFallbackWarn=t.silentFallbackWarn||e.silentFallbackWarn,e.formatFallbackMessages=t.formatFallbackMessages||e.formatFallbackMessages,e.postTranslation=t.postTranslation||e.postTranslation,e.warnHtmlInMessage=t.warnHtmlInMessage||e.warnHtmlInMessage,e.escapeParameterHtml=t.escapeParameterHtml||e.escapeParameterHtml,e.sync=t.sync||e.sync,e.__composer[k4](t.pluralizationRules||e.pluralizationRules);const i=Th(e.locale,{messages:t.messages,__i18n:t.__i18n});return Object.keys(i).forEach(r=>e.mergeLocaleMessage(r,i[r])),t.datetimeFormats&&Object.keys(t.datetimeFormats).forEach(r=>e.mergeDateTimeFormat(r,t.datetimeFormats[r])),t.numberFormats&&Object.keys(t.numberFormats).forEach(r=>e.mergeNumberFormat(r,t.numberFormats[r])),e}const Nh={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function ew({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((r,n)=>[...r,...n.type===ke?n.children:[n]],[]):t.reduce((i,r)=>{const n=e[r];return n&&(i[r]=n()),i},vt())}function L4(){return ke}const tw=Re({name:"i18n-t",props:ei({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>jt(e)||!isNaN(e)}},Nh),setup(e,t){const{slots:i,attrs:r}=t,n=e.i18n||Ph({useScope:e.scope,__useComponent:!0});return()=>{const s=Object.keys(i).filter(d=>d[0]!=="_"),a=vt();e.locale&&(a.locale=e.locale),e.plural!==void 0&&(a.plural=Pe(e.plural)?+e.plural:e.plural);const l=ew(t,s),o=n[N1](e.keypath,l,a),c=ei(vt(),r),u=Pe(e.tag)||pt(e.tag)?e.tag:L4();return $e(u,c,o)}}}),Zf=tw;function iw(e){return Nt(e)&&!Pe(e[0])}function $4(e,t,i,r){const{slots:n,attrs:s}=t;return()=>{const a={part:!0};let l=vt();e.locale&&(a.locale=e.locale),Pe(e.format)?a.key=e.format:pt(e.format)&&(Pe(e.format.key)&&(a.key=e.format.key),l=Object.keys(e.format).reduce((h,f)=>i.includes(f)?ei(vt(),h,{[f]:e.format[f]}):h,vt()));const o=r(e.value,a,l);let c=[a.key];Nt(o)?c=o.map((h,f)=>{const v=n[h.type],p=v?v({[h.type]:h.value,index:f,parts:o}):[h.value];return iw(p)&&(p[0].key=`${h.type}-${f}`),p}):Pe(o)&&(c=[o]);const u=ei(vt(),s),d=Pe(e.tag)||pt(e.tag)?e.tag:L4();return $e(d,u,c)}}const rw=Re({name:"i18n-n",props:ei({value:{type:Number,required:!0},format:{type:[String,Object]}},Nh),setup(e,t){const i=e.i18n||Ph({useScope:e.scope,__useComponent:!0});return $4(e,t,w4,(...r)=>i[O1](...r))}}),Bf=rw;function nw(e,t){const i=e;if(e.mode==="composition")return i.__getInstance(t)||e.global;{const r=i.__getInstance(t);return r!=null?r.__composer:e.global.__composer}}function sw(e){const t=a=>{const{instance:l,value:o}=a;if(!l||!l.$)throw Ui(Ri.UNEXPECTED_ERROR);const c=nw(e,l.$),u=Ff(o);return[Reflect.apply(c.t,c,[...zf(u)]),c]};return{created:(a,l)=>{const[o,c]=t(l);rc&&(a.__i18nWatcher=De(c.locale,()=>{l.instance&&l.instance.$forceUpdate()})),a.__composer=c,a.textContent=o},unmounted:a=>{rc&&a.__i18nWatcher&&(a.__i18nWatcher(),a.__i18nWatcher=void 0,delete a.__i18nWatcher),a.__composer&&(a.__composer=void 0,delete a.__composer)},beforeUpdate:(a,{value:l})=>{if(a.__composer){const o=a.__composer,c=Ff(l);a.textContent=Reflect.apply(o.t,o,[...zf(c)])}},getSSRProps:a=>{const[l]=t(a);return{textContent:l}}}}function Ff(e){if(Pe(e))return{path:e};if(tt(e)){if(!("path"in e))throw Ui(Ri.REQUIRED_VALUE,"path");return e}else throw Ui(Ri.INVALID_VALUE)}function zf(e){const{path:t,locale:i,args:r,choice:n,plural:s}=e,a={},l=r||{};return Pe(i)&&(a.locale=i),jt(n)&&(a.plural=n),jt(s)&&(a.plural=s),[t,l,a]}function aw(e,t,...i){const r=tt(i[0])?i[0]:{};(at(r.globalInstall)?r.globalInstall:!0)&&([Zf.name,"I18nT"].forEach(s=>e.component(s,Zf)),[Bf.name,"I18nN"].forEach(s=>e.component(s,Bf)),[Wf.name,"I18nD"].forEach(s=>e.component(s,Wf))),e.directive("t",sw(t))}const lw=Zn("global-vue-i18n");function ow(e={}){const t=__VUE_I18N_LEGACY_API__&&at(e.legacy)?e.legacy:__VUE_I18N_LEGACY_API__,i=at(e.globalInjection)?e.globalInjection:!0,r=new Map,[n,s]=cw(e,t),a=Zn("");function l(d){return r.get(d)||null}function o(d,h){r.set(d,h)}function c(d){r.delete(d)}const u={get mode(){return __VUE_I18N_LEGACY_API__&&t?"legacy":"composition"},async install(d,...h){if(d.__VUE_I18N_SYMBOL__=a,d.provide(d.__VUE_I18N_SYMBOL__,u),tt(h[0])){const p=h[0];u.__composerExtend=p.__composerExtend,u.__vueI18nExtend=p.__vueI18nExtend}let f=null;!t&&i&&(f=vw(d,u.global)),__VUE_I18N_FULL_INSTALL__&&aw(d,u,...h),__VUE_I18N_LEGACY_API__&&t&&d.mixin(Q7(s,s.__composer,u));const v=d.unmount;d.unmount=()=>{f&&f(),u.dispose(),v()}},get global(){return s},dispose(){n.stop()},__instances:r,__getInstance:l,__setInstance:o,__deleteInstance:c};return u}function Ph(e={}){const t=yo();if(t==null)throw Ui(Ri.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Ui(Ri.NOT_INSTALLED);const i=uw(t),r=hw(i),n=M4(t),s=dw(e,n);if(s==="global")return E4(r,e,n),r;if(s==="parent"){let o=fw(i,t,e.__useComponent);return o==null&&(o=r),o}const a=i;let l=a.__getInstance(t);if(l==null){const o=ei({},e);"__i18n"in n&&(o.__i18n=n.__i18n),r&&(o.__root=r),l=Hh(o),a.__composerExtend&&(l[R1]=a.__composerExtend(l)),_w(a,t,l),a.__setInstance(t,l)}return l}function cw(e,t){const i=lh(),r=__VUE_I18N_LEGACY_API__&&t?i.run(()=>I1(e)):i.run(()=>Hh(e));if(r==null)throw Ui(Ri.UNEXPECTED_ERROR);return[i,r]}function uw(e){const t=Mt(e.isCE?lw:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Ui(e.isCE?Ri.NOT_INSTALLED_WITH_PROVIDE:Ri.UNEXPECTED_ERROR);return t}function dw(e,t){return jc(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function hw(e){return e.mode==="composition"?e.global:e.global.__composer}function fw(e,t,i=!1){let r=null;const n=t.root;let s=pw(t,i);for(;s!=null;){const a=e;if(e.mode==="composition")r=a.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const l=a.__getInstance(s);l!=null&&(r=l.__composer,i&&r&&!r[A4]&&(r=null))}if(r!=null||n===s)break;s=s.parent}return r}function pw(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function _w(e,t,i){lt(()=>{},t),Oi(()=>{const r=i;e.__deleteInstance(t);const n=r[R1];n&&(n(),delete r[R1])},t)}const mw=["locale","fallbackLocale","availableLocales"],Uf=["t","rt","d","n","tm","te"];function vw(e,t){const i=Object.create(null);return mw.forEach(n=>{const s=Object.getOwnPropertyDescriptor(t,n);if(!s)throw Ui(Ri.UNEXPECTED_ERROR);const a=At(s.value)?{get(){return s.value.value},set(l){s.value.value=l}}:{get(){return s.get&&s.get()}};Object.defineProperty(i,n,a)}),e.config.globalProperties.$i18n=i,Uf.forEach(n=>{const s=Object.getOwnPropertyDescriptor(t,n);if(!s||!s.value)throw Ui(Ri.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${n}`,s)}),()=>{delete e.config.globalProperties.$i18n,Uf.forEach(n=>{delete e.config.globalProperties[`$${n}`]})}}const gw=Re({name:"i18n-d",props:ei({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Nh),setup(e,t){const i=e.i18n||Ph({useScope:e.scope,__useComponent:!0});return $4(e,t,y4,(...r)=>i[P1](...r))}}),Wf=gw;G7();L7(c7);$7(A7);x7($1);if(__INTLIFY_PROD_DEVTOOLS__){const e=as();e.__INTLIFY__=!0,u7(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}var x4="(prefers-reduced-motion: reduce)";function bw(){let e=q(!1);if(typeof window<"u"&&typeof window.matchMedia=="function"){let t=window.matchMedia(x4);e.value=t.matches;let i=r=>{e.value=r.matches};typeof t.addEventListener=="function"?(t.addEventListener("change",i),U0(()=>t.removeEventListener("change",i))):typeof t.addListener=="function"&&(t.addListener(i),U0(()=>t.removeListener(i)))}return Hn(e)}function Oh(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(x4).matches}var D1="data-nb-tour-step",yw=Symbol("nb-command-palette");function ww(){let e=ps(new Map),t=q(!1),i=q(void 0),r=q(void 0);function n(u){e.set(u.id,u)}function s(u){for(let d of u)e.set(d.id,d)}function a(u){e.delete(u)}function l(u){r.value=u,t.value=!0}function o(){t.value=!1,r.value=void 0}function c(u){i.value=u}return ps({commands:e,isOpen:t,activeContext:i,searchFilter:r,register:n,registerMany:s,unregister:a,open:l,close:o,setContext:c})}var nt=(e,t)=>{let i=e.__vccOpts||e;for(let[r,n]of t)i[r]=n;return i},jf=Object.defineProperty,Gc=(e,t)=>{let i={};for(var r in e)jf(i,r,{get:e[r],enumerable:!0});return jf(i,Symbol.toStringTag,{value:"Module"}),i},Sw=Gc({default:()=>Cw});function Cw(e){e.directive("nb-context-menu",{mounted(t,i){let r=n=>{n.preventDefault(),typeof i.value=="function"&&i.value({x:n.clientX,y:n.clientY})};t.__nbContextMenuHandler__=r,t.addEventListener("contextmenu",r)},updated(t,i){t.__nbContextMenuHandler__&&t.removeEventListener("contextmenu",t.__nbContextMenuHandler__);let r=n=>{n.preventDefault(),typeof i.value=="function"&&i.value({x:n.clientX,y:n.clientY})};t.__nbContextMenuHandler__=r,t.addEventListener("contextmenu",r)},unmounted(t){t.__nbContextMenuHandler__&&(t.removeEventListener("contextmenu",t.__nbContextMenuHandler__),delete t.__nbContextMenuHandler__)}})}var kw=Gc({devWarn:()=>Rn,renderTooltipContent:()=>N0}),Kf=new Set(["span","div","p","b","strong","em","i","u","s","small","code","kbd","br","ul","ol","li"]),Aw=new Set(["br"]),qf=new Set(["class","style","dir","lang"]),Mw=e=>e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;"),Ew=new Set("color.background-color.font-family.font-size.font-style.font-variant.font-weight.letter-spacing.line-height.text-align.text-decoration.text-transform.white-space.word-break.overflow-wrap.opacity.display.flex-direction.align-items.justify-content.gap.margin.margin-top.margin-right.margin-bottom.margin-left.padding.padding-top.padding-right.padding-bottom.padding-left.max-width.min-width.border-radius".split(".")),Lw=/url\(|image-set\(|expression\(|javascript:|@import|\\/i,$w=/^[A-Za-z_-][A-Za-z0-9_-]*$/,xw=e=>e.split(";").map(t=>{let i=t.indexOf(":");if(i<0)return"";let r=t.slice(0,i).trim().toLowerCase(),n=t.slice(i+1).trim();return!r||!n?"":Ew.has(r)?Lw.test(n)?(Rn(`style-value:${r}`,`The value of "${r}" was dropped: tooltip content may not load a resource or call a CSS function that does.`),""):`${r}: ${n}`:(Rn(`style:${r}`,`"${r}" is not an allowed tooltip content style property and was dropped.`),"")}).filter(Boolean).join("; "),Tw=e=>e.split(/\s+/).filter(t=>t?$w.test(t)?!0:(Rn(`class:${t}`,`"${t}" is not a valid class token for tooltip content and was dropped.`),!1):!1).join(" "),Hw=(e,t)=>e==="style"?xw(t):e==="class"?Tw(t):t,Nw=new Set(["b","strong","em","i","u","s","small","code","kbd","br","p"]),Pw={"<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"},Gf=e=>e.replace(/&(?!(?:[a-zA-Z][a-zA-Z0-9]{1,10}|#\d{1,7}|#[xX][0-9a-fA-F]{1,6});)/g,"&amp;").replace(/[<>"']/g,t=>Pw[t]),T4=e=>e.split(/(<[^<>]*>)/g).map(t=>{var i;if(t.startsWith("<")&&t.endsWith(">")){let r=/^<\s*(\/?)\s*([a-zA-Z][a-zA-Z0-9]*)\s*\/?\s*>$/.exec(t),n=(i=r==null?void 0:r[2])==null?void 0:i.toLowerCase();return n&&Nw.has(n)?`<${r[1]}${n}>`:(n&&Rn(`string-tag:${n}`,`<${n}> is not allowed in a tooltip string and was shown as text. Use the structured content form for anything richer.`),Gf(t))}return Gf(t).replace(/\n/g,"<br>")}).join(""),Yf=new Set,Rn=(e,t)=>{typeof process<"u"||Yf.has(e)||(Yf.add(e),console.warn(`[nb-tooltip] ${t}`))},V1=e=>{if(Array.isArray(e))return e.map(u=>V1(u)).join("");if(!e||typeof e!="object"||!e.component)return"";let{component:t,props:i={},children:r,content:n}=e,s=r===void 0?n:r,a=Array.isArray(s)?V1(s):s===void 0?"":T4(String(s)),l=String(t).toLowerCase();if(!Kf.has(l))return Rn(`tag:${l}`,`<${l}> is not allowed in tooltip content and was dropped. Allowed tags: ${[...Kf].join(", ")}.`),a;let o=Object.entries(i).filter(([u])=>qf.has(u)?!0:(Rn(`prop:${u}`,`"${u}" is not an allowed tooltip content prop and was dropped. Allowed props: ${[...qf].join(", ")}.`),!1)).map(([u,d])=>[u,Hw(u,String(d))]).filter(([,u])=>u!=="").map(([u,d])=>`${u}="${Mw(d)}"`).join(" "),c=`<${l}${o?` ${o}`:""}>`;return Aw.has(l)?c:`${c}${a}</${l}>`},N0=e=>e?typeof e=="string"?T4(e):Array.isArray(e)?V1(e):"":"",Ow=Gc({default:()=>c9,dismissAllTooltips:()=>_9}),Rh=e=>e.status??e.flavor??"default",Ih=e=>e.chipClass??e.classExtra,Nr=new Set,Rw=0,Iw=()=>`nb-tooltip-${++Rw}`,Dw=900,H4=4e3,Vw=500,N4=0,Z1=(e,t)=>{if(!e)return!1;let i=Date.now()-e;return i>=0&&i<t},Xf=!1,Zw=()=>{if(Xf||typeof document>"u")return;Xf=!0;let e=t=>{if(Nr.size===0)return;let i=t==null?void 0:t.target;i instanceof Element&&i.closest(".nb-tooltip")||p9("dismiss")};document.addEventListener("pointerdown",()=>{N4=Date.now()},!0),document.addEventListener("dragstart",()=>e(),!0),document.addEventListener("keydown",t=>{t.key==="Escape"&&e()},!0),document.addEventListener("pointerdown",e,!0),window.addEventListener("blur",e),document.addEventListener("mouseleave",e)},Jf=200,Qf=1e3,Bw=2,Fw=e=>{let t=e.tooltipElement;if(!t)return!1;if(t.__hovered__)return!0;try{return t.isConnected&&t.matches(":hover")}catch{return!1}},zw=e=>{if(!e.isConnected)return!1;if(Fw(e)||e.__trigger__==="focus"&&e.contains(document.activeElement)||e.__trigger__==="touch"&&Z1(e.__lastTouchAt__,H4))return!0;try{return e.matches(":hover")}catch{return!0}},B1=e=>{clearTimeout(e.__watchdogTimer__),e.__watchdogTimer__=void 0,e.__watchdogMisses__=0},Uw=e=>{B1(e);let t=()=>{var i;if(!((i=e.__chips__)!=null&&i.size)){B1(e);return}if(zw(e))e.__watchdogMisses__=0;else{if(e.__watchdogMisses__=(e.__watchdogMisses__??0)+1,!e.isConnected){Os(e,!0,"program");return}if(e.__watchdogMisses__>=Bw){Zh(e,"dismiss");return}}e.__watchdogTimer__=setTimeout(t,Qf)};e.__watchdogTimer__=setTimeout(t,Qf)},Pr=new Set,$n=null,P4=e=>`${Math.round(e.top)}:${Math.round(e.left)}:${Math.round(e.width)}:${Math.round(e.height)}`,Ww=e=>{if(typeof getComputedStyle!="function")return!1;let t;try{t=getComputedStyle(e)}catch{return!1}let i=`${t.overflow} ${t.overflowX} ${t.overflowY}`;return/hidden|scroll|auto|clip|overlay/.test(i)},jw=e=>{let t=[],i=e.parentElement;for(;i&&i!==document.body&&i!==document.documentElement;)Ww(i)&&t.push(i),i=i.parentElement;return t},F1=e=>!(e.width===0&&e.height===0&&e.top===0&&e.left===0),Kw=(e,t)=>{if(!e.isConnected)return!1;if(!F1(t))return!0;if(t.width===0||t.height===0||!(t.bottom>0&&t.right>0&&t.top<window.innerHeight&&t.left<window.innerWidth))return!1;for(let i of e.__clippers__??[]){if(!i.isConnected)continue;let r=i.getBoundingClientRect();if(F1(r)&&(t.bottom<=r.top||t.top>=r.bottom||t.right<=r.left||t.left>=r.right))return!1}return!0},O4=e=>{var r;let t=e.tooltipElement;if(!t||!((r=e.__chips__)!=null&&r.size)){Pr.delete(e);return}let i=e.getBoundingClientRect();if(!Kw(e,i)){e.__offscreenReported__||(e.__offscreenReported__=!0,Zh(e,"dismiss"));return}e.__offscreenReported__=!1,e.__lastRect__=P4(i),e.__side__!=="cursor"&&Zo(e,t,e.__requestedSide__??e.__side__)},sc=()=>{I4();for(let e of Array.from(Pr))O4(e)},qw=100,Gw=320,e6=0,R4=0,I4=()=>{R4=Date.now()+Gw},z1=()=>{if(Pr.size===0){$n=null;return}let e=Date.now();if(e>=R4&&e-e6<qw){$n=requestAnimationFrame(z1);return}e6=e;for(let t of Array.from(Pr)){if(!t.tooltipElement){Pr.delete(t);continue}P4(t.getBoundingClientRect())!==t.__lastRect__&&(I4(),O4(t))}$n=requestAnimationFrame(z1)},ac=!1,Yw=e=>{Pr.add(e),e.__lastRect__=void 0,e.__clippers__=jw(e),!(typeof window>"u")&&(ac||(ac=!0,document.addEventListener("scroll",sc,{capture:!0,passive:!0}),window.addEventListener("resize",sc,{passive:!0})),$n===null&&typeof requestAnimationFrame=="function"&&($n=requestAnimationFrame(z1)))},Dh=e=>{Pr.delete(e),e.__lastRect__=void 0,e.__clippers__=void 0,!(Pr.size>0||typeof window>"u")&&(ac&&(ac=!1,document.removeEventListener("scroll",sc,{capture:!0}),window.removeEventListener("resize",sc)),$n!==null&&typeof cancelAnimationFrame=="function"&&(cancelAnimationFrame($n),$n=null))},Xw=(e,t,i)=>{var r;if((r=e.__chips__)==null||r.delete(t),clearTimeout(t.__removeTimer__),t.__removeTimer__=void 0,i||Oh()){t.remove();return}t.style.animation=`tooltipDisappear ${Jf}ms ease-in-out forwards`,t.__removeTimer__=setTimeout(()=>{t.__removeTimer__=void 0,t.remove()},Jf)},D4=(e,t)=>{if(Dh(e),e.__trigger__=void 0,e.__side__=void 0,e.__chips__)for(let i of Array.from(e.__chips__))Xw(e,i,t);e.tooltipElement=void 0,e.__lastContent__=void 0,B1(e)},V4="a[href], button, input, select, textarea, summary, [tabindex]",U1="data-nb-tooltip-anchor",t6=(e,t)=>{let i=t.target;if(!(i instanceof Element)||i===e)return!0;let r=i.closest(`[${U1}]`);return r===null||r===e},Jw='button, a[href], [role="button"], [role="tab"], [role="menuitem"], input, select, textarea, label',Qw=e=>{let t=e.closest(Jw);return!t||t.disabled===!0?!1:t.getAttribute("aria-disabled")!=="true"},Ql=e=>{if(!e)return"";if(typeof e=="string")return e.replace(/<[^>]*>/g," ").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#039;/g,"'").replace(/\s+/g," ").trim();if(Array.isArray(e))return e.map(t=>Ql(t)).filter(Boolean).join(" ");if(typeof e=="object"){let t=e;return Ql(t.children??t.content)}return""},Z4=e=>[Ql(e.header),Ql(e.body),Ql(e.tip)].filter(Boolean).join(". "),e9=e=>{if(e.hasAttribute("aria-labelledby")||e.hasAttribute("aria-label")&&!e.__ownsAriaLabel__||e.hasAttribute("title")||(e.textContent??"").trim().length>0)return!0;let t=e.querySelector("img[alt]");return!!t&&(t.getAttribute("alt")??"").trim().length>0},B4=(e,t)=>{let i=t.aria??"auto";return i==="auto"?e9(e)?"description":"label":i},t9=(e,t)=>{if(!t||B4(e,t)!=="label"){e.__ownsAriaLabel__&&(e.__ownsAriaLabel__=(e.removeAttribute("aria-label"),!1)),e.__ownsRole__&&(e.__ownsRole__=(e.removeAttribute("role"),!1));return}let i=Z4(t);i&&(e.setAttribute("aria-label",i),e.__ownsAriaLabel__=!0,!e.__ownsRole__&&!e.hasAttribute("role")&&!e.matches(V4)&&(e.setAttribute("role","img"),e.__ownsRole__=!0))},Ou=(e,t)=>{let i=!!(t!=null&&t.focusable);if(i&&!e.__ownsTabIndex__){if(e.matches(V4)||e.hasAttribute("tabindex"))return;e.setAttribute("tabindex","0"),e.__ownsTabIndex__=!0;return}!i&&e.__ownsTabIndex__&&(e.removeAttribute("tabindex"),e.__ownsTabIndex__=!1)},i9=(e,t)=>{e.__prevDescribedBy__=e.getAttribute("aria-describedby");let i=[e.__prevDescribedBy__,t].filter(Boolean).join(" ");e.setAttribute("aria-describedby",i)},r9=e=>{e.__prevDescribedBy__!==void 0&&(e.__prevDescribedBy__?e.setAttribute("aria-describedby",e.__prevDescribedBy__):e.removeAttribute("aria-describedby"),e.__prevDescribedBy__=void 0)},n9="nb-tooltip-description",F4=e=>!!e&&!!(e.body||e.header||e.tip),s9=(e,t)=>{if(typeof document>"u")return;let i=t&&F4(t)&&B4(e,t)==="description"?Z4(t):"";if(!i){z4(e);return}let r=e.__descNode__;r||(r=document.createElement("span"),r.className=n9,r.id=Iw(),r.setAttribute("role","tooltip"),document.body.appendChild(r),e.__descNode__=r,i9(e,r.id)),e.__descText__!==i&&(r.textContent=i,e.__descText__=i)},z4=e=>{e.__descNode__&&(r9(e),e.__descNode__.remove(),e.__descNode__=void 0,e.__descText__=void 0)},a9=(e,t)=>{if(F4(t)){e.__prevTitle__===void 0&&e.hasAttribute("title")&&(e.__prevTitle__=e.getAttribute("title")??"",e.removeAttribute("title"));return}U4(e)},U4=e=>{e.__prevTitle__!==void 0&&(e.hasAttribute("title")||e.setAttribute("title",e.__prevTitle__),e.__prevTitle__=void 0)},Ru=(e,t)=>{a9(e,t),t9(e,t),s9(e,t)},l9=e=>{var t,i;return e.disabled===!0?!0:!!((t=e.closest)!=null&&t.call(e,"fieldset[disabled]"))&&!((i=e.closest)!=null&&i.call(e,"fieldset[disabled] > legend:first-of-type"))},o9=(e,t,i)=>t>=e.left&&t<=e.right&&i>=e.top&&i<=e.bottom,W4=e=>{let t=e.__proxyHost__;t&&(e.__proxyMove__&&t.removeEventListener("mousemove",e.__proxyMove__),e.__proxyLeave__&&t.removeEventListener("mouseleave",e.__proxyLeave__),e.__proxyHost__=void 0,e.__proxyMove__=void 0,e.__proxyLeave__=void 0,e.__proxyInside__=!1)},i6=e=>{let t=e.__tooltipBinding__&&l9(e)?e.parentElement:null;e.__proxyHost__!==t&&(W4(e),t&&(e.__proxyMove__=i=>{var s,a,l;let r=i;if(r.buttons)return;let n=e.getBoundingClientRect();if(F1(n)?o9(n,r.clientX,r.clientY):i.target===e||e.contains(i.target)){e.__mouseX__=r.clientX,e.__mouseY__=r.clientY,e.__proxyInside__?(s=e.__tooltipBinding__)!=null&&s.followCursor&&Zo(e,e.tooltipElement,e.__requestedSide__):(e.__proxyInside__=!0,(a=e.__showTooltip__)==null||a.call(e,"pointer"));return}e.__proxyInside__&&(e.__proxyInside__=!1,(l=e.__hideTooltip__)==null||l.call(e,void 0,"pointer"))},e.__proxyLeave__=()=>{var i;e.__proxyInside__&&(e.__proxyInside__=!1,(i=e.__hideTooltip__)==null||i.call(e,void 0,"pointer"))},t.addEventListener("mousemove",e.__proxyMove__),t.addEventListener("mouseleave",e.__proxyLeave__),e.__proxyHost__=t))},r6=e=>{e.onOpenChange||Rn("controlled-no-handler","a tooltip was given `open` but no `onOpenChange`, so nothing the user does (hover, blur, Escape) can change it. Either handle `onOpenChange` or drop `open` and let the directive own visibility.")},n6=(e,t)=>{var r,n;if(!t)return;let i=t.open===void 0?e.__openState__===void 0&&t.defaultOpen?!0:void 0:t.open;i!==void 0&&i!==(e.__openState__===!0||!!e.__showTimer__)&&(i?(r=e.__showTooltip__)==null||r.call(e,"program"):(n=e.__hideTooltip__)==null||n.call(e,0,"program"))},c9=e=>{Zw();let t=e.config.globalProperties.$router;t&&t.beforeEach(()=>{Nr.forEach(i=>{var r;return(r=i==null?void 0:i.__hideTooltip__)==null?void 0:r.call(i,0,"program")}),Nr.clear()}),e.directive("nb-tooltip",{mounted(i,r){i.__showTooltip__=(n="pointer")=>{var a;let s=i.__tooltipBinding__;if(s){if(s.open!==void 0&&n!=="program"){r6(s),(a=s.onOpenChange)==null||a.call(s,!0,n);return}clearTimeout(i.__hideTimer__),i.__hideTimer__=void 0,u9(i,s,n)}},i.__hideTooltip__=(n=(a=>(a=i.__tooltipBinding__)==null?void 0:a.hideDelay)()??150,s="dismiss")=>{var o;let l=i.__tooltipBinding__;if((l==null?void 0:l.open)!==void 0&&s!=="program"){r6(l),(o=l.onOpenChange)==null||o.call(l,!1,s);return}if(clearTimeout(i.__hideTimer__),n<=0){i.__hideTimer__=void 0,Os(i,!0,s);return}i.__hideTimer__=setTimeout(()=>{i.__hideTimer__=void 0,Os(i,n<=0,s)},n)},i.__mouseMove__=n=>{var s,a;i.__mouseX__=n.clientX,i.__mouseY__=n.clientY,(s=i.__tooltipBinding__)!=null&&s.followCursor&&Zo(i,i.tooltipElement,(a=i.__tooltipBinding__)==null?void 0:a.position)},i.__tooltipBinding__=r.value,i.__showHandler__=n=>{var a;if(Z1(i.__lastTouchAt__,Dw))return;let s=n;s.buttons||(typeof s.clientX=="number"&&(s.clientX||s.clientY)&&(i.__mouseX__=s.clientX,i.__mouseY__=s.clientY),(a=i.__showTooltip__)==null||a.call(i,"pointer"))},i.__hideHandler__=()=>{var n;return(n=i.__hideTooltip__)==null?void 0:n.call(i,void 0,"pointer")},i.__focusHandler__=n=>{var s;Z1(N4,Vw)||t6(i,n)&&((s=i.__showTooltip__)==null||s.call(i,"focus"))},i.__blurHandler__=()=>{var n;return(n=i.__hideTooltip__)==null?void 0:n.call(i,void 0,"focus")},i.__touchHandler__=n=>{var s,a,l;((s=i.__tooltipBinding__)==null?void 0:s.touch)!==!1&&t6(i,n)&&(i.__lastTouchAt__=Date.now(),!Qw(i)&&((a=i.__showTooltip__)==null||a.call(i,"touch"),(l=i.__hideTooltip__)==null||l.call(i,H4,"touch")))},Ou(i,r.value),Ru(i,r.value),i.setAttribute(U1,""),i.addEventListener("mouseenter",i.__showHandler__),i.addEventListener("mouseleave",i.__hideHandler__),i.addEventListener("mousemove",i.__mouseMove__),i.addEventListener("focusin",i.__focusHandler__),i.addEventListener("focusout",i.__blurHandler__),i.addEventListener("touchstart",i.__touchHandler__,{passive:!0}),i6(i),n6(i,r.value)},updated(i,r){let n=i.__tooltipBinding__;if(i.__tooltipBinding__=r.value,!r.value){Ru(i,void 0),Ou(i,void 0),Os(i,!0);return}if(n!==r.value&&(Ru(i,r.value),Ou(i,r.value)),i6(i),n6(i,r.value),!i.tooltipElement||n===r.value)return;let s=K4(r.value);s!==i.__lastContent__&&(i.__lastContent__=s,d9(i,r.value))},unmounted(i){clearTimeout(i.__showTimer__),i.__showTimer__=void 0,clearTimeout(i.__hideTimer__),i.__hideTimer__=void 0,Os(i,!0),Nr.delete(i),i.__showHandler__&&i.removeEventListener("mouseenter",i.__showHandler__),i.__hideHandler__&&i.removeEventListener("mouseleave",i.__hideHandler__),i.__focusHandler__&&i.removeEventListener("focusin",i.__focusHandler__),i.__blurHandler__&&i.removeEventListener("focusout",i.__blurHandler__),i.__touchHandler__&&i.removeEventListener("touchstart",i.__touchHandler__),z4(i),U4(i),i.__ownsAriaLabel__&&(i.__ownsAriaLabel__=(i.removeAttribute("aria-label"),!1)),i.__ownsTabIndex__&&(i.__ownsTabIndex__=(i.removeAttribute("tabindex"),!1)),i.__ownsRole__&&(i.__ownsRole__=(i.removeAttribute("role"),!1)),i.removeAttribute(U1),W4(i),i.__mouseMove__&&i.removeEventListener("mousemove",i.__mouseMove__),Dh(i)}})},Vh=({header:e="",body:t="",tip:i=""})=>`<div class="nb-tooltip-content"><div class="nb-tooltip-header">${N0(e)}</div><div class="nb-tooltip-body">${N0(t)}</div><div class="nb-tooltip-tip">${N0(i)}</div></div>`,j4=(e,t,i)=>["nb-tooltip",`nb-tooltip-${e}`,t?`nb-tooltip-flavor-${t}`:"",i||""].filter(Boolean).join(" "),K4=e=>`${e.position??""}|${Rh(e)}|${Ih(e)??""}|${Vh(e)}`,u9=(e,t,i="pointer")=>{let{header:r,body:n,tip:s,delay:a=400,animationTime:l=300,position:o,overflowOnly:c}=t,u=Rh(t),d=Ih(t);if(clearTimeout(e.__showTimer__),e.__showTimer__=void 0,D4(e,!0),c){let v=e.getBoundingClientRect();if(!(Math.round(v.width)<Math.round(e.scrollWidth)))return}if(!(n||r||s))return;let h=i==="pointer"?a:0,f=Oh();e.__showTimer__=setTimeout(()=>{var _;if(e.__showTimer__=void 0,!e.isConnected)return;let v=i==="pointer"?o??"cursor":o&&o!=="cursor"?o:"top";for(let w of Array.from(Pr))w!==e&&Zh(w,"superseded");let p=document.createElement("span");p.className=j4(v,u,d),p.innerHTML=Vh({header:r,body:n,tip:s}),p.addEventListener("mouseenter",()=>{p.__hovered__=!0,clearTimeout(e.__hideTimer__),e.__hideTimer__=void 0,e.__watchdogMisses__=0}),p.addEventListener("mouseleave",()=>{var w;p.__hovered__=!1,(w=e.__hideTooltip__)==null||w.call(e)}),f?p.style.opacity="1":(p.style.transition=`opacity ${l}ms ease-in-out`,p.style.animation=`tooltipAppear ${l}ms ease-in-out forwards`),p.setAttribute("aria-hidden","true"),e.__trigger__=i,e.tooltipElement=p,(e.__chips__??(e.__chips__=new Set)).add(p),e.__lastContent__=K4(t),Nr.add(e),document.body.appendChild(p),e.__requestedSide__=v,e.__side__=v,Zo(e,p,v),Yw(e),Uw(e);let S=e.__openState__===!0;e.__openState__=!0,S||((_=t.onOpenChange)==null||_.call(t,!0,i))},h)},Zh=(e,t,i=!0)=>{if(e.__hideTooltip__){e.__hideTooltip__(i?0:void 0,t);return}Os(e,i,t)},Os=(e,t=!1,i="dismiss")=>{var n,s;clearTimeout(e.__showTimer__),e.__showTimer__=void 0;let r=e.__openState__===!0;D4(e,t),Nr.delete(e),e.__requestedSide__=void 0,r&&(e.__openState__=!1,(s=(n=e.__tooltipBinding__)==null?void 0:n.onOpenChange)==null||s.call(n,!1,i))},d9=(e,t)=>{let{header:i,body:r,tip:n,position:s}=t,a=Rh(t),l=Ih(t),o=e.__requestedSide__??e.__side__??s,c=e.tooltipElement;c&&(c.innerHTML=Vh({header:i,body:r,tip:n}),c.className=j4(e.__side__??o??"cursor",a,l),Zo(e,c,o))};function h9(e,t,i,r,n,s,a){switch(e){case"top":return{top:t.top-(r+n*2),left:t.left+t.width/2-(i/2+n/2)};case"bottom":return{top:t.bottom+n,left:t.left+t.width/2-(i/2+n/2)};case"left":return{top:t.top+t.height/2-r/2,left:t.left-(i+n*2)};case"right":return{top:t.top+t.height/2-r/2,left:t.right+n};default:return{top:a+s6,left:s+s6}}}var s6=14;function a6(e,t,i,r,n){return t>=n&&e>=n&&t+i<=window.innerWidth-n&&e+r<=window.innerHeight-n}var f9={top:["bottom","right","left"],bottom:["top","right","left"],left:["right","top","bottom"],right:["left","top","bottom"],cursor:[]},Zo=(e,t,i)=>{if(!t)return;let r=e.getBoundingClientRect(),n=t.getBoundingClientRect(),s=n.width||0,a=n.height||0,l=e.__mouseX__??0,o=e.__mouseY__??0,c=i??"cursor",u=p=>h9(p,r,s,a,4,l,o),d=u(c),h=c;if(s>0&&a>0&&!a6(d.top,d.left,s,a,16))for(let p of f9[c]){let S=u(p);if(a6(S.top,S.left,s,a,16)){d=S,h=p;break}}let{top:f,left:v}=d;if(s>0&&a>0){let p=window.innerWidth-s-16,S=window.innerHeight-a-16;v>p&&(v=p),v<16&&(v=16),f>S&&(f=S),f<16&&(f=16)}if(h!=="cursor"){for(let p of["top","bottom","left","right"])t.classList.remove(`nb-tooltip-${p}`);t.classList.add(`nb-tooltip-${h}`)}if(e.__side__=h,s>0&&a>0&&h!=="cursor"){let p=r.left+r.width/2,S=r.top+r.height/2;if(h==="top"||h==="bottom"){let _=Math.max(8,Math.min(s-8,p-v))/s*100;t.style.setProperty("--nb-tooltip-arrow-offset",`${_}%`)}else{let _=Math.max(8,Math.min(a-8,S-f))/a*100;t.style.setProperty("--nb-tooltip-arrow-offset",`${_}%`)}}t.style.top=`${f}px`,t.style.left=`${v}px`};function p9(e){var i;for(let r of Array.from(Nr))(i=r.__hideTooltip__)==null||i.call(r,0,e);let t=new Set;for(let r of Array.from(Nr))for(let n of r.__chips__??[])t.add(n);document.querySelectorAll("span.nb-tooltip").forEach(r=>{t.has(r)||r.remove()})}function _9(){var e;for(let t of Array.from(Nr))(e=t.__hideTooltip__)==null||e.call(t,0,"program");Nr.clear();for(let t of Array.from(Pr))Dh(t);document.querySelectorAll("span.nb-tooltip").forEach(t=>t.remove())}var m9=Gc({default:()=>v9});function l6(e,t){let i=t.value;if(i==null||i===""){e.removeAttribute(D1);return}e.setAttribute(D1,String(i))}var v9=e=>{e.directive("nb-tour-step",{mounted:l6,updated:l6,unmounted(t){t.removeAttribute(D1)}})},g9=Object.assign({"./ContextMenu.directive.ts":Sw,"./ToolTip.content.ts":kw,"./ToolTip.directive.ts":Ow,"./TourStep.directive.ts":m9}),b9={install(e){Object.values(g9).forEach(t=>{typeof t.default=="function"&&t.default(e)})}},y9={install(e){let t=ww();e.provide(yw,t)}},w9={install(e,t={}){if(t.components)for(let[i,r]of Object.entries(t.components))e.component(i,r);e.use(b9),e.use(y9)}},q4=new Map;function S9(e){if(typeof e=="object"&&e&&!("render"in e)&&!("setup"in e)&&!("template"in e)){let t=e;if("thin"in t||"light"in t||"regular"in t||"bold"in t||"fill"in t||"duotone"in t)return t}return{regular:e}}function C9(e){for(let[t,i]of Object.entries(e))q4.set(t,S9(i))}function k9(e,t="regular"){let i=q4.get(e);if(i){if(i[t])return i[t];if(i.regular)return i.regular;for(let r of["bold","fill","duotone","light","thin"])if(i[r])return i[r]}}var A9=e=>Symbol.for(`@nubisco/ui:${e}-catalog`);function M9(e){return globalThis[A9(e)]}var o6=new Map;function E9(e,t,i="regular"){let r=M9(e);if(!r){let o="Icon",c=`${e}s`;throw Error(`[@nubisco/ui] <Nb${o}> was given the runtime-resolved name "${t}", but the ${e} catalogue is not loaded. The name may also have been forwarded from another component's \`${e}\` prop. Three ways out, cheapest first: pass a literal name so the bundler plugin links just that ${e}; register the set the value can actually take with register${o}s() and pay for only those; or, if the value is genuinely open-ended (a picker, a CMS field), import '@nubisco/ui/${c}/all' in the file that needs the whole set.`)}let n=r[t];if(!n)return;let s=`${e}:${t}:${i}`,a=o6.get(s);if(a)return a;let l=P5(async()=>{let o=await n();return o[i]??o.regular??o.default});return o6.set(s,l),l}function L9(e,t="regular"){let i=e;return i&&typeof i=="object"&&("regular"in i||t in i)?i[t]??i.regular??i.default:e}function $9(e){var i;if(!e)return;let t=e;if(typeof t.glyphName=="string")return t.glyphName;if(typeof((i=t.regular)==null?void 0:i.glyphName)=="string")return t.regular.glyphName}var G4=function(e){return e.ExtraExtraSmall="xxs",e.ExtraSmall="xs",e.Small="sm",e.Medium="md",e.Large="lg",e.ExtraLarge="xl",e.ExtraExtraLarge="xxl",e}({}),x9=function(e){return e.Small="sm",e.Medium="md",e.Large="lg",e}({});function c6(e){return e.replace(new RegExp("(?<=[A-Z0-9])([A-Z])(?=[a-z])","g")," $1").replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()}function Bh(e){var i,r;if(e.id)return e.id;let t=c6(((r=(i=wi())==null?void 0:i.type)==null?void 0:r.__name)??"component");return typeof e.name=="string"&&e.name?`${t}-${c6(e.name)}`:`${t}-${Pi()}`}var Y4=function(e){return e.Hover="hover",e.Always="always",e}(Y4||{}),X4=function(e){return e.Thin="thin",e.Light="light",e.Regular="regular",e.Bold="bold",e.Fill="fill",e.Duotone="duotone",e}(X4||{}),W1=function(e){return e[e.XXL=92]="XXL",e[e.XL=60]="XL",e[e.LG=20]="LG",e[e.MD=16]="MD",e[e.SM=14]="SM",e[e.XS=12]="XS",e[e.XXS=8]="XXS",e}(W1||{}),T9=["title"],Ue=nt(Re({__name:"Icon",props:{name:{default:void 0},icon:{default:void 0},size:{default:G4.Medium},animation:{default:null},animationMode:{default:Y4.Always},color:{default:void 0},weight:{default:X4.Regular},title:{default:void 0},clickable:{type:Boolean,default:!1},hoverable:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){let i=e,r=t,n=j(()=>i.icon??i.name),s=j(()=>typeof n.value=="string"?n.value:$9(n.value)),a=j(()=>typeof n.value=="string"?void 0:n.value),l=Bh({name:s.value}),o=j(()=>{let h=typeof i.size=="number"?i.size:W1[String(i.size).toUpperCase()]||W1.MD;return{id:l,...i.size&&{width:`${h}px`,height:`${h}px`},...i.clickable&&{role:"button"}}}),c=j(()=>{let h=a.value;if(h)return L9(h,i.weight);let f=typeof n.value=="string"?n.value:void 0;return f?k9(f,i.weight)||E9("icon",f,i.weight):void 0}),u=j(()=>({"nb-icon":!0,...s.value&&{[s.value]:!0},[`nb-icon-${i.size}`]:["xxs","xs","sm","md","lg","xl","xxl"].includes(String(i.size)),[`nb-icon-animation-${i.animationMode}-${i.animation}`]:i.animation,hoverable:i.hoverable||i.animation&&i.animationMode==="hover","box-clickable":i.clickable})),d=j(()=>({...i.color&&{color:i.color},...typeof i.size=="number"&&{maxWidth:`${i.size}px`,maxHeight:`${i.size}px`,height:`${i.size}px`,width:`${i.size}px`},...typeof i.size=="string"&&!["xxs","xs","sm","md","lg","xl","xxl"].includes(i.size)&&{maxWidth:i.size,maxHeight:i.size,height:i.size,width:i.size}}));return(h,f)=>(m(),M("i",Wt({class:u.value,style:d.value},o.value,{title:e.title,onClick:f[0]||(f[0]=v=>e.clickable?r("click",v):void 0)}),[c.value?(m(),me(Do(c.value),{key:0,"aria-hidden":"true"})):z("",!0)],16,T9))}}),[["__scopeId","data-v-034072e6"]]),J4="data-nb-layer",j1=Symbol("nb-layer");function lc(e){if(!Number.isFinite(e))return 0;let t=Math.round(e);return t<0?0:t>3?3:t}function K1(e){return`nb-layer-${e}`}function H9(e){let t=null,i=n=>{let s=/^nb-layer-([0-3])$/.exec(n.trim());if(!s)return;let a=Number(s[1]);(t===null||a>t)&&(t=a)},r=n=>{if(typeof n=="string"){for(let s of n.split(/\s+/))i(s);return}if(Array.isArray(n)){for(let s of n)r(s);return}if(n&&typeof n=="object")for(let[s,a]of Object.entries(n))a&&i(s)};return r(e),t}function N9(e){let t=(e==null?void 0:e.parentElement)??null;for(;t;){if(t.hasAttribute("data-nb-layer-context")){t=t.parentElement;continue}let i=t.getAttribute(J4);if(i!==null){let n=Number(i);if(Number.isFinite(n))return{level:lc(n+1),source:"surface"}}let r=t.classList;if(r){for(let n=3;n>=0;n--)if(r.contains(K1(n)))return{level:n,source:"class"}}t=t.parentElement}return null}function P9(e){if(!e)return null;if(e instanceof Element)return e;let t=e.$el;return t instanceof Element?t:null}function js(e={}){let t=wi(),i=Mt(j1,null),r=e.el??q(null),n=q(null),s=e.probe??!e.overlay,a=j(()=>{var c;let o=l5(e.level);return o===void 0?H9((c=t==null?void 0:t.attrs)==null?void 0:c.class):lc(o)}),l=j(()=>{let o=a.value;if(o!==null)return o;if(e.overlay)return 3;let c=n.value;return c&&c.source==="class"?c.level:i?i.value:c?c.level:1});return s&&lt(()=>{n.value=N9(P9(r.value)??((t==null?void 0:t.vnode.el)instanceof Element?t.vnode.el:null))}),e.provideContext!==!1&&Ji(j1,j(()=>lc(l.value+1))),{level:l,layerClass:j(()=>K1(l.value)),layerProps:j(()=>({class:K1(l.value),[J4]:String(l.value)})),surfaceRef:r}}var O9="(max-width: 671.98px), (pointer: coarse) and (hover: none) and (max-height: 500px)",R9="(max-width: 671.98px) and (pointer: coarse), (pointer: coarse) and (hover: none) and (max-height: 500px)",As=null;function u6(e,t){let i=window.matchMedia(e);t.value=i.matches;let r=n=>{t.value=n.matches};typeof i.addEventListener=="function"?i.addEventListener("change",r):typeof i.addListener=="function"&&i.addListener(r)}function Bo(){return As||(As={phone:q(!1),phoneTouch:q(!1)},typeof window<"u"&&typeof window.matchMedia=="function"&&(u6(O9,As.phone),u6(R9,As.phoneTouch))),{phone:Hn(As.phone),phoneTouch:Hn(As.phoneTouch)}}const na=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},I9=na("info","0 0 256 256",'<path d="M140,176a4,4,0,0,1-4,4,12,12,0,0,1-12-12V128a4,4,0,0,0-4-4,4,4,0,0,1,0-8,12,12,0,0,1,12,12v40a4,4,0,0,0,4,4A4,4,0,0,1,140,176ZM124,92a8,8,0,1,0-8-8A8,8,0,0,0,124,92Zm104,36A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"/>'),D9=na("info","0 0 256 256",'<path d="M142,176a6,6,0,0,1-6,6,14,14,0,0,1-14-14V128a2,2,0,0,0-2-2,6,6,0,0,1,0-12,14,14,0,0,1,14,14v40a2,2,0,0,0,2,2A6,6,0,0,1,142,176ZM124,94a10,10,0,1,0-10-10A10,10,0,0,0,124,94Zm106,34A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"/>'),oc=na("info","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm16-40a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176ZM112,84a12,12,0,1,1,12,12A12,12,0,0,1,112,84Z"/>'),V9=na("info","0 0 256 256",'<path d="M108,84a16,16,0,1,1,16,16A16,16,0,0,1,108,84Zm128,44A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Zm-72,36.68V132a20,20,0,0,0-20-20,12,12,0,0,0-4,23.32V168a20,20,0,0,0,20,20,12,12,0,0,0,4-23.32Z"/>'),Z9=na("info","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-4,48a12,12,0,1,1-12,12A12,12,0,0,1,124,72Zm12,112a16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40a8,8,0,0,1,0,16Z"/>'),B9=na("info","0 0 256 256",'<path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"/><path d="M144,176a8,8,0,0,1-8,8,16,16,0,0,1-16-16V128a8,8,0,0,1,0-16,16,16,0,0,1,16,16v40A8,8,0,0,1,144,176Zm88-48A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128ZM124,96a12,12,0,1,0-12-12A12,12,0,0,0,124,96Z"/>'),F9="info",Q4=Object.freeze(Object.defineProperty({__proto__:null,bold:V9,default:oc,duotone:B9,fill:Z9,glyphName:F9,light:D9,regular:oc,thin:I9},Symbol.toStringTag,{value:"Module"})),z9=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},d6=z9("caret-down","0 0 256 256",'<path d="M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"/>');function ev(){let e=wi();return j(()=>{let t=e==null?void 0:e.appContext.components;return(t==null?void 0:t.RouterLink)??(t==null?void 0:t["router-link"])??null})}var tv=function(e){return e.Button="button",e.Submit="submit",e.Reset="reset",e}(tv||{}),U9={key:0,class:"nb-button__decorations"},W9={key:0,class:"nb-button__spinner","aria-hidden":"true"},h6=new Set;function j9(e){if(typeof e=="string")return e;if(e&&(typeof e=="object"||typeof e=="function")){let t=e;if(typeof t.glyphName=="string")return t.glyphName}return""}var oi=nt(Re({__name:"Button",props:{variant:{default:void 0},outlined:{type:Boolean,default:!1},size:{default:G4.Medium},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},icon:{default:void 0},type:{default:tv.Button},href:{default:void 0},target:{default:void 0},rel:{default:void 0},to:{default:void 0}},emits:["click"],setup(e){let t=e,i=Fr(),r=j(()=>!i.default&&!!(t.icon||t.loading)),n=ev(),s=j(()=>t.to!=null&&!!n.value),a=j(()=>{if(typeof t.to=="string")return t.to;if(t.href)return t.href}),l=j(()=>s.value?n.value:a.value?"a":"button"),o=j(()=>l.value==="a"?{href:a.value,target:t.target,rel:t.rel}:{}),c={xxs:10,xs:12,sm:12,md:14,lg:16,xl:16,xxl:20},u={xxs:12,xs:14,sm:16,md:18,lg:20,xl:20,xxl:26},d=j(()=>(r.value?u:c)[t.size??"md"]??(r.value?18:14)),h=wi();return lt(()=>{typeof process<"u"||r.value&&Kt(()=>{var p;let f=(p=h==null?void 0:h.proxy)==null?void 0:p.$el;if(!f||typeof f.getAttribute!="function"||["aria-label","aria-labelledby","title"].some(S=>(f.getAttribute(S)??"").trim().length>0)||(f.textContent??"").trim().length>0)return;let v=j9(t.icon);h6.has(v)||(h6.add(v),console.warn(`[NbButton] An icon-only button${v?` (icon "${v}")`:""} has no accessible name, so a screen reader announces it as "button". Add aria-label, or name it with v-nb-tooltip.`,f))})}),(f,v)=>(m(),me(Do(l.value),Wt({class:["nb-button",e.variant?`nb-button--${e.variant}`:null,`nb-button--${e.size}`,{"nb-button--outlined":e.outlined},{"nb-button--loading":e.loading},{"nb-button--icon-only":r.value}],to:s.value?e.to:void 0},o.value,{disabled:l.value==="button"?e.disabled||e.loading:void 0,"aria-disabled":l.value!=="button"&&(e.disabled||e.loading)?!0:void 0,type:l.value==="button"?e.type:void 0,onClick:v[0]||(v[0]=p=>e.disabled||e.loading?void 0:f.$emit("click",p))}),{default:te(()=>[He(f.$slots,"default",{},void 0,!0),e.loading||e.icon?(m(),M("div",U9,[e.loading?(m(),M("span",W9)):e.icon?(m(),me(Ue,{key:1,name:e.icon,size:d.value,class:"nb-button__icon"},null,8,["name","size"])):z("",!0)])):z("",!0)]),_:3},16,["class","to","disabled","aria-disabled","type"]))}}),[["__scopeId","data-v-a76fa2e8"]]);const sa=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},K9=sa("check","0 0 256 256",'<path d="M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"/>'),q9=sa("check","0 0 256 256",'<path d="M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"/>'),wo=sa("check","0 0 256 256",'<path d="M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"/>'),G9=sa("check","0 0 256 256",'<path d="M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"/>'),Y9=sa("check","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"/>'),X9=sa("check","0 0 256 256",'<path d="M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z" opacity="0.2"/><path d="M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"/>'),J9="check",In=Object.freeze(Object.defineProperty({__proto__:null,bold:G9,default:wo,duotone:X9,fill:Y9,glyphName:J9,light:q9,regular:wo,thin:K9},Symbol.toStringTag,{value:"Module"}));var Q9=["role","aria-disabled","aria-checked","onKeydown"],eS={key:1,class:"nb-menu-item__check-placeholder"},tS={class:"nb-menu-item__label"},iS={key:3,class:"nb-menu-item__shortcut"},rS=Re({__name:"MenuItem",props:{icon:{default:void 0},label:{},shortcut:{default:void 0},disabled:{type:Boolean,default:!1},danger:{type:Boolean,default:!1},selectable:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},radioGroup:{default:void 0}},emits:["select","highlight"],setup(e,{expose:t,emit:i}){let r=e,n=i,s=q(null),a=Mt("nb-menu",null),l=j(()=>r.radioGroup?"menuitemradio":r.selectable?"menuitemcheckbox":"menuitem"),o=j(()=>["nb-menu-item",{"nb-menu-item--disabled":r.disabled,"nb-menu-item--danger":r.danger,"nb-menu-item--selected":r.selected}]);function c(){r.disabled||(n("select"),a==null||a.close())}return lt(()=>{s.value&&a&&a.registerItem(s.value)}),mi(()=>{s.value&&a&&a.unregisterItem(s.value)}),t({el:s}),(u,d)=>(m(),M("li",{ref_key:"itemRef",ref:s,class:Le(o.value),role:l.value,"aria-disabled":e.disabled||void 0,"aria-checked":e.selectable||e.radioGroup?e.selected:void 0,tabindex:-1,onClick:c,onKeydown:[$i(Qe(c,["prevent"]),["enter"]),$i(Qe(c,["prevent"]),["space"])],onMouseenter:d[0]||(d[0]=h=>u.$emit("highlight"))},[e.selectable&&e.selected?(m(),me(Ue,{key:0,name:de(wo),size:16,class:"nb-menu-item__check"},null,8,["name"])):e.selectable?(m(),M("span",eS)):z("",!0),e.icon?(m(),me(Ue,{key:2,name:e.icon,size:16,class:"nb-menu-item__icon"},null,8,["name"])):z("",!0),b("span",tS,F(e.label),1),e.shortcut?(m(),M("kbd",iS,F(e.shortcut),1)):z("",!0),He(u.$slots,"trailing")],42,Q9))}});function Fh(e){return e.some(t=>t.type===Qt?!1:t.type===Vn?typeof t.children=="string"&&t.children.trim().length>0:t.type===ke?Array.isArray(t.children)?Fh(t.children):!1:!0)}function iv(e,t){var r;let i=(r=e[t])==null?void 0:r.call(e);return i?Fh(i):!1}const aa=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},nS=aa("arrow-up","0 0 256 256",'<path d="M202.83,114.83a4,4,0,0,1-5.66,0L132,49.66V216a4,4,0,0,1-8,0V49.66L58.83,114.83a4,4,0,0,1-5.66-5.66l72-72a4,4,0,0,1,5.66,0l72,72A4,4,0,0,1,202.83,114.83Z"/>'),sS=aa("arrow-up","0 0 256 256",'<path d="M204.24,116.24a6,6,0,0,1-8.48,0L134,54.49V216a6,6,0,0,1-12,0V54.49L60.24,116.24a6,6,0,0,1-8.48-8.48l72-72a6,6,0,0,1,8.48,0l72,72A6,6,0,0,1,204.24,116.24Z"/>'),f6=aa("arrow-up","0 0 256 256",'<path d="M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z"/>'),aS=aa("arrow-up","0 0 256 256",'<path d="M208.49,120.49a12,12,0,0,1-17,0L140,69V216a12,12,0,0,1-24,0V69L64.49,120.49a12,12,0,0,1-17-17l72-72a12,12,0,0,1,17,0l72,72A12,12,0,0,1,208.49,120.49Z"/>'),lS=aa("arrow-up","0 0 256 256",'<path d="M207.39,115.06A8,8,0,0,1,200,120H136v96a8,8,0,0,1-16,0V120H56a8,8,0,0,1-5.66-13.66l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,207.39,115.06Z"/>'),oS=aa("arrow-up","0 0 256 256",'<path d="M200,112H56l72-72Z" opacity="0.2"/><path d="M205.66,106.34l-72-72a8,8,0,0,0-11.32,0l-72,72A8,8,0,0,0,56,120h64v96a8,8,0,0,0,16,0V120h64a8,8,0,0,0,5.66-13.66ZM75.31,104,128,51.31,180.69,104Z"/>'),cS="arrow-up",uS=Object.freeze(Object.defineProperty({__proto__:null,bold:aS,default:f6,duotone:oS,fill:lS,glyphName:cS,light:sS,regular:f6,thin:nS},Symbol.toStringTag,{value:"Module"}));var or=Re({__name:"Grid",props:{id:{type:String,default:null},is:{type:String,default:"div"},dir:{type:[String,Object,Function],default:"row",validator:e=>typeof e=="function"?!0:typeof e=="string"?["row","col","row-reverse","col-reverse"].includes(e):Object.values(e).every(t=>["row","col","row-reverse","col-reverse"].includes(t))},align:{type:[String,Object,Function],default:null,validator:e=>e==null||typeof e=="function"?!0:typeof e=="string"?["start","end","center","baseline","stretch"].includes(e):Object.values(e).every(t=>["start","end","center","baseline","stretch"].includes(t))},justify:{type:[String,Object,Function],default:null,validator:e=>e==null||typeof e=="function"?!0:typeof e=="string"?["around","between","center","end","evenly","start"].includes(e):Object.values(e).every(t=>["around","between","center","end","evenly","start"].includes(t))},gap:{type:[String,Object,Function],default:null,validator:e=>{if(e==null||typeof e=="function")return!0;let t=["xxs","xs","sm","md","lg","xl","xxl"];return typeof e=="string"?t.includes(e):Object.values(e).every(i=>t.includes(i))}},grid:{type:[Number,String,Object,Function],default:null,validator:e=>{if(e==null||typeof e=="function")return!0;let t=i=>{let r=typeof i=="string"?parseInt(i,10):i;return r>=1&&r<=16&&!isNaN(r)};return typeof e=="number"||typeof e=="string"?t(e):Object.values(e).every(t)}},shift:{type:[Number,String,Object,Function],default:null,validator:e=>{if(e==null||typeof e=="function")return!0;let t=i=>{let r=typeof i=="string"?parseInt(i,10):i;return r>=0&&r<=15&&!isNaN(r)};return typeof e=="number"||typeof e=="string"?t(e):Object.values(e).every(t)}},wrap:{type:[String,Object,Function],default:null,validator:e=>e==null||typeof e=="function"?!0:typeof e=="string"?["nowrap","wrap","reverse"].includes(e):Object.values(e).every(t=>["nowrap","wrap","reverse"].includes(t))},first:{type:[Boolean,Array],default:null,validator:e=>{if(e==null||typeof e=="boolean")return!0;let t=["sm","md","lg","xl","xxl"];return e.every(i=>t.includes(i))}},last:{type:[Boolean,Array],default:null,validator:e=>{if(e==null||typeof e=="boolean")return!0;let t=["sm","md","lg","xl","xxl"];return e.every(i=>t.includes(i))}},visible:{type:[Boolean,Object,Function],default:null},reverse:{type:[Boolean,Array],default:!1,validator:e=>{if(e==null||typeof e=="boolean")return!0;let t=["sm","md","lg","xl","xxl"];return e.every(i=>t.includes(i))}},grow:{type:Boolean,default:null},flex:{type:Boolean,default:null},shrink:{type:Boolean,default:null},distributed:{type:Boolean,default:!1},mode:{type:String,default:"wide",validator:e=>["wide","narrow","condensed"].includes(e)},tabIndex:{type:String,default:null}},setup(e,{expose:t}){let i=["a","button","input","textarea","select","details","iframe","object","embed","area","audio","video"],r=q();t({getRef:()=>r.value});let n=e,s=C=>C.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function a(C,g){let{collection:E,breakpoint:T}=g,L=T?`${T}-`:"";E[`${L}${C}`]=!0}function l(C,g){let{collection:E,breakpoint:T,classMap:L}=g,V=T?`${T}-`:"",P=(L==null?void 0:L[C])??C;E[`${V}align-${P}`]=!0}function o(C,g){let{collection:E,breakpoint:T,classMap:L}=g,V=T?`${T}-`:"",P=(L==null?void 0:L[C])??C;E[`${V}justify-${P}`]=!0}function c(C,g){let{collection:E,breakpoint:T}=g,L=T?`${T}-`:"";E[`${L}gap-${C}`]=!0}function u(C,g){let{collection:E,breakpoint:T}=g,L=T?`${T}-`:"";E[`${L}grid-${C}`]=!0}function d(C,g){let{collection:E,breakpoint:T}=g,L=T?`${T}-`:"";E[`${L}shift-${C}`]=!0}function h(C,g){let{collection:E,breakpoint:T}=g,L=T?`${T}-`:"";E[`${L}${C}`]=!0}function f(C,g){if(!C)return;let{collection:E,breakpoint:T}=g,L=T?`${T}-`:"";E[`${L}reverse`]=!0}function v(C,g,E){if(!C)return;let{collection:T,breakpoint:L}=g,V=L?`${L}-`:"";T[`${V}${E}`]=!0}function p(C,g){let{collection:E,breakpoint:T}=g,L=T?`${T}-`:"";E[`${L}${C?"visible":"hidden"}`]=!0}function S(C,g,E){let T={};if(C==null)return T;if(typeof C=="function"){let L=C();return L!=null&&g(L,{collection:T,classMap:E}),T}return typeof C=="string"||typeof C=="number"||typeof C=="boolean"?(g(C,{collection:T,classMap:E}),T):Array.isArray(C)?(C.forEach(L=>{g(!0,{collection:T,breakpoint:s(L),classMap:E})}),T):(typeof C=="object"&&Object.entries(C).forEach(([L,V])=>{V!=null&&g(V,{collection:T,breakpoint:s(L),classMap:E})}),T)}let _=C=>{let g={top:"start",bottom:"end",center:"center",stretch:"stretch",baseline:"base"},E={left:"start",right:"end",center:"center",between:"between",around:"around",evenly:"evenly"};return{"nb-grid":!0,...S(C.dir,a),...S(C.align,l,g),...S(C.justify,o,E),...S(C.gap,c),...S(C.grid,u),...S(C.shift,d),...S(C.wrap,h),...S(C.reverse,f),...S(C.first,(T,L)=>v(T,L,"first")),...S(C.last,(T,L)=>v(T,L,"last")),...S(C.visible,p),...C.flex?{flex:!0}:{},...C.distributed?{distributed:!0}:{},...C.mode?{[C.mode]:!0}:{},...C.grow?{grow:!0}:{},...C.shrink!==null&&C.shrink!==void 0?{[`shrink-${C.shrink?"1":"0"}`]:!0}:{}}},w=j(()=>_(n));return(C,g)=>(m(),me(Do(C.is),{id:C.id,ref_key:"root",ref:r,class:Le(w.value),tabindex:C.tabIndex??!i.includes(C.is)?"-1":"0"},{default:te(()=>[He(C.$slots,"default")]),_:3},8,["id","class","tabindex"]))}}),dS=["for","title"],hS={class:"nb-field__control"},fS={key:2,class:"nb-field__hint"},rv=nt(Re({__name:"Field",props:{label:{default:void 0},hint:{default:void 0},orientation:{default:"row"},align:{default:"center"},control:{default:"fill"},labelFor:{default:void 0}},setup(e){let t=e,i=Pi(),r=j(()=>t.labelFor??i);return(n,s)=>(m(),M("div",{class:Le(["nb-field",`nb-field--${e.orientation}`,`nb-field--align-${e.align}`,`nb-field--control-${e.control}`])},[n.$slots.label?He(n.$slots,"label",{key:0},void 0,!0):e.label?(m(),M("label",{key:1,class:"nb-field__label",for:r.value,title:e.label},F(e.label),9,dS)):z("",!0),b("div",hS,[He(n.$slots,"default",{id:r.value},void 0,!0)]),e.hint||n.$slots.hint?(m(),M("div",fS,[He(n.$slots,"hint",{},()=>[_e(F(e.hint),1)],!0)])):z("",!0)],2))}}),[["__scopeId","data-v-155eb839"]]),Fo=nt(Re({__name:"Panel",props:{layer:{default:void 0}},setup(e){let t=e,{layerProps:i}=js({level:()=>t.layer});return(r,n)=>(m(),M("div",Wt({class:"nb-panel"},de(i)),[He(r.$slots,"default",{},void 0,!0)],16))}}),[["__scopeId","data-v-a0d6ea95"]]),nv=function(e){return e.Small="sm",e.Medium="md",e}(nv||{}),pS=["for"],_S={key:0,class:"nb-label__asterisk","aria-hidden":"true"},la=nt(Re({__name:"Label",props:{htmlFor:{default:void 0},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},size:{default:nv.Medium}},setup(e){return(t,i)=>(m(),M("label",{for:e.htmlFor,class:Le(["nb-label",`nb-label--${e.size}`,{"nb-label--required":e.required,"nb-label--disabled":e.disabled}])},[He(t.$slots,"default",{},void 0,!0),e.required?(m(),M("span",_S,"*")):z("",!0),He(t.$slots,"suffix",{},void 0,!0)],10,pS))}}),[["__scopeId","data-v-836b13c6"]]);const oa=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},mS=oa("warning-circle","0 0 256 256",'<path d="M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z"/>'),vS=oa("warning-circle","0 0 256 256",'<path d="M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z"/>'),p6=oa("warning-circle","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"/>'),gS=oa("warning-circle","0 0 256 256",'<path d="M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z"/>'),bS=oa("warning-circle","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z"/>'),yS=oa("warning-circle","0 0 256 256",'<path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"/><path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"/>'),wS="warning-circle",sv=Object.freeze(Object.defineProperty({__proto__:null,bold:gS,default:p6,duotone:yS,fill:bS,glyphName:wS,light:vS,regular:p6,thin:mS},Symbol.toStringTag,{value:"Module"})),ca=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},SS=ca("warning","0 0 256 256",'<path d="M233.34,190.09,145.88,38.22h0a20.75,20.75,0,0,0-35.76,0L22.66,190.09a19.52,19.52,0,0,0,0,19.71A20.36,20.36,0,0,0,40.54,220H215.46a20.36,20.36,0,0,0,17.86-10.2A19.52,19.52,0,0,0,233.34,190.09ZM226.4,205.8a12.47,12.47,0,0,1-10.94,6.2H40.54a12.47,12.47,0,0,1-10.94-6.2,11.45,11.45,0,0,1,0-11.72L117.05,42.21a12.76,12.76,0,0,1,21.9,0L226.4,194.08A11.45,11.45,0,0,1,226.4,205.8ZM124,144V104a4,4,0,0,1,8,0v40a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,180Z"/>'),CS=ca("warning","0 0 256 256",'<path d="M235.07,189.09,147.61,37.22h0a22.75,22.75,0,0,0-39.22,0L20.93,189.09a21.53,21.53,0,0,0,0,21.72A22.35,22.35,0,0,0,40.55,222h174.9a22.35,22.35,0,0,0,19.6-11.19A21.53,21.53,0,0,0,235.07,189.09ZM224.66,204.8a10.46,10.46,0,0,1-9.21,5.2H40.55a10.46,10.46,0,0,1-9.21-5.2,9.51,9.51,0,0,1,0-9.72L118.79,43.21a10.75,10.75,0,0,1,18.42,0l87.46,151.87A9.51,9.51,0,0,1,224.66,204.8ZM122,144V104a6,6,0,0,1,12,0v40a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,180Z"/>'),Er=ca("warning","0 0 256 256",'<path d="M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"/>'),kS=ca("warning","0 0 256 256",'<path d="M240.26,186.1,152.81,34.23h0a28.74,28.74,0,0,0-49.62,0L15.74,186.1a27.45,27.45,0,0,0,0,27.71A28.31,28.31,0,0,0,40.55,228h174.9a28.31,28.31,0,0,0,24.79-14.19A27.45,27.45,0,0,0,240.26,186.1Zm-20.8,15.7a4.46,4.46,0,0,1-4,2.2H40.55a4.46,4.46,0,0,1-4-2.2,3.56,3.56,0,0,1,0-3.73L124,46.2a4.77,4.77,0,0,1,8,0l87.44,151.87A3.56,3.56,0,0,1,219.46,201.8ZM116,136V104a12,12,0,0,1,24,0v32a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,176Z"/>'),AS=ca("warning","0 0 256 256",'<path d="M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM120,104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,88a12,12,0,1,1,12-12A12,12,0,0,1,128,192Z"/>'),MS=ca("warning","0 0 256 256",'<path d="M215.46,216H40.54C27.92,216,20,202.79,26.13,192.09L113.59,40.22c6.3-11,22.52-11,28.82,0l87.46,151.87C236,202.79,228.08,216,215.46,216Z" opacity="0.2"/><path d="M236.8,188.09,149.35,36.22h0a24.76,24.76,0,0,0-42.7,0L19.2,188.09a23.51,23.51,0,0,0,0,23.72A24.35,24.35,0,0,0,40.55,224h174.9a24.35,24.35,0,0,0,21.33-12.19A23.51,23.51,0,0,0,236.8,188.09ZM222.93,203.8a8.5,8.5,0,0,1-7.48,4.2H40.55a8.5,8.5,0,0,1-7.48-4.2,7.59,7.59,0,0,1,0-7.72L120.52,44.21a8.75,8.75,0,0,1,15,0l87.45,151.87A7.59,7.59,0,0,1,222.93,203.8ZM120,144V104a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,180Z"/>'),ES="warning",av=Object.freeze(Object.defineProperty({__proto__:null,bold:kS,default:Er,duotone:MS,fill:AS,glyphName:ES,light:CS,regular:Er,thin:SS},Symbol.toStringTag,{value:"Module"})),ua=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},LS=ua("check-circle","0 0 256 256",'<path d="M170.83,101.17a4,4,0,0,1,0,5.66l-56,56a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L112,154.34l53.17-53.17A4,4,0,0,1,170.83,101.17ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"/>'),$S=ua("check-circle","0 0 256 256",'<path d="M172.24,99.76a6,6,0,0,1,0,8.48l-56,56a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L112,151.51l51.76-51.75A6,6,0,0,1,172.24,99.76ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"/>'),_6=ua("check-circle","0 0 256 256",'<path d="M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"/>'),xS=ua("check-circle","0 0 256 256",'<path d="M176.49,95.51a12,12,0,0,1,0,17l-56,56a12,12,0,0,1-17,0l-24-24a12,12,0,1,1,17-17L112,143l47.51-47.52A12,12,0,0,1,176.49,95.51ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"/>'),TS=ua("check-circle","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,85.66-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35a8,8,0,0,1,11.32,11.32Z"/>'),HS=ua("check-circle","0 0 256 256",'<path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"/><path d="M173.66,98.34a8,8,0,0,1,0,11.32l-56,56a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L112,148.69l50.34-50.35A8,8,0,0,1,173.66,98.34ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"/>'),NS="check-circle",zh=Object.freeze(Object.defineProperty({__proto__:null,bold:xS,default:_6,duotone:HS,fill:TS,glyphName:NS,light:$S,regular:_6,thin:LS},Symbol.toStringTag,{value:"Module"}));var cc=function(e){return e.Error="error",e.Warning="warning",e.Success="success",e.Helper="helper",e}(cc||{}),PS=["aria-live"],OS={key:0,class:"nb-message__text"},RS={key:1,class:"nb-message__tooltip","aria-hidden":"true"},ct=nt(Re({__name:"Message",props:{variant:{default:cc.Helper},iconOnly:{type:Boolean,default:!1}},setup(e){let t=e,i={error:sv,warning:av,success:zh,helper:Q4};return(r,n)=>(m(),M("div",{class:Le(["nb-message",`nb-message--${t.variant}`,{"nb-message--icon-only":t.iconOnly}]),role:"status","aria-live":t.variant==="error"?"assertive":"polite"},[G(Ue,{name:i[t.variant],size:14,class:"nb-message__icon"},null,8,["name"]),t.iconOnly?z("",!0):(m(),M("span",OS,[He(r.$slots,"default",{},void 0,!0)])),t.iconOnly?(m(),M("span",RS,[He(r.$slots,"default",{},void 0,!0)])):z("",!0)],10,PS))}}),[["__scopeId","data-v-3b1f8105"]]);function IS(e){let t=Mt("nb-menu",null);t&&(De(e,(i,r)=>{r&&t.unregisterSurface(r),i&&t.registerSurface(i)}),mi(()=>{e.value&&t.unregisterSurface(e.value)}))}const DS=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},m6=DS("caret-up","0 0 256 256",'<path d="M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z"/>'),da=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},VS=da("x","0 0 256 256",'<path d="M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"/>'),ZS=da("x","0 0 256 256",'<path d="M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"/>'),_s=da("x","0 0 256 256",'<path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"/>'),BS=da("x","0 0 256 256",'<path d="M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"/>'),FS=da("x","0 0 256 256",'<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"/>'),zS=da("x","0 0 256 256",'<path d="M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z" opacity="0.2"/><path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"/>'),US="x",uc=Object.freeze(Object.defineProperty({__proto__:null,bold:BS,default:_s,duotone:zS,fill:FS,glyphName:US,light:ZS,regular:_s,thin:VS},Symbol.toStringTag,{value:"Module"}));var WS=["id","aria-expanded","aria-disabled","aria-required","disabled"],jS={key:2,class:"nb-select__clear-space","aria-hidden":"true"},KS=["aria-label"],qS=["id","aria-expanded","aria-disabled","aria-required","disabled"],GS={key:1,class:"nb-select__inner-label"},YS={key:0,class:"nb-select__asterisk","aria-hidden":"true"},XS={key:0,class:"nb-select__clear-space","aria-hidden":"true"},JS=["aria-label"],QS=["id","aria-multiselectable"],eC={key:0,class:"nb-select__search"},tC=["placeholder","aria-label","aria-controls","aria-activedescendant"],iC=["aria-labelledby"],rC=["id"],nC=["id","data-index","aria-selected","aria-disabled","onMouseenter","onClick"],sC={key:0,class:"nb-select__option-check","aria-hidden":"true"},aC={key:0,viewBox:"0 0 10 8",fill:"none",width:"10",height:"8"},lC={class:"nb-select__option-label"},oC={key:1,class:"nb-select__empty"},cC={key:2,class:"nb-select__empty"},uC=["placeholder","onKeydown"],zo=Re({__name:"Select",props:{modelValue:{default:null},options:{default:()=>[]},multiple:{type:Boolean,default:!1},creatable:{type:Boolean,default:!1},createPlaceholder:{default:""},clearable:{type:Boolean,default:!1},clearLabel:{default:"Clear selection"},searchable:{type:Boolean,default:!1},searchPlaceholder:{default:"Search…"},noResultsLabel:{default:"No results"},anchor:{type:[Function,null],default:null},selectedMark:{default:"fill"},placeholder:{default:"Select…"},name:{default:""},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},id:{default:void 0},label:{default:""},error:{default:""},warning:{default:""},helper:{default:""},variant:{default:"default"},size:{default:"md"}},emits:["update:modelValue","change","create"],setup(e,{expose:t,emit:i}){let r=e,n=i,s=(se,{slots:x})=>{var H,O;return se.wrap?$e("div",{class:"nb-select__control"},(H=x.default)==null?void 0:H.call(x)):(O=x.default)==null?void 0:O.call(x)};s.props=["wrap"];let a=q(""),l=q(""),o=q(null);function c(){let se=a.value.trim();se&&(n("create",se),a.value="")}let u=q(!1),d=q(!1),h=q(-1),f=q(null),v=q(null),p=Fr(),S=()=>(typeof r.anchor=="function"?r.anchor():r.anchor)??v.value??f.value;function _(){var se,x;(x=v.value??((se=f.value)==null?void 0:se.querySelector("button, [tabindex]")))==null||x.focus()}let w=q(null);IS(w);let C=q({position:"fixed",top:"0px",left:"0px",width:"0px",zIndex:"9999"}),g=`nb-select-${Pi()}`,E=j(()=>r.id??g),T=j(()=>`${E.value}-listbox`),L=se=>`${E.value}-option-${se}`,V=j(()=>r.modelValue==null?[]:Array.isArray(r.modelValue)?r.modelValue:[r.modelValue]),P=j(()=>{var se;if(!(r.multiple||V.value.length!==1))return(se=(r.options??[]).find(x=>x.value===V.value[0]))==null?void 0:se.icon}),Y=j(()=>{var x,H;if(V.value.length===0)return"";let se=r.options??[];return r.multiple?V.value.length===1?((x=se.find(O=>O.value===V.value[0]))==null?void 0:x.label)??String(V.value[0]):V.value.length===2?V.value.map(O=>{var ee;return((ee=se.find(Q=>Q.value===O))==null?void 0:ee.label)??String(O)}).join(", "):`${V.value.length} selected`:((H=se.find(O=>O.value===V.value[0]))==null?void 0:H.label)??String(V.value[0])});function W(se){return V.value.includes(se)}let A=se=>se.normalize("NFD").replace(new RegExp("\\p{M}","gu"),"").toLowerCase(),$=j(()=>{let se=r.options??[],x=r.searchable?A(l.value.trim()):"",H=new Set;return se.forEach((O,ee)=>{(!x||A(O.label).includes(x))&&H.add(ee)}),H}),Z=j(()=>{let se=[];return(r.options??[]).forEach((x,H)=>{if(!$.value.has(H))return;let O=se[se.length-1];(!O||O.name!==x.group)&&se.push({key:`${se.length}:${x.group??""}`,name:x.group,labelId:`${E.value}-group-${se.length}`,entries:[]}),se[se.length-1].entries.push({option:x,index:H})}),se});function ie(se,x){let H=r.options??[];for(let O=se+x;O>=0&&O<H.length;O+=x)if(!H[O].disabled&&$.value.has(O))return O;return se}function ne(se){if(se.disabled)return;let x;if(r.multiple){let H=[...V.value],O=H.indexOf(se.value);O>=0?H.splice(O,1):H.push(se.value),x=H}else x=se.value,ae();n("update:modelValue",x),n("change",x)}function ce(){var y;let se=S();if(!se)return;let x=se.getBoundingClientRect(),H=((y=w.value)==null?void 0:y.offsetHeight)??0,O=window.innerHeight-x.bottom,ee=x.top,Q=H>0&&O<H&&ee>O,pe=p.trigger?Math.max(x.width,240):x.width,we=p.trigger?Math.max(8,Math.min(x.left,window.innerWidth-pe-8)):x.left;C.value={position:"fixed",top:Q?`${x.top-H}px`:`${x.bottom}px`,left:`${we}px`,width:`${pe}px`,zIndex:"9999"}}function J(){if(r.disabled)return;u.value=!0,ce();let se=r.options??[];h.value=V.value.length>0?Math.max(0,se.findIndex(x=>x.value===V.value[0])):-1,Kt(()=>{var x;ce(),ue(),(x=o.value)==null||x.focus({preventScroll:!0})})}function ae(){var x;let se=!!((x=w.value)!=null&&x.contains(document.activeElement));u.value=!1,h.value=-1,l.value="",se&&_()}function re(){u.value?ae():J()}function X(se){var ee,Q;let x=se.target,H=((ee=f.value)==null?void 0:ee.contains(x))??!1,O=((Q=w.value)==null?void 0:Q.contains(x))??!1;!H&&!O&&ae()}function le(){u.value&&ce()}De(u,se=>{se?(document.addEventListener("mousedown",X),window.addEventListener("scroll",le,!0),window.addEventListener("resize",le)):(document.removeEventListener("mousedown",X),window.removeEventListener("scroll",le,!0),window.removeEventListener("resize",le))}),mi(()=>{document.removeEventListener("mousedown",X),window.removeEventListener("scroll",le,!0),window.removeEventListener("resize",le)});function ve(se){let x=r.options??[];if(!u.value){(se.key==="Enter"||se.key===" "||se.key==="ArrowDown")&&(se.preventDefault(),J());return}se.key==="Escape"?(ae(),se.preventDefault()):se.key==="Tab"?ae():se.key==="ArrowDown"?(se.preventDefault(),h.value=ie(h.value,1),ue()):se.key==="ArrowUp"?(se.preventDefault(),h.value>0&&(h.value=ie(h.value,-1)),ue()):(se.key==="Enter"||se.key===" ")&&h.value>=0&&(se.preventDefault(),ne(x[h.value]))}function ue(){Kt(()=>{var se;!w.value||h.value<0||((se=w.value.querySelector(`[data-index="${h.value}"]`))==null||se.scrollIntoView({block:"nearest"}))})}De(l,()=>{if(!u.value)return;let se=ie(-1,1);h.value=se===-1?-1:se,ue()});function he(se){if(se.key===" "){se.stopPropagation();return}if(se.key==="Home"||se.key==="End"){se.stopPropagation();return}ve(se)}let ye=j(()=>({isOpen:u.value,toggle:re,open:J,close:ae,attrs:{"aria-expanded":u.value,"aria-haspopup":"listbox","aria-controls":u.value?T.value:void 0,onClick:re}})),U=j(()=>r.clearable&&!r.disabled&&V.value.length>0);function fe(){let se=r.multiple?[]:null;ae(),n("update:modelValue",se),n("change",se),_()}let ge=j(()=>["nb-select",`nb-select--${r.variant}`,`nb-select--${r.size}`,{"nb-select--open":u.value,"nb-select--focused":d.value&&!u.value,"nb-select--error":!!r.error,"nb-select--warning":!r.error&&!!r.warning,"nb-select--multiple":r.multiple,"nb-select--bare":!!p.trigger}]);return t({open:J,close:ae}),(se,x)=>(m(),M(ke,null,[b("div",{ref_key:"rootRef",ref:f,class:Le(ge.value),onKeydown:ve},[se.$slots.trigger?He(se.$slots,"trigger",Db(Wt({key:0},ye.value))):e.variant==="default"?(m(),M(ke,{key:1},[se.$slots.label?He(se.$slots,"label",{key:0}):e.label?(m(),me(la,{key:1,for:E.value,required:e.required,disabled:e.disabled},{default:te(()=>[_e(F(e.label),1)]),_:1},8,["for","required","disabled"])):z("",!0),G(s,{wrap:e.clearable},{default:te(()=>[b("button",{id:E.value,ref_key:"triggerRef",ref:v,type:"button",class:"nb-select__trigger",role:"combobox","aria-expanded":u.value,"aria-haspopup":"listbox","aria-disabled":e.disabled||void 0,"aria-required":e.required||void 0,disabled:e.disabled||void 0,onClick:re,onFocus:x[0]||(x[0]=H=>d.value=!0),onBlur:x[1]||(x[1]=H=>d.value=!1)},[b("span",{class:Le(["nb-select__value",{"nb-select__value--placeholder":!Y.value,"nb-select__value--with-icon":!!P.value}])},[P.value?(m(),me(Ue,{key:0,class:"nb-select__value-icon",name:P.value,size:16},null,8,["name"])):z("",!0),Y.value?He(se.$slots,"value",{key:1,values:V.value},()=>[_e(F(Y.value),1)]):(m(),M(ke,{key:2},[_e(F(e.placeholder),1)],64))],2),e.error?(m(),me(ct,{key:0,variant:"error","icon-only":!0,class:"nb-select__status-icon"},{default:te(()=>[_e(F(e.error),1)]),_:1})):e.warning?(m(),me(ct,{key:1,variant:"warning","icon-only":!0,class:"nb-select__status-icon"},{default:te(()=>[_e(F(e.warning),1)]),_:1})):z("",!0),U.value?(m(),M("span",jS)):z("",!0),G(or,{align:"center",justify:"center",class:"nb-select__caret"},{default:te(()=>[G(Ue,{name:u.value?de(m6):de(d6),size:16},null,8,["name"])]),_:1})],40,WS),U.value?(m(),M("button",{key:0,type:"button",class:"nb-select__clear","aria-label":e.clearLabel,onClick:fe,onKeydown:[x[2]||(x[2]=$i(Qe(()=>{},["stop"]),["enter"])),x[3]||(x[3]=$i(Qe(()=>{},["stop"]),["space"]))]},[G(Ue,{name:de(_s),size:16},null,8,["name"])],40,KS)):z("",!0)]),_:3},8,["wrap"]),e.error?(m(),me(ct,{key:2,variant:"error",class:"nb-select__message"},{default:te(()=>[_e(F(e.error),1)]),_:1})):e.warning?(m(),me(ct,{key:3,variant:"warning",class:"nb-select__message"},{default:te(()=>[_e(F(e.warning),1)]),_:1})):e.helper?(m(),me(ct,{key:4,variant:"helper",class:"nb-select__message"},{default:te(()=>[_e(F(e.helper),1)]),_:1})):z("",!0)],64)):e.variant==="fluid"?(m(),M(ke,{key:2},[G(s,{wrap:e.clearable},{default:te(()=>[b("button",{id:E.value,ref_key:"triggerRef",ref:v,type:"button",class:"nb-select__trigger",role:"combobox","aria-expanded":u.value,"aria-haspopup":"listbox","aria-disabled":e.disabled||void 0,"aria-required":e.required||void 0,disabled:e.disabled||void 0,onClick:re,onFocus:x[4]||(x[4]=H=>d.value=!0),onBlur:x[5]||(x[5]=H=>d.value=!1)},[e.label||se.$slots.label?(m(),me(or,{key:0,dir:"row",align:"center",gap:"xs",class:"nb-select__inner-header"},{default:te(()=>[se.$slots.label?He(se.$slots,"label",{key:0}):(m(),M("label",GS,[_e(F(e.label)+" ",1),e.required?(m(),M("span",YS,"*")):z("",!0)])),e.helper&&!e.error&&!e.warning?(m(),me(ct,{key:2,variant:"helper","icon-only":!0,class:"nb-select__inner-message"},{default:te(()=>[_e(F(e.helper),1)]),_:1})):z("",!0)]),_:3})):z("",!0),G(or,{dir:"row",align:"end",flex:"",class:"nb-select__value-row"},{default:te(()=>[b("span",{class:Le(["nb-select__value",{"nb-select__value--placeholder":!Y.value,"nb-select__value--with-icon":!!P.value}])},[P.value?(m(),me(Ue,{key:0,class:"nb-select__value-icon",name:P.value,size:16},null,8,["name"])):z("",!0),Y.value?He(se.$slots,"value",{key:1,values:V.value},()=>[_e(F(Y.value),1)]):(m(),M(ke,{key:2},[_e(F(e.placeholder),1)],64))],2),U.value?(m(),M("span",XS)):z("",!0),G(or,{align:"center",justify:"center",class:"nb-select__caret"},{default:te(()=>[G(Ue,{name:u.value?de(m6):de(d6),size:16},null,8,["name"])]),_:1})]),_:3})],40,qS),U.value?(m(),M("button",{key:0,type:"button",class:"nb-select__clear","aria-label":e.clearLabel,onClick:fe,onKeydown:[x[6]||(x[6]=$i(Qe(()=>{},["stop"]),["enter"])),x[7]||(x[7]=$i(Qe(()=>{},["stop"]),["space"]))]},[G(Ue,{name:de(_s),size:16},null,8,["name"])],40,JS)):z("",!0)]),_:3},8,["wrap"]),e.error?(m(),me(ct,{key:0,variant:"error",class:"nb-select__fluid-message"},{default:te(()=>[_e(F(e.error),1)]),_:1})):e.warning?(m(),me(ct,{key:1,variant:"warning",class:"nb-select__fluid-message"},{default:te(()=>[_e(F(e.warning),1)]),_:1})):z("",!0)],64)):z("",!0)],34),(m(),me(dr,{to:"body"},[u.value?(m(),M("div",{key:0,id:T.value,ref_key:"dropdownRef",ref:w,class:Le(["nb-select__dropdown",{"nb-select__dropdown--check":e.selectedMark==="check","nb-select__dropdown--anchored":!!se.$slots.trigger}]),style:_i(C.value),role:"listbox","aria-multiselectable":e.multiple||void 0},[e.searchable?(m(),M("div",eC,[ur(b("input",{ref_key:"searchRef",ref:o,"onUpdate:modelValue":x[8]||(x[8]=H=>l.value=H),type:"search",class:"nb-select__search-input",autocomplete:"off",spellcheck:"false",placeholder:e.searchPlaceholder,"aria-label":e.searchPlaceholder,"aria-controls":T.value,"aria-activedescendant":h.value>=0?L(h.value):void 0,onKeydown:he},null,40,tC),[[_o,l.value]])])):z("",!0),(m(!0),M(ke,null,Fe(Z.value,H=>(m(),M("div",{key:H.key,class:"nb-select__group",role:"group","aria-labelledby":H.name?H.labelId:void 0},[H.name?(m(),M("div",{key:0,id:H.labelId,class:"nb-select__group-label"},F(H.name),9,rC)):z("",!0),(m(!0),M(ke,null,Fe(H.entries,O=>(m(),M("div",{id:L(O.index),key:O.option.value,"data-index":O.index,class:Le(["nb-select__option",{"nb-select__option--selected":W(O.option.value),"nb-select__option--highlighted":h.value===O.index,"nb-select__option--disabled":O.option.disabled}]),role:"option","aria-selected":W(O.option.value),"aria-disabled":O.option.disabled||void 0,onMouseenter:ee=>h.value=O.index,onClick:ee=>ne(O.option)},[e.multiple||e.selectedMark==="check"?(m(),M("span",sC,[W(O.option.value)?(m(),M("svg",aC,[...x[12]||(x[12]=[b("path",{d:"M1 4l3 3 5-6",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):z("",!0)])):z("",!0),O.option.icon?(m(),me(Ue,{key:1,class:"nb-select__option-icon",name:O.option.icon,size:16},null,8,["name"])):z("",!0),b("span",lC,[He(se.$slots,"option",{option:O.option},()=>[_e(F(O.option.label),1)])])],42,nC))),128))],8,iC))),128)),!e.options||e.options.length===0?(m(),M("div",oC," No options ")):e.searchable&&$.value.size===0?(m(),M("div",cC,F(e.noResultsLabel),1)):z("",!0),e.creatable?(m(),M("div",{key:3,class:"nb-select__create",onMousedown:x[11]||(x[11]=Qe(()=>{},["prevent"]))},[ur(b("input",{"onUpdate:modelValue":x[9]||(x[9]=H=>a.value=H),type:"text",class:"nb-select__create-input",placeholder:e.createPlaceholder||"Add new…",onKeydown:[$i(Qe(c,["prevent"]),["enter"]),x[10]||(x[10]=Qe(()=>{},["stop"]))]},null,40,uC),[[_o,a.value]])],32)):z("",!0)],14,QS)):z("",!0)]))],64))}}),dC=Symbol("NB_TEXT_INPUT_CONTEXT"),hC={key:0,class:"nb-text-input__overlay-wrap"},fC=["innerHTML"],pC=["id","value","placeholder","disabled","readonly","name","maxlength"],_C=["id","value","placeholder","disabled","readonly","name","maxlength"],mC=["id","placeholder","disabled","readonly","name","maxlength","rows"],vC=["id","type","placeholder","disabled","readonly","required","name","min","max","step","maxlength"],gC={key:2,class:"nb-text-input__actions"},bC={key:0,class:"nb-text-input__inner-header"},yC=["for"],wC={key:0,class:"nb-text-input__asterisk","aria-hidden":"true"},SC=["id","type","placeholder","disabled","readonly","required","name","min","max","step","maxlength"],ha=nt(Re({inheritAttrs:!1,__name:"TextInput",props:Cm({type:{default:"text"},min:{default:void 0},max:{default:void 0},step:{default:void 0},maxlength:{default:void 0},multiline:{type:Boolean,default:!1},rows:{default:3},highlight:{type:Function,default:void 0},readonly:{type:Boolean,default:!1},placeholder:{default:""},name:{default:""},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},id:{default:void 0},label:{default:""},error:{default:""},warning:{default:""},helper:{default:""},variant:{default:"default"},size:{default:"md"}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(e,{expose:t}){let i=e,r=Em(e,"modelValue"),n=q(null),s=q(null);t({focus:()=>{var S;return(S=n.value)==null?void 0:S.focus()},blur:()=>{var S;return(S=n.value)==null?void 0:S.blur()},nativeEl:n}),Ji(dC,{field:n});let a=q(!1),l=`nb-input-${Pi()}`,o=j(()=>i.id??l),c=j(()=>!!i.highlight),u=j(()=>{if(!i.highlight)return"";let S=String(r.value??"");return i.highlight(S)+`
41
- `});function d(){s.value&&n.value&&(s.value.scrollTop=n.value.scrollTop)}De(u,()=>Kt(d));let h=j(()=>i.error?"error":i.warning?"warning":"helper"),f=j(()=>i.error||i.warning||i.helper||""),v=j(()=>!!f.value),p=j(()=>({"nb-text-input__field-wrapper--focused":a.value,"nb-text-input__field-wrapper--error":!!i.error,"nb-text-input__field-wrapper--warning":!i.error&&!!i.warning,"nb-text-input__field-wrapper--disabled":i.disabled,"nb-text-input__field-wrapper--readonly":i.readonly,"nb-text-input__field-wrapper--overlay":c.value,"nb-text-input__field-wrapper--multiline":i.multiline}));return(S,_)=>(m(),me(or,{dir:"col",class:Le(["nb-text-input",`nb-text-input--${e.variant}`,`nb-text-input--${e.size}`,{"nb-text-input--multiline":e.multiline}])},{default:te(()=>[e.variant==="default"?(m(),M(ke,{key:0},[S.$slots.label?He(S.$slots,"label",{key:0},void 0,!0):e.label?(m(),me(la,{key:1,for:o.value,required:e.required,disabled:e.disabled},{default:te(()=>[_e(F(e.label),1)]),_:1},8,["for","required","disabled"])):z("",!0),b("div",{class:Le(["nb-text-input__field-wrapper",p.value])},[He(S.$slots,"leading",{},void 0,!0),c.value?(m(),M("div",hC,[b("div",{ref_key:"mirrorRef",ref:s,class:"nb-text-input__mirror","aria-hidden":"true",innerHTML:u.value},null,8,fC),e.multiline?(m(),M("textarea",Wt({key:0,id:o.value,ref_key:"nativeRef",ref:n},S.$attrs,{class:"nb-text-input__field--transparent",value:r.value,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,name:e.name,maxlength:e.maxlength,spellcheck:"false",autocomplete:"off",autocorrect:"off",onInput:_[0]||(_[0]=w=>r.value=w.target.value),onFocus:_[1]||(_[1]=w=>a.value=!0),onBlur:_[2]||(_[2]=w=>a.value=!1),onScroll:d}),null,16,pC)):(m(),M("input",Wt({key:1,id:o.value,ref_key:"nativeRef",ref:n},S.$attrs,{type:"text",class:"nb-text-input__field--transparent",value:r.value,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,name:e.name,maxlength:e.maxlength,spellcheck:"false",onInput:_[3]||(_[3]=w=>r.value=w.target.value),onFocus:_[4]||(_[4]=w=>a.value=!0),onBlur:_[5]||(_[5]=w=>a.value=!1)}),null,16,_C))])):(m(),M(ke,{key:1},[e.multiline?ur((m(),M("textarea",Wt({key:0,id:o.value,ref_key:"nativeRef",ref:n},S.$attrs,{"onUpdate:modelValue":_[6]||(_[6]=w=>r.value=w),class:"nb-text-input__field",placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,name:e.name,maxlength:e.maxlength,rows:e.rows,onFocus:_[7]||(_[7]=w=>a.value=!0),onBlur:_[8]||(_[8]=w=>a.value=!1)}),null,16,mC)),[[_o,r.value]]):ur((m(),M("input",Wt({key:1,id:o.value,ref_key:"nativeRef",ref:n},S.$attrs,{"onUpdate:modelValue":_[9]||(_[9]=w=>r.value=w),class:"nb-text-input__field",type:e.type,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,required:e.required,name:e.name,min:e.min,max:e.max,step:e.step,maxlength:e.maxlength,onFocus:_[10]||(_[10]=w=>a.value=!0),onBlur:_[11]||(_[11]=w=>a.value=!1)}),null,16,vC)),[[df,r.value]])],64)),He(S.$slots,"trailing",{},void 0,!0),S.$slots.actions?(m(),M("div",gC,[He(S.$slots,"actions",{},void 0,!0)])):z("",!0)],2),v.value?(m(),me(ct,{key:2,variant:h.value,class:"nb-text-input__message"},{default:te(()=>[_e(F(f.value),1)]),_:1},8,["variant"])):z("",!0),He(S.$slots,"dropdown",{},void 0,!0)],64)):e.variant==="fluid"?(m(),M(ke,{key:1},[b("div",{class:Le(["nb-text-input__field-wrapper",p.value])},[e.label||S.$slots.label?(m(),M("div",bC,[S.$slots.label?He(S.$slots,"label",{key:0},void 0,!0):(m(),M("label",{key:1,for:o.value,class:Le(["nb-text-input__inner-label",{"nb-text-input__inner-label--required":e.required}])},[_e(F(e.label)+" ",1),e.required?(m(),M("span",wC,"*")):z("",!0)],10,yC)),v.value?(m(),me(ct,{key:2,variant:h.value,"icon-only":"",class:"nb-text-input__inner-message"},{default:te(()=>[_e(F(f.value),1)]),_:1},8,["variant"])):z("",!0)])):z("",!0),ur(b("input",Wt({id:o.value,ref_key:"nativeRef",ref:n},S.$attrs,{"onUpdate:modelValue":_[12]||(_[12]=w=>r.value=w),class:"nb-text-input__field",type:e.type,placeholder:e.placeholder,disabled:e.disabled,readonly:e.readonly,required:e.required,name:e.name,min:e.min,max:e.max,step:e.step,maxlength:e.maxlength,onFocus:_[13]||(_[13]=w=>a.value=!0),onBlur:_[14]||(_[14]=w=>a.value=!1)}),null,16,SC),[[df,r.value]])],2),He(S.$slots,"dropdown",{},void 0,!0)],64)):z("",!0)]),_:3},8,["class"]))}}),[["__scopeId","data-v-09e30e0d"]]),q1=function(e){return e.Small="sm",e.Medium="md",e.Large="lg",e}(q1||{}),G1=function(e){return e.Primary="primary",e.Secondary="secondary",e}(G1||{}),CC=["for"],kC=["id","name","disabled"],Yc=nt(Re({__name:"Switch",props:Cm({id:{type:String,default:()=>null},label:{type:String,default:""},size:{type:String,default:q1.Medium,validator:e=>Object.values(q1).includes(e)},verbose:Boolean,hideLabel:Boolean,name:{type:String,required:!0},disabled:Boolean,variant:{type:String,default:G1.Primary,validator:e=>Object.values(G1).includes(e)}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(e){let t=Em(e,"modelValue"),i=e,r=Bh(i),n=j(()=>({"aria-disabled":i.disabled})),s=j(()=>({"nb-switch":!0,disabled:i.disabled})),a=j(()=>({"nb-switch-wrapper":!0,verbose:i.verbose,[i.size]:!0,[`nb-${i.variant}`]:!0}));return(l,o)=>(m(),me(or,{id:de(r),class:Le(s.value),align:"center",gap:"sm"},{default:te(()=>[e.label?(m(),me(la,{key:0,for:`${de(r)}-input`,disabled:e.disabled,class:Le({"nb-switch__label--hidden":e.hideLabel})},{default:te(()=>[_e(F(e.label),1)]),_:1},8,["for","disabled","class"])):z("",!0),b("label",Wt({for:`${de(r)}-input`,class:a.value},n.value,{onClick:o[1]||(o[1]=Qe(()=>{},["stop"]))}),[ur(b("input",{id:`${de(r)}-input`,"onUpdate:modelValue":o[0]||(o[0]=c=>t.value=c),name:e.name,type:"checkbox",disabled:e.disabled},null,8,kC),[[Xm,t.value]]),o[2]||(o[2]=b("div",{class:"slider round"},null,-1))],16,CC)]),_:1},8,["id","class"]))}}),[["__scopeId","data-v-f6465c1e"]]);const fa=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},AC=fa("magnifying-glass","0 0 256 256",'<path d="M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"/>'),MC=fa("magnifying-glass","0 0 256 256",'<path d="M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"/>'),v6=fa("magnifying-glass","0 0 256 256",'<path d="M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"/>'),EC=fa("magnifying-glass","0 0 256 256",'<path d="M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"/>'),LC=fa("magnifying-glass","0 0 256 256",'<path d="M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"/>'),$C=fa("magnifying-glass","0 0 256 256",'<path d="M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z" opacity="0.2"/><path d="M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"/>'),xC="magnifying-glass",g6=Object.freeze(Object.defineProperty({__proto__:null,bold:EC,default:v6,duotone:$C,fill:LC,glyphName:xC,light:MC,regular:v6,thin:AC},Symbol.toStringTag,{value:"Module"})),pa=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},TC=pa("caret-right","0 0 256 256",'<path d="M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"/>'),HC=pa("caret-right","0 0 256 256",'<path d="M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"/>'),dc=pa("caret-right","0 0 256 256",'<path d="M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"/>'),NC=pa("caret-right","0 0 256 256",'<path d="M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"/>'),PC=pa("caret-right","0 0 256 256",'<path d="M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"/>'),OC=pa("caret-right","0 0 256 256",'<path d="M176,128,96,208V48Z" opacity="0.2"/><path d="M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"/>'),RC="caret-right",Uh=Object.freeze(Object.defineProperty({__proto__:null,bold:NC,default:dc,duotone:OC,fill:PC,glyphName:RC,light:HC,regular:dc,thin:TC},Symbol.toStringTag,{value:"Module"})),_a=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},IC=_a("caret-up-down","0 0 256 256",'<path d="M178.83,173.17a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-48-48a4,4,0,0,1,5.66-5.66L128,218.34l45.17-45.17A4,4,0,0,1,178.83,173.17Zm-96-90.34L128,37.66l45.17,45.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66Z"/>'),DC=_a("caret-up-down","0 0 256 256",'<path d="M180.24,171.76a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-48-48a6,6,0,0,1,8.48-8.48L128,215.51l43.76-43.75A6,6,0,0,1,180.24,171.76Zm-96-87.52L128,40.49l43.76,43.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48Z"/>'),b6=_a("caret-up-down","0 0 256 256",'<path d="M181.66,170.34a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-48-48a8,8,0,0,1,11.32-11.32L128,212.69l42.34-42.35A8,8,0,0,1,181.66,170.34Zm-96-84.68L128,43.31l42.34,42.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,85.66Z"/>'),VC=_a("caret-up-down","0 0 256 256",'<path d="M184.49,167.51a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-48-48a12,12,0,0,1,17-17L128,207l39.51-39.52A12,12,0,0,1,184.49,167.51Zm-96-79L128,49l39.51,39.52a12,12,0,0,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,0,0,17,17Z"/>'),ZC=_a("caret-up-down","0 0 256 256",'<path d="M72.61,83.06a8,8,0,0,1,1.73-8.72l48-48a8,8,0,0,1,11.32,0l48,48A8,8,0,0,1,176,88H80A8,8,0,0,1,72.61,83.06ZM176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Z"/>'),BC=_a("caret-up-down","0 0 256 256",'<path d="M80,176h96l-48,48ZM128,32,80,80h96Z" opacity="0.2"/><path d="M176,168H80a8,8,0,0,0-5.66,13.66l48,48a8,8,0,0,0,11.32,0l48-48A8,8,0,0,0,176,168Zm-48,44.69L99.31,184h57.38ZM80,88h96a8,8,0,0,0,5.66-13.66l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,80,88Zm48-44.69L156.69,72H99.31Z"/>'),FC="caret-up-down",zC=Object.freeze(Object.defineProperty({__proto__:null,bold:VC,default:b6,duotone:BC,fill:ZC,glyphName:FC,light:DC,regular:b6,thin:IC},Symbol.toStringTag,{value:"Module"}));var UC={key:0,class:"nb-breadcrumbs__brand"},WC={key:0,class:"nb-breadcrumbs__title"},jC={key:1,class:"nb-breadcrumbs__subtitle"},KC={key:2,class:"nb-breadcrumbs__crumbs"},qC={key:0,class:"nb-breadcrumbs__current","aria-current":"page"},GC={key:2,class:"nb-breadcrumbs__parent"},YC=["aria-label"],lv=nt(Re({__name:"Breadcrumbs",props:{title:{default:void 0},subtitle:{default:void 0},collapse:{default:"none"},items:{default:void 0}},emits:["select","switch"],setup(e,{emit:t}){let i=e,r=t,n=wi(),s=j(()=>{var T;return!!((T=n==null?void 0:n.vnode.props)!=null&&T.onSelect)}),a=j(()=>{let T=i.items??[],L=T.findIndex(V=>V.current);return L===-1?T.length-1:L});function l(T){return T===a.value}function o(T){return T.to!=null||!!T.href||!!T.onClick||s.value}function c(T,L,V){var P;(P=T.onClick)==null||P.call(T,V),r("select",T,L,V)}let u=[],d=(T,L)=>T.value??L;function h(T){return(T.options??[]).map((L,V)=>({label:L.label,value:d(L,V),icon:L.icon}))}function f(T){if(T.value!=null)return T.value;let L=T.options??[],V=L.findIndex(P=>P.label===T.label);return V===-1?null:d(L[V],V)}function v(T,L,V){let P=T.options??[],Y=P.findIndex((A,$)=>d(A,$)===V);if(Y===-1||V===f(T))return;let W=P[Y];r("switch",T,W,L),p(W)}function p(T){let L=n==null?void 0:n.appContext.config.globalProperties.$router;T.to==null?T.href&&window.location.assign(T.href):L?L.push(T.to):typeof T.to=="string"&&window.location.assign(T.to)}let S=Fr();function _(T){return T.some(L=>L.type===Qt?!1:L.type===Vn?String(L.children??"").trim()!=="":L.type===ke?_(L.children??[]):!0)}let w=j(()=>{var T;return _(((T=S.default)==null?void 0:T.call(S))??[])}),C=j(()=>{var T;return!!((T=i.items)!=null&&T.length)||w.value}),{phone:g}=Bo(),E=j(()=>i.collapse==="phone"&&g.value&&C.value);return(T,L)=>{var V;return m(),M("nav",{class:Le(["nb-breadcrumbs",{"nb-breadcrumbs--collapsed":E.value}]),"aria-label":"breadcrumb"},[e.title||e.subtitle?(m(),M("span",UC,[e.title?(m(),M("span",WC,F(e.title),1)):z("",!0),e.subtitle?(m(),M("span",jC,F(e.subtitle),1)):z("",!0)])):z("",!0),(e.title||e.subtitle)&&C.value?(m(),me(Ue,{key:1,name:de(dc),size:"sm",class:"nb-breadcrumbs__sep"},null,8,["name"])):z("",!0),C.value?(m(),M("span",KC,[(V=e.items)!=null&&V.length?(m(!0),M(ke,{key:0},Fe(e.items,(P,Y)=>{var W;return m(),M("span",{key:Y,ref_for:!0,ref:A=>u[Y]=A,class:"nb-breadcrumbs__item"},[l(Y)?(m(),M("span",qC,F(P.label),1)):o(P)?(m(),me(oi,{key:1,class:"nb-breadcrumbs__link",variant:"link",to:P.to,href:P.href,target:P.target,onClick:A=>c(P,Y,A)},{default:te(()=>[_e(F(P.label),1)]),_:2},1032,["to","href","target","onClick"])):(m(),M("span",GC,F(P.label),1)),(W=P.options)!=null&&W.length?(m(),me(zo,{key:3,class:"nb-breadcrumbs__switcher",searchable:"","selected-mark":"check",anchor:()=>u[Y],"model-value":f(P),options:h(P),"search-placeholder":P.searchPlaceholder??"Find","no-results-label":P.noResultsLabel??"No results",onChange:A=>v(P,Y,A)},{trigger:te(({attrs:A})=>[b("button",Wt({type:"button",class:"nb-breadcrumbs__switch"},{ref_for:!0},A,{"aria-label":P.switchLabel??`Switch ${P.label}`}),[G(Ue,{name:zC,size:14,"aria-hidden":"true"})],16,YC)]),_:2},1032,["anchor","model-value","options","search-placeholder","no-results-label","onChange"])):z("",!0)])}),128)):He(T.$slots,"default",{key:1},void 0,!0)])):z("",!0)],2)}}}),[["__scopeId","data-v-08deaee6"]]);function XC(e){var i,r,n,s;let t=(i=e.name)==null?void 0:i.trim();if(t){let a=t.split(/\s+/);return((((r=a[0])==null?void 0:r[0])??"")+(a.length>1?((n=a[a.length-1])==null?void 0:n[0])??"":"")).toUpperCase()}return(((s=e.email)==null?void 0:s.trim().split("@")[0])??"").slice(0,2).toUpperCase()}var ov=function(e){return e.Grey="grey",e.Blue="blue",e.Orange="orange",e.Green="green",e.Red="red",e.Purple="purple",e.Primary="primary",e}(ov||{}),cv=function(e){return e.Small="sm",e.Medium="md",e}(cv||{}),JC={key:0,class:"nb-badge__dot"},bs=nt(Re({__name:"Badge",props:{variant:{default:ov.Grey},size:{default:cv.Medium},dot:{type:Boolean,default:!1},icon:{default:void 0},placeholder:{type:Boolean,default:!1},interactive:{type:Boolean,default:!1}},setup(e){return(t,i)=>(m(),me(Do(e.interactive?"button":"span"),{type:e.interactive?"button":void 0,class:Le(["nb-badge",`nb-badge--${e.variant}`,`nb-badge--${e.size}`,{"nb-badge--placeholder":e.placeholder,"nb-badge--interactive":e.interactive}])},{default:te(()=>[e.dot?(m(),M("span",JC)):z("",!0),e.icon?(m(),me(Ue,{key:1,name:e.icon,size:e.size==="sm"?11:12,class:"nb-badge__icon"},null,8,["name","size"])):z("",!0),He(t.$slots,"default",{},void 0,!0)]),_:3},8,["type","class"]))}}),[["__scopeId","data-v-aa5af746"]]);const ma=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},QC=ma("x-circle","0 0 256 256",'<path d="M162.83,98.83,133.66,128l29.17,29.17a4,4,0,0,1-5.66,5.66L128,133.66,98.83,162.83a4,4,0,0,1-5.66-5.66L122.34,128,93.17,98.83a4,4,0,0,1,5.66-5.66L128,122.34l29.17-29.17a4,4,0,1,1,5.66,5.66ZM228,128A100,100,0,1,1,128,28,100.11,100.11,0,0,1,228,128Zm-8,0a92,92,0,1,0-92,92A92.1,92.1,0,0,0,220,128Z"/>'),ek=ma("x-circle","0 0 256 256",'<path d="M164.24,100.24,136.48,128l27.76,27.76a6,6,0,1,1-8.48,8.48L128,136.48l-27.76,27.76a6,6,0,0,1-8.48-8.48L119.52,128,91.76,100.24a6,6,0,0,1,8.48-8.48L128,119.52l27.76-27.76a6,6,0,0,1,8.48,8.48ZM230,128A102,102,0,1,1,128,26,102.12,102.12,0,0,1,230,128Zm-12,0a90,90,0,1,0-90,90A90.1,90.1,0,0,0,218,128Z"/>'),y6=ma("x-circle","0 0 256 256",'<path d="M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"/>'),tk=ma("x-circle","0 0 256 256",'<path d="M168.49,104.49,145,128l23.52,23.51a12,12,0,0,1-17,17L128,145l-23.51,23.52a12,12,0,0,1-17-17L111,128,87.51,104.49a12,12,0,0,1,17-17L128,111l23.51-23.52a12,12,0,0,1,17,17ZM236,128A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128Z"/>'),ik=ma("x-circle","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,130.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32L139.31,128Z"/>'),rk=ma("x-circle","0 0 256 256",'<path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"/><path d="M165.66,101.66,139.31,128l26.35,26.34a8,8,0,0,1-11.32,11.32L128,139.31l-26.34,26.35a8,8,0,0,1-11.32-11.32L116.69,128,90.34,101.66a8,8,0,0,1,11.32-11.32L128,116.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM232,128A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z"/>'),nk="x-circle",sk=Object.freeze(Object.defineProperty({__proto__:null,bold:tk,default:y6,duotone:rk,fill:ik,glyphName:nk,light:ek,regular:y6,thin:QC},Symbol.toStringTag,{value:"Module"})),va=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},ak=va("note","0 0 256 256",'<path d="M92,96a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H96A4,4,0,0,1,92,96Zm4,36h64a4,4,0,0,0,0-8H96a4,4,0,0,0,0,8Zm32,24H96a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8ZM220,48V156.69a11.9,11.9,0,0,1-3.52,8.48l-51.31,51.32a11.93,11.93,0,0,1-8.48,3.51H48a12,12,0,0,1-12-12V48A12,12,0,0,1,48,36H208A12,12,0,0,1,220,48ZM48,212H156V160a4,4,0,0,1,4-4h52V48a4,4,0,0,0-4-4H48a4,4,0,0,0-4,4V208A4,4,0,0,0,48,212Zm158.35-48H164v42.35Z"/>'),lk=va("note","0 0 256 256",'<path d="M90,96a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H96A6,6,0,0,1,90,96Zm6,38h64a6,6,0,0,0,0-12H96a6,6,0,0,0,0,12Zm32,20H96a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12ZM222,48V156.69a13.94,13.94,0,0,1-4.1,9.9L166.59,217.9a13.94,13.94,0,0,1-9.9,4.1H48a14,14,0,0,1-14-14V48A14,14,0,0,1,48,34H208A14,14,0,0,1,222,48ZM48,210H154V160a6,6,0,0,1,6-6h50V48a2,2,0,0,0-2-2H48a2,2,0,0,0-2,2V208A2,2,0,0,0,48,210Zm153.52-44H166v35.52Z"/>'),w6=va("note","0 0 256 256",'<path d="M88,96a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,96Zm8,40h64a8,8,0,0,0,0-16H96a8,8,0,0,0,0,16Zm32,16H96a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16ZM224,48V156.69A15.86,15.86,0,0,1,219.31,168L168,219.31A15.86,15.86,0,0,1,156.69,224H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48ZM48,208H152V160a8,8,0,0,1,8-8h48V48H48Zm120-40v28.7L196.69,168Z"/>'),ok=va("note","0 0 256 256",'<path d="M84,108A12,12,0,0,1,96,96h64a12,12,0,0,1,0,24H96A12,12,0,0,1,84,108Zm32,28H96a12,12,0,0,0,0,24h20a12,12,0,0,0,0-24ZM228,48V156.69a19.86,19.86,0,0,1-5.86,14.14l-51.31,51.31A19.86,19.86,0,0,1,156.69,228H48a20,20,0,0,1-20-20V48A20,20,0,0,1,48,28H208A20,20,0,0,1,228,48ZM52,204h92V156a12,12,0,0,1,12-12h48V52H52Zm139-36H168v23Z"/>'),ck=va("note","0 0 256 256",'<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H156.69A15.92,15.92,0,0,0,168,219.31L219.31,168A15.92,15.92,0,0,0,224,156.69V48A16,16,0,0,0,208,32ZM96,88h64a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16Zm32,80H96a8,8,0,0,1,0-16h32a8,8,0,0,1,0,16ZM96,136a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm64,68.69V160h44.7Z"/>'),uk=va("note","0 0 256 256",'<path d="M216,160l-56,56V160Z" opacity="0.2"/><path d="M88,96a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H96A8,8,0,0,1,88,96Zm8,40h64a8,8,0,0,0,0-16H96a8,8,0,0,0,0,16Zm32,16H96a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16ZM224,48V156.69A15.86,15.86,0,0,1,219.31,168L168,219.31A15.86,15.86,0,0,1,156.69,224H48a16,16,0,0,1-16-16V48A16,16,0,0,1,48,32H208A16,16,0,0,1,224,48ZM48,208H152V160a8,8,0,0,1,8-8h48V48H48Zm120-40v28.7L196.69,168Z"/>'),dk="note",hk=Object.freeze(Object.defineProperty({__proto__:null,bold:ok,default:w6,duotone:uk,fill:ck,glyphName:dk,light:lk,regular:w6,thin:ak},Symbol.toStringTag,{value:"Module"}));var Y1=function(e){return e.Info="info",e.Success="success",e.Warning="warning",e.Error="error",e.Neutral="neutral",e}(Y1||{}),X1=function(e){return e.Inline="inline",e.Callout="callout",e}(X1||{}),fk=["role","aria-live"],pk={class:"nb-banner__body"},_k={key:0,class:"nb-banner__title"},mk={key:1,class:"nb-banner__text"},vk={key:1,class:"nb-banner__actions"},gk=["aria-label"],Xc=nt(Re({__name:"Banner",props:{status:{default:Y1.Info},variant:{default:X1.Inline},title:{},dismissible:{type:Boolean,default:!1},icon:{},hideIcon:{type:Boolean,default:!1},flush:{type:Boolean,default:!1},closeLabel:{default:"Dismiss"}},emits:["dismiss"],setup(e,{emit:t}){let i=e,r=t,n=Fr(),s=j(()=>!!n.default),a=j(()=>!!n.action),l=j(()=>i.dismissible&&i.variant!==X1.Callout),o=j(()=>i.status===Y1.Error),c=q(!1);function u(){c.value=!0,r("dismiss")}let d={info:Q4,success:zh,warning:av,error:sk,neutral:hk};return(h,f)=>c.value?z("",!0):(m(),M("div",{key:0,class:Le(["nb-banner",`nb-banner--${i.status}`,`nb-banner--${i.variant}`,{"nb-banner--flush":i.flush}]),role:o.value?"alert":"status","aria-live":o.value?"assertive":"polite"},[i.hideIcon?z("",!0):(m(),me(Ue,{key:0,name:i.icon??d[i.status],size:18,weight:"fill",class:"nb-banner__icon","aria-hidden":"true"},null,8,["name"])),b("p",pk,[i.title?(m(),M("strong",_k,F(i.title),1)):z("",!0),s.value?(m(),M("span",mk,[He(h.$slots,"default",{},void 0,!0)])):z("",!0)]),a.value?(m(),M("div",vk,[He(h.$slots,"action",{},void 0,!0)])):z("",!0),l.value?(m(),M("button",{key:2,type:"button",class:"nb-banner__close","aria-label":i.closeLabel,onClick:u},[G(Ue,{name:de(_s),size:14},null,8,["name"])],8,gk)):z("",!0)],10,fk))}}),[["__scopeId","data-v-bf09999e"]]),bk={key:0,class:"nb-chart__header"},yk={key:0,class:"nb-chart__title"},wk={key:1,class:"nb-chart__subtitle"},Wh=nt(Re({__name:"ChartFrame",props:{title:{default:void 0},subtitle:{default:void 0},height:{default:280},showLegend:{type:Boolean,default:!0}},setup(e,{expose:t}){let i=e,r=q(null),n=j(()=>{let s=i.height;return typeof s=="number"||/^\d+(\.\d+)?$/.test(s)?`${s}px`:s});return t({viewport:r}),(s,a)=>(m(),M("figure",{class:"nb-chart",style:_i({height:n.value})},[e.title||e.subtitle?(m(),M("figcaption",bk,[e.title?(m(),M("h4",yk,F(e.title),1)):z("",!0),e.subtitle?(m(),M("p",wk,F(e.subtitle),1)):z("",!0)])):z("",!0),b("div",{ref_key:"viewport",ref:r,class:"nb-chart__viewport"},[He(s.$slots,"default",{},void 0,!0)],512),e.showLegend?He(s.$slots,"legend",{key:1},void 0,!0):z("",!0)],4))}}),[["__scopeId","data-v-0b28100e"]]),Sk={key:0,class:"nb-chart__tooltip-title"},Ck={class:"nb-chart__tooltip-rows"},kk={class:"nb-chart__tooltip-label"},Ak={class:"nb-chart__tooltip-value"},jh=nt(Re({__name:"ChartTooltip",props:{visible:{type:Boolean},x:{},y:{},title:{},rows:{}},setup(e){return(t,i)=>(m(),me(Ch,{name:"nb-chart-tooltip"},{default:te(()=>[e.visible?(m(),M("div",{key:0,class:"nb-chart__tooltip",style:_i({transform:`translate(${e.x}px, ${e.y}px)`}),role:"tooltip"},[e.title?(m(),M("div",Sk,F(e.title),1)):z("",!0),b("ul",Ck,[(m(!0),M(ke,null,Fe(e.rows,(r,n)=>(m(),M("li",{key:`${r.label}-${n}`,class:"nb-chart__tooltip-row"},[b("span",{class:"nb-chart__tooltip-swatch",style:_i({background:r.color})},null,4),b("span",kk,F(r.label),1),b("span",Ak,F(r.value),1)]))),128))])],4)):z("",!0)]),_:1}))}}),[["__scopeId","data-v-03e0b7bb"]]),hc=["var(--nb-c-chart-1)","var(--nb-c-chart-2)","var(--nb-c-chart-3)","var(--nb-c-chart-4)","var(--nb-c-chart-5)","var(--nb-c-chart-6)","var(--nb-c-chart-7)","var(--nb-c-chart-8)"],Kh=(e,t=hc)=>{let i=t.length>0?t:hc;return i[((Number.isFinite(e)?Math.trunc(e):0)%i.length+i.length)%i.length]},Mk={class:"nb-chart__legend"},Ek={class:"nb-chart__legend-label"},uv=nt(Re({__name:"ChartLegend",props:{items:{}},setup(e){return(t,i)=>(m(),M("ul",Mk,[(m(!0),M(ke,null,Fe(e.items,r=>(m(),M("li",{key:r.label,class:"nb-chart__legend-item"},[b("span",{class:"nb-chart__legend-swatch",style:_i({background:r.color})},null,4),b("span",Ek,F(r.label),1)]))),128))]))}}),[["__scopeId","data-v-401d7d8b"]]),fc=(e,t)=>{let[i,r]=e,[n,s]=t,a=r-i||1,l=o=>n+(o-i)/a*(s-n);return l.domain=e,l.range=t,l.ticks=(o=5)=>$k(i,r,o),l},Lk=(e,t,i=.2)=>{let[r,n]=t,s=(n-r)/Math.max(e.length,1),a=s*(1-i),l=(s-a)/2,o=new Map(e.map((u,d)=>[u,d])),c=u=>{let d=o.get(u);return d===void 0?r:r+d*s+l};return c.bandwidth=a,c.domain=e,c.range=t,c},$k=(e,t,i=5)=>{if(e===t)return[e];let r=t-e,n=r/Math.max(i,1),s=10**Math.floor(Math.log10(n)),a=[1,2,5,10].map(u=>u*s),l=a.find(u=>r/u<=i*1.5)??a[a.length-1],o=Math.ceil(e/l)*l,c=[];for(let u=o;u<=t+l/2;u+=l)c.push(Number(u.toFixed(10)));return c},qh=(e,t,i=.05)=>{if(e===t){let n=Math.abs(e)||1;return[e-n,t+n]}let r=(t-e)*i;return[e-r,t+r]},Gh=(e,t={width:480,height:280})=>{let i=q({...t}),r=null;return lt(()=>{!e.value||typeof ResizeObserver>"u"||(r=new ResizeObserver(n=>{let s=n[0];if(!s)return;let{width:a,height:l}=s.contentRect;i.value={width:Math.max(0,Math.round(a)),height:Math.max(0,Math.round(l))}}),r.observe(e.value))}),mi(()=>{r==null||r.disconnect(),r=null}),i},xk=["width","height","role","aria-label"],Tk={key:0},Hk=["x1","x2","y1","y2"],Nk={class:"nb-chart__axis"},Pk=["x","y","text-anchor","dominant-baseline"],Ok={class:"nb-chart__axis"},Rk=["x","y","text-anchor","dominant-baseline"],Ik=["x1","x2","y1","y2"],Dk=["fill","tabindex","role","aria-label","onKeydown"],Vk={class:"nb-chart__hover-layer"},Zk=["onMouseenter","onMousemove","onClick"],Bk=nt(Re({__name:"BarChart",props:{series:{default:()=>[]},orientation:{default:"vertical"},stacked:{type:Boolean,default:!1},valueFormatter:{},title:{default:void 0},subtitle:{default:void 0},height:{default:280},showLegend:{type:Boolean,default:!0},showTooltip:{type:Boolean,default:!0},showGrid:{type:Boolean,default:!0},colors:{default:()=>hc}},emits:["select"],setup(e,{emit:t}){let i=e,r=t,n=q(null),s=Gh(n,{width:480,height:240}),a=j(()=>i.orientation==="horizontal"),l=j(()=>i.series.map((re,X)=>({name:re.name,data:re.data,color:re.color??Kh(X,i.colors)}))),o=j(()=>{var re;return(((re=i.series[0])==null?void 0:re.data)??[]).map(X=>X.x)}),c=(re,X)=>{var le,ve;return((ve=(le=l.value[X])==null?void 0:le.data[re])==null?void 0:ve.y)??0},u=(re,X)=>{let le=c(re,X);if(!i.stacked)return[0,le];let ve=0;for(let ue=0;ue<X;ue+=1){let he=c(re,ue);he>=0==le>=0&&(ve+=he)}return[ve,ve+le]},d=j(()=>{let re=[];return o.value.forEach((X,le)=>{l.value.forEach((ve,ue)=>{re.push(u(le,ue)[1])})}),re.length?qh(Math.min(0,...re),Math.max(0,...re),.05):[0,1]}),h=j(()=>{if(!a.value)return{top:12,right:16,bottom:28,left:44};let re=o.value.reduce((le,ve)=>Math.max(le,String(ve).length),0),X=Math.max(44,Math.round(s.value.width*.4));return{top:12,right:16,bottom:28,left:Math.min(Math.max(44,Math.ceil(re*6.2)+12),X)}}),f=j(()=>({x0:h.value.left,x1:Math.max(h.value.left,s.value.width-h.value.right),y0:h.value.top,y1:Math.max(h.value.top,s.value.height-h.value.bottom)})),v=j(()=>Lk(o.value.map(re=>String(re)),a.value?[f.value.y0,f.value.y1]:[f.value.x0,f.value.x1],.2)),p=j(()=>fc(d.value,a.value?[f.value.x0,f.value.x1]:[f.value.y1,f.value.y0])),S=j(()=>p.value.ticks(5)),_=re=>v.value(String(o.value[re])),w=re=>_(re)+v.value.bandwidth/2,C=j(()=>{let re=l.value.length||1;return i.stacked?v.value.bandwidth:v.value.bandwidth/re}),g=(re,X)=>{let[le,ve]=u(re,X),ue=p.value(le),he=p.value(ve),ye=Math.max(0,C.value-2),U=_(re)+(i.stacked?0:X*C.value),fe=Math.max(0,Math.abs(he-ue));return a.value?{x:Math.min(ue,he),y:U,width:fe,height:ye}:{x:U,y:Math.min(ue,he),width:ye,height:fe}},E=re=>{let X=_(re),le=v.value.bandwidth;return a.value?{x:f.value.x0,y:X,width:Math.max(0,f.value.x1-f.value.x0),height:le}:{x:X,y:f.value.y0,width:le,height:Math.max(0,f.value.y1-f.value.y0)}},T=re=>Math.abs(re)>=1e3?`${(re/1e3).toFixed(1)}k`:String(re),L=re=>i.valueFormatter?i.valueFormatter(re):T(re),V=wi(),P=()=>{var re;return!!((re=V==null?void 0:V.vnode.props)!=null&&re.onSelect)},Y=(re,X)=>{let le=l.value[X],ve=L(c(re,X));return l.value.length>1?`${o.value[re]}, ${le==null?void 0:le.name}: ${ve}`:`${o.value[re]}: ${ve}`},W=(re,X)=>{let le=l.value[X],ve=le==null?void 0:le.data[re];return{kind:"series",x:(ve==null?void 0:ve.x)??o.value[re],y:(ve==null?void 0:ve.y)??0,seriesName:(le==null?void 0:le.name)??"",seriesIndex:X,index:re,point:ve??{x:o.value[re],y:0}}},A=re=>{let X=re.currentTarget.ownerSVGElement;if(!X)return null;let le=X.getBoundingClientRect();return{x:re.clientX-le.left,y:re.clientY-le.top}},$=(re,X)=>{let le=l.value.length;if(le<=1)return 0;let ve=A(re);if(!ve)return 0;if(i.stacked){let ye=a.value?ve.x:ve.y;for(let U=0;U<le;U+=1){let[fe,ge]=u(X,U),se=p.value(fe),x=p.value(ge);if(ye>=Math.min(se,x)&&ye<=Math.max(se,x))return U}return le-1}let ue=(a.value?ve.y:ve.x)-_(X),he=Math.floor(ue/(C.value||1));return Math.min(Math.max(he,0),le-1)},Z=(re,X)=>{P()&&r("select",W(X,$(re,X)))},ie=(re,X,le)=>{P()&&(re.key!=="Enter"&&re.key!==" "||(re.preventDefault(),r("select",W(X,le))))},ne=q(null),ce=q({x:0,y:0}),J=(re,X)=>{let le=A(re);le&&(ce.value={x:le.x+12,y:le.y+12},ne.value=X)},ae=j(()=>ne.value===null?[]:l.value.map(re=>{let X=re.data[ne.value];return{label:re.name,value:(X==null?void 0:X.label)??L((X==null?void 0:X.y)??0),color:re.color}}));return(re,X)=>(m(),me(Wh,{title:e.title,subtitle:e.subtitle,height:e.height,"show-legend":e.showLegend&&l.value.length>0},{legend:te(()=>[G(uv,{items:l.value.map(le=>({label:le.name,color:le.color}))},null,8,["items"])]),default:te(()=>[b("div",{ref_key:"root",ref:n,class:"nb-bar-chart"},[(m(),M("svg",{width:de(s).width,height:de(s).height,class:Le(["nb-chart__svg",{"nb-chart__svg--selectable":P()}]),role:P()?"group":"img","aria-label":e.title||"Bar chart",onMouseleave:X[0]||(X[0]=le=>ne.value=null)},[e.showGrid&&de(s).width>0?(m(),M("g",Tk,[(m(!0),M(ke,null,Fe(S.value,le=>(m(),M("line",{key:`grid-${le}`,class:"nb-chart__gridline",x1:a.value?p.value(le):f.value.x0,x2:a.value?p.value(le):f.value.x1,y1:a.value?f.value.y0:p.value(le),y2:a.value?f.value.y1:p.value(le)},null,8,Hk))),128))])):z("",!0),b("g",Nk,[(m(!0),M(ke,null,Fe(S.value,le=>(m(),M("text",{key:`vt-${le}`,x:a.value?p.value(le):f.value.x0-6,y:a.value?f.value.y1+14:p.value(le),"text-anchor":a.value?"middle":"end","dominant-baseline":a.value?"auto":"middle"},F(L(le)),9,Pk))),128))]),b("g",Ok,[(m(!0),M(ke,null,Fe(o.value,(le,ve)=>(m(),M("text",{key:`ct-${ve}`,x:a.value?f.value.x0-6:w(ve),y:a.value?w(ve):f.value.y1+14,"text-anchor":a.value?"end":"middle","dominant-baseline":a.value?"middle":"auto"},F(le),9,Rk))),128))]),b("line",{class:"nb-chart__axis-line",x1:a.value?p.value(0):f.value.x0,x2:a.value?p.value(0):f.value.x1,y1:a.value?f.value.y0:p.value(0),y2:a.value?f.value.y1:p.value(0)},null,8,Ik),(m(!0),M(ke,null,Fe(o.value,(le,ve)=>(m(),M("g",{key:`g-${ve}`},[(m(!0),M(ke,null,Fe(l.value,(ue,he)=>(m(),M("rect",Wt({key:`${ve}-${he}`,class:["nb-chart__bar",{"is-dim":ne.value!==null&&ne.value!==ve}]},{ref_for:!0},g(ve,he),{fill:ue.color,tabindex:P()?0:void 0,role:P()?"button":void 0,"aria-label":P()?Y(ve,he):void 0,onKeydown:ye=>ie(ye,ve,he)}),null,16,Dk))),128))]))),128)),b("g",Vk,[(m(!0),M(ke,null,Fe(o.value,(le,ve)=>(m(),M("rect",Wt({key:`hover-${ve}`},{ref_for:!0},E(ve),{fill:"transparent",onMouseenter:ue=>ne.value=ve,onMousemove:ue=>J(ue,ve),onClick:ue=>Z(ue,ve)}),null,16,Zk))),128))])],42,xk)),G(jh,{visible:e.showTooltip&&ne.value!==null,x:ce.value.x,y:ce.value.y,title:ne.value===null?"":String(o.value[ne.value]),rows:ae.value},null,8,["visible","x","y","title","rows"])],512)]),_:1},8,["title","subtitle","height","show-legend"]))}}),[["__scopeId","data-v-7b3d7ee4"]]),eo=0,Lr=null;function to(){if(!Lr)return;let e=document.documentElement.style;e.setProperty("--nb-vvh",`${Lr.height}px`),e.setProperty("--nb-vvt",`${Lr.offsetTop}px`)}function Fk(){eo+=1,!(eo>1)&&(Lr=typeof window<"u"?window.visualViewport:null,Lr&&(Lr.addEventListener("resize",to),Lr.addEventListener("scroll",to),to()))}function zk(){if(eo===0||(--eo,eo>0))return;Lr&&(Lr=(Lr.removeEventListener("resize",to),Lr.removeEventListener("scroll",to),null));let e=document.documentElement.style;e.removeProperty("--nb-vvh"),e.removeProperty("--nb-vvt")}function Uk(e){let{phone:t}=Bo(),i=!1;function r(n){n!==i&&(i=n,n?Fk():zk())}De(()=>e()&&t.value,r,{immediate:!0}),U0(()=>r(!1))}const ga=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},Wk=ga("caret-left","0 0 256 256",'<path d="M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z"/>'),jk=ga("caret-left","0 0 256 256",'<path d="M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z"/>'),S6=ga("caret-left","0 0 256 256",'<path d="M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"/>'),Kk=ga("caret-left","0 0 256 256",'<path d="M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z"/>'),qk=ga("caret-left","0 0 256 256",'<path d="M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z"/>'),Gk=ga("caret-left","0 0 256 256",'<path d="M160,48V208L80,128Z" opacity="0.2"/><path d="M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z"/>'),Yk="caret-left",dv=Object.freeze(Object.defineProperty({__proto__:null,bold:Kk,default:S6,duotone:Gk,fill:qk,glyphName:Yk,light:jk,regular:S6,thin:Wk},Symbol.toStringTag,{value:"Module"}));var Xk=["width","height","role","aria-hidden","aria-labelledby","focusable"],Jk=["id"],Qk=["id"],eA=["id"],tA=["id"],iA=["id"],rA=["id"],nA=["id"],sA=["id"],aA=["id"],lA=["id"],oA={transform:"matrix(0.924856, 0, 0, 0.924856, -44.998852, -33.191986)"},cA={id:"group-1"},uA=["fill"],dA=["fill"],hA=["fill"],fA={id:"object-1"},pA=["fill"],_A=["fill"],mA=["fill"],vA=["fill"],gA={id:"object-2"},bA=["fill"],yA=["fill"],wA=["fill"],SA=["fill"],CA=["fill"],kA=Re({__name:"NubiscoMark",props:{size:{default:20},title:{default:void 0}},setup(e){let t=e,i=`nb-nubisco-mark-${Pi()}`,r=`${i}-title`,n=j(()=>typeof t.size=="number"?`${t.size}px`:t.size);return(s,a)=>(m(),M("svg",{width:n.value,height:n.value,viewBox:"0 0 320 320",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:t.title?"img":void 0,"aria-hidden":t.title?void 0:"true","aria-labelledby":t.title?r:void 0,focusable:t.title?void 0:"false"},[t.title?(m(),M("title",{key:0,id:r},F(t.title),1)):z("",!0),b("defs",null,[b("linearGradient",{id:`${i}-g1`,gradientUnits:"userSpaceOnUse",x1:"119.61",y1:"36.855",x2:"119.61",y2:"381.922",spreadMethod:"pad",gradientTransform:"matrix(-0.887141, -0.461497, 0.40987, -0.999167, 140.11236, 473.94595)"},[...a[0]||(a[0]=[b("stop",{offset:"0","stop-color":"rgb(254,216,103)"},null,-1),b("stop",{offset:"0.51","stop-color":"rgb(250,71,78)"},null,-1),b("stop",{offset:"1","stop-color":"rgb(173,55,159)"},null,-1)])],8,Jk),b("linearGradient",{id:`${i}-g3`,gradientUnits:"userSpaceOnUse",x1:"143.989",y1:"36.855",x2:"143.989",y2:"179.9",gradientTransform:"matrix(0.887207, 0.461371, -0.426978, 0.821069, 78.224142, -58.961861)"},[...a[1]||(a[1]=[b("stop",{offset:"0","stop-color":"rgb(0,0,0)","stop-opacity":"0.17"},null,-1),b("stop",{offset:"1","stop-color":"rgb(0,0,0)","stop-opacity":"0.03"},null,-1)])],8,Qk),b("linearGradient",{id:`${i}-g2`,gradientUnits:"userSpaceOnUse",x1:"91.703",y1:"328.267",x2:"91.703",y2:"381.922",gradientTransform:"matrix(-0.601925, -0.798552, 1.256661, -1.089764, -307.90801, 812.885223)"},[...a[2]||(a[2]=[b("stop",{offset:"0","stop-color":"rgb(0,0,0)","stop-opacity":"0.38"},null,-1),b("stop",{offset:"1","stop-color":"rgb(0,0,0)","stop-opacity":"0.2"},null,-1)])],8,eA),b("linearGradient",{id:`${i}-g8`,gradientUnits:"userSpaceOnUse",x1:"348.688",y1:"35.889",x2:"348.688",y2:"116.548",gradientTransform:"matrix(-0.503716, -0.863869, 1.170135, -0.682295, 434.155647, 419.539108)"},[...a[3]||(a[3]=[b("stop",{offset:"0","stop-color":"rgb(254,171,107)","stop-opacity":"0.56"},null,-1),b("stop",{offset:"0.745","stop-color":"rgb(255,253,207)"},null,-1),b("stop",{offset:"1","stop-color":"rgb(255,253,207)"},null,-1)])],8,tA),b("linearGradient",{id:`${i}-g10`,gradientUnits:"userSpaceOnUse",x1:"338.142",y1:"47.006",x2:"338.142",y2:"121.215",gradientTransform:"matrix(0.75452, 0.656277, -1.016572, 1.16875, 168.120543, -239.018367)"},[...a[4]||(a[4]=[b("stop",{offset:"0","stop-color":"rgb(255,255,255)","stop-opacity":"0.35"},null,-1),b("stop",{offset:"0.611","stop-color":"rgb(255,255,255)","stop-opacity":"0.2"},null,-1),b("stop",{offset:"0.656","stop-color":"rgb(255,255,255)","stop-opacity":"0.09"},null,-1),b("stop",{offset:"1","stop-color":"rgb(255,255,255)","stop-opacity":"0.05"},null,-1)])],8,iA),b("linearGradient",{id:`${i}-g7`,gradientUnits:"userSpaceOnUse",x1:"286.279",y1:"128.145",x2:"286.279",y2:"381.893",gradientTransform:"matrix(0.980122, -0.198399, 0.201333, 0.99503, -34.83682, 58.72465)"},[...a[5]||(a[5]=[b("stop",{offset:"0","stop-color":"rgb(94,33,120)","stop-opacity":"0"},null,-1),b("stop",{offset:"0.23","stop-color":"rgb(94,33,116)","stop-opacity":"0"},null,-1),b("stop",{offset:"1","stop-color":"rgb(94,32,119)","stop-opacity":"0.77"},null,-1)])],8,rA),b("linearGradient",{id:`${i}-g0`,gradientUnits:"userSpaceOnUse",x1:"220.396",y1:"36.815",x2:"220.396",y2:"381.893",gradientTransform:"matrix(0.909593, -0.415502, 0.458149, 0.999272, -61.507814, 91.882297)"},[...a[6]||(a[6]=[b("stop",{offset:"0","stop-color":"rgb(105,187,99)"},null,-1),b("stop",{offset:"0.5","stop-color":"rgb(16,169,164)"},null,-1),b("stop",{offset:"1","stop-color":"rgb(11,130,207)"},null,-1)])],8,nA),b("linearGradient",{id:`${i}-g4`,gradientUnits:"userSpaceOnUse",x1:"197.5",y1:"36.815",x2:"197.5",y2:"132.342",gradientTransform:"matrix(0.419296, -0.90785, 1.050658, 0.485253, 18.526692, 214.196105)"},[...a[7]||(a[7]=[b("stop",{offset:"0","stop-color":"rgb(255,255,255)","stop-opacity":"0.45"},null,-1),b("stop",{offset:"1","stop-color":"rgb(7,226,201)","stop-opacity":"0.85"},null,-1)])],8,sA),b("linearGradient",{id:`${i}-g5`,gradientUnits:"userSpaceOnUse",x1:"197.5",y1:"59.48",x2:"197.5",y2:"132.342",gradientTransform:"matrix(0.450388, -0.892832, 1.886975, 0.951884, -71.46741, 184.345316)"},[...a[8]||(a[8]=[b("stop",{offset:"0","stop-color":"rgb(255,255,255)","stop-opacity":"0.6"},null,-1),b("stop",{offset:"0.461","stop-color":"rgb(255,255,255)","stop-opacity":"0.71"},null,-1),b("stop",{offset:"1","stop-color":"rgb(255,255,255)","stop-opacity":"0.82"},null,-1)])],8,aA),b("linearGradient",{id:`${i}-g6`,gradientUnits:"userSpaceOnUse",x1:"258.091",y1:"319.547",x2:"258.091",y2:"338.393",gradientTransform:"matrix(0.172631, -0.984987, 3.998703, 0.700821, -1101.160809, 355.271073)"},[...a[9]||(a[9]=[b("stop",{offset:"0","stop-color":"rgb(5,219,226)","stop-opacity":"0.96"},null,-1),b("stop",{offset:"0.493","stop-color":"rgb(5,219,226)","stop-opacity":"0.74"},null,-1),b("stop",{offset:"1","stop-color":"rgb(5,219,226)","stop-opacity":"0.34"},null,-1)])],8,lA)]),b("g",oA,[b("g",cA,[b("path",{fill:`url(#${i}-g1)`,d:"M 48.655 381.922 C 119.827 257.14 51.704 41.212 190.566 36.855 C 173.148 402.723 82.723 380.123 48.655 381.922 Z"},null,8,uA),b("path",{fill:`url(#${i}-g3)`,d:"M 177.776 179.9 C 120.488 51.712 97.413 142.969 97.413 142.969 C 107.668 83.266 128.325 38.808 190.566 36.855 C 187.88 93.268 183.459 140.445 177.776 179.9 Z"},null,8,dA),b("path",{fill:`url(#${i}-g2)`,d:"M 48.655 381.922 C 58.078 365.401 65.06 347.282 70.403 328.267 C 88.094 346.662 134.752 331.941 134.752 331.941 C 103.379 387.36 67.445 380.93 48.655 381.922 Z"},null,8,hA),a[10]||(a[10]=b("path",{fill:"rgb(255,254,155)",d:"M 134.752 331.941 C 121.122 337.936 81.551 344.779 70.403 328.267 C 88.094 346.662 134.752 331.941 134.752 331.941 Z"},null,-1))]),b("g",fA,[b("path",{fill:`url(#${i}-g1)`,d:"M 313.875 381.893 C 288.098 381.893 268.627 375.477 253.751 364.466 C 216.182 182.535 312.866 21.948 394.655 36.85 C 335.339 159.09 350.166 381.893 313.875 381.893 Z"},null,8,pA),b("path",{fill:`url(#${i}-g8)`,d:"M 367.694 116.548 C 367.694 116.548 352.527 74.893 302.72 88.001 C 329.996 51.072 363.412 31.158 394.655 36.85 C 383.206 60.444 374.519 87.785 367.694 116.548 Z"},null,8,_A),a[11]||(a[11]=b("path",{fill:"rgb(255,255,255)","fill-opacity":"0.46",d:"M 367.694 116.548 C 367.694 116.548 352.527 74.893 302.72 88.001 C 352.21 71.129 367.694 116.548 367.694 116.548 Z"},null,-1)),b("path",{fill:`url(#${i}-g10)`,d:"M 384.493 47.025 C 335.553 54.802 291.791 121.215 291.791 121.215 C 291.791 121.215 326.809 45.627 384.493 47.025 Z"},null,8,mA),b("path",{fill:`url(#${i}-g7)`,d:"M 313.875 381.893 C 288.098 381.893 268.627 375.477 253.751 364.466 C 235.099 274.144 249.538 189.083 278.815 128.145 C 290.999 161.58 298.453 349.688 327.158 367.997 C 323.596 376.899 319.308 381.893 313.875 381.893 Z"},null,8,vA)]),b("g",gA,[b("path",{fill:`url(#${i}-g0)`,d:"M 313.875 381.893 C 139.653 381.893 253.533 88.786 126.916 65.199 C 141.046 48.182 160.854 37.738 190.253 36.815 C 311.395 48.025 251.672 276.857 313.875 381.893 Z"},null,8,bA),b("path",{fill:`url(#${i}-g4)`,d:"M 268.085 132.342 C 268.085 132.342 206.404 63.594 126.916 65.199 C 141.046 48.182 160.854 37.738 190.253 36.815 C 238.545 41.284 258.095 80.336 268.085 132.342 Z"},null,8,yA),b("path",{fill:`url(#${i}-g5)`,d:"M 268.085 132.342 C 268.085 132.342 206.404 63.594 126.916 65.199 C 183.216 63.321 231.803 93.322 268.085 132.342 Z"},null,8,wA),b("path",{fill:`url(#${i}-g2)`,d:"M 313.875 381.893 C 262.355 381.893 236.028 356.261 221.227 319.547 C 258.674 349.427 294.501 333.052 294.954 334.741 C 299.608 352.085 305.684 368.063 313.875 381.893 Z"},null,8,SA),b("path",{fill:`url(#${i}-g6)`,d:"M 294.954 334.741 C 271.602 341.74 244.333 340.344 221.227 319.547 C 258.674 349.427 294.501 333.052 294.954 334.741 Z"},null,8,CA),a[12]||(a[12]=b("path",{fill:"rgb(255,255,255)","fill-opacity":"0.11",d:"M 164.386 48.742 C 244.371 44.544 268.345 190.719 268.345 190.719 C 249.39 92.792 222.974 38.013 164.386 48.742 Z"},null,-1))])])],8,Xk))}}),hv=function(e){return e.Horizontal="horizontal",e.Vertical="vertical",e}(hv||{}),AA={class:"nb-radio__control"},MA=["name","value","checked","disabled","readonly","onChange"],EA={class:"nb-radio__circle"},LA={key:0,class:"nb-radio__dot"},$A={class:"nb-radio__text"},fv=nt(Re({__name:"Radio",props:{modelValue:{},options:{},name:{},direction:{default:hv.Vertical},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},required:{type:Boolean},id:{default:"radio"},label:{},error:{default:void 0},warning:{default:void 0},helper:{default:void 0}},emits:["update:modelValue"],setup(e){let t=e,i=j(()=>["nb-radio",{"nb-radio--error":!!t.error,"nb-radio--warning":!t.error&&!!t.warning,"nb-radio--disabled":t.disabled,"nb-radio--readonly":t.readonly}]);function r(n){return["nb-radio__option",{"nb-radio__option--disabled":t.disabled||n.disabled,"nb-radio__option--readonly":t.readonly}]}return(n,s)=>(m(),M("div",{class:Le(i.value)},[e.label?(m(),me(la,{key:0},{default:te(()=>[_e(F(e.label),1)]),_:1})):z("",!0),b("div",{class:Le(["nb-radio__group",`nb-radio__group--${e.direction}`])},[(m(!0),M(ke,null,Fe(e.options,a=>(m(),M("label",{key:a.value,class:Le(r(a))},[b("span",AA,[b("input",{type:"radio",name:e.name,value:a.value,checked:e.modelValue===a.value,disabled:e.disabled||a.disabled,readonly:e.readonly,class:"nb-radio__input",onChange:l=>!e.readonly&&n.$emit("update:modelValue",a.value)},null,40,MA),b("span",EA,[e.modelValue===a.value?(m(),M("span",LA)):z("",!0)])]),b("span",$A,F(a.label),1)],2))),128))],2),e.error?(m(),me(ct,{key:1,variant:"error",class:"nb-radio__message"},{default:te(()=>[_e(F(e.error),1)]),_:1})):e.warning?(m(),me(ct,{key:2,variant:"warning",class:"nb-radio__message"},{default:te(()=>[_e(F(e.warning),1)]),_:1})):e.helper?(m(),me(ct,{key:3,variant:"helper",class:"nb-radio__message"},{default:te(()=>[_e(F(e.helper),1)]),_:1})):z("",!0)],2))}}),[["__scopeId","data-v-06b74748"]]),pv={storageKey:"nubisco.theme",defaultTheme:"system",darkClass:"dark"},_v="(prefers-color-scheme: dark)",Ks={...pv},mv=!1,Ms=null,An=q(pv.defaultTheme),pc=q("light");function xA(e){return e==="light"||e==="dark"||e==="system"}function TA(){try{if(typeof localStorage>"u")return null;let e=localStorage.getItem(Ks.storageKey);return xA(e)?e:null}catch{return null}}function HA(e){try{if(typeof localStorage>"u")return;localStorage.setItem(Ks.storageKey,e)}catch{}}function NA(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(_v).matches}function J1(){let e=An.value==="dark"||An.value==="system"&&NA();pc.value=e?"dark":"light",!(typeof document>"u")&&(document.documentElement.classList.toggle(Ks.darkClass,e),document.documentElement.style.colorScheme=pc.value)}function PA(){if(Ms==null||Ms(),Ms=null,typeof window>"u"||typeof window.matchMedia!="function")return;let e=window.matchMedia(_v),t=()=>J1();typeof e.addEventListener=="function"?(e.addEventListener("change",t),Ms=()=>e.removeEventListener("change",t)):typeof e.addListener=="function"&&(e.addListener(t),Ms=()=>e.removeListener(t))}var f0=null;function vv(){An.value=TA()??Ks.defaultTheme,J1(),PA(),f0==null||f0(),f0=De(An,e=>{HA(e),J1()}),mv=!0}function OA(e={}){Ks={...Ks,...e},vv()}function Jc(){return mv||vv(),{theme:Hn(An),resolved:Hn(pc),followsSystem:j(()=>An.value==="system"),setTheme:e=>{An.value=e},toggle:()=>{An.value=pc.value==="dark"?"light":"dark"}}}function RA(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}var C6=typeof window<"u",ys=(e,t=!1)=>t?Symbol.for(e):Symbol(e),IA=(e,t,i)=>DA({l:e,k:t,s:i}),DA=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),li=e=>typeof e=="number"&&isFinite(e),gv=e=>Yh(e)==="[object Date]",_c=e=>Yh(e)==="[object RegExp]",Qc=e=>mt(e)&&Object.keys(e).length===0,xi=Object.assign,VA=Object.create,Vt=(e=null)=>VA(e),ZA,ls=()=>ZA||(ZA=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Vt());function k6(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/\//g,"&#x2F;").replace(/=/g,"&#x3D;")}function A6(e){return e.replace(/&(?![a-zA-Z0-9#]{2,6};)/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function BA(e){return e=e.replace(/(\w+)\s*=\s*"([^"]*)"/g,(t,i,r)=>`${i}="${A6(r)}"`),e=e.replace(/(\w+)\s*=\s*'([^']*)'/g,(t,i,r)=>`${i}='${A6(r)}'`),/\s*on\w+\s*=\s*["']?[^"'>]+["']?/gi.test(e)&&(e=e.replace(/(\s+)(on)(\w+\s*=)/gi,"$1&#111;n$3")),[/(\s+(?:href|src|action|formaction)\s*=\s*["']?)\s*javascript:/gi,/(style\s*=\s*["'][^"']*url\s*\(\s*)javascript:/gi].forEach(t=>{e=e.replace(t,"$1javascript&#58;")}),e}var FA=Object.prototype.hasOwnProperty;function er(e,t){return FA.call(e,t)}var Jt=Array.isArray,Ht=e=>typeof e=="function",ze=e=>typeof e=="string",Dt=e=>typeof e=="boolean",gt=e=>typeof e=="object"&&!!e,zA=e=>gt(e)&&Ht(e.then)&&Ht(e.catch),bv=Object.prototype.toString,Yh=e=>bv.call(e),mt=e=>Yh(e)==="[object Object]",UA=e=>e==null?"":Jt(e)||mt(e)&&e.toString===bv?JSON.stringify(e,null,2):String(e);function Xh(e,t=""){return e.reduce((i,r,n)=>n===0?i+r:i+t+r,"")}var p0=e=>!gt(e)||Jt(e);function P0(e,t){if(p0(e)||p0(t))throw Error("Invalid value");let i=[{src:e,des:t}];for(;i.length;){let{src:r,des:n}=i.pop();Object.keys(r).forEach(s=>{s!=="__proto__"&&(gt(r[s])&&!gt(n[s])&&(n[s]=Array.isArray(r[s])?[]:Vt()),p0(n[s])||p0(r[s])?n[s]=r[s]:i.push({src:r[s],des:n[s]}))})}}function WA(e,t,i){return{line:e,column:t,offset:i}}function Q1(e,t,i){return{start:e,end:t}}var ft={EXPECTED_TOKEN:1,INVALID_TOKEN_IN_PLACEHOLDER:2,UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER:3,UNKNOWN_ESCAPE_SEQUENCE:4,INVALID_UNICODE_ESCAPE_SEQUENCE:5,UNBALANCED_CLOSING_BRACE:6,UNTERMINATED_CLOSING_BRACE:7,EMPTY_PLACEHOLDER:8,NOT_ALLOW_NEST_PLACEHOLDER:9,INVALID_LINKED_FORMAT:10,MUST_HAVE_MESSAGES_IN_PLURAL:11,UNEXPECTED_EMPTY_LINKED_MODIFIER:12,UNEXPECTED_EMPTY_LINKED_KEY:13,UNEXPECTED_LEXICAL_ANALYSIS:14};function eu(e,t,i={}){let{domain:r,messages:n,args:s}=i,a=e,l=SyntaxError(String(a));return l.code=e,t&&(l.location=t),l.domain=r,l}function jA(e){throw e}var br=" ",KA="\r",Mi=`
42
- `,qA="\u2028",GA="\u2029";function YA(e){let t=e,i=0,r=1,n=1,s=0,a=L=>t[L]===KA&&t[L+1]===Mi,l=L=>t[L]===Mi,o=L=>t[L]===GA,c=L=>t[L]===qA,u=L=>a(L)||l(L)||o(L)||c(L),d=()=>i,h=()=>r,f=()=>n,v=()=>s,p=L=>a(L)||o(L)||c(L)?Mi:t[L],S=()=>p(i),_=()=>p(i+s);function w(){return s=0,u(i)&&(r++,n=0),a(i)&&i++,i++,n++,t[i]}function C(){return a(i+s)&&s++,s++,t[i+s]}function g(){i=0,r=1,n=1,s=0}function E(L=0){s=L}function T(){let L=i+s;for(;L!==i;)w();s=0}return{index:d,line:h,column:f,peekOffset:v,charAt:p,currentChar:S,currentPeek:_,next:w,peek:C,reset:g,resetPeek:E,skipToPeek:T}}var Kr=void 0,M6="'",XA="tokenizer";function JA(e,t={}){let i=t.location!==!1,r=YA(e),n=()=>r.index(),s=()=>WA(r.line(),r.column(),r.index()),a=s(),l=n(),o={currentType:13,offset:l,startLoc:a,endLoc:a,lastType:13,lastOffset:l,lastStartLoc:a,lastEndLoc:a,braceNest:0,inLinked:!1,text:""},c=()=>o,{onError:u}=t;function d(y,k,D,...N){let I=c();k.column+=D,k.offset+=D,u&&u(eu(y,i?Q1(I.startLoc,k):null,{domain:XA,args:N}))}function h(y,k,D){y.endLoc=s(),y.currentType=k;let N={type:k};return i&&(N.loc=Q1(y.startLoc,y.endLoc)),D!=null&&(N.value=D),N}let f=y=>h(y,13);function v(y,k){return y.currentChar()===k?(y.next(),k):(d(ft.EXPECTED_TOKEN,s(),0,k),"")}function p(y){let k="";for(;y.currentPeek()===br||y.currentPeek()===Mi;)k+=y.currentPeek(),y.peek();return k}function S(y){let k=p(y);return y.skipToPeek(),k}function _(y){if(y===Kr)return!1;let k=y.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k===95}function w(y){if(y===Kr)return!1;let k=y.charCodeAt(0);return k>=48&&k<=57}function C(y,k){let{currentType:D}=k;if(D!==2)return!1;p(y);let N=_(y.currentPeek());return y.resetPeek(),N}function g(y,k){let{currentType:D}=k;if(D!==2)return!1;p(y);let N=w(y.currentPeek()==="-"?y.peek():y.currentPeek());return y.resetPeek(),N}function E(y,k){let{currentType:D}=k;if(D!==2)return!1;p(y);let N=y.currentPeek()===M6;return y.resetPeek(),N}function T(y,k){let{currentType:D}=k;if(D!==7)return!1;p(y);let N=y.currentPeek()===".";return y.resetPeek(),N}function L(y,k){let{currentType:D}=k;if(D!==8)return!1;p(y);let N=_(y.currentPeek());return y.resetPeek(),N}function V(y,k){let{currentType:D}=k;if(!(D===7||D===11))return!1;p(y);let N=y.currentPeek()===":";return y.resetPeek(),N}function P(y,k){let{currentType:D}=k;if(D!==9)return!1;let N=()=>{let R=y.currentPeek();return R==="{"?_(y.peek()):R==="@"||R==="|"||R===":"||R==="."||R===br||!R?!1:R===Mi?(y.peek(),N()):W(y,!1)},I=N();return y.resetPeek(),I}function Y(y){p(y);let k=y.currentPeek()==="|";return y.resetPeek(),k}function W(y,k=!0){let D=(I=!1,R="")=>{let B=y.currentPeek();return B==="{"||B==="@"||!B?I:B==="|"?!(R===br||R===Mi):B===br?(y.peek(),D(!0,br)):B===Mi?(y.peek(),D(!0,Mi)):!0},N=D();return k&&y.resetPeek(),N}function A(y,k){let D=y.currentChar();return D===Kr?Kr:k(D)?(y.next(),D):null}function $(y){let k=y.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k>=48&&k<=57||k===95||k===36}function Z(y){return A(y,$)}function ie(y){let k=y.charCodeAt(0);return k>=97&&k<=122||k>=65&&k<=90||k>=48&&k<=57||k===95||k===36||k===45}function ne(y){return A(y,ie)}function ce(y){let k=y.charCodeAt(0);return k>=48&&k<=57}function J(y){return A(y,ce)}function ae(y){let k=y.charCodeAt(0);return k>=48&&k<=57||k>=65&&k<=70||k>=97&&k<=102}function re(y){return A(y,ae)}function X(y){let k="",D="";for(;k=J(y);)D+=k;return D}function le(y){let k="";for(;;){let D=y.currentChar();if(D==="\\"){let N=y.peek();N==="{"||N==="}"||N==="@"||N==="|"||N==="\\"?(k+=D+N,y.next(),y.next()):(y.resetPeek(),k+=D,y.next())}else{if(D==="{"||D==="}"||D==="@"||D==="|"||!D)break;if(D===br||D===Mi)if(W(y))k+=D,y.next();else{if(Y(y))break;k+=D,y.next()}else k+=D,y.next()}}return k}function ve(y){S(y);let k="",D="";for(;k=ne(y);)D+=k;let N=y.currentChar();if(N&&N!=="}"&&N!==Kr&&N!==br&&N!==Mi&&N!==" "){let I=se(y);return d(ft.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,D+I),D+I}return y.currentChar()===Kr&&d(ft.UNTERMINATED_CLOSING_BRACE,s(),0),D}function ue(y){S(y);let k="";return y.currentChar()==="-"?(y.next(),k+=`-${X(y)}`):k+=X(y),y.currentChar()===Kr&&d(ft.UNTERMINATED_CLOSING_BRACE,s(),0),k}function he(y){return y!==M6&&y!==Mi}function ye(y){S(y),v(y,"'");let k="",D="";for(;k=A(y,he);)k==="\\"?D+=U(y):D+=k;let N=y.currentChar();return N===Mi||N===Kr?(d(ft.UNTERMINATED_SINGLE_QUOTE_IN_PLACEHOLDER,s(),0),N===Mi&&(y.next(),v(y,"'")),D):(v(y,"'"),D)}function U(y){let k=y.currentChar();switch(k){case"\\":case"'":return y.next(),`\\${k}`;case"u":return fe(y,k,4);case"U":return fe(y,k,6);default:return d(ft.UNKNOWN_ESCAPE_SEQUENCE,s(),0,k),""}}function fe(y,k,D){v(y,k);let N="";for(let I=0;I<D;I++){let R=re(y);if(!R){d(ft.INVALID_UNICODE_ESCAPE_SEQUENCE,s(),0,`\\${k}${N}${y.currentChar()}`);break}N+=R}return`\\${k}${N}`}function ge(y){return y!=="{"&&y!=="}"&&y!==br&&y!==Mi}function se(y){S(y);let k="",D="";for(;k=A(y,ge);)D+=k;return D}function x(y){let k="",D="";for(;k=Z(y);)D+=k;return D}function H(y){let k=D=>{let N=y.currentChar();return N==="{"||N==="@"||N==="|"||N==="("||N===")"||!N||N===br?D:(D+=N,y.next(),k(D))};return k("")}function O(y){S(y);let k=v(y,"|");return S(y),k}function ee(y,k){let D=null;switch(y.currentChar()){case"{":return k.braceNest>=1&&d(ft.NOT_ALLOW_NEST_PLACEHOLDER,s(),0),y.next(),D=h(k,2,"{"),S(y),k.braceNest++,D;case"}":return k.braceNest>0&&k.currentType===2&&d(ft.EMPTY_PLACEHOLDER,s(),0),y.next(),D=h(k,3,"}"),k.braceNest--,k.braceNest>0&&S(y),k.inLinked&&k.braceNest===0&&(k.inLinked=!1),D;case"@":return k.braceNest>0&&d(ft.UNTERMINATED_CLOSING_BRACE,s(),0),D=Q(y,k)||f(k),k.braceNest=0,D;default:{let N=!0,I=!0,R=!0;if(Y(y))return k.braceNest>0&&d(ft.UNTERMINATED_CLOSING_BRACE,s(),0),D=h(k,1,O(y)),k.braceNest=0,k.inLinked=!1,D;if(k.braceNest>0&&(k.currentType===4||k.currentType===5||k.currentType===6))return d(ft.UNTERMINATED_CLOSING_BRACE,s(),0),k.braceNest=0,pe(y,k);if(N=C(y,k))return D=h(k,4,ve(y)),S(y),D;if(I=g(y,k))return D=h(k,5,ue(y)),S(y),D;if(R=E(y,k))return D=h(k,6,ye(y)),S(y),D;if(!N&&!I&&!R)return D=h(k,12,se(y)),d(ft.INVALID_TOKEN_IN_PLACEHOLDER,s(),0,D.value),S(y),D;break}}return D}function Q(y,k){let{currentType:D}=k,N=null,I=y.currentChar();switch((D===7||D===8||D===11||D===9)&&(I===Mi||I===br)&&d(ft.INVALID_LINKED_FORMAT,s(),0),I){case"@":return y.next(),N=h(k,7,"@"),k.inLinked=!0,N;case".":return S(y),y.next(),h(k,8,".");case":":return S(y),y.next(),h(k,9,":");default:return Y(y)?(N=h(k,1,O(y)),k.braceNest=0,k.inLinked=!1,N):T(y,k)||V(y,k)?(S(y),Q(y,k)):L(y,k)?(S(y),h(k,11,x(y))):P(y,k)?(S(y),I==="{"?ee(y,k)||N:h(k,10,H(y))):(D===7&&d(ft.INVALID_LINKED_FORMAT,s(),0),k.braceNest=0,k.inLinked=!1,pe(y,k))}}function pe(y,k){let D={type:13};if(k.braceNest>0)return ee(y,k)||f(k);if(k.inLinked)return Q(y,k)||f(k);switch(y.currentChar()){case"{":return ee(y,k)||f(k);case"}":return d(ft.UNBALANCED_CLOSING_BRACE,s(),0),y.next(),h(k,3,"}");case"@":return Q(y,k)||f(k);default:if(Y(y))return D=h(k,1,O(y)),k.braceNest=0,k.inLinked=!1,D;if(W(y))return h(k,0,le(y));break}return D}function we(){let{currentType:y,offset:k,startLoc:D,endLoc:N}=o;return o.lastType=y,o.lastOffset=k,o.lastStartLoc=D,o.lastEndLoc=N,o.offset=n(),o.startLoc=s(),r.currentChar()===Kr?h(o,13):pe(r,o)}return{nextToken:we,currentOffset:n,currentPosition:s,context:c}}var QA="parser",eM=/(?:\\\\|\\'|\\u([0-9a-fA-F]{4})|\\U([0-9a-fA-F]{6}))/g,tM=/\\([\\@{}|])/g;function iM(e,t){return t}function rM(e,t,i){switch(e){case"\\\\":return"\\";case"\\'":return"'";default:{let r=parseInt(t||i,16);return r<=55295||r>=57344?String.fromCodePoint(r):"�"}}}function nM(e={}){let t=e.location!==!1,{onError:i}=e;function r(_,w,C,g,...E){let T=_.currentPosition();T.offset+=g,T.column+=g,i&&i(eu(w,t?Q1(C,T):null,{domain:QA,args:E}))}function n(_,w,C){let g={type:_};return t&&(g.start=w,g.end=w,g.loc={start:C,end:C}),g}function s(_,w,C,g){t&&(_.end=w,_.loc&&(_.loc.end=C))}function a(_,w){let C=_.context(),g=n(3,C.offset,C.startLoc);return g.value=w.replace(tM,iM),s(g,_.currentOffset(),_.currentPosition()),g}function l(_,w){let{lastOffset:C,lastStartLoc:g}=_.context(),E=n(5,C,g);return E.index=parseInt(w,10),_.nextToken(),s(E,_.currentOffset(),_.currentPosition()),E}function o(_,w){let{lastOffset:C,lastStartLoc:g}=_.context(),E=n(4,C,g);return E.key=w,_.nextToken(),s(E,_.currentOffset(),_.currentPosition()),E}function c(_,w){let{lastOffset:C,lastStartLoc:g}=_.context(),E=n(9,C,g);return E.value=w.replace(eM,rM),_.nextToken(),s(E,_.currentOffset(),_.currentPosition()),E}function u(_){let w=_.nextToken(),C=_.context(),{lastOffset:g,lastStartLoc:E}=C,T=n(8,g,E);return w.type===11?(w.value??r(_,ft.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,yr(w)),T.value=w.value||"",s(T,_.currentOffset(),_.currentPosition()),{node:T}):(r(_,ft.UNEXPECTED_EMPTY_LINKED_MODIFIER,C.lastStartLoc,0),T.value="",s(T,g,E),{nextConsumeToken:w,node:T})}function d(_,w){let C=_.context(),g=n(7,C.offset,C.startLoc);return g.value=w,s(g,_.currentOffset(),_.currentPosition()),g}function h(_){let w=_.context(),C=n(6,w.offset,w.startLoc),g=_.nextToken();if(g.type===8){let E=u(_);C.modifier=E.node,g=E.nextConsumeToken||_.nextToken()}switch(g.type!==9&&r(_,ft.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,yr(g)),g=_.nextToken(),g.type===2&&(g=_.nextToken()),g.type){case 10:g.value??r(_,ft.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,yr(g)),C.key=d(_,g.value||"");break;case 4:g.value??r(_,ft.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,yr(g)),C.key=o(_,g.value||"");break;case 5:g.value??r(_,ft.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,yr(g)),C.key=l(_,g.value||"");break;case 6:g.value??r(_,ft.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,yr(g)),C.key=c(_,g.value||"");break;default:{r(_,ft.UNEXPECTED_EMPTY_LINKED_KEY,w.lastStartLoc,0);let E=_.context(),T=n(7,E.offset,E.startLoc);return T.value="",s(T,E.offset,E.startLoc),C.key=T,s(C,E.offset,E.startLoc),{nextConsumeToken:g,node:C}}}return s(C,_.currentOffset(),_.currentPosition()),{node:C}}function f(_){let w=_.context(),C=n(2,w.currentType===1?_.currentOffset():w.offset,w.currentType===1?w.endLoc:w.startLoc);C.items=[];let g=null;do{let E=g||_.nextToken();switch(g=null,E.type){case 0:E.value??r(_,ft.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,yr(E)),C.items.push(a(_,E.value||""));break;case 5:E.value??r(_,ft.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,yr(E)),C.items.push(l(_,E.value||""));break;case 4:E.value??r(_,ft.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,yr(E)),C.items.push(o(_,E.value||""));break;case 6:E.value??r(_,ft.UNEXPECTED_LEXICAL_ANALYSIS,w.lastStartLoc,0,yr(E)),C.items.push(c(_,E.value||""));break;case 7:{let T=h(_);C.items.push(T.node),g=T.nextConsumeToken||null;break}}}while(w.currentType!==13&&w.currentType!==1);return s(C,w.currentType===1?w.lastOffset:_.currentOffset(),w.currentType===1?w.lastEndLoc:_.currentPosition()),C}function v(_,w,C,g){let E=_.context(),T=g.items.length===0,L=n(1,w,C);L.cases=[],L.cases.push(g);do{let V=f(_);T||(T=V.items.length===0),L.cases.push(V)}while(E.currentType!==13);return T&&r(_,ft.MUST_HAVE_MESSAGES_IN_PLURAL,C,0),s(L,_.currentOffset(),_.currentPosition()),L}function p(_){let w=_.context(),{offset:C,startLoc:g}=w,E=f(_);return w.currentType===13?E:v(_,C,g,E)}function S(_){let w=JA(_,xi({},e)),C=w.context(),g=n(0,C.offset,C.startLoc);return t&&g.loc&&(g.loc.source=_),g.body=p(w),e.onCacheKey&&(g.cacheKey=e.onCacheKey(_)),C.currentType!==13&&r(w,ft.UNEXPECTED_LEXICAL_ANALYSIS,C.lastStartLoc,0,_[C.offset]||""),s(g,w.currentOffset(),w.currentPosition()),g}return{parse:S}}function yr(e){if(e.type===13)return"EOF";let t=(e.value||"").replace(/\r?\n/gu,"\\n");return t.length>10?t.slice(0,9)+"…":t}function sM(e,t={}){let i={ast:e,helpers:new Set};return{context:()=>i,helper:r=>(i.helpers.add(r),r)}}function E6(e,t){for(let i=0;i<e.length;i++)Jh(e[i],t)}function Jh(e,t){switch(e.type){case 1:E6(e.cases,t),t.helper("plural");break;case 2:E6(e.items,t);break;case 6:Jh(e.key,t),t.helper("linked"),t.helper("type");break;case 5:t.helper("interpolate"),t.helper("list");break;case 4:t.helper("interpolate"),t.helper("named");break}}function aM(e,t={}){let i=sM(e);i.helper("normalize"),e.body&&Jh(e.body,i);let r=i.context();e.helpers=Array.from(r.helpers)}function lM(e){let t=e.body;return t.type===2?L6(t):t.cases.forEach(i=>L6(i)),e}function L6(e){if(e.items.length===1){let t=e.items[0];(t.type===3||t.type===9)&&(e.static=t.value,delete t.value)}else{let t=[];for(let i=0;i<e.items.length;i++){let r=e.items[i];if(!(r.type===3||r.type===9)||r.value==null)break;t.push(r.value)}if(t.length===e.items.length){e.static=Xh(t);for(let i=0;i<e.items.length;i++){let r=e.items[i];(r.type===3||r.type===9)&&delete r.value}}}}function Ns(e){switch(e.t=e.type,e.type){case 0:{let t=e;Ns(t.body),t.b=t.body,delete t.body;break}case 1:{let t=e,i=t.cases;for(let r=0;r<i.length;r++)Ns(i[r]);t.c=i,delete t.cases;break}case 2:{let t=e,i=t.items;for(let r=0;r<i.length;r++)Ns(i[r]);t.i=i,delete t.items,t.static&&(t.s=t.static,delete t.static);break}case 3:case 9:case 8:case 7:{let t=e;t.value&&(t.v=t.value,delete t.value);break}case 6:{let t=e;Ns(t.key),t.k=t.key,delete t.key,t.modifier&&(Ns(t.modifier),t.m=t.modifier,delete t.modifier);break}case 5:{let t=e;t.i=t.index,delete t.index;break}case 4:{let t=e;t.k=t.key,delete t.key;break}}delete e.type}function oM(e,t){let{filename:i,breakLineCode:r,needIndent:n}=t,s=t.location!==!1,a={filename:i,code:"",column:1,line:1,offset:0,map:void 0,breakLineCode:r,needIndent:n,indentLevel:0};s&&e.loc&&(a.source=e.loc.source);let l=()=>a;function o(f,v){a.code+=f}function c(f,v=!0){let p=v?r:"";o(n?p+" ".repeat(f):p)}function u(f=!0){let v=++a.indentLevel;f&&c(v)}function d(f=!0){let v=--a.indentLevel;f&&c(v)}function h(){c(a.indentLevel)}return{context:l,push:o,indent:u,deindent:d,newline:h,helper:f=>`_${f}`,needIndent:()=>a.needIndent}}function cM(e,t){let{helper:i}=e;e.push(`${i("linked")}(`),qs(e,t.key),t.modifier?(e.push(", "),qs(e,t.modifier),e.push(", _type")):e.push(", undefined, _type"),e.push(")")}function uM(e,t){let{helper:i,needIndent:r}=e;e.push(`${i("normalize")}([`),e.indent(r());let n=t.items.length;for(let s=0;s<n&&(qs(e,t.items[s]),s!==n-1);s++)e.push(", ");e.deindent(r()),e.push("])")}function dM(e,t){let{helper:i,needIndent:r}=e;if(t.cases.length>1){e.push(`${i("plural")}([`),e.indent(r());let n=t.cases.length;for(let s=0;s<n&&(qs(e,t.cases[s]),s!==n-1);s++)e.push(", ");e.deindent(r()),e.push("])")}}function hM(e,t){t.body?qs(e,t.body):e.push("null")}function qs(e,t){let{helper:i}=e;switch(t.type){case 0:hM(e,t);break;case 1:dM(e,t);break;case 2:uM(e,t);break;case 6:cM(e,t);break;case 8:e.push(JSON.stringify(t.value),t);break;case 7:e.push(JSON.stringify(t.value),t);break;case 5:e.push(`${i("interpolate")}(${i("list")}(${t.index}))`,t);break;case 4:e.push(`${i("interpolate")}(${i("named")}(${JSON.stringify(t.key)}))`,t);break;case 9:e.push(JSON.stringify(t.value),t);break;case 3:e.push(JSON.stringify(t.value),t);break}}var fM=(e,t={})=>{let i=ze(t.mode)?t.mode:"normal",r=ze(t.filename)?t.filename:"message.intl";t.sourceMap;let n=t.breakLineCode==null?i==="arrow"?";":`
43
- `:t.breakLineCode,s=t.needIndent?t.needIndent:i!=="arrow",a=e.helpers||[],l=oM(e,{filename:r,breakLineCode:n,needIndent:s});l.push(i==="normal"?"function __msg__ (ctx) {":"(ctx) => {"),l.indent(s),a.length>0&&(l.push(`const { ${Xh(a.map(u=>`${u}: _${u}`),", ")} } = ctx`),l.newline()),l.push("return "),qs(l,e),l.deindent(s),l.push("}"),delete e.helpers;let{code:o,map:c}=l.context();return{ast:e,code:o,map:c?c.toJSON():void 0}};function pM(e,t={}){let i=xi({},t),r=!!i.jit,n=!!i.minify,s=i.optimize==null?!0:i.optimize,a=nM(i).parse(e);return r?(s&&lM(a),n&&Ns(a),{ast:a,code:""}):(aM(a,i),fM(a,i))}function _M(){typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(ls().__INTLIFY_PROD_DEVTOOLS__=!1),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(ls().__INTLIFY_DROP_MESSAGE_COMPILER__=!1)}function Or(e){return gt(e)&&Qh(e)===0&&(er(e,"b")||er(e,"body"))}var yv=["b","body"];function mM(e){return zn(e,yv)}var wv=["c","cases"];function vM(e){return zn(e,wv,[])}var Sv=["s","static"];function gM(e){return zn(e,Sv)}var Cv=["i","items"];function bM(e){return zn(e,Cv,[])}var kv=["t","type"];function Qh(e){return zn(e,kv)}var Av=["v","value"];function _0(e,t){let i=zn(e,Av);if(i!=null)return i;throw So(t)}var Mv=["m","modifier"];function yM(e){return zn(e,Mv)}var Ev=["k","key"];function wM(e){let t=zn(e,Ev);if(t)return t;throw So(6)}function zn(e,t,i){for(let r=0;r<t.length;r++){let n=t[r];if(er(e,n)&&e[n]!=null)return e[n]}return i}var Lv=[...yv,...wv,...Sv,...Cv,...Ev,...Mv,...Av,...kv];function So(e){return Error(`unhandled node type: ${e}`)}function Iu(e){return t=>SM(t,e)}function SM(e,t){let i=mM(t);if(i==null)throw So(0);if(Qh(i)===1){let r=vM(i);return e.plural(r.reduce((n,s)=>[...n,$6(e,s)],[]))}else return $6(e,i)}function $6(e,t){let i=gM(t);if(i!=null)return e.type==="text"?i:e.normalize([i]);{let r=bM(t).reduce((n,s)=>[...n,ed(e,s)],[]);return e.normalize(r)}}function ed(e,t){let i=Qh(t);switch(i){case 3:return _0(t,i);case 9:return _0(t,i);case 4:{let r=t;if(er(r,"k")&&r.k)return e.interpolate(e.named(r.k));if(er(r,"key")&&r.key)return e.interpolate(e.named(r.key));throw So(i)}case 5:{let r=t;if(er(r,"i")&&li(r.i))return e.interpolate(e.list(r.i));if(er(r,"index")&&li(r.index))return e.interpolate(e.list(r.index));throw So(i)}case 6:{let r=t,n=yM(r),s=wM(r);return e.linked(ed(e,s),n?ed(e,n):void 0,e.type)}case 7:return _0(t,i);case 8:return _0(t,i);default:throw Error(`unhandled node on format message part: ${i}`)}}var CM=e=>e,m0=Vt();function kM(e,t={}){let i=!1,r=t.onError||jA;return t.onError=n=>{i=!0,r(n)},{...pM(e,t),detectError:i}}function AM(e,t){if(!__INTLIFY_DROP_MESSAGE_COMPILER__&&ze(e)){Dt(t.warnHtmlMessage)&&t.warnHtmlMessage;let i=(t.onCacheKey||CM)(e),r=m0[i];if(r)return r;let{ast:n,detectError:s}=kM(e,{...t,location:!1,jit:!0}),a=Iu(n);return s?a:m0[i]=a}else{let i=e.cacheKey;return i?m0[i]||(m0[i]=Iu(e)):Iu(e)}}var Co=null;function MM(e){Co=e}function EM(e,t,i){Co&&Co.emit("i18n:init",{timestamp:Date.now(),i18n:e,version:t,meta:i})}var LM=$M("function:translate");function $M(e){return t=>Co&&Co.emit(e,t)}var nn={INVALID_ARGUMENT:17,INVALID_DATE_ARGUMENT:18,INVALID_ISO_DATE_ARGUMENT:19,NOT_SUPPORT_LOCALE_PROMISE_VALUE:21,NOT_SUPPORT_LOCALE_ASYNC_FUNCTION:22,NOT_SUPPORT_LOCALE_TYPE:23};function sn(e){return eu(e,null,void 0)}function e2(e,t){return t.locale==null?x6(e.locale):x6(t.locale)}var Du;function x6(e){if(ze(e))return e;if(Ht(e)){if(e.resolvedOnce&&Du!=null)return Du;if(e.constructor.name==="Function"){let t=e();if(zA(t))throw sn(nn.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return Du=t}else throw sn(nn.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw sn(nn.NOT_SUPPORT_LOCALE_TYPE)}function xM(e,t,i){return[...new Set([i,...Jt(t)?t:gt(t)?Object.keys(t):ze(t)?[t]:[i]])]}function td(e,t,i){let r=ze(i)?i:mc,n=e;n.__localeChainCache||(n.__localeChainCache=new Map);let s=n.__localeChainCache.get(r);if(!s){s=[];let a=[i];for(;Jt(a);)a=T6(s,a,t);let l=Jt(t)||!mt(t)?t:t.default?t.default:null;a=ze(l)?[l]:l,Jt(a)&&T6(s,a,!1),n.__localeChainCache.set(r,s)}return s}function T6(e,t,i){let r=!0;for(let n=0;n<t.length&&Dt(r);n++){let s=t[n];ze(s)&&(r=TM(e,t[n],i))}return r}function TM(e,t,i){let r,n=t.split("-");do r=HM(e,n.join("-"),i),n.splice(-1,1);while(n.length&&r===!0);return r}function HM(e,t,i){let r=!1;if(!e.includes(t)&&(r=!0,t)){r=t[t.length-1]!=="!";let n=t.replace(/!/g,"");e.push(n),(Jt(i)||mt(i))&&i[n]&&(r=i[n])}return r}var wn=[];wn[0]={w:[0],i:[3,0],"[":[4],o:[7]},wn[1]={w:[1],".":[2],"[":[4],o:[7]},wn[2]={w:[2],i:[3,0],0:[3,0]},wn[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]},wn[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]},wn[5]={"'":[4,0],o:8,l:[5,0]},wn[6]={'"':[4,0],o:8,l:[6,0]};var NM=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function PM(e){return NM.test(e)}function OM(e){let t=e.charCodeAt(0);return t===e.charCodeAt(e.length-1)&&(t===34||t===39)?e.slice(1,-1):e}function RM(e){if(e==null)return"o";switch(e.charCodeAt(0)){case 91:case 93:case 46:case 34:case 39:return e;case 95:case 36:case 45:return"i";case 9:case 10:case 13:case 160:case 65279:case 8232:case 8233:return"w"}return"i"}function IM(e){let t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:PM(t)?OM(t):"*"+t}function DM(e){let t=[],i=-1,r=0,n=0,s,a,l,o,c,u,d,h=[];h[0]=()=>{a===void 0?a=l:a+=l},h[1]=()=>{a!==void 0&&(t.push(a),a=void 0)},h[2]=()=>{h[0](),n++},h[3]=()=>{if(n>0)n--,r=4,h[0]();else{if(n=0,a===void 0||(a=IM(a),a===!1))return!1;h[1]()}};function f(){let v=e[i+1];if(r===5&&v==="'"||r===6&&v==='"')return i++,l="\\"+v,h[0](),!0}for(;r!==null;)if(i++,s=e[i],!(s==="\\"&&f())){if(o=RM(s),d=wn[r],c=d[o]||d.l||8,c===8||(r=c[0],c[1]!==void 0&&(u=h[c[1]],u&&(l=s,u()===!1))))return;if(r===7)return t}}var H6=new Map;function VM(e,t){return gt(e)?e[t]:null}function ZM(e,t){if(!gt(e))return null;let i=H6.get(t);if(i||(i=DM(t),i&&H6.set(t,i)),!i)return null;let r=i.length,n=e,s=0;for(;s<r;){let a=i[s];if(Lv.includes(a)&&Or(n)||!gt(n)||!er(n,a))return null;let l=n[a];if(l===void 0||Ht(n))return null;n=l,s++}return n}var BM="11.3.0",mc="en-US",N6=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function FM(){return{upper:(e,t)=>t==="text"&&ze(e)?e.toUpperCase():t==="vnode"&&gt(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&ze(e)?e.toLowerCase():t==="vnode"&&gt(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&ze(e)?N6(e):t==="vnode"&&gt(e)&&"__v_isVNode"in e?N6(e.children):e}}var $v;function zM(e){$v=e}var xv;function UM(e){xv=e}var Tv;function WM(e){Tv=e}var Hv=null,P6=e=>{Hv=e},jM=()=>Hv,O6=0;function KM(e={}){let t=Ht(e.onWarn)?e.onWarn:RA,i=ze(e.version)?e.version:BM,r=ze(e.locale)||Ht(e.locale)?e.locale:mc,n=Ht(r)?mc:r,s=Jt(e.fallbackLocale)||mt(e.fallbackLocale)||ze(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:n,a=mt(e.messages)?e.messages:Vu(n),l=mt(e.datetimeFormats)?e.datetimeFormats:Vu(n),o=mt(e.numberFormats)?e.numberFormats:Vu(n),c=xi(Vt(),e.modifiers,FM()),u=e.pluralRules||Vt(),d=Ht(e.missing)?e.missing:null,h=Dt(e.missingWarn)||_c(e.missingWarn)?e.missingWarn:!0,f=Dt(e.fallbackWarn)||_c(e.fallbackWarn)?e.fallbackWarn:!0,v=!!e.fallbackFormat,p=!!e.unresolving,S=Ht(e.postTranslation)?e.postTranslation:null,_=mt(e.processor)?e.processor:null,w=Dt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,C=!!e.escapeParameter,g=Ht(e.messageCompiler)?e.messageCompiler:$v,E=Ht(e.messageResolver)?e.messageResolver:xv||VM,T=Ht(e.localeFallbacker)?e.localeFallbacker:Tv||xM,L=gt(e.fallbackContext)?e.fallbackContext:void 0,V=e,P=gt(V.__datetimeFormatters)?V.__datetimeFormatters:new Map,Y=gt(V.__numberFormatters)?V.__numberFormatters:new Map,W=gt(V.__meta)?V.__meta:{};O6++;let A={version:i,cid:O6,locale:r,fallbackLocale:s,messages:a,modifiers:c,pluralRules:u,missing:d,missingWarn:h,fallbackWarn:f,fallbackFormat:v,unresolving:p,postTranslation:S,processor:_,warnHtmlMessage:w,escapeParameter:C,messageCompiler:g,messageResolver:E,localeFallbacker:T,fallbackContext:L,onWarn:t,__meta:W};return A.datetimeFormats=l,A.numberFormats=o,A.__datetimeFormatters=P,A.__numberFormatters=Y,__INTLIFY_PROD_DEVTOOLS__&&EM(A,i,W),A}var Vu=e=>({[e]:Vt()});function t2(e,t,i,r,n){let{missing:s,onWarn:a}=e;if(s!==null){let l=s(e,i,t,n);return ze(l)?l:t}else return t}function Ll(e,t,i){let r=e;r.__localeChainCache=new Map,e.localeFallbacker(e,i,t)}function qM(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function GM(e,t){let i=t.indexOf(e);if(i===-1)return!1;for(let r=i+1;r<t.length;r++)if(qM(e,t[r]))return!0;return!1}function R6(e,...t){let{datetimeFormats:i,unresolving:r,fallbackLocale:n,onWarn:s,localeFallbacker:a}=e,{__datetimeFormatters:l}=e;if(!ze(t[0])&&!gv(t[0])&&!li(t[0]))return"";let[o,c,u,d]=id(...t),h=Dt(u.missingWarn)?u.missingWarn:e.missingWarn;Dt(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;let f=!!u.part,v=e2(e,u),p=a(e,n,v);if(!ze(o)||o==="")return new Intl.DateTimeFormat(v.replace(/!/g,""),d).format(c);let S={},_,w=null,C="datetime format";for(let T=0;T<p.length&&(_=p[T],S=i[_]||{},w=S[o],!mt(w));T++)t2(e,o,_,h,C);if(!mt(w)||!ze(_))return r?-1:o;let g=`${_}__${o}`;Qc(d)||(g=`${g}__${JSON.stringify(d)}`);let E=l.get(g);return E||(E=new Intl.DateTimeFormat(_,xi({},w,d)),l.set(g,E)),f?E.formatToParts(c):E.format(c)}var YM=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function id(...e){let[t,i,r,n]=e,s=Vt(),a=Vt(),l;if(ze(t)){let o=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!o)throw sn(nn.INVALID_ISO_DATE_ARGUMENT);let c=o[3]?o[3].trim().startsWith("T")?`${o[1].trim()}${o[3].trim()}`:`${o[1].trim()}T${o[3].trim()}`:o[1].trim();l=new Date(c);try{l.toISOString()}catch{throw sn(nn.INVALID_ISO_DATE_ARGUMENT)}}else if(gv(t)){if(isNaN(t.getTime()))throw sn(nn.INVALID_DATE_ARGUMENT);l=t}else if(li(t))l=t;else throw sn(nn.INVALID_ARGUMENT);return ze(i)?s.key=i:mt(i)&&Object.keys(i).forEach(o=>{YM.includes(o)?a[o]=i[o]:s[o]=i[o]}),ze(r)?s.locale=r:mt(r)&&(a=r),mt(n)&&(a=n),[s.key||"",l,s,a]}function I6(e,t,i){let r=e;for(let n in i){let s=`${t}__${n}`;r.__datetimeFormatters.has(s)&&r.__datetimeFormatters.delete(s)}}function D6(e,...t){let{numberFormats:i,unresolving:r,fallbackLocale:n,onWarn:s,localeFallbacker:a}=e,{__numberFormatters:l}=e;if(!li(t[0]))return"";let[o,c,u,d]=rd(...t),h=Dt(u.missingWarn)?u.missingWarn:e.missingWarn;Dt(u.fallbackWarn)?u.fallbackWarn:e.fallbackWarn;let f=!!u.part,v=e2(e,u),p=a(e,n,v);if(!ze(o)||o==="")return new Intl.NumberFormat(v.replace(/!/g,""),d).format(c);let S={},_,w=null,C="number format";for(let T=0;T<p.length&&(_=p[T],S=i[_]||{},w=S[o],!mt(w));T++)t2(e,o,_,h,C);if(!mt(w)||!ze(_))return r?-1:o;let g=`${_}__${o}`;Qc(d)||(g=`${g}__${JSON.stringify(d)}`);let E=l.get(g);return E||(E=new Intl.NumberFormat(_,xi({},w,d)),l.set(g,E)),f?E.formatToParts(c):E.format(c)}var XM=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function rd(...e){let[t,i,r,n]=e,s=Vt(),a=Vt();if(!li(t))throw sn(nn.INVALID_ARGUMENT);let l=t;return ze(i)?s.key=i:mt(i)&&Object.keys(i).forEach(o=>{XM.includes(o)?a[o]=i[o]:s[o]=i[o]}),ze(r)?s.locale=r:mt(r)&&(a=r),mt(n)&&(a=n),[s.key||"",l,s,a]}function V6(e,t,i){let r=e;for(let n in i){let s=`${t}__${n}`;r.__numberFormatters.has(s)&&r.__numberFormatters.delete(s)}}var JM=e=>e,QM=e=>"",eE="text",tE=e=>e.length===0?"":Xh(e),iE=UA;function Zu(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function rE(e){var i,r;let t=li(e.pluralIndex)?e.pluralIndex:-1;return li((i=e.named)==null?void 0:i.count)?e.named.count:li((r=e.named)==null?void 0:r.n)?e.named.n:t}function nE(e={}){var p,S,_,w;let t=e.locale,i=rE(e),r=ze(t)&&Ht((p=e.pluralRules)==null?void 0:p[t])?e.pluralRules[t]:Zu,n=r===Zu?void 0:Zu,s=C=>C[r(i,C.length,n)],a=e.list||[],l=C=>a[C],o=e.named||Vt();li(e.pluralIndex)&&(o.count||(o.count=e.pluralIndex),o.n||(o.n=e.pluralIndex));let c=C=>o[C];function u(C,g){return(Ht(e.messages)?e.messages(C,!!g):gt(e.messages)?e.messages[C]:!1)||(e.parent?e.parent.message(C):QM)}let d=C=>e.modifiers?e.modifiers[C]:JM,h=Ht((S=e.processor)==null?void 0:S.normalize)?e.processor.normalize:tE,f=Ht((_=e.processor)==null?void 0:_.interpolate)?e.processor.interpolate:iE,v={list:l,named:c,plural:s,linked:(C,...g)=>{let[E,T]=g,L="text",V="";g.length===1?gt(E)?(V=E.modifier||V,L=E.type||L):ze(E)&&(V=E||V):g.length===2&&(ze(E)&&(V=E||V),ze(T)&&(L=T||L));let P=u(C,!0)(v),Y=P===""||P===void 0?C:P,W=L==="vnode"&&Jt(Y)&&V?Y[0]:Y;return V?d(V)(W,L):W},message:u,type:ze((w=e.processor)==null?void 0:w.type)?e.processor.type:eE,interpolate:f,normalize:h,values:xi(Vt(),a,o)};return v}var Z6=()=>"",lr=e=>Ht(e);function B6(e,...t){let{fallbackFormat:i,postTranslation:r,unresolving:n,messageCompiler:s,fallbackLocale:a,messages:l}=e,[o,c]=nd(...t),u=Dt(c.missingWarn)?c.missingWarn:e.missingWarn,d=Dt(c.fallbackWarn)?c.fallbackWarn:e.fallbackWarn,h=Dt(c.escapeParameter)?c.escapeParameter:e.escapeParameter,f=!!c.resolvedMessage,v=ze(c.default)||Dt(c.default)?Dt(c.default)?s?o:()=>o:c.default:i?s?o:()=>o:null,p=i||v!=null&&(ze(v)||Ht(v)),S=e2(e,c);h&&sE(c);let[_,w,C]=f?[o,S,l[S]||Vt()]:Nv(e,o,S,a,d,u),g=_,E=o;if(!f&&!(ze(g)||Or(g)||lr(g))&&p&&(g=v,E=g),!f&&(!(ze(g)||Or(g)||lr(g))||!ze(w)))return n?-1:o;let T=!1,L=lr(g)?g:Pv(e,o,w,g,E,()=>{T=!0});if(T)return g;let V=aE(e,L,nE(oE(e,w,C,c))),P=r?r(V,o):V;if(h&&ze(P)&&(P=BA(P)),__INTLIFY_PROD_DEVTOOLS__){let Y={timestamp:Date.now(),key:ze(o)?o:lr(g)?g.key:"",locale:w||(lr(g)?g.locale:""),format:ze(g)?g:lr(g)?g.source:"",message:P};Y.meta=xi({},e.__meta,{}),LM(Y)}return P}function sE(e){Jt(e.list)?e.list=e.list.map(t=>ze(t)?k6(t):t):gt(e.named)&&Object.keys(e.named).forEach(t=>{ze(e.named[t])&&(e.named[t]=k6(e.named[t]))})}function Nv(e,t,i,r,n,s){let{messages:a,onWarn:l,messageResolver:o,localeFallbacker:c}=e,u=c(e,r,i),d=Vt(),h,f=null,v="translate";for(let p=0;p<u.length&&(h=u[p],d=a[h]||Vt(),(f=o(d,t))===null&&(f=d[t]),!(ze(f)||Or(f)||lr(f)));p++)if(!GM(h,u)){let S=t2(e,t,h,s,v);S!==t&&(f=S)}return[f,h,d]}function Pv(e,t,i,r,n,s){let{messageCompiler:a,warnHtmlMessage:l}=e;if(lr(r)){let c=r;return c.locale=c.locale||i,c.key=c.key||t,c}if(a==null){let c=()=>r;return c.locale=i,c.key=t,c}let o=a(r,lE(e,i,n,r,l,s));return o.locale=i,o.key=t,o.source=r,o}function aE(e,t,i){return t(i)}function nd(...e){let[t,i,r]=e,n=Vt();if(!ze(t)&&!li(t)&&!lr(t)&&!Or(t))throw sn(nn.INVALID_ARGUMENT);let s=li(t)?String(t):t;return li(i)?n.plural=i:ze(i)?n.default=i:mt(i)&&!Qc(i)?n.named=i:Jt(i)&&(n.list=i),li(r)?n.plural=r:ze(r)?n.default=r:mt(r)&&xi(n,r),[s,n]}function lE(e,t,i,r,n,s){return{locale:t,key:i,warnHtmlMessage:n,onError:a=>{throw s&&s(a),a},onCacheKey:a=>IA(t,i,a)}}function oE(e,t,i,r){let{modifiers:n,pluralRules:s,messageResolver:a,fallbackLocale:l,fallbackWarn:o,missingWarn:c,fallbackContext:u}=e,d={locale:t,modifiers:n,pluralRules:s,messages:(h,f)=>{let v=a(i,h);if(v==null&&(u||f)){let[,,p]=Nv(u||e,h,t,l,o,c);v=a(p,h)}if(ze(v)||Or(v)){let p=!1,S=Pv(e,h,t,v,h,()=>{p=!0});return p?Z6:S}else return lr(v)?v:Z6}};return e.processor&&(d.processor=e.processor),r.list&&(d.list=r.list),r.named&&(d.named=r.named),li(r.plural)&&(d.pluralIndex=r.plural),d}_M();var cE="11.3.0";function uE(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(ls().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(ls().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(ls().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(ls().__INTLIFY_PROD_DEVTOOLS__=!1)}var Gs={UNEXPECTED_RETURN_TYPE:24,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32};function ko(e,...t){return eu(e,null,void 0)}var F6=ys("__translateVNode"),z6=ys("__datetimeParts"),U6=ys("__numberParts"),dE=ys("__setPluralRules"),Ov=ys("__injectWithOption"),sd=ys("__dispose");function Ao(e){if(!gt(e)||Or(e))return e;for(let t in e)if(er(e,t))if(!t.includes("."))gt(e[t])&&Ao(e[t]);else{let i=t.split("."),r=i.length-1,n=e,s=!1;for(let a=0;a<r;a++){if(i[a]==="__proto__")throw Error(`unsafe key: ${i[a]}`);if(i[a]in n||(n[i[a]]=Vt()),!gt(n[i[a]])){s=!0;break}n=n[i[a]]}if(s||(Or(n)?Lv.includes(i[r])||delete e[t]:(n[i[r]]=e[t],delete e[t])),!Or(n)){let a=n[i[r]];gt(a)&&Ao(a)}}return e}function Rv(e,t){let{messages:i,__i18n:r,messageResolver:n,flatJson:s}=t,a=mt(i)?i:Jt(r)?Vt():{[e]:Vt()};if(Jt(r)&&r.forEach(l=>{if("locale"in l&&"resource"in l){let{locale:o,resource:c}=l;o?(a[o]=a[o]||Vt(),P0(c,a[o])):P0(c,a)}else ze(l)&&P0(JSON.parse(l),a)}),n==null&&s)for(let l in a)er(a,l)&&Ao(a[l]);return a}function hE(e){return e.type}function fE(e,t,i){let r=gt(t.messages)?t.messages:Vt();"__i18nGlobal"in i&&(r=Rv(e.locale.value,{messages:r,__i18n:i.__i18nGlobal}));let n=Object.keys(r);if(n.length&&n.forEach(s=>{e.mergeLocaleMessage(s,r[s])}),gt(t.datetimeFormats)){let s=Object.keys(t.datetimeFormats);s.length&&s.forEach(a=>{e.mergeDateTimeFormat(a,t.datetimeFormats[a])})}if(gt(t.numberFormats)){let s=Object.keys(t.numberFormats);s.length&&s.forEach(a=>{e.mergeNumberFormat(a,t.numberFormats[a])})}}function W6(e){return G(Vn,null,e,0)}function Iv(){return wi()}var j6=()=>[],pE=()=>!1,K6=0;function q6(e){return(t,i,r,n)=>e(i,r,Iv()||void 0,n)}function _E(e={}){let{__root:t,__injectWithOption:i}=e,r=t===void 0,n=e.flatJson,s=C6?q:Zr,a=Dt(e.inheritLocale)?e.inheritLocale:!0,l=s(t&&a?t.locale.value:ze(e.locale)?e.locale:mc),o=s(t&&a?t.fallbackLocale.value:ze(e.fallbackLocale)||Jt(e.fallbackLocale)||mt(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:l.value),c=s(Rv(l.value,e)),u=s(mt(e.datetimeFormats)?e.datetimeFormats:{[l.value]:{}}),d=s(mt(e.numberFormats)?e.numberFormats:{[l.value]:{}}),h=t?t.missingWarn:Dt(e.missingWarn)||_c(e.missingWarn)?e.missingWarn:!0,f=t?t.fallbackWarn:Dt(e.fallbackWarn)||_c(e.fallbackWarn)?e.fallbackWarn:!0,v=t?t.fallbackRoot:Dt(e.fallbackRoot)?e.fallbackRoot:!0,p=!!e.fallbackFormat,S=Ht(e.missing)?e.missing:null,_=Ht(e.missing)?q6(e.missing):null,w=Ht(e.postTranslation)?e.postTranslation:null,C=t?t.warnHtmlMessage:Dt(e.warnHtmlMessage)?e.warnHtmlMessage:!0,g=!!e.escapeParameter,E=t?t.modifiers:mt(e.modifiers)?e.modifiers:{},T=e.pluralRules||t&&t.pluralRules,L;L=(()=>{r&&P6(null);let I={version:cE,locale:l.value,fallbackLocale:o.value,messages:c.value,modifiers:E,pluralRules:T,missing:_===null?void 0:_,missingWarn:h,fallbackWarn:f,fallbackFormat:p,unresolving:!0,postTranslation:w===null?void 0:w,warnHtmlMessage:C,escapeParameter:g,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};I.datetimeFormats=u.value,I.numberFormats=d.value,I.__datetimeFormatters=mt(L)?L.__datetimeFormatters:void 0,I.__numberFormatters=mt(L)?L.__numberFormatters:void 0;let R=KM(I);return r&&P6(R),R})(),Ll(L,l.value,o.value);function V(){return[l.value,o.value,c.value,u.value,d.value]}let P=j({get:()=>l.value,set:I=>{L.locale=I,l.value=I}}),Y=j({get:()=>o.value,set:I=>{L.fallbackLocale=I,o.value=I,Ll(L,l.value,I)}}),W=j(()=>c.value),A=j(()=>u.value),$=j(()=>d.value);function Z(){return Ht(w)?w:null}function ie(I){w=I,L.postTranslation=I}function ne(){return S}function ce(I){I!==null&&(_=q6(I)),S=I,L.missing=_}let J=(I,R,B,K,Se,Me)=>{V();let Ve;try{__INTLIFY_PROD_DEVTOOLS__,r||(L.fallbackContext=t?jM():void 0),Ve=I(L)}finally{__INTLIFY_PROD_DEVTOOLS__,r||(L.fallbackContext=void 0)}if(B!=="translate exists"&&li(Ve)&&Ve===-1||B==="translate exists"&&!Ve){let[Ye,Te]=R();return t&&v?K(t):Se(Ye)}else{if(Me(Ve))return Ve;throw ko(Gs.UNEXPECTED_RETURN_TYPE)}};function ae(...I){return J(R=>Reflect.apply(B6,null,[R,...I]),()=>nd(...I),"translate",R=>Reflect.apply(R.t,R,[...I]),R=>R,R=>ze(R))}function re(...I){let[R,B,K]=I;if(K&&!gt(K))throw ko(Gs.INVALID_ARGUMENT);return ae(R,B,xi({resolvedMessage:!0},K||{}))}function X(...I){return J(R=>Reflect.apply(R6,null,[R,...I]),()=>id(...I),"datetime format",R=>Reflect.apply(R.d,R,[...I]),()=>"",R=>ze(R)||Jt(R))}function le(...I){return J(R=>Reflect.apply(D6,null,[R,...I]),()=>rd(...I),"number format",R=>Reflect.apply(R.n,R,[...I]),()=>"",R=>ze(R)||Jt(R))}function ve(I){return I.map(R=>ze(R)||li(R)||Dt(R)?W6(String(R)):R)}let ue={normalize:ve,interpolate:I=>I,type:"vnode"};function he(...I){return J(R=>{let B,K=R;try{K.processor=ue,B=Reflect.apply(B6,null,[K,...I])}finally{K.processor=null}return B},()=>nd(...I),"translate",R=>R[F6](...I),R=>[W6(R)],R=>Jt(R))}function ye(...I){return J(R=>Reflect.apply(D6,null,[R,...I]),()=>rd(...I),"number format",R=>R[U6](...I),j6,R=>ze(R)||Jt(R))}function U(...I){return J(R=>Reflect.apply(R6,null,[R,...I]),()=>id(...I),"datetime format",R=>R[z6](...I),j6,R=>ze(R)||Jt(R))}function fe(I){T=I,L.pluralRules=T}function ge(I,R){return J(()=>{if(!I)return!1;let B=ze(R)?R:l.value,K=ze(R)?[B]:td(L,o.value,B);for(let Se=0;Se<K.length;Se++){let Me=H(K[Se]),Ve=L.messageResolver(Me,I);if(Ve===null&&(Ve=Me[I]),Or(Ve)||lr(Ve)||ze(Ve))return!0}return!1},()=>[I],"translate exists",B=>Reflect.apply(B.te,B,[I,R]),pE,B=>Dt(B))}function se(I){let R=null,B=td(L,o.value,l.value);for(let K=0;K<B.length;K++){let Se=c.value[B[K]]||{},Me=L.messageResolver(Se,I);if(Me!=null){R=Me;break}}return R}function x(I){return se(I)??(t&&t.tm(I)||{})}function H(I){return c.value[I]||{}}function O(I,R){if(n){let B={[I]:R};for(let K in B)er(B,K)&&Ao(B[K]);R=B[I]}c.value[I]=R,L.messages=c.value}function ee(I,R){c.value[I]=c.value[I]||{};let B={[I]:R};if(n)for(let K in B)er(B,K)&&Ao(B[K]);R=B[I],P0(R,c.value[I]),L.messages=c.value}function Q(I){return u.value[I]||{}}function pe(I,R){u.value[I]=R,L.datetimeFormats=u.value,I6(L,I,R)}function we(I,R){u.value[I]=xi(u.value[I]||{},R),L.datetimeFormats=u.value,I6(L,I,R)}function y(I){return d.value[I]||{}}function k(I,R){d.value[I]=R,L.numberFormats=d.value,V6(L,I,R)}function D(I,R){d.value[I]=xi(d.value[I]||{},R),L.numberFormats=d.value,V6(L,I,R)}K6++,t&&C6&&(De(t.locale,I=>{a&&(l.value=I,L.locale=I,Ll(L,l.value,o.value))}),De(t.fallbackLocale,I=>{a&&(o.value=I,L.fallbackLocale=I,Ll(L,l.value,o.value))}));let N={id:K6,locale:P,fallbackLocale:Y,get inheritLocale(){return a},set inheritLocale(I){a=I,I&&t&&(l.value=t.locale.value,o.value=t.fallbackLocale.value,Ll(L,l.value,o.value))},get availableLocales(){return Object.keys(c.value).sort()},messages:W,get modifiers(){return E},get pluralRules(){return T||{}},get isGlobal(){return r},get missingWarn(){return h},set missingWarn(I){h=I,L.missingWarn=h},get fallbackWarn(){return f},set fallbackWarn(I){f=I,L.fallbackWarn=f},get fallbackRoot(){return v},set fallbackRoot(I){v=I},get fallbackFormat(){return p},set fallbackFormat(I){p=I,L.fallbackFormat=p},get warnHtmlMessage(){return C},set warnHtmlMessage(I){C=I,L.warnHtmlMessage=I},get escapeParameter(){return g},set escapeParameter(I){g=I,L.escapeParameter=I},t:ae,getLocaleMessage:H,setLocaleMessage:O,mergeLocaleMessage:ee,getPostTranslationHandler:Z,setPostTranslationHandler:ie,getMissingHandler:ne,setMissingHandler:ce,[dE]:fe};return N.datetimeFormats=A,N.numberFormats=$,N.rt=re,N.te=ge,N.tm=x,N.d=X,N.n=le,N.getDateTimeFormat=Q,N.setDateTimeFormat=pe,N.mergeDateTimeFormat=we,N.getNumberFormat=y,N.setNumberFormat=k,N.mergeNumberFormat=D,N[Ov]=i,N[F6]=he,N[z6]=U,N[U6]=ye,N}var ad={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};xi({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>li(e)||!isNaN(e)}},ad),xi({value:{type:Number,required:!0},format:{type:[String,Object]}},ad);var mE=ys("global-vue-i18n");function Dv(e={}){let t=Iv();if(t==null)throw ko(Gs.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw ko(Gs.NOT_INSTALLED);let i=vE(t),r=bE(i),n=hE(t),s=gE(e,n);if(s==="global")return fE(r,e,n),r;if(s==="parent"){let o=yE(i,t,e.__useComponent);return o??(o=r),o}let a=i,l=a.__getInstance(t);if(l==null){let o=xi({},e);"__i18n"in n&&(o.__i18n=n.__i18n),r&&(o.__root=r),l=_E(o),a.__composerExtend&&(l[sd]=a.__composerExtend(l)),SE(a,t,l),a.__setInstance(t,l)}return l}function vE(e){let t=Mt(e.isCE?mE:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw ko(e.isCE?Gs.NOT_INSTALLED_WITH_PROVIDE:Gs.UNEXPECTED_ERROR);return t}function gE(e,t){return Qc(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function bE(e){return e.mode==="composition"?e.global:e.global.__composer}function yE(e,t,i=!1){let r=null,n=t.root,s=wE(t,i);for(;s!=null;){let a=e;if(e.mode==="composition")r=a.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){let l=a.__getInstance(s);l!=null&&(r=l.__composer,i&&r&&!r[Ov]&&(r=null))}if(r!=null||n===s)break;s=s.parent}return r}function wE(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function SE(e,t,i){lt(()=>{},t),Oi(()=>{let r=i;e.__deleteInstance(t);let n=r[sd];n&&(n(),delete r[sd])},t)}if(xi({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},ad),uE(),zM(AM),UM(ZM),WM(td),__INTLIFY_PROD_DEVTOOLS__){let e=ls();e.__INTLIFY__=!0,MM(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}const CE=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},kE=CE("shield-star","0 0 256 256",'<path d="M80.57,117A8,8,0,0,1,91,112.57l29,11.61V96a8,8,0,0,1,16,0v28.18l29-11.61A8,8,0,1,1,171,127.43l-30.31,12.12L158.4,163.2a8,8,0,1,1-12.8,9.6L128,149.33,110.4,172.8a8,8,0,1,1-12.8-9.6l17.74-23.65L85,127.43A8,8,0,0,1,80.57,117ZM224,56v56c0,52.72-25.52,84.67-46.93,102.19-23.06,18.86-46,25.27-47,25.53a8,8,0,0,1-4.2,0c-1-.26-23.91-6.67-47-25.53C57.52,196.67,32,164.72,32,112V56A16,16,0,0,1,48,40H208A16,16,0,0,1,224,56Zm-16,0L48,56l0,56c0,37.3,13.82,67.51,41.07,89.81A128.25,128.25,0,0,0,128,223.62a129.3,129.3,0,0,0,39.41-22.2C194.34,179.16,208,149.07,208,112Z"/>'),AE=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},ME=AE("users","0 0 256 256",'<path d="M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z"/>'),ba=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},EE=ba("plus","0 0 256 256",'<path d="M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"/>'),LE=ba("plus","0 0 256 256",'<path d="M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"/>'),Mo=ba("plus","0 0 256 256",'<path d="M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"/>'),$E=ba("plus","0 0 256 256",'<path d="M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"/>'),xE=ba("plus","0 0 256 256",'<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"/>'),TE=ba("plus","0 0 256 256",'<path d="M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z" opacity="0.2"/><path d="M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"/>'),HE="plus",NE=Object.freeze(Object.defineProperty({__proto__:null,bold:$E,default:Mo,duotone:TE,fill:xE,glyphName:HE,light:LE,regular:Mo,thin:EE},Symbol.toStringTag,{value:"Module"})),PE=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},OE=PE("user","0 0 256 256",'<path d="M230.92,212c-15.23-26.33-38.7-45.21-66.09-54.16a72,72,0,1,0-73.66,0C63.78,166.78,40.31,185.66,25.08,212a8,8,0,1,0,13.85,8c18.84-32.56,52.14-52,89.07-52s70.23,19.44,89.07,52a8,8,0,1,0,13.85-8ZM72,96a56,56,0,1,1,56,56A56.06,56.06,0,0,1,72,96Z"/>'),ya=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},RE=ya("sign-out","0 0 256 256",'<path d="M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z"/>'),IE=ya("sign-out","0 0 256 256",'<path d="M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z"/>'),ld=ya("sign-out","0 0 256 256",'<path d="M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z"/>'),DE=ya("sign-out","0 0 256 256",'<path d="M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z"/>'),VE=ya("sign-out","0 0 256 256",'<path d="M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z"/>'),ZE=ya("sign-out","0 0 256 256",'<path d="M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z" opacity="0.2"/><path d="M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z"/>'),BE="sign-out",FE=Object.freeze(Object.defineProperty({__proto__:null,bold:DE,default:ld,duotone:ZE,fill:VE,glyphName:BE,light:IE,regular:ld,thin:RE},Symbol.toStringTag,{value:"Module"}));var zE=["title","aria-expanded","disabled"],UE={class:"nb-user-menu__avatar","aria-hidden":"true"},WE=["src"],jE={class:"nb-user-menu__identity-text"},KE={class:"nb-user-menu__identity-name"},qE={key:0,class:"nb-user-menu__identity-email"},GE={key:1,class:"nb-user-menu__sr-only"},YE=["title","aria-label","aria-expanded","disabled"],XE=["src"],JE={class:"nb-user-menu__label"},QE={class:"nb-user-menu__email"},eL={key:0,class:"nb-user-menu__role"},tL=["disabled","onClick"],iL={class:"nb-user-menu__account-main"},rL={class:"nb-user-menu__account-email"},nL={key:0,class:"nb-user-menu__account-name"},sL={class:"nb-user-menu__brand"},aL={key:1,class:"nb-user-menu__brand-name"},lL={key:2},oL=260,Bu=8,cL=Re({__name:"UserMenu",props:{user:{},accounts:{default:void 0},accountsUnknown:{type:Boolean,default:!1},showAccountActions:{type:Boolean,default:!0},showProfile:{type:Boolean,default:!0},brand:{default:"footer"},placement:{default:"right-end"},trigger:{default:"avatar"},showTheme:{type:Boolean,default:!1},roleBadge:{default:void 0},disabled:{type:Boolean,default:!1}},emits:["switch","remove","switch-account","add-account","profile","sign-out","open","close"],setup(e,{expose:t,emit:i}){let r={en:{ACCOUNT_MENU:"Account menu",SIGNED_IN_AS:"Signed in as",SWITCH_ACCOUNT:"Switch account",USE_ANOTHER_ACCOUNT:"Use another account",REMOVE_ACCOUNT:"Sign this account out of this browser",PROFILE:"Profile",SIGN_OUT:"Sign out",APPEARANCE:"Appearance",THEME_LIGHT:"Light",THEME_DARK:"Dark",THEME_SYSTEM:"Match my system",poweredBy:"Accord by Nubisco"},pt:{ACCOUNT_MENU:"Menu de conta",SIGNED_IN_AS:"Sessão iniciada como",SWITCH_ACCOUNT:"Mudar de conta",USE_ANOTHER_ACCOUNT:"Usar outra conta",REMOVE_ACCOUNT:"Terminar a sessão desta conta neste browser",PROFILE:"Perfil",SIGN_OUT:"Terminar sessão",APPEARANCE:"Aspeto",THEME_LIGHT:"Claro",THEME_DARK:"Escuro",THEME_SYSTEM:"Seguir o sistema",poweredBy:"Accord da Nubisco"}},{t:n,te:s,locale:a}=Dv({useScope:"global"});function l(le){var ue;if(s(le))return n(le);let ve=le.slice(9);return((ue=r[String(a.value).toLowerCase().split("-")[0]])==null?void 0:ue[ve])??r.en[ve]??le}let o=Jc(),c=j(()=>[{label:l("userMenu.THEME_LIGHT"),value:"light"},{label:l("userMenu.THEME_DARK"),value:"dark"},{label:l("userMenu.THEME_SYSTEM"),value:"system"}]),u=`nb-user-menu-appearance-${Pi()}`,d=e,h=Mt("nb-shell-sidebar-variant",null),f=j(()=>d.trigger==="identity"&&((h==null?void 0:h.value)??"verbose")==="verbose"),v=j(()=>{var le;return((le=d.user.name)==null?void 0:le.trim())||d.user.email}),p=j(()=>{var ve;let le=(ve=d.user.name)==null?void 0:ve.trim();return le?le.toLowerCase()===d.user.email.trim().toLowerCase()?"":d.user.email:""}),S=q(!1);De(()=>d.user.picture,()=>{S.value=!1});let _=j(()=>!!d.user.picture&&!S.value),w=/(Accord|Nubisco)/,C=j(()=>{let le=l("userMenu.poweredBy");if(!w.test(le))return[{text:le,name:!0,mark:!0}];let ve=!1;return le.split(w).filter(ue=>ue!=="").map(ue=>{let he=ue==="Accord"||ue==="Nubisco",ye=ue==="Nubisco"&&!ve;return ye&&(ve=!0),{text:ue,name:he,mark:ye}})}),g=i,E=q(null),T=q(null),L=q(!1),V=q({});function P(le){return XC(le)}let{phone:Y}=Bo();function W(){var ve,ue;let le=(ve=E.value)==null?void 0:ve.getBoundingClientRect();if(le){if(Y.value){let he=((ue=T.value)==null?void 0:ue.offsetWidth)||oL,ye=Math.max(Bu,window.innerWidth-he-Bu);V.value={left:`${Math.round(Math.min(Math.max(le.left,Bu),ye))}px`,bottom:`${Math.round(window.innerHeight-le.top+8)}px`};return}d.placement==="top-start"?V.value={left:`${Math.round(le.left)}px`,bottom:`${Math.round(window.innerHeight-le.top+8)}px`}:V.value={left:`${Math.round(le.right+12)}px`,bottom:`${Math.round(window.innerHeight-le.bottom)}px`}}}function A(){d.disabled||(L.value?$():(W(),L.value=!0,g("open"),Y.value&&Kt(W)))}function $(){L.value&&(L.value=!1,g("close"))}function Z(le){le.current||($(),g("switch",le))}function ie(le){g("remove",le)}function ne(){$(),g("switch-account")}function ce(){$(),g("add-account")}function J(){$(),g("profile")}function ae(){$(),g("sign-out")}function re(le){var ue,he;if(!L.value)return;let ve=le.target;(ue=E.value)!=null&&ue.contains(ve)||(he=T.value)!=null&&he.contains(ve)||$()}function X(le){le.key==="Escape"&&$()}return lt(()=>{document.addEventListener("click",re),document.addEventListener("keydown",X)}),mi(()=>{document.removeEventListener("click",re),document.removeEventListener("keydown",X)}),t({open:L,toggle:A,close:$}),(le,ve)=>(m(),M("div",{ref_key:"rootRef",ref:E,class:Le(["nb-user-menu",{"nb-user-menu--identity":f.value,"nb-user-menu--elevated":!!d.roleBadge}])},[He(le.$slots,"trigger",{open:L.value,toggle:A},()=>[f.value?(m(),M("button",{key:0,type:"button",class:"nb-user-menu__identity",title:d.user.email,"aria-haspopup":"menu","aria-expanded":L.value,disabled:e.disabled,onClick:A},[b("span",UE,[_.value?(m(),M("img",{key:0,class:"nb-user-menu__picture",src:d.user.picture??void 0,alt:"",onError:ve[0]||(ve[0]=ue=>S.value=!0)},null,40,WE)):(m(),M(ke,{key:1},[_e(F(P(d.user)),1)],64))]),b("span",jE,[b("span",KE,F(v.value),1),p.value?(m(),M("span",qE,F(p.value),1)):z("",!0),d.roleBadge?(m(),M("span",GE," ("+F(d.roleBadge)+")",1)):z("",!0)])],8,zE)):(m(),M("button",{key:1,type:"button",class:"nb-user-menu__avatar",title:d.user.email,"aria-label":d.roleBadge?`${l("userMenu.ACCOUNT_MENU")} (${d.roleBadge})`:l("userMenu.ACCOUNT_MENU"),"aria-haspopup":"menu","aria-expanded":L.value,disabled:e.disabled,onClick:A},[_.value?(m(),M("img",{key:0,class:"nb-user-menu__picture",src:d.user.picture??void 0,alt:"",onError:ve[1]||(ve[1]=ue=>S.value=!0)},null,40,XE)):(m(),M(ke,{key:1},[_e(F(P(d.user)),1)],64))],8,YE))]),(m(),me(dr,{to:"body"},[G(Ch,{name:"nb-user-menu-pop"},{default:te(()=>[L.value?(m(),M("div",{key:0,ref_key:"panelRef",ref:T,class:"nb-user-menu__panel",style:_i(V.value),role:"menu"},[b("p",JE,F(l("userMenu.SIGNED_IN_AS")),1),b("p",QE,F(d.user.email),1),d.roleBadge?(m(),M("p",eL,[G(Ue,{name:de(kE),size:13},null,8,["name"]),_e(" "+F(d.roleBadge),1)])):z("",!0),e.showAccountActions?(m(),M(ke,{key:1},[ve[3]||(ve[3]=b("div",{class:"nb-user-menu__divider",role:"separator"},null,-1)),d.accounts&&d.accounts.length?(m(!0),M(ke,{key:0},Fe(d.accounts,ue=>(m(),M("button",{key:ue.id,type:"button",role:"menuitem",class:Le(["nb-user-menu__account",{"nb-user-menu__account--current":ue.current}]),disabled:ue.current,onClick:he=>Z(ue)},[b("span",iL,[b("span",rL,F(ue.email),1),ue.name?(m(),M("span",nL,F(ue.name),1)):z("",!0)]),ue.current?(m(),me(Ue,{key:0,name:de(wo),size:14,class:"nb-user-menu__check"},null,8,["name"])):ue.removable===!1?z("",!0):(m(),me(Ue,{key:1,name:de(_s),size:13,class:"nb-user-menu__remove",title:l("userMenu.REMOVE_ACCOUNT"),onClick:Qe(he=>ie(ue),["stop"])},null,8,["name","title","onClick"]))],10,tL))),128)):d.accountsUnknown?(m(),M("button",{key:1,type:"button",role:"menuitem",class:"nb-user-menu__action",onClick:ne},[G(Ue,{name:de(ME),size:15},null,8,["name"]),_e(" "+F(l("userMenu.SWITCH_ACCOUNT")),1)])):z("",!0),b("button",{type:"button",role:"menuitem",class:"nb-user-menu__action",onClick:ce},[G(Ue,{name:de(Mo),size:15},null,8,["name"]),_e(" "+F(l("userMenu.USE_ANOTHER_ACCOUNT")),1)])],64)):z("",!0),d.showTheme?(m(),M(ke,{key:2},[ve[4]||(ve[4]=b("div",{class:"nb-user-menu__divider",role:"separator"},null,-1)),b("div",{class:"nb-user-menu__appearance",role:"group","aria-labelledby":u},[b("p",{id:u,class:"nb-user-menu__appearance-title"},F(l("userMenu.APPEARANCE")),1),G(fv,{name:u,options:c.value,"model-value":de(o).theme.value,"onUpdate:modelValue":ve[2]||(ve[2]=ue=>de(o).setTheme(ue))},null,8,["options","model-value"])])],64)):z("",!0),le.$slots.default?(m(),M(ke,{key:3},[ve[5]||(ve[5]=b("div",{class:"nb-user-menu__divider",role:"separator"},null,-1)),He(le.$slots,"default",{close:$})],64)):z("",!0),ve[7]||(ve[7]=b("div",{class:"nb-user-menu__divider",role:"separator"},null,-1)),e.showProfile?(m(),M("button",{key:4,type:"button",role:"menuitem",class:"nb-user-menu__action",onClick:J},[G(Ue,{name:de(OE),size:15},null,8,["name"]),_e(" "+F(l("userMenu.PROFILE")),1)])):z("",!0),b("button",{type:"button",role:"menuitem",class:"nb-user-menu__action nb-user-menu__action--danger",onClick:ae},[G(Ue,{name:de(ld),size:15},null,8,["name"]),_e(" "+F(l("userMenu.SIGN_OUT")),1)]),d.brand==="none"?z("",!0):(m(),M(ke,{key:5},[ve[6]||(ve[6]=b("div",{class:"nb-user-menu__divider",role:"separator"},null,-1)),He(le.$slots,"brand",{},()=>[b("p",sL,[(m(!0),M(ke,null,Fe(C.value,(ue,he)=>(m(),M(ke,{key:he},[ue.mark?(m(),me(kA,{key:0,size:13,class:"nb-user-menu__mark"})):z("",!0),ue.name?(m(),M("span",aL,F(ue.text),1)):(m(),M("span",lL,F(ue.text),1))],64))),128))])])],64))],4)):z("",!0)]),_:3})]))],2))}}),uL=Symbol("NB_CHECKBOX_GROUP_CONTEXT"),dL={class:"nb-checkbox__control"},hL=["checked","disabled","indeterminate"],fL={class:"nb-checkbox__box"},pL={key:0,class:"nb-checkbox__check",viewBox:"0 0 10 8",fill:"none"},_L={key:1,class:"nb-checkbox__dash"},mL={key:0,class:"nb-checkbox__label"},G6=nt(Re({__name:"Checkbox",props:{modelValue:{type:Boolean,default:!1},indeterminate:{type:Boolean,default:!1},name:{},disabled:{type:Boolean,default:!1},required:{type:Boolean},id:{default:"checkbox"},label:{}},emits:["update:modelValue"],setup(e,{emit:t}){let i=e,r=t,n=Mt(uL,null),s=j(()=>i.disabled||!!(n!=null&&n.disabled.value));function a(l){s.value||r("update:modelValue",l.target.checked)}return(l,o)=>(m(),M("label",{class:Le(["nb-checkbox",{"nb-checkbox--disabled":s.value}])},[b("span",dL,[b("input",{type:"checkbox",checked:e.modelValue,disabled:s.value,indeterminate:e.indeterminate,class:"nb-checkbox__input",onChange:a},null,40,hL),b("span",fL,[e.modelValue&&!e.indeterminate?(m(),M("svg",pL,[...o[0]||(o[0]=[b("path",{d:"M1 4l3 3 5-6",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)])])):z("",!0),e.indeterminate?(m(),M("span",_L)):z("",!0)])]),e.label?(m(),M("span",mL,F(e.label),1)):He(l.$slots,"default",{key:1},void 0,!0)],2))}}),[["__scopeId","data-v-e6cd7a41"]]);const wa=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},vL=wa("arrows-down-up","0 0 256 256",'<path d="M114.83,173.17a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66,0l-32-32a4,4,0,0,1,5.66-5.66L76,198.34V48a4,4,0,0,1,8,0V198.34l25.17-25.17A4,4,0,0,1,114.83,173.17Zm96-96-32-32a4,4,0,0,0-5.66,0l-32,32a4,4,0,0,0,5.66,5.66L172,57.66V208a4,4,0,0,0,8,0V57.66l25.17,25.17a4,4,0,1,0,5.66-5.66Z"/>'),gL=wa("arrows-down-up","0 0 256 256",'<path d="M116.24,171.76a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48,0l-32-32a6,6,0,0,1,8.48-8.48L74,193.51V48a6,6,0,0,1,12,0V193.51l21.76-21.75A6,6,0,0,1,116.24,171.76Zm96-96-32-32a6,6,0,0,0-8.48,0l-32,32a6,6,0,0,0,8.48,8.48L170,62.49V208a6,6,0,0,0,12,0V62.49l21.76,21.75a6,6,0,0,0,8.48-8.48Z"/>'),Y6=wa("arrows-down-up","0 0 256 256",'<path d="M117.66,170.34a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L72,188.69V48a8,8,0,0,1,16,0V188.69l18.34-18.35A8,8,0,0,1,117.66,170.34Zm96-96-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L168,67.31V208a8,8,0,0,0,16,0V67.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z"/>'),bL=wa("arrows-down-up","0 0 256 256",'<path d="M120.49,167.51a12,12,0,0,1,0,17l-32,32a12,12,0,0,1-17,0l-32-32a12,12,0,1,1,17-17L68,179V48a12,12,0,0,1,24,0V179l11.51-11.52A12,12,0,0,1,120.49,167.51Zm96-96-32-32a12,12,0,0,0-17,0l-32,32a12,12,0,0,0,17,17L164,77V208a12,12,0,0,0,24,0V77l11.51,11.52a12,12,0,0,0,17-17Z"/>'),yL=wa("arrows-down-up","0 0 256 256",'<path d="M119.39,172.94a8,8,0,0,1-1.73,8.72l-32,32a8,8,0,0,1-11.32,0l-32-32A8,8,0,0,1,48,168H72V48a8,8,0,0,1,16,0V168h24A8,8,0,0,1,119.39,172.94Zm94.27-98.6-32-32a8,8,0,0,0-11.32,0l-32,32A8,8,0,0,0,144,88h24V208a8,8,0,0,0,16,0V88h24a8,8,0,0,0,5.66-13.66Z"/>'),wL=wa("arrows-down-up","0 0 256 256",'<path d="M176,48V208H80V48Z" opacity="0.2"/><path d="M117.66,170.34a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32,0l-32-32a8,8,0,0,1,11.32-11.32L72,188.69V48a8,8,0,0,1,16,0V188.69l18.34-18.35A8,8,0,0,1,117.66,170.34Zm96-96-32-32a8,8,0,0,0-11.32,0l-32,32a8,8,0,0,0,11.32,11.32L168,67.31V208a8,8,0,0,0,16,0V67.31l18.34,18.35a8,8,0,0,0,11.32-11.32Z"/>'),SL="arrows-down-up",CL=Object.freeze(Object.defineProperty({__proto__:null,bold:bL,default:Y6,duotone:wL,fill:yL,glyphName:SL,light:gL,regular:Y6,thin:vL},Symbol.toStringTag,{value:"Module"})),Sa=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},kL=Sa("arrow-down","0 0 256 256",'<path d="M202.83,146.83l-72,72a4,4,0,0,1-5.66,0l-72-72a4,4,0,0,1,5.66-5.66L124,206.34V40a4,4,0,0,1,8,0V206.34l65.17-65.17a4,4,0,0,1,5.66,5.66Z"/>'),AL=Sa("arrow-down","0 0 256 256",'<path d="M204.24,148.24l-72,72a6,6,0,0,1-8.48,0l-72-72a6,6,0,0,1,8.48-8.48L122,201.51V40a6,6,0,0,1,12,0V201.51l61.76-61.75a6,6,0,0,1,8.48,8.48Z"/>'),X6=Sa("arrow-down","0 0 256 256",'<path d="M205.66,149.66l-72,72a8,8,0,0,1-11.32,0l-72-72a8,8,0,0,1,11.32-11.32L120,196.69V40a8,8,0,0,1,16,0V196.69l58.34-58.35a8,8,0,0,1,11.32,11.32Z"/>'),ML=Sa("arrow-down","0 0 256 256",'<path d="M208.49,152.49l-72,72a12,12,0,0,1-17,0l-72-72a12,12,0,0,1,17-17L116,187V40a12,12,0,0,1,24,0V187l51.51-51.52a12,12,0,0,1,17,17Z"/>'),EL=Sa("arrow-down","0 0 256 256",'<path d="M205.66,149.66l-72,72a8,8,0,0,1-11.32,0l-72-72A8,8,0,0,1,56,136h64V40a8,8,0,0,1,16,0v96h64a8,8,0,0,1,5.66,13.66Z"/>'),LL=Sa("arrow-down","0 0 256 256",'<path d="M200,144l-72,72L56,144Z" opacity="0.2"/><path d="M207.39,140.94A8,8,0,0,0,200,136H136V40a8,8,0,0,0-16,0v96H56a8,8,0,0,0-5.66,13.66l72,72a8,8,0,0,0,11.32,0l72-72A8,8,0,0,0,207.39,140.94ZM128,204.69,75.31,152H180.69Z"/>'),$L="arrow-down",xL=Object.freeze(Object.defineProperty({__proto__:null,bold:ML,default:X6,duotone:LL,fill:EL,glyphName:$L,light:AL,regular:X6,thin:kL},Symbol.toStringTag,{value:"Module"}));var TL={key:0,class:"nb-data-table__toolbar"},HL={key:0,class:"nb-data-table__toolbar-heading"},NL={key:0,class:"nb-data-table__title"},PL={key:1,class:"nb-data-table__description"},OL={key:1,class:"nb-data-table__toolbar-row"},RL=["inert","aria-hidden"],IL={key:0,class:"nb-data-table__toolbar-search"},DL={key:1,class:"nb-data-table__batch",role:"region","aria-label":"Table batch actions"},VL={class:"nb-data-table__batch-count"},ZL={class:"nb-data-table__batch-actions"},BL={class:"nb-data-table__scroll"},FL=["role","aria-label","aria-busy"],zL={key:0,class:"nb-data-table__col-expand"},UL={key:1,class:"nb-data-table__col-select"},WL={key:2,class:"nb-data-table__col-actions"},jL=["role"],KL=["role"],qL={key:0,scope:"col",class:"nb-data-table__th nb-data-table__expand-cell"},GL={key:1,scope:"col",class:"nb-data-table__th nb-data-table__select-cell"},YL=["aria-sort"],XL=["onClick"],JL={class:"nb-data-table__th-label"},QL={key:1,class:"nb-data-table__th-label"},e$={key:2,scope:"col",class:"nb-data-table__th nb-data-table__actions-cell"},t$=["role"],i$={key:0,class:"nb-data-table__td"},r$={key:1,class:"nb-data-table__td"},n$={key:2,class:"nb-data-table__td"},s$={key:1,class:"nb-data-table__state-row"},a$=["colspan"],l$={key:2,class:"nb-data-table__state-row"},o$=["colspan"],c$=["role","aria-selected","tabindex","onClick","onKeydown","onKeyup"],u$=["role"],d$=["aria-expanded","aria-controls","aria-label","onClick"],h$=["checked","aria-label","onChange"],f$=["role","data-label"],p$=["role"],_$=["colspan","role"],m$=["id","aria-label"],v$={key:1,class:"nb-data-table__footer"},Vv=nt(Re({__name:"DataTable",props:{columns:{},rows:{},rowKey:{},size:{default:"lg"},sortState:{default:null},selectable:{default:"none"},selected:{default:()=>[]},loading:{type:Boolean,default:!1},skeletonRows:{default:5},error:{default:void 0},emptyMessage:{default:void 0},stickyHeader:{type:Boolean,default:!0},zebra:{type:Boolean,default:!1},fill:{type:Boolean,default:!1},title:{default:void 0},description:{default:void 0},ariaLabel:{default:void 0},stackOnPhone:{type:Boolean,default:!1},expanded:{default:()=>[]}},emits:["sort","update:selected","row-click","update:expanded"],setup(e,{emit:t}){let i=e,{layerProps:r}=js(),n=t,s=Fr(),a=`nb-data-table-select-${Pi()}`,l=j(()=>i.size==="xl"?"lg":i.size),o=j(()=>i.columns.filter(R=>!R.hidden)),c=j(()=>i.selectable!=="none"),u=j(()=>!!s["row-actions"]),d=j(()=>!!s["row-detail"]),h=j(()=>o.value.length+(d.value?1:0)+(c.value?1:0)+(u.value?1:0)),{phone:f}=Bo(),v=j(()=>i.stackOnPhone&&f.value),p=j(()=>{var R;return(R=o.value.find(B=>B.primary)??o.value.find(B=>!B.phoneHidden&&!B.phoneMeta))==null?void 0:R.key});function S(R){return R.phoneHidden?"nb-data-table__td--phone-hidden":R.key===p.value?"nb-data-table__td--primary":R.phoneMeta?"nb-data-table__td--meta":"nb-data-table__td--field"}let _=j(()=>!i.loading&&!i.error&&i.rows.length>0&&(i.selectable==="multiple"||o.value.some(R=>R.sortable&&!R.phoneHidden)));function w(R){if(R.width!=null)return{width:typeof R.width=="number"?`${R.width}px`:R.width}}function C(R,B){return B[R.key]}function g(R){return R==null?"":String(R)}let E=R=>{var B,K;return((K=(B=R.column).render)==null?void 0:K.call(B,R.row,C(R.column,R.row),R.rowIndex))??null};E.props=["column","row","rowIndex"];function T(R){let B=i.rowKey;return typeof B=="function"?B(R):R[B]}let L=j(()=>new Set(i.selected)),V=j(()=>i.selected),P=j(()=>i.selected.length);function Y(R){return L.value.has(T(R))}let W=j(()=>i.rows.map(R=>T(R))),A=j(()=>W.value.length>0&&W.value.every(R=>L.value.has(R))),$=j(()=>!A.value&&W.value.some(R=>L.value.has(R))),Z=q(null),ie=!1;function ne(R){ie=R.shiftKey}De(W,()=>{Z.value=null});function ce(R,B){let K=T(R),Se=new Set(i.selected),Me=!Se.has(K),Ve=Z.value,Ye=Te=>{Me?Se.add(Te):Se.delete(Te)};if(ie&&Ve!==null&&Ve!==B){let Te=Math.min(Ve,B),it=Math.max(Ve,B);for(let Ot=Te;Ot<=it;Ot++){let nr=i.rows[Ot];nr&&Ye(T(nr))}}else Ye(K),Z.value=B;ie=!1,n("update:selected",[...Se])}function J(R){n("update:selected",[T(R)])}function ae(){let R=new Set(i.selected);A.value?W.value.forEach(B=>R.delete(B)):W.value.forEach(B=>R.add(B)),n("update:selected",[...R])}function re(){n("update:selected",[])}let X=j(()=>i.selectable!=="none"&&!!s["batch-actions"]),le=j(()=>X.value&&P.value>0),ve=`nb-data-table-detail-${Pi()}`,ue=j(()=>new Set(i.expanded));function he(R){return d.value&&ue.value.has(T(R))}function ye(R){let B=T(R),K=i.expanded.filter(Se=>Se!==B);K.length===i.expanded.length&&K.push(B),n("update:expanded",K)}function U(R){return`${ve}-${R}`}function fe(R,B){let K=o.value.find(Se=>Se.key===p.value);return`Details for ${(K?g(C(K,R)).trim():"")||`row ${B+1}`}`}let ge=j(()=>!!i.title||!!i.description||!!s.toolbar),se=j(()=>!!s.search||!!s["toolbar-actions"]||X.value),x=j(()=>ge.value||se.value);function H(R){return!!i.sortState&&i.sortState.key===R.key&&i.sortState.direction!=="none"}function O(R){return H(R)?i.sortState.direction==="asc"?"ascending":"descending":"none"}function ee(R){return H(R)?i.sortState.direction==="asc"?uS:xL:CL}function Q(R){return R==="asc"?"desc":R==="desc"?"none":"asc"}function pe(R){let B=i.sortState&&i.sortState.key===R.key?i.sortState.direction:"none";n("sort",{key:R.key,direction:Q(B)})}let we=wi(),y=j(()=>{var R;return!!((R=we==null?void 0:we.vnode.props)!=null&&R.onRowClick)});function k(R,B){n("row-click",R,B)}function D(R){return y.value&&R.target===R.currentTarget&&!R.altKey&&!R.ctrlKey&&!R.metaKey}function N(R,B,K){D(R)&&(R.key==="Enter"?(R.preventDefault(),R.repeat||k(B,K)):R.key===" "&&R.preventDefault())}function I(R,B,K){!D(R)||R.key!==" "||(R.preventDefault(),k(B,K))}return(R,B)=>(m(),M("div",Wt({class:["nb-data-table",`nb-data-table--${e.size}`,{"nb-data-table--zebra":e.zebra},{"nb-data-table--sticky":e.stickyHeader},{"nb-data-table--fill":e.fill},{"nb-data-table--stacked":v.value},{"nb-data-table--stacked-headless":v.value&&!_.value},{"nb-data-table--expandable":d.value}]},de(r)),[x.value?(m(),M("div",TL,[ge.value?(m(),M("div",HL,[He(R.$slots,"toolbar",{selectedCount:P.value},()=>[e.title?(m(),M("h2",NL,F(e.title),1)):z("",!0),e.description?(m(),M("p",PL,F(e.description),1)):z("",!0)],!0)])):z("",!0),se.value?(m(),M("div",OL,[R.$slots.search||R.$slots["toolbar-actions"]?(m(),M("div",{key:0,class:Le(["nb-data-table__toolbar-tools",{"nb-data-table__toolbar-tools--search":!!R.$slots.search}]),inert:le.value||void 0,"aria-hidden":le.value||void 0},[R.$slots.search?(m(),M("div",IL,[He(R.$slots,"search",{},void 0,!0)])):z("",!0),He(R.$slots,"toolbar-actions",{},void 0,!0)],10,RL)):z("",!0),le.value?(m(),M("div",DL,[b("span",VL,F(P.value)+" selected ",1),b("div",ZL,[He(R.$slots,"batch-actions",{selectedKeys:V.value,clear:re},void 0,!0)]),G(oi,{class:"nb-data-table__batch-cancel",variant:"ghost",size:l.value,onClick:re},{default:te(()=>[...B[3]||(B[3]=[_e(" Cancel ",-1)])]),_:1},8,["size"])])):z("",!0)])):z("",!0)])):z("",!0),b("div",BL,[b("table",{class:"nb-data-table__table",role:v.value?"table":void 0,"aria-label":e.ariaLabel||e.title||void 0,"aria-busy":e.loading||void 0},[b("colgroup",null,[d.value?(m(),M("col",zL)):z("",!0),c.value?(m(),M("col",UL)):z("",!0),(m(!0),M(ke,null,Fe(o.value,K=>(m(),M("col",{key:`col-${K.key}`,style:_i(w(K))},null,4))),128)),u.value?(m(),M("col",WL)):z("",!0)]),b("thead",{class:"nb-data-table__head",role:v.value?"rowgroup":void 0},[b("tr",{role:v.value?"row":void 0},[d.value?(m(),M("th",qL,[...B[4]||(B[4]=[b("span",{class:"nb-sr-only"},"Row details",-1)])])):z("",!0),c.value?(m(),M("th",GL,[e.selectable==="multiple"?(m(),me(G6,{key:0,"model-value":A.value,indeterminate:$.value,"aria-label":"Select all rows","onUpdate:modelValue":ae},null,8,["model-value","indeterminate"])):z("",!0)])):z("",!0),(m(!0),M(ke,null,Fe(o.value,K=>(m(),M("th",{key:`th-${K.key}`,scope:"col",class:Le(["nb-data-table__th",`nb-data-table__th--${K.align||"left"}`,{"nb-data-table__th--sortable":K.sortable},{"nb-data-table__th--sorted":H(K)},v.value&&K.phoneHidden&&"nb-data-table__th--phone-hidden"]),"aria-sort":K.sortable?O(K):void 0},[K.sortable?(m(),M("button",{key:0,type:"button",class:"nb-data-table__sort",onClick:Se=>pe(K)},[b("span",JL,[He(R.$slots,`header-${K.key}`,{column:K},()=>[_e(F(K.header),1)],!0)]),G(Ue,{name:ee(K),class:"nb-data-table__sort-icon","aria-hidden":"true"},null,8,["name"])],8,XL)):(m(),M("span",QL,[He(R.$slots,`header-${K.key}`,{column:K},()=>[_e(F(K.header),1)],!0)]))],10,YL))),128)),u.value?(m(),M("th",e$,[...B[5]||(B[5]=[b("span",{class:"nb-sr-only"},"Row actions",-1)])])):z("",!0)],8,KL)],8,jL),b("tbody",{class:"nb-data-table__body",role:v.value?"rowgroup":void 0},[e.loading?(m(!0),M(ke,{key:0},Fe(e.skeletonRows,K=>(m(),M("tr",{key:`skeleton-${K}`,class:"nb-data-table__row nb-data-table__row--skeleton"},[d.value?(m(),M("td",i$)):z("",!0),c.value?(m(),M("td",r$,[...B[6]||(B[6]=[b("span",{class:"nb-data-table__skeleton nb-data-table__skeleton--box"},null,-1)])])):z("",!0),(m(!0),M(ke,null,Fe(o.value,Se=>(m(),M("td",{key:`sk-${K}-${Se.key}`,class:"nb-data-table__td"},[...B[7]||(B[7]=[b("span",{class:"nb-data-table__skeleton"},null,-1)])]))),128)),u.value?(m(),M("td",n$,[...B[8]||(B[8]=[b("span",{class:"nb-data-table__skeleton nb-data-table__skeleton--box"},null,-1)])])):z("",!0)]))),128)):e.error?(m(),M("tr",s$,[b("td",{colspan:h.value,class:"nb-data-table__state nb-data-table__state--error"},[He(R.$slots,"error",{error:e.error},()=>[G(or,{is:"span",align:"center",justify:"center",gap:"xs",class:"nb-data-table__state-inner"},{default:te(()=>[G(Ue,{name:"warning-circle-fill","aria-hidden":"true"}),b("span",null,F(e.error),1)]),_:1})],!0)],8,a$)])):e.rows.length?(m(!0),M(ke,{key:3},Fe(e.rows,(K,Se)=>(m(),M(ke,{key:T(K)},[b("tr",{class:Le(["nb-data-table__row",{"nb-data-table__row--selected":Y(K)},{"nb-data-table__row--clickable":y.value},d.value&&{"nb-data-table__row--expanded":he(K),"nb-data-table__row--even":Se%2==1}]),role:v.value?"row":void 0,"aria-selected":e.selectable==="none"?void 0:Y(K),tabindex:y.value?0:void 0,onClick:Me=>k(K,Se),onKeydown:Me=>N(Me,K,Se),onKeyup:Me=>I(Me,K,Se)},[d.value?(m(),M("td",{key:0,class:"nb-data-table__td nb-data-table__expand-cell",role:v.value?"cell":void 0,onClick:B[0]||(B[0]=Qe(()=>{},["stop"]))},[b("button",{type:"button",class:"nb-data-table__expand","aria-expanded":he(K),"aria-controls":he(K)?U(Se):void 0,"aria-label":fe(K,Se),onClick:Me=>ye(K)},[G(Ue,{name:Uh,class:"nb-data-table__expand-icon","aria-hidden":"true"})],8,d$)],8,u$)):z("",!0),c.value?(m(),M("td",{key:1,class:"nb-data-table__td nb-data-table__select-cell",onClick:B[1]||(B[1]=Qe(()=>{},["stop"])),onMousedown:ne,onKeydown:ne},[e.selectable==="multiple"?(m(),me(G6,{key:0,"model-value":Y(K),"aria-label":`Select row ${Se+1}`,"onUpdate:modelValue":Me=>ce(K,Se)},null,8,["model-value","aria-label","onUpdate:modelValue"])):(m(),M("input",{key:1,type:"radio",class:"nb-data-table__radio",name:a,checked:Y(K),"aria-label":`Select row ${Se+1}`,onChange:Me=>J(K)},null,40,h$))],32)):z("",!0),(m(!0),M(ke,null,Fe(o.value,Me=>(m(),M("td",{key:`td-${T(K)}-${Me.key}`,class:Le(["nb-data-table__td",`nb-data-table__td--${Me.align||"left"}`,Me.cellClass,v.value&&S(Me)]),role:v.value?"cell":void 0,"data-label":e.stackOnPhone?Me.header:void 0},[He(R.$slots,`cell-${Me.key}`,{row:K,value:C(Me,K),column:Me,rowIndex:Se},()=>[Me.render?(m(),me(E,{key:0,column:Me,row:K,"row-index":Se},null,8,["column","row","row-index"])):(m(),M(ke,{key:1},[_e(F(g(C(Me,K))),1)],64))],!0)],10,f$))),128)),u.value?(m(),M("td",{key:2,class:"nb-data-table__td nb-data-table__actions-cell",onClick:B[2]||(B[2]=Qe(()=>{},["stop"]))},[He(R.$slots,"row-actions",{row:K,rowIndex:Se},void 0,!0)])):z("",!0)],42,c$),he(K)?(m(),M("tr",{key:0,class:"nb-data-table__detail-row",role:v.value?"row":void 0},[b("td",{colspan:h.value,class:"nb-data-table__detail-cell",role:v.value?"cell":void 0},[b("div",{id:U(Se),class:"nb-data-table__detail",role:"region","aria-label":fe(K,Se)},[He(R.$slots,"row-detail",{row:K,rowIndex:Se},void 0,!0)],8,m$)],8,_$)],8,p$)):z("",!0)],64))),128)):(m(),M("tr",l$,[b("td",{colspan:h.value,class:"nb-data-table__state nb-data-table__state--empty"},[He(R.$slots,"empty",{},()=>[b("span",null,F(e.emptyMessage||"No data to display"),1)],!0)],8,o$)]))],8,t$)],8,FL)]),R.$slots.footer?(m(),M("div",v$,[He(R.$slots,"footer",{},void 0,!0)])):z("",!0)],16))}}),[["__scopeId","data-v-e1388797"]]),g$=["width","height","aria-label"],b$={key:0},y$=["x1","x2","y1","y2"],w$={class:"nb-chart__axis"},S$=["x","y"],C$={class:"nb-chart__axis"},k$=["x","y"],A$=["x1","x2","y1","y2"],M$=["y","transform"],E$=["x","y"],L$=["d","fill"],$$=["d","stroke"],x$=["cx","cy","r","fill","onMousedown","onContextmenu"],T$={key:5},H$=["x1","x2","y1","y2"],N$=["x1","x2","y1","y2"],P$="var(--nb-c-surface)",O$=nt(Re({__name:"InterpolationChart",props:{modelValue:{default:()=>[]},inputLabel:{default:void 0},outputLabel:{default:void 0},inputMin:{default:0},inputMax:{default:100},outputMin:{default:0},outputMax:{default:100},editable:{type:Boolean,default:!0},minPoints:{default:2},inputStep:{default:0},outputStep:{default:0},title:{default:void 0},subtitle:{default:void 0},height:{default:280},showLegend:{type:Boolean,default:!1},showTooltip:{type:Boolean,default:!0},showGrid:{type:Boolean,default:!0},colors:{default:()=>[]}},emits:["update:modelValue"],setup(e,{emit:t}){let i=e,r=t,n=j(()=>Kh(0,i.colors)),s={top:16,right:16,bottom:32,left:48},a=q(null),l=Gh(a,{width:480,height:240}),o=j(()=>Math.max(0,l.value.width-s.left-s.right)),c=j(()=>Math.max(0,l.value.height-s.top-s.bottom)),u=j(()=>[...i.modelValue].sort((he,ye)=>he.input-ye.input)),d=j(()=>[i.inputMin,i.inputMax]),h=j(()=>{let he=u.value.map(ye=>ye.output);return qh(Math.min(i.outputMin,...he),Math.max(i.outputMax,...he),.05)}),f=j(()=>fc(d.value,[s.left,l.value.width-s.right])),v=j(()=>fc(h.value,[l.value.height-s.bottom,s.top])),p=j(()=>f.value.ticks(6)),S=j(()=>v.value.ticks(5)),_=he=>{let[ye,U]=d.value,[fe,ge]=f.value.range;return ye+(he-fe)/(ge-fe)*(U-ye)},w=he=>{let[ye,U]=h.value,[fe,ge]=v.value.range;return ye+(he-fe)/(ge-fe)*(U-ye)},C=(he,ye)=>!ye||ye<=0?he:Math.round(he/ye)*ye,g=(he,ye,U)=>Math.max(ye,Math.min(U,he)),E=(he,ye=1)=>Math.round(he*10**ye)/10**ye,T=j(()=>{let he=u.value;return he.length<2?"":he.map((ye,U)=>`${U===0?"M":"L"}${f.value(ye.input)},${v.value(ye.output)}`).join(" ")}),L=j(()=>{let he=u.value;if(he.length<2)return"";let ye=l.value.height-s.bottom;return`${he.map((U,fe)=>`${fe===0?"M":"L"}${f.value(U.input)},${v.value(U.output)}`).join(" ")} L${f.value(he[he.length-1].input)},${ye} L${f.value(he[0].input)},${ye} Z`}),V=q(null),P=q(null);function Y(he){r("update:modelValue",[...he].sort((ye,U)=>ye.input-U.input))}function W(he,ye){i.editable&&(V.value=he,window.addEventListener("mousemove",$),window.addEventListener("mouseup",Z))}function A(he){var fe;let ye=(fe=a.value)==null?void 0:fe.querySelector("svg");if(!ye)return null;let U=ye.getBoundingClientRect();return{px:he.clientX-U.left,py:he.clientY-U.top}}function $(he){if(V.value===null)return;let ye=A(he);if(!ye)return;let U=_(ye.px),fe=w(ye.py),ge=[...u.value],se=V.value,x=i.inputStep>0?i.inputStep:.1;ge[se]={input:E(C(g(U,se>0?ge[se-1].input+x:i.inputMin,se<ge.length-1?ge[se+1].input-x:i.inputMax),i.inputStep)),output:E(C(g(fe,i.outputMin,i.outputMax),i.outputStep))},Y(ge)}function Z(){V.value=null,window.removeEventListener("mousemove",$),window.removeEventListener("mouseup",Z)}function ie(he){if(V.value!==null)return;let ye=A(he);if(!ye)return;let U=-1,fe=1/0;for(let ge=0;ge<u.value.length;ge++){let se=u.value[ge],x=f.value(se.input)-ye.px,H=v.value(se.output)-ye.py,O=Math.sqrt(x*x+H*H);O<fe&&(fe=O,U=ge)}P.value=fe<20?U:null,re.value={x:ye.px+12,y:ye.py-12}}function ne(){V.value===null&&(P.value=null)}function ce(){V.value!==null&&(V.value=null,window.removeEventListener("mousemove",$),window.removeEventListener("mouseup",Z))}function J(he){if(!i.editable)return;let ye=A(he);if(!ye)return;let U=_(ye.px),fe=w(ye.py);if(U<i.inputMin||U>i.inputMax||fe<i.outputMin||fe>i.outputMax)return;let ge=E(C(g(U,i.inputMin,i.inputMax),i.inputStep)),se=E(C(g(fe,i.outputMin,i.outputMax),i.outputStep));Y([...u.value,{input:ge,output:se}])}function ae(he){i.editable&&(u.value.length<=i.minPoints||Y(u.value.filter((ye,U)=>U!==he)))}mi(()=>{window.removeEventListener("mousemove",$),window.removeEventListener("mouseup",Z)});let re=q({x:0,y:0}),X=j(()=>P.value!==null||V.value!==null),le=j(()=>{let he=V.value??P.value;return he===null?"":`Point ${he+1}`}),ve=j(()=>{let he=V.value??P.value;if(he===null||he>=u.value.length)return[];let ye=u.value[he];return[{label:i.inputLabel||"Input",value:ue(ye.input),color:n.value},{label:i.outputLabel||"Output",value:ue(ye.output),color:n.value}]}),ue=he=>Number.isInteger(he)?String(he):he.toFixed(1);return(he,ye)=>(m(),me(Wh,{title:e.title,subtitle:e.subtitle,height:e.height,"show-legend":!1},{default:te(()=>[b("div",{ref_key:"root",ref:a,class:"nb-interpolation-chart"},[(m(),M("svg",{width:de(l).width,height:de(l).height,class:"nb-chart__svg",role:"img","aria-label":e.title||"Interpolation chart",onMousemove:ie,onMouseleave:ne,onMouseup:ce,onDblclick:J,onContextmenu:ye[0]||(ye[0]=Qe(()=>{},["prevent"]))},[e.showGrid&&de(l).width>0?(m(),M("g",b$,[(m(!0),M(ke,null,Fe(S.value,U=>(m(),M("line",{key:`grid-${U}`,class:"nb-chart__gridline",x1:s.left,x2:de(l).width-s.right,y1:v.value(U),y2:v.value(U)},null,8,y$))),128))])):z("",!0),b("g",w$,[(m(!0),M(ke,null,Fe(S.value,U=>(m(),M("text",{key:`yt-${U}`,x:s.left-6,y:v.value(U),"text-anchor":"end","dominant-baseline":"middle"},F(ue(U)),9,S$))),128))]),b("g",C$,[(m(!0),M(ke,null,Fe(p.value,U=>(m(),M("text",{key:`xt-${U}`,x:f.value(U),y:de(l).height-s.bottom+14,"text-anchor":"middle"},F(ue(U)),9,k$))),128))]),b("line",{class:"nb-chart__axis-line",x1:s.left,x2:de(l).width-s.right,y1:de(l).height-s.bottom,y2:de(l).height-s.bottom},null,8,A$),e.outputLabel?(m(),M("text",{key:1,class:"nb-chart__axis-label",x:12,y:s.top+c.value/2,"text-anchor":"middle",transform:`rotate(-90, 12, ${s.top+c.value/2})`},F(e.outputLabel),9,M$)):z("",!0),e.inputLabel?(m(),M("text",{key:2,class:"nb-chart__axis-label",x:s.left+o.value/2,y:de(l).height-2,"text-anchor":"middle"},F(e.inputLabel),9,E$)):z("",!0),u.value.length>=2?(m(),M("path",{key:3,class:"nb-interpolation-chart__area",d:L.value,fill:n.value,opacity:"0.12"},null,8,L$)):z("",!0),u.value.length>=2?(m(),M("path",{key:4,class:"nb-interpolation-chart__line",d:T.value,stroke:n.value,fill:"none","stroke-width":"2","stroke-linejoin":"round","stroke-linecap":"round"},null,8,$$)):z("",!0),(m(!0),M(ke,null,Fe(u.value,(U,fe)=>(m(),M("circle",{key:`pt-${fe}`,class:Le(["nb-interpolation-chart__point",{"nb-interpolation-chart__point--editable":e.editable,"nb-interpolation-chart__point--dragging":V.value===fe,"nb-interpolation-chart__point--hover":P.value===fe&&V.value===null}]),cx:f.value(U.input),cy:v.value(U.output),r:V.value===fe?7:P.value===fe?6:5,fill:n.value,stroke:P$,"stroke-width":"2",onMousedown:Qe(ge=>W(fe,ge),["prevent"]),onContextmenu:Qe(ge=>ae(fe),["prevent"])},null,42,x$))),128)),V.value===null?z("",!0):(m(),M("g",T$,[b("line",{class:"nb-interpolation-chart__crosshair",x1:f.value(u.value[V.value].input),x2:f.value(u.value[V.value].input),y1:s.top,y2:de(l).height-s.bottom},null,8,H$),b("line",{class:"nb-interpolation-chart__crosshair",x1:s.left,x2:de(l).width-s.right,y1:v.value(u.value[V.value].output),y2:v.value(u.value[V.value].output)},null,8,N$)]))],40,g$)),G(jh,{visible:e.showTooltip&&X.value,x:re.value.x,y:re.value.y,title:le.value,rows:ve.value},null,8,["visible","x","y","title","rows"])],512)]),_:1},8,["title","subtitle","height"]))}}),[["__scopeId","data-v-676875de"]]),Zv=6,R$=8,I$=(e,t=Zv)=>{let i=[];if(e<=0)return i;let r=Math.max(1,Math.ceil(e/t));for(let n=0;n<e;n+=r)i.push(n);return i[i.length-1]!==e-1&&i.push(e-1),i},vc=(e,t,i)=>{for(let r=1;r<e.length;r++){let n=e[r-1],s=e[r],a=n.x+t(n.index)/2;if(s.x-t(s.index)/2-a<i)return!1}return!0},D$=(e,t,i)=>{if(i===void 0||t>=i)return e;let r=t/2;return Math.min(Math.max(e,r),i-r)},J6=(e,t,i,r,n)=>{let s=o=>o.x===i(o.index)?r:n,a=e,l=a[a.length-1];return a.length>2&&!vc(a.slice(-2),t,s(l))&&(a=[...a.slice(0,-2),l]),a.length>2&&!vc(a.slice(0,2),t,s(a[0]))&&(a=[a[0],...a.slice(2)]),a},V$=({count:e,positionOf:t,widthOf:i,width:r,gap:n=R$})=>{let s=I$(e);if(!i)return s.map(u=>({index:u,x:t(u)}));let a=u=>({index:u,x:D$(t(u),i(u),r)}),l=J6(s.map(a),i,t,-1/0,n);if(vc(l,i,0))return l;let o=e-1,c=Math.max(1,Math.ceil(e/Zv))+1;for(let u=c;u<=o;u++){let d=[];for(let f=0;f<o;f+=u)d.push(f);let h=J6([...d,o].map(a),i,t,n,n);if(vc(h,i,n))return h}return[a(0)]},Z$=["width","height","aria-label"],B$={key:0},F$=["x1","x2","y1","y2"],z$={class:"nb-chart__axis"},U$=["x","y"],W$=["x","y"],j$=["x1","x2","y1","y2"],K$=["d","fill"],q$=["d","stroke"],G$=["cx","cy","r","fill"],Y$=["x1","x2","y1","y2"],X$=nt(Re({__name:"LineChart",props:{series:{default:()=>[]},area:{type:Boolean,default:!1},points:{type:Boolean,default:!1},curve:{default:"smooth"},valueFormatter:{},title:{default:void 0},subtitle:{default:void 0},height:{default:280},showLegend:{type:Boolean,default:!0},showTooltip:{type:Boolean,default:!0},showGrid:{type:Boolean,default:!0},colors:{default:()=>hc}},setup(e){let t=e,i={top:12,right:16,bottom:28,left:44},r=q(null),n=Gh(r,{width:480,height:240}),s=j(()=>t.series.map((A,$)=>({name:A.name,data:A.data,color:A.color??Kh($,t.colors)}))),a=j(()=>{var A;return(((A=t.series[0])==null?void 0:A.data)??[]).map($=>$.x)}),l=j(()=>{let A=t.series.flatMap($=>$.data.map(Z=>Z.y));return A.length?qh(Math.min(0,...A),Math.max(...A),.1):[0,1]}),o=j(()=>fc(l.value,[Math.max(i.top,n.value.height-i.bottom),i.top])),c=j(()=>o.value.ticks(5)),u=q(7),d=A=>Math.max(o.value(A),u.value),h=j(()=>Math.max(0,n.value.width-i.left-i.right)),f=A=>{let $=a.value.length;return $<=1?i.left+h.value/2:i.left+A/($-1)*h.value},v=q(null),p=q(null),S=()=>{let A=v.value;if(!A||typeof document>"u")return;let $=document.createElementNS("http://www.w3.org/2000/svg","text");if(typeof $.getComputedTextLength!="function")return;$.setAttribute("visibility","hidden"),$.setAttribute("aria-hidden","true"),A.appendChild($);let Z=new Map;for(let ie of a.value){let ne=F(ie);Z.has(ne)||($.textContent=ne,Z.set(ne,$.getComputedTextLength()))}if(typeof $.getBBox=="function"){$.setAttribute("dominant-baseline","middle"),$.setAttribute("y","0"),$.textContent="0";let ie=-$.getBBox().y;ie>0&&(u.value=ie)}A.removeChild($),p.value=Z};De(a,S,{flush:"post"});let _=typeof document>"u"?void 0:document.fonts;lt(()=>{var A;S(),(A=_==null?void 0:_.addEventListener)==null||A.call(_,"loadingdone",S)}),mi(()=>{var A;(A=_==null?void 0:_.removeEventListener)==null||A.call(_,"loadingdone",S)});let w=j(()=>{let A=a.value,$=p.value;return V$({count:A.length,positionOf:f,widthOf:$?Z=>$.get(F(A[Z]))??0:void 0,width:n.value.width}).map(Z=>({...Z,value:A[Z.index]}))}),C=A=>A.length?E(A.map(($,Z)=>[f(Z),o.value($.y)]),t.curve):"",g=A=>{if(!A.length)return"";let $=A.map((ie,ne)=>[f(ne),o.value(ie.y)]),Z=n.value.height-i.bottom;return`${E($,t.curve)} L${$[$.length-1][0]},${Z} L${$[0][0]},${Z} Z`},E=(A,$)=>{if(!A.length)return"";if(A.length===1)return`M${A[0][0]},${A[0][1]}`;if($==="linear")return A.map((ne,ce)=>`${ce===0?"M":"L"}${ne[0]},${ne[1]}`).join(" ");if($==="step"){let ne=`M${A[0][0]},${A[0][1]}`;for(let ce=1;ce<A.length;ce++){let[J,ae]=A[ce-1],[re,X]=A[ce],le=(J+re)/2;ne+=` L${le},${ae} L${le},${X} L${re},${X}`}return ne}let Z=.2,ie=`M${A[0][0]},${A[0][1]}`;for(let ne=0;ne<A.length-1;ne++){let ce=A[ne-1]??A[ne],J=A[ne],ae=A[ne+1],re=A[ne+2]??ae,X=J[0]+(ae[0]-ce[0])*Z,le=J[1]+(ae[1]-ce[1])*Z,ve=ae[0]-(re[0]-J[0])*Z,ue=ae[1]-(re[1]-J[1])*Z;ie+=` C${X},${le} ${ve},${ue} ${ae[0]},${ae[1]}`}return ie},T=A=>Math.abs(A)>=1e3?`${(A/1e3).toFixed(1)}k`:Number.isInteger(A)?String(A):A.toFixed(1),L=A=>t.valueFormatter?t.valueFormatter(A):T(A),V=q(null),P=q({x:0,y:0}),Y=A=>{let $=A.currentTarget.getBoundingClientRect(),Z=A.clientX-$.left,ie=a.value.length;if(!ie)return;let ne=(Z-i.left)/Math.max(1,h.value);V.value=Math.round(Math.min(1,Math.max(0,ne))*(ie-1)),P.value={x:A.clientX-$.left+12,y:A.clientY-$.top+12}},W=j(()=>V.value===null?[]:s.value.map(A=>{let $=A.data[V.value];return{label:A.name,value:($==null?void 0:$.label)??L(($==null?void 0:$.y)??0),color:A.color}}));return(A,$)=>(m(),me(Wh,{title:e.title,subtitle:e.subtitle,height:e.height,"show-legend":e.showLegend&&s.value.length>0},{legend:te(()=>[G(uv,{items:s.value.map(Z=>({label:Z.name,color:Z.color}))},null,8,["items"])]),default:te(()=>[b("div",{ref_key:"root",ref:r,class:"nb-line-chart"},[(m(),M("svg",{width:de(n).width,height:de(n).height,class:"nb-chart__svg",role:"img","aria-label":e.title||"Line chart",onMouseleave:$[0]||($[0]=Z=>V.value=null),onMousemove:Y},[e.showGrid&&de(n).width>0?(m(),M("g",B$,[(m(!0),M(ke,null,Fe(c.value,Z=>(m(),M("line",{key:`grid-${Z}`,class:"nb-chart__gridline",x1:i.left,x2:de(n).width-i.right,y1:o.value(Z),y2:o.value(Z)},null,8,F$))),128))])):z("",!0),b("g",z$,[(m(!0),M(ke,null,Fe(c.value,Z=>(m(),M("text",{key:`yt-${Z}`,x:i.left-6,y:d(Z),"text-anchor":"end","dominant-baseline":"middle"},F(L(Z)),9,U$))),128))]),b("g",{ref_key:"xAxis",ref:v,class:"nb-chart__axis"},[(m(!0),M(ke,null,Fe(w.value,(Z,ie)=>(m(),M("text",{key:`xt-${ie}`,x:Z.x,y:de(n).height-i.bottom+14,"text-anchor":"middle"},F(Z.value),9,W$))),128))],512),b("line",{class:"nb-chart__axis-line",x1:i.left,x2:de(n).width-i.right,y1:de(n).height-i.bottom,y2:de(n).height-i.bottom},null,8,j$),(m(!0),M(ke,null,Fe(s.value,(Z,ie)=>(m(),M("g",{key:`s-${ie}`},[e.area?(m(),M("path",{key:0,class:"nb-chart__area",d:g(Z.data),fill:Z.color,opacity:"0.18"},null,8,K$)):z("",!0),b("path",{class:"nb-chart__line",d:C(Z.data),stroke:Z.color,fill:"none","stroke-width":"2","stroke-linejoin":"round","stroke-linecap":"round"},null,8,q$),e.points?(m(!0),M(ke,{key:1},Fe(Z.data,(ne,ce)=>(m(),M("circle",{key:`p-${ie}-${ce}`,cx:f(ce),cy:o.value(ne.y),r:V.value===ce?4:3,fill:Z.color,class:"nb-chart__point"},null,8,G$))),128)):z("",!0)]))),128)),V.value===null?z("",!0):(m(),M("line",{key:1,class:"nb-chart__hover-line",x1:f(V.value),x2:f(V.value),y1:i.top,y2:de(n).height-i.bottom},null,8,Y$))],40,Z$)),G(jh,{visible:e.showTooltip&&V.value!==null,x:P.value.x,y:P.value.y,title:V.value===null?"":String(a.value[V.value]),rows:W.value},null,8,["visible","x","y","title","rows"])],512)]),_:1},8,["title","subtitle","height","show-legend"]))}}),[["__scopeId","data-v-9a4509a0"]]),io=0,Bv="";function J$(){typeof document>"u"||(io===0&&(Bv=document.body.style.overflow,document.body.style.overflow="hidden"),io+=1)}function Q$(){typeof document>"u"||io!==0&&(--io,io===0&&(document.body.style.overflow=Bv))}var ex=['a[href]:not([tabindex="-1"])','area[href]:not([tabindex="-1"])','button:not([disabled]):not([tabindex="-1"])','input:not([disabled]):not([type="hidden"]):not([tabindex="-1"])','select:not([disabled]):not([tabindex="-1"])','textarea:not([disabled]):not([tabindex="-1"])','summary:not([tabindex="-1"])','audio[controls]:not([tabindex="-1"])','video[controls]:not([tabindex="-1"])','iframe:not([tabindex="-1"])','[contenteditable]:not([contenteditable="false"]):not([tabindex="-1"])','[tabindex]:not([tabindex="-1"])'].map(e=>`${e}:not([hidden]):not([aria-hidden="true"])`).join(",");function tx(e){return e?Array.from(e.querySelectorAll(ex)).filter(t=>t.getAttribute("aria-disabled")!=="true"):[]}function ix(){return typeof document>"u"?[]:Array.from(document.querySelectorAll('[aria-modal="true"]'))}function Q6(e){if(!e)return!1;let t=ix();return t.length===0||t[t.length-1]===e}function rx(e){let{container:t,active:i,initialFocus:r,floatingSelector:n}=e;function s(S){let _=n==null?void 0:n();return!_||!S?!1:!!S.closest(_)}function a(S){let _=t();return!!_&&!!S&&_.contains(S)}function l(){return tx(t())}function o(){var S;(S=t())==null||S.focus()}function c(){let S=l()[0];S?S.focus():o()}let u=null;function d(){let S=u;u=null,S!=null&&S.isConnected&&S.focus()}function h(){u=document.activeElement instanceof HTMLElement?document.activeElement:null}function f(S){if(S.key!=="Tab"||!i())return;let _=t();if(!_||!Q6(_)||s(document.activeElement))return;let w=l(),C=document.activeElement;if(w.length===0){S.preventDefault(),a(C)||o();return}let g=w[0],E=w[w.length-1];S.shiftKey&&(C===g||!a(C))?(S.preventDefault(),E.focus()):!S.shiftKey&&C===E?(S.preventDefault(),g.focus()):a(C)||(S.preventDefault(),g.focus())}function v(S){if(!i())return;let _=S.relatedTarget;if(_ instanceof Element){if(a(_)||s(_))return}else if(_!==null)return;requestAnimationFrame(()=>{if(!i())return;let w=document.activeElement;a(w)||s(w)||w&&w!==document.body&&!w.isConnected||Q6(t())&&c()})}typeof document<"u"&&(document.addEventListener("keydown",f,!0),document.addEventListener("focusout",v,!0));async function p(){if(await Kt(),!i())return;let S=(r==null?void 0:r())??null;S?S.focus():c()}return De(i,(S,_)=>{S!==_&&(S?(h(),p()):d())}),lt(()=>{i()&&(h(),p())}),Oi(()=>{typeof document<"u"&&(document.removeEventListener("keydown",f,!0),document.removeEventListener("focusout",v,!0)),d()}),{focusInside:c,restoreFocus:d}}var nx=["[data-nb-confirm-floating]",".nb-select__dropdown",".nb-menu",".nb-date-picker__calendar",".nb-user-menu__panel",".nb-sidebar-menu-item__flyout"],sx=new Set;function Fv(e=[]){return[...nx,...sx,...e].map(t=>t.trim()).filter(Boolean).join(",")}function ax(e,t){if(!e)return;let i=`${t?0:200}ms`;e.style.transitionDuration=i;let r=e.parentElement;r instanceof HTMLElement&&(r.style.transitionDuration=i)}var lx=["role","aria-labelledby","aria-describedby","aria-busy"],ox={key:0,class:"nb-modal--header"},cx=["disabled","aria-disabled"],ux=["tabindex","role","aria-labelledby"],dx=nt(Re({__name:"Modal",props:{open:{type:Boolean,default:!1},title:{default:void 0},size:{default:x9.Medium},closeOnOverlay:{type:Boolean,default:!0},role:{default:"dialog"},labelledBy:{default:void 0},describedBy:{default:void 0},busy:{type:Boolean,default:!1},closeDisabled:{type:Boolean,default:!1},closeAppearance:{default:"corner"},closeOnEscape:{type:Boolean,default:!0},trapFocus:{type:Boolean,default:!0},initialFocus:{type:[String,Function],default:void 0},floatingSelectors:{default:void 0}},emits:["close"],setup(e,{expose:t,emit:i}){let r=e,n=i,s=Fr(),a=j(()=>!!s.header||!!r.title),l=`nb-modal-title-${Pi()}`,o=q(null),c=q(null),{layerProps:u}=js({overlay:!0});function d(){r.closeOnOverlay&&n("close")}function h(){var P;let V=r.initialFocus;return V?typeof V=="function"?V():((P=o.value)==null?void 0:P.querySelector(V))??null:null}rx({container:()=>o.value,active:()=>r.open&&r.trapFocus,initialFocus:h,floatingSelector:()=>Fv(r.floatingSelectors)}),Uk(()=>r.open);let f=!1;function v(){f||(f=!0,J$())}function p(){f&&(f=!1,Q$())}let S=q(!1);function _(){let V=c.value;if(!V)return;let P=V.scrollHeight-V.clientHeight;!S.value&&P>4?S.value=!0:S.value&&P<=0&&(S.value=!1)}let w=null,C=null;function g(){let V=c.value;V&&(E(),typeof ResizeObserver<"u"&&(w=new ResizeObserver(()=>_()),w.observe(V)),typeof MutationObserver<"u"&&(C=new MutationObserver(()=>_()),C.observe(V,{childList:!0,subtree:!0,characterData:!0})),_())}function E(){w==null||w.disconnect(),w=null,C==null||C.disconnect(),C=null}De(()=>r.open,async V=>{V?v():p(),await Kt(),V?g():(E(),S.value=!1)},{immediate:!0}),Oi(()=>{p(),E()});function T(){let V=o.value;if(!V)return!1;let P=Array.from(document.querySelectorAll('[aria-modal="true"]'));return P.length===0||P[P.length-1]===V}function L(V){V.key==="Escape"&&(V.defaultPrevented||!r.open||!r.closeOnEscape||r.closeDisabled||T()&&n("close"))}return lt(()=>{document.addEventListener("keydown",L),r.open&&g()}),Oi(()=>{document.removeEventListener("keydown",L)}),t({dialogEl:()=>o.value,bodyEl:()=>c.value}),(V,P)=>(m(),me(dr,{to:"body"},[G(Ch,{name:"nb-modal"},{default:te(()=>[e.open?(m(),M("div",{key:0,class:"nb-modal--overlay",onClick:Qe(d,["self"])},[b("div",Wt({ref_key:"contentRef",ref:o,class:["nb-modal--content",`nb-modal--content--${e.size}`]},de(u),{role:e.role,"aria-modal":"true","aria-labelledby":e.labelledBy??(a.value?l:void 0),"aria-describedby":e.describedBy,"aria-busy":e.busy?"true":void 0,tabindex:"-1",onClick:P[2]||(P[2]=Qe(()=>{},["stop"]))}),[a.value?(m(),M("header",ox,[b("span",{id:l,class:"nb-modal--title"},[He(V.$slots,"header",{},()=>[_e(F(e.title),1)],!0)]),e.closeAppearance==="button"?(m(),me(oi,{key:0,class:"nb-modal--close-button",size:"sm",variant:"ghost",icon:uc,"aria-label":"Close",disabled:e.closeDisabled,onClick:P[0]||(P[0]=Y=>n("close"))},null,8,["disabled"])):(m(),M("button",{key:1,class:"nb-modal--close","aria-label":"Close",disabled:e.closeDisabled,"aria-disabled":e.closeDisabled?"true":void 0,onClick:P[1]||(P[1]=Y=>n("close"))},[G(Ue,{name:de(_s)},null,8,["name"])],8,cx))])):z("",!0),b("main",{ref_key:"bodyRef",ref:c,class:"nb-modal--body",tabindex:S.value?0:void 0,role:S.value?"region":void 0,"aria-labelledby":S.value?e.labelledBy??(a.value?l:void 0):void 0},[He(V.$slots,"default",{},void 0,!0)],8,ux),V.$slots.footer?(m(),me(or,{key:1,is:"footer",justify:"end",class:"nb-modal--footer",distributed:""},{default:te(()=>[He(V.$slots,"footer",{},void 0,!0)]),_:3})):z("",!0)],16,lx)])):z("",!0)]),_:3})]))}}),[["__scopeId","data-v-0d8e2855"]]),hx={key:0,class:"nb-confirm__message"},fx={key:0,class:"nb-confirm__subject-kind"},px={class:"nb-confirm__subject-name"},_x={key:1,class:"nb-confirm__gate"},mx={class:"nb-confirm__live"},vx={key:0,class:"nb-confirm__status",role:"status"},gx={key:1,class:"nb-confirm__status nb-confirm__status--success",role:"status"},bx=nt(Re({__name:"Confirm",props:{open:{type:Boolean,default:!1},title:{},message:{default:void 0},subject:{default:void 0},subjectLabel:{default:void 0},confirmLabel:{default:"Confirm"},cancelLabel:{default:"Cancel"},tone:{default:"danger"},typeToConfirm:{default:void 0},typeToConfirmLabel:{default:void 0},typeToConfirmHelper:{default:void 0},busy:{type:Boolean,default:!1},busyLabel:{default:"Working..."},succeeded:{type:Boolean,default:!1},successLabel:{default:void 0},error:{default:void 0},size:{default:"sm"},floatingSelectors:{default:()=>[]},contentClass:{default:void 0}},emits:["confirm","cancel"],setup(e,{expose:t,emit:i}){let r=e,n=i,s=Pi(),a=`nb-confirm-title-${s}`,l=`nb-confirm-body-${s}`,o=Fr(),c=q(null),u=q(null),d=q(null),h=q(""),f=bw(),v=j(()=>r.busy||r.succeeded);function p(){return!!r.message||!!r.subject||!!o.default}let S=j(()=>r.tone==="danger"?"danger":"primary"),_=j(()=>r.typeToConfirmLabel??`Type ${r.typeToConfirm} to confirm`),w=j(()=>!r.typeToConfirm||h.value.trim()===r.typeToConfirm),C=j(()=>w.value&&!v.value);function g(){C.value&&n("confirm")}function E(){var fe;let U=(fe=d.value)==null?void 0:fe.$el;return U instanceof HTMLElement?U:null}function T(){var U;return((U=c.value)==null?void 0:U.closest('[role="dialog"],[role="alertdialog"]'))??null}function L(){return typeof document>"u"?[]:Array.from(document.querySelectorAll('[aria-modal="true"]'))}function V(){let U=T();if(!U)return!1;let fe=L();return fe.length===0||fe[fe.length-1]===U}let P=['a[href]:not([tabindex="-1"])','area[href]:not([tabindex="-1"])','button:not([disabled]):not([tabindex="-1"])','input:not([disabled]):not([type="hidden"]):not([tabindex="-1"])','select:not([disabled]):not([tabindex="-1"])','textarea:not([disabled]):not([tabindex="-1"])','summary:not([tabindex="-1"])','audio[controls]:not([tabindex="-1"])','video[controls]:not([tabindex="-1"])','iframe:not([tabindex="-1"])','[contenteditable]:not([contenteditable="false"]):not([tabindex="-1"])','[tabindex]:not([tabindex="-1"])'].map(U=>`${U}:not([hidden]):not([aria-hidden="true"])`).join(",");function Y(){return Fv(r.floatingSelectors)}function W(U){return U instanceof Element?!!U.closest(Y()):!1}function A(U){let fe=T();return!!fe&&!!U&&fe.contains(U)}function $(){let U=T();return U?Array.from(U.querySelectorAll(P)).filter(fe=>fe.getAttribute("aria-disabled")!=="true"):[]}function Z(){let U=T();return U?(U.focus(),!0):!1}function ie(){let U=$()[0];U?U.focus():Z()}let ne=null;function ce(){let U=ne;ne=null,U!=null&&U.isConnected&&U.focus()}function J(){ax(T(),f.value)}De(f,()=>{r.open&&J()}),De(()=>[r.busy,r.error],async(U,fe)=>{if(!r.open)return;let[ge,se]=U,x=(fe==null?void 0:fe[0])??!1;if(await Kt(),ge){$().length===0&&Z();return}if(x&&se){let O=u.value;O?O.focus():ie();return}let H=document.activeElement;!A(H)&&!W(H)&&ie()}),De(()=>r.open,async U=>{var fe;U?(ne=document.activeElement instanceof HTMLElement?document.activeElement:null,h.value="",await Kt(),J(),E()?(fe=E())==null||fe.focus():Z()):ce()},{immediate:!0});function ae(){v.value||n("cancel")}let re=!1,X=!1;function le(U){let fe=U.target;re=A(fe)||W(fe)}function ve(U){X=A(U.target)}function ue(){let U=re&&!X;re=!1,!U&&ae()}function he(U){if(!r.open||W(document.activeElement))return;if(U.key==="Escape"){if(!V())return;U.preventDefault(),U.stopPropagation(),U.stopImmediatePropagation(),ae();return}if(U.key!=="Tab"||!V())return;let fe=$();if(fe.length===0){U.preventDefault(),A(document.activeElement)||Z();return}let ge=fe[0],se=fe[fe.length-1],x=document.activeElement;U.shiftKey&&(x===ge||!A(x))?(U.preventDefault(),se.focus()):!U.shiftKey&&x===se?(U.preventDefault(),ge.focus()):A(x)||(U.preventDefault(),ge.focus())}function ye(U){if(!r.open)return;let fe=U.relatedTarget;if(fe instanceof Element){if(A(fe)||W(fe))return}else if(fe!==null)return;requestAnimationFrame(()=>{if(!r.open)return;let ge=document.activeElement;A(ge)||W(ge)||ge&&ge!==document.body&&!ge.isConnected||V()&&ie()})}return typeof document<"u"&&(document.addEventListener("keydown",he,!0),document.addEventListener("focusout",ye,!0),document.addEventListener("mousedown",le,!0),document.addEventListener("touchstart",le,!0),document.addEventListener("click",ve,!0)),lt(()=>{var U;r.open&&(J(),E()?(U=E())==null||U.focus():Z())}),Oi(()=>{typeof document<"u"&&(document.removeEventListener("keydown",he,!0),document.removeEventListener("focusout",ye,!0),document.removeEventListener("mousedown",le,!0),document.removeEventListener("touchstart",le,!0),document.removeEventListener("click",ve,!0)),ce()}),t({focusCancel:()=>{var U;return(U=E())==null?void 0:U.focus()},restoreFocus:ce,isTopmost:V}),(U,fe)=>(m(),me(dx,{open:e.open,size:e.size,role:e.tone==="danger"?"alertdialog":"dialog","labelled-by":a,"described-by":p()?l:void 0,busy:e.busy,"close-on-overlay":!v.value,"close-disabled":v.value,"close-on-escape":!1,"trap-focus":!1,onClose:ue},{header:te(()=>[b("span",{id:a,class:Le(["nb-confirm__heading",`nb-confirm__heading--${e.tone}`])},[e.tone==="danger"?(m(),me(Ue,{key:0,name:de(Er),size:16,"aria-hidden":"true"},null,8,["name"])):z("",!0),b("span",null,F(e.title),1)],2)]),footer:te(()=>[G(oi,{ref_key:"cancelRef",ref:d,class:"nb-confirm__action nb-confirm__action--cancel",variant:"ghost",size:"lg",disabled:v.value,"data-nb-confirm":"cancel",onClick:ae},{default:te(()=>[_e(F(e.cancelLabel),1)]),_:1},8,["disabled"]),G(oi,{class:"nb-confirm__action nb-confirm__action--confirm",variant:S.value,size:"lg",disabled:!C.value,loading:e.busy,"data-nb-confirm":"confirm",onClick:g},{default:te(()=>[_e(F(e.confirmLabel),1)]),_:1},8,["variant","disabled","loading"])]),default:te(()=>[b("div",{ref_key:"rootRef",ref:c,class:Le(["nb-confirm",e.contentClass])},[p()?(m(),M("div",{key:0,id:l,class:"nb-confirm__body"},[He(U.$slots,"default",{},()=>[e.message?(m(),M("p",hx,F(e.message),1)):z("",!0)],!0),e.subject?(m(),M("p",{key:0,class:Le(["nb-confirm__subject",`nb-confirm__subject--${e.tone}`])},[e.subjectLabel?(m(),M("span",fx,F(e.subjectLabel),1)):z("",!0),b("span",px,F(e.subject),1)],2)):z("",!0)])):z("",!0),e.typeToConfirm?(m(),M("div",_x,[G(ha,{modelValue:h.value,"onUpdate:modelValue":fe[0]||(fe[0]=ge=>h.value=ge),class:"nb-confirm__gate-field",label:_.value,helper:e.typeToConfirmHelper,disabled:v.value,autocomplete:"off",spellcheck:"false","data-nb-confirm":"gate",onKeydown:fe[1]||(fe[1]=$i(Qe(()=>{},["prevent"]),["enter"]))},null,8,["modelValue","label","helper","disabled"])])):z("",!0),b("div",mx,[e.busy?(m(),M("p",vx,F(e.busyLabel),1)):z("",!0),e.succeeded&&e.successLabel?(m(),M("p",gx,[G(Ue,{name:de(wo),size:14,"aria-hidden":"true"},null,8,["name"]),b("span",null,F(e.successLabel),1)])):z("",!0),e.error?(m(),M("div",{key:2,ref_key:"errorRef",ref:u,class:"nb-confirm__error",tabindex:"-1"},[G(ct,{variant:"error"},{default:te(()=>[_e(F(e.error),1)]),_:1})],512)):z("",!0)])],2)]),_:3},8,["open","size","role","described-by","busy","close-on-overlay","close-disabled"]))}}),[["__scopeId","data-v-683eafb1"]]),yx=Symbol("nb-shell-slots"),wx=0;function Sx(){let e=q([]),t=new Map,i=new Map;function r(s){let a=t.get(s);return a||(a=Zr(null),t.set(s,a)),a}function n(s){let a=i.get(s);return a||(a=j(()=>{let l=e.value.filter(o=>o.name===s&&!o.deactivated);if(l.length===0)return[];if(l.some(o=>o.claim==="last")){let o=l[0];for(let c of l)c.seq>o.seq&&(o=c);return[o.id]}return[...l].sort((o,c)=>o.order-c.order||o.seq-c.seq).map(o=>o.id)}),i.set(s,a)),a}return{registry:{register(s){e.value=[...e.value,s]},unregister(s){let a=e.value.filter(l=>l.id!==s);a.length!==e.value.length&&(e.value=a)},elementFor:r,activeIds:n,setActive(s,a){let l=e.value.find(o=>o.id===s);!l||l.deactivated===!a||(l.deactivated=!a,a&&(l.seq=wx++))}},count:s=>e.value.filter(a=>a.name===s&&!a.deactivated).length,sharedCount:s=>e.value.filter(a=>a.name===s&&!a.deactivated&&a.claim==="all").length,setElement:(s,a)=>{r(s).value=a}}}var Cx=Symbol("nb-shell-layout"),kx=Re({__name:"SurfaceLayerScope",props:{level:{}},setup(e){let t=e;return Ji(j1,j(()=>lc(t.level))),(i,r)=>He(i.$slots,"default")}}),Ax=["href"],Mx={class:"nb-shell__middle"},Ex=["id","aria-label","tabindex","inert","aria-hidden"],Lx={class:"nb-shell__sidebar-logo"},$x={class:"nb-shell__sidebar-header-action"},xx={key:1,class:"nb-shell__sidebar-logo"},Tx={class:"nb-shell__sidebar-nav"},Hx={class:"nb-shell__sidebar-bottom"},Nx={class:"nb-shell__right"},Px={key:2,class:"nb-shell__menubar"},Ox={key:3,class:"nb-shell__topbar"},Rx=["aria-label","aria-expanded","aria-controls"],Ix={class:"nb-shell__content-row"},Dx=["inert","aria-hidden"],Vx=["aria-expanded"],Zx={class:"nb-shell__contextbar-toggle-glyph","aria-hidden":"true"},Bx={class:"nb-shell__main-row"},Fx=["aria-label"],zx=["id"],Ux=["aria-label","inert","aria-hidden"],Wx=["aria-label"],jx=["aria-label","aria-valuenow","aria-valuemax"],Kx="(pointer: coarse) and (hover: none) and (max-height: 500px)",qx='a[href], [role="menuitem"]',$l=288,Gx=16,Yx=64,Xx=nt(Re({__name:"Shell",props:{inspectorVisible:{type:Boolean,default:!1},inspectorExpanded:{type:Boolean,default:!1},inspectorSize:{default:"md"},resizable:{type:Boolean,default:!1},inspectorWidth:{},mainPadding:{type:Boolean,default:!0},sidebarVariant:{default:"compact"},sidebarHeaderActionPosition:{default:"end"},sidebarHeaderActionCompact:{default:"stack"},topbar:{default:"auto"},skipToContent:{type:Boolean,default:!0},skipToContentLabel:{default:"Skip to content"},mainId:{},sidebarLabel:{default:"Primary"},inspectorLabel:{default:"Inspector"},contextbarLabel:{default:"Browse"},collapseAt:{default:"md"},sidebarOpen:{type:Boolean},navToggleLabel:{default:"Navigation"},inspectorCloseLabel:{default:"Close inspector"}},emits:["update:inspectorWidth","update:sidebarOpen","update:inspectorVisible"],setup(e,{expose:t,emit:i}){var e0;let r=Fr();function n(Ce){return iv(r,Ce)}let{registry:s,count:a,sharedCount:l,setElement:o}=Sx();Ji(yx,s);let c=new Map;function u(Ce){let Be=c.get(Ce);return Be||(Be=Ge=>o(Ce,Ge??null),c.set(Ce,Be)),Be}function d(Ce){return n(Ce)||a(Ce)>0}function h(Ce){return l(Ce)>0?"nb-shell__region--ordered":null}let f=j(()=>{for(let Ce of["sidebar-logo","sidebar-nav","sidebar-bottom"])if(n(Ce))return!0;return!1}),v=e,p=q(!1),S=i,_={md:672,lg:1056},w=q(typeof window<"u"?window.innerWidth:1/0);function C(Ce){let Be=_[v.collapseAt];return Be!=null&&Ce<Be}let g=0;function E(){let Ce=window.innerWidth;C(Ce)!==C(w.value)&&(w.value=Ce)}function T(){g||(g=window.requestAnimationFrame(()=>{g=0,w.value=window.innerWidth}))}function L(){typeof window>"u"||(window.removeEventListener("resize",T),g&&(g=(window.cancelAnimationFrame(g),0)))}function V(){typeof window>"u"||(w.value=window.innerWidth,window.addEventListener("resize",T,{passive:!0}))}let P=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(Kx):null,Y=q((P==null?void 0:P.matches)===!0);function W(Ce){Y.value=Ce.matches}let A=j(()=>C(w.value)||v.collapseAt!=="none"&&Y.value),$=((e0=wi())==null?void 0:e0.vnode.props)??{};function Z(Ce,Be){return Ce in $||Be in $}function ie(Ce,Be){if(Ce in $)return $[Ce];if(Be in $)return $[Be]}function ne(Ce,Be){return Z(Ce,Be)&&ie(Ce,Be)!==void 0}let ce=ne("sidebarOpen","sidebar-open"),J=q(!1);Z("sidebarOpen","sidebar-open")&&!ce&&De(()=>v.sidebarOpen,Ce=>{J.value=Ce===!0});let ae=j(()=>ce?v.sidebarOpen===!0:J.value),re=Pi(),X=j(()=>`nb-shell-sidebar-${re}`),le=q(null),ve=q(null),ue=j(()=>f.value&&A.value),he=j(()=>f.value&&A.value&&!ae.value);function ye(Ce){ce||(J.value=Ce),S("update:sidebarOpen",Ce)}function U(Ce){if(!Ce.defaultPrevented){if(f.value&&A.value&&ae.value){ye(!1);return}pe.value&&we(!1)}}function fe(Ce,Be){var et,t0;let Ge=Ce.target,Si=(et=Ge==null?void 0:Ge.closest)==null?void 0:et.call(Ge,qx);if(!Si||!(Be!=null&&Be.contains(Si)))return!1;let Ee=Si.getAttribute("aria-haspopup");return!(Ee!=null&&Ee!=="false"||Si.hasAttribute("aria-expanded")||Si.getAttribute("aria-disabled")==="true"||(t0=Ge==null?void 0:Ge.closest)!=null&&t0.call(Ge,"[data-nb-keep-open]"))}function ge(Ce){!A.value||!ae.value||fe(Ce,ve.value)&&ye(!1)}function se(Ce){!A.value||!p.value||fe(Ce,Ce.currentTarget)&&(p.value=!1)}function x(Ce){p.value=Ce}De(ae,async Ce=>{var Be,Ge,Si,Ee,et;A.value&&(await Kt(),Ce?(Si=(Ge=((Be=ve.value)==null?void 0:Be.querySelector('a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])'))??ve.value)==null?void 0:Ge.focus)==null||Si.call(Ge):(et=(Ee=le.value)==null?void 0:Ee.focus)==null||et.call(Ee))}),De(A,Ce=>{!Ce&&ae.value&&ye(!1)});let H=ne("inspectorVisible","inspector-visible"),O=q(v.inspectorVisible===!0);Z("inspectorVisible","inspector-visible")&&!H&&De(()=>v.inspectorVisible,Ce=>{O.value=Ce===!0});let ee=q(!1),Q=j(()=>(H?v.inspectorVisible===!0:O.value)?!(A.value&&ee.value):!1),pe=j(()=>A.value&&Q.value);function we(Ce){H?ee.value=!Ce:(O.value=Ce,ee.value=!1),S("update:inspectorVisible",Ce)}De(()=>v.inspectorVisible,Ce=>{Ce&&(ee.value=!1)}),De(A,Ce=>{Ce||(ee.value=!1)});let y=q(null),k=q(null);De(pe,async Ce=>{var Be,Ge,Si;if(Ce)k.value=document.activeElement??null,await Kt(),(Ge=(Be=y.value)==null?void 0:Be.focus)==null||Ge.call(Be);else{let Ee=k.value;k.value=null,Ee!=null&&Ee.isConnected&&(await Kt(),(Si=Ee.focus)==null||Si.call(Ee))}}),De(pe,Ce=>{Ce&&f.value&&ae.value&&ye(!1)});function D(){we(!1)}Ji(Cx,{collapsed:A,inspectorOverlay:pe});let N=j(()=>pe.value),I=q(null),R=Pi(),B=j(()=>v.mainId||`nb-shell-main-${R}`);function K(){var Ce;(Ce=I.value)==null||Ce.focus()}let Se=j(()=>ue.value||v.topbar==="always"?!0:v.topbar==="never"?!1:n("topbar-left")||n("topbar-right")||a("topbar-left")>0||a("topbar-right")>0),{layerProps:Me}=js(),{layerProps:Ve}=js({level:0,probe:!1,provideContext:!1}),Ye=j(()=>A.value&&n("sidebar-header-action")?"verbose":v.sidebarVariant);Ji("nb-shell-sidebar-variant",Ye);let Te=j(()=>n("sidebar-header-action")&&!A.value);Ji("nb-shell-sidebar-header-action-position",nm(v,"sidebarHeaderActionPosition"));let it=q(null),Ot=q(!1);lt(()=>o("inspector",it.value)),De(it,Ce=>o("inspector",Ce));let nr={lg:.5,xl:.75},Bt={xs:288,sm:360,md:560},Rt=j(()=>Number.isFinite(w.value)?w.value:1280),pr=j(()=>Math.max($l,Rt.value*.5));function _r(Ce){return Math.round(Math.max($l,Math.min(Ce,pr.value)))}let wl=ne("inspectorWidth","inspector-width"),Jo=q(null),Qo=j(()=>wl?v.inspectorWidth??null:Jo.value);function Sl(Ce){wl||(Jo.value=Ce),S("update:inspectorWidth",Ce)}let pu=j(()=>{let Ce=Qo.value;if(!(!v.resizable||!Q.value||Ce==null))return{"--nb-shell-inspector-width":`${_r(Ce)}px`}}),be=j(()=>{let Ce=Qo.value;if(Ce!=null)return _r(Ce);if(v.inspectorExpanded)return Math.round(Rt.value*.5);let Be=nr[v.inspectorSize],Ge=Be==null?Bt[v.inspectorSize]??$l:Rt.value*Be;return Math.round(v.inspectorSize==="xl"?Ge:Math.min(Ge,pr.value))}),oe=j(()=>Math.round(Math.max(pr.value,be.value))),Oe=j(()=>be.value);function qe(){return be.value}function Ke(Ce){let Be=it.value;if(!Be)return;let Ge=Be.getBoundingClientRect().right;Sl(_r(Ge-Ce.clientX))}function Ft(){Ot.value=!1,window.removeEventListener("pointermove",Ke),window.removeEventListener("pointerup",Ft),window.removeEventListener("pointercancel",Ft)}function bt(Ce){v.resizable&&(Ce.preventDefault(),Ot.value=!0,window.addEventListener("pointermove",Ke),window.addEventListener("pointerup",Ft),window.addEventListener("pointercancel",Ft))}function fn(){Sl(null)}function _u(Ce){if(!v.resizable)return;let Be=Ce.shiftKey?Yx:Gx,Ge;switch(Ce.key){case"ArrowLeft":Ge=qe()+Be;break;case"ArrowRight":Ge=qe()-Be;break;case"Home":Ge=$l;break;case"End":Ge=pr.value;break;case"Enter":case" ":Ge=null;break;default:return}Ce.preventDefault(),Sl(Ge==null?null:_r(Ge))}return lt(()=>{var Ce;typeof window>"u"||(w.value=window.innerWidth,window.addEventListener("resize",E,{passive:!0}),v.resizable&&V(),P&&(Y.value=P.matches,typeof P.addEventListener=="function"?P.addEventListener("change",W):(Ce=P.addListener)==null||Ce.call(P,W)))}),De(()=>v.collapseAt,()=>{typeof window<"u"&&(w.value=window.innerWidth)}),De(()=>v.resizable,Ce=>Ce?V():L()),mi(()=>{var Ce;Ft(),L(),typeof window<"u"&&window.removeEventListener("resize",E),P&&(typeof P.removeEventListener=="function"?P.removeEventListener("change",W):(Ce=P.removeListener)==null||Ce.call(P,W))}),t({mainEl:I,sidebarEl:ve,inspectorEl:it,focusMain:()=>{var Ce;return(Ce=I.value)==null?void 0:Ce.focus()},setSidebarOpen:ye,setInspectorVisible:we,collapsed:A,inspectorOverlay:pe,setContextbarOpen:x}),(Ce,Be)=>(m(),M("div",Wt({class:"nb-shell"},de(Me),{class:[{"nb-shell--no-sidebar":!f.value},f.value?`nb-shell--sidebar-${Ye.value}`:null,{"nb-shell--collapsed":A.value,"nb-shell--drawer-open":A.value&&ae.value}],onKeydown:$i(U,["esc"])}),[e.skipToContent?(m(),M("a",{key:0,class:"nb-shell__skip-link",href:`#${B.value}`,onClick:K},F(e.skipToContentLabel),9,Ax)):z("",!0),d("outer-menu")?(m(),M("div",{key:1,ref:u("outer-menu"),class:Le(["nb-shell__outer-menu",h("outer-menu")])},[He(Ce.$slots,"outer-menu",{},void 0,!0)],2)):z("",!0),b("div",Mx,[f.value?(m(),M("nav",{key:0,id:X.value,ref_key:"sidebarRef",ref:ve,class:"nb-shell__sidebar","aria-label":e.sidebarLabel,tabindex:A.value?-1:void 0,inert:he.value||void 0,"aria-hidden":he.value||void 0,onClickCapture:ge},[Te.value?(m(),M("div",{key:0,class:Le(["nb-shell__sidebar-header",[`nb-shell__sidebar-header--${e.sidebarHeaderActionPosition}`,`nb-shell__sidebar-header--compact-${e.sidebarHeaderActionCompact}`]])},[b("div",Lx,[He(Ce.$slots,"sidebar-logo",{},void 0,!0)]),b("div",$x,[He(Ce.$slots,"sidebar-header-action",{},void 0,!0)])],2)):(m(),M("div",xx,[He(Ce.$slots,"sidebar-logo",{},void 0,!0)])),b("div",Tx,[He(Ce.$slots,"sidebar-nav",{},void 0,!0)]),Be[4]||(Be[4]=b("div",{class:"nb-shell__sidebar-spacer"},null,-1)),b("div",Hx,[He(Ce.$slots,"sidebar-bottom",{},void 0,!0)])],40,Ex)):z("",!0),f.value&&A.value&&ae.value?(m(),M("div",{key:1,class:"nb-shell__scrim",onClick:Be[0]||(Be[0]=Ge=>ye(!1))})):z("",!0),b("div",Nx,[d("inner-menu")?(m(),M("div",{key:0,ref:u("inner-menu"),class:Le(["nb-shell__inner-menu",h("inner-menu")])},[He(Ce.$slots,"inner-menu",{},void 0,!0)],2)):z("",!0),d("notification")?(m(),M("div",{key:1,ref:u("notification"),class:Le(["nb-shell__notification",h("notification")])},[He(Ce.$slots,"notification",{},void 0,!0)],2)):z("",!0),n("menubar")?(m(),M("div",Px,[He(Ce.$slots,"menubar",{},void 0,!0)])):z("",!0),Se.value?(m(),M("div",Ox,[ue.value?(m(),M("button",{key:0,ref_key:"navToggleRef",ref:le,type:"button",class:"nb-shell__nav-toggle","aria-label":e.navToggleLabel,"aria-expanded":ae.value,"aria-controls":X.value,onClick:Be[1]||(Be[1]=Ge=>ye(!ae.value))},[...Be[5]||(Be[5]=[b("span",{class:"nb-shell__nav-toggle-glyph","aria-hidden":"true"},[b("span"),b("span"),b("span")],-1)])],8,Rx)):z("",!0),b("div",{ref:u("topbar-left"),class:"nb-shell__topbar-left"},[He(Ce.$slots,"topbar-left",{},void 0,!0)],512),b("div",{ref:u("topbar-right"),class:"nb-shell__topbar-right"},[He(Ce.$slots,"topbar-right",{},void 0,!0)],512)])):z("",!0),b("div",Ix,[b("div",{class:"nb-shell__body",inert:N.value||void 0,"aria-hidden":N.value||void 0},[d("fixedbar")?(m(),M("div",{key:0,ref:u("fixedbar"),class:"nb-shell__fixedbar"},[He(Ce.$slots,"fixedbar",{},void 0,!0)],512)):z("",!0),A.value&&d("contextbar")?(m(),M("button",{key:1,type:"button",class:"nb-shell__contextbar-toggle","aria-expanded":p.value,onClick:Be[2]||(Be[2]=Ge=>p.value=!p.value)},[b("span",null,F(e.contextbarLabel),1),b("span",Zx,F(p.value?"▾":"▸"),1)],8,Vx)):z("",!0),b("div",Bx,[d("contextbar")?ur((m(),M("aside",{key:0,ref:u("contextbar"),class:Le(["nb-shell__contextbar",h("contextbar")]),"aria-label":e.contextbarLabel,onClickCapture:se},[He(Ce.$slots,"contextbar",{},void 0,!0)],42,Fx)),[[kh,!A.value||p.value]]):z("",!0),b("main",Wt({id:B.value,ref_key:"mainRef",ref:I,tabindex:"-1",class:["nb-shell__main",{"nb-shell__main--no-padding":!e.mainPadding}]},de(Ve)),[G(kx,{level:1},{default:te(()=>[He(Ce.$slots,"default",{},void 0,!0)]),_:3})],16,zx)]),d("bottom")?(m(),M("div",{key:2,ref:u("bottom"),class:"nb-shell__bottom"},[He(Ce.$slots,"bottom",{},void 0,!0)],512)):z("",!0)],8,Dx),b("aside",{ref_key:"inspectorRef",ref:it,class:Le(["nb-shell__inspector",{"nb-shell__inspector--visible":Q.value,"nb-shell__inspector--expanded":Q.value&&e.inspectorExpanded,[`nb-shell__inspector--${e.inspectorSize}`]:Q.value,"nb-shell__inspector--resizing":Ot.value,"nb-shell__inspector--overlay":pe.value}]),"aria-label":e.inspectorLabel,inert:!Q.value||void 0,"aria-hidden":!Q.value||void 0,style:_i(pu.value)},[pe.value?(m(),M("button",{key:0,ref_key:"inspectorDismissRef",ref:y,type:"button",class:"nb-shell__inspector-dismiss","aria-label":e.inspectorCloseLabel,onClick:Be[3]||(Be[3]=Ge=>we(!1))},[...Be[6]||(Be[6]=[b("span",{class:"nb-shell__inspector-dismiss-glyph","aria-hidden":"true"},"×",-1)])],8,Wx)):z("",!0),e.resizable&&Q.value&&!A.value?(m(),M("div",{key:1,class:"nb-shell__inspector-resize",role:"separator",tabindex:"0","aria-orientation":"vertical","aria-label":`Resize ${e.inspectorLabel}`,"aria-valuenow":Oe.value,"aria-valuemin":$l,"aria-valuemax":oe.value,title:"Drag or use the arrow keys to resize, Enter or double-click to reset",onPointerdown:bt,onDblclick:fn,onKeydown:_u},null,40,jx)):z("",!0),He(Ce.$slots,"inspector",{overlay:pe.value,close:D},void 0,!0)],14,Ux)])])])],16))}}),[["__scopeId","data-v-a375a384"]]),Jx={key:0,class:"nb-sidebar-brand__icon"},Qx={key:1,class:"nb-sidebar-brand__text"},eT={class:"nb-sidebar-brand__title"},tT={key:0,class:"nb-sidebar-brand__subtitle"},iT=nt(Re({__name:"SidebarBrand",props:{title:{},subtitle:{default:void 0},icon:{default:void 0}},setup(e){let t=Mt("nb-shell-sidebar-variant",q("verbose")),i=j(()=>t.value);return(r,n)=>(m(),M("div",{class:Le(["nb-sidebar-brand",[`nb-sidebar-brand--${i.value}`]])},[e.icon||r.$slots.icon?(m(),M("div",Jx,[He(r.$slots,"icon",{},()=>[e.icon?(m(),me(Ue,{key:0,name:e.icon,size:24},null,8,["name"])):z("",!0)],!0)])):z("",!0),i.value==="verbose"?(m(),M("div",Qx,[b("span",eT,F(e.title),1),e.subtitle?(m(),M("span",tT,F(e.subtitle),1)):z("",!0)])):z("",!0)],2))}}),[["__scopeId","data-v-228349ba"]]),rT=Re({__name:"SidebarVariantScope",props:{variant:{}},setup(e){return Ji("nb-shell-sidebar-variant",nm(e,"variant")),(t,i)=>He(t.$slots,"default")}}),nT={class:"nb-sidebar-menu-item__label"},sT=["title"],aT={key:0,class:"nb-sidebar-menu-item__children",role:"group"},lT={class:"nb-sidebar-menu-item__flyout-header"},oT={class:"nb-sidebar-menu-item__flyout-label"},cT=["aria-label"],uT=nt(Re({__name:"SidebarMenuItem",props:{label:{},icon:{default:void 0},to:{default:void 0},href:{default:void 0},active:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},defaultExpanded:{type:Boolean,default:!1},badge:{default:void 0},badgeVariant:{default:"neutral"}},emits:["click"],setup(e,{emit:t}){let i=e,r=t,n=Mt("nb-shell-sidebar-variant",q("verbose")),s=j(()=>n.value),a=Fr(),l=j(()=>{let ue=i.badge;if(ue===void 0)return;let he=typeof ue=="number"?ue:Number(String(ue).trim());if(!(!Number.isFinite(he)||String(ue).trim()===""))return he>99?"99+":String(he)}),o=j(()=>i.badge===void 0?i.label:`${i.label} (${i.badge})`),c=j(()=>{var he;let ue=(he=a.default)==null?void 0:he.call(a);return ue?Fh(ue):!1}),u=q(i.defaultExpanded||i.active),d=ev(),h=j(()=>{if(typeof i.to=="string")return i.to;if(i.href)return i.href}),f=j(()=>c.value),v=j(()=>i.to!=null&&!f.value&&!!d.value),p=j(()=>f.value?"button":v.value?d.value:h.value?"a":"button"),S=j(()=>p.value==="a"?{href:h.value}:{});function _(ue){if(i.disabled){ue.preventDefault();return}if(f.value&&s.value==="verbose"){u.value=!u.value;return}f.value&&s.value==="compact"&&J(ue),r("click",ue)}let w=q(null),C=q(null),g=q(!1),E=q(!1),T=q({}),L=null;function V(){if(s.value!=="compact")return;L&&(L=(clearTimeout(L),null));let ue=Z();if(!ue)return;let he=ue.getBoundingClientRect();T.value={top:`${he.top}px`,left:`${he.right+8}px`},g.value=!0}function P(){E.value||(L&&clearTimeout(L),L=setTimeout(()=>{g.value=!1,L=null},120))}function Y(){V()}function W(){P()}function A(){L&&(L=(clearTimeout(L),null))}function $(){P()}function Z(){let ue=w.value;return ue?ue instanceof HTMLElement?ue:ue.$el??null:null}function ie(ue=!1){var he;L&&(L=(clearTimeout(L),null)),g.value=!1,E.value=!1,ue&&((he=Z())==null||he.focus())}function ne(){let ue=C.value;return ue?Array.from(ue.querySelectorAll('[role="menuitem"]')).filter(he=>!he.hasAttribute("disabled")&&he.getAttribute("aria-disabled")!=="true"&&!he.closest('[style*="display: none"]')):[]}async function ce(ue){var he;V(),E.value=!0,ue&&(await Kt(),(he=ne()[0])==null||he.focus())}function J(ue){if(g.value&&E.value){ie();return}ce(ue.detail===0)}function ae(ue){!f.value||s.value!=="compact"||(ue.key==="ArrowRight"||ue.key==="ArrowDown"?(ue.preventDefault(),ce(!0)):ue.key==="Escape"&&g.value&&(ue.preventDefault(),ie(!0)))}function re(ue){var U,fe,ge,se;let he=ne(),ye=he.indexOf(document.activeElement);switch(ue.key){case"Escape":case"ArrowLeft":ue.preventDefault(),ue.stopPropagation(),ie(!0);return;case"ArrowDown":ue.preventDefault(),(U=he[(ye+1)%he.length])==null||U.focus();return;case"ArrowUp":ue.preventDefault(),(fe=he[(ye-1+he.length)%he.length])==null||fe.focus();return;case"Home":ue.preventDefault(),(ge=he[0])==null||ge.focus();return;case"End":ue.preventDefault(),(se=he[he.length-1])==null||se.focus();return;case"Tab":ie(!0);return}}function X(ue){var ye,U;let he=ue.relatedTarget;he&&((ye=C.value)!=null&&ye.contains(he)||(U=Z())!=null&&U.contains(he)||ie())}function le(ue){var ye;let he=(ye=ue.target)==null?void 0:ye.closest('[role="menuitem"]');he&&!he.hasAttribute("aria-expanded")&&ie()}function ve(ue){var ye,U;let he=ue.target;he&&((ye=C.value)!=null&&ye.contains(he)||(U=Z())!=null&&U.contains(he)||ie())}return De(g,ue=>{typeof document>"u"||(ue?document.addEventListener("pointerdown",ve,!0):document.removeEventListener("pointerdown",ve,!0))}),De(s,()=>ie()),mi(()=>{L&&clearTimeout(L),typeof document<"u"&&document.removeEventListener("pointerdown",ve,!0)}),(ue,he)=>(m(),M("li",{class:Le(["nb-sidebar-menu-item",[`nb-sidebar-menu-item--${s.value}`]]),role:"none",onMouseenter:Y,onMouseleave:W},[(m(),me(Do(p.value),Wt({ref_key:"rowRef",ref:w,class:["nb-sidebar-menu-item__row",{"nb-sidebar-menu-item__row--active":e.active,"nb-sidebar-menu-item__row--disabled":e.disabled,"nb-sidebar-menu-item__row--expandable":c.value&&s.value==="verbose","nb-sidebar-menu-item__row--compact":s.value==="compact"}],type:p.value==="button"?"button":void 0,to:v.value?e.to:void 0},S.value,{disabled:p.value==="button"&&!c.value&&e.disabled||void 0,"aria-disabled":e.disabled||void 0,"aria-expanded":c.value?s.value==="verbose"?u.value:g.value:void 0,"aria-haspopup":c.value&&s.value==="compact"?"menu":void 0,"aria-label":s.value==="compact"?o.value:void 0,role:"menuitem",onClick:_,onKeydown:ae}),{default:te(()=>[e.icon?(m(),me(Ue,{key:0,class:"nb-sidebar-menu-item__icon",name:e.icon,size:s.value==="compact"?18:16},null,8,["name","size"])):z("",!0),s.value==="verbose"?(m(),M(ke,{key:1},[b("span",nT,F(e.label),1),e.badge===void 0?z("",!0):(m(),M("span",{key:0,class:Le(["nb-sidebar-menu-item__badge",[`nb-sidebar-menu-item__badge--${e.badgeVariant}`]])},F(e.badge),3)),c.value?(m(),me(Ue,{key:1,class:Le(["nb-sidebar-menu-item__caret",{"nb-sidebar-menu-item__caret--expanded":u.value}]),name:de(dc),size:12},null,8,["class","name"])):z("",!0)],64)):l.value===void 0?e.badge===void 0?z("",!0):(m(),M("span",{key:3,class:Le(["nb-sidebar-menu-item__badge-dot",[`nb-sidebar-menu-item__badge-dot--${e.badgeVariant}`]]),title:String(e.badge)},null,10,sT)):(m(),M("span",{key:2,class:Le(["nb-sidebar-menu-item__badge-count",[`nb-sidebar-menu-item__badge-count--${e.badgeVariant}`]]),"aria-hidden":"true"},F(l.value),3))]),_:1},16,["class","type","to","disabled","aria-disabled","aria-expanded","aria-haspopup","aria-label"])),c.value&&s.value==="verbose"?ur((m(),M("ul",aT,[He(ue.$slots,"default",{},void 0,!0)],512)),[[kh,u.value]]):z("",!0),s.value==="compact"&&g.value?(m(),me(dr,{key:1,to:"body"},[b("div",{ref_key:"flyoutRef",ref:C,class:"nb-sidebar-menu-item__flyout",style:_i(T.value),onMouseenter:A,onMouseleave:$,onKeydown:re,onFocusout:X,onClick:le},[b("div",lT,[b("span",oT,F(e.label),1),e.badge===void 0?z("",!0):(m(),M("span",{key:0,class:Le(["nb-sidebar-menu-item__badge",[`nb-sidebar-menu-item__badge--${e.badgeVariant}`]])},F(e.badge),3))]),c.value?(m(),me(rT,{key:0,variant:"verbose"},{default:te(()=>[b("ul",{class:"nb-sidebar-menu-item__flyout-children",role:"menu","aria-label":e.label},[He(ue.$slots,"default",{},void 0,!0)],8,cT)]),_:3})):z("",!0)],36)])):z("",!0)],34))}}),[["__scopeId","data-v-0f7c477a"]]);const Ca=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},dT=Ca("sidebar-simple","0 0 256 256",'<path d="M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44ZM36,200V56a4,4,0,0,1,4-4H84V204H40A4,4,0,0,1,36,200Zm184,0a4,4,0,0,1-4,4H92V52H216a4,4,0,0,1,4,4Z"/>'),hT=Ca("sidebar-simple","0 0 256 256",'<path d="M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42ZM38,200V56a2,2,0,0,1,2-2H82V202H40A2,2,0,0,1,38,200Zm180,0a2,2,0,0,1-2,2H94V54H216a2,2,0,0,1,2,2Z"/>'),e8=Ca("sidebar-simple","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z"/>'),fT=Ca("sidebar-simple","0 0 256 256",'<path d="M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,60H76V196H44ZM212,196H100V60H212Z"/>'),pT=Ca("sidebar-simple","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H88V56H216V200Z"/>'),_T=Ca("sidebar-simple","0 0 256 256",'<path d="M88,48V208H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8Z" opacity="0.2"/><path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM40,56H80V200H40ZM216,200H96V56H216V200Z"/>'),mT="sidebar-simple",vT=Object.freeze(Object.defineProperty({__proto__:null,bold:fT,default:e8,duotone:_T,fill:pT,glyphName:mT,light:hT,regular:e8,thin:dT},Symbol.toStringTag,{value:"Module"}));var gT=["aria-label","aria-expanded"],bT=nt(Re({__name:"SidebarHeaderToggle",props:{collapseLabel:{default:void 0},expandLabel:{default:void 0},icon:{default:void 0}},emits:["toggle"],setup(e,{emit:t}){let i=e,r=t,n=Mt("nb-shell-sidebar-variant",q("verbose")),s=Mt("nb-shell-sidebar-header-action-position",q("end")),a=j(()=>n.value==="compact"),l=j(()=>s.value==="edge"),o=j(()=>i.icon?i.icon:l.value?a.value?Uh:dv:vT),c={en:{COLLAPSE:"Collapse sidebar",EXPAND:"Expand sidebar"},pt:{COLLAPSE:"Recolher barra lateral",EXPAND:"Expandir barra lateral"}};function u(){try{return Dv({useScope:"global"})}catch{return null}}let d=u();function h(v){var S;let p=`sidebarCollapseToggle.${v}`;return d!=null&&d.te(p)?d.t(p):((S=c[String((d==null?void 0:d.locale.value)??"en").toLowerCase().split("-")[0]])==null?void 0:S[v])??c.en[v]}let f=j(()=>a.value?i.expandLabel??h("EXPAND"):i.collapseLabel??h("COLLAPSE"));return(v,p)=>{let S=ym("nb-tooltip");return ur((m(),M("button",{type:"button",class:Le(["nb-sidebar-header-toggle",{"nb-sidebar-header-toggle--edge":l.value}]),"aria-label":f.value,"aria-expanded":!a.value,onClick:p[0]||(p[0]=_=>r("toggle"))},[G(Ue,{name:o.value,size:l.value?14:18},null,8,["name","size"])],10,gT)),[[S,{body:f.value,aria:"none",position:"right"}]])}}}),[["__scopeId","data-v-6ef71e7b"]]),yT=nt(Re({__name:"SidebarMenu",props:{density:{default:"comfortable"}},setup(e){return(t,i)=>(m(),M("ul",{class:Le(["nb-sidebar-menu",[`nb-sidebar-menu--${e.density}`]]),role:"menu"},[He(t.$slots,"default",{},void 0,!0)],2))}}),[["__scopeId","data-v-0ea86bc7"]]),wT=["aria-label"],ST={key:0,class:"nb-sidebar-status__label"},CT=nt(Re({__name:"SidebarStatus",props:{label:{},status:{default:"neutral"}},setup(e){let t=Mt("nb-shell-sidebar-variant",q("verbose")),i=j(()=>t.value==="compact");return(r,n)=>{let s=ym("nb-tooltip");return ur((m(),M("div",{class:Le(["nb-sidebar-status",[`nb-sidebar-status--${e.status}`,{"nb-sidebar-status--compact":i.value}]]),role:"status","aria-label":e.label},[n[0]||(n[0]=b("span",{class:"nb-sidebar-status__dot","aria-hidden":"true"},null,-1)),i.value?z("",!0):(m(),M("span",ST,F(e.label),1))],10,wT)),[[s,{body:i.value?e.label:null,aria:"none",position:"right"}]])}}}),[["__scopeId","data-v-2996103f"]]),zv=function(e){return e.Small="sm",e.Medium="md",e}(zv||{}),es=function(e){return e.Active="active",e.Finished="finished",e.Error="error",e}(es||{}),kT={key:0,class:"nb-progress-bar__header"},AT=["aria-label","aria-valuemax","aria-valuenow"],Uv=nt(Re({__name:"ProgressBar",props:{value:{default:void 0},max:{default:100},helper:{default:void 0},size:{default:zv.Medium},status:{default:es.Active},hideLabel:{type:Boolean,default:!1},id:{default:"progress-bar"},label:{}},setup(e){let t=e,i=j(()=>t.value==null&&t.status===es.Active),r=j(()=>t.status===es.Active?t.value==null||t.max<=0?0:Math.min(Math.max(t.value/t.max,0),1):1),n=j(()=>i.value?void 0:r.value*t.max),s=j(()=>["nb-progress-bar",`nb-progress-bar--${t.size}`,`nb-progress-bar--${t.status}`,{"nb-progress-bar--indeterminate":i.value}]),a=j(()=>({transform:`scaleX(${r.value})`})),l=j(()=>t.status===es.Finished?zh:t.status===es.Error?sv:null),o=j(()=>t.status===es.Error?cc.Error:cc.Helper);return(c,u)=>(m(),M("div",{class:Le(s.value)},[e.label&&!e.hideLabel?(m(),M("div",kT,[G(la,null,{default:te(()=>[_e(F(e.label),1)]),_:1}),l.value?(m(),me(Ue,{key:0,name:l.value,size:14,class:"nb-progress-bar__status-icon"},null,8,["name"])):z("",!0)])):z("",!0),b("div",{class:"nb-progress-bar__track",role:"progressbar","aria-label":e.label,"aria-valuemin":"0","aria-valuemax":e.max,"aria-valuenow":n.value},[b("div",{class:"nb-progress-bar__bar",style:_i(a.value)},null,4)],8,AT),e.helper?(m(),me(ct,{key:1,variant:o.value,class:"nb-progress-bar__message"},{default:te(()=>[_e(F(e.helper),1)]),_:1},8,["variant"])):z("",!0)],2))}}),[["__scopeId","data-v-ce4aae30"]]);const MT=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},t8=MT("minus","0 0 256 256",'<path d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z"/>'),ka=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},ET=ka("bell","0 0 256 256",'<path d="M218.35,178C212.58,168,204,140.13,204,104a76,76,0,1,0-152,0c0,36.13-8.59,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0H208A12,12,0,0,0,218.35,178ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220Zm83.45-34a3.91,3.91,0,0,1-3.44,2H48a3.91,3.91,0,0,1-3.44-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a68,68,0,1,1,136,0c0,35.31,8,65.17,15.44,78A4,4,0,0,1,211.45,186Z"/>'),LT=ka("bell","0 0 256 256",'<path d="M220.07,176.94C214.41,167.2,206,139.73,206,104a78,78,0,1,0-156,0c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198H90.48a38,38,0,0,0,75,0H208a14,14,0,0,0,12.06-21.06ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218Zm81.71-33a1.9,1.9,0,0,1-1.7,1H48a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.87,170,62,139.69,62,104a66,66,0,1,1,132,0c0,35.68,8.14,65.95,15.71,79A2,2,0,0,1,209.71,185Z"/>'),i8=ka("bell","0 0 256 256",'<path d="M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"/>'),$T=ka("bell","0 0 256 256",'<path d="M225.29,165.93C216.61,151,212,129.57,212,104a84,84,0,0,0-168,0c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.66,186,19.77,19.77,0,0,0,48,196H84.18a44,44,0,0,0,87.64,0H208a19.77,19.77,0,0,0,17.31-10A20.08,20.08,0,0,0,225.29,165.93ZM128,212a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM54.66,172C63.51,154,68,131.14,68,104a60,60,0,0,1,120,0c0,27.13,4.48,50,13.33,68Z"/>'),xT=ka("bell","0 0 256 256",'<path d="M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216Z"/>'),TT=ka("bell","0 0 256 256",'<path d="M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z" opacity="0.2"/><path d="M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"/>'),HT="bell",NT=Object.freeze(Object.defineProperty({__proto__:null,bold:$T,default:i8,duotone:TT,fill:xT,glyphName:HT,light:LT,regular:i8,thin:ET},Symbol.toStringTag,{value:"Module"}));var PT=["id","placeholder","min","max","step","disabled","required"],OT={class:"nb-number-input__steppers"},RT=["disabled"],IT=["disabled"],DT={key:0,class:"nb-number-input__inner-header"},VT=["for"],ZT={key:0,class:"nb-number-input__asterisk","aria-hidden":"true"},BT={class:"nb-number-input__fluid-row"},FT=["id","placeholder","min","max","step","disabled","required"],zT={class:"nb-number-input__steppers"},UT=["disabled"],WT=["disabled"],i2=nt(Re({__name:"NumberInput",props:{modelValue:{default:null},min:{default:void 0},max:{default:void 0},step:{default:1},placeholder:{default:""},name:{},disabled:{type:Boolean,default:!1},required:{type:Boolean,default:!1},id:{default:void 0},label:{default:""},error:{default:""},warning:{default:""},helper:{default:""},variant:{default:"default"},size:{default:"md"}},emits:["update:modelValue","change"],setup(e,{expose:t,emit:i}){let r=e,n=i,s=q(null),a=q(!1),l=`nb-number-input-${Pi()}`,o=j(()=>r.id??l),c=j(()=>r.min!==void 0&&r.modelValue!==null&&r.modelValue!==void 0&&r.modelValue<=r.min),u=j(()=>r.max!==void 0&&r.modelValue!==null&&r.modelValue!==void 0&&r.modelValue>=r.max);function d(C){let g=C;return r.min!==void 0&&(g=Math.max(r.min,g)),r.max!==void 0&&(g=Math.min(r.max,g)),g}function h(C){s.value&&(s.value.value=C==null?"":String(C))}lt(()=>h(r.modelValue)),De(()=>r.modelValue,C=>{a.value||h(C)});function f(){let C=d((r.modelValue??0)+r.step);n("update:modelValue",C),n("change",C),h(C)}function v(){let C=d((r.modelValue??0)-r.step);n("update:modelValue",C),n("change",C),h(C)}function p(){if(!s.value)return;let C=s.value.value;if(C==="")n("update:modelValue",null);else{let g=parseFloat(C);isNaN(g)||n("update:modelValue",g)}}function S(){if(a.value=!1,!s.value)return;let C=s.value.value;if(C===""){n("update:modelValue",null),n("change",null);return}let g=parseFloat(C);if(!isNaN(g)){let E=d(g);n("update:modelValue",E),n("change",E),h(E)}}let _=j(()=>["nb-number-input",`nb-number-input--${r.variant}`,`nb-number-input--${r.size}`,{"nb-number-input--error":!!r.error,"nb-number-input--warning":!r.error&&!!r.warning,"nb-number-input--disabled":r.disabled}]),w=j(()=>({"nb-number-input__field-wrapper--focused":a.value,"nb-number-input__field-wrapper--error":!!r.error,"nb-number-input__field-wrapper--warning":!r.error&&!!r.warning,"nb-number-input__field-wrapper--disabled":r.disabled}));return t({focus:()=>{var C;return(C=s.value)==null?void 0:C.focus()}}),(C,g)=>(m(),M("div",{class:Le(_.value)},[e.variant==="default"?(m(),M(ke,{key:0},[e.label?(m(),me(la,{key:0,for:o.value,required:e.required,disabled:e.disabled},{default:te(()=>[_e(F(e.label),1)]),_:1},8,["for","required","disabled"])):z("",!0),b("div",{class:Le(["nb-number-input__field-wrapper",w.value])},[b("input",{id:o.value,ref_key:"inputRef",ref:s,type:"number",class:"nb-number-input__field",placeholder:e.placeholder,min:e.min,max:e.max,step:e.step,disabled:e.disabled,required:e.required,onInput:p,onBlur:S,onKeydown:g[0]||(g[0]=$i(Qe(()=>{var E;return(E=s.value)==null?void 0:E.blur()},["prevent"]),["enter"])),onFocus:g[1]||(g[1]=E=>a.value=!0)},null,40,PT),e.error?(m(),me(ct,{key:0,variant:"error","icon-only":!0,class:"nb-number-input__status"},{default:te(()=>[_e(F(e.error),1)]),_:1})):e.warning?(m(),me(ct,{key:1,variant:"warning","icon-only":!0,class:"nb-number-input__status"},{default:te(()=>[_e(F(e.warning),1)]),_:1})):z("",!0),b("div",OT,[b("button",{type:"button",class:Le(["nb-number-input__stepper",{"nb-number-input__stepper--at-limit":c.value}]),disabled:e.disabled,"aria-label":"Decrease",onMousedown:g[2]||(g[2]=Qe(()=>{},["prevent"])),onClick:v},[G(Ue,{name:de(t8),size:16},null,8,["name"])],42,RT),b("button",{type:"button",class:Le(["nb-number-input__stepper",{"nb-number-input__stepper--at-limit":u.value}]),disabled:e.disabled,"aria-label":"Increase",onMousedown:g[3]||(g[3]=Qe(()=>{},["prevent"])),onClick:f},[G(Ue,{name:de(Mo),size:16},null,8,["name"])],42,IT)])],2),e.error?(m(),me(ct,{key:1,variant:"error",class:"nb-number-input__message"},{default:te(()=>[_e(F(e.error),1)]),_:1})):e.warning?(m(),me(ct,{key:2,variant:"warning",class:"nb-number-input__message"},{default:te(()=>[_e(F(e.warning),1)]),_:1})):e.helper?(m(),me(ct,{key:3,variant:"helper",class:"nb-number-input__message"},{default:te(()=>[_e(F(e.helper),1)]),_:1})):z("",!0)],64)):e.variant==="fluid"?(m(),M(ke,{key:1},[b("div",{class:Le(["nb-number-input__field-wrapper",w.value])},[e.label?(m(),M("div",DT,[b("label",{for:o.value,class:"nb-number-input__inner-label"},[_e(F(e.label)+" ",1),e.required?(m(),M("span",ZT,"*")):z("",!0)],8,VT),e.helper&&!e.error&&!e.warning?(m(),me(ct,{key:0,variant:"helper","icon-only":!0,class:"nb-number-input__inner-message"},{default:te(()=>[_e(F(e.helper),1)]),_:1})):z("",!0)])):z("",!0),b("div",BT,[b("input",{id:o.value,ref_key:"inputRef",ref:s,type:"number",class:"nb-number-input__field",placeholder:e.placeholder,min:e.min,max:e.max,step:e.step,disabled:e.disabled,required:e.required,onInput:p,onBlur:S,onKeydown:g[4]||(g[4]=$i(Qe(()=>{var E;return(E=s.value)==null?void 0:E.blur()},["prevent"]),["enter"])),onFocus:g[5]||(g[5]=E=>a.value=!0)},null,40,FT),e.error?(m(),me(ct,{key:0,variant:"error","icon-only":!0,class:"nb-number-input__status"},{default:te(()=>[_e(F(e.error),1)]),_:1})):e.warning?(m(),me(ct,{key:1,variant:"warning","icon-only":!0,class:"nb-number-input__status"},{default:te(()=>[_e(F(e.warning),1)]),_:1})):z("",!0),b("div",zT,[b("button",{type:"button",class:Le(["nb-number-input__stepper",{"nb-number-input__stepper--at-limit":c.value}]),disabled:e.disabled,"aria-label":"Decrease",onMousedown:g[6]||(g[6]=Qe(()=>{},["prevent"])),onClick:v},[G(Ue,{name:de(t8),size:16},null,8,["name"])],42,UT),b("button",{type:"button",class:Le(["nb-number-input__stepper",{"nb-number-input__stepper--at-limit":u.value}]),disabled:e.disabled,"aria-label":"Increase",onMousedown:g[7]||(g[7]=Qe(()=>{},["prevent"])),onClick:f},[G(Ue,{name:de(Mo),size:16},null,8,["name"])],42,WT)])])],2),e.error?(m(),me(ct,{key:0,variant:"error",class:"nb-number-input__fluid-message"},{default:te(()=>[_e(F(e.error),1)]),_:1})):e.warning?(m(),me(ct,{key:1,variant:"warning",class:"nb-number-input__fluid-message"},{default:te(()=>[_e(F(e.warning),1)]),_:1})):z("",!0)],64)):z("",!0)],2))}}),[["__scopeId","data-v-7d6b2226"]]),jT=["stop-color"],KT=["stop-color"],qT=["d","fill"],GT=["d","stroke","stroke-width"],r8=100,Es=30,YT=nt(Re({__name:"Sparkline",props:{data:{},color:{default:"var(--nb-c-primary)"},height:{default:40},width:{default:"100%"},strokeWidth:{default:1.5},fill:{type:Boolean,default:!0},smooth:{type:Boolean,default:!0}},setup(e){let t=e,i=`0 0 ${r8} ${Es}`,r=`nb-sparkline-grad-${Pi()}`,n=j(()=>({width:typeof t.width=="number"?`${t.width}px`:t.width,height:typeof t.height=="number"?`${t.height}px`:t.height})),s=j(()=>{let a=t.data;if(!a||a.length<2)return{line:"",area:""};let l=Math.max(...a),o=Math.min(...a),c=l-o||1,u=r8/(a.length-1),d=Es*.08,h=Es-d*2,f=a.map((_,w)=>({x:w*u,y:Es-d-(_-o)/c*h})),v=`M ${f[0].x.toFixed(2)} ${f[0].y.toFixed(2)}`;if(t.smooth)for(let _=1;_<f.length;_++){let w=f[_-1],C=f[_],g=w.x+u*.45,E=w.y,T=C.x-u*.45,L=C.y;v+=` C ${g.toFixed(2)} ${E.toFixed(2)}, ${T.toFixed(2)} ${L.toFixed(2)}, ${C.x.toFixed(2)} ${C.y.toFixed(2)}`}else for(let _=1;_<f.length;_++)v+=` L ${f[_].x.toFixed(2)} ${f[_].y.toFixed(2)}`;let p=f[f.length-1],S=`${v} L ${p.x.toFixed(2)} ${Es} L ${f[0].x.toFixed(2)} ${Es} Z`;return{line:v,area:S}});return(a,l)=>(m(),M("svg",{class:"nb-sparkline",style:_i(n.value),viewBox:i,preserveAspectRatio:"none",role:"img","aria-label":"Sparkline",xmlns:"http://www.w3.org/2000/svg"},[b("defs",null,[b("linearGradient",{id:r,x1:"0",y1:"0",x2:"0",y2:"1"},[b("stop",{offset:"0%","stop-color":e.color,"stop-opacity":"0.3"},null,8,jT),b("stop",{offset:"100%","stop-color":e.color,"stop-opacity":"0"},null,8,KT)])]),e.fill&&s.value.area?(m(),M("path",{key:0,d:s.value.area,fill:`url(#${r})`,stroke:"none"},null,8,qT)):z("",!0),s.value.line?(m(),M("path",{key:1,d:s.value.line,stroke:e.color,"stroke-width":e.strokeWidth,"vector-effect":"non-scaling-stroke",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},null,8,GT)):z("",!0)],4))}}),[["__scopeId","data-v-e796f74d"]]),Wv=function(e){return e.Line="line",e.Contained="contained",e}(Wv||{}),od=function(e){return e.Small="sm",e.Medium="md",e.Large="lg",e}(od||{}),XT=["aria-label"],JT=["id","data-tab-id","aria-selected","aria-controls","tabindex","disabled","onClick"],QT={class:"nb-tabs__label"},eH=["id","aria-labelledby"],v0=24,tH=nt(Re({__name:"Tabs",props:{items:{},ariaLabel:{default:void 0},modelValue:{default:void 0},variant:{default:Wv.Line},size:{default:od.Medium},disabled:{type:Boolean,default:!1},fullWidth:{type:Boolean,default:!1},id:{default:void 0}},emits:["update:modelValue","change"],setup(e,{emit:t}){var ce;let i=e,r=t,n=Fr(),s=Bh(i),a=q(null),l=j(()=>i.items.filter(J=>!h(J))),o=q(i.modelValue??((ce=l.value[0])==null?void 0:ce.id));De(()=>i.modelValue,J=>{J!=null&&(o.value=J)});let c=j(()=>{var re;let J=i.modelValue??o.value,ae=i.items.find(X=>X.id===J);return ae&&!h(ae)?ae.id:(re=l.value[0])==null?void 0:re.id}),u=j(()=>i.size===od.Large?18:16),d=j(()=>["nb-tabs",`nb-tabs--${i.variant}`,`nb-tabs--${i.size}`,{"nb-tabs--full-width":i.fullWidth,"nb-tabs--disabled":i.disabled,"nb-tabs--overflow":T.value}]);function h(J){return i.disabled||!!J.disabled}function f(J){return`${s}-tab-${J}`}function v(J){return`${s}-panel-${J}`}function p(J){return iv(n,J)}function S(J){h(J)||J.id===c.value||(o.value=J.id,r("update:modelValue",J.id),r("change",J.id,J))}function _(J){var ae,re;(re=(ae=a.value)==null?void 0:ae.querySelectorAll("[data-tab-id]"))==null||re.forEach(X=>{X.dataset.tabId===J&&X.focus()})}function w(J){let ae=l.value;if(!ae.length)return;let re=ae[(ae.findIndex(X=>X.id===c.value)+J+ae.length)%ae.length];S(re),_(re.id)}function C(J){J&&(S(J),_(J.id))}let{phone:g}=Bo(),E=q(null),T=q(!1),L=j(()=>g.value||T.value);function V(){let J=E.value,ae=a.value;!J||!ae||(T.value=ae.scrollWidth>J.clientWidth+1)}let P=q(!1),Y=q(!1);function W(){let J=a.value;if(!L.value||!J)return;let ae=J.scrollWidth-J.clientWidth;P.value=J.scrollLeft>1,Y.value=J.scrollLeft<ae-1}function A(){let J=a.value;if(!L.value||!J)return;let ae=[...J.querySelectorAll("[data-tab-id]")].find(re=>re.dataset.tabId===c.value);if(ae){let re=J.getBoundingClientRect(),X=ae.getBoundingClientRect(),le=X.left-re.left+J.scrollLeft,ve=le+X.width,ue=ae===J.firstElementChild,he=ae===J.lastElementChild;le<J.scrollLeft+(ue?0:v0)?J.scrollLeft=Math.max(0,ue?0:le-v0):ve>J.scrollLeft+J.clientWidth-(he?0:v0)&&(J.scrollLeft=ve-J.clientWidth+(he?0:v0))}W()}De([c,L],()=>Kt(A));function $(){V(),A()}let Z=null;function ie(){!Z||!E.value||!a.value||(Z.disconnect(),Z.observe(E.value),a.value.querySelectorAll("[data-tab-id]").forEach(J=>Z==null?void 0:Z.observe(J)))}De(()=>i.items,()=>Kt(()=>{ie(),$()}),{deep:!0}),lt(()=>{V(),A(),window.addEventListener("resize",$,{passive:!0}),typeof ResizeObserver<"u"&&(Z=new ResizeObserver($),ie())}),mi(()=>{window.removeEventListener("resize",$),Z==null||Z.disconnect(),Z=null});function ne(J){switch(J.key){case"ArrowRight":w(1);break;case"ArrowLeft":w(-1);break;case"Home":C(l.value[0]);break;case"End":C(l.value[l.value.length-1]);break;default:return}J.preventDefault()}return(J,ae)=>(m(),M("div",{ref_key:"rootRef",ref:E,class:Le(d.value)},[b("div",{ref_key:"listRef",ref:a,class:Le(["nb-tabs__list",{"nb-tabs__list--fade-start":L.value&&P.value,"nb-tabs__list--fade-end":L.value&&Y.value}]),role:"tablist","aria-label":e.ariaLabel||void 0,onKeydown:ne,onScrollPassive:W},[(m(!0),M(ke,null,Fe(e.items,re=>(m(),M("button",{id:f(re.id),key:re.id,"data-tab-id":re.id,type:"button",role:"tab",class:Le(["nb-tabs__tab",{"nb-tabs__tab--active":re.id===c.value}]),"aria-selected":re.id===c.value,"aria-controls":p(re.id)?v(re.id):void 0,tabindex:re.id===c.value?0:-1,disabled:h(re),onClick:X=>S(re)},[re.icon?(m(),me(Ue,{key:0,name:re.icon,size:u.value,class:"nb-tabs__icon"},null,8,["name","size"])):z("",!0),b("span",QT,F(re.label),1),re.badge==null?z("",!0):(m(),me(bs,{key:1,size:"sm",class:"nb-tabs__badge"},{default:te(()=>[_e(F(re.badge),1)]),_:2},1024))],10,JT))),128))],42,XT),(m(!0),M(ke,null,Fe(e.items,re=>(m(),M(ke,{key:`panel-${re.id}`},[re.id===c.value&&p(re.id)?(m(),M("div",{key:0,id:v(re.id),class:"nb-tabs__panel",role:"tabpanel","aria-labelledby":f(re.id),tabindex:"0"},[He(J.$slots,re.id,{item:re},void 0,!0)],8,eH)):z("",!0)],64))),128))],2))}}),[["__scopeId","data-v-4367403c"]]),iH={class:"nb-shell-panel__header"},rH={class:"nb-shell-panel__header-left"},nH=["title"],sH={class:"nb-shell-panel__header-center"},aH={class:"nb-shell-panel__toolbar"},lH=["aria-label"],oH=["aria-pressed"],cH=["aria-pressed"],uH=["aria-pressed"],dH={key:0,class:"nb-shell-panel__content"},r2=nt(Re({__name:"ShellPanel",props:{size:{default:"default"},title:{default:""},fluid:{type:Boolean,default:!1},fill:{type:Boolean,default:!1}},emits:["update:size"],setup(e,{expose:t,emit:i}){let r=e,{layerProps:n}=js(),s=i,a=q(r.size);De(()=>r.size,c=>a.value=c);let l=j({get:()=>a.value,set:c=>{a.value=c,s("update:size",c)}});function o(c){l.value=c}return t({setSize:o}),(c,u)=>(m(),M("div",Wt({class:"nb-shell-panel"},de(n),{class:[l.value,{"nb-shell-panel--fluid":e.fluid,"nb-shell-panel--fill":e.fill}]}),[b("div",iH,[b("div",rH,[e.title?(m(),M("span",{key:0,class:"nb-shell-panel__title",title:e.title},F(e.title),9,nH)):z("",!0),He(c.$slots,"title",{},void 0,!0)]),b("div",sH,[b("div",aH,[He(c.$slots,"toolbar",{},void 0,!0)])]),b("div",{class:"nb-shell-panel__header-right",role:"group","aria-label":e.title?`${e.title} panel size`:"Panel size"},[He(c.$slots,"controls",{},()=>[b("button",{type:"button",class:Le(["nb-shell-panel__size-btn",{active:l.value==="collapsed"}]),"aria-pressed":l.value==="collapsed",title:"Minimize","aria-label":"Minimize",onClick:u[0]||(u[0]=d=>o("collapsed"))},[...u[3]||(u[3]=[b("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true"},[b("line",{x1:"2",y1:"10",x2:"10",y2:"10",stroke:"currentColor","stroke-width":"1.5"})],-1)])],10,oH),b("button",{type:"button",class:Le(["nb-shell-panel__size-btn",{active:l.value==="default"}]),"aria-pressed":l.value==="default",title:"Default","aria-label":"Default",onClick:u[1]||(u[1]=d=>o("default"))},[...u[4]||(u[4]=[b("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true"},[b("rect",{x:"1",y:"5",width:"10",height:"6",rx:"1",fill:"none",stroke:"currentColor","stroke-width":"1.2"})],-1)])],10,cH),b("button",{type:"button",class:Le(["nb-shell-panel__size-btn",{active:l.value==="full"}]),"aria-pressed":l.value==="full",title:"Maximize","aria-label":"Maximize",onClick:u[2]||(u[2]=d=>o("full"))},[...u[5]||(u[5]=[b("svg",{width:"12",height:"12",viewBox:"0 0 12 12","aria-hidden":"true"},[b("rect",{x:"1",y:"1",width:"10",height:"10",rx:"1",fill:"none",stroke:"currentColor","stroke-width":"1.2"}),b("line",{x1:"1",y1:"3.5",x2:"11",y2:"3.5",stroke:"currentColor","stroke-width":"1.2"})],-1)])],10,uH)],!0)],8,lH)]),l.value==="collapsed"?z("",!0):(m(),M("div",dH,[He(c.$slots,"default",{},void 0,!0)]))],16))}}),[["__scopeId","data-v-368a5bf7"]]);const hH="modulepreload",fH=function(e){return"/"+e},n8={},s8=function(t,i,r){let n=Promise.resolve();if(i&&i.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));n=Promise.allSettled(i.map(o=>{if(o=fH(o),o in n8)return;n8[o]=!0;const c=o.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${o}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":hH,c||(d.as="script"),d.crossOrigin="",d.href=o,l&&d.setAttribute("nonce",l),document.head.appendChild(d),c)return new Promise((h,f)=>{d.addEventListener("load",h),d.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${o}`)))})}))}function s(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return n.then(a=>{for(const l of a||[])l.status==="rejected"&&s(l.reason);return t().catch(s)})},Aa=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},pH=Aa("trash","0 0 256 256",'<path d="M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"/>'),_H=Aa("trash","0 0 256 256",'<path d="M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"/>'),a8=Aa("trash","0 0 256 256",'<path d="M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"/>'),mH=Aa("trash","0 0 256 256",'<path d="M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"/>'),vH=Aa("trash","0 0 256 256",'<path d="M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"/>'),gH=Aa("trash","0 0 256 256",'<path d="M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z" opacity="0.2"/><path d="M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"/>'),bH="trash",n2=Object.freeze(Object.defineProperty({__proto__:null,bold:mH,default:a8,duotone:gH,fill:vH,glyphName:bH,light:_H,regular:a8,thin:pH},Symbol.toStringTag,{value:"Module"}));var yH=900,jv=class extends Error{constructor(){super("confirm timed out"),this.name="ConfirmTimeout"}},wH="This is taking longer than expected. It may still be running. Check before trying again.",Dn=Zr(null),tu=q(!1),Rs=q(!1),gc=q(!1),bc=q(void 0),Kv=[],Ls=null,g0=null,O0=null,R0=null;function SH(){return Oh()?0:200}function CH(){R0&&clearTimeout(R0),R0=null}function kH(e){if(e instanceof Error&&e.message)return e.message;let t=String(e);return t==="[object Object]"?"Something went wrong.":t}function AH(){O0=null;let e=Kv.shift()??null;Dn.value=e,tu.value=!!e}function l8(e,t){return!e.done&&e.attempt===t&&Dn.value===e}function I0(e,t=Dn.value){!t||t.done||t===Dn.value&&(t.done=!0,CH(),tu.value=!1,Rs.value=!1,gc.value=!1,bc.value=void 0,t.resolve(e),O0&&clearTimeout(O0),O0=setTimeout(AH,SH()))}function MH(e,t){return new Promise((i,r)=>{let n=setTimeout(()=>r(new jv),t);e.then(s=>{clearTimeout(n),i(s)},s=>{clearTimeout(n),r(s)})})}async function EH(){let e=Dn.value;if(!e||e.done||Rs.value||gc.value)return;let{onConfirm:t,formatError:i,timeout:r,timeoutMessage:n,successLabel:s}=e.options;if(!t){I0(!0,e);return}let a=++e.attempt;Rs.value=!0,bc.value=void 0;try{let l=Promise.resolve(t());if(await(r&&r>0?MH(l,r):l),!l8(e,a))return;Rs.value=!1,s?(gc.value=!0,R0=setTimeout(()=>I0(!0,e),yH)):I0(!0,e)}catch(l){if(!l8(e,a))return;Rs.value=!1,bc.value=l instanceof jv?n??wH:(i??kH)(l)}}function LH(e){let t={...e??{title:""}};return delete t.onConfirm,delete t.formatError,delete t.body,t}var $H=Re({name:"NbConfirmHost",setup(){return()=>{var i;let e=((i=Dn.value)==null?void 0:i.options)??null,t=e==null?void 0:e.body;return $e(bx,{...LH(e),open:tu.value,busy:Rs.value,succeeded:gc.value,error:bc.value??"",onConfirm:EH,onCancel:()=>I0(!1)},t?{default:()=>t()}:void 0)}}});function xH(){if(!Ls){if(typeof document>"u")throw Error("[NbConfirm] confirm() needs a DOM. It cannot run during server-side rendering or in a non-browser environment. Call it from an event handler, not from setup().");g0=document.createElement("div"),g0.setAttribute("data-nb-confirm-host",""),document.body.appendChild(g0),Ls=Qm($H),Ls.component("NbIcon",Ue),Ls.component("NbGrid",or),Ls.config.warnHandler=(e,t,i)=>{if(e.includes("Failed to resolve component")){console.error(`[NbConfirm] ${e} The dialog runs in its own Vue app, so a sibling resolved by name has to be registered in useConfirm.composable.ts. Import it in NbConfirm instead where you can.`);return}console.warn(`[NbConfirm] ${e}${i}`)},Ls.mount(g0)}}function TH(e){return xH(),new Promise(t=>{let i={options:e,resolve:t,attempt:0,done:!1};if(Dn.value){Kv.push(i);return}Dn.value=i,tu.value=!0})}function HH(){return TH}var qv={storageKey:"nubisco.named-theme",defaultTheme:null,attribute:"data-nb-theme",themes:null,persist:!0},Fi={...qv},cd=q(qv.defaultTheme);function Gv(e){return typeof e=="string"&&/^[a-z0-9-]{1,64}$/.test(e)}function Yv(e){return!Fi.themes||Fi.themes.includes(e)}function NH(){if(!Fi.persist)return null;try{if(typeof localStorage>"u")return null;let e=localStorage.getItem(Fi.storageKey);return e===null||e===""?null:Gv(e)&&Yv(e)?e:null}catch{return null}}function PH(e){if(Fi.persist)try{if(typeof localStorage>"u")return;e===null?localStorage.removeItem(Fi.storageKey):localStorage.setItem(Fi.storageKey,e)}catch{}}function o8(){if(typeof document>"u")return;let e=cd.value;e===null?document.documentElement.removeAttribute(Fi.attribute):document.documentElement.setAttribute(Fi.attribute,e)}var b0=null;function OH(){let e=NH(),t=Fi.defaultTheme;cd.value=e??(t!==null&&Gv(t)&&Yv(t)?t:null),o8(),b0==null||b0(),b0=De(cd,i=>{PH(i),o8()})}function RH(e={}){Fi={...Fi,...e,themes:e.themes??Fi.themes},OH()}var IH=["compact","verbose"];function Xv(e){return typeof e=="string"&&IH.includes(e)}function DH(e){var t;try{let i=(t=globalThis.localStorage)==null?void 0:t.getItem(e);return Xv(i)?i:null}catch{return null}}function VH(e,t){var i;try{(i=globalThis.localStorage)==null||i.setItem(e,t)}catch{}}function ZH(e){let t=q(DH(e.storageKey)??e.defaultVariant??"verbose");return De(t,i=>VH(e.storageKey,i)),{variant:t,isCompact:j(()=>t.value==="compact"),toggle:()=>{t.value=t.value==="compact"?"verbose":"compact"},setVariant:i=>{Xv(i)&&(t.value=i)}}}const BH=4,Jv=Wc("notifications",()=>{const e=q([]),t=j(()=>e.value.slice(0,BH));function i(s){e.value.push(s)}function r(s){const a=e.value.findIndex(l=>l.id===s);a!==-1&&e.value.splice(a,1)}function n(){e.value=[]}return{queue:e,visible:t,add:i,remove:r,clear:n}}),FH={class:"toast-layer","aria-live":"polite","aria-atomic":"true"},zH={class:"toast-body"},UH={key:0,class:"toast-title"},WH={class:"toast-message"},jH=Re({__name:"NotificationToasts",setup(e){const t=Jv(),i=new Map;De(()=>t.visible.map(n=>({id:n.id,duration:n.duration??3200})),n=>{for(const s of n){if(i.has(s.id))continue;const a=setTimeout(()=>{t.remove(s.id),i.delete(s.id)},s.duration);i.set(s.id,a)}},{immediate:!0,deep:!0});function r(n){const s=i.get(n);s&&(clearTimeout(s),i.delete(n)),t.remove(n)}return(n,s)=>{const a=oi;return m(),M("div",FH,[(m(!0),M(ke,null,Fe(de(t).visible,l=>(m(),M("div",{key:l.id,class:Le(["toast",`toast--${l.variant}`])},[b("div",zH,[l.title?(m(),M("div",UH,F(l.title),1)):z("",!0),b("div",WH,F(l.message),1)]),G(a,{variant:"ghost",size:"xs",icon:uc,title:"Dismiss",onClick:o=>r(l.id)},null,8,["onClick"])],2))),128))])}}}),ii=(e,t)=>{const i=e.__vccOpts||e;for(const[r,n]of t)i[r]=n;return i},KH=ii(jH,[["__scopeId","data-v-5b1d791e"]]),qH=Re({__name:"App",setup(e){return(t,i)=>{const r=uo("RouterView");return m(),M(ke,null,[G(r),G(KH)],64)}}});/*!
44
- * vue-router v4.6.4
45
- * (c) 2025 Eduardo San Martin Morote
46
- * @license MIT
47
- */const Ps=typeof document<"u";function Qv(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function GH(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Qv(e.default)}const dt=Object.assign;function Fu(e,t){const i={};for(const r in t){const n=t[r];i[r]=fr(n)?n.map(e):e(n)}return i}const ro=()=>{},fr=Array.isArray;function c8(e,t){const i={};for(const r in e)i[r]=r in t?t[r]:e[r];return i}const eg=/#/g,YH=/&/g,XH=/\//g,JH=/=/g,QH=/\?/g,tg=/\+/g,eN=/%5B/g,tN=/%5D/g,ig=/%5E/g,iN=/%60/g,rg=/%7B/g,rN=/%7C/g,ng=/%7D/g,nN=/%20/g;function s2(e){return e==null?"":encodeURI(""+e).replace(rN,"|").replace(eN,"[").replace(tN,"]")}function sN(e){return s2(e).replace(rg,"{").replace(ng,"}").replace(ig,"^")}function ud(e){return s2(e).replace(tg,"%2B").replace(nN,"+").replace(eg,"%23").replace(YH,"%26").replace(iN,"`").replace(rg,"{").replace(ng,"}").replace(ig,"^")}function aN(e){return ud(e).replace(JH,"%3D")}function lN(e){return s2(e).replace(eg,"%23").replace(QH,"%3F")}function oN(e){return lN(e).replace(XH,"%2F")}function Eo(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const cN=/\/$/,uN=e=>e.replace(cN,"");function zu(e,t,i="/"){let r,n={},s="",a="";const l=t.indexOf("#");let o=t.indexOf("?");return o=l>=0&&o>l?-1:o,o>=0&&(r=t.slice(0,o),s=t.slice(o,l>0?l:t.length),n=e(s.slice(1))),l>=0&&(r=r||t.slice(0,l),a=t.slice(l,t.length)),r=pN(r??t,i),{fullPath:r+s+a,path:r,query:n,hash:Eo(a)}}function dN(e,t){const i=t.query?e(t.query):"";return t.path+(i&&"?")+i+(t.hash||"")}function u8(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function hN(e,t,i){const r=t.matched.length-1,n=i.matched.length-1;return r>-1&&r===n&&Ys(t.matched[r],i.matched[n])&&sg(t.params,i.params)&&e(t.query)===e(i.query)&&t.hash===i.hash}function Ys(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function sg(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var i in e)if(!fN(e[i],t[i]))return!1;return!0}function fN(e,t){return fr(e)?d8(e,t):fr(t)?d8(t,e):(e==null?void 0:e.valueOf())===(t==null?void 0:t.valueOf())}function d8(e,t){return fr(t)?e.length===t.length&&e.every((i,r)=>i===t[r]):e.length===1&&e[0]===t}function pN(e,t){if(e.startsWith("/"))return e;if(!e)return t;const i=t.split("/"),r=e.split("/"),n=r[r.length-1];(n===".."||n===".")&&r.push("");let s=i.length-1,a,l;for(a=0;a<r.length;a++)if(l=r[a],l!==".")if(l==="..")s>1&&s--;else break;return i.slice(0,s).join("/")+"/"+r.slice(a).join("/")}const _n={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let dd=function(e){return e.pop="pop",e.push="push",e}({}),Uu=function(e){return e.back="back",e.forward="forward",e.unknown="",e}({});function _N(e){if(!e)if(Ps){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),uN(e)}const mN=/^[^#]+#/;function vN(e,t){return e.replace(mN,"#")+t}function gN(e,t){const i=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-i.left-(t.left||0),top:r.top-i.top-(t.top||0)}}const iu=()=>({left:window.scrollX,top:window.scrollY});function bN(e){let t;if("el"in e){const i=e.el,r=typeof i=="string"&&i.startsWith("#"),n=typeof i=="string"?r?document.getElementById(i.slice(1)):document.querySelector(i):i;if(!n)return;t=gN(n,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 h8(e,t){return(history.state?history.state.position-t:-1)+e}const hd=new Map;function yN(e,t){hd.set(e,t)}function wN(e){const t=hd.get(e);return hd.delete(e),t}function SN(e){return typeof e=="string"||e&&typeof e=="object"}function ag(e){return typeof e=="string"||typeof e=="symbol"}let xt=function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e}({});const lg=Symbol("");xt.MATCHER_NOT_FOUND+"",xt.NAVIGATION_GUARD_REDIRECT+"",xt.NAVIGATION_ABORTED+"",xt.NAVIGATION_CANCELLED+"",xt.NAVIGATION_DUPLICATED+"";function Xs(e,t){return dt(new Error,{type:e,[lg]:!0},t)}function qr(e,t){return e instanceof Error&&lg in e&&(t==null||!!(e.type&t))}const CN=["params","query","hash"];function kN(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const i of CN)i in e&&(t[i]=e[i]);return JSON.stringify(t,null,2)}function AN(e){const t={};if(e===""||e==="?")return t;const i=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r<i.length;++r){const n=i[r].replace(tg," "),s=n.indexOf("="),a=Eo(s<0?n:n.slice(0,s)),l=s<0?null:Eo(n.slice(s+1));if(a in t){let o=t[a];fr(o)||(o=t[a]=[o]),o.push(l)}else t[a]=l}return t}function f8(e){let t="";for(let i in e){const r=e[i];if(i=aN(i),r==null){r!==void 0&&(t+=(t.length?"&":"")+i);continue}(fr(r)?r.map(n=>n&&ud(n)):[r&&ud(r)]).forEach(n=>{n!==void 0&&(t+=(t.length?"&":"")+i,n!=null&&(t+="="+n))})}return t}function MN(e){const t={};for(const i in e){const r=e[i];r!==void 0&&(t[i]=fr(r)?r.map(n=>n==null?null:""+n):r==null?r:""+r)}return t}const EN=Symbol(""),p8=Symbol(""),ru=Symbol(""),a2=Symbol(""),fd=Symbol("");function xl(){let e=[];function t(r){return e.push(r),()=>{const n=e.indexOf(r);n>-1&&e.splice(n,1)}}function i(){e=[]}return{add:t,list:()=>e.slice(),reset:i}}function Cn(e,t,i,r,n,s=a=>a()){const a=r&&(r.enterCallbacks[n]=r.enterCallbacks[n]||[]);return()=>new Promise((l,o)=>{const c=h=>{h===!1?o(Xs(xt.NAVIGATION_ABORTED,{from:i,to:t})):h instanceof Error?o(h):SN(h)?o(Xs(xt.NAVIGATION_GUARD_REDIRECT,{from:t,to:h})):(a&&r.enterCallbacks[n]===a&&typeof h=="function"&&a.push(h),l())},u=s(()=>e.call(r&&r.instances[n],t,i,c));let d=Promise.resolve(u);e.length<3&&(d=d.then(c)),d.catch(h=>o(h))})}function Wu(e,t,i,r,n=s=>s()){const s=[];for(const a of e)for(const l in a.components){let o=a.components[l];if(!(t!=="beforeRouteEnter"&&!a.instances[l]))if(Qv(o)){const c=(o.__vccOpts||o)[t];c&&s.push(Cn(c,i,r,a,l,n))}else{let c=o();s.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${l}" at "${a.path}"`);const d=GH(u)?u.default:u;a.mods[l]=u,a.components[l]=d;const h=(d.__vccOpts||d)[t];return h&&Cn(h,i,r,a,l,n)()}))}}return s}function LN(e,t){const i=[],r=[],n=[],s=Math.max(t.matched.length,e.matched.length);for(let a=0;a<s;a++){const l=t.matched[a];l&&(e.matched.find(c=>Ys(c,l))?r.push(l):i.push(l));const o=e.matched[a];o&&(t.matched.find(c=>Ys(c,o))||n.push(o))}return[i,r,n]}/*!
48
- * vue-router v4.6.4
49
- * (c) 2025 Eduardo San Martin Morote
50
- * @license MIT
51
- */let $N=()=>location.protocol+"//"+location.host;function og(e,t){const{pathname:i,search:r,hash:n}=t,s=e.indexOf("#");if(s>-1){let a=n.includes(e.slice(s))?e.slice(s).length:1,l=n.slice(a);return l[0]!=="/"&&(l="/"+l),u8(l,"")}return u8(i,e)+r+n}function xN(e,t,i,r){let n=[],s=[],a=null;const l=({state:h})=>{const f=og(e,location),v=i.value,p=t.value;let S=0;if(h){if(i.value=f,t.value=h,a&&a===v){a=null;return}S=p?h.position-p.position:0}else r(f);n.forEach(_=>{_(i.value,v,{delta:S,type:dd.pop,direction:S?S>0?Uu.forward:Uu.back:Uu.unknown})})};function o(){a=i.value}function c(h){n.push(h);const f=()=>{const v=n.indexOf(h);v>-1&&n.splice(v,1)};return s.push(f),f}function u(){if(document.visibilityState==="hidden"){const{history:h}=window;if(!h.state)return;h.replaceState(dt({},h.state,{scroll:iu()}),"")}}function d(){for(const h of s)h();s=[],window.removeEventListener("popstate",l),window.removeEventListener("pagehide",u),document.removeEventListener("visibilitychange",u)}return window.addEventListener("popstate",l),window.addEventListener("pagehide",u),document.addEventListener("visibilitychange",u),{pauseListeners:o,listen:c,destroy:d}}function _8(e,t,i,r=!1,n=!1){return{back:e,current:t,forward:i,replaced:r,position:window.history.length,scroll:n?iu():null}}function TN(e){const{history:t,location:i}=window,r={value:og(e,i)},n={value:t.state};n.value||s(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function s(o,c,u){const d=e.indexOf("#"),h=d>-1?(i.host&&document.querySelector("base")?e:e.slice(d))+o:$N()+e+o;try{t[u?"replaceState":"pushState"](c,"",h),n.value=c}catch(f){console.error(f),i[u?"replace":"assign"](h)}}function a(o,c){s(o,dt({},t.state,_8(n.value.back,o,n.value.forward,!0),c,{position:n.value.position}),!0),r.value=o}function l(o,c){const u=dt({},n.value,t.state,{forward:o,scroll:iu()});s(u.current,u,!0),s(o,dt({},_8(r.value,o,null),{position:u.position+1},c),!1),r.value=o}return{location:r,state:n,push:l,replace:a}}function HN(e){e=_N(e);const t=TN(e),i=xN(e,t.state,t.location,t.replace);function r(s,a=!0){a||i.pauseListeners(),history.go(s)}const n=dt({location:"",base:e,go:r,createHref:vN.bind(null,e)},t,i);return Object.defineProperty(n,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(n,"state",{enumerable:!0,get:()=>t.state.value}),n}let os=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.Group=2]="Group",e}({});var Yt=function(e){return e[e.Static=0]="Static",e[e.Param=1]="Param",e[e.ParamRegExp=2]="ParamRegExp",e[e.ParamRegExpEnd=3]="ParamRegExpEnd",e[e.EscapeNext=4]="EscapeNext",e}(Yt||{});const NN={type:os.Static,value:""},PN=/[a-zA-Z0-9_]/;function ON(e){if(!e)return[[]];if(e==="/")return[[NN]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(f){throw new Error(`ERR (${i})/"${c}": ${f}`)}let i=Yt.Static,r=i;const n=[];let s;function a(){s&&n.push(s),s=[]}let l=0,o,c="",u="";function d(){c&&(i===Yt.Static?s.push({type:os.Static,value:c}):i===Yt.Param||i===Yt.ParamRegExp||i===Yt.ParamRegExpEnd?(s.length>1&&(o==="*"||o==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),s.push({type:os.Param,value:c,regexp:u,repeatable:o==="*"||o==="+",optional:o==="*"||o==="?"})):t("Invalid state to consume buffer"),c="")}function h(){c+=o}for(;l<e.length;){if(o=e[l++],o==="\\"&&i!==Yt.ParamRegExp){r=i,i=Yt.EscapeNext;continue}switch(i){case Yt.Static:o==="/"?(c&&d(),a()):o===":"?(d(),i=Yt.Param):h();break;case Yt.EscapeNext:h(),i=r;break;case Yt.Param:o==="("?i=Yt.ParamRegExp:PN.test(o)?h():(d(),i=Yt.Static,o!=="*"&&o!=="?"&&o!=="+"&&l--);break;case Yt.ParamRegExp:o===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+o:i=Yt.ParamRegExpEnd:u+=o;break;case Yt.ParamRegExpEnd:d(),i=Yt.Static,o!=="*"&&o!=="?"&&o!=="+"&&l--,u="";break;default:t("Unknown state");break}}return i===Yt.ParamRegExp&&t(`Unfinished custom RegExp for param "${c}"`),d(),a(),n}const m8="[^/]+?",RN={sensitive:!1,strict:!1,start:!0,end:!0};var Ei=function(e){return e[e._multiplier=10]="_multiplier",e[e.Root=90]="Root",e[e.Segment=40]="Segment",e[e.SubSegment=30]="SubSegment",e[e.Static=40]="Static",e[e.Dynamic=20]="Dynamic",e[e.BonusCustomRegExp=10]="BonusCustomRegExp",e[e.BonusWildcard=-50]="BonusWildcard",e[e.BonusRepeatable=-20]="BonusRepeatable",e[e.BonusOptional=-8]="BonusOptional",e[e.BonusStrict=.7000000000000001]="BonusStrict",e[e.BonusCaseSensitive=.25]="BonusCaseSensitive",e}(Ei||{});const IN=/[.+*?^${}()[\]/\\]/g;function DN(e,t){const i=dt({},RN,t),r=[];let n=i.start?"^":"";const s=[];for(const c of e){const u=c.length?[]:[Ei.Root];i.strict&&!c.length&&(n+="/");for(let d=0;d<c.length;d++){const h=c[d];let f=Ei.Segment+(i.sensitive?Ei.BonusCaseSensitive:0);if(h.type===os.Static)d||(n+="/"),n+=h.value.replace(IN,"\\$&"),f+=Ei.Static;else if(h.type===os.Param){const{value:v,repeatable:p,optional:S,regexp:_}=h;s.push({name:v,repeatable:p,optional:S});const w=_||m8;if(w!==m8){f+=Ei.BonusCustomRegExp;try{`${w}`}catch(g){throw new Error(`Invalid custom RegExp for param "${v}" (${w}): `+g.message)}}let C=p?`((?:${w})(?:/(?:${w}))*)`:`(${w})`;d||(C=S&&c.length<2?`(?:/${C})`:"/"+C),S&&(C+="?"),n+=C,f+=Ei.Dynamic,S&&(f+=Ei.BonusOptional),p&&(f+=Ei.BonusRepeatable),w===".*"&&(f+=Ei.BonusWildcard)}u.push(f)}r.push(u)}if(i.strict&&i.end){const c=r.length-1;r[c][r[c].length-1]+=Ei.BonusStrict}i.strict||(n+="/?"),i.end?n+="$":i.strict&&!n.endsWith("/")&&(n+="(?:/|$)");const a=new RegExp(n,i.sensitive?"":"i");function l(c){const u=c.match(a),d={};if(!u)return null;for(let h=1;h<u.length;h++){const f=u[h]||"",v=s[h-1];d[v.name]=f&&v.repeatable?f.split("/"):f}return d}function o(c){let u="",d=!1;for(const h of e){(!d||!u.endsWith("/"))&&(u+="/"),d=!1;for(const f of h)if(f.type===os.Static)u+=f.value;else if(f.type===os.Param){const{value:v,repeatable:p,optional:S}=f,_=v in c?c[v]:"";if(fr(_)&&!p)throw new Error(`Provided param "${v}" is an array but it is not repeatable (* or + modifiers)`);const w=fr(_)?_.join("/"):_;if(!w)if(S)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):d=!0);else throw new Error(`Missing required param "${v}"`);u+=w}}return u||"/"}return{re:a,score:r,keys:s,parse:l,stringify:o}}function VN(e,t){let i=0;for(;i<e.length&&i<t.length;){const r=t[i]-e[i];if(r)return r;i++}return e.length<t.length?e.length===1&&e[0]===Ei.Static+Ei.Segment?-1:1:e.length>t.length?t.length===1&&t[0]===Ei.Static+Ei.Segment?1:-1:0}function cg(e,t){let i=0;const r=e.score,n=t.score;for(;i<r.length&&i<n.length;){const s=VN(r[i],n[i]);if(s)return s;i++}if(Math.abs(n.length-r.length)===1){if(v8(r))return 1;if(v8(n))return-1}return n.length-r.length}function v8(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const ZN={strict:!1,end:!0,sensitive:!1};function BN(e,t,i){const r=DN(ON(e.path),i),n=dt(r,{record:e,parent:t,children:[],alias:[]});return t&&!n.record.aliasOf==!t.record.aliasOf&&t.children.push(n),n}function FN(e,t){const i=[],r=new Map;t=c8(ZN,t);function n(d){return r.get(d)}function s(d,h,f){const v=!f,p=b8(d);p.aliasOf=f&&f.record;const S=c8(t,d),_=[p];if("alias"in d){const g=typeof d.alias=="string"?[d.alias]:d.alias;for(const E of g)_.push(b8(dt({},p,{components:f?f.record.components:p.components,path:E,aliasOf:f?f.record:p})))}let w,C;for(const g of _){const{path:E}=g;if(h&&E[0]!=="/"){const T=h.record.path,L=T[T.length-1]==="/"?"":"/";g.path=h.record.path+(E&&L+E)}if(w=BN(g,h,S),f?f.alias.push(w):(C=C||w,C!==w&&C.alias.push(w),v&&d.name&&!y8(w)&&a(d.name)),ug(w)&&o(w),p.children){const T=p.children;for(let L=0;L<T.length;L++)s(T[L],w,f&&f.children[L])}f=f||w}return C?()=>{a(C)}:ro}function a(d){if(ag(d)){const h=r.get(d);h&&(r.delete(d),i.splice(i.indexOf(h),1),h.children.forEach(a),h.alias.forEach(a))}else{const h=i.indexOf(d);h>-1&&(i.splice(h,1),d.record.name&&r.delete(d.record.name),d.children.forEach(a),d.alias.forEach(a))}}function l(){return i}function o(d){const h=WN(d,i);i.splice(h,0,d),d.record.name&&!y8(d)&&r.set(d.record.name,d)}function c(d,h){let f,v={},p,S;if("name"in d&&d.name){if(f=r.get(d.name),!f)throw Xs(xt.MATCHER_NOT_FOUND,{location:d});S=f.record.name,v=dt(g8(h.params,f.keys.filter(C=>!C.optional).concat(f.parent?f.parent.keys.filter(C=>C.optional):[]).map(C=>C.name)),d.params&&g8(d.params,f.keys.map(C=>C.name))),p=f.stringify(v)}else if(d.path!=null)p=d.path,f=i.find(C=>C.re.test(p)),f&&(v=f.parse(p),S=f.record.name);else{if(f=h.name?r.get(h.name):i.find(C=>C.re.test(h.path)),!f)throw Xs(xt.MATCHER_NOT_FOUND,{location:d,currentLocation:h});S=f.record.name,v=dt({},h.params,d.params),p=f.stringify(v)}const _=[];let w=f;for(;w;)_.unshift(w.record),w=w.parent;return{name:S,path:p,params:v,matched:_,meta:UN(_)}}e.forEach(d=>s(d));function u(){i.length=0,r.clear()}return{addRoute:s,resolve:c,removeRoute:a,clearRoutes:u,getRoutes:l,getRecordMatcher:n}}function g8(e,t){const i={};for(const r of t)r in e&&(i[r]=e[r]);return i}function b8(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:zN(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 zN(e){const t={},i=e.props||!1;if("component"in e)t.default=i;else for(const r in e.components)t[r]=typeof i=="object"?i[r]:i;return t}function y8(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function UN(e){return e.reduce((t,i)=>dt(t,i.meta),{})}function WN(e,t){let i=0,r=t.length;for(;i!==r;){const s=i+r>>1;cg(e,t[s])<0?r=s:i=s+1}const n=jN(e);return n&&(r=t.lastIndexOf(n,r-1)),r}function jN(e){let t=e;for(;t=t.parent;)if(ug(t)&&cg(e,t)===0)return t}function ug({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function w8(e){const t=Mt(ru),i=Mt(a2),r=j(()=>{const o=de(e.to);return t.resolve(o)}),n=j(()=>{const{matched:o}=r.value,{length:c}=o,u=o[c-1],d=i.matched;if(!u||!d.length)return-1;const h=d.findIndex(Ys.bind(null,u));if(h>-1)return h;const f=S8(o[c-2]);return c>1&&S8(u)===f&&d[d.length-1].path!==f?d.findIndex(Ys.bind(null,o[c-2])):h}),s=j(()=>n.value>-1&&XN(i.params,r.value.params)),a=j(()=>n.value>-1&&n.value===i.matched.length-1&&sg(i.params,r.value.params));function l(o={}){if(YN(o)){const c=t[de(e.replace)?"replace":"push"](de(e.to)).catch(ro);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:r,href:j(()=>r.value.href),isActive:s,isExactActive:a,navigate:l}}function KN(e){return e.length===1?e[0]:e}const qN=Re({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:w8,setup(e,{slots:t}){const i=ps(w8(e)),{options:r}=Mt(ru),n=j(()=>({[C8(e.activeClass,r.linkActiveClass,"router-link-active")]:i.isActive,[C8(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:i.isExactActive}));return()=>{const s=t.default&&KN(t.default(i));return e.custom?s:$e("a",{"aria-current":i.isExactActive?e.ariaCurrentValue:null,href:i.href,onClick:i.navigate,class:n.value},s)}}}),GN=qN;function YN(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 XN(e,t){for(const i in t){const r=t[i],n=e[i];if(typeof r=="string"){if(r!==n)return!1}else if(!fr(n)||n.length!==r.length||r.some((s,a)=>s.valueOf()!==n[a].valueOf()))return!1}return!0}function S8(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const C8=(e,t,i)=>e??t??i,JN=Re({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:i}){const r=Mt(fd),n=j(()=>e.route||r.value),s=Mt(p8,0),a=j(()=>{let c=de(s);const{matched:u}=n.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),l=j(()=>n.value.matched[a.value]);Ji(p8,j(()=>a.value+1)),Ji(EN,l),Ji(fd,n);const o=q();return De(()=>[o.value,l.value,e.name],([c,u,d],[h,f,v])=>{u&&(u.instances[d]=c,f&&f!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=f.leaveGuards),u.updateGuards.size||(u.updateGuards=f.updateGuards))),c&&u&&(!f||!Ys(u,f)||!h)&&(u.enterCallbacks[d]||[]).forEach(p=>p(c))},{flush:"post"}),()=>{const c=n.value,u=e.name,d=l.value,h=d&&d.components[u];if(!h)return k8(i.default,{Component:h,route:c});const f=d.props[u],v=f?f===!0?c.params:typeof f=="function"?f(c):f:null,S=$e(h,dt({},v,t,{onVnodeUnmounted:_=>{_.component.isUnmounted&&(d.instances[u]=null)},ref:o}));return k8(i.default,{Component:S,route:c})||S}}});function k8(e,t){if(!e)return null;const i=e(t);return i.length===1?i[0]:i}const QN=JN;function eP(e){const t=FN(e.routes,e),i=e.parseQuery||AN,r=e.stringifyQuery||f8,n=e.history,s=xl(),a=xl(),l=xl(),o=Zr(_n);let c=_n;Ps&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Fu.bind(null,U=>""+U),d=Fu.bind(null,oN),h=Fu.bind(null,Eo);function f(U,fe){let ge,se;return ag(U)?(ge=t.getRecordMatcher(U),se=fe):se=U,t.addRoute(se,ge)}function v(U){const fe=t.getRecordMatcher(U);fe&&t.removeRoute(fe)}function p(){return t.getRoutes().map(U=>U.record)}function S(U){return!!t.getRecordMatcher(U)}function _(U,fe){if(fe=dt({},fe||o.value),typeof U=="string"){const ee=zu(i,U,fe.path),Q=t.resolve({path:ee.path},fe),pe=n.createHref(ee.fullPath);return dt(ee,Q,{params:h(Q.params),hash:Eo(ee.hash),redirectedFrom:void 0,href:pe})}let ge;if(U.path!=null)ge=dt({},U,{path:zu(i,U.path,fe.path).path});else{const ee=dt({},U.params);for(const Q in ee)ee[Q]==null&&delete ee[Q];ge=dt({},U,{params:d(ee)}),fe.params=d(fe.params)}const se=t.resolve(ge,fe),x=U.hash||"";se.params=u(h(se.params));const H=dN(r,dt({},U,{hash:sN(x),path:se.path})),O=n.createHref(H);return dt({fullPath:H,hash:x,query:r===f8?MN(U.query):U.query||{}},se,{redirectedFrom:void 0,href:O})}function w(U){return typeof U=="string"?zu(i,U,o.value.path):dt({},U)}function C(U,fe){if(c!==U)return Xs(xt.NAVIGATION_CANCELLED,{from:fe,to:U})}function g(U){return L(U)}function E(U){return g(dt(w(U),{replace:!0}))}function T(U,fe){const ge=U.matched[U.matched.length-1];if(ge&&ge.redirect){const{redirect:se}=ge;let x=typeof se=="function"?se(U,fe):se;return typeof x=="string"&&(x=x.includes("?")||x.includes("#")?x=w(x):{path:x},x.params={}),dt({query:U.query,hash:U.hash,params:x.path!=null?{}:U.params},x)}}function L(U,fe){const ge=c=_(U),se=o.value,x=U.state,H=U.force,O=U.replace===!0,ee=T(ge,se);if(ee)return L(dt(w(ee),{state:typeof ee=="object"?dt({},x,ee.state):x,force:H,replace:O}),fe||ge);const Q=ge;Q.redirectedFrom=fe;let pe;return!H&&hN(r,se,ge)&&(pe=Xs(xt.NAVIGATION_DUPLICATED,{to:Q,from:se}),X(se,se,!0,!1)),(pe?Promise.resolve(pe):Y(Q,se)).catch(we=>qr(we)?qr(we,xt.NAVIGATION_GUARD_REDIRECT)?we:re(we):J(we,Q,se)).then(we=>{if(we){if(qr(we,xt.NAVIGATION_GUARD_REDIRECT))return L(dt({replace:O},w(we.to),{state:typeof we.to=="object"?dt({},x,we.to.state):x,force:H}),fe||Q)}else we=A(Q,se,!0,O,x);return W(Q,se,we),we})}function V(U,fe){const ge=C(U,fe);return ge?Promise.reject(ge):Promise.resolve()}function P(U){const fe=ue.values().next().value;return fe&&typeof fe.runWithContext=="function"?fe.runWithContext(U):U()}function Y(U,fe){let ge;const[se,x,H]=LN(U,fe);ge=Wu(se.reverse(),"beforeRouteLeave",U,fe);for(const ee of se)ee.leaveGuards.forEach(Q=>{ge.push(Cn(Q,U,fe))});const O=V.bind(null,U,fe);return ge.push(O),ye(ge).then(()=>{ge=[];for(const ee of s.list())ge.push(Cn(ee,U,fe));return ge.push(O),ye(ge)}).then(()=>{ge=Wu(x,"beforeRouteUpdate",U,fe);for(const ee of x)ee.updateGuards.forEach(Q=>{ge.push(Cn(Q,U,fe))});return ge.push(O),ye(ge)}).then(()=>{ge=[];for(const ee of H)if(ee.beforeEnter)if(fr(ee.beforeEnter))for(const Q of ee.beforeEnter)ge.push(Cn(Q,U,fe));else ge.push(Cn(ee.beforeEnter,U,fe));return ge.push(O),ye(ge)}).then(()=>(U.matched.forEach(ee=>ee.enterCallbacks={}),ge=Wu(H,"beforeRouteEnter",U,fe,P),ge.push(O),ye(ge))).then(()=>{ge=[];for(const ee of a.list())ge.push(Cn(ee,U,fe));return ge.push(O),ye(ge)}).catch(ee=>qr(ee,xt.NAVIGATION_CANCELLED)?ee:Promise.reject(ee))}function W(U,fe,ge){l.list().forEach(se=>P(()=>se(U,fe,ge)))}function A(U,fe,ge,se,x){const H=C(U,fe);if(H)return H;const O=fe===_n,ee=Ps?history.state:{};ge&&(se||O?n.replace(U.fullPath,dt({scroll:O&&ee&&ee.scroll},x)):n.push(U.fullPath,x)),o.value=U,X(U,fe,ge,O),re()}let $;function Z(){$||($=n.listen((U,fe,ge)=>{if(!he.listening)return;const se=_(U),x=T(se,he.currentRoute.value);if(x){L(dt(x,{replace:!0,force:!0}),se).catch(ro);return}c=se;const H=o.value;Ps&&yN(h8(H.fullPath,ge.delta),iu()),Y(se,H).catch(O=>qr(O,xt.NAVIGATION_ABORTED|xt.NAVIGATION_CANCELLED)?O:qr(O,xt.NAVIGATION_GUARD_REDIRECT)?(L(dt(w(O.to),{force:!0}),se).then(ee=>{qr(ee,xt.NAVIGATION_ABORTED|xt.NAVIGATION_DUPLICATED)&&!ge.delta&&ge.type===dd.pop&&n.go(-1,!1)}).catch(ro),Promise.reject()):(ge.delta&&n.go(-ge.delta,!1),J(O,se,H))).then(O=>{O=O||A(se,H,!1),O&&(ge.delta&&!qr(O,xt.NAVIGATION_CANCELLED)?n.go(-ge.delta,!1):ge.type===dd.pop&&qr(O,xt.NAVIGATION_ABORTED|xt.NAVIGATION_DUPLICATED)&&n.go(-1,!1)),W(se,H,O)}).catch(ro)}))}let ie=xl(),ne=xl(),ce;function J(U,fe,ge){re(U);const se=ne.list();return se.length?se.forEach(x=>x(U,fe,ge)):console.error(U),Promise.reject(U)}function ae(){return ce&&o.value!==_n?Promise.resolve():new Promise((U,fe)=>{ie.add([U,fe])})}function re(U){return ce||(ce=!U,Z(),ie.list().forEach(([fe,ge])=>U?ge(U):fe()),ie.reset()),U}function X(U,fe,ge,se){const{scrollBehavior:x}=e;if(!Ps||!x)return Promise.resolve();const H=!ge&&wN(h8(U.fullPath,0))||(se||!ge)&&history.state&&history.state.scroll||null;return Kt().then(()=>x(U,fe,H)).then(O=>O&&bN(O)).catch(O=>J(O,U,fe))}const le=U=>n.go(U);let ve;const ue=new Set,he={currentRoute:o,listening:!0,addRoute:f,removeRoute:v,clearRoutes:t.clearRoutes,hasRoute:S,getRoutes:p,resolve:_,options:e,push:g,replace:E,go:le,back:()=>le(-1),forward:()=>le(1),beforeEach:s.add,beforeResolve:a.add,afterEach:l.add,onError:ne.add,isReady:ae,install(U){U.component("RouterLink",GN),U.component("RouterView",QN),U.config.globalProperties.$router=he,Object.defineProperty(U.config.globalProperties,"$route",{enumerable:!0,get:()=>de(o)}),Ps&&!ve&&o.value===_n&&(ve=!0,g(n.location).catch(se=>{}));const fe={};for(const se in _n)Object.defineProperty(fe,se,{get:()=>o.value[se],enumerable:!0});U.provide(ru,he),U.provide(a2,tm(fe)),U.provide(fd,o);const ge=U.unmount;ue.add(U),U.unmount=function(){ue.delete(U),ue.size<1&&(c=_n,$&&$(),$=null,o.value=_n,ve=!1,ce=!1),ge()}}};function ye(U){return U.reduce((fe,ge)=>fe.then(()=>P(ge)),Promise.resolve())}return he}function l2(){return Mt(ru)}function nu(e){return Mt(a2)}const tP="/logo.svg",Ma=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},iP=Ma("book","0 0 256 256",'<path d="M208,28H72A28,28,0,0,0,44,56V224a4,4,0,0,0,4,4H192a4,4,0,0,0,0-8H52v-4a20,20,0,0,1,20-20H208a4,4,0,0,0,4-4V32A4,4,0,0,0,208,28Zm-4,160H72a27.94,27.94,0,0,0-20,8.42V56A20,20,0,0,1,72,36H204Z"/>'),rP=Ma("book","0 0 256 256",'<path d="M208,26H72A30,30,0,0,0,42,56V224a6,6,0,0,0,6,6H192a6,6,0,0,0,0-12H54v-2a18,18,0,0,1,18-18H208a6,6,0,0,0,6-6V32A6,6,0,0,0,208,26Zm-6,160H72a29.87,29.87,0,0,0-18,6V56A18,18,0,0,1,72,38H202Z"/>'),A8=Ma("book","0 0 256 256",'<path d="M208,24H72A32,32,0,0,0,40,56V224a8,8,0,0,0,8,8H192a8,8,0,0,0,0-16H56a16,16,0,0,1,16-16H208a8,8,0,0,0,8-8V32A8,8,0,0,0,208,24Zm-8,160H72a31.82,31.82,0,0,0-16,4.29V56A16,16,0,0,1,72,40H200Z"/>'),nP=Ma("book","0 0 256 256",'<path d="M208,20H72A36,36,0,0,0,36,56V224a12,12,0,0,0,12,12H192a12,12,0,0,0,0-24H60v-4a12,12,0,0,1,12-12H208a12,12,0,0,0,12-12V32A12,12,0,0,0,208,20ZM196,172H72a35.59,35.59,0,0,0-12,2.06V56A12,12,0,0,1,72,44H196Z"/>'),sP=Ma("book","0 0 256 256",'<path d="M216,32V192a8,8,0,0,1-8,8H72a16,16,0,0,0-16,16H192a8,8,0,0,1,0,16H48a8,8,0,0,1-8-8V56A32,32,0,0,1,72,24H208A8,8,0,0,1,216,32Z"/>'),aP=Ma("book","0 0 256 256",'<path d="M208,32V192H72a24,24,0,0,0-24,24V56A24,24,0,0,1,72,32Z" opacity="0.2"/><path d="M208,24H72A32,32,0,0,0,40,56V224a8,8,0,0,0,8,8H192a8,8,0,0,0,0-16H56a16,16,0,0,1,16-16H208a8,8,0,0,0,8-8V32A8,8,0,0,0,208,24Zm-8,160H72a31.82,31.82,0,0,0-16,4.29V56A16,16,0,0,1,72,40H200Z"/>'),lP="book",oP=Object.freeze(Object.defineProperty({__proto__:null,bold:nP,default:A8,duotone:aP,fill:sP,glyphName:lP,light:rP,regular:A8,thin:iP},Symbol.toStringTag,{value:"Module"})),Ea=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},cP=Ea("heart","0 0 256 256",'<path d="M178,44c-21.44,0-39.92,10.19-50,27.07C117.92,54.19,99.44,44,78,44a58.07,58.07,0,0,0-58,58c0,28.59,18,58.47,53.4,88.79a333.81,333.81,0,0,0,52.7,36.73,4,4,0,0,0,3.8,0,333.81,333.81,0,0,0,52.7-36.73C218,160.47,236,130.59,236,102A58.07,58.07,0,0,0,178,44ZM128,219.42c-14-8-100-59.35-100-117.42A50.06,50.06,0,0,1,78,52c21.11,0,38.85,11.31,46.3,29.51a4,4,0,0,0,7.4,0C139.15,63.31,156.89,52,178,52a50.06,50.06,0,0,1,50,50C228,160,142,211.46,128,219.42Z"/>'),uP=Ea("heart","0 0 256 256",'<path d="M178,42c-21,0-39.26,9.47-50,25.34C117.26,51.47,99,42,78,42a60.07,60.07,0,0,0-60,60c0,29.2,18.2,59.59,54.1,90.31a334.68,334.68,0,0,0,53.06,37,6,6,0,0,0,5.68,0,334.68,334.68,0,0,0,53.06-37C219.8,161.59,238,131.2,238,102A60.07,60.07,0,0,0,178,42ZM128,217.11C111.59,207.64,30,157.72,30,102A48.05,48.05,0,0,1,78,54c20.28,0,37.31,10.83,44.45,28.27a6,6,0,0,0,11.1,0C140.69,64.83,157.72,54,178,54a48.05,48.05,0,0,1,48,48C226,157.72,144.41,207.64,128,217.11Z"/>'),M8=Ea("heart","0 0 256 256",'<path d="M178,40c-20.65,0-38.73,8.88-50,23.89C116.73,48.88,98.65,40,78,40a62.07,62.07,0,0,0-62,62c0,70,103.79,126.66,108.21,129a8,8,0,0,0,7.58,0C136.21,228.66,240,172,240,102A62.07,62.07,0,0,0,178,40ZM128,214.8C109.74,204.16,32,155.69,32,102A46.06,46.06,0,0,1,78,56c19.45,0,35.78,10.36,42.6,27a8,8,0,0,0,14.8,0c6.82-16.67,23.15-27,42.6-27a46.06,46.06,0,0,1,46,46C224,155.61,146.24,204.15,128,214.8Z"/>'),dP=Ea("heart","0 0 256 256",'<path d="M178,36c-20.09,0-37.92,7.93-50,21.56C115.92,43.93,98.09,36,78,36a66.08,66.08,0,0,0-66,66c0,72.34,105.81,130.14,110.31,132.57a12,12,0,0,0,11.38,0C138.19,232.14,244,174.34,244,102A66.08,66.08,0,0,0,178,36Zm-5.49,142.36A328.69,328.69,0,0,1,128,210.16a328.69,328.69,0,0,1-44.51-31.8C61.82,159.77,36,131.42,36,102A42,42,0,0,1,78,60c17.8,0,32.7,9.4,38.89,24.54a12,12,0,0,0,22.22,0C145.3,69.4,160.2,60,178,60a42,42,0,0,1,42,42C220,131.42,194.18,159.77,172.51,178.36Z"/>'),o2=Ea("heart","0 0 256 256",'<path d="M240,102c0,70-103.79,126.66-108.21,129a8,8,0,0,1-7.58,0C119.79,228.66,16,172,16,102A62.07,62.07,0,0,1,78,40c20.65,0,38.73,8.88,50,23.89C139.27,48.88,157.35,40,178,40A62.07,62.07,0,0,1,240,102Z"/>'),hP=Ea("heart","0 0 256 256",'<path d="M232,102c0,66-104,122-104,122S24,168,24,102A54,54,0,0,1,78,48c22.59,0,41.94,12.31,50,32,8.06-19.69,27.41-32,50-32A54,54,0,0,1,232,102Z" opacity="0.2"/><path d="M178,40c-20.65,0-38.73,8.88-50,23.89C116.73,48.88,98.65,40,78,40a62.07,62.07,0,0,0-62,62c0,70,103.79,126.66,108.21,129a8,8,0,0,0,7.58,0C136.21,228.66,240,172,240,102A62.07,62.07,0,0,0,178,40ZM128,214.8C109.74,204.16,32,155.69,32,102A46.06,46.06,0,0,1,78,56c19.45,0,35.78,10.36,42.6,27a8,8,0,0,0,14.8,0c6.82-16.67,23.15-27,42.6-27a46.06,46.06,0,0,1,46,46C224,155.61,146.24,204.15,128,214.8Z"/>'),fP="heart",pP=Object.freeze(Object.defineProperty({__proto__:null,bold:dP,default:M8,duotone:hP,fill:o2,glyphName:fP,light:uP,regular:M8,thin:cP},Symbol.toStringTag,{value:"Module"})),La=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},_P=La("gear","0 0 256 256",'<path d="M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm83.93-32.49q.13-3.51,0-7l15.83-19.79a4,4,0,0,0,.75-3.53A103.64,103.64,0,0,0,218,75.9a4,4,0,0,0-3-2l-25.19-2.8c-1.58-1.71-3.24-3.37-4.95-4.95L182.07,41a4,4,0,0,0-2-3A104,104,0,0,0,154.82,27.5a4,4,0,0,0-3.53.74L131.51,44.07q-3.51-.14-7,0L104.7,28.24a4,4,0,0,0-3.53-.75A103.64,103.64,0,0,0,75.9,38a4,4,0,0,0-2,3l-2.8,25.19c-1.71,1.58-3.37,3.24-4.95,4.95L41,73.93a4,4,0,0,0-3,2A104,104,0,0,0,27.5,101.18a4,4,0,0,0,.74,3.53l15.83,19.78q-.14,3.51,0,7L28.24,151.3a4,4,0,0,0-.75,3.53A103.64,103.64,0,0,0,38,180.1a4,4,0,0,0,3,2l25.19,2.8c1.58,1.71,3.24,3.37,4.95,4.95l2.8,25.2a4,4,0,0,0,2,3,104,104,0,0,0,25.28,10.46,4,4,0,0,0,3.53-.74l19.78-15.83q3.51.13,7,0l19.79,15.83a4,4,0,0,0,2.5.88,4,4,0,0,0,1-.13A103.64,103.64,0,0,0,180.1,218a4,4,0,0,0,2-3l2.8-25.19c1.71-1.58,3.37-3.24,4.95-4.95l25.2-2.8a4,4,0,0,0,3-2,104,104,0,0,0,10.46-25.28,4,4,0,0,0-.74-3.53Zm.17,42.83-24.67,2.74a4,4,0,0,0-2.55,1.32,76.2,76.2,0,0,1-6.48,6.48,4,4,0,0,0-1.32,2.55l-2.74,24.66a95.45,95.45,0,0,1-19.64,8.15l-19.38-15.51a4,4,0,0,0-2.5-.87h-.24a73.67,73.67,0,0,1-9.16,0,4,4,0,0,0-2.74.87l-19.37,15.5a95.33,95.33,0,0,1-19.65-8.13l-2.74-24.67a4,4,0,0,0-1.32-2.55,76.2,76.2,0,0,1-6.48-6.48,4,4,0,0,0-2.55-1.32l-24.66-2.74a95.45,95.45,0,0,1-8.15-19.64l15.51-19.38a4,4,0,0,0,.87-2.74,77.76,77.76,0,0,1,0-9.16,4,4,0,0,0-.87-2.74l-15.5-19.37A95.33,95.33,0,0,1,43.9,81.66l24.67-2.74a4,4,0,0,0,2.55-1.32,76.2,76.2,0,0,1,6.48-6.48,4,4,0,0,0,1.32-2.55l2.74-24.66a95.45,95.45,0,0,1,19.64-8.15l19.38,15.51a4,4,0,0,0,2.74.87,73.67,73.67,0,0,1,9.16,0,4,4,0,0,0,2.74-.87l19.37-15.5a95.33,95.33,0,0,1,19.65,8.13l2.74,24.67a4,4,0,0,0,1.32,2.55,76.2,76.2,0,0,1,6.48,6.48,4,4,0,0,0,2.55,1.32l24.66,2.74a95.45,95.45,0,0,1,8.15,19.64l-15.51,19.38a4,4,0,0,0-.87,2.74,77.76,77.76,0,0,1,0,9.16,4,4,0,0,0,.87,2.74l15.5,19.37A95.33,95.33,0,0,1,212.1,174.34Z"/>'),mP=La("gear","0 0 256 256",'<path d="M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162ZM214,130.84c.06-1.89.06-3.79,0-5.68L229.33,106a6,6,0,0,0,1.11-5.29A105.34,105.34,0,0,0,219.76,74.9a6,6,0,0,0-4.53-3l-24.45-2.71q-1.93-2.07-4-4l-2.72-24.46a6,6,0,0,0-3-4.53,105.65,105.65,0,0,0-25.77-10.66A6,6,0,0,0,150,26.68l-19.2,15.37c-1.89-.06-3.79-.06-5.68,0L106,26.67a6,6,0,0,0-5.29-1.11A105.34,105.34,0,0,0,74.9,36.24a6,6,0,0,0-3,4.53L69.23,65.22q-2.07,1.94-4,4L40.76,72a6,6,0,0,0-4.53,3,105.65,105.65,0,0,0-10.66,25.77A6,6,0,0,0,26.68,106l15.37,19.2c-.06,1.89-.06,3.79,0,5.68L26.67,150.05a6,6,0,0,0-1.11,5.29A105.34,105.34,0,0,0,36.24,181.1a6,6,0,0,0,4.53,3l24.45,2.71q1.94,2.07,4,4L72,215.24a6,6,0,0,0,3,4.53,105.65,105.65,0,0,0,25.77,10.66,6,6,0,0,0,5.29-1.11L125.16,214c1.89.06,3.79.06,5.68,0l19.21,15.38a6,6,0,0,0,3.75,1.31,6.2,6.2,0,0,0,1.54-.2,105.34,105.34,0,0,0,25.76-10.68,6,6,0,0,0,3-4.53l2.71-24.45q2.07-1.93,4-4l24.46-2.72a6,6,0,0,0,4.53-3,105.49,105.49,0,0,0,10.66-25.77,6,6,0,0,0-1.11-5.29Zm-3.1,41.63-23.64,2.63a6,6,0,0,0-3.82,2,75.14,75.14,0,0,1-6.31,6.31,6,6,0,0,0-2,3.82l-2.63,23.63A94.28,94.28,0,0,1,155.14,218l-18.57-14.86a6,6,0,0,0-3.75-1.31h-.36a78.07,78.07,0,0,1-8.92,0,6,6,0,0,0-4.11,1.3L100.87,218a94.13,94.13,0,0,1-17.34-7.17L80.9,187.21a6,6,0,0,0-2-3.82,75.14,75.14,0,0,1-6.31-6.31,6,6,0,0,0-3.82-2l-23.63-2.63A94.28,94.28,0,0,1,38,155.14l14.86-18.57a6,6,0,0,0,1.3-4.11,78.07,78.07,0,0,1,0-8.92,6,6,0,0,0-1.3-4.11L38,100.87a94.13,94.13,0,0,1,7.17-17.34L68.79,80.9a6,6,0,0,0,3.82-2,75.14,75.14,0,0,1,6.31-6.31,6,6,0,0,0,2-3.82l2.63-23.63A94.28,94.28,0,0,1,100.86,38l18.57,14.86a6,6,0,0,0,4.11,1.3,78.07,78.07,0,0,1,8.92,0,6,6,0,0,0,4.11-1.3L155.13,38a94.13,94.13,0,0,1,17.34,7.17l2.63,23.64a6,6,0,0,0,2,3.82,75.14,75.14,0,0,1,6.31,6.31,6,6,0,0,0,3.82,2l23.63,2.63A94.28,94.28,0,0,1,218,100.86l-14.86,18.57a6,6,0,0,0-1.3,4.11,78.07,78.07,0,0,1,0,8.92,6,6,0,0,0,1.3,4.11L218,155.13A94.13,94.13,0,0,1,210.85,172.47Z"/>'),E8=La("gear","0 0 256 256",'<path d="M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"/>'),vP=La("gear","0 0 256 256",'<path d="M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm92-27.21v-1.58l14-17.51a12,12,0,0,0,2.23-10.59A111.75,111.75,0,0,0,225,71.89,12,12,0,0,0,215.89,66L193.61,63.5l-1.11-1.11L190,40.1A12,12,0,0,0,184.11,31a111.67,111.67,0,0,0-27.23-11.27A12,12,0,0,0,146.3,22L128.79,36h-1.58L109.7,22a12,12,0,0,0-10.59-2.23A111.75,111.75,0,0,0,71.89,31.05,12,12,0,0,0,66,40.11L63.5,62.39,62.39,63.5,40.1,66A12,12,0,0,0,31,71.89,111.67,111.67,0,0,0,19.77,99.12,12,12,0,0,0,22,109.7l14,17.51v1.58L22,146.3a12,12,0,0,0-2.23,10.59,111.75,111.75,0,0,0,11.29,27.22A12,12,0,0,0,40.11,190l22.28,2.48,1.11,1.11L66,215.9A12,12,0,0,0,71.89,225a111.67,111.67,0,0,0,27.23,11.27A12,12,0,0,0,109.7,234l17.51-14h1.58l17.51,14a12,12,0,0,0,10.59,2.23A111.75,111.75,0,0,0,184.11,225a12,12,0,0,0,5.91-9.06l2.48-22.28,1.11-1.11L215.9,190a12,12,0,0,0,9.06-5.91,111.67,111.67,0,0,0,11.27-27.23A12,12,0,0,0,234,146.3Zm-24.12-4.89a70.1,70.1,0,0,1,0,8.2,12,12,0,0,0,2.61,8.22l12.84,16.05A86.47,86.47,0,0,1,207,166.86l-20.43,2.27a12,12,0,0,0-7.65,4,69,69,0,0,1-5.8,5.8,12,12,0,0,0-4,7.65L166.86,207a86.47,86.47,0,0,1-10.49,4.35l-16.05-12.85a12,12,0,0,0-7.5-2.62c-.24,0-.48,0-.72,0a70.1,70.1,0,0,1-8.2,0,12.06,12.06,0,0,0-8.22,2.6L99.63,211.33A86.47,86.47,0,0,1,89.14,207l-2.27-20.43a12,12,0,0,0-4-7.65,69,69,0,0,1-5.8-5.8,12,12,0,0,0-7.65-4L49,166.86a86.47,86.47,0,0,1-4.35-10.49l12.84-16.05a12,12,0,0,0,2.61-8.22,70.1,70.1,0,0,1,0-8.2,12,12,0,0,0-2.61-8.22L44.67,99.63A86.47,86.47,0,0,1,49,89.14l20.43-2.27a12,12,0,0,0,7.65-4,69,69,0,0,1,5.8-5.8,12,12,0,0,0,4-7.65L89.14,49a86.47,86.47,0,0,1,10.49-4.35l16.05,12.85a12.06,12.06,0,0,0,8.22,2.6,70.1,70.1,0,0,1,8.2,0,12,12,0,0,0,8.22-2.6l16.05-12.85A86.47,86.47,0,0,1,166.86,49l2.27,20.43a12,12,0,0,0,4,7.65,69,69,0,0,1,5.8,5.8,12,12,0,0,0,7.65,4L207,89.14a86.47,86.47,0,0,1,4.35,10.49l-12.84,16.05A12,12,0,0,0,195.88,123.9Z"/>'),gP=La("gear","0 0 256 256",'<path d="M216,130.16q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"/>'),bP=La("gear","0 0 256 256",'<path d="M207.86,123.18l16.78-21a99.14,99.14,0,0,0-10.07-24.29l-26.7-3a81,81,0,0,0-6.81-6.81l-3-26.71a99.43,99.43,0,0,0-24.3-10l-21,16.77a81.59,81.59,0,0,0-9.64,0l-21-16.78A99.14,99.14,0,0,0,77.91,41.43l-3,26.7a81,81,0,0,0-6.81,6.81l-26.71,3a99.43,99.43,0,0,0-10,24.3l16.77,21a81.59,81.59,0,0,0,0,9.64l-16.78,21a99.14,99.14,0,0,0,10.07,24.29l26.7,3a81,81,0,0,0,6.81,6.81l3,26.71a99.43,99.43,0,0,0,24.3,10l21-16.77a81.59,81.59,0,0,0,9.64,0l21,16.78a99.14,99.14,0,0,0,24.29-10.07l3-26.7a81,81,0,0,0,6.81-6.81l26.71-3a99.43,99.43,0,0,0,10-24.3l-16.77-21A81.59,81.59,0,0,0,207.86,123.18ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z" opacity="0.2"/><path d="M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8.06,8.06,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8.06,8.06,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"/>'),yP="gear",dg=Object.freeze(Object.defineProperty({__proto__:null,bold:vP,default:E8,duotone:bP,fill:gP,glyphName:yP,light:mP,regular:E8,thin:_P},Symbol.toStringTag,{value:"Module"})),$a=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},wP=$a("arrow-circle-up","0 0 256 256",'<path d="M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm34.83-102.83a4,4,0,0,1-5.66,5.66L132,97.66V168a4,4,0,0,1-8,0V97.66L98.83,122.83a4,4,0,0,1-5.66-5.66l32-32a4,4,0,0,1,5.66,0Z"/>'),SP=$a("arrow-circle-up","0 0 256 256",'<path d="M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm36.24-102.24a6,6,0,1,1-8.48,8.48L134,102.49V168a6,6,0,0,1-12,0V102.49l-21.76,21.75a6,6,0,0,1-8.48-8.48l32-32a6,6,0,0,1,8.48,0Z"/>'),pd=$a("arrow-circle-up","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm37.66-101.66a8,8,0,0,1-11.32,11.32L136,107.31V168a8,8,0,0,1-16,0V107.31l-18.34,18.35a8,8,0,0,1-11.32-11.32l32-32a8,8,0,0,1,11.32,0Z"/>'),CP=$a("arrow-circle-up","0 0 256 256",'<path d="M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm40.49-100.49a12,12,0,0,1-17,17L140,117v51a12,12,0,0,1-24,0V117l-11.51,11.52a12,12,0,0,1-17-17l32-32a12,12,0,0,1,17,0Z"/>'),kP=$a("arrow-circle-up","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm37.66,101.66a8,8,0,0,1-11.32,0L136,107.31V168a8,8,0,0,1-16,0V107.31l-18.34,18.35a8,8,0,0,1-11.32-11.32l32-32a8,8,0,0,1,11.32,0l32,32A8,8,0,0,1,165.66,125.66Z"/>'),AP=$a("arrow-circle-up","0 0 256 256",'<path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"/><path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm37.66-101.66a8,8,0,0,1-11.32,11.32L136,107.31V168a8,8,0,0,1-16,0V107.31l-18.34,18.35a8,8,0,0,1-11.32-11.32l32-32a8,8,0,0,1,11.32,0Z"/>'),MP="arrow-circle-up",c2=Object.freeze(Object.defineProperty({__proto__:null,bold:CP,default:pd,duotone:AP,fill:kP,glyphName:MP,light:SP,regular:pd,thin:wP},Symbol.toStringTag,{value:"Module"})),EP="/api";async function yt(e){const t=await fetch(`${EP}${e}`);if(!t.ok)throw new Error(`${t.status} ${t.statusText}`);return t.json()}async function L8(e,t){try{const i=await e.json(),r=i==null?void 0:i.message;if(typeof r=="string"&&r.trim()!=="")return r}catch{}return`${t}: ${e.status}`}const Ie={health:()=>yt("/health"),system:()=>yt("/system"),qr:()=>yt("/qr"),deviceEvents:(e,t=100)=>yt(`/devices/${encodeURIComponent(e)}/events?limit=${t}`),deviceObservations:(e,t=50)=>yt(`/devices/${encodeURIComponent(e)}/observations?limit=${t}`),reportObservation:(e,t)=>fetch(`/api/devices/${encodeURIComponent(e)}/observations`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).then(async i=>{if(!i.ok)throw new Error((await i.json()).error??`HTTP ${i.status}`);return i.json()}),plugins:()=>yt("/plugins"),pluginsRefresh:()=>fetch("/api/plugins/refresh",{method:"POST"}).then(e=>e.json()),plugin:e=>yt(`/plugins/${e}`),setPluginDisabled:(e,t)=>fetch(`/api/plugins/${e}/disabled`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({disabled:t})}).then(i=>{if(!i.ok)throw new Error(`Set disabled failed: ${i.status}`);return i.json()}),bridge:()=>yt("/bridge"),saveBridge:e=>fetch("/api/bridge",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).then(t=>{if(!t.ok)throw new Error(`Save failed: ${t.status}`);return t.json()}),accessories:()=>yt("/accessories"),devices:()=>yt("/devices"),controlDevice:(e,t,i)=>fetch(`/api/devices/${encodeURIComponent(e)}/control`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({control:t,value:i})}).then(r=>{if(!r.ok)throw new Error(`Control failed: ${r.status}`);return r.json()}),renameDevice:(e,t)=>fetch(`/api/devices/${encodeURIComponent(e)}/rename`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t})}).then(i=>{if(!i.ok)throw new Error(`Rename failed: ${i.status}`);return i.json()}),deviceHistory:(e,t,i)=>{const r=new URLSearchParams({period:t});return i&&r.set("date",i),yt(`/devices/${encodeURIComponent(e)}/history?${r}`)},deviceMetrics:(e,t={})=>{const i=new URLSearchParams;t.metric&&i.set("metric",t.metric),t.from!==void 0&&i.set("from",String(t.from)),t.to!==void 0&&i.set("to",String(t.to)),t.maxPoints!==void 0&&i.set("maxPoints",String(t.maxPoints));const r=i.toString();return yt(`/devices/${encodeURIComponent(e)}/metrics${r?`?${r}`:""}`)},homekitHidden:()=>yt("/homekit/hidden"),setHomekitVisibility:(e,t)=>fetch(`/api/homekit/visibility/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({visible:t})}).then(i=>{if(!i.ok)throw new Error(`Visibility change failed: ${i.status}`);return i.json()}),deviceAccessory:e=>yt(`/devices/${encodeURIComponent(e)}/accessory`),homekitServiceTypes:()=>yt("/homekit/service-types"),setHomekitServiceType:(e,t,i)=>fetch(`/api/homekit/service-type/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serviceUuid:t,type:i})}).then(async r=>{var n;if(!r.ok)throw new Error(((n=await r.json().catch(()=>null))==null?void 0:n.message)??`Type change failed: ${r.status}`);return r.json()}),setCharacteristic:(e,t,i,r)=>fetch(`/api/accessories/${e}/characteristics`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({serviceUuid:t,charUuid:i,value:r})}).then(n=>{if(!n.ok)throw new Error(`Set failed: ${n.status}`);return n.json()}),logs:(e,t=200)=>{const i=new URLSearchParams({limit:String(t)});return e&&i.set("plugin",e),yt(`/logs?${i}`)},pluginTelemetry:e=>yt(`/plugins/${encodeURIComponent(e)}/telemetry`),config:{get:()=>yt("/config"),save:e=>fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e})}).then(t=>{if(!t.ok)throw new Error(`Save failed: ${t.status}`);return t.json()}),getPlatform:e=>yt(`/config/platform/${encodeURIComponent(e)}`),savePlatform:e=>fetch("/api/config/platform",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({platform:e})}).then(t=>{if(!t.ok)throw new Error(`Save failed: ${t.status}`);return t.json()}),getHbPlugin:(e,t)=>yt(`/config/hb-plugin/${encodeURIComponent(e)}${t?`?packageName=${encodeURIComponent(t)}`:""}`),saveHbPlugin:(e,t,i)=>fetch("/api/config/hb-plugin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,packageName:i,config:t})}).then(r=>{if(!r.ok)throw new Error(`Save failed: ${r.status}`);return r.json()}),getPlugin:e=>yt(`/config/plugin/${encodeURIComponent(e)}`),savePlugin:(e,t)=>fetch("/api/config/plugin",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e,config:t})}).then(i=>{if(!i.ok)throw new Error(`Save failed: ${i.status}`);return i.json()})},pluginInfo:e=>yt(`/marketplace/plugin-info/${encodeURIComponent(e)}`),daemon:{restart:()=>fetch("/api/daemon/restart",{method:"POST"}).then(e=>{if(!e.ok)throw new Error(`Restart failed: ${e.status}`);return e.json()})},updates:{check:()=>yt("/updates/check"),apply:()=>fetch("/api/updates/apply",{method:"POST"}).then(async e=>{if(!e.ok)throw new Error(await L8(e,"Update failed"));return e.json()}),rollback:()=>fetch("/api/updates/rollback",{method:"POST"}).then(async e=>{if(!e.ok)throw new Error(await L8(e,"Rollback failed"));return e.json()})},marketplace:{search:(e="",t=0,i=20)=>{const r=new URLSearchParams({q:e,from:String(t),size:String(i)});return yt(`/marketplace/search?${r}`)},enriched:e=>fetch(`/api/marketplace/enriched/${encodeURIComponent(e)}`).then(t=>t.ok?t.json():Promise.reject(new Error(`Enrichment failed: ${t.status}`))),installed:()=>yt("/marketplace/installed"),local:()=>yt("/marketplace/local"),install:e=>fetch("/api/marketplace/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({package:e})}).then(t=>{if(!t.ok)throw new Error(`Install failed: ${t.status}`);return t.json()}),update:e=>fetch(`/api/marketplace/update/${encodeURIComponent(e)}`,{method:"POST"}).then(t=>{if(!t.ok)throw new Error(`Update failed: ${t.status}`);return t.json()}),uninstall:e=>fetch(`/api/marketplace/uninstall/${encodeURIComponent(e)}`,{method:"DELETE"}).then(t=>{if(!t.ok)throw new Error(`Uninstall failed: ${t.status}`);return t.json()})}},Un=Wc("daemon",()=>{const e=q(null),t=q([]),i=q([]),r=q([]),n=q(!1),s=q(null),a=q(!1),l=j(()=>t.value.filter(S=>S.status==="running").length),o=j(()=>t.value.filter(S=>S.status==="error").length);async function c(){try{e.value=await Ie.health(),a.value=!0,s.value=null}catch{a.value=!1,e.value=null}}async function u(){n.value=!0;try{const S=await Ie.plugins();t.value=S.plugins}catch(S){s.value=String(S)}finally{n.value=!1}}async function d(){try{const S=await Ie.accessories();i.value=S.accessories}catch{}}async function h(S){try{const _=await Ie.logs(S);r.value=_.entries}catch(_){s.value=String(_)}}let f=null;function v(){if(f)return;const S=location.protocol==="https:"?"wss:":"ws:";f=new WebSocket(`${S}//${location.host}/ws/logs`),f.onmessage=_=>{if(!document.hidden)try{const w=JSON.parse(_.data);r.value.push(w),r.value.length>500&&r.value.shift()}catch{}},f.onclose=()=>{f=null,setTimeout(v,3e3)}}function p(){f==null||f.close(),f=null}return{health:e,plugins:t,accessories:i,logs:r,loading:n,error:s,connected:a,runningCount:l,errorCount:o,fetchHealth:c,fetchPlugins:u,fetchAccessories:d,fetchLogs:h,connectLiveLogs:v,disconnectLiveLogs:p}}),$8=Object.freeze(Object.defineProperty({__proto__:null,useDaemonStore:Un},Symbol.toStringTag,{value:"Module"})),Uo=Wc("inspector",()=>{const e=q(!1),t=q("plugin"),i=q(null),r=q(null);function n(c){i.value=c,r.value=null,t.value="plugin",e.value=!0}function s(){i.value=null,r.value=null,t.value="marketplace",e.value=!0}function a(c){r.value=c,i.value=null,t.value="device",e.value=!0}function l(c){r.value&&t.value==="device"&&(c.kind==="native"&&r.value.kind==="native"?c.dev.id===r.value.dev.id&&(r.value=c):c.kind==="hap"&&r.value.kind==="hap"&&c.acc.uuid===r.value.acc.uuid&&(r.value=c))}function o(){e.value=!1,i.value=null,r.value=null}return{visible:e,mode:t,selectedPlugin:i,selectedDevice:r,openPlugin:n,openMarketplace:s,openDevice:a,updateDevice:l,close:o}}),ws=Wc("layout",()=>{const e=q(""),t=q(null),i=q(!1);function r(n,s,a){e.value=n,t.value=s??null,i.value=(a==null?void 0:a.fullBleed)??!1}return{title:e,count:t,fullBleed:i,setPage:r}});function y0(e){return(e==null?void 0:e.authOrigin)??(e==null?void 0:e.issuer)??null}const LP="openbridge_platform_state",x8="openbridge_platform_expected_sub",ju="openbridge_last_account",Yn=q(null),Xn=q(null),Tl=q(!1);function Wo(){async function e(){if(Xn.value)return Xn.value;const p=await fetch("/auth/platform/config");if(!p.ok){const _={enabled:!1,issuer:null,appId:null};return Xn.value=_,_}const S=await p.json();return Xn.value=S,S}function t(){try{const p=localStorage.getItem(ju);if(!p)return null;const S=JSON.parse(p);return S.sub&&S.email?S:null}catch{return null}}function i(p){try{localStorage.setItem(ju,JSON.stringify(p))}catch{}}function r(){try{localStorage.removeItem(ju)}catch{}}async function n(){if(!(await e()).enabled)return Yn.value=null,Tl.value=!0,!0;try{const S=await fetch("/auth/me",{credentials:"include"});if(!S.ok)return Yn.value=null,Tl.value=!0,!1;const _=await S.json();return Yn.value=_.user,i({sub:_.user.id,email:_.user.email}),Tl.value=!0,!0}catch{return Yn.value=null,Tl.value=!0,!1}}async function s(p={}){const S=await e(),_=y0(S);if(!S.enabled||!_)return;const w=S.appId??"openbridge",C=Array.from(crypto.getRandomValues(new Uint8Array(16))).map(T=>T.toString(16).padStart(2,"0")).join("");sessionStorage.setItem(LP,C),p.expectedSub?sessionStorage.setItem(x8,p.expectedSub):sessionStorage.removeItem(x8);const g=`${window.location.origin}/auth/callback`,E=new URL(`${_}/api/auth/sso`);E.searchParams.set("app_id",w),E.searchParams.set("redirect_uri",g),E.searchParams.set("state",C),p.prompt&&E.searchParams.set("prompt",p.prompt),p.loginHint&&E.searchParams.set("login_hint",p.loginHint),window.location.href=E.toString()}async function a(){const p=t();return p?(await s({loginHint:p.email,expectedSub:p.sub}),!0):!1}async function l(p){await s({loginHint:p})}async function o(){await s({prompt:"login"})}async function c(){await s({prompt:"select_account"})}async function u(){const p=await e(),S=y0(p);if(!p.enabled||!S)return[];try{const _=await fetch(`${S}/api/auth/identities`,{credentials:"include"});return _.ok?(await _.json()).identities??[]:[]}catch{return[]}}async function d(p){const S=await e(),_=y0(S);if(!S.enabled||!_)return!1;try{return(await fetch(`${_}/api/auth/identities/remove`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({user_id:p})})).ok}catch{return!1}}async function h(){await fetch("/auth/logout",{method:"POST",credentials:"include"}).catch(()=>null),Yn.value=null,r(),window.location.href="/login?logged_out=1"}async function f(){await fetch("/auth/logout",{method:"POST",credentials:"include"}).catch(()=>null),Yn.value=null,r();const p=Xn.value,S=y0(p);if(p!=null&&p.enabled&&S&&p.appId){const _=`${window.location.origin}/login?logged_out=1`,w=new URL("/api/auth/sso/end-session",S);w.searchParams.set("app_id",p.appId),w.searchParams.set("post_logout_redirect_uri",_),window.location.href=w.toString();return}window.location.href="/login?logged_out=1"}const v=j(()=>{var S;const p=(S=Xn.value)==null?void 0:S.issuer;if(!p)return!1;try{const _=new URL(p).hostname;return _==="nubisco.io"||_.endsWith(".nubisco.io")}catch{return!1}});return{user:Yn,config:Xn,ready:Tl,isNubiscoPlatform:v,loadConfig:e,checkAuth:n,startPlatformLogin:s,resumeLastAccount:a,switchAccount:l,addAccount:o,chooseAccount:c,listIdentities:u,removeIdentity:d,getLastAccount:t,clearLastAccount:r,logout:h,logoutEverywhere:f}}const xa=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},$P=xa("puzzle-piece","0 0 256 256",'<path d="M218.14,161.93a4,4,0,0,0-3.86-.24,24,24,0,0,1-34.23-23.25,24,24,0,0,1,34.23-20.13A4,4,0,0,0,220,114.7V72a12,12,0,0,0-12-12H167a32,32,0,1,0-62.91-10.33A32.57,32.57,0,0,0,105,60H64A12,12,0,0,0,52,72v37a32,32,0,1,0-10.33,62.91A32.28,32.28,0,0,0,52,171v37a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V165.31A4,4,0,0,0,218.14,161.93ZM212,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V165.31a4,4,0,0,0-1.86-3.38,4,4,0,0,0-3.85-.24,24,24,0,0,1-34.24-20.13,24,24,0,0,1,34.24-23.25A4,4,0,0,0,60,114.7V72a4,4,0,0,1,4-4h46.69a4,4,0,0,0,3.62-5.71,24,24,0,0,1,20.13-34.24,24,24,0,0,1,23.25,34.24A4,4,0,0,0,161.31,68H208a4,4,0,0,1,4,4v37a32.57,32.57,0,0,0-10.33-.94A32,32,0,1,0,212,171Z"/>'),xP=xa("puzzle-piece","0 0 256 256",'<path d="M219.21,160.24a6,6,0,0,0-5.78-.35,22,22,0,1,1-11.05-41.83,22.15,22.15,0,0,1,11.05,2.06A6,6,0,0,0,222,114.7V72a14,14,0,0,0-14-14H169.48a35,35,0,0,0,.52-6,34.1,34.1,0,0,0-10.73-24.78,33.64,33.64,0,0,0-25.45-9.15A34,34,0,0,0,102.54,58H64A14,14,0,0,0,50,72v34.53a34,34,0,0,0-30.79,10.2,34,34,0,0,0,22.31,57.18,34.34,34.34,0,0,0,8.48-.44V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V165.31A6,6,0,0,0,219.21,160.24ZM210,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V165.31a6,6,0,0,0-6-6,5.92,5.92,0,0,0-2.57.58,22,22,0,0,1-31.38-18.46,22,22,0,0,1,31.38-21.31A6,6,0,0,0,62,114.7V72a2,2,0,0,1,2-2h46.69a6,6,0,0,0,5.42-8.57,22.25,22.25,0,0,1-2-11,22,22,0,1,1,41.83,11A6,6,0,0,0,161.3,70H208a2,2,0,0,1,2,2v34.54a34,34,0,0,0-39.93,31.28,33.71,33.71,0,0,0,9.14,25.45A34.15,34.15,0,0,0,210,173.48Z"/>'),ms=xa("puzzle-piece","0 0 256 256",'<path d="M220.27,158.54a8,8,0,0,0-7.7-.46,20,20,0,1,1,0-36.16A8,8,0,0,0,224,114.69V72a16,16,0,0,0-16-16H171.78a35.36,35.36,0,0,0,.22-4,36.11,36.11,0,0,0-11.36-26.24,36,36,0,0,0-60.55,23.62,36.56,36.56,0,0,0,.14,6.62H64A16,16,0,0,0,48,72v32.22a35.36,35.36,0,0,0-4-.22,36.12,36.12,0,0,0-26.24,11.36,35.7,35.7,0,0,0-9.69,27,36.08,36.08,0,0,0,33.31,33.6,35.68,35.68,0,0,0,6.62-.14V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V165.31A8,8,0,0,0,220.27,158.54ZM208,208H64V165.31a8,8,0,0,0-11.43-7.23,20,20,0,1,1,0-36.16A8,8,0,0,0,64,114.69V72h46.69a8,8,0,0,0,7.23-11.43,20,20,0,1,1,36.16,0A8,8,0,0,0,161.31,72H208v32.23a35.68,35.68,0,0,0-6.62-.14A36,36,0,0,0,204,176a35.36,35.36,0,0,0,4-.22Z"/>'),TP=xa("puzzle-piece","0 0 256 256",'<path d="M222.41,155.16a12,12,0,0,0-11.56-.69A16,16,0,0,1,188,139,16.2,16.2,0,0,1,202.8,124a15.83,15.83,0,0,1,8,1.5A12,12,0,0,0,228,114.7V72a20,20,0,0,0-20-20H176a40.15,40.15,0,0,0-12.62-29.16,39.67,39.67,0,0,0-29.94-10.76,40.08,40.08,0,0,0-37.34,37C96,50.07,96,51,96,52H64A20,20,0,0,0,44,72v28a40.15,40.15,0,0,0-29.16,12.62A40,40,0,0,0,41.1,179.9a28.3,28.3,0,0,0,2.9.1v28a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V165.31A12,12,0,0,0,222.41,155.16ZM204,204H68V165.31a12,12,0,0,0-17.15-10.84A15.9,15.9,0,0,1,42.8,156,16.2,16.2,0,0,1,28,141.06a16,16,0,0,1,22.82-15.52A12,12,0,0,0,68,114.7V76h42.7a12,12,0,0,0,10.83-17.15A15.9,15.9,0,0,1,120,50.8,16.19,16.19,0,0,1,134.94,36a16,16,0,0,1,15.53,22.81A12,12,0,0,0,161.31,76H204v24c-1,0-1.93,0-2.9.11A40,40,0,0,0,204,180h0Z"/>'),HP=xa("puzzle-piece","0 0 256 256",'<path d="M165.78,224H208a16,16,0,0,0,16-16V170.35A8,8,0,0,0,212.94,163a23.37,23.37,0,0,1-8.94,1.77c-13.23,0-24-11.1-24-24.73s10.77-24.73,24-24.73a23.37,23.37,0,0,1,8.94,1.77A8,8,0,0,0,224,109.65V72a16,16,0,0,0-16-16H171.78a35.36,35.36,0,0,0,.22-4,36,36,0,0,0-72,0,35.36,35.36,0,0,0,.22,4H64A16,16,0,0,0,48,72v32.22a35.36,35.36,0,0,0-4-.22,36,36,0,0,0,0,72,35.36,35.36,0,0,0,4-.22V208a16,16,0,0,0,16,16h42.22"/>'),NP=xa("puzzle-piece","0 0 256 256",'<path d="M204,168a28,28,0,0,0,12-2.69V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V165.31a28,28,0,1,1,0-50.62V72a8,8,0,0,1,8-8h46.69a28,28,0,1,1,50.61,0H208a8,8,0,0,1,8,8v42.69A28,28,0,1,0,204,168Z" opacity="0.2"/><path d="M220.27,158.54a8,8,0,0,0-7.7-.46,20,20,0,1,1,0-36.16A8,8,0,0,0,224,114.69V72a16,16,0,0,0-16-16H171.78a35.36,35.36,0,0,0,.22-4,36.15,36.15,0,0,0-11.36-26.25,36,36,0,0,0-60.55,23.63,36.56,36.56,0,0,0,.14,6.62H64A16,16,0,0,0,48,72v32.22a35.36,35.36,0,0,0-4-.22,36.12,36.12,0,0,0-26.24,11.36,35.7,35.7,0,0,0-9.69,27,36.08,36.08,0,0,0,33.31,33.6,36.56,36.56,0,0,0,6.62-.14V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V165.31A8,8,0,0,0,220.27,158.54ZM208,208H64V165.31a8,8,0,0,0-11.43-7.23,20,20,0,1,1,0-36.16A8,8,0,0,0,64,114.69V72h46.69a8,8,0,0,0,7.23-11.43,20,20,0,1,1,36.16,0A8,8,0,0,0,161.31,72H208v32.23a35.68,35.68,0,0,0-6.62-.14A36,36,0,0,0,204,176a35.36,35.36,0,0,0,4-.22Z"/>'),PP="puzzle-piece",OP=Object.freeze(Object.defineProperty({__proto__:null,bold:TP,default:ms,duotone:NP,fill:HP,glyphName:PP,light:xP,regular:ms,thin:$P},Symbol.toStringTag,{value:"Module"})),Ta=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},RP=Ta("spinner","0 0 256 256",'<path d="M132,32V64a4,4,0,0,1-8,0V32a4,4,0,0,1,8,0Zm41.25,54.75a4,4,0,0,0,2.83-1.18L198.71,63a4,4,0,0,0-5.66-5.66L170.43,79.92a4,4,0,0,0,2.82,6.83ZM224,124H192a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8Zm-47.92,46.43a4,4,0,1,0-5.65,5.65l22.62,22.63a4,4,0,0,0,5.66-5.66ZM128,188a4,4,0,0,0-4,4v32a4,4,0,0,0,8,0V192A4,4,0,0,0,128,188ZM79.92,170.43,57.29,193.05A4,4,0,0,0,63,198.71l22.62-22.63a4,4,0,1,0-5.65-5.65ZM68,128a4,4,0,0,0-4-4H32a4,4,0,0,0,0,8H64A4,4,0,0,0,68,128ZM63,57.29A4,4,0,0,0,57.29,63L79.92,85.57a4,4,0,1,0,5.65-5.65Z"/>'),IP=Ta("spinner","0 0 256 256",'<path d="M134,32V64a6,6,0,0,1-12,0V32a6,6,0,0,1,12,0Zm39.25,56.75A6,6,0,0,0,177.5,87l22.62-22.63a6,6,0,0,0-8.48-8.48L169,78.5a6,6,0,0,0,4.24,10.25ZM224,122H192a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12Zm-46.5,47A6,6,0,0,0,169,177.5l22.63,22.62a6,6,0,0,0,8.48-8.48ZM128,186a6,6,0,0,0-6,6v32a6,6,0,0,0,12,0V192A6,6,0,0,0,128,186ZM78.5,169,55.88,191.64a6,6,0,1,0,8.48,8.48L87,177.5A6,6,0,1,0,78.5,169ZM70,128a6,6,0,0,0-6-6H32a6,6,0,0,0,0,12H64A6,6,0,0,0,70,128ZM64.36,55.88a6,6,0,0,0-8.48,8.48L78.5,87A6,6,0,1,0,87,78.5Z"/>'),Js=Ta("spinner","0 0 256 256",'<path d="M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"/>'),DP=Ta("spinner","0 0 256 256",'<path d="M140,32V64a12,12,0,0,1-24,0V32a12,12,0,0,1,24,0Zm33.25,62.75a12,12,0,0,0,8.49-3.52L204.37,68.6a12,12,0,0,0-17-17L164.77,74.26a12,12,0,0,0,8.48,20.49ZM224,116H192a12,12,0,0,0,0,24h32a12,12,0,0,0,0-24Zm-42.26,48.77a12,12,0,1,0-17,17l22.63,22.63a12,12,0,0,0,17-17ZM128,180a12,12,0,0,0-12,12v32a12,12,0,0,0,24,0V192A12,12,0,0,0,128,180ZM74.26,164.77,51.63,187.4a12,12,0,0,0,17,17l22.63-22.63a12,12,0,1,0-17-17ZM76,128a12,12,0,0,0-12-12H32a12,12,0,0,0,0,24H64A12,12,0,0,0,76,128ZM68.6,51.63a12,12,0,1,0-17,17L74.26,91.23a12,12,0,0,0,17-17Z"/>'),VP=Ta("spinner","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm33.94,58.75,17-17a8,8,0,0,1,11.32,11.32l-17,17a8,8,0,0,1-11.31-11.31ZM48,136a8,8,0,0,1,0-16H72a8,8,0,0,1,0,16Zm46.06,37.25-17,17a8,8,0,0,1-11.32-11.32l17-17a8,8,0,0,1,11.31,11.31Zm0-79.19a8,8,0,0,1-11.31,0l-17-17A8,8,0,0,1,77.09,65.77l17,17A8,8,0,0,1,94.06,94.06ZM136,208a8,8,0,0,1-16,0V184a8,8,0,0,1,16,0Zm0-136a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Zm54.23,118.23a8,8,0,0,1-11.32,0l-17-17a8,8,0,0,1,11.31-11.31l17,17A8,8,0,0,1,190.23,190.23ZM208,136H184a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16Z"/>'),ZP=Ta("spinner","0 0 256 256",'<path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"/><path d="M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"/>'),BP="spinner",Lo=Object.freeze(Object.defineProperty({__proto__:null,bold:DP,default:Js,duotone:ZP,fill:VP,glyphName:BP,light:IP,regular:Js,thin:RP},Symbol.toStringTag,{value:"Module"})),Ha=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},FP=Ha("floppy-disk","0 0 256 256",'<path d="M216.49,74.83,181.17,39.51A11.93,11.93,0,0,0,172.69,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V83.31A11.93,11.93,0,0,0,216.49,74.83ZM172,212H84V152a4,4,0,0,1,4-4h80a4,4,0,0,1,4,4Zm40-4a4,4,0,0,1-4,4H180V152a12,12,0,0,0-12-12H88a12,12,0,0,0-12,12v60H48a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4H172.69a4,4,0,0,1,2.82,1.17l35.32,35.32A4,4,0,0,1,212,83.31ZM156,72a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h56A4,4,0,0,1,156,72Z"/>'),zP=Ha("floppy-disk","0 0 256 256",'<path d="M217.9,73.42,182.58,38.1a13.9,13.9,0,0,0-9.89-4.1H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V83.31A13.9,13.9,0,0,0,217.9,73.42ZM170,210H86V152a2,2,0,0,1,2-2h80a2,2,0,0,1,2,2Zm40-2a2,2,0,0,1-2,2H182V152a14,14,0,0,0-14-14H88a14,14,0,0,0-14,14v58H48a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2H172.69a2,2,0,0,1,1.41.58L209.42,81.9a2,2,0,0,1,.58,1.41ZM158,72a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h56A6,6,0,0,1,158,72Z"/>'),T8=Ha("floppy-disk","0 0 256 256",'<path d="M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM168,208H88V152h80Zm40,0H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"/>'),UP=Ha("floppy-disk","0 0 256 256",'<path d="M222.14,69.17,186.83,33.86A19.86,19.86,0,0,0,172.69,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V83.31A19.86,19.86,0,0,0,222.14,69.17ZM164,204H92V160h72Zm40,0H188V156a20,20,0,0,0-20-20H88a20,20,0,0,0-20,20v48H52V52H171l33,33ZM164,84a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h56A12,12,0,0,1,164,84Z"/>'),WP=Ha("floppy-disk","0 0 256 256",'<path d="M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM208,208H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"/>'),jP=Ha("floppy-disk","0 0 256 256",'<path d="M216,83.31V208a8,8,0,0,1-8,8H176V152a8,8,0,0,0-8-8H88a8,8,0,0,0-8,8v64H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H172.69a8,8,0,0,1,5.65,2.34l35.32,35.32A8,8,0,0,1,216,83.31Z" opacity="0.2"/><path d="M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM168,208H88V152h80Zm40,0H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"/>'),KP="floppy-disk",yc=Object.freeze(Object.defineProperty({__proto__:null,bold:UP,default:T8,duotone:jP,fill:WP,glyphName:KP,light:zP,regular:T8,thin:FP},Symbol.toStringTag,{value:"Module"})),Na=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},qP=Na("arrows-clockwise","0 0 256 256",'<path d="M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z"/>'),GP=Na("arrows-clockwise","0 0 256 256",'<path d="M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z"/>'),H8=Na("arrows-clockwise","0 0 256 256",'<path d="M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"/>'),YP=Na("arrows-clockwise","0 0 256 256",'<path d="M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z"/>'),XP=Na("arrows-clockwise","0 0 256 256",'<path d="M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"/>'),JP=Na("arrows-clockwise","0 0 256 256",'<path d="M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z" opacity="0.2"/><path d="M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z"/>'),QP="arrows-clockwise",hs=Object.freeze(Object.defineProperty({__proto__:null,bold:YP,default:H8,duotone:JP,fill:XP,glyphName:QP,light:GP,regular:H8,thin:qP},Symbol.toStringTag,{value:"Module"})),Pa=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},eO=Pa("download","0 0 256 256",'<path d="M236,136v64a12,12,0,0,1-12,12H32a12,12,0,0,1-12-12V136a12,12,0,0,1,12-12H72a4,4,0,0,1,0,8H32a4,4,0,0,0-4,4v64a4,4,0,0,0,4,4H224a4,4,0,0,0,4-4V136a4,4,0,0,0-4-4H184a4,4,0,0,1,0-8h40A12,12,0,0,1,236,136Zm-110.83-5.17a4,4,0,0,0,5.66,0l48-48a4,4,0,1,0-5.66-5.66L132,118.34V24a4,4,0,0,0-8,0v94.34L82.83,77.17a4,4,0,0,0-5.66,5.66ZM196,168a8,8,0,1,0-8,8A8,8,0,0,0,196,168Z"/>'),tO=Pa("download","0 0 256 256",'<path d="M238,136v64a14,14,0,0,1-14,14H32a14,14,0,0,1-14-14V136a14,14,0,0,1,14-14H72a6,6,0,0,1,0,12H32a2,2,0,0,0-2,2v64a2,2,0,0,0,2,2H224a2,2,0,0,0,2-2V136a2,2,0,0,0-2-2H184a6,6,0,0,1,0-12h40A14,14,0,0,1,238,136Zm-114.24-3.76a6,6,0,0,0,8.48,0l48-48a6,6,0,0,0-8.48-8.48L134,113.51V24a6,6,0,0,0-12,0v89.51L84.24,75.76a6,6,0,0,0-8.48,8.48ZM198,168a10,10,0,1,0-10,10A10,10,0,0,0,198,168Z"/>'),N8=Pa("download","0 0 256 256",'<path d="M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H72a8,8,0,0,1,0,16H32v64H224V136H184a8,8,0,0,1,0-16h40A16,16,0,0,1,240,136Zm-117.66-2.34a8,8,0,0,0,11.32,0l48-48a8,8,0,0,0-11.32-11.32L136,108.69V24a8,8,0,0,0-16,0v84.69L85.66,74.34A8,8,0,0,0,74.34,85.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z"/>'),iO=Pa("download","0 0 256 256",'<path d="M71.51,88.49a12,12,0,0,1,17-17L116,99V24a12,12,0,0,1,24,0V99l27.51-27.52a12,12,0,0,1,17,17l-48,48a12,12,0,0,1-17,0ZM224,116H188a12,12,0,0,0,0,24h32v56H36V140H68a12,12,0,0,0,0-24H32a20,20,0,0,0-20,20v64a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V136A20,20,0,0,0,224,116Zm-20,52a16,16,0,1,0-16,16A16,16,0,0,0,204,168Z"/>'),rO=Pa("download","0 0 256 256",'<path d="M74.34,85.66A8,8,0,0,1,85.66,74.34L120,108.69V24a8,8,0,0,1,16,0v84.69l34.34-34.35a8,8,0,0,1,11.32,11.32l-48,48a8,8,0,0,1-11.32,0ZM240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H84.4a4,4,0,0,1,2.83,1.17L111,145A24,24,0,0,0,145,145l23.8-23.8A4,4,0,0,1,171.6,120H224A16,16,0,0,1,240,136Zm-40,32a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z"/>'),nO=Pa("download","0 0 256 256",'<path d="M232,136v64a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V136a8,8,0,0,1,8-8H224A8,8,0,0,1,232,136Z" opacity="0.2"/><path d="M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H72a8,8,0,0,1,0,16H32v64H224V136H184a8,8,0,0,1,0-16h40A16,16,0,0,1,240,136Zm-117.66-2.34a8,8,0,0,0,11.32,0l48-48a8,8,0,0,0-11.32-11.32L136,108.69V24a8,8,0,0,0-16,0v84.69L85.66,74.34A8,8,0,0,0,74.34,85.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z"/>'),sO="download",aO=Object.freeze(Object.defineProperty({__proto__:null,bold:iO,default:N8,duotone:nO,fill:rO,glyphName:sO,light:tO,regular:N8,thin:eO},Symbol.toStringTag,{value:"Module"})),Oa=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},lO=Oa("upload","0 0 256 256",'<path d="M236,136v64a12,12,0,0,1-12,12H32a12,12,0,0,1-12-12V136a12,12,0,0,1,12-12H80a4,4,0,0,1,0,8H32a4,4,0,0,0-4,4v64a4,4,0,0,0,4,4H224a4,4,0,0,0,4-4V136a4,4,0,0,0-4-4H176a4,4,0,0,1,0-8h48A12,12,0,0,1,236,136ZM82.83,74.83,124,33.66V128a4,4,0,0,0,8,0V33.66l41.17,41.17a4,4,0,1,0,5.66-5.66l-48-48a4,4,0,0,0-5.66,0l-48,48a4,4,0,0,0,5.66,5.66ZM196,168a8,8,0,1,0-8,8A8,8,0,0,0,196,168Z"/>'),oO=Oa("upload","0 0 256 256",'<path d="M238,136v64a14,14,0,0,1-14,14H32a14,14,0,0,1-14-14V136a14,14,0,0,1,14-14H80a6,6,0,0,1,0,12H32a2,2,0,0,0-2,2v64a2,2,0,0,0,2,2H224a2,2,0,0,0,2-2V136a2,2,0,0,0-2-2H176a6,6,0,0,1,0-12h48A14,14,0,0,1,238,136ZM84.24,76.24,122,38.49V128a6,6,0,0,0,12,0V38.49l37.76,37.75a6,6,0,0,0,8.48-8.48l-48-48a6,6,0,0,0-8.48,0l-48,48a6,6,0,0,0,8.48,8.48ZM198,168a10,10,0,1,0-10,10A10,10,0,0,0,198,168Z"/>'),P8=Oa("upload","0 0 256 256",'<path d="M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H80a8,8,0,0,1,0,16H32v64H224V136H176a8,8,0,0,1,0-16h48A16,16,0,0,1,240,136ZM85.66,77.66,120,43.31V128a8,8,0,0,0,16,0V43.31l34.34,34.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,77.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z"/>'),cO=Oa("upload","0 0 256 256",'<path d="M188,184a16,16,0,1,1,16-16A16,16,0,0,1,188,184Zm36-68H180a12,12,0,0,0,0,24h40v56H36V140H76a12,12,0,0,0,0-24H32a20,20,0,0,0-20,20v64a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V136A20,20,0,0,0,224,116ZM88.49,80.49,116,53v75a12,12,0,0,0,24,0V53l27.51,27.52a12,12,0,1,0,17-17l-48-48a12,12,0,0,0-17,0l-48,48a12,12,0,1,0,17,17Z"/>'),uO=Oa("upload","0 0 256 256",'<path d="M74.34,77.66a8,8,0,0,1,0-11.32l48-48a8,8,0,0,1,11.32,0l48,48a8,8,0,0,1-11.32,11.32L136,43.31V128a8,8,0,0,1-16,0V43.31L85.66,77.66A8,8,0,0,1,74.34,77.66ZM240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16h68a4,4,0,0,1,4,4v3.46c0,13.45,11,24.79,24.46,24.54A24,24,0,0,0,152,128v-4a4,4,0,0,1,4-4h68A16,16,0,0,1,240,136Zm-40,32a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z"/>'),dO=Oa("upload","0 0 256 256",'<path d="M232,136v64a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V136a8,8,0,0,1,8-8H224A8,8,0,0,1,232,136Z" opacity="0.2"/><path d="M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H80a8,8,0,0,1,0,16H32v64H224V136H176a8,8,0,0,1,0-16h48A16,16,0,0,1,240,136ZM85.66,77.66,120,43.31V128a8,8,0,0,0,16,0V43.31l34.34,34.35a8,8,0,0,0,11.32-11.32l-48-48a8,8,0,0,0-11.32,0l-48,48A8,8,0,0,0,85.66,77.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z"/>'),hO="upload",fO=Object.freeze(Object.defineProperty({__proto__:null,bold:cO,default:P8,duotone:dO,fill:uO,glyphName:hO,light:oO,regular:P8,thin:lO},Symbol.toStringTag,{value:"Module"}));var Ra={},pO=function(){return typeof Promise=="function"&&Promise.prototype&&Promise.prototype.then},hg={},Wi={};let u2;const _O=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];Wi.getSymbolSize=function(t){if(!t)throw new Error('"version" cannot be null or undefined');if(t<1||t>40)throw new Error('"version" should be in range from 1 to 40');return t*4+17};Wi.getSymbolTotalCodewords=function(t){return _O[t]};Wi.getBCHDigit=function(e){let t=0;for(;e!==0;)t++,e>>>=1;return t};Wi.setToSJISFunction=function(t){if(typeof t!="function")throw new Error('"toSJISFunc" is not a valid function.');u2=t};Wi.isKanjiModeEnabled=function(){return typeof u2<"u"};Wi.toSJIS=function(t){return u2(t)};var su={};(function(e){e.L={bit:1},e.M={bit:0},e.Q={bit:3},e.H={bit:2};function t(i){if(typeof i!="string")throw new Error("Param is not a string");switch(i.toLowerCase()){case"l":case"low":return e.L;case"m":case"medium":return e.M;case"q":case"quartile":return e.Q;case"h":case"high":return e.H;default:throw new Error("Unknown EC Level: "+i)}}e.isValid=function(r){return r&&typeof r.bit<"u"&&r.bit>=0&&r.bit<4},e.from=function(r,n){if(e.isValid(r))return r;try{return t(r)}catch{return n}}})(su);function fg(){this.buffer=[],this.length=0}fg.prototype={get:function(e){const t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)===1},put:function(e,t){for(let i=0;i<t;i++)this.putBit((e>>>t-i-1&1)===1)},getLengthInBits:function(){return this.length},putBit:function(e){const t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var mO=fg;function jo(e){if(!e||e<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=e,this.data=new Uint8Array(e*e),this.reservedBit=new Uint8Array(e*e)}jo.prototype.set=function(e,t,i,r){const n=e*this.size+t;this.data[n]=i,r&&(this.reservedBit[n]=!0)};jo.prototype.get=function(e,t){return this.data[e*this.size+t]};jo.prototype.xor=function(e,t,i){this.data[e*this.size+t]^=i};jo.prototype.isReserved=function(e,t){return this.reservedBit[e*this.size+t]};var vO=jo,pg={};(function(e){const t=Wi.getSymbolSize;e.getRowColCoords=function(r){if(r===1)return[];const n=Math.floor(r/7)+2,s=t(r),a=s===145?26:Math.ceil((s-13)/(2*n-2))*2,l=[s-7];for(let o=1;o<n-1;o++)l[o]=l[o-1]-a;return l.push(6),l.reverse()},e.getPositions=function(r){const n=[],s=e.getRowColCoords(r),a=s.length;for(let l=0;l<a;l++)for(let o=0;o<a;o++)l===0&&o===0||l===0&&o===a-1||l===a-1&&o===0||n.push([s[l],s[o]]);return n}})(pg);var _g={};const gO=Wi.getSymbolSize,O8=7;_g.getPositions=function(t){const i=gO(t);return[[0,0],[i-O8,0],[0,i-O8]]};var mg={};(function(e){e.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};const t={N1:3,N2:3,N3:40,N4:10};e.isValid=function(n){return n!=null&&n!==""&&!isNaN(n)&&n>=0&&n<=7},e.from=function(n){return e.isValid(n)?parseInt(n,10):void 0},e.getPenaltyN1=function(n){const s=n.size;let a=0,l=0,o=0,c=null,u=null;for(let d=0;d<s;d++){l=o=0,c=u=null;for(let h=0;h<s;h++){let f=n.get(d,h);f===c?l++:(l>=5&&(a+=t.N1+(l-5)),c=f,l=1),f=n.get(h,d),f===u?o++:(o>=5&&(a+=t.N1+(o-5)),u=f,o=1)}l>=5&&(a+=t.N1+(l-5)),o>=5&&(a+=t.N1+(o-5))}return a},e.getPenaltyN2=function(n){const s=n.size;let a=0;for(let l=0;l<s-1;l++)for(let o=0;o<s-1;o++){const c=n.get(l,o)+n.get(l,o+1)+n.get(l+1,o)+n.get(l+1,o+1);(c===4||c===0)&&a++}return a*t.N2},e.getPenaltyN3=function(n){const s=n.size;let a=0,l=0,o=0;for(let c=0;c<s;c++){l=o=0;for(let u=0;u<s;u++)l=l<<1&2047|n.get(c,u),u>=10&&(l===1488||l===93)&&a++,o=o<<1&2047|n.get(u,c),u>=10&&(o===1488||o===93)&&a++}return a*t.N3},e.getPenaltyN4=function(n){let s=0;const a=n.data.length;for(let o=0;o<a;o++)s+=n.data[o];return Math.abs(Math.ceil(s*100/a/5)-10)*t.N4};function i(r,n,s){switch(r){case e.Patterns.PATTERN000:return(n+s)%2===0;case e.Patterns.PATTERN001:return n%2===0;case e.Patterns.PATTERN010:return s%3===0;case e.Patterns.PATTERN011:return(n+s)%3===0;case e.Patterns.PATTERN100:return(Math.floor(n/2)+Math.floor(s/3))%2===0;case e.Patterns.PATTERN101:return n*s%2+n*s%3===0;case e.Patterns.PATTERN110:return(n*s%2+n*s%3)%2===0;case e.Patterns.PATTERN111:return(n*s%3+(n+s)%2)%2===0;default:throw new Error("bad maskPattern:"+r)}}e.applyMask=function(n,s){const a=s.size;for(let l=0;l<a;l++)for(let o=0;o<a;o++)s.isReserved(o,l)||s.xor(o,l,i(n,o,l))},e.getBestMask=function(n,s){const a=Object.keys(e.Patterns).length;let l=0,o=1/0;for(let c=0;c<a;c++){s(c),e.applyMask(c,n);const u=e.getPenaltyN1(n)+e.getPenaltyN2(n)+e.getPenaltyN3(n)+e.getPenaltyN4(n);e.applyMask(c,n),u<o&&(o=u,l=c)}return l}})(mg);var au={};const Mn=su,w0=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],S0=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];au.getBlocksCount=function(t,i){switch(i){case Mn.L:return w0[(t-1)*4+0];case Mn.M:return w0[(t-1)*4+1];case Mn.Q:return w0[(t-1)*4+2];case Mn.H:return w0[(t-1)*4+3];default:return}};au.getTotalCodewordsCount=function(t,i){switch(i){case Mn.L:return S0[(t-1)*4+0];case Mn.M:return S0[(t-1)*4+1];case Mn.Q:return S0[(t-1)*4+2];case Mn.H:return S0[(t-1)*4+3];default:return}};var vg={},lu={};const no=new Uint8Array(512),wc=new Uint8Array(256);(function(){let t=1;for(let i=0;i<255;i++)no[i]=t,wc[t]=i,t<<=1,t&256&&(t^=285);for(let i=255;i<512;i++)no[i]=no[i-255]})();lu.log=function(t){if(t<1)throw new Error("log("+t+")");return wc[t]};lu.exp=function(t){return no[t]};lu.mul=function(t,i){return t===0||i===0?0:no[wc[t]+wc[i]]};(function(e){const t=lu;e.mul=function(r,n){const s=new Uint8Array(r.length+n.length-1);for(let a=0;a<r.length;a++)for(let l=0;l<n.length;l++)s[a+l]^=t.mul(r[a],n[l]);return s},e.mod=function(r,n){let s=new Uint8Array(r);for(;s.length-n.length>=0;){const a=s[0];for(let o=0;o<n.length;o++)s[o]^=t.mul(n[o],a);let l=0;for(;l<s.length&&s[l]===0;)l++;s=s.slice(l)}return s},e.generateECPolynomial=function(r){let n=new Uint8Array([1]);for(let s=0;s<r;s++)n=e.mul(n,new Uint8Array([1,t.exp(s)]));return n}})(vg);const gg=vg;function d2(e){this.genPoly=void 0,this.degree=e,this.degree&&this.initialize(this.degree)}d2.prototype.initialize=function(t){this.degree=t,this.genPoly=gg.generateECPolynomial(this.degree)};d2.prototype.encode=function(t){if(!this.genPoly)throw new Error("Encoder not initialized");const i=new Uint8Array(t.length+this.degree);i.set(t);const r=gg.mod(i,this.genPoly),n=this.degree-r.length;if(n>0){const s=new Uint8Array(this.degree);return s.set(r,n),s}return r};var bO=d2,bg={},Wn={},h2={};h2.isValid=function(t){return!isNaN(t)&&t>=1&&t<=40};var zr={};const yg="[0-9]+",yO="[A-Z $%*+\\-./:]+";let $o="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";$o=$o.replace(/u/g,"\\u");const wO="(?:(?![A-Z0-9 $%*+\\-./:]|"+$o+`)(?:.|[\r
52
- ]))+`;zr.KANJI=new RegExp($o,"g");zr.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g");zr.BYTE=new RegExp(wO,"g");zr.NUMERIC=new RegExp(yg,"g");zr.ALPHANUMERIC=new RegExp(yO,"g");const SO=new RegExp("^"+$o+"$"),CO=new RegExp("^"+yg+"$"),kO=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");zr.testKanji=function(t){return SO.test(t)};zr.testNumeric=function(t){return CO.test(t)};zr.testAlphanumeric=function(t){return kO.test(t)};(function(e){const t=h2,i=zr;e.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},e.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},e.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},e.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},e.MIXED={bit:-1},e.getCharCountIndicator=function(s,a){if(!s.ccBits)throw new Error("Invalid mode: "+s);if(!t.isValid(a))throw new Error("Invalid version: "+a);return a>=1&&a<10?s.ccBits[0]:a<27?s.ccBits[1]:s.ccBits[2]},e.getBestModeForData=function(s){return i.testNumeric(s)?e.NUMERIC:i.testAlphanumeric(s)?e.ALPHANUMERIC:i.testKanji(s)?e.KANJI:e.BYTE},e.toString=function(s){if(s&&s.id)return s.id;throw new Error("Invalid mode")},e.isValid=function(s){return s&&s.bit&&s.ccBits};function r(n){if(typeof n!="string")throw new Error("Param is not a string");switch(n.toLowerCase()){case"numeric":return e.NUMERIC;case"alphanumeric":return e.ALPHANUMERIC;case"kanji":return e.KANJI;case"byte":return e.BYTE;default:throw new Error("Unknown mode: "+n)}}e.from=function(s,a){if(e.isValid(s))return s;try{return r(s)}catch{return a}}})(Wn);(function(e){const t=Wi,i=au,r=su,n=Wn,s=h2,a=7973,l=t.getBCHDigit(a);function o(h,f,v){for(let p=1;p<=40;p++)if(f<=e.getCapacity(p,v,h))return p}function c(h,f){return n.getCharCountIndicator(h,f)+4}function u(h,f){let v=0;return h.forEach(function(p){const S=c(p.mode,f);v+=S+p.getBitsLength()}),v}function d(h,f){for(let v=1;v<=40;v++)if(u(h,v)<=e.getCapacity(v,f,n.MIXED))return v}e.from=function(f,v){return s.isValid(f)?parseInt(f,10):v},e.getCapacity=function(f,v,p){if(!s.isValid(f))throw new Error("Invalid QR Code version");typeof p>"u"&&(p=n.BYTE);const S=t.getSymbolTotalCodewords(f),_=i.getTotalCodewordsCount(f,v),w=(S-_)*8;if(p===n.MIXED)return w;const C=w-c(p,f);switch(p){case n.NUMERIC:return Math.floor(C/10*3);case n.ALPHANUMERIC:return Math.floor(C/11*2);case n.KANJI:return Math.floor(C/13);case n.BYTE:default:return Math.floor(C/8)}},e.getBestVersionForData=function(f,v){let p;const S=r.from(v,r.M);if(Array.isArray(f)){if(f.length>1)return d(f,S);if(f.length===0)return 1;p=f[0]}else p=f;return o(p.mode,p.getLength(),S)},e.getEncodedBits=function(f){if(!s.isValid(f)||f<7)throw new Error("Invalid QR Code version");let v=f<<12;for(;t.getBCHDigit(v)-l>=0;)v^=a<<t.getBCHDigit(v)-l;return f<<12|v}})(bg);var wg={};const _d=Wi,Sg=1335,AO=21522,R8=_d.getBCHDigit(Sg);wg.getEncodedBits=function(t,i){const r=t.bit<<3|i;let n=r<<10;for(;_d.getBCHDigit(n)-R8>=0;)n^=Sg<<_d.getBCHDigit(n)-R8;return(r<<10|n)^AO};var Cg={};const MO=Wn;function Qs(e){this.mode=MO.NUMERIC,this.data=e.toString()}Qs.getBitsLength=function(t){return 10*Math.floor(t/3)+(t%3?t%3*3+1:0)};Qs.prototype.getLength=function(){return this.data.length};Qs.prototype.getBitsLength=function(){return Qs.getBitsLength(this.data.length)};Qs.prototype.write=function(t){let i,r,n;for(i=0;i+3<=this.data.length;i+=3)r=this.data.substr(i,3),n=parseInt(r,10),t.put(n,10);const s=this.data.length-i;s>0&&(r=this.data.substr(i),n=parseInt(r,10),t.put(n,s*3+1))};var EO=Qs;const LO=Wn,Ku=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function ea(e){this.mode=LO.ALPHANUMERIC,this.data=e}ea.getBitsLength=function(t){return 11*Math.floor(t/2)+6*(t%2)};ea.prototype.getLength=function(){return this.data.length};ea.prototype.getBitsLength=function(){return ea.getBitsLength(this.data.length)};ea.prototype.write=function(t){let i;for(i=0;i+2<=this.data.length;i+=2){let r=Ku.indexOf(this.data[i])*45;r+=Ku.indexOf(this.data[i+1]),t.put(r,11)}this.data.length%2&&t.put(Ku.indexOf(this.data[i]),6)};var $O=ea;const xO=Wn;function ta(e){this.mode=xO.BYTE,typeof e=="string"?this.data=new TextEncoder().encode(e):this.data=new Uint8Array(e)}ta.getBitsLength=function(t){return t*8};ta.prototype.getLength=function(){return this.data.length};ta.prototype.getBitsLength=function(){return ta.getBitsLength(this.data.length)};ta.prototype.write=function(e){for(let t=0,i=this.data.length;t<i;t++)e.put(this.data[t],8)};var TO=ta;const HO=Wn,NO=Wi;function ia(e){this.mode=HO.KANJI,this.data=e}ia.getBitsLength=function(t){return t*13};ia.prototype.getLength=function(){return this.data.length};ia.prototype.getBitsLength=function(){return ia.getBitsLength(this.data.length)};ia.prototype.write=function(e){let t;for(t=0;t<this.data.length;t++){let i=NO.toSJIS(this.data[t]);if(i>=33088&&i<=40956)i-=33088;else if(i>=57408&&i<=60351)i-=49472;else throw new Error("Invalid SJIS character: "+this.data[t]+`
53
- Make sure your charset is UTF-8`);i=(i>>>8&255)*192+(i&255),e.put(i,13)}};var PO=ia,kg={exports:{}};(function(e){var t={single_source_shortest_paths:function(i,r,n){var s={},a={};a[r]=0;var l=t.PriorityQueue.make();l.push(r,0);for(var o,c,u,d,h,f,v,p,S;!l.empty();){o=l.pop(),c=o.value,d=o.cost,h=i[c]||{};for(u in h)h.hasOwnProperty(u)&&(f=h[u],v=d+f,p=a[u],S=typeof a[u]>"u",(S||p>v)&&(a[u]=v,l.push(u,v),s[u]=c))}if(typeof n<"u"&&typeof a[n]>"u"){var _=["Could not find a path from ",r," to ",n,"."].join("");throw new Error(_)}return s},extract_shortest_path_from_predecessor_list:function(i,r){for(var n=[],s=r;s;)n.push(s),i[s],s=i[s];return n.reverse(),n},find_path:function(i,r,n){var s=t.single_source_shortest_paths(i,r,n);return t.extract_shortest_path_from_predecessor_list(s,n)},PriorityQueue:{make:function(i){var r=t.PriorityQueue,n={},s;i=i||{};for(s in r)r.hasOwnProperty(s)&&(n[s]=r[s]);return n.queue=[],n.sorter=i.sorter||r.default_sorter,n},default_sorter:function(i,r){return i.cost-r.cost},push:function(i,r){var n={value:i,cost:r};this.queue.push(n),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return this.queue.length===0}}};e.exports=t})(kg);var OO=kg.exports;(function(e){const t=Wn,i=EO,r=$O,n=TO,s=PO,a=zr,l=Wi,o=OO;function c(_){return unescape(encodeURIComponent(_)).length}function u(_,w,C){const g=[];let E;for(;(E=_.exec(C))!==null;)g.push({data:E[0],index:E.index,mode:w,length:E[0].length});return g}function d(_){const w=u(a.NUMERIC,t.NUMERIC,_),C=u(a.ALPHANUMERIC,t.ALPHANUMERIC,_);let g,E;return l.isKanjiModeEnabled()?(g=u(a.BYTE,t.BYTE,_),E=u(a.KANJI,t.KANJI,_)):(g=u(a.BYTE_KANJI,t.BYTE,_),E=[]),w.concat(C,g,E).sort(function(L,V){return L.index-V.index}).map(function(L){return{data:L.data,mode:L.mode,length:L.length}})}function h(_,w){switch(w){case t.NUMERIC:return i.getBitsLength(_);case t.ALPHANUMERIC:return r.getBitsLength(_);case t.KANJI:return s.getBitsLength(_);case t.BYTE:return n.getBitsLength(_)}}function f(_){return _.reduce(function(w,C){const g=w.length-1>=0?w[w.length-1]:null;return g&&g.mode===C.mode?(w[w.length-1].data+=C.data,w):(w.push(C),w)},[])}function v(_){const w=[];for(let C=0;C<_.length;C++){const g=_[C];switch(g.mode){case t.NUMERIC:w.push([g,{data:g.data,mode:t.ALPHANUMERIC,length:g.length},{data:g.data,mode:t.BYTE,length:g.length}]);break;case t.ALPHANUMERIC:w.push([g,{data:g.data,mode:t.BYTE,length:g.length}]);break;case t.KANJI:w.push([g,{data:g.data,mode:t.BYTE,length:c(g.data)}]);break;case t.BYTE:w.push([{data:g.data,mode:t.BYTE,length:c(g.data)}])}}return w}function p(_,w){const C={},g={start:{}};let E=["start"];for(let T=0;T<_.length;T++){const L=_[T],V=[];for(let P=0;P<L.length;P++){const Y=L[P],W=""+T+P;V.push(W),C[W]={node:Y,lastCount:0},g[W]={};for(let A=0;A<E.length;A++){const $=E[A];C[$]&&C[$].node.mode===Y.mode?(g[$][W]=h(C[$].lastCount+Y.length,Y.mode)-h(C[$].lastCount,Y.mode),C[$].lastCount+=Y.length):(C[$]&&(C[$].lastCount=Y.length),g[$][W]=h(Y.length,Y.mode)+4+t.getCharCountIndicator(Y.mode,w))}}E=V}for(let T=0;T<E.length;T++)g[E[T]].end=0;return{map:g,table:C}}function S(_,w){let C;const g=t.getBestModeForData(_);if(C=t.from(w,g),C!==t.BYTE&&C.bit<g.bit)throw new Error('"'+_+'" cannot be encoded with mode '+t.toString(C)+`.
54
- Suggested mode is: `+t.toString(g));switch(C===t.KANJI&&!l.isKanjiModeEnabled()&&(C=t.BYTE),C){case t.NUMERIC:return new i(_);case t.ALPHANUMERIC:return new r(_);case t.KANJI:return new s(_);case t.BYTE:return new n(_)}}e.fromArray=function(w){return w.reduce(function(C,g){return typeof g=="string"?C.push(S(g,null)):g.data&&C.push(S(g.data,g.mode)),C},[])},e.fromString=function(w,C){const g=d(w,l.isKanjiModeEnabled()),E=v(g),T=p(E,C),L=o.find_path(T.map,"start","end"),V=[];for(let P=1;P<L.length-1;P++)V.push(T.table[L[P]].node);return e.fromArray(f(V))},e.rawSplit=function(w){return e.fromArray(d(w,l.isKanjiModeEnabled()))}})(Cg);const ou=Wi,qu=su,RO=mO,IO=vO,DO=pg,VO=_g,md=mg,vd=au,ZO=bO,Sc=bg,BO=wg,FO=Wn,Gu=Cg;function zO(e,t){const i=e.size,r=VO.getPositions(t);for(let n=0;n<r.length;n++){const s=r[n][0],a=r[n][1];for(let l=-1;l<=7;l++)if(!(s+l<=-1||i<=s+l))for(let o=-1;o<=7;o++)a+o<=-1||i<=a+o||(l>=0&&l<=6&&(o===0||o===6)||o>=0&&o<=6&&(l===0||l===6)||l>=2&&l<=4&&o>=2&&o<=4?e.set(s+l,a+o,!0,!0):e.set(s+l,a+o,!1,!0))}}function UO(e){const t=e.size;for(let i=8;i<t-8;i++){const r=i%2===0;e.set(i,6,r,!0),e.set(6,i,r,!0)}}function WO(e,t){const i=DO.getPositions(t);for(let r=0;r<i.length;r++){const n=i[r][0],s=i[r][1];for(let a=-2;a<=2;a++)for(let l=-2;l<=2;l++)a===-2||a===2||l===-2||l===2||a===0&&l===0?e.set(n+a,s+l,!0,!0):e.set(n+a,s+l,!1,!0)}}function jO(e,t){const i=e.size,r=Sc.getEncodedBits(t);let n,s,a;for(let l=0;l<18;l++)n=Math.floor(l/3),s=l%3+i-8-3,a=(r>>l&1)===1,e.set(n,s,a,!0),e.set(s,n,a,!0)}function Yu(e,t,i){const r=e.size,n=BO.getEncodedBits(t,i);let s,a;for(s=0;s<15;s++)a=(n>>s&1)===1,s<6?e.set(s,8,a,!0):s<8?e.set(s+1,8,a,!0):e.set(r-15+s,8,a,!0),s<8?e.set(8,r-s-1,a,!0):s<9?e.set(8,15-s-1+1,a,!0):e.set(8,15-s-1,a,!0);e.set(r-8,8,1,!0)}function KO(e,t){const i=e.size;let r=-1,n=i-1,s=7,a=0;for(let l=i-1;l>0;l-=2)for(l===6&&l--;;){for(let o=0;o<2;o++)if(!e.isReserved(n,l-o)){let c=!1;a<t.length&&(c=(t[a]>>>s&1)===1),e.set(n,l-o,c),s--,s===-1&&(a++,s=7)}if(n+=r,n<0||i<=n){n-=r,r=-r;break}}}function qO(e,t,i){const r=new RO;i.forEach(function(o){r.put(o.mode.bit,4),r.put(o.getLength(),FO.getCharCountIndicator(o.mode,e)),o.write(r)});const n=ou.getSymbolTotalCodewords(e),s=vd.getTotalCodewordsCount(e,t),a=(n-s)*8;for(r.getLengthInBits()+4<=a&&r.put(0,4);r.getLengthInBits()%8!==0;)r.putBit(0);const l=(a-r.getLengthInBits())/8;for(let o=0;o<l;o++)r.put(o%2?17:236,8);return GO(r,e,t)}function GO(e,t,i){const r=ou.getSymbolTotalCodewords(t),n=vd.getTotalCodewordsCount(t,i),s=r-n,a=vd.getBlocksCount(t,i),l=r%a,o=a-l,c=Math.floor(r/a),u=Math.floor(s/a),d=u+1,h=c-u,f=new ZO(h);let v=0;const p=new Array(a),S=new Array(a);let _=0;const w=new Uint8Array(e.buffer);for(let L=0;L<a;L++){const V=L<o?u:d;p[L]=w.slice(v,v+V),S[L]=f.encode(p[L]),v+=V,_=Math.max(_,V)}const C=new Uint8Array(r);let g=0,E,T;for(E=0;E<_;E++)for(T=0;T<a;T++)E<p[T].length&&(C[g++]=p[T][E]);for(E=0;E<h;E++)for(T=0;T<a;T++)C[g++]=S[T][E];return C}function YO(e,t,i,r){let n;if(Array.isArray(e))n=Gu.fromArray(e);else if(typeof e=="string"){let c=t;if(!c){const u=Gu.rawSplit(e);c=Sc.getBestVersionForData(u,i)}n=Gu.fromString(e,c||40)}else throw new Error("Invalid data");const s=Sc.getBestVersionForData(n,i);if(!s)throw new Error("The amount of data is too big to be stored in a QR Code");if(!t)t=s;else if(t<s)throw new Error(`
55
- The chosen QR Code version cannot contain this amount of data.
56
- Minimum version required to store current data is: `+s+`.
57
- `);const a=qO(t,i,n),l=ou.getSymbolSize(t),o=new IO(l);return zO(o,t),UO(o),WO(o,t),Yu(o,i,0),t>=7&&jO(o,t),KO(o,a),isNaN(r)&&(r=md.getBestMask(o,Yu.bind(null,o,i))),md.applyMask(r,o),Yu(o,i,r),{modules:o,version:t,errorCorrectionLevel:i,maskPattern:r,segments:n}}hg.create=function(t,i){if(typeof t>"u"||t==="")throw new Error("No input text");let r=qu.M,n,s;return typeof i<"u"&&(r=qu.from(i.errorCorrectionLevel,qu.M),n=Sc.from(i.version),s=md.from(i.maskPattern),i.toSJISFunc&&ou.setToSJISFunction(i.toSJISFunc)),YO(t,n,r,s)};var Ag={},f2={};(function(e){function t(i){if(typeof i=="number"&&(i=i.toString()),typeof i!="string")throw new Error("Color should be defined as hex string");let r=i.slice().replace("#","").split("");if(r.length<3||r.length===5||r.length>8)throw new Error("Invalid hex color: "+i);(r.length===3||r.length===4)&&(r=Array.prototype.concat.apply([],r.map(function(s){return[s,s]}))),r.length===6&&r.push("F","F");const n=parseInt(r.join(""),16);return{r:n>>24&255,g:n>>16&255,b:n>>8&255,a:n&255,hex:"#"+r.slice(0,6).join("")}}e.getOptions=function(r){r||(r={}),r.color||(r.color={});const n=typeof r.margin>"u"||r.margin===null||r.margin<0?4:r.margin,s=r.width&&r.width>=21?r.width:void 0,a=r.scale||4;return{width:s,scale:s?4:a,margin:n,color:{dark:t(r.color.dark||"#000000ff"),light:t(r.color.light||"#ffffffff")},type:r.type,rendererOpts:r.rendererOpts||{}}},e.getScale=function(r,n){return n.width&&n.width>=r+n.margin*2?n.width/(r+n.margin*2):n.scale},e.getImageWidth=function(r,n){const s=e.getScale(r,n);return Math.floor((r+n.margin*2)*s)},e.qrToImageData=function(r,n,s){const a=n.modules.size,l=n.modules.data,o=e.getScale(a,s),c=Math.floor((a+s.margin*2)*o),u=s.margin*o,d=[s.color.light,s.color.dark];for(let h=0;h<c;h++)for(let f=0;f<c;f++){let v=(h*c+f)*4,p=s.color.light;if(h>=u&&f>=u&&h<c-u&&f<c-u){const S=Math.floor((h-u)/o),_=Math.floor((f-u)/o);p=d[l[S*a+_]?1:0]}r[v++]=p.r,r[v++]=p.g,r[v++]=p.b,r[v]=p.a}}})(f2);(function(e){const t=f2;function i(n,s,a){n.clearRect(0,0,s.width,s.height),s.style||(s.style={}),s.height=a,s.width=a,s.style.height=a+"px",s.style.width=a+"px"}function r(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}e.render=function(s,a,l){let o=l,c=a;typeof o>"u"&&(!a||!a.getContext)&&(o=a,a=void 0),a||(c=r()),o=t.getOptions(o);const u=t.getImageWidth(s.modules.size,o),d=c.getContext("2d"),h=d.createImageData(u,u);return t.qrToImageData(h.data,s,o),i(d,c,u),d.putImageData(h,0,0),c},e.renderToDataURL=function(s,a,l){let o=l;typeof o>"u"&&(!a||!a.getContext)&&(o=a,a=void 0),o||(o={});const c=e.render(s,a,o),u=o.type||"image/png",d=o.rendererOpts||{};return c.toDataURL(u,d.quality)}})(Ag);var Mg={};const XO=f2;function I8(e,t){const i=e.a/255,r=t+'="'+e.hex+'"';return i<1?r+" "+t+'-opacity="'+i.toFixed(2).slice(1)+'"':r}function Xu(e,t,i){let r=e+t;return typeof i<"u"&&(r+=" "+i),r}function JO(e,t,i){let r="",n=0,s=!1,a=0;for(let l=0;l<e.length;l++){const o=Math.floor(l%t),c=Math.floor(l/t);!o&&!s&&(s=!0),e[l]?(a++,l>0&&o>0&&e[l-1]||(r+=s?Xu("M",o+i,.5+c+i):Xu("m",n,0),n=0,s=!1),o+1<t&&e[l+1]||(r+=Xu("h",a),a=0)):n++}return r}Mg.render=function(t,i,r){const n=XO.getOptions(i),s=t.modules.size,a=t.modules.data,l=s+n.margin*2,o=n.color.light.a?"<path "+I8(n.color.light,"fill")+' d="M0 0h'+l+"v"+l+'H0z"/>':"",c="<path "+I8(n.color.dark,"stroke")+' d="'+JO(a,s,n.margin)+'"/>',u='viewBox="0 0 '+l+" "+l+'"',h='<svg xmlns="http://www.w3.org/2000/svg" '+(n.width?'width="'+n.width+'" height="'+n.width+'" ':"")+u+' shape-rendering="crispEdges">'+o+c+`</svg>
58
- `;return typeof r=="function"&&r(null,h),h};const QO=pO,gd=hg,Eg=Ag,eR=Mg;function p2(e,t,i,r,n){const s=[].slice.call(arguments,1),a=s.length,l=typeof s[a-1]=="function";if(!l&&!QO())throw new Error("Callback required as last argument");if(l){if(a<2)throw new Error("Too few arguments provided");a===2?(n=i,i=t,t=r=void 0):a===3&&(t.getContext&&typeof n>"u"?(n=r,r=void 0):(n=r,r=i,i=t,t=void 0))}else{if(a<1)throw new Error("Too few arguments provided");return a===1?(i=t,t=r=void 0):a===2&&!t.getContext&&(r=i,i=t,t=void 0),new Promise(function(o,c){try{const u=gd.create(i,r);o(e(u,t,r))}catch(u){c(u)}})}try{const o=gd.create(i,r);n(null,e(o,t,r))}catch(o){n(o)}}Ra.create=gd.create;Ra.toCanvas=p2.bind(null,Eg.render);Ra.toDataURL=p2.bind(null,Eg.renderToDataURL);Ra.toString=p2.bind(null,function(e,t,i){return eR.render(e,i)});function D8(e,t){(t==null||t>e.length)&&(t=e.length);for(var i=0,r=Array(t);i<t;i++)r[i]=e[i];return r}function tR(e){if(Array.isArray(e))return e}function iR(e,t,i){return(t=cR(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function rR(e,t){var i=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(i!=null){var r,n,s,a,l=[],o=!0,c=!1;try{if(s=(i=i.call(e)).next,t!==0)for(;!(o=(r=s.call(i)).done)&&(l.push(r.value),l.length!==t);o=!0);}catch(u){c=!0,n=u}finally{try{if(!o&&i.return!=null&&(a=i.return(),Object(a)!==a))return}finally{if(c)throw n}}return l}}function nR(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
59
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function V8(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),i.push.apply(i,r)}return i}function Z8(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?V8(Object(i),!0).forEach(function(r){iR(e,r,i[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):V8(Object(i)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(i,r))})}return e}function sR(e,t){if(e==null)return{};var i,r,n=aR(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(r=0;r<s.length;r++)i=s[r],t.indexOf(i)===-1&&{}.propertyIsEnumerable.call(e,i)&&(n[i]=e[i])}return n}function aR(e,t){if(e==null)return{};var i={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;i[r]=e[r]}return i}function lR(e,t){return tR(e)||rR(e,t)||uR(e,t)||nR()}function oR(e,t){if(typeof e!="object"||!e)return e;var i=e[Symbol.toPrimitive];if(i!==void 0){var r=i.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function cR(e){var t=oR(e,"string");return typeof t=="symbol"?t:t+""}function uR(e,t){if(e){if(typeof e=="string")return D8(e,t);var i={}.toString.call(e).slice(8,-1);return i==="Object"&&e.constructor&&(i=e.constructor.name),i==="Map"||i==="Set"?Array.from(e):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?D8(e,t):void 0}}function dR(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function B8(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),i.push.apply(i,r)}return i}function F8(e){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?B8(Object(i),!0).forEach(function(r){dR(e,r,i[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):B8(Object(i)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(i,r))})}return e}function hR(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return function(r){return t.reduceRight(function(n,s){return s(n)},r)}}function Bl(e){return function t(){for(var i=this,r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];return n.length>=e.length?e.apply(this,n):function(){for(var a=arguments.length,l=new Array(a),o=0;o<a;o++)l[o]=arguments[o];return t.apply(i,[].concat(n,l))}}}function Cc(e){return{}.toString.call(e).includes("Object")}function fR(e){return!Object.keys(e).length}function xo(e){return typeof e=="function"}function pR(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function _R(e,t){return Cc(t)||xn("changeType"),Object.keys(t).some(function(i){return!pR(e,i)})&&xn("changeField"),t}function mR(e){xo(e)||xn("selectorType")}function vR(e){xo(e)||Cc(e)||xn("handlerType"),Cc(e)&&Object.values(e).some(function(t){return!xo(t)})&&xn("handlersType")}function gR(e){e||xn("initialIsRequired"),Cc(e)||xn("initialType"),fR(e)&&xn("initialContent")}function bR(e,t){throw new Error(e[t]||e.default)}var yR={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},xn=Bl(bR)(yR),C0={changes:_R,selector:mR,handler:vR,initial:gR};function wR(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};C0.initial(e),C0.handler(t);var i={current:e},r=Bl(kR)(i,t),n=Bl(CR)(i),s=Bl(C0.changes)(e),a=Bl(SR)(i);function l(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(u){return u};return C0.selector(c),c(i.current)}function o(c){hR(r,n,s,a)(c)}return[l,o]}function SR(e,t){return xo(t)?t(e.current):t}function CR(e,t){return e.current=F8(F8({},e.current),t),t}function kR(e,t,i){return xo(t)?t(e.current):Object.keys(i).forEach(function(r){var n;return(n=t[r])===null||n===void 0?void 0:n.call(t,e.current[r])}),i}var AR={create:wR},MR={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function ER(e){return function t(){for(var i=this,r=arguments.length,n=new Array(r),s=0;s<r;s++)n[s]=arguments[s];return n.length>=e.length?e.apply(this,n):function(){for(var a=arguments.length,l=new Array(a),o=0;o<a;o++)l[o]=arguments[o];return t.apply(i,[].concat(n,l))}}}function LR(e){return{}.toString.call(e).includes("Object")}function $R(e){return e||z8("configIsRequired"),LR(e)||z8("configType"),e.urls?(xR(),{paths:{vs:e.urls.monacoBase}}):e}function xR(){console.warn(Lg.deprecation)}function TR(e,t){throw new Error(e[t]||e.default)}var Lg={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
60
- You are using deprecated way of configuration.
61
-
62
- Instead of using
63
- monaco.config({ urls: { monacoBase: '...' } })
64
- use
65
- monaco.config({ paths: { vs: '...' } })
66
-
67
- For more please check the link https://github.com/suren-atoyan/monaco-loader#config
68
- `},z8=ER(TR)(Lg),HR={config:$R},NR=function(){for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return function(n){return i.reduceRight(function(s,a){return a(s)},n)}};function $g(e,t){return Object.keys(t).forEach(function(i){t[i]instanceof Object&&e[i]&&Object.assign(t[i],$g(e[i],t[i]))}),Z8(Z8({},e),t)}var PR={type:"cancelation",msg:"operation is manually canceled"};function Ju(e){var t=!1,i=new Promise(function(r,n){e.then(function(s){return t?n(PR):r(s)}),e.catch(n)});return i.cancel=function(){return t=!0},i}var OR=["monaco"],RR=AR.create({config:MR,isInitialized:!1,resolve:null,reject:null,monaco:null}),xg=lR(RR,2),Ko=xg[0],cu=xg[1];function IR(e){var t=HR.config(e),i=t.monaco,r=sR(t,OR);cu(function(n){return{config:$g(n.config,r),monaco:i}})}function DR(){var e=Ko(function(t){var i=t.monaco,r=t.isInitialized,n=t.resolve;return{monaco:i,isInitialized:r,resolve:n}});if(!e.isInitialized){if(cu({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Ju(Qu);if(window.monaco&&window.monaco.editor)return Tg(window.monaco),e.resolve(window.monaco),Ju(Qu);NR(VR,BR)(FR)}return Ju(Qu)}function VR(e){return document.body.appendChild(e)}function ZR(e){var t=document.createElement("script");return e&&(t.src=e),t}function BR(e){var t=Ko(function(r){var n=r.config,s=r.reject;return{config:n,reject:s}}),i=ZR("".concat(t.config.paths.vs,"/loader.js"));return i.onload=function(){return e()},i.onerror=t.reject,i}function FR(){var e=Ko(function(i){var r=i.config,n=i.resolve,s=i.reject;return{config:r,resolve:n,reject:s}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(i){var r=i.m||i;Tg(r),e.resolve(r)},function(i){e.reject(i)})}function Tg(e){Ko().monaco||cu({monaco:e})}function zR(){return Ko(function(e){var t=e.monaco;return t})}var Qu=new Promise(function(e,t){return cu({resolve:e,reject:t})}),Hg={config:IR,init:DR,__getMonacoInstance:zR};const UR={key:0,class:"monaco-skeleton"},WR=Re({__name:"MonacoJsonEditor",props:{modelValue:{},height:{}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,r=t,{resolved:n}=Jc(),s=q(null),a=Zr(null),l=q(!1);let o=!1;return lt(async()=>{const c=await Hg.init();s.value&&(De(n,u=>c.editor.setTheme(u==="dark"?"vs-dark":"vs")),a.value=c.editor.create(s.value,{value:i.modelValue,language:"json",theme:n.value==="dark"?"vs-dark":"vs",fontSize:12,fontFamily:'"MesloLGS NF", monospace',minimap:{enabled:!1},scrollBeyondLastLine:!1,lineNumbers:"off",wordWrap:"on",automaticLayout:!0,tabSize:2,folding:!1,renderLineHighlight:"none",overviewRulerLanes:0,scrollbar:{verticalScrollbarSize:6}}),a.value.onDidChangeModelContent(()=>{o||r("update:modelValue",a.value.getValue())}),l.value=!0)}),mi(()=>{var c;(c=a.value)==null||c.dispose()}),De(()=>i.modelValue,c=>{if(!a.value)return;a.value.getValue()!==c&&(o=!0,a.value.setValue(c),o=!1)}),(c,u)=>(m(),M("div",{style:_i({height:`${e.height??220}px`,width:"100%",position:"relative"})},[b("div",{ref_key:"containerEl",ref:s,style:{height:"100%",width:"100%"}},null,512),l.value?z("",!0):(m(),M("div",UR))],4))}}),U8=ii(WR,[["__scopeId","data-v-0c34d464"]]),jR={class:"pcf-root"},KR={key:1,class:"pcf-no-schema"},qR=Re({__name:"PluginConfigForm",props:{hbSchema:{},modelValue:{}},emits:["update:modelValue"],setup(e,{emit:t}){const i=e,r=t;function n(d,h){const f=JSON.parse(JSON.stringify(i.modelValue));let v=f;for(let p=0;p<d.length-1;p++)(v[d[p]]===void 0||typeof v[d[p]]!="object")&&(v[d[p]]={}),v=v[d[p]];v[d[d.length-1]]=h,r("update:modelValue",f)}function s(d){let h=i.modelValue;for(const f of d){if(h==null||typeof h!="object")return;h=h[f]}return h}function a(d){return Array.isArray(d.type)?d.type[0]:d.type??"string"}function l(d,h){const f=s(d)??[],v=h.default??(a(h)==="string"?"":a(h)==="number"?0:"");n(d,[...f,v])}function o(d,h){const f=[...s(d)??[]];f.splice(h,1),n(d,f)}function c(d,h,f){const v=[...s(d)??[]];v[h]=f,n(d,v)}const u=j(()=>i.hbSchema.schema??{type:"object",properties:{}});return(d,h)=>{const f=uo("PluginConfigField");return m(),M("div",jR,[u.value.properties?(m(!0),M(ke,{key:0},Fe(u.value.properties,(v,p)=>{var S;return m(),me(f,{key:p,"field-key":String(p),field:v,path:[String(p)],required:((S=u.value.required)==null?void 0:S.includes(String(p)))??!1,value:s([String(p)]),onChange:_=>n([String(p)],_),onAddArray:h[0]||(h[0]=(_,w)=>l(_,w)),onRemoveArray:h[1]||(h[1]=(_,w)=>o(_,w)),onUpdateArray:h[2]||(h[2]=(_,w,C)=>c(_,w,C))},null,8,["field-key","field","path","required","value","onChange"])}),128)):(m(),M("div",KR,"No configurable fields found in schema."))])}}}),GR=ii(qR,[["__scopeId","data-v-d9cf6b0f"]]),YR={key:0,class:"inspector nb-inspector"},XR={class:"inspector-header"},JR={class:"inspector-title"},QR={class:"inspector-name"},eI={class:"inspector-version"},tI={class:"inspector-body"},iI={class:"field-value"},rI={class:"field-value"},nI={class:"hap-bridge-info"},sI={class:"hap-qr"},aI=["src"],lI={class:"hap-details"},oI={class:"field-value mono"},cI={class:"field-value"},uI={class:"field-value"},dI={key:0,class:"setup-loading"},hI={key:0,class:"platform-tabs"},fI=["onClick"],pI={key:1,class:"visual-editor-wrap"},_I={key:0,class:"json-error"},mI={key:1,class:"json-error"},vI={key:3,class:"save-error"},gI={class:"setup-actions"},bI={key:0,class:"json-error"},yI={key:0,class:"save-error"},wI={class:"setup-actions"},SI={class:"import-export-row"},CI={class:"plugin-device-name"},kI={class:"plugin-device-type"},AI={class:"field-value"},MI={class:"field-value"},EI={class:"field-value"},LI={class:"field-value"},$I={class:"error-text"},xI={class:"plog-time"},TI={class:"plog-msg"},W8="openbridge.pluginInspector.sections",HI=Re({__name:"PluginInspector",setup(e){const t=Un(),i=q(!1),r=q("");async function n(){if(!i.value){i.value=!0;try{await Ie.daemon.restart();let N=0;const I=setInterval(async()=>{N++;try{await Ie.health(),clearInterval(I),location.reload()}catch{}N>60&&(clearInterval(I),i.value=!1)},1e3)}catch{i.value=!1}}}const s=Uo(),a=[{id:"visual",label:"Visual",icon:"sliders"},{id:"json",label:"JSON",icon:"brackets-curly"}],l={status:"default",hap:"default",update:"default",manage:"collapsed",config:"default",transfer:"collapsed",devices:"default",manifest:"collapsed",error:"default",logs:"default"},o=q({...l});try{const N=JSON.parse(localStorage.getItem(W8)??"{}");o.value={...l,...N}}catch{}De(o,N=>localStorage.setItem(W8,JSON.stringify(N)),{deep:!0}),De(()=>{var N,I;return(I=(N=s.selectedPlugin)==null?void 0:N.hapBridge)==null?void 0:I.setupURI},async N=>{if(N)try{r.value=await Ra.toDataURL(N,{width:160,margin:1})}catch{r.value=""}else r.value=""},{immediate:!0});const c=j(()=>{const N=s.selectedPlugin;return N!=null&&N.devices?Object.values(N.devices):[]}),u={switch:"plugs",light:"lamp",thermostat:"thermometer",dehumidifier:"drop",energy_meter:"lightning",gate:"garage",sensor:"pulse"};function d(N){return u[N]??"cube"}const h={idle:"Idle",loading:"Loading",running:"Running",stopped:"Stopped",error:"Error"},f=q(!1);async function v(){if(!(!s.selectedPlugin||f.value)){f.value=!0;try{await Ie.marketplace.update(s.selectedPlugin.manifest.name),await t.fetchPlugins(),await n()}catch(N){console.error("Failed to update plugin:",N)}finally{f.value=!1}}}const p=q(!1),S=q(!1);async function _(){if(!(!s.selectedPlugin||S.value)){S.value=!0;try{await Ie.marketplace.uninstall(s.selectedPlugin.manifest.name),await t.fetchPlugins(),s.close(),await Ie.daemon.restart()}catch(N){console.error("Failed to remove plugin:",N)}finally{S.value=!1,p.value=!1}}}const w=q(!1);async function C(){if(!s.selectedPlugin||w.value)return;const N=!s.selectedPlugin.disabled;w.value=!0;try{const I=await Ie.setPluginDisabled(s.selectedPlugin.id,N);s.selectedPlugin.disabled=I.disabled}catch(I){console.error("Failed to toggle plugin disabled state:",I)}finally{w.value=!1}}const g=q(null),E=q(!1),T=q(""),L=q(""),V=q(!1),P=q(null),Y=q(!1),W=q(null),A=q({}),$=q("visual"),Z=j(()=>{var N;return((N=W.value)==null?void 0:N.schema)!=null}),ie=j(()=>{var N;return((N=s.selectedPlugin)==null?void 0:N.source)==="homebridge"}),ne=j(()=>s.selectedPlugin!=null&&s.selectedPlugin.source!=="homebridge"),ce=q(""),J=q(!1),ae=q(null),re=q(!1),X=j(()=>{try{return JSON.parse(ce.value),!0}catch{return!1}});De(()=>s.selectedPlugin,async N=>{if(ce.value="",ae.value=null,re.value=!1,!(!N||N.source==="homebridge"))try{const I=await Ie.config.getPlugin(N.manifest.name);ce.value=JSON.stringify(I.config??{},null,2)}catch{ce.value="{}"}});const le=q(null);function ve(){var N;(N=le.value)==null||N.click()}function ue(){if(!s.selectedPlugin)return;const N=s.selectedPlugin.manifest.name,I=ie.value?L.value:ce.value;if(!I)return;const R=new Blob([I],{type:"application/json"}),B=URL.createObjectURL(R),K=document.createElement("a");K.href=B,K.download=`${N.replace(/[^a-z0-9-]/gi,"-")}-config.json`,K.click(),URL.revokeObjectURL(B)}async function he(N){var R;const I=(R=N.target.files)==null?void 0:R[0];if(!(!I||!s.selectedPlugin))try{const B=await I.text(),K=JSON.parse(B);let Se;if(K.platform&&typeof K.platform=="string"){const{plugin:Me,...Ve}=K;Se=Ve}else Se=K;await Ie.config.savePlugin(s.selectedPlugin.manifest.name,Se),ie.value?L.value=JSON.stringify(Se,null,2):ce.value=JSON.stringify(Se,null,2),le.value&&(le.value.value="")}catch(B){console.error("Import failed:",B)}}async function ye(){if(J.value||!s.selectedPlugin)return;let N;try{N=JSON.parse(ce.value)}catch{ae.value="Invalid JSON: fix the syntax first";return}J.value=!0,ae.value=null,re.value=!1;try{await Ie.config.savePlugin(s.selectedPlugin.manifest.name,N),re.value=!0,setTimeout(()=>{re.value=!1},3e3)}catch(I){ae.value=String(I)}finally{J.value=!1}}const U=j(()=>{const N=s.selectedPlugin;return!N||N.source!=="homebridge"?"":N.platformName??N.id??N.manifest.name});De(()=>s.selectedPlugin,async N=>{if(g.value=null,T.value="",L.value="",W.value=null,A.value={},P.value=null,Y.value=!1,!(!N||N.source!=="homebridge")){E.value=!0;try{const I=await Ie.config.getHbPlugin(U.value,N.packageName);if(I.config){T.value=U.value,L.value=JSON.stringify(I.config,null,2),A.value=I.config,await fe(N.manifest.name);return}const R=await Ie.pluginInfo(N.packageName??N.manifest.name);g.value=R,R.platforms.length>0&&await ge(R.platforms[0],R.mainFile),await fe(N.manifest.name)}catch{try{const I=await Ie.config.getHbPlugin(U.value,N.packageName);I.config&&(T.value=U.value,L.value=JSON.stringify(I.config,null,2),A.value=I.config)}catch{}}finally{E.value=!1}}});async function fe(N){try{const I=await fetch(`/api/marketplace/plugin-schema/${encodeURIComponent(N)}`);if(I.ok){const R=await I.json();W.value=R.schema}}catch{}}async function ge(N,I){var R,B;T.value=N;try{const K=await Ie.config.getPlatform(N),Se=K.config?K.config:{platform:N,plugin:I??((R=g.value)==null?void 0:R.mainFile)??""};L.value=JSON.stringify(Se,null,2),A.value=Se}catch{const K={platform:N,plugin:I??((B=g.value)==null?void 0:B.mainFile)??""};L.value=JSON.stringify(K,null,2),A.value=K}}function se(N){A.value=N,L.value=JSON.stringify(N,null,2)}function x(N){L.value=N;try{A.value=JSON.parse(N)}catch{}}function H(){try{return JSON.parse(L.value)}catch{return null}}const O=j(()=>H()!==null),ee=j(()=>{const N=H();return N!==null&&typeof N.platform!="string"}),Q=q([]),pe=q(null);let we=null;function y(){if(we&&(we.close(),we=null),!s.selectedPlugin)return;const N=location.protocol==="https:"?"wss:":"ws:";we=new WebSocket(`${N}//${location.host}/ws/logs`),we.onmessage=I=>{var R,B;try{const K=JSON.parse(I.data);(K.plugin===((R=s.selectedPlugin)==null?void 0:R.id)||K.plugin===((B=s.selectedPlugin)==null?void 0:B.manifest.name))&&(Q.value=[...Q.value.slice(-199),K],setTimeout(()=>{pe.value&&(pe.value.scrollTop=pe.value.scrollHeight)},10))}catch{}},we.onclose=()=>{s.selectedPlugin&&setTimeout(y,3e3)}}De(()=>s.selectedPlugin,async N=>{if(Q.value=[],we==null||we.close(),we=null,!!N){try{const I=await Ie.logs(N.manifest.name,100);Q.value=I.entries,setTimeout(()=>{pe.value&&(pe.value.scrollTop=pe.value.scrollHeight)},20)}catch{}y()}}),lt(()=>{s.selectedPlugin&&y()}),mi(()=>{we==null||we.close()});const k={debug:"var(--nb-c-text-muted)",info:"var(--nb-c-info)",warn:"var(--nb-c-warning)",error:"var(--nb-c-danger)"};async function D(){if(V.value||!s.selectedPlugin)return;const N=H();if(!N){P.value="Invalid JSON: fix the syntax first";return}V.value=!0,P.value=null,Y.value=!1;try{const I=s.selectedPlugin;I.source==="homebridge"?await Ie.config.saveHbPlugin(U.value,N,I.packageName):await Ie.config.savePlugin(I.manifest.name,N),Y.value=!0,setTimeout(()=>{Y.value=!1},3e3)}catch(I){P.value=String(I)}finally{V.value=!1}}return(N,I)=>{const R=Ue,B=rv,K=Yc,Se=r2,Me=oi,Ve=Xc,Ye=tH;return de(s).selectedPlugin?(m(),M("div",YR,[b("div",XR,[b("div",{class:Le(["inspector-avatar",de(s).selectedPlugin.status])},[G(R,{name:de(ms),size:24},null,8,["name"])],2),b("div",JR,[b("h2",QR,F(de(s).selectedPlugin.manifest.name),1),b("span",eI,"v"+F(de(s).selectedPlugin.manifest.version),1)])]),b("div",tI,[G(Se,{size:o.value.status,"onUpdate:size":I[0]||(I[0]=Te=>o.value.status=Te),title:"Status",fluid:""},{default:te(()=>[G(B,{label:"Status",control:"fit"},{default:te(()=>[b("span",{class:Le(["status-badge",de(s).selectedPlugin.status])},F(h[de(s).selectedPlugin.status]),3)]),_:1}),de(s).selectedPlugin.startedAt?(m(),me(B,{key:0,label:"Started",control:"fit"},{default:te(()=>[b("span",iI,F(new Date(de(s).selectedPlugin.startedAt).toLocaleString()),1)]),_:1})):z("",!0),de(s).selectedPlugin.stoppedAt?(m(),me(B,{key:1,label:"Stopped",control:"fit"},{default:te(()=>[b("span",rI,F(new Date(de(s).selectedPlugin.stoppedAt).toLocaleString()),1)]),_:1})):z("",!0),G(B,{label:"Disabled",control:"fit"},{default:te(()=>[G(K,{name:`plugin-disabled-${de(s).selectedPlugin.id}`,"model-value":de(s).selectedPlugin.disabled??!1,disabled:w.value,"onUpdate:modelValue":C},null,8,["name","model-value","disabled"])]),_:1})]),_:1},8,["size"]),de(s).selectedPlugin.hapBridge?(m(),me(Se,{key:0,size:o.value.hap,"onUpdate:size":I[1]||(I[1]=Te=>o.value.hap=Te),title:"HomeKit pairing",fluid:""},{default:te(()=>[b("div",nI,[b("div",sI,[r.value?(m(),M("img",{key:0,src:r.value,alt:"HomeKit QR Code",class:"hap-qr-img"},null,8,aI)):z("",!0)]),b("div",lI,[G(B,{label:"PIN",control:"fit"},{default:te(()=>[b("span",oI,F(de(s).selectedPlugin.hapBridge.pincode),1)]),_:1}),G(B,{label:"Port",control:"fit"},{default:te(()=>[b("span",cI,F(de(s).selectedPlugin.hapBridge.port),1)]),_:1}),G(B,{label:"Bridge",control:"fit"},{default:te(()=>[b("span",uI,F(de(s).selectedPlugin.hapBridge.name),1)]),_:1})])]),I[15]||(I[15]=b("p",{class:"hap-hint"},"Scan with the Home app or enter the PIN manually to pair this plugin's devices.",-1))]),_:1},8,["size"])):z("",!0),de(s).selectedPlugin.availableUpdate?(m(),me(Se,{key:1,size:o.value.update,"onUpdate:size":I[2]||(I[2]=Te=>o.value.update=Te),title:"Update",fluid:""},{default:te(()=>[G(Ve,{status:"info",icon:c2,title:`Version ${de(s).selectedPlugin.availableUpdate} is available`},{action:te(()=>[G(Me,{variant:"primary",size:"sm",loading:f.value,disabled:f.value,onClick:v},{default:te(()=>[_e(F(f.value?"Updating...":"Update"),1)]),_:1},8,["loading","disabled"])]),default:te(()=>[_e(" Currently on "+F(de(s).selectedPlugin.manifest.version)+". ",1)]),_:1},8,["title"])]),_:1},8,["size"])):z("",!0),G(Se,{size:o.value.manage,"onUpdate:size":I[5]||(I[5]=Te=>o.value.manage=Te),title:"Manage",fluid:""},{default:te(()=>[p.value?(m(),me(Ve,{key:1,status:"error",title:"This uninstalls the plugin and removes its configuration"},{action:te(()=>[G(Me,{variant:"ghost",size:"sm",onClick:I[4]||(I[4]=Te=>p.value=!1)},{default:te(()=>[...I[17]||(I[17]=[_e("Cancel",-1)])]),_:1}),G(Me,{variant:"primary",size:"sm",loading:S.value,style:{background:"var(--nb-c-danger)","border-color":"var(--nb-c-danger)"},onClick:_},{default:te(()=>[...I[18]||(I[18]=[_e(" Remove ",-1)])]),_:1},8,["loading"])]),default:te(()=>[I[19]||(I[19]=_e(" OpenBridge needs a restart afterwards. ",-1))]),_:1})):(m(),me(Me,{key:0,variant:"ghost",size:"sm",icon:n2,style:{color:"var(--nb-c-danger)"},onClick:I[3]||(I[3]=Te=>p.value=!0)},{default:te(()=>[...I[16]||(I[16]=[_e(" Remove plugin ",-1)])]),_:1}))]),_:1},8,["size"]),ie.value?(m(),me(Se,{key:2,size:o.value.config,"onUpdate:size":I[7]||(I[7]=Te=>o.value.config=Te),title:"Platform config",fluid:""},{default:te(()=>[E.value?(m(),M("div",dI,[G(R,{name:de(Js),size:14},null,8,["name"]),I[20]||(I[20]=_e(" Loading config… ",-1))])):(m(),M(ke,{key:1},[g.value&&g.value.platforms.length>1?(m(),M("div",hI,[(m(!0),M(ke,null,Fe(g.value.platforms,Te=>(m(),M("button",{key:Te,class:Le(["platform-tab",{active:T.value===Te}]),onClick:it=>ge(Te)},F(Te),11,fI))),128))])):g.value&&g.value.platforms.length===0?(m(),me(Ve,{key:1,status:"warning",variant:"callout",title:"No platform detected"},{default:te(()=>[...I[21]||(I[21]=[_e(" Add a ",-1),b("code",null,"platforms[]",-1),_e(" entry manually in Config. ",-1)])]),_:1})):z("",!0),!g.value||g.value.platforms.length>0?(m(),M(ke,{key:2},[Z.value?(m(),me(Ye,{key:0,"model-value":$.value,items:a,variant:"contained",size:"sm","onUpdate:modelValue":I[6]||(I[6]=Te=>$.value=Te)},null,8,["model-value"])):z("",!0),$.value==="visual"&&Z.value?(m(),M("div",pI,[G(GR,{"hb-schema":W.value,"model-value":A.value,"onUpdate:modelValue":se},null,8,["hb-schema","model-value"])])):z("",!0),$.value==="json"||!Z.value?(m(),M("div",{key:2,class:Le(["config-editor-wrap",{invalid:L.value&&!O.value}])},[G(U8,{"model-value":L.value,height:220,"onUpdate:modelValue":x},null,8,["model-value"]),L.value&&!O.value?(m(),M("div",_I,"Invalid JSON")):ee.value?(m(),M("div",mI,'Missing "platform" field')):z("",!0)],2)):z("",!0),P.value?(m(),M("div",vI,[G(R,{name:de(Er),size:13},null,8,["name"]),_e(" "+F(P.value),1)])):z("",!0),b("div",gI,[G(Me,{variant:"primary",size:"sm",loading:V.value,disabled:V.value||!O.value||ee.value,icon:Y.value?In:yc,onClick:D},{default:te(()=>[_e(F(Y.value?"Saved!":"Save config"),1)]),_:1},8,["loading","disabled","icon"]),Y.value?(m(),me(Me,{key:0,variant:"secondary",size:"sm",outlined:"",loading:i.value,icon:i.value?Lo:hs,onClick:n},{default:te(()=>[_e(F(i.value?"Restarting…":"Restart OpenBridge"),1)]),_:1},8,["loading","icon"])):z("",!0)])],64)):z("",!0)],64))]),_:1},8,["size"])):z("",!0),ne.value?(m(),me(Se,{key:3,size:o.value.config,"onUpdate:size":I[9]||(I[9]=Te=>o.value.config=Te),title:"Plugin config",fluid:""},{default:te(()=>[b("div",{class:Le(["config-editor-wrap",{invalid:ce.value&&!X.value}])},[G(U8,{"model-value":ce.value,height:220,"onUpdate:modelValue":I[8]||(I[8]=Te=>ce.value=Te)},null,8,["model-value"]),ce.value&&!X.value?(m(),M("div",bI,"Invalid JSON")):z("",!0)],2),ae.value?(m(),M("div",yI,[G(R,{name:de(Er),size:13},null,8,["name"]),_e(" "+F(ae.value),1)])):z("",!0),b("div",wI,[G(Me,{variant:"primary",size:"sm",loading:J.value,disabled:J.value||!X.value,icon:re.value?In:yc,onClick:ye},{default:te(()=>[_e(F(re.value?"Saved!":"Save config"),1)]),_:1},8,["loading","disabled","icon"]),re.value?(m(),me(Me,{key:0,variant:"secondary",size:"sm",outlined:"",loading:i.value,icon:i.value?Lo:hs,onClick:n},{default:te(()=>[_e(F(i.value?"Restarting…":"Restart OpenBridge"),1)]),_:1},8,["loading","icon"])):z("",!0)])]),_:1},8,["size"])):z("",!0),G(Se,{size:o.value.transfer,"onUpdate:size":I[10]||(I[10]=Te=>o.value.transfer=Te),title:"Import & export",fluid:""},{default:te(()=>[b("div",SI,[G(Me,{variant:"ghost",size:"sm",icon:aO,onClick:ue},{default:te(()=>[...I[22]||(I[22]=[_e("Export config",-1)])]),_:1}),G(Me,{variant:"ghost",size:"sm",icon:fO,onClick:ve},{default:te(()=>[...I[23]||(I[23]=[_e("Import config",-1)])]),_:1}),b("input",{ref_key:"importInput",ref:le,type:"file",accept:".json",style:{display:"none"},onChange:he},null,544)])]),_:1},8,["size"]),c.value.length>0?(m(),me(Se,{key:4,size:o.value.devices,"onUpdate:size":I[11]||(I[11]=Te=>o.value.devices=Te),title:`Devices (${c.value.length})`,fluid:""},{default:te(()=>[(m(!0),M(ke,null,Fe(c.value,Te=>(m(),M("div",{key:Te.id,class:"plugin-device-row"},[G(R,{name:d(Te.widgetType),size:14},null,8,["name"]),b("span",CI,F(Te.name),1),b("span",kI,F(Te.widgetType),1)]))),128))]),_:1},8,["size","title"])):z("",!0),G(Se,{size:o.value.manifest,"onUpdate:size":I[12]||(I[12]=Te=>o.value.manifest=Te),title:"Manifest",fluid:""},{default:te(()=>[G(B,{label:"Name",control:"fit"},{default:te(()=>[b("span",AI,F(de(s).selectedPlugin.manifest.name),1)]),_:1}),G(B,{label:"Version",control:"fit"},{default:te(()=>[b("span",MI,F(de(s).selectedPlugin.manifest.version),1)]),_:1}),de(s).selectedPlugin.manifest.description?(m(),me(B,{key:0,label:"Description",control:"fit"},{default:te(()=>[b("span",EI,F(de(s).selectedPlugin.manifest.description),1)]),_:1})):z("",!0),de(s).selectedPlugin.manifest.author?(m(),me(B,{key:1,label:"Author",control:"fit"},{default:te(()=>[b("span",LI,F(de(s).selectedPlugin.manifest.author),1)]),_:1})):z("",!0)]),_:1},8,["size"]),de(s).selectedPlugin.error?(m(),me(Se,{key:5,size:o.value.error,"onUpdate:size":I[13]||(I[13]=Te=>o.value.error=Te),title:"Error",fluid:""},{default:te(()=>[G(Ve,{status:"error"},{default:te(()=>[b("code",$I,F(de(s).selectedPlugin.error),1)]),_:1})]),_:1},8,["size"])):z("",!0),Q.value.length>0?(m(),me(Se,{key:6,size:o.value.logs,"onUpdate:size":I[14]||(I[14]=Te=>o.value.logs=Te),title:"Recent logs",fluid:""},{default:te(()=>[b("div",{ref_key:"logsEl",ref:pe,class:"plugin-log-terminal"},[(m(!0),M(ke,null,Fe(Q.value,(Te,it)=>(m(),M("div",{key:it,class:"plugin-log-line"},[b("span",xI,F(new Date(Te.timestamp).toLocaleTimeString()),1),b("span",{class:"plog-level",style:_i({color:k[Te.level]})},F(Te.level.toUpperCase()),5),b("span",TI,F(Te.message),1)]))),128))],512)]),_:1},8,["size"])):z("",!0)])])):z("",!0)}}}),NI=ii(HI,[["__scopeId","data-v-b8eb965d"]]),PI=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},j8=PI("arrow-square-out","0 0 256 256",'<path d="M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z"/>'),OI=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},Is=OI("diamond","0 0 256 256",'<path d="M235.33,116.72,139.28,20.66a16,16,0,0,0-22.56,0l-96,96.06a16,16,0,0,0,0,22.56l96.05,96.06h0a16,16,0,0,0,22.56,0l96.05-96.06a16,16,0,0,0,0-22.56ZM128,224h0L32,128,128,32,224,128Z"/>'),RI=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},II=RI("folder","0 0 256 256",'<path d="M216,72H131.31L104,44.69A15.86,15.86,0,0,0,92.69,40H40A16,16,0,0,0,24,56V200.62A15.4,15.4,0,0,0,39.38,216H216.89A15.13,15.13,0,0,0,232,200.89V88A16,16,0,0,0,216,72ZM40,56H92.69l16,16H40ZM216,200H40V88H216Z"/>'),DI=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},VI=DI("cloud-arrow-down","0 0 256 256",'<path d="M248,128a87.34,87.34,0,0,1-17.6,52.81,8,8,0,1,1-12.8-9.62A71.34,71.34,0,0,0,232,128a72,72,0,0,0-144,0,8,8,0,0,1-16,0,88,88,0,0,1,3.29-23.88C74.2,104,73.1,104,72,104a48,48,0,0,0,0,96H96a8,8,0,0,1,0,16H72A64,64,0,1,1,81.29,88.68,88,88,0,0,1,248,128Zm-69.66,42.34L160,188.69V128a8,8,0,0,0-16,0v60.69l-18.34-18.35a8,8,0,0,0-11.32,11.32l32,32a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Z"/>'),ZI=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},BI=ZI("star","0 0 256 256",'<path d="M234.29,114.85l-45,38.83L203,211.75a16.4,16.4,0,0,1-24.5,17.82L128,198.49,77.47,229.57A16.4,16.4,0,0,1,53,211.75l13.76-58.07-45-38.83A16.46,16.46,0,0,1,31.08,86l59-4.76,22.76-55.08a16.36,16.36,0,0,1,30.27,0l22.75,55.08,59,4.76a16.46,16.46,0,0,1,9.37,28.86Z"/>'),FI=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},Ng=FI("book-open","0 0 256 256",'<path d="M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z"/>');let zI=0;function UI(){return`notif-${Date.now()}-${++zI}`}function Pg(){const e=Jv();function t(i,r,n){e.add({id:UI(),variant:i,message:r,title:n==null?void 0:n.title,duration:(n==null?void 0:n.duration)??(i==="error"?6e3:3200)})}return{success:(i,r)=>t("success",i,r),error:(i,r)=>t("error",i,r),warning:(i,r)=>t("warning",i,r),info:(i,r)=>t("info",i,r),dismiss:i=>e.remove(i),clear:()=>e.clear()}}const WI={class:"mp-panel"},jI={class:"mp-header"},KI={class:"mp-search-wrap"},qI={key:0,class:"mp-count"},GI={key:3,class:"mp-local-section"},YI={class:"mp-local-heading"},XI={class:"mp-avatar mp-avatar--ob"},JI={class:"mp-info"},QI={class:"mp-name-row"},eD={class:"mp-name"},tD={class:"badge badge--native"},iD={class:"badge badge--local"},rD={class:"mp-ver"},nD={key:0,class:"mp-desc"},sD={class:"mp-meta"},aD={key:0},lD={class:"mp-action"},oD={class:"mp-list"},cD={key:0,class:"mp-loading"},uD=["src","alt"],dD={class:"mp-info"},hD={class:"mp-name-row"},fD={class:"mp-name"},pD={class:"mp-ver"},_D={key:0,class:"mp-desc"},mD={class:"mp-meta"},vD={key:0},gD={key:1,class:"mp-sep"},bD={class:"mp-enriched"},yD={key:0,class:"mp-stat"},wD={key:1,class:"mp-stat"},SD=["href"],CD=["href"],kD=["href"],AD={class:"mp-action"},MD={key:1,class:"mp-load-more-wrap"},ED="https://marketplace.openbridge.nubisco.io",LD=20,$D="https://marketplace.openbridge.nubisco.io/api",xD=Re({__name:"MarketplacePanel",setup(e){const t=Un(),i=Pg(),r=q(null),n=q(""),s=q([]),a=q(0),l=q(!1),o=q(null),c=q(null),u=q(new Map),d=q(null),h=q(0),f=q([]);function v(W){return{name:W.name,version:W.version,description:W.description??"",author:W.author?{name:W.author}:void 0,date:W.last_published_at,weeklyDownloads:W.weekly_downloads,githubStars:W.github_stars??void 0,githubSponsorsUrl:W.github_sponsors_url??void 0,documentationUrl:W.homepage??void 0,links:{npm:W.npm_url,homepage:W.homepage??void 0,repository:W.repository_url??void 0}}}function p(W){return W?W>=1e6?`${(W/1e6).toFixed(1)}M`:W>=1e3?`${(W/1e3).toFixed(1)}K`:W.toString():"0"}async function S(W=!0){W&&(h.value=0,s.value=[]),l.value=!0,o.value=null;try{const A=h.value+1,$=new URLSearchParams({q:n.value,page:String(A),limit:String(LD)}),Z=await fetch(`${$D}/plugins?${$}`);if(!Z.ok)throw new Error(`Marketplace API error: ${Z.status}`);const ie=await Z.json(),ne=ie.plugins.map(v);s.value=W?ne:[...s.value,...ne],a.value=ie.total}catch(A){o.value=String(A)}finally{l.value=!1}}async function _(W){if(!c.value){c.value=W.name,o.value=null;try{const A=await Ie.marketplace.install(W.name);u.value.set(W.name,A.mainFile),d.value={name:W.name,mainFile:A.mainFile},await Ie.pluginsRefresh(),await t.fetchPlugins(),i.success(`Installed ${W.name}`)}catch(A){o.value=`Failed to install ${W.name}: ${A}`,i.error(`Failed to install ${W.name}`)}finally{c.value=null}}}async function w(W){if(!r.value){r.value=W,o.value=null;try{await Ie.marketplace.uninstall(W),u.value.delete(W),await t.fetchPlugins(),i.success(`Removed ${W}`)}catch(A){o.value=`Failed to uninstall ${W}: ${A}`,i.error(`Failed to remove ${W}`)}finally{r.value=null}}}async function C(W){if(!(c.value||!W.platform)){c.value=W.name,o.value=null;try{await Ie.config.savePlugin(W.name,{platform:W.platform}),u.value.set(W.name,`${W.path}/dist/index.js`),d.value={name:W.name,mainFile:`${W.path}/dist/index.js`},await t.fetchPlugins(),i.success(`Activated ${W.name}`)}catch(A){o.value=`Failed to activate ${W.name}: ${A}`,i.error(`Failed to activate ${W.name}`)}finally{c.value=null}}}function g(W){var Z,ie;const $=(((Z=W.links)==null?void 0:Z.repository)??((ie=W.links)==null?void 0:ie.homepage)??"").match(/github\.com\/([^/]+)/);return $?`https://github.com/${$[1]}.png?size=48`:null}function E(W){return W.name.includes("openbridge-")||Array.isArray(W.badges)&&W.badges.includes("openbridge-plugin")}function T(W){return W.author?typeof W.author=="string"?W.author:W.author.name??"":""}function L(W){const A=Math.floor((Date.now()-new Date(W).getTime())/864e5);return A===0?"today":A<30?`${A}d ago`:A<365?`${Math.floor(A/30)}mo ago`:`${Math.floor(A/365)}y ago`}function V(){h.value++,S(!1)}let P=null;function Y(){P&&clearTimeout(P),P=setTimeout(()=>S(),350)}return lt(async()=>{try{const W=await Ie.marketplace.installed();for(const A of W.packages)u.value.set(A.name,A.mainFile)}catch{}try{const W=await Ie.marketplace.local();f.value=W.plugins}catch{}S()}),(W,A)=>{const $=Ue,Z=ha,ie=Xc,ne=ct,ce=oi,J=Fo;return m(),M("div",WI,[b("div",jI,[A[4]||(A[4]=b("span",{class:"mp-title"},"Browse Plugins",-1)),b("a",{class:"mp-external",href:ED,target:"_blank",rel:"noopener noreferrer",title:"Open the full marketplace in a new tab"},[G($,{name:de(j8),size:12},null,8,["name"]),A[3]||(A[3]=_e(" Marketplace ",-1))])]),b("div",KI,[G(Z,{modelValue:n.value,"onUpdate:modelValue":[A[0]||(A[0]=ae=>n.value=ae),Y],placeholder:"Search plugins",size:"sm"},null,8,["modelValue"])]),a.value>0?(m(),M("div",qI,F(a.value.toLocaleString())+" plugins found",1)):z("",!0),d.value?(m(),me(ie,{key:1,status:"success",dismissible:"",class:"mp-installed-banner",title:`${d.value.name} installed`,onDismiss:A[1]||(A[1]=ae=>d.value=null)},{default:te(()=>[...A[5]||(A[5]=[_e(" Click it in your plugins list to configure it. ",-1)])]),_:1},8,["title"])):z("",!0),o.value?(m(),me(ne,{key:2,variant:"error"},{default:te(()=>[_e(F(o.value),1)]),_:1})):z("",!0),f.value.length>0?(m(),M("div",GI,[b("div",YI,[G($,{name:de(Is),size:11},null,8,["name"]),A[6]||(A[6]=_e(" Local plugins ",-1))]),(m(!0),M(ke,null,Fe(f.value,ae=>(m(),me(J,{key:ae.name,class:"mp-row mp-row--ob mp-row--local"},{default:te(()=>[b("div",XI,[G($,{name:de(Is),size:16},null,8,["name"])]),b("div",JI,[b("div",QI,[b("span",eD,F(ae.name),1),b("span",tD,[G($,{name:de(Is),size:9},null,8,["name"]),A[7]||(A[7]=_e(" Native ",-1))]),b("span",iD,[G($,{name:de(II),size:9},null,8,["name"]),A[8]||(A[8]=_e(" Local ",-1))]),b("span",rD,"v"+F(ae.version),1)]),ae.description?(m(),M("p",nD,F(ae.description),1)):z("",!0),b("div",sD,[ae.author?(m(),M("span",aD,F(ae.author),1)):z("",!0)])]),b("div",lD,[u.value.has(ae.name)?(m(),me(ce,{key:0,variant:"ghost",size:"sm",disabled:"",icon:In},{default:te(()=>[...A[9]||(A[9]=[_e("Active",-1)])]),_:1})):(m(),me(ce,{key:1,variant:"primary",size:"sm",loading:c.value===ae.name,disabled:!!c.value||!ae.platform,title:ae.platform?"":"No platform declared in package.json openbridge.platform",onClick:re=>C(ae)},{default:te(()=>[...A[10]||(A[10]=[_e(" Activate ",-1)])]),_:1},8,["loading","disabled","title","onClick"]))])]),_:2},1024))),128))])):z("",!0),b("div",oD,[l.value&&s.value.length===0?(m(),M("div",cD,[G($,{name:de(Js),size:22},null,8,["name"]),A[11]||(A[11]=b("span",null,"Searching npm…",-1))])):z("",!0),(m(!0),M(ke,null,Fe(s.value,ae=>(m(),me(J,{key:ae.name,class:Le(["mp-row",{"mp-row--ob":E(ae)}])},{default:te(()=>[b("div",{class:Le(["mp-avatar",{"mp-avatar--ob":E(ae)}])},[g(ae)?(m(),M("img",{key:0,src:g(ae),alt:ae.name,class:"mp-avatar-img",onError:A[2]||(A[2]=re=>re.target.style.display="none")},null,40,uD)):z("",!0),E(ae)?(m(),me($,{key:1,name:de(Is),size:16},null,8,["name"])):(m(),me($,{key:2,name:de(ms),size:16},null,8,["name"]))],2),b("div",dD,[b("div",hD,[b("span",fD,F(ae.name),1),b("span",pD,"v"+F(ae.version),1)]),ae.description?(m(),M("p",_D,F(ae.description),1)):z("",!0),b("div",mD,[T(ae)?(m(),M("span",vD,F(T(ae)),1)):z("",!0),T(ae)?(m(),M("span",gD,"·")):z("",!0),b("span",null,F(L(ae.date)),1)]),b("div",bD,[ae.weeklyDownloads?(m(),M("span",yD,[G($,{name:de(VI),size:11},null,8,["name"]),_e(" "+F(p(ae.weeklyDownloads)),1)])):z("",!0),ae.githubStars?(m(),M("span",wD,[G($,{name:de(BI),weight:"fill",size:11},null,8,["name"]),_e(" "+F(p(ae.githubStars)),1)])):z("",!0),ae.githubSponsorsUrl?(m(),M("a",{key:2,href:ae.githubSponsorsUrl,target:"_blank",rel:"noopener",class:"mp-stat mp-stat--link"},[G($,{name:de(o2),weight:"fill",size:11},null,8,["name"]),A[12]||(A[12]=_e(" Sponsor ",-1))],8,SD)):z("",!0),ae.documentationUrl?(m(),M("a",{key:3,href:ae.documentationUrl,target:"_blank",rel:"noopener",class:"mp-stat mp-stat--link"},[G($,{name:de(Ng),size:11},null,8,["name"]),A[13]||(A[13]=_e(" Docs ",-1))],8,CD)):z("",!0),b("a",{href:`https://marketplace.openbridge.nubisco.io/plugins/${ae.name}`,target:"_blank",rel:"noopener",class:"mp-stat mp-stat--link mp-stat--marketplace"},[G($,{name:de(j8),size:11},null,8,["name"]),A[14]||(A[14]=_e(" Marketplace ",-1))],8,kD)])]),b("div",AD,[u.value.has(ae.name)?(m(),me(ce,{key:0,variant:"danger",size:"sm",outlined:"",loading:r.value===ae.name,disabled:!!r.value,onClick:re=>w(ae.name)},{default:te(()=>[...A[15]||(A[15]=[_e(" Remove ",-1)])]),_:1},8,["loading","disabled","onClick"])):(m(),me(ce,{key:1,variant:"primary",size:"sm",loading:c.value===ae.name,disabled:!!c.value,onClick:re=>_(ae)},{default:te(()=>[...A[16]||(A[16]=[_e(" Install ",-1)])]),_:1},8,["loading","disabled","onClick"]))])]),_:2},1032,["class"]))),128)),s.value.length>0&&s.value.length<a.value?(m(),M("div",MD,[G(ce,{variant:"ghost",size:"sm",loading:l.value,disabled:l.value,onClick:V},{default:te(()=>[_e(F(l.value?"Loading…":`Load more (${a.value-s.value.length} remaining)`),1)]),_:1},8,["loading","disabled"])])):z("",!0)])])}}}),TD=ii(xD,[["__scopeId","data-v-789c3f61"]]),HD={key:0,class:"inspector-content nb-inspector"},ND={class:"detail-header"},PD={class:"detail-icon native-icon"},OD={style:{flex:"1","min-width":"0"}},RD={key:1,class:"rename-row"},ID={class:"detail-type"},DD={class:"info-grid"},VD={class:"info-val"},ZD={class:"info-val"},BD={class:"info-val"},FD={class:"info-val"},zD={class:"info-val mono"},UD={key:0,class:"widget-energy"},WD={class:"energy-primary"},jD={class:"energy-value"},KD={class:"energy-secondary"},qD={key:0,class:"energy-item"},GD={class:"energy-item-val"},YD={key:1,class:"energy-item"},XD={class:"energy-item-val"},JD={key:1,class:"widget-thermo"},QD={class:"thermo-row"},eV={class:"thermo-value"},tV={class:"thermo-row"},iV={class:"thermo-value accent"},rV={class:"thermo-row"},nV={key:2,class:"widget-thermo"},sV={class:"thermo-row"},aV={class:"thermo-value"},lV={class:"thermo-row"},oV={class:"thermo-value accent"},cV={class:"thermo-row"},uV={key:3,class:"widget-generic"},dV={key:0,class:"no-telemetry"},hV={class:"char-name"},fV={class:"char-value"},pV={class:"event-list"},_V=["title"],mV={class:"event-body"},vV={class:"event-message"},gV={key:0,class:"event-source"},bV={class:"history-tabs"},yV=["onClick"],wV={key:0,class:"history-nav"},SV={class:"history-nav-center"},CV={class:"history-total"},kV={class:"history-date"},AV={key:2,class:"no-history"},MV={key:3,class:"no-history"},EV={key:4,class:"no-history"},LV={class:"obs-help"},$V={class:"obs-form"},xV={class:"obs-verdicts"},TV={key:1,class:"obs-list"},HV={class:"obs-list-head"},NV={class:"obs-when"},PV={class:"obs-temp"},OV={key:0,class:"obs-note"},RV={class:"calibration-actions"},IV={class:"char-list"},DV={class:"char-name"},VV={class:"char-value"},ZV={key:0,class:"homekit-notice"},BV={class:"homekit-row"},FV={key:1,class:"homekit-notice"},zV={class:"detail-header"},UV={class:"detail-icon"},WV={style:{flex:"1","min-width":"0"}},jV={key:1,class:"rename-row"},KV={class:"detail-type"},qV={class:"info-grid"},GV={key:0,class:"info-key"},YV={key:1,class:"info-val"},XV={key:0,class:"homekit-row"},JV={key:1,class:"homekit-notice"},QV={class:"char-list"},eZ={class:"char-name"},tZ={class:"homekit-row"},iZ={key:0,class:"homekit-notice"},rZ={class:"detail-uuid"},nZ=Re({__name:"DeviceInspector",setup(e){const t=q(new Set),i=q(!1),r=q("");function n(be){return!t.value.has(be)}async function s(){try{const{hidden:be}=await Ie.homekitHidden();t.value=new Set(be)}catch{}}async function a(be,oe){i.value=!0,r.value="";try{const Oe=await Ie.setHomekitVisibility(be,oe),qe=new Set(t.value);oe?qe.delete(be):qe.add(be),t.value=qe,Oe.applied||(r.value="Saved. This takes effect after the next OpenBridge restart.")}catch(Oe){r.value=`Could not change visibility: ${Oe.message}`}finally{i.value=!1}}const l=q({}),o=q([]),c=q(""),u=j(()=>[{value:"",label:"Default (as published)"},...o.value.map(be=>({value:be.key,label:be.label}))]);function d(be){return o.value.some(oe=>oe.serviceUuid===be)}function h(be,oe){var Oe;return((Oe=l.value[be])==null?void 0:Oe[oe])??""}const f=q(null);function v(be){return be.homekitType||be.widgetType}async function p(be){f.value=null;try{const{accessory:oe}=await Ie.deviceAccessory(be);f.value=oe}catch{}}async function S(){try{const{overrides:be,available:oe}=await Ie.homekitServiceTypes();l.value=be,o.value=oe}catch{}}async function _(be,oe,Oe){i.value=!0,c.value="";try{await Ie.setHomekitServiceType(be,oe,Oe||null);const qe={...l.value},Ke={...qe[be]??{}};Oe?Ke[oe]=Oe:delete Ke[oe],Object.keys(Ke).length>0?qe[be]=Ke:delete qe[be],l.value=qe,c.value="Saved. This takes effect after the next OpenBridge restart."}catch(qe){c.value=`Could not change type: ${qe.message}`}finally{i.value=!1}}lt(()=>{s(),S()});const w=Uo(),C=HH(),g=q(""),E=q(""),T=q("success"),L=j(()=>{const be=w.selectedDevice;return!be||be.kind!=="native"?null:be.dev.health??null}),V=j(()=>{var oe;const be=(oe=L.value)==null?void 0:oe.lastSeen;return be?`Not responding since ${new Date(be).toLocaleString()}`:"Not responding"}),P=[{id:"cold",label:"Too cold"},{id:"ok",label:"About right"},{id:"warm",label:"Too warm"}],Y=q(null),W=q("ok"),A=q(""),$=q(!1),Z=q(""),ie=q([]),ne=q(0);async function ce(){const be=w.selectedDevice;if(!be||be.kind!=="native"||!be.dev.observations){ie.value=[],ne.value=0;return}try{const oe=await Ie.deviceObservations(be.dev.id,20);ie.value=oe.observations,ne.value=oe.total}catch{}}async function J(){const be=w.selectedDevice;if(!(!be||be.kind!=="native"||Y.value===null)){$.value=!0,Z.value="";try{await Ie.reportObservation(be.dev.id,{roomTemperature:Y.value,comfort:W.value,...A.value.trim()?{note:A.value.trim()}:{}}),A.value="",await ce()}catch(oe){Z.value=oe instanceof Error?oe.message:String(oe)}finally{$.value=!1}}}De(()=>w.selectedDevice,()=>{Z.value="",A.value="",ce()},{immediate:!0});const ae=j(()=>{const be=w.selectedDevice;return!be||be.kind!=="native"?[]:be.dev.actions??[]});async function re(be){const oe=w.selectedDevice;if(!(!oe||oe.kind!=="native")&&!(be.confirm&&!await C({title:be.label,subjectLabel:"Device",subject:oe.dev.name,message:be.confirm,confirmLabel:be.label}))){g.value=be.id,E.value="";try{await Ie.controlDevice(oe.dev.id,be.id,!0),T.value="success",E.value=`${be.label} sent.`}catch(Oe){T.value="error",E.value=`${be.label} failed: ${Oe.message}`}finally{g.value=""}}}const X=j(()=>w.selectedDevice),le=j(()=>X.value?X.value.kind==="native"?X.value.dev.id:X.value.acc.uuid:null),ve={1:{label:"Other",icon:"cube"},2:{label:"Bridge",icon:"intersect"},3:{label:"Fan",icon:"fan"},4:{label:"Garage Door",icon:"garage"},5:{label:"Light",icon:"lightbulb"},6:{label:"Lock",icon:"lock"},7:{label:"Outlet",icon:"plugs"},8:{label:"Switch",icon:"toggle-right"},9:{label:"Thermostat",icon:"thermometer"},10:{label:"Sensor",icon:"pulse"},11:{label:"Security",icon:"shield"},12:{label:"Door",icon:"door"},13:{label:"Window",icon:"app-window"},14:{label:"Window Covering",icon:"rows"},15:{label:"Programm. Switch",icon:"sliders"},16:{label:"Range Extender",icon:"broadcast"},17:{label:"Camera",icon:"camera"},18:{label:"Video Doorbell",icon:"bell"},19:{label:"Air Purifier",icon:"wind"},20:{label:"Heater/Cooler",icon:"thermometer-hot"},21:{label:"Air Conditioner",icon:"snowflake"},22:{label:"Humidifier",icon:"drop"},23:{label:"Dehumidifier",icon:"drop"},26:{label:"Speaker",icon:"speaker-high"},28:{label:"Sprinkler",icon:"drop"},29:{label:"Faucet",icon:"drop"},30:{label:"Shower",icon:"drop"},32:{label:"TV",icon:"television"},34:{label:"Router",icon:"broadcast"},36:{label:"Target Control",icon:"game-controller"},38:{label:"Smart Speaker",icon:"speaker-hifi"}};function ue(be){return ve[be]??{label:`Category ${be}`,icon:"cube"}}const he=new Set(["AccessoryInformation","0000003E-0000-1000-8000-0026BB765291","ProtocolInformation","000000A2-0000-1000-8000-0026BB765291"]);function ye(be){return be.services.filter(oe=>!he.has(oe.name)&&!he.has(oe.uuid))}function U(be){return be.services.find(oe=>he.has(oe.name)||he.has(oe.uuid))}function fe(be){const oe=U(be);if(!oe)return null;const Oe=qe=>{var Ke;return(Ke=oe.characteristics.find(Ft=>Ft.name===qe||Ft.name.includes(qe)))==null?void 0:Ke.value};return{manufacturer:Oe("Manufacturer")??Oe("Manuf"),model:Oe("Model"),serial:Oe("SerialNumber")??Oe("Serial"),firmware:Oe("FirmwareRevision")??Oe("Firmware")}}function ge(be){return be.value===null||be.value===void 0?"—":be.format==="bool"?be.value?"On":"Off":typeof be.value=="number"?String(Math.round(be.value*100)/100):String(be.value)}function se(be){return be.perms.includes("pw")}const x=q(!1),H=q("");function O(be){H.value=be,x.value=!0}async function ee(be){var oe,Oe;if(H.value.trim())try{const qe=H.value.trim();await Ie.renameDevice(be,qe),x.value=!1,((oe=X.value)==null?void 0:oe.kind)==="native"?X.value.dev.name=qe:((Oe=X.value)==null?void 0:Oe.kind)==="hap"&&(X.value.acc.displayName=qe);const{useDaemonStore:Ke}=await s8(async()=>{const{useDaemonStore:bt}=await Promise.resolve().then(()=>$8);return{useDaemonStore:bt}},void 0);await Ke().fetchAccessories()}catch(qe){console.error("Rename failed:",qe)}}async function Q(be,oe,Oe,qe){try{await Ie.setCharacteristic(be,oe,Oe,qe);const{useDaemonStore:Ke}=await s8(async()=>{const{useDaemonStore:bt}=await Promise.resolve().then(()=>$8);return{useDaemonStore:bt}},void 0);await Ke().fetchAccessories()}catch(Ke){console.error("Failed to set characteristic:",Ke)}}const pe=q([]);function we(be){const oe=new Date(be);return Number.isNaN(oe.getTime())?be:new Date().toDateString()===oe.toDateString()?oe.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}):oe.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}async function y(){const be=X.value;if((be==null?void 0:be.kind)!=="native"){pe.value=[];return}try{const oe=await Ie.deviceEvents(be.dev.id,100);pe.value=oe.events}catch{pe.value=[]}}const k={switch:"plugs",light:"lightbulb",thermostat:"thermometer",dehumidifier:"drop",energy_meter:"lightning",gate:"garage",sensor:"pulse",camera:"camera"},D={camera:"Camera",switch:"Switch",light:"Light",thermostat:"Thermostat",dehumidifier:"Dehumidifier",energy_meter:"Energy Meter",gate:"Gate",sensor:"Sensor"};function N(be){return k[be]??"cube"}function I(be){return D[be]??be}function R(be,oe=1){if(be==null)return"—";const Oe=Number(be);return isFinite(Oe)?Oe.toFixed(oe):String(be)}function B(be){return Object.entries(be.telemetry).filter(([oe])=>!oe.startsWith("_"))}const K=q("day"),Se=q(new Date().toISOString().slice(0,10)),Me=q(null),Ve=q(!1);async function Ye(be){if(!Ve.value){Ve.value=!0;try{Me.value=await Ie.deviceHistory(be,K.value,Se.value)}catch{}finally{Ve.value=!1}}}function Te(be){var Oe;const oe=new Date(Se.value+(Se.value.length<=7?"-01":""));K.value==="day"?(oe.setDate(oe.getDate()+be),Se.value=oe.toISOString().slice(0,10)):K.value==="month"?(oe.setMonth(oe.getMonth()+be),Se.value=oe.toISOString().slice(0,7)):(oe.setFullYear(oe.getFullYear()+be),Se.value=String(oe.getFullYear())),((Oe=X.value)==null?void 0:Oe.kind)==="native"&&Ye(X.value.dev.id)}De(K,()=>{var oe;const be=new Date;K.value==="day"?Se.value=be.toISOString().slice(0,10):K.value==="month"?Se.value=be.toISOString().slice(0,7):Se.value=String(be.getFullYear()),((oe=X.value)==null?void 0:oe.kind)==="native"&&X.value.dev.widgetType==="energy_meter"&&Ye(X.value.dev.id)}),De(le,(be,oe)=>{if(be===oe&&Me.value)return;const Oe=X.value;(Oe==null?void 0:Oe.kind)==="native"?p(Oe.dev.id):f.value=null,y(),(Oe==null?void 0:Oe.kind)==="native"&&Oe.dev.widgetType==="energy_meter"&&(Se.value=new Date().toISOString().slice(0,10),K.value="day",Ye(Oe.dev.id))},{immediate:!0});const it=q([]),Ot=q([]),nr=q(!1),Bt=q(!1),Rt=q(!1),pr=j(()=>JSON.stringify(it.value)!==JSON.stringify(Ot.value)),_r=j(()=>!X.value||X.value.kind!=="native"?null:X.value.dev);async function wl(be){const{plugins:oe}=await Ie.plugins(),Oe=oe.find(Ke=>Ke.id===be.pluginId);if(!Oe)return null;if(Oe.source!=="homebridge"){const{config:Ke}=await Ie.config.getPlugin(be.pluginId);return Ke?{pluginConfig:Ke,isNative:!0,pluginName:be.pluginId,platformName:void 0}:null}else{const Ke=Oe.platformName??be.pluginId,{config:Ft}=await Ie.config.getPlatform(Ke);return Ft?{pluginConfig:Ft,isNative:!1,pluginName:be.pluginId,platformName:Ke}:null}}async function Jo(){const be=_r.value;if(be!=null&&be.interpolation){nr.value=!0,Rt.value=!1;try{const oe=await wl(be);if(!oe)return;const qe=(oe.pluginConfig.devices??[]).find(fn=>fn.id===be.id);if(!qe)return;const Ke=be.interpolation,bt=(qe[Ke.configField]??[]).map(fn=>({input:fn[Ke.configShape.inputKey]??0,output:fn[Ke.configShape.outputKey]??0}));it.value=bt,Ot.value=JSON.parse(JSON.stringify(bt))}catch(oe){console.error("Failed to load interpolation config:",oe)}finally{nr.value=!1}}}async function Qo(){const be=_r.value;if(be!=null&&be.interpolation){Bt.value=!0,Rt.value=!1;try{const oe=await wl(be);if(!oe)return;const Oe=be.interpolation,qe=oe.pluginConfig.devices??[],Ke=qe.findIndex(bt=>bt.id===be.id);if(Ke<0)return;const Ft=it.value.map(bt=>({[Oe.configShape.inputKey]:bt.input,[Oe.configShape.outputKey]:bt.output}));qe[Ke]={...qe[Ke],[Oe.configField]:Ft},oe.pluginConfig.devices=qe,oe.isNative?await Ie.config.savePlugin(oe.pluginName,oe.pluginConfig):await Ie.config.savePlatform(oe.pluginConfig),Ot.value=JSON.parse(JSON.stringify(it.value)),Rt.value=!0}catch(oe){console.error("Failed to save interpolation config:",oe)}finally{Bt.value=!1}}}function Sl(){it.value=JSON.parse(JSON.stringify(Ot.value)),Rt.value=!1}De(le,(be,oe)=>{var Oe;be===oe&&Ot.value.length>0||(Rt.value=!1,((Oe=X.value)==null?void 0:Oe.kind)==="native"&&X.value.dev.interpolation?Jo():(it.value=[],Ot.value=[]))},{immediate:!0});const pu=j(()=>{var oe;return(oe=Me.value)!=null&&oe.buckets?[{name:"kWh",data:Me.value.buckets.map(Oe=>{let qe=Oe.label;return K.value==="day"?qe=parseInt(Oe.label)%6===0?Oe.label:"":K.value==="month"&&(qe=parseInt(Oe.label)%5===1?Oe.label:""),{x:qe,y:Math.max(0,Math.round((Oe.kwh??0)*100)/100)}})}]:[]});return(be,oe)=>{const Oe=Ue,qe=ha,Ke=oi,Ft=Xc,bt=r2,fn=Bk,_u=i2,e0=ct,Ce=bs,Be=O$,Ge=zo,Si=Yc;return X.value?(m(),M("div",HD,[X.value.kind==="native"?(m(),M(ke,{key:0},[b("div",ND,[b("div",PD,[G(Oe,{name:N(v(X.value.dev)),size:26},null,8,["name"])]),b("div",OD,[x.value?(m(),M("div",RD,[G(qe,{modelValue:H.value,"onUpdate:modelValue":oe[1]||(oe[1]=Ee=>H.value=Ee),size:"sm",onKeyup:[oe[2]||(oe[2]=$i(Ee=>ee(X.value.dev.id),["enter"])),oe[3]||(oe[3]=$i(Ee=>x.value=!1,["escape"]))]},null,8,["modelValue"]),G(Ke,{variant:"primary",size:"sm",icon:In,"aria-label":"Save name",onClick:oe[4]||(oe[4]=Ee=>ee(X.value.dev.id))}),G(Ke,{variant:"ghost",size:"sm",icon:uc,"aria-label":"Cancel rename",onClick:oe[5]||(oe[5]=Ee=>x.value=!1)})])):(m(),M("h2",{key:0,class:"detail-name",title:"Click to rename",onClick:oe[0]||(oe[0]=Ee=>O(X.value.dev.name))},F(X.value.dev.name),1)),b("div",ID,F(I(v(X.value.dev))),1)])]),G(bt,{title:"Device info",fluid:""},wm({default:te(()=>[L.value&&L.value.status==="stale"?(m(),me(Ft,{key:0,status:"warning",title:V.value,style:{"margin-bottom":"0.5rem"}},{default:te(()=>[_e(F(L.value.reason),1)]),_:1},8,["title"])):z("",!0),E.value?(m(),me(Ft,{key:1,status:T.value,title:E.value,style:{"margin-bottom":"0.5rem"}},null,8,["status","title"])):z("",!0),b("div",DD,[oe[21]||(oe[21]=b("span",{class:"info-key"},"Plugin",-1)),b("span",VD,F(X.value.dev.pluginId),1),X.value.dev.manufacturer?(m(),M(ke,{key:0},[oe[19]||(oe[19]=b("span",{class:"info-key"},"Manufacturer",-1)),b("span",ZD,F(X.value.dev.manufacturer),1)],64)):z("",!0),X.value.dev.model?(m(),M(ke,{key:1},[oe[20]||(oe[20]=b("span",{class:"info-key"},"Model",-1)),b("span",BD,F(X.value.dev.model),1)],64)):z("",!0),oe[22]||(oe[22]=b("span",{class:"info-key"},"Status",-1)),b("span",FD,F(X.value.dev.pluginStatus),1),oe[23]||(oe[23]=b("span",{class:"info-key"},"ID",-1)),b("span",zD,F(X.value.dev.id),1)])]),_:2},[ae.value.length>0?{name:"toolbar",fn:te(()=>[(m(!0),M(ke,null,Fe(ae.value,Ee=>(m(),me(Ke,{key:Ee.id,size:"xs",variant:Ee.danger?"danger":"ghost",disabled:g.value!=="",loading:g.value===Ee.id,onClick:et=>re(Ee)},{default:te(()=>[_e(F(Ee.label),1)]),_:2},1032,["variant","disabled","loading","onClick"]))),128))]),key:"0"}:void 0]),1024),G(bt,{title:"State",fluid:""},{default:te(()=>[X.value.dev.widgetType==="energy_meter"?(m(),M("div",UD,[b("div",WD,[b("span",jD,F(R(X.value.dev.telemetry.power,1)),1),oe[24]||(oe[24]=b("span",{class:"energy-unit"},"W",-1))]),b("div",KD,[X.value.dev.telemetry.voltage!==void 0?(m(),M("span",qD,[oe[25]||(oe[25]=b("span",{class:"energy-label"},"Voltage",-1)),b("span",GD,F(R(X.value.dev.telemetry.voltage,1))+" V",1)])):z("",!0),X.value.dev.telemetry.current!==void 0?(m(),M("span",YD,[oe[26]||(oe[26]=b("span",{class:"energy-label"},"Current",-1)),b("span",XD,F(R(X.value.dev.telemetry.current,3))+" A",1)])):z("",!0)])])):X.value.dev.widgetType==="thermostat"?(m(),M("div",JD,[b("div",QD,[oe[27]||(oe[27]=b("span",{class:"thermo-label"},"Current",-1)),b("span",eV,F(R(X.value.dev.telemetry.currentTemperature,1))+"°C",1)]),b("div",tV,[oe[28]||(oe[28]=b("span",{class:"thermo-label"},"Target",-1)),b("span",iV,F(R(X.value.dev.telemetry.targetTemperature,1))+"°C ",1)]),b("div",rV,[oe[29]||(oe[29]=b("span",{class:"thermo-label"},"Active",-1)),b("span",{class:Le(["thermo-value",X.value.dev.telemetry.active?"on":"off"])},F(X.value.dev.telemetry.active?"On":"Off"),3)])])):X.value.dev.widgetType==="dehumidifier"?(m(),M("div",nV,[b("div",sV,[oe[30]||(oe[30]=b("span",{class:"thermo-label"},"Humidity",-1)),b("span",aV,F(R(X.value.dev.telemetry.currentHumidity,0))+"%",1)]),b("div",lV,[oe[31]||(oe[31]=b("span",{class:"thermo-label"},"Target",-1)),b("span",oV,F(R(X.value.dev.telemetry.targetHumidity,0))+"%",1)]),b("div",cV,[oe[32]||(oe[32]=b("span",{class:"thermo-label"},"Active",-1)),b("span",{class:Le(["thermo-value",X.value.dev.telemetry.active?"on":"off"])},F(X.value.dev.telemetry.active?"On":"Off"),3)])])):(m(),M("div",uV,[Object.keys(X.value.dev.telemetry).filter(Ee=>!Ee.startsWith("_")).length===0?(m(),M("span",dV,"No telemetry yet")):z("",!0),(m(!0),M(ke,null,Fe(B(X.value.dev),([Ee,et])=>(m(),M("div",{key:Ee,class:"char-row"},[b("span",hV,F(Ee),1),b("span",fV,F(String(et)),1)]))),128))]))]),_:1}),pe.value.length>0?(m(),me(bt,{key:0,title:"Recent activity",fluid:""},{default:te(()=>[b("ul",pV,[(m(!0),M(ke,null,Fe(pe.value,(Ee,et)=>(m(),M("li",{key:`${Ee.at}-${et}`,class:"event"},[b("span",{class:"event-time",title:Ee.at},F(we(Ee.at)),9,_V),b("span",mV,[b("span",vV,F(Ee.message),1),Ee.source?(m(),M("span",gV,F(Ee.source),1)):z("",!0)])]))),128))])]),_:1})):z("",!0),X.value.dev.widgetType==="energy_meter"?(m(),me(bt,{key:1,title:"Energy history",class:"energy-history",fluid:""},{default:te(()=>[b("div",bV,[(m(),M(ke,null,Fe(["day","month","year"],Ee=>b("button",{key:Ee,class:Le(["history-tab",{active:K.value===Ee}]),onClick:et=>K.value=Ee},F(Ee),11,yV)),64))]),Me.value?(m(),M("div",wV,[G(Ke,{variant:"ghost",size:"xs",icon:dv,title:"Previous",onClick:oe[6]||(oe[6]=Ee=>Te(-1))}),b("div",SV,[b("span",CV,[_e(F(Me.value.totalKwh.toFixed(2))+" ",1),oe[33]||(oe[33]=b("span",{class:"history-unit"},"kWh",-1))]),b("span",kV,F(Me.value.date),1)]),G(Ke,{variant:"ghost",size:"xs",icon:Uh,title:"Next",onClick:oe[7]||(oe[7]=Ee=>Te(1))})])):z("",!0),Me.value&&Me.value.totalKwh>0?(m(),me(fn,{key:1,series:pu.value,height:120,"show-legend":!1,"show-tooltip":!0},null,8,["series"])):z("",!0),Me.value&&Me.value.totalKwh===0?(m(),M("div",AV," No consumption recorded for this period. Data accumulates every 5 minutes. ")):z("",!0),!Me.value&&!Ve.value?(m(),M("div",MV,"No data available for this period.")):z("",!0),Ve.value?(m(),M("div",EV,"Loading history…")):z("",!0)]),_:1})):z("",!0),X.value.dev.observations?(m(),me(bt,{key:2,title:"Report",fluid:""},{default:te(()=>[b("p",LV,F(X.value.dev.observations.help??"Tell the plugin what this device cannot measure itself."),1),b("div",$V,[G(_u,{modelValue:Y.value,"onUpdate:modelValue":oe[8]||(oe[8]=Ee=>Y.value=Ee),size:"sm",min:X.value.dev.observations.min,max:X.value.dev.observations.max,step:.5,label:`${X.value.dev.observations.label} (${X.value.dev.observations.unit})`},null,8,["modelValue","min","max","label"]),b("div",xV,[(m(),M(ke,null,Fe(P,Ee=>G(Ke,{key:Ee.id,size:"sm",variant:W.value===Ee.id?"primary":"ghost",onClick:et=>W.value=Ee.id},{default:te(()=>[_e(F(Ee.label),1)]),_:2},1032,["variant","onClick"])),64))]),G(qe,{modelValue:A.value,"onUpdate:modelValue":oe[9]||(oe[9]=Ee=>A.value=Ee),size:"sm",placeholder:"Anything worth noting (sunny, window open)"},null,8,["modelValue"]),G(Ke,{size:"sm",variant:"primary",disabled:Y.value===null||$.value,onClick:J},{default:te(()=>[...oe[34]||(oe[34]=[_e(" Save report ",-1)])]),_:1},8,["disabled"])]),Z.value?(m(),me(e0,{key:0,variant:"error"},{default:te(()=>[_e(F(Z.value),1)]),_:1})):z("",!0),ie.value.length>0?(m(),M("div",TV,[b("div",HV,F(ne.value)+" report"+F(ne.value===1?"":"s")+" so far",1),(m(!0),M(ke,null,Fe(ie.value,(Ee,et)=>(m(),M("div",{key:et,class:"obs-row"},[b("span",NV,F(new Date(Ee.at).toLocaleString()),1),b("span",PV,F(Ee.roomTemperature)+"°",1),G(Ce,{variant:Ee.comfort==="ok"?"green":Ee.comfort==="cold"?"blue":"orange",size:"sm"},{default:te(()=>[_e(F(Ee.comfort),1)]),_:2},1032,["variant"]),Ee.note?(m(),M("span",OV,F(Ee.note),1)):z("",!0)]))),128))])):z("",!0)]),_:1})):z("",!0),X.value.dev.interpolation&&it.value.length>0?(m(),me(bt,{key:3,title:"Calibration",fluid:""},{default:te(()=>[G(Be,{modelValue:it.value,"onUpdate:modelValue":oe[10]||(oe[10]=Ee=>it.value=Ee),height:220,"input-label":X.value.dev.interpolation.inputLabel,"output-label":X.value.dev.interpolation.outputLabel,"input-min":X.value.dev.interpolation.inputMin,"input-max":X.value.dev.interpolation.inputMax,"output-min":X.value.dev.interpolation.outputMin,"output-max":X.value.dev.interpolation.outputMax,"input-step":.5,"output-step":1,"show-grid":!0,"show-tooltip":!0},null,8,["modelValue","input-label","output-label","input-min","input-max","output-min","output-max"]),oe[37]||(oe[37]=b("div",{class:"calibration-hint"},"Drag points to adjust. Double-click to add. Right-click to remove.",-1)),b("div",RV,[G(Ke,{variant:"primary",size:"sm",disabled:!pr.value||Bt.value,onClick:Qo},{default:te(()=>[_e(F(Bt.value?"Saving...":"Save"),1)]),_:1},8,["disabled"]),G(Ke,{variant:"ghost",size:"sm",disabled:!pr.value,onClick:Sl},{default:te(()=>[...oe[35]||(oe[35]=[_e(" Reset ",-1)])]),_:1},8,["disabled"])]),Rt.value?(m(),me(Ft,{key:0,status:"success",title:"Configuration saved"},{default:te(()=>[...oe[36]||(oe[36]=[_e(" Restart the plugin to apply the new mapping. ",-1)])]),_:1})):z("",!0)]),_:1})):X.value.dev.interpolation&&nr.value?(m(),me(bt,{key:4,title:"Calibration",fluid:""},{default:te(()=>[...oe[38]||(oe[38]=[b("div",{class:"no-history"},"Loading calibration data...",-1)])]),_:1})):z("",!0),B(X.value.dev).length>0?(m(),me(bt,{key:5,title:"All telemetry",fluid:""},{default:te(()=>[b("div",IV,[(m(!0),M(ke,null,Fe(B(X.value.dev),([Ee,et])=>(m(),M("div",{key:Ee,class:"char-row"},[b("span",DV,F(Ee),1),b("span",VV,F(String(et)),1)]))),128))])]),_:1})):z("",!0),f.value?(m(),me(bt,{key:6,title:"HomeKit",fluid:""},{default:te(()=>[(m(!0),M(ke,null,Fe(ye(f.value),Ee=>ur((m(),M("div",{key:Ee.uuid,class:"homekit-row"},[oe[39]||(oe[39]=b("div",{class:"homekit-copy"},[b("span",{class:"homekit-title"},"Show in HomeKit as"),b("span",{class:"homekit-hint"}," A plugin cannot know what a generic relay drives. Set it here and OpenBridge re-applies it on every restart, so the Home app stops reverting to a switch. ")],-1)),G(Ge,{"model-value":h(f.value.uuid,Ee.uuid),options:u.value,disabled:i.value,size:"sm","onUpdate:modelValue":et=>_(f.value.uuid,Ee.uuid,String(et))},null,8,["model-value","options","disabled","onUpdate:modelValue"])])),[[kh,d(Ee.uuid)]])),128)),c.value?(m(),M("div",ZV,F(c.value),1)):z("",!0),b("div",BV,[oe[40]||(oe[40]=b("div",{class:"homekit-copy"},[b("span",{class:"homekit-title"},"Expose to HomeKit"),b("span",{class:"homekit-hint"}," Hide devices the Home app cannot represent usefully. OpenBridge keeps its telemetry and history either way. ")],-1)),G(Si,{name:`homekit-visible-${f.value.uuid}`,"model-value":n(f.value.uuid),disabled:i.value,"onUpdate:modelValue":oe[11]||(oe[11]=Ee=>a(f.value.uuid,!!Ee))},null,8,["name","model-value","disabled"])]),r.value?(m(),M("div",FV,F(r.value),1)):z("",!0)]),_:1})):z("",!0)],64)):X.value.kind==="hap"?(m(),M(ke,{key:1},[b("div",zV,[b("div",UV,[G(Oe,{name:ue(X.value.acc.category).icon,size:26},null,8,["name"])]),b("div",WV,[x.value?(m(),M("div",jV,[G(qe,{modelValue:H.value,"onUpdate:modelValue":oe[13]||(oe[13]=Ee=>H.value=Ee),size:"sm",onKeyup:[oe[14]||(oe[14]=$i(Ee=>ee(X.value.acc.uuid),["enter"])),oe[15]||(oe[15]=$i(Ee=>x.value=!1,["escape"]))]},null,8,["modelValue"]),G(Ke,{variant:"primary",size:"sm",icon:In,"aria-label":"Save name",onClick:oe[16]||(oe[16]=Ee=>ee(X.value.acc.uuid))}),G(Ke,{variant:"ghost",size:"sm",icon:uc,"aria-label":"Cancel rename",onClick:oe[17]||(oe[17]=Ee=>x.value=!1)})])):(m(),M("h2",{key:0,class:"detail-name",title:"Click to rename",onClick:oe[12]||(oe[12]=Ee=>O(X.value.acc.displayName))},F(X.value.acc.displayName),1)),b("div",KV,F(ue(X.value.acc.category).label),1)])]),fe(X.value.acc)?(m(),me(bt,{key:0,title:"Device info",fluid:""},{default:te(()=>[b("div",qV,[(m(!0),M(ke,null,Fe(Object.entries(fe(X.value.acc)),([Ee,et])=>(m(),M(ke,{key:Ee},[et?(m(),M("span",GV,F(Ee),1)):z("",!0),et?(m(),M("span",YV,F(et),1)):z("",!0)],64))),128))])]),_:1})):z("",!0),(m(!0),M(ke,null,Fe(ye(X.value.acc),Ee=>(m(),me(bt,{key:Ee.uuid,title:Ee.displayName||Ee.name,fluid:""},{default:te(()=>[d(Ee.uuid)?(m(),M("div",XV,[oe[41]||(oe[41]=b("div",{class:"homekit-copy"},[b("span",{class:"homekit-title"},"Show in HomeKit as"),b("span",{class:"homekit-hint"}," A plugin cannot know what a generic relay drives. Set it here and OpenBridge re-applies it on every restart, so the Home app stops reverting to a switch. ")],-1)),G(Ge,{"model-value":h(X.value.acc.uuid,Ee.uuid),options:u.value,disabled:i.value,size:"sm","onUpdate:modelValue":et=>_(X.value.acc.uuid,Ee.uuid,String(et))},null,8,["model-value","options","disabled","onUpdate:modelValue"])])):z("",!0),c.value?(m(),M("div",JV,F(c.value),1)):z("",!0),b("div",QV,[(m(!0),M(ke,null,Fe(Ee.characteristics,et=>(m(),M("div",{key:et.uuid,class:"char-row"},[b("span",eZ,F(et.name),1),se(et)&&et.format==="bool"?(m(),me(Si,{key:0,name:`hap-char-${Ee.uuid}-${et.uuid}`,"model-value":!!et.value,"onUpdate:modelValue":t0=>Q(X.value.acc.uuid,Ee.uuid,et.uuid,t0?1:0)},null,8,["name","model-value","onUpdate:modelValue"])):(m(),M("span",{key:1,class:Le(["char-value",{on:et.format==="bool"&&et.value}])},F(ge(et)),3))]))),128))])]),_:2},1032,["title"]))),128)),G(bt,{title:"HomeKit",fluid:""},{default:te(()=>[b("div",tZ,[oe[42]||(oe[42]=b("div",{class:"homekit-copy"},[b("span",{class:"homekit-title"},"Expose to HomeKit"),b("span",{class:"homekit-hint"}," Hide devices the Home app cannot represent usefully. OpenBridge keeps its telemetry and history either way. ")],-1)),G(Si,{name:`homekit-visible-${X.value.acc.uuid}`,"model-value":n(X.value.acc.uuid),disabled:i.value,"onUpdate:modelValue":oe[18]||(oe[18]=Ee=>a(X.value.acc.uuid,!!Ee))},null,8,["name","model-value","disabled"])]),r.value?(m(),M("div",iZ,F(r.value),1)):z("",!0)]),_:1}),b("div",rZ,"UUID: "+F(X.value.acc.uuid),1)],64)):z("",!0)])):z("",!0)}}}),sZ=ii(nZ,[["__scopeId","data-v-93cac877"]]),aZ={class:"logs-filter"},lZ={key:0,class:"log-empty"},oZ={class:"log-time"},cZ={class:"log-plugin"},uZ={class:"log-msg"},K8="openbridge.logs.panelSize",dZ=Re({__name:"LiveLogsPanel",setup(e){const t=Un(),i=["collapsed","default","full"],r=q("collapsed");lt(()=>{const c=localStorage.getItem(K8);c&&i.includes(c)&&(r.value=c)}),De(r,c=>localStorage.setItem(K8,c));const n=q([]),s=q(null),a=j(()=>[{value:"system",label:"system"},...t.plugins.map(c=>({value:c.manifest.name,label:c.manifest.name}))]),l=j(()=>n.value.length===0?t.logs:t.logs.filter(c=>n.value.includes(c.plugin)));function o(){t.logs.length=0}return De(()=>l.value.length,async()=>{const c=s.value;!c||!(c.scrollHeight-c.scrollTop-c.clientHeight<40)||(await Kt(),c.scrollTop=c.scrollHeight)}),(c,u)=>{const d=zo,h=oi,f=r2;return m(),me(f,{size:r.value,"onUpdate:size":u[1]||(u[1]=v=>r.value=v),title:"Live Logs"},{toolbar:te(()=>[b("div",aZ,[G(d,{modelValue:n.value,"onUpdate:modelValue":u[0]||(u[0]=v=>n.value=v),multiple:"",options:a.value,placeholder:"All plugins",size:"xs"},null,8,["modelValue","options"])]),G(h,{size:"xs",variant:"ghost",icon:n2,title:"Clear",onClick:o})]),default:te(()=>[b("div",{ref_key:"logsEl",ref:s,class:"log-list"},[l.value.length===0?(m(),M("div",lZ,"No log entries yet.")):z("",!0),(m(!0),M(ke,null,Fe(l.value,(v,p)=>(m(),M("div",{key:p,class:"log-line"},[b("span",oZ,F(new Date(v.timestamp).toLocaleTimeString()),1),b("span",{class:Le(["log-level",`log-level--${v.level}`])},F(v.level.toUpperCase()),3),b("span",cZ,F(v.plugin),1),b("span",uZ,F(v.message),1)]))),128))],512)]),_:1},8,["size"])}}}),hZ=ii(dZ,[["__scopeId","data-v-2d8d29ff"]]),q8="https://docs.nubisco.io/openbridge/",G8="https://github.com/sponsors/joseporto",fZ=Re({__name:"AppLayout",setup(e){const t=nu(),i=Un(),r=Uo(),n=ws(),s=Wo(),a=ZH({storageKey:"openbridge.sidebar"}),l=j(()=>i.connected?"Daemon connected":"Daemon offline");function o(E){window.open(E,"_blank","noopener")}async function c(){await s.logout()}function u(){var T;const E=(T=s.config.value)==null?void 0:T.issuer;E&&window.open(`${E}/profile`,"_blank","noopener")}const d=q([]),h=q(!0),f=j(()=>d.value.map(E=>{var T;return{id:E.sub,email:E.email,name:E.name,current:E.sub===((T=s.user.value)==null?void 0:T.id)}}));async function v(){const E=await s.listIdentities();d.value=E,h.value=E.length===0}function p(E){s.switchAccount(E.email)}async function S(E){await s.removeIdentity(E.id),await v()}const _=q(null),w=q(!1);async function C(){try{const E=await fetch("/api/updates/check");if(!E.ok)return;const T=await E.json();T.updateAvailable&&T.latest&&(_.value=T.latest)}catch{}}const g=[{name:"dashboard",icon:"house",label:"Dashboard",href:"/dashboard"},{name:"plugins",icon:"puzzle-piece",label:"Plugins",href:"/plugins"},{name:"devices",icon:"devices",label:"Devices",href:"/devices"},{name:"config",icon:"brackets-curly",label:"Config",href:"/config"},{name:"terminal",icon:"terminal",label:"Terminal",href:"/terminal"}];return De(()=>t.name,()=>r.close()),lt(async()=>{await i.fetchHealth(),await i.fetchPlugins(),i.fetchLogs(),i.connectLiveLogs();const E=setInterval(()=>i.fetchHealth(),1e4);Oi(()=>clearInterval(E)),C()}),Oi(()=>i.disconnectLiveLogs()),(E,T)=>{const L=iT,V=uo("RouterLink"),P=bT,Y=uT,W=yT,A=rS,$=cL,Z=CT,ie=lv,ne=bs,ce=oi,J=Xc,ae=uo("RouterView"),re=Xx;return m(),me(re,{"inspector-visible":de(r).visible,"main-padding":!de(n).fullBleed,"sidebar-variant":de(a).variant.value,"sidebar-header-action-position":"start","sidebar-header-action-compact":"swap"},wm({"sidebar-logo":te(()=>[G(V,{to:"/dashboard",class:"sidebar-brand-link","aria-label":"OpenBridge, dashboard"},{default:te(()=>[G(L,{title:"OpenBridge"},{icon:te(()=>[...T[5]||(T[5]=[b("img",{src:tP,width:"28",height:"28",alt:""},null,-1)])]),_:1})]),_:1})]),"sidebar-header-action":te(()=>[G(P,{onToggle:de(a).toggle},null,8,["onToggle"])]),"sidebar-nav":te(()=>[G(W,null,{default:te(()=>[(m(),M(ke,null,Fe(g,X=>G(Y,{key:X.name,icon:X.icon,label:X.label,to:X.href,active:de(t).name===X.name},null,8,["icon","label","to","active"])),64))]),_:1})]),"sidebar-bottom":te(()=>{var X;return[G(W,null,{default:te(()=>[G(Y,{icon:oP,label:"Documentation",href:q8,onClick:T[0]||(T[0]=Qe(le=>o(q8),["prevent"]))}),G(Y,{icon:pP,label:"Sponsor",href:G8,onClick:T[1]||(T[1]=Qe(le=>o(G8),["prevent"]))}),G(Y,{icon:dg,label:"Settings",to:"/settings",active:de(t).name==="settings"},null,8,["active"])]),_:1}),(X=de(s).config.value)!=null&&X.enabled&&de(s).user.value?(m(),me($,{key:0,user:{email:de(s).user.value.email,name:de(s).user.value.name,picture:de(s).user.value.picture},trigger:"identity","show-theme":"",accounts:f.value,"accounts-unknown":h.value,"show-account-actions":de(s).isNubiscoPlatform.value,"show-profile":de(s).isNubiscoPlatform.value,brand:de(s).isNubiscoPlatform.value?"footer":void 0,onOpen:v,onSwitch:p,onSwitchAccount:T[2]||(T[2]=le=>de(s).chooseAccount()),onAddAccount:T[3]||(T[3]=le=>de(s).addAccount()),onRemove:S,onProfile:u,onSignOut:c},{default:te(({close:le})=>[G(A,{icon:FE,label:"Sign out of all apps",danger:"",onSelect:ve=>(le(),de(s).logoutEverywhere())},null,8,["onSelect"])]),_:1},8,["user","accounts","accounts-unknown","show-account-actions","show-profile","brand"])):z("",!0),G(Z,{label:l.value,status:de(i).connected?"success":"danger"},null,8,["label","status"])]}),"topbar-left":te(()=>[G(ie,{subtitle:de(n).title},null,8,["subtitle"]),de(n).count!==null?(m(),me(ne,{key:0},{default:te(()=>[_e(F(de(n).count),1)]),_:1})):z("",!0),T[6]||(T[6]=b("div",{id:"ob-topbar-left",class:"topbar-slot"},null,-1))]),"topbar-right":te(()=>[T[7]||(T[7]=b("div",{id:"ob-topbar-right",class:"topbar-slot"},null,-1))]),inspector:te(()=>[de(r).mode==="plugin"?(m(),me(NI,{key:0})):de(r).mode==="marketplace"?(m(),me(TD,{key:1})):de(r).mode==="device"?(m(),me(sZ,{key:2})):z("",!0)]),bottom:te(()=>[G(hZ)]),default:te(()=>[G(ae)]),_:2},[_.value&&!w.value?{name:"notification",fn:te(()=>[G(J,{status:"info",icon:c2,flush:"",dismissible:"",title:`OpenBridge v${_.value} is available`,onDismiss:T[4]||(T[4]=X=>w.value=!0)},{action:te(()=>[G(ce,{variant:"ghost",size:"sm",href:"https://github.com/nubisco/openbridge/releases",target:"_blank",rel:"noopener"},{default:te(()=>[...T[8]||(T[8]=[_e(" See what's new ",-1)])]),_:1})]),_:1},8,["title"])]),key:"0"}:void 0]),1032,["inspector-visible","main-padding","sidebar-variant"])}}}),pZ=ii(fZ,[["__scopeId","data-v-082839de"]]),_Z=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},mZ=_Z("qr-code","0 0 256 256",'<path d="M104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm0,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48ZM200,40H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-64,72V144a8,8,0,0,1,16,0v32a8,8,0,0,1-16,0Zm80-16a8,8,0,0,1-8,8H184v40a8,8,0,0,1-8,8H144a8,8,0,0,1,0-16h24V144a8,8,0,0,1,16,0v8h24A8,8,0,0,1,216,160Zm0,32v16a8,8,0,0,1-16,0V192a8,8,0,0,1,16,0Z"/>'),vZ=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},gZ=vZ("cpu","0 0 256 256",'<path d="M152,96H104a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V104A8,8,0,0,0,152,96Zm-8,48H112V112h32Zm88,0H216V112h16a8,8,0,0,0,0-16H216V56a16,16,0,0,0-16-16H160V24a8,8,0,0,0-16,0V40H112V24a8,8,0,0,0-16,0V40H56A16,16,0,0,0,40,56V96H24a8,8,0,0,0,0,16H40v32H24a8,8,0,0,0,0,16H40v40a16,16,0,0,0,16,16H96v16a8,8,0,0,0,16,0V216h32v16a8,8,0,0,0,16,0V216h40a16,16,0,0,0,16-16V160h16a8,8,0,0,0,0-16Zm-32,56H56V56H200v95.87s0,.09,0,.13,0,.09,0,.13V200Z"/>'),bZ=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},yZ=bZ("database","0 0 256 256",'<path d="M128,24C74.17,24,32,48.6,32,80v96c0,31.4,42.17,56,96,56s96-24.6,96-56V80C224,48.6,181.83,24,128,24Zm80,104c0,9.62-7.88,19.43-21.61,26.92C170.93,163.35,150.19,168,128,168s-42.93-4.65-58.39-13.08C55.88,147.43,48,137.62,48,128V111.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64ZM69.61,53.08C85.07,44.65,105.81,40,128,40s42.93,4.65,58.39,13.08C200.12,60.57,208,70.38,208,80s-7.88,19.43-21.61,26.92C170.93,115.35,150.19,120,128,120s-42.93-4.65-58.39-13.08C55.88,99.43,48,89.62,48,80S55.88,60.57,69.61,53.08ZM186.39,202.92C170.93,211.35,150.19,216,128,216s-42.93-4.65-58.39-13.08C55.88,195.43,48,185.62,48,176V159.36c17.06,15,46.23,24.64,80,24.64s62.94-9.68,80-24.64V176C208,185.62,200.12,195.43,186.39,202.92Z"/>'),wZ=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},SZ=wZ("clock","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z"/>'),Ia=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},CZ=Ia("pulse","0 0 256 256",'<path d="M236,128a4,4,0,0,1-4,4H202.47l-38.89,77.79A4,4,0,0,1,160,212h-.2a4,4,0,0,1-3.54-2.58l-60.59-159-36,79.28A4,4,0,0,1,56,132H24a4,4,0,0,1,0-8H53.42L92.36,38.35a4,4,0,0,1,7.38.23L160.5,198.06l35.92-71.85A4,4,0,0,1,200,124h32A4,4,0,0,1,236,128Z"/>'),kZ=Ia("pulse","0 0 256 256",'<path d="M238,128a6,6,0,0,1-6,6H203.71l-38.34,76.68A6,6,0,0,1,160,214h-.3a6,6,0,0,1-5.31-3.85L95.51,55.57,61.46,130.48A6,6,0,0,1,56,134H24a6,6,0,0,1,0-12H52.14l38.4-84.48a6,6,0,0,1,11.07.34L160.74,193.1l33.89-67.78A6,6,0,0,1,200,122h32A6,6,0,0,1,238,128Z"/>'),bd=Ia("pulse","0 0 256 256",'<path d="M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z"/>'),AZ=Ia("pulse","0 0 256 256",'<path d="M244,128a12,12,0,0,1-12,12H207.42l-36.69,73.37A12,12,0,0,1,160,220h-.6a12,12,0,0,1-10.61-7.72L95,71.15,66.92,133A12,12,0,0,1,56,140H24a12,12,0,0,1,0-24H48.27L85.08,35a12,12,0,0,1,22.13.7l54.28,142.46,27.78-55.56A12,12,0,0,1,200,116h32A12,12,0,0,1,244,128Z"/>'),MZ=Ia("pulse","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm-8,96H188.64L159,188a8,8,0,0,1-6.95,4h-.46a8,8,0,0,1-6.89-4.84L103,89.92,79,132a8,8,0,0,1-7,4H48a8,8,0,0,1,0-16H67.36L97.05,68a8,8,0,0,1,14.3.82L153,166.08l24-42.05a8,8,0,0,1,6.95-4h24a8,8,0,0,1,0,16Z"/>'),EZ=Ia("pulse","0 0 256 256",'<path d="M96,40l33.52,88H56Zm104,88H129.52L160,208Z" opacity="0.2"/><path d="M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z"/>'),LZ="pulse",$Z=Object.freeze(Object.defineProperty({__proto__:null,bold:AZ,default:bd,duotone:EZ,fill:MZ,glyphName:LZ,light:kZ,regular:bd,thin:CZ},Symbol.toStringTag,{value:"Module"})),xZ={class:"dashboard"},TZ={class:"top-row"},HZ={class:"hk-body"},NZ={key:0,class:"qr-wrap"},PZ=["src"],OZ={key:1,class:"qr-placeholder"},RZ={class:"hk-details"},IZ={key:0,class:"pin-display"},DZ={key:1,class:"pin-label"},VZ={class:"hk-status"},ZZ={key:2,class:"hk-error"},BZ={key:0,class:"sys-grid"},FZ={class:"sys-val"},zZ={class:"sys-val"},UZ={class:"sys-val"},WZ={class:"sys-val"},jZ={class:"sys-val"},KZ={class:"sys-val"},qZ={class:"sys-val"},GZ={class:"sys-val mono"},YZ={class:"sys-val mono"},XZ={class:"sys-val mono"},JZ={key:1,class:"loading-inline"},QZ={class:"card-title"},eB={class:"plugins-counts"},tB={key:0,class:"pill red"},iB={key:0,class:"empty-inline"},rB={key:1,class:"plugins-list"},nB={class:"plugin-name"},sB={class:"plugin-ver"},aB={class:"metrics-row"},lB={class:"metric-header"},oB={class:"metric-icon purple"},cB={class:"metric-values"},uB={class:"metric-big"},dB={key:0,class:"metric-sub"},hB={class:"metric-chart"},fB={class:"metric-header"},pB={class:"metric-icon blue"},_B={class:"metric-values"},mB={class:"metric-big"},vB={class:"metric-sub"},gB={class:"metric-chart"},bB={class:"metric-header"},yB={class:"metric-icon green"},wB={class:"uptime-rows"},SB={class:"uptime-row"},CB={class:"uptime-val"},kB={class:"uptime-row"},AB={class:"uptime-val"},MB={style:{"margin-top":"0.75rem"}},EB={class:"metric-header"},LB={class:"metric-icon amber"},$B={class:"net-values"},xB={class:"net-val"},TB={class:"net-val"},HB={class:"metric-chart net-charts"},NB=Re({__name:"DashboardView",setup(e){const t=Un(),i=ws();function r(A){return A==="running"?"green":A==="error"?"red":A==="loading"?"blue":"grey"}const n=q(!1),s=q(!1);async function a(){if(!n.value){n.value=!0,s.value=!1;try{await Ie.daemon.restart(),s.value=!0;let A=0;const $=setInterval(async()=>{A++;try{await Ie.health(),clearInterval($),location.reload()}catch{}A>60&&(clearInterval($),n.value=!1)},1e3)}catch{n.value=!1}}}const l=q(null),o=q(""),c=q(""),u=q(""),d=j(()=>t.connected?u.value?"red":"green":"gray"),h=j(()=>t.connected?u.value?"HomeKit offline":"Bridge running":"Daemon offline"),f=q([]),v=q([]),p=q([]),S=q([]),_=Zr(null);let w=null;function C(){w&&(w.onclose=null,w.close(),w=null);const A=location.protocol==="https:"?"wss:":"ws:";w=new WebSocket(`${A}//${location.host}/ws/metrics`),w.onmessage=$=>{if(!document.hidden)try{const Z=JSON.parse($.data);if(Z.type==="history"){const ie=Z.data;f.value=ie.map(ne=>ne.cpu),v.value=ie.map(ne=>T(ne)),p.value=ie.map(ne=>ne.netRxSec),S.value=ie.map(ne=>ne.netTxSec),ie.length&&(_.value=ie[ie.length-1])}else if(Z.type==="snapshot"){const ie=Z.data;_.value=ie,E(f,ie.cpu),E(v,T(ie)),E(p,ie.netRxSec),E(S,ie.netTxSec)}}catch{}},w.onclose=()=>{w=null,setTimeout(C,3e3)}}function g(){document.hidden||C()}function E(A,$){A.value=[...A.value.slice(-59),$]}function T(A){return A.memTotal?Math.round((A.memTotal-A.memFree)/A.memTotal*100):0}function L(A){return A<1024?`${A} B`:A<1024**2?`${(A/1024).toFixed(1)} KB`:A<1024**3?`${(A/1024**2).toFixed(1)} MB`:`${(A/1024**3).toFixed(1)} GB`}function V(A){const $=Math.floor(A/86400),Z=Math.floor(A%86400/3600),ie=Math.floor(A%3600/60);return $>0?`${$}d ${Z}h`:Z>0?`${Z}h ${ie}m`:`${ie}m`}const P=j(()=>_.value?L(_.value.memTotal-_.value.memFree):"—"),Y=j(()=>_.value?L(_.value.memTotal):"—"),W=j(()=>_.value?T(_.value):0);return lt(async()=>{i.setPage("Dashboard"),t.fetchPlugins();try{l.value=await Ie.system()}catch{}try{const A=await Ie.qr();u.value=A.error??"",A.setupURI&&(c.value=A.pincode??"",o.value=await Ra.toDataURL(A.setupURI,{width:148,margin:1,color:{dark:"#000000",light:"#ffffff"}}))}catch{}C(),document.addEventListener("visibilitychange",g)}),Oi(()=>{w==null||w.close(),w=null,document.removeEventListener("visibilitychange",g)}),(A,$)=>{const Z=Ue,ie=Fo,ne=bs,ce=YT,J=Uv,ae=oi;return m(),M("div",xZ,[b("div",TZ,[G(ie,{class:"hk-card"},{default:te(()=>[$[0]||($[0]=b("div",{class:"card-title"},"HomeKit Pairing",-1)),b("div",HZ,[o.value?(m(),M("div",NZ,[b("img",{src:o.value,alt:"HomeKit QR Code",class:"qr-img"},null,8,PZ)])):(m(),M("div",OZ,[G(Z,{name:de(mZ),size:48},null,8,["name"]),b("span",null,F(u.value?"HomeKit bridge unavailable":"No HAP bridge configured"),1)])),b("div",RZ,[c.value?(m(),M("div",IZ,F(c.value),1)):z("",!0),c.value?(m(),M("div",DZ,"Scan to add to HomeKit")):z("",!0),b("div",VZ,[b("span",{class:Le(["dot",d.value])},null,2),_e(" "+F(h.value),1)]),u.value?(m(),M("div",ZZ,F(u.value),1)):z("",!0)])])]),_:1}),G(ie,{class:"sys-card"},{default:te(()=>{var re;return[$[12]||($[12]=b("div",{class:"card-title"},"System Information",-1)),l.value?(m(),M("div",BZ,[$[1]||($[1]=b("span",{class:"sys-key"},"OS",-1)),b("span",FZ,F(l.value.os),1),$[2]||($[2]=b("span",{class:"sys-key"},"Arch",-1)),b("span",zZ,F(l.value.arch),1),$[3]||($[3]=b("span",{class:"sys-key"},"Hostname",-1)),b("span",UZ,F(l.value.hostname),1),$[4]||($[4]=b("span",{class:"sys-key"},"IP Address",-1)),b("span",WZ,F(l.value.ip),1),$[5]||($[5]=b("span",{class:"sys-key"},"User",-1)),b("span",jZ,F(l.value.user),1),$[6]||($[6]=b("span",{class:"sys-key"},"Node.js",-1)),b("span",KZ,F(l.value.nodeVersion),1),$[7]||($[7]=b("span",{class:"sys-key"},"OpenBridge",-1)),b("span",qZ,"v"+F(((re=de(t).health)==null?void 0:re.version)??"—"),1),$[8]||($[8]=b("span",{class:"sys-key"},"Config",-1)),b("span",GZ,F(l.value.configPath),1),$[9]||($[9]=b("span",{class:"sys-key"},"OB plugins",-1)),b("span",YZ,F(l.value.obPluginsDir),1),$[10]||($[10]=b("span",{class:"sys-key"},"HB plugins",-1)),b("span",XZ,F(l.value.hbPluginsDir),1)])):(m(),M("div",JZ,[G(Z,{name:de(Js),size:16},null,8,["name"]),$[11]||($[11]=_e(" Loading... ",-1))]))]}),_:1}),G(ie,{class:"plugins-card"},{default:te(()=>[b("div",QZ,[$[13]||($[13]=_e(" Plugins ",-1)),b("span",eB,[G(ne,{variant:"green"},{default:te(()=>[_e(F(de(t).runningCount)+" running",1)]),_:1}),de(t).errorCount?(m(),M("span",tB,F(de(t).errorCount)+" error",1)):z("",!0)])]),de(t).plugins.length===0?(m(),M("div",iB,"No plugins loaded yet.")):(m(),M("div",rB,[(m(!0),M(ke,null,Fe(de(t).plugins,re=>(m(),M("div",{key:re.id,class:"plugin-row"},[b("div",{class:Le(["plugin-dot",re.status])},null,2),b("span",nB,F(re.manifest.name),1),b("span",sB,"v"+F(re.manifest.version),1),re.source==="homebridge"?(m(),me(ne,{key:0,variant:"orange",size:"sm"},{default:te(()=>[...$[14]||($[14]=[_e("HB",-1)])]),_:1})):z("",!0),G(ne,{variant:r(re.status),size:"sm"},{default:te(()=>[_e(F(re.status),1)]),_:2},1032,["variant"])]))),128))]))]),_:1})]),b("div",aB,[G(ie,{class:"metric-card"},{default:te(()=>{var re,X;return[b("div",lB,[b("div",oB,[G(Z,{name:de(gZ),size:13},null,8,["name"])]),$[15]||($[15]=b("span",{class:"metric-title"},"CPU",-1))]),b("div",cB,[b("div",uB,[_e(F(((re=_.value)==null?void 0:re.cpu)??"—")+" ",1),$[16]||($[16]=b("span",{class:"metric-unit"},"%",-1))]),(X=_.value)!=null&&X.cpuTemp&&_.value.cpuTemp>0?(m(),M("div",dB,F(_.value.cpuTemp)+"°C",1)):z("",!0)]),b("div",hB,[G(ce,{data:f.value,color:"var(--nb-c-primary)",height:40},null,8,["data"])])]}),_:1}),G(ie,{class:"metric-card"},{default:te(()=>[b("div",fB,[b("div",pB,[G(Z,{name:de(yZ),size:13},null,8,["name"])]),$[17]||($[17]=b("span",{class:"metric-title"},"Memory",-1))]),b("div",_B,[b("div",mB,[_e(F(W.value)+" ",1),$[18]||($[18]=b("span",{class:"metric-unit"},"%",-1))]),b("div",vB,F(P.value)+" / "+F(Y.value),1)]),G(J,{value:W.value,max:100,size:"sm"},null,8,["value"]),b("div",gB,[G(ce,{data:v.value,color:"var(--nb-c-info)",height:32},null,8,["data"])])]),_:1}),G(ie,{class:"metric-card"},{default:te(()=>[b("div",bB,[b("div",yB,[G(Z,{name:de(SZ),size:13},null,8,["name"])]),$[19]||($[19]=b("span",{class:"metric-title"},"Uptime",-1))]),b("div",wB,[b("div",SB,[b("span",CB,F(l.value?V(l.value.uptimeSystem):"—"),1),$[20]||($[20]=b("span",{class:"uptime-label"},"System",-1))]),$[22]||($[22]=b("div",{class:"uptime-divider"},null,-1)),b("div",kB,[b("span",AB,F(l.value?V(l.value.uptimeProcess):"—"),1),$[21]||($[21]=b("span",{class:"uptime-label"},"Process",-1))])]),b("div",MB,[G(ae,{variant:"secondary",size:"sm",outlined:"",style:{width:"100%","justify-content":"center"},loading:n.value,icon:s.value?In:n.value?Lo:hs,onClick:a},{default:te(()=>[_e(F(s.value?"Restarted":n.value?"Restarting…":"Restart OpenBridge"),1)]),_:1},8,["loading","icon"])])]),_:1}),G(ie,{class:"metric-card net-card"},{default:te(()=>[b("div",EB,[b("div",LB,[G(Z,{name:de(bd),size:13},null,8,["name"])]),$[23]||($[23]=b("span",{class:"metric-title"},"Network",-1))]),b("div",$B,[b("div",null,[b("div",xB,F(_.value?L(_.value.netRxSec)+"/s":"—"),1),$[24]||($[24]=b("div",{class:"net-label"},"↓ Received",-1))]),b("div",null,[b("div",TB,F(_.value?L(_.value.netTxSec)+"/s":"—"),1),$[25]||($[25]=b("div",{class:"net-label"},"↑ Sent",-1))])]),b("div",HB,[G(ce,{data:p.value,color:"var(--nb-c-success)",height:28},null,8,["data"]),G(ce,{data:S.value,color:"var(--nb-c-warning)",height:28},null,8,["data"])])]),_:1})])])}}}),PB=ii(NB,[["__scopeId","data-v-d9b075b5"]]),Da=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},OB=Da("arrow-clockwise","0 0 256 256",'<path d="M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z"/>'),RB=Da("arrow-clockwise","0 0 256 256",'<path d="M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z"/>'),Y8=Da("arrow-clockwise","0 0 256 256",'<path d="M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"/>'),IB=Da("arrow-clockwise","0 0 256 256",'<path d="M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z"/>'),DB=Da("arrow-clockwise","0 0 256 256",'<path d="M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z"/>'),VB=Da("arrow-clockwise","0 0 256 256",'<path d="M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z" opacity="0.2"/><path d="M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z"/>'),ZB="arrow-clockwise",BB=Object.freeze(Object.defineProperty({__proto__:null,bold:IB,default:Y8,duotone:VB,fill:DB,glyphName:ZB,light:RB,regular:Y8,thin:OB},Symbol.toStringTag,{value:"Module"})),Og=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Va=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},FB=Va("list","0 0 256 256",'<path d="M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128ZM40,68H216a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8ZM216,188H40a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8Z"/>'),zB=Va("list","0 0 256 256",'<path d="M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128ZM40,70H216a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12ZM216,186H40a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12Z"/>'),X8=Va("list","0 0 256 256",'<path d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"/>'),UB=Va("list","0 0 256 256",'<path d="M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM40,76H216a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24ZM216,180H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z"/>'),WB=Va("list","0 0 256 256",'<path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM192,184H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Z"/>'),jB=Va("list","0 0 256 256",'<path d="M216,64V192H40V64Z" opacity="0.2"/><path d="M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"/>'),KB="list",Rg=Object.freeze(Object.defineProperty({__proto__:null,bold:UB,default:X8,duotone:jB,fill:WB,glyphName:KB,light:zB,regular:X8,thin:FB},Symbol.toStringTag,{value:"Module"})),Za=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},qB=Za("squares-four","0 0 256 256",'<path d="M104,44H56A12,12,0,0,0,44,56v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V56A12,12,0,0,0,104,44Zm4,60a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Zm92-60H152a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,60a4,4,0,0,1-4,4H152a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4ZM104,140H56a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V152A12,12,0,0,0,104,140Zm4,60a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Zm92-60H152a12,12,0,0,0-12,12v48a12,12,0,0,0,12,12h48a12,12,0,0,0,12-12V152A12,12,0,0,0,200,140Zm4,60a4,4,0,0,1-4,4H152a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4Z"/>'),GB=Za("squares-four","0 0 256 256",'<path d="M104,42H56A14,14,0,0,0,42,56v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V56A14,14,0,0,0,104,42Zm2,62a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm94-62H152a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,62a2,2,0,0,1-2,2H152a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm-98,34H56a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V152A14,14,0,0,0,104,138Zm2,62a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Zm94-62H152a14,14,0,0,0-14,14v48a14,14,0,0,0,14,14h48a14,14,0,0,0,14-14V152A14,14,0,0,0,200,138Zm2,62a2,2,0,0,1-2,2H152a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2h48a2,2,0,0,1,2,2Z"/>'),J8=Za("squares-four","0 0 256 256",'<path d="M104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48Z"/>'),YB=Za("squares-four","0 0 256 256",'<path d="M100,36H56A20,20,0,0,0,36,56v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V56A20,20,0,0,0,100,36ZM96,96H60V60H96ZM200,36H156a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,60H160V60h36Zm-96,40H56a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V156A20,20,0,0,0,100,136Zm-4,60H60V160H96Zm104-60H156a20,20,0,0,0-20,20v44a20,20,0,0,0,20,20h44a20,20,0,0,0,20-20V156A20,20,0,0,0,200,136Zm-4,60H160V160h36Z"/>'),XB=Za("squares-four","0 0 256 256",'<path d="M120,56v48a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40h48A16,16,0,0,1,120,56Zm80-16H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm-96,96H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm96,0H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Z"/>'),JB=Za("squares-four","0 0 256 256",'<path d="M112,56v48a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8h48A8,8,0,0,1,112,56Zm88-8H152a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V56A8,8,0,0,0,200,48Zm-96,96H56a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V152A8,8,0,0,0,104,144Zm96,0H152a8,8,0,0,0-8,8v48a8,8,0,0,0,8,8h48a8,8,0,0,0,8-8V152A8,8,0,0,0,200,144Z" opacity="0.2"/><path d="M200,136H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,200,136Zm0,64H152V152h48v48ZM104,40H56A16,16,0,0,0,40,56v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,104,40Zm0,64H56V56h48v48Zm96-64H152a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,64H152V56h48v48Zm-96,32H56a16,16,0,0,0-16,16v48a16,16,0,0,0,16,16h48a16,16,0,0,0,16-16V152A16,16,0,0,0,104,136Zm0,64H56V152h48v48Z"/>'),QB="squares-four",Ig=Object.freeze(Object.defineProperty({__proto__:null,bold:YB,default:J8,duotone:JB,fill:XB,glyphName:QB,light:GB,regular:J8,thin:qB},Symbol.toStringTag,{value:"Module"})),eF={key:0,class:"plugin-cards"},tF={class:"plugin-avatar"},iF=["src","alt"],rF={class:"plugin-meta"},nF={class:"plugin-name"},sF={key:0,class:"plugin-platform"},aF={class:"plugin-version"},lF={key:0,class:"plugin-desc"},oF={key:1,class:"plugin-author"},cF={key:2,class:"plugin-links"},uF=["href"],dF=["href"],hF={key:3,class:"plugin-error"},fF={class:"cell-name"},pF={class:"plugin-avatar plugin-avatar--sm"},_F=["src","alt"],mF={class:"plugin-name"},vF={key:0,class:"plugin-platform"},gF=Re({__name:"PluginList",props:{rows:{},view:{},selectedId:{}},emits:["select"],setup(e,{emit:t}){const i=e,r=t;function n(o){return o==="running"?"green":o==="error"?"red":o==="loading"?"blue":"grey"}const s=q({key:"name",direction:"asc"}),a=[{key:"name",header:"Plugin",sortable:!0},{key:"version",header:"Version",sortable:!0,width:140},{key:"source",header:"Source",sortable:!0,width:120},{key:"status",header:"Status",sortable:!0,width:120},{key:"author",header:"Author",sortable:!0}],l=j(()=>{const o=i.rows.map(d=>({id:d.plugin.id,name:d.plugin.manifest.name,version:`v${d.plugin.manifest.version}`,availableUpdate:d.plugin.availableUpdate,source:d.plugin.source==="homebridge"?"Homebridge":"Native",status:d.plugin.status,author:d.plugin.manifest.author??"—",platform:d.plugin.source==="homebridge"?d.plugin.platformName:void 0,avatarUrl:d.avatarUrl,isOpenBridge:d.isOpenBridge,plugin:d.plugin})),c=s.value;if(!c||c.direction==="none")return o;const u=c.direction==="asc"?1:-1;return[...o].sort((d,h)=>u*String(d[c.key]??"").localeCompare(String(h[c.key]??"")))});return(o,c)=>{const u=Ue,d=bs,h=or,f=Fo,v=Vv;return e.view==="cards"?(m(),M("div",eF,[(m(!0),M(ke,null,Fe(e.rows,p=>(m(),me(f,{key:p.plugin.id,class:Le(["plugin-card",{"plugin-card--selected":p.plugin.id===e.selectedId}]),onClick:S=>r("select",p.plugin)},{default:te(()=>[b("span",{class:Le(["plugin-card__accent",`plugin-card__accent--${p.plugin.status}`])},null,2),G(h,{dir:"row",align:"start",gap:"sm",class:"plugin-card__header"},{default:te(()=>[b("div",tF,[p.avatarUrl?(m(),M("img",{key:0,src:p.avatarUrl,alt:p.plugin.manifest.name,onError:c[0]||(c[0]=S=>S.target.style.display="none")},null,40,iF)):(m(),me(u,{key:1,name:p.isOpenBridge?de(Is):de(ms),size:20},null,8,["name"]))]),b("div",rF,[b("div",nF,F(p.plugin.manifest.name),1),p.plugin.source==="homebridge"&&p.plugin.platformName?(m(),M("div",sF," Platform: "+F(p.plugin.platformName),1)):z("",!0),b("div",aF,[_e(" v"+F(p.plugin.manifest.version)+" ",1),p.plugin.availableUpdate?(m(),me(d,{key:0,variant:"blue",size:"sm"},{default:te(()=>[_e(" v"+F(p.plugin.availableUpdate)+" available ",1)]),_:2},1024)):z("",!0)])]),G(d,{variant:n(p.plugin.status)},{default:te(()=>[_e(F(p.plugin.status),1)]),_:2},1032,["variant"])]),_:2},1024),p.plugin.manifest.description?(m(),M("p",lF,F(p.plugin.manifest.description),1)):z("",!0),p.plugin.manifest.author?(m(),M("p",oF,"by "+F(p.plugin.manifest.author),1)):z("",!0),p.sponsorUrl||p.docsUrl?(m(),M("div",cF,[p.sponsorUrl?(m(),M("a",{key:0,href:p.sponsorUrl,target:"_blank",rel:"noopener",onClick:c[1]||(c[1]=Qe(()=>{},["stop"]))},[G(u,{name:de(o2),weight:"fill",size:11},null,8,["name"]),c[6]||(c[6]=_e(" Sponsor ",-1))],8,uF)):z("",!0),p.docsUrl?(m(),M("a",{key:1,href:p.docsUrl,target:"_blank",rel:"noopener",onClick:c[2]||(c[2]=Qe(()=>{},["stop"]))},[G(u,{name:de(Ng),size:11},null,8,["name"]),c[7]||(c[7]=_e(" Docs ",-1))],8,dF)):z("",!0)])):z("",!0),p.plugin.error?(m(),M("div",hF,F(p.plugin.error),1)):z("",!0)]),_:2},1032,["class","onClick"]))),128))])):(m(),me(v,{key:1,columns:a,rows:l.value,"row-key":"id",size:"sm",zebra:"","sort-state":s.value,onSort:c[4]||(c[4]=p=>s.value=p),onRowClick:c[5]||(c[5]=p=>r("select",p.plugin))},{"cell-name":te(({row:p})=>[b("div",fF,[b("div",pF,[p.avatarUrl?(m(),M("img",{key:0,src:p.avatarUrl,alt:p.name,onError:c[3]||(c[3]=S=>S.target.style.display="none")},null,40,_F)):(m(),me(u,{key:1,name:p.isOpenBridge?de(Is):de(ms),size:14},null,8,["name"]))]),b("div",null,[b("div",mF,F(p.name),1),p.platform?(m(),M("div",vF,"Platform: "+F(p.platform),1)):z("",!0)])])]),"cell-version":te(({row:p})=>[_e(F(p.version)+" ",1),p.availableUpdate?(m(),me(d,{key:0,variant:"blue",size:"sm"},{default:te(()=>[_e("v"+F(p.availableUpdate),1)]),_:2},1024)):z("",!0)]),"cell-status":te(({row:p})=>[G(d,{variant:n(p.status)},{default:te(()=>[_e(F(p.status),1)]),_:2},1032,["variant"])]),_:1},8,["rows","sort-state"]))}}}),bF=ii(gF,[["__scopeId","data-v-8fdf7ec9"]]),yF={class:"plugins-view"},wF={key:0,class:"empty-state"},SF={key:0},Q8="openbridge.plugins.view",CF=Re({__name:"PluginsView",setup(e){const t=Un(),i=Uo(),r=ws(),n=Pg(),s=q(""),a=q(new Map),l=q(new Set),o=q(!1),c=q(localStorage.getItem(Q8)==="table"?"table":"cards");function u(){c.value=c.value==="cards"?"table":"cards",localStorage.setItem(Q8,c.value)}const d=j(()=>{var P;return i.visible&&i.mode==="plugin"?((P=i.selectedPlugin)==null?void 0:P.id)??null:null}),h=j(()=>p().map(P=>{const Y=w(P);return{plugin:P,avatarUrl:T(P),isOpenBridge:_(P),sponsorUrl:Y==null?void 0:Y.githubSponsorsUrl,docsUrl:Y==null?void 0:Y.documentationUrl}}));function f(P){if(P.source==="homebridge"){const W=(P.manifest.description??"").match(/Homebridge platform:\s*([^\s]+)/);if(W!=null&&W[1])return W[1]}return P.manifest.name}function v(P){var $;const W=($=(P.manifest.description??"").match(/Homebridge platform:\s*([^\s]+)/))==null?void 0:$[1],A=[f(P),W,P.manifest.name,P.id];return Array.from(new Set(A.filter(Z=>!!Z&&Z.trim().length>0)))}function p(){const P=s.value.toLowerCase();return t.plugins.filter(Y=>Y.manifest.name.toLowerCase().includes(P)||(Y.manifest.description??"").toLowerCase().includes(P))}function S(P){var Y;((Y=i.selectedPlugin)==null?void 0:Y.id)===P.id&&i.visible&&i.mode==="plugin"?i.close():i.openPlugin(P)}function _(P){return P.manifest.name.includes("openbridge-")||P.source==="native"}function w(P){const Y=v(P);for(const W of Y){const A=a.value.get(W);if(A)return A}if(P.enrichedMetadata)return P.enrichedMetadata}async function C(P,Y=!1){var A;const W=v(P);for(const $ of W)if(!(!Y&&a.value.has($))&&!(!Y&&l.value.has($))){l.value.add($);try{const Z=await Ie.marketplace.enriched($),ie=new Map(a.value);if(ie.set($,Z),ie.set(f(P),Z),a.value=ie,P.enrichedMetadata=Z,Z.documentationUrl||Z.githubSponsorsUrl||(A=Z.links)!=null&&A.repository)return}catch{}finally{const Z=new Set(l.value);Z.delete($),l.value=Z}}}const g=q(new Map);function E(P){const W=P.trim().replace(/^github:/,"https://github.com/").replace(/^git\+/,"").replace(/^git@github\.com:/,"https://github.com/").match(/github\.com[/:]([^/]+)/);return W?`https://github.com/${W[1]}.png?size=48`:null}function T(P){var $,Z;const Y=w(P),W=(($=Y==null?void 0:Y.links)==null?void 0:$.repository)??((Z=Y==null?void 0:Y.links)==null?void 0:Z.homepage)??"";if(W){const ie=E(W);if(ie)return ie}const A=v(P);for(const ie of A){const ne=g.value.get(ie);if(ne)return ne}return null}async function L(P,Y=!1){var W;if(!(!Y&&g.value.has(P)))try{const A=await fetch(`https://registry.npmjs.org/${encodeURIComponent(P)}/latest`,{signal:AbortSignal.timeout(5e3)});if(!A.ok){g.value.set(P,"");return}const $=await A.json(),Z=((W=$==null?void 0:$.repository)==null?void 0:W.url)??($==null?void 0:$.homepage)??"";g.value.set(P,E(Z)??"")}catch{g.value.set(P,"")}}async function V(P=!1){if(!o.value){o.value=!0;try{P&&(a.value=new Map,g.value=new Map);const Y=t.plugins;for(const W of Y){const A=v(W);for(const $ of A)await L($,P);await C(W,P)}P&&n.success("Plugin metadata refreshed")}catch{n.error("Failed to refresh plugin metadata")}finally{o.value=!1}}}return lt(async()=>{await t.fetchPlugins()}),De(()=>t.plugins.length,P=>{r.setPage("Plugins",P)},{immediate:!0}),(P,Y)=>{const W=ha,A=oi,$=Ue;return m(),M("div",yF,[(m(),me(dr,{defer:"",to:"#ob-topbar-right"},[G(W,{modelValue:s.value,"onUpdate:modelValue":Y[0]||(Y[0]=Z=>s.value=Z),placeholder:"Search plugins...",size:"sm",style:{width:"200px"}},null,8,["modelValue"]),G(A,{variant:"ghost",size:"sm",icon:BB,title:"Refresh metadata",loading:o.value,disabled:o.value,onClick:Y[1]||(Y[1]=Z=>V(!0))},null,8,["loading","disabled"]),G(A,{variant:"ghost",size:"sm",icon:c.value===Og?Rg:Ig,title:c.value==="cards"?"Show as table":"Show as cards",onClick:u},null,8,["icon","title"]),G(A,{variant:"primary",size:"sm",icon:g6,onClick:Y[2]||(Y[2]=Z=>de(i).openMarketplace())},{default:te(()=>[...Y[5]||(Y[5]=[_e(" Browse plugins ",-1)])]),_:1})])),h.value.length===0?(m(),M("div",wF,[G($,{name:de(ms),size:40},null,8,["name"]),s.value?(m(),M("p",SF,'No plugins matching "'+F(s.value)+'"',1)):(m(),M(ke,{key:1},[Y[7]||(Y[7]=b("p",null,"No plugins loaded yet.",-1)),G(A,{variant:"primary",size:"sm",icon:g6,onClick:Y[3]||(Y[3]=Z=>de(i).openMarketplace())},{default:te(()=>[...Y[6]||(Y[6]=[_e(" Browse & install plugins ",-1)])]),_:1})],64))])):(m(),M("div",{key:1,class:"plugins-body",onClick:Y[4]||(Y[4]=Qe(Z=>de(i).close(),["self"]))},[G(bF,{rows:h.value,view:c.value,"selected-id":d.value,onSelect:S},null,8,["rows","view","selected-id"])]))])}}}),kF=ii(CF,[["__scopeId","data-v-95e3ebc4"]]),Ba=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},AF=Ba("devices","0 0 256 256",'<path d="M224,76H204V64a20,20,0,0,0-20-20H40A20,20,0,0,0,20,64v96a20,20,0,0,0,20,20H156v12a20,20,0,0,0,20,20h48a20,20,0,0,0,20-20V96A20,20,0,0,0,224,76ZM40,172a12,12,0,0,1-12-12V64A12,12,0,0,1,40,52H184a12,12,0,0,1,12,12V76H176a20,20,0,0,0-20,20v76Zm196,20a12,12,0,0,1-12,12H176a12,12,0,0,1-12-12V96a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12ZM132,208a4,4,0,0,1-4,4H88a4,4,0,0,1,0-8h40A4,4,0,0,1,132,208Zm80-96a4,4,0,0,1-4,4H192a4,4,0,0,1,0-8h16A4,4,0,0,1,212,112Z"/>'),MF=Ba("devices","0 0 256 256",'<path d="M224,74H206V64a22,22,0,0,0-22-22H40A22,22,0,0,0,18,64v96a22,22,0,0,0,22,22H154v10a22,22,0,0,0,22,22h48a22,22,0,0,0,22-22V96A22,22,0,0,0,224,74ZM40,170a10,10,0,0,1-10-10V64A10,10,0,0,1,40,54H184a10,10,0,0,1,10,10V74H176a22,22,0,0,0-22,22v74Zm194,22a10,10,0,0,1-10,10H176a10,10,0,0,1-10-10V96a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10ZM134,208a6,6,0,0,1-6,6H88a6,6,0,0,1,0-12h40A6,6,0,0,1,134,208Zm80-96a6,6,0,0,1-6,6H192a6,6,0,0,1,0-12h16A6,6,0,0,1,214,112Z"/>'),yd=Ba("devices","0 0 256 256",'<path d="M224,72H208V64a24,24,0,0,0-24-24H40A24,24,0,0,0,16,64v96a24,24,0,0,0,24,24H152v8a24,24,0,0,0,24,24h48a24,24,0,0,0,24-24V96A24,24,0,0,0,224,72ZM40,168a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H184a8,8,0,0,1,8,8v8H176a24,24,0,0,0-24,24v72Zm192,24a8,8,0,0,1-8,8H176a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Zm-96,16a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h40A8,8,0,0,1,136,208Zm80-96a8,8,0,0,1-8,8H192a8,8,0,0,1,0-16h16A8,8,0,0,1,216,112Z"/>'),EF=Ba("devices","0 0 256 256",'<path d="M224,72H212V64a28,28,0,0,0-28-28H40A28,28,0,0,0,12,64v88a28,28,0,0,0,28,28h96v12a28,28,0,0,0,28,28h60a28,28,0,0,0,28-28V100A28,28,0,0,0,224,72ZM40,156a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H184a4,4,0,0,1,4,4v8H164a28,28,0,0,0-28,28v56Zm188,36a4,4,0,0,1-4,4H164a4,4,0,0,1-4-4V100a4,4,0,0,1,4-4h60a4,4,0,0,1,4,4ZM124,208a12,12,0,0,1-12,12H88a12,12,0,0,1,0-24h24A12,12,0,0,1,124,208Zm88-84a12,12,0,0,1-12,12H188a12,12,0,0,1,0-24h12A12,12,0,0,1,212,124Z"/>'),LF=Ba("devices","0 0 256 256",'<path d="M224,72H208V64a24,24,0,0,0-24-24H40A24,24,0,0,0,16,64v96a24,24,0,0,0,24,24H152v8a24,24,0,0,0,24,24h48a24,24,0,0,0,24-24V96A24,24,0,0,0,224,72Zm8,120a8,8,0,0,1-8,8H176a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Zm-96,16a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h40A8,8,0,0,1,136,208Zm80-96a8,8,0,0,1-8,8H192a8,8,0,0,1,0-16h16A8,8,0,0,1,216,112Z"/>'),$F=Ba("devices","0 0 256 256",'<path d="M200,64V80H176a16,16,0,0,0-16,16v80H40a16,16,0,0,1-16-16V64A16,16,0,0,1,40,48H184A16,16,0,0,1,200,64Z" opacity="0.2"/><path d="M224,72H208V64a24,24,0,0,0-24-24H40A24,24,0,0,0,16,64v96a24,24,0,0,0,24,24H152v8a24,24,0,0,0,24,24h48a24,24,0,0,0,24-24V96A24,24,0,0,0,224,72ZM40,168a8,8,0,0,1-8-8V64a8,8,0,0,1,8-8H184a8,8,0,0,1,8,8v8H176a24,24,0,0,0-24,24v72Zm192,24a8,8,0,0,1-8,8H176a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Zm-96,16a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h40A8,8,0,0,1,136,208Zm80-96a8,8,0,0,1-8,8H192a8,8,0,0,1,0-16h16A8,8,0,0,1,216,112Z"/>'),xF="devices",TF=Object.freeze(Object.defineProperty({__proto__:null,bold:EF,default:yd,duotone:$F,fill:LF,glyphName:xF,light:MF,regular:yd,thin:AF},Symbol.toStringTag,{value:"Module"})),HF={class:"devices-view"},NF={class:"toolbar-count"},PF={key:1,class:"empty-state"},OF={class:"device-icon native-icon"},RF={class:"device-info"},IF={class:"device-name"},DF={class:"device-type"},VF={class:"device-summary"},ZF={key:0,class:"summary-primary"},BF={class:"summary-primary"},FF={key:0,class:"summary-secondary"},zF={key:2,class:"summary-primary"},UF=["title"],WF={class:"device-info"},jF={class:"device-name"},KF={class:"device-type"},qF={key:0,class:"device-summary"},GF={class:"summary-primary"},YF=["title"],XF=["title"],JF={key:1},QF={class:"confirm-dialog"},ez={class:"confirm-icon"},tz={class:"confirm-message"},iz={class:"confirm-actions"},ep="openbridge.devices.view",rz=Re({__name:"DevicesView",setup(e){const t=Un(),i=Uo(),r=l2();function n(H){var O;return((O=H.health)==null?void 0:O.status)==="stale"}function s(H){return H<90?`${Math.round(H)} seconds`:H<5400?`${Math.round(H/60)} minutes`:H<172800?`${Math.round(H/3600)} hours`:`${Math.round(H/86400)} days`}function a(H){const O=H.health;if(!O||O.status!=="stale")return"";const ee=["Not responding"];return O.silentForSeconds!==null?ee.push(`Silent for ${s(O.silentForSeconds)}.`):O.lastSeen&&ee.push(`Last seen ${new Date(O.lastSeen).toLocaleString()}.`),O.reason&&ee.push(O.reason),ee.push("OpenBridge is running: the device itself is not answering. Check it is powered and reachable at its configured address.","Click to open it for its address, readings and recent events."),ee.join(`
69
- `)}const l=["Not responding","HomeKit reports this accessory as unreachable. Check it is powered and on the network.","Click to open it for its services and characteristics."].join(`
70
- `);function o(H){var ee;const O=(ee=H.health)==null?void 0:ee.status;return O==="ok"?"online":O==="stale"?"stale":"offline"}function c(H){var ee;const O=(ee=H.health)==null?void 0:ee.status;return O==="ok"?"Responding":O==="stale"?"Not responding":"No data yet"}function u(H){r.push({name:"device-detail",params:{id:H.id}})}const d=ws(),h=q(!1),f=q([]),v=q(localStorage.getItem(ep)==="table"?"table":"cards");function p(){v.value=v.value==="cards"?"table":"cards",localStorage.setItem(ep,v.value)}const S=q({key:"name",direction:"asc"}),_=[{key:"name",header:"Device",sortable:!0},{key:"type",header:"Type",sortable:!0,width:160},{key:"source",header:"Source",sortable:!0,width:120},{key:"state",header:"State",sortable:!0,width:120},{key:"detail",header:"Reading",sortable:!0,width:160}],w=j(()=>{const H=[...f.value.map(Q=>({key:"native:"+Q.id,name:Q.name,type:$(g(Q)),source:"Native",state:Q.telemetry.active===void 0?"":Q.telemetry.active?"On":"Off",stateOn:!!Q.telemetry.active,detail:C(Q),icon:A(g(Q)),unhealthy:n(Q),healthTooltip:a(Q),select:()=>L(Q)})),...t.accessories.map(Q=>{const pe=ce(Q);return{key:"hap:"+Q.uuid,name:Q.displayName,type:P(Q.category).label,source:"HomeKit",state:Q.reachable?pe?pe.value?"On":"Off":"":"Not responding",stateOn:Q.reachable&&!!(pe!=null&&pe.value),detail:J(Q)??"",icon:P(Q.category).icon,unhealthy:!Q.reachable,healthTooltip:Q.reachable?"":l,select:()=>T(Q)}})],O=S.value;if(!O||O.direction==="none")return H;const ee=O.direction==="asc"?1:-1;return[...H].sort((Q,pe)=>ee*String(Q[O.key]??"").localeCompare(String(pe[O.key]??"")))});function C(H){const O=H.telemetry;return H.widgetType==="energy_meter"&&O.power!==void 0?`${re(O.power,1)} W`:H.widgetType==="thermostat"&&O.currentTemperature!==void 0?`${re(O.currentTemperature,1)}°C`:H.widgetType==="dehumidifier"&&O.currentHumidity!==void 0?`${re(O.currentHumidity,0)}%`:O.power!==void 0?`${re(O.power,1)} W`:""}function g(H){return H.homekitType||H.widgetType}const E=j(()=>i.mode!=="device"||!i.selectedDevice?null:i.selectedDevice.kind==="native"?i.selectedDevice.dev.id:i.selectedDevice.acc.uuid);function T(H){E.value===H.uuid?i.close():i.openDevice({kind:"hap",acc:H})}function L(H){E.value===H.id?i.close():i.openDevice({kind:"native",dev:H})}const V={1:{label:"Other",icon:"cube"},2:{label:"Bridge",icon:"intersect"},3:{label:"Fan",icon:"fan"},4:{label:"Garage Door",icon:"garage"},5:{label:"Light",icon:"lightbulb"},6:{label:"Lock",icon:"lock"},7:{label:"Outlet",icon:"plugs"},8:{label:"Switch",icon:"toggle-right"},9:{label:"Thermostat",icon:"thermometer"},10:{label:"Sensor",icon:"pulse"},11:{label:"Security",icon:"shield"},12:{label:"Door",icon:"door"},13:{label:"Window",icon:"app-window"},14:{label:"Window Covering",icon:"rows"},15:{label:"Programm. Switch",icon:"sliders"},16:{label:"Range Extender",icon:"broadcast"},17:{label:"Camera",icon:"camera"},18:{label:"Video Doorbell",icon:"bell"},19:{label:"Air Purifier",icon:"wind"},20:{label:"Heater/Cooler",icon:"thermometer-hot"},21:{label:"Air Conditioner",icon:"snowflake"},22:{label:"Humidifier",icon:"drop"},23:{label:"Dehumidifier",icon:"drop"},26:{label:"Speaker",icon:"speaker-high"},28:{label:"Sprinkler",icon:"drop"},29:{label:"Faucet",icon:"drop"},30:{label:"Shower",icon:"drop"},32:{label:"TV",icon:"television"},34:{label:"Router",icon:"broadcast"},36:{label:"Target Control",icon:"game-controller"},38:{label:"Smart Speaker",icon:"speaker-hifi"}};function P(H){return V[H]??{label:`Category ${H}`,icon:"cube"}}const Y={switch:"plugs",light:"lightbulb",thermostat:"thermometer",dehumidifier:"drop",energy_meter:"lightning",gate:"garage",sensor:"pulse",camera:"camera"},W={camera:"Camera",switch:"Switch",light:"Light",thermostat:"Thermostat",dehumidifier:"Dehumidifier",energy_meter:"Energy Meter",gate:"Gate",sensor:"Sensor"};function A(H){return Y[H]??"cube"}function $(H){return W[H]??H}const Z=new Set(["AccessoryInformation","0000003E-0000-1000-8000-0026BB765291","ProtocolInformation","000000A2-0000-1000-8000-0026BB765291"]),ie=new Set(["On","Active","LockTargetState","TargetDoorState"]);function ne(H){return H.services.find(O=>!Z.has(O.name)&&!Z.has(O.uuid))}function ce(H){const O=ne(H);return O?O.characteristics.find(ee=>ie.has(ee.name)&&ee.perms.includes("pw"))??null:null}function J(H){if(!H.reachable)return"Not responding";const O=ne(H);if(!O)return null;for(const Q of O.characteristics){if(Q.name==="CurrentTemperature"&&Q.value!=null)return`${Number(Q.value).toFixed(1)}°C`;if(Q.name==="CurrentRelativeHumidity"&&Q.value!=null)return`${Math.round(Number(Q.value))}%`;if(Q.name==="CurrentPosition"&&Q.value!=null)return`${Math.round(Number(Q.value))}%`;if(Q.name==="Brightness"&&Q.value!=null)return`${Math.round(Number(Q.value))}%`}const ee=O.characteristics.find(Q=>Q.name==="On");return ee?ee.value?"On":"Off":null}async function ae(H,O){const ee=ne(H),Q=ce(H);if(!(!ee||!Q))try{await Ie.setCharacteristic(H.uuid,ee.uuid,Q.uuid,O?1:0),await t.fetchAccessories()}catch(pe){console.error("HAP control failed",pe)}}function re(H,O=1){if(H==null)return"—";const ee=Number(H);return isFinite(ee)?ee.toFixed(O):String(H)}const X=j(()=>t.accessories.length+f.value.length);async function le(){var H;try{const O=await Ie.devices();if(f.value=O.devices,i.mode==="device"&&((H=i.selectedDevice)==null?void 0:H.kind)==="native"){const ee=i.selectedDevice.dev.id,Q=O.devices.find(pe=>pe.id===ee);Q&&i.updateDevice({kind:"native",dev:Q})}}catch{}}async function ve(){h.value=!0,await Promise.all([t.fetchAccessories(),le()]),h.value=!1}let ue=null;const he=q({visible:!1,deviceId:"",control:"",value:null,message:""});function ye(H,O,ee){return H.widgetType==="energy_meter"&&O==="active"?ee?`Turn on ${H.name}? This will energise the connected circuit.`:`Turn off ${H.name}? This will cut power to the connected circuit.`:!1}async function U(H,O,ee){try{await Ie.controlDevice(H,O,ee),await le()}catch(Q){console.error("Control failed",Q)}}function fe(H,O,ee){const Q=ye(H,O,ee);Q?he.value={visible:!0,deviceId:H.id,control:O,value:ee,message:Q}:U(H.id,O,ee)}function ge(){const{deviceId:H,control:O,value:ee}=he.value;he.value.visible=!1,U(H,O,ee)}function se(){he.value.visible=!1}async function x(){var H;if(await Promise.all([t.fetchAccessories(),le()]),i.mode==="device"&&((H=i.selectedDevice)==null?void 0:H.kind)==="hap"){const O=i.selectedDevice.acc.uuid,ee=t.accessories.find(Q=>Q.uuid===O);ee&&i.updateDevice({kind:"hap",acc:ee})}}return lt(async()=>{d.setPage("Devices"),await x(),ue=setInterval(x,3e3)}),Oi(()=>{ue&&clearInterval(ue)}),(H,O)=>{const ee=bs,Q=oi,pe=Ue,we=Yc,y=i2,k=Fo,D=Vv;return m(),M("div",HF,[X.value>0?(m(),me(dr,{key:0,defer:"",to:"#ob-topbar-left"},[b("span",NF,F(X.value)+" device"+F(X.value!==1?"s":""),1),f.value.length>0?(m(),me(ee,{key:0},{default:te(()=>[_e(F(f.value.length)+" native",1)]),_:1})):z("",!0)])):z("",!0),(m(),me(dr,{defer:"",to:"#ob-topbar-right"},[G(Q,{variant:"ghost",size:"sm",icon:v.value===Og?Rg:Ig,title:v.value==="cards"?"Show as table":"Show as cards",onClick:p},null,8,["icon","title"]),G(Q,{variant:"ghost",size:"sm",icon:hs,title:"Refresh",loading:h.value,onClick:ve},null,8,["loading"])])),X.value===0?(m(),M("div",PF,[G(pe,{name:de(yd),size:40},null,8,["name"]),O[8]||(O[8]=b("p",null,"No devices registered yet.",-1)),O[9]||(O[9]=b("p",{class:"empty-hint"},[_e(" Devices appear here once a platform plugin registers accessories. "),b("br"),_e(" This page auto-refreshes every 3 seconds: discovery can take up to 60s. ")],-1))])):(m(),M("div",{key:2,class:"devices-layout",onClick:O[7]||(O[7]=Qe(N=>de(i).close(),["self"]))},[v.value==="cards"?(m(),M("div",{key:0,class:"device-grid",onClick:O[4]||(O[4]=Qe(N=>de(i).close(),["self"]))},[(m(!0),M(ke,null,Fe(f.value,N=>(m(),me(k,{key:"native:"+N.id,class:Le(["device-card native-card",{selected:E.value===N.id,unhealthy:n(N)}]),title:n(N)?a(N):void 0,onClick:I=>L(N),onDblclick:I=>u(N)},{default:te(()=>{var I;return[O[10]||(O[10]=b("span",{class:"device-card__accent"},null,-1)),b("div",OF,[G(pe,{name:A(g(N)),size:22},null,8,["name"])]),b("div",RF,[b("div",IF,[n(N)?(m(),me(pe,{key:0,name:de(Er),size:14,class:"name-health-icon"},null,8,["name"])):z("",!0),b("span",null,F(N.name),1)]),b("div",DF,F($(g(N))),1),b("div",VF,[N.widgetType==="energy_meter"&&N.telemetry.power!==void 0?(m(),M("span",ZF,F(re(N.telemetry.power,1))+" W",1)):N.widgetType==="thermostat"&&N.telemetry.currentTemperature!==void 0?(m(),M(ke,{key:1},[b("span",BF,F(re(N.telemetry.currentTemperature,1))+"°C",1),N.telemetry.targetTemperature!==void 0?(m(),M("span",FF," target "+F(re(N.telemetry.targetTemperature,1))+"°C ",1)):z("",!0)],64)):N.widgetType==="dehumidifier"&&N.telemetry.currentHumidity!==void 0?(m(),M("span",zF,F(re(N.telemetry.currentHumidity,0))+"%",1)):N.telemetry.active!==void 0?(m(),M("span",{key:3,class:Le(["summary-status",N.telemetry.active?"on":"off"])},F(N.telemetry.active?"On":"Off"),3)):z("",!0)]),N.telemetry.active!==void 0?(m(),M("div",{key:0,class:"card-controls",onClick:O[0]||(O[0]=Qe(()=>{},["stop"]))},[G(we,{name:`device-active-${N.id}`,"model-value":!!N.telemetry.active,"onUpdate:modelValue":R=>fe(N,"active",R)},null,8,["name","model-value","onUpdate:modelValue"])])):z("",!0),N.widgetType==="thermostat"&&N.telemetry.targetTemperature!==void 0?(m(),M("div",{key:1,class:"card-controls",onClick:O[1]||(O[1]=Qe(()=>{},["stop"]))},[G(y,{"model-value":Number(N.telemetry.targetTemperature),size:"xs",min:5,max:35,step:1,"onUpdate:modelValue":R=>R!==null&&U(N.id,"targetTemperature",R)},null,8,["model-value","onUpdate:modelValue"])])):z("",!0),N.widgetType==="dehumidifier"&&N.telemetry.targetHumidity!==void 0?(m(),M("div",{key:2,class:"card-controls",onClick:O[2]||(O[2]=Qe(()=>{},["stop"]))},[G(y,{"model-value":Number(N.telemetry.targetHumidity),size:"xs",min:30,max:80,step:5,"onUpdate:modelValue":R=>R!==null&&U(N.id,"targetHumidity",R)},null,8,["model-value","onUpdate:modelValue"])])):z("",!0)]),b("div",{class:Le(["device-reachability",o(N)]),title:((I=N.health)==null?void 0:I.reason)??c(N)},null,10,UF)]}),_:2},1032,["class","title","onClick","onDblclick"]))),128)),(m(!0),M(ke,null,Fe(de(t).accessories,N=>(m(),me(k,{key:N.uuid,class:Le(["device-card hap-card",{selected:E.value===N.uuid,unreachable:!N.reachable,unhealthy:!N.reachable}]),title:N.reachable?void 0:de(l),onClick:I=>T(N)},{default:te(()=>{var I;return[b("div",{class:Le(["device-icon hap-icon",{unreachable:!N.reachable}])},[G(pe,{name:P(N.category).icon,size:22},null,8,["name"])],2),b("div",WF,[b("div",jF,[N.reachable?z("",!0):(m(),me(pe,{key:0,name:de(Er),size:14,class:"name-health-icon"},null,8,["name"])),b("span",null,F(N.displayName),1)]),b("div",KF,F(P(N.category).label),1),J(N)?(m(),M("div",qF,[b("span",GF,F(J(N)),1)])):z("",!0),ce(N)?(m(),M("div",{key:1,class:"card-controls",onClick:O[3]||(O[3]=Qe(()=>{},["stop"]))},[G(we,{name:`hap-on-${N.uuid}`,"model-value":!!((I=ce(N))!=null&&I.value),"onUpdate:modelValue":R=>ae(N,!!R)},null,8,["name","model-value","onUpdate:modelValue"])])):z("",!0)]),b("div",{class:Le(["device-reachability",N.reachable?"online":"stale"]),title:N.reachable?"Responding":de(l)},null,10,YF)]}),_:2},1032,["class","title","onClick"]))),128))])):(m(),me(D,{key:1,columns:_,rows:w.value,"row-key":"key",size:"sm",zebra:"","sort-state":S.value,onSort:O[5]||(O[5]=N=>S.value=N),onRowClick:O[6]||(O[6]=N=>N.select())},{"cell-name":te(({row:N})=>[b("div",{class:"cell-name",title:N.healthTooltip||void 0},[G(pe,{name:N.icon,size:16},null,8,["name"]),b("span",null,F(N.name),1),N.unhealthy?(m(),me(pe,{key:0,name:de(Er),size:14,class:"cell-health-icon"},null,8,["name"])):z("",!0)],8,XF)]),"cell-state":te(({row:N})=>[N.state?(m(),me(ee,{key:0,variant:N.unhealthy?"orange":N.stateOn?"green":"grey"},{default:te(()=>[_e(F(N.state),1)]),_:2},1032,["variant"])):(m(),M("span",JF,"—"))]),_:1},8,["rows","sort-state"]))])),(m(),me(dr,{to:"body"},[he.value.visible?(m(),M("div",{key:0,class:"confirm-overlay",onClick:Qe(se,["self"])},[b("div",QF,[b("div",ez,[G(pe,{name:de(Er),size:24},null,8,["name"])]),b("p",tz,F(he.value.message),1),b("div",iz,[G(Q,{variant:"ghost",size:"sm",onClick:se},{default:te(()=>[...O[11]||(O[11]=[_e("Cancel",-1)])]),_:1}),G(Q,{variant:"primary",size:"sm",onClick:ge},{default:te(()=>[...O[12]||(O[12]=[_e("Confirm",-1)])]),_:1})])])])):z("",!0)]))])}}}),nz=ii(rz,[["__scopeId","data-v-5ae916c1"]]),sz={class:"device-detail"},az={class:"detail-header"},lz={key:0,class:"detail-model"},oz={key:0,class:"detail-message"},cz={class:"summary-row"},uz=["onClick"],dz={class:"tile-label"},hz={class:"tile-value"},fz={class:"tile-unit"},pz={key:0,class:"detail-message"},_z={class:"chart-toolbar"},mz={class:"range-tabs"},vz=["onClick"],gz={key:0,class:"resolution-note"},bz={class:"chart-panel"},yz={key:1,class:"chart-empty"},wz={key:2,class:"chart-empty"},Sz={key:2,class:"detail-message"},Cz=Re({__name:"DeviceDetailView",setup(e){const t=nu(),i=j(()=>String(t.params.id??"")),r=q(null),n=q([]),s=q(""),a=q(!1),l=q(""),o=q(0),c=q([]),u=[{key:"1h",label:"1 hour",seconds:3600},{key:"24h",label:"24 hours",seconds:86400},{key:"7d",label:"7 days",seconds:7*86400},{key:"30d",label:"30 days",seconds:30*86400},{key:"1y",label:"1 year",seconds:365*86400}],d=q("24h"),h=j(()=>{var V;return[{label:"Devices",to:{name:"devices"}},{label:((V=r.value)==null?void 0:V.name)??i.value}]}),f=j(()=>n.value.find(V=>V.key===s.value)??null),v=j(()=>{const V=f.value;if(!V||c.value.length===0)return[];const P={name:V.label,data:c.value.map(W=>({x:new Date(W.t*1e3),y:W.value??0}))};return c.value.some(W=>W.min!==void 0&&W.min!==null&&W.min!==W.value)?[P,{name:"Min",data:c.value.map(W=>({x:new Date(W.t*1e3),y:W.min??W.value??0}))},{name:"Max",data:c.value.map(W=>({x:new Date(W.t*1e3),y:W.max??W.value??0}))}]:[P]}),p=j(()=>{if(!o.value)return"";const V=o.value;return V<60?`${V}s resolution`:V<3600?`${Math.round(V/60)} min resolution`:`${Math.round(V/3600)} h resolution`});function S(V){var W,A;const P=(A=(W=r.value)==null?void 0:W.telemetry)==null?void 0:A[V.key],Y=Number(P);return Number.isFinite(Y)?Y:null}function _(V,P){return V===null?"—":V.toFixed(P.precision??2)}function w(V){s.value!==V&&(s.value=V,E())}function C(V){d.value!==V&&(d.value=V,E())}async function g(){try{const{devices:V}=await Ie.devices(),P=V.find(Y=>Y.id===i.value);if(!P){l.value=`Device "${i.value}" was not found. It may have been removed, or its plugin stopped.`;return}r.value=P,n.value=P.metrics??[],!s.value&&n.value.length>0&&(s.value=n.value[0].key)}catch(V){l.value=`Could not load device: ${V.message}`}}async function E(){var W,A;if(!s.value)return;const V=u.find($=>$.key===d.value),P=Math.floor(Date.now()/1e3),Y=P-V.seconds;a.value=!0;try{const $=await Ie.deviceMetrics(i.value,{metric:s.value,from:Y,to:P});c.value=((W=$.series)==null?void 0:W.points)??[],o.value=((A=$.series)==null?void 0:A.resolution)??0}catch($){l.value=`Could not load history: ${$.message}`}finally{a.value=!1}}let T=null,L=null;return lt(async()=>{await g(),await E(),T=setInterval(()=>void g(),5e3),L=setInterval(()=>void E(),3e4)}),mi(()=>{T&&clearInterval(T),L&&clearInterval(L)}),De(i,async()=>{r.value=null,n.value=[],s.value="",c.value=[],l.value="",await g(),await E()}),(V,P)=>{var $;const Y=lv,W=ct,A=X$;return m(),M("div",sz,[b("div",az,[G(Y,{items:h.value},null,8,["items"]),($=r.value)!=null&&$.model?(m(),M("span",lz,F(r.value.model),1)):z("",!0)]),l.value?(m(),M("div",oz,[G(W,{variant:"error"},{default:te(()=>[_e(F(l.value),1)]),_:1})])):r.value?(m(),M(ke,{key:1},[b("div",cz,[(m(!0),M(ke,null,Fe(n.value,Z=>(m(),M("div",{key:Z.key,class:Le(["summary-tile",{active:Z.key===s.value}]),onClick:ie=>w(Z.key)},[b("span",dz,F(Z.label),1),b("span",hz,[_e(F(_(S(Z),Z))+" ",1),b("span",fz,F(Z.unit),1)])],10,uz))),128))]),n.value.length===0?(m(),M("div",pz,[G(W,{variant:"helper"},{default:te(()=>[...P[0]||(P[0]=[_e(" This device does not declare any metrics, so there is nothing to chart. Plugins opt in by describing their series in the device descriptor. ",-1)])]),_:1})])):(m(),M(ke,{key:1},[b("div",_z,[b("div",mz,[(m(),M(ke,null,Fe(u,Z=>b("button",{key:Z.key,class:Le(["range-tab",{active:Z.key===d.value}]),onClick:ie=>C(Z.key)},F(Z.label),11,vz)),64))]),p.value?(m(),M("span",gz,F(p.value),1)):z("",!0)]),b("div",bz,[v.value.length>0&&v.value[0].data.length>0?(m(),me(A,{key:0,series:v.value,height:320,"show-legend":v.value.length>1,"show-grid":!0,"show-tooltip":!0,points:!1,curve:"smooth"},null,8,["series","show-legend"])):a.value?(m(),M("div",yz,"Loading…")):(m(),M("div",wz," No data recorded yet for this range. History starts accumulating once the device reports. "))])],64))],64)):(m(),M("div",Sz,"Loading…"))])}}}),kz=ii(Cz,[["__scopeId","data-v-6e2a0af1"]]),Fa=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},Az=Fa("magic-wand","0 0 256 256",'<path d="M244,152a4,4,0,0,1-4,4H220v20a4,4,0,0,1-8,0V156H192a4,4,0,0,1,0-8h20V128a4,4,0,0,1,8,0v20h20A4,4,0,0,1,244,152ZM56,68H76V88a4,4,0,0,0,8,0V68h20a4,4,0,0,0,0-8H84V40a4,4,0,0,0-8,0V60H56a4,4,0,0,0,0,8ZM184,196H172V184a4,4,0,0,0-8,0v12H152a4,4,0,0,0,0,8h12v12a4,4,0,0,0,8,0V204h12a4,4,0,0,0,0-8ZM216.48,77.17,77.17,216.49a12,12,0,0,1-17,0L39.51,195.8a12,12,0,0,1,0-17L178.83,39.51a12,12,0,0,1,17,0L216.48,60.2A12,12,0,0,1,216.48,77.17ZM170.34,112,144,85.66,45.17,184.49a4,4,0,0,0,0,5.65l20.68,20.69a4,4,0,0,0,5.66,0Zm40.49-46.14L190.14,45.17a4,4,0,0,0-5.66,0L149.65,80,176,106.34l34.83-34.83A4,4,0,0,0,210.83,65.86Z"/>'),Mz=Fa("magic-wand","0 0 256 256",'<path d="M246,152a6,6,0,0,1-6,6H222v18a6,6,0,0,1-12,0V158H192a6,6,0,0,1,0-12h18V128a6,6,0,0,1,12,0v18h18A6,6,0,0,1,246,152ZM56,70H74V88a6,6,0,0,0,12,0V70h18a6,6,0,0,0,0-12H86V40a6,6,0,0,0-12,0V58H56a6,6,0,0,0,0,12ZM184,194H174V184a6,6,0,0,0-12,0v10H152a6,6,0,0,0,0,12h10v10a6,6,0,0,0,12,0V206h10a6,6,0,0,0,0-12ZM217.9,78.59,78.58,217.9a14,14,0,0,1-19.8,0L38.09,197.21a14,14,0,0,1,0-19.8L177.41,38.1a14,14,0,0,1,19.8,0L217.9,58.79A14,14,0,0,1,217.9,78.59ZM167.51,112,144,88.49,46.58,185.9a2,2,0,0,0,0,2.83l20.69,20.68a2,2,0,0,0,2.82,0h0Zm41.9-44.73L188.73,46.59a2,2,0,0,0-2.83,0L152.48,80,176,103.52,209.41,70.1A2,2,0,0,0,209.41,67.27Z"/>'),tp=Fa("magic-wand","0 0 256 256",'<path d="M48,64a8,8,0,0,1,8-8H72V40a8,8,0,0,1,16,0V56h16a8,8,0,0,1,0,16H88V88a8,8,0,0,1-16,0V72H56A8,8,0,0,1,48,64ZM184,192h-8v-8a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0v-8h8a8,8,0,0,0,0-16Zm56-48H224V128a8,8,0,0,0-16,0v16H192a8,8,0,0,0,0,16h16v16a8,8,0,0,0,16,0V160h16a8,8,0,0,0,0-16ZM219.31,80,80,219.31a16,16,0,0,1-22.62,0L36.68,198.63a16,16,0,0,1,0-22.63L176,36.69a16,16,0,0,1,22.63,0l20.68,20.68A16,16,0,0,1,219.31,80Zm-54.63,32L144,91.31l-96,96L68.68,208ZM208,68.69,187.31,48l-32,32L176,100.69Z"/>'),Ez=Fa("magic-wand","0 0 256 256",'<path d="M252,152a12,12,0,0,1-12,12H228v12a12,12,0,0,1-24,0V164H192a12,12,0,0,1,0-24h12V128a12,12,0,0,1,24,0v12h12A12,12,0,0,1,252,152ZM56,76H68V88a12,12,0,0,0,24,0V76h12a12,12,0,1,0,0-24H92V40a12,12,0,0,0-24,0V52H56a12,12,0,0,0,0,24ZM184,188h-4v-4a12,12,0,0,0-24,0v4h-4a12,12,0,0,0,0,24h4v4a12,12,0,0,0,24,0v-4h4a12,12,0,0,0,0-24ZM222.14,82.83,82.82,222.14a20,20,0,0,1-28.28,0L33.85,201.46a20,20,0,0,1,0-28.29L173.17,33.86a20,20,0,0,1,28.28,0l20.69,20.68A20,20,0,0,1,222.14,82.83ZM159,112,144,97,53.65,187.31l15,15Zm43.31-43.31-15-15L161,80l15,15Z"/>'),Lz=Fa("magic-wand","0 0 256 256",'<path d="M248,152a8,8,0,0,1-8,8H224v16a8,8,0,0,1-16,0V160H192a8,8,0,0,1,0-16h16V128a8,8,0,0,1,16,0v16h16A8,8,0,0,1,248,152ZM56,72H72V88a8,8,0,0,0,16,0V72h16a8,8,0,0,0,0-16H88V40a8,8,0,0,0-16,0V56H56a8,8,0,0,0,0,16ZM184,192h-8v-8a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0v-8h8a8,8,0,0,0,0-16ZM219.31,80,80,219.31a16,16,0,0,1-22.62,0L36.68,198.63a16,16,0,0,1,0-22.63L176,36.69a16,16,0,0,1,22.63,0l20.68,20.68A16,16,0,0,1,219.31,80ZM208,68.69,187.31,48l-32,32L176,100.69Z"/>'),$z=Fa("magic-wand","0 0 256 256",'<path d="M176,112,74.34,213.66a8,8,0,0,1-11.31,0L42.34,193a8,8,0,0,1,0-11.31L144,80Z" opacity="0.2"/><path d="M248,152a8,8,0,0,1-8,8H224v16a8,8,0,0,1-16,0V160H192a8,8,0,0,1,0-16h16V128a8,8,0,0,1,16,0v16h16A8,8,0,0,1,248,152ZM56,72H72V88a8,8,0,0,0,16,0V72h16a8,8,0,0,0,0-16H88V40a8,8,0,0,0-16,0V56H56a8,8,0,0,0,0,16ZM184,192h-8v-8a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0v-8h8a8,8,0,0,0,0-16ZM219.31,80,80,219.31a16,16,0,0,1-22.62,0L36.68,198.63a16,16,0,0,1,0-22.63L176,36.69a16,16,0,0,1,22.63,0l20.68,20.68A16,16,0,0,1,219.31,80Zm-54.63,32L144,91.31l-96,96L68.68,208ZM208,68.69,187.31,48l-32,32L176,100.69Z"/>'),xz="magic-wand",Tz=Object.freeze(Object.defineProperty({__proto__:null,bold:Ez,default:tp,duotone:$z,fill:Lz,glyphName:xz,light:Mz,regular:tp,thin:Az},Symbol.toStringTag,{value:"Module"})),Hz={class:"config-view"},Nz={key:0,class:"error-banner"},Pz={key:1,class:"loading-state"},Oz=Re({__name:"ConfigView",setup(e){const t=ws(),{resolved:i}=Jc(),r=q(null),n=Zr(null),s=q(!1),a=q(!1),l=q(null),o=q(!0);lt(async()=>{t.setPage("Config",void 0,{fullBleed:!0});let d="{}";try{d=(await Ie.config.get()).content}catch(f){l.value=`Failed to load config: ${f}`}finally{o.value=!1}const h=await Hg.init();h.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,schemas:[{uri:"openbridge://config-schema",fileMatch:["*"],schema:{type:"object",properties:{bridge:{type:"object",description:"Bridge configuration",properties:{name:{type:"string",description:"Bridge display name"},port:{type:"number",description:"HTTP API port (default 8582)"},hapPort:{type:"number",description:"HomeKit HAP port (default 51829)"},pincode:{type:"string",description:"HomeKit pairing PIN (format: XXX-XX-XXX)"},username:{type:"string",description:"HAP username (MAC address format)"},logLevel:{type:"string",enum:["debug","info","warn","error"]}}},platforms:{type:"array",description:"Homebridge-compatible platform plugins",items:{type:"object",required:["platform"],properties:{platform:{type:"string",description:"Platform identifier"},plugin:{type:"string",description:"Absolute path to the plugin JS file"},enabled:{type:"boolean",default:!0}},additionalProperties:!0}},plugins:{type:"array",description:"Native OpenBridge plugins",items:{type:"object",required:["name"],properties:{name:{type:"string"},path:{type:"string"},enabled:{type:"boolean",default:!0},config:{type:"object"}}}}}}}]}),r.value&&(De(i,f=>h.editor.setTheme(f==="dark"?"vs-dark":"vs")),n.value=h.editor.create(r.value,{value:d,language:"json",theme:i.value==="dark"?"vs-dark":"vs",fontSize:13,fontFamily:'"MesloLGS NF", monospace',minimap:{enabled:!0},scrollBeyondLastLine:!1,formatOnPaste:!0,formatOnType:!0,tabSize:2,automaticLayout:!0,wordWrap:"off",bracketPairColorization:{enabled:!0},guides:{bracketPairs:!0},lineNumbers:"on",renderLineHighlight:"all",smoothScrolling:!0}))}),mi(()=>{var d;(d=n.value)==null||d.dispose()});async function c(){var d;if(!s.value){s.value=!0,l.value=null,a.value=!1;try{const h=((d=n.value)==null?void 0:d.getValue())??"";await Ie.config.save(h),a.value=!0,setTimeout(()=>{a.value=!1},2500)}catch(h){l.value=String(h)}finally{s.value=!1}}}function u(){var d,h;(h=(d=n.value)==null?void 0:d.getAction("editor.action.formatDocument"))==null||h.run()}return(d,h)=>{const f=oi,v=Ue;return m(),M("div",Hz,[(m(),me(dr,{defer:"",to:"#ob-topbar-left"},[h[0]||(h[0]=b("span",{class:"config-path"},"~/.openbridge/config.json",-1))])),(m(),me(dr,{defer:"",to:"#ob-topbar-right"},[G(f,{variant:"ghost",size:"sm",icon:Tz,title:"Format JSON",onClick:u},{default:te(()=>[...h[1]||(h[1]=[_e("Format",-1)])]),_:1}),G(f,{variant:"primary",size:"sm",icon:a.value?In:yc,loading:s.value,disabled:s.value,title:"Changes take effect after restarting the daemon",onClick:c},{default:te(()=>[_e(F(a.value?"Saved!":s.value?"Saving…":"Save"),1)]),_:1},8,["icon","loading","disabled"])])),l.value?(m(),M("div",Nz,[G(v,{name:de(Er),size:14},null,8,["name"]),_e(" "+F(l.value),1)])):z("",!0),o.value?(m(),M("div",Pz,[G(v,{name:de(Js),size:28},null,8,["name"]),h[2]||(h[2]=b("span",null,"Loading config...",-1))])):(m(),M("div",{key:2,ref_key:"editorContainer",ref:r,class:"editor-container"},null,512))])}}}),Rz=ii(Oz,[["__scopeId","data-v-483debe2"]]),Iz=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},Dz=Iz("bridge","0 0 256 256",'<path d="M232,160H200V101.34a71.89,71.89,0,0,0,29,21.42,8,8,0,0,0,6-14.83A55.78,55.78,0,0,1,200,56a8,8,0,0,0-16,0A56,56,0,0,1,72,56a8,8,0,0,0-16,0,55.78,55.78,0,0,1-35,51.93,8,8,0,0,0,6,14.83,71.89,71.89,0,0,0,29-21.42V160H24a8,8,0,0,0,0,16H56v24a8,8,0,0,0,16,0V176H184v24a8,8,0,0,0,16,0V176h32a8,8,0,0,0,0-16Zm-88-33.8V160H112V126.2a72,72,0,0,0,32,0Zm-72-25a72.47,72.47,0,0,0,24,19.27V160H72ZM160,160V120.48a72.47,72.47,0,0,0,24-19.27V160Z"/>'),Vz=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},Zz=Vz("palette","0 0 256 256",'<path d="M200.77,53.89A103.27,103.27,0,0,0,128,24h-1.07A104,104,0,0,0,24,128c0,43,26.58,79.06,69.36,94.17A32,32,0,0,0,136,192a16,16,0,0,1,16-16h46.21a31.81,31.81,0,0,0,31.2-24.88,104.43,104.43,0,0,0,2.59-24A103.28,103.28,0,0,0,200.77,53.89Zm13,93.71A15.89,15.89,0,0,1,198.21,160H152a32,32,0,0,0-32,32,16,16,0,0,1-21.31,15.07C62.49,194.3,40,164,40,128a88,88,0,0,1,87.09-88h.9a88.35,88.35,0,0,1,88,87.25A88.86,88.86,0,0,1,213.81,147.6ZM140,76a12,12,0,1,1-12-12A12,12,0,0,1,140,76ZM96,100A12,12,0,1,1,84,88,12,12,0,0,1,96,100Zm0,56a12,12,0,1,1-12-12A12,12,0,0,1,96,156Zm88-56a12,12,0,1,1-12-12A12,12,0,0,1,184,100Z"/>'),Bz={class:"settings-view"},Fz={class:"card-header"},zz={class:"card-icon"},Uz={class:"pin-row"},Wz={class:"card-actions"},jz={key:0,class:"action-hint"},Kz={class:"card-header"},qz={class:"card-icon"},Gz={class:"update-row"},Yz={class:"update-versions"},Xz={class:"update-actions"},Jz={class:"update-command"},Qz={key:3,class:"update-error-row"},eU={class:"card-header"},tU={class:"card-icon"},iU={class:"info-title"},rU=Re({__name:"SettingsView",setup(e){const t=ws(),i=Wo(),r=j(()=>{var $;return!!(($=i.config.value)!=null&&$.enabled&&i.user.value)}),n=Jc(),s=[{label:"Light",value:"light"},{label:"Dark",value:"dark"},{label:"Match my system",value:"system"}],a=[{value:"debug",label:"Debug"},{value:"info",label:"Info"},{value:"warn",label:"Warn"},{value:"error",label:"Error"}],l=q(!1),o=q(!1),c=q(null),u=q(!1),d=q(null),h=q(!1),f=q(!1),v=q(!1),p=q(null),S=q(""),_=q(0),w=q("");let C=null;async function g(){h.value=!0,p.value=null;try{d.value=await Ie.updates.check()}catch($){p.value=String($)}finally{h.value=!1}}function E(){const $=location.protocol==="https:"?"wss":"ws";C=new WebSocket(`${$}://${location.host}/ws/updates`),C.onmessage=Z=>{try{const ie=JSON.parse(Z.data);S.value=ie.stage??"",_.value=Math.round((ie.progress??0)*100),w.value=ie.message??"",ie.stage==="restarting"&&T(),ie.stage==="error"&&(p.value=ie.message,f.value=!1)}catch{}},C.onclose=()=>{f.value&&T()}}function T(){let $=0;const Z=setInterval(async()=>{$++;try{await Ie.health(),clearInterval(Z),f.value=!1,S.value="",w.value="",d.value=null,await g()}catch{}$>60&&(clearInterval(Z),f.value=!1,p.value="Timed out waiting for restart")},2e3)}async function L(){if(!f.value){f.value=!0,v.value=!1,p.value=null,S.value="downloading",w.value="Starting update...",_.value=0,E();try{await Ie.updates.apply(),v.value=!0}catch($){p.value=$ instanceof Error?$.message:String($),f.value=!1}}}async function V(){if(!f.value){f.value=!0,p.value=null,w.value="Rolling back...";try{await Ie.updates.rollback(),T()}catch($){p.value=$ instanceof Error?$.message:String($),f.value=!1}}}const P=q({name:"OpenBridge",port:8582,hapPort:51829,pincode:"031-45-154",username:"",logLevel:"info"});lt(async()=>{t.setPage("Settings");try{const $=await Ie.bridge();$&&typeof $=="object"&&(P.value={name:$.name??"OpenBridge",port:$.port??8582,hapPort:$.hapPort??51829,pincode:$.pincode??"031-45-154",username:$.username??"",logLevel:$.logLevel??"info"})}catch{}g()}),Oi(()=>{C&&(C.close(),C=null)});async function Y(){if(!l.value){l.value=!0,c.value=null,o.value=!1;try{const $={name:P.value.name,port:Number(P.value.port),hapPort:Number(P.value.hapPort),pincode:P.value.pincode,logLevel:P.value.logLevel};P.value.username&&($.username=P.value.username),await Ie.saveBridge($),o.value=!0,setTimeout(()=>{o.value=!1},3e3)}catch($){c.value=String($)}finally{l.value=!1}}}async function W(){if(!u.value){u.value=!0;try{await Ie.daemon.restart();let $=0;const Z=setInterval(async()=>{$++;try{await Ie.health(),clearInterval(Z),location.reload()}catch{}$>60&&(clearInterval(Z),u.value=!1)},1e3)}catch{u.value=!1}}}function A(){const $=()=>Math.floor(Math.random()*9)+1,Z=()=>`${$()}${Math.floor(Math.random()*10)}${Math.floor(Math.random()*10)}`,ie=()=>`${Math.floor(Math.random()*10)}${Math.floor(Math.random()*10)}`;P.value.pincode=`${Z()}-${ie()}-${Z()}`}return($,Z)=>{const ie=Ue,ne=ha,ce=rv,J=i2,ae=oi,re=zo,X=or,le=ct,ve=Fo,ue=bs,he=Uv,ye=fv;return m(),M("div",Bz,[G(ve,{class:"settings-card"},{default:te(()=>[b("div",Fz,[b("div",zz,[G(ie,{name:de(Dz),size:18},null,8,["name"])]),Z[7]||(Z[7]=b("div",null,[b("h2",{class:"card-title"},"Bridge"),b("p",{class:"card-subtitle"},"HomeKit bridge identity and network settings")],-1))]),G(X,{dir:"col",gap:"sm",class:"field-grid"},{default:te(()=>[G(ce,{label:"Bridge name",hint:"Displayed in the Home app"},{default:te(()=>[G(ne,{modelValue:P.value.name,"onUpdate:modelValue":Z[0]||(Z[0]=U=>P.value.name=U),size:"sm",placeholder:"OpenBridge"},null,8,["modelValue"])]),_:1}),G(ce,{label:"HTTP port",hint:"OpenBridge web UI & API",control:"fit"},{default:te(()=>[G(J,{modelValue:P.value.port,"onUpdate:modelValue":Z[1]||(Z[1]=U=>P.value.port=U),size:"sm",min:1024,max:65535},null,8,["modelValue"])]),_:1}),G(ce,{label:"HAP port",hint:"HomeKit accessory protocol port",control:"fit"},{default:te(()=>[G(J,{modelValue:P.value.hapPort,"onUpdate:modelValue":Z[2]||(Z[2]=U=>P.value.hapPort=U),size:"sm",min:1024,max:65535},null,8,["modelValue"])]),_:1}),G(ce,{label:"PIN code",hint:"Format: XXX-XX-XXX, used to pair with HomeKit"},{default:te(()=>[b("div",Uz,[G(ne,{modelValue:P.value.pincode,"onUpdate:modelValue":Z[3]||(Z[3]=U=>P.value.pincode=U),size:"sm",placeholder:"031-45-154"},null,8,["modelValue"]),G(ae,{variant:"ghost",size:"sm",icon:hs,title:"Generate random PIN",onClick:A})])]),_:1}),G(ce,{label:"Bridge MAC",hint:"Leave empty to auto-generate. Change this only if pairing with HomeKit fails."},{default:te(()=>[G(ne,{modelValue:P.value.username,"onUpdate:modelValue":Z[4]||(Z[4]=U=>P.value.username=U),size:"sm",class:"mono",placeholder:"AA:BB:CC:DD:EE:FF"},null,8,["modelValue"])]),_:1}),G(ce,{label:"Log level",control:"fit"},{default:te(()=>[G(re,{modelValue:P.value.logLevel,"onUpdate:modelValue":Z[5]||(Z[5]=U=>P.value.logLevel=U),size:"sm",options:a},null,8,["modelValue"])]),_:1})]),_:1}),c.value?(m(),me(le,{key:0,variant:"error"},{default:te(()=>[_e(F(c.value),1)]),_:1})):z("",!0),b("div",Wz,[G(ae,{variant:"primary",size:"sm",loading:l.value,icon:o.value?In:yc,onClick:Y},{default:te(()=>[_e(F(o.value?"Saved!":"Save"),1)]),_:1},8,["loading","icon"]),G(ae,{variant:"secondary",size:"sm",outlined:"",loading:u.value,icon:u.value?Lo:hs,onClick:W},{default:te(()=>[_e(F(u.value?"Restarting…":"Save & Restart OpenBridge"),1)]),_:1},8,["loading","icon"]),o.value&&!u.value?(m(),M("span",jz,[G(ie,{name:de(oc),size:12},null,8,["name"]),Z[8]||(Z[8]=_e(" Restart the daemon for changes to take effect ",-1))])):z("",!0)])]),_:1}),G(ve,{class:"settings-card"},{default:te(()=>{var U,fe;return[b("div",Kz,[b("div",qz,[G(ie,{name:de(pd),size:18},null,8,["name"])]),Z[9]||(Z[9]=b("div",null,[b("h2",{class:"card-title"},"Updates"),b("p",{class:"card-subtitle"},"OpenBridge daemon and UI")],-1))]),b("div",Gz,[b("div",Yz,[G(ue,{variant:"grey"},{default:te(()=>{var ge;return[_e("Current: v"+F(((ge=d.value)==null?void 0:ge.current)??"…"),1)]}),_:1}),d.value&&!h.value?(m(),M(ke,{key:0},[d.value.updateAvailable?(m(),me(ue,{key:0,variant:"blue"},{default:te(()=>[_e("Available: v"+F(d.value.latest),1)]),_:1})):d.value.latest===null?(m(),me(ue,{key:1,variant:"orange"},{default:te(()=>[...Z[10]||(Z[10]=[_e("Unable to check",-1)])]),_:1})):(m(),me(ue,{key:2,variant:"green"},{default:te(()=>[...Z[11]||(Z[11]=[_e("Up to date",-1)])]),_:1}))],64)):z("",!0),h.value?(m(),me(ue,{key:1,variant:"grey"},{default:te(()=>[...Z[12]||(Z[12]=[_e("Checking…",-1)])]),_:1})):z("",!0)]),b("div",Xz,[G(ae,{variant:"secondary",size:"sm",outlined:"",loading:h.value,icon:hs,onClick:g},{default:te(()=>[...Z[13]||(Z[13]=[_e(" Check ",-1)])]),_:1},8,["loading"]),(U=d.value)!=null&&U.updateAvailable&&d.value.updateMethod==="self"?(m(),me(ae,{key:0,variant:"primary",size:"sm",loading:f.value,icon:f.value?Lo:c2,onClick:L},{default:te(()=>[_e(F(f.value?"Updating…":"Install update"),1)]),_:1},8,["loading","icon"])):z("",!0)])]),f.value&&S.value?(m(),me(he,{key:0,label:w.value,value:S.value==="downloading"&&_.value>0?_.value:void 0,max:100,status:"active",size:"sm"},null,8,["label","value"])):z("",!0),f.value&&!S.value?(m(),me(le,{key:1,variant:"helper"},{default:te(()=>[...Z[14]||(Z[14]=[_e(" Starting update... This page will reconnect automatically. ",-1)])]),_:1})):z("",!0),((fe=d.value)==null?void 0:fe.updateMethod)==="manual"&&d.value.updateAvailable?(m(),me(le,{key:2,variant:"helper"},{default:te(()=>[d.value.pinnedTo?(m(),M(ke,{key:0},[_e(" This deployment is pinned to "+F(d.value.pinnedTo)+". To move version: ",1)],64)):d.value.updateBlockedBy?(m(),M(ke,{key:1},[_e(" Self-update is not available here ("+F(d.value.updateBlockedBy)+"). To update: ",1)],64)):(m(),M(ke,{key:2},[_e("Self-update is not available for this install. To update:")],64)),b("code",Jz,F(d.value.updateCommand),1)]),_:1})):z("",!0),p.value?(m(),M("div",Qz,[G(le,{variant:"error"},{default:te(()=>[_e(F(p.value),1)]),_:1}),v.value?(m(),me(ae,{key:0,variant:"ghost",size:"sm",onClick:V},{default:te(()=>[...Z[15]||(Z[15]=[_e("Rollback",-1)])]),_:1})):z("",!0)])):z("",!0)]}),_:1}),r.value?z("",!0):(m(),me(ve,{key:0,class:"settings-card"},{default:te(()=>[b("div",eU,[b("div",tU,[G(ie,{name:de(Zz),size:18},null,8,["name"])]),Z[16]||(Z[16]=b("div",null,[b("h2",{class:"card-title"},"Appearance"),b("p",{class:"card-subtitle"},"Theme for this browser")],-1))]),G(X,{dir:"col",gap:"sm",class:"field-grid"},{default:te(()=>[G(ce,{label:"Theme"},{default:te(()=>[G(ye,{name:"settings-theme",options:s,"model-value":de(n).theme.value,"onUpdate:modelValue":Z[6]||(Z[6]=U=>de(n).setTheme(U))},null,8,["model-value"])]),_:1})]),_:1})]),_:1})),G(ve,{class:"settings-card info-card"},{default:te(()=>[b("h3",iU,[G(ie,{name:de(oc),size:14},null,8,["name"]),Z[17]||(Z[17]=_e(" How to pair with HomeKit ",-1))]),Z[18]||(Z[18]=b("ol",{class:"info-list"},[b("li",null,[_e(" Open the "),b("strong",null,"Home"),_e(" app on your iPhone or iPad ")]),b("li",null,[_e(" Tap "),b("strong",null,"+"),_e(" → "),b("strong",null,"Add Accessory")]),b("li",null,[_e(" Scan the QR code from the Dashboard, or tap "),b("strong",null,"More options"),_e(" and enter the PIN code manually ")]),b("li",null,"If you change the PIN or username, unpair first from the Home app, then re-pair")],-1))]),_:1})])}}}),nU=ii(rU,[["__scopeId","data-v-90143f78"]]);/**
71
- * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
72
- * @license MIT
73
- *
74
- * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
75
- * @license MIT
76
- *
77
- * Originally forked from (with the author's permission):
78
- * Fabrice Bellard's javascript vt100 for jslinux:
79
- * http://bellard.org/jslinux/
80
- * Copyright (c) 2011 Fabrice Bellard
81
- */var Dg=Object.defineProperty,sU=Object.getOwnPropertyDescriptor,aU=(e,t)=>{for(var i in t)Dg(e,i,{get:t[i],enumerable:!0})},Pt=(e,t,i,r)=>{for(var n=r>1?void 0:r?sU(t,i):t,s=e.length-1,a;s>=0;s--)(a=e[s])&&(n=(r?a(t,i,n):a(n))||n);return r&&n&&Dg(t,i,n),n},Ne=(e,t)=>(i,r)=>t(i,r,e),ip="Terminal input",wd={get:()=>ip,set:e=>ip=e},rp="Too much output to announce, navigate to rows manually to read",Sd={get:()=>rp,set:e=>rp=e};function lU(e){return e.replace(/\r?\n/g,"\r")}function oU(e,t){return t?"\x1B[200~"+e+"\x1B[201~":e}function cU(e,t){e.clipboardData&&e.clipboardData.setData("text/plain",t.selectionText),e.preventDefault()}function uU(e,t,i,r){if(e.stopPropagation(),e.clipboardData){let n=e.clipboardData.getData("text/plain");Vg(n,t,i,r)}}function Vg(e,t,i,r){e=lU(e),e=oU(e,i.decPrivateModes.bracketedPasteMode&&r.rawOptions.ignoreBracketedPasteMode!==!0),i.triggerDataEvent(e,!0),t.value=""}function Zg(e,t,i){let r=i.getBoundingClientRect(),n=e.clientX-r.left-10,s=e.clientY-r.top-10;t.style.width="20px",t.style.height="20px",t.style.left=`${n}px`,t.style.top=`${s}px`,t.style.zIndex="1000",t.focus()}function np(e,t,i,r,n){Zg(e,t,i),n&&r.rightClickSelect(e),t.value=r.selectionText,t.select()}function kn(e){return e>65535?(e-=65536,String.fromCharCode((e>>10)+55296)+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)}function uu(e,t=0,i=e.length){let r="";for(let n=t;n<i;++n){let s=e[n];s>65535?(s-=65536,r+=String.fromCharCode((s>>10)+55296)+String.fromCharCode(s%1024+56320)):r+=String.fromCharCode(s)}return r}var dU=class{constructor(){this._interim=0}clear(){this._interim=0}decode(e,t){let i=e.length;if(!i)return 0;let r=0,n=0;if(this._interim){let s=e.charCodeAt(n++);56320<=s&&s<=57343?t[r++]=(this._interim-55296)*1024+s-56320+65536:(t[r++]=this._interim,t[r++]=s),this._interim=0}for(let s=n;s<i;++s){let a=e.charCodeAt(s);if(55296<=a&&a<=56319){if(++s>=i)return this._interim=a,r;let l=e.charCodeAt(s);56320<=l&&l<=57343?t[r++]=(a-55296)*1024+l-56320+65536:(t[r++]=a,t[r++]=l);continue}a!==65279&&(t[r++]=a)}return r}},hU=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(e,t){let i=e.length;if(!i)return 0;let r=0,n,s,a,l,o=0,c=0;if(this.interim[0]){let h=!1,f=this.interim[0];f&=(f&224)===192?31:(f&240)===224?15:7;let v=0,p;for(;(p=this.interim[++v]&63)&&v<4;)f<<=6,f|=p;let S=(this.interim[0]&224)===192?2:(this.interim[0]&240)===224?3:4,_=S-v;for(;c<_;){if(c>=i)return 0;if(p=e[c++],(p&192)!==128){c--,h=!0;break}else this.interim[v++]=p,f<<=6,f|=p&63}h||(S===2?f<128?c--:t[r++]=f:S===3?f<2048||f>=55296&&f<=57343||f===65279||(t[r++]=f):f<65536||f>1114111||(t[r++]=f)),this.interim.fill(0)}let u=i-4,d=c;for(;d<i;){for(;d<u&&!((n=e[d])&128)&&!((s=e[d+1])&128)&&!((a=e[d+2])&128)&&!((l=e[d+3])&128);)t[r++]=n,t[r++]=s,t[r++]=a,t[r++]=l,d+=4;if(n=e[d++],n<128)t[r++]=n;else if((n&224)===192){if(d>=i)return this.interim[0]=n,r;if(s=e[d++],(s&192)!==128){d--;continue}if(o=(n&31)<<6|s&63,o<128){d--;continue}t[r++]=o}else if((n&240)===224){if(d>=i)return this.interim[0]=n,r;if(s=e[d++],(s&192)!==128){d--;continue}if(d>=i)return this.interim[0]=n,this.interim[1]=s,r;if(a=e[d++],(a&192)!==128){d--;continue}if(o=(n&15)<<12|(s&63)<<6|a&63,o<2048||o>=55296&&o<=57343||o===65279)continue;t[r++]=o}else if((n&248)===240){if(d>=i)return this.interim[0]=n,r;if(s=e[d++],(s&192)!==128){d--;continue}if(d>=i)return this.interim[0]=n,this.interim[1]=s,r;if(a=e[d++],(a&192)!==128){d--;continue}if(d>=i)return this.interim[0]=n,this.interim[1]=s,this.interim[2]=a,r;if(l=e[d++],(l&192)!==128){d--;continue}if(o=(n&7)<<18|(s&63)<<12|(a&63)<<6|l&63,o<65536||o>1114111)continue;t[r++]=o}}return r}},Bg="",En=" ",qo=class Fg{constructor(){this.fg=0,this.bg=0,this.extended=new kc}static toColorRGB(t){return[t>>>16&255,t>>>8&255,t&255]}static fromColorRGB(t){return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255}clone(){let t=new Fg;return t.fg=this.fg,t.bg=this.bg,t.extended=this.extended.clone(),t}isInverse(){return this.fg&67108864}isBold(){return this.fg&134217728}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:this.fg&268435456}isBlink(){return this.fg&536870912}isInvisible(){return this.fg&1073741824}isItalic(){return this.bg&67108864}isDim(){return this.bg&134217728}isStrikethrough(){return this.fg&2147483648}isProtected(){return this.bg&536870912}isOverline(){return this.bg&1073741824}getFgColorMode(){return this.fg&50331648}getBgColorMode(){return this.bg&50331648}isFgRGB(){return(this.fg&50331648)===50331648}isBgRGB(){return(this.bg&50331648)===50331648}isFgPalette(){return(this.fg&50331648)===16777216||(this.fg&50331648)===33554432}isBgPalette(){return(this.bg&50331648)===16777216||(this.bg&50331648)===33554432}isFgDefault(){return(this.fg&50331648)===0}isBgDefault(){return(this.bg&50331648)===0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(this.fg&50331648){case 16777216:case 33554432:return this.fg&255;case 50331648:return this.fg&16777215;default:return-1}}getBgColor(){switch(this.bg&50331648){case 16777216:case 33554432:return this.bg&255;case 50331648:return this.bg&16777215;default:return-1}}hasExtendedAttrs(){return this.bg&268435456}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(this.bg&268435456&&~this.extended.underlineColor)switch(this.extended.underlineColor&50331648){case 16777216:case 33554432:return this.extended.underlineColor&255;case 50331648:return this.extended.underlineColor&16777215;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return this.bg&268435456&&~this.extended.underlineColor?this.extended.underlineColor&50331648:this.getFgColorMode()}isUnderlineColorRGB(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===50331648:this.isFgRGB()}isUnderlineColorPalette(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===16777216||(this.extended.underlineColor&50331648)===33554432:this.isFgPalette()}isUnderlineColorDefault(){return this.bg&268435456&&~this.extended.underlineColor?(this.extended.underlineColor&50331648)===0:this.isFgDefault()}getUnderlineStyle(){return this.fg&268435456?this.bg&268435456?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}},kc=class zg{constructor(t=0,i=0){this._ext=0,this._urlId=0,this._ext=t,this._urlId=i}get ext(){return this._urlId?this._ext&-469762049|this.underlineStyle<<26:this._ext}set ext(t){this._ext=t}get underlineStyle(){return this._urlId?5:(this._ext&469762048)>>26}set underlineStyle(t){this._ext&=-469762049,this._ext|=t<<26&469762048}get underlineColor(){return this._ext&67108863}set underlineColor(t){this._ext&=-67108864,this._ext|=t&67108863}get urlId(){return this._urlId}set urlId(t){this._urlId=t}get underlineVariantOffset(){let t=(this._ext&3758096384)>>29;return t<0?t^4294967288:t}set underlineVariantOffset(t){this._ext&=536870911,this._ext|=t<<29&3758096384}clone(){return new zg(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}},tr=class Ug extends qo{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new kc,this.combinedData=""}static fromCharData(t){let i=new Ug;return i.setFromCharData(t),i}isCombined(){return this.content&2097152}getWidth(){return this.content>>22}getChars(){return this.content&2097152?this.combinedData:this.content&2097151?kn(this.content&2097151):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):this.content&2097151}setFromCharData(t){this.fg=t[0],this.bg=0;let i=!1;if(t[1].length>2)i=!0;else if(t[1].length===2){let r=t[1].charCodeAt(0);if(55296<=r&&r<=56319){let n=t[1].charCodeAt(1);56320<=n&&n<=57343?this.content=(r-55296)*1024+n-56320+65536|t[2]<<22:i=!0}else i=!0}else this.content=t[1].charCodeAt(0)|t[2]<<22;i&&(this.combinedData=t[1],this.content=2097152|t[2]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},sp="di$target",Cd="di$dependencies",e1=new Map;function fU(e){return e[Cd]||[]}function ci(e){if(e1.has(e))return e1.get(e);let t=function(i,r,n){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");pU(t,i,n)};return t._id=e,e1.set(e,t),t}function pU(e,t,i){t[sp]===t?t[Cd].push({id:e,index:i}):(t[Cd]=[{id:e,index:i}],t[sp]=t)}var Ti=ci("BufferService"),Wg=ci("CoreMouseService"),Ss=ci("CoreService"),_U=ci("CharsetService"),_2=ci("InstantiationService"),jg=ci("LogService"),Hi=ci("OptionsService"),Kg=ci("OscLinkService"),mU=ci("UnicodeService"),Go=ci("DecorationService"),kd=class{constructor(e,t,i){this._bufferService=e,this._optionsService=t,this._oscLinkService=i}provideLinks(e,t){var u;let i=this._bufferService.buffer.lines.get(e-1);if(!i){t(void 0);return}let r=[],n=this._optionsService.rawOptions.linkHandler,s=new tr,a=i.getTrimmedLength(),l=-1,o=-1,c=!1;for(let d=0;d<a;d++)if(!(o===-1&&!i.hasContent(d))){if(i.loadCell(d,s),s.hasExtendedAttrs()&&s.extended.urlId)if(o===-1){o=d,l=s.extended.urlId;continue}else c=s.extended.urlId!==l;else o!==-1&&(c=!0);if(c||o!==-1&&d===a-1){let h=(u=this._oscLinkService.getLinkData(l))==null?void 0:u.uri;if(h){let f={start:{x:o+1,y:e},end:{x:d+(!c&&d===a-1?1:0),y:e}},v=!1;if(!(n!=null&&n.allowNonHttpProtocols))try{let p=new URL(h);["http:","https:"].includes(p.protocol)||(v=!0)}catch{v=!0}v||r.push({text:h,range:f,activate:(p,S)=>n?n.activate(p,S,f):vU(p,S),hover:(p,S)=>{var _;return(_=n==null?void 0:n.hover)==null?void 0:_.call(n,p,S,f)},leave:(p,S)=>{var _;return(_=n==null?void 0:n.leave)==null?void 0:_.call(n,p,S,f)}})}c=!1,s.hasExtendedAttrs()&&s.extended.urlId?(o=d,l=s.extended.urlId):(o=-1,l=-1)}}t(r)}};kd=Pt([Ne(0,Ti),Ne(1,Hi),Ne(2,Kg)],kd);function vU(e,t){if(confirm(`Do you want to navigate to ${t}?
82
-
83
- WARNING: This link could potentially be dangerous`)){let i=window.open();if(i){try{i.opener=null}catch{}i.location.href=t}else console.warn("Opening link blocked as opener could not be cleared")}}var du=ci("CharSizeService"),dn=ci("CoreBrowserService"),m2=ci("MouseService"),hn=ci("RenderService"),gU=ci("SelectionService"),qg=ci("CharacterJoinerService"),za=ci("ThemeService"),Gg=ci("LinkProviderService"),bU=class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?ap.isErrorNoTelemetry(e)?new ap(e.message+`
84
-
85
- `+e.stack):new Error(e.message+`
86
-
87
- `+e.stack):e},0)}}addListener(e){return this.listeners.push(e),()=>{this._removeListener(e)}}emit(e){this.listeners.forEach(t=>{t(e)})}_removeListener(e){this.listeners.splice(this.listeners.indexOf(e),1)}setUnexpectedErrorHandler(e){this.unexpectedErrorHandler=e}getUnexpectedErrorHandler(){return this.unexpectedErrorHandler}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}},yU=new bU;function D0(e){wU(e)||yU.onUnexpectedError(e)}var Ad="Canceled";function wU(e){return e instanceof SU?!0:e instanceof Error&&e.name===Ad&&e.message===Ad}var SU=class extends Error{constructor(){super(Ad),this.name=this.message}};function CU(e){return new Error(`Illegal argument: ${e}`)}var ap=class Md extends Error{constructor(t){super(t),this.name="CodeExpectedError"}static fromError(t){if(t instanceof Md)return t;let i=new Md;return i.message=t.message,i.stack=t.stack,i}static isErrorNoTelemetry(t){return t.name==="CodeExpectedError"}},Ed=class Yg extends Error{constructor(t){super(t||"An unexpected bug occurred."),Object.setPrototypeOf(this,Yg.prototype)}};function Ii(e,t=0){return e[e.length-(1+t)]}var kU;(e=>{function t(s){return s<0}e.isLessThan=t;function i(s){return s<=0}e.isLessThanOrEqual=i;function r(s){return s>0}e.isGreaterThan=r;function n(s){return s===0}e.isNeitherLessOrGreaterThan=n,e.greaterThan=1,e.lessThan=-1,e.neitherLessOrGreaterThan=0})(kU||(kU={}));function AU(e,t){let i=this,r=!1,n;return function(){return r||(r=!0,t||(n=e.apply(i,arguments))),n}}var Xg;(e=>{function t(g){return g&&typeof g=="object"&&typeof g[Symbol.iterator]=="function"}e.is=t;let i=Object.freeze([]);function r(){return i}e.empty=r;function*n(g){yield g}e.single=n;function s(g){return t(g)?g:n(g)}e.wrap=s;function a(g){return g||i}e.from=a;function*l(g){for(let E=g.length-1;E>=0;E--)yield g[E]}e.reverse=l;function o(g){return!g||g[Symbol.iterator]().next().done===!0}e.isEmpty=o;function c(g){return g[Symbol.iterator]().next().value}e.first=c;function u(g,E){let T=0;for(let L of g)if(E(L,T++))return!0;return!1}e.some=u;function d(g,E){for(let T of g)if(E(T))return T}e.find=d;function*h(g,E){for(let T of g)E(T)&&(yield T)}e.filter=h;function*f(g,E){let T=0;for(let L of g)yield E(L,T++)}e.map=f;function*v(g,E){let T=0;for(let L of g)yield*E(L,T++)}e.flatMap=v;function*p(...g){for(let E of g)yield*E}e.concat=p;function S(g,E,T){let L=T;for(let V of g)L=E(L,V);return L}e.reduce=S;function*_(g,E,T=g.length){for(E<0&&(E+=g.length),T<0?T+=g.length:T>g.length&&(T=g.length);E<T;E++)yield g[E]}e.slice=_;function w(g,E=Number.POSITIVE_INFINITY){let T=[];if(E===0)return[T,g];let L=g[Symbol.iterator]();for(let V=0;V<E;V++){let P=L.next();if(P.done)return[T,e.empty()];T.push(P.value)}return[T,{[Symbol.iterator](){return L}}]}e.consume=w;async function C(g){let E=[];for await(let T of g)E.push(T);return Promise.resolve(E)}e.asyncToArray=C})(Xg||(Xg={}));function vs(e){if(Xg.is(e)){let t=[];for(let i of e)if(i)try{i.dispose()}catch(r){t.push(r)}if(t.length===1)throw t[0];if(t.length>1)throw new AggregateError(t,"Encountered errors while disposing of store");return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function MU(...e){return Et(()=>vs(e))}function Et(e){return{dispose:AU(()=>{e()})}}var Jg=class Qg{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{vs(this._toDispose)}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Qg.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(t),t}delete(t){if(t){if(t===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(t),t.dispose()}}deleteAndLeak(t){t&&this._toDispose.has(t)&&(this._toDispose.delete(t),void 0)}};Jg.DISABLE_DISPOSED_WARNING=!1;var Tn=Jg,Je=class{constructor(){this._store=new Tn,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}};Je.None=Object.freeze({dispose(){}});var ra=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||((t=this._value)==null||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,(e=this._value)==null||e.dispose(),this._value=void 0}clearAndLeak(){let e=this._value;return this._value=void 0,e}},an=typeof window=="object"?window:globalThis,Ld=class $d{constructor(t){this.element=t,this.next=$d.Undefined,this.prev=$d.Undefined}};Ld.Undefined=new Ld(void 0);var Lt=Ld,lp=class{constructor(){this._first=Lt.Undefined,this._last=Lt.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===Lt.Undefined}clear(){let e=this._first;for(;e!==Lt.Undefined;){let t=e.next;e.prev=Lt.Undefined,e.next=Lt.Undefined,e=t}this._first=Lt.Undefined,this._last=Lt.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){let i=new Lt(e);if(this._first===Lt.Undefined)this._first=i,this._last=i;else if(t){let n=this._last;this._last=i,i.prev=n,n.next=i}else{let n=this._first;this._first=i,i.next=n,n.prev=i}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(i))}}shift(){if(this._first!==Lt.Undefined){let e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==Lt.Undefined){let e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==Lt.Undefined&&e.next!==Lt.Undefined){let t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===Lt.Undefined&&e.next===Lt.Undefined?(this._first=Lt.Undefined,this._last=Lt.Undefined):e.next===Lt.Undefined?(this._last=this._last.prev,this._last.next=Lt.Undefined):e.prev===Lt.Undefined&&(this._first=this._first.next,this._first.prev=Lt.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==Lt.Undefined;)yield e.element,e=e.next}},EU=globalThis.performance&&typeof globalThis.performance.now=="function",LU=class eb{static create(t){return new eb(t)}constructor(t){this._now=EU&&t===!1?Date.now:globalThis.performance.now.bind(globalThis.performance),this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}},fi;(e=>{e.None=()=>Je.None;function t(A,$){return d(A,()=>{},0,void 0,!0,void 0,$)}e.defer=t;function i(A){return($,Z=null,ie)=>{let ne=!1,ce;return ce=A(J=>{if(!ne)return ce?ce.dispose():ne=!0,$.call(Z,J)},null,ie),ne&&ce.dispose(),ce}}e.once=i;function r(A,$,Z){return c((ie,ne=null,ce)=>A(J=>ie.call(ne,$(J)),null,ce),Z)}e.map=r;function n(A,$,Z){return c((ie,ne=null,ce)=>A(J=>{$(J),ie.call(ne,J)},null,ce),Z)}e.forEach=n;function s(A,$,Z){return c((ie,ne=null,ce)=>A(J=>$(J)&&ie.call(ne,J),null,ce),Z)}e.filter=s;function a(A){return A}e.signal=a;function l(...A){return($,Z=null,ie)=>{let ne=MU(...A.map(ce=>ce(J=>$.call(Z,J))));return u(ne,ie)}}e.any=l;function o(A,$,Z,ie){let ne=Z;return r(A,ce=>(ne=$(ne,ce),ne),ie)}e.reduce=o;function c(A,$){let Z,ie={onWillAddFirstListener(){Z=A(ne.fire,ne)},onDidRemoveLastListener(){Z==null||Z.dispose()}},ne=new xe(ie);return $==null||$.add(ne),ne.event}function u(A,$){return $ instanceof Array?$.push(A):$&&$.add(A),A}function d(A,$,Z=100,ie=!1,ne=!1,ce,J){let ae,re,X,le=0,ve,ue={leakWarningThreshold:ce,onWillAddFirstListener(){ae=A(ye=>{le++,re=$(re,ye),ie&&!X&&(he.fire(re),re=void 0),ve=()=>{let U=re;re=void 0,X=void 0,(!ie||le>1)&&he.fire(U),le=0},typeof Z=="number"?(clearTimeout(X),X=setTimeout(ve,Z)):X===void 0&&(X=0,queueMicrotask(ve))})},onWillRemoveListener(){ne&&le>0&&(ve==null||ve())},onDidRemoveLastListener(){ve=void 0,ae.dispose()}},he=new xe(ue);return J==null||J.add(he),he.event}e.debounce=d;function h(A,$=0,Z){return e.debounce(A,(ie,ne)=>ie?(ie.push(ne),ie):[ne],$,void 0,!0,void 0,Z)}e.accumulate=h;function f(A,$=(ie,ne)=>ie===ne,Z){let ie=!0,ne;return s(A,ce=>{let J=ie||!$(ce,ne);return ie=!1,ne=ce,J},Z)}e.latch=f;function v(A,$,Z){return[e.filter(A,$,Z),e.filter(A,ie=>!$(ie),Z)]}e.split=v;function p(A,$=!1,Z=[],ie){let ne=Z.slice(),ce=A(re=>{ne?ne.push(re):ae.fire(re)});ie&&ie.add(ce);let J=()=>{ne==null||ne.forEach(re=>ae.fire(re)),ne=null},ae=new xe({onWillAddFirstListener(){ce||(ce=A(re=>ae.fire(re)),ie&&ie.add(ce))},onDidAddFirstListener(){ne&&($?setTimeout(J):J())},onDidRemoveLastListener(){ce&&ce.dispose(),ce=null}});return ie&&ie.add(ae),ae.event}e.buffer=p;function S(A,$){return(Z,ie,ne)=>{let ce=$(new w);return A(function(J){let ae=ce.evaluate(J);ae!==_&&Z.call(ie,ae)},void 0,ne)}}e.chain=S;let _=Symbol("HaltChainable");class w{constructor(){this.steps=[]}map($){return this.steps.push($),this}forEach($){return this.steps.push(Z=>($(Z),Z)),this}filter($){return this.steps.push(Z=>$(Z)?Z:_),this}reduce($,Z){let ie=Z;return this.steps.push(ne=>(ie=$(ie,ne),ie)),this}latch($=(Z,ie)=>Z===ie){let Z=!0,ie;return this.steps.push(ne=>{let ce=Z||!$(ne,ie);return Z=!1,ie=ne,ce?ne:_}),this}evaluate($){for(let Z of this.steps)if($=Z($),$===_)break;return $}}function C(A,$,Z=ie=>ie){let ie=(...ae)=>J.fire(Z(...ae)),ne=()=>A.on($,ie),ce=()=>A.removeListener($,ie),J=new xe({onWillAddFirstListener:ne,onDidRemoveLastListener:ce});return J.event}e.fromNodeEventEmitter=C;function g(A,$,Z=ie=>ie){let ie=(...ae)=>J.fire(Z(...ae)),ne=()=>A.addEventListener($,ie),ce=()=>A.removeEventListener($,ie),J=new xe({onWillAddFirstListener:ne,onDidRemoveLastListener:ce});return J.event}e.fromDOMEventEmitter=g;function E(A){return new Promise($=>i(A)($))}e.toPromise=E;function T(A){let $=new xe;return A.then(Z=>{$.fire(Z)},()=>{$.fire(void 0)}).finally(()=>{$.dispose()}),$.event}e.fromPromise=T;function L(A,$){return A(Z=>$.fire(Z))}e.forward=L;function V(A,$,Z){return $(Z),A(ie=>$(ie))}e.runAndSubscribe=V;class P{constructor($,Z){this._observable=$,this._counter=0,this._hasChanged=!1;let ie={onWillAddFirstListener:()=>{$.addObserver(this)},onDidRemoveLastListener:()=>{$.removeObserver(this)}};this.emitter=new xe(ie),Z&&Z.add(this.emitter)}beginUpdate($){this._counter++}handlePossibleChange($){}handleChange($,Z){this._hasChanged=!0}endUpdate($){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function Y(A,$){return new P(A,$).emitter.event}e.fromObservable=Y;function W(A){return($,Z,ie)=>{let ne=0,ce=!1,J={beginUpdate(){ne++},endUpdate(){ne--,ne===0&&(A.reportChanges(),ce&&(ce=!1,$.call(Z)))},handlePossibleChange(){},handleChange(){ce=!0}};A.addObserver(J),A.reportChanges();let ae={dispose(){A.removeObserver(J)}};return ie instanceof Tn?ie.add(ae):Array.isArray(ie)&&ie.push(ae),ae}}e.fromObservableLight=W})(fi||(fi={}));var xd=class Td{constructor(t){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${t}_${Td._idPool++}`,Td.all.add(this)}start(t){this._stopWatch=new LU,this.listenerCount=t}stop(){if(this._stopWatch){let t=this._stopWatch.elapsed();this.durations.push(t),this.elapsedOverall+=t,this.invocationCount+=1,this._stopWatch=void 0}}};xd.all=new Set,xd._idPool=0;var $U=xd,xU=-1,tb=class ib{constructor(t,i,r=(ib._idPool++).toString(16).padStart(3,"0")){this._errorHandler=t,this.threshold=i,this.name=r,this._warnCountdown=0}dispose(){var t;(t=this._stacks)==null||t.clear()}check(t,i){let r=this.threshold;if(r<=0||i<r)return;this._stacks||(this._stacks=new Map);let n=this._stacks.get(t.value)||0;if(this._stacks.set(t.value,n+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=r*.5;let[s,a]=this.getMostFrequentStack(),l=`[${this.name}] potential listener LEAK detected, having ${i} listeners already. MOST frequent listener (${a}):`;console.warn(l),console.warn(s);let o=new NU(l,s);this._errorHandler(o)}return()=>{let s=this._stacks.get(t.value)||0;this._stacks.set(t.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let t,i=0;for(let[r,n]of this._stacks)(!t||i<n)&&(t=[r,n],i=n);return t}};tb._idPool=1;var TU=tb,HU=class rb{constructor(t){this.value=t}static create(){let t=new Error;return new rb(t.stack??"")}print(){console.warn(this.value.split(`
88
- `).slice(2).join(`
89
- `))}},NU=class extends Error{constructor(e,t){super(e),this.name="ListenerLeakError",this.stack=t}},PU=class extends Error{constructor(e,t){super(e),this.name="ListenerRefusalError",this.stack=t}},OU=0,t1=class{constructor(e){this.value=e,this.id=OU++}},RU=2,IU,xe=class{constructor(e){var t,i,r,n;this._size=0,this._options=e,this._leakageMon=(t=this._options)!=null&&t.leakWarningThreshold?new TU((e==null?void 0:e.onListenerError)??D0,((i=this._options)==null?void 0:i.leakWarningThreshold)??xU):void 0,this._perfMon=(r=this._options)!=null&&r._profName?new $U(this._options._profName):void 0,this._deliveryQueue=(n=this._options)==null?void 0:n.deliveryQueue}dispose(){var e,t,i,r;this._disposed||(this._disposed=!0,((e=this._deliveryQueue)==null?void 0:e.current)===this&&this._deliveryQueue.reset(),this._listeners&&(this._listeners=void 0,this._size=0),(i=(t=this._options)==null?void 0:t.onDidRemoveLastListener)==null||i.call(t),(r=this._leakageMon)==null||r.dispose())}get event(){return this._event??(this._event=(e,t,i)=>{var a,l,o,c,u;if(this._leakageMon&&this._size>this._leakageMon.threshold**2){let d=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(d);let h=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],f=new PU(`${d}. HINT: Stack shows most frequent listener (${h[1]}-times)`,h[0]);return(((a=this._options)==null?void 0:a.onListenerError)||D0)(f),Je.None}if(this._disposed)return Je.None;t&&(e=e.bind(t));let r=new t1(e),n;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(r.stack=HU.create(),n=this._leakageMon.check(r.stack,this._size+1)),this._listeners?this._listeners instanceof t1?(this._deliveryQueue??(this._deliveryQueue=new DU),this._listeners=[this._listeners,r]):this._listeners.push(r):((o=(l=this._options)==null?void 0:l.onWillAddFirstListener)==null||o.call(l,this),this._listeners=r,(u=(c=this._options)==null?void 0:c.onDidAddFirstListener)==null||u.call(c,this)),this._size++;let s=Et(()=>{n==null||n(),this._removeListener(r)});return i instanceof Tn?i.add(s):Array.isArray(i)&&i.push(s),s}),this._event}_removeListener(e){var n,s,a,l;if((s=(n=this._options)==null?void 0:n.onWillRemoveListener)==null||s.call(n,this),!this._listeners)return;if(this._size===1){this._listeners=void 0,(l=(a=this._options)==null?void 0:a.onDidRemoveLastListener)==null||l.call(a,this),this._size=0;return}let t=this._listeners,i=t.indexOf(e);if(i===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,t[i]=void 0;let r=this._deliveryQueue.current===this;if(this._size*RU<=t.length){let o=0;for(let c=0;c<t.length;c++)t[c]?t[o++]=t[c]:r&&(this._deliveryQueue.end--,o<this._deliveryQueue.i&&this._deliveryQueue.i--);t.length=o}}_deliver(e,t){var r;if(!e)return;let i=((r=this._options)==null?void 0:r.onListenerError)||D0;if(!i){e.value(t);return}try{e.value(t)}catch(n){i(n)}}_deliverQueue(e){let t=e.current._listeners;for(;e.i<e.end;)this._deliver(t[e.i++],e.value);e.reset()}fire(e){var t,i,r,n;if((t=this._deliveryQueue)!=null&&t.current&&(this._deliverQueue(this._deliveryQueue),(i=this._perfMon)==null||i.stop()),(r=this._perfMon)==null||r.start(this._size),this._listeners)if(this._listeners instanceof t1)this._deliver(this._listeners,e);else{let s=this._deliveryQueue;s.enqueue(this,e,this._listeners.length),this._deliverQueue(s)}(n=this._perfMon)==null||n.stop()}hasListeners(){return this._size>0}},DU=class{constructor(){this.i=-1,this.end=0}enqueue(e,t,i){this.i=0,this.end=i,this.current=e,this.value=t}reset(){this.i=this.end,this.current=void 0,this.value=void 0}},Hd=class{constructor(){this.mapWindowIdToZoomLevel=new Map,this._onDidChangeZoomLevel=new xe,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this.mapWindowIdToZoomFactor=new Map,this._onDidChangeFullscreen=new xe,this.onDidChangeFullscreen=this._onDidChangeFullscreen.event,this.mapWindowIdToFullScreen=new Map}getZoomLevel(t){return this.mapWindowIdToZoomLevel.get(this.getWindowId(t))??0}setZoomLevel(t,i){if(this.getZoomLevel(i)===t)return;let r=this.getWindowId(i);this.mapWindowIdToZoomLevel.set(r,t),this._onDidChangeZoomLevel.fire(r)}getZoomFactor(t){return this.mapWindowIdToZoomFactor.get(this.getWindowId(t))??1}setZoomFactor(t,i){this.mapWindowIdToZoomFactor.set(this.getWindowId(i),t)}setFullscreen(t,i){if(this.isFullscreen(i)===t)return;let r=this.getWindowId(i);this.mapWindowIdToFullScreen.set(r,t),this._onDidChangeFullscreen.fire(r)}isFullscreen(t){return!!this.mapWindowIdToFullScreen.get(this.getWindowId(t))}getWindowId(t){return t.vscodeWindowId}};Hd.INSTANCE=new Hd;var v2=Hd;function VU(e,t,i){typeof t=="string"&&(t=e.matchMedia(t)),t.addEventListener("change",i)}v2.INSTANCE.onDidChangeZoomLevel;function ZU(e){return v2.INSTANCE.getZoomFactor(e)}v2.INSTANCE.onDidChangeFullscreen;var Ua=typeof navigator=="object"?navigator.userAgent:"",Nd=Ua.indexOf("Firefox")>=0,BU=Ua.indexOf("AppleWebKit")>=0,g2=Ua.indexOf("Chrome")>=0,FU=!g2&&Ua.indexOf("Safari")>=0;Ua.indexOf("Electron/")>=0;Ua.indexOf("Android")>=0;var i1=!1;if(typeof an.matchMedia=="function"){let e=an.matchMedia("(display-mode: standalone) or (display-mode: window-controls-overlay)"),t=an.matchMedia("(display-mode: fullscreen)");i1=e.matches,VU(an,e,({matches:i})=>{i1&&t.matches||(i1=i)})}var Ds="en",Pd=!1,Od=!1,V0=!1,nb=!1,k0,Z0=Ds,op=Ds,zU,sr,fs=globalThis,ui,E_;typeof fs.vscode<"u"&&typeof fs.vscode.process<"u"?ui=fs.vscode.process:typeof process<"u"&&typeof((E_=process==null?void 0:process.versions)==null?void 0:E_.node)=="string"&&(ui=process);var L_,UU=typeof((L_=ui==null?void 0:ui.versions)==null?void 0:L_.electron)=="string",WU=UU&&(ui==null?void 0:ui.type)==="renderer",$_;if(typeof ui=="object"){Pd=ui.platform==="win32",Od=ui.platform==="darwin",V0=ui.platform==="linux",V0&&ui.env.SNAP&&ui.env.SNAP_REVISION,ui.env.CI||ui.env.BUILD_ARTIFACTSTAGINGDIRECTORY,k0=Ds,Z0=Ds;let e=ui.env.VSCODE_NLS_CONFIG;if(e)try{let t=JSON.parse(e);k0=t.userLocale,op=t.osLocale,Z0=t.resolvedLanguage||Ds,zU=($_=t.languagePack)==null?void 0:$_.translationsConfigFile}catch{}nb=!0}else typeof navigator=="object"&&!WU?(sr=navigator.userAgent,Pd=sr.indexOf("Windows")>=0,Od=sr.indexOf("Macintosh")>=0,(sr.indexOf("Macintosh")>=0||sr.indexOf("iPad")>=0||sr.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,V0=sr.indexOf("Linux")>=0,(sr==null?void 0:sr.indexOf("Mobi"))>=0,Z0=globalThis._VSCODE_NLS_LANGUAGE||Ds,k0=navigator.language.toLowerCase(),op=k0):console.error("Unable to resolve platform.");var sb=Pd,Rr=Od,jU=V0,cp=nb,Br=sr,mn=Z0,KU;(e=>{function t(){return mn}e.value=t;function i(){return mn.length===2?mn==="en":mn.length>=3?mn[0]==="e"&&mn[1]==="n"&&mn[2]==="-":!1}e.isDefaultVariant=i;function r(){return mn==="en"}e.isDefault=r})(KU||(KU={}));var qU=typeof fs.postMessage=="function"&&!fs.importScripts;(()=>{if(qU){let e=[];fs.addEventListener("message",i=>{if(i.data&&i.data.vscodeScheduleAsyncWork)for(let r=0,n=e.length;r<n;r++){let s=e[r];if(s.id===i.data.vscodeScheduleAsyncWork){e.splice(r,1),s.callback();return}}});let t=0;return i=>{let r=++t;e.push({id:r,callback:i}),fs.postMessage({vscodeScheduleAsyncWork:r},"*")}}return e=>setTimeout(e)})();var GU=!!(Br&&Br.indexOf("Chrome")>=0);Br&&Br.indexOf("Firefox")>=0;!GU&&Br&&Br.indexOf("Safari")>=0;Br&&Br.indexOf("Edg/")>=0;Br&&Br.indexOf("Android")>=0;var $s=typeof navigator=="object"?navigator:{};cp||document.queryCommandSupported&&document.queryCommandSupported("copy")||$s&&$s.clipboard&&$s.clipboard.writeText,cp||$s&&$s.clipboard&&$s.clipboard.readText;var b2=class{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}},r1=new b2,up=new b2,dp=new b2,YU=new Array(230),ab;(e=>{function t(l){return r1.keyCodeToStr(l)}e.toString=t;function i(l){return r1.strToKeyCode(l)}e.fromString=i;function r(l){return up.keyCodeToStr(l)}e.toUserSettingsUS=r;function n(l){return dp.keyCodeToStr(l)}e.toUserSettingsGeneral=n;function s(l){return up.strToKeyCode(l)||dp.strToKeyCode(l)}e.fromUserSettings=s;function a(l){if(l>=98&&l<=113)return null;switch(l){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return r1.keyCodeToStr(l)}e.toElectronAccelerator=a})(ab||(ab={}));var XU=class lb{constructor(t,i,r,n,s){this.ctrlKey=t,this.shiftKey=i,this.altKey=r,this.metaKey=n,this.keyCode=s}equals(t){return t instanceof lb&&this.ctrlKey===t.ctrlKey&&this.shiftKey===t.shiftKey&&this.altKey===t.altKey&&this.metaKey===t.metaKey&&this.keyCode===t.keyCode}getHashCode(){let t=this.ctrlKey?"1":"0",i=this.shiftKey?"1":"0",r=this.altKey?"1":"0",n=this.metaKey?"1":"0";return`K${t}${i}${r}${n}${this.keyCode}`}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toKeybinding(){return new JU([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}},JU=class{constructor(e){if(e.length===0)throw CU("chords");this.chords=e}getHashCode(){let e="";for(let t=0,i=this.chords.length;t<i;t++)t!==0&&(e+=";"),e+=this.chords[t].getHashCode();return e}equals(e){if(e===null||this.chords.length!==e.chords.length)return!1;for(let t=0;t<this.chords.length;t++)if(!this.chords[t].equals(e.chords[t]))return!1;return!0}};function QU(e){if(e.charCode){let i=String.fromCharCode(e.charCode).toUpperCase();return ab.fromString(i)}let t=e.keyCode;if(t===3)return 7;if(Nd)switch(t){case 59:return 85;case 60:if(jU)return 97;break;case 61:return 86;case 107:return 109;case 109:return 111;case 173:return 88;case 224:if(Rr)return 57;break}else if(BU&&(Rr&&t===93||!Rr&&t===92))return 57;return YU[t]||0}var eW=Rr?256:2048,tW=512,iW=1024,rW=Rr?2048:256,hp=class{constructor(e){var i;this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.altGraphKey=(i=t.getModifierState)==null?void 0:i.call(t,"AltGraph"),this.keyCode=QU(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asKeyCodeChord=this._computeKeyCodeChord()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeyCodeChord(){return this._asKeyCodeChord}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=eW),this.altKey&&(t|=tW),this.shiftKey&&(t|=iW),this.metaKey&&(t|=rW),t|=e,t}_computeKeyCodeChord(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new XU(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}},fp=new WeakMap;function nW(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,i=e.parent.location;if(t.origin!=="null"&&i.origin!=="null"&&t.origin!==i.origin)return null}catch{return null}return e.parent}var sW=class{static getSameOriginWindowChain(e){let t=fp.get(e);if(!t){t=[],fp.set(e,t);let i=e,r;do r=nW(i),r?t.push({window:new WeakRef(i),iframeElement:i.frameElement||null}):t.push({window:new WeakRef(i),iframeElement:null}),i=r;while(i)}return t.slice(0)}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,r=0,n=this.getSameOriginWindowChain(e);for(let s of n){let a=s.window.deref();if(i+=(a==null?void 0:a.scrollY)??0,r+=(a==null?void 0:a.scrollX)??0,a===t||!s.iframeElement)break;let l=s.iframeElement.getBoundingClientRect();i+=l.top,r+=l.left}return{top:i,left:r}}},A0=class{constructor(e,t){this.timestamp=Date.now(),this.browserEvent=t,this.leftButton=t.button===0,this.middleButton=t.button===1,this.rightButton=t.button===2,this.buttons=t.buttons,this.target=t.target,this.detail=t.detail||1,t.type==="dblclick"&&(this.detail=2),this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,typeof t.pageX=="number"?(this.posx=t.pageX,this.posy=t.pageY):(this.posx=t.clientX+this.target.ownerDocument.body.scrollLeft+this.target.ownerDocument.documentElement.scrollLeft,this.posy=t.clientY+this.target.ownerDocument.body.scrollTop+this.target.ownerDocument.documentElement.scrollTop);let i=sW.getPositionOfChildWindowRelativeToAncestorWindow(e,t.view);this.posx-=i.left,this.posy-=i.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}},pp=class{constructor(e,t=0,i=0){var n;this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t;let r=!1;if(g2){let s=navigator.userAgent.match(/Chrome\/(\d+)/);r=(s?parseInt(s[1]):123)<=122}if(e){let s=e,a=e,l=((n=e.view)==null?void 0:n.devicePixelRatio)||1;if(typeof s.wheelDeltaY<"u")r?this.deltaY=s.wheelDeltaY/(120*l):this.deltaY=s.wheelDeltaY/120;else if(typeof a.VERTICAL_AXIS<"u"&&a.axis===a.VERTICAL_AXIS)this.deltaY=-a.detail/3;else if(e.type==="wheel"){let o=e;o.deltaMode===o.DOM_DELTA_LINE?Nd&&!Rr?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof s.wheelDeltaX<"u")FU&&sb?this.deltaX=-(s.wheelDeltaX/120):r?this.deltaX=s.wheelDeltaX/(120*l):this.deltaX=s.wheelDeltaX/120;else if(typeof a.HORIZONTAL_AXIS<"u"&&a.axis===a.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){let o=e;o.deltaMode===o.DOM_DELTA_LINE?Nd&&!Rr?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(r?this.deltaY=e.wheelDelta/(120*l):this.deltaY=e.wheelDelta/120)}}preventDefault(){var e;(e=this.browserEvent)==null||e.preventDefault()}stopPropagation(){var e;(e=this.browserEvent)==null||e.stopPropagation()}},ob=Object.freeze(function(e,t){let i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}),aW;(e=>{function t(i){return i===e.None||i===e.Cancelled||i instanceof lW?!0:!i||typeof i!="object"?!1:typeof i.isCancellationRequested=="boolean"&&typeof i.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:fi.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:ob})})(aW||(aW={}));var lW=class{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?ob:(this._emitter||(this._emitter=new xe),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}},y2=class{constructor(e,t){this._isDisposed=!1,this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel(),this._isDisposed=!0}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){if(this._isDisposed)throw new Ed("Calling 'cancelAndSet' on a disposed TimeoutTimer");this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){if(this._isDisposed)throw new Ed("Calling 'setIfNotSet' on a disposed TimeoutTimer");this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}},oW=class{constructor(){this.disposable=void 0,this.isDisposed=!1}cancel(){var e;(e=this.disposable)==null||e.dispose(),this.disposable=void 0}cancelAndSet(e,t,i=globalThis){if(this.isDisposed)throw new Ed("Calling 'cancelAndSet' on a disposed IntervalTimer");this.cancel();let r=i.setInterval(()=>{e()},t);this.disposable=Et(()=>{i.clearInterval(r),this.disposable=void 0})}dispose(){this.cancel(),this.isDisposed=!0}},cW;(e=>{async function t(r){let n,s=await Promise.all(r.map(a=>a.then(l=>l,l=>{n||(n=l)})));if(typeof n<"u")throw n;return s}e.settled=t;function i(r){return new Promise(async(n,s)=>{try{await r(n,s)}catch(a){s(a)}})}e.withAsyncBody=i})(cW||(cW={}));var _p=class qi{static fromArray(t){return new qi(i=>{i.emitMany(t)})}static fromPromise(t){return new qi(async i=>{i.emitMany(await t)})}static fromPromises(t){return new qi(async i=>{await Promise.all(t.map(async r=>i.emitOne(await r)))})}static merge(t){return new qi(async i=>{await Promise.all(t.map(async r=>{for await(let n of r)i.emitOne(n)}))})}constructor(t,i){this._state=0,this._results=[],this._error=null,this._onReturn=i,this._onStateChanged=new xe,queueMicrotask(async()=>{let r={emitOne:n=>this.emitOne(n),emitMany:n=>this.emitMany(n),reject:n=>this.reject(n)};try{await Promise.resolve(t(r)),this.resolve()}catch(n){this.reject(n)}finally{r.emitOne=void 0,r.emitMany=void 0,r.reject=void 0}})}[Symbol.asyncIterator](){let t=0;return{next:async()=>{do{if(this._state===2)throw this._error;if(t<this._results.length)return{done:!1,value:this._results[t++]};if(this._state===1)return{done:!0,value:void 0};await fi.toPromise(this._onStateChanged.event)}while(!0)},return:async()=>{var i;return(i=this._onReturn)==null||i.call(this),{done:!0,value:void 0}}}}static map(t,i){return new qi(async r=>{for await(let n of t)r.emitOne(i(n))})}map(t){return qi.map(this,t)}static filter(t,i){return new qi(async r=>{for await(let n of t)i(n)&&r.emitOne(n)})}filter(t){return qi.filter(this,t)}static coalesce(t){return qi.filter(t,i=>!!i)}coalesce(){return qi.coalesce(this)}static async toPromise(t){let i=[];for await(let r of t)i.push(r);return i}toPromise(){return qi.toPromise(this)}emitOne(t){this._state===0&&(this._results.push(t),this._onStateChanged.fire())}emitMany(t){this._state===0&&(this._results=this._results.concat(t),this._onStateChanged.fire())}resolve(){this._state===0&&(this._state=1,this._onStateChanged.fire())}reject(t){this._state===0&&(this._state=2,this._error=t,this._onStateChanged.fire())}};_p.EMPTY=_p.fromArray([]);var{getWindow:$r,getWindowId:uW,onDidRegisterWindow:dW}=function(){let e=new Map,t={window:an,disposables:new Tn};e.set(an.vscodeWindowId,t);let i=new xe,r=new xe,n=new xe;function s(a,l){return(typeof a=="number"?e.get(a):void 0)??(l?t:void 0)}return{onDidRegisterWindow:i.event,onWillUnregisterWindow:n.event,onDidUnregisterWindow:r.event,registerWindow(a){if(e.has(a.vscodeWindowId))return Je.None;let l=new Tn,o={window:a,disposables:l.add(new Tn)};return e.set(a.vscodeWindowId,o),l.add(Et(()=>{e.delete(a.vscodeWindowId),r.fire(a)})),l.add(We(a,ri.BEFORE_UNLOAD,()=>{n.fire(a)})),i.fire(o),l},getWindows(){return e.values()},getWindowsCount(){return e.size},getWindowId(a){return a.vscodeWindowId},hasWindow(a){return e.has(a)},getWindowById:s,getWindow(a){var c;let l=a;if((c=l==null?void 0:l.ownerDocument)!=null&&c.defaultView)return l.ownerDocument.defaultView.window;let o=a;return o!=null&&o.view?o.view.window:an},getDocument(a){return $r(a).document}}}(),hW=class{constructor(e,t,i,r){this._node=e,this._type=t,this._handler=i,this._options=r||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}};function We(e,t,i,r){return new hW(e,t,i,r)}var mp=function(e,t,i,r){return We(e,t,i,r)},w2,fW=class extends oW{constructor(e){super(),this.defaultTarget=e&&$r(e)}cancelAndSet(e,t,i){return super.cancelAndSet(e,t,i??this.defaultTarget)}},vp=class{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){D0(e)}}static sort(e,t){return t.priority-e.priority}};(function(){let e=new Map,t=new Map,i=new Map,r=new Map,n=s=>{i.set(s,!1);let a=e.get(s)??[];for(t.set(s,a),e.set(s,[]),r.set(s,!0);a.length>0;)a.sort(vp.sort),a.shift().execute();r.set(s,!1)};w2=(s,a,l=0)=>{let o=uW(s),c=new vp(a,l),u=e.get(o);return u||(u=[],e.set(o,u)),u.push(c),i.get(o)||(i.set(o,!0),s.requestAnimationFrame(()=>n(o))),c}})();function pW(e){let t=e.getBoundingClientRect(),i=$r(e);return{left:t.left+i.scrollX,top:t.top+i.scrollY,width:t.width,height:t.height}}var ri={CLICK:"click",MOUSE_DOWN:"mousedown",MOUSE_OVER:"mouseover",MOUSE_LEAVE:"mouseleave",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",KEY_DOWN:"keydown",KEY_UP:"keyup",BEFORE_UNLOAD:"beforeunload",CHANGE:"change",FOCUS:"focus",BLUR:"blur",INPUT:"input"},_W=class{constructor(e){this.domNode=e,this._maxWidth="",this._width="",this._height="",this._top="",this._left="",this._bottom="",this._right="",this._paddingTop="",this._paddingLeft="",this._paddingBottom="",this._paddingRight="",this._fontFamily="",this._fontWeight="",this._fontSize="",this._fontStyle="",this._fontFeatureSettings="",this._fontVariationSettings="",this._textDecoration="",this._lineHeight="",this._letterSpacing="",this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){let t=Ni(e);this._maxWidth!==t&&(this._maxWidth=t,this.domNode.style.maxWidth=this._maxWidth)}setWidth(e){let t=Ni(e);this._width!==t&&(this._width=t,this.domNode.style.width=this._width)}setHeight(e){let t=Ni(e);this._height!==t&&(this._height=t,this.domNode.style.height=this._height)}setTop(e){let t=Ni(e);this._top!==t&&(this._top=t,this.domNode.style.top=this._top)}setLeft(e){let t=Ni(e);this._left!==t&&(this._left=t,this.domNode.style.left=this._left)}setBottom(e){let t=Ni(e);this._bottom!==t&&(this._bottom=t,this.domNode.style.bottom=this._bottom)}setRight(e){let t=Ni(e);this._right!==t&&(this._right=t,this.domNode.style.right=this._right)}setPaddingTop(e){let t=Ni(e);this._paddingTop!==t&&(this._paddingTop=t,this.domNode.style.paddingTop=this._paddingTop)}setPaddingLeft(e){let t=Ni(e);this._paddingLeft!==t&&(this._paddingLeft=t,this.domNode.style.paddingLeft=this._paddingLeft)}setPaddingBottom(e){let t=Ni(e);this._paddingBottom!==t&&(this._paddingBottom=t,this.domNode.style.paddingBottom=this._paddingBottom)}setPaddingRight(e){let t=Ni(e);this._paddingRight!==t&&(this._paddingRight=t,this.domNode.style.paddingRight=this._paddingRight)}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){let t=Ni(e);this._fontSize!==t&&(this._fontSize=t,this.domNode.style.fontSize=this._fontSize)}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setFontVariationSettings(e){this._fontVariationSettings!==e&&(this._fontVariationSettings=e,this.domNode.style.fontVariationSettings=this._fontVariationSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){let t=Ni(e);this._lineHeight!==t&&(this._lineHeight=t,this.domNode.style.lineHeight=this._lineHeight)}setLetterSpacing(e){let t=Ni(e);this._letterSpacing!==t&&(this._letterSpacing=t,this.domNode.style.letterSpacing=this._letterSpacing)}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}};function Ni(e){return typeof e=="number"?`${e}px`:e}function so(e){return new _W(e)}var cb=class{constructor(){this._hooks=new Tn,this._pointerMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._pointerMoveCallback=null;let i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._pointerMoveCallback}startMonitoring(e,t,i,r,n){this.isMonitoring()&&this.stopMonitoring(!1),this._pointerMoveCallback=r,this._onStopCallback=n;let s=e;try{e.setPointerCapture(t),this._hooks.add(Et(()=>{try{e.releasePointerCapture(t)}catch{}}))}catch{s=$r(e)}this._hooks.add(We(s,ri.POINTER_MOVE,a=>{if(a.buttons!==i){this.stopMonitoring(!0);return}a.preventDefault(),this._pointerMoveCallback(a)})),this._hooks.add(We(s,ri.POINTER_UP,a=>this.stopMonitoring(!0)))}};function mW(e,t,i){let r=null,n=null;if(typeof i.value=="function"?(r="value",n=i.value,n.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof i.get=="function"&&(r="get",n=i.get),!n)throw new Error("not supported");let s=`$memoize$${t}`;i[r]=function(...a){return this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:n.apply(this,a)}),this[s]}}var Cr;(e=>(e.Tap="-xterm-gesturetap",e.Change="-xterm-gesturechange",e.Start="-xterm-gesturestart",e.End="-xterm-gesturesend",e.Contextmenu="-xterm-gesturecontextmenu"))(Cr||(Cr={}));var Fl=class vi extends Je{constructor(){super(),this.dispatched=!1,this.targets=new lp,this.ignoreTargets=new lp,this.activeTouches={},this.handle=null,this._lastSetTapCountTime=0,this._register(fi.runAndSubscribe(dW,({window:t,disposables:i})=>{i.add(We(t.document,"touchstart",r=>this.onTouchStart(r),{passive:!1})),i.add(We(t.document,"touchend",r=>this.onTouchEnd(t,r))),i.add(We(t.document,"touchmove",r=>this.onTouchMove(r),{passive:!1}))},{window:an,disposables:this._store}))}static addTarget(t){if(!vi.isTouchDevice())return Je.None;vi.INSTANCE||(vi.INSTANCE=new vi);let i=vi.INSTANCE.targets.push(t);return Et(i)}static ignoreTarget(t){if(!vi.isTouchDevice())return Je.None;vi.INSTANCE||(vi.INSTANCE=new vi);let i=vi.INSTANCE.ignoreTargets.push(t);return Et(i)}static isTouchDevice(){return"ontouchstart"in an||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(t){let i=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let r=0,n=t.targetTouches.length;r<n;r++){let s=t.targetTouches.item(r);this.activeTouches[s.identifier]={id:s.identifier,initialTarget:s.target,initialTimeStamp:i,initialPageX:s.pageX,initialPageY:s.pageY,rollingTimestamps:[i],rollingPageX:[s.pageX],rollingPageY:[s.pageY]};let a=this.newGestureEvent(Cr.Start,s.target);a.pageX=s.pageX,a.pageY=s.pageY,this.dispatchEvent(a)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}onTouchEnd(t,i){let r=Date.now(),n=Object.keys(this.activeTouches).length;for(let s=0,a=i.changedTouches.length;s<a;s++){let l=i.changedTouches.item(s);if(!this.activeTouches.hasOwnProperty(String(l.identifier))){console.warn("move of an UNKNOWN touch",l);continue}let o=this.activeTouches[l.identifier],c=Date.now()-o.initialTimeStamp;if(c<vi.HOLD_DELAY&&Math.abs(o.initialPageX-Ii(o.rollingPageX))<30&&Math.abs(o.initialPageY-Ii(o.rollingPageY))<30){let u=this.newGestureEvent(Cr.Tap,o.initialTarget);u.pageX=Ii(o.rollingPageX),u.pageY=Ii(o.rollingPageY),this.dispatchEvent(u)}else if(c>=vi.HOLD_DELAY&&Math.abs(o.initialPageX-Ii(o.rollingPageX))<30&&Math.abs(o.initialPageY-Ii(o.rollingPageY))<30){let u=this.newGestureEvent(Cr.Contextmenu,o.initialTarget);u.pageX=Ii(o.rollingPageX),u.pageY=Ii(o.rollingPageY),this.dispatchEvent(u)}else if(n===1){let u=Ii(o.rollingPageX),d=Ii(o.rollingPageY),h=Ii(o.rollingTimestamps)-o.rollingTimestamps[0],f=u-o.rollingPageX[0],v=d-o.rollingPageY[0],p=[...this.targets].filter(S=>o.initialTarget instanceof Node&&S.contains(o.initialTarget));this.inertia(t,p,r,Math.abs(f)/h,f>0?1:-1,u,Math.abs(v)/h,v>0?1:-1,d)}this.dispatchEvent(this.newGestureEvent(Cr.End,o.initialTarget)),delete this.activeTouches[l.identifier]}this.dispatched&&(i.preventDefault(),i.stopPropagation(),this.dispatched=!1)}newGestureEvent(t,i){let r=document.createEvent("CustomEvent");return r.initEvent(t,!1,!0),r.initialTarget=i,r.tapCount=0,r}dispatchEvent(t){if(t.type===Cr.Tap){let i=new Date().getTime(),r=0;i-this._lastSetTapCountTime>vi.CLEAR_TAP_COUNT_TIME?r=1:r=2,this._lastSetTapCountTime=i,t.tapCount=r}else(t.type===Cr.Change||t.type===Cr.Contextmenu)&&(this._lastSetTapCountTime=0);if(t.initialTarget instanceof Node){for(let r of this.ignoreTargets)if(r.contains(t.initialTarget))return;let i=[];for(let r of this.targets)if(r.contains(t.initialTarget)){let n=0,s=t.initialTarget;for(;s&&s!==r;)n++,s=s.parentElement;i.push([n,r])}i.sort((r,n)=>r[0]-n[0]);for(let[r,n]of i)n.dispatchEvent(t),this.dispatched=!0}}inertia(t,i,r,n,s,a,l,o,c){this.handle=w2(t,()=>{let u=Date.now(),d=u-r,h=0,f=0,v=!0;n+=vi.SCROLL_FRICTION*d,l+=vi.SCROLL_FRICTION*d,n>0&&(v=!1,h=s*n*d),l>0&&(v=!1,f=o*l*d);let p=this.newGestureEvent(Cr.Change);p.translationX=h,p.translationY=f,i.forEach(S=>S.dispatchEvent(p)),v||this.inertia(t,i,u,n,s,a+h,l,o,c+f)})}onTouchMove(t){let i=Date.now();for(let r=0,n=t.changedTouches.length;r<n;r++){let s=t.changedTouches.item(r);if(!this.activeTouches.hasOwnProperty(String(s.identifier))){console.warn("end of an UNKNOWN touch",s);continue}let a=this.activeTouches[s.identifier],l=this.newGestureEvent(Cr.Change,a.initialTarget);l.translationX=s.pageX-Ii(a.rollingPageX),l.translationY=s.pageY-Ii(a.rollingPageY),l.pageX=s.pageX,l.pageY=s.pageY,this.dispatchEvent(l),a.rollingPageX.length>3&&(a.rollingPageX.shift(),a.rollingPageY.shift(),a.rollingTimestamps.shift()),a.rollingPageX.push(s.pageX),a.rollingPageY.push(s.pageY),a.rollingTimestamps.push(i)}this.dispatched&&(t.preventDefault(),t.stopPropagation(),this.dispatched=!1)}};Fl.SCROLL_FRICTION=-.005,Fl.HOLD_DELAY=700,Fl.CLEAR_TAP_COUNT_TIME=400,Pt([mW],Fl,"isTouchDevice",1);var vW=Fl,S2=class extends Je{onclick(e,t){this._register(We(e,ri.CLICK,i=>t(new A0($r(e),i))))}onmousedown(e,t){this._register(We(e,ri.MOUSE_DOWN,i=>t(new A0($r(e),i))))}onmouseover(e,t){this._register(We(e,ri.MOUSE_OVER,i=>t(new A0($r(e),i))))}onmouseleave(e,t){this._register(We(e,ri.MOUSE_LEAVE,i=>t(new A0($r(e),i))))}onkeydown(e,t){this._register(We(e,ri.KEY_DOWN,i=>t(new hp(i))))}onkeyup(e,t){this._register(We(e,ri.KEY_UP,i=>t(new hp(i))))}oninput(e,t){this._register(We(e,ri.INPUT,t))}onblur(e,t){this._register(We(e,ri.BLUR,t))}onfocus(e,t){this._register(We(e,ri.FOCUS,t))}onchange(e,t){this._register(We(e,ri.CHANGE,t))}ignoreGesture(e){return vW.ignoreTarget(e)}},gp=11,gW=class extends S2{constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",typeof e.top<"u"&&(this.bgDomNode.style.top="0px"),typeof e.left<"u"&&(this.bgDomNode.style.left="0px"),typeof e.bottom<"u"&&(this.bgDomNode.style.bottom="0px"),typeof e.right<"u"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.style.position="absolute",this.domNode.style.width=gp+"px",this.domNode.style.height=gp+"px",typeof e.top<"u"&&(this.domNode.style.top=e.top+"px"),typeof e.left<"u"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom<"u"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right<"u"&&(this.domNode.style.right=e.right+"px"),this._pointerMoveMonitor=this._register(new cb),this._register(mp(this.bgDomNode,ri.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._register(mp(this.domNode,ri.POINTER_DOWN,t=>this._arrowPointerDown(t))),this._pointerdownRepeatTimer=this._register(new fW),this._pointerdownScheduleRepeatTimer=this._register(new y2)}_arrowPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=()=>{this._pointerdownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24,$r(e))};this._onActivate(),this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancelAndSet(t,200),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,i=>{},()=>{this._pointerdownRepeatTimer.cancel(),this._pointerdownScheduleRepeatTimer.cancel()}),e.preventDefault()}},bW=class Rd{constructor(t,i,r,n,s,a,l){this._forceIntegerValues=t,this._scrollStateBrand=void 0,this._forceIntegerValues&&(i=i|0,r=r|0,n=n|0,s=s|0,a=a|0,l=l|0),this.rawScrollLeft=n,this.rawScrollTop=l,i<0&&(i=0),n+i>r&&(n=r-i),n<0&&(n=0),s<0&&(s=0),l+s>a&&(l=a-s),l<0&&(l=0),this.width=i,this.scrollWidth=r,this.scrollLeft=n,this.height=s,this.scrollHeight=a,this.scrollTop=l}equals(t){return this.rawScrollLeft===t.rawScrollLeft&&this.rawScrollTop===t.rawScrollTop&&this.width===t.width&&this.scrollWidth===t.scrollWidth&&this.scrollLeft===t.scrollLeft&&this.height===t.height&&this.scrollHeight===t.scrollHeight&&this.scrollTop===t.scrollTop}withScrollDimensions(t,i){return new Rd(this._forceIntegerValues,typeof t.width<"u"?t.width:this.width,typeof t.scrollWidth<"u"?t.scrollWidth:this.scrollWidth,i?this.rawScrollLeft:this.scrollLeft,typeof t.height<"u"?t.height:this.height,typeof t.scrollHeight<"u"?t.scrollHeight:this.scrollHeight,i?this.rawScrollTop:this.scrollTop)}withScrollPosition(t){return new Rd(this._forceIntegerValues,this.width,this.scrollWidth,typeof t.scrollLeft<"u"?t.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof t.scrollTop<"u"?t.scrollTop:this.rawScrollTop)}createScrollEvent(t,i){let r=this.width!==t.width,n=this.scrollWidth!==t.scrollWidth,s=this.scrollLeft!==t.scrollLeft,a=this.height!==t.height,l=this.scrollHeight!==t.scrollHeight,o=this.scrollTop!==t.scrollTop;return{inSmoothScrolling:i,oldWidth:t.width,oldScrollWidth:t.scrollWidth,oldScrollLeft:t.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:t.height,oldScrollHeight:t.scrollHeight,oldScrollTop:t.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:r,scrollWidthChanged:n,scrollLeftChanged:s,heightChanged:a,scrollHeightChanged:l,scrollTopChanged:o}}},yW=class extends Je{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new xe),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new bW(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){var r;let i=this._state.withScrollDimensions(e,t);this._setState(i,!!this._smoothScrolling),(r=this._smoothScrolling)==null||r.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){let t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){if(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft>"u"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop>"u"?this._smoothScrolling.to.scrollTop:e.scrollTop};let i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let r;t?r=new yp(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):r=this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=r}else{let i=this._state.withScrollPosition(e);this._smoothScrolling=yp.start(this._state,i,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}hasPendingScrollAnimation(){return!!this._smoothScrolling}_performSmoothScrolling(){if(!this._smoothScrolling)return;let e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){let i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}},bp=class{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}};function n1(e,t){let i=t-e;return function(r){return e+i*CW(r)}}function wW(e,t,i){return function(r){return r<i?e(r/i):t((r-i)/(1-i))}}var yp=class Id{constructor(t,i,r,n){this.from=t,this.to=i,this.duration=n,this.startTime=r,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){this.scrollLeft=this._initAnimation(this.from.scrollLeft,this.to.scrollLeft,this.to.width),this.scrollTop=this._initAnimation(this.from.scrollTop,this.to.scrollTop,this.to.height)}_initAnimation(t,i,r){if(Math.abs(t-i)>2.5*r){let n,s;return t<i?(n=t+.75*r,s=i-.75*r):(n=t-.75*r,s=i+.75*r),wW(n1(t,n),n1(s,i),.33)}return n1(t,i)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(t){this.to=t.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(t){let i=(t-this.startTime)/this.duration;if(i<1){let r=this.scrollLeft(i),n=this.scrollTop(i);return new bp(r,n,!1)}return new bp(this.to.scrollLeft,this.to.scrollTop,!0)}combine(t,i,r){return Id.start(t,i,r)}static start(t,i,r){r=r+10;let n=Date.now()-10;return new Id(t,i,n,r)}};function SW(e){return Math.pow(e,3)}function CW(e){return 1-SW(1-e)}var kW=class extends Je{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new y2)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0:this._rawShouldBeVisible}_updateShouldBeVisible(){let e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{var e;(e=this._domNode)==null||e.setClassName(this._visibleClassName)},0))}_hide(e){var t;this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,(t=this._domNode)==null||t.setClassName(this._invisibleClassName+(e?" fade":"")))}},AW=140,ub=class extends S2{constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new kW(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._pointerMoveMonitor=this._register(new cb),this._shouldRender=!0,this.domNode=so(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this._register(We(this.domNode.domNode,ri.POINTER_DOWN,t=>this._domNodePointerDown(t)))}_createArrow(e){let t=this._register(new gW(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,r){this.slider=so(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof i=="number"&&this.slider.setWidth(i),typeof r=="number"&&this.slider.setHeight(r),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this._register(We(this.slider.domNode,ri.POINTER_DOWN,n=>{n.button===0&&(n.preventDefault(),this._sliderPointerDown(n))})),this.onclick(this.slider.domNode,n=>{n.leftButton&&n.stopPropagation()})}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodePointerDown(e){e.target===this.domNode.domNode&&this._onPointerDown(e)}delegatePointerDown(e){let t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),r=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),n=this._sliderPointerPosition(e);i<=n&&n<=r?e.button===0&&(e.preventDefault(),this._sliderPointerDown(e)):this._onPointerDown(e)}_onPointerDown(e){let t,i;if(e.target===this.domNode.domNode&&typeof e.offsetX=="number"&&typeof e.offsetY=="number")t=e.offsetX,i=e.offsetY;else{let n=pW(this.domNode.domNode);t=e.pageX-n.left,i=e.pageY-n.top}let r=this._pointerDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(r):this._scrollbarState.getDesiredScrollPositionFromOffset(r)),e.button===0&&(e.preventDefault(),this._sliderPointerDown(e))}_sliderPointerDown(e){if(!e.target||!(e.target instanceof Element))return;let t=this._sliderPointerPosition(e),i=this._sliderOrthogonalPointerPosition(e),r=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._pointerMoveMonitor.startMonitoring(e.target,e.pointerId,e.buttons,n=>{let s=this._sliderOrthogonalPointerPosition(n),a=Math.abs(s-i);if(sb&&a>AW){this._setDesiredScrollPositionNow(r.getScrollPosition());return}let l=this._sliderPointerPosition(n)-t;this._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(l))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd()}),this._host.onDragStart()}_setDesiredScrollPositionNow(e){let t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}},db=class Dd{constructor(t,i,r,n,s,a){this._scrollbarSize=Math.round(i),this._oppositeScrollbarSize=Math.round(r),this._arrowSize=Math.round(t),this._visibleSize=n,this._scrollSize=s,this._scrollPosition=a,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new Dd(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(t){let i=Math.round(t);return this._visibleSize!==i?(this._visibleSize=i,this._refreshComputedValues(),!0):!1}setScrollSize(t){let i=Math.round(t);return this._scrollSize!==i?(this._scrollSize=i,this._refreshComputedValues(),!0):!1}setScrollPosition(t){let i=Math.round(t);return this._scrollPosition!==i?(this._scrollPosition=i,this._refreshComputedValues(),!0):!1}setScrollbarSize(t){this._scrollbarSize=Math.round(t)}setOppositeScrollbarSize(t){this._oppositeScrollbarSize=Math.round(t)}static _computeValues(t,i,r,n,s){let a=Math.max(0,r-t),l=Math.max(0,a-2*i),o=n>0&&n>r;if(!o)return{computedAvailableSize:Math.round(a),computedIsNeeded:o,computedSliderSize:Math.round(l),computedSliderRatio:0,computedSliderPosition:0};let c=Math.round(Math.max(20,Math.floor(r*l/n))),u=(l-c)/(n-r),d=s*u;return{computedAvailableSize:Math.round(a),computedIsNeeded:o,computedSliderSize:Math.round(c),computedSliderRatio:u,computedSliderPosition:Math.round(d)}}_refreshComputedValues(){let t=Dd._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=t.computedAvailableSize,this._computedIsNeeded=t.computedIsNeeded,this._computedSliderSize=t.computedSliderSize,this._computedSliderRatio=t.computedSliderRatio,this._computedSliderPosition=t.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(t){if(!this._computedIsNeeded)return 0;let i=t-this._arrowSize-this._computedSliderSize/2;return Math.round(i/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(t){if(!this._computedIsNeeded)return 0;let i=t-this._arrowSize,r=this._scrollPosition;return i<this._computedSliderPosition?r-=this._visibleSize:r+=this._visibleSize,r}getDesiredScrollPositionFromDelta(t){if(!this._computedIsNeeded)return 0;let i=this._computedSliderPosition+t;return Math.round(i/this._computedSliderRatio)}},MW=class extends ub{constructor(e,t,i){let r=e.getScrollDimensions(),n=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new db(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,r.width,r.scrollWidth,n.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage}),t.horizontalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollWidth)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollLeft)||this._shouldRender,this._shouldRender=this._onElementSize(e.width)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return e}_sliderPointerPosition(e){return e.pageX}_sliderOrthogonalPointerPosition(e){return e.pageY}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}},EW=class extends ub{constructor(e,t,i){let r=e.getScrollDimensions(),n=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new db(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,r.height,r.scrollHeight,n.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows)throw new Error("horizontalHasArrows is not supported in xterm.js");this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(e){return this._shouldRender=this._onElementScrollSize(e.scrollHeight)||this._shouldRender,this._shouldRender=this._onElementScrollPosition(e.scrollTop)||this._shouldRender,this._shouldRender=this._onElementSize(e.height)||this._shouldRender,this._shouldRender}_pointerDownRelativePosition(e,t){return t}_sliderPointerPosition(e){return e.pageY}_sliderOrthogonalPointerPosition(e){return e.pageX}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}},LW=500,wp=50,$W=class{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}},Vd=class{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let t=1,i=0,r=1,n=this._rear;do{let s=n===this._front?t:Math.pow(2,-r);if(t-=s,i+=this._memory[n].score*s,n===this._front)break;n=(this._capacity+n-1)%this._capacity,r++}while(!0);return i<=.5}acceptStandardWheelEvent(t){if(g2){let i=$r(t.browserEvent),r=ZU(i);this.accept(Date.now(),t.deltaX*r,t.deltaY*r)}else this.accept(Date.now(),t.deltaX,t.deltaY)}accept(t,i,r){let n=null,s=new $W(t,i,r);this._front===-1&&this._rear===-1?(this._memory[0]=s,this._front=0,this._rear=0):(n=this._memory[this._rear],this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=s),s.score=this._computeScore(s,n)}_computeScore(t,i){if(Math.abs(t.deltaX)>0&&Math.abs(t.deltaY)>0)return 1;let r=.5;if((!this._isAlmostInt(t.deltaX)||!this._isAlmostInt(t.deltaY))&&(r+=.25),i){let n=Math.abs(t.deltaX),s=Math.abs(t.deltaY),a=Math.abs(i.deltaX),l=Math.abs(i.deltaY),o=Math.max(Math.min(n,a),1),c=Math.max(Math.min(s,l),1),u=Math.max(n,a),d=Math.max(s,l);u%o===0&&d%c===0&&(r-=.5)}return Math.min(Math.max(r,0),1)}_isAlmostInt(t){return Math.abs(Math.round(t)-t)<.01}};Vd.INSTANCE=new Vd;var xW=Vd,TW=class extends S2{constructor(e,t,i){super(),this._onScroll=this._register(new xe),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new xe),this.onWillScroll=this._onWillScroll.event,this._options=NW(t),this._scrollable=i,this._register(this._scrollable.onScroll(n=>{this._onWillScroll.fire(n),this._onDidScroll(n),this._onScroll.fire(n)}));let r={onMouseWheel:n=>this._onMouseWheel(n),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new EW(this._scrollable,this._options,r)),this._horizontalScrollbar=this._register(new MW(this._scrollable,this._options,r)),this._domNode=document.createElement("div"),this._domNode.className="xterm-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=so(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=so(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=so(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,n=>this._onMouseOver(n)),this.onmouseleave(this._listenOnDomNode,n=>this._onMouseLeave(n)),this._hideTimeout=this._register(new y2),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=vs(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarPointerDown(e){this._verticalScrollbar.delegatePointerDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,Rr&&(this._options.className+=" mac"),this._domNode.className="xterm-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel<"u"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity<"u"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity<"u"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis<"u"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal<"u"&&(this._options.horizontal=e.horizontal),typeof e.vertical<"u"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize<"u"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize<"u"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage<"u"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}setRevealOnScroll(e){this._revealOnScroll=e}delegateScrollFromMouseWheelEvent(e){this._onMouseWheel(new pp(e))}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=vs(this._mouseWheelToDispose),e)){let t=i=>{this._onMouseWheel(new pp(i))};this._mouseWheelToDispose.push(We(this._listenOnDomNode,ri.MOUSE_WHEEL,t,{passive:!1}))}}_onMouseWheel(e){var n;if((n=e.browserEvent)!=null&&n.defaultPrevented)return;let t=xW.INSTANCE;t.acceptStandardWheelEvent(e);let i=!1;if(e.deltaY||e.deltaX){let s=e.deltaY*this._options.mouseWheelScrollSensitivity,a=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(this._options.scrollYToX&&a+s===0?a=s=0:Math.abs(s)>=Math.abs(a)?a=0:s=0),this._options.flipAxes&&([s,a]=[a,s]);let l=!Rr&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||l)&&!a&&(a=s,s=0),e.browserEvent&&e.browserEvent.altKey&&(a=a*this._options.fastScrollSensitivity,s=s*this._options.fastScrollSensitivity);let o=this._scrollable.getFutureScrollPosition(),c={};if(s){let u=wp*s,d=o.scrollTop-(u<0?Math.floor(u):Math.ceil(u));this._verticalScrollbar.writeScrollPosition(c,d)}if(a){let u=wp*a,d=o.scrollLeft-(u<0?Math.floor(u):Math.ceil(u));this._horizontalScrollbar.writeScrollPosition(c,d)}c=this._scrollable.validateScrollPosition(c),(o.scrollLeft!==c.scrollLeft||o.scrollTop!==c.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(c):this._scrollable.setScrollPositionNow(c),i=!0)}let r=i;!r&&this._options.alwaysConsumeMouseWheel&&(r=!0),!r&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(r=!0),r&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(e){this._shouldRender=this._horizontalScrollbar.onDidScroll(e)||this._shouldRender,this._shouldRender=this._verticalScrollbar.onDidScroll(e)||this._shouldRender,this._options.useShadows&&(this._shouldRender=!0),this._revealOnScroll&&this._reveal(),this._options.lazyRender||this._render()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){let e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,r=i?" left":"",n=t?" top":"",s=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${r}`),this._topShadowDomNode.setClassName(`shadow${n}`),this._topLeftShadowDomNode.setClassName(`shadow${s}${n}${r}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseLeave(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){!this._mouseIsOver&&!this._isDragging&&(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){!this._mouseIsOver&&!this._isDragging&&this._hideTimeout.cancelAndSet(()=>this._hide(),LW)}},HW=class extends TW{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}};function NW(e){let t={lazyRender:typeof e.lazyRender<"u"?e.lazyRender:!1,className:typeof e.className<"u"?e.className:"",useShadows:typeof e.useShadows<"u"?e.useShadows:!0,handleMouseWheel:typeof e.handleMouseWheel<"u"?e.handleMouseWheel:!0,flipAxes:typeof e.flipAxes<"u"?e.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof e.consumeMouseWheelIfScrollbarIsNeeded<"u"?e.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof e.alwaysConsumeMouseWheel<"u"?e.alwaysConsumeMouseWheel:!1,scrollYToX:typeof e.scrollYToX<"u"?e.scrollYToX:!1,mouseWheelScrollSensitivity:typeof e.mouseWheelScrollSensitivity<"u"?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof e.fastScrollSensitivity<"u"?e.fastScrollSensitivity:5,scrollPredominantAxis:typeof e.scrollPredominantAxis<"u"?e.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof e.mouseWheelSmoothScroll<"u"?e.mouseWheelSmoothScroll:!0,arrowSize:typeof e.arrowSize<"u"?e.arrowSize:11,listenOnDomNode:typeof e.listenOnDomNode<"u"?e.listenOnDomNode:null,horizontal:typeof e.horizontal<"u"?e.horizontal:1,horizontalScrollbarSize:typeof e.horizontalScrollbarSize<"u"?e.horizontalScrollbarSize:10,horizontalSliderSize:typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:0,horizontalHasArrows:typeof e.horizontalHasArrows<"u"?e.horizontalHasArrows:!1,vertical:typeof e.vertical<"u"?e.vertical:1,verticalScrollbarSize:typeof e.verticalScrollbarSize<"u"?e.verticalScrollbarSize:10,verticalHasArrows:typeof e.verticalHasArrows<"u"?e.verticalHasArrows:!1,verticalSliderSize:typeof e.verticalSliderSize<"u"?e.verticalSliderSize:0,scrollByPage:typeof e.scrollByPage<"u"?e.scrollByPage:!1};return t.horizontalSliderSize=typeof e.horizontalSliderSize<"u"?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=typeof e.verticalSliderSize<"u"?e.verticalSliderSize:t.verticalScrollbarSize,Rr&&(t.className+=" mac"),t}var Zd=class extends Je{constructor(e,t,i,r,n,s,a,l){super(),this._bufferService=i,this._optionsService=a,this._renderService=l,this._onRequestScrollLines=this._register(new xe),this.onRequestScrollLines=this._onRequestScrollLines.event,this._isSyncing=!1,this._isHandlingScroll=!1,this._suppressOnScrollHandler=!1;let o=this._register(new yW({forceIntegerValues:!1,smoothScrollDuration:this._optionsService.rawOptions.smoothScrollDuration,scheduleAtNextAnimationFrame:c=>w2(r.window,c)}));this._register(this._optionsService.onSpecificOptionChange("smoothScrollDuration",()=>{o.setSmoothScrollDuration(this._optionsService.rawOptions.smoothScrollDuration)})),this._scrollableElement=this._register(new HW(t,{vertical:1,horizontal:2,useShadows:!1,mouseWheelSmoothScroll:!0,...this._getChangeOptions()},o)),this._register(this._optionsService.onMultipleOptionChange(["scrollSensitivity","fastScrollSensitivity","overviewRuler"],()=>this._scrollableElement.updateOptions(this._getChangeOptions()))),this._register(n.onProtocolChange(c=>{this._scrollableElement.updateOptions({handleMouseWheel:!(c&16)})})),this._scrollableElement.setScrollDimensions({height:0,scrollHeight:0}),this._register(fi.runAndSubscribe(s.onChangeColors,()=>{this._scrollableElement.getDomNode().style.backgroundColor=s.colors.background.css})),e.appendChild(this._scrollableElement.getDomNode()),this._register(Et(()=>this._scrollableElement.getDomNode().remove())),this._styleElement=r.mainDocument.createElement("style"),t.appendChild(this._styleElement),this._register(Et(()=>this._styleElement.remove())),this._register(fi.runAndSubscribe(s.onChangeColors,()=>{this._styleElement.textContent=[".xterm .xterm-scrollable-element > .scrollbar > .slider {",` background: ${s.colors.scrollbarSliderBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider:hover {",` background: ${s.colors.scrollbarSliderHoverBackground.css};`,"}",".xterm .xterm-scrollable-element > .scrollbar > .slider.active {",` background: ${s.colors.scrollbarSliderActiveBackground.css};`,"}"].join(`
90
- `)})),this._register(this._bufferService.onResize(()=>this.queueSync())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._latestYDisp=void 0,this.queueSync()})),this._register(this._bufferService.onScroll(()=>this._sync())),this._register(this._scrollableElement.onScroll(c=>this._handleScroll(c)))}scrollLines(e){let t=this._scrollableElement.getScrollPosition();this._scrollableElement.setScrollPosition({reuseAnimation:!0,scrollTop:t.scrollTop+e*this._renderService.dimensions.css.cell.height})}scrollToLine(e,t){t&&(this._latestYDisp=e),this._scrollableElement.setScrollPosition({reuseAnimation:!t,scrollTop:e*this._renderService.dimensions.css.cell.height})}_getChangeOptions(){var e;return{mouseWheelScrollSensitivity:this._optionsService.rawOptions.scrollSensitivity,fastScrollSensitivity:this._optionsService.rawOptions.fastScrollSensitivity,verticalScrollbarSize:((e=this._optionsService.rawOptions.overviewRuler)==null?void 0:e.width)||14}}queueSync(e){e!==void 0&&(this._latestYDisp=e),this._queuedAnimationFrame===void 0&&(this._queuedAnimationFrame=this._renderService.addRefreshCallback(()=>{this._queuedAnimationFrame=void 0,this._sync(this._latestYDisp)}))}_sync(e=this._bufferService.buffer.ydisp){!this._renderService||this._isSyncing||(this._isSyncing=!0,this._suppressOnScrollHandler=!0,this._scrollableElement.setScrollDimensions({height:this._renderService.dimensions.css.canvas.height,scrollHeight:this._renderService.dimensions.css.cell.height*this._bufferService.buffer.lines.length}),this._suppressOnScrollHandler=!1,e!==this._latestYDisp&&this._scrollableElement.setScrollPosition({scrollTop:e*this._renderService.dimensions.css.cell.height}),this._isSyncing=!1)}_handleScroll(e){if(!this._renderService||this._isHandlingScroll||this._suppressOnScrollHandler)return;this._isHandlingScroll=!0;let t=Math.round(e.scrollTop/this._renderService.dimensions.css.cell.height),i=t-this._bufferService.buffer.ydisp;i!==0&&(this._latestYDisp=t,this._onRequestScrollLines.fire(i)),this._isHandlingScroll=!1}};Zd=Pt([Ne(2,Ti),Ne(3,dn),Ne(4,Wg),Ne(5,za),Ne(6,Hi),Ne(7,hn)],Zd);var Bd=class extends Je{constructor(e,t,i,r,n){super(),this._screenElement=e,this._bufferService=t,this._coreBrowserService=i,this._decorationService=r,this._renderService=n,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this._register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this._register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this._register(this._decorationService.onDecorationRemoved(s=>this._removeDecoration(s))),this._register(Et(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(let e of this._decorationService.decorations)this._renderDecoration(e);this._dimensionsChanged=!1}_renderDecoration(e){this._refreshStyle(e),this._dimensionsChanged&&this._refreshXPosition(e)}_createElement(e){var r;let t=this._coreBrowserService.mainDocument.createElement("div");t.classList.add("xterm-decoration"),t.classList.toggle("xterm-decoration-top-layer",((r=e==null?void 0:e.options)==null?void 0:r.layer)==="top"),t.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,t.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,t.style.top=`${(e.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height}px`,t.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;let i=e.options.x??0;return i&&i>this._bufferService.cols&&(t.style.display="none"),this._refreshXPosition(e,t),t}_refreshStyle(e){let t=e.marker.line-this._bufferService.buffers.active.ydisp;if(t<0||t>=this._bufferService.rows)e.element&&(e.element.style.display="none",e.onRenderEmitter.fire(e.element));else{let i=this._decorationElements.get(e);i||(i=this._createElement(e),e.element=i,this._decorationElements.set(e,i),this._container.appendChild(i),e.onDispose(()=>{this._decorationElements.delete(e),i.remove()})),i.style.display=this._altBufferIsActive?"none":"block",this._altBufferIsActive||(i.style.width=`${Math.round((e.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,i.style.height=`${(e.options.height||1)*this._renderService.dimensions.css.cell.height}px`,i.style.top=`${t*this._renderService.dimensions.css.cell.height}px`,i.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`),e.onRenderEmitter.fire(i)}}_refreshXPosition(e,t=e.element){if(!t)return;let i=e.options.x??0;(e.options.anchor||"left")==="right"?t.style.right=i?`${i*this._renderService.dimensions.css.cell.width}px`:"":t.style.left=i?`${i*this._renderService.dimensions.css.cell.width}px`:""}_removeDecoration(e){var t;(t=this._decorationElements.get(e))==null||t.remove(),this._decorationElements.delete(e),e.dispose()}};Bd=Pt([Ne(1,Ti),Ne(2,dn),Ne(3,Go),Ne(4,hn)],Bd);var PW=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(e){if(e.options.overviewRulerOptions){for(let t of this._zones)if(t.color===e.options.overviewRulerOptions.color&&t.position===e.options.overviewRulerOptions.position){if(this._lineIntersectsZone(t,e.marker.line))return;if(this._lineAdjacentToZone(t,e.marker.line,e.options.overviewRulerOptions.position)){this._addLineToZone(t,e.marker.line);return}}if(this._zonePoolIndex<this._zonePool.length){this._zonePool[this._zonePoolIndex].color=e.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=e.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=e.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=e.marker.line,this._zones.push(this._zonePool[this._zonePoolIndex++]);return}this._zones.push({color:e.options.overviewRulerOptions.color,position:e.options.overviewRulerOptions.position,startBufferLine:e.marker.line,endBufferLine:e.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(e){this._linePadding=e}_lineIntersectsZone(e,t){return t>=e.startBufferLine&&t<=e.endBufferLine}_lineAdjacentToZone(e,t,i){return t>=e.startBufferLine-this._linePadding[i||"full"]&&t<=e.endBufferLine+this._linePadding[i||"full"]}_addLineToZone(e,t){e.startBufferLine=Math.min(e.startBufferLine,t),e.endBufferLine=Math.max(e.endBufferLine,t)}},wr={full:0,left:0,center:0,right:0},vn={full:0,left:0,center:0,right:0},Hl={full:0,left:0,center:0,right:0},Ac=class extends Je{constructor(e,t,i,r,n,s,a,l){var c;super(),this._viewportElement=e,this._screenElement=t,this._bufferService=i,this._decorationService=r,this._renderService=n,this._optionsService=s,this._themeService=a,this._coreBrowserService=l,this._colorZoneStore=new PW,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(c=this._viewportElement.parentElement)==null||c.insertBefore(this._canvas,this._viewportElement),this._register(Et(()=>{var u;return(u=this._canvas)==null?void 0:u.remove()}));let o=this._canvas.getContext("2d");if(o)this._ctx=o;else throw new Error("Ctx cannot be null");this._register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this._register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0))),this._register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this._register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this._register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})),this._register(this._renderService.onRender(()=>{(!this._containerHeight||this._containerHeight!==this._screenElement.clientHeight)&&(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this._register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._register(this._optionsService.onSpecificOptionChange("overviewRuler",()=>this._queueRefresh(!0))),this._register(this._themeService.onChangeColors(()=>this._queueRefresh())),this._queueRefresh(!0)}get _width(){var e;return((e=this._optionsService.options.overviewRuler)==null?void 0:e.width)||0}_refreshDrawConstants(){let e=Math.floor((this._canvas.width-1)/3),t=Math.ceil((this._canvas.width-1)/3);vn.full=this._canvas.width,vn.left=e,vn.center=t,vn.right=e,this._refreshDrawHeightConstants(),Hl.full=1,Hl.left=1,Hl.center=1+vn.left,Hl.right=1+vn.left+vn.center}_refreshDrawHeightConstants(){wr.full=Math.round(2*this._coreBrowserService.dpr);let e=this._canvas.height/this._bufferService.buffer.lines.length,t=Math.round(Math.max(Math.min(e,12),6)*this._coreBrowserService.dpr);wr.left=t,wr.center=t,wr.right=t}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*wr.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*wr.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*wr.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*wr.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(let t of this._decorationService.decorations)this._colorZoneStore.addDecoration(t);this._ctx.lineWidth=1,this._renderRulerOutline();let e=this._colorZoneStore.zones;for(let t of e)t.position!=="full"&&this._renderColorZone(t);for(let t of e)t.position==="full"&&this._renderColorZone(t);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderRulerOutline(){this._ctx.fillStyle=this._themeService.colors.overviewRulerBorder.css,this._ctx.fillRect(0,0,1,this._canvas.height),this._optionsService.rawOptions.overviewRuler.showTopBorder&&this._ctx.fillRect(1,0,this._canvas.width-1,1),this._optionsService.rawOptions.overviewRuler.showBottomBorder&&this._ctx.fillRect(1,this._canvas.height-1,this._canvas.width-1,this._canvas.height)}_renderColorZone(e){this._ctx.fillStyle=e.color,this._ctx.fillRect(Hl[e.position||"full"],Math.round((this._canvas.height-1)*(e.startBufferLine/this._bufferService.buffers.active.lines.length)-wr[e.position||"full"]/2),vn[e.position||"full"],Math.round((this._canvas.height-1)*((e.endBufferLine-e.startBufferLine)/this._bufferService.buffers.active.lines.length)+wr[e.position||"full"]))}_queueRefresh(e,t){this._shouldUpdateDimensions=e||this._shouldUpdateDimensions,this._shouldUpdateAnchor=t||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};Ac=Pt([Ne(2,Ti),Ne(3,Go),Ne(4,hn),Ne(5,Hi),Ne(6,za),Ne(7,dn)],Ac);var Ae;(e=>(e.NUL="\0",e.SOH="",e.STX="",e.ETX="",e.EOT="",e.ENQ="",e.ACK="",e.BEL="\x07",e.BS="\b",e.HT=" ",e.LF=`
91
- `,e.VT="\v",e.FF="\f",e.CR="\r",e.SO="",e.SI="",e.DLE="",e.DC1="",e.DC2="",e.DC3="",e.DC4="",e.NAK="",e.SYN="",e.ETB="",e.CAN="",e.EM="",e.SUB="",e.ESC="\x1B",e.FS="",e.GS="",e.RS="",e.US="",e.SP=" ",e.DEL=""))(Ae||(Ae={}));var B0;(e=>(e.PAD="€",e.HOP="",e.BPH="‚",e.NBH="ƒ",e.IND="„",e.NEL="…",e.SSA="†",e.ESA="‡",e.HTS="ˆ",e.HTJ="‰",e.VTS="Š",e.PLD="‹",e.PLU="Œ",e.RI="",e.SS2="Ž",e.SS3="",e.DCS="",e.PU1="‘",e.PU2="’",e.STS="“",e.CCH="”",e.MW="•",e.SPA="–",e.EPA="—",e.SOS="˜",e.SGCI="™",e.SCI="š",e.CSI="›",e.ST="œ",e.OSC="",e.PM="ž",e.APC="Ÿ"))(B0||(B0={}));var hb;(e=>e.ST=`${Ae.ESC}\\`)(hb||(hb={}));var Fd=class{constructor(e,t,i,r,n,s){this._textarea=e,this._compositionView=t,this._bufferService=i,this._optionsService=r,this._coreService=n,this._renderService=s,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}get isComposing(){return this._isComposing}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(e){this._compositionView.textContent=e.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(e){if(this._isComposing||this._isSendingComposition){if(e.keyCode===20||e.keyCode===229||e.keyCode===16||e.keyCode===17||e.keyCode===18)return!1;this._finalizeComposition(!1)}return e.keyCode===229?(this._handleAnyTextareaChanges(),!1):!0}_finalizeComposition(e){if(this._compositionView.classList.remove("active"),this._isComposing=!1,e){let t={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){this._isSendingComposition=!1;let i;t.start+=this._dataAlreadySent.length,this._isComposing?i=this._textarea.value.substring(t.start,this._compositionPosition.start):i=this._textarea.value.substring(t.start),i.length>0&&this._coreService.triggerDataEvent(i,!0)}},0)}else{this._isSendingComposition=!1;let t=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(t,!0)}}_handleAnyTextareaChanges(){let e=this._textarea.value;setTimeout(()=>{if(!this._isComposing){let t=this._textarea.value,i=t.replace(e,"");this._dataAlreadySent=i,t.length>e.length?this._coreService.triggerDataEvent(i,!0):t.length<e.length?this._coreService.triggerDataEvent(`${Ae.DEL}`,!0):t.length===e.length&&t!==e&&this._coreService.triggerDataEvent(t,!0)}},0)}updateCompositionElements(e){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){let t=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),i=this._renderService.dimensions.css.cell.height,r=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,n=t*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=n+"px",this._compositionView.style.top=r+"px",this._compositionView.style.height=i+"px",this._compositionView.style.lineHeight=i+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";let s=this._compositionView.getBoundingClientRect();this._textarea.style.left=n+"px",this._textarea.style.top=r+"px",this._textarea.style.width=Math.max(s.width,1)+"px",this._textarea.style.height=Math.max(s.height,1)+"px",this._textarea.style.lineHeight=s.height+"px"}e||setTimeout(()=>this.updateCompositionElements(!0),0)}}};Fd=Pt([Ne(2,Ti),Ne(3,Hi),Ne(4,Ss),Ne(5,hn)],Fd);var ni=0,si=0,ai=0,Tt=0,Sp={css:"#00000000",rgba:0},Ut;(e=>{function t(n,s,a,l){return l!==void 0?`#${Jn(n)}${Jn(s)}${Jn(a)}${Jn(l)}`:`#${Jn(n)}${Jn(s)}${Jn(a)}`}e.toCss=t;function i(n,s,a,l=255){return(n<<24|s<<16|a<<8|l)>>>0}e.toRgba=i;function r(n,s,a,l){return{css:e.toCss(n,s,a,l),rgba:e.toRgba(n,s,a,l)}}e.toColor=r})(Ut||(Ut={}));var Ct;(e=>{function t(o,c){if(Tt=(c.rgba&255)/255,Tt===1)return{css:c.css,rgba:c.rgba};let u=c.rgba>>24&255,d=c.rgba>>16&255,h=c.rgba>>8&255,f=o.rgba>>24&255,v=o.rgba>>16&255,p=o.rgba>>8&255;ni=f+Math.round((u-f)*Tt),si=v+Math.round((d-v)*Tt),ai=p+Math.round((h-p)*Tt);let S=Ut.toCss(ni,si,ai),_=Ut.toRgba(ni,si,ai);return{css:S,rgba:_}}e.blend=t;function i(o){return(o.rgba&255)===255}e.isOpaque=i;function r(o,c,u){let d=F0.ensureContrastRatio(o.rgba,c.rgba,u);if(d)return Ut.toColor(d>>24&255,d>>16&255,d>>8&255)}e.ensureContrastRatio=r;function n(o){let c=(o.rgba|255)>>>0;return[ni,si,ai]=F0.toChannels(c),{css:Ut.toCss(ni,si,ai),rgba:c}}e.opaque=n;function s(o,c){return Tt=Math.round(c*255),[ni,si,ai]=F0.toChannels(o.rgba),{css:Ut.toCss(ni,si,ai,Tt),rgba:Ut.toRgba(ni,si,ai,Tt)}}e.opacity=s;function a(o,c){return Tt=o.rgba&255,s(o,Tt*c/255)}e.multiplyOpacity=a;function l(o){return[o.rgba>>24&255,o.rgba>>16&255,o.rgba>>8&255]}e.toColorRGB=l})(Ct||(Ct={}));var $t;(e=>{let t,i;try{let n=document.createElement("canvas");n.width=1,n.height=1;let s=n.getContext("2d",{willReadFrequently:!0});s&&(t=s,t.globalCompositeOperation="copy",i=t.createLinearGradient(0,0,1,1))}catch{}function r(n){if(n.match(/#[\da-f]{3,8}/i))switch(n.length){case 4:return ni=parseInt(n.slice(1,2).repeat(2),16),si=parseInt(n.slice(2,3).repeat(2),16),ai=parseInt(n.slice(3,4).repeat(2),16),Ut.toColor(ni,si,ai);case 5:return ni=parseInt(n.slice(1,2).repeat(2),16),si=parseInt(n.slice(2,3).repeat(2),16),ai=parseInt(n.slice(3,4).repeat(2),16),Tt=parseInt(n.slice(4,5).repeat(2),16),Ut.toColor(ni,si,ai,Tt);case 7:return{css:n,rgba:(parseInt(n.slice(1),16)<<8|255)>>>0};case 9:return{css:n,rgba:parseInt(n.slice(1),16)>>>0}}let s=n.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(s)return ni=parseInt(s[1]),si=parseInt(s[2]),ai=parseInt(s[3]),Tt=Math.round((s[5]===void 0?1:parseFloat(s[5]))*255),Ut.toColor(ni,si,ai,Tt);if(!t||!i)throw new Error("css.toColor: Unsupported css format");if(t.fillStyle=i,t.fillStyle=n,typeof t.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(t.fillRect(0,0,1,1),[ni,si,ai,Tt]=t.getImageData(0,0,1,1).data,Tt!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:Ut.toRgba(ni,si,ai,Tt),css:n}}e.toColor=r})($t||($t={}));var ki;(e=>{function t(r){return i(r>>16&255,r>>8&255,r&255)}e.relativeLuminance=t;function i(r,n,s){let a=r/255,l=n/255,o=s/255,c=a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4),u=l<=.03928?l/12.92:Math.pow((l+.055)/1.055,2.4),d=o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4);return c*.2126+u*.7152+d*.0722}e.relativeLuminance2=i})(ki||(ki={}));var F0;(e=>{function t(a,l){if(Tt=(l&255)/255,Tt===1)return l;let o=l>>24&255,c=l>>16&255,u=l>>8&255,d=a>>24&255,h=a>>16&255,f=a>>8&255;return ni=d+Math.round((o-d)*Tt),si=h+Math.round((c-h)*Tt),ai=f+Math.round((u-f)*Tt),Ut.toRgba(ni,si,ai)}e.blend=t;function i(a,l,o){let c=ki.relativeLuminance(a>>8),u=ki.relativeLuminance(l>>8);if(Gr(c,u)<o){if(u<c){let f=r(a,l,o),v=Gr(c,ki.relativeLuminance(f>>8));if(v<o){let p=n(a,l,o),S=Gr(c,ki.relativeLuminance(p>>8));return v>S?f:p}return f}let d=n(a,l,o),h=Gr(c,ki.relativeLuminance(d>>8));if(h<o){let f=r(a,l,o),v=Gr(c,ki.relativeLuminance(f>>8));return h>v?d:f}return d}}e.ensureContrastRatio=i;function r(a,l,o){let c=a>>24&255,u=a>>16&255,d=a>>8&255,h=l>>24&255,f=l>>16&255,v=l>>8&255,p=Gr(ki.relativeLuminance2(h,f,v),ki.relativeLuminance2(c,u,d));for(;p<o&&(h>0||f>0||v>0);)h-=Math.max(0,Math.ceil(h*.1)),f-=Math.max(0,Math.ceil(f*.1)),v-=Math.max(0,Math.ceil(v*.1)),p=Gr(ki.relativeLuminance2(h,f,v),ki.relativeLuminance2(c,u,d));return(h<<24|f<<16|v<<8|255)>>>0}e.reduceLuminance=r;function n(a,l,o){let c=a>>24&255,u=a>>16&255,d=a>>8&255,h=l>>24&255,f=l>>16&255,v=l>>8&255,p=Gr(ki.relativeLuminance2(h,f,v),ki.relativeLuminance2(c,u,d));for(;p<o&&(h<255||f<255||v<255);)h=Math.min(255,h+Math.ceil((255-h)*.1)),f=Math.min(255,f+Math.ceil((255-f)*.1)),v=Math.min(255,v+Math.ceil((255-v)*.1)),p=Gr(ki.relativeLuminance2(h,f,v),ki.relativeLuminance2(c,u,d));return(h<<24|f<<16|v<<8|255)>>>0}e.increaseLuminance=n;function s(a){return[a>>24&255,a>>16&255,a>>8&255,a&255]}e.toChannels=s})(F0||(F0={}));function Jn(e){let t=e.toString(16);return t.length<2?"0"+t:t}function Gr(e,t){return e<t?(t+.05)/(e+.05):(e+.05)/(t+.05)}var OW=class extends qo{constructor(e,t,i){super(),this.content=0,this.combinedData="",this.fg=e.fg,this.bg=e.bg,this.combinedData=t,this._width=i}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(e){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}},Mc=class{constructor(e){this._bufferService=e,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new tr}register(e){let t={id:this._nextCharacterJoinerId++,handler:e};return this._characterJoiners.push(t),t.id}deregister(e){for(let t=0;t<this._characterJoiners.length;t++)if(this._characterJoiners[t].id===e)return this._characterJoiners.splice(t,1),!0;return!1}getJoinedCharacters(e){if(this._characterJoiners.length===0)return[];let t=this._bufferService.buffer.lines.get(e);if(!t||t.length===0)return[];let i=[],r=t.translateToString(!0),n=0,s=0,a=0,l=t.getFg(0),o=t.getBg(0);for(let c=0;c<t.getTrimmedLength();c++)if(t.loadCell(c,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==l||this._workCell.bg!==o){if(c-n>1){let u=this._getJoinedRanges(r,a,s,t,n);for(let d=0;d<u.length;d++)i.push(u[d])}n=c,a=s,l=this._workCell.fg,o=this._workCell.bg}s+=this._workCell.getChars().length||En.length}if(this._bufferService.cols-n>1){let c=this._getJoinedRanges(r,a,s,t,n);for(let u=0;u<c.length;u++)i.push(c[u])}return i}_getJoinedRanges(e,t,i,r,n){let s=e.substring(t,i),a=[];try{a=this._characterJoiners[0].handler(s)}catch(l){console.error(l)}for(let l=1;l<this._characterJoiners.length;l++)try{let o=this._characterJoiners[l].handler(s);for(let c=0;c<o.length;c++)Mc._mergeRanges(a,o[c])}catch(o){console.error(o)}return this._stringRangesToCellRanges(a,r,n),a}_stringRangesToCellRanges(e,t,i){let r=0,n=!1,s=0,a=e[r];if(a){for(let l=i;l<this._bufferService.cols;l++){let o=t.getWidth(l),c=t.getString(l).length||En.length;if(o!==0){if(!n&&a[0]<=s&&(a[0]=l,n=!0),a[1]<=s){if(a[1]=l,a=e[++r],!a)break;a[0]<=s?(a[0]=l,n=!0):n=!1}s+=c}}a&&(a[1]=this._bufferService.cols)}}static _mergeRanges(e,t){let i=!1;for(let r=0;r<e.length;r++){let n=e[r];if(i){if(t[1]<=n[0])return e[r-1][1]=t[1],e;if(t[1]<=n[1])return e[r-1][1]=Math.max(t[1],n[1]),e.splice(r,1),e;e.splice(r,1),r--}else{if(t[1]<=n[0])return e.splice(r,0,t),e;if(t[1]<=n[1])return n[0]=Math.min(t[0],n[0]),e;t[0]<n[1]&&(n[0]=Math.min(t[0],n[0]),i=!0);continue}}return i?e[e.length-1][1]=t[1]:e.push(t),e}};Mc=Pt([Ne(0,Ti)],Mc);function RW(e){return 57508<=e&&e<=57558}function IW(e){return 9472<=e&&e<=9631}function DW(e){return RW(e)||IW(e)}function VW(){return{css:{canvas:M0(),cell:M0()},device:{canvas:M0(),cell:M0(),char:{width:0,height:0,left:0,top:0}}}}function M0(){return{width:0,height:0}}var zd=class{constructor(e,t,i,r,n,s,a){this._document=e,this._characterJoinerService=t,this._optionsService=i,this._coreBrowserService=r,this._coreService=n,this._decorationService=s,this._themeService=a,this._workCell=new tr,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(e,t,i){this._selectionStart=e,this._selectionEnd=t,this._columnSelectMode=i}createRow(e,t,i,r,n,s,a,l,o,c,u){let d=[],h=this._characterJoinerService.getJoinedCharacters(t),f=this._themeService.colors,v=e.getNoBgTrimmedLength();i&&v<s+1&&(v=s+1);let p,S=0,_="",w=0,C=0,g=0,E=0,T=!1,L=0,V=!1,P=0,Y=0,W=[],A=c!==-1&&u!==-1;for(let $=0;$<v;$++){e.loadCell($,this._workCell);let Z=this._workCell.getWidth();if(Z===0)continue;let ie=!1,ne=$>=Y,ce=$,J=this._workCell;if(h.length>0&&$===h[0][0]&&ne){let O=h.shift(),ee=this._isCellInSelection(O[0],t);for(w=O[0]+1;w<O[1];w++)ne&&(ne=ee===this._isCellInSelection(w,t));ne&&(ne=!i||s<O[0]||s>=O[1]),ne?(ie=!0,J=new OW(this._workCell,e.translateToString(!0,O[0],O[1]),O[1]-O[0]),ce=O[1]-1,Z=J.getWidth()):Y=O[1]}let ae=this._isCellInSelection($,t),re=i&&$===s,X=A&&$>=c&&$<=u,le=!1;this._decorationService.forEachDecorationAtCell($,t,void 0,O=>{le=!0});let ve=J.getChars()||En;if(ve===" "&&(J.isUnderline()||J.isOverline())&&(ve=" "),P=Z*l-o.get(ve,J.isBold(),J.isItalic()),!p)p=this._document.createElement("span");else if(S&&(ae&&V||!ae&&!V&&J.bg===C)&&(ae&&V&&f.selectionForeground||J.fg===g)&&J.extended.ext===E&&X===T&&P===L&&!re&&!ie&&!le&&ne){J.isInvisible()?_+=En:_+=ve,S++;continue}else S&&(p.textContent=_),p=this._document.createElement("span"),S=0,_="";if(C=J.bg,g=J.fg,E=J.extended.ext,T=X,L=P,V=ae,ie&&s>=$&&s<=ce&&(s=$),!this._coreService.isCursorHidden&&re&&this._coreService.isCursorInitialized){if(W.push("xterm-cursor"),this._coreBrowserService.isFocused)a&&W.push("xterm-cursor-blink"),W.push(r==="bar"?"xterm-cursor-bar":r==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(n)switch(n){case"outline":W.push("xterm-cursor-outline");break;case"block":W.push("xterm-cursor-block");break;case"bar":W.push("xterm-cursor-bar");break;case"underline":W.push("xterm-cursor-underline");break}}if(J.isBold()&&W.push("xterm-bold"),J.isItalic()&&W.push("xterm-italic"),J.isDim()&&W.push("xterm-dim"),J.isInvisible()?_=En:_=J.getChars()||En,J.isUnderline()&&(W.push(`xterm-underline-${J.extended.underlineStyle}`),_===" "&&(_=" "),!J.isUnderlineColorDefault()))if(J.isUnderlineColorRGB())p.style.textDecorationColor=`rgb(${qo.toColorRGB(J.getUnderlineColor()).join(",")})`;else{let O=J.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&J.isBold()&&O<8&&(O+=8),p.style.textDecorationColor=f.ansi[O].css}J.isOverline()&&(W.push("xterm-overline"),_===" "&&(_=" ")),J.isStrikethrough()&&W.push("xterm-strikethrough"),X&&(p.style.textDecoration="underline");let ue=J.getFgColor(),he=J.getFgColorMode(),ye=J.getBgColor(),U=J.getBgColorMode(),fe=!!J.isInverse();if(fe){let O=ue;ue=ye,ye=O;let ee=he;he=U,U=ee}let ge,se,x=!1;this._decorationService.forEachDecorationAtCell($,t,void 0,O=>{O.options.layer!=="top"&&x||(O.backgroundColorRGB&&(U=50331648,ye=O.backgroundColorRGB.rgba>>8&16777215,ge=O.backgroundColorRGB),O.foregroundColorRGB&&(he=50331648,ue=O.foregroundColorRGB.rgba>>8&16777215,se=O.foregroundColorRGB),x=O.options.layer==="top")}),!x&&ae&&(ge=this._coreBrowserService.isFocused?f.selectionBackgroundOpaque:f.selectionInactiveBackgroundOpaque,ye=ge.rgba>>8&16777215,U=50331648,x=!0,f.selectionForeground&&(he=50331648,ue=f.selectionForeground.rgba>>8&16777215,se=f.selectionForeground)),x&&W.push("xterm-decoration-top");let H;switch(U){case 16777216:case 33554432:H=f.ansi[ye],W.push(`xterm-bg-${ye}`);break;case 50331648:H=Ut.toColor(ye>>16,ye>>8&255,ye&255),this._addStyle(p,`background-color:#${Cp((ye>>>0).toString(16),"0",6)}`);break;case 0:default:fe?(H=f.foreground,W.push("xterm-bg-257")):H=f.background}switch(ge||J.isDim()&&(ge=Ct.multiplyOpacity(H,.5)),he){case 16777216:case 33554432:J.isBold()&&ue<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ue+=8),this._applyMinimumContrast(p,H,f.ansi[ue],J,ge,void 0)||W.push(`xterm-fg-${ue}`);break;case 50331648:let O=Ut.toColor(ue>>16&255,ue>>8&255,ue&255);this._applyMinimumContrast(p,H,O,J,ge,se)||this._addStyle(p,`color:#${Cp(ue.toString(16),"0",6)}`);break;case 0:default:this._applyMinimumContrast(p,H,f.foreground,J,ge,se)||fe&&W.push("xterm-fg-257")}W.length&&(p.className=W.join(" "),W.length=0),!re&&!ie&&!le&&ne?S++:p.textContent=_,P!==this.defaultSpacing&&(p.style.letterSpacing=`${P}px`),d.push(p),$=ce}return p&&S&&(p.textContent=_),d}_applyMinimumContrast(e,t,i,r,n,s){if(this._optionsService.rawOptions.minimumContrastRatio===1||DW(r.getCode()))return!1;let a=this._getContrastCache(r),l;if(!n&&!s&&(l=a.getColor(t.rgba,i.rgba)),l===void 0){let o=this._optionsService.rawOptions.minimumContrastRatio/(r.isDim()?2:1);l=Ct.ensureContrastRatio(n||t,s||i,o),a.setColor((n||t).rgba,(s||i).rgba,l??null)}return l?(this._addStyle(e,`color:${l.css}`),!0):!1}_getContrastCache(e){return e.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(e,t){e.setAttribute("style",`${e.getAttribute("style")||""}${t};`)}_isCellInSelection(e,t){let i=this._selectionStart,r=this._selectionEnd;return!i||!r?!1:this._columnSelectMode?i[0]<=r[0]?e>=i[0]&&t>=i[1]&&e<r[0]&&t<=r[1]:e<i[0]&&t>=i[1]&&e>=r[0]&&t<=r[1]:t>i[1]&&t<r[1]||i[1]===r[1]&&t===i[1]&&e>=i[0]&&e<r[0]||i[1]<r[1]&&t===r[1]&&e<r[0]||i[1]<r[1]&&t===i[1]&&e>=i[0]}};zd=Pt([Ne(1,qg),Ne(2,Hi),Ne(3,dn),Ne(4,Ss),Ne(5,Go),Ne(6,za)],zd);function Cp(e,t,i){for(;e.length<i;)e=t+e;return e}var ZW=class{constructor(e,t){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=e.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";let i=e.createElement("span");i.classList.add("xterm-char-measure-element");let r=e.createElement("span");r.classList.add("xterm-char-measure-element"),r.style.fontWeight="bold";let n=e.createElement("span");n.classList.add("xterm-char-measure-element"),n.style.fontStyle="italic";let s=e.createElement("span");s.classList.add("xterm-char-measure-element"),s.style.fontWeight="bold",s.style.fontStyle="italic",this._measureElements=[i,r,n,s],this._container.appendChild(i),this._container.appendChild(r),this._container.appendChild(n),this._container.appendChild(s),t.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(e,t,i,r){e===this._font&&t===this._fontSize&&i===this._weight&&r===this._weightBold||(this._font=e,this._fontSize=t,this._weight=i,this._weightBold=r,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${i}`,this._measureElements[1].style.fontWeight=`${r}`,this._measureElements[2].style.fontWeight=`${i}`,this._measureElements[3].style.fontWeight=`${r}`,this.clear())}get(e,t,i){let r=0;if(!t&&!i&&e.length===1&&(r=e.charCodeAt(0))<256){if(this._flat[r]!==-9999)return this._flat[r];let a=this._measure(e,0);return a>0&&(this._flat[r]=a),a}let n=e;t&&(n+="B"),i&&(n+="I");let s=this._holey.get(n);if(s===void 0){let a=0;t&&(a|=1),i&&(a|=2),s=this._measure(e,a),s>0&&this._holey.set(n,s)}return s}_measure(e,t){let i=this._measureElements[t];return i.textContent=e.repeat(32),i.offsetWidth/32}},BW=class{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(e,t,i,r=!1){if(this.selectionStart=t,this.selectionEnd=i,!t||!i||t[0]===i[0]&&t[1]===i[1]){this.clear();return}let n=e.buffers.active.ydisp,s=t[1]-n,a=i[1]-n,l=Math.max(s,0),o=Math.min(a,e.rows-1);if(l>=e.rows||o<0){this.clear();return}this.hasSelection=!0,this.columnSelectMode=r,this.viewportStartRow=s,this.viewportEndRow=a,this.viewportCappedStartRow=l,this.viewportCappedEndRow=o,this.startCol=t[0],this.endCol=i[0]}isCellSelected(e,t,i){return this.hasSelection?(i-=e.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?t>=this.startCol&&i>=this.viewportCappedStartRow&&t<this.endCol&&i<=this.viewportCappedEndRow:t<this.startCol&&i>=this.viewportCappedStartRow&&t>=this.endCol&&i<=this.viewportCappedEndRow:i>this.viewportStartRow&&i<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&i===this.viewportStartRow&&t>=this.startCol&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&i===this.viewportEndRow&&t<this.endCol||this.viewportStartRow<this.viewportEndRow&&i===this.viewportStartRow&&t>=this.startCol):!1}};function FW(){return new BW}var s1="xterm-dom-renderer-owner-",Ki="xterm-rows",E0="xterm-fg-",kp="xterm-bg-",Nl="xterm-focus",L0="xterm-selection",zW=1,Ud=class extends Je{constructor(e,t,i,r,n,s,a,l,o,c,u,d,h,f){super(),this._terminal=e,this._document=t,this._element=i,this._screenElement=r,this._viewportElement=n,this._helperContainer=s,this._linkifier2=a,this._charSizeService=o,this._optionsService=c,this._bufferService=u,this._coreService=d,this._coreBrowserService=h,this._themeService=f,this._terminalClass=zW++,this._rowElements=[],this._selectionRenderModel=FW(),this.onRequestRedraw=this._register(new xe).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(Ki),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(L0),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=VW(),this._updateDimensions(),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._themeService.onChangeColors(v=>this._injectCss(v))),this._injectCss(this._themeService.colors),this._rowFactory=l.createInstance(zd,document),this._element.classList.add(s1+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this._register(this._linkifier2.onShowLinkUnderline(v=>this._handleLinkHover(v))),this._register(this._linkifier2.onHideLinkUnderline(v=>this._handleLinkLeave(v))),this._register(Et(()=>{this._element.classList.remove(s1+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new ZW(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){let e=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*e,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*e),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/e),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/e),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(let i of this._rowElements)i.style.width=`${this.dimensions.css.canvas.width}px`,i.style.height=`${this.dimensions.css.cell.height}px`,i.style.lineHeight=`${this.dimensions.css.cell.height}px`,i.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));let t=`${this._terminalSelector} .${Ki} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=t,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(e){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let t=`${this._terminalSelector} .${Ki} { pointer-events: none; color: ${e.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;t+=`${this._terminalSelector} .${Ki} .xterm-dim { color: ${Ct.multiplyOpacity(e.foreground,.5).css};}`,t+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;let i=`blink_underline_${this._terminalClass}`,r=`blink_bar_${this._terminalClass}`,n=`blink_block_${this._terminalClass}`;t+=`@keyframes ${i} { 50% { border-bottom-style: hidden; }}`,t+=`@keyframes ${r} { 50% { box-shadow: none; }}`,t+=`@keyframes ${n} { 0% { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css}; } 50% { background-color: inherit; color: ${e.cursor.css}; }}`,t+=`${this._terminalSelector} .${Ki}.${Nl} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${i} 1s step-end infinite;}${this._terminalSelector} .${Ki}.${Nl} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${r} 1s step-end infinite;}${this._terminalSelector} .${Ki}.${Nl} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${n} 1s step-end infinite;}${this._terminalSelector} .${Ki} .xterm-cursor.xterm-cursor-block { background-color: ${e.cursor.css}; color: ${e.cursorAccent.css};}${this._terminalSelector} .${Ki} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${e.cursor.css} !important; color: ${e.cursorAccent.css} !important;}${this._terminalSelector} .${Ki} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${e.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${Ki} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${e.cursor.css} inset;}${this._terminalSelector} .${Ki} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${e.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,t+=`${this._terminalSelector} .${L0} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${L0} div { position: absolute; background-color: ${e.selectionBackgroundOpaque.css};}${this._terminalSelector} .${L0} div { position: absolute; background-color: ${e.selectionInactiveBackgroundOpaque.css};}`;for(let[s,a]of e.ansi.entries())t+=`${this._terminalSelector} .${E0}${s} { color: ${a.css}; }${this._terminalSelector} .${E0}${s}.xterm-dim { color: ${Ct.multiplyOpacity(a,.5).css}; }${this._terminalSelector} .${kp}${s} { background-color: ${a.css}; }`;t+=`${this._terminalSelector} .${E0}257 { color: ${Ct.opaque(e.background).css}; }${this._terminalSelector} .${E0}257.xterm-dim { color: ${Ct.multiplyOpacity(Ct.opaque(e.background),.5).css}; }${this._terminalSelector} .${kp}257 { background-color: ${e.foreground.css}; }`,this._themeStyleElement.textContent=t}_setDefaultSpacing(){let e=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${e}px`,this._rowFactory.defaultSpacing=e}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(e,t){for(let i=this._rowElements.length;i<=t;i++){let r=this._document.createElement("div");this._rowContainer.appendChild(r),this._rowElements.push(r)}for(;this._rowElements.length>t;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(e,t){this._refreshRowElements(e,t),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(Nl),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(Nl),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(e,t,i){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(e,t,i),this.renderRows(0,this._bufferService.rows-1),!e||!t||(this._selectionRenderModel.update(this._terminal,e,t,i),!this._selectionRenderModel.hasSelection))return;let r=this._selectionRenderModel.viewportStartRow,n=this._selectionRenderModel.viewportEndRow,s=this._selectionRenderModel.viewportCappedStartRow,a=this._selectionRenderModel.viewportCappedEndRow,l=this._document.createDocumentFragment();if(i){let o=e[0]>t[0];l.appendChild(this._createSelectionElement(s,o?t[0]:e[0],o?e[0]:t[0],a-s+1))}else{let o=r===s?e[0]:0,c=s===n?t[0]:this._bufferService.cols;l.appendChild(this._createSelectionElement(s,o,c));let u=a-s-1;if(l.appendChild(this._createSelectionElement(s+1,0,this._bufferService.cols,u)),s!==a){let d=n===a?t[0]:this._bufferService.cols;l.appendChild(this._createSelectionElement(a,0,d))}}this._selectionContainer.appendChild(l)}_createSelectionElement(e,t,i,r=1){let n=this._document.createElement("div"),s=t*this.dimensions.css.cell.width,a=this.dimensions.css.cell.width*(i-t);return s+a>this.dimensions.css.canvas.width&&(a=this.dimensions.css.canvas.width-s),n.style.height=`${r*this.dimensions.css.cell.height}px`,n.style.top=`${e*this.dimensions.css.cell.height}px`,n.style.left=`${s}px`,n.style.width=`${a}px`,n}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(let e of this._rowElements)e.replaceChildren()}renderRows(e,t){let i=this._bufferService.buffer,r=i.ybase+i.y,n=Math.min(i.x,this._bufferService.cols-1),s=this._coreService.decPrivateModes.cursorBlink??this._optionsService.rawOptions.cursorBlink,a=this._coreService.decPrivateModes.cursorStyle??this._optionsService.rawOptions.cursorStyle,l=this._optionsService.rawOptions.cursorInactiveStyle;for(let o=e;o<=t;o++){let c=o+i.ydisp,u=this._rowElements[o],d=i.lines.get(c);if(!u||!d)break;u.replaceChildren(...this._rowFactory.createRow(d,c,c===r,a,l,n,s,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${s1}${this._terminalClass}`}_handleLinkHover(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)}_handleLinkLeave(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)}_setCellUnderline(e,t,i,r,n,s){i<0&&(e=0),r<0&&(t=0);let a=this._bufferService.rows-1;i=Math.max(Math.min(i,a),0),r=Math.max(Math.min(r,a),0),n=Math.min(n,this._bufferService.cols);let l=this._bufferService.buffer,o=l.ybase+l.y,c=Math.min(l.x,n-1),u=this._optionsService.rawOptions.cursorBlink,d=this._optionsService.rawOptions.cursorStyle,h=this._optionsService.rawOptions.cursorInactiveStyle;for(let f=i;f<=r;++f){let v=f+l.ydisp,p=this._rowElements[f],S=l.lines.get(v);if(!p||!S)break;p.replaceChildren(...this._rowFactory.createRow(S,v,v===o,d,h,c,u,this.dimensions.css.cell.width,this._widthCache,s?f===i?e:0:-1,s?(f===r?t:n)-1:-1))}}};Ud=Pt([Ne(7,_2),Ne(8,du),Ne(9,Hi),Ne(10,Ti),Ne(11,Ss),Ne(12,dn),Ne(13,za)],Ud);var Wd=class extends Je{constructor(e,t,i){super(),this._optionsService=i,this.width=0,this.height=0,this._onCharSizeChange=this._register(new xe),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this._register(new WW(this._optionsService))}catch{this._measureStrategy=this._register(new UW(e,t,this._optionsService))}this._register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}get hasValidSize(){return this.width>0&&this.height>0}measure(){let e=this._measureStrategy.measure();(e.width!==this.width||e.height!==this.height)&&(this.width=e.width,this.height=e.height,this._onCharSizeChange.fire())}};Wd=Pt([Ne(2,Hi)],Wd);var fb=class extends Je{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(e,t){e!==void 0&&e>0&&t!==void 0&&t>0&&(this._result.width=e,this._result.height=t)}},UW=class extends fb{constructor(e,t,i){super(),this._document=e,this._parentElement=t,this._optionsService=i,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}},WW=class extends fb{constructor(e){super(),this._optionsService=e,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");let t=this._ctx.measureText("W");if(!("width"in t&&"fontBoundingBoxAscent"in t&&"fontBoundingBoxDescent"in t))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;let e=this._ctx.measureText("W");return this._validateAndSet(e.width,e.fontBoundingBoxAscent+e.fontBoundingBoxDescent),this._result}},jW=class extends Je{constructor(e,t,i){super(),this._textarea=e,this._window=t,this.mainDocument=i,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=this._register(new KW(this._window)),this._onDprChange=this._register(new xe),this.onDprChange=this._onDprChange.event,this._onWindowChange=this._register(new xe),this.onWindowChange=this._onWindowChange.event,this._register(this.onWindowChange(r=>this._screenDprMonitor.setWindow(r))),this._register(fi.forward(this._screenDprMonitor.onDprChange,this._onDprChange)),this._register(We(this._textarea,"focus",()=>this._isFocused=!0)),this._register(We(this._textarea,"blur",()=>this._isFocused=!1))}get window(){return this._window}set window(e){this._window!==e&&(this._window=e,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask(()=>this._cachedIsFocused=void 0)),this._cachedIsFocused}},KW=class extends Je{constructor(e){super(),this._parentWindow=e,this._windowResizeListener=this._register(new ra),this._onDprChange=this._register(new xe),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this._register(Et(()=>this.clearListener()))}setWindow(e){this._parentWindow=e,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=We(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var e;this._outerListener&&((e=this._resolutionMediaMatchList)==null||e.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){!this._resolutionMediaMatchList||!this._outerListener||(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}},qW=class extends Je{constructor(){super(),this.linkProviders=[],this._register(Et(()=>this.linkProviders.length=0))}registerLinkProvider(e){return this.linkProviders.push(e),{dispose:()=>{let t=this.linkProviders.indexOf(e);t!==-1&&this.linkProviders.splice(t,1)}}}};function C2(e,t,i){let r=i.getBoundingClientRect(),n=e.getComputedStyle(i),s=parseInt(n.getPropertyValue("padding-left")),a=parseInt(n.getPropertyValue("padding-top"));return[t.clientX-r.left-s,t.clientY-r.top-a]}function GW(e,t,i,r,n,s,a,l,o){if(!s)return;let c=C2(e,t,i);if(c)return c[0]=Math.ceil((c[0]+(o?a/2:0))/a),c[1]=Math.ceil(c[1]/l),c[0]=Math.min(Math.max(c[0],1),r+(o?1:0)),c[1]=Math.min(Math.max(c[1],1),n),c}var jd=class{constructor(e,t){this._renderService=e,this._charSizeService=t}getCoords(e,t,i,r,n){return GW(window,e,t,i,r,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,n)}getMouseReportCoords(e,t){let i=C2(window,e,t);if(this._charSizeService.hasValidSize)return i[0]=Math.min(Math.max(i[0],0),this._renderService.dimensions.css.canvas.width-1),i[1]=Math.min(Math.max(i[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(i[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(i[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(i[0]),y:Math.floor(i[1])}}};jd=Pt([Ne(0,hn),Ne(1,du)],jd);var YW=class{constructor(e,t){this._renderCallback=e,this._coreBrowserService=t,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(e){return this._refreshCallbacks.push(e),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(e,t,i){this._rowCount=i,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t,!this._animationFrame&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0){this._runRefreshCallbacks();return}let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(let e of this._refreshCallbacks)e(0);this._refreshCallbacks=[]}},pb={};aU(pb,{getSafariVersion:()=>JW,isChromeOS:()=>gb,isFirefox:()=>_b,isIpad:()=>QW,isIphone:()=>ej,isLegacyEdge:()=>XW,isLinux:()=>k2,isMac:()=>Ec,isNode:()=>hu,isSafari:()=>mb,isWindows:()=>vb});var hu=typeof process<"u"&&"title"in process,Yo=hu?"node":navigator.userAgent,Xo=hu?"node":navigator.platform,_b=Yo.includes("Firefox"),XW=Yo.includes("Edge"),mb=/^((?!chrome|android).)*safari/i.test(Yo);function JW(){if(!mb)return 0;let e=Yo.match(/Version\/(\d+)/);return e===null||e.length<2?0:parseInt(e[1])}var Ec=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(Xo),QW=Xo==="iPad",ej=Xo==="iPhone",vb=["Windows","Win16","Win32","WinCE"].includes(Xo),k2=Xo.indexOf("Linux")>=0,gb=/\bCrOS\b/.test(Yo),bb=class{constructor(){this._tasks=[],this._i=0}enqueue(e){this._tasks.push(e),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(e){this._idleCallback=void 0;let t=0,i=0,r=e.timeRemaining(),n=0;for(;this._i<this._tasks.length;){if(t=performance.now(),this._tasks[this._i]()||this._i++,t=Math.max(1,performance.now()-t),i=Math.max(t,i),n=e.timeRemaining(),i*1.5>n){r-t<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-t))}ms`),this._start();return}r=n}this.clear()}},tj=class extends bb{_requestCallback(e){return setTimeout(()=>e(this._createDeadline(16)))}_cancelCallback(e){clearTimeout(e)}_createDeadline(e){let t=performance.now()+e;return{timeRemaining:()=>Math.max(0,t-performance.now())}}},ij=class extends bb{_requestCallback(e){return requestIdleCallback(e)}_cancelCallback(e){cancelIdleCallback(e)}},Lc=!hu&&"requestIdleCallback"in window?ij:tj,rj=class{constructor(){this._queue=new Lc}set(e){this._queue.clear(),this._queue.enqueue(e)}flush(){this._queue.flush()}},Kd=class extends Je{constructor(e,t,i,r,n,s,a,l,o){super(),this._rowCount=e,this._optionsService=i,this._charSizeService=r,this._coreService=n,this._coreBrowserService=l,this._renderer=this._register(new ra),this._pausedResizeTask=new rj,this._observerDisposable=this._register(new ra),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this._register(new xe),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this._register(new xe),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this._register(new xe),this.onRender=this._onRender.event,this._onRefreshRequest=this._register(new xe),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new YW((c,u)=>this._renderRows(c,u),this._coreBrowserService),this._register(this._renderDebouncer),this._syncOutputHandler=new nj(this._coreBrowserService,this._coreService,()=>this._fullRefresh()),this._register(Et(()=>this._syncOutputHandler.dispose())),this._register(this._coreBrowserService.onDprChange(()=>this.handleDevicePixelRatioChange())),this._register(a.onResize(()=>this._fullRefresh())),this._register(a.buffers.onBufferActivate(()=>{var c;return(c=this._renderer.value)==null?void 0:c.clear()})),this._register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this._register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this._register(s.onDecorationRegistered(()=>this._fullRefresh())),this._register(s.onDecorationRemoved(()=>this._fullRefresh())),this._register(this._optionsService.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(a.cols,a.rows),this._fullRefresh()})),this._register(this._optionsService.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(a.buffer.y,a.buffer.y,!0))),this._register(o.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(this._coreBrowserService.window,t),this._register(this._coreBrowserService.onWindowChange(c=>this._registerIntersectionObserver(c,t)))}get dimensions(){return this._renderer.value.dimensions}_registerIntersectionObserver(e,t){if("IntersectionObserver"in e){let i=new e.IntersectionObserver(r=>this._handleIntersectionChange(r[r.length-1]),{threshold:0});i.observe(t),this._observerDisposable.value=Et(()=>i.disconnect())}}_handleIntersectionChange(e){this._isPaused=e.isIntersecting===void 0?e.intersectionRatio===0:!e.isIntersecting,!this._isPaused&&!this._charSizeService.hasValidSize&&this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(e,t,i=!1){if(this._isPaused){this._needsFullRefresh=!0;return}if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}let r=this._syncOutputHandler.flush();r&&(e=Math.min(e,r.start),t=Math.max(t,r.end)),i||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(e,t,this._rowCount)}_renderRows(e,t){if(this._renderer.value){if(this._coreService.decPrivateModes.synchronizedOutput){this._syncOutputHandler.bufferRows(e,t);return}e=Math.min(e,this._rowCount-1),t=Math.min(t,this._rowCount-1),this._renderer.value.renderRows(e,t),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:e,end:t}),this._onRender.fire({start:e,end:t}),this._isNextRenderRedrawOnly=!0}}resize(e,t){this._rowCount=t,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(e){this._renderer.value=e,this._renderer.value&&(this._renderer.value.onRequestRedraw(t=>this.refreshRows(t.start,t.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(e){return this._renderDebouncer.addRefreshCallback(e)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var e,t;this._renderer.value&&((t=(e=this._renderer.value).clearTextureAtlas)==null||t.call(e),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(e,t){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var i;return(i=this._renderer.value)==null?void 0:i.handleResize(e,t)}):this._renderer.value.handleResize(e,t),this._fullRefresh())}handleCharSizeChanged(){var e;(e=this._renderer.value)==null||e.handleCharSizeChanged()}handleBlur(){var e;(e=this._renderer.value)==null||e.handleBlur()}handleFocus(){var e;(e=this._renderer.value)==null||e.handleFocus()}handleSelectionChanged(e,t,i){var r;this._selectionState.start=e,this._selectionState.end=t,this._selectionState.columnSelectMode=i,(r=this._renderer.value)==null||r.handleSelectionChanged(e,t,i)}handleCursorMove(){var e;(e=this._renderer.value)==null||e.handleCursorMove()}clear(){var e;(e=this._renderer.value)==null||e.clear()}};Kd=Pt([Ne(2,Hi),Ne(3,du),Ne(4,Ss),Ne(5,Go),Ne(6,Ti),Ne(7,dn),Ne(8,za)],Kd);var nj=class{constructor(e,t,i){this._coreBrowserService=e,this._coreService=t,this._onTimeout=i,this._start=0,this._end=0,this._isBuffering=!1}bufferRows(e,t){this._isBuffering?(this._start=Math.min(this._start,e),this._end=Math.max(this._end,t)):(this._start=e,this._end=t,this._isBuffering=!0),this._timeout===void 0&&(this._timeout=this._coreBrowserService.window.setTimeout(()=>{this._timeout=void 0,this._coreService.decPrivateModes.synchronizedOutput=!1,this._onTimeout()},1e3))}flush(){if(this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0),!this._isBuffering)return;let e={start:this._start,end:this._end};return this._isBuffering=!1,e}dispose(){this._timeout!==void 0&&(this._coreBrowserService.window.clearTimeout(this._timeout),this._timeout=void 0)}};function sj(e,t,i,r){let n=i.buffer.x,s=i.buffer.y;if(!i.buffer.hasScrollback)return oj(n,s,e,t,i,r)+fu(s,t,i,r)+cj(n,s,e,t,i,r);let a;if(s===t)return a=n>e?"D":"C",Ho(Math.abs(n-e),To(a,r));a=s>t?"D":"C";let l=Math.abs(s-t),o=lj(s>t?e:n,i)+(l-1)*i.cols+1+aj(s>t?n:e);return Ho(o,To(a,r))}function aj(e,t){return e-1}function lj(e,t){return t.cols-e}function oj(e,t,i,r,n,s){return fu(t,r,n,s).length===0?"":Ho(wb(e,t,e,t-gs(t,n),!1,n).length,To("D",s))}function fu(e,t,i,r){let n=e-gs(e,i),s=t-gs(t,i),a=Math.abs(n-s)-uj(e,t,i);return Ho(a,To(yb(e,t),r))}function cj(e,t,i,r,n,s){let a;fu(t,r,n,s).length>0?a=r-gs(r,n):a=t;let l=r,o=dj(e,t,i,r,n,s);return Ho(wb(e,a,i,l,o==="C",n).length,To(o,s))}function uj(e,t,i){var a;let r=0,n=e-gs(e,i),s=t-gs(t,i);for(let l=0;l<Math.abs(n-s);l++){let o=yb(e,t)==="A"?-1:1;(a=i.buffer.lines.get(n+o*l))!=null&&a.isWrapped&&r++}return r}function gs(e,t){let i=0,r=t.buffer.lines.get(e),n=r==null?void 0:r.isWrapped;for(;n&&e>=0&&e<t.rows;)i++,r=t.buffer.lines.get(--e),n=r==null?void 0:r.isWrapped;return i}function dj(e,t,i,r,n,s){let a;return fu(i,r,n,s).length>0?a=r-gs(r,n):a=t,e<i&&a<=r||e>=i&&a<r?"C":"D"}function yb(e,t){return e>t?"A":"B"}function wb(e,t,i,r,n,s){let a=e,l=t,o="";for(;(a!==i||l!==r)&&l>=0&&l<s.buffer.lines.length;)a+=n?1:-1,n&&a>s.cols-1?(o+=s.buffer.translateBufferLineToString(l,!1,e,a),a=0,e=0,l++):!n&&a<0&&(o+=s.buffer.translateBufferLineToString(l,!1,0,e+1),a=s.cols-1,e=a,l--);return o+s.buffer.translateBufferLineToString(l,!1,e,a)}function To(e,t){let i=t?"O":"[";return Ae.ESC+i+e}function Ho(e,t){e=Math.floor(e);let i="";for(let r=0;r<e;r++)i+=t;return i}var hj=class{constructor(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:!this.selectionEnd||!this.selectionStart?this.selectionStart:this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?e%this._bufferService.cols===0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)-1]:[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){let e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[Math.max(e,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){let e=this.selectionStart,t=this.selectionEnd;return!e||!t?!1:e[1]>t[1]||e[1]===t[1]&&e[0]>t[0]}handleTrim(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}};function Ap(e,t){if(e.start.y>e.end.y)throw new Error(`Buffer range end (${e.end.x}, ${e.end.y}) cannot be before start (${e.start.x}, ${e.start.y})`);return t*(e.end.y-e.start.y)+(e.end.x-e.start.x+1)}var a1=50,fj=15,pj=50,_j=500,mj=" ",vj=new RegExp(mj,"g"),qd=class extends Je{constructor(e,t,i,r,n,s,a,l,o){super(),this._element=e,this._screenElement=t,this._linkifier=i,this._bufferService=r,this._coreService=n,this._mouseService=s,this._optionsService=a,this._renderService=l,this._coreBrowserService=o,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new tr,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this._register(new xe),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this._register(new xe),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this._register(new xe),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this._register(new xe),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=c=>this._handleMouseMove(c),this._mouseUpListener=c=>this._handleMouseUp(c),this._coreService.onUserInput(()=>{this.hasSelection&&this.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(c=>this._handleTrim(c)),this._register(this._bufferService.buffers.onBufferActivate(c=>this._handleBufferActivate(c))),this.enable(),this._model=new hj(this._bufferService),this._activeSelectionMode=0,this._register(Et(()=>{this._removeMouseDownListeners()})),this._register(this._bufferService.onResize(c=>{c.rowsChanged&&this.clearSelection()}))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;return!e||!t?!1:e[0]!==t[0]||e[1]!==t[1]}get selectionText(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd;if(!e||!t)return"";let i=this._bufferService.buffer,r=[];if(this._activeSelectionMode===3){if(e[0]===t[0])return"";let n=e[0]<t[0]?e[0]:t[0],s=e[0]<t[0]?t[0]:e[0];for(let a=e[1];a<=t[1];a++){let l=i.translateBufferLineToString(a,!0,n,s);r.push(l)}}else{let n=e[1]===t[1]?t[0]:void 0;r.push(i.translateBufferLineToString(e[1],!0,e[0],n));for(let s=e[1]+1;s<=t[1]-1;s++){let a=i.lines.get(s),l=i.translateBufferLineToString(s,!0);a!=null&&a.isWrapped?r[r.length-1]+=l:r.push(l)}if(e[1]!==t[1]){let s=i.lines.get(t[1]),a=i.translateBufferLineToString(t[1],!0,0,t[0]);s&&s.isWrapped?r[r.length-1]+=a:r.push(a)}}return r.map(n=>n.replace(vj," ")).join(vb?`\r
92
- `:`
93
- `)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(e){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),k2&&e&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(e){let t=this._getMouseBufferCoords(e),i=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!i||!r||!t?!1:this._areCoordsInSelection(t,i,r)}isCellInSelection(e,t){let i=this._model.finalSelectionStart,r=this._model.finalSelectionEnd;return!i||!r?!1:this._areCoordsInSelection([e,t],i,r)}_areCoordsInSelection(e,t,i){return e[1]>t[1]&&e[1]<i[1]||t[1]===i[1]&&e[1]===t[1]&&e[0]>=t[0]&&e[0]<i[0]||t[1]<i[1]&&e[1]===i[1]&&e[0]<i[0]||t[1]<i[1]&&e[1]===t[1]&&e[0]>=t[0]}_selectWordAtCursor(e,t){var n,s;let i=(s=(n=this._linkifier.currentLink)==null?void 0:n.link)==null?void 0:s.range;if(i)return this._model.selectionStart=[i.start.x-1,i.start.y-1],this._model.selectionStartLength=Ap(i,this._bufferService.cols),this._model.selectionEnd=void 0,!0;let r=this._getMouseBufferCoords(e);return r?(this._selectWordAt(r,t),this._model.selectionEnd=void 0,!0):!1}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()}_handleTrim(e){this._model.handleTrim(e)&&this.refresh()}_getMouseBufferCoords(e){let t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t}_getMouseEventScrollAmount(e){let t=C2(this._coreBrowserService.window,e,this._screenElement)[1],i=this._renderService.dimensions.css.canvas.height;return t>=0&&t<=i?0:(t>i&&(t-=i),t=Math.min(Math.max(t,-a1),a1),t/=a1,t/Math.abs(t)+Math.round(t*(fj-1)))}shouldForceSelection(e){return Ec?e.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:e.shiftKey}handleMouseDown(e){if(this._mouseDownTimeStamp=e.timeStamp,!(e.button===2&&this.hasSelection)&&e.button===0){if(!this._enabled){if(!this.shouldForceSelection(e))return;e.stopPropagation()}e.preventDefault(),this._dragScrollAmount=0,this._enabled&&e.shiftKey?this._handleIncrementalClick(e):e.detail===1?this._handleSingleClick(e):e.detail===2?this._handleDoubleClick(e):e.detail===3&&this._handleTripleClick(e),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval(()=>this._dragScroll(),pj)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(e){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(e))}_handleSingleClick(e){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(e)?3:0,this._model.selectionStart=this._getMouseBufferCoords(e),!this._model.selectionStart)return;this._model.selectionEnd=void 0;let t=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);t&&t.length!==this._model.selectionStart[0]&&t.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(e){this._selectWordAtCursor(e,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(e){let t=this._getMouseBufferCoords(e);t&&(this._activeSelectionMode=2,this._selectLineAt(t[1]))}shouldColumnSelect(e){return e.altKey&&!(Ec&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(e){if(e.stopImmediatePropagation(),!this._model.selectionStart)return;let t=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(e),!this._model.selectionEnd){this.refresh(!0);return}this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(e),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));let i=this._bufferService.buffer;if(this._model.selectionEnd[1]<i.lines.length){let r=i.lines.get(this._model.selectionEnd[1]);r&&r.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}(!t||t[0]!==this._model.selectionEnd[0]||t[1]!==this._model.selectionEnd[1])&&this.refresh(!0)}_dragScroll(){if(!(!this._model.selectionEnd||!this._model.selectionStart)&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});let e=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(e.ydisp+this._bufferService.rows,e.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=e.ydisp),this.refresh()}}_handleMouseUp(e){let t=e.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&t<_j&&e.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){let i=this._mouseService.getCoords(e,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(i&&i[0]!==void 0&&i[1]!==void 0){let r=sj(i[0]-1,i[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(r,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){let e=this._model.finalSelectionStart,t=this._model.finalSelectionEnd,i=!!e&&!!t&&(e[0]!==t[0]||e[1]!==t[1]);if(!i){this._oldHasSelection&&this._fireOnSelectionChange(e,t,i);return}!e||!t||(!this._oldSelectionStart||!this._oldSelectionEnd||e[0]!==this._oldSelectionStart[0]||e[1]!==this._oldSelectionStart[1]||t[0]!==this._oldSelectionEnd[0]||t[1]!==this._oldSelectionEnd[1])&&this._fireOnSelectionChange(e,t,i)}_fireOnSelectionChange(e,t,i){this._oldSelectionStart=e,this._oldSelectionEnd=t,this._oldHasSelection=i,this._onSelectionChange.fire()}_handleBufferActivate(e){this.clearSelection(),this._trimListener.dispose(),this._trimListener=e.activeBuffer.lines.onTrim(t=>this._handleTrim(t))}_convertViewportColToCharacterIndex(e,t){let i=t;for(let r=0;t>=r;r++){let n=e.loadCell(r,this._workCell).getChars().length;this._workCell.getWidth()===0?i--:n>1&&t!==r&&(i+=n-1)}return i}setSelection(e,t,i){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[e,t],this._model.selectionStartLength=i,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(e){this._isClickInSelection(e)||(this._selectWordAtCursor(e,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(e,t,i=!0,r=!0){if(e[0]>=this._bufferService.cols)return;let n=this._bufferService.buffer,s=n.lines.get(e[1]);if(!s)return;let a=n.translateBufferLineToString(e[1],!1),l=this._convertViewportColToCharacterIndex(s,e[0]),o=l,c=e[0]-l,u=0,d=0,h=0,f=0;if(a.charAt(l)===" "){for(;l>0&&a.charAt(l-1)===" ";)l--;for(;o<a.length&&a.charAt(o+1)===" ";)o++}else{let S=e[0],_=e[0];s.getWidth(S)===0&&(u++,S--),s.getWidth(_)===2&&(d++,_++);let w=s.getString(_).length;for(w>1&&(f+=w-1,o+=w-1);S>0&&l>0&&!this._isCharWordSeparator(s.loadCell(S-1,this._workCell));){s.loadCell(S-1,this._workCell);let C=this._workCell.getChars().length;this._workCell.getWidth()===0?(u++,S--):C>1&&(h+=C-1,l-=C-1),l--,S--}for(;_<s.length&&o+1<a.length&&!this._isCharWordSeparator(s.loadCell(_+1,this._workCell));){s.loadCell(_+1,this._workCell);let C=this._workCell.getChars().length;this._workCell.getWidth()===2?(d++,_++):C>1&&(f+=C-1,o+=C-1),o++,_++}}o++;let v=l+c-u+h,p=Math.min(this._bufferService.cols,o-l+u+d-h-f);if(!(!t&&a.slice(l,o).trim()==="")){if(i&&v===0&&s.getCodePoint(0)!==32){let S=n.lines.get(e[1]-1);if(S&&s.isWrapped&&S.getCodePoint(this._bufferService.cols-1)!==32){let _=this._getWordAt([this._bufferService.cols-1,e[1]-1],!1,!0,!1);if(_){let w=this._bufferService.cols-_.start;v-=w,p+=w}}}if(r&&v+p===this._bufferService.cols&&s.getCodePoint(this._bufferService.cols-1)!==32){let S=n.lines.get(e[1]+1);if(S!=null&&S.isWrapped&&S.getCodePoint(0)!==32){let _=this._getWordAt([0,e[1]+1],!1,!1,!0);_&&(p+=_.length)}}return{start:v,length:p}}}_selectWordAt(e,t){let i=this._getWordAt(e,t);if(i){for(;i.start<0;)i.start+=this._bufferService.cols,e[1]--;this._model.selectionStart=[i.start,e[1]],this._model.selectionStartLength=i.length}}_selectToWordAt(e){let t=this._getWordAt(e,!0);if(t){let i=e[1];for(;t.start<0;)t.start+=this._bufferService.cols,i--;if(!this._model.areSelectionValuesReversed())for(;t.start+t.length>this._bufferService.cols;)t.length-=this._bufferService.cols,i++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,i]}}_isCharWordSeparator(e){return e.getWidth()===0?!1:this._optionsService.rawOptions.wordSeparator.indexOf(e.getChars())>=0}_selectLineAt(e){let t=this._bufferService.buffer.getWrappedRangeForLine(e),i={start:{x:0,y:t.first},end:{x:this._bufferService.cols-1,y:t.last}};this._model.selectionStart=[0,t.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=Ap(i,this._bufferService.cols)}};qd=Pt([Ne(3,Ti),Ne(4,Ss),Ne(5,m2),Ne(6,Hi),Ne(7,hn),Ne(8,dn)],qd);var Mp=class{constructor(){this._data={}}set(e,t,i){this._data[e]||(this._data[e]={}),this._data[e][t]=i}get(e,t){return this._data[e]?this._data[e][t]:void 0}clear(){this._data={}}},Ep=class{constructor(){this._color=new Mp,this._css=new Mp}setCss(e,t,i){this._css.set(e,t,i)}getCss(e,t){return this._css.get(e,t)}setColor(e,t,i){this._color.set(e,t,i)}getColor(e,t){return this._color.get(e,t)}clear(){this._color.clear(),this._css.clear()}},qt=Object.freeze((()=>{let e=[$t.toColor("#2e3436"),$t.toColor("#cc0000"),$t.toColor("#4e9a06"),$t.toColor("#c4a000"),$t.toColor("#3465a4"),$t.toColor("#75507b"),$t.toColor("#06989a"),$t.toColor("#d3d7cf"),$t.toColor("#555753"),$t.toColor("#ef2929"),$t.toColor("#8ae234"),$t.toColor("#fce94f"),$t.toColor("#729fcf"),$t.toColor("#ad7fa8"),$t.toColor("#34e2e2"),$t.toColor("#eeeeec")],t=[0,95,135,175,215,255];for(let i=0;i<216;i++){let r=t[i/36%6|0],n=t[i/6%6|0],s=t[i%6];e.push({css:Ut.toCss(r,n,s),rgba:Ut.toRgba(r,n,s)})}for(let i=0;i<24;i++){let r=8+i*10;e.push({css:Ut.toCss(r,r,r),rgba:Ut.toRgba(r,r,r)})}return e})()),ts=$t.toColor("#ffffff"),zl=$t.toColor("#000000"),Lp=$t.toColor("#ffffff"),$p=zl,Pl={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117},gj=ts,Gd=class extends Je{constructor(e){super(),this._optionsService=e,this._contrastCache=new Ep,this._halfContrastCache=new Ep,this._onChangeColors=this._register(new xe),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:ts,background:zl,cursor:Lp,cursorAccent:$p,selectionForeground:void 0,selectionBackgroundTransparent:Pl,selectionBackgroundOpaque:Ct.blend(zl,Pl),selectionInactiveBackgroundTransparent:Pl,selectionInactiveBackgroundOpaque:Ct.blend(zl,Pl),scrollbarSliderBackground:Ct.opacity(ts,.2),scrollbarSliderHoverBackground:Ct.opacity(ts,.4),scrollbarSliderActiveBackground:Ct.opacity(ts,.5),overviewRulerBorder:ts,ansi:qt.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this._register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",()=>this._contrastCache.clear())),this._register(this._optionsService.onSpecificOptionChange("theme",()=>this._setTheme(this._optionsService.rawOptions.theme)))}get colors(){return this._colors}_setTheme(e={}){let t=this._colors;if(t.foreground=_t(e.foreground,ts),t.background=_t(e.background,zl),t.cursor=Ct.blend(t.background,_t(e.cursor,Lp)),t.cursorAccent=Ct.blend(t.background,_t(e.cursorAccent,$p)),t.selectionBackgroundTransparent=_t(e.selectionBackground,Pl),t.selectionBackgroundOpaque=Ct.blend(t.background,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundTransparent=_t(e.selectionInactiveBackground,t.selectionBackgroundTransparent),t.selectionInactiveBackgroundOpaque=Ct.blend(t.background,t.selectionInactiveBackgroundTransparent),t.selectionForeground=e.selectionForeground?_t(e.selectionForeground,Sp):void 0,t.selectionForeground===Sp&&(t.selectionForeground=void 0),Ct.isOpaque(t.selectionBackgroundTransparent)&&(t.selectionBackgroundTransparent=Ct.opacity(t.selectionBackgroundTransparent,.3)),Ct.isOpaque(t.selectionInactiveBackgroundTransparent)&&(t.selectionInactiveBackgroundTransparent=Ct.opacity(t.selectionInactiveBackgroundTransparent,.3)),t.scrollbarSliderBackground=_t(e.scrollbarSliderBackground,Ct.opacity(t.foreground,.2)),t.scrollbarSliderHoverBackground=_t(e.scrollbarSliderHoverBackground,Ct.opacity(t.foreground,.4)),t.scrollbarSliderActiveBackground=_t(e.scrollbarSliderActiveBackground,Ct.opacity(t.foreground,.5)),t.overviewRulerBorder=_t(e.overviewRulerBorder,gj),t.ansi=qt.slice(),t.ansi[0]=_t(e.black,qt[0]),t.ansi[1]=_t(e.red,qt[1]),t.ansi[2]=_t(e.green,qt[2]),t.ansi[3]=_t(e.yellow,qt[3]),t.ansi[4]=_t(e.blue,qt[4]),t.ansi[5]=_t(e.magenta,qt[5]),t.ansi[6]=_t(e.cyan,qt[6]),t.ansi[7]=_t(e.white,qt[7]),t.ansi[8]=_t(e.brightBlack,qt[8]),t.ansi[9]=_t(e.brightRed,qt[9]),t.ansi[10]=_t(e.brightGreen,qt[10]),t.ansi[11]=_t(e.brightYellow,qt[11]),t.ansi[12]=_t(e.brightBlue,qt[12]),t.ansi[13]=_t(e.brightMagenta,qt[13]),t.ansi[14]=_t(e.brightCyan,qt[14]),t.ansi[15]=_t(e.brightWhite,qt[15]),e.extendedAnsi){let i=Math.min(t.ansi.length-16,e.extendedAnsi.length);for(let r=0;r<i;r++)t.ansi[r+16]=_t(e.extendedAnsi[r],qt[r+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(e){this._restoreColor(e),this._onChangeColors.fire(this.colors)}_restoreColor(e){if(e===void 0){for(let t=0;t<this._restoreColors.ansi.length;++t)this._colors.ansi[t]=this._restoreColors.ansi[t];return}switch(e){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[e]=this._restoreColors.ansi[e]}}modifyColors(e){e(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};Gd=Pt([Ne(0,Hi)],Gd);function _t(e,t){if(e!==void 0)try{return $t.toColor(e)}catch{}return t}var bj=class{constructor(...e){this._entries=new Map;for(let[t,i]of e)this.set(t,i)}set(e,t){let i=this._entries.get(e);return this._entries.set(e,t),i}forEach(e){for(let[t,i]of this._entries.entries())e(t,i)}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}},yj=class{constructor(){this._services=new bj,this._services.set(_2,this)}setService(e,t){this._services.set(e,t)}getService(e){return this._services.get(e)}createInstance(e,...t){let i=fU(e).sort((s,a)=>s.index-a.index),r=[];for(let s of i){let a=this._services.get(s.id);if(!a)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${s.id._id}.`);r.push(a)}let n=i.length>0?i[0].index:t.length;if(t.length!==n)throw new Error(`[createInstance] First service dependency of ${e.name} at position ${n+1} conflicts with ${t.length} static arguments`);return new e(...t,...r)}},wj={trace:0,debug:1,info:2,warn:3,error:4,off:5},Sj="xterm.js: ",Yd=class extends Je{constructor(e){super(),this._optionsService=e,this._logLevel=5,this._updateLogLevel(),this._register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel()))}get logLevel(){return this._logLevel}_updateLogLevel(){this._logLevel=wj[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(e){for(let t=0;t<e.length;t++)typeof e[t]=="function"&&(e[t]=e[t]())}_log(e,t,i){this._evalLazyOptionalParams(i),e.call(console,(this._optionsService.options.logger?"":Sj)+t,...i)}trace(e,...t){var i;this._logLevel<=0&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.trace.bind(this._optionsService.options.logger))??console.log,e,t)}debug(e,...t){var i;this._logLevel<=1&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.debug.bind(this._optionsService.options.logger))??console.log,e,t)}info(e,...t){var i;this._logLevel<=2&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.info.bind(this._optionsService.options.logger))??console.info,e,t)}warn(e,...t){var i;this._logLevel<=3&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.warn.bind(this._optionsService.options.logger))??console.warn,e,t)}error(e,...t){var i;this._logLevel<=4&&this._log(((i=this._optionsService.options.logger)==null?void 0:i.error.bind(this._optionsService.options.logger))??console.error,e,t)}};Yd=Pt([Ne(0,Hi)],Yd);var xp=class extends Je{constructor(e){super(),this._maxLength=e,this.onDeleteEmitter=this._register(new xe),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this._register(new xe),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this._register(new xe),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(e){if(this._maxLength===e)return;let t=new Array(e);for(let i=0;i<Math.min(e,this.length);i++)t[i]=this._array[this._getCyclicIndex(i)];this._array=t,this._maxLength=e,this._startIndex=0}get length(){return this._length}set length(e){if(e>this._length)for(let t=this._length;t<e;t++)this._array[t]=void 0;this._length=e}get(e){return this._array[this._getCyclicIndex(e)]}set(e,t){this._array[this._getCyclicIndex(e)]=t}push(e){this._array[this._getCyclicIndex(this._length)]=e,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(e,t,...i){if(t){for(let r=e;r<this._length-t;r++)this._array[this._getCyclicIndex(r)]=this._array[this._getCyclicIndex(r+t)];this._length-=t,this.onDeleteEmitter.fire({index:e,amount:t})}for(let r=this._length-1;r>=e;r--)this._array[this._getCyclicIndex(r+i.length)]=this._array[this._getCyclicIndex(r)];for(let r=0;r<i.length;r++)this._array[this._getCyclicIndex(e+r)]=i[r];if(i.length&&this.onInsertEmitter.fire({index:e,amount:i.length}),this._length+i.length>this._maxLength){let r=this._length+i.length-this._maxLength;this._startIndex+=r,this._length=this._maxLength,this.onTrimEmitter.fire(r)}else this._length+=i.length}trimStart(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)}shiftElements(e,t,i){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+i<0)throw new Error("Cannot shift elements in list beyond index 0");if(i>0){for(let n=t-1;n>=0;n--)this.set(e+n+i,this.get(e+n));let r=e+t+i-this._length;if(r>0)for(this._length+=r;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let r=0;r<t;r++)this.set(e+r+i,this.get(e+r))}}_getCyclicIndex(e){return(this._startIndex+e)%this._maxLength}},Xe=3,zt=Object.freeze(new qo),$0=0,l1=2,Ul=class Sb{constructor(t,i,r=!1){this.isWrapped=r,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(t*Xe);let n=i||tr.fromCharData([0,Bg,1,0]);for(let s=0;s<t;++s)this.setCell(s,n);this.length=t}get(t){let i=this._data[t*Xe+0],r=i&2097151;return[this._data[t*Xe+1],i&2097152?this._combined[t]:r?kn(r):"",i>>22,i&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):r]}set(t,i){this._data[t*Xe+1]=i[0],i[1].length>1?(this._combined[t]=i[1],this._data[t*Xe+0]=t|2097152|i[2]<<22):this._data[t*Xe+0]=i[1].charCodeAt(0)|i[2]<<22}getWidth(t){return this._data[t*Xe+0]>>22}hasWidth(t){return this._data[t*Xe+0]&12582912}getFg(t){return this._data[t*Xe+1]}getBg(t){return this._data[t*Xe+2]}hasContent(t){return this._data[t*Xe+0]&4194303}getCodePoint(t){let i=this._data[t*Xe+0];return i&2097152?this._combined[t].charCodeAt(this._combined[t].length-1):i&2097151}isCombined(t){return this._data[t*Xe+0]&2097152}getString(t){let i=this._data[t*Xe+0];return i&2097152?this._combined[t]:i&2097151?kn(i&2097151):""}isProtected(t){return this._data[t*Xe+2]&536870912}loadCell(t,i){return $0=t*Xe,i.content=this._data[$0+0],i.fg=this._data[$0+1],i.bg=this._data[$0+2],i.content&2097152&&(i.combinedData=this._combined[t]),i.bg&268435456&&(i.extended=this._extendedAttrs[t]),i}setCell(t,i){i.content&2097152&&(this._combined[t]=i.combinedData),i.bg&268435456&&(this._extendedAttrs[t]=i.extended),this._data[t*Xe+0]=i.content,this._data[t*Xe+1]=i.fg,this._data[t*Xe+2]=i.bg}setCellFromCodepoint(t,i,r,n){n.bg&268435456&&(this._extendedAttrs[t]=n.extended),this._data[t*Xe+0]=i|r<<22,this._data[t*Xe+1]=n.fg,this._data[t*Xe+2]=n.bg}addCodepointToCell(t,i,r){let n=this._data[t*Xe+0];n&2097152?this._combined[t]+=kn(i):n&2097151?(this._combined[t]=kn(n&2097151)+kn(i),n&=-2097152,n|=2097152):n=i|1<<22,r&&(n&=-12582913,n|=r<<22),this._data[t*Xe+0]=n}insertCells(t,i,r){if(t%=this.length,t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,r),i<this.length-t){let n=new tr;for(let s=this.length-t-i-1;s>=0;--s)this.setCell(t+i+s,this.loadCell(t+s,n));for(let s=0;s<i;++s)this.setCell(t+s,r)}else for(let n=t;n<this.length;++n)this.setCell(n,r);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,r)}deleteCells(t,i,r){if(t%=this.length,i<this.length-t){let n=new tr;for(let s=0;s<this.length-t-i;++s)this.setCell(t+s,this.loadCell(t+i+s,n));for(let s=this.length-i;s<this.length;++s)this.setCell(s,r)}else for(let n=t;n<this.length;++n)this.setCell(n,r);t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,r),this.getWidth(t)===0&&!this.hasContent(t)&&this.setCellFromCodepoint(t,0,1,r)}replaceCells(t,i,r,n=!1){if(n){for(t&&this.getWidth(t-1)===2&&!this.isProtected(t-1)&&this.setCellFromCodepoint(t-1,0,1,r),i<this.length&&this.getWidth(i-1)===2&&!this.isProtected(i)&&this.setCellFromCodepoint(i,0,1,r);t<i&&t<this.length;)this.isProtected(t)||this.setCell(t,r),t++;return}for(t&&this.getWidth(t-1)===2&&this.setCellFromCodepoint(t-1,0,1,r),i<this.length&&this.getWidth(i-1)===2&&this.setCellFromCodepoint(i,0,1,r);t<i&&t<this.length;)this.setCell(t++,r)}resize(t,i){if(t===this.length)return this._data.length*4*l1<this._data.buffer.byteLength;let r=t*Xe;if(t>this.length){if(this._data.buffer.byteLength>=r*4)this._data=new Uint32Array(this._data.buffer,0,r);else{let n=new Uint32Array(r);n.set(this._data),this._data=n}for(let n=this.length;n<t;++n)this.setCell(n,i)}else{this._data=this._data.subarray(0,r);let n=Object.keys(this._combined);for(let a=0;a<n.length;a++){let l=parseInt(n[a],10);l>=t&&delete this._combined[l]}let s=Object.keys(this._extendedAttrs);for(let a=0;a<s.length;a++){let l=parseInt(s[a],10);l>=t&&delete this._extendedAttrs[l]}}return this.length=t,r*4*l1<this._data.buffer.byteLength}cleanupMemory(){if(this._data.length*4*l1<this._data.buffer.byteLength){let t=new Uint32Array(this._data.length);return t.set(this._data),this._data=t,1}return 0}fill(t,i=!1){if(i){for(let r=0;r<this.length;++r)this.isProtected(r)||this.setCell(r,t);return}this._combined={},this._extendedAttrs={};for(let r=0;r<this.length;++r)this.setCell(r,t)}copyFrom(t){this.length!==t.length?this._data=new Uint32Array(t._data):this._data.set(t._data),this.length=t.length,this._combined={};for(let i in t._combined)this._combined[i]=t._combined[i];this._extendedAttrs={};for(let i in t._extendedAttrs)this._extendedAttrs[i]=t._extendedAttrs[i];this.isWrapped=t.isWrapped}clone(){let t=new Sb(0);t._data=new Uint32Array(this._data),t.length=this.length;for(let i in this._combined)t._combined[i]=this._combined[i];for(let i in this._extendedAttrs)t._extendedAttrs[i]=this._extendedAttrs[i];return t.isWrapped=this.isWrapped,t}getTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Xe+0]&4194303)return t+(this._data[t*Xe+0]>>22);return 0}getNoBgTrimmedLength(){for(let t=this.length-1;t>=0;--t)if(this._data[t*Xe+0]&4194303||this._data[t*Xe+2]&50331648)return t+(this._data[t*Xe+0]>>22);return 0}copyCellsFrom(t,i,r,n,s){let a=t._data;if(s)for(let o=n-1;o>=0;o--){for(let c=0;c<Xe;c++)this._data[(r+o)*Xe+c]=a[(i+o)*Xe+c];a[(i+o)*Xe+2]&268435456&&(this._extendedAttrs[r+o]=t._extendedAttrs[i+o])}else for(let o=0;o<n;o++){for(let c=0;c<Xe;c++)this._data[(r+o)*Xe+c]=a[(i+o)*Xe+c];a[(i+o)*Xe+2]&268435456&&(this._extendedAttrs[r+o]=t._extendedAttrs[i+o])}let l=Object.keys(t._combined);for(let o=0;o<l.length;o++){let c=parseInt(l[o],10);c>=i&&(this._combined[c-i+r]=t._combined[c])}}translateToString(t,i,r,n){i=i??0,r=r??this.length,t&&(r=Math.min(r,this.getTrimmedLength())),n&&(n.length=0);let s="";for(;i<r;){let a=this._data[i*Xe+0],l=a&2097151,o=a&2097152?this._combined[i]:l?kn(l):En;if(s+=o,n)for(let c=0;c<o.length;++c)n.push(i);i+=a>>22||1}return n&&n.push(i),s}};function Cj(e,t,i,r,n,s){let a=[];for(let l=0;l<e.length-1;l++){let o=l,c=e.get(++o);if(!c.isWrapped)continue;let u=[e.get(l)];for(;o<e.length&&c.isWrapped;)u.push(c),c=e.get(++o);if(!s&&r>=l&&r<o){l+=u.length-1;continue}let d=0,h=No(u,d,t),f=1,v=0;for(;f<u.length;){let S=No(u,f,t),_=S-v,w=i-h,C=Math.min(_,w);u[d].copyCellsFrom(u[f],v,h,C,!1),h+=C,h===i&&(d++,h=0),v+=C,v===S&&(f++,v=0),h===0&&d!==0&&u[d-1].getWidth(i-1)===2&&(u[d].copyCellsFrom(u[d-1],i-1,h++,1,!1),u[d-1].setCell(i-1,n))}u[d].replaceCells(h,i,n);let p=0;for(let S=u.length-1;S>0&&(S>d||u[S].getTrimmedLength()===0);S--)p++;p>0&&(a.push(l+u.length-p),a.push(p)),l+=u.length-1}return a}function kj(e,t){let i=[],r=0,n=t[r],s=0;for(let a=0;a<e.length;a++)if(n===a){let l=t[++r];e.onDeleteEmitter.fire({index:a-s,amount:l}),a+=l-1,s+=l,n=t[++r]}else i.push(a);return{layout:i,countRemoved:s}}function Aj(e,t){let i=[];for(let r=0;r<t.length;r++)i.push(e.get(t[r]));for(let r=0;r<i.length;r++)e.set(r,i[r]);e.length=t.length}function Mj(e,t,i){let r=[],n=e.map((o,c)=>No(e,c,t)).reduce((o,c)=>o+c),s=0,a=0,l=0;for(;l<n;){if(n-l<i){r.push(n-l);break}s+=i;let o=No(e,a,t);s>o&&(s-=o,a++);let c=e[a].getWidth(s-1)===2;c&&s--;let u=c?i-1:i;r.push(u),l+=u}return r}function No(e,t,i){if(t===e.length-1)return e[t].getTrimmedLength();let r=!e[t].hasContent(i-1)&&e[t].getWidth(i-1)===1,n=e[t+1].getWidth(0)===2;return r&&n?i-1:i}var Cb=class kb{constructor(t){this.line=t,this.isDisposed=!1,this._disposables=[],this._id=kb._nextId++,this._onDispose=this.register(new xe),this.onDispose=this._onDispose.event}get id(){return this._id}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),vs(this._disposables),this._disposables.length=0)}register(t){return this._disposables.push(t),t}};Cb._nextId=1;var Ej=Cb,ti={},is=ti.B;ti[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"␤",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"};ti.A={"#":"£"};ti.B=void 0;ti[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"};ti.C=ti[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};ti.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"};ti.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"};ti.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"};ti.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"};ti.E=ti[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"};ti.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"};ti.H=ti[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"};ti["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"};var Tp=4294967295,Hp=class{constructor(e,t,i){this._hasScrollback=e,this._optionsService=t,this._bufferService=i,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=zt.clone(),this.savedCharset=is,this.markers=[],this._nullCell=tr.fromCharData([0,Bg,1,0]),this._whitespaceCell=tr.fromCharData([0,En,1,32]),this._isClearing=!1,this._memoryCleanupQueue=new Lc,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new xp(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(e){return e?(this._nullCell.fg=e.fg,this._nullCell.bg=e.bg,this._nullCell.extended=e.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new kc),this._nullCell}getWhitespaceCell(e){return e?(this._whitespaceCell.fg=e.fg,this._whitespaceCell.bg=e.bg,this._whitespaceCell.extended=e.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new kc),this._whitespaceCell}getBlankLine(e,t){return new Ul(this._bufferService.cols,this.getNullCell(e),t)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){let e=this.ybase+this.y-this.ydisp;return e>=0&&e<this._rows}_getCorrectBufferLength(e){if(!this._hasScrollback)return e;let t=e+this._optionsService.rawOptions.scrollback;return t>Tp?Tp:t}fillViewportRows(e){if(this.lines.length===0){e===void 0&&(e=zt);let t=this._rows;for(;t--;)this.lines.push(this.getBlankLine(e))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new xp(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(e,t){let i=this.getNullCell(zt),r=0,n=this._getCorrectBufferLength(t);if(n>this.lines.maxLength&&(this.lines.maxLength=n),this.lines.length>0){if(this._cols<e)for(let a=0;a<this.lines.length;a++)r+=+this.lines.get(a).resize(e,i);let s=0;if(this._rows<t)for(let a=this._rows;a<t;a++)this.lines.length<t+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new Ul(e,i)):this.ybase>0&&this.lines.length<=this.ybase+this.y+s+1?(this.ybase--,s++,this.ydisp>0&&this.ydisp--):this.lines.push(new Ul(e,i)));else for(let a=this._rows;a>t;a--)this.lines.length>t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(n<this.lines.maxLength){let a=this.lines.length-n;a>0&&(this.lines.trimStart(a),this.ybase=Math.max(this.ybase-a,0),this.ydisp=Math.max(this.ydisp-a,0),this.savedY=Math.max(this.savedY-a,0)),this.lines.maxLength=n}this.x=Math.min(this.x,e-1),this.y=Math.min(this.y,t-1),s&&(this.y+=s),this.savedX=Math.min(this.savedX,e-1),this.scrollTop=0}if(this.scrollBottom=t-1,this._isReflowEnabled&&(this._reflow(e,t),this._cols>e))for(let s=0;s<this.lines.length;s++)r+=+this.lines.get(s).resize(e,i);this._cols=e,this._rows=t,this._memoryCleanupQueue.clear(),r>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let e=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,e=!1);let t=0;for(;this._memoryCleanupPosition<this.lines.length;)if(t+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),t>100)return!0;return e}get _isReflowEnabled(){let e=this._optionsService.rawOptions.windowsPty;return e&&e.buildNumber?this._hasScrollback&&e.backend==="conpty"&&e.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(e,t){this._cols!==e&&(e>this._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))}_reflowLarger(e,t){let i=this._optionsService.rawOptions.reflowCursorLine,r=Cj(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(zt),i);if(r.length>0){let n=kj(this.lines,r);Aj(this.lines,n.layout),this._reflowLargerAdjustViewport(e,t,n.countRemoved)}}_reflowLargerAdjustViewport(e,t,i){let r=this.getNullCell(zt),n=i;for(;n-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<t&&this.lines.push(new Ul(e,r))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-i,0)}_reflowSmaller(e,t){let i=this._optionsService.rawOptions.reflowCursorLine,r=this.getNullCell(zt),n=[],s=0;for(let a=this.lines.length-1;a>=0;a--){let l=this.lines.get(a);if(!l||!l.isWrapped&&l.getTrimmedLength()<=e)continue;let o=[l];for(;l.isWrapped&&a>0;)l=this.lines.get(--a),o.unshift(l);if(!i){let C=this.ybase+this.y;if(C>=a&&C<a+o.length)continue}let c=o[o.length-1].getTrimmedLength(),u=Mj(o,this._cols,e),d=u.length-o.length,h;this.ybase===0&&this.y!==this.lines.length-1?h=Math.max(0,this.y-this.lines.maxLength+d):h=Math.max(0,this.lines.length-this.lines.maxLength+d);let f=[];for(let C=0;C<d;C++){let g=this.getBlankLine(zt,!0);f.push(g)}f.length>0&&(n.push({start:a+o.length+s,newLines:f}),s+=f.length),o.push(...f);let v=u.length-1,p=u[v];p===0&&(v--,p=u[v]);let S=o.length-d-1,_=c;for(;S>=0;){let C=Math.min(_,p);if(o[v]===void 0)break;if(o[v].copyCellsFrom(o[S],_-C,p-C,C,!0),p-=C,p===0&&(v--,p=u[v]),_-=C,_===0){S--;let g=Math.max(S,0);_=No(o,g,this._cols)}}for(let C=0;C<o.length;C++)u[C]<e&&o[C].setCell(u[C],r);let w=d-h;for(;w-- >0;)this.ybase===0?this.y<t-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+s)-t&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+d,this.ybase+t-1)}if(n.length>0){let a=[],l=[];for(let p=0;p<this.lines.length;p++)l.push(this.lines.get(p));let o=this.lines.length,c=o-1,u=0,d=n[u];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+s);let h=0;for(let p=Math.min(this.lines.maxLength-1,o+s-1);p>=0;p--)if(d&&d.start>c+h){for(let S=d.newLines.length-1;S>=0;S--)this.lines.set(p--,d.newLines[S]);p++,a.push({index:c+1,amount:d.newLines.length}),h+=d.newLines.length,d=n[++u]}else this.lines.set(p,l[c--]);let f=0;for(let p=a.length-1;p>=0;p--)a[p].index+=f,this.lines.onInsertEmitter.fire(a[p]),f+=a[p].amount;let v=Math.max(0,o+s-this.lines.maxLength);v>0&&this.lines.onTrimEmitter.fire(v)}}translateBufferLineToString(e,t,i=0,r){let n=this.lines.get(e);return n?n.translateToString(t,i,r):""}getWrappedRangeForLine(e){let t=e,i=e;for(;t>0&&this.lines.get(t).isWrapped;)t--;for(;i+1<this.lines.length&&this.lines.get(i+1).isWrapped;)i++;return{first:t,last:i}}setupTabStops(e){for(e!=null?this.tabs[e]||(e=this.prevStop(e)):(this.tabs={},e=0);e<this._cols;e+=this._optionsService.rawOptions.tabStopWidth)this.tabs[e]=!0}prevStop(e){for(e==null&&(e=this.x);!this.tabs[--e]&&e>0;);return e>=this._cols?this._cols-1:e<0?0:e}nextStop(e){for(e==null&&(e=this.x);!this.tabs[++e]&&e<this._cols;);return e>=this._cols?this._cols-1:e<0?0:e}clearMarkers(e){this._isClearing=!0;for(let t=0;t<this.markers.length;t++)this.markers[t].line===e&&(this.markers[t].dispose(),this.markers.splice(t--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let e=0;e<this.markers.length;e++)this.markers[e].dispose();this.markers.length=0,this._isClearing=!1}addMarker(e){let t=new Ej(e);return this.markers.push(t),t.register(this.lines.onTrim(i=>{t.line-=i,t.line<0&&t.dispose()})),t.register(this.lines.onInsert(i=>{t.line>=i.index&&(t.line+=i.amount)})),t.register(this.lines.onDelete(i=>{t.line>=i.index&&t.line<i.index+i.amount&&t.dispose(),t.line>i.index&&(t.line-=i.amount)})),t.register(t.onDispose(()=>this._removeMarker(t))),t}_removeMarker(e){this._isClearing||this.markers.splice(this.markers.indexOf(e),1)}},Lj=class extends Je{constructor(e,t){super(),this._optionsService=e,this._bufferService=t,this._onBufferActivate=this._register(new xe),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this._register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this._register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new Hp(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new Hp(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(e){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(e),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(e,t){this._normal.resize(e,t),this._alt.resize(e,t),this.setupTabStops(e)}setupTabStops(e){this._normal.setupTabStops(e),this._alt.setupTabStops(e)}},Ab=2,Mb=1,Xd=class extends Je{constructor(e){super(),this.isUserScrolling=!1,this._onResize=this._register(new xe),this.onResize=this._onResize.event,this._onScroll=this._register(new xe),this.onScroll=this._onScroll.event,this.cols=Math.max(e.rawOptions.cols||0,Ab),this.rows=Math.max(e.rawOptions.rows||0,Mb),this.buffers=this._register(new Lj(e,this)),this._register(this.buffers.onBufferActivate(t=>{this._onScroll.fire(t.activeBuffer.ydisp)}))}get buffer(){return this.buffers.active}resize(e,t){let i=this.cols!==e,r=this.rows!==t;this.cols=e,this.rows=t,this.buffers.resize(e,t),this._onResize.fire({cols:e,rows:t,colsChanged:i,rowsChanged:r})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(e,t=!1){let i=this.buffer,r;r=this._cachedBlankLine,(!r||r.length!==this.cols||r.getFg(0)!==e.fg||r.getBg(0)!==e.bg)&&(r=i.getBlankLine(e,t),this._cachedBlankLine=r),r.isWrapped=t;let n=i.ybase+i.scrollTop,s=i.ybase+i.scrollBottom;if(i.scrollTop===0){let a=i.lines.isFull;s===i.lines.length-1?a?i.lines.recycle().copyFrom(r):i.lines.push(r.clone()):i.lines.splice(s+1,0,r.clone()),a?this.isUserScrolling&&(i.ydisp=Math.max(i.ydisp-1,0)):(i.ybase++,this.isUserScrolling||i.ydisp++)}else{let a=s-n+1;i.lines.shiftElements(n+1,a-1,-1),i.lines.set(s,r.clone())}this.isUserScrolling||(i.ydisp=i.ybase),this._onScroll.fire(i.ydisp)}scrollLines(e,t){let i=this.buffer;if(e<0){if(i.ydisp===0)return;this.isUserScrolling=!0}else e+i.ydisp>=i.ybase&&(this.isUserScrolling=!1);let r=i.ydisp;i.ydisp=Math.max(Math.min(i.ydisp+e,i.ybase),0),r!==i.ydisp&&(t||this._onScroll.fire(i.ydisp))}};Xd=Pt([Ne(0,Hi)],Xd);var xs={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnEraseInDisplay:!1,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},reflowCursorLine:!1,rescaleOverlappingGlyphs:!1,rightClickSelectsWord:Ec,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRuler:{}},$j=["normal","bold","100","200","300","400","500","600","700","800","900"],xj=class extends Je{constructor(e){super(),this._onOptionChange=this._register(new xe),this.onOptionChange=this._onOptionChange.event;let t={...xs};for(let i in e)if(i in t)try{let r=e[i];t[i]=this._sanitizeAndValidateOption(i,r)}catch(r){console.error(r)}this.rawOptions=t,this.options={...t},this._setupOptions(),this._register(Et(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(e,t){return this.onOptionChange(i=>{i===e&&t(this.rawOptions[e])})}onMultipleOptionChange(e,t){return this.onOptionChange(i=>{e.indexOf(i)!==-1&&t()})}_setupOptions(){let e=i=>{if(!(i in xs))throw new Error(`No option with key "${i}"`);return this.rawOptions[i]},t=(i,r)=>{if(!(i in xs))throw new Error(`No option with key "${i}"`);r=this._sanitizeAndValidateOption(i,r),this.rawOptions[i]!==r&&(this.rawOptions[i]=r,this._onOptionChange.fire(i))};for(let i in this.rawOptions){let r={get:e.bind(this,i),set:t.bind(this,i)};Object.defineProperty(this.options,i,r)}}_sanitizeAndValidateOption(e,t){switch(e){case"cursorStyle":if(t||(t=xs[e]),!Tj(t))throw new Error(`"${t}" is not a valid value for ${e}`);break;case"wordSeparator":t||(t=xs[e]);break;case"fontWeight":case"fontWeightBold":if(typeof t=="number"&&1<=t&&t<=1e3)break;t=$j.includes(t)?t:xs[e];break;case"cursorWidth":t=Math.floor(t);case"lineHeight":case"tabStopWidth":if(t<1)throw new Error(`${e} cannot be less than 1, value: ${t}`);break;case"minimumContrastRatio":t=Math.max(1,Math.min(21,Math.round(t*10)/10));break;case"scrollback":if(t=Math.min(t,4294967295),t<0)throw new Error(`${e} cannot be less than 0, value: ${t}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(t<=0)throw new Error(`${e} cannot be less than or equal to 0, value: ${t}`);break;case"rows":case"cols":if(!t&&t!==0)throw new Error(`${e} must be numeric, value: ${t}`);break;case"windowsPty":t=t??{};break}return t}};function Tj(e){return e==="block"||e==="underline"||e==="bar"}function Wl(e,t=5){if(typeof e!="object")return e;let i=Array.isArray(e)?[]:{};for(let r in e)i[r]=t<=1?e[r]:e[r]&&Wl(e[r],t-1);return i}var Np=Object.freeze({insertMode:!1}),Pp=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,cursorBlink:void 0,cursorStyle:void 0,origin:!1,reverseWraparound:!1,sendFocus:!1,synchronizedOutput:!1,wraparound:!0}),Jd=class extends Je{constructor(e,t,i){super(),this._bufferService=e,this._logService=t,this._optionsService=i,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this._register(new xe),this.onData=this._onData.event,this._onUserInput=this._register(new xe),this.onUserInput=this._onUserInput.event,this._onBinary=this._register(new xe),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this._register(new xe),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=Wl(Np),this.decPrivateModes=Wl(Pp)}reset(){this.modes=Wl(Np),this.decPrivateModes=Wl(Pp)}triggerDataEvent(e,t=!1){if(this._optionsService.rawOptions.disableStdin)return;let i=this._bufferService.buffer;t&&this._optionsService.rawOptions.scrollOnUserInput&&i.ybase!==i.ydisp&&this._onRequestScrollToBottom.fire(),t&&this._onUserInput.fire(),this._logService.debug(`sending data "${e}"`),this._logService.trace("sending data (codes)",()=>e.split("").map(r=>r.charCodeAt(0))),this._onData.fire(e)}triggerBinaryEvent(e){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${e}"`),this._logService.trace("sending binary (codes)",()=>e.split("").map(t=>t.charCodeAt(0))),this._onBinary.fire(e))}};Jd=Pt([Ne(0,Ti),Ne(1,jg),Ne(2,Hi)],Jd);var Op={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:e=>e.button===4||e.action!==1?!1:(e.ctrl=!1,e.alt=!1,e.shift=!1,!0)},VT200:{events:19,restrict:e=>e.action!==32},DRAG:{events:23,restrict:e=>!(e.action===32&&e.button===3)},ANY:{events:31,restrict:e=>!0}};function o1(e,t){let i=(e.ctrl?16:0)|(e.shift?4:0)|(e.alt?8:0);return e.button===4?(i|=64,i|=e.action):(i|=e.button&3,e.button&4&&(i|=64),e.button&8&&(i|=128),e.action===32?i|=32:e.action===0&&!t&&(i|=3)),i}var c1=String.fromCharCode,Rp={DEFAULT:e=>{let t=[o1(e,!1)+32,e.col+32,e.row+32];return t[0]>255||t[1]>255||t[2]>255?"":`\x1B[M${c1(t[0])}${c1(t[1])}${c1(t[2])}`},SGR:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${o1(e,!0)};${e.col};${e.row}${t}`},SGR_PIXELS:e=>{let t=e.action===0&&e.button!==4?"m":"M";return`\x1B[<${o1(e,!0)};${e.x};${e.y}${t}`}},Qd=class extends Je{constructor(e,t,i){super(),this._bufferService=e,this._coreService=t,this._optionsService=i,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._wheelPartialScroll=0,this._onProtocolChange=this._register(new xe),this.onProtocolChange=this._onProtocolChange.event;for(let r of Object.keys(Op))this.addProtocol(r,Op[r]);for(let r of Object.keys(Rp))this.addEncoding(r,Rp[r]);this.reset()}addProtocol(e,t){this._protocols[e]=t}addEncoding(e,t){this._encodings[e]=t}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(e){if(!this._protocols[e])throw new Error(`unknown protocol "${e}"`);this._activeProtocol=e,this._onProtocolChange.fire(this._protocols[e].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(e){if(!this._encodings[e])throw new Error(`unknown encoding "${e}"`);this._activeEncoding=e}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null,this._wheelPartialScroll=0}consumeWheelEvent(e,t,i){if(e.deltaY===0||e.shiftKey||t===void 0||i===void 0)return 0;let r=t/i,n=this._applyScrollModifier(e.deltaY,e);return e.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(n/=r+0,Math.abs(e.deltaY)<50&&(n*=.3),this._wheelPartialScroll+=n,n=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):e.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(n*=this._bufferService.rows),n}_applyScrollModifier(e,t){return t.altKey||t.ctrlKey||t.shiftKey?e*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:e*this._optionsService.rawOptions.scrollSensitivity}triggerMouseEvent(e){if(e.col<0||e.col>=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows||e.button===4&&e.action===32||e.button===3&&e.action!==32||e.button!==4&&(e.action===2||e.action===3)||(e.col++,e.row++,e.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,e,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(e))return!1;let t=this._encodings[this._activeEncoding](e);return t&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0}explainEvents(e){return{down:!!(e&1),up:!!(e&2),drag:!!(e&4),move:!!(e&8),wheel:!!(e&16)}}_equalEvents(e,t,i){if(i){if(e.x!==t.x||e.y!==t.y)return!1}else if(e.col!==t.col||e.row!==t.row)return!1;return!(e.button!==t.button||e.action!==t.action||e.ctrl!==t.ctrl||e.alt!==t.alt||e.shift!==t.shift)}};Qd=Pt([Ne(0,Ti),Ne(1,Ss),Ne(2,Hi)],Qd);var u1=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],Hj=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],Gt;function Nj(e,t){let i=0,r=t.length-1,n;if(e<t[0][0]||e>t[r][1])return!1;for(;r>=i;)if(n=i+r>>1,e>t[n][1])i=n+1;else if(e<t[n][0])r=n-1;else return!0;return!1}var Pj=class{constructor(){if(this.version="6",!Gt){Gt=new Uint8Array(65536),Gt.fill(1),Gt[0]=0,Gt.fill(0,1,32),Gt.fill(0,127,160),Gt.fill(2,4352,4448),Gt[9001]=2,Gt[9002]=2,Gt.fill(2,11904,42192),Gt[12351]=1,Gt.fill(2,44032,55204),Gt.fill(2,63744,64256),Gt.fill(2,65040,65050),Gt.fill(2,65072,65136),Gt.fill(2,65280,65377),Gt.fill(2,65504,65511);for(let e=0;e<u1.length;++e)Gt.fill(0,u1[e][0],u1[e][1]+1)}}wcwidth(e){return e<32?0:e<127?1:e<65536?Gt[e]:Nj(e,Hj)?0:e>=131072&&e<=196605||e>=196608&&e<=262141?2:1}charProperties(e,t){let i=this.wcwidth(e),r=i===0&&t!==0;if(r){let n=cs.extractWidth(t);n===0?r=!1:n>i&&(i=n)}return cs.createPropertyValue(0,i,r)}},cs=class z0{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new xe,this.onChange=this._onChange.event;let t=new Pj;this.register(t),this._active=t.version,this._activeProvider=t}static extractShouldJoin(t){return(t&1)!==0}static extractWidth(t){return t>>1&3}static extractCharKind(t){return t>>3}static createPropertyValue(t,i,r=!1){return(t&16777215)<<3|(i&3)<<1|(r?1:0)}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(t){if(!this._providers[t])throw new Error(`unknown Unicode version "${t}"`);this._active=t,this._activeProvider=this._providers[t],this._onChange.fire(t)}register(t){this._providers[t.version]=t}wcwidth(t){return this._activeProvider.wcwidth(t)}getStringCellWidth(t){let i=0,r=0,n=t.length;for(let s=0;s<n;++s){let a=t.charCodeAt(s);if(55296<=a&&a<=56319){if(++s>=n)return i+this.wcwidth(a);let c=t.charCodeAt(s);56320<=c&&c<=57343?a=(a-55296)*1024+c-56320+65536:i+=this.wcwidth(c)}let l=this.charProperties(a,r),o=z0.extractWidth(l);z0.extractShouldJoin(l)&&(o-=z0.extractWidth(r)),i+=o,r=l}return i}charProperties(t,i){return this._activeProvider.charProperties(t,i)}},Oj=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(e){this.glevel=e,this.charset=this._charsets[e]}setgCharset(e,t){this._charsets[e]=t,this.glevel===e&&(this.charset=t)}};function Ip(e){var r;let t=(r=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1))==null?void 0:r.get(e.cols-1),i=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);i&&t&&(i.isWrapped=t[3]!==0&&t[3]!==32)}var Ol=2147483647,Rj=256,Eb=class eh{constructor(t=32,i=32){if(this.maxLength=t,this.maxSubParamsLength=i,i>Rj)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(t),this.length=0,this._subParams=new Int32Array(i),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(t),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}static fromArray(t){let i=new eh;if(!t.length)return i;for(let r=Array.isArray(t[0])?1:0;r<t.length;++r){let n=t[r];if(Array.isArray(n))for(let s=0;s<n.length;++s)i.addSubParam(n[s]);else i.addParam(n)}return i}clone(){let t=new eh(this.maxLength,this.maxSubParamsLength);return t.params.set(this.params),t.length=this.length,t._subParams.set(this._subParams),t._subParamsLength=this._subParamsLength,t._subParamsIdx.set(this._subParamsIdx),t._rejectDigits=this._rejectDigits,t._rejectSubDigits=this._rejectSubDigits,t._digitIsSub=this._digitIsSub,t}toArray(){let t=[];for(let i=0;i<this.length;++i){t.push(this.params[i]);let r=this._subParamsIdx[i]>>8,n=this._subParamsIdx[i]&255;n-r>0&&t.push(Array.prototype.slice.call(this._subParams,r,n))}return t}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(t){if(this._digitIsSub=!1,this.length>=this.maxLength){this._rejectDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=t>Ol?Ol:t}addSubParam(t){if(this._digitIsSub=!0,!!this.length){if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength){this._rejectSubDigits=!0;return}if(t<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=t>Ol?Ol:t,this._subParamsIdx[this.length-1]++}}hasSubParams(t){return(this._subParamsIdx[t]&255)-(this._subParamsIdx[t]>>8)>0}getSubParams(t){let i=this._subParamsIdx[t]>>8,r=this._subParamsIdx[t]&255;return r-i>0?this._subParams.subarray(i,r):null}getSubParamsAll(){let t={};for(let i=0;i<this.length;++i){let r=this._subParamsIdx[i]>>8,n=this._subParamsIdx[i]&255;n-r>0&&(t[i]=this._subParams.slice(r,n))}return t}addDigit(t){let i;if(this._rejectDigits||!(i=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;let r=this._digitIsSub?this._subParams:this.params,n=r[i-1];r[i-1]=~n?Math.min(n*10+t,Ol):t}},Rl=[],Ij=class{constructor(){this._state=0,this._active=Rl,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let i=this._handlers[e];return i.push(t),{dispose:()=>{let r=i.indexOf(t);r!==-1&&i.splice(r,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Rl}reset(){if(this._state===2)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].end(!1);this._stack.paused=!1,this._active=Rl,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||Rl,!this._active.length)this._handlerFb(this._id,"START");else for(let e=this._active.length-1;e>=0;e--)this._active[e].start()}_put(e,t,i){if(!this._active.length)this._handlerFb(this._id,"PUT",uu(e,t,i));else for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,i)}start(){this.reset(),this._state=1}put(e,t,i){if(this._state!==3){if(this._state===1)for(;t<i;){let r=e[t++];if(r===59){this._state=2,this._start();break}if(r<48||57<r){this._state=3;return}this._id===-1&&(this._id=0),this._id=this._id*10+r-48}this._state===2&&i-t>0&&this._put(e,t,i)}}end(e,t=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),!this._active.length)this._handlerFb(this._id,"END",e);else{let i=!1,r=this._active.length-1,n=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,i=t,n=this._stack.fallThrough,this._stack.paused=!1),!n&&i===!1){for(;r>=0&&(i=this._active[r].end(e),i!==!0);r--)if(i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,i;r--}for(;r>=0;r--)if(i=this._active[r].end(!1),i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,i}this._active=Rl,this._id=-1,this._state=0}}},Di=class{constructor(e){this._handler=e,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(e,t,i){this._hitLimit||(this._data+=uu(e,t,i),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}end(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data),t instanceof Promise))return t.then(i=>(this._data="",this._hitLimit=!1,i));return this._data="",this._hitLimit=!1,t}},Il=[],Dj=class{constructor(){this._handlers=Object.create(null),this._active=Il,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=Il}registerHandler(e,t){this._handlers[e]===void 0&&(this._handlers[e]=[]);let i=this._handlers[e];return i.push(t),{dispose:()=>{let r=i.indexOf(t);r!==-1&&i.splice(r,1)}}}clearHandler(e){this._handlers[e]&&delete this._handlers[e]}setHandlerFallback(e){this._handlerFb=e}reset(){if(this._active.length)for(let e=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;e>=0;--e)this._active[e].unhook(!1);this._stack.paused=!1,this._active=Il,this._ident=0}hook(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||Il,!this._active.length)this._handlerFb(this._ident,"HOOK",t);else for(let i=this._active.length-1;i>=0;i--)this._active[i].hook(t)}put(e,t,i){if(!this._active.length)this._handlerFb(this._ident,"PUT",uu(e,t,i));else for(let r=this._active.length-1;r>=0;r--)this._active[r].put(e,t,i)}unhook(e,t=!0){if(!this._active.length)this._handlerFb(this._ident,"UNHOOK",e);else{let i=!1,r=this._active.length-1,n=!1;if(this._stack.paused&&(r=this._stack.loopPosition-1,i=t,n=this._stack.fallThrough,this._stack.paused=!1),!n&&i===!1){for(;r>=0&&(i=this._active[r].unhook(e),i!==!0);r--)if(i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!1,i;r--}for(;r>=0;r--)if(i=this._active[r].unhook(!1),i instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=r,this._stack.fallThrough=!0,i}this._active=Il,this._ident=0}},jl=new Eb;jl.addParam(0);var Dp=class{constructor(e){this._handler=e,this._data="",this._params=jl,this._hitLimit=!1}hook(e){this._params=e.length>1||e.params[0]?e.clone():jl,this._data="",this._hitLimit=!1}put(e,t,i){this._hitLimit||(this._data+=uu(e,t,i),this._data.length>1e7&&(this._data="",this._hitLimit=!0))}unhook(e){let t=!1;if(this._hitLimit)t=!1;else if(e&&(t=this._handler(this._data,this._params),t instanceof Promise))return t.then(i=>(this._params=jl,this._data="",this._hitLimit=!1,i));return this._params=jl,this._data="",this._hitLimit=!1,t}},Vj=class{constructor(e){this.table=new Uint8Array(e)}setDefault(e,t){this.table.fill(e<<4|t)}add(e,t,i,r){this.table[t<<8|e]=i<<4|r}addMany(e,t,i,r){for(let n=0;n<e.length;n++)this.table[t<<8|e[n]]=i<<4|r}},Yi=160,Zj=function(){let e=new Vj(4095),t=Array.apply(null,Array(256)).map((l,o)=>o),i=(l,o)=>t.slice(l,o),r=i(32,127),n=i(0,24);n.push(25),n.push.apply(n,i(28,32));let s=i(0,14),a;e.setDefault(1,0),e.addMany(r,0,2,0);for(a in s)e.addMany([24,26,153,154],a,3,0),e.addMany(i(128,144),a,3,0),e.addMany(i(144,152),a,3,0),e.add(156,a,0,0),e.add(27,a,11,1),e.add(157,a,4,8),e.addMany([152,158,159],a,0,7),e.add(155,a,11,3),e.add(144,a,11,9);return e.addMany(n,0,3,0),e.addMany(n,1,3,1),e.add(127,1,0,1),e.addMany(n,8,0,8),e.addMany(n,3,3,3),e.add(127,3,0,3),e.addMany(n,4,3,4),e.add(127,4,0,4),e.addMany(n,6,3,6),e.addMany(n,5,3,5),e.add(127,5,0,5),e.addMany(n,2,3,2),e.add(127,2,0,2),e.add(93,1,4,8),e.addMany(r,8,5,8),e.add(127,8,5,8),e.addMany([156,27,24,26,7],8,6,0),e.addMany(i(28,32),8,0,8),e.addMany([88,94,95],1,0,7),e.addMany(r,7,0,7),e.addMany(n,7,0,7),e.add(156,7,0,0),e.add(127,7,0,7),e.add(91,1,11,3),e.addMany(i(64,127),3,7,0),e.addMany(i(48,60),3,8,4),e.addMany([60,61,62,63],3,9,4),e.addMany(i(48,60),4,8,4),e.addMany(i(64,127),4,7,0),e.addMany([60,61,62,63],4,0,6),e.addMany(i(32,64),6,0,6),e.add(127,6,0,6),e.addMany(i(64,127),6,0,0),e.addMany(i(32,48),3,9,5),e.addMany(i(32,48),5,9,5),e.addMany(i(48,64),5,0,6),e.addMany(i(64,127),5,7,0),e.addMany(i(32,48),4,9,5),e.addMany(i(32,48),1,9,2),e.addMany(i(32,48),2,9,2),e.addMany(i(48,127),2,10,0),e.addMany(i(48,80),1,10,0),e.addMany(i(81,88),1,10,0),e.addMany([89,90,92],1,10,0),e.addMany(i(96,127),1,10,0),e.add(80,1,11,9),e.addMany(n,9,0,9),e.add(127,9,0,9),e.addMany(i(28,32),9,0,9),e.addMany(i(32,48),9,9,12),e.addMany(i(48,60),9,8,10),e.addMany([60,61,62,63],9,9,10),e.addMany(n,11,0,11),e.addMany(i(32,128),11,0,11),e.addMany(i(28,32),11,0,11),e.addMany(n,10,0,10),e.add(127,10,0,10),e.addMany(i(28,32),10,0,10),e.addMany(i(48,60),10,8,10),e.addMany([60,61,62,63],10,0,11),e.addMany(i(32,48),10,9,12),e.addMany(n,12,0,12),e.add(127,12,0,12),e.addMany(i(28,32),12,0,12),e.addMany(i(32,48),12,9,12),e.addMany(i(48,64),12,0,11),e.addMany(i(64,127),12,12,13),e.addMany(i(64,127),10,12,13),e.addMany(i(64,127),9,12,13),e.addMany(n,13,13,13),e.addMany(r,13,13,13),e.add(127,13,0,13),e.addMany([27,156,24,26],13,14,0),e.add(Yi,0,2,0),e.add(Yi,8,5,8),e.add(Yi,6,0,6),e.add(Yi,11,0,11),e.add(Yi,13,13,13),e}(),Bj=class extends Je{constructor(e=Zj){super(),this._transitions=e,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new Eb,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(t,i,r)=>{},this._executeHandlerFb=t=>{},this._csiHandlerFb=(t,i)=>{},this._escHandlerFb=t=>{},this._errorHandlerFb=t=>t,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this._register(Et(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this._register(new Ij),this._dcsParser=this._register(new Dj),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(e,t=[64,126]){let i=0;if(e.prefix){if(e.prefix.length>1)throw new Error("only one byte as prefix supported");if(i=e.prefix.charCodeAt(0),i&&60>i||i>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(e.intermediates){if(e.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let n=0;n<e.intermediates.length;++n){let s=e.intermediates.charCodeAt(n);if(32>s||s>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");i<<=8,i|=s}}if(e.final.length!==1)throw new Error("final must be a single byte");let r=e.final.charCodeAt(0);if(t[0]>r||r>t[1])throw new Error(`final must be in range ${t[0]} .. ${t[1]}`);return i<<=8,i|=r,i}identToString(e){let t=[];for(;e;)t.push(String.fromCharCode(e&255)),e>>=8;return t.reverse().join("")}setPrintHandler(e){this._printHandler=e}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(e,t){let i=this._identifier(e,[48,126]);this._escHandlers[i]===void 0&&(this._escHandlers[i]=[]);let r=this._escHandlers[i];return r.push(t),{dispose:()=>{let n=r.indexOf(t);n!==-1&&r.splice(n,1)}}}clearEscHandler(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]}setEscHandlerFallback(e){this._escHandlerFb=e}setExecuteHandler(e,t){this._executeHandlers[e.charCodeAt(0)]=t}clearExecuteHandler(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]}setExecuteHandlerFallback(e){this._executeHandlerFb=e}registerCsiHandler(e,t){let i=this._identifier(e);this._csiHandlers[i]===void 0&&(this._csiHandlers[i]=[]);let r=this._csiHandlers[i];return r.push(t),{dispose:()=>{let n=r.indexOf(t);n!==-1&&r.splice(n,1)}}}clearCsiHandler(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]}setCsiHandlerFallback(e){this._csiHandlerFb=e}registerDcsHandler(e,t){return this._dcsParser.registerHandler(this._identifier(e),t)}clearDcsHandler(e){this._dcsParser.clearHandler(this._identifier(e))}setDcsHandlerFallback(e){this._dcsParser.setHandlerFallback(e)}registerOscHandler(e,t){return this._oscParser.registerHandler(e,t)}clearOscHandler(e){this._oscParser.clearHandler(e)}setOscHandlerFallback(e){this._oscParser.setHandlerFallback(e)}setErrorHandler(e){this._errorHandler=e}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(e,t,i,r,n){this._parseStack.state=e,this._parseStack.handlers=t,this._parseStack.handlerPos=i,this._parseStack.transition=r,this._parseStack.chunkPos=n}parse(e,t,i){let r=0,n=0,s=0,a;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,s=this._parseStack.chunkPos+1;else{if(i===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");let l=this._parseStack.handlers,o=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(i===!1&&o>-1){for(;o>=0&&(a=l[o](this._params),a!==!0);o--)if(a instanceof Promise)return this._parseStack.handlerPos=o,a}this._parseStack.handlers=[];break;case 4:if(i===!1&&o>-1){for(;o>=0&&(a=l[o](),a!==!0);o--)if(a instanceof Promise)return this._parseStack.handlerPos=o,a}this._parseStack.handlers=[];break;case 6:if(r=e[this._parseStack.chunkPos],a=this._dcsParser.unhook(r!==24&&r!==26,i),a)return a;r===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(r=e[this._parseStack.chunkPos],a=this._oscParser.end(r!==24&&r!==26,i),a)return a;r===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break}this._parseStack.state=0,s=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=this._parseStack.transition&15}for(let l=s;l<t;++l){switch(r=e[l],n=this._transitions.table[this.currentState<<8|(r<160?r:Yi)],n>>4){case 2:for(let h=l+1;;++h){if(h>=t||(r=e[h])<32||r>126&&r<Yi){this._printHandler(e,l,h),l=h-1;break}if(++h>=t||(r=e[h])<32||r>126&&r<Yi){this._printHandler(e,l,h),l=h-1;break}if(++h>=t||(r=e[h])<32||r>126&&r<Yi){this._printHandler(e,l,h),l=h-1;break}if(++h>=t||(r=e[h])<32||r>126&&r<Yi){this._printHandler(e,l,h),l=h-1;break}}break;case 3:this._executeHandlers[r]?this._executeHandlers[r]():this._executeHandlerFb(r),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:l,code:r,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:let o=this._csiHandlers[this._collect<<8|r],c=o?o.length-1:-1;for(;c>=0&&(a=o[c](this._params),a!==!0);c--)if(a instanceof Promise)return this._preserveStack(3,o,c,n,l),a;c<0&&this._csiHandlerFb(this._collect<<8|r,this._params),this.precedingJoinState=0;break;case 8:do switch(r){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(r-48)}while(++l<t&&(r=e[l])>47&&r<60);l--;break;case 9:this._collect<<=8,this._collect|=r;break;case 10:let u=this._escHandlers[this._collect<<8|r],d=u?u.length-1:-1;for(;d>=0&&(a=u[d](),a!==!0);d--)if(a instanceof Promise)return this._preserveStack(4,u,d,n,l),a;d<0&&this._escHandlerFb(this._collect<<8|r),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|r,this._params);break;case 13:for(let h=l+1;;++h)if(h>=t||(r=e[h])===24||r===26||r===27||r>127&&r<Yi){this._dcsParser.put(e,l,h),l=h-1;break}break;case 14:if(a=this._dcsParser.unhook(r!==24&&r!==26),a)return this._preserveStack(6,[],0,n,l),a;r===27&&(n|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let h=l+1;;h++)if(h>=t||(r=e[h])<32||r>127&&r<Yi){this._oscParser.put(e,l,h),l=h-1;break}break;case 6:if(a=this._oscParser.end(r!==24&&r!==26),a)return this._preserveStack(5,[],0,n,l),a;r===27&&(n|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break}this.currentState=n&15}}},Fj=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,zj=/^[\da-f]+$/;function Vp(e){if(!e)return;let t=e.toLowerCase();if(t.indexOf("rgb:")===0){t=t.slice(4);let i=Fj.exec(t);if(i){let r=i[1]?15:i[4]?255:i[7]?4095:65535;return[Math.round(parseInt(i[1]||i[4]||i[7]||i[10],16)/r*255),Math.round(parseInt(i[2]||i[5]||i[8]||i[11],16)/r*255),Math.round(parseInt(i[3]||i[6]||i[9]||i[12],16)/r*255)]}}else if(t.indexOf("#")===0&&(t=t.slice(1),zj.exec(t)&&[3,6,9,12].includes(t.length))){let i=t.length/3,r=[0,0,0];for(let n=0;n<3;++n){let s=parseInt(t.slice(i*n,i*n+i),16);r[n]=i===1?s<<4:i===2?s:i===3?s>>4:s>>8}return r}}function d1(e,t){let i=e.toString(16),r=i.length<2?"0"+i:i;switch(t){case 4:return i[0];case 8:return r;case 12:return(r+r).slice(0,3);default:return r+r}}function Uj(e,t=16){let[i,r,n]=e;return`rgb:${d1(i,t)}/${d1(r,t)}/${d1(n,t)}`}var Wj={"(":0,")":1,"*":2,"+":3,"-":1,".":2},gn=131072,Zp=10;function Bp(e,t){if(e>24)return t.setWinLines||!1;switch(e){case 1:return!!t.restoreWin;case 2:return!!t.minimizeWin;case 3:return!!t.setWinPosition;case 4:return!!t.setWinSizePixels;case 5:return!!t.raiseWin;case 6:return!!t.lowerWin;case 7:return!!t.refreshWin;case 8:return!!t.setWinSizeChars;case 9:return!!t.maximizeWin;case 10:return!!t.fullscreenWin;case 11:return!!t.getWinState;case 13:return!!t.getWinPosition;case 14:return!!t.getWinSizePixels;case 15:return!!t.getScreenSizePixels;case 16:return!!t.getCellSizePixels;case 18:return!!t.getWinSizeChars;case 19:return!!t.getScreenSizeChars;case 20:return!!t.getIconTitle;case 21:return!!t.getWinTitle;case 22:return!!t.pushTitle;case 23:return!!t.popTitle;case 24:return!!t.setWinLines}return!1}var Fp=5e3,zp=0,jj=class extends Je{constructor(e,t,i,r,n,s,a,l,o=new Bj){super(),this._bufferService=e,this._charsetService=t,this._coreService=i,this._logService=r,this._optionsService=n,this._oscLinkService=s,this._coreMouseService=a,this._unicodeService=l,this._parser=o,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new dU,this._utf8Decoder=new hU,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=zt.clone(),this._eraseAttrDataInternal=zt.clone(),this._onRequestBell=this._register(new xe),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this._register(new xe),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this._register(new xe),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this._register(new xe),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this._register(new xe),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this._register(new xe),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this._register(new xe),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this._register(new xe),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this._register(new xe),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this._register(new xe),this.onLineFeed=this._onLineFeed.event,this._onScroll=this._register(new xe),this.onScroll=this._onScroll.event,this._onTitleChange=this._register(new xe),this.onTitleChange=this._onTitleChange.event,this._onColor=this._register(new xe),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this._register(this._parser),this._dirtyRowTracker=new th(this._bufferService),this._activeBuffer=this._bufferService.buffer,this._register(this._bufferService.buffers.onBufferActivate(c=>this._activeBuffer=c.activeBuffer)),this._parser.setCsiHandlerFallback((c,u)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(c),params:u.toArray()})}),this._parser.setEscHandlerFallback(c=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(c)})}),this._parser.setExecuteHandlerFallback(c=>{this._logService.debug("Unknown EXECUTE code: ",{code:c})}),this._parser.setOscHandlerFallback((c,u,d)=>{this._logService.debug("Unknown OSC code: ",{identifier:c,action:u,data:d})}),this._parser.setDcsHandlerFallback((c,u,d)=>{u==="HOOK"&&(d=d.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(c),action:u,payload:d})}),this._parser.setPrintHandler((c,u,d)=>this.print(c,u,d)),this._parser.registerCsiHandler({final:"@"},c=>this.insertChars(c)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},c=>this.scrollLeft(c)),this._parser.registerCsiHandler({final:"A"},c=>this.cursorUp(c)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},c=>this.scrollRight(c)),this._parser.registerCsiHandler({final:"B"},c=>this.cursorDown(c)),this._parser.registerCsiHandler({final:"C"},c=>this.cursorForward(c)),this._parser.registerCsiHandler({final:"D"},c=>this.cursorBackward(c)),this._parser.registerCsiHandler({final:"E"},c=>this.cursorNextLine(c)),this._parser.registerCsiHandler({final:"F"},c=>this.cursorPrecedingLine(c)),this._parser.registerCsiHandler({final:"G"},c=>this.cursorCharAbsolute(c)),this._parser.registerCsiHandler({final:"H"},c=>this.cursorPosition(c)),this._parser.registerCsiHandler({final:"I"},c=>this.cursorForwardTab(c)),this._parser.registerCsiHandler({final:"J"},c=>this.eraseInDisplay(c,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},c=>this.eraseInDisplay(c,!0)),this._parser.registerCsiHandler({final:"K"},c=>this.eraseInLine(c,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},c=>this.eraseInLine(c,!0)),this._parser.registerCsiHandler({final:"L"},c=>this.insertLines(c)),this._parser.registerCsiHandler({final:"M"},c=>this.deleteLines(c)),this._parser.registerCsiHandler({final:"P"},c=>this.deleteChars(c)),this._parser.registerCsiHandler({final:"S"},c=>this.scrollUp(c)),this._parser.registerCsiHandler({final:"T"},c=>this.scrollDown(c)),this._parser.registerCsiHandler({final:"X"},c=>this.eraseChars(c)),this._parser.registerCsiHandler({final:"Z"},c=>this.cursorBackwardTab(c)),this._parser.registerCsiHandler({final:"`"},c=>this.charPosAbsolute(c)),this._parser.registerCsiHandler({final:"a"},c=>this.hPositionRelative(c)),this._parser.registerCsiHandler({final:"b"},c=>this.repeatPrecedingCharacter(c)),this._parser.registerCsiHandler({final:"c"},c=>this.sendDeviceAttributesPrimary(c)),this._parser.registerCsiHandler({prefix:">",final:"c"},c=>this.sendDeviceAttributesSecondary(c)),this._parser.registerCsiHandler({final:"d"},c=>this.linePosAbsolute(c)),this._parser.registerCsiHandler({final:"e"},c=>this.vPositionRelative(c)),this._parser.registerCsiHandler({final:"f"},c=>this.hVPosition(c)),this._parser.registerCsiHandler({final:"g"},c=>this.tabClear(c)),this._parser.registerCsiHandler({final:"h"},c=>this.setMode(c)),this._parser.registerCsiHandler({prefix:"?",final:"h"},c=>this.setModePrivate(c)),this._parser.registerCsiHandler({final:"l"},c=>this.resetMode(c)),this._parser.registerCsiHandler({prefix:"?",final:"l"},c=>this.resetModePrivate(c)),this._parser.registerCsiHandler({final:"m"},c=>this.charAttributes(c)),this._parser.registerCsiHandler({final:"n"},c=>this.deviceStatus(c)),this._parser.registerCsiHandler({prefix:"?",final:"n"},c=>this.deviceStatusPrivate(c)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},c=>this.softReset(c)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},c=>this.setCursorStyle(c)),this._parser.registerCsiHandler({final:"r"},c=>this.setScrollRegion(c)),this._parser.registerCsiHandler({final:"s"},c=>this.saveCursor(c)),this._parser.registerCsiHandler({final:"t"},c=>this.windowOptions(c)),this._parser.registerCsiHandler({final:"u"},c=>this.restoreCursor(c)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},c=>this.insertColumns(c)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},c=>this.deleteColumns(c)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},c=>this.selectProtected(c)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},c=>this.requestMode(c,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},c=>this.requestMode(c,!1)),this._parser.setExecuteHandler(Ae.BEL,()=>this.bell()),this._parser.setExecuteHandler(Ae.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(Ae.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(Ae.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(Ae.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(Ae.BS,()=>this.backspace()),this._parser.setExecuteHandler(Ae.HT,()=>this.tab()),this._parser.setExecuteHandler(Ae.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(Ae.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(B0.IND,()=>this.index()),this._parser.setExecuteHandler(B0.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(B0.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new Di(c=>(this.setTitle(c),this.setIconName(c),!0))),this._parser.registerOscHandler(1,new Di(c=>this.setIconName(c))),this._parser.registerOscHandler(2,new Di(c=>this.setTitle(c))),this._parser.registerOscHandler(4,new Di(c=>this.setOrReportIndexedColor(c))),this._parser.registerOscHandler(8,new Di(c=>this.setHyperlink(c))),this._parser.registerOscHandler(10,new Di(c=>this.setOrReportFgColor(c))),this._parser.registerOscHandler(11,new Di(c=>this.setOrReportBgColor(c))),this._parser.registerOscHandler(12,new Di(c=>this.setOrReportCursorColor(c))),this._parser.registerOscHandler(104,new Di(c=>this.restoreIndexedColor(c))),this._parser.registerOscHandler(110,new Di(c=>this.restoreFgColor(c))),this._parser.registerOscHandler(111,new Di(c=>this.restoreBgColor(c))),this._parser.registerOscHandler(112,new Di(c=>this.restoreCursorColor(c))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(let c in ti)this._parser.registerEscHandler({intermediates:"(",final:c},()=>this.selectCharset("("+c)),this._parser.registerEscHandler({intermediates:")",final:c},()=>this.selectCharset(")"+c)),this._parser.registerEscHandler({intermediates:"*",final:c},()=>this.selectCharset("*"+c)),this._parser.registerEscHandler({intermediates:"+",final:c},()=>this.selectCharset("+"+c)),this._parser.registerEscHandler({intermediates:"-",final:c},()=>this.selectCharset("-"+c)),this._parser.registerEscHandler({intermediates:".",final:c},()=>this.selectCharset("."+c)),this._parser.registerEscHandler({intermediates:"/",final:c},()=>this.selectCharset("/"+c));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(c=>(this._logService.error("Parsing error: ",c),c)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new Dp((c,u)=>this.requestStatusString(c,u)))}getAttrData(){return this._curAttrData}_preserveStack(e,t,i,r){this._parseStack.paused=!0,this._parseStack.cursorStartX=e,this._parseStack.cursorStartY=t,this._parseStack.decodedLength=i,this._parseStack.position=r}_logSlowResolvingAsync(e){this._logService.logLevel<=3&&Promise.race([e,new Promise((t,i)=>setTimeout(()=>i("#SLOW_TIMEOUT"),Fp))]).catch(t=>{if(t!=="#SLOW_TIMEOUT")throw t;console.warn(`async parser handler taking longer than ${Fp} ms`)})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(e,t){let i,r=this._activeBuffer.x,n=this._activeBuffer.y,s=0,a=this._parseStack.paused;if(a){if(i=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,t))return this._logSlowResolvingAsync(i),i;r=this._parseStack.cursorStartX,n=this._parseStack.cursorStartY,this._parseStack.paused=!1,e.length>gn&&(s=this._parseStack.position+gn)}if(this._logService.logLevel<=1&&this._logService.debug(`parsing data ${typeof e=="string"?` "${e}"`:` "${Array.prototype.map.call(e,c=>String.fromCharCode(c)).join("")}"`}`),this._logService.logLevel===0&&this._logService.trace("parsing data (codes)",typeof e=="string"?e.split("").map(c=>c.charCodeAt(0)):e),this._parseBuffer.length<e.length&&this._parseBuffer.length<gn&&(this._parseBuffer=new Uint32Array(Math.min(e.length,gn))),a||this._dirtyRowTracker.clearRange(),e.length>gn)for(let c=s;c<e.length;c+=gn){let u=c+gn<e.length?c+gn:e.length,d=typeof e=="string"?this._stringDecoder.decode(e.substring(c,u),this._parseBuffer):this._utf8Decoder.decode(e.subarray(c,u),this._parseBuffer);if(i=this._parser.parse(this._parseBuffer,d))return this._preserveStack(r,n,d,c),this._logSlowResolvingAsync(i),i}else if(!a){let c=typeof e=="string"?this._stringDecoder.decode(e,this._parseBuffer):this._utf8Decoder.decode(e,this._parseBuffer);if(i=this._parser.parse(this._parseBuffer,c))return this._preserveStack(r,n,c,0),this._logSlowResolvingAsync(i),i}(this._activeBuffer.x!==r||this._activeBuffer.y!==n)&&this._onCursorMove.fire();let l=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),o=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);o<this._bufferService.rows&&this._onRequestRefreshRows.fire({start:Math.min(o,this._bufferService.rows-1),end:Math.min(l,this._bufferService.rows-1)})}print(e,t,i){let r,n,s=this._charsetService.charset,a=this._optionsService.rawOptions.screenReaderMode,l=this._bufferService.cols,o=this._coreService.decPrivateModes.wraparound,c=this._coreService.modes.insertMode,u=this._curAttrData,d=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&i-t>0&&d.getWidth(this._activeBuffer.x-1)===2&&d.setCellFromCodepoint(this._activeBuffer.x-1,0,1,u);let h=this._parser.precedingJoinState;for(let f=t;f<i;++f){if(r=e[f],r<127&&s){let _=s[String.fromCharCode(r)];_&&(r=_.charCodeAt(0))}let v=this._unicodeService.charProperties(r,h);n=cs.extractWidth(v);let p=cs.extractShouldJoin(v),S=p?cs.extractWidth(h):0;if(h=v,a&&this._onA11yChar.fire(kn(r)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+n-S>l){if(o){let _=d,w=this._activeBuffer.x-S;for(this._activeBuffer.x=S,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),d=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),S>0&&d instanceof Ul&&d.copyCellsFrom(_,w,0,S,!1);w<l;)_.setCellFromCodepoint(w++,0,1,u)}else if(this._activeBuffer.x=l-1,n===2)continue}if(p&&this._activeBuffer.x){let _=d.getWidth(this._activeBuffer.x-1)?1:2;d.addCodepointToCell(this._activeBuffer.x-_,r,n);for(let w=n-S;--w>=0;)d.setCellFromCodepoint(this._activeBuffer.x++,0,0,u);continue}if(c&&(d.insertCells(this._activeBuffer.x,n-S,this._activeBuffer.getNullCell(u)),d.getWidth(l-1)===2&&d.setCellFromCodepoint(l-1,0,1,u)),d.setCellFromCodepoint(this._activeBuffer.x++,r,n,u),n>0)for(;--n;)d.setCellFromCodepoint(this._activeBuffer.x++,0,0,u)}this._parser.precedingJoinState=h,this._activeBuffer.x<l&&i-t>0&&d.getWidth(this._activeBuffer.x)===0&&!d.hasContent(this._activeBuffer.x)&&d.setCellFromCodepoint(this._activeBuffer.x,0,1,u),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(e,t){return e.final==="t"&&!e.prefix&&!e.intermediates?this._parser.registerCsiHandler(e,i=>Bp(i.params[0],this._optionsService.rawOptions.windowOptions)?t(i):!0):this._parser.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._parser.registerDcsHandler(e,new Dp(t))}registerEscHandler(e,t){return this._parser.registerEscHandler(e,t)}registerOscHandler(e,t){return this._parser.registerOscHandler(e,new Di(t))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var e;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((e=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&e.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);t.hasWidth(this._activeBuffer.x)&&!t.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let e=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-e),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(e=this._bufferService.cols-1){this._activeBuffer.x=Math.min(e,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(e,t){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=e,this._activeBuffer.y=this._activeBuffer.scrollTop+t):(this._activeBuffer.x=e,this._activeBuffer.y=t),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(e,t){this._restrictCursor(),this._setCursor(this._activeBuffer.x+e,this._activeBuffer.y+t)}cursorUp(e){let t=this._activeBuffer.y-this._activeBuffer.scrollTop;return t>=0?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1)),!0}cursorDown(e){let t=this._activeBuffer.scrollBottom-this._activeBuffer.y;return t>=0?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1),!0}cursorForward(e){return this._moveCursor(e.params[0]||1,0),!0}cursorBackward(e){return this._moveCursor(-(e.params[0]||1),0),!0}cursorNextLine(e){return this.cursorDown(e),this._activeBuffer.x=0,!0}cursorPrecedingLine(e){return this.cursorUp(e),this._activeBuffer.x=0,!0}cursorCharAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(e){return this._setCursor(e.length>=2?(e.params[1]||1)-1:0,(e.params[0]||1)-1),!0}charPosAbsolute(e){return this._setCursor((e.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(e){return this._moveCursor(e.params[0]||1,0),!0}linePosAbsolute(e){return this._setCursor(this._activeBuffer.x,(e.params[0]||1)-1),!0}vPositionRelative(e){return this._moveCursor(0,e.params[0]||1),!0}hVPosition(e){return this.cursorPosition(e),!0}tabClear(e){let t=e.params[0];return t===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:t===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(e){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let t=e.params[0]||1;for(;t--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(e){let t=e.params[0];return t===1&&(this._curAttrData.bg|=536870912),(t===2||t===0)&&(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(e,t,i,r=!1,n=!1){let s=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);s.replaceCells(t,i,this._activeBuffer.getNullCell(this._eraseAttrData()),n),r&&(s.isWrapped=!1)}_resetBufferLine(e,t=!1){let i=this._activeBuffer.lines.get(this._activeBuffer.ybase+e);i&&(i.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),t),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+e),i.isWrapped=!1)}eraseInDisplay(e,t=!1){var r;this._restrictCursor(this._bufferService.cols);let i;switch(e.params[0]){case 0:for(i=this._activeBuffer.y,this._dirtyRowTracker.markDirty(i),this._eraseInBufferLine(i++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);i<this._bufferService.rows;i++)this._resetBufferLine(i,t);this._dirtyRowTracker.markDirty(i);break;case 1:for(i=this._activeBuffer.y,this._dirtyRowTracker.markDirty(i),this._eraseInBufferLine(i,0,this._activeBuffer.x+1,!0,t),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(i+1).isWrapped=!1);i--;)this._resetBufferLine(i,t);this._dirtyRowTracker.markDirty(0);break;case 2:if(this._optionsService.rawOptions.scrollOnEraseInDisplay){for(i=this._bufferService.rows,this._dirtyRowTracker.markRangeDirty(0,i-1);i--&&!((r=this._activeBuffer.lines.get(this._activeBuffer.ybase+i))!=null&&r.getTrimmedLength()););for(;i>=0;i--)this._bufferService.scroll(this._eraseAttrData())}else{for(i=this._bufferService.rows,this._dirtyRowTracker.markDirty(i-1);i--;)this._resetBufferLine(i,t);this._dirtyRowTracker.markDirty(0)}break;case 3:let n=this._activeBuffer.lines.length-this._bufferService.rows;n>0&&(this._activeBuffer.lines.trimStart(n),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-n,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-n,0),this._onScroll.fire(0));break}return!0}eraseInLine(e,t=!1){switch(this._restrictCursor(this._bufferService.cols),e.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,t);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,t);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,t);break}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let i=this._activeBuffer.ybase+this._activeBuffer.y,r=this._bufferService.rows-1-this._activeBuffer.scrollBottom,n=this._bufferService.rows-1+this._activeBuffer.ybase-r+1;for(;t--;)this._activeBuffer.lines.splice(n-1,1),this._activeBuffer.lines.splice(i,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(e){this._restrictCursor();let t=e.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let i=this._activeBuffer.ybase+this._activeBuffer.y,r;for(r=this._bufferService.rows-1-this._activeBuffer.scrollBottom,r=this._bufferService.rows-1+this._activeBuffer.ybase-r;t--;)this._activeBuffer.lines.splice(i,1),this._activeBuffer.lines.splice(r,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.insertCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.deleteCells(this._activeBuffer.x,e.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(e){let t=e.params[0]||1;for(;t--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(zt));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let r=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);r.deleteCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),r.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let r=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);r.insertCells(0,t,this._activeBuffer.getNullCell(this._eraseAttrData())),r.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let r=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);r.insertCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),r.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(e){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;let t=e.params[0]||1;for(let i=this._activeBuffer.scrollTop;i<=this._activeBuffer.scrollBottom;++i){let r=this._activeBuffer.lines.get(this._activeBuffer.ybase+i);r.deleteCells(this._activeBuffer.x,t,this._activeBuffer.getNullCell(this._eraseAttrData())),r.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(e){this._restrictCursor();let t=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return t&&(t.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(e.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(e){let t=this._parser.precedingJoinState;if(!t)return!0;let i=e.params[0]||1,r=cs.extractWidth(t),n=this._activeBuffer.x-r,s=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(n),a=new Uint32Array(s.length*i),l=0;for(let c=0;c<s.length;){let u=s.codePointAt(c)||0;a[l++]=u,c+=u>65535?2:1}let o=l;for(let c=1;c<i;++c)a.copyWithin(o,0,l),o+=l;return this.print(a,0,o),!0}sendDeviceAttributesPrimary(e){return e.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(Ae.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(Ae.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(e){return e.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(Ae.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(Ae.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(Ae.ESC+"[>83;40003;0c")),!0}_is(e){return(this._optionsService.rawOptions.termName+"").indexOf(e)===0}setMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0;break}return!0}setModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,is),this._charsetService.setgCharset(1,is),this._charsetService.setgCharset(2,is),this._charsetService.setgCharset(3,is);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!0;break}return!0}resetMode(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1;break}return!0}resetModePrivate(e){for(let t=0;t<e.length;t++)switch(e.params[t]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),e.params[t]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(void 0),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1;break;case 2026:this._coreService.decPrivateModes.synchronizedOutput=!1,this._onRequestRefreshRows.fire(void 0);break}return!0}requestMode(e,t){(p=>(p[p.NOT_RECOGNIZED=0]="NOT_RECOGNIZED",p[p.SET=1]="SET",p[p.RESET=2]="RESET",p[p.PERMANENTLY_SET=3]="PERMANENTLY_SET",p[p.PERMANENTLY_RESET=4]="PERMANENTLY_RESET"))(void 0||(i={}));let r=this._coreService.decPrivateModes,{activeProtocol:n,activeEncoding:s}=this._coreMouseService,a=this._coreService,{buffers:l,cols:o}=this._bufferService,{active:c,alt:u}=l,d=this._optionsService.rawOptions,h=(p,S)=>(a.triggerDataEvent(`${Ae.ESC}[${t?"":"?"}${p};${S}$y`),!0),f=p=>p?1:2,v=e.params[0];return t?v===2?h(v,4):v===4?h(v,f(a.modes.insertMode)):v===12?h(v,3):v===20?h(v,f(d.convertEol)):h(v,0):v===1?h(v,f(r.applicationCursorKeys)):v===3?h(v,d.windowOptions.setWinLines?o===80?2:o===132?1:0:0):v===6?h(v,f(r.origin)):v===7?h(v,f(r.wraparound)):v===8?h(v,3):v===9?h(v,f(n==="X10")):v===12?h(v,f(d.cursorBlink)):v===25?h(v,f(!a.isCursorHidden)):v===45?h(v,f(r.reverseWraparound)):v===66?h(v,f(r.applicationKeypad)):v===67?h(v,4):v===1e3?h(v,f(n==="VT200")):v===1002?h(v,f(n==="DRAG")):v===1003?h(v,f(n==="ANY")):v===1004?h(v,f(r.sendFocus)):v===1005?h(v,4):v===1006?h(v,f(s==="SGR")):v===1015?h(v,4):v===1016?h(v,f(s==="SGR_PIXELS")):v===1048?h(v,1):v===47||v===1047||v===1049?h(v,f(c===u)):v===2004?h(v,f(r.bracketedPasteMode)):v===2026?h(v,f(r.synchronizedOutput)):h(v,0)}_updateAttrColor(e,t,i,r,n){return t===2?(e|=50331648,e&=-16777216,e|=qo.fromColorRGB([i,r,n])):t===5&&(e&=-50331904,e|=33554432|i&255),e}_extractColor(e,t,i){let r=[0,0,-1,0,0,0],n=0,s=0;do{if(r[s+n]=e.params[t+s],e.hasSubParams(t+s)){let a=e.getSubParams(t+s),l=0;do r[1]===5&&(n=1),r[s+l+1+n]=a[l];while(++l<a.length&&l+s+1+n<r.length);break}if(r[1]===5&&s+n>=2||r[1]===2&&s+n>=5)break;r[1]&&(n=1)}while(++s+t<e.length&&s+n<r.length);for(let a=2;a<r.length;++a)r[a]===-1&&(r[a]=0);switch(r[0]){case 38:i.fg=this._updateAttrColor(i.fg,r[1],r[3],r[4],r[5]);break;case 48:i.bg=this._updateAttrColor(i.bg,r[1],r[3],r[4],r[5]);break;case 58:i.extended=i.extended.clone(),i.extended.underlineColor=this._updateAttrColor(i.extended.underlineColor,r[1],r[3],r[4],r[5])}return s}_processUnderline(e,t){t.extended=t.extended.clone(),(!~e||e>5)&&(e=1),t.extended.underlineStyle=e,t.fg|=268435456,e===0&&(t.fg&=-268435457),t.updateExtended()}_processSGR0(e){e.fg=zt.fg,e.bg=zt.bg,e.extended=e.extended.clone(),e.extended.underlineStyle=0,e.extended.underlineColor&=-67108864,e.updateExtended()}charAttributes(e){if(e.length===1&&e.params[0]===0)return this._processSGR0(this._curAttrData),!0;let t=e.length,i,r=this._curAttrData;for(let n=0;n<t;n++)i=e.params[n],i>=30&&i<=37?(r.fg&=-50331904,r.fg|=16777216|i-30):i>=40&&i<=47?(r.bg&=-50331904,r.bg|=16777216|i-40):i>=90&&i<=97?(r.fg&=-50331904,r.fg|=16777216|i-90|8):i>=100&&i<=107?(r.bg&=-50331904,r.bg|=16777216|i-100|8):i===0?this._processSGR0(r):i===1?r.fg|=134217728:i===3?r.bg|=67108864:i===4?(r.fg|=268435456,this._processUnderline(e.hasSubParams(n)?e.getSubParams(n)[0]:1,r)):i===5?r.fg|=536870912:i===7?r.fg|=67108864:i===8?r.fg|=1073741824:i===9?r.fg|=2147483648:i===2?r.bg|=134217728:i===21?this._processUnderline(2,r):i===22?(r.fg&=-134217729,r.bg&=-134217729):i===23?r.bg&=-67108865:i===24?(r.fg&=-268435457,this._processUnderline(0,r)):i===25?r.fg&=-536870913:i===27?r.fg&=-67108865:i===28?r.fg&=-1073741825:i===29?r.fg&=2147483647:i===39?(r.fg&=-67108864,r.fg|=zt.fg&16777215):i===49?(r.bg&=-67108864,r.bg|=zt.bg&16777215):i===38||i===48||i===58?n+=this._extractColor(e,n,r):i===53?r.bg|=1073741824:i===55?r.bg&=-1073741825:i===59?(r.extended=r.extended.clone(),r.extended.underlineColor=-1,r.updateExtended()):i===100?(r.fg&=-67108864,r.fg|=zt.fg&16777215,r.bg&=-67108864,r.bg|=zt.bg&16777215):this._logService.debug("Unknown SGR attribute: %d.",i);return!0}deviceStatus(e){switch(e.params[0]){case 5:this._coreService.triggerDataEvent(`${Ae.ESC}[0n`);break;case 6:let t=this._activeBuffer.y+1,i=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${Ae.ESC}[${t};${i}R`);break}return!0}deviceStatusPrivate(e){switch(e.params[0]){case 6:let t=this._activeBuffer.y+1,i=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${Ae.ESC}[?${t};${i}R`);break}return!0}softReset(e){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=zt.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(e){let t=e.length===0?1:e.params[0];if(t===0)this._coreService.decPrivateModes.cursorStyle=void 0,this._coreService.decPrivateModes.cursorBlink=void 0;else{switch(t){case 1:case 2:this._coreService.decPrivateModes.cursorStyle="block";break;case 3:case 4:this._coreService.decPrivateModes.cursorStyle="underline";break;case 5:case 6:this._coreService.decPrivateModes.cursorStyle="bar";break}let i=t%2===1;this._coreService.decPrivateModes.cursorBlink=i}return!0}setScrollRegion(e){let t=e.params[0]||1,i;return(e.length<2||(i=e.params[1])>this._bufferService.rows||i===0)&&(i=this._bufferService.rows),i>t&&(this._activeBuffer.scrollTop=t-1,this._activeBuffer.scrollBottom=i-1,this._setCursor(0,0)),!0}windowOptions(e){if(!Bp(e.params[0],this._optionsService.rawOptions.windowOptions))return!0;let t=e.length>1?e.params[1]:0;switch(e.params[0]){case 14:t!==2&&this._onRequestWindowsOptionsReport.fire(0);break;case 16:this._onRequestWindowsOptionsReport.fire(1);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${Ae.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:(t===0||t===2)&&(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>Zp&&this._windowTitleStack.shift()),(t===0||t===1)&&(this._iconNameStack.push(this._iconName),this._iconNameStack.length>Zp&&this._iconNameStack.shift());break;case 23:(t===0||t===2)&&this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),(t===0||t===1)&&this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop());break}return!0}saveCursor(e){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(e){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(e){return this._windowTitle=e,this._onTitleChange.fire(e),!0}setIconName(e){return this._iconName=e,!0}setOrReportIndexedColor(e){let t=[],i=e.split(";");for(;i.length>1;){let r=i.shift(),n=i.shift();if(/^\d+$/.exec(r)){let s=parseInt(r);if(Up(s))if(n==="?")t.push({type:0,index:s});else{let a=Vp(n);a&&t.push({type:1,index:s,color:a})}}}return t.length&&this._onColor.fire(t),!0}setHyperlink(e){let t=e.indexOf(";");if(t===-1)return!0;let i=e.slice(0,t).trim(),r=e.slice(t+1);return r?this._createHyperlink(i,r):i.trim()?!1:this._finishHyperlink()}_createHyperlink(e,t){this._getCurrentLinkId()&&this._finishHyperlink();let i=e.split(":"),r,n=i.findIndex(s=>s.startsWith("id="));return n!==-1&&(r=i[n].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:r,uri:t}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(e,t){let i=e.split(";");for(let r=0;r<i.length&&!(t>=this._specialColors.length);++r,++t)if(i[r]==="?")this._onColor.fire([{type:0,index:this._specialColors[t]}]);else{let n=Vp(i[r]);n&&this._onColor.fire([{type:1,index:this._specialColors[t],color:n}])}return!0}setOrReportFgColor(e){return this._setOrReportSpecialColor(e,0)}setOrReportBgColor(e){return this._setOrReportSpecialColor(e,1)}setOrReportCursorColor(e){return this._setOrReportSpecialColor(e,2)}restoreIndexedColor(e){if(!e)return this._onColor.fire([{type:2}]),!0;let t=[],i=e.split(";");for(let r=0;r<i.length;++r)if(/^\d+$/.exec(i[r])){let n=parseInt(i[r]);Up(n)&&t.push({type:2,index:n})}return t.length&&this._onColor.fire(t),!0}restoreFgColor(e){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(e){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(e){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,is),!0}selectCharset(e){return e.length!==2?(this.selectDefaultCharset(),!0):(e[0]==="/"||this._charsetService.setgCharset(Wj[e[0]],ti[e[1]]||is),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){let e=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,e,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=zt.clone(),this._eraseAttrDataInternal=zt.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=this._curAttrData.bg&67108863,this._eraseAttrDataInternal}setgLevel(e){return this._charsetService.setgLevel(e),!0}screenAlignmentPattern(){let e=new tr;e.content=1<<22|69,e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg,this._setCursor(0,0);for(let t=0;t<this._bufferService.rows;++t){let i=this._activeBuffer.ybase+this._activeBuffer.y+t,r=this._activeBuffer.lines.get(i);r&&(r.fill(e),r.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(e,t){let i=a=>(this._coreService.triggerDataEvent(`${Ae.ESC}${a}${Ae.ESC}\\`),!0),r=this._bufferService.buffer,n=this._optionsService.rawOptions;return i(e==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:e==='"p'?'P1$r61;1"p':e==="r"?`P1$r${r.scrollTop+1};${r.scrollBottom+1}r`:e==="m"?"P1$r0m":e===" q"?`P1$r${{block:2,underline:4,bar:6}[n.cursorStyle]-(n.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(e,t){this._dirtyRowTracker.markRangeDirty(e,t)}},th=class{constructor(e){this._bufferService=e,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(e){e<this.start?this.start=e:e>this.end&&(this.end=e)}markRangeDirty(e,t){e>t&&(zp=e,e=t,t=zp),e<this.start&&(this.start=e),t>this.end&&(this.end=t)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};th=Pt([Ne(0,Ti)],th);function Up(e){return 0<=e&&e<256}var Kj=5e7,Wp=12,qj=50,Gj=class extends Je{constructor(e){super(),this._action=e,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this._register(new xe),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(e,t){if(t!==void 0&&this._syncCalls>t){this._syncCalls=0;return}if(this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;this._isSyncWriting=!0;let i;for(;i=this._writeBuffer.shift();){this._action(i);let r=this._callbacks.shift();r&&r()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(e,t){if(this._pendingData>Kj)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput){this._didUserInput=!1,this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t),this._innerWrite();return}setTimeout(()=>this._innerWrite())}this._pendingData+=e.length,this._writeBuffer.push(e),this._callbacks.push(t)}_innerWrite(e=0,t=!0){let i=e||performance.now();for(;this._writeBuffer.length>this._bufferOffset;){let r=this._writeBuffer[this._bufferOffset],n=this._action(r,t);if(n){let a=l=>performance.now()-i>=Wp?setTimeout(()=>this._innerWrite(0,l)):this._innerWrite(i,l);n.catch(l=>(queueMicrotask(()=>{throw l}),Promise.resolve(!1))).then(a);return}let s=this._callbacks[this._bufferOffset];if(s&&s(),this._bufferOffset++,this._pendingData-=r.length,performance.now()-i>=Wp)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>qj&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(()=>this._innerWrite())):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}},ih=class{constructor(e){this._bufferService=e,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(e){let t=this._bufferService.buffer;if(e.id===void 0){let l=t.addMarker(t.ybase+t.y),o={data:e,id:this._nextId++,lines:[l]};return l.onDispose(()=>this._removeMarkerFromLink(o,l)),this._dataByLinkId.set(o.id,o),o.id}let i=e,r=this._getEntryIdKey(i),n=this._entriesWithId.get(r);if(n)return this.addLineToLink(n.id,t.ybase+t.y),n.id;let s=t.addMarker(t.ybase+t.y),a={id:this._nextId++,key:this._getEntryIdKey(i),data:i,lines:[s]};return s.onDispose(()=>this._removeMarkerFromLink(a,s)),this._entriesWithId.set(a.key,a),this._dataByLinkId.set(a.id,a),a.id}addLineToLink(e,t){let i=this._dataByLinkId.get(e);if(i&&i.lines.every(r=>r.line!==t)){let r=this._bufferService.buffer.addMarker(t);i.lines.push(r),r.onDispose(()=>this._removeMarkerFromLink(i,r))}}getLinkData(e){var t;return(t=this._dataByLinkId.get(e))==null?void 0:t.data}_getEntryIdKey(e){return`${e.id};;${e.uri}`}_removeMarkerFromLink(e,t){let i=e.lines.indexOf(t);i!==-1&&(e.lines.splice(i,1),e.lines.length===0&&(e.data.id!==void 0&&this._entriesWithId.delete(e.key),this._dataByLinkId.delete(e.id)))}};ih=Pt([Ne(0,Ti)],ih);var jp=!1,Yj=class extends Je{constructor(e){super(),this._windowsWrappingHeuristics=this._register(new ra),this._onBinary=this._register(new xe),this.onBinary=this._onBinary.event,this._onData=this._register(new xe),this.onData=this._onData.event,this._onLineFeed=this._register(new xe),this.onLineFeed=this._onLineFeed.event,this._onResize=this._register(new xe),this.onResize=this._onResize.event,this._onWriteParsed=this._register(new xe),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this._register(new xe),this._instantiationService=new yj,this.optionsService=this._register(new xj(e)),this._instantiationService.setService(Hi,this.optionsService),this._bufferService=this._register(this._instantiationService.createInstance(Xd)),this._instantiationService.setService(Ti,this._bufferService),this._logService=this._register(this._instantiationService.createInstance(Yd)),this._instantiationService.setService(jg,this._logService),this.coreService=this._register(this._instantiationService.createInstance(Jd)),this._instantiationService.setService(Ss,this.coreService),this.coreMouseService=this._register(this._instantiationService.createInstance(Qd)),this._instantiationService.setService(Wg,this.coreMouseService),this.unicodeService=this._register(this._instantiationService.createInstance(cs)),this._instantiationService.setService(mU,this.unicodeService),this._charsetService=this._instantiationService.createInstance(Oj),this._instantiationService.setService(_U,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(ih),this._instantiationService.setService(Kg,this._oscLinkService),this._inputHandler=this._register(new jj(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this._register(fi.forward(this._inputHandler.onLineFeed,this._onLineFeed)),this._register(this._inputHandler),this._register(fi.forward(this._bufferService.onResize,this._onResize)),this._register(fi.forward(this.coreService.onData,this._onData)),this._register(fi.forward(this.coreService.onBinary,this._onBinary)),this._register(this.coreService.onRequestScrollToBottom(()=>this.scrollToBottom(!0))),this._register(this.coreService.onUserInput(()=>this._writeBuffer.handleUserInput())),this._register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],()=>this._handleWindowsPtyOptionChange())),this._register(this._bufferService.onScroll(()=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)})),this._writeBuffer=this._register(new Gj((t,i)=>this._inputHandler.parse(t,i))),this._register(fi.forward(this._writeBuffer.onWriteParsed,this._onWriteParsed))}get onScroll(){return this._onScrollApi||(this._onScrollApi=this._register(new xe),this._onScroll.event(e=>{var t;(t=this._onScrollApi)==null||t.fire(e.position)})),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(e){for(let t in e)this.optionsService.options[t]=e[t]}write(e,t){this._writeBuffer.write(e,t)}writeSync(e,t){this._logService.logLevel<=3&&!jp&&(this._logService.warn("writeSync is unreliable and will be removed soon."),jp=!0),this._writeBuffer.writeSync(e,t)}input(e,t=!0){this.coreService.triggerDataEvent(e,t)}resize(e,t){isNaN(e)||isNaN(t)||(e=Math.max(e,Ab),t=Math.max(t,Mb),this._bufferService.resize(e,t))}scroll(e,t=!1){this._bufferService.scroll(e,t)}scrollLines(e,t){this._bufferService.scrollLines(e,t)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}registerEscHandler(e,t){return this._inputHandler.registerEscHandler(e,t)}registerDcsHandler(e,t){return this._inputHandler.registerDcsHandler(e,t)}registerCsiHandler(e,t){return this._inputHandler.registerCsiHandler(e,t)}registerOscHandler(e,t){return this._inputHandler.registerOscHandler(e,t)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let e=!1,t=this.optionsService.rawOptions.windowsPty;t&&t.buildNumber!==void 0&&t.buildNumber!==void 0?e=t.backend==="conpty"&&t.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(e=!0),e?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){let e=[];e.push(this.onLineFeed(Ip.bind(null,this._bufferService))),e.push(this.registerCsiHandler({final:"H"},()=>(Ip(this._bufferService),!1))),this._windowsWrappingHeuristics.value=Et(()=>{for(let t of e)t.dispose()})}}},Xj={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};function Jj(e,t,i,r){var a;let n={type:0,cancel:!1,key:void 0},s=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:e.key==="UIKeyInputUpArrow"?t?n.key=Ae.ESC+"OA":n.key=Ae.ESC+"[A":e.key==="UIKeyInputLeftArrow"?t?n.key=Ae.ESC+"OD":n.key=Ae.ESC+"[D":e.key==="UIKeyInputRightArrow"?t?n.key=Ae.ESC+"OC":n.key=Ae.ESC+"[C":e.key==="UIKeyInputDownArrow"&&(t?n.key=Ae.ESC+"OB":n.key=Ae.ESC+"[B");break;case 8:n.key=e.ctrlKey?"\b":Ae.DEL,e.altKey&&(n.key=Ae.ESC+n.key);break;case 9:if(e.shiftKey){n.key=Ae.ESC+"[Z";break}n.key=Ae.HT,n.cancel=!0;break;case 13:n.key=e.altKey?Ae.ESC+Ae.CR:Ae.CR,n.cancel=!0;break;case 27:n.key=Ae.ESC,e.altKey&&(n.key=Ae.ESC+Ae.ESC),n.cancel=!0;break;case 37:if(e.metaKey)break;s?n.key=Ae.ESC+"[1;"+(s+1)+"D":t?n.key=Ae.ESC+"OD":n.key=Ae.ESC+"[D";break;case 39:if(e.metaKey)break;s?n.key=Ae.ESC+"[1;"+(s+1)+"C":t?n.key=Ae.ESC+"OC":n.key=Ae.ESC+"[C";break;case 38:if(e.metaKey)break;s?n.key=Ae.ESC+"[1;"+(s+1)+"A":t?n.key=Ae.ESC+"OA":n.key=Ae.ESC+"[A";break;case 40:if(e.metaKey)break;s?n.key=Ae.ESC+"[1;"+(s+1)+"B":t?n.key=Ae.ESC+"OB":n.key=Ae.ESC+"[B";break;case 45:!e.shiftKey&&!e.ctrlKey&&(n.key=Ae.ESC+"[2~");break;case 46:s?n.key=Ae.ESC+"[3;"+(s+1)+"~":n.key=Ae.ESC+"[3~";break;case 36:s?n.key=Ae.ESC+"[1;"+(s+1)+"H":t?n.key=Ae.ESC+"OH":n.key=Ae.ESC+"[H";break;case 35:s?n.key=Ae.ESC+"[1;"+(s+1)+"F":t?n.key=Ae.ESC+"OF":n.key=Ae.ESC+"[F";break;case 33:e.shiftKey?n.type=2:e.ctrlKey?n.key=Ae.ESC+"[5;"+(s+1)+"~":n.key=Ae.ESC+"[5~";break;case 34:e.shiftKey?n.type=3:e.ctrlKey?n.key=Ae.ESC+"[6;"+(s+1)+"~":n.key=Ae.ESC+"[6~";break;case 112:s?n.key=Ae.ESC+"[1;"+(s+1)+"P":n.key=Ae.ESC+"OP";break;case 113:s?n.key=Ae.ESC+"[1;"+(s+1)+"Q":n.key=Ae.ESC+"OQ";break;case 114:s?n.key=Ae.ESC+"[1;"+(s+1)+"R":n.key=Ae.ESC+"OR";break;case 115:s?n.key=Ae.ESC+"[1;"+(s+1)+"S":n.key=Ae.ESC+"OS";break;case 116:s?n.key=Ae.ESC+"[15;"+(s+1)+"~":n.key=Ae.ESC+"[15~";break;case 117:s?n.key=Ae.ESC+"[17;"+(s+1)+"~":n.key=Ae.ESC+"[17~";break;case 118:s?n.key=Ae.ESC+"[18;"+(s+1)+"~":n.key=Ae.ESC+"[18~";break;case 119:s?n.key=Ae.ESC+"[19;"+(s+1)+"~":n.key=Ae.ESC+"[19~";break;case 120:s?n.key=Ae.ESC+"[20;"+(s+1)+"~":n.key=Ae.ESC+"[20~";break;case 121:s?n.key=Ae.ESC+"[21;"+(s+1)+"~":n.key=Ae.ESC+"[21~";break;case 122:s?n.key=Ae.ESC+"[23;"+(s+1)+"~":n.key=Ae.ESC+"[23~";break;case 123:s?n.key=Ae.ESC+"[24;"+(s+1)+"~":n.key=Ae.ESC+"[24~";break;default:if(e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey)e.keyCode>=65&&e.keyCode<=90?n.key=String.fromCharCode(e.keyCode-64):e.keyCode===32?n.key=Ae.NUL:e.keyCode>=51&&e.keyCode<=55?n.key=String.fromCharCode(e.keyCode-51+27):e.keyCode===56?n.key=Ae.DEL:e.keyCode===219?n.key=Ae.ESC:e.keyCode===220?n.key=Ae.FS:e.keyCode===221&&(n.key=Ae.GS);else if((!i||r)&&e.altKey&&!e.metaKey){let l=(a=Xj[e.keyCode])==null?void 0:a[e.shiftKey?1:0];if(l)n.key=Ae.ESC+l;else if(e.keyCode>=65&&e.keyCode<=90){let o=e.ctrlKey?e.keyCode-64:e.keyCode+32,c=String.fromCharCode(o);e.shiftKey&&(c=c.toUpperCase()),n.key=Ae.ESC+c}else if(e.keyCode===32)n.key=Ae.ESC+(e.ctrlKey?Ae.NUL:" ");else if(e.key==="Dead"&&e.code.startsWith("Key")){let o=e.code.slice(3,4);e.shiftKey||(o=o.toLowerCase()),n.key=Ae.ESC+o,n.cancel=!0}}else i&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.metaKey?e.keyCode===65&&(n.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.keyCode>=48&&e.key.length===1?n.key=e.key:e.key&&e.ctrlKey&&(e.key==="_"&&(n.key=Ae.US),e.key==="@"&&(n.key=Ae.NUL));break}return n}var It=0,Qj=class{constructor(e){this._getKey=e,this._array=[],this._insertedValues=[],this._flushInsertedTask=new Lc,this._isFlushingInserted=!1,this._deletedIndices=[],this._flushDeletedTask=new Lc,this._isFlushingDeleted=!1}clear(){this._array.length=0,this._insertedValues.length=0,this._flushInsertedTask.clear(),this._isFlushingInserted=!1,this._deletedIndices.length=0,this._flushDeletedTask.clear(),this._isFlushingDeleted=!1}insert(e){this._flushCleanupDeleted(),this._insertedValues.length===0&&this._flushInsertedTask.enqueue(()=>this._flushInserted()),this._insertedValues.push(e)}_flushInserted(){let e=this._insertedValues.sort((n,s)=>this._getKey(n)-this._getKey(s)),t=0,i=0,r=new Array(this._array.length+this._insertedValues.length);for(let n=0;n<r.length;n++)i>=this._array.length||this._getKey(e[t])<=this._getKey(this._array[i])?(r[n]=e[t],t++):r[n]=this._array[i++];this._array=r,this._insertedValues.length=0}_flushCleanupInserted(){!this._isFlushingInserted&&this._insertedValues.length>0&&this._flushInsertedTask.flush()}delete(e){if(this._flushCleanupInserted(),this._array.length===0)return!1;let t=this._getKey(e);if(t===void 0||(It=this._search(t),It===-1)||this._getKey(this._array[It])!==t)return!1;do if(this._array[It]===e)return this._deletedIndices.length===0&&this._flushDeletedTask.enqueue(()=>this._flushDeleted()),this._deletedIndices.push(It),!0;while(++It<this._array.length&&this._getKey(this._array[It])===t);return!1}_flushDeleted(){this._isFlushingDeleted=!0;let e=this._deletedIndices.sort((n,s)=>n-s),t=0,i=new Array(this._array.length-e.length),r=0;for(let n=0;n<this._array.length;n++)e[t]===n?t++:i[r++]=this._array[n];this._array=i,this._deletedIndices.length=0,this._isFlushingDeleted=!1}_flushCleanupDeleted(){!this._isFlushingDeleted&&this._deletedIndices.length>0&&this._flushDeletedTask.flush()}*getKeyIterator(e){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(It=this._search(e),!(It<0||It>=this._array.length)&&this._getKey(this._array[It])===e))do yield this._array[It];while(++It<this._array.length&&this._getKey(this._array[It])===e)}forEachByKey(e,t){if(this._flushCleanupInserted(),this._flushCleanupDeleted(),this._array.length!==0&&(It=this._search(e),!(It<0||It>=this._array.length)&&this._getKey(this._array[It])===e))do t(this._array[It]);while(++It<this._array.length&&this._getKey(this._array[It])===e)}values(){return this._flushCleanupInserted(),this._flushCleanupDeleted(),[...this._array].values()}_search(e){let t=0,i=this._array.length-1;for(;i>=t;){let r=t+i>>1,n=this._getKey(this._array[r]);if(n>e)i=r-1;else if(n<e)t=r+1;else{for(;r>0&&this._getKey(this._array[r-1])===e;)r--;return r}}return t}},h1=0,Kp=0,eK=class extends Je{constructor(){super(),this._decorations=new Qj(e=>e==null?void 0:e.marker.line),this._onDecorationRegistered=this._register(new xe),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this._register(new xe),this.onDecorationRemoved=this._onDecorationRemoved.event,this._register(Et(()=>this.reset()))}get decorations(){return this._decorations.values()}registerDecoration(e){if(e.marker.isDisposed)return;let t=new tK(e);if(t){let i=t.marker.onDispose(()=>t.dispose()),r=t.onDispose(()=>{r.dispose(),t&&(this._decorations.delete(t)&&this._onDecorationRemoved.fire(t),i.dispose())});this._decorations.insert(t),this._onDecorationRegistered.fire(t)}return t}reset(){for(let e of this._decorations.values())e.dispose();this._decorations.clear()}*getDecorationsAtCell(e,t,i){let r=0,n=0;for(let s of this._decorations.getKeyIterator(t))r=s.options.x??0,n=r+(s.options.width??1),e>=r&&e<n&&(!i||(s.options.layer??"bottom")===i)&&(yield s)}forEachDecorationAtCell(e,t,i,r){this._decorations.forEachByKey(t,n=>{h1=n.options.x??0,Kp=h1+(n.options.width??1),e>=h1&&e<Kp&&(!i||(n.options.layer??"bottom")===i)&&r(n)})}},tK=class extends Tn{constructor(e){super(),this.options=e,this.onRenderEmitter=this.add(new xe),this.onRender=this.onRenderEmitter.event,this._onDispose=this.add(new xe),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=e.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=$t.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=$t.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}dispose(){this._onDispose.fire(),super.dispose()}},iK=1e3,rK=class{constructor(e,t=iK){this._renderCallback=e,this._debounceThresholdMS=t,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(e,t,i){this._rowCount=i,e=e!==void 0?e:0,t=t!==void 0?t:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,e):e,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,t):t;let r=performance.now();if(r-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=r,this._innerRefresh();else if(!this._additionalRefreshRequested){let n=r-this._lastRefreshMs,s=this._debounceThresholdMS-n;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=performance.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},s)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;let e=Math.max(this._rowStart,0),t=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(e,t)}},qp=20,$c=class extends Je{constructor(e,t,i,r){super(),this._terminal=e,this._coreBrowserService=i,this._renderService=r,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="";let n=this._coreBrowserService.mainDocument;this._accessibilityContainer=n.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=n.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let s=0;s<this._terminal.rows;s++)this._rowElements[s]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[s]);if(this._topBoundaryFocusListener=s=>this._handleBoundaryFocus(s,0),this._bottomBoundaryFocusListener=s=>this._handleBoundaryFocus(s,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=n.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this._register(new rK(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this._register(this._terminal.onResize(s=>this._handleResize(s.rows))),this._register(this._terminal.onRender(s=>this._refreshRows(s.start,s.end))),this._register(this._terminal.onScroll(()=>this._refreshRows())),this._register(this._terminal.onA11yChar(s=>this._handleChar(s))),this._register(this._terminal.onLineFeed(()=>this._handleChar(`
94
- `))),this._register(this._terminal.onA11yTab(s=>this._handleTab(s))),this._register(this._terminal.onKey(s=>this._handleKey(s.key))),this._register(this._terminal.onBlur(()=>this._clearLiveRegion())),this._register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this._register(We(n,"selectionchange",()=>this._handleSelectionChange())),this._register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRowsDimensions(),this._refreshRows(),this._register(Et(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<qp+1&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
95
- `&&(this._liveRegionLineCount++,this._liveRegionLineCount===qp+1&&(this._liveRegion.textContent+=Sd.get())))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){let i=this._terminal.buffer,r=i.lines.length.toString();for(let n=e;n<=t;n++){let s=i.lines.get(i.ydisp+n),a=[],l=(s==null?void 0:s.translateToString(!0,void 0,void 0,a))||"",o=(i.ydisp+n+1).toString(),c=this._rowElements[n];c&&(l.length===0?(c.textContent=" ",this._rowColumns.set(c,[0,1])):(c.textContent=l,this._rowColumns.set(c,a)),c.setAttribute("aria-posinset",o),c.setAttribute("aria-setsize",r),this._alignRowWidth(c))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){let i=e.target,r=this._rowElements[t===0?1:this._rowElements.length-2],n=i.getAttribute("aria-posinset"),s=t===0?"1":`${this._terminal.buffer.lines.length}`;if(n===s||e.relatedTarget!==r)return;let a,l;if(t===0?(a=i,l=this._rowElements.pop(),this._rowContainer.removeChild(l)):(a=this._rowElements.shift(),l=i,this._rowContainer.removeChild(a)),a.removeEventListener("focus",this._topBoundaryFocusListener),l.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){let o=this._createAccessibilityTreeNode();this._rowElements.unshift(o),this._rowContainer.insertAdjacentElement("afterbegin",o)}else{let o=this._createAccessibilityTreeNode();this._rowElements.push(o),this._rowContainer.appendChild(o)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){var l;if(this._rowElements.length===0)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode){console.error("anchorNode and/or focusNode are null");return}let t={node:e.anchorNode,offset:e.anchorOffset},i={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(i.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===i.node&&t.offset>i.offset)&&([t,i]=[i,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;let r=this._rowElements.slice(-1)[0];if(i.node.compareDocumentPosition(r)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(i={node:r,offset:((l=r.textContent)==null?void 0:l.length)??0}),!this._rowContainer.contains(i.node))return;let n=({node:o,offset:c})=>{let u=o instanceof Text?o.parentNode:o,d=parseInt(u==null?void 0:u.getAttribute("aria-posinset"),10)-1;if(isNaN(d))return console.warn("row is invalid. Race condition?"),null;let h=this._rowColumns.get(u);if(!h)return console.warn("columns is null. Race condition?"),null;let f=c<h.length?h[c]:h.slice(-1)[0]+1;return f>=this._terminal.cols&&(++d,f=0),{row:d,column:f}},s=n(t),a=n(i);if(!(!s||!a)){if(s.row>a.row||s.row===a.row&&s.column>=a.column)throw new Error("invalid range");this._terminal.select(s.column,s.row,(a.row-s.row)*this._terminal.cols-s.column+a.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){var n,s;e.style.transform="";let t=e.getBoundingClientRect().width,i=(s=(n=this._rowColumns.get(e))==null?void 0:n.slice(-1))==null?void 0:s[0];if(!i)return;let r=i*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${r/t})`}};$c=Pt([Ne(1,_2),Ne(2,dn),Ne(3,hn)],$c);var rh=class extends Je{constructor(e,t,i,r,n){super(),this._element=e,this._mouseService=t,this._renderService=i,this._bufferService=r,this._linkProviderService=n,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new xe),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new xe),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(Et(()=>{var s;vs(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,(s=this._activeProviderReplies)==null||s.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(We(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(We(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(We(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(We(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!t)return;this._isMouseOut=!1;let i=e.composedPath();for(let r=0;r<i.length;r++){let n=i[r];if(n.classList.contains("xterm"))break;if(n.classList.contains("xterm-hover"))return}(!this._lastBufferCell||t.x!==this._lastBufferCell.x||t.y!==this._lastBufferCell.y)&&(this._handleHover(t),this._lastBufferCell=t)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,t){var r,n;(!this._activeProviderReplies||!t)&&((r=this._activeProviderReplies)==null||r.forEach(s=>{s==null||s.forEach(a=>{a.link.dispose&&a.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let i=!1;for(let[s,a]of this._linkProviderService.linkProviders.entries())t?(n=this._activeProviderReplies)!=null&&n.get(s)&&(i=this._checkLinkProviderResult(s,e,i)):a.provideLinks(e.y,l=>{var c,u;if(this._isMouseOut)return;let o=l==null?void 0:l.map(d=>({link:d}));(c=this._activeProviderReplies)==null||c.set(s,o),i=this._checkLinkProviderResult(s,e,i),((u=this._activeProviderReplies)==null?void 0:u.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,t){let i=new Set;for(let r=0;r<t.size;r++){let n=t.get(r);if(n)for(let s=0;s<n.length;s++){let a=n[s],l=a.link.range.start.y<e?0:a.link.range.start.x,o=a.link.range.end.y>e?this._bufferService.cols:a.link.range.end.x;for(let c=l;c<=o;c++){if(i.has(c)){n.splice(s--,1);break}i.add(c)}}}}_checkLinkProviderResult(e,t,i){var s;if(!this._activeProviderReplies)return i;let r=this._activeProviderReplies.get(e),n=!1;for(let a=0;a<e;a++)(!this._activeProviderReplies.has(a)||this._activeProviderReplies.get(a))&&(n=!0);if(!n&&r){let a=r.find(l=>this._linkAtPosition(l.link,t));a&&(i=!0,this._handleNewLink(a))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!i)for(let a=0;a<this._activeProviderReplies.size;a++){let l=(s=this._activeProviderReplies.get(a))==null?void 0:s.find(o=>this._linkAtPosition(o.link,t));if(l){i=!0,this._handleNewLink(l);break}}return i}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){if(!this._currentLink)return;let t=this._positionFromMouseEvent(e,this._element,this._mouseService);t&&this._mouseDownLink&&nK(this._mouseDownLink.link,this._currentLink.link)&&this._linkAtPosition(this._currentLink.link,t)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,t){!this._currentLink||!this._lastMouseEvent||(!e||!t||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=t)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,vs(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let t=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);t&&this._linkAtPosition(e.link,t)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:e.link.decorations===void 0?!0:e.link.decorations.underline,pointerCursor:e.link.decorations===void 0?!0:e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>{var i,r;return(r=(i=this._currentLink)==null?void 0:i.state)==null?void 0:r.decorations.pointerCursor},set:i=>{var r;(r=this._currentLink)!=null&&r.state&&this._currentLink.state.decorations.pointerCursor!==i&&(this._currentLink.state.decorations.pointerCursor=i,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",i))}},underline:{get:()=>{var i,r;return(r=(i=this._currentLink)==null?void 0:i.state)==null?void 0:r.decorations.underline},set:i=>{var r,n,s;(r=this._currentLink)!=null&&r.state&&((s=(n=this._currentLink)==null?void 0:n.state)==null?void 0:s.decorations.underline)!==i&&(this._currentLink.state.decorations.underline=i,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,i))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(i=>{if(!this._currentLink)return;let r=i.start===0?0:i.start+1+this._bufferService.buffer.ydisp,n=this._bufferService.buffer.ydisp+1+i.end;if(this._currentLink.link.range.start.y>=r&&this._currentLink.link.range.end.y<=n&&(this._clearCurrentLink(r,n),this._lastMouseEvent)){let s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._askForLink(s,!1)}})))}_linkHover(e,t,i){var r;(r=this._currentLink)!=null&&r.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),t.hover&&t.hover(i,t.text)}_fireUnderlineEvent(e,t){let i=e.range,r=this._bufferService.buffer.ydisp,n=this._createLinkUnderlineEvent(i.start.x-1,i.start.y-r-1,i.end.x,i.end.y-r-1,void 0);(t?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(n)}_linkLeave(e,t,i){var r;(r=this._currentLink)!=null&&r.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(t,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),t.leave&&t.leave(i,t.text)}_linkAtPosition(e,t){let i=e.range.start.y*this._bufferService.cols+e.range.start.x,r=e.range.end.y*this._bufferService.cols+e.range.end.x,n=t.y*this._bufferService.cols+t.x;return i<=n&&n<=r}_positionFromMouseEvent(e,t,i){let r=i.getCoords(e,t,this._bufferService.cols,this._bufferService.rows);if(r)return{x:r[0],y:r[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,t,i,r,n){return{x1:e,y1:t,x2:i,y2:r,cols:this._bufferService.cols,fg:n}}};rh=Pt([Ne(1,m2),Ne(2,hn),Ne(3,Ti),Ne(4,Gg)],rh);function nK(e,t){return e.text===t.text&&e.range.start.x===t.range.start.x&&e.range.start.y===t.range.start.y&&e.range.end.x===t.range.end.x&&e.range.end.y===t.range.end.y}var sK=class extends Yj{constructor(e={}){super(e),this._linkifier=this._register(new ra),this.browser=pb,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new ra),this._onCursorMove=this._register(new xe),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new xe),this.onKey=this._onKey.event,this._onRender=this._register(new xe),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new xe),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new xe),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new xe),this.onBell=this._onBell.event,this._onFocus=this._register(new xe),this._onBlur=this._register(new xe),this._onA11yCharEmitter=this._register(new xe),this._onA11yTabEmitter=this._register(new xe),this._onWillOpen=this._register(new xe),this._setup(),this._decorationService=this._instantiationService.createInstance(eK),this._instantiationService.setService(Go,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(qW),this._instantiationService.setService(Gg,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(kd)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(t=>this.refresh((t==null?void 0:t.start)??0,(t==null?void 0:t.end)??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(t=>this._reportWindowsOptions(t))),this._register(this._inputHandler.onColor(t=>this._handleColorEvent(t))),this._register(fi.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(fi.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(fi.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(fi.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(t=>this._afterResize(t.cols,t.rows))),this._register(Et(()=>{var t,i;this._customKeyEventHandler=void 0,(i=(t=this.element)==null?void 0:t.parentNode)==null||i.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let t of e){let i,r="";switch(t.index){case 256:i="foreground",r="10";break;case 257:i="background",r="11";break;case 258:i="cursor",r="12";break;default:i="ansi",r="4;"+t.index}switch(t.type){case 0:let n=Ct.toColorRGB(i==="ansi"?this._themeService.colors.ansi[t.index]:this._themeService.colors[i]);this.coreService.triggerDataEvent(`${Ae.ESC}]${r};${Uj(n)}${hb.ST}`);break;case 1:if(i==="ansi")this._themeService.modifyColors(s=>s.ansi[t.index]=Ut.toColor(...t.color));else{let s=i;this._themeService.modifyColors(a=>a[s]=Ut.toColor(...t.color))}break;case 2:this._themeService.restoreColor(t.index);break}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance($c,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Ae.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var e;return(e=this.textarea)==null?void 0:e.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Ae.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,t=this.buffer.lines.get(e);if(!t)return;let i=Math.min(this.buffer.x,this.cols-1),r=this._renderService.dimensions.css.cell.height,n=t.getWidth(i),s=this._renderService.dimensions.css.cell.width*n,a=this.buffer.y*this._renderService.dimensions.css.cell.height,l=i*this._renderService.dimensions.css.cell.width;this.textarea.style.left=l+"px",this.textarea.style.top=a+"px",this.textarea.style.width=s+"px",this.textarea.style.height=r+"px",this.textarea.style.lineHeight=r+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(We(this.element,"copy",t=>{this.hasSelection()&&cU(t,this._selectionService)}));let e=t=>uU(t,this.textarea,this.coreService,this.optionsService);this._register(We(this.textarea,"paste",e)),this._register(We(this.element,"paste",e)),_b?this._register(We(this.element,"mousedown",t=>{t.button===2&&np(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(We(this.element,"contextmenu",t=>{np(t,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),k2&&this._register(We(this.element,"auxclick",t=>{t.button===1&&Zg(t,this.textarea,this.screenElement)}))}_bindKeys(){this._register(We(this.textarea,"keyup",e=>this._keyUp(e),!0)),this._register(We(this.textarea,"keydown",e=>this._keyDown(e),!0)),this._register(We(this.textarea,"keypress",e=>this._keyPress(e),!0)),this._register(We(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(We(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this._register(We(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(We(this.textarea,"input",e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){var n;if(!e)throw new Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((n=this.element)==null?void 0:n.ownerDocument.defaultView)&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),e.appendChild(this.element);let t=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(We(this.screenElement,"mousemove",s=>this.updateCursorStyle(s))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement);let i=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",wd.get()),gb||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>i.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(jW,this.textarea,e.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(dn,this._coreBrowserService),this._register(We(this.textarea,"focus",s=>this._handleTextAreaFocus(s))),this._register(We(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(Wd,this._document,this._helperContainer),this._instantiationService.setService(du,this._charSizeService),this._themeService=this._instantiationService.createInstance(Gd),this._instantiationService.setService(za,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(Mc),this._instantiationService.setService(qg,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(Kd,this.rows,this.screenElement)),this._instantiationService.setService(hn,this._renderService),this._register(this._renderService.onRenderedViewportChange(s=>this._onRender.fire(s))),this.onResize(s=>this._renderService.resize(s.cols,s.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(Fd,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(jd),this._instantiationService.setService(m2,this._mouseService);let r=this._linkifier.value=this._register(this._instantiationService.createInstance(rh,this.screenElement));this.element.appendChild(t);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(Zd,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(s=>{super.scrollLines(s,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(qd,this.element,this.screenElement,r)),this._instantiationService.setService(gU,this._selectionService),this._register(this._selectionService.onRequestScrollLines(s=>this.scrollLines(s.amount,s.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(s=>this._renderService.handleSelectionChanged(s.start,s.end,s.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(s=>{this.textarea.value=s,this.textarea.focus(),this.textarea.select()})),this._register(fi.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{var s;this._selectionService.refresh(),(s=this._viewport)==null||s.queueSync()})),this._register(this._instantiationService.createInstance(Bd,this.screenElement)),this._register(We(this.element,"mousedown",s=>this._selectionService.handleMouseDown(s))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance($c,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",s=>this._handleScreenReaderModeOptionChange(s))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(Ac,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",s=>{!this._overviewRulerRenderer&&s&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(Ac,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(Ud,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,t=this.element;function i(s){var c,u,d,h,f;let a=e._mouseService.getMouseReportCoords(s,e.screenElement);if(!a)return!1;let l,o;switch(s.overrideType||s.type){case"mousemove":o=32,s.buttons===void 0?(l=3,s.button!==void 0&&(l=s.button<3?s.button:3)):l=s.buttons&1?0:s.buttons&4?1:s.buttons&2?2:3;break;case"mouseup":o=0,l=s.button<3?s.button:3;break;case"mousedown":o=1,l=s.button<3?s.button:3;break;case"wheel":if(e._customWheelEventHandler&&e._customWheelEventHandler(s)===!1)return!1;let v=s.deltaY;if(v===0||e.coreMouseService.consumeWheelEvent(s,(h=(d=(u=(c=e._renderService)==null?void 0:c.dimensions)==null?void 0:u.device)==null?void 0:d.cell)==null?void 0:h.height,(f=e._coreBrowserService)==null?void 0:f.dpr)===0)return!1;o=v<0?0:1,l=4;break;default:return!1}return o===void 0||l===void 0||l>4?!1:e.coreMouseService.triggerMouseEvent({col:a.col,row:a.row,x:a.x,y:a.y,button:l,action:o,ctrl:s.ctrlKey,alt:s.altKey,shift:s.shiftKey})}let r={mouseup:null,wheel:null,mousedrag:null,mousemove:null},n={mouseup:s=>(i(s),s.buttons||(this._document.removeEventListener("mouseup",r.mouseup),r.mousedrag&&this._document.removeEventListener("mousemove",r.mousedrag)),this.cancel(s)),wheel:s=>(i(s),this.cancel(s,!0)),mousedrag:s=>{s.buttons&&i(s)},mousemove:s=>{s.buttons||i(s)}};this._register(this.coreMouseService.onProtocolChange(s=>{s?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(s)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),s&8?r.mousemove||(t.addEventListener("mousemove",n.mousemove),r.mousemove=n.mousemove):(t.removeEventListener("mousemove",r.mousemove),r.mousemove=null),s&16?r.wheel||(t.addEventListener("wheel",n.wheel,{passive:!1}),r.wheel=n.wheel):(t.removeEventListener("wheel",r.wheel),r.wheel=null),s&2?r.mouseup||(r.mouseup=n.mouseup):(this._document.removeEventListener("mouseup",r.mouseup),r.mouseup=null),s&4?r.mousedrag||(r.mousedrag=n.mousedrag):(this._document.removeEventListener("mousemove",r.mousedrag),r.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(We(t,"mousedown",s=>{if(s.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(s)))return i(s),r.mouseup&&this._document.addEventListener("mouseup",r.mouseup),r.mousedrag&&this._document.addEventListener("mousemove",r.mousedrag),this.cancel(s)})),this._register(We(t,"wheel",s=>{var a,l,o,c,u;if(!r.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(s)===!1)return!1;if(!this.buffer.hasScrollback){if(s.deltaY===0)return!1;if(e.coreMouseService.consumeWheelEvent(s,(c=(o=(l=(a=e._renderService)==null?void 0:a.dimensions)==null?void 0:l.device)==null?void 0:o.cell)==null?void 0:c.height,(u=e._coreBrowserService)==null?void 0:u.dpr)===0)return this.cancel(s,!0);let d=Ae.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(s.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(d,!0),this.cancel(s,!0)}}},{passive:!1}))}refresh(e,t){var i;(i=this._renderService)==null||i.refreshRows(e,t)}updateCursorStyle(e){var t;(t=this._selectionService)!=null&&t.shouldColumnSelect(e)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,t){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,t),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let t=e-this._bufferService.buffer.ydisp;t!==0&&this.scrollLines(t)}paste(e){Vg(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");let t=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),t}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return this._selectionService?this._selectionService.hasSelection:!1}select(e,t,i){this._selectionService.setSelection(e,t,i)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var e;(e=this._selectionService)==null||e.clearSelection()}selectAll(){var e;(e=this._selectionService)==null||e.selectAll()}selectLines(e,t){var i;(i=this._selectionService)==null||i.selectLines(e,t)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;let t=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!t&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;!t&&(e.key==="Dead"||e.key==="AltGraph")&&(this._unprocessedDeadKey=!0);let i=Jj(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),i.type===3||i.type===2){let r=this.rows-1;return this.scrollLines(i.type===2?-r:r),this.cancel(e,!0)}if(i.type===1&&this.selectAll(),this._isThirdLevelShift(this.browser,e)||(i.cancel&&this.cancel(e,!0),!i.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&e.key.length===1&&e.key.charCodeAt(0)>=65&&e.key.charCodeAt(0)<=90)return!0;if(this._unprocessedDeadKey)return this._unprocessedDeadKey=!1,!0;if((i.key===Ae.ETX||i.key===Ae.CR)&&(this.textarea.value=""),this._onKey.fire({key:i.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(i.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)return this.cancel(e,!0);this._keyDownHandled=!0}_isThirdLevelShift(e,t){let i=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey||e.isWindows&&t.getModifierState("AltGraph");return t.type==="keypress"?i:i&&(!t.keyCode||t.keyCode>47)}_keyUp(e){this._keyDownSeen=!1,!(this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)&&(aK(e)||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let t;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(e)===!1)return!1;if(this.cancel(e),e.charCode)t=e.charCode;else if(e.which===null||e.which===void 0)t=e.keyCode;else if(e.which!==0&&e.charCode!==0)t=e.which;else return!1;return!t||(e.altKey||e.ctrlKey||e.metaKey)&&!this._isThirdLevelShift(this.browser,e)?!1:(t=String.fromCharCode(t),this._onKey.fire({key:t,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(t,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&e.inputType==="insertText"&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let t=e.data;return this.coreService.triggerDataEvent(t,!0),this.cancel(e),!0}return!1}resize(e,t){if(e===this.cols&&t===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,t)}_afterResize(e,t){var i;(i=this._charSizeService)==null||i.measure()}clear(){if(!(this.buffer.ybase===0&&this.buffer.y===0)){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(zt));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){var t;this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),(t=this._selectionService)==null||t.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){var e;(e=this._renderService)==null||e.clearTextureAtlas()}_reportFocus(){var e;(e=this.element)!=null&&e.classList.contains("focus")?this.coreService.triggerDataEvent(Ae.ESC+"[I"):this.coreService.triggerDataEvent(Ae.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let t=this._renderService.dimensions.css.canvas.width.toFixed(0),i=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${Ae.ESC}[4;${i};${t}t`);break;case 1:let r=this._renderService.dimensions.css.cell.width.toFixed(0),n=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${Ae.ESC}[6;${n};${r}t`);break}}cancel(e,t){if(!(!this.options.cancelEvents&&!t))return e.preventDefault(),e.stopPropagation(),!1}};function aK(e){return e.keyCode===16||e.keyCode===17||e.keyCode===18}var lK=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,t){let i={instance:t,dispose:t.dispose,isDisposed:!1};this._addons.push(i),t.dispose=()=>this._wrappedAddonDispose(i),t.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let t=-1;for(let i=0;i<this._addons.length;i++)if(this._addons[i]===e){t=i;break}if(t===-1)throw new Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(t,1)}},oK=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,t){if(!(e<0||e>=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new tr)}translateToString(e,t,i){return this._line.translateToString(e,t,i)}},Gp=class{constructor(e,t){this._buffer=e,this.type=t}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let t=this._buffer.lines.get(e);if(t)return new oK(t)}getNullCell(){return new tr}},cK=class extends Je{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new xe),this.onBufferChange=this._onBufferChange.event,this._normal=new Gp(this._core.buffers.normal,"normal"),this._alternate=new Gp(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},uK=class{constructor(e){this._core=e}registerCsiHandler(e,t){return this._core.registerCsiHandler(e,i=>t(i.toArray()))}addCsiHandler(e,t){return this.registerCsiHandler(e,t)}registerDcsHandler(e,t){return this._core.registerDcsHandler(e,(i,r)=>t(i,r.toArray()))}addDcsHandler(e,t){return this.registerDcsHandler(e,t)}registerEscHandler(e,t){return this._core.registerEscHandler(e,t)}addEscHandler(e,t){return this.registerEscHandler(e,t)}registerOscHandler(e,t){return this._core.registerOscHandler(e,t)}addOscHandler(e,t){return this.registerOscHandler(e,t)}},dK=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},hK=["cols","rows"],Sr=0,fK=class extends Je{constructor(e){super(),this._core=this._register(new sK(e)),this._addonManager=this._register(new lK),this._publicOptions={...this._core.options};let t=r=>this._core.options[r],i=(r,n)=>{this._checkReadonlyOptions(r),this._core.options[r]=n};for(let r in this._core.options){let n={get:t.bind(this,r),set:i.bind(this,r)};Object.defineProperty(this._publicOptions,r,n)}}_checkReadonlyOptions(e){if(hK.includes(e))throw new Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new uK(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new dK(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this._register(new cK(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,t="none";switch(this._core.coreMouseService.activeProtocol){case"X10":t="x10";break;case"VT200":t="vt200";break;case"DRAG":t="drag";break;case"ANY":t="any";break}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:t,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let t in e)this._publicOptions[t]=e[t]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,t=!0){this._core.input(e,t)}resize(e,t){this._verifyIntegers(e,t),this._core.resize(e,t)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,t,i){this._verifyIntegers(e,t,i),this._core.select(e,t,i)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,t){this._verifyIntegers(e,t),this._core.selectLines(e,t)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,t){this._core.write(e,t)}writeln(e,t){this._core.write(e),this._core.write(`\r
96
- `,t)}paste(e){this._core.paste(e)}refresh(e,t){this._verifyIntegers(e,t),this._core.refresh(e,t)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return wd.get()},set promptLabel(e){wd.set(e)},get tooMuchOutput(){return Sd.get()},set tooMuchOutput(e){Sd.set(e)}}}_verifyIntegers(...e){for(Sr of e)if(Sr===1/0||isNaN(Sr)||Sr%1!==0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...e){for(Sr of e)if(Sr&&(Sr===1/0||isNaN(Sr)||Sr%1!==0||Sr<0))throw new Error("This API only accepts positive integers")}};/**
97
- * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
98
- * @license MIT
99
- *
100
- * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
101
- * @license MIT
102
- *
103
- * Originally forked from (with the author's permission):
104
- * Fabrice Bellard's javascript vt100 for jslinux:
105
- * http://bellard.org/jslinux/
106
- * Copyright (c) 2011 Fabrice Bellard
107
- */var pK=2,_K=1,mK=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let t=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(t._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){var d;if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(e.css.cell.width===0||e.css.cell.height===0)return;let t=this._terminal.options.scrollback===0?0:((d=this._terminal.options.overviewRuler)==null?void 0:d.width)||14,i=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(i.getPropertyValue("height")),n=Math.max(0,parseInt(i.getPropertyValue("width"))),s=window.getComputedStyle(this._terminal.element),a={top:parseInt(s.getPropertyValue("padding-top")),bottom:parseInt(s.getPropertyValue("padding-bottom")),right:parseInt(s.getPropertyValue("padding-right")),left:parseInt(s.getPropertyValue("padding-left"))},l=a.top+a.bottom,o=a.right+a.left,c=r-l,u=n-o-t;return{cols:Math.max(pK,Math.floor(u/e.css.cell.width)),rows:Math.max(_K,Math.floor(c/e.css.cell.height))}}};const vK={class:"terminal-view"},gK={class:"conn-status"},bK={class:"conn-label"},yK=Re({__name:"TerminalView",setup(e){const t=ws(),i=q(null),r=Zr(null),n=Zr(null);let s=null,a=null;const l=q(!1);function o(){const u=location.protocol==="https:"?"wss:":"ws:";s=new WebSocket(`${u}//${location.host}/ws/shell`),s.onopen=()=>{l.value=!0,c()},s.onmessage=d=>{var h;(h=r.value)==null||h.write(d.data)},s.onclose=()=>{var d;l.value=!1,(d=r.value)==null||d.write(`\r
108
- \x1B[90m- disconnected -\x1B[0m\r
109
- `)},s.onerror=()=>s==null?void 0:s.close()}function c(){!s||s.readyState!==s.OPEN||!r.value||s.send(JSON.stringify({type:"resize",cols:r.value.cols,rows:r.value.rows}))}return lt(async()=>{t.setPage("Terminal",void 0,{fullBleed:!0}),await document.fonts.ready;const u=new fK({theme:{background:"#0d1117",foreground:"#e6edf3",cursor:"#58a6ff",selectionBackground:"rgba(88,166,255,0.3)",black:"#0d1117",brightBlack:"#6e7681",red:"#ff7b72",brightRed:"#ffa198",green:"#3fb950",brightGreen:"#56d364",yellow:"#d29922",brightYellow:"#e3b341",blue:"#58a6ff",brightBlue:"#79c0ff",magenta:"#bc8cff",brightMagenta:"#d2a8ff",cyan:"#39c5cf",brightCyan:"#56d4dd",white:"#b1bac4",brightWhite:"#f0f6fc"},fontFamily:'"MesloLGS NF", monospace',fontSize:13,lineHeight:1.45,cursorStyle:"block",cursorBlink:!0,scrollback:5e3,convertEol:!0,disableStdin:!1,allowTransparency:!1}),d=new mK;u.loadAddon(d),r.value=u,n.value=d,i.value&&(u.open(i.value),d.fit()),u.onData(h=>{(s==null?void 0:s.readyState)===WebSocket.OPEN&&s.send(JSON.stringify({type:"input",data:h}))}),a=new ResizeObserver(()=>{d.fit(),c()}),i.value&&a.observe(i.value),o()}),mi(()=>{var u;s==null||s.close(),s=null,a==null||a.disconnect(),(u=r.value)==null||u.dispose()}),(u,d)=>(m(),M("div",vK,[(m(),me(dr,{defer:"",to:"#ob-topbar-right"},[b("div",gK,[b("div",{class:Le(["conn-dot",l.value?"live":"dead"])},null,2),b("span",bK,F(l.value?"Connected":"Disconnected"),1)])])),b("div",{ref_key:"containerEl",ref:i,class:"terminal-container"},null,512)]))}}),wK=ii(yK,[["__scopeId","data-v-be882a56"]]),SK={class:"login-page"},CK={class:"login-card"},kK={key:0},AK={key:1},Yp="openbridge_auto_resume_attempted",MK=Re({__name:"LoginView",setup(e){const t=nu(),i=l2(),{user:r,loadConfig:n,checkAuth:s,startPlatformLogin:a,resumeLastAccount:l,chooseAccount:o}=Wo(),c=q(!1),u=q(null),d=j(()=>t.query.logged_out==="1");async function h(){c.value=!0,u.value=null;try{const v=typeof t.query.login_hint=="string"?t.query.login_hint:void 0;await a(v?{loginHint:v}:{})}catch(v){c.value=!1,u.value=v instanceof Error?v.message:"Unable to start sign-in."}}async function f(){c.value=!0,u.value=null;try{await o()}catch(v){c.value=!1,u.value=v instanceof Error?v.message:"Unable to start sign-in."}}return lt(async()=>{if(!(await n()).enabled){i.replace("/");return}if(t.query.error==="account_changed"){u.value="Your platform account changed. Please sign in again.";return}const p=typeof t.query.login_hint=="string"?t.query.login_hint:"";if(await s()){if(p&&r.value&&r.value.email.toLowerCase()!==p.toLowerCase()){c.value=!0,await a({loginHint:p});return}i.replace("/");return}if(p){c.value=!0,await a({loginHint:p});return}if(!d.value&&!sessionStorage.getItem(Yp)){if(sessionStorage.setItem(Yp,"1"),c.value=!0,await l())return;c.value=!1}}),(v,p)=>{const S=ct,_=oi;return m(),M("div",SK,[b("div",CK,[p[2]||(p[2]=b("h1",{class:"login-title"},"OpenBridge",-1)),p[3]||(p[3]=b("p",{class:"login-subtitle"},"Sign in via Nubisco Platform to manage this OpenBridge instance.",-1)),u.value?(m(),me(S,{key:0,variant:"error",class:"login-error"},{default:te(()=>[_e(F(u.value),1)]),_:1})):d.value?(m(),me(S,{key:1,variant:"success",class:"login-error"},{default:te(()=>[...p[0]||(p[0]=[_e("You have been signed out.",-1)])]),_:1})):z("",!0),G(_,{variant:"primary",size:"lg",disabled:c.value,class:"login-btn",onClick:h},{default:te(()=>[c.value?(m(),M("span",kK,"Redirecting…")):(m(),M("span",AK,"Sign in via Nubisco Platform"))]),_:1},8,["disabled"]),G(_,{variant:"ghost",size:"sm",disabled:c.value,onClick:f},{default:te(()=>[...p[1]||(p[1]=[_e("Use a different account",-1)])]),_:1},8,["disabled"])])])}}}),EK=ii(MK,[["__scopeId","data-v-de234ae2"]]),LK={class:"callback-page"},$K={key:1,class:"callback-loading"},xK=Re({__name:"AuthCallbackView",setup(e){const t=nu(),i=l2(),{checkAuth:r,clearLastAccount:n}=Wo(),s=q(null);return lt(async()=>{const a=typeof t.query.token=="string"?t.query.token:"",l=typeof t.query.state=="string"?t.query.state:"",o=typeof t.query.error=="string"?t.query.error:"",c=sessionStorage.getItem("openbridge_platform_state");sessionStorage.removeItem("openbridge_platform_state");const u=sessionStorage.getItem("openbridge_platform_expected_sub");if(sessionStorage.removeItem("openbridge_platform_expected_sub"),o){s.value=o==="not_a_member"?"Your account does not have access to this OpenBridge instance.":o==="domain_not_allowed"?"Your account is not eligible for this OpenBridge instance.":`Sign-in failed: ${o}`;return}if(!c||!l||c!==l){s.value="The sign-in request is no longer valid. Please try again.";return}if(!a){s.value="Platform did not return an OpenBridge access token.";return}const d=await fetch("/auth/platform/callback",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({token:a,...u?{expected_sub:u}:{}})});if(!d.ok){const h=await d.json().catch(()=>null);if((h==null?void 0:h.error)==="subject_mismatch"){n(),i.replace({path:"/login",query:{error:"account_changed"}});return}s.value=(h==null?void 0:h.error)==="invalid_token"?"Your platform sign-in is no longer valid. Please try again.":(h==null?void 0:h.error)==="wrong_app"?"The sign-in was issued for a different application. Please try again.":"Sign-in failed. Please try again.";return}await r(),sessionStorage.removeItem("openbridge_auto_resume_attempted"),i.replace("/")}),(a,l)=>{const o=ct;return m(),M("div",LK,[s.value?(m(),me(o,{key:0,variant:"error"},{default:te(()=>[_e(F(s.value),1)]),_:1})):(m(),M("p",$K,"Signing you in…"))])}}}),TK=ii(xK,[["__scopeId","data-v-6ea5c514"]]),Lb=eP({history:HN(),routes:[{path:"/login",name:"login",component:EK},{path:"/auth/callback",name:"auth-callback",component:TK},{path:"/",component:pZ,redirect:"/dashboard",children:[{path:"dashboard",name:"dashboard",component:PB},{path:"plugins",name:"plugins",component:kF},{path:"devices",name:"devices",component:nz},{path:"devices/:id",name:"device-detail",component:kz},{path:"config",name:"config",component:Rz},{path:"settings",name:"settings",component:nU},{path:"terminal",name:"terminal",component:wK}]}]});let Xp=!1;Lb.beforeEach(async e=>{var a;if(e.name==="login"||e.name==="auth-callback")return!0;const{config:t,user:i,loadConfig:r,checkAuth:n}=Wo();if(t.value||await r(),!((a=t.value)!=null&&a.enabled))return!0;const s=typeof e.query.login_hint=="string"?e.query.login_hint:"";if(Xp){if(!i.value)return s?{path:"/login",query:{login_hint:s}}:"/login"}else{const l=await n();if(Xp=!0,!l)return s?{path:"/login",query:{login_hint:s}}:"/login"}if(s){if(i.value&&i.value.email.toLowerCase()!==s.toLowerCase())return{path:"/login",query:{login_hint:s}};const l={...e.query};return delete l.login_hint,{path:e.path,query:l}}return!0});const Wa=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},HK=Wa("app-window","0 0 256 256",'<path d="M216,44H40A12,12,0,0,0,28,56V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V56A12,12,0,0,0,216,44Zm4,156a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4H216a4,4,0,0,1,4,4ZM76,84a8,8,0,1,1-8-8A8,8,0,0,1,76,84Zm40,0a8,8,0,1,1-8-8A8,8,0,0,1,116,84Z"/>'),NK=Wa("app-window","0 0 256 256",'<path d="M216,42H40A14,14,0,0,0,26,56V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V56A14,14,0,0,0,216,42Zm2,158a2,2,0,0,1-2,2H40a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2H216a2,2,0,0,1,2,2ZM78,84A10,10,0,1,1,68,74,10,10,0,0,1,78,84Zm40,0a10,10,0,1,1-10-10A10,10,0,0,1,118,84Z"/>'),Jp=Wa("app-window","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H40V56H216V200ZM80,84A12,12,0,1,1,68,72,12,12,0,0,1,80,84Zm40,0a12,12,0,1,1-12-12A12,12,0,0,1,120,84Z"/>'),PK=Wa("app-window","0 0 256 256",'<path d="M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36Zm-4,160H44V60H212ZM60,92a16,16,0,1,1,16,16A16,16,0,0,1,60,92Zm48,0a16,16,0,1,1,16,16A16,16,0,0,1,108,92Z"/>'),OK=Wa("app-window","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM68,96A12,12,0,1,1,80,84,12,12,0,0,1,68,96Zm40,0a12,12,0,1,1,12-12A12,12,0,0,1,108,96Z"/>'),RK=Wa("app-window","0 0 256 256",'<path d="M224,56V200a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H216A8,8,0,0,1,224,56Z" opacity="0.2"/><path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm0,160H40V56H216V200ZM80,84A12,12,0,1,1,68,72,12,12,0,0,1,80,84Zm40,0a12,12,0,1,1-12-12A12,12,0,0,1,120,84Z"/>'),IK="app-window",DK=Object.freeze(Object.defineProperty({__proto__:null,bold:PK,default:Jp,duotone:RK,fill:OK,glyphName:IK,light:NK,regular:Jp,thin:HK},Symbol.toStringTag,{value:"Module"})),ja=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},VK=ja("brackets-curly","0 0 256 256",'<path d="M35.89,128C52,136.23,52,155.64,52,172c0,24.8,1.35,40,28,40a4,4,0,0,1,0,8c-36,0-36-26.61-36-48,0-24.8-1.35-40-28-40a4,4,0,0,1,0-8c26.65,0,28-15.2,28-40,0-21.39,0-48,36-48a4,4,0,0,1,0,8C53.35,44,52,59.2,52,84,52,100.36,52,119.77,35.89,128ZM240,124c-26.65,0-28-15.2-28-40,0-21.39,0-48-36-48a4,4,0,0,0,0,8c26.65,0,28,15.2,28,40,0,16.36,0,35.77,16.11,44C204,136.23,204,155.64,204,172c0,24.8-1.35,40-28,40a4,4,0,0,0,0,8c36,0,36-26.61,36-48,0-24.8,1.35-40,28-40a4,4,0,0,0,0-8Z"/>'),ZK=ja("brackets-curly","0 0 256 256",'<path d="M39.91,128a27.68,27.68,0,0,1,9.49,11.13C54,148.62,54,160.51,54,172c0,24.27,1.21,38,26,38a6,6,0,0,1,0,12c-16.88,0-27.81-5.6-33.4-17.13C42,195.38,42,183.49,42,172c0-24.27-1.21-38-26-38a6,6,0,0,1,0-12c24.79,0,26-13.73,26-38,0-11.49,0-23.38,4.6-32.87C52.19,39.6,63.12,34,80,34a6,6,0,0,1,0,12C55.21,46,54,59.73,54,84c0,11.49,0,23.38-4.6,32.87A27.68,27.68,0,0,1,39.91,128ZM240,122c-24.79,0-26-13.73-26-38,0-11.49,0-23.38-4.6-32.87C203.81,39.6,192.88,34,176,34a6,6,0,0,0,0,12c24.79,0,26,13.73,26,38,0,11.49,0,23.38,4.6,32.87A27.68,27.68,0,0,0,216.09,128a27.68,27.68,0,0,0-9.49,11.13C202,148.62,202,160.51,202,172c0,24.27-1.21,38-26,38a6,6,0,0,0,0,12c16.88,0,27.81-5.6,33.4-17.13,4.6-9.49,4.6-21.38,4.6-32.87,0-24.27,1.21-38,26-38a6,6,0,0,0,0-12Z"/>'),Qp=ja("brackets-curly","0 0 256 256",'<path d="M43.18,128a29.78,29.78,0,0,1,8,10.26c4.8,9.9,4.8,22,4.8,33.74,0,24.31,1,36,24,36a8,8,0,0,1,0,16c-17.48,0-29.32-6.14-35.2-18.26-4.8-9.9-4.8-22-4.8-33.74,0-24.31-1-36-24-36a8,8,0,0,1,0-16c23,0,24-11.69,24-36,0-11.72,0-23.84,4.8-33.74C50.68,38.14,62.52,32,80,32a8,8,0,0,1,0,16C57,48,56,59.69,56,84c0,11.72,0,23.84-4.8,33.74A29.78,29.78,0,0,1,43.18,128ZM240,120c-23,0-24-11.69-24-36,0-11.72,0-23.84-4.8-33.74C205.32,38.14,193.48,32,176,32a8,8,0,0,0,0,16c23,0,24,11.69,24,36,0,11.72,0,23.84,4.8,33.74a29.78,29.78,0,0,0,8,10.26,29.78,29.78,0,0,0-8,10.26c-4.8,9.9-4.8,22-4.8,33.74,0,24.31-1,36-24,36a8,8,0,0,0,0,16c17.48,0,29.32-6.14,35.2-18.26,4.8-9.9,4.8-22,4.8-33.74,0-24.31,1-36,24-36a8,8,0,0,0,0-16Z"/>'),BK=ja("brackets-curly","0 0 256 256",'<path d="M54.8,119.49A35.06,35.06,0,0,1,49.05,128a35.06,35.06,0,0,1,5.75,8.51C60,147.24,60,159.83,60,172c0,25.94,1.84,32,20,32a12,12,0,0,1,0,24c-19.14,0-32.2-6.9-38.8-20.51C36,196.76,36,184.17,36,172c0-25.94-1.84-32-20-32a12,12,0,0,1,0-24c18.16,0,20-6.06,20-32,0-12.17,0-24.76,5.2-35.49C47.8,34.9,60.86,28,80,28a12,12,0,0,1,0,24c-18.16,0-20,6.06-20,32C60,96.17,60,108.76,54.8,119.49ZM240,116c-18.16,0-20-6.06-20-32,0-12.17,0-24.76-5.2-35.49C208.2,34.9,195.14,28,176,28a12,12,0,0,0,0,24c18.16,0,20,6.06,20,32,0,12.17,0,24.76,5.2,35.49A35.06,35.06,0,0,0,207,128a35.06,35.06,0,0,0-5.75,8.51C196,147.24,196,159.83,196,172c0,25.94-1.84,32-20,32a12,12,0,0,0,0,24c19.14,0,32.2-6.9,38.8-20.51C220,196.76,220,184.17,220,172c0-25.94,1.84-32,20-32a12,12,0,0,0,0-24Z"/>'),FK=ja("brackets-curly","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM88,155.84c.29,14.26.41,20.16,16,20.16a8,8,0,0,1,0,16c-31.27,0-31.72-22.43-32-35.84C71.71,141.9,71.59,136,56,136a8,8,0,0,1,0-16c15.59,0,15.71-5.9,16-20.16C72.28,86.43,72.73,64,104,64a8,8,0,0,1,0,16c-15.59,0-15.71,5.9-16,20.16-.17,8.31-.41,20.09-8,27.84C87.59,135.75,87.83,147.53,88,155.84ZM200,136c-15.59,0-15.71,5.9-16,20.16-.28,13.41-.73,35.84-32,35.84a8,8,0,0,1,0-16c15.59,0,15.71-5.9,16-20.16.17-8.31.41-20.09,8-27.84-7.6-7.75-7.84-19.53-8-27.84C167.71,85.9,167.59,80,152,80a8,8,0,0,1,0-16c31.27,0,31.72,22.43,32,35.84.29,14.26.41,20.16,16,20.16a8,8,0,0,1,0,16Z"/>'),zK=ja("brackets-curly","0 0 256 256",'<path d="M240,128c-64,0,0,88-64,88H80c-64,0,0-88-64-88,64,0,0-88,64-88h96C240,40,176,128,240,128Z" opacity="0.2"/><path d="M43.18,128a29.78,29.78,0,0,1,8,10.26c4.8,9.9,4.8,22,4.8,33.74,0,24.31,1,36,24,36a8,8,0,0,1,0,16c-17.48,0-29.32-6.14-35.2-18.26-4.8-9.9-4.8-22-4.8-33.74,0-24.31-1-36-24-36a8,8,0,0,1,0-16c23,0,24-11.69,24-36,0-11.72,0-23.84,4.8-33.74C50.68,38.14,62.52,32,80,32a8,8,0,0,1,0,16C57,48,56,59.69,56,84c0,11.72,0,23.84-4.8,33.74A29.78,29.78,0,0,1,43.18,128ZM240,120c-23,0-24-11.69-24-36,0-11.72,0-23.84-4.8-33.74C205.32,38.14,193.48,32,176,32a8,8,0,0,0,0,16c23,0,24,11.69,24,36,0,11.72,0,23.84,4.8,33.74a29.78,29.78,0,0,0,8,10.26,29.78,29.78,0,0,0-8,10.26c-4.8,9.9-4.8,22-4.8,33.74,0,24.31-1,36-24,36a8,8,0,0,0,0,16c17.48,0,29.32-6.14,35.2-18.26,4.8-9.9,4.8-22,4.8-33.74,0-24.31,1-36,24-36a8,8,0,0,0,0-16Z"/>'),UK="brackets-curly",WK=Object.freeze(Object.defineProperty({__proto__:null,bold:BK,default:Qp,duotone:zK,fill:FK,glyphName:UK,light:ZK,regular:Qp,thin:VK},Symbol.toStringTag,{value:"Module"})),Ka=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},jK=Ka("broadcast","0 0 256 256",'<path d="M128,92a36,36,0,1,0,36,36A36,36,0,0,0,128,92Zm0,64a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm76-28a75.74,75.74,0,0,1-19.35,50.67,4,4,0,0,1-6-5.34,67.92,67.92,0,0,0,0-90.66,4,4,0,0,1,6-5.34A75.74,75.74,0,0,1,204,128ZM65.34,101.53a67.92,67.92,0,0,0,12,71.8,4,4,0,0,1-6,5.34,75.93,75.93,0,0,1,0-101.34,4,4,0,1,1,6,5.34A68,68,0,0,0,65.34,101.53ZM244,128a115.68,115.68,0,0,1-33.14,81.18,4,4,0,0,1-5.72-5.6,107.89,107.89,0,0,0,0-151.16,4,4,0,0,1,5.72-5.6A115.68,115.68,0,0,1,244,128ZM50.86,203.58a4,4,0,0,1-5.72,5.6,115.91,115.91,0,0,1,0-162.36,4,4,0,1,1,5.72,5.6,107.89,107.89,0,0,0,0,151.16Z"/>'),KK=Ka("broadcast","0 0 256 256",'<path d="M128,90a38,38,0,1,0,38,38A38,38,0,0,0,128,90Zm0,64a26,26,0,1,1,26-26A26,26,0,0,1,128,154Zm78-26a77.74,77.74,0,0,1-19.86,52,6,6,0,0,1-8.94-8,65.93,65.93,0,0,0,0-88,6,6,0,1,1,8.94-8A77.74,77.74,0,0,1,206,128ZM67.18,102.31A65.93,65.93,0,0,0,78.8,172a6,6,0,0,1-.47,8.47,6,6,0,0,1-8.47-.47,77.93,77.93,0,0,1,0-104,6,6,0,1,1,8.94,8A66.21,66.21,0,0,0,67.18,102.31ZM246,128a117.71,117.71,0,0,1-33.71,82.58,6,6,0,0,1-8.58-8.4,105.88,105.88,0,0,0,0-148.36,6,6,0,0,1,8.58-8.4A117.71,117.71,0,0,1,246,128ZM52.29,202.18a6,6,0,0,1-8.58,8.4,117.92,117.92,0,0,1,0-165.16,6,6,0,1,1,8.58,8.4,105.88,105.88,0,0,0,0,148.36Z"/>'),e_=Ka("broadcast","0 0 256 256",'<path d="M128,88a40,40,0,1,0,40,40A40,40,0,0,0,128,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,152Zm73.71,7.14a80,80,0,0,1-14.08,22.2,8,8,0,0,1-11.92-10.67,63.95,63.95,0,0,0,0-85.33,8,8,0,1,1,11.92-10.67,80.08,80.08,0,0,1,14.08,84.47ZM69,103.09a64,64,0,0,0,11.26,67.58,8,8,0,0,1-11.92,10.67,79.93,79.93,0,0,1,0-106.67A8,8,0,1,1,80.29,85.34,63.77,63.77,0,0,0,69,103.09ZM248,128a119.58,119.58,0,0,1-34.29,84,8,8,0,1,1-11.42-11.2,103.9,103.9,0,0,0,0-145.56A8,8,0,1,1,213.71,44,119.58,119.58,0,0,1,248,128ZM53.71,200.78A8,8,0,1,1,42.29,212a119.87,119.87,0,0,1,0-168,8,8,0,1,1,11.42,11.2,103.9,103.9,0,0,0,0,145.56Z"/>'),qK=Ka("broadcast","0 0 256 256",'<path d="M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Zm77.39,12.7A83.94,83.94,0,0,1,190.61,184a12,12,0,0,1-17.89-16,59.92,59.92,0,0,0,0-80,12,12,0,0,1,17.89-16,84.07,84.07,0,0,1,14.78,88.7ZM83.28,168a12,12,0,0,1-17.89,16,83.94,83.94,0,0,1,0-112A12,12,0,0,1,83.28,88a59.92,59.92,0,0,0,0,80ZM252,128a123.63,123.63,0,0,1-35.43,86.78A12,12,0,1,1,199.43,198a99.88,99.88,0,0,0,0-140,12,12,0,0,1,17.14-16.8A123.63,123.63,0,0,1,252,128ZM56.57,198a12,12,0,0,1-17.14,16.8,123.89,123.89,0,0,1,0-173.56A12,12,0,0,1,56.57,58a99.88,99.88,0,0,0,0,140Z"/>'),GK=Ka("broadcast","0 0 256 256",'<path d="M168,128a40,40,0,1,1-40-40A40,40,0,0,1,168,128Zm40,0a79.74,79.74,0,0,0-20.37-53.33,8,8,0,1,0-11.92,10.67,64,64,0,0,1,0,85.33,8,8,0,0,0,11.92,10.67A79.79,79.79,0,0,0,208,128ZM80.29,85.34A8,8,0,1,0,68.37,74.67a79.94,79.94,0,0,0,0,106.67,8,8,0,0,0,11.92-10.67,63.95,63.95,0,0,1,0-85.33Zm158.28-4A119.48,119.48,0,0,0,213.71,44a8,8,0,1,0-11.42,11.2,103.9,103.9,0,0,1,0,145.56A8,8,0,1,0,213.71,212,120.12,120.12,0,0,0,238.57,81.29ZM32.17,168.48A103.9,103.9,0,0,1,53.71,55.22,8,8,0,1,0,42.29,44a119.87,119.87,0,0,0,0,168,8,8,0,1,0,11.42-11.2A103.61,103.61,0,0,1,32.17,168.48Z"/>'),YK=Ka("broadcast","0 0 256 256",'<path d="M160,128a32,32,0,1,1-32-32A32,32,0,0,1,160,128Z" opacity="0.2"/><path d="M128,88a40,40,0,1,0,40,40A40,40,0,0,0,128,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,128,152Zm73.71,7.14a80,80,0,0,1-14.08,22.2,8,8,0,0,1-11.92-10.67,63.95,63.95,0,0,0,0-85.33,8,8,0,1,1,11.92-10.67,80.08,80.08,0,0,1,14.08,84.47ZM69,103.09a64,64,0,0,0,11.26,67.58,8,8,0,0,1-11.92,10.67,79.93,79.93,0,0,1,0-106.67A8,8,0,1,1,80.29,85.34,63.77,63.77,0,0,0,69,103.09ZM248,128a119.58,119.58,0,0,1-34.29,84,8,8,0,1,1-11.42-11.2,103.9,103.9,0,0,0,0-145.56A8,8,0,1,1,213.71,44,119.58,119.58,0,0,1,248,128ZM53.71,200.78A8,8,0,1,1,42.29,212a119.87,119.87,0,0,1,0-168,8,8,0,1,1,11.42,11.2,103.9,103.9,0,0,0,0,145.56Z"/>'),XK="broadcast",JK=Object.freeze(Object.defineProperty({__proto__:null,bold:qK,default:e_,duotone:YK,fill:GK,glyphName:XK,light:KK,regular:e_,thin:jK},Symbol.toStringTag,{value:"Module"})),qa=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},QK=qa("camera","0 0 256 256",'<path d="M208,60H178.13L163.32,37.78A4,4,0,0,0,160,36H96a4,4,0,0,0-3.32,1.78L77.85,60H48A20,20,0,0,0,28,80V192a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V80A20,20,0,0,0,208,60Zm12,132a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V80A12,12,0,0,1,48,68H80a4,4,0,0,0,3.33-1.78L98.13,44h59.72l14.82,22.22A4,4,0,0,0,176,68h32a12,12,0,0,1,12,12ZM128,92a40,40,0,1,0,40,40A40,40,0,0,0,128,92Zm0,72a32,32,0,1,1,32-32A32,32,0,0,1,128,164Z"/>'),eq=qa("camera","0 0 256 256",'<path d="M208,58H179.21L165,36.67A6,6,0,0,0,160,34H96a6,6,0,0,0-5,2.67L76.78,58H48A22,22,0,0,0,26,80V192a22,22,0,0,0,22,22H208a22,22,0,0,0,22-22V80A22,22,0,0,0,208,58Zm10,134a10,10,0,0,1-10,10H48a10,10,0,0,1-10-10V80A10,10,0,0,1,48,70H80a6,6,0,0,0,5-2.67L99.21,46h57.57L171,67.33A6,6,0,0,0,176,70h32a10,10,0,0,1,10,10ZM128,90a42,42,0,1,0,42,42A42,42,0,0,0,128,90Zm0,72a30,30,0,1,1,30-30A30,30,0,0,1,128,162Z"/>'),t_=qa("camera","0 0 256 256",'<path d="M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z"/>'),tq=qa("camera","0 0 256 256",'<path d="M208,52H182.42L170,33.34A12,12,0,0,0,160,28H96a12,12,0,0,0-10,5.34L73.57,52H48A28,28,0,0,0,20,80V192a28,28,0,0,0,28,28H208a28,28,0,0,0,28-28V80A28,28,0,0,0,208,52Zm4,140a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4H80a12,12,0,0,0,10-5.34L102.42,52h51.15L166,70.66A12,12,0,0,0,176,76h32a4,4,0,0,1,4,4ZM128,84a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,84Zm0,72a24,24,0,1,1,24-24A24,24,0,0,1,128,156Z"/>'),iq=qa("camera","0 0 256 256",'<path d="M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm-44,76a36,36,0,1,1-36-36A36,36,0,0,1,164,132Z"/>'),rq=qa("camera","0 0 256 256",'<path d="M208,64H176L160,40H96L80,64H48A16,16,0,0,0,32,80V192a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V80A16,16,0,0,0,208,64ZM128,168a36,36,0,1,1,36-36A36,36,0,0,1,128,168Z" opacity="0.2"/><path d="M208,56H180.28L166.65,35.56A8,8,0,0,0,160,32H96a8,8,0,0,0-6.65,3.56L75.71,56H48A24,24,0,0,0,24,80V192a24,24,0,0,0,24,24H208a24,24,0,0,0,24-24V80A24,24,0,0,0,208,56Zm8,136a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H80a8,8,0,0,0,6.66-3.56L100.28,48h55.43l13.63,20.44A8,8,0,0,0,176,72h32a8,8,0,0,1,8,8ZM128,88a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,88Zm0,72a28,28,0,1,1,28-28A28,28,0,0,1,128,160Z"/>'),nq="camera",sq=Object.freeze(Object.defineProperty({__proto__:null,bold:tq,default:t_,duotone:rq,fill:iq,glyphName:nq,light:eq,regular:t_,thin:QK},Symbol.toStringTag,{value:"Module"})),Ga=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},aq=Ga("cube","0 0 256 256",'<path d="M221.76,69.66l-88-48.18a12,12,0,0,0-11.52,0l-88,48.18A12,12,0,0,0,28,80.18v95.64a12,12,0,0,0,6.24,10.52l88,48.18a11.95,11.95,0,0,0,11.52,0l88-48.18A12,12,0,0,0,228,175.82V80.18A12,12,0,0,0,221.76,69.66ZM126.08,28.5a3.94,3.94,0,0,1,3.84,0L216.67,76,128,124.52,39.33,76Zm-88,150.83A4,4,0,0,1,36,175.82V83.29l88,48.16v94.91Zm179.84,0-85.92,47V131.45l88-48.16v92.53A4,4,0,0,1,217.92,179.32Z"/>'),lq=Ga("cube","0 0 256 256",'<path d="M222.72,67.9l-88-48.17a13.9,13.9,0,0,0-13.44,0l-88,48.18A14,14,0,0,0,26,80.18v95.64a14,14,0,0,0,7.28,12.27l88,48.18a13.92,13.92,0,0,0,13.44,0l88-48.18A14,14,0,0,0,230,175.82V80.18A14,14,0,0,0,222.72,67.9ZM127,30.25a2,2,0,0,1,1.92,0L212.51,76,128,122.24,43.49,76ZM39,177.57a2,2,0,0,1-1-1.75V86.66l84,46V223Zm177.92,0L134,223V132.64l84-46v89.16A2,2,0,0,1,217,177.57Z"/>'),i_=Ga("cube","0 0 256 256",'<path d="M223.68,66.15,135.68,18h0a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32h0l80.34,44L128,120,47.66,76ZM40,90l80,43.78v85.79L40,175.82Zm96,129.57V133.82L216,90v85.78Z"/>'),oq=Ga("cube","0 0 256 256",'<path d="M225.6,62.64l-88-48.17a19.91,19.91,0,0,0-19.2,0l-88,48.17A20,20,0,0,0,20,80.19v95.62a20,20,0,0,0,10.4,17.55l88,48.17a19.89,19.89,0,0,0,19.2,0l88-48.17A20,20,0,0,0,236,175.81V80.19A20,20,0,0,0,225.6,62.64ZM128,36.57,200,76,128,115.4,56,76ZM44,96.79l72,39.4v76.67L44,173.44Zm96,116.07V136.19l72-39.4v76.65Z"/>'),cq=Ga("cube","0 0 256 256",'<path d="M223.68,66.15,135.68,18a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,120,47.65,76,128,32l80.35,44Zm8,99.64V133.83l80-43.78v85.76Z"/>'),uq=Ga("cube","0 0 256 256",'<path d="M128,129.09V232a8,8,0,0,1-3.84-1l-88-48.16a8,8,0,0,1-4.16-7V80.2a8,8,0,0,1,.7-3.27Z" opacity="0.2"/><path d="M223.68,66.15,135.68,18h0a15.88,15.88,0,0,0-15.36,0l-88,48.17a16,16,0,0,0-8.32,14v95.64a16,16,0,0,0,8.32,14l88,48.17a15.88,15.88,0,0,0,15.36,0l88-48.17a16,16,0,0,0,8.32-14V80.18A16,16,0,0,0,223.68,66.15ZM128,32h0l80.34,44L128,120,47.66,76ZM40,90l80,43.78v85.79L40,175.82Zm96,129.57V133.82L216,90v85.78Z"/>'),dq="cube",hq=Object.freeze(Object.defineProperty({__proto__:null,bold:oq,default:i_,duotone:uq,fill:cq,glyphName:dq,light:lq,regular:i_,thin:aq},Symbol.toStringTag,{value:"Module"})),Ya=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},fq=Ya("door","0 0 256 256",'<path d="M232,220H204V40a12,12,0,0,0-12-12H64A12,12,0,0,0,52,40V220H24a4,4,0,0,0,0,8H232a4,4,0,0,0,0-8ZM60,40a4,4,0,0,1,4-4H192a4,4,0,0,1,4,4V220H60Zm104,92a8,8,0,1,1-8-8A8,8,0,0,1,164,132Z"/>'),pq=Ya("door","0 0 256 256",'<path d="M232,218H206V40a14,14,0,0,0-14-14H64A14,14,0,0,0,50,40V218H24a6,6,0,0,0,0,12H232a6,6,0,0,0,0-12ZM62,40a2,2,0,0,1,2-2H192a2,2,0,0,1,2,2V218H62Zm104,92a10,10,0,1,1-10-10A10,10,0,0,1,166,132Z"/>'),r_=Ya("door","0 0 256 256",'<path d="M232,216H208V40a16,16,0,0,0-16-16H64A16,16,0,0,0,48,40V216H24a8,8,0,0,0,0,16H232a8,8,0,0,0,0-16ZM64,40H192V216H64Zm104,92a12,12,0,1,1-12-12A12,12,0,0,1,168,132Z"/>'),_q=Ya("door","0 0 256 256",'<path d="M232,212H212V40a20,20,0,0,0-20-20H64A20,20,0,0,0,44,40V212H24a12,12,0,0,0,0,24H232a12,12,0,0,0,0-24ZM68,44H188V212H68Zm104,88a16,16,0,1,1-16-16A16,16,0,0,1,172,132Z"/>'),mq=Ya("door","0 0 256 256",'<path d="M232,216H208V40a16,16,0,0,0-16-16H64A16,16,0,0,0,48,40V216H24a8,8,0,0,0,0,16H232a8,8,0,0,0,0-16Zm-68-72a12,12,0,1,1,12-12A12,12,0,0,1,164,144Z"/>'),vq=Ya("door","0 0 256 256",'<path d="M200,40V224H56V40a8,8,0,0,1,8-8H192A8,8,0,0,1,200,40Z" opacity="0.2"/><path d="M232,216H208V40a16,16,0,0,0-16-16H64A16,16,0,0,0,48,40V216H24a8,8,0,0,0,0,16H232a8,8,0,0,0,0-16ZM64,40H192V216H64Zm104,92a12,12,0,1,1-12-12A12,12,0,0,1,168,132Z"/>'),gq="door",bq=Object.freeze(Object.defineProperty({__proto__:null,bold:_q,default:r_,duotone:vq,fill:mq,glyphName:gq,light:pq,regular:r_,thin:fq},Symbol.toStringTag,{value:"Module"})),Xa=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},yq=Xa("drop","0 0 256 256",'<path d="M171,50.38a250,250,0,0,0-40.73-37.66,4,4,0,0,0-4.58,0A250,250,0,0,0,85,50.38C58.17,81.21,44,113.58,44,144a84,84,0,0,0,168,0C212,113.58,197.83,81.21,171,50.38ZM128,220a76.08,76.08,0,0,1-76-76c0-35.9,21.15-67.8,38.9-88.24A255,255,0,0,1,128,21a255,255,0,0,1,37.1,34.8C182.85,76.2,204,108.1,204,144A76.08,76.08,0,0,1,128,220Zm51.94-67.33a53.51,53.51,0,0,1-43.28,43.27,3.68,3.68,0,0,1-.66.06,4,4,0,0,1-.66-7.94c18.18-3.06,33.63-18.51,36.72-36.73a4,4,0,0,1,7.88,1.34Z"/>'),wq=Xa("drop","0 0 256 256",'<path d="M172.53,49.06a252.86,252.86,0,0,0-41.09-38,6,6,0,0,0-6.88,0,252.86,252.86,0,0,0-41.09,38C56.34,80.26,42,113.09,42,144a86,86,0,0,0,172,0C214,113.09,199.66,80.26,172.53,49.06ZM128,218a74.09,74.09,0,0,1-74-74c0-59.62,59-108.93,74-120.51C143,35.07,202,84.38,202,144A74.09,74.09,0,0,1,128,218Zm53.92-65A55.58,55.58,0,0,1,137,197.92a7,7,0,0,1-1,.08,6,6,0,0,1-1-11.92c17.38-2.92,32.13-17.68,35.08-35.08a6,6,0,1,1,11.84,2Z"/>'),n_=Xa("drop","0 0 256 256",'<path d="M174,47.75a254.19,254.19,0,0,0-41.45-38.3,8,8,0,0,0-9.18,0A254.19,254.19,0,0,0,82,47.75C54.51,79.32,40,112.6,40,144a88,88,0,0,0,176,0C216,112.6,201.49,79.32,174,47.75ZM128,216a72.08,72.08,0,0,1-72-72c0-57.23,55.47-105,72-118,16.53,13,72,60.75,72,118A72.08,72.08,0,0,1,128,216Zm55.89-62.66a57.6,57.6,0,0,1-46.56,46.55A8.75,8.75,0,0,1,136,200a8,8,0,0,1-1.32-15.89c16.57-2.79,30.63-16.85,33.44-33.45a8,8,0,0,1,15.78,2.68Z"/>'),Sq=Xa("drop","0 0 256 256",'<path d="M134.88,6.17a12,12,0,0,0-13.76,0,259,259,0,0,0-42.18,39C50.85,77.43,36,111.62,36,144a92,92,0,0,0,184,0C220,66.64,138.36,8.6,134.88,6.17ZM128,212a68.07,68.07,0,0,1-68-68c0-33.31,20-63.37,36.7-82.71A249.35,249.35,0,0,1,128,31.11a249.35,249.35,0,0,1,31.3,30.18C176,80.63,196,110.69,196,144A68.07,68.07,0,0,1,128,212Zm49.62-52.4a52,52,0,0,1-34,34,12.2,12.2,0,0,1-3.6.55,12,12,0,0,1-3.6-23.45,28,28,0,0,0,18.32-18.32,12,12,0,0,1,22.9,7.2Z"/>'),Cq=Xa("drop","0 0 256 256",'<path d="M174,47.75a254.19,254.19,0,0,0-41.45-38.3,8,8,0,0,0-9.18,0A254.19,254.19,0,0,0,82,47.75C54.51,79.32,40,112.6,40,144a88,88,0,0,0,176,0C216,112.6,201.49,79.32,174,47.75Zm9.85,105.59a57.6,57.6,0,0,1-46.56,46.55A8.75,8.75,0,0,1,136,200a8,8,0,0,1-1.32-15.89c16.57-2.79,30.63-16.85,33.44-33.45a8,8,0,0,1,15.78,2.68Z"/>'),kq=Xa("drop","0 0 256 256",'<path d="M208,144a80,80,0,0,1-160,0c0-72,80-128,80-128S208,72,208,144Z" opacity="0.2"/><path d="M174,47.75a254.19,254.19,0,0,0-41.45-38.3,8,8,0,0,0-9.18,0A254.19,254.19,0,0,0,82,47.75C54.51,79.32,40,112.6,40,144a88,88,0,0,0,176,0C216,112.6,201.49,79.32,174,47.75ZM128,216a72.08,72.08,0,0,1-72-72c0-57.23,55.47-105,72-118,16.53,13,72,60.75,72,118A72.08,72.08,0,0,1,128,216Zm55.89-62.66a57.6,57.6,0,0,1-46.56,46.55A8.75,8.75,0,0,1,136,200a8,8,0,0,1-1.32-15.89c16.57-2.79,30.63-16.85,33.44-33.45a8,8,0,0,1,15.78,2.68Z"/>'),Aq="drop",Mq=Object.freeze(Object.defineProperty({__proto__:null,bold:Sq,default:n_,duotone:kq,fill:Cq,glyphName:Aq,light:wq,regular:n_,thin:yq},Symbol.toStringTag,{value:"Module"})),Ja=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},Eq=Ja("fan","0 0 256 256",'<path d="M229.12,136a56,56,0,0,0-86-31.56,28.25,28.25,0,0,0-4.56-2.39l17.27-68.94a4,4,0,0,0-1.72-4.34A56,56,0,1,0,100,126.62c0,.46,0,.92,0,1.38a27.39,27.39,0,0,0,.26,3.76L31.91,151.28A4,4,0,0,0,29,154.94a56,56,0,0,0,41.45,56.62,56.46,56.46,0,0,0,14.59,1.93,56.07,56.07,0,0,0,55.73-60.59,27.93,27.93,0,0,0,4.33-2.77l51.09,49.44A4,4,0,0,0,199,200.7a4.06,4.06,0,0,0,1.84-.45A56,56,0,0,0,229.12,136ZM128,148a20,20,0,1,1,20-20A20,20,0,0,1,128,148ZM76,76a48,48,0,0,1,71.4-41.92l-16.55,66.06c-.94-.09-1.89-.14-2.85-.14a28.06,28.06,0,0,0-26.34,18.49A47.82,47.82,0,0,1,76,76Zm33,123a48,48,0,0,1-72-40.87l65.5-18.7A28,28,0,0,0,128,156a28.81,28.81,0,0,0,4.94-.44A47.81,47.81,0,0,1,109,199ZM216.6,174.54a47.93,47.93,0,0,1-17,17.22l-49-47.37a27.91,27.91,0,0,0-1.3-34.44,48,48,0,0,1,67.22,64.59Z"/>'),Lq=Ja("fan","0 0 256 256",'<path d="M231.06,135.52a58,58,0,0,0-88-33.42c-.69-.41-1.41-.8-2.14-1.15l16.86-67.32a6,6,0,0,0-2.58-6.51A58,58,0,1,0,98,127.86V128c0,.77,0,1.54.1,2.3L31.37,149.36A6,6,0,0,0,27,154.85,58,58,0,1,0,142.88,154c.7-.4,1.39-.83,2.06-1.29L194.81,201a6,6,0,0,0,6.94,1,58,58,0,0,0,29.31-66.51ZM110,128a18,18,0,1,1,18,18A18,18,0,0,1,110,128ZM78,76a46,46,0,0,1,67.08-40.9L129.32,98q-.66,0-1.32,0a30,30,0,0,0-27.33,17.66A45.84,45.84,0,0,1,78,76Zm30,121.3a46,46,0,0,1-69-37.64l62.39-17.82A30,30,0,0,0,128,158a29.29,29.29,0,0,0,3-.15A45.85,45.85,0,0,1,108,197.3Zm106.9-23.76a45.91,45.91,0,0,1-15,15.7l-46.63-45.12a29.91,29.91,0,0,0-.93-33.62,46,46,0,0,1,62.52,63Z"/>'),s_=Ja("fan","0 0 256 256",'<path d="M233,135a60,60,0,0,0-89.62-35.45l16.39-65.44a8,8,0,0,0-3.45-8.68A60,60,0,1,0,95.69,128.91L30.82,147.44a8,8,0,0,0-5.8,7.32,60,60,0,0,0,44.42,60.66,60.52,60.52,0,0,0,15.62,2.07,60.07,60.07,0,0,0,59.88-62l48.48,46.92a8,8,0,0,0,9.25,1.35A60,60,0,0,0,233,135Zm-121-7a16,16,0,1,1,16,16A16,16,0,0,1,112,128ZM80,76a44,44,0,0,1,62.75-39.82L127.77,96A32,32,0,0,0,99.85,112.8,43.85,43.85,0,0,1,80,76Zm27,119.57a44,44,0,0,1-65.86-34.43l59.31-16.94A32,32,0,0,0,128,160l.91,0A43.82,43.82,0,0,1,107,195.57Zm106.17-23a43.92,43.92,0,0,1-13,14.14l-44.32-42.89a31.91,31.91,0,0,0-.59-32.57,44,44,0,0,1,57.91,61.32Z"/>'),$q=Ja("fan","0 0 256 256",'<path d="M236.85,134a64,64,0,0,0-87.43-42.11l14.22-56.77a12,12,0,0,0-5.17-13A64,64,0,0,0,86,127.52L29.72,143.59a12,12,0,0,0-8.69,11,64,64,0,0,0,127.56,10l42,40.7a12,12,0,0,0,13.86,2A64,64,0,0,0,236.85,134ZM116,128a12,12,0,1,1,12,12A12,12,0,0,1,116,128Zm8-92a40,40,0,0,1,14,2.53L124.6,92.17a36,36,0,0,0-25.85,14.88A40,40,0,0,1,124,36ZM105,192.1A40,40,0,0,1,45.5,164l53.18-15.19a36,36,0,0,0,25.8,15A39.84,39.84,0,0,1,105,192.1Zm104.7-21.56a39.92,39.92,0,0,1-9.21,10.89L160.73,143a35.9,35.9,0,0,0,.05-29.83,40,40,0,0,1,48.89,57.4Z"/>'),xq=Ja("fan","0 0 256 256",'<path d="M233,135a60,60,0,0,0-89.62-35.45l16.39-65.44a8,8,0,0,0-3.45-8.68A60,60,0,1,0,95.69,128.91L30.82,147.44a8,8,0,0,0-5.8,7.32,60,60,0,0,0,44.42,60.66,60.52,60.52,0,0,0,15.62,2.07,60.07,60.07,0,0,0,59.88-62l48.48,46.92a8,8,0,0,0,9.25,1.35A60,60,0,0,0,233,135ZM130.44,147.85a20,20,0,1,1,17.41-22.29A20,20,0,0,1,130.44,147.85Z"/>'),Tq=Ja("fan","0 0 256 256",'<path d="M136.5,150.45A52,52,0,1,1,33,155.13l71.91-20.54h0A24,24,0,0,0,128,152a23.75,23.75,0,0,0,8.5-1.56Zm-32.19-26.31h0a24,24,0,0,1,29.52-19.42h0L152,32.17a52,52,0,1,0-47.69,92ZM201,105.5a52,52,0,0,0-57.84,3.91h0a24,24,0,0,1,2.06,35.26h0l53.74,52a52,52,0,0,0,2-91.2Z" opacity="0.2"/><path d="M233,135a60,60,0,0,0-89.62-35.45l16.39-65.44a8,8,0,0,0-3.45-8.68A60,60,0,1,0,95.69,128.91L30.82,147.44a8,8,0,0,0-5.8,7.32,60,60,0,0,0,44.42,60.66,60.52,60.52,0,0,0,15.62,2.07,60.07,60.07,0,0,0,59.88-62l48.48,46.92a8,8,0,0,0,9.25,1.35A60,60,0,0,0,233,135Zm-121-7a16,16,0,1,1,16,16A16,16,0,0,1,112,128ZM80,76a44,44,0,0,1,62.75-39.82L127.77,96A32,32,0,0,0,99.85,112.8,43.85,43.85,0,0,1,80,76Zm27,119.57a44,44,0,0,1-65.86-34.43l59.31-16.94A32,32,0,0,0,128,160l.91,0A43.82,43.82,0,0,1,107,195.57Zm106.17-23a43.92,43.92,0,0,1-13,14.14l-44.32-42.89a31.91,31.91,0,0,0-.59-32.57,44,44,0,0,1,57.91,61.32Z"/>'),Hq="fan",Nq=Object.freeze(Object.defineProperty({__proto__:null,bold:$q,default:s_,duotone:Tq,fill:xq,glyphName:Hq,light:Lq,regular:s_,thin:Eq},Symbol.toStringTag,{value:"Module"})),Qa=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},Pq=Qa("game-controller","0 0 256 256",'<path d="M176,108H152a4,4,0,0,1,0-8h24a4,4,0,0,1,0,8Zm-72-8H92V88a4,4,0,0,0-8,0v12H72a4,4,0,0,0,0,8H84v12a4,4,0,0,0,8,0V108h12a4,4,0,0,0,0-8Zm134.21,98.36a32,32,0,0,1-48.84,4.27l-.17-.18L148.29,156H107.72L66.81,202.44l-.18.19A32.08,32.08,0,0,1,44,212a32,32,0,0,1-31.5-37.56L28.87,90.21A55.87,55.87,0,0,1,83.89,44H172a56.07,56.07,0,0,1,55.1,46.1.29.29,0,0,1,0,.1l16.37,84.16A31.86,31.86,0,0,1,238.21,198.36ZM172,148a48,48,0,1,0,0-96H83.9A47.9,47.9,0,0,0,36.74,91.67L20.36,175.9a24,24,0,0,0,19.48,27.73,24,24,0,0,0,21-6.58l42-47.69a4,4,0,0,1,3-1.36Zm63.63,27.83-11-56.66A56.09,56.09,0,0,1,172,156H159l36.16,41.06a24,24,0,0,0,40.52-21.23Z"/>'),Oq=Qa("game-controller","0 0 256 256",'<path d="M176,110H152a6,6,0,0,1,0-12h24a6,6,0,0,1,0,12ZM104,98H94V88a6,6,0,0,0-12,0V98H72a6,6,0,0,0,0,12H82v10a6,6,0,0,0,12,0V110h10a6,6,0,0,0,0-12ZM239.84,199.5A34,34,0,0,1,212,214,34.11,34.11,0,0,1,188,204.05l-.26-.28L147.38,158H108.62L68.31,203.76,68,204A34,34,0,0,1,44,214a34,34,0,0,1-33.46-39.91s0-.06,0-.1L26.9,89.88A57.89,57.89,0,0,1,83.89,42H172a58.07,58.07,0,0,1,57.05,47.63c0,.07,0,.12,0,.19L245.46,174s0,.07,0,.11A33.75,33.75,0,0,1,239.84,199.5ZM172,146a46,46,0,0,0,0-92H83.89A45.9,45.9,0,0,0,38.71,92a.36.36,0,0,0,0,.1L22.33,176.23a22,22,0,0,0,37.11,19.45l42-47.65a6,6,0,0,1,4.5-2Zm61.67,30.23-9.79-50.35A58.06,58.06,0,0,1,172,158h-8.63l33.19,37.68a22,22,0,0,0,37.11-19.45Z"/>'),a_=Qa("game-controller","0 0 256 256",'<path d="M176,112H152a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16ZM104,96H96V88a8,8,0,0,0-16,0v8H72a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0v-8h8a8,8,0,0,0,0-16ZM241.48,200.65a36,36,0,0,1-54.94,4.81c-.12-.12-.24-.24-.35-.37L146.48,160h-37L69.81,205.09l-.35.37A36.08,36.08,0,0,1,44,216,36,36,0,0,1,8.56,173.75a.68.68,0,0,1,0-.14L24.93,89.52A59.88,59.88,0,0,1,83.89,40H172a60.08,60.08,0,0,1,59,49.25c0,.06,0,.12,0,.18l16.37,84.17a.68.68,0,0,1,0,.14A35.74,35.74,0,0,1,241.48,200.65ZM172,144a44,44,0,0,0,0-88H83.89A43.9,43.9,0,0,0,40.68,92.37l0,.13L24.3,176.59A20,20,0,0,0,58,194.3l41.92-47.59a8,8,0,0,1,6-2.71Zm59.7,32.59-8.74-45A60,60,0,0,1,172,160h-4.2L198,194.31a20.09,20.09,0,0,0,17.46,5.39,20,20,0,0,0,16.23-23.11Z"/>'),Rq=Qa("game-controller","0 0 256 256",'<path d="M176,116H152a12,12,0,0,1,0-24h24a12,12,0,0,1,0,24ZM104,92h-4V88a12,12,0,0,0-24,0v4H72a12,12,0,0,0,0,24h4v4a12,12,0,0,0,24,0v-4h4a12,12,0,0,0,0-24ZM244.76,202.94a40,40,0,0,1-61,5.35,7,7,0,0,1-.53-.56L144.67,164H111.33L72.81,207.73c-.17.19-.35.38-.53.56A40,40,0,0,1,4.62,173.05a1.18,1.18,0,0,1,0-.2L21,88.79A63.88,63.88,0,0,1,83.88,36H172a64.08,64.08,0,0,1,62.93,52.48,1.8,1.8,0,0,1,0,.19l16.36,84.17a1.77,1.77,0,0,1,0,.2A39.74,39.74,0,0,1,244.76,202.94ZM172,140a40,40,0,0,0,0-80H83.89A39.9,39.9,0,0,0,44.62,93.06a1.55,1.55,0,0,0,0,.21l-16.34,84a16,16,0,0,0,13,18.44,16.07,16.07,0,0,0,13.86-4.21L96.9,144.07a12,12,0,0,1,9-4.07Zm55.76,37.31-7-35.95a63.84,63.84,0,0,1-44.27,22.46l24.41,27.72a16,16,0,0,0,26.85-14.23Z"/>'),Iq=Qa("game-controller","0 0 256 256",'<path d="M247.44,173.75a.68.68,0,0,0,0-.14L231.05,89.44c0-.06,0-.12,0-.18A60.08,60.08,0,0,0,172,40H83.89a59.88,59.88,0,0,0-59,49.52L8.58,173.61a.68.68,0,0,0,0,.14,36,36,0,0,0,60.9,31.71l.35-.37L109.52,160h37l39.71,45.09c.11.13.23.25.35.37A36.08,36.08,0,0,0,212,216a36,36,0,0,0,35.43-42.25ZM104,112H96v8a8,8,0,0,1-16,0v-8H72a8,8,0,0,1,0-16h8V88a8,8,0,0,1,16,0v8h8a8,8,0,0,1,0,16Zm40-8a8,8,0,0,1,8-8h24a8,8,0,0,1,0,16H152A8,8,0,0,1,144,104Zm84.37,87.47a19.84,19.84,0,0,1-12.9,8.23A20.09,20.09,0,0,1,198,194.31L167.8,160H172a60,60,0,0,0,51-28.38l8.74,45A19.82,19.82,0,0,1,228.37,191.47Z"/>'),Dq=Qa("game-controller","0 0 256 256",'<path d="M216.86,207.57a28,28,0,0,1-24.66-7.77L150.09,152H172a51.94,51.94,0,0,0,51.2-61h0l16.36,84.17A28,28,0,0,1,216.86,207.57Z" opacity="0.2"/><path d="M176,112H152a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16ZM104,96H96V88a8,8,0,0,0-16,0v8H72a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0v-8h8a8,8,0,0,0,0-16ZM241.48,200.65a36,36,0,0,1-54.94,4.81c-.12-.12-.24-.24-.35-.37L146.48,160h-37L69.81,205.09l-.35.37A36.08,36.08,0,0,1,44,216,36,36,0,0,1,8.56,173.75a.68.68,0,0,1,0-.14L24.93,89.52A59.88,59.88,0,0,1,83.89,40H172a60.08,60.08,0,0,1,59,49.25c0,.06,0,.12,0,.18l16.37,84.17a.68.68,0,0,1,0,.14A35.74,35.74,0,0,1,241.48,200.65ZM172,144a44,44,0,0,0,0-88H83.89A43.9,43.9,0,0,0,40.68,92.37l0,.13L24.3,176.59A20,20,0,0,0,58,194.3l41.92-47.59a8,8,0,0,1,6-2.71Zm59.7,32.59-8.74-45A60,60,0,0,1,172,160h-4.2L198,194.31a20.09,20.09,0,0,0,17.46,5.39,20,20,0,0,0,16.23-23.11Z"/>'),Vq="game-controller",Zq=Object.freeze(Object.defineProperty({__proto__:null,bold:Rq,default:a_,duotone:Dq,fill:Iq,glyphName:Vq,light:Oq,regular:a_,thin:Pq},Symbol.toStringTag,{value:"Module"})),el=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},Bq=el("garage","0 0 256 256",'<path d="M240,196H228V98.67a12,12,0,0,0-5.34-10L134.66,30a12,12,0,0,0-13.32,0l-88,58.67a12,12,0,0,0-5.34,10V196H16a4,4,0,0,0,0,8H240a4,4,0,0,0,0-8ZM36,98.67a4,4,0,0,1,1.78-3.33l88-58.66a4,4,0,0,1,4.44,0l88,58.66A4,4,0,0,1,220,98.67V196H188V136a4,4,0,0,0-4-4H72a4,4,0,0,0-4,4v60H36ZM180,140v24H132V140Zm-56,24H76V140h48Zm-48,8h48v24H76Zm56,0h48v24H132Z"/>'),Fq=el("garage","0 0 256 256",'<path d="M240,194H230V98.67A14,14,0,0,0,223.77,87l-88-58.66a14,14,0,0,0-15.54,0L32.23,87A14,14,0,0,0,26,98.67V194H16a6,6,0,0,0,0,12H240a6,6,0,0,0,0-12ZM38,98.67A2,2,0,0,1,38.89,97l88-58.67a2,2,0,0,1,2.22,0l88,58.67a2,2,0,0,1,.89,1.66V194H190V136a6,6,0,0,0-6-6H72a6,6,0,0,0-6,6v58H38ZM178,142v20H134V142Zm-56,20H78V142h44ZM78,174h44v20H78Zm56,0h44v20H134Z"/>'),l_=el("garage","0 0 256 256",'<path d="M240,192h-8V98.67a16,16,0,0,0-7.12-13.31l-88-58.67a16,16,0,0,0-17.75,0l-88,58.67A16,16,0,0,0,24,98.67V192H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM40,98.67,128,40l88,58.66V192H192V136a8,8,0,0,0-8-8H72a8,8,0,0,0-8,8v56H40ZM176,144v16H136V144Zm-56,16H80V144h40ZM80,176h40v16H80Zm56,0h40v16H136Z"/>'),zq=el("garage","0 0 256 256",'<path d="M240,188h-4V98.67A20,20,0,0,0,227.09,82l-88-58.66a19.94,19.94,0,0,0-22.18,0L28.91,82A20,20,0,0,0,20,98.67V188H16a12,12,0,0,0,0,24H240a12,12,0,0,0,0-24ZM44,100.81l84-56,84,56V188H196V120a12,12,0,0,0-12-12H72a12,12,0,0,0-12,12v68H44ZM172,132v16H140V132Zm-56,16H84V132h32ZM84,172h32v16H84Zm56,0h32v16H140Z"/>'),Uq=el("garage","0 0 256 256",'<path d="M240,192h-8V98.67a16,16,0,0,0-7.12-13.31l-88-58.67a16,16,0,0,0-17.75,0l-88,58.67A16,16,0,0,0,24,98.67V192H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM136,128h56v24H136Zm-16,24H64V128h56ZM64,168h56v24H64Zm72,0h56v24H136Z"/>'),Wq=el("garage","0 0 256 256",'<path d="M184,136v64H72V136Z" opacity="0.2"/><path d="M240,192h-8V98.67a16,16,0,0,0-7.12-13.31l-88-58.67a16,16,0,0,0-17.75,0l-88,58.67A16,16,0,0,0,24,98.67V192H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM40,98.67,128,40l88,58.66V192H192V136a8,8,0,0,0-8-8H72a8,8,0,0,0-8,8v56H40ZM176,144v16H136V144Zm-56,16H80V144h40ZM80,176h40v16H80Zm56,0h40v16H136Z"/>'),jq="garage",Kq=Object.freeze(Object.defineProperty({__proto__:null,bold:zq,default:l_,duotone:Wq,fill:Uq,glyphName:jq,light:Fq,regular:l_,thin:Bq},Symbol.toStringTag,{value:"Module"})),tl=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},qq=tl("house","0 0 256 256",'<path d="M216.49,111.51l-80-80a12,12,0,0,0-17,0l-80,80A12,12,0,0,0,36,120v96a4,4,0,0,0,4,4h64a4,4,0,0,0,4-4V156h40v60a4,4,0,0,0,4,4h64a4,4,0,0,0,4-4V120A12,12,0,0,0,216.49,111.51ZM212,212H156V152a4,4,0,0,0-4-4H104a4,4,0,0,0-4,4v60H44V120a4,4,0,0,1,1.17-2.83l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,212,120Z"/>'),Gq=tl("house","0 0 256 256",'<path d="M217.9,110.1l-80-80a14,14,0,0,0-19.8,0l-80,80A13.92,13.92,0,0,0,34,120v96a6,6,0,0,0,6,6h64a6,6,0,0,0,6-6V158h36v58a6,6,0,0,0,6,6h64a6,6,0,0,0,6-6V120A13.92,13.92,0,0,0,217.9,110.1ZM210,210H158V152a6,6,0,0,0-6-6H104a6,6,0,0,0-6,6v58H46V120a2,2,0,0,1,.58-1.42l80-80a2,2,0,0,1,2.84,0l80,80A2,2,0,0,1,210,120Z"/>'),o_=tl("house","0 0 256 256",'<path d="M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z"/>'),Yq=tl("house","0 0 256 256",'<path d="M222.14,105.85l-80-80a20,20,0,0,0-28.28,0l-80,80A19.86,19.86,0,0,0,28,120v96a12,12,0,0,0,12,12h64a12,12,0,0,0,12-12V164h24v52a12,12,0,0,0,12,12h64a12,12,0,0,0,12-12V120A19.86,19.86,0,0,0,222.14,105.85ZM204,204H164V152a12,12,0,0,0-12-12H104a12,12,0,0,0-12,12v52H52V121.65l76-76,76,76Z"/>'),Xq=tl("house","0 0 256 256",'<path d="M224,120v96a8,8,0,0,1-8,8H160a8,8,0,0,1-8-8V164a4,4,0,0,0-4-4H108a4,4,0,0,0-4,4v52a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V120a16,16,0,0,1,4.69-11.31l80-80a16,16,0,0,1,22.62,0l80,80A16,16,0,0,1,224,120Z"/>'),Jq=tl("house","0 0 256 256",'<path d="M216,120v96H152V152H104v64H40V120a8,8,0,0,1,2.34-5.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,216,120Z" opacity="0.2"/><path d="M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z"/>'),Qq="house",eG=Object.freeze(Object.defineProperty({__proto__:null,bold:Yq,default:o_,duotone:Jq,fill:Xq,glyphName:Qq,light:Gq,regular:o_,thin:qq},Symbol.toStringTag,{value:"Module"})),il=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},tG=il("intersect","0 0 256 256",'<path d="M171.17,84.83a76,76,0,1,0-86.34,86.34,76,76,0,1,0,86.34-86.34ZM28,96A68,68,0,0,1,162.93,84.07c-1,0-2-.07-2.93-.07a76.08,76.08,0,0,0-76,76c0,1,0,2,.07,2.93A68.1,68.1,0,0,1,28,96Zm136,0a67.59,67.59,0,0,1-7.45,30.89L129.11,99.45A67.59,67.59,0,0,1,160,92c1.3,0,2.6,0,3.88.12C164,93.4,164,94.7,164,96ZM92,160a67.59,67.59,0,0,1,7.45-30.89l27.44,27.44A67.59,67.59,0,0,1,96,164c-1.3,0-2.6-.05-3.88-.12C92.05,162.6,92,161.3,92,160Zm42-7.64L103.64,122A68.74,68.74,0,0,1,122,103.64L152.36,134A68.74,68.74,0,0,1,134,152.36ZM160,228a68.1,68.1,0,0,1-66.93-56.07c1,0,2,.07,2.93.07a76.08,76.08,0,0,0,76-76c0-1,0-2-.07-2.93A68,68,0,0,1,160,228Z"/>'),iG=il("intersect","0 0 256 256",'<path d="M172.91,83.09a78,78,0,1,0-89.82,89.82,78,78,0,1,0,89.82-89.82ZM30,96A66,66,0,0,1,160.49,82H160a78.09,78.09,0,0,0-78,78c0,.17,0,.33,0,.49A66.1,66.1,0,0,1,30,96Zm64,64a65.62,65.62,0,0,1,6-27.49L123.49,156A65.62,65.62,0,0,1,96,162c-.65,0-1.3,0-2-.05C94,161.3,94,160.65,94,160Zm40.23-10.25-28-28a66.47,66.47,0,0,1,15.52-15.52l28,28A66.47,66.47,0,0,1,134.23,149.75ZM162,96a65.62,65.62,0,0,1-6,27.49L132.51,100A65.62,65.62,0,0,1,160,94c.65,0,1.3,0,1.95,0C162,94.7,162,95.35,162,96Zm-2,130a66.1,66.1,0,0,1-64.49-52H96a78.09,78.09,0,0,0,78-78c0-.17,0-.33,0-.49A66,66,0,0,1,160,226Z"/>'),c_=il("intersect","0 0 256 256",'<path d="M174.63,81.37a80,80,0,1,0-93.26,93.26,80,80,0,1,0,93.26-93.26ZM100.69,136,120,155.31A63.48,63.48,0,0,1,96,160,63.48,63.48,0,0,1,100.69,136Zm33.75,11.13-25.57-25.57a64.65,64.65,0,0,1,12.69-12.69l25.57,25.57A64.65,64.65,0,0,1,134.44,147.13ZM155.31,120,136,100.69A63.48,63.48,0,0,1,160,96,63.48,63.48,0,0,1,155.31,120ZM32,96a64,64,0,0,1,126-16A80.08,80.08,0,0,0,80.05,158,64.11,64.11,0,0,1,32,96ZM160,224A64.11,64.11,0,0,1,98,176,80.08,80.08,0,0,0,176,98,64,64,0,0,1,160,224Z"/>'),rG=il("intersect","0 0 256 256",'<path d="M178,78A84,84,0,1,0,78,178,84,84,0,1,0,178,78Zm-22.19,22.19a59.57,59.57,0,0,1-9.81,28.9L126.94,110A59.57,59.57,0,0,1,155.84,100.16Zm-79.5,52.51a60,60,0,1,1,76.33-76.33A84.11,84.11,0,0,0,76.34,152.67Zm23.82,3.17a59.57,59.57,0,0,1,9.81-28.9L129.06,146A59.57,59.57,0,0,1,100.16,155.84ZM160,220a60.09,60.09,0,0,1-56.67-40.34,84.11,84.11,0,0,0,76.33-76.33A60,60,0,0,1,160,220Z"/>'),nG=il("intersect","0 0 256 256",'<path d="M174.63,81.37a80,80,0,1,0-93.26,93.26,80,80,0,1,0,93.26-93.26ZM32,96a64,64,0,0,1,126-16A80.08,80.08,0,0,0,80.05,158,64.11,64.11,0,0,1,32,96ZM160,224A64.11,64.11,0,0,1,98,176,80.08,80.08,0,0,0,176,98,64,64,0,0,1,160,224Z"/>'),sG=il("intersect","0 0 256 256",'<path d="M168,96a72,72,0,0,1-72,72,73.37,73.37,0,0,1-7.6-.4A73.37,73.37,0,0,1,88,160a72,72,0,0,1,72-72,73.37,73.37,0,0,1,7.6.4A73.37,73.37,0,0,1,168,96Z" opacity="0.2"/><path d="M174.63,81.37a80,80,0,1,0-93.26,93.26,80,80,0,1,0,93.26-93.26ZM32,96a64,64,0,0,1,126-16A80.08,80.08,0,0,0,80.05,158,64.11,64.11,0,0,1,32,96Zm128,0a64.07,64.07,0,0,1-64,64A64.07,64.07,0,0,1,160,96Zm0,128A64.11,64.11,0,0,1,98,176,80.08,80.08,0,0,0,176,98,64,64,0,0,1,160,224Z"/>'),aG="intersect",lG=Object.freeze(Object.defineProperty({__proto__:null,bold:rG,default:c_,duotone:sG,fill:nG,glyphName:aG,light:iG,regular:c_,thin:tG},Symbol.toStringTag,{value:"Module"})),rl=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},oG=rl("lamp","0 0 256 256",'<path d="M243.68,150.42l-48-112A4,4,0,0,0,192,36H64a4,4,0,0,0-3.68,2.42l-48,112A4,4,0,0,0,16,156H124v56H96a4,4,0,0,0,0,8h64a4,4,0,0,0,0-8H132V156h64v36a4,4,0,0,0,8,0V156h36a4,4,0,0,0,3.68-5.58ZM22.07,148,66.64,44H189.36l44.57,104Z"/>'),cG=rl("lamp","0 0 256 256",'<path d="M245.51,149.64l-48-112A6,6,0,0,0,192,34H64a6,6,0,0,0-5.51,3.64l-48,112A6,6,0,0,0,16,158H122v52H96a6,6,0,0,0,0,12h64a6,6,0,0,0,0-12H134V158h60v34a6,6,0,0,0,12,0V158h34a6,6,0,0,0,5.51-8.36ZM25.1,146,68,46H188L230.9,146Z"/>'),u_=rl("lamp","0 0 256 256",'<path d="M247.35,148.85l-48-112A8,8,0,0,0,192,32H64a8,8,0,0,0-7.35,4.85l-48,112A8,8,0,0,0,16,160H120v48H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16H136V160h56v32a8,8,0,0,0,16,0V160h32a8,8,0,0,0,7.35-11.15ZM28.13,144,69.28,48H186.72l41.15,96Z"/>'),uG=rl("lamp","0 0 256 256",'<path d="M251,147.27l-48-112A12,12,0,0,0,192,28H64a12,12,0,0,0-11,7.27l-48,112A12,12,0,0,0,16,164H116v40H96a12,12,0,0,0,0,24h64a12,12,0,0,0,0-24H140V164h48v28a12,12,0,0,0,24,0V164h28a12,12,0,0,0,11-16.73ZM34.2,140,71.91,52H184.09l37.71,88Z"/>'),dG=rl("lamp","0 0 256 256",'<path d="M246.68,156.4A8,8,0,0,1,240,160H208v32a8,8,0,0,1-16,0V160H136v48h24a8,8,0,0,1,0,16H96a8,8,0,0,1,0-16h24V160H16a8,8,0,0,1-7.35-11.15l48-112A8,8,0,0,1,64,32H192a8,8,0,0,1,7.35,4.85l48,112A8,8,0,0,1,246.68,156.4Z"/>'),hG=rl("lamp","0 0 256 256",'<path d="M240,152H16L64,40H192Z" opacity="0.2"/><path d="M247.35,148.85l-48-112A8,8,0,0,0,192,32H64a8,8,0,0,0-7.35,4.85l-48,112A8,8,0,0,0,16,160H120v48H96a8,8,0,0,0,0,16h64a8,8,0,0,0,0-16H136V160h56v32a8,8,0,0,0,16,0V160h32a8,8,0,0,0,7.35-11.15ZM28.13,144,69.28,48H186.72l41.15,96Z"/>'),fG="lamp",pG=Object.freeze(Object.defineProperty({__proto__:null,bold:uG,default:u_,duotone:hG,fill:dG,glyphName:fG,light:cG,regular:u_,thin:oG},Symbol.toStringTag,{value:"Module"})),nl=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},_G=nl("lightbulb","0 0 256 256",'<path d="M172,232a4,4,0,0,1-4,4H88a4,4,0,0,1,0-8h80A4,4,0,0,1,172,232Zm40-128a83.59,83.59,0,0,1-32.11,66.06A20.2,20.2,0,0,0,172,186v6a12,12,0,0,1-12,12H96a12,12,0,0,1-12-12v-6a20,20,0,0,0-7.76-15.81A83.58,83.58,0,0,1,44,104.47C43.75,59,80.52,21.09,126,20a84,84,0,0,1,86,84Zm-8,0a76,76,0,0,0-77.83-76C85,29,51.77,63.27,52,104.43a75.62,75.62,0,0,0,29.17,59.43A28,28,0,0,1,92,186v6a4,4,0,0,0,4,4h64a4,4,0,0,0,4-4v-6a28.14,28.14,0,0,1,10.94-22.2A75.62,75.62,0,0,0,204,104ZM136.66,52.06a4,4,0,0,0-1.32,7.88C153.53,63,169,78.45,172.06,96.67A4,4,0,0,0,176,100a3.88,3.88,0,0,0,.67-.06,4,4,0,0,0,3.27-4.61A53.51,53.51,0,0,0,136.66,52.06Z"/>'),mG=nl("lightbulb","0 0 256 256",'<path d="M174,232a6,6,0,0,1-6,6H88a6,6,0,0,1,0-12h80A6,6,0,0,1,174,232Zm40-128a85.56,85.56,0,0,1-32.88,67.64A18.23,18.23,0,0,0,174,186v6a14,14,0,0,1-14,14H96a14,14,0,0,1-14-14v-6a18,18,0,0,0-7-14.23h0a85.59,85.59,0,0,1-33-67.24C41.74,57.91,79.39,19.12,125.93,18A86,86,0,0,1,214,104Zm-12,0a74,74,0,0,0-75.79-74C86.17,31,53.78,64.34,54,104.42a73.67,73.67,0,0,0,28.4,57.87A29.92,29.92,0,0,1,94,186v6a2,2,0,0,0,2,2h64a2,2,0,0,0,2-2v-6a30.18,30.18,0,0,1,11.7-23.78A73.59,73.59,0,0,0,202,104Zm-20.08-9A55.58,55.58,0,0,0,137,50.08a6,6,0,1,0-2,11.84C152.38,64.84,167.13,79.6,170.08,97a6,6,0,0,0,5.91,5,6.87,6.87,0,0,0,1-.08A6,6,0,0,0,181.92,95Z"/>'),d_=nl("lightbulb","0 0 256 256",'<path d="M176,232a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,232Zm40-128a87.55,87.55,0,0,1-33.64,69.21A16.24,16.24,0,0,0,176,186v6a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16v-6a16,16,0,0,0-6.23-12.66A87.59,87.59,0,0,1,40,104.49C39.74,56.83,78.26,17.14,125.88,16A88,88,0,0,1,216,104Zm-16,0a72,72,0,0,0-73.74-72c-39,.92-70.47,33.39-70.26,72.39a71.65,71.65,0,0,0,27.64,56.3A32,32,0,0,1,96,186v6h64v-6a32.15,32.15,0,0,1,12.47-25.35A71.65,71.65,0,0,0,200,104Zm-16.11-9.34a57.6,57.6,0,0,0-46.56-46.55,8,8,0,0,0-2.66,15.78c16.57,2.79,30.63,16.85,33.44,33.45A8,8,0,0,0,176,104a9,9,0,0,0,1.35-.11A8,8,0,0,0,183.89,94.66Z"/>'),vG=nl("lightbulb","0 0 256 256",'<path d="M180,232a12,12,0,0,1-12,12H88a12,12,0,0,1,0-24h80A12,12,0,0,1,180,232Zm40-128a91.51,91.51,0,0,1-35.17,72.35A12.26,12.26,0,0,0,180,186v2a20,20,0,0,1-20,20H96a20,20,0,0,1-20-20v-2a12,12,0,0,0-4.7-9.51A91.57,91.57,0,0,1,36,104.52C35.73,54.69,76,13.2,125.79,12A92,92,0,0,1,220,104Zm-24,0a68,68,0,0,0-69.65-68C89.56,36.88,59.8,67.55,60,104.38a67.71,67.71,0,0,0,26.1,53.19A35.87,35.87,0,0,1,100,184h56.1A36.13,36.13,0,0,1,170,157.49,67.68,67.68,0,0,0,196,104Zm-20.07-5.32a48.5,48.5,0,0,0-31.91-40,12,12,0,0,0-8,22.62,24.31,24.31,0,0,1,16.09,20,12,12,0,0,0,23.86-2.64Z"/>'),gG=nl("lightbulb","0 0 256 256",'<path d="M176,232a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,232Zm40-128a87.55,87.55,0,0,1-33.64,69.21A16.24,16.24,0,0,0,176,186v6a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16v-6a16,16,0,0,0-6.23-12.66A87.59,87.59,0,0,1,40,104.49C39.74,56.83,78.26,17.14,125.88,16A88,88,0,0,1,216,104Zm-32.11-9.34a57.6,57.6,0,0,0-46.56-46.55,8,8,0,0,0-2.66,15.78c16.57,2.79,30.63,16.85,33.44,33.45A8,8,0,0,0,176,104a9,9,0,0,0,1.35-.11A8,8,0,0,0,183.89,94.66Z"/>'),bG=nl("lightbulb","0 0 256 256",'<path d="M208,104a79.86,79.86,0,0,1-30.59,62.92A24.29,24.29,0,0,0,168,186v6a8,8,0,0,1-8,8H96a8,8,0,0,1-8-8v-6a24.11,24.11,0,0,0-9.3-19A79.87,79.87,0,0,1,48,104.45C47.76,61.09,82.72,25,126.07,24A80,80,0,0,1,208,104Z" opacity="0.2"/><path d="M176,232a8,8,0,0,1-8,8H88a8,8,0,0,1,0-16h80A8,8,0,0,1,176,232Zm40-128a87.55,87.55,0,0,1-33.64,69.21A16.24,16.24,0,0,0,176,186v6a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16v-6a16,16,0,0,0-6.23-12.66A87.59,87.59,0,0,1,40,104.49C39.74,56.83,78.26,17.14,125.88,16A88,88,0,0,1,216,104Zm-16,0a72,72,0,0,0-73.74-72c-39,.92-70.47,33.39-70.26,72.39a71.65,71.65,0,0,0,27.64,56.3A32,32,0,0,1,96,186v6h64v-6a32.15,32.15,0,0,1,12.47-25.35A71.65,71.65,0,0,0,200,104Zm-16.11-9.34a57.6,57.6,0,0,0-46.56-46.55,8,8,0,0,0-2.66,15.78c16.57,2.79,30.63,16.85,33.44,33.45A8,8,0,0,0,176,104a9,9,0,0,0,1.35-.11A8,8,0,0,0,183.89,94.66Z"/>'),yG="lightbulb",wG=Object.freeze(Object.defineProperty({__proto__:null,bold:vG,default:d_,duotone:bG,fill:gG,glyphName:yG,light:mG,regular:d_,thin:_G},Symbol.toStringTag,{value:"Module"})),sl=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},SG=sl("lightning","0 0 256 256",'<path d="M211.89,119.09a4,4,0,0,0-2.49-2.84l-60.81-22.8,15.33-76.67a4,4,0,0,0-6.84-3.51l-112,120a4,4,0,0,0-1,3.64,4,4,0,0,0,2.49,2.84l60.81,22.8L92.08,239.22a4,4,0,0,0,6.84,3.51l112-120A4,4,0,0,0,211.89,119.09ZM102.68,227l13.24-66.2a4,4,0,0,0-2.52-4.53L55,134.36,153.32,29l-13.24,66.2a4,4,0,0,0,2.52,4.53L201,121.64Z"/>'),CG=sl("lightning","0 0 256 256",'<path d="M213.84,118.63a6,6,0,0,0-3.73-4.25L150.88,92.17l15-75a6,6,0,0,0-10.27-5.27l-112,120a6,6,0,0,0,2.28,9.71l59.23,22.21-15,75a6,6,0,0,0,3.14,6.52A6.07,6.07,0,0,0,96,246a6,6,0,0,0,4.39-1.91l112-120A6,6,0,0,0,213.84,118.63ZM106,220.46l11.85-59.28a6,6,0,0,0-3.77-6.8l-55.6-20.85,91.46-98L138.12,94.82a6,6,0,0,0,3.77,6.8l55.6,20.85Z"/>'),h_=sl("lightning","0 0 256 256",'<path d="M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"/>'),kG=sl("lightning","0 0 256 256",'<path d="M219.71,117.38a12,12,0,0,0-7.25-8.52L161.28,88.39l10.59-70.61a12,12,0,0,0-20.64-10l-112,120a12,12,0,0,0,4.31,19.33l51.18,20.47L84.13,238.22a12,12,0,0,0,20.64,10l112-120A12,12,0,0,0,219.71,117.38ZM113.6,203.55l6.27-41.77a12,12,0,0,0-7.41-12.92L68.74,131.37,142.4,52.45l-6.27,41.77a12,12,0,0,0,7.41,12.92l43.72,17.49Z"/>'),AG=sl("lightning","0 0 256 256",'<path d="M213.85,125.46l-112,120a8,8,0,0,1-13.69-7l14.66-73.33L45.19,143.49a8,8,0,0,1-3-13l112-120a8,8,0,0,1,13.69,7L153.18,90.9l57.63,21.61a8,8,0,0,1,3,12.95Z"/>'),MG=sl("lightning","0 0 256 256",'<path d="M96,240l16-80L48,136,160,16,144,96l64,24Z" opacity="0.2"/><path d="M215.79,118.17a8,8,0,0,0-5-5.66L153.18,90.9l14.66-73.33a8,8,0,0,0-13.69-7l-112,120a8,8,0,0,0,3,13l57.63,21.61L88.16,238.43a8,8,0,0,0,13.69,7l112-120A8,8,0,0,0,215.79,118.17ZM109.37,214l10.47-52.38a8,8,0,0,0-5-9.06L62,132.71l84.62-90.66L136.16,94.43a8,8,0,0,0,5,9.06l52.8,19.8Z"/>'),EG="lightning",LG=Object.freeze(Object.defineProperty({__proto__:null,bold:kG,default:h_,duotone:MG,fill:AG,glyphName:EG,light:CG,regular:h_,thin:SG},Symbol.toStringTag,{value:"Module"})),al=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},$G=al("lock","0 0 256 256",'<path d="M208,84H172V56a44,44,0,0,0-88,0V84H48A12,12,0,0,0,36,96V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V96A12,12,0,0,0,208,84ZM92,56a36,36,0,0,1,72,0V84H92ZM212,208a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V96a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Zm-76-56a8,8,0,1,1-8-8A8,8,0,0,1,136,152Z"/>'),xG=al("lock","0 0 256 256",'<path d="M208,82H174V56a46,46,0,0,0-92,0V82H48A14,14,0,0,0,34,96V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V96A14,14,0,0,0,208,82ZM94,56a34,34,0,0,1,68,0V82H94ZM210,208a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V96a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Zm-72-56a10,10,0,1,1-10-10A10,10,0,0,1,138,152Z"/>'),f_=al("lock","0 0 256 256",'<path d="M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z"/>'),TG=al("lock","0 0 256 256",'<path d="M208,76H180V56A52,52,0,0,0,76,56V76H48A20,20,0,0,0,28,96V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V96A20,20,0,0,0,208,76ZM100,56a28,28,0,0,1,56,0V76H100ZM204,204H52V100H204Zm-60-52a16,16,0,1,1-16-16A16,16,0,0,1,144,152Z"/>'),HG=al("lock","0 0 256 256",'<path d="M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80Zm-80,84a12,12,0,1,1,12-12A12,12,0,0,1,128,164Zm32-84H96V56a32,32,0,0,1,64,0Z"/>'),NG=al("lock","0 0 256 256",'<path d="M216,96V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8H208A8,8,0,0,1,216,96Z" opacity="0.2"/><path d="M208,80H176V56a48,48,0,0,0-96,0V80H48A16,16,0,0,0,32,96V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V96A16,16,0,0,0,208,80ZM96,56a32,32,0,0,1,64,0V80H96ZM208,208H48V96H208V208Zm-68-56a12,12,0,1,1-12-12A12,12,0,0,1,140,152Z"/>'),PG="lock",OG=Object.freeze(Object.defineProperty({__proto__:null,bold:TG,default:f_,duotone:NG,fill:HG,glyphName:PG,light:xG,regular:f_,thin:$G},Symbol.toStringTag,{value:"Module"})),ll=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},RG=ll("plugs","0 0 256 256",'<path d="M146.83,141.17a4,4,0,0,0-5.66,0L120,162.34,93.66,136l21.17-21.17a4,4,0,0,0-5.66-5.66L88,130.34,66.83,109.17a4,4,0,0,0-5.66,5.66L70.34,124,44.2,150.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L58.06,203.6l8.2,8.2a28,28,0,0,0,39.6,0L132,185.66l9.17,9.17a4,4,0,0,0,5.66-5.66L125.66,168l21.17-21.17A4,4,0,0,0,146.83,141.17Zm-46.63,65a20,20,0,0,1-28.28,0L49.86,184.08a20,20,0,0,1,0-28.28L76,129.66,126.34,180Zm134.63-185a4,4,0,0,0-5.66,0L197.94,52.4l-8.2-8.2a28,28,0,0,0-39.6,0L124,70.34l-9.17-9.17a4,4,0,0,0-5.66,5.66l80,80a4,4,0,0,0,5.66-5.66L185.66,132l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,31.23-31.23A4,4,0,0,0,234.83,21.17ZM212,86.06a19.86,19.86,0,0,1-5.86,14.14L180,126.34,129.66,76,155.8,49.86a20,20,0,0,1,28.28,0l22.06,22.06A19.85,19.85,0,0,1,212,86.06Z"/>'),IG=ll("plugs","0 0 256 256",'<path d="M148.24,139.76a6,6,0,0,0-8.48,0L120,159.51,96.49,136l19.75-19.76a6,6,0,0,0-8.48-8.48L88,127.51,68.24,107.76a6,6,0,0,0-8.48,8.48L67.51,124,42.79,148.73a30,30,0,0,0,0,42.42l6.78,6.79L19.76,227.76a6,6,0,1,0,8.48,8.48l29.82-29.81,6.79,6.78a30,30,0,0,0,42.42,0L132,188.49l7.76,7.75a6,6,0,0,0,8.48-8.48L128.49,168l19.75-19.76A6,6,0,0,0,148.24,139.76Zm-49.45,65a18,18,0,0,1-25.46,0L51.27,182.67a18,18,0,0,1,0-25.46L76,132.49,123.51,180Zm137.45-185a6,6,0,0,0-8.48,0L197.94,49.57l-6.79-6.78a30,30,0,0,0-42.42,0L124,67.51l-7.76-7.75a6,6,0,0,0-8.48,8.48l80,80a6,6,0,0,0,8.48-8.48L188.49,132l24.72-24.73a30,30,0,0,0,0-42.42l-6.78-6.79,29.81-29.82A6,6,0,0,0,236.24,19.76Zm-31.51,79L180,123.51,132.49,76l24.72-24.73a18,18,0,0,1,25.46,0l22.06,22.06a18,18,0,0,1,0,25.46Z"/>'),p_=ll("plugs","0 0 256 256",'<path d="M149.66,138.34a8,8,0,0,0-11.32,0L120,156.69,99.31,136l18.35-18.34a8,8,0,0,0-11.32-11.32L88,124.69,69.66,106.34a8,8,0,0,0-11.32,11.32L64.69,124,41.37,147.31a32,32,0,0,0,0,45.26l5.38,5.37-28.41,28.4a8,8,0,0,0,11.32,11.32l28.4-28.41,5.37,5.38a32,32,0,0,0,45.26,0L132,191.31l6.34,6.35a8,8,0,0,0,11.32-11.32L131.31,168l18.35-18.34A8,8,0,0,0,149.66,138.34Zm-52.29,65a16,16,0,0,1-22.62,0L52.69,181.25a16,16,0,0,1,0-22.62L76,135.31,120.69,180Zm140.29-185a8,8,0,0,0-11.32,0l-28.4,28.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L124,64.69l-6.34-6.35a8,8,0,0,0-11.32,11.32l80,80a8,8,0,0,0,11.32-11.32L191.31,132l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,28.41-28.4A8,8,0,0,0,237.66,18.34Zm-34.35,79L180,120.69,135.31,76l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22A16,16,0,0,1,203.31,97.37Z"/>'),DG=ll("plugs","0 0 256 256",'<path d="M137,168l11.52-11.51a12,12,0,0,0-17-17L120,151l-15-15,11.52-11.51a12,12,0,0,0-17-17L88,119,72.49,103.51a12,12,0,0,0-17,17L59,124,38.54,144.49a36,36,0,0,0,0,50.91l2.55,2.54L15.51,223.51a12,12,0,0,0,17,17l25.57-25.58,2.54,2.55a36.06,36.06,0,0,0,50.91,0L132,197l3.51,3.52a12,12,0,0,0,17-17ZM94.54,200.49a12,12,0,0,1-17,0L55.51,178.43a12,12,0,0,1,0-17L76,141l39,39Zm146-185a12,12,0,0,0-17,0L197.94,41.09l-2.54-2.55a36.05,36.05,0,0,0-50.91,0L124,59l-3.51-3.52a12,12,0,0,0-17,17l80,80a12,12,0,0,0,17-17L197,132l20.49-20.49a36,36,0,0,0,0-50.91l-2.55-2.54,25.58-25.57A12,12,0,0,0,240.49,15.51Zm-40,79L180,115,141,76l20.49-20.49a12,12,0,0,1,17,0l22.06,22.06a12,12,0,0,1,0,17Z"/>'),VG=ll("plugs","0 0 256 256",'<path d="M149.66,149.66,131.31,168l18.35,18.34a8,8,0,0,1-11.32,11.32L132,191.31l-23.31,23.32a32.06,32.06,0,0,1-45.26,0l-5.37-5.38-28.4,28.41a8,8,0,0,1-11.32-11.32l28.41-28.4-5.38-5.37a32,32,0,0,1,0-45.26L64.69,124l-6.35-6.34a8,8,0,0,1,11.32-11.32L88,124.69l18.34-18.35a8,8,0,0,1,11.32,11.32L99.31,136,120,156.69l18.34-18.35a8,8,0,0,1,11.32,11.32Zm88-131.32a8,8,0,0,0-11.32,0l-28.4,28.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L124,64.69l-6.34-6.35a8,8,0,0,0-11.32,11.32l80,80a8,8,0,0,0,11.32-11.32L191.31,132l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,28.41-28.4A8,8,0,0,0,237.66,18.34Z"/>'),ZG=ll("plugs","0 0 256 256",'<path d="M76,124l56,56-29,29a24,24,0,0,1-33.94,0L47,186.91A24,24,0,0,1,47,153ZM209,69.09,186.91,47A24,24,0,0,0,153,47L124,76l56,56,29-29A24,24,0,0,0,209,69.09Z" opacity="0.2"/><path d="M149.66,138.34a8,8,0,0,0-11.32,0L120,156.69,99.31,136l18.35-18.34a8,8,0,0,0-11.32-11.32L88,124.69,69.66,106.34a8,8,0,0,0-11.32,11.32L64.69,124,41.37,147.31a32,32,0,0,0,0,45.26l5.38,5.37-28.41,28.4a8,8,0,0,0,11.32,11.32l28.4-28.41,5.37,5.38a32,32,0,0,0,45.26,0L132,191.31l6.34,6.35a8,8,0,0,0,11.32-11.32L131.31,168l18.35-18.34A8,8,0,0,0,149.66,138.34Zm-52.29,65a16,16,0,0,1-22.62,0L52.69,181.25a16,16,0,0,1,0-22.62L76,135.31,120.69,180Zm140.29-185a8,8,0,0,0-11.32,0l-28.4,28.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L124,64.69l-6.34-6.35a8,8,0,0,0-11.32,11.32l80,80a8,8,0,0,0,11.32-11.32L191.31,132l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,28.41-28.4A8,8,0,0,0,237.66,18.34Zm-34.35,79L180,120.69,135.31,76l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22A16,16,0,0,1,203.31,97.37Z"/>'),BG="plugs",FG=Object.freeze(Object.defineProperty({__proto__:null,bold:DG,default:p_,duotone:ZG,fill:VG,glyphName:BG,light:IG,regular:p_,thin:RG},Symbol.toStringTag,{value:"Module"})),ol=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},zG=ol("rows","0 0 256 256",'<path d="M208,140H48a12,12,0,0,0-12,12v40a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V152A12,12,0,0,0,208,140Zm4,52a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V152a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4ZM208,52H48A12,12,0,0,0,36,64v40a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V64A12,12,0,0,0,208,52Zm4,52a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V64a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z"/>'),UG=ol("rows","0 0 256 256",'<path d="M208,138H48a14,14,0,0,0-14,14v40a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V152A14,14,0,0,0,208,138Zm2,54a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V152a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2ZM208,50H48A14,14,0,0,0,34,64v40a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V64A14,14,0,0,0,208,50Zm2,54a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V64a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z"/>'),__=ol("rows","0 0 256 256",'<path d="M208,136H48a16,16,0,0,0-16,16v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V152A16,16,0,0,0,208,136Zm0,56H48V152H208v40Zm0-144H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Zm0,56H48V64H208v40Z"/>'),WG=ol("rows","0 0 256 256",'<path d="M208,136H48a20,20,0,0,0-20,20v36a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V156A20,20,0,0,0,208,136Zm-4,52H52V160H204Zm4-144H48A20,20,0,0,0,28,64v36a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V64A20,20,0,0,0,208,44Zm-4,52H52V68H204Z"/>'),jG=ol("rows","0 0 256 256",'<path d="M224,152v40a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V152a16,16,0,0,1,16-16H208A16,16,0,0,1,224,152ZM208,48H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Z"/>'),KG=ol("rows","0 0 256 256",'<path d="M216,152v40a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V152a8,8,0,0,1,8-8H208A8,8,0,0,1,216,152Zm-8-96H48a8,8,0,0,0-8,8v40a8,8,0,0,0,8,8H208a8,8,0,0,0,8-8V64A8,8,0,0,0,208,56Z" opacity="0.2"/><path d="M208,136H48a16,16,0,0,0-16,16v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V152A16,16,0,0,0,208,136Zm0,56H48V152H208v40Zm0-144H48A16,16,0,0,0,32,64v40a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V64A16,16,0,0,0,208,48Zm0,56H48V64H208v40Z"/>'),qG="rows",GG=Object.freeze(Object.defineProperty({__proto__:null,bold:WG,default:__,duotone:KG,fill:jG,glyphName:qG,light:UG,regular:__,thin:zG},Symbol.toStringTag,{value:"Module"})),cl=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},YG=cl("shield","0 0 256 256",'<path d="M208,44H48A12,12,0,0,0,36,56v56c0,51.16,24.73,82.12,45.47,99.1,22.4,18.32,44.55,24.5,45.48,24.76a4,4,0,0,0,2.1,0c.93-.26,23.08-6.44,45.48-24.76,20.74-17,45.47-47.94,45.47-99.1V56A12,12,0,0,0,208,44Zm4,68c0,38.44-14.23,69.63-42.29,92.71A132.45,132.45,0,0,1,128,227.82a132.23,132.23,0,0,1-41.71-23.11C58.23,181.63,44,150.44,44,112V56a4,4,0,0,1,4-4H208a4,4,0,0,1,4,4Z"/>'),XG=cl("shield","0 0 256 256",'<path d="M208,42H48A14,14,0,0,0,34,56v56c0,51.94,25.12,83.4,46.2,100.64,22.73,18.6,45.27,24.89,46.22,25.15a6,6,0,0,0,3.16,0c.95-.26,23.49-6.55,46.22-25.15C196.88,195.4,222,163.94,222,112V56A14,14,0,0,0,208,42Zm2,70c0,37.76-13.94,68.39-41.44,91.06A131.17,131.17,0,0,1,128,225.72a130.94,130.94,0,0,1-40.56-22.66C59.94,180.39,46,149.76,46,112V56a2,2,0,0,1,2-2H208a2,2,0,0,1,2,2Z"/>'),m_=cl("shield","0 0 256 256",'<path d="M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.27,47,25.53a8,8,0,0,0,4.2,0c1-.26,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0Z"/>'),JG=cl("shield","0 0 256 256",'<path d="M208,36H48A20,20,0,0,0,28,56v56c0,54.29,26.32,87.22,48.4,105.29,23.71,19.39,47.44,26,48.44,26.29a12.1,12.1,0,0,0,6.32,0c1-.28,24.73-6.9,48.44-26.29,22.08-18.07,48.4-51,48.4-105.29V56A20,20,0,0,0,208,36Zm-4,76c0,35.71-13.09,64.69-38.91,86.15A126.28,126.28,0,0,1,128,219.38a126.14,126.14,0,0,1-37.09-21.23C65.09,176.69,52,147.71,52,112V60H204Z"/>'),QG=cl("shield","0 0 256 256",'<path d="M224,56v56c0,52.72-25.52,84.67-46.93,102.19-23.06,18.86-46,25.27-47,25.53a8,8,0,0,1-4.2,0c-1-.26-23.91-6.67-47-25.53C57.52,196.67,32,164.72,32,112V56A16,16,0,0,1,48,40H208A16,16,0,0,1,224,56Z"/>'),eY=cl("shield","0 0 256 256",'<path d="M216,56v56c0,96-88,120-88,120S40,208,40,112V56a8,8,0,0,1,8-8H208A8,8,0,0,1,216,56Z" opacity="0.2"/><path d="M208,40H48A16,16,0,0,0,32,56v56c0,52.72,25.52,84.67,46.93,102.19,23.06,18.86,46,25.27,47,25.53a8,8,0,0,0,4.2,0c1-.26,23.91-6.67,47-25.53C198.48,196.67,224,164.72,224,112V56A16,16,0,0,0,208,40Zm0,72c0,37.07-13.66,67.16-40.6,89.42A129.3,129.3,0,0,1,128,223.62a128.25,128.25,0,0,1-38.92-21.81C61.82,179.51,48,149.3,48,112l0-56,160,0Z"/>'),tY="shield",iY=Object.freeze(Object.defineProperty({__proto__:null,bold:JG,default:m_,duotone:eY,fill:QG,glyphName:tY,light:XG,regular:m_,thin:YG},Symbol.toStringTag,{value:"Module"})),ul=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},rY=ul("sliders","0 0 256 256",'<path d="M60,108.29V40a4,4,0,0,0-8,0v68.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V163.71a28,28,0,0,0,0-55.42ZM56,156a20,20,0,1,1,20-20A20,20,0,0,1,56,156Zm76-95.71V40a4,4,0,0,0-8,0V60.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V115.71a28,28,0,0,0,0-55.42ZM128,108a20,20,0,1,1,20-20A20,20,0,0,1,128,108Zm100,60a28,28,0,0,0-24-27.71V40a4,4,0,0,0-8,0V140.29a28,28,0,0,0,0,55.42V216a4,4,0,0,0,8,0V195.71A28,28,0,0,0,228,168Zm-28,20a20,20,0,1,1,20-20A20,20,0,0,1,200,188Z"/>'),nY=ul("sliders","0 0 256 256",'<path d="M62,106.6V40a6,6,0,0,0-12,0v66.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V165.4a30,30,0,0,0,0-58.8ZM56,154a18,18,0,1,1,18-18A18,18,0,0,1,56,154Zm78-95.4V40a6,6,0,0,0-12,0V58.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V117.4a30,30,0,0,0,0-58.8ZM128,106a18,18,0,1,1,18-18A18,18,0,0,1,128,106Zm102,62a30.05,30.05,0,0,0-24-29.4V40a6,6,0,0,0-12,0v98.6a30,30,0,0,0,0,58.8V216a6,6,0,0,0,12,0V197.4A30.05,30.05,0,0,0,230,168Zm-30,18a18,18,0,1,1,18-18A18,18,0,0,1,200,186Z"/>'),v_=ul("sliders","0 0 256 256",'<path d="M64,105V40a8,8,0,0,0-16,0v65a32,32,0,0,0,0,62v49a8,8,0,0,0,16,0V167a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,56,152Zm80-95V40a8,8,0,0,0-16,0V57a32,32,0,0,0,0,62v97a8,8,0,0,0,16,0V119a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,128,104Zm104,64a32.06,32.06,0,0,0-24-31V40a8,8,0,0,0-16,0v97a32,32,0,0,0,0,62v17a8,8,0,0,0,16,0V199A32.06,32.06,0,0,0,232,168Zm-32,16a16,16,0,1,1,16-16A16,16,0,0,1,200,184Z"/>'),sY=ul("sliders","0 0 256 256",'<path d="M68,102.06V40a12,12,0,0,0-24,0v62.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V169.94a36,36,0,0,0,0-67.88ZM56,148a12,12,0,1,1,12-12A12,12,0,0,1,56,148ZM164,88a36.07,36.07,0,0,0-24-33.94V40a12,12,0,0,0-24,0V54.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V121.94A36.07,36.07,0,0,0,164,88Zm-36,12a12,12,0,1,1,12-12A12,12,0,0,1,128,100Zm108,68a36.07,36.07,0,0,0-24-33.94V40a12,12,0,0,0-24,0v94.06a36,36,0,0,0,0,67.88V216a12,12,0,0,0,24,0V201.94A36.07,36.07,0,0,0,236,168Zm-36,12a12,12,0,1,1,12-12A12,12,0,0,1,200,180Z"/>'),aY=ul("sliders","0 0 256 256",'<path d="M84,136a28,28,0,0,1-20,26.83V216a8,8,0,0,1-16,0V162.83a28,28,0,0,1,0-53.66V40a8,8,0,0,1,16,0v69.17A28,28,0,0,1,84,136Zm52-74.83V40a8,8,0,0,0-16,0V61.17a28,28,0,0,0,0,53.66V216a8,8,0,0,0,16,0V114.83a28,28,0,0,0,0-53.66Zm72,80V40a8,8,0,0,0-16,0V141.17a28,28,0,0,0,0,53.66V216a8,8,0,0,0,16,0V194.83a28,28,0,0,0,0-53.66Z"/>'),lY=ul("sliders","0 0 256 256",'<path d="M80,136a24,24,0,1,1-24-24A24,24,0,0,1,80,136Zm48-72a24,24,0,1,0,24,24A24,24,0,0,0,128,64Zm72,80a24,24,0,1,0,24,24A24,24,0,0,0,200,144Z" opacity="0.2"/><path d="M64,105V40a8,8,0,0,0-16,0v65a32,32,0,0,0,0,62v49a8,8,0,0,0,16,0V167a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,56,152Zm80-95V40a8,8,0,0,0-16,0V57a32,32,0,0,0,0,62v97a8,8,0,0,0,16,0V119a32,32,0,0,0,0-62Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,128,104Zm104,64a32.06,32.06,0,0,0-24-31V40a8,8,0,0,0-16,0v97a32,32,0,0,0,0,62v17a8,8,0,0,0,16,0V199A32.06,32.06,0,0,0,232,168Zm-32,16a16,16,0,1,1,16-16A16,16,0,0,1,200,184Z"/>'),oY="sliders",cY=Object.freeze(Object.defineProperty({__proto__:null,bold:sY,default:v_,duotone:lY,fill:aY,glyphName:oY,light:nY,regular:v_,thin:rY},Symbol.toStringTag,{value:"Module"})),dl=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},uY=dl("snowflake","0 0 256 256",'<path d="M219.88,151.05a4,4,0,0,1-2.93,4.83l-28.6,7L195.86,191a4,4,0,0,1-2.83,4.9,3.65,3.65,0,0,1-1,.14,4,4,0,0,1-3.86-3L180,162.64l-48-27.71v55.41l22.83,22.83a4,4,0,0,1-5.66,5.66L128,197.66l-21.17,21.17a4,4,0,0,1-5.66-5.66L124,190.34V134.93L76,162.64,67.86,193A4,4,0,0,1,64,196a3.65,3.65,0,0,1-1-.14,4,4,0,0,1-2.83-4.9l7.51-28.05-28.6-7A4,4,0,1,1,41,148.12l31,7.61L120,128,72,100.27l-31,7.61a4.07,4.07,0,0,1-1,.12,4,4,0,0,1-1-7.88l28.6-7L60.14,65A4,4,0,0,1,67.86,63L76,93.36l48,27.71V65.66L101.17,42.83a4,4,0,0,1,5.66-5.66L128,58.34l21.17-21.17a4,4,0,1,1,5.66,5.66L132,65.66v55.41l48-27.71L188.14,63A4,4,0,0,1,195.86,65l-7.51,28.05,28.6,7A4,4,0,0,1,216,108a4.07,4.07,0,0,1-1-.12l-31-7.61L136,128l48,27.73,31-7.61A4,4,0,0,1,219.88,151.05Z"/>'),dY=dl("snowflake","0 0 256 256",'<path d="M221.83,150.57a6,6,0,0,1-4.4,7.26l-26.62,6.54,7,26.08a6,6,0,0,1-4.24,7.35,6.4,6.4,0,0,1-1.55.2,6,6,0,0,1-5.8-4.45L178.27,164,134,138.39v51.13l22.24,22.24a6,6,0,1,1-8.48,8.48L128,200.49l-19.76,19.75a6,6,0,0,1-8.48-8.48L122,189.52V138.39L77.73,164l-7.93,29.6A6,6,0,0,1,64,198a6.4,6.4,0,0,1-1.55-.2,6,6,0,0,1-4.24-7.35l7-26.08-26.62-6.54a6,6,0,0,1,2.86-11.66l30.23,7.43L116,128,71.66,102.4l-30.23,7.43A5.88,5.88,0,0,1,40,110a6,6,0,0,1-1.43-11.83l26.62-6.54-7-26.08a6,6,0,1,1,11.59-3.1l7.93,29.6L122,117.61V66.48L99.76,44.24a6,6,0,0,1,8.48-8.48L128,55.51l19.76-19.75a6,6,0,0,1,8.48,8.48L134,66.48v51.13l44.27-25.56,7.93-29.6a6,6,0,1,1,11.59,3.1l-7,26.08,26.62,6.54A6,6,0,0,1,216,110a5.88,5.88,0,0,1-1.43-.17l-30.23-7.43L140,128l44.34,25.6,30.23-7.43A6,6,0,0,1,221.83,150.57Z"/>'),g_=dl("snowflake","0 0 256 256",'<path d="M223.77,150.09a8,8,0,0,1-5.86,9.68l-24.64,6,6.46,24.11a8,8,0,0,1-5.66,9.8A8.25,8.25,0,0,1,192,200a8,8,0,0,1-7.72-5.93l-7.72-28.8L136,141.86v46.83l21.66,21.65a8,8,0,0,1-11.32,11.32L128,203.31l-18.34,18.35a8,8,0,0,1-11.32-11.32L120,188.69V141.86L79.45,165.27l-7.72,28.8A8,8,0,0,1,64,200a8.25,8.25,0,0,1-2.08-.27,8,8,0,0,1-5.66-9.8l6.46-24.11-24.64-6a8,8,0,0,1,3.82-15.54l29.45,7.23L112,128,71.36,104.54l-29.45,7.23A7.85,7.85,0,0,1,40,112a8,8,0,0,1-1.91-15.77l24.64-6L56.27,66.07a8,8,0,0,1,15.46-4.14l7.72,28.8L120,114.14V67.31L98.34,45.66a8,8,0,0,1,11.32-11.32L128,52.69l18.34-18.35a8,8,0,0,1,11.32,11.32L136,67.31v46.83l40.55-23.41,7.72-28.8a8,8,0,0,1,15.46,4.14l-6.46,24.11,24.64,6A8,8,0,0,1,216,112a7.85,7.85,0,0,1-1.91-.23l-29.45-7.23L144,128l40.64,23.46,29.45-7.23A8,8,0,0,1,223.77,150.09Z"/>'),hY=dl("snowflake","0 0 256 256",'<path d="M227.65,149.14a12,12,0,0,1-8.79,14.51l-20.67,5.08,5.4,20.16a12,12,0,0,1-23.18,6.22l-7.29-27.2L140,148.78V187l20.48,20.48a12,12,0,0,1-17,17L128,209l-15.51,15.52a12,12,0,0,1-17-17L116,187V148.78L82.88,167.91l-7.29,27.2a12,12,0,0,1-23.18-6.22l5.4-20.16-20.67-5.08a12,12,0,1,1,5.72-23.3l27.89,6.85L104,128,70.75,108.8l-27.89,6.85A11.8,11.8,0,0,1,40,116a12,12,0,0,1-2.85-23.65l20.67-5.08-5.4-20.16a12,12,0,0,1,23.18-6.22l7.29,27.2L116,107.21V69L95.52,48.48a12,12,0,0,1,17-17L128,47l15.51-15.52a12,12,0,1,1,17,17L140,69v38.24l33.12-19.12,7.29-27.2a12,12,0,0,1,23.18,6.22l-5.4,20.16,20.67,5.08A12,12,0,0,1,216,116a11.8,11.8,0,0,1-2.87-.35l-27.89-6.85L152,128l33.25,19.2,27.89-6.85A12,12,0,0,1,227.65,149.14Z"/>'),fY=dl("snowflake","0 0 256 256",'<path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm42.37,119.22,18.94-6.76a8,8,0,1,1,5.38,15.08l-15.48,5.52,4.52,16.87a8,8,0,0,1-5.66,9.8A8.23,8.23,0,0,1,176,184a8,8,0,0,1-7.73-5.93l-5.57-20.8L136,141.86v30.83l13.66,13.65a8,8,0,0,1-11.32,11.32L128,187.31l-10.34,10.35a8,8,0,0,1-11.32-11.32L120,172.69V141.86L93.3,157.27l-5.57,20.8A8,8,0,0,1,80,184a8.23,8.23,0,0,1-2.07-.27,8,8,0,0,1-5.66-9.8l4.52-16.87-15.48-5.52a8,8,0,0,1,5.38-15.08l18.94,6.76L112,128,85.63,112.78l-18.94,6.76A8.18,8.18,0,0,1,64,120a8,8,0,0,1-2.69-15.54l15.48-5.52L72.27,82.07a8,8,0,0,1,15.46-4.14l5.57,20.8L120,114.14V83.31L106.34,69.66a8,8,0,0,1,11.32-11.32L128,68.69l10.34-10.35a8,8,0,0,1,11.32,11.32L136,83.31v30.83l26.7-15.41,5.57-20.8a8,8,0,0,1,15.46,4.14l-4.52,16.87,15.48,5.52A8,8,0,0,1,192,120a8.18,8.18,0,0,1-2.69-.46l-18.94-6.76L144,128Z"/>'),pY=dl("snowflake","0 0 256 256",'<path d="M220,128a92,92,0,1,1-92-92A92.1,92.1,0,0,1,220,128Z" opacity="0.2"/><path d="M223.77,150.09a8,8,0,0,1-5.86,9.68l-24.64,6,6.46,24.11a8,8,0,0,1-5.66,9.8A8.25,8.25,0,0,1,192,200a8,8,0,0,1-7.72-5.93l-7.72-28.8L136,141.86v46.83l21.66,21.65a8,8,0,0,1-11.32,11.32L128,203.31l-18.34,18.35a8,8,0,0,1-11.32-11.32L120,188.69V141.86L79.45,165.27l-7.72,28.8A8,8,0,0,1,64,200a8.25,8.25,0,0,1-2.08-.27,8,8,0,0,1-5.66-9.8l6.46-24.11-24.64-6a8,8,0,0,1,3.82-15.54l29.45,7.23L112,128,71.36,104.54l-29.45,7.23A7.85,7.85,0,0,1,40,112a8,8,0,0,1-1.91-15.77l24.64-6L56.27,66.07a8,8,0,0,1,15.46-4.14l7.72,28.8L120,114.14V67.31L98.34,45.66a8,8,0,0,1,11.32-11.32L128,52.69l18.34-18.35a8,8,0,0,1,11.32,11.32L136,67.31v46.83l40.55-23.41,7.72-28.8a8,8,0,0,1,15.46,4.14l-6.46,24.11,24.64,6A8,8,0,0,1,216,112a7.85,7.85,0,0,1-1.91-.23l-29.45-7.23L144,128l40.64,23.46,29.45-7.23A8,8,0,0,1,223.77,150.09Z"/>'),_Y="snowflake",mY=Object.freeze(Object.defineProperty({__proto__:null,bold:hY,default:g_,duotone:pY,fill:fY,glyphName:_Y,light:dY,regular:g_,thin:uY},Symbol.toStringTag,{value:"Module"})),hl=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},vY=hl("speaker-hifi","0 0 256 256",'<path d="M192,28H64A12,12,0,0,0,52,40V216a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V40A12,12,0,0,0,192,28Zm4,188a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4H192a4,4,0,0,1,4,4ZM120,76a8,8,0,1,1,8,8A8,8,0,0,1,120,76Zm8,40a36,36,0,1,0,36,36A36,36,0,0,0,128,116Zm0,64a28,28,0,1,1,28-28A28,28,0,0,1,128,180Z"/>'),gY=hl("speaker-hifi","0 0 256 256",'<path d="M192,26H64A14,14,0,0,0,50,40V216a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V40A14,14,0,0,0,192,26Zm2,190a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2H192a2,2,0,0,1,2,2ZM118,76a10,10,0,1,1,10,10A10,10,0,0,1,118,76Zm10,38a38,38,0,1,0,38,38A38,38,0,0,0,128,114Zm0,64a26,26,0,1,1,26-26A26,26,0,0,1,128,178Z"/>'),b_=hl("speaker-hifi","0 0 256 256",'<path d="M192,24H64A16,16,0,0,0,48,40V216a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V40A16,16,0,0,0,192,24Zm0,192H64V40H192ZM116,76a12,12,0,1,1,12,12A12,12,0,0,1,116,76Zm12,116a40,40,0,1,0-40-40A40,40,0,0,0,128,192Zm0-64a24,24,0,1,1-24,24A24,24,0,0,1,128,128Z"/>'),bY=hl("speaker-hifi","0 0 256 256",'<path d="M192,20H64A20,20,0,0,0,44,40V216a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V40A20,20,0,0,0,192,20Zm-4,192H68V44H188ZM112,76a16,16,0,1,1,16,16A16,16,0,0,1,112,76Zm16,120a44,44,0,1,0-44-44A44.05,44.05,0,0,0,128,196Zm0-64a20,20,0,1,1-20,20A20,20,0,0,1,128,132Z"/>'),yY=hl("speaker-hifi","0 0 256 256",'<path d="M152,160a24,24,0,1,1-24-24A24,24,0,0,1,152,160ZM208,40V216a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V40A16,16,0,0,1,64,24H192A16,16,0,0,1,208,40ZM116,68a12,12,0,1,0,12-12A12,12,0,0,0,116,68Zm52,92a40,40,0,1,0-40,40A40,40,0,0,0,168,160Z"/>'),wY=hl("speaker-hifi","0 0 256 256",'<path d="M192,32H64a8,8,0,0,0-8,8V216a8,8,0,0,0,8,8H192a8,8,0,0,0,8-8V40A8,8,0,0,0,192,32ZM128,184a32,32,0,1,1,32-32A32,32,0,0,1,128,184Z" opacity="0.2"/><path d="M192,24H64A16,16,0,0,0,48,40V216a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V40A16,16,0,0,0,192,24Zm0,192H64V40H192ZM116,76a12,12,0,1,1,12,12A12,12,0,0,1,116,76Zm12,116a40,40,0,1,0-40-40A40,40,0,0,0,128,192Zm0-64a24,24,0,1,1-24,24A24,24,0,0,1,128,128Z"/>'),SY="speaker-hifi",CY=Object.freeze(Object.defineProperty({__proto__:null,bold:bY,default:b_,duotone:wY,fill:yY,glyphName:SY,light:gY,regular:b_,thin:vY},Symbol.toStringTag,{value:"Module"})),fl=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},kY=fl("speaker-high","0 0 256 256",'<path d="M153.76,28.41a4,4,0,0,0-4.22.43L78.63,84H32A12,12,0,0,0,20,96v64a12,12,0,0,0,12,12H78.63l70.91,55.16A4.07,4.07,0,0,0,152,228a3.92,3.92,0,0,0,1.76-.41A4,4,0,0,0,156,224V32A4,4,0,0,0,153.76,28.41ZM28,160V96a4,4,0,0,1,4-4H76v72H32A4,4,0,0,1,28,160Zm120,55.82L84,166V90l64-49.78Zm47-111.61a36,36,0,0,1,0,47.59,4,4,0,1,1-6-5.3,28,28,0,0,0,0-37,4,4,0,0,1,6-5.28ZM244,128a75.88,75.88,0,0,1-19.35,50.67,4,4,0,0,1-6-5.34,68,68,0,0,0,0-90.66,4,4,0,0,1,6-5.34A75.88,75.88,0,0,1,244,128Z"/>'),AY=fl("speaker-high","0 0 256 256",'<path d="M154.64,26.61a6,6,0,0,0-6.32.65L77.94,82H32A14,14,0,0,0,18,96v64a14,14,0,0,0,14,14H77.94l70.38,54.74A6,6,0,0,0,158,224V32A6,6,0,0,0,154.64,26.61ZM30,160V96a2,2,0,0,1,2-2H74v68H32A2,2,0,0,1,30,160Zm116,51.73L86,165.07V90.93l60-46.66Zm50.53-108.85a38,38,0,0,1,0,50.24,6,6,0,1,1-9-7.94,26,26,0,0,0,0-34.37,6,6,0,0,1,9-7.93ZM246,128a77.86,77.86,0,0,1-19.86,52,6,6,0,1,1-8.94-8,66,66,0,0,0,0-88,6,6,0,1,1,8.94-8A77.86,77.86,0,0,1,246,128Z"/>'),y_=fl("speaker-high","0 0 256 256",'<path d="M155.51,24.81a8,8,0,0,0-8.42.88L77.25,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H77.25l69.84,54.31A8,8,0,0,0,160,224V32A8,8,0,0,0,155.51,24.81ZM32,96H72v64H32ZM144,207.64,88,164.09V91.91l56-43.55Zm54-106.08a40,40,0,0,1,0,52.88,8,8,0,0,1-12-10.58,24,24,0,0,0,0-31.72,8,8,0,0,1,12-10.58ZM248,128a79.9,79.9,0,0,1-20.37,53.34,8,8,0,0,1-11.92-10.67,64,64,0,0,0,0-85.33,8,8,0,1,1,11.92-10.67A79.83,79.83,0,0,1,248,128Z"/>'),MY=fl("speaker-high","0 0 256 256",'<path d="M157.27,21.22a12,12,0,0,0-12.64,1.31L75.88,76H32A20,20,0,0,0,12,96v64a20,20,0,0,0,20,20H75.88l68.75,53.47A12,12,0,0,0,164,224V32A12,12,0,0,0,157.27,21.22ZM36,100H68v56H36Zm104,99.46L92,162.13V93.87l48-37.33ZM212,128a44,44,0,0,1-11,29.11,12,12,0,1,1-18-15.88,20,20,0,0,0,0-26.43,12,12,0,0,1,18-15.86A43.94,43.94,0,0,1,212,128Zm40,0a83.87,83.87,0,0,1-21.39,56,12,12,0,0,1-17.89-16,60,60,0,0,0,0-80,12,12,0,1,1,17.88-16A83.87,83.87,0,0,1,252,128Z"/>'),EY=fl("speaker-high","0 0 256 256",'<path d="M160,32.25V223.69a8.29,8.29,0,0,1-3.91,7.18,8,8,0,0,1-9-.56l-65.57-51A4,4,0,0,1,80,176.16V79.84a4,4,0,0,1,1.55-3.15l65.57-51a8,8,0,0,1,10,.16A8.27,8.27,0,0,1,160,32.25ZM60,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H60a4,4,0,0,0,4-4V84A4,4,0,0,0,60,80Zm126.77,20.84a8,8,0,0,0-.72,11.3,24,24,0,0,1,0,31.72,8,8,0,1,0,12,10.58,40,40,0,0,0,0-52.88A8,8,0,0,0,186.74,100.84Zm40.89-26.17a8,8,0,1,0-11.92,10.66,64,64,0,0,1,0,85.34,8,8,0,1,0,11.92,10.66,80,80,0,0,0,0-106.66Z"/>'),LY=fl("speaker-high","0 0 256 256",'<path d="M80,88v80H32a8,8,0,0,1-8-8V96a8,8,0,0,1,8-8Z" opacity="0.2"/><path d="M155.51,24.81a8,8,0,0,0-8.42.88L77.25,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H77.25l69.84,54.31A8,8,0,0,0,160,224V32A8,8,0,0,0,155.51,24.81ZM32,96H72v64H32ZM144,207.64,88,164.09V91.91l56-43.55Zm54-106.08a40,40,0,0,1,0,52.88,8,8,0,0,1-12-10.58,24,24,0,0,0,0-31.72,8,8,0,0,1,12-10.58ZM248,128a79.9,79.9,0,0,1-20.37,53.34,8,8,0,0,1-11.92-10.67,64,64,0,0,0,0-85.33,8,8,0,1,1,11.92-10.67A79.83,79.83,0,0,1,248,128Z"/>'),$Y="speaker-high",xY=Object.freeze(Object.defineProperty({__proto__:null,bold:MY,default:y_,duotone:LY,fill:EY,glyphName:$Y,light:AY,regular:y_,thin:kY},Symbol.toStringTag,{value:"Module"})),pl=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},TY=pl("television","0 0 256 256",'<path d="M216,68H137.66l41.17-41.17a4,4,0,1,0-5.66-5.66L128,66.34,82.83,21.17a4,4,0,0,0-5.66,5.66L118.34,68H40A12,12,0,0,0,28,80V200a12,12,0,0,0,12,12H216a12,12,0,0,0,12-12V80A12,12,0,0,0,216,68ZM36,200V80a4,4,0,0,1,4-4H148V204H40A4,4,0,0,1,36,200Zm184,0a4,4,0,0,1-4,4H156V76h60a4,4,0,0,1,4,4Zm-24-84a8,8,0,1,1-8-8A8,8,0,0,1,196,116Zm0,48a8,8,0,1,1-8-8A8,8,0,0,1,196,164Z"/>'),HY=pl("television","0 0 256 256",'<path d="M216,66H142.48l37.76-37.76a6,6,0,0,0-8.48-8.48L128,63.51,84.24,19.76a6,6,0,1,0-8.48,8.48L113.52,66H40A14,14,0,0,0,26,80V200a14,14,0,0,0,14,14H216a14,14,0,0,0,14-14V80A14,14,0,0,0,216,66ZM38,200V80a2,2,0,0,1,2-2H146V202H40A2,2,0,0,1,38,200Zm180,0a2,2,0,0,1-2,2H158V78h58a2,2,0,0,1,2,2Zm-20-84a10,10,0,1,1-10-10A10,10,0,0,1,198,116Zm0,48a10,10,0,1,1-10-10A10,10,0,0,1,198,164Z"/>'),w_=pl("television","0 0 256 256",'<path d="M216,64H147.31l34.35-34.34a8,8,0,1,0-11.32-11.32L128,60.69,85.66,18.34A8,8,0,0,0,74.34,29.66L108.69,64H40A16,16,0,0,0,24,80V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V80A16,16,0,0,0,216,64ZM40,80H144V200H40ZM216,200H160V80h56V200Zm-16-84a12,12,0,1,1-12-12A12,12,0,0,1,200,116Zm0,48a12,12,0,1,1-12-12A12,12,0,0,1,200,164Z"/>'),NY=pl("television","0 0 256 256",'<path d="M216,60H157l27.52-27.52a12,12,0,0,0-17-17L128,55,88.49,15.51a12,12,0,0,0-17,17L99,60H40A20,20,0,0,0,20,80V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V80A20,20,0,0,0,216,60ZM44,84h84V196H44ZM212,196H152V84h60Zm-44-80a16,16,0,1,1,16,16A16,16,0,0,1,168,116Zm32,48a16,16,0,1,1-16-16A16,16,0,0,1,200,164Z"/>'),PY=pl("television","0 0 256 256",'<path d="M216,64H147.31l34.35-34.34a8,8,0,1,0-11.32-11.32L128,60.69,85.66,18.34A8,8,0,0,0,74.34,29.66L108.69,64H40A16,16,0,0,0,24,80V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V80A16,16,0,0,0,216,64Zm0,136H160V80h56V200Zm-16-84a12,12,0,1,1-12-12A12,12,0,0,1,200,116Zm0,48a12,12,0,1,1-12-12A12,12,0,0,1,200,164Z"/>'),OY=pl("television","0 0 256 256",'<path d="M152,72V208H40a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8Z" opacity="0.2"/><path d="M216,64H147.31l34.35-34.34a8,8,0,1,0-11.32-11.32L128,60.69,85.66,18.34A8,8,0,0,0,74.34,29.66L108.69,64H40A16,16,0,0,0,24,80V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V80A16,16,0,0,0,216,64ZM40,80H144V200H40ZM216,200H160V80h56V200Zm-16-84a12,12,0,1,1-12-12A12,12,0,0,1,200,116Zm0,48a12,12,0,1,1-12-12A12,12,0,0,1,200,164Z"/>'),RY="television",IY=Object.freeze(Object.defineProperty({__proto__:null,bold:NY,default:w_,duotone:OY,fill:PY,glyphName:RY,light:HY,regular:w_,thin:TY},Symbol.toStringTag,{value:"Module"})),_l=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},DY=_l("terminal","0 0 256 256",'<path d="M116,128a4,4,0,0,1-1.34,3l-72,64a4,4,0,1,1-5.32-6L106,128,37.34,67a4,4,0,0,1,5.32-6l72,64A4,4,0,0,1,116,128Zm100,60H120a4,4,0,0,0,0,8h96a4,4,0,0,0,0-8Z"/>'),VY=_l("terminal","0 0 256 256",'<path d="M116,132.48l-72,64a6,6,0,0,1-8-9L103,128,36,68.49a6,6,0,0,1,8-9l72,64a6,6,0,0,1,0,9ZM216,186H120a6,6,0,0,0,0,12h96a6,6,0,0,0,0-12Z"/>'),S_=_l("terminal","0 0 256 256",'<path d="M117.31,134l-72,64a8,8,0,1,1-10.63-12L100,128,34.69,70A8,8,0,1,1,45.32,58l72,64a8,8,0,0,1,0,12ZM216,184H120a8,8,0,0,0,0,16h96a8,8,0,0,0,0-16Z"/>'),ZY=_l("terminal","0 0 256 256",'<path d="M120,137,48,201A12,12,0,1,1,32,183l61.91-55L32,73A12,12,0,1,1,48,55l72,64A12,12,0,0,1,120,137Zm96,43H120a12,12,0,0,0,0,24h96a12,12,0,0,0,0-24Z"/>'),BY=_l("terminal","0 0 256 256",'<path d="M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM77.66,173.66a8,8,0,0,1-11.32-11.32L100.69,128,66.34,93.66A8,8,0,0,1,77.66,82.34l40,40a8,8,0,0,1,0,11.32ZM192,176H128a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"/>'),FY=_l("terminal","0 0 256 256",'<path d="M216,80V192H40V64H200A16,16,0,0,1,216,80Z" opacity="0.2"/><path d="M117.31,134l-72,64a8,8,0,1,1-10.63-12L100,128,34.69,70A8,8,0,1,1,45.32,58l72,64a8,8,0,0,1,0,12ZM216,184H120a8,8,0,0,0,0,16h96a8,8,0,0,0,0-16Z"/>'),zY="terminal",UY=Object.freeze(Object.defineProperty({__proto__:null,bold:ZY,default:S_,duotone:FY,fill:BY,glyphName:zY,light:VY,regular:S_,thin:DY},Symbol.toStringTag,{value:"Module"})),ml=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},WY=ml("thermometer","0 0 256 256",'<path d="M212,60a24,24,0,1,0,24,24A24,24,0,0,0,212,60Zm0,40a16,16,0,1,1,16-16A16,16,0,0,1,212,100Zm-88,56.29V88a4,4,0,0,0-8,0v68.29a28,28,0,1,0,8,0ZM120,204a20,20,0,1,1,20-20A20,20,0,0,1,120,204Zm36-68V48a36,36,0,0,0-72,0v88a60,60,0,1,0,72,0ZM120,236a52,52,0,0,1-29.71-94.68A4,4,0,0,0,92,138V48a28,28,0,0,1,56,0v90a4,4,0,0,0,1.71,3.28A52,52,0,0,1,120,236Z"/>'),jY=ml("thermometer","0 0 256 256",'<path d="M212,58a26,26,0,1,0,26,26A26,26,0,0,0,212,58Zm0,40a14,14,0,1,1,14-14A14,14,0,0,1,212,98Zm-86,56.6V88a6,6,0,0,0-12,0v66.6a30,30,0,1,0,12,0ZM120,202a18,18,0,1,1,18-18A18,18,0,0,1,120,202Zm38-67V48a38,38,0,0,0-76,0v87a62,62,0,1,0,76,0Zm-38,99a50,50,0,0,1-28.57-91A6,6,0,0,0,94,138V48a26,26,0,0,1,52,0v90a6,6,0,0,0,2.57,4.92A50,50,0,0,1,120,234Z"/>'),C_=ml("thermometer","0 0 256 256",'<path d="M212,56a28,28,0,1,0,28,28A28,28,0,0,0,212,56Zm0,40a12,12,0,1,1,12-12A12,12,0,0,1,212,96Zm-84,57V88a8,8,0,0,0-16,0v65a32,32,0,1,0,16,0Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,120,200Zm40-66V48a40,40,0,0,0-80,0v86a64,64,0,1,0,80,0Zm-40,98a48,48,0,0,1-27.42-87.4A8,8,0,0,0,96,138V48a24,24,0,0,1,48,0v90a8,8,0,0,0,3.42,6.56A48,48,0,0,1,120,232Z"/>'),KY=ml("thermometer","0 0 256 256",'<path d="M212,52a32,32,0,1,0,32,32A32,32,0,0,0,212,52Zm0,40a8,8,0,1,1,8-8A8,8,0,0,1,212,92ZM160,56A52,52,0,0,0,56,56v94.69a64,64,0,1,0,104,0ZM108,228a40,40,0,0,1-30.91-65.39A12,12,0,0,0,80,154.78V56a28,28,0,0,1,56,0v98.77a12,12,0,0,0,2.77,7.68A40,40,0,0,1,108,228Zm24-40a24,24,0,1,1-36-20.78V92a12,12,0,0,1,24,0v75.22A24,24,0,0,1,132,188Z"/>'),qY=ml("thermometer","0 0 256 256",'<path d="M212,56a28,28,0,1,0,28,28A28,28,0,0,0,212,56Zm0,40a12,12,0,1,1,12-12A12,12,0,0,1,212,96Zm-60,50.08V40a32,32,0,0,0-64,0V146.08a56,56,0,1,0,64,0ZM136,104H104V40a16,16,0,0,1,32,0Z"/>'),GY=ml("thermometer","0 0 256 256",'<path d="M152,138V48a32,32,0,0,0-64,0v90a56,56,0,1,0,64,0Zm-32,70a24,24,0,1,1,24-24A24,24,0,0,1,120,208Z" opacity="0.2"/><path d="M212,56a28,28,0,1,0,28,28A28,28,0,0,0,212,56Zm0,40a12,12,0,1,1,12-12A12,12,0,0,1,212,96Zm-84,57V88a8,8,0,0,0-16,0v65a32,32,0,1,0,16,0Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,120,200Zm40-66V48a40,40,0,0,0-80,0v86a64,64,0,1,0,80,0Zm-40,98a48,48,0,0,1-27.42-87.4A8,8,0,0,0,96,138V48a24,24,0,0,1,48,0v90a8,8,0,0,0,3.42,6.56A48,48,0,0,1,120,232Z"/>'),YY="thermometer",XY=Object.freeze(Object.defineProperty({__proto__:null,bold:KY,default:C_,duotone:GY,fill:qY,glyphName:YY,light:jY,regular:C_,thin:WY},Symbol.toStringTag,{value:"Module"})),vl=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},JY=vl("thermometer-hot","0 0 256 256",'<path d="M124,156.29V48a4,4,0,0,0-8,0V156.29a28,28,0,1,0,8,0ZM120,204a20,20,0,1,1,20-20A20,20,0,0,1,120,204Zm36-68V48a36,36,0,0,0-72,0v88a60,60,0,1,0,72,0ZM120,236a52,52,0,0,1-29.71-94.68A4,4,0,0,0,92,138V48a28,28,0,0,1,56,0v90a4,4,0,0,0,1.71,3.28A52,52,0,0,1,120,236ZM180.65,78.59a4,4,0,0,1,1.17-5.54c13.24-8.63,23.07-4.43,31.75-.73,8.15,3.48,14.58,6.22,24.25-.07a4,4,0,1,1,4.36,6.7C236.43,82.7,231.32,84,226.67,84c-6.06,0-11.33-2.25-16.24-4.34-8.15-3.47-14.58-6.22-24.25.07A4,4,0,0,1,180.65,78.59Zm62.7,26.82a4,4,0,0,1-1.17,5.54c-5.75,3.75-10.86,5.07-15.51,5.07-6.06,0-11.33-2.25-16.24-4.34-8.15-3.47-14.58-6.22-24.25.07a4,4,0,1,1-4.36-6.7c13.24-8.63,23.07-4.43,31.75-.73,8.15,3.48,14.58,6.22,24.25-.07A4,4,0,0,1,243.35,105.41Z"/>'),QY=vl("thermometer-hot","0 0 256 256",'<path d="M126,154.6V48a6,6,0,0,0-12,0V154.6a30,30,0,1,0,12,0ZM120,202a18,18,0,1,1,18-18A18,18,0,0,1,120,202Zm38-67V48a38,38,0,0,0-76,0v87a62,62,0,1,0,76,0Zm-38,99a50,50,0,0,1-28.57-91A6,6,0,0,0,94,138V48a26,26,0,0,1,52,0v90a6,6,0,0,0,2.57,4.92A50,50,0,0,1,120,234ZM179,79.68a6,6,0,0,1,1.75-8.3c14.14-9.21,24.95-4.61,33.63-.9,7.9,3.37,13.6,5.8,22.37.09a6,6,0,1,1,6.55,10.05c-6.12,4-11.62,5.39-16.59,5.39-6.51,0-12.11-2.39-17-4.49-7.89-3.37-13.59-5.8-22.37-.09A6,6,0,0,1,179,79.68ZM245,104.32a6,6,0,0,1-1.76,8.3c-6.12,4-11.62,5.39-16.59,5.39-6.51,0-12.11-2.39-17-4.49-7.89-3.37-13.59-5.8-22.37-.09a6,6,0,0,1-6.55-10.05c14.14-9.21,24.95-4.6,33.63-.9,7.9,3.37,13.6,5.8,22.37.09A6,6,0,0,1,245,104.32Z"/>'),k_=vl("thermometer-hot","0 0 256 256",'<path d="M128,153V48a8,8,0,0,0-16,0V153a32,32,0,1,0,16,0Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,120,200Zm40-66V48a40,40,0,0,0-80,0v86a64,64,0,1,0,80,0Zm-40,98a48,48,0,0,1-27.42-87.4A8,8,0,0,0,96,138V48a24,24,0,0,1,48,0v90a8,8,0,0,0,3.42,6.56A48,48,0,0,1,120,232ZM177.3,80.77a8,8,0,0,1,2.33-11.07c15-9.79,26.87-4.75,35.51-1.06C223,72,227.76,74,235.63,68.89a8,8,0,0,1,8.74,13.41C237.88,86.53,232,88,226.69,88c-7,0-12.92-2.54-17.83-4.63C201,80,196.24,78,188.37,83.11A8,8,0,0,1,177.3,80.77Zm69.4,22.46a8,8,0,0,1-2.33,11.07C237.88,118.53,232,120,226.69,120c-7,0-12.92-2.54-17.83-4.63-7.87-3.36-12.62-5.38-20.49-.25a8,8,0,0,1-8.74-13.41c15-9.79,26.87-4.75,35.51-1.06,7.87,3.36,12.62,5.39,20.49.25A8,8,0,0,1,246.7,103.23Z"/>'),eX=vl("thermometer-hot","0 0 256 256",'<path d="M160,56A52,52,0,0,0,56,56v94.69a64,64,0,1,0,104,0ZM108,228a40,40,0,0,1-30.91-65.39A12,12,0,0,0,80,154.78V56a28,28,0,0,1,56,0v98.77a12,12,0,0,0,2.77,7.68A40,40,0,0,1,108,228Zm24-40a24,24,0,1,1-36-20.78V56a12,12,0,0,1,24,0V167.22A24,24,0,0,1,132,188ZM173.94,83a12,12,0,0,1,3.51-16.6c16.82-11,30.32-5.2,39.26-1.39,8.09,3.46,10.93,4.37,16.74.58a12,12,0,0,1,13.1,20.11C239.28,90.38,232.64,92,226.71,92c-7.79,0-14.34-2.8-19.42-5-8.09-3.46-10.93-4.37-16.74-.58A12,12,0,0,1,173.94,83Zm76.11,26.1a12,12,0,0,1-3.5,16.6c-7.27,4.73-13.91,6.35-19.84,6.35-7.79,0-14.34-2.8-19.42-5-8.09-3.46-10.93-4.37-16.74-.58a12,12,0,1,1-13.1-20.11c16.82-11,30.32-5.2,39.26-1.39,8.09,3.46,10.93,4.37,16.74.58A12,12,0,0,1,250.05,109.05Z"/>'),tX=vl("thermometer-hot","0 0 256 256",'<path d="M152,146.08V40a32,32,0,0,0-64,0V146.08a56,56,0,1,0,64,0ZM136,56H104V40a16,16,0,0,1,32,0Zm41.3,24.77a8,8,0,0,1,2.33-11.07c15-9.79,26.87-4.75,35.51-1.06C223,72,227.76,74,235.63,68.89a8,8,0,0,1,8.74,13.41C237.88,86.53,232,88,226.69,88c-7,0-12.92-2.54-17.83-4.63C201,80,196.24,78,188.37,83.11A8,8,0,0,1,177.3,80.77Zm69.4,22.46a8,8,0,0,1-2.33,11.07C237.88,118.53,232,120,226.69,120c-7,0-12.92-2.54-17.83-4.63-7.87-3.36-12.62-5.38-20.49-.25a8,8,0,0,1-8.74-13.41c15-9.79,26.87-4.75,35.51-1.06,7.87,3.36,12.62,5.39,20.49.25A8,8,0,0,1,246.7,103.23Z"/>'),iX=vl("thermometer-hot","0 0 256 256",'<path d="M152,138V48a32,32,0,0,0-64,0v90a56,56,0,1,0,64,0Zm-32,70a24,24,0,1,1,24-24A24,24,0,0,1,120,208Z" opacity="0.2"/><path d="M128,153V48a8,8,0,0,0-16,0V153a32,32,0,1,0,16,0Zm-8,47a16,16,0,1,1,16-16A16,16,0,0,1,120,200Zm40-66V48a40,40,0,0,0-80,0v86a64,64,0,1,0,80,0Zm-40,98a48,48,0,0,1-27.42-87.4A8,8,0,0,0,96,138V48a24,24,0,0,1,48,0v90a8,8,0,0,0,3.42,6.56A48,48,0,0,1,120,232ZM177.3,80.77a8,8,0,0,1,2.33-11.07c15-9.79,26.87-4.75,35.51-1.06C223,72,227.76,74,235.63,68.89a8,8,0,0,1,8.74,13.41C237.88,86.53,232,88,226.69,88c-7,0-12.92-2.54-17.83-4.63C201,80,196.24,78,188.37,83.11A8,8,0,0,1,177.3,80.77Zm69.4,22.46a8,8,0,0,1-2.33,11.07C237.88,118.53,232,120,226.69,120c-7,0-12.92-2.54-17.83-4.63-7.87-3.36-12.62-5.38-20.49-.25a8,8,0,0,1-8.74-13.41c15-9.79,26.87-4.75,35.51-1.06,7.87,3.36,12.62,5.39,20.49.25A8,8,0,0,1,246.7,103.23Z"/>'),rX="thermometer-hot",nX=Object.freeze(Object.defineProperty({__proto__:null,bold:eX,default:k_,duotone:iX,fill:tX,glyphName:rX,light:QY,regular:k_,thin:JY},Symbol.toStringTag,{value:"Module"})),gl=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},sX=gl("toggle-right","0 0 256 256",'<path d="M176,60H80a68,68,0,0,0,0,136h96a68,68,0,0,0,0-136Zm0,128H80A60,60,0,0,1,80,68h96a60,60,0,0,1,0,120Zm0-96a36,36,0,1,0,36,36A36,36,0,0,0,176,92Zm0,64a28,28,0,1,1,28-28A28,28,0,0,1,176,156Z"/>'),aX=gl("toggle-right","0 0 256 256",'<path d="M176,58H80a70,70,0,0,0,0,140h96a70,70,0,0,0,0-140Zm0,128H80A58,58,0,0,1,80,70h96a58,58,0,0,1,0,116Zm0-96a38,38,0,1,0,38,38A38,38,0,0,0,176,90Zm0,64a26,26,0,1,1,26-26A26,26,0,0,1,176,154Z"/>'),A_=gl("toggle-right","0 0 256 256",'<path d="M176,56H80a72,72,0,0,0,0,144h96a72,72,0,0,0,0-144Zm0,128H80A56,56,0,0,1,80,72h96a56,56,0,0,1,0,112Zm0-96a40,40,0,1,0,40,40A40,40,0,0,0,176,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,176,152Z"/>'),lX=gl("toggle-right","0 0 256 256",'<path d="M176,52H80a76,76,0,0,0,0,152h96a76,76,0,0,0,0-152Zm0,128H80A52,52,0,0,1,80,76h96a52,52,0,0,1,0,104Zm0-92a40,40,0,1,0,40,40A40,40,0,0,0,176,88Zm0,56a16,16,0,1,1,16-16A16,16,0,0,1,176,144Z"/>'),oX=gl("toggle-right","0 0 256 256",'<path d="M176,56H80a72,72,0,0,0,0,144h96a72,72,0,0,0,0-144Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,176,168Z"/>'),cX=gl("toggle-right","0 0 256 256",'<path d="M208,128a32,32,0,1,1-32-32A32,32,0,0,1,208,128Z" opacity="0.2"/><path d="M176,56H80a72,72,0,0,0,0,144h96a72,72,0,0,0,0-144Zm0,128H80A56,56,0,0,1,80,72h96a56,56,0,0,1,0,112Zm0-96a40,40,0,1,0,40,40A40,40,0,0,0,176,88Zm0,64a24,24,0,1,1,24-24A24,24,0,0,1,176,152Z"/>'),uX="toggle-right",dX=Object.freeze(Object.defineProperty({__proto__:null,bold:lX,default:A_,duotone:cX,fill:oX,glyphName:uX,light:aX,regular:A_,thin:sX},Symbol.toStringTag,{value:"Module"})),bl=(e,t,i)=>{const r=n=>$e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:t,fill:"currentColor",...n,innerHTML:i});return r.displayName="NbGlyph",r.glyphName=e,r},hX=bl("wind","0 0 256 256",'<path d="M180,184a28,28,0,0,1-28,28c-12.09,0-23.76-7.83-27.75-18.61a4,4,0,1,1,7.5-2.78C134.58,198.24,143.28,204,152,204a20,20,0,0,0,0-40H40a4,4,0,0,1,0-8H152A28,28,0,0,1,180,184ZM148,72a28,28,0,0,0-28-28c-12.09,0-23.76,7.83-27.75,18.61a4,4,0,0,0,7.5,2.78C102.58,57.76,111.28,52,120,52a20,20,0,0,1,0,40H24a4,4,0,0,0,0,8h96A28,28,0,0,0,148,72Zm60,4c-12.09,0-23.76,7.83-27.75,18.61a4,4,0,1,0,7.5,2.78C190.58,89.76,199.28,84,208,84a20,20,0,0,1,0,40H32a4,4,0,0,0,0,8H208a28,28,0,0,0,0-56Z"/>'),fX=bl("wind","0 0 256 256",'<path d="M182,184a30,30,0,0,1-30,30c-12.9,0-25.36-8.38-29.63-19.92a6,6,0,0,1,11.26-4.16C136.13,196.69,144.2,202,152,202a18,18,0,0,0,0-36H40a6,6,0,0,1,0-12H152A30,30,0,0,1,182,184ZM150,72a30,30,0,0,0-30-30c-12.9,0-25.36,8.38-29.63,19.92a6,6,0,1,0,11.26,4.16C104.13,59.31,112.2,54,120,54a18,18,0,0,1,0,36H24a6,6,0,0,0,0,12h96A30,30,0,0,0,150,72Zm58,2c-12.9,0-25.36,8.38-29.63,19.92a6,6,0,1,0,11.26,4.16C192.13,91.31,200.2,86,208,86a18,18,0,0,1,0,36H32a6,6,0,0,0,0,12H208a30,30,0,0,0,0-60Z"/>'),M_=bl("wind","0 0 256 256",'<path d="M184,184a32,32,0,0,1-32,32c-13.7,0-26.95-8.93-31.5-21.22a8,8,0,0,1,15-5.56C137.74,195.27,145,200,152,200a16,16,0,0,0,0-32H40a8,8,0,0,1,0-16H152A32,32,0,0,1,184,184Zm-64-80a32,32,0,0,0,0-64c-13.7,0-26.95,8.93-31.5,21.22a8,8,0,0,0,15,5.56C105.74,60.73,113,56,120,56a16,16,0,0,1,0,32H24a8,8,0,0,0,0,16Zm88-32c-13.7,0-26.95,8.93-31.5,21.22a8,8,0,0,0,15,5.56C193.74,92.73,201,88,208,88a16,16,0,0,1,0,32H32a8,8,0,0,0,0,16H208a32,32,0,0,0,0-64Z"/>'),pX=bl("wind","0 0 256 256",'<path d="M24,104a12,12,0,0,1,0-24h96a12,12,0,0,0,0-24,15.07,15.07,0,0,0-10.26,4.45,12,12,0,0,1-17-16.9A39.34,39.34,0,0,1,120,32a36,36,0,0,1,0,72ZM208,68a39.34,39.34,0,0,0-27.3,11.55,12,12,0,0,0,17,16.9A15.07,15.07,0,0,1,208,92a12,12,0,0,1,0,24H32a12,12,0,0,0,0,24H208a36,36,0,0,0,0-72Zm-56,84H40a12,12,0,0,0,0,24H152a12,12,0,0,1,0,24,15.11,15.11,0,0,1-10.27-4.45,12,12,0,1,0-17,16.9A39.34,39.34,0,0,0,152,224a36,36,0,0,0,0-72Z"/>'),_X=bl("wind","0 0 256 256",'<path d="M120,104H24a8,8,0,0,1-8-8.53A8.17,8.17,0,0,1,24.27,88H112a8,8,0,0,0,8-8.53A8.17,8.17,0,0,0,111.73,72H92.29a4,4,0,0,1-4-4.58A32,32,0,1,1,120,104Zm119.92-2.29a32,32,0,0,0-63.59-2.29,4,4,0,0,0,4,4.58h19.44a8.17,8.17,0,0,1,8.25,7.47,8,8,0,0,1-8,8.53H32.27A8.17,8.17,0,0,0,24,127.47,8,8,0,0,0,32,136H208A32,32,0,0,0,239.92,101.71ZM152,152H40.27A8.17,8.17,0,0,0,32,159.47,8,8,0,0,0,40,168H143.73a8.17,8.17,0,0,1,8.25,7.47,8,8,0,0,1-8,8.53H124.29a4,4,0,0,0-4,4.58A32,32,0,1,0,152,152Z"/>'),mX=bl("wind","0 0 256 256",'<path d="M120,96a24,24,0,1,1,24-24A24,24,0,0,1,120,96Zm88-16a24,24,0,1,0,24,24A24,24,0,0,0,208,80Zm-56,80a24,24,0,1,0,24,24A24,24,0,0,0,152,160Z" opacity="0.2"/><path d="M184,184a32,32,0,0,1-32,32c-13.7,0-26.95-8.93-31.5-21.22a8,8,0,0,1,15-5.56C137.74,195.27,145,200,152,200a16,16,0,0,0,0-32H40a8,8,0,0,1,0-16H152A32,32,0,0,1,184,184Zm-64-80a32,32,0,0,0,0-64c-13.7,0-26.95,8.93-31.5,21.22a8,8,0,0,0,15,5.56C105.74,60.73,113,56,120,56a16,16,0,0,1,0,32H24a8,8,0,0,0,0,16Zm88-32c-13.7,0-26.95,8.93-31.5,21.22a8,8,0,0,0,15,5.56C193.74,92.73,201,88,208,88a16,16,0,0,1,0,32H32a8,8,0,0,0,0,16H208a32,32,0,0,0,0-64Z"/>'),vX="wind",gX=Object.freeze(Object.defineProperty({__proto__:null,bold:pX,default:M_,duotone:mX,fill:_X,glyphName:vX,light:fX,regular:M_,thin:hX},Symbol.toStringTag,{value:"Module"}));function bX(){C9({"app-window":DK,bell:NT,"brackets-curly":WK,broadcast:JK,camera:sq,cube:hq,devices:TF,door:bq,drop:Mq,fan:Nq,"game-controller":Zq,garage:Kq,gear:dg,house:eG,intersect:lG,lamp:pG,lightbulb:wG,lightning:LG,lock:OG,plugs:FG,pulse:$Z,"puzzle-piece":OP,rows:GG,shield:iY,sliders:cY,snowflake:mY,"speaker-hifi":CY,"speaker-high":xY,television:IY,terminal:UY,thermometer:XY,"thermometer-hot":nX,"toggle-right":dX,wind:gX})}const yX={key:0,class:"pcf-section"},wX={class:"pcf-section-label"},SX={class:"pcf-section-body"},CX={key:1,class:"pcf-row pcf-row--switch"},kX={class:"pcf-label-wrap"},AX={class:"pcf-label"},MX={key:0,class:"pcf-required"},EX={key:0,class:"pcf-hint"},LX={key:2,class:"pcf-row"},$X={class:"pcf-label"},xX={key:0,class:"pcf-required"},TX={class:"pcf-control"},HX={key:0,class:"pcf-hint"},NX={key:3,class:"pcf-row pcf-row--array"},PX={class:"pcf-label"},OX={key:0,class:"pcf-required"},RX={class:"pcf-control"},IX={class:"pcf-array"},DX={key:0,class:"pcf-hint"},VX={key:4,class:"pcf-row"},ZX={class:"pcf-label"},BX={key:0,class:"pcf-required"},FX={class:"pcf-control"},zX={key:0,class:"pcf-hint"},UX={key:5,class:"pcf-row"},WX={class:"pcf-label"},jX={key:0,class:"pcf-required"},KX={class:"pcf-control"},qX={key:0,class:"pcf-hint"},GX=Re({__name:"PluginConfigField",props:{fieldKey:{},field:{},path:{},required:{type:Boolean},value:{}},emits:["change","addArray","removeArray","updateArray"],setup(e,{emit:t}){const i=e,r=t;function n(){return Array.isArray(i.field.type)?i.field.type[0]:i.field.type??"string"}function s(){return i.field.title??i.fieldKey.replace(/([A-Z])/g," $1").replace(/^./,d=>d.toUpperCase())}function a(){return(i.field.enum??[]).map((d,h)=>{var f;return{value:d,label:((f=i.field.enumNames)==null?void 0:f[h])??String(d)}})}function l(){return i.value??i.field.default??""}function o(d){const h=i.value;return h==null?void 0:h[d]}function c(d,h){const f=typeof i.value=="object"&&i.value!==null?{...i.value}:{};f[d]=h,r("change",f)}function u(){return Array.isArray(i.value)?i.value:[]}return(d,h)=>{const f=uo("PluginConfigField",!0),v=Yc,p=zo,S=ha,_=oi;return n()==="object"&&e.field.properties?(m(),M("div",yX,[b("div",wX,F(s()),1),b("div",SX,[(m(!0),M(ke,null,Fe(e.field.properties,(w,C)=>{var g;return m(),me(f,{key:C,"field-key":String(C),field:w,path:[...e.path,String(C)],required:((g=e.field.required)==null?void 0:g.includes(String(C)))??!1,value:o(String(C)),onChange:E=>c(String(C),E),onAddArray:h[0]||(h[0]=(E,T)=>r("addArray",E,T)),onRemoveArray:h[1]||(h[1]=(E,T)=>r("removeArray",E,T)),onUpdateArray:h[2]||(h[2]=(E,T,L)=>r("updateArray",E,T,L))},null,8,["field-key","field","path","required","value","onChange"])}),128))])])):n()==="boolean"?(m(),M("div",CX,[b("div",kX,[b("span",AX,[_e(F(s())+" ",1),e.required?(m(),M("span",MX,"*")):z("",!0)]),e.field.description?(m(),M("span",EX,F(e.field.description),1)):z("",!0)]),G(v,{"model-value":!!(e.value??e.field.default??!1),name:`pcf-${e.path.join("-")}`,size:"sm",variant:"primary","onUpdate:modelValue":h[3]||(h[3]=w=>r("change",w))},null,8,["model-value","name"])])):e.field.enum?(m(),M("div",LX,[b("label",$X,[_e(F(s())+" ",1),e.required?(m(),M("span",xX,"*")):z("",!0)]),b("div",TX,[G(p,{"model-value":l(),options:a(),size:"sm","onUpdate:modelValue":h[4]||(h[4]=w=>r("change",w))},null,8,["model-value","options"]),e.field.description?(m(),M("span",HX,F(e.field.description),1)):z("",!0)])])):n()==="array"?(m(),M("div",NX,[b("label",PX,[_e(F(s())+" ",1),e.required?(m(),M("span",OX,"*")):z("",!0)]),b("div",RX,[b("div",IX,[(m(!0),M(ke,null,Fe(u(),(w,C)=>(m(),M("div",{key:C,class:"pcf-array-row"},[G(S,{"model-value":String(w),size:"sm",placeholder:`${s()} ${C+1}`,style:{flex:"1"},"onUpdate:modelValue":g=>r("updateArray",e.path,C,g)},null,8,["model-value","placeholder","onUpdate:modelValue"]),G(_,{variant:"ghost",size:"sm",icon:n2,"aria-label":`Remove ${s()} ${C+1}`,onClick:g=>r("removeArray",e.path,C)},null,8,["aria-label","onClick"])]))),128)),G(_,{variant:"ghost",size:"sm",icon:NE,onClick:h[5]||(h[5]=w=>r("addArray",e.path,e.field.items??{type:"string"}))},{default:te(()=>[...h[8]||(h[8]=[_e(" Add ",-1)])]),_:1})]),e.field.description?(m(),M("span",DX,F(e.field.description),1)):z("",!0)])])):n()==="number"||n()==="integer"?(m(),M("div",VX,[b("label",ZX,[_e(F(s())+" ",1),e.required?(m(),M("span",BX,"*")):z("",!0)]),b("div",FX,[G(S,{"model-value":e.value!==void 0?String(e.value):e.field.default!==void 0?String(e.field.default):"",type:"number",size:"sm",placeholder:e.field.default!==void 0?String(e.field.default):"",style:{"max-width":"180px"},"onUpdate:modelValue":h[6]||(h[6]=w=>r("change",Number(w)))},null,8,["model-value","placeholder"]),e.field.description?(m(),M("span",zX,F(e.field.description),1)):z("",!0)])])):(m(),M("div",UX,[b("label",WX,[_e(F(s())+" ",1),e.required?(m(),M("span",jX,"*")):z("",!0)]),b("div",KX,[G(S,{"model-value":e.value!==void 0?String(e.value):e.field.default!==void 0?String(e.field.default):"",size:"sm",placeholder:e.field.default!==void 0?String(e.field.default):"","onUpdate:modelValue":h[7]||(h[7]=w=>r("change",w))},null,8,["model-value","placeholder"]),e.field.description?(m(),M("span",qX,F(e.field.description),1)):z("",!0)])]))}}}),YX=ii(GX,[["__scopeId","data-v-79b9818f"]]);OA({storageKey:"openbridge.theme"});RH({themes:["openbridge"],defaultTheme:"openbridge"});const yl=Qm(qH);yl.use(fy());yl.use(Lb);yl.use(ow({legacy:!1,locale:navigator.language,fallbackLocale:"en"}));yl.use(w9);bX();yl.component("PluginConfigField",YX);yl.mount("#app");