Files
homeassistant_espscreen/screen_manager/app/static/assets/index-Ci37AxLI.js
T
Max Gramser 94b320074d Draw the mockup with the screens' own words, compile every text while building, and send the language with the live updates
- The page takes the screens' words its mockup draws from their own texts: screen.ha (Home Assistant's words, filled
  from Home Assistant), screen.time, screen.date, screen.number and screen.tile.page, per language next to _meta and
  editor. The copies under editor.mockup go; the rest of `screen` and all of `addon` stay out of the build.
- Numbers in the mockup follow the screens' language (screen.number, with its minimum grouping) or the chosen style,
  as the firmware writes them.
- @intlify/unplugin-vue-i18n compiles every text at build time, so the page runs vue-i18n's runtime-only build
  without the message compiler; every language's _meta comes with the page. Empty texts stay out while building.
- The live updates carry the editor's language (api/events?language=), as an EventSource sends no headers.
- web/ needs Node 22.13 or newer: vue-i18n 11.4, Vite 7 and the unplugin ask for it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 14:59:02 +02:00

29 lines
323 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const r of l.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&s(r)}).observe(document,{childList:!0,subtree:!0});function n(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(i){if(i.ep)return;i.ep=!0;const l=n(i);fetch(i.href,l)}})();function Go(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Ne={},Nn=[],Wt=()=>{},pr=()=>!1,Ti=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ei=e=>e.startsWith("onUpdate:"),tt=Object.assign,Jo=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Nu=Object.prototype.hasOwnProperty,Ee=(e,t)=>Nu.call(e,t),pe=Array.isArray,gn=e=>Us(e)==="[object Map]",sn=e=>Us(e)==="[object Set]",Il=e=>Us(e)==="[object Date]",_e=e=>typeof e=="function",Be=e=>typeof e=="string",Kt=e=>typeof e=="symbol",Oe=e=>e!==null&&typeof e=="object",hr=e=>(Oe(e)||_e(e))&&_e(e.then)&&_e(e.catch),mr=Object.prototype.toString,Us=e=>mr.call(e),Fu=e=>Us(e).slice(8,-1),br=e=>Us(e)==="[object Object]",Xo=e=>Be(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,gs=Go(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ai=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},Du=/-\w/g,ct=Ai(e=>e.replace(Du,t=>t.slice(1).toUpperCase())),Uu=/\B([A-Z])/g,Cn=Ai(e=>e.replace(Uu,"-$1").toLowerCase()),Pi=Ai(e=>e.charAt(0).toUpperCase()+e.slice(1)),zi=Ai(e=>e?`on${Pi(e)}`:""),Vt=(e,t)=>!Object.is(e,t),ni=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},vr=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Oi=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Ll;const Ii=()=>Ll||(Ll=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function je(e){if(pe(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],i=Be(s)?Wu(s):je(s);if(i)for(const l in i)t[l]=i[l]}return t}else if(Be(e)||Oe(e))return e}const ju=/;(?![^(]*\))/g,Hu=/:([^]+)/,Vu=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function Wu(e){const t={};return e.replace(Vu,n=>n.startsWith("/*")?"":n).split(ju).forEach(n=>{if(n){const s=n.split(Hu);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function me(e){let t="";if(Be(e))t=e;else if(pe(e))for(let n=0;n<e.length;n++){const s=me(e[n]);s&&(t+=s+" ")}else if(Oe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const Bu="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Ku=Go(Bu);function gr(e){return!!e||e===""}function qu(e,t,n){if(e.length!==t.length)return!1;let s=!0;for(let i=0;s&&i<e.length;i++)s=Lt(e[i],t[i],n);return s}function Ml(e,t,n){if(e.size!==t.size)return!1;const s=Array.from(t),i=new Uint8Array(s.length);for(const l of e){let r=-1;for(let u=0;u<s.length;u++)if(!i[u]&&Lt(l,s[u],n)){r=u;break}if(r<0)return!1;i[r]=1}return!0}function zu(e,t,n){let s=gn(e),i=gn(t);if(s||i||(s=sn(e),i=sn(t),s||i))return s&&i?Ml(e,t,n):!1;const l=Object.keys(e).length,r=Object.keys(t).length;if(l!==r)return!1;for(const u in e){const f=e.hasOwnProperty(u),h=t.hasOwnProperty(u);if(f&&!h||!f&&h||!Lt(e[u],t[u],n))return!1}return String(e)===String(t)}function Rl(e,t,n,s){n||(n=[new Map,new Map]);const[i,l]=n;if(i.has(e)||l.has(t))return i.get(e)===t&&l.get(t)===e;i.set(e,t),l.set(t,e);const r=s(e,t,n);return i.delete(e),l.delete(t),r}function Lt(e,t,n){if(e===t)return!0;let s=Il(e),i=Il(t);return s||i?s&&i?e.getTime()===t.getTime():!1:(s=Kt(e),i=Kt(t),s||i?e===t:(s=pe(e),i=pe(t),s||i?s&&i?Rl(e,t,n,qu):!1:(s=Oe(e),i=Oe(t),s||i?!s||!i?!1:Rl(e,t,n,zu):String(e)===String(t))))}function Zo(e,t){return e.findIndex(n=>Lt(n,t))}const _r=e=>!!(e&&e.__v_isRef===!0),d=e=>Be(e)?e:e==null?"":pe(e)||Oe(e)&&(e.toString===mr||!_e(e.toString))?_r(e)?d(e.value):JSON.stringify(e,yr,2):String(e),yr=(e,t)=>_r(t)?yr(e,t.value):gn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,i],l)=>(n[Yi(s,l)+" =>"]=i,n),{})}:sn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Yi(n))}:Kt(t)?Yi(t):Oe(t)&&!pe(t)&&!br(t)?String(t):t,Yi=(e,t="")=>{var n;return Kt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let Je;class wr{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&&Je&&(Je.active?(this.parent=Je,this.index=(Je.scopes||(Je.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes){const s=this.scopes.slice();for(t=0,n=s.length;t<n;t++)s[t].pause()}for(t=0,n=this.effects.length;t<n;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,n;if(this.scopes){const i=this.scopes.slice();for(t=0,n=i.length;t<n;t++)i[t].resume()}const s=this.effects.slice();for(t=0,n=s.length;t<n;t++)s[t].resume()}}run(t){if(this._active){const n=Je;try{return Je=this,t()}finally{Je=n}}}on(){++this._on===1&&(this.prevScope=Je,Je=this)}off(){if(this._on>0&&--this._on===0){if(Je===this)Je=this.prevScope;else{let t=Je;for(;t;){if(t.prevScope===this){t.prevScope=this.prevScope;break}t=t.prevScope}}this.prevScope=void 0}}stop(t){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){const i=this.scopes.slice();for(n=0,s=i.length;n<s;n++)i[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function Yu(e){return new wr(e)}function kr(){return Je}function Gu(e,t=!1){Je&&Je.cleanups.push(e)}let Fe;const Gi=new WeakSet;class $r{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,Je&&(Je.active?Je.effects.push(this):this.flags&=-2)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,Gi.has(this)&&(Gi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Sr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Nl(this),Cr(this);const t=Fe,n=It;Fe=this,It=!0;try{return this.fn()}finally{Tr(this),Fe=t,It=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)tl(t);this.deps=this.depsTail=void 0,Nl(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Gi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){go(this)&&this.run()}get dirty(){return go(this)}}let xr=0,_s,ys;function Sr(e,t=!1){if(e.flags|=8,t){e.next=ys,ys=e;return}e.next=_s,_s=e}function Qo(){xr++}function el(){if(--xr>0)return;if(ys){let t=ys;for(ys=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;_s;){let t=_s;for(_s=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function Cr(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Tr(e){let t,n=e.depsTail,s=n;for(;s;){const i=s.prevDep;s.version===-1?(s===n&&(n=i),tl(s),Ju(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=i}e.deps=t,e.depsTail=n}function go(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Er(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Er(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ss)||(e.globalVersion=Ss,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!go(e))))return;e.flags|=2;const t=e.dep,n=Fe,s=It;Fe=e,It=!0;try{Cr(e);const i=e.fn(e._value);(t.version===0||Vt(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Fe=n,It=s,Tr(e),e.flags&=-3}}function tl(e,t=!1){const{dep:n,prevSub:s,nextSub:i}=e;if(s&&(s.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let l=n.computed.deps;l;l=l.nextDep)tl(l,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Ju(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let It=!0;const Ar=[];function on(){Ar.push(It),It=!1}function ln(){const e=Ar.pop();It=e===void 0?!0:e}function Nl(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Fe;Fe=void 0;try{t()}finally{Fe=n}}}let Ss=0;class Xu{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class nl{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(!Fe||!It||Fe===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Fe)n=this.activeLink=new Xu(Fe,this),Fe.deps?(n.prevDep=Fe.depsTail,Fe.depsTail.nextDep=n,Fe.depsTail=n):Fe.deps=Fe.depsTail=n,Pr(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Fe.depsTail,n.nextDep=void 0,Fe.depsTail.nextDep=n,Fe.depsTail=n,Fe.deps===n&&(Fe.deps=s)}return n}trigger(t){this.version++,Ss++,this.notify(t)}notify(t){Qo();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{el()}}}function Pr(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Pr(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const _o=new WeakMap,Dn=Symbol(""),yo=Symbol(""),Cs=Symbol("");function nt(e,t,n){if(It&&Fe){let s=_o.get(e);s||_o.set(e,s=new Map);let i=s.get(n);i||(s.set(n,i=new nl),i.map=s,i.key=n),i.track()}}function Xt(e,t,n,s,i,l){const r=_o.get(e);if(!r){Ss++;return}const u=f=>{f&&f.trigger()};if(Qo(),t==="clear")r.forEach(u);else{const f=pe(e),h=f&&Xo(n);if(f&&n==="length"){const p=Number(s);r.forEach((b,v)=>{(v==="length"||v===Cs||!Kt(v)&&v>=p)&&u(b)})}else switch((n!==void 0||r.has(void 0))&&u(r.get(n)),h&&u(r.get(Cs)),t){case"add":f?h&&u(r.get("length")):(u(r.get(Dn)),gn(e)&&u(r.get(yo)));break;case"delete":f||(u(r.get(Dn)),gn(e)&&u(r.get(yo)));break;case"set":gn(e)&&u(r.get(Dn));break}}el()}function zn(e){const t=xe(e);return t===e||(nt(t,"iterate",Cs),xt(e))?t:qt(e)?_n(e)?t.map(n=>wn(Et(n))):t.map(wn):t.map(Et)}function Li(e){return nt(e=xe(e),"iterate",Cs),e}function jt(e,t){return qt(e)?wn(_n(e)?Et(t):t):Et(t)}const Zu={__proto__:null,[Symbol.iterator](){return Ji(this,Symbol.iterator,e=>jt(this,e))},concat(...e){return zn(this).concat(...e.map(t=>pe(t)?zn(t):t))},entries(){return Ji(this,"entries",e=>(e[1]=jt(this,e[1]),e))},every(e,t){return zt(this,"every",e,t,void 0,arguments)},filter(e,t){return zt(this,"filter",e,t,n=>n.map(s=>jt(this,s)),arguments)},find(e,t){return zt(this,"find",e,t,n=>jt(this,n),arguments)},findIndex(e,t){return zt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return zt(this,"findLast",e,t,n=>jt(this,n),arguments)},findLastIndex(e,t){return zt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return zt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Xi(this,"includes",e)},indexOf(...e){return Xi(this,"indexOf",e)},join(e){return zn(this).join(e)},lastIndexOf(...e){return Xi(this,"lastIndexOf",e)},map(e,t){return zt(this,"map",e,t,void 0,arguments)},pop(){return cs(this,"pop")},push(...e){return cs(this,"push",e)},reduce(e,...t){return Fl(this,"reduce",e,t)},reduceRight(e,...t){return Fl(this,"reduceRight",e,t)},shift(){return cs(this,"shift")},some(e,t){return zt(this,"some",e,t,void 0,arguments)},splice(...e){return cs(this,"splice",e)},toReversed(){return zn(this).toReversed()},toSorted(e){return zn(this).toSorted(e)},toSpliced(...e){return zn(this).toSpliced(...e)},unshift(...e){return cs(this,"unshift",e)},values(){return Ji(this,"values",e=>jt(this,e))}};function Ji(e,t,n){const s=Li(e),i=s[t]();return s!==e&&!xt(e)&&(i._next=i.next,i.next=()=>{const l=i._next();return l.done||(l.value=n(l.value)),l}),i}const Qu=Array.prototype;function zt(e,t,n,s,i,l){const r=Li(e),u=r!==e&&!xt(e),f=r[t];if(f!==Qu[t]){const b=f.apply(e,l);return u?Et(b):b}let h=n;r!==e&&(u?h=function(b,v){return n.call(this,jt(e,b),v,e)}:n.length>2&&(h=function(b,v){return n.call(this,b,v,e)}));const p=f.call(r,h,s);return u&&i?i(p):p}function Fl(e,t,n,s){const i=Li(e),l=i!==e&&!xt(e);let r=n,u=!1;i!==e&&(l?(u=s.length===0,r=function(h,p,b){return u&&(u=!1,h=jt(e,h)),n.call(this,h,jt(e,p),b,e)}):n.length>3&&(r=function(h,p,b){return n.call(this,h,p,b,e)}));const f=i[t](r,...s);return u?jt(e,f):f}function Xi(e,t,n){const s=xe(e);nt(s,"iterate",Cs);const i=s[t](...n);return(i===-1||i===!1)&&ol(n[0])?(n[0]=xe(n[0]),s[t](...n)):i}function cs(e,t,n=[]){on(),Qo();const s=xe(e)[t].apply(e,n);return el(),ln(),s}const ed=Go("__proto__,__v_isRef,__isVue"),Or=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Kt));function td(e){Kt(e)||(e=String(e));const t=xe(this);return nt(t,"has",e),t.hasOwnProperty(e)}class Ir{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){if(n==="__v_skip")return t.__v_skip;const i=this._isReadonly,l=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return l;if(n==="__v_raw")return s===(i?l?dd:Nr:l?Rr:Mr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const r=pe(t);if(!i){let f;if(r&&(f=Zu[n]))return f;if(n==="hasOwnProperty")return td}const u=Reflect.get(t,n,et(t)?t:s);if((Kt(n)?Or.has(n):ed(n))||(i||nt(t,"get",n),l))return u;if(et(u)){const f=r&&Xo(n)?u:u.value;return i&&Oe(f)?ko(f):f}return Oe(u)?i?ko(u):Bn(u):u}}class Lr extends Ir{constructor(t=!1){super(!1,t)}set(t,n,s,i){let l=t[n];const r=pe(t)&&Xo(n);if(!this._isShallow){const h=qt(l);if(!xt(s)&&!qt(s)&&(l=xe(l),s=xe(s)),!r&&et(l)&&!et(s))return h||(l.value=s),!0}const u=r?Number(n)<t.length:Ee(t,n),f=Reflect.set(t,n,s,et(t)?t:i);return t===xe(i)&&f&&(u?Vt(s,l)&&Xt(t,"set",n,s):Xt(t,"add",n,s)),f}deleteProperty(t,n){const s=Ee(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&s&&Xt(t,"delete",n,void 0),i}has(t,n){const s=Reflect.has(t,n);return(!Kt(n)||!Or.has(n))&&nt(t,"has",n),s}ownKeys(t){return nt(t,"iterate",pe(t)?"length":Dn),Reflect.ownKeys(t)}}class nd extends Ir{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const sd=new Lr,id=new nd,od=new Lr(!0);const wo=e=>e,Ys=e=>Reflect.getPrototypeOf(e);function ld(e,t,n){return function(...s){const i=this.__v_raw,l=xe(i),r=gn(l),u=e==="entries"||e===Symbol.iterator&&r,f=e==="keys"&&r,h=i[e](...s),p=n?wo:t?wn:Et;return!t&&nt(l,"iterate",f?yo:Dn),tt(Object.create(h),{next(){const{value:b,done:v}=h.next();return v?{value:b,done:v}:{value:u?[p(b[0]),p(b[1])]:p(b),done:v}}})}}function Gs(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function ad(e,t){const n={get(i){const l=this.__v_raw,r=xe(l),u=xe(i);e||(Vt(i,u)&&nt(r,"get",i),nt(r,"get",u));const{has:f}=Ys(r),h=t?wo:e?wn:Et;if(f.call(r,i))return h(l.get(i));if(f.call(r,u))return h(l.get(u));l!==r&&l.get(i)},get size(){const i=this.__v_raw;return!e&&nt(xe(i),"iterate",Dn),i.size},has(i){const l=this.__v_raw,r=xe(l),u=xe(i);return e||(Vt(i,u)&&nt(r,"has",i),nt(r,"has",u)),i===u?l.has(i):l.has(i)||l.has(u)},forEach(i,l){const r=this,u=r.__v_raw,f=xe(u),h=t?wo:e?wn:Et;return!e&&nt(f,"iterate",Dn),u.forEach((p,b)=>i.call(l,h(p),h(b),r))}};return tt(n,e?{add:Gs("add"),set:Gs("set"),delete:Gs("delete"),clear:Gs("clear")}:{add(i){const l=xe(this),r=Ys(l),u=xe(i),f=!t&&!xt(i)&&!qt(i)?u:i;return r.has.call(l,f)||Vt(i,f)&&r.has.call(l,i)||Vt(u,f)&&r.has.call(l,u)||(l.add(f),Xt(l,"add",f,f)),this},set(i,l){!t&&!xt(l)&&!qt(l)&&(l=xe(l));const r=xe(this),{has:u,get:f}=Ys(r);let h=u.call(r,i);h||(i=xe(i),h=u.call(r,i));const p=f.call(r,i);return r.set(i,l),h?Vt(l,p)&&Xt(r,"set",i,l):Xt(r,"add",i,l),this},delete(i){const l=xe(this),{has:r,get:u}=Ys(l);let f=r.call(l,i);f||(i=xe(i),f=r.call(l,i)),u&&u.call(l,i);const h=l.delete(i);return f&&Xt(l,"delete",i,void 0),h},clear(){const i=xe(this),l=i.size!==0,r=i.clear();return l&&Xt(i,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=ld(i,e,t)}),n}function sl(e,t){const n=ad(e,t);return(s,i,l)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?s:Reflect.get(Ee(n,i)&&i in s?n:s,i,l)}const rd={get:sl(!1,!1)},cd={get:sl(!1,!0)},ud={get:sl(!0,!1)};const Mr=new WeakMap,Rr=new WeakMap,Nr=new WeakMap,dd=new WeakMap;function fd(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Bn(e){return qt(e)?e:il(e,!1,sd,rd,Mr)}function pd(e){return il(e,!1,od,cd,Rr)}function ko(e){return il(e,!0,id,ud,Nr)}function il(e,t,n,s,i){if(!Oe(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;const l=i.get(e);if(l)return l;const r=fd(Fu(e));if(r===0)return e;const u=new Proxy(e,r===2?s:n);return i.set(e,u),u}function _n(e){return qt(e)?_n(e.__v_raw):!!(e&&e.__v_isReactive)}function qt(e){return!!(e&&e.__v_isReadonly)}function xt(e){return!!(e&&e.__v_isShallow)}function ol(e){return e?!!e.__v_raw:!1}function xe(e){const t=e&&e.__v_raw;return t?xe(t):e}function hd(e){return!Ee(e,"__v_skip")&&Object.isExtensible(e)&&vr(e,"__v_skip",!0),e}const Et=e=>Oe(e)?Bn(e):e,wn=e=>Oe(e)?ko(e):e;function et(e){return e?e.__v_isRef===!0:!1}function ke(e){return Fr(e,!1)}function md(e){return Fr(e,!0)}function Fr(e,t){return et(e)?e:new bd(e,t)}class bd{constructor(t,n){this.dep=new nl,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:xe(t),this._value=n?t:Et(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||xt(t)||qt(t);t=s?t:xe(t),Vt(t,n)&&(this._rawValue=t,this._value=s?t:Et(t),this.dep.trigger())}}function a(e){return et(e)?e.value:e}const vd={get:(e,t,n)=>t==="__v_raw"?e:a(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const i=e[t];return et(i)&&!et(n)?(i.value=n,!0):Reflect.set(e,t,n,s)}};function Dr(e){return _n(e)?e:new Proxy(e,vd)}class gd{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new nl(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ss-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Fe!==this)return Sr(this,!0),!0}get value(){const t=this.dep.track();return Er(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function _d(e,t,n=!1){let s,i;return _e(e)?s=e:(s=e.get,i=e.set),new gd(s,i,n)}const Js={},li=new WeakMap;let Mn;function yd(e,t=!1,n=Mn){if(n){let s=li.get(n);s||li.set(n,s=[]),s.push(e)}}function wd(e,t,n=Ne){const{immediate:s,deep:i,once:l,scheduler:r,augmentJob:u,call:f}=n,h=T=>i?T:xt(T)||i===!1||i===0?Zt(T,1):Zt(T);let p,b,v,y,M=!1,E=!1;if(et(e)?(b=()=>e.value,M=xt(e)):_n(e)?(b=()=>h(e),M=!0):pe(e)?(E=!0,M=e.some(T=>_n(T)||xt(T)),b=()=>e.map(T=>{if(et(T))return T.value;if(_n(T))return h(T);if(_e(T))return f?f(T,2):T()})):_e(e)?t?b=f?()=>f(e,2):e:b=()=>{if(v){on();try{v()}finally{ln()}}const T=Mn;Mn=p;try{return f?f(e,3,[y]):e(y)}finally{Mn=T}}:b=Wt,t&&i){const T=b,V=i===!0?1/0:i;b=()=>Zt(T(),V)}const x=kr(),O=()=>{p.stop(),x&&x.active&&Jo(x.effects,p)};if(l&&t){const T=t;t=(...V)=>{const L=T(...V);return O(),L}}let C=E?new Array(e.length).fill(Js):Js;const F=T=>{if(!(!(p.flags&1)||!p.dirty&&!T))if(t){const V=p.run();if(T||i||M||(E?V.some((L,k)=>Vt(L,C[k])):Vt(V,C))){v&&v();const L=Mn;Mn=p;try{const k=[V,C===Js?void 0:E&&C[0]===Js?[]:C,y];C=V,f?f(t,3,k):t(...k)}finally{Mn=L}}}else p.run()};return u&&u(F),p=new $r(b),p.scheduler=r?()=>r(F,!1):F,y=T=>yd(T,!1,p),v=p.onStop=()=>{const T=li.get(p);if(T){if(f)f(T,4);else for(const V of T)V();li.delete(p)}},t?s?F(!0):C=p.run():r?r(F.bind(null,!0),!0):p.run(),O.pause=p.pause.bind(p),O.resume=p.resume.bind(p),O.stop=O,O}function Zt(e,t=1/0,n){if(t<=0||!Oe(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,et(e))Zt(e.value,t,n);else if(pe(e))for(let s=0;s<e.length;s++)Zt(e[s],t,n);else if(sn(e)||gn(e))e.forEach(s=>{Zt(s,t,n)});else if(br(e)){for(const s in e)Zt(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&Zt(e[s],t,n)}return e}function js(e,t,n,s){try{return s?e(...s):e()}catch(i){Mi(i,t,n)}}function Mt(e,t,n,s){if(_e(e)){const i=js(e,t,n,s);return i&&hr(i)&&i.catch(l=>{Mi(l,t,n)}),i}if(pe(e)){const i=[];for(let l=0;l<e.length;l++)i.push(Mt(e[l],t,n,s));return i}}function Mi(e,t,n,s=!0){const i=t?t.vnode:null,{errorHandler:l,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||Ne;if(t){let u=t.parent;const f=t.proxy,h=`https://vuejs.org/error-reference/#runtime-${n}`;for(;u;){const p=u.ec;if(p){for(let b=0;b<p.length;b++)if(p[b](e,f,h)===!1)return}u=u.parent}if(l){on(),js(l,null,10,[e,f,h]),ln();return}}kd(e,n,i,s,r)}function kd(e,t,n,s=!0,i=!1){if(i)throw e;console.error(e)}const rt=[];let Dt=-1;const Xn=[];let mn=null,Yn=0;const Ur=Promise.resolve();let ai=null;function Ri(e){const t=ai||Ur;return e?t.then(this?e.bind(this):e):t}function $d(e){let t=Dt+1,n=rt.length;for(;t<n;){const s=t+n>>>1,i=rt[s],l=Ts(i);l<e||l===e&&i.flags&2?t=s+1:n=s}return t}function ll(e){if(!(e.flags&1)){const t=Ts(e),n=rt[rt.length-1];!n||!(e.flags&2)&&t>=Ts(n)?rt.push(e):rt.splice($d(t),0,e),e.flags|=1,jr()}}function jr(){ai||(ai=Ur.then(Vr))}function xd(e){if(!pe(e))mn&&e.id===-1?mn.splice(Yn+1,0,e):e.flags&1||(Xn.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)Xn.push(e[t]);jr()}function Dl(e,t,n=Dt+1){for(;n<rt.length;n++){const s=rt[n];if(s&&s.flags&2){if(e&&s.id!==e.uid)continue;rt.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function Hr(e){if(Xn.length){const t=[...new Set(Xn)].sort((n,s)=>Ts(n)-Ts(s));if(Xn.length=0,mn){for(let n=0;n<t.length;n++)mn.push(t[n]);return}for(mn=t,Yn=0;Yn<mn.length;Yn++){const n=mn[Yn];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}mn=null,Yn=0}}const Ts=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Vr(e){try{for(Dt=0;Dt<rt.length;Dt++){const t=rt[Dt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),js(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;Dt<rt.length;Dt++){const t=rt[Dt];t&&(t.flags&=-2)}Dt=-1,rt.length=0,Hr(),ai=null,(rt.length||Xn.length)&&Vr()}}let mt=null,Wr=null;function ri(e){const t=mt;return mt=e,Wr=e&&e.type.__scopeId||null,t}function ne(e,t=mt,n){if(!t||e._n)return e;const s=(...i)=>{s._d&&di(-1);const l=ri(t),r=Un.length;let u;try{u=e(...i)}finally{for(let f=Un.length;f>r;f--)mc();ri(l),s._d&&di(1)}return u};return s._n=!0,s._c=!0,s._d=!0,s}function Ae(e,t){if(mt===null)return e;const n=Ui(mt),s=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[l,r,u,f=Ne]=t[i];l&&(_e(l)&&(l={mounted:l,updated:l}),l.deep&&Zt(r),s.push({dir:l,instance:n,value:r,oldValue:void 0,arg:u,modifiers:f}))}return e}function In(e,t,n,s){const i=e.dirs,l=t&&t.dirs;for(let r=0;r<i.length;r++){const u=i[r];l&&(u.oldValue=l[r].value);let f=u.dir[s];f&&(on(),Mt(f,n,8,[e.el,u,e,t]),ln())}}function Sd(e,t){if(st){let n=st.provides;const s=st.parent&&st.parent.provides;s===n&&(n=st.provides=Object.create(s)),n[e]=t}}function ws(e,t,n=!1){const s=gc();if(s||Zn){let i=Zn?Zn._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(i&&e in i)return i[e];if(arguments.length>1)return n&&_e(t)?t.call(s&&s.proxy):t}}const Cd=Symbol.for("v-scx"),Td=()=>ws(Cd);function St(e,t,n){return Br(e,t,n)}function Br(e,t,n=Ne){const{immediate:s,deep:i,flush:l,once:r}=n,u=tt({},n),f=t&&s||!t&&l!=="post";let h;if(Ps){if(l==="sync"){const y=Td();h=y.__watcherHandles||(y.__watcherHandles=[])}else if(!f){const y=()=>{};return y.stop=Wt,y.resume=Wt,y.pause=Wt,y}}const p=st;u.call=(y,M,E)=>Mt(y,p,M,E);let b=!1;l==="post"?u.scheduler=y=>{dt(y,p&&p.suspense)}:l!=="sync"&&(b=!0,u.scheduler=(y,M)=>{M?y():ll(y)}),u.augmentJob=y=>{t&&(y.flags|=4),b&&(y.flags|=2,p&&(y.id=p.uid,y.i=p))};const v=wd(e,t,u);return Ps&&(h?h.push(v):f&&v()),v}function Ed(e,t,n){const s=this.proxy,i=Be(e)?e.includes(".")?Kr(s,e):()=>s[e]:e.bind(s,s);let l;_e(t)?l=t:(l=t.handler,n=t);const r=Ws(this),u=Br(i,l.bind(s),n);return r(),u}function Kr(e,t){const n=t.split(".");return()=>{let s=e;for(let i=0;i<n.length&&s;i++)s=s[n[i]];return s}}const Ad=Symbol("_vte"),Ni=e=>e.__isTeleport,Zi=Symbol("_leaveCb");function Pd(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==an){t=n;break}}return t}function qr(e){if(!rl(e))return Ni(e.type)&&e.children?Pd(e.children):e;if(e.component)return e.component.subTree;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&_e(n.default))return n.default()}}function al(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;al(Ni(n.type)&&qr(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Me(e,t){return _e(e)?tt({name:e.name},t,{setup:e}):e}function zr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Ul(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const ci=new WeakMap;function ks(e,t,n,s,i=!1){if(pe(e)){e.forEach((E,x)=>ks(E,t&&(pe(t)?t[x]:t),n,s,i));return}if($s(s)&&!i){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&ks(e,t,n,s.component.subTree);return}const l=s.shapeFlag&4?Ui(s.component):s.el,r=i?null:l,{i:u,r:f}=e,h=t&&t.r,p=u.refs===Ne?u.refs={}:u.refs,b=u.setupState,v=xe(b),y=b===Ne?pr:E=>Ul(p,E)?!1:Ee(v,E),M=(E,x)=>!(x&&Ul(p,x));if(h!=null&&h!==f){if(jl(t),Be(h))p[h]=null,y(h)&&(b[h]=null);else if(et(h)){const E=t;M(h,E.k)&&(h.value=null),E.k&&(p[E.k]=null)}}if(_e(f))js(f,u,12,[r,p]);else{const E=Be(f),x=et(f);if(E||x){const O=()=>{if(e.f){const C=E?y(f)?b[f]:p[f]:M()||!e.k?f.value:p[e.k];if(i)pe(C)&&Jo(C,l);else if(pe(C))C.includes(l)||C.push(l);else if(E)p[f]=[l],y(f)&&(b[f]=p[f]);else{const F=[l];M(f,e.k)&&(f.value=F),e.k&&(p[e.k]=F)}}else E?(p[f]=r,y(f)&&(b[f]=r)):x&&(M(f,e.k)&&(f.value=r),e.k&&(p[e.k]=r))};if(r){const C=()=>{O(),ci.delete(e)};C.id=-1,ci.set(e,C),dt(C,n)}else jl(e),O()}}}function jl(e){const t=ci.get(e);t&&(t.flags|=8,ci.delete(e))}Ii().requestIdleCallback;Ii().cancelIdleCallback;const $s=e=>!!e.type.__asyncLoader,rl=e=>e.type.__isKeepAlive;function Od(e,t){Yr(e,"a",t)}function Id(e,t){Yr(e,"da",t)}function Yr(e,t,n=st){const s=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Fi(t,s,n),n){let i=n.parent;for(;i&&i.parent;)rl(i.parent.vnode)&&Ld(s,t,n,i),i=i.parent}}function Ld(e,t,n,s){const i=Fi(t,e,s,!0);cl(()=>{Jo(s[t],i)},n)}function Fi(e,t,n=st,s=!1){if(n){const i=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...r)=>{on();const u=Ws(n),f=Mt(t,n,e,r);return u(),ln(),f});return s?i.unshift(l):i.push(l),l}}const dn=e=>(t,n=st)=>{(!Ps||e==="sp")&&Fi(e,(...s)=>t(...s),n)},Md=dn("bm"),Tn=dn("m"),Rd=dn("bu"),Nd=dn("u"),os=dn("bum"),cl=dn("um"),Fd=dn("sp"),Dd=dn("rtg"),Ud=dn("rtc");function jd(e,t=st){Fi("ec",e,t)}const Gr="components";function Hs(e,t){return Xr(Gr,e,!0,t)||e}const Jr=Symbol.for("v-ndc");function Hd(e){return Be(e)?Xr(Gr,e,!1)||e:e||Jr}function Xr(e,t,n=!0,s=!1){const i=mt||st;if(i){const l=i.type;{const u=Sf(l,!1);if(u&&(u===t||u===ct(t)||u===Pi(ct(t))))return l}const r=Hl(i[e]||l[e],t)||Hl(i.appContext[e],t);return!r&&s?l:r}}function Hl(e,t){return e&&(e[t]||e[ct(t)]||e[Pi(ct(t))])}function he(e,t,n,s){let i;const l=n,r=pe(e);if(r||Be(e)){const u=r&&_n(e);let f=!1,h=!1;u&&(f=!xt(e),h=qt(e),e=Li(e)),i=new Array(e.length);for(let p=0,b=e.length;p<b;p++)i[p]=t(f?h?wn(Et(e[p])):Et(e[p]):e[p],p,void 0,l)}else if(typeof e=="number"){i=new Array(e);for(let u=0;u<e;u++)i[u]=t(u+1,u,void 0,l)}else if(Oe(e))if(e[Symbol.iterator])i=Array.from(e,(u,f)=>t(u,f,void 0,l));else{const u=Object.keys(e);i=new Array(u.length);for(let f=0,h=u.length;f<h;f++){const p=u[f];i[f]=t(e[p],p,f,l)}}else i=[];return i}const $o=e=>e?_c(e)?Ui(e):$o(e.parent):null,xs=tt(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=>$o(e.parent),$root:e=>$o(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Qr(e),$forceUpdate:e=>e.f||(e.f=()=>{ll(e.update)}),$nextTick:e=>e.n||(e.n=Ri.bind(e.proxy)),$watch:e=>Ed.bind(e)}),Qi=(e,t)=>e!==Ne&&!e.__isScriptSetup&&Ee(e,t),Vd={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:i,props:l,accessCache:r,type:u,appContext:f}=e;if(t[0]!=="$"){const v=r[t];if(v!==void 0)switch(v){case 1:return s[t];case 2:return i[t];case 4:return n[t];case 3:return l[t]}else{if(Qi(s,t))return r[t]=1,s[t];if(i!==Ne&&Ee(i,t))return r[t]=2,i[t];if(Ee(l,t))return r[t]=3,l[t];if(n!==Ne&&Ee(n,t))return r[t]=4,n[t];xo&&(r[t]=0)}}const h=xs[t];let p,b;if(h)return t==="$attrs"&&nt(e.attrs,"get",""),h(e);if((p=u.__cssModules)&&(p=p[t]))return p;if(n!==Ne&&Ee(n,t))return r[t]=4,n[t];if(b=f.config.globalProperties,Ee(b,t))return b[t]},set({_:e},t,n){const{data:s,setupState:i,ctx:l}=e;return Qi(i,t)?(i[t]=n,!0):s!==Ne&&Ee(s,t)?(s[t]=n,!0):Ee(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(l[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:i,props:l,type:r}},u){let f;return!!(n[u]||e!==Ne&&u[0]!=="$"&&Ee(e,u)||Qi(t,u)||Ee(l,u)||Ee(s,u)||Ee(xs,u)||Ee(i.config.globalProperties,u)||(f=r.__cssModules)&&f[u])},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ee(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Vl(e){return pe(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let xo=!0;function Wd(e){const t=Qr(e),n=e.proxy,s=e.ctx;xo=!1,t.beforeCreate&&Wl(t.beforeCreate,e,"bc");const{data:i,computed:l,methods:r,watch:u,provide:f,inject:h,created:p,beforeMount:b,mounted:v,beforeUpdate:y,updated:M,activated:E,deactivated:x,beforeDestroy:O,beforeUnmount:C,destroyed:F,unmounted:T,render:V,renderTracked:L,renderTriggered:k,errorCaptured:A,serverPrefetch:z,expose:P,inheritAttrs:ge,components:G,directives:ie,filters:be}=t;if(h&&Bd(h,s,null),r)for(const ye in r){const $e=r[ye];_e($e)&&(s[ye]=$e.bind(n))}if(i){const ye=i.call(n,n);Oe(ye)&&(e.data=Bn(ye))}if(xo=!0,l)for(const ye in l){const $e=l[ye],Ye=_e($e)?$e.bind(n,n):_e($e.get)?$e.get.bind(n,n):Wt,le=!_e($e)&&_e($e.set)?$e.set.bind(n):Wt,ee=$({get:Ye,set:le});Object.defineProperty(s,ye,{enumerable:!0,configurable:!0,get:()=>ee.value,set:ae=>ee.value=ae})}if(u)for(const ye in u)Zr(u[ye],s,n,ye);if(f){const ye=_e(f)?f.call(n):f;Reflect.ownKeys(ye).forEach($e=>{Sd($e,ye[$e])})}p&&Wl(p,e,"c");function ue(ye,$e){pe($e)?$e.forEach(Ye=>ye(Ye.bind(n))):$e&&ye($e.bind(n))}if(ue(Md,b),ue(Tn,v),ue(Rd,y),ue(Nd,M),ue(Od,E),ue(Id,x),ue(jd,A),ue(Ud,L),ue(Dd,k),ue(os,C),ue(cl,T),ue(Fd,z),pe(P))if(P.length){const ye=e.exposed||(e.exposed={});P.forEach($e=>{Object.defineProperty(ye,$e,{get:()=>n[$e],set:Ye=>n[$e]=Ye,enumerable:!0})})}else e.exposed||(e.exposed={});V&&e.render===Wt&&(e.render=V),ge!=null&&(e.inheritAttrs=ge),G&&(e.components=G),ie&&(e.directives=ie),z&&zr(e)}function Bd(e,t,n=Wt){pe(e)&&(e=So(e));for(const s in e){const i=e[s];let l;Oe(i)?"default"in i?l=ws(i.from||s,i.default,!0):l=ws(i.from||s):l=ws(i),et(l)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>l.value,set:r=>l.value=r}):t[s]=l}}function Wl(e,t,n){Mt(pe(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Zr(e,t,n,s){let i=s.includes(".")?Kr(n,s):()=>n[s];if(Be(e)){const l=t[e];_e(l)&&St(i,l)}else if(_e(e))St(i,e.bind(n));else if(Oe(e))if(pe(e))e.forEach(l=>Zr(l,t,n,s));else{const l=_e(e.handler)?e.handler.bind(n):t[e.handler];_e(l)&&St(i,l,e)}}function Qr(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:i,optionsCache:l,config:{optionMergeStrategies:r}}=e.appContext,u=l.get(t);let f;return u?f=u:!i.length&&!n&&!s?f=t:(f={},i.length&&i.forEach(h=>ui(f,h,r,!0)),ui(f,t,r)),Oe(t)&&l.set(t,f),f}function ui(e,t,n,s=!1){const{mixins:i,extends:l}=t;l&&ui(e,l,n,!0),i&&i.forEach(r=>ui(e,r,n,!0));for(const r in t)if(!(s&&r==="expose")){const u=Kd[r]||n&&n[r];e[r]=u?u(e[r],t[r]):t[r]}return e}const Kd={data:Bl,props:Kl,emits:Kl,methods:ps,computed:ps,beforeCreate:lt,created:lt,beforeMount:lt,mounted:lt,beforeUpdate:lt,updated:lt,beforeDestroy:lt,beforeUnmount:lt,destroyed:lt,unmounted:lt,activated:lt,deactivated:lt,errorCaptured:lt,serverPrefetch:lt,components:ps,directives:ps,watch:zd,provide:Bl,inject:qd};function Bl(e,t){return t?e?function(){return tt(_e(e)?e.call(this,this):e,_e(t)?t.call(this,this):t)}:t:e}function qd(e,t){return ps(So(e),So(t))}function So(e){if(pe(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function lt(e,t){return e?[...new Set([].concat(e,t))]:t}function ps(e,t){return e?tt(Object.create(null),e,t):t}function Kl(e,t){return e?pe(e)&&pe(t)?[...new Set([...e,...t])]:tt(Object.create(null),Vl(e),Vl(t??{})):t}function zd(e,t){if(!e)return t;if(!t)return e;const n=tt(Object.create(null),e);for(const s in t)n[s]=lt(e[s],t[s]);return n}function ec(){return{app:null,config:{isNativeTag:pr,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 Yd=0;function Gd(e,t){return function(s,i=null){_e(s)||(s=tt({},s)),i!=null&&!Oe(i)&&(i=null);const l=ec(),r=new WeakSet,u=[];let f=!1;const h=l.app={_uid:Yd++,_component:s,_props:i,_container:null,_context:l,_instance:null,version:Tf,get config(){return l.config},set config(p){},use(p,...b){return r.has(p)||(p&&_e(p.install)?(r.add(p),p.install(h,...b)):_e(p)&&(r.add(p),p(h,...b))),h},mixin(p){return l.mixins.includes(p)||l.mixins.push(p),h},component(p,b){return b?(l.components[p]=b,h):l.components[p]},directive(p,b){return b?(l.directives[p]=b,h):l.directives[p]},mount(p,b,v){if(!f){const y=h._ceVNode||te(s,i);return y.appContext=l,v===!0?v="svg":v===!1&&(v=void 0),e(y,p,v),f=!0,h._container=p,p.__vue_app__=h,Ui(y.component)}},onUnmount(p){u.push(p)},unmount(){f&&(Mt(u,h._instance,16),e(null,h._container),delete h._container.__vue_app__)},provide(p,b){return l.provides[p]=b,h},runWithContext(p){const b=Zn;Zn=h;try{return p()}finally{Zn=b}}};return h}}let Zn=null;const Jd=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ct(t)}Modifiers`]||e[`${Cn(t)}Modifiers`];function Xd(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Ne;let i=n;const l=t.startsWith("update:"),r=l&&Jd(s,t.slice(7));r&&(r.trim&&(i=n.map(p=>Be(p)?p.trim():p)),r.number&&(i=i.map(Oi)));let u,f=s[u=zi(t)]||s[u=zi(ct(t))];!f&&l&&(f=s[u=zi(Cn(t))]),f&&Mt(f,e,6,i);const h=s[u+"Once"];if(h){if(!e.emitted)e.emitted={};else if(e.emitted[u])return;e.emitted[u]=!0,Mt(h,e,6,i)}}const Zd=new WeakMap;function tc(e,t,n=!1){const s=n?Zd:t.emitsCache,i=s.get(e);if(i!==void 0)return i;const l=e.emits;let r={},u=!1;if(!_e(e)){const f=h=>{const p=tc(h,t,!0);p&&(u=!0,tt(r,p))};!n&&t.mixins.length&&t.mixins.forEach(f),e.extends&&f(e.extends),e.mixins&&e.mixins.forEach(f)}return!l&&!u?(Oe(e)&&s.set(e,null),null):(pe(l)?l.forEach(f=>r[f]=null):tt(r,l),Oe(e)&&s.set(e,r),r)}function Di(e,t){return!e||!Ti(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Ee(e,t[0].toLowerCase()+t.slice(1))||Ee(e,Cn(t))||Ee(e,t))}function ql(e){const{type:t,vnode:n,proxy:s,withProxy:i,propsOptions:[l],slots:r,attrs:u,emit:f,render:h,renderCache:p,props:b,data:v,setupState:y,ctx:M,inheritAttrs:E}=e,x=ri(e);let O,C;try{if(n.shapeFlag&4){const T=i||s,V=T;O=Ht(h.call(V,T,p,b,y,v,M)),C=u}else{const T=t;O=Ht(T.length>1?T(b,{attrs:u,slots:r,emit:f}):T(b,null)),C=t.props?u:Qd(u)}}catch(T){Un.length=0,Mi(T,e,1),O=te(an)}let F=O;if(C&&E!==!1){const T=Object.keys(C),{shapeFlag:V}=F;T.length&&V&7&&(l&&T.some(Ei)&&(C=ef(C,l)),F=ts(F,C,!1,!0))}if(n.dirs&&(F=ts(F,null,!1,!0),F.dirs=F.dirs?F.dirs.concat(n.dirs):n.dirs),n.transition){const T=Ni(F.type)&&qr(F)||F;al(T,n.transition)}return O=F,ri(x),O}const Qd=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ti(n))&&((t||(t={}))[n]=e[n]);return t},ef=(e,t)=>{const n={};for(const s in e)(!Ei(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function tf(e,t,n){const{props:s,children:i,component:l}=e,{props:r,children:u,patchFlag:f}=t,h=l.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&f>=0){if(f&1024)return!0;if(f&16)return s?zl(s,r,h):!!r;if(f&8){const p=t.dynamicProps;for(let b=0;b<p.length;b++){const v=p[b];if(nc(r,s,v)&&!Di(h,v))return!0}}}else return(i||u)&&(!u||!u.$stable)?!0:s===r?!1:s?r?zl(s,r,h):!0:!!r;return!1}function zl(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let i=0;i<s.length;i++){const l=s[i];if(nc(t,e,l)&&!Di(n,l))return!0}return!1}function nc(e,t,n){const s=e[n],i=t[n];return n==="style"&&Oe(s)&&Oe(i)?!Lt(s,i):s!==i}function nf({vnode:e,parent:t,suspense:n},s){for(;t;){const i=t.subTree;if(i.suspense&&i.suspense.activeBranch===e&&(i.suspense.vnode.el=i.el=s,e=i),i===e)(e=t.vnode).el=s,t=t.parent;else break}n&&n.activeBranch===e&&(n.vnode.el=s)}const sc={},ic=()=>Object.create(sc),oc=e=>Object.getPrototypeOf(e)===sc;function sf(e,t,n,s=!1){const i={},l=ic();e.propsDefaults=Object.create(null),lc(e,t,i,l);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);n?e.props=s?i:pd(i):e.type.props?e.props=i:e.props=l,e.attrs=l}function of(e,t,n,s){const{props:i,attrs:l,vnode:{patchFlag:r}}=e,u=xe(i),[f]=e.propsOptions;let h=!1;if((s||r>0)&&!(r&16)){if(r&8){const p=e.vnode.dynamicProps;for(let b=0;b<p.length;b++){let v=p[b];if(Di(e.emitsOptions,v))continue;const y=t[v];if(f)if(Ee(l,v))y!==l[v]&&(l[v]=y,h=!0);else{const M=ct(v);i[M]=Co(f,u,M,y,e,!1)}else y!==l[v]&&(l[v]=y,h=!0)}}}else{lc(e,t,i,l)&&(h=!0);let p;for(const b in u)(!t||!Ee(t,b)&&((p=Cn(b))===b||!Ee(t,p)))&&(f?n&&(n[b]!==void 0||n[p]!==void 0)&&(i[b]=Co(f,u,b,void 0,e,!0)):delete i[b]);if(l!==u)for(const b in l)(!t||!Ee(t,b))&&(delete l[b],h=!0)}h&&Xt(e.attrs,"set","")}function lc(e,t,n,s){const[i,l]=e.propsOptions;let r=!1,u;if(t)for(let f in t){if(gs(f))continue;const h=t[f];let p;i&&Ee(i,p=ct(f))?!l||!l.includes(p)?n[p]=h:(u||(u={}))[p]=h:Di(e.emitsOptions,f)||(!(f in s)||h!==s[f])&&(s[f]=h,r=!0)}if(l){const f=xe(n),h=u||Ne;for(let p=0;p<l.length;p++){const b=l[p];n[b]=Co(i,f,b,h[b],e,!Ee(h,b))}}return r}function Co(e,t,n,s,i,l){const r=e[n];if(r!=null){const u=Ee(r,"default");if(u&&s===void 0){const f=r.default;if(r.type!==Function&&!r.skipFactory&&_e(f)){const{propsDefaults:h}=i;if(n in h)s=h[n];else{const p=Ws(i);s=h[n]=f.call(null,t),p()}}else s=f;i.ce&&i.ce._setProp(n,s)}r[0]&&(l&&!u?s=!1:r[1]&&(s===""||s===Cn(n))&&(s=!0))}return s}const lf=new WeakMap;function ac(e,t,n=!1){const s=n?lf:t.propsCache,i=s.get(e);if(i)return i;const l=e.props,r={},u=[];let f=!1;if(!_e(e)){const p=b=>{f=!0;const[v,y]=ac(b,t,!0);tt(r,v),y&&u.push(...y)};!n&&t.mixins.length&&t.mixins.forEach(p),e.extends&&p(e.extends),e.mixins&&e.mixins.forEach(p)}if(!l&&!f)return Oe(e)&&s.set(e,Nn),Nn;if(pe(l))for(let p=0;p<l.length;p++){const b=ct(l[p]);Yl(b)&&(r[b]=Ne)}else if(l)for(const p in l){const b=ct(p);if(Yl(b)){const v=l[p],y=r[b]=pe(v)||_e(v)?{type:v}:tt({},v),M=y.type;let E=!1,x=!0;if(pe(M))for(let O=0;O<M.length;++O){const C=M[O],F=_e(C)&&C.name;if(F==="Boolean"){E=!0;break}else F==="String"&&(x=!1)}else E=_e(M)&&M.name==="Boolean";y[0]=E,y[1]=x,(E||Ee(y,"default"))&&u.push(b)}}const h=[r,u];return Oe(e)&&s.set(e,h),h}function Yl(e){return e[0]!=="$"&&!gs(e)}const ul=e=>e==="_"||e==="_ctx"||e==="$stable",dl=e=>pe(e)?e.map(Ht):[Ht(e)],af=(e,t,n)=>{if(t._n)return t;const s=ne((...i)=>dl(t(...i)),n);return s._c=!1,s},rc=(e,t,n)=>{const s=e._ctx;for(const i in e){if(ul(i))continue;const l=e[i];if(_e(l))t[i]=af(i,l,s);else if(l!=null){const r=dl(l);t[i]=()=>r}}},cc=(e,t)=>{const n=dl(t);e.slots.default=()=>n},uc=(e,t,n)=>{for(const s in t)(n||!ul(s))&&(e[s]=t[s])},rf=(e,t,n)=>{const s=e.slots=ic();if(e.vnode.shapeFlag&32){const i=t._;i?(uc(s,t,n),n&&vr(s,"_",i,!0)):rc(t,s)}else t&&cc(e,t)},cf=(e,t,n)=>{const{vnode:s,slots:i}=e;let l=!0,r=Ne;if(s.shapeFlag&32){const u=t._;u?n&&u===1?l=!1:uc(i,t,n):(l=!t.$stable,rc(t,i)),r=t}else t&&(cc(e,t),r={default:1});if(l)for(const u in i)!ul(u)&&r[u]==null&&delete i[u]},dt=hf;function uf(e){return df(e)}function df(e,t){const n=Ii();n.__VUE__=!0;const{insert:s,remove:i,patchProp:l,createElement:r,createText:u,createComment:f,setText:h,setElementText:p,parentNode:b,nextSibling:v,setScopeId:y=Wt,insertStaticContent:M}=e,E=(w,S,R,W=null,D=null,j=null,J=void 0,Y=null,q=!!S.dynamicChildren)=>{if(w===S)return;w&&!us(w,S)&&(W=we(w),ae(w,D,j,!0),w=null),S.patchFlag===-2&&(q=!1,S.dynamicChildren=null),S.dynamicChildren&&w&&w.dynamicChildren&&w.dynamicChildren.hasOnce&&(S.dynamicChildren===Nn&&(S.dynamicChildren=[]),S.dynamicChildren.hasOnce=!0);const{type:U,ref:ce,shapeFlag:Q}=S;switch(U){case Vs:x(w,S,R,W);break;case an:O(w,S,R,W);break;case to:w==null&&C(S,R,W,J);break;case B:G(w,S,R,W,D,j,J,Y,q);break;default:Q&1?V(w,S,R,W,D,j,J,Y,q):Q&6?ie(w,S,R,W,D,j,J,Y,q):(Q&64||Q&128)&&U.process(w,S,R,W,D,j,J,Y,q,On)}ce!=null&&D?ks(ce,w&&w.ref,j,S||w,!S):ce==null&&w&&w.ref!=null&&ks(w.ref,null,j,w,!0)},x=(w,S,R,W)=>{if(w==null)s(S.el=u(S.children),R,W);else{const D=S.el=w.el;S.children!==w.children&&h(D,S.children)}},O=(w,S,R,W)=>{w==null?s(S.el=f(S.children||""),R,W):S.el=w.el},C=(w,S,R,W)=>{[w.el,w.anchor]=M(w.children,S,R,W,w.el,w.anchor)},F=({el:w,anchor:S},R,W)=>{let D;for(;w&&w!==S;)D=v(w),s(w,R,W),w=D;s(S,R,W)},T=({el:w,anchor:S})=>{let R;for(;w&&w!==S;)R=v(w),i(w),w=R;i(S)},V=(w,S,R,W,D,j,J,Y,q)=>{if(S.type==="svg"?J="svg":S.type==="math"&&(J="mathml"),w==null)L(S,R,W,D,j,J,Y,q);else{const U=w.el&&w.el._isVueCE?w.el:null;try{U&&U._beginPatch(),z(w,S,D,j,J,Y,q)}finally{U&&U._endPatch()}}},L=(w,S,R,W,D,j,J,Y)=>{let q,U;const{props:ce,shapeFlag:Q,transition:Z,dirs:I}=w;if(q=w.el=r(w.type,j,ce&&ce.is,ce),Q&8?p(q,w.children):Q&16&&A(w.children,q,null,W,D,eo(w,j),J,Y),I&&In(w,null,W,"created"),k(q,w,w.scopeId,J,W),ce){for(const re in ce)re!=="value"&&!gs(re)&&l(q,re,null,ce[re],j,W);"value"in ce&&l(q,"value",null,ce.value,j),(U=ce.onVnodeBeforeMount)&&Ft(U,W,w)}I&&In(w,null,W,"beforeMount");const N=ff(D,Z);N&&Z.beforeEnter(q),s(q,S,R),((U=ce&&ce.onVnodeMounted)||N||I)&&dt(()=>{U&&Ft(U,W,w),N&&Z.enter(q),I&&In(w,null,W,"mounted")},D)},k=(w,S,R,W,D)=>{if(R&&y(w,R),W)for(let j=0;j<W.length;j++)y(w,W[j]);if(D){let j=D.subTree;if(S===j||hc(j.type)&&(j.ssContent===S||j.ssFallback===S)){const J=D.vnode;k(w,J,J.scopeId,J.slotScopeIds,D.parent)}}},A=(w,S,R,W,D,j,J,Y,q=0)=>{for(let U=q;U<w.length;U++){const ce=w[U]=Y?Gt(w[U]):Ht(w[U]);E(null,ce,S,R,W,D,j,J,Y)}},z=(w,S,R,W,D,j,J)=>{const Y=S.el=w.el;let{patchFlag:q,dynamicChildren:U,dirs:ce}=S;q|=w.patchFlag&16;const Q=w.props||Ne,Z=S.props||Ne;let I;if(R&&Ln(R,!1),(I=Z.onVnodeBeforeUpdate)&&Ft(I,R,S,w),ce&&In(S,w,R,"beforeUpdate"),R&&Ln(R,!0),U&&(!w.dynamicChildren||w.dynamicChildren.length!==U.length)&&(q=0,J=!1,U=null),(Q.innerHTML&&Z.innerHTML==null||Q.textContent&&Z.textContent==null)&&p(Y,""),U?P(w.dynamicChildren,U,Y,R,W,eo(S,D),j):J||$e(w,S,Y,null,R,W,eo(S,D),j,!1),q>0){if(q&16)ge(Y,Q,Z,R,D);else if(q&2&&Q.class!==Z.class&&l(Y,"class",null,Z.class,D),q&4&&l(Y,"style",Q.style,Z.style,D),q&8){const N=S.dynamicProps;for(let re=0;re<N.length;re++){const fe=N[re],Ie=Q[fe],Ue=Z[fe];(Ue!==Ie||fe==="value")&&l(Y,fe,Ie,Ue,D,R)}}q&1&&w.children!==S.children&&p(Y,S.children)}else!J&&U==null&&ge(Y,Q,Z,R,D);((I=Z.onVnodeUpdated)||ce)&&dt(()=>{I&&Ft(I,R,S,w),ce&&In(S,w,R,"updated")},W)},P=(w,S,R,W,D,j,J)=>{for(let Y=0;Y<S.length;Y++){const q=w[Y],U=S[Y],ce=q.el&&(q.type===B||!us(q,U)||q.shapeFlag&198)?b(q.el):R;E(q,U,ce,null,W,D,j,J,!0)}},ge=(w,S,R,W,D)=>{if(S!==R){if(S!==Ne)for(const j in S)!gs(j)&&!(j in R)&&l(w,j,S[j],null,D,W);for(const j in R){if(gs(j))continue;const J=R[j],Y=S[j];J!==Y&&j!=="value"&&l(w,j,Y,J,D,W)}"value"in R&&l(w,"value",S.value,R.value,D)}},G=(w,S,R,W,D,j,J,Y,q)=>{const U=S.el=w?w.el:u(""),ce=S.anchor=w?w.anchor:u("");let{patchFlag:Q,dynamicChildren:Z,slotScopeIds:I}=S;I&&(Y=Y?Y.concat(I):I),w==null?(s(U,R,W),s(ce,R,W),A(S.children||[],R,ce,D,j,J,Y,q)):Q>0&&Q&64&&Z&&w.dynamicChildren&&w.dynamicChildren.length===Z.length?(P(w.dynamicChildren,Z,R,D,j,J,Y),(S.key!=null||D&&S===D.subTree)&&dc(w,S,!0)):$e(w,S,R,ce,D,j,J,Y,q)},ie=(w,S,R,W,D,j,J,Y,q)=>{S.slotScopeIds=Y,w==null?S.shapeFlag&512?D.ctx.activate(S,R,W,J,q):be(S,R,W,D,j,J,q):se(w,S,q)},be=(w,S,R,W,D,j,J)=>{const Y=w.component=yf(w,W,D);if(rl(w)&&(Y.ctx.renderer=On),wf(Y,!1,J),Y.asyncDep){if(D&&D.registerDep(Y,ue,J),!w.el){const q=Y.subTree=te(an);O(null,q,S,R),w.placeholder=q.el}}else ue(Y,w,S,R,D,j,J)},se=(w,S,R)=>{const W=S.component=w.component;if(tf(w,S,R))if(W.asyncDep&&!W.asyncResolved){S.el=w.el,ye(W,S,R);return}else W.next=S,W.update();else S.el=w.el,W.vnode=S},ue=(w,S,R,W,D,j,J)=>{const Y=()=>{if(w.isMounted){let{next:Q,bu:Z,u:I,parent:N,vnode:re}=w;{const yt=fc(w);if(yt){Q&&(Q.el=re.el,ye(w,Q,J)),yt.asyncDep.then(()=>{dt(()=>{w.isUnmounted||U()},D)});return}}let fe=Q,Ie;Ln(w,!1),Q?(Q.el=re.el,ye(w,Q,J)):Q=re,Z&&ni(Z),(Ie=Q.props&&Q.props.onVnodeBeforeUpdate)&&Ft(Ie,N,Q,re),Ln(w,!0);const Ue=ql(w),We=w.subTree;w.subTree=Ue,E(We,Ue,b(We.el),we(We),w,D,j),Q.el=Ue.el,fe===null&&nf(w,Ue.el),I&&dt(I,D),(Ie=Q.props&&Q.props.onVnodeUpdated)&&dt(()=>Ft(Ie,N,Q,re),D)}else{let Q;const{el:Z,props:I}=S,{bm:N,m:re,parent:fe,root:Ie,type:Ue}=w,We=$s(S);Ln(w,!1),N&&ni(N),!We&&(Q=I&&I.onVnodeBeforeMount)&&Ft(Q,fe,S),Ln(w,!0);{Ie.ce&&Ie.ce._hasShadowRoot()&&Ie.ce._injectChildStyle(Ue,w.parent?w.parent.type:void 0);const yt=w.subTree=ql(w);E(null,yt,R,W,w,D,j),S.el=yt.el}if(re&&dt(re,D),!We&&(Q=I&&I.onVnodeMounted)){const yt=S;dt(()=>Ft(Q,fe,yt),D)}(S.shapeFlag&256||fe&&$s(fe.vnode)&&fe.vnode.shapeFlag&256)&&w.a&&dt(w.a,D),w.isMounted=!0,S=R=W=null}};w.scope.on();const q=w.effect=new $r(Y);w.scope.off();const U=w.update=q.run.bind(q),ce=w.job=q.runIfDirty.bind(q);ce.i=w,ce.id=w.uid,q.scheduler=()=>ll(ce),Ln(w,!0),U()},ye=(w,S,R)=>{S.component=w;const W=w.vnode.props;w.vnode=S,w.next=null,of(w,S.props,W,R),cf(w,S.children,R),on(),Dl(w),ln()},$e=(w,S,R,W,D,j,J,Y,q=!1)=>{const U=w&&w.children,ce=w?w.shapeFlag:0,Q=S.children,{patchFlag:Z,shapeFlag:I}=S;if(Z>0){if(Z&128){le(U,Q,R,W,D,j,J,Y,q);return}else if(Z&256){Ye(U,Q,R,W,D,j,J,Y,q);return}}I&8?(ce&16&&Te(U,D,j),Q!==U&&p(R,Q)):ce&16?I&16?le(U,Q,R,W,D,j,J,Y,q):Te(U,D,j,!0):(ce&8&&p(R,""),I&16&&A(Q,R,W,D,j,J,Y,q))},Ye=(w,S,R,W,D,j,J,Y,q)=>{w=w||Nn,S=S||Nn;const U=w.length,ce=S.length,Q=Math.min(U,ce);let Z;for(Z=0;Z<Q;Z++){const I=S[Z]=q?Gt(S[Z]):Ht(S[Z]);E(w[Z],I,R,null,D,j,J,Y,q)}U>ce?Te(w,D,j,!0,!1,Q):A(S,R,W,D,j,J,Y,q,Q)},le=(w,S,R,W,D,j,J,Y,q)=>{let U=0;const ce=S.length;let Q=w.length-1,Z=ce-1;for(;U<=Q&&U<=Z;){const I=w[U],N=S[U]=q?Gt(S[U]):Ht(S[U]);if(us(I,N))E(I,N,R,null,D,j,J,Y,q);else break;U++}for(;U<=Q&&U<=Z;){const I=w[Q],N=S[Z]=q?Gt(S[Z]):Ht(S[Z]);if(us(I,N))E(I,N,R,null,D,j,J,Y,q);else break;Q--,Z--}if(U>Q){if(U<=Z){const I=Z+1,N=I<ce?S[I].el:W;for(;U<=Z;)E(null,S[U]=q?Gt(S[U]):Ht(S[U]),R,N,D,j,J,Y,q),U++}}else if(U>Z)for(;U<=Q;)ae(w[U],D,j,!0),U++;else{const I=U,N=U,re=new Map;for(U=N;U<=Z;U++){const ht=S[U]=q?Gt(S[U]):Ht(S[U]);ht.key!=null&&re.set(ht.key,U)}let fe,Ie=0;const Ue=Z-N+1;let We=!1,yt=0;const qn=new Array(Ue);for(U=0;U<Ue;U++)qn[U]=0;for(U=I;U<=Q;U++){const ht=w[U];if(Ie>=Ue){ae(ht,D,j,!0);continue}let Nt;if(ht.key!=null)Nt=re.get(ht.key);else for(fe=N;fe<=Z;fe++)if(qn[fe-N]===0&&us(ht,S[fe])){Nt=fe;break}Nt===void 0?ae(ht,D,j,!0):(qn[Nt-N]=U+1,Nt>=yt?yt=Nt:We=!0,E(ht,S[Nt],R,null,D,j,J,Y,q),Ie++)}const Al=We?pf(qn):Nn;for(fe=Al.length-1,U=Ue-1;U>=0;U--){const ht=N+U,Nt=S[ht],Pl=S[ht+1],Ol=ht+1<ce?Pl.el||pc(Pl):W;qn[U]===0?E(null,Nt,R,Ol,D,j,J,Y,q):We&&(fe<0||U!==Al[fe]?ee(Nt,R,Ol,2):fe--)}}},ee=(w,S,R,W,D=null)=>{const{el:j,type:J,transition:Y,children:q,shapeFlag:U}=w;if(U&6){ee(w.component.subTree,S,R,W);return}if(U&128){w.suspense.move(S,R,W);return}if(U&64){J.move(w,S,R,On);return}if(J===B){s(j,S,R);for(let Q=0;Q<q.length;Q++)ee(q[Q],S,R,W);s(w.anchor,S,R);return}if(J===to){F(w,S,R);return}if(W!==2&&U&1&&Y)if(W===0)Y.persisted&&!j[Zi]?s(j,S,R):(Y.beforeEnter(j),s(j,S,R),dt(()=>Y.enter(j),D));else{const{leave:Q,delayLeave:Z,afterLeave:I}=Y,N=()=>{w.ctx.isUnmounted?i(j):s(j,S,R)},re=()=>{const fe=j._isLeaving||!!j[Zi];j._isLeaving&&j[Zi](!0),Y.persisted&&!fe?N():Q(j,()=>{N(),I&&I()})};Z?Z(j,N,re):re()}else s(j,S,R)},ae=(w,S,R,W=!1,D=!1)=>{const{type:j,props:J,ref:Y,children:q,dynamicChildren:U,shapeFlag:ce,patchFlag:Q,dirs:Z,cacheIndex:I,memo:N}=w;if((Q===-2||U&&U.hasOnce)&&(D=!1),Y!=null&&(on(),ks(Y,null,R,w,!0),ln()),I!=null&&(!w.ctx||w.ctx===S)&&(S.renderCache[I]=void 0),ce&256){S.ctx.deactivate(w);return}const re=ce&1&&Z,fe=!$s(w);let Ie;if(fe&&(Ie=J&&J.onVnodeBeforeUnmount)&&Ft(Ie,S,w),ce&6)K(w.component,R,W);else{if(ce&128){w.suspense.unmount(R,W);return}re&&In(w,null,S,"beforeUnmount"),ce&64?w.type.remove(w,S,R,On,W):U&&!U.hasOnce&&(j!==B||Q>0&&Q&64)?Te(U,S,R,!1,!0):(j===B&&Q&384||!D&&ce&16)&&Te(q,S,R),W&&de(w)}const Ue=N!=null&&I==null;(fe&&(Ie=J&&J.onVnodeUnmounted)||re||Ue)&&dt(()=>{Ie&&Ft(Ie,S,w),re&&In(w,null,S,"unmounted"),Ue&&(w.el=null)},R)},de=w=>{const{type:S,el:R,anchor:W,transition:D}=w;if(S===B){X(R,W);return}if(S===to){T(w),D&&!D.persisted&&D.afterLeave&&D.afterLeave();return}const j=()=>{i(R),D&&!D.persisted&&D.afterLeave&&D.afterLeave()};if(w.shapeFlag&1&&D&&!D.persisted){const{leave:J,delayLeave:Y}=D,q=()=>J(R,j);Y?Y(w.el,j,q):q()}else j()},X=(w,S)=>{let R;for(;w!==S;)R=v(w),i(w),w=R;i(S)},K=(w,S,R)=>{const{bum:W,scope:D,job:j,subTree:J,um:Y,m:q,a:U}=w;Gl(q),Gl(U),W&&ni(W),D.stop(),j?(j.flags|=8,ae(J,w,S,R)):w.vnode.el&&J&&(J.transition=w.vnode.transition,ae(J,w,S,R)),Y&&dt(Y,S),dt(()=>{w.isUnmounted=!0},S)},Te=(w,S,R,W=!1,D=!1,j=0)=>{for(let J=j;J<w.length;J++)ae(w[J],S,R,W,D)},we=w=>{if(w.shapeFlag&6)return we(w.component.subTree);if(w.shapeFlag&128)return w.suspense.next();const S=v(w.anchor||w.el),R=S&&S[Ad];return R?v(R):S};let rs=!1;const zs=(w,S,R)=>{let W;w==null?S._vnode&&(ae(S._vnode,null,null,!0),W=S._vnode.component):E(S._vnode||null,w,S,null,null,null,R),S._vnode=w,rs||(rs=!0,Dl(W),Hr(),rs=!1)},On={p:E,um:ae,m:ee,r:de,mt:be,mc:A,pc:$e,pbc:P,n:we,o:e};return{render:zs,hydrate:void 0,createApp:Gd(zs)}}function eo({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Ln({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function ff(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function dc(e,t,n=!1){const s=e.children,i=t.children;if(pe(s)&&pe(i))for(let l=0;l<s.length;l++){const r=s[l];let u=i[l];u.shapeFlag&1&&!u.dynamicChildren&&((u.patchFlag<=0||u.patchFlag===32)&&(u=i[l]=Gt(i[l]),u.el=r.el),!n&&u.patchFlag!==-2&&dc(r,u)),u.type===Vs&&(u.patchFlag===-1&&(u=i[l]=Gt(u)),u.el=r.el),u.type===an&&!u.el&&(u.el=r.el)}}function pf(e){const t=e.slice(),n=[0];let s,i,l,r,u;const f=e.length;for(s=0;s<f;s++){const h=e[s];if(h!==0){if(i=n[n.length-1],e[i]<h){t[s]=i,n.push(s);continue}for(l=0,r=n.length-1;l<r;)u=l+r>>1,e[n[u]]<h?l=u+1:r=u;h<e[n[l]]&&(l>0&&(t[s]=n[l-1]),n[l]=s)}}for(l=n.length,r=n[l-1];l-- >0;)n[l]=r,r=t[r];return n}function fc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:fc(t)}function Gl(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function pc(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?pc(t.subTree):null}const hc=e=>e.__isSuspense;function hf(e,t){t&&t.pendingBranch?pe(e)?t.effects.push(...e):t.effects.push(e):xd(e)}const B=Symbol.for("v-fgt"),Vs=Symbol.for("v-txt"),an=Symbol.for("v-cmt"),to=Symbol.for("v-stc"),Un=[];let bt=null;function g(e=!1){Un.push(bt=e?null:[])}function mc(){Un.pop(),bt=Un[Un.length-1]||null}let Es=1;function di(e,t=!1){Es+=e,e<0&&bt&&t&&(bt.hasOnce=!0)}function bc(e){return e.dynamicChildren=Es>0?bt||Nn:null,mc(),Es>0&&bt&&bt.push(e),e}function _(e,t,n,s,i,l){return bc(o(e,t,n,s,i,l,!0))}function it(e,t,n,s,i){return bc(te(e,t,n,s,i,!0))}function fi(e){return e?e.__v_isVNode===!0:!1}function us(e,t){return e.type===t.type&&e.key===t.key}const vc=({key:e})=>e??null,si=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Be(e)||et(e)||_e(e)?{i:mt,r:e,k:t,f:!!n}:e:null);function o(e,t=null,n=null,s=0,i=null,l=e===B?0:1,r=!1,u=!1){const f={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&vc(t),ref:t&&si(t),scopeId:Wr,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:l,patchFlag:s,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:mt};return u?(pi(f,n),l&128&&e.normalize(f)):n&&(f.shapeFlag|=Be(n)?8:16),Es>0&&!r&&bt&&(f.patchFlag>0||l&6)&&f.patchFlag!==32&&bt.push(f),f}const te=mf;function mf(e,t=null,n=null,s=0,i=null,l=!1){if((!e||e===Jr)&&(e=an),fi(e)){const u=ts(e,t,!0);return n&&pi(u,n),Es>0&&!l&&bt&&(u.shapeFlag&6?bt[bt.indexOf(e)]=u:bt.push(u)),u.patchFlag=-2,u}if(Cf(e)&&(e=e.__vccOpts),t){t=bf(t);let{class:u,style:f}=t;u&&!Be(u)&&(t.class=me(u)),Oe(f)&&(ol(f)&&!pe(f)&&(f=tt({},f)),t.style=je(f))}const r=Be(e)?1:hc(e)?128:Ni(e)?64:Oe(e)?4:_e(e)?2:0;return o(e,t,n,s,i,r,l,!0)}function bf(e){return e?ol(e)||oc(e)?tt({},e):e:null}function ts(e,t,n=!1,s=!1){const{props:i,ref:l,patchFlag:r,children:u,transition:f}=e,h=t?vf(i||{},t):i,p={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&vc(h),ref:t&&t.ref?n&&l?pe(l)?l.concat(si(t)):[l,si(t)]:si(t):l,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:u,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==B?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:f,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&ts(e.ssContent),ssFallback:e.ssFallback&&ts(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return f&&s&&al(p,f.clone(p)),p}function Re(e=" ",t=0){return te(Vs,null,e,t)}function H(e="",t=!1){return t?(g(),it(an,null,e)):te(an,null,e)}function Ht(e){return e==null||typeof e=="boolean"?te(an):pe(e)?te(B,null,e.slice()):fi(e)?Gt(e):te(Vs,null,String(e))}function Gt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ts(e)}function pi(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(pe(t))n=16;else if(typeof t=="object")if(s&65){const i=t.default;i&&(i._c&&(i._d=!1),pi(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!oc(t)?t._ctx=mt:i===3&&mt&&(mt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(_e(t)){if(s&65){pi(e,{default:t});return}t={default:t,_ctx:mt},n=32}else t=String(t),s&64?(n=16,t=[Re(t)]):n=8;e.children=t,e.shapeFlag|=n}function vf(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const i in s)if(i==="class")t.class!==s.class&&(t.class=me([t.class,s.class]));else if(i==="style")t.style=je([t.style,s.style]);else if(Ti(i)){const l=t[i],r=s[i];r&&l!==r&&!(pe(l)&&l.includes(r))?t[i]=l?[].concat(l,r):r:r==null&&l==null&&!Ei(i)&&(t[i]=r)}else i!==""&&(t[i]=s[i])}return t}function Ft(e,t,n,s=null){Mt(e,t,7,[n,s])}const gf=ec();let _f=0;function yf(e,t,n){const s=e.type,i=(t?t.appContext:e.appContext)||gf,l={uid:_f++,vnode:e,type:s,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new wr(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(i.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ac(s,i),emitsOptions:tc(s,i),emit:null,emitted:null,propsDefaults:Ne,inheritAttrs:s.inheritAttrs,ctx:Ne,data:Ne,props:Ne,attrs:Ne,slots:Ne,refs:Ne,setupState:Ne,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return l.ctx={_:l},l.root=t?t.root:l,l.emit=Xd.bind(null,l),e.ce&&e.ce(l),l}let st=null;const gc=()=>st||mt;let hi,As;{const e=Ii(),t=(n,s)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(s),l=>{i.length>1?i.forEach(r=>r(l)):i[0](l)}};hi=t("__VUE_INSTANCE_SETTERS__",n=>st=n),As=t("__VUE_SSR_SETTERS__",n=>Ps=n)}const Ws=e=>{const t=st;return hi(e),e.scope.on(),()=>{e.scope.off(),hi(t)}},Jl=()=>{st&&st.scope.off(),hi(null)};function _c(e){return e.vnode.shapeFlag&4}let Ps=!1;function wf(e,t=!1,n=!1){t&&As(t);const{props:s,children:i}=e.vnode,l=_c(e);sf(e,s,l,t),rf(e,i,n||t);const r=l?kf(e,t):void 0;return t&&As(!1),r}function kf(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Vd);const{setup:s}=n;if(s){on();const i=e.setupContext=s.length>1?xf(e):null,l=Ws(e),r=js(s,e,0,[e.props,i]),u=hr(r);if(ln(),l(),(u||e.sp)&&!$s(e)&&zr(e),u){if(r.then(Jl,Jl),t)return r.then(f=>{As(!0);try{Xl(e,f,t)}finally{As(!1)}}).catch(f=>{Mi(f,e,0)});e.asyncDep=r}else Xl(e,r)}else yc(e)}function Xl(e,t,n){_e(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Oe(t)&&(e.setupState=Dr(t)),yc(e)}function yc(e,t,n){const s=e.type;e.render||(e.render=s.render||Wt);{const i=Ws(e);on();try{Wd(e)}finally{ln(),i()}}}const $f={get(e,t){return nt(e,"get",""),e[t]}};function xf(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,$f),slots:e.slots,emit:e.emit,expose:t}}function Ui(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Dr(hd(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in xs)return xs[n](e)},has(t,n){return n in t||n in xs}})):e.proxy}function Sf(e,t=!0){return _e(e)?e.displayName||e.name:e.name||t&&e.__name}function Cf(e){return _e(e)&&"__vccOpts"in e}const $=(e,t)=>_d(e,t,Ps);function mi(e,t,n){try{di(-1);const s=arguments.length;return s===2?Oe(t)&&!pe(t)?fi(t)?te(e,null,[t]):te(e,t):te(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&fi(n)&&(n=[n]),te(e,t,n))}finally{di(1)}}const Tf="3.5.43";let To;const Zl=typeof window<"u"&&window.trustedTypes;if(Zl)try{To=Zl.createPolicy("vue",{createHTML:e=>e})}catch{}const wc=To?e=>To.createHTML(e):e=>e,Ef="http://www.w3.org/2000/svg",Af="http://www.w3.org/1998/Math/MathML",Yt=typeof document<"u"?document:null,Ql=Yt&&Yt.createElement("template"),Pf={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const i=t==="svg"?Yt.createElementNS(Ef,e):t==="mathml"?Yt.createElementNS(Af,e):n?Yt.createElement(e,{is:n}):Yt.createElement(e);return e==="select"&&s&&s.multiple!=null&&i.setAttribute("multiple",s.multiple),i},createText:e=>Yt.createTextNode(e),createComment:e=>Yt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Yt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,i,l){const r=n?n.previousSibling:t.lastChild;if(i&&(i===l||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===l||!(i=i.nextSibling)););else{Ql.innerHTML=wc(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const u=Ql.content;if(s==="svg"||s==="mathml"){const f=u.firstChild;for(;f.firstChild;)u.appendChild(f.firstChild);u.removeChild(f)}t.insertBefore(u,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Of=Symbol("_vtc");function If(e,t,n){const s=e[Of];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const ea=Symbol("_vod"),Lf=Symbol("_vsh"),Mf=Symbol(""),Rf=/(?:^|;)\s*display\s*:/;function Nf(e,t,n){const s=e.style,i=Be(n);let l=!1;if(n&&!i){if(t)if(Be(t))for(const r of t.split(";")){const u=r.slice(0,r.indexOf(":")).trim();n[u]==null&&hs(s,u,"")}else for(const r in t)n[r]==null&&hs(s,r,"");for(const r in n){r==="display"&&(l=!0);const u=n[r];u!=null?Df(e,r,!Be(t)&&t?t[r]:void 0,u)||hs(s,r,u):hs(s,r,"")}}else if(i){if(t!==n){const r=s[Mf];r&&(n+=";"+r),s.cssText=n,l=Rf.test(n)}}else t&&e.removeAttribute("style");ea in e&&(e[ea]=l?s.display:"",e[Lf]&&(s.display="none"))}const Xs=/\s*!important$/;function hs(e,t,n){if(pe(n))n.forEach(s=>hs(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))Xs.test(n)?e.setProperty(t,n.replace(Xs,""),"important"):e.setProperty(t,n);else{const s=Ff(e,t);Xs.test(n)?e.setProperty(Cn(s),n.replace(Xs,""),"important"):e[s]=n}}const ta=["Webkit","Moz","ms"],no={};function Ff(e,t){const n=no[t];if(n)return n;let s=ct(t);if(s!=="filter"&&s in e)return no[t]=s;s=Pi(s);for(let i=0;i<ta.length;i++){const l=ta[i]+s;if(l in e)return no[t]=l}return t}function Df(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&Be(s)&&n===s}const na="http://www.w3.org/1999/xlink";function sa(e,t,n,s,i,l=Ku(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(na,t.slice(6,t.length)):e.setAttributeNS(na,t,n):n==null||l&&!gr(n)?e.removeAttribute(t):e.setAttribute(t,l?"":Kt(n)?String(n):n)}function ia(e,t,n,s,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?wc(n):n);return}const l=e.tagName;if(t==="value"&&l!=="PROGRESS"&&!l.includes("-")){const u=l==="OPTION"?e.getAttribute("value")||"":e.value,f=n==null?e.type==="checkbox"?"on":"":String(n);(u!==f||!("_value"in e))&&(e.value=f),n==null&&e.removeAttribute(t),e._value=n;return}let r=!1;if(n===""||n==null){const u=typeof e[t];u==="boolean"?n=gr(n):n==null&&u==="string"?(n="",r=!0):u==="number"&&(n=0,r=!0)}try{e[t]=n}catch{}r&&e.removeAttribute(i||t)}function Qt(e,t,n,s){e.addEventListener(t,n,s)}function Uf(e,t,n,s){e.removeEventListener(t,n,s)}const oa=Symbol("_vei");function jf(e,t,n,s,i=null){const l=e[oa]||(e[oa]={}),r=l[t];if(s&&r)r.value=s;else{const[u,f]=Wf(t);if(s){const h=l[t]=qf(s,i);Qt(e,u,h,f)}else r&&(Uf(e,u,r,f),l[t]=void 0)}}const Hf=/(Once|Passive|Capture)$/,Vf=/^on:?(?:Once|Passive|Capture)$/;function Wf(e){let t,n;for(;(n=e.match(Hf))&&!Vf.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):Cn(e.slice(2)),t]}let so=0;const Bf=Promise.resolve(),Kf=()=>so||(Bf.then(()=>so=0),so=Date.now());function qf(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;const i=n.value;if(pe(i)){const l=s.stopImmediatePropagation;s.stopImmediatePropagation=()=>{l.call(s),s._stopped=!0};const r=i.slice(),u=[s];for(let f=0;f<r.length&&!s._stopped;f++){const h=r[f];h&&Mt(h,t,5,u)}}else Mt(i,t,5,[s])};return n.value=e,n.attached=Kf(),n}const la=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,zf=(e,t,n,s,i,l)=>{const r=i==="svg";t==="class"?If(e,s,r):t==="style"?Nf(e,n,s):Ti(t)?Ei(t)||jf(e,t,n,s,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Yf(e,t,s,r))?(ia(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&sa(e,t,s,r,l,t!=="value")):e._isVueCE&&(Gf(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!Be(s)))?ia(e,ct(t),s,l,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),sa(e,t,s,r))};function Yf(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&la(t)&&_e(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="sandbox"&&e.tagName==="IFRAME"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return la(t)&&Be(n)?!1:t in e}function Gf(e,t){const n=e._def.props;if(!n)return!1;const s=ct(t);return Array.isArray(n)?n.some(i=>ct(i)===s):Object.keys(n).some(i=>ct(i)===s)}const kn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return pe(t)?n=>ni(t,n):t};function Jf(e){e.target.composing=!0}function aa(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const vt=Symbol("_assign"),Zs=Symbol("_initialValue");function io(e,t,n){return t&&(e=e.trim()),n&&(e=Oi(e)),e}const Xe={created(e,{modifiers:{lazy:t,trim:n,number:s}},i){e.parentNode&&(e.type==="text"?e[Zs]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Zs]=e.defaultValue.replace(/\r\n?/g,`
`))),e[vt]=kn(i);const l=s||i.props&&i.props.type==="number";Qt(e,t?"change":"input",r=>{r.target.composing||e[vt](io(e.value,n,l))}),(n||l)&&Qt(e,"change",()=>{e.value=io(e.value,n,l)}),t||(Qt(e,"compositionstart",Jf),Qt(e,"compositionend",aa),Qt(e,"change",aa))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const i=t??"",l=e[Zs];delete e[Zs],l!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==l?e[vt](io(e.value,n,s)):e.value=i},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:i,number:l}},r){if(e[vt]=kn(r),e.composing)return;const u=(l||e.type==="number")&&!/^0\d/.test(e.value)?Oi(e.value):e.value,f=t??"";if(u===f)return;const h=e.getRootNode();(h instanceof Document||h instanceof ShadowRoot)&&h.activeElement===e&&e.type!=="range"&&(s&&t===n||i&&e.value.trim()===f)||(e.value=f)}},Xf={deep:!0,created(e,t,n){e[vt]=kn(n),Qt(e,"change",()=>{const s=e._modelValue,i=ns(e),l=e.checked,r=e[vt];if(pe(s)){const u=Zo(s,i),f=u!==-1;if(l&&!f)r(s.concat(i));else if(!l&&f){const h=[...s];h.splice(u,1),r(h)}}else if(sn(s)){const u=new Set(s);l?u.add(i):u.delete(i),r(u)}else r(kc(e,l))})},mounted:ra,beforeUpdate(e,t,n){e[vt]=kn(n),ra(e,t,n)}};function ra(e,{value:t,oldValue:n},s){e._modelValue=t;let i;if(pe(t))i=Zo(t,s.props.value)>-1;else if(sn(t))i=t.has(s.props.value);else{if(t===n)return;i=Lt(t,kc(e,!0))}e.checked!==i&&(e.checked=i)}const ca={created(e,{value:t},n){e.checked=Lt(t,n.props.value),e[vt]=kn(n),Qt(e,"change",()=>{e[vt](ns(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[vt]=kn(s),t!==n&&(e.checked=Lt(t,s.props.value))}},jn={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,Qt(e,"change",()=>{const i=Array.prototype.filter.call(e.options,f=>f.selected).map(f=>n?Oi(ns(f)):ns(f)),l=e.multiple,r=l?sn(e._modelValue)?new Set(i):i:i[0],u=e._pendingValue=[l,l?pe(r)?i.slice():i:r];try{e[vt](r)}finally{Ri(()=>{e._pendingValue===u&&(e._pendingValue=void 0)})}}),e[vt]=kn(s)},mounted(e,{value:t}){ua(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[vt]=kn(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!Zf(t,n[1],n[0]))&&ua(e,t)}};function Zf(e,t,n){if(!n||pe(e))return Lt(e,t);if(sn(e)){if(e.size!==t.length)return!1;for(const s of t)if(!e.has(s))return!1;return!0}return!1}function ua(e,t){const n=e.multiple,s=pe(t);if(!(n&&!s&&!sn(t))){for(let i=0,l=e.options.length;i<l;i++){const r=e.options[i],u=ns(r);if(n)if(s){const f=typeof u;f==="string"||f==="number"?r.selected=t.some(h=>String(h)===String(u)):r.selected=Zo(t,u)>-1}else r.selected=t.has(u);else if(Lt(ns(r),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function ns(e){return"_value"in e?e._value:e.value}function kc(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Qf=["ctrl","shift","alt","meta"],ep={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)=>Qf.some(n=>e[`${n}Key`]&&!t.includes(n))},At=(e,t)=>{if(!e)return e;const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=((i,...l)=>{for(let r=0;r<t.length;r++){const u=ep[t[r]];if(u&&u(i,t))return}return e(i,...l)}))},tp={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},$c=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(i=>{if(!("key"in i))return;const l=Cn(i.key);if(t.some(r=>r===l||tp[r]===l))return e(i)}))},np=tt({patchProp:zf},Pf);let da;function sp(){return da||(da=uf(np))}const ip=((...e)=>{const t=sp().createApp(...e),{mount:n}=t;return t.mount=s=>{const i=lp(s);if(!i)return;const l=t._component;!_e(l)&&!l.render&&!l.template&&(l.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const r=n(i,!1,op(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},t});function op(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function lp(e){return Be(e)?document.querySelector(e):e}const ap="modulepreload",rp=function(e,t){return new URL(e,t).href},fa={},fn=function(t,n,s){let i=Promise.resolve();if(n&&n.length>0){let h=function(p){return Promise.all(p.map(b=>Promise.resolve(b).then(v=>({status:"fulfilled",value:v}),v=>({status:"rejected",reason:v}))))};const r=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),f=u?.nonce||u?.getAttribute("nonce");i=h(n.map(p=>{if(p=rp(p,s),p in fa)return;fa[p]=!0;const b=p.endsWith(".css"),v=b?'[rel="stylesheet"]':"";if(s)for(let M=r.length-1;M>=0;M--){const E=r[M];if(E.href===p&&(!b||E.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${p}"]${v}`))return;const y=document.createElement("link");if(y.rel=b?"stylesheet":ap,b||(y.as="script"),y.crossOrigin="",y.href=p,f&&y.setAttribute("nonce",f),document.head.appendChild(y),b)return new Promise((M,E)=>{y.addEventListener("load",M),y.addEventListener("error",()=>E(new Error(`Unable to preload CSS for ${p}`)))})}))}function l(r){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=r,window.dispatchEvent(u),!u.defaultPrevented)throw r}return i.then(r=>{for(const u of r||[])u.status==="rejected"&&l(u.reason);return t().catch(l)})},cp={de:{name:"Deutsch",english:"German",script:"latin",plural:"one_other",clock:"24",checked:!1},"en-GB":{name:"English (UK)",english:"English (UK)",script:"latin",plural:"one_other",clock:"24",checked:!0},en:{name:"English (US)",english:"English (US)",script:"latin",plural:"one_other",clock:"12",checked:!0},es:{name:"Español",english:"Spanish",script:"latin",plural:"one_other",clock:"24",checked:!1},fr:{name:"Français",english:"French",script:"latin",plural:"one_upto_1",clock:"24",checked:!1},it:{name:"Italiano",english:"Italian",script:"latin",plural:"one_other",clock:"24",checked:!1},nl:{name:"Nederlands",english:"Dutch",script:"latin",plural:"one_other",clock:"24",checked:!1},pl:{name:"Polski",english:"Polish",script:"latin",plural:"slavic_pl",clock:"24",checked:!1},pt:{name:"Português",english:"Portuguese",script:"latin",plural:"one_upto_1",clock:"24",checked:!1}};const bi=typeof window<"u",En=(e,t=!1)=>t?Symbol.for(e):Symbol(e),up=(e,t,n)=>dp({l:e,k:t,s:n}),dp=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Ge=e=>typeof e=="number"&&isFinite(e),xc=e=>pl(e)==="[object Date]",vi=e=>pl(e)==="[object RegExp]",fl=e=>De(e)&&Object.keys(e).length===0,ot=Object.assign,fp=Object.create,Le=(e=null)=>fp(e);let pa;const pp=()=>pa||(pa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Le()),hp=Object.prototype.hasOwnProperty;function $t(e,t){return hp.call(e,t)}const He=Array.isArray,Ke=e=>typeof e=="function",oe=e=>typeof e=="string",qe=e=>typeof e=="boolean",Se=e=>e!==null&&typeof e=="object",mp=e=>Se(e)&&Ke(e.then)&&Ke(e.catch),Sc=Object.prototype.toString,pl=e=>Sc.call(e),De=e=>pl(e)==="[object Object]",bp=e=>e==null?"":He(e)||De(e)&&e.toString===Sc?JSON.stringify(e,null,2):String(e);function vp(e,t=""){return e.reduce((n,s,i)=>i===0?n+s:n+t+s,"")}function gp(e,t){typeof console<"u"&&(console.warn("[intlify] "+e),t&&console.warn(t.stack))}function ha(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 _p(e){return e.replace(/&(?![a-z0-9#]{2,6};)/gi,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}const yp=/^javascript:/i,wp=/^(?:href|src|action|formaction)$/i,kp=/&#(?:x([0-9a-f]+)|(\d+));?/gi,$p=/&(?:Tab|NewLine);/g,xp=/&colon;?/gi,Sp=/[\u0000-\u0020\u007f-\u009f]/g,Cp=/(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i,Tp=/(^|[\s"'<>/])on(\w+\s*=)/gi,Ep=/(^|[\s"'<>/])((?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;function Ap(e,t,n){const s=t||n;if(!s)return e;const i=Number.parseInt(s,t?16:10);return i<=127?String.fromCharCode(i):e}function hl(e){const t=e.replace(kp,Ap).replace($p,"").replace(xp,":").replace(Sp,"");return yp.test(t)}function Pp(e){const t=/url\s*\(/gi;let n="",s=0,i;for(;(i=t.exec(e))!==null;){const l=i.index,r=t.lastIndex-1;let u=r+1,f=1,h=null;for(;u<e.length;u++){const v=e[u];if(h){v===h&&(h=null);continue}if(v==='"'||v==="'")h=v;else if(v==="(")f++;else if(v===")"&&(f--,f===0))break}if(f!==0)break;const p=e.slice(r+1,u).trim(),b=p.startsWith('"')&&p.endsWith('"')||p.startsWith("'")&&p.endsWith("'")?p.slice(1,-1).trim():p;n+=e.slice(s,l),n+=hl(b)?"url(about:blank)":e.slice(l,u+1),s=u+1}return n+e.slice(s)}function ma(e,t){if(wp.test(e)&&hl(t))return"about:blank";const n=e.toLowerCase()==="style"?Pp(t):t;return _p(n)}function Op(e){return e=e.replace(/([\w:-]+)\s*=\s*"([^"]*)"/g,(t,n,s)=>`${n}="${ma(n,s)}"`),e=e.replace(/([\w:-]+)\s*=\s*'([^']*)'/g,(t,n,s)=>`${n}='${ma(n,s)}'`),Cp.test(e)&&(e=e.replace(Tp,"$1&#111;n$2")),e=e.replace(Ep,(t,n,s,i)=>hl(i)?`${n}${s}about:blank`:t),e}const ba=e=>!Se(e)||He(e);function ii(e,t){if(ba(e)||ba(t))throw new Error("Invalid value");const n=[{src:e,des:t}];for(;n.length;){const{src:s,des:i}=n.pop();Object.keys(s).forEach(l=>{if(l==="__proto__")return;const r=s[l];if(He(r)){const u=[];u.length=r.length,i[l]=u,n.push({src:r,des:u})}else Se(r)?((!Se(i[l])||He(i[l]))&&(i[l]=Le()),n.push({src:r,des:i[l]})):i[l]=r})}}const Ip=17;function Cc(e,t,n={}){const{domain:s,messages:i,args:l}=n,r=e,u=new SyntaxError(String(r));return u.code=e,u.domain=s,u}function Bt(e){return Se(e)&&ml(e)===0&&($t(e,"b")||$t(e,"body"))}const Tc=["b","body"];function Lp(e){return An(e,Tc)}const Ec=["c","cases"];function Mp(e){return An(e,Ec,[])}const Ac=["s","static"];function Rp(e){return An(e,Ac)}const Pc=["i","items"];function Np(e){return An(e,Pc,[])}const Oc=["t","type"];function ml(e){return An(e,Oc)}const Ic=["v","value"];function Qs(e,t){const n=An(e,Ic);if(n!=null)return n;throw Os(t)}const Lc=["m","modifier"];function Fp(e){return An(e,Lc)}const Mc=["k","key"];function Dp(e){const t=An(e,Mc);if(t)return t;throw Os(6)}function An(e,t,n){for(let s=0;s<t.length;s++){const i=t[s];if($t(e,i)&&e[i]!=null)return e[i]}return n}const Rc=[...Tc,...Ec,...Ac,...Pc,...Mc,...Lc,...Ic,...Oc];function Os(e){return new Error(`unhandled node type: ${e}`)}function va(e){return n=>Up(n,e)}function Up(e,t){const n=Lp(t);if(n==null)throw Os(0);if(ml(n)===1){const l=Mp(n);return e.plural(l.reduce((r,u)=>[...r,ga(e,u)],[]))}else return ga(e,n)}function ga(e,t){const n=Rp(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const s=Np(t).reduce((i,l)=>[...i,Eo(e,l)],[]);return e.normalize(s)}}function Eo(e,t){const n=ml(t);switch(n){case 3:return Qs(t,n);case 9:return Qs(t,n);case 4:{const s=t;if($t(s,"k")&&s.k)return e.interpolate(e.named(s.k));if($t(s,"key")&&s.key)return e.interpolate(e.named(s.key));throw Os(n)}case 5:{const s=t;if($t(s,"i")&&Ge(s.i))return e.interpolate(e.list(s.i));if($t(s,"index")&&Ge(s.index))return e.interpolate(e.list(s.index));throw Os(n)}case 6:{const s=t,i=Fp(s),l=Dp(s);return e.linked(Eo(e,l),i?Eo(e,i):void 0,e.type)}case 7:return Qs(t,n);case 8:return Qs(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}let _a=Le();function jp(e,t){{const n=e.cacheKey;if(n){const s=_a[n];return s||(_a[n]=va(e))}else return va(e)}}const en={INVALID_ARGUMENT:Ip,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},Hp=24;function tn(e){return Cc(e,null,void 0)}function bl(e,t){return t.locale!=null?ya(t.locale):ya(e.locale)}let oo;function ya(e){if(oe(e))return e;if(Ke(e)){if(e.resolvedOnce&&oo!=null)return oo;if(e.constructor.name==="Function"){const t=e();if(mp(t))throw tn(en.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return oo=t}else throw tn(en.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw tn(en.NOT_SUPPORT_LOCALE_TYPE)}function Vp(e,t,n){return[...new Set([n,...He(t)?t:Se(t)?Object.keys(t).filter(s=>s!=="default"):oe(t)?[t]:[n]])]}function Ao(e,t,n){const s=oe(n)?n:gi,i=e;let l;Se(t)?(i.__localeChainObjectCache||(i.__localeChainObjectCache=new WeakMap),l=i.__localeChainObjectCache.get(t),l||(l=new Map,i.__localeChainObjectCache.set(t,l))):(i.__localeChainCache||(i.__localeChainCache=new Map),l=i.__localeChainCache.get(t),l||(l=new Map,i.__localeChainCache.set(t,l)));const r=l.get(s);if(r)return r;const u=[];let f=[n];for(;He(f);)f=wa(u,f,t);const h=He(t)||!De(t)?t:t.default?t.default:null;return f=oe(h)?[h]:h,He(f)&&wa(u,f,!1),l.set(s,u),u}function wa(e,t,n){let s=!0;for(let i=0;i<t.length&&qe(s);i++){const l=t[i];oe(l)&&(s=Wp(e,t[i],n))}return s}function Wp(e,t,n){let s;const i=t.split("-");do{const l=i.join("-");s=Bp(e,l,n),i.splice(-1,1)}while(i.length&&s===!0);return s}function Bp(e,t,n){let s=!1;if(!e.includes(t)&&(s=!0,t)){s=t[t.length-1]!=="!";const i=t.replace(/!/g,"");e.push(i),(He(n)||De(n))&&n[i]&&(s=n[i])}return s}const Pn=[];Pn[0]={w:[0],i:[3,0],"[":[4],o:[7]};Pn[1]={w:[1],".":[2],"[":[4],o:[7]};Pn[2]={w:[2],i:[3,0],0:[3,0]};Pn[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};Pn[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};Pn[5]={"'":[4,0],o:8,l:[5,0]};Pn[6]={'"':[4,0],o:8,l:[6,0]};const Kp=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function qp(e){return Kp.test(e)}function zp(e){const t=e.charCodeAt(0),n=e.charCodeAt(e.length-1);return t===n&&(t===34||t===39)?e.slice(1,-1):e}function Yp(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 Gp(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:qp(t)?zp(t):"*"+t}function Jp(e){const t=[];let n=-1,s=0,i=0,l,r,u,f,h,p,b;const v=[];v[0]=()=>{r===void 0?r=u:r+=u},v[1]=()=>{r!==void 0&&(t.push(r),r=void 0)},v[2]=()=>{v[0](),i++},v[3]=()=>{if(i>0)i--,s=4,v[0]();else{if(i=0,r===void 0||(r=Gp(r),r===!1))return!1;v[1]()}};function y(){const M=e[n+1];if(s===5&&M==="'"||s===6&&M==='"')return n++,u="\\"+M,v[0](),!0}for(;s!==null;)if(n++,l=e[n],!(l==="\\"&&y())){if(f=Yp(l),b=Pn[s],h=b[f]||b.l||8,h===8||(s=h[0],h[1]!==void 0&&(p=v[h[1]],p&&(u=l,p()===!1))))return;if(s===7)return t}}const ka=new Map;function Xp(e,t){return Se(e)?e[t]:null}function Zp(e,t){if(!Se(e))return null;let n=ka.get(t);if(n||(n=Jp(t),n&&ka.set(t,n)),!n)return null;const s=n.length;let i=e,l=0;for(;l<s;){const r=n[l];if(Rc.includes(r)&&Bt(i)||!Se(i)||!$t(i,r))return null;const u=i[r];if(u===void 0||Ke(i))return null;i=u,l++}return i}const Qp="11.4.12",ji=-1,gi="en-US",_i="",$a=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function eh(){return{upper:(e,t)=>t==="text"&&oe(e)?e.toUpperCase():t==="vnode"&&Se(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&oe(e)?e.toLowerCase():t==="vnode"&&Se(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&oe(e)?$a(e):t==="vnode"&&Se(e)&&"__v_isVNode"in e?$a(e.children):e}}let Nc;function th(e){Nc=e}let Fc;function nh(e){Fc=e}let Dc;function sh(e){Dc=e}let Uc=null;const xa=e=>{Uc=e},Sa=()=>Uc;let Ca=0;function ih(e={}){const t=Ke(e.onWarn)?e.onWarn:gp,n=oe(e.version)?e.version:Qp,s=oe(e.locale)||Ke(e.locale)?e.locale:gi,i=Ke(s)?gi:s,l=He(e.fallbackLocale)||De(e.fallbackLocale)||oe(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,r=De(e.messages)?e.messages:lo(i),u=De(e.datetimeFormats)?e.datetimeFormats:lo(i),f=De(e.numberFormats)?e.numberFormats:lo(i),h=ot(Le(),e.modifiers,eh()),p=e.pluralRules||Le(),b=Ke(e.missing)?e.missing:null,v=qe(e.missingWarn)||vi(e.missingWarn)?e.missingWarn:!0,y=qe(e.fallbackWarn)||vi(e.fallbackWarn)?e.fallbackWarn:!0,M=!!e.fallbackFormat,E=!!e.unresolving,x=Ke(e.postTranslation)?e.postTranslation:null,O=De(e.processor)?e.processor:null,C=qe(e.warnHtmlMessage)?e.warnHtmlMessage:!0,F=!!e.escapeParameter,T=Ke(e.messageCompiler)?e.messageCompiler:Nc,V=Ke(e.messageResolver)?e.messageResolver:Fc||Xp,L=Ke(e.localeFallbacker)?e.localeFallbacker:Dc||Vp,k=Se(e.fallbackContext)?e.fallbackContext:void 0,A=e,z=Se(A.__datetimeFormatters)?A.__datetimeFormatters:new Map,P=Se(A.__numberFormatters)?A.__numberFormatters:new Map,ge=Se(A.__meta)?A.__meta:{};Ca++;const G={version:n,cid:Ca,locale:s,fallbackLocale:l,messages:r,modifiers:h,pluralRules:p,missing:b,missingWarn:v,fallbackWarn:y,fallbackFormat:M,unresolving:E,postTranslation:x,processor:O,warnHtmlMessage:C,escapeParameter:F,messageCompiler:T,messageResolver:V,localeFallbacker:L,fallbackContext:k,onWarn:t,__meta:ge};return G.datetimeFormats=u,G.numberFormats=f,G.__datetimeFormatters=z,G.__numberFormatters=P,G}const lo=e=>({[e]:Le()});function jc(e,t,n,s,i){const{missing:l,onWarn:r}=e;if(l!==null){const u=l(e,n,t,i);return oe(u)?u:t}else return t}function Ta(e,t){const n=e;Se(t)?n.__localeChainObjectCache?.delete(t):n.__localeChainCache?.delete(t)}function ei(e,t,n){Ta(e,n),e.fallbackContext&&Ta(e.fallbackContext,n),e.localeFallbacker(e,n,t)}function oh(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function lh(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let s=n+1;s<t.length;s++)if(oh(e,t[s]))return!0;return!1}function Hc(e,t,n,s,i,l,r){const{fallbackLocale:u,localeFallbacker:f,onWarn:h}=e,p=f(e,u,n);for(let b=0;b<p.length;b++){const v=p[b],y=(s[v]||{})[t];if(De(y)&&oe(v))return v;jc(e,t,v,i,r)}return null}function Vc(e,t,n){let s=`${e}__${t}`;return De(n)&&!fl(n)&&(s=`${s}__${JSON.stringify(n)}`),s}function Wc(e,t,n){for(const s in n){const i=`${t}__${s}`;for(const l of e.keys())(l===i||l.startsWith(`${i}__`))&&e.delete(l)}}function Bc(e,t,n,s){const[,i,l,r]=e;let u=n;return oe(i)?t.key=i:De(i)&&Object.keys(i).forEach(f=>{s.includes(f)?u[f]=i[f]:t[f]=i[f]}),oe(l)?t.locale=l:De(l)&&(u=l),De(r)&&(u=r),u}function Ea(e,...t){const{datetimeFormats:n,unresolving:s,onWarn:i}=e,{__datetimeFormatters:l}=e;if(!oe(t[0])&&!xc(t[0])&&!Ge(t[0]))return _i;const[r,u,f,h]=Po(...t),p=qe(f.missingWarn)?f.missingWarn:e.missingWarn,b=qe(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn,v=!!f.part,y=bl(e,f);if(!oe(r)||r===""){const C=new Intl.DateTimeFormat(y.replace(/!/g,""),h);return v?C.formatToParts(u):C.format(u)}const M=Hc(e,r,y,n,p,b,"datetime format");if(!oe(M))return s?ji:r;const E=n[M][r],x=Vc(M,r,h);let O=l.get(x);return O||(O=new Intl.DateTimeFormat(M,ot({},E,h)),l.set(x,O)),v?O.formatToParts(u):O.format(u)}const Kc=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Po(...e){const[t]=e,n=Le(),s=Le();let i;if(oe(t)){const r=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!r)throw tn(en.INVALID_ISO_DATE_ARGUMENT);const u=r[3]?r[3].trim().startsWith("T")?`${r[1].trim()}${r[3].trim()}`:`${r[1].trim()}T${r[3].trim()}`:r[1].trim();i=new Date(u);try{i.toISOString()}catch{throw tn(en.INVALID_ISO_DATE_ARGUMENT)}}else if(xc(t)){if(isNaN(t.getTime()))throw tn(en.INVALID_DATE_ARGUMENT);i=t}else if(Ge(t))i=t;else throw tn(en.INVALID_ARGUMENT);const l=Bc(e,n,s,Kc);return[n.key||"",i,n,l]}function Aa(e,t,n){Wc(e.__datetimeFormatters,t,n)}function Pa(e,...t){const{numberFormats:n,unresolving:s,onWarn:i}=e,{__numberFormatters:l}=e;if(!Ge(t[0]))return _i;const[r,u,f,h]=Oo(...t),p=qe(f.missingWarn)?f.missingWarn:e.missingWarn,b=qe(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn,v=!!f.part,y=bl(e,f);if(!oe(r)||r===""){const C=new Intl.NumberFormat(y.replace(/!/g,""),h);return v?C.formatToParts(u):C.format(u)}const M=Hc(e,r,y,n,p,b,"number format");if(!oe(M))return s?ji:r;const E=n[M][r],x=Vc(M,r,h);let O=l.get(x);return O||(O=new Intl.NumberFormat(M,ot({},E,h)),l.set(x,O)),v?O.formatToParts(u):O.format(u)}const qc=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Oo(...e){const[t]=e,n=Le(),s=Le();if(!Ge(t))throw tn(en.INVALID_ARGUMENT);const i=t,l=Bc(e,n,s,qc);return[n.key||"",i,n,l]}function Oa(e,t,n){Wc(e.__numberFormatters,t,n)}const ah=e=>e,rh=e=>"",ch="text",uh=e=>e.length===0?"":vp(e),dh=bp;function ao(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function fh(e){const t=Ge(e.pluralIndex)?e.pluralIndex:-1;return Ge(e.named?.count)?e.named.count:Ge(e.named?.n)?e.named.n:t}function ph(e={}){const t=e.locale,n=fh(e),s=oe(t)&&Ke(e.pluralRules?.[t])?e.pluralRules[t]:ao,i=s===ao?void 0:ao,l=O=>O[s(n,O.length,i)],r=e.list||[],u=O=>r[O],f=e.named||Le();Ge(e.pluralIndex)&&(f.count||=e.pluralIndex,f.n||=e.pluralIndex);const h=O=>f[O];function p(O,C){const F=Ke(e.messages)?e.messages(O,!!C):Se(e.messages)?e.messages[O]:!1;return F||(e.parent?e.parent.message(O):rh)}const b=O=>e.modifiers?e.modifiers[O]:ah,v=Ke(e.processor?.normalize)?e.processor.normalize:uh,y=Ke(e.processor?.interpolate)?e.processor.interpolate:dh,M=oe(e.processor?.type)?e.processor.type:ch,x={list:u,named:h,plural:l,linked:(O,...C)=>{const[F,T]=C;let V="text",L="";C.length===1?Se(F)?(L=F.modifier||L,V=F.type||V):oe(F)&&(L=F||L):C.length===2&&(oe(F)&&(L=F||L),oe(T)&&(V=T||V));const k=p(O,!0)(x),A=k===""||k===void 0?O:k,z=V==="vnode"&&He(A)&&L?A[0]:A;return L?b(L)(z,V):z},message:p,type:M,interpolate:y,normalize:v,values:ot(Le(),r,f)};return x}const Ia=()=>"",nn=e=>Ke(e);function La(e,...t){const{fallbackFormat:n,postTranslation:s,unresolving:i,messageCompiler:l,fallbackLocale:r,messages:u}=e,[f,h]=Io(...t),p=qe(h.missingWarn)?h.missingWarn:e.missingWarn,b=qe(h.fallbackWarn)?h.fallbackWarn:e.fallbackWarn,v=qe(h.escapeParameter)?h.escapeParameter:e.escapeParameter,y=!!h.resolvedMessage,M=oe(h.default)||qe(h.default)?qe(h.default)?l?f:()=>f:h.default:n?l?f:()=>f:null,E=n||M!=null&&(oe(M)||Ke(M)),x=bl(e,h);v&&hh(h);let[O,C,F]=y?[f,x,u[x]||Le()]:zc(e,f,x,r,b,p),T=O,V=f;if(!y&&!(oe(T)||Bt(T)||nn(T))&&E&&(T=M,V=T),!y&&(!(oe(T)||Bt(T)||nn(T))||!oe(C)))return i?ji:f;let L=!1;const k=()=>{L=!0},A=nn(T)?T:Yc(e,f,C,T,V,k);if(L)return T;const z=vh(e,C,F,h),P=ph(z),ge=mh(e,A,P);let G=s?s(ge,f):ge;return v&&oe(G)&&(G=Op(G)),G}function hh(e){He(e.list)?e.list=e.list.map(t=>oe(t)?ha(t):t):Se(e.named)&&Object.keys(e.named).forEach(t=>{oe(e.named[t])&&(e.named[t]=ha(e.named[t]))})}function zc(e,t,n,s,i,l){const{messages:r,onWarn:u,messageResolver:f,localeFallbacker:h}=e,p=h(e,s,n);let b=Le(),v,y=null;const M="translate";for(let E=0;E<p.length&&(v=p[E],b=r[v]||Le(),(y=f(b,t))===null&&(y=b[t]),!(oe(y)||Bt(y)||nn(y)));E++)if(!lh(v,p)){const x=jc(e,t,v,l,M);x!==t&&(y=x)}return[y,v,b]}function Yc(e,t,n,s,i,l){const{messageCompiler:r,warnHtmlMessage:u}=e;if(nn(s)){const h=s;return h.locale=h.locale||n,h.key=h.key||t,h}if(r==null){const h=(()=>s);return h.locale=n,h.key=t,h}const f=r(s,bh(e,n,i,s,u,l));return f.locale=n,f.key=t,f.source=s,f}function mh(e,t,n){return t(n)}function Io(...e){const[t,n,s]=e,i=Le();if(!oe(t)&&!Ge(t)&&!nn(t)&&!Bt(t))throw tn(en.INVALID_ARGUMENT);const l=Ge(t)?String(t):(nn(t),t);return Ge(n)?i.plural=n:oe(n)?i.default=n:De(n)&&!fl(n)?i.named=n:He(n)&&(i.list=n),Ge(s)?i.plural=s:oe(s)?i.default=s:De(s)&&ot(i,s),[l,i]}function bh(e,t,n,s,i,l){return{locale:t,key:n,warnHtmlMessage:i,onError:r=>{throw l&&l(r),r},onCacheKey:r=>up(t,n,r)}}function vh(e,t,n,s){const{modifiers:i,pluralRules:l,messageResolver:r,fallbackLocale:u,fallbackWarn:f,missingWarn:h,fallbackContext:p}=e,v={locale:t,modifiers:i,pluralRules:l,messages:(y,M)=>{let E=r(n,y);if(E==null&&(p||M)){const[x,,O]=zc(p||e,y,t,u,f,h);E=x??r(O,y)}if(oe(E)||Bt(E)){let x=!1;const C=Yc(e,y,t,E,y,()=>{x=!0});return x?Ia:C}else return nn(E)?E:Ia}};return e.processor&&(v.processor=e.processor),s.list&&(v.list=s.list),s.named&&(v.named=s.named),Ge(s.plural)&&(v.pluralIndex=s.plural),v}const gh="11.4.12",gt={UNEXPECTED_RETURN_TYPE:Hp,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,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function Ct(e,...t){return Cc(e,null,void 0)}const Lo=En("__translateVNode"),Mo=En("__datetimeParts"),Ro=En("__numberParts"),_h=En("__setPluralRules"),yh=En("__injectWithOption"),Jn=En("__dispose");let Gc=null;{const e=pp().__VUE_INSTANCE_SETTERS__;He(e)&&e.push(t=>{Gc=t})}function Is(e){if(!Se(e)||Bt(e))return e;for(const t in e)if($t(e,t))if(!t.includes("."))Se(e[t])&&Is(e[t]);else{const n=t.split("."),s=n.length-1;let i=e,l=!1;for(let r=0;r<s;r++){if(n[r]==="__proto__")throw new Error(`unsafe key: ${n[r]}`);if(n[r]in i||(i[n[r]]=Le()),!Se(i[n[r]])){l=!0;break}i=i[n[r]]}if(l||(Bt(i)?Rc.includes(n[s])||delete e[t]:(i[n[s]]=e[t],delete e[t])),!Bt(i)){const r=i[n[s]];Se(r)&&Is(r)}}return e}function Jc(e,t){const{messages:n,__i18n:s,messageResolver:i,flatJson:l}=t,r=De(n)?n:He(s)?Le():{[e]:Le()};if(He(s)&&s.forEach(u=>{if("locale"in u&&"resource"in u){const{locale:f,resource:h}=u;f?(r[f]=r[f]||Le(),ii(h,r[f])):ii(h,r)}else oe(u)&&ii(JSON.parse(u),r)}),i==null&&l)for(const u in r)$t(r,u)&&Is(r[u]);return r}function wh(e){return e.type}function kh(e,t,n){let s=Se(t.messages)?t.messages:Le();"__i18nGlobal"in n&&(s=Jc(e.locale.value,{messages:s,__i18n:n.__i18nGlobal}));const i=Object.keys(s);i.length&&i.forEach(l=>{e.mergeLocaleMessage(l,s[l])});{if(Se(t.datetimeFormats)){const l=Object.keys(t.datetimeFormats);l.length&&l.forEach(r=>{e.mergeDateTimeFormat(r,t.datetimeFormats[r])})}if(Se(t.numberFormats)){const l=Object.keys(t.numberFormats);l.length&&l.forEach(r=>{e.mergeNumberFormat(r,t.numberFormats[r])})}}}function Ma(e){return te(Vs,null,e,0)}function Xc(){return Gc??gc()}const Ra=()=>[],$h=()=>!1;let Na=0;function Fa(e){return((t,n,s,i)=>e(n,s,Xc()||void 0,i))}function No(e={}){const{__root:t,__injectWithOption:n}=e,s=t===void 0,i=e.flatJson,l=bi?ke:md;let r=qe(e.inheritLocale)?e.inheritLocale:!0;const u=l(t&&r?t.locale.value:oe(e.locale)?e.locale:gi),f=l(t&&r?t.fallbackLocale.value:oe(e.fallbackLocale)||He(e.fallbackLocale)||De(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:u.value),h=l(Jc(u.value,e)),p=l(De(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),b=l(De(e.numberFormats)?e.numberFormats:{[u.value]:{}});let v=t?t.missingWarn:qe(e.missingWarn)||vi(e.missingWarn)?e.missingWarn:!0,y=t?t.fallbackWarn:qe(e.fallbackWarn)||vi(e.fallbackWarn)?e.fallbackWarn:!0,M=t?t.fallbackRoot:qe(e.fallbackRoot)?e.fallbackRoot:!0,E=!!e.fallbackFormat,x=Ke(e.missing)?e.missing:null,O=Ke(e.missing)?Fa(e.missing):null,C=Ke(e.postTranslation)?e.postTranslation:null,F=t?t.warnHtmlMessage:qe(e.warnHtmlMessage)?e.warnHtmlMessage:!0,T=!!e.escapeParameter;const V=t?t.modifiers:De(e.modifiers)?e.modifiers:{};let L=e.pluralRules||t&&t.pluralRules,k;k=(()=>{s&&xa(null);const I={version:gh,locale:u.value,fallbackLocale:f.value,messages:h.value,modifiers:V,pluralRules:L,missing:O===null?void 0:O,missingWarn:v,fallbackWarn:y,fallbackFormat:E,unresolving:!0,postTranslation:C===null?void 0:C,warnHtmlMessage:F,escapeParameter:T,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};I.datetimeFormats=p.value,I.numberFormats=b.value,I.__datetimeFormatters=De(k)?k.__datetimeFormatters:void 0,I.__numberFormatters=De(k)?k.__numberFormatters:void 0;const N=ih(I);return s&&xa(N),N})(),ei(k,u.value,f.value);function z(){return[u.value,f.value,h.value,p.value,b.value]}const P=$({get:()=>u.value,set:I=>{k.locale=I,u.value=I}});function ge(I){s||(k.fallbackContext=t?Sa():void 0);try{ei(k,u.value,I)}finally{s||(k.fallbackContext=void 0)}}const G=$({get:()=>f.value,set:I=>{f.value=I,k.fallbackLocale=f.value,ge(f.value)}}),ie=$(()=>h.value),be=$(()=>p.value),se=$(()=>b.value);function ue(){return Ke(C)?C:null}function ye(I){C=I,k.postTranslation=I}function $e(){return x}function Ye(I){I!==null&&(O=Fa(I)),x=I,k.missing=O}const le=(I,N,re,fe,Ie,Ue)=>{z();let We;try{s||(k.fallbackContext=t?Sa():void 0),We=I(k)}finally{s||(k.fallbackContext=void 0)}if(re!=="translate exists"&&Ge(We)&&We===ji||re==="translate exists"&&!We){const[yt,qn]=N();return t&&M?fe(t):Ie(yt)}else{if(Ue(We))return We;throw Ct(gt.UNEXPECTED_RETURN_TYPE)}};function ee(...I){return le(N=>Reflect.apply(La,null,[N,...I]),()=>Io(...I),"translate",N=>Reflect.apply(N.t,N,[...I]),N=>N,N=>oe(N))}function ae(...I){const[N,re,fe]=I;if(fe&&!Se(fe))throw Ct(gt.INVALID_ARGUMENT);return ee(N,re,ot({resolvedMessage:!0},fe||{}))}function de(...I){return le(N=>Reflect.apply(Ea,null,[N,...I]),()=>Po(...I),"datetime format",N=>Reflect.apply(N.d,N,[...I]),()=>_i,N=>oe(N)||He(N))}function X(...I){return le(N=>Reflect.apply(Pa,null,[N,...I]),()=>Oo(...I),"number format",N=>Reflect.apply(N.n,N,[...I]),()=>_i,N=>oe(N)||He(N))}function K(I){return I.map(N=>oe(N)||Ge(N)||qe(N)?Ma(String(N)):N)}const we={normalize:K,interpolate:I=>I,type:"vnode"};function rs(...I){return le(N=>{let re;const fe=N;try{fe.processor=we,re=Reflect.apply(La,null,[fe,...I])}finally{fe.processor=null}return re},()=>Io(...I),"translate",N=>N[Lo](...I),N=>[Ma(N)],N=>He(N))}function zs(...I){return le(N=>Reflect.apply(Pa,null,[N,...I]),()=>Oo(...I),"number format",N=>N[Ro](...I),Ra,N=>oe(N)||He(N))}function On(...I){return le(N=>Reflect.apply(Ea,null,[N,...I]),()=>Po(...I),"datetime format",N=>N[Mo](...I),Ra,N=>oe(N)||He(N))}function El(I){L=I,k.pluralRules=L}function w(I,N){return le(()=>{if(!I)return!1;const re=oe(N)?N:u.value,fe=oe(N)?[re]:Ao(k,f.value,re);for(let Ie=0;Ie<fe.length;Ie++){const Ue=W(fe[Ie]);let We=k.messageResolver(Ue,I);if(We===null&&(We=Ue[I]),Bt(We)||nn(We)||oe(We))return!0}return!1},()=>[I],"translate exists",re=>Reflect.apply(re.te,re,[I,N]),$h,re=>qe(re))}function S(I){let N=null;const re=Ao(k,f.value,u.value);for(let fe=0;fe<re.length;fe++){const Ie=h.value[re[fe]]||{},Ue=k.messageResolver(Ie,I);if(Ue!=null){N=Ue;break}}return N}function R(I){const N=S(I);return N??(t?t.tm(I)||{}:{})}function W(I){return h.value[I]||{}}function D(I,N){if(i){const re={[I]:N};for(const fe in re)$t(re,fe)&&Is(re[fe]);N=re[I]}h.value[I]=N,k.messages=h.value}function j(I,N){h.value[I]=h.value[I]||{};const re={[I]:N};if(i)for(const fe in re)$t(re,fe)&&Is(re[fe]);N=re[I],ii(N,h.value[I]),k.messages=h.value}function J(I){return p.value[I]||{}}function Y(I,N){p.value[I]=N,k.datetimeFormats=p.value,Aa(k,I,N)}function q(I,N){p.value[I]=ot(p.value[I]||{},N),k.datetimeFormats=p.value,Aa(k,I,N)}function U(I){return b.value[I]||{}}function ce(I,N){b.value[I]=N,k.numberFormats=b.value,Oa(k,I,N)}function Q(I,N){b.value[I]=ot(b.value[I]||{},N),k.numberFormats=b.value,Oa(k,I,N)}Na++,St(f,()=>ge(f.value),{deep:!0,flush:"sync"}),t&&bi&&(St(t.locale,I=>{r&&(u.value=I,k.locale=I,ei(k,u.value,f.value))}),St(t.fallbackLocale,I=>{r&&(f.value=I,k.fallbackLocale=f.value,ei(k,u.value,f.value))}));const Z={id:Na,locale:P,fallbackLocale:G,get inheritLocale(){return r},set inheritLocale(I){r=I,I&&t&&(P.value=t.locale.value,G.value=t.fallbackLocale.value)},get availableLocales(){return Object.keys(h.value).sort()},messages:ie,get modifiers(){return V},get pluralRules(){return L||{}},get isGlobal(){return s},get missingWarn(){return v},set missingWarn(I){v=I,k.missingWarn=v},get fallbackWarn(){return y},set fallbackWarn(I){y=I,k.fallbackWarn=y},get fallbackRoot(){return M},set fallbackRoot(I){M=I},get fallbackFormat(){return E},set fallbackFormat(I){E=I,k.fallbackFormat=E},get warnHtmlMessage(){return F},set warnHtmlMessage(I){F=I,k.warnHtmlMessage=I},get escapeParameter(){return T},set escapeParameter(I){T=I,k.escapeParameter=I},t:ee,getLocaleMessage:W,setLocaleMessage:D,mergeLocaleMessage:j,getPostTranslationHandler:ue,setPostTranslationHandler:ye,getMissingHandler:$e,setMissingHandler:Ye,[_h]:El};return Z.datetimeFormats=be,Z.numberFormats=se,Z.rt=ae,Z.te=w,Z.tm=R,Z.d=de,Z.n=X,Z.getDateTimeFormat=J,Z.setDateTimeFormat=Y,Z.mergeDateTimeFormat=q,Z.getNumberFormat=U,Z.setNumberFormat=ce,Z.mergeNumberFormat=Q,Z[yh]=n,Z[Lo]=rs,Z[Mo]=On,Z[Ro]=zs,Z}const vl={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function xh({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((s,i)=>[...s,...i.type===B?i.children:[i]],[]):t.reduce((n,s)=>{const i=e[s];return i&&(n[s]=i()),n},Le())}function Zc(){return B}const Sh=Me({name:"i18n-t",props:ot({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Ge(e)||!isNaN(e)}},vl),setup(e,t){const{slots:n,attrs:s}=t,i=e.i18n||gl({useScope:e.scope,__useComponent:!0});return()=>{const l=()=>{const f=Object.keys(n).filter(b=>b[0]!=="_"),h=Le();e.locale&&(h.locale=e.locale),e.plural!==void 0&&(h.plural=oe(e.plural)?+e.plural:e.plural);const p=xh(t,f);return i[Lo](e.keypath,p,h)},r=ot(Le(),s),u=oe(e.tag)||Se(e.tag)?e.tag:Zc();return Se(u)?mi(u,r,{default:l}):mi(u,r,l())}}}),Da=Sh;function Ch(e){return He(e)&&!oe(e[0])}function Qc(e,t,n,s){const{slots:i,attrs:l}=t;return()=>{const r=()=>{const h={part:!0};let p=Le();e.locale&&(h.locale=e.locale),oe(e.format)?h.key=e.format:Se(e.format)&&(oe(e.format.key)&&(h.key=e.format.key),p=Object.keys(e.format).reduce((y,M)=>n.includes(M)?ot(Le(),y,{[M]:e.format[M]}):y,Le()));const b=s(e.value,h,p);let v=[h.key];return He(b)?v=b.map((y,M)=>{const E=i[y.type],x=E?E({[y.type]:y.value,index:M,parts:b}):[y.value];return Ch(x)&&(x[0].key=`${y.type}-${M}`),x}):oe(b)&&(v=[b]),v},u=ot(Le(),l),f=oe(e.tag)||Se(e.tag)?e.tag:Zc();return Se(f)?mi(f,u,{default:r}):mi(f,u,r())}}const Th=Me({name:"i18n-n",props:ot({value:{type:Number,required:!0},format:{type:[String,Object]}},vl),setup(e,t){const n=e.i18n||gl({useScope:e.scope,__useComponent:!0});return Qc(e,t,qc,(...s)=>n[Ro](...s))}}),Ua=Th;function Eh(e,t){const n=e;if(e.mode==="composition")return n.__getInstance(t)||e.global;{const s=n.__getInstance(t);return s!=null?s.__composer:e.global.__composer}}function Ah(e){const t=r=>{const{instance:u,value:f}=r;if(!u||!u.$)throw Ct(gt.UNEXPECTED_ERROR);const h=Eh(e,u.$),p=ja(f);return[Reflect.apply(h.t,h,[...Ha(p)]),h]};return{created:(r,u)=>{const[f,h]=t(u);bi&&(r.__i18nWatcher=St(h.locale,()=>{u.instance&&u.instance.$forceUpdate()})),r.__composer=h,r.textContent=f},unmounted:r=>{bi&&r.__i18nWatcher&&(r.__i18nWatcher(),r.__i18nWatcher=void 0,delete r.__i18nWatcher),r.__composer&&(r.__composer=void 0,delete r.__composer)},beforeUpdate:(r,{value:u})=>{if(r.__composer){const f=r.__composer,h=ja(u);r.textContent=Reflect.apply(f.t,f,[...Ha(h)])}},getSSRProps:r=>{const[u]=t(r);return{textContent:u}}}}function ja(e){if(oe(e))return{path:e};if(De(e)){if(!("path"in e))throw Ct(gt.REQUIRED_VALUE,"path");return e}else throw Ct(gt.INVALID_VALUE)}function Ha(e){const{path:t,locale:n,args:s,choice:i,plural:l}=e,r={},u=s||{};return oe(n)&&(r.locale=n),Ge(i)&&(r.plural=i),Ge(l)&&(r.plural=l),[t,u,r]}function Ph(e,t,...n){const s=De(n[0])?n[0]:{};(!qe(s.globalInstall)||s.globalInstall)&&([Da.name,"I18nT"].forEach(l=>e.component(l,Da)),[Ua.name,"I18nN"].forEach(l=>e.component(l,Ua)),[Ba.name,"I18nD"].forEach(l=>e.component(l,Ba))),e.directive("t",Ah(t))}const Oh=En("global-vue-i18n");function Ih(e={}){const t=qe(e.globalInjection)?e.globalInjection:!0,n=new Map,[s,i]=Lh(e),l=En("");function r(p){return n.get(p)||null}function u(p,b){n.set(p,b)}function f(p){n.delete(p)}const h={get mode(){return"composition"},async install(p,...b){if(p.__VUE_I18N_SYMBOL__=l,p.provide(p.__VUE_I18N_SYMBOL__,h),De(b[0])){const M=b[0];h.__composerExtend=M.__composerExtend,h.__vueI18nExtend=M.__vueI18nExtend}let v=null;t&&(v=jh(p,h.global)),Ph(p,h,...b);const y=p.unmount;p.unmount=()=>{v&&v(),h.dispose(),y()}},get global(){return i},dispose(){s.stop()},__instances:n,__getInstance:r,__setInstance:u,__deleteInstance:f};return h}function gl(e={}){const t=Xc();if(t==null)throw Ct(gt.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Ct(gt.NOT_INSTALLED);const n=Mh(t),s=Nh(n),i=wh(t),l=Rh(e,i);if(l==="global")return kh(s,e,i),s;if(l==="parent"){let f=Va(n,t,e.__useComponent);return f==null&&(f=s),f}if(l==="isolated"){if(n.mode!=="composition")throw Ct(gt.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const f=n,h=ot({},e),p=Va(n,t);h.__root=p||s;const b=No(h);return f.__composerExtend&&(b[Jn]=f.__composerExtend(b)),kr()&&Gu(()=>{const y=b[Jn];y&&(y(),delete b[Jn])}),b}const r=n;let u=r.__getInstance(t);if(u==null){const f=ot({},e);"__i18n"in i&&(f.__i18n=i.__i18n),s&&(f.__root=s),u=No(f),r.__composerExtend&&(u[Jn]=r.__composerExtend(u)),Dh(r,t,u),r.__setInstance(t,u)}return u}function Lh(e,t){const n=Yu(),s=n.run(()=>No(e));if(s==null)throw Ct(gt.UNEXPECTED_ERROR);return[n,s]}function Mh(e){const t=ws(e.isCE?Oh:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Ct(e.isCE?gt.NOT_INSTALLED_WITH_PROVIDE:gt.UNEXPECTED_ERROR);return t}function Rh(e,t){return fl(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function Nh(e){return e.mode==="composition"?e.global:e.global.__composer}function Va(e,t,n=!1){let s=null;const i=t.root;let l=Fh(t,n);for(;l!=null;){const r=e;if(e.mode==="composition"&&(s=r.__getInstance(l)),s!=null||i===l)break;l=l.parent}return s}function Fh(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function Dh(e,t,n){Tn(()=>{},t),cl(()=>{const s=n;e.__deleteInstance(t);const i=s[Jn];i&&(i(),delete s[Jn])},t)}const Uh=["locale","fallbackLocale","availableLocales"],Wa=["t","rt","d","n","tm","te"];function jh(e,t){const n=Object.create(null);return Uh.forEach(i=>{const l=Object.getOwnPropertyDescriptor(t,i);if(!l)throw Ct(gt.UNEXPECTED_ERROR);const r=et(l.value)?{get(){return l.value.value},set(u){l.value.value=u}}:{get(){return l.get&&l.get()}};Object.defineProperty(n,i,r)}),e.config.globalProperties.$i18n=n,Wa.forEach(i=>{const l=Object.getOwnPropertyDescriptor(t,i);if(!l||!l.value)throw Ct(gt.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${i}`,l)}),()=>{delete e.config.globalProperties.$i18n,Wa.forEach(i=>{delete e.config.globalProperties[`$${i}`]})}}const Hh=Me({name:"i18n-d",props:ot({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},vl),setup(e,t){const n=e.i18n||gl({useScope:e.scope,__useComponent:!0});return Qc(e,t,Kc,(...s)=>n[Mo](...s))}}),Ba=Hh;th(jp);nh(Zp);sh(Ao);const Vh={editor:{common:{undo:{t:0,b:{t:2,i:[{t:3}],s:"Undo"}},online:{t:0,b:{t:2,i:[{t:3}],s:"Online"}},offline:{t:0,b:{t:2,i:[{t:3}],s:"Offline"}},unknown:{t:0,b:{t:2,i:[{t:3}],s:"unknown"}},unsaved:{t:0,b:{t:2,i:[{t:3}],s:"Unsaved changes"}},cancel:{t:0,b:{t:2,i:[{t:3}],s:"Cancel"}},open_integrations:{t:0,b:{t:2,i:[{t:3}],s:"Open Devices & services"}},save_send:{t:0,b:{t:2,i:[{t:3}],s:"Save & send"}},saving:{t:0,b:{t:2,i:[{t:3}],s:"Saving…"}},read_current_data:{t:0,b:{t:2,i:[{t:3}],s:"Read current data"}},results:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"1 result. Keep typing to narrow it down."},{t:2,i:[{t:4,k:"n"},{t:3,v:" results. Keep typing to narrow it down."}]}]}},close:{t:0,b:{t:2,i:[{t:3}],s:"Close"}},remove:{t:0,b:{t:2,i:[{t:3}],s:"Remove"}},change:{t:0,b:{t:2,i:[{t:3}],s:"Change"}},loading:{t:0,b:{t:2,i:[{t:3}],s:"Loading…"}},back:{t:0,b:{t:2,i:[{t:3}],s:"← Back"}},copy:{t:0,b:{t:2,i:[{t:3}],s:"Copy"}}},nav:{new_screen:{t:0,b:{t:2,i:[{t:3}],s:"New screen"}},firmware:{t:0,b:{t:2,i:[{t:3}],s:"Firmware & USB"}},alerts:{t:0,b:{t:2,i:[{t:3}],s:"Alerts"}},settings:{t:0,b:{t:2,i:[{t:3}],s:"Settings"}},new_screen_detail:{t:0,b:{t:2,i:[{t:3}],s:"Connect and install"}}},api:{failed:{t:0,b:{t:2,i:[{t:3}],s:"That didn't work. Refresh the page and try again."}}},copy:{api_key:{copied:{t:0,b:{t:2,i:[{t:3}],s:"API key copied."}},selected:{t:0,b:{t:2,i:[{t:3}],s:"API key is selected. Copy with Ctrl+C or Command+C."}}},layout_json:{copied:{t:0,b:{t:2,i:[{t:3}],s:"Layout JSON copied."}},selected:{t:0,b:{t:2,i:[{t:3}],s:"Layout JSON is selected. Copy with Ctrl+C or Command+C."}}},action_name:{copied:{t:0,b:{t:2,i:[{t:3}],s:"Action name copied."}},selected:{t:0,b:{t:2,i:[{t:3}],s:"Action name is selected. Copy with Ctrl+C or Command+C."}}},yaml:{copied:{t:0,b:{t:2,i:[{t:3}],s:"YAML copied."}},selected:{t:0,b:{t:2,i:[{t:3}],s:"YAML is selected. Copy with Ctrl+C or Command+C."}}},icon_name:{copied:{t:0,b:{t:2,i:[{t:3}],s:"Icon name copied."}},selected:{t:0,b:{t:2,i:[{t:3}],s:"Icon name is selected. Copy with Ctrl+C or Command+C."}}},empty_color:{copied:{t:0,b:{t:2,i:[{t:3}],s:"Empty color copied."}},selected:{t:0,b:{t:2,i:[{t:3}],s:"Empty color is selected. Copy with Ctrl+C or Command+C."}}},color_name:{copied:{t:0,b:{t:2,i:[{t:3}],s:"Color name copied."}},selected:{t:0,b:{t:2,i:[{t:3}],s:"Color name is selected. Copy with Ctrl+C or Command+C."}}}},sidebar:{connection:{unreachable:{t:0,b:{t:2,i:[{t:3}],s:"Management page unreachable · retrying…"}},connected:{t:0,b:{t:2,i:[{t:3}],s:"Home Assistant connected"}},reconnecting:{t:0,b:{t:2,i:[{t:3}],s:"Reconnecting to Home Assistant…"}}},search:{t:0,b:{t:2,i:[{t:3}],s:"Search"}},screens:{t:0,b:{t:2,i:[{t:3}],s:"Screens"}},more:{t:0,b:{t:2,i:[{t:3}],s:"More"}},refresh:{t:0,b:{t:2,i:[{t:3}],s:"Refresh"}},update:{pill:{t:0,b:{t:2,i:[{t:3}],s:"Update"}},button:{t:0,b:{t:2,i:[{t:3}],s:"Update"}},queued:{t:0,b:{t:2,i:[{t:3}],s:"Queued for the update"}},available:{t:0,b:{t:2,i:[{t:3,v:"Update "},{t:4,k:"version"}]}},no_profile:{t:0,b:{t:2,i:[{t:3}],s:"No ESPHome profile found with this device name."}},whats_new:{t:0,b:{t:2,i:[{t:3}],s:"What's new"}},full_log:{t:0,b:{t:2,i:[{t:3}],s:"Full log"}}},host:{hint:{t:0,b:{t:2,i:[{t:3}],s:"The IP address, once; new firmware reports it itself."}},placeholder:{t:0,b:{t:2,i:[{t:3}],s:"IP address, e.g. 192.168.1.50"}},label:{t:0,b:{t:2,i:[{t:3}],s:"IP address"}},start:{t:0,b:{t:2,i:[{t:3}],s:"Start"}}},pending:{installed:{t:0,b:{t:2,i:[{t:3}],s:"Installed, but not yet in Home Assistant. Add the discovered ESPHome device under Settings → Devices & services, paste the API key there, and turn on “Allow the device to perform Home Assistant actions” under Configure."}},downloaded:{t:0,b:{t:2,i:[{t:3}],s:"Firmware downloaded, not yet in Home Assistant. Put it on the screen with ESPHome Web, then add the discovered ESPHome device under Settings → Devices & services, paste the API key there, and allow the Home Assistant actions under Configure."}},not_flashed:{t:0,b:{t:2,i:[{t:3,v:"Not yet in Home Assistant. Already flashed? Add the ESPHome device under Settings → Devices & services, then allow the Home Assistant actions under Configure. Not flashed yet? Firmware & USB → "},{t:4,k:"file"},{t:3,v:"."}]}}},copy_api_key:{t:0,b:{t:2,i:[{t:3}],s:"Copy API key"}}},palette:{groups:{screens:{t:0,b:{t:2,i:[{t:3}],s:"Screens"}},actions:{t:0,b:{t:2,i:[{t:3}],s:"Actions"}},add:{t:0,b:{t:2,i:[{t:3}],s:"Add to this screen"}}},alerts_detail:{t:0,b:{t:2,i:[{t:3}],s:"Cheatsheet and a test alert"}},settings_detail:{t:0,b:{t:2,i:[{t:3}],s:"Updates, Claude"}},nothing_to_save:{t:0,b:{t:2,i:[{t:3}],s:"Nothing to save"}},identify:{t:0,b:{t:2,i:[{t:3}],s:"Identify this screen"}},identify_detail:{t:0,b:{t:2,i:[{t:3}],s:"Blinks the backlight and shows a card"}},identify_needs:{t:0,b:{t:2,i:[{t:3}],s:"Needs a newer firmware"}},export:{t:0,b:{t:2,i:[{t:3}],s:"Export layout"}},export_detail:{t:0,b:{t:2,i:[{t:3}],s:"Download and copy as JSON"}},placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Search screens, entities, actions…"}},empty:{t:0,b:{t:2,i:[{t:3}],s:"Nothing matches. Type part of a screen, entity or action."}}},empty:{choose:{title:{t:0,b:{t:2,i:[{t:3}],s:"Choose a screen"}},text:{t:0,b:{t:2,i:[{t:3}],s:"Pick one of your screens on the left to change its tiles, top bar and settings."}}},start:{title:{t:0,b:{t:2,i:[{t:3}],s:"Start with a screen"}},text:{t:0,b:{t:2,i:[{t:3}],s:"Connect a CYD or Guition via USB to your Home Assistant machine. Profile, firmware, and the first flash happen in one go."}},button:{t:0,b:{t:2,i:[{t:3}],s:"Install new screen"}}}},screen_view:{confirm:{switch:{t:0,b:{t:2,i:[{t:3}],s:"You have unsaved changes. Open a different screen anyway?"}},copy:{t:0,b:{t:2,i:[{t:3}],s:"Replace the unsaved layout with a copy of the other screen's?"}},import:{t:0,b:{t:2,i:[{t:3}],s:"Replace the unsaved layout with the imported one?"}}},saved:{current:{t:0,b:{t:2,i:[{t:3}],s:"Saved. Your screen is being updated."}},other:{t:0,b:{t:2,i:[{t:3,v:"Saved. "},{t:4,k:"name"},{t:3,v:" is being updated."}]}},other_unnamed:{t:0,b:{t:2,i:[{t:3}],s:"Saved. The screen is being updated."}},newer_edit:{t:0,b:{t:2,i:[{t:3}],s:"Saved. Your newest change isn't sent yet: press Save & send again."}}},identified:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:" blinks and shows a card for a few seconds."}]}},offline:{t:0,b:{t:2,i:[{t:3}],s:"Offline · changes are saved"}},tabs:{layout:{t:0,b:{t:2,i:[{t:3}],s:"Layout"}},settings:{t:0,b:{t:2,i:[{t:3}],s:"Screen settings"}}},sent:{t:0,b:{t:2,i:[{t:3}],s:"Saved · sent to screen"}},all_saved:{t:0,b:{t:2,i:[{t:3}],s:"All saved"}},more:{t:0,b:{t:2,i:[{t:3}],s:"More"}},menu:{identify:{t:0,b:{t:2,i:[{t:3}],s:"Identify"}},identify_hint:{t:0,b:{t:2,i:[{t:3}],s:"blink the screen"}},identify_needs:{t:0,b:{t:2,i:[{t:3}],s:"Needs firmware 0.2.31 or newer"}},inspect_hint:{t:0,b:{t:2,i:[{t:3}],s:"from Home Assistant"}},copy:{t:0,b:{t:2,i:[{t:3}],s:"Copy layout from…"}},copy_screens:{t:0,b:{t:1,c:[{t:2,i:[{t:4,k:"n"},{t:3,v:" screen"}]},{t:2,i:[{t:4,k:"n"},{t:3,v:" screens"}]}]}},copy_none:{t:0,b:{t:2,i:[{t:3}],s:"no other screen"}},copy_tiles:{t:0,b:{t:1,c:[{t:2,i:[{t:4,k:"n"},{t:3,v:" tile"}]},{t:2,i:[{t:4,k:"n"},{t:3,v:" tiles"}]}]}},export:{t:0,b:{t:2,i:[{t:3}],s:"Export layout"}},import:{t:0,b:{t:2,i:[{t:3}],s:"Import layout…"}},override:{t:0,b:{t:2,i:[{t:3}],s:"Override YAML"}},override_hint:{t:0,b:{t:2,i:[{t:3}],s:"advanced"}},override_none:{t:0,b:{t:2,i:[{t:3}],s:"No ESPHome profile found for this screen"}},update:{t:0,b:{t:2,i:[{t:3}],s:"Update firmware"}}}},layout:{removed:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:" removed"}]}},no_room:{t:0,b:{t:2,i:[{t:3,v:"There is no room for this tile on page "},{t:4,k:"page"},{t:3,v:"."}]}},no_free_page:{t:0,b:{t:2,i:[{t:3}],s:"No page is free for a full-page tile. Free a page first."}},page_taken:{t:0,b:{t:2,i:[{t:3,v:"This screen already has a tile that goes to page "},{t:4,k:"page"},{t:3,v:"."}]}},copied:{t:0,b:{t:2,i:[{t:3,v:"Layout of "},{t:4,k:"name"},{t:3,v:" copied. Save & send when it looks right."}]}},copied_part:{t:0,b:{t:2,i:[{t:3,v:"Layout of "},{t:4,k:"name"},{t:3,v:" copied: "},{t:4,k:"kept"},{t:3,v:" of "},{t:4,k:"total"},{t:3,v:" tiles fit this screen's firmware. Save & send when it looks right."}]}},imported:{t:0,b:{t:2,i:[{t:3}],s:"Layout imported. Save & send when it looks right."}},imported_part:{t:0,b:{t:2,i:[{t:3,v:"Layout imported: "},{t:4,k:"kept"},{t:3,v:" of "},{t:4,k:"total"},{t:3,v:" tiles fit this screen's firmware. Save & send when it looks right."}]}},not_json:{t:0,b:{t:2,i:[{t:3}],s:"That isn't JSON. Export a layout first, or paste one from another ESP Screens."}},no_tiles_in_file:{t:0,b:{t:2,i:[{t:3}],s:"No tiles in this file. Expected a layout exported from ESP Screens."}},count:{t:0,b:{t:1,c:[{t:2,i:[{t:4,k:"n"},{t:3,v:" page · "},{t:4,k:"tiles"},{t:3,v:" / "},{t:4,k:"limit"},{t:3,v:" tiles"}]},{t:2,i:[{t:4,k:"n"},{t:3,v:" pages · "},{t:4,k:"tiles"},{t:3,v:" / "},{t:4,k:"limit"},{t:3,v:" tiles"}]}]}},no_tiles:{t:0,b:{t:2,i:[{t:3}],s:"Add your first light, scene, or device from the library."}},how_to:{t:0,b:{t:2,i:[{t:3}],s:"Tap the top bar or a tile to change it. Drag to move; drop on the next page for a new one."}},positions_hint:{t:0,b:{t:2,i:[{t:3,v:"Empty slots and fixed positions work from firmware 0.2.26. This screen (firmware "},{t:4,k:"firmware"},{t:3,v:") shifts the tiles up to the first free slot until that update."}]}},aria:{t:0,b:{t:2,i:[{t:3}],s:"Screen layout"}},add_page:{t:0,b:{t:2,i:[{t:3}],s:"+ Add page"}},max_pages:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"1 page is the most"},{t:2,i:[{t:4,k:"n"},{t:3,v:" pages is the most"}]}]}}},page:{label:{t:0,b:{t:2,i:[{t:3,v:"Page "},{t:4,k:"page"}]}},remove:{t:0,b:{t:2,i:[{t:3}],s:"Remove page"}},remove_title:{t:0,b:{t:2,i:[{t:3}],s:"The pages after this one shift up one slot"}},edit_bar:{t:0,b:{t:2,i:[{t:3}],s:"Edit top bar"}},cell:{title:{t:0,b:{t:2,i:[{t:3}],s:"Empty slot. Click to add a tile here, or drag one over."}},aria:{t:0,b:{t:2,i:[{t:3,v:"Empty slot "},{t:4,k:"slot"},{t:3,v:" on page "},{t:4,k:"page"},{t:3,v:": add the next tile here"}]}},next:{t:0,b:{t:2,i:[{t:3}],s:"Next tile goes here"}},empty:{t:0,b:{t:2,i:[{t:3}],s:"Empty"}}}},library:{title:{t:0,b:{t:2,i:[{t:3}],s:"Library"}},entities:{t:0,b:{t:1,c:[{t:2,i:[{t:4,k:"n"},{t:3,v:" entity"}]},{t:2,i:[{t:4,k:"n"},{t:3,v:" entities"}]}]}},search:{t:0,b:{t:2,i:[{t:3}],s:"Search by name, device, or room…"}},search_label:{t:0,b:{t:2,i:[{t:3}],s:"Add an entity"}},filters:{all:{t:0,b:{t:2,i:[{t:3}],s:"All"}},light:{t:0,b:{t:2,i:[{t:3}],s:"Lights"}},climate:{t:0,b:{t:2,i:[{t:3}],s:"Climate"}},switch:{t:0,b:{t:2,i:[{t:3}],s:"Switches"}},binary_sensor:{t:0,b:{t:2,i:[{t:3}],s:"Status"}},button:{t:0,b:{t:2,i:[{t:3}],s:"Actions"}},script:{t:0,b:{t:2,i:[{t:3}],s:"Scripts"}},fan:{t:0,b:{t:2,i:[{t:3}],s:"Fans"}},cover:{t:0,b:{t:2,i:[{t:3}],s:"Covers"}},scene:{t:0,b:{t:2,i:[{t:3}],s:"Scenes"}},vacuum:{t:0,b:{t:2,i:[{t:3}],s:"Vacuum"}},sensor:{t:0,b:{t:2,i:[{t:3}],s:"Sensors"}},media_player:{t:0,b:{t:2,i:[{t:3}],s:"Media"}},weather:{t:0,b:{t:2,i:[{t:3}],s:"Weather"}},number:{t:0,b:{t:2,i:[{t:3}],s:"Values"}},select:{t:0,b:{t:2,i:[{t:3}],s:"Selects"}},person:{t:0,b:{t:2,i:[{t:3}],s:"People"}},timer:{t:0,b:{t:2,i:[{t:3}],s:"Timers"}},screen:{t:0,b:{t:2,i:[{t:3}],s:"Screen"}}},room:{t:0,b:{t:2,i:[{t:3}],s:"Room"}},all_rooms:{t:0,b:{t:2,i:[{t:3}],s:"All rooms"}},hide_placed:{t:0,b:{t:2,i:[{t:3}],s:"Hide placed"}},hide_placed_title:{t:0,b:{t:2,i:[{t:3}],s:"Hide what is already on this screen"}},all_placed:{t:0,b:{t:2,i:[{t:3}],s:"Everything here is already on this screen."}},none_found:{t:0,b:{t:2,i:[{t:3}],s:"No entities found. Try a different name, room or filter."}},full:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"This screen holds 1 tile."},{t:2,i:[{t:3,v:"This screen holds "},{t:4,k:"n"},{t:3,v:" tiles."}]}]}},full_update:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"This screen holds 1 tile; update its firmware for 48."},{t:2,i:[{t:3,v:"This screen holds "},{t:4,k:"n"},{t:3,v:" tiles; update its firmware for 48."}]}]}},hint:{t:0,b:{t:2,i:[{t:3}],s:"Drag onto a page, or tap + to add to the first free slot. ⌘K searches everything."}}},domains:{light:{t:0,b:{t:2,i:[{t:3}],s:"Light"}},climate:{t:0,b:{t:2,i:[{t:3}],s:"Climate"}},vacuum:{t:0,b:{t:2,i:[{t:3}],s:"Vacuum"}},fan:{t:0,b:{t:2,i:[{t:3}],s:"Fan"}},cover:{t:0,b:{t:2,i:[{t:3}],s:"Cover"}},media_player:{t:0,b:{t:2,i:[{t:3}],s:"Media"}},sensor:{t:0,b:{t:2,i:[{t:3}],s:"Sensor"}},binary_sensor:{t:0,b:{t:2,i:[{t:3}],s:"Status"}},switch:{t:0,b:{t:2,i:[{t:3}],s:"Switch"}},input_boolean:{t:0,b:{t:2,i:[{t:3}],s:"Switch"}},scene:{t:0,b:{t:2,i:[{t:3}],s:"Scene"}},script:{t:0,b:{t:2,i:[{t:3}],s:"Script"}},weather:{t:0,b:{t:2,i:[{t:3}],s:"Weather"}},number:{t:0,b:{t:2,i:[{t:3}],s:"Value"}},input_number:{t:0,b:{t:2,i:[{t:3}],s:"Value"}},select:{t:0,b:{t:2,i:[{t:3}],s:"Select"}},input_select:{t:0,b:{t:2,i:[{t:3}],s:"Select"}},button:{t:0,b:{t:2,i:[{t:3}],s:"Action"}},input_button:{t:0,b:{t:2,i:[{t:3}],s:"Action"}},screen:{t:0,b:{t:2,i:[{t:3}],s:"Screen"}},sun:{t:0,b:{t:2,i:[{t:3}],s:"Sun"}},timer:{t:0,b:{t:2,i:[{t:3}],s:"Timer"}},person:{t:0,b:{t:2,i:[{t:3}],s:"Person"}},camera:{t:0,b:{t:2,i:[{t:3}],s:"Camera"}},image:{t:0,b:{t:2,i:[{t:3}],s:"Image"}},entity:{t:0,b:{t:2,i:[{t:3}],s:"Entity"}}},displays:{standard:{t:0,b:{t:2,i:[{t:3}],s:"standard"}},watch:{t:0,b:{t:2,i:[{t:3}],s:"large value"}},forecast:{t:0,b:{t:2,i:[{t:3}],s:"weather forecast"}},graph:{t:0,b:{t:2,i:[{t:3}],s:"graph"}},digital:{t:0,b:{t:2,i:[{t:3}],s:"digital clock"}},analog:{t:0,b:{t:2,i:[{t:3}],s:"analog clock"}},sunpath:{t:0,b:{t:2,i:[{t:3}],s:"sun path"}}},sizes:{single:{t:0,b:{t:2,i:[{t:3}],s:"normal"}},wide:{t:0,b:{t:2,i:[{t:3}],s:"double"}},full:{t:0,b:{t:2,i:[{t:3}],s:"full page"}}},tile:{name:{t:0,b:{t:2,i:[{t:3}],s:"Name on the screen"}},icon:{auto_ha:{t:0,b:{t:2,i:[{t:3}],s:"Automatic (from Home Assistant)"}},auto_default:{t:0,b:{t:2,i:[{t:3}],s:"Automatic (default)"}},needs_firmware:{t:0,b:{t:2,i:[{t:3}],s:"The screen shows a chosen icon from firmware 0.2.18."}}},goes_to:{label:{t:0,b:{t:2,i:[{t:3}],s:"Goes to page"}},empty:{t:0,b:{t:2,i:[{t:4,k:"page"},{t:3,v:" (empty)"}]}},needs_firmware:{t:0,b:{t:2,i:[{t:3}],s:"Navigation tiles need firmware 0.2.62: press Update on the screen first."}},no_page:{t:0,b:{t:2,i:[{t:3,v:"This screen has no page "},{t:4,k:"page"},{t:3,v:", so a tap opens its last page. Choose another page."}]}},hint:{t:0,b:{t:2,i:[{t:3}],s:"A tap on the tile opens that page."}}},display:{label:{t:0,b:{t:2,i:[{t:3}],s:"Display"}},digital:{t:0,b:{t:2,i:[{t:3}],s:"Digital clock"}},analog:{t:0,b:{t:2,i:[{t:3}],s:"Analog clock"}},standard:{t:0,b:{t:2,i:[{t:3}],s:"Name and status"}},watch:{t:0,b:{t:2,i:[{t:3}],s:"Large value"}},forecast:{t:0,b:{t:2,i:[{t:3}],s:"Weather forecast"}},graph:{t:0,b:{t:2,i:[{t:3}],s:"Graph"}},sunpath:{t:0,b:{t:2,i:[{t:3}],s:"Sun path"}},no_graph:{t:0,b:{t:2,i:[{t:3}],s:"Home Assistant has no numbers for this entity, so the graph stays empty. Choose another display."}},no_forecast:{t:0,b:{t:2,i:[{t:3}],s:"This weather service has no daily forecast in Home Assistant. Choose another display."}}},size:{label:{t:0,b:{t:2,i:[{t:3}],s:"Size"}},single:{t:0,b:{t:2,i:[{t:3}],s:"Normal"}},wide:{t:0,b:{t:2,i:[{t:3}],s:"Double-width"}},full:{t:0,b:{t:2,i:[{t:3}],s:"Full page"}},full_hint:{t:0,b:{t:2,i:[{t:3}],s:"Full page: one big button that lights up while on; a slider, controls or a graph sit at the bottom of it."}},needs_firmware:{t:0,b:{t:2,i:[{t:3}],s:"A full-page tile needs firmware 0.2.62: press Update on the screen first."}}},page:{label:{t:0,b:{t:2,i:[{t:3}],s:"Page"}},new:{t:0,b:{t:2,i:[{t:3}],s:"New page"}}},controls:{label:{t:0,b:{t:2,i:[{t:3}],s:"Direct control on the tile"}},not_offered:{t:0,b:{t:2,i:[{t:3}],s:"Home Assistant doesn't offer this control for this entity, so it stays empty on the screen. Choose another one."}},full_hint:{t:0,b:{t:2,i:[{t:3}],s:"At the bottom of the full-page tile; a tap anywhere else works as set below."}},wide_hint:{t:0,b:{t:2,i:[{t:3}],s:"On the right of the double-width tile, like the rows in Home Assistant. Tapping the name works as set below."}},needs_firmware:{t:0,b:{t:2,i:[{t:3}],s:"The screen shows direct control from firmware 0.2.19; until then the tile stays as it was."}}},tap:{label:{t:0,b:{t:2,i:[{t:3}],s:"On tap"}},auto:{t:0,b:{t:2,i:[{t:3}],s:"Automatic"}},detail:{t:0,b:{t:2,i:[{t:3}],s:"Open control"}},none:{t:0,b:{t:2,i:[{t:3}],s:"View only"}},toggle:{t:0,b:{t:2,i:[{t:3}],s:"On / off"}},action:{t:0,b:{t:2,i:[{t:3}],s:"Perform action"}},no_toggle:{t:0,b:{t:2,i:[{t:3}],s:"Home Assistant can't turn this on and off, so a tap does nothing. Choose another option."}},toggle_needs_firmware:{t:0,b:{t:2,i:[{t:3}],s:"The screen switches this from firmware 0.2.58: press Update on the screen. Until then a tap opens its card."}},hold:{t:0,b:{t:2,i:[{t:3}],s:"Hold the tile to open its card."}}},slider:{label:{t:0,b:{t:2,i:[{t:3}],s:"Small slider on the tile"}},no:{t:0,b:{t:2,i:[{t:3}],s:"No"}},yes:{t:0,b:{t:2,i:[{t:3}],s:"Yes, control directly"}},nothing:{t:0,b:{t:2,i:[{t:3}],s:"Home Assistant has nothing a slider can change for this entity. Choose No."}}},history:{label:{t:0,b:{t:2,i:[{t:3}],s:"History"}},hours:{t:0,b:{t:1,c:[{t:2,i:[{t:4,k:"n"},{t:3,v:" hour"}]},{t:2,i:[{t:4,k:"n"},{t:3,v:" hours"}]}]}}},background:{label:{t:0,b:{t:2,i:[{t:3}],s:"Pastel background"}},aria:{t:0,b:{t:2,i:[{t:3,v:"Background: "},{t:4,k:"name"}]}}}},tile_card:{label:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:", slot "},{t:4,k:"slot"},{t:3,v:" on page "},{t:4,k:"page"},{t:3,v:". Enter: configure, arrow keys: move"}]}},remove:{t:0,b:{t:2,i:[{t:3}],s:"Remove tile"}},remove_named:{t:0,b:{t:2,i:[{t:3,v:"Remove "},{t:4,k:"name"}]}}},action:{label:{t:0,b:{t:2,i:[{t:3}],s:"Action"}},asking:{t:0,b:{t:2,i:[{t:3}],s:"Asking Home Assistant which actions this entity has…"}},not_answering:{t:0,b:{t:2,i:[{t:3}],s:"Home Assistant isn't answering right now. Try again in a moment."}},choose:{t:0,b:{t:2,i:[{t:3}],s:"Choose an action"}},search:{t:0,b:{t:2,i:[{t:3}],s:"Search, for example toggle, position, or play"}},search_label:{t:0,b:{t:2,i:[{t:3}],s:"Search for an action"}},none_found:{t:0,b:{t:2,i:[{t:3}],s:"No action found."}},gone:{t:0,b:{t:2,i:[{t:3}],s:"Home Assistant doesn't offer this action for this entity any more, so a tap does nothing. Choose another one."}},optional:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:" (optional)"}]}},not_set:{t:0,b:{t:2,i:[{t:3}],s:"Not set"}},on:{t:0,b:{t:2,i:[{t:3}],s:"On"}},off:{t:0,b:{t:2,i:[{t:3}],s:"Off"}},needs:{t:0,b:{t:2,i:[{t:3,v:"Home Assistant needs "},{t:4,k:"fields"},{t:3,v:"."}]}},needs_firmware:{t:0,b:{t:2,i:[{t:3}],s:"The screen performs an action from firmware 0.2.58: press Update on the screen. Until then a tap works as Automatic."}}},icon:{label:{t:0,b:{t:2,i:[{t:3}],s:"Icon"}},none:{t:0,b:{t:2,i:[{t:3}],s:"No icon"}},search:{t:0,b:{t:2,i:[{t:3}],s:"Search, for example lamp, music, or door"}},search_label:{t:0,b:{t:2,i:[{t:3}],s:"Search for an icon"}},none_text_only:{t:0,b:{t:2,i:[{t:3}],s:"No icon, text only"}},aria:{t:0,b:{t:2,i:[{t:3,v:"Icon: "},{t:4,k:"name"}]}},none_found:{t:0,b:{t:2,i:[{t:3}],s:"No icon found."}}},inspect:{title:{t:0,b:{t:2,i:[{t:3}],s:"Current data"}},subtitle:{t:0,b:{t:2,i:[{t:3}],s:"Connection, status, and supported properties"}},reading:{t:0,b:{t:2,i:[{t:3}],s:"Reading…"}},fetching:{t:0,b:{t:2,i:[{t:3}],s:"Fetching current HA status..."}},status:{t:0,b:{t:2,i:[{t:3,v:"Status: "},{t:4,k:"status"}]}},options:{t:0,b:{t:2,i:[{t:3,v:"Small slider: "},{t:4,k:"slider"},{t:3,v:" · Display: "},{t:4,k:"display"},{t:3,v:" · Size: "},{t:4,k:"size"},{t:3,v:" · Control: "},{t:4,k:"control"},{t:3,v:" · Background: "},{t:4,k:"background"}]}},yes:{t:0,b:{t:2,i:[{t:3}],s:"yes"}},no:{t:0,b:{t:2,i:[{t:3}],s:"no"}},control_none:{t:0,b:{t:2,i:[{t:3}],s:"none"}},background_default:{t:0,b:{t:2,i:[{t:3}],s:"Default"}},read_again:{t:0,b:{t:2,i:[{t:3}],s:"Read again"}}},topbar:{removed:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:" removed from the top bar"}]}},full:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"The top bar has room for 1 item."},{t:2,i:[{t:3,v:"The top bar has room for "},{t:4,k:"n"},{t:3,v:" items."}]}]}},already:{t:0,b:{t:2,i:[{t:3}],s:"This is already in the top bar."}},title:{t:0,b:{t:2,i:[{t:3}],s:"Top bar"}},aria:{t:0,b:{t:2,i:[{t:3,v:"Top bar: "},{t:4,k:"name"}]}},builtin:{t:0,b:{t:2,i:[{t:3}],s:"From the screen itself, also works without Home Assistant"}},items:{t:0,b:{t:1,c:[{t:2,i:[{t:4,k:"used"},{t:3,v:" of "},{t:4,k:"n"},{t:3,v:" item"}]},{t:2,i:[{t:4,k:"used"},{t:3,v:" of "},{t:4,k:"n"},{t:3,v:" items"}]}]}},name:{t:0,b:{t:2,i:[{t:3}],s:"Left: name"}},name_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"For example: Living room"}},right:{t:0,b:{t:2,i:[{t:3}],s:"Right: time, sensors, or a clock"}},item_label:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:", slot "},{t:4,k:"slot"},{t:3,v:". Enter: configure, arrows: move"}]}},remove_named:{t:0,b:{t:2,i:[{t:3,v:"Remove "},{t:4,k:"name"},{t:3,v:" from the top bar"}]}},max:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"Maximum 1 item"},{t:2,i:[{t:3,v:"Maximum "},{t:4,k:"n"},{t:3,v:" items"}]}]}},add_title:{t:0,b:{t:2,i:[{t:3}],s:"Add the time, date, analog clock, or an entity"}},add_button:{t:0,b:{t:2,i:[{t:3}],s:"+ Add time, date, or an entity"}},hint:{overflow:{t:0,b:{t:2,i:[{t:3}],s:"Not everything fits next to the name: the screen drops the dashed items. Remove one or choose a shorter name."}},reorder:{t:0,b:{t:2,i:[{t:3}],s:"Drag to reorder; tap an item to configure it."}},needs_firmware:{t:0,b:{t:2,i:[{t:3,v:"Sensors, the date, and the analog clock appear from firmware "},{t:4,k:"version"},{t:3,v:"; until that update, this screen shows the name and, if the time is in the bar, the clock."}]}}},detail:{hidden:{t:0,b:{t:2,i:[{t:3}],s:"Hidden: not active right now"}},overflow:{t:0,b:{t:2,i:[{t:3}],s:"Doesn't fit next to the name"}},dial:{t:0,b:{t:2,i:[{t:3}],s:"Dial"}}},live:{hidden:{t:0,b:{t:2,i:[{t:3}],s:"Hidden right now: not active"}},overflow:{t:0,b:{t:2,i:[{t:3}],s:"Doesn't currently fit next to the name"}},looks:{t:0,b:{t:2,i:[{t:3}],s:"How it looks on the screen"}}},analog_sample:{t:0,b:{t:2,i:[{t:3}],s:"Small dial with the time"}},content:{label:{t:0,b:{t:2,i:[{t:3}],s:"What to show"}},hint:{t:0,b:{t:2,i:[{t:3}],s:"Last changed keeps counting on the screen itself: “Just now”, “5 min ago”, “Yesterday”."}}},auto_icon:{t:0,b:{t:2,i:[{t:3}],s:"Automatic (like Home Assistant)"}},show:{label:{t:0,b:{t:2,i:[{t:3}],s:"Show"}},hint:{t:0,b:{t:2,i:[{t:3}],s:"Only when active hides the item as long as it's off, closed, away, or 0. Handy for an open door, a running washing machine, or who's home."}}},clock_24:{t:0,b:{t:2,i:[{t:3,v:"24 hour clock · change under "},{t:4,k:"settings"}]}},clock_12:{t:0,b:{t:2,i:[{t:3,v:"12 hour clock · change under "},{t:4,k:"settings"}]}},clock_settings:{t:0,b:{t:2,i:[{t:3}],s:"Settings → Language & region"}},date_hint:{t:0,b:{t:2,i:[{t:4,k:"date"},{t:3,v:" today. The date follows the screen's own clock."}]}},up:{t:0,b:{t:2,i:[{t:3}],s:"↑ Up"}},down:{t:0,b:{t:2,i:[{t:3}],s:"↓ Down"}},add:{title:{t:0,b:{t:2,i:[{t:3}],s:"Add to the top bar"}},slots:{t:0,b:{t:1,c:[{t:2,i:[{t:4,k:"used"},{t:3,v:" of "},{t:4,k:"n"},{t:3,v:" slot used"}]},{t:2,i:[{t:4,k:"used"},{t:3,v:" of "},{t:4,k:"n"},{t:3,v:" slots used"}]}]}},builtin:{t:0,b:{t:2,i:[{t:3}],s:"From the screen itself"}},added:{t:0,b:{t:2,i:[{t:3}],s:"Already added"}},suggestions:{t:0,b:{t:2,i:[{t:3}],s:"Suggestions from Home Assistant"}},entity:{t:0,b:{t:2,i:[{t:3}],s:"An entity"}},search:{t:0,b:{t:2,i:[{t:3}],s:"Search by name, room, or entity, e.g. temperature or door"}},search_label:{t:0,b:{t:2,i:[{t:3}],s:"Search for an entity for the top bar"}},none_found:{t:0,b:{t:2,i:[{t:3}],s:"No entities found."}}}},screen_settings:{groups:{brightness:{t:0,b:{t:2,i:[{t:3}],s:"Brightness"}},night:{t:0,b:{t:2,i:[{t:3}],s:"Night"}},screen:{t:0,b:{t:2,i:[{t:3}],s:"Screen"}}},rows:{brightness:{t:0,b:{t:2,i:[{t:3}],s:"Brightness"}},dark_mode:{t:0,b:{t:2,i:[{t:3}],s:"Dark mode"}},standby_enabled:{t:0,b:{t:2,i:[{t:3}],s:"Auto standby"}},standby_seconds:{t:0,b:{t:2,i:[{t:3}],s:"Standby after"}},standby_brightness:{t:0,b:{t:2,i:[{t:3}],s:"Standby brightness"}},night_enabled:{t:0,b:{t:2,i:[{t:3}],s:"Night mode"}},night_start:{t:0,b:{t:2,i:[{t:3}],s:"Starts"}},night_end:{t:0,b:{t:2,i:[{t:3}],s:"Ends"}},night_brightness:{t:0,b:{t:2,i:[{t:3}],s:"Night brightness"}},auto_home:{t:0,b:{t:2,i:[{t:3}],s:"Back to page 1"}},auto_home_seconds:{t:0,b:{t:2,i:[{t:3}],s:"After"}},home_on_standby:{t:0,b:{t:2,i:[{t:3}],s:"Also on standby"}},swipe_pages:{t:0,b:{t:2,i:[{t:3}],s:"Swipe between pages"}},page_buttons:{t:0,b:{t:2,i:[{t:3}],s:"Page buttons"}},rotation:{t:0,b:{t:2,i:[{t:3}],s:"Rotation"}}},duration:{seconds:{t:0,b:{t:2,i:[{t:4,k:"n"},{t:3,v:" sec"}]}},minutes:{t:0,b:{t:2,i:[{t:4,k:"n"},{t:3,v:" min"}]}},hours:{t:0,b:{t:2,i:[{t:4,k:"n"},{t:3,v:" h"}]}},hours_minutes:{t:0,b:{t:2,i:[{t:4,k:"h"},{t:3,v:" h "},{t:4,k:"m"}]}}},time:{am:{t:0,b:{t:2,i:[{t:4,k:"time"},{t:3,v:" AM"}]}},pm:{t:0,b:{t:2,i:[{t:4,k:"time"},{t:3,v:" PM"}]}}},other_screen_busy:{t:0,b:{t:2,i:[{t:3}],s:"Still saving the other screen's settings. Try again in a moment."}},reach:{intro:{t:0,b:{t:2,i:[{t:3}],s:"Page buttons and swiping are off, so only Go to page tiles change the page."}},pages:{t:0,b:{t:1,c:[{t:2,i:[{t:3,v:"page "},{t:4,k:"list"}]},{t:2,i:[{t:3,v:"pages "},{t:4,k:"list"}]}]}},tiles:{t:0,b:{t:1,c:[{t:2,i:[{t:3,v:"You have "},{t:4,k:"n"},{t:3,v:" Go to page tile, to "},{t:4,k:"targets"},{t:3,v:"."}]},{t:2,i:[{t:3,v:"You have "},{t:4,k:"n"},{t:3,v:" Go to page tiles, to "},{t:4,k:"targets"},{t:3,v:"."}]}]}},tiles_missing_one:{t:0,b:{t:1,c:[{t:2,i:[{t:3,v:"You have "},{t:4,k:"n"},{t:3,v:" Go to page tile, to "},{t:4,k:"targets"},{t:3,v:", but none to "},{t:4,k:"missing"},{t:3,v:", so you can't reach it."}]},{t:2,i:[{t:3,v:"You have "},{t:4,k:"n"},{t:3,v:" Go to page tiles, to "},{t:4,k:"targets"},{t:3,v:", but none to "},{t:4,k:"missing"},{t:3,v:", so you can't reach it."}]}]}},tiles_missing_more:{t:0,b:{t:1,c:[{t:2,i:[{t:3,v:"You have "},{t:4,k:"n"},{t:3,v:" Go to page tile, to "},{t:4,k:"targets"},{t:3,v:", but none to "},{t:4,k:"missing"},{t:3,v:", so you can't reach them."}]},{t:2,i:[{t:3,v:"You have "},{t:4,k:"n"},{t:3,v:" Go to page tiles, to "},{t:4,k:"targets"},{t:3,v:", but none to "},{t:4,k:"missing"},{t:3,v:", so you can't reach them."}]}]}},none:{t:0,b:{t:2,i:[{t:3}],s:"You have no Go to page tiles."}},none_missing_one:{t:0,b:{t:2,i:[{t:3,v:"You have no Go to page tiles to "},{t:4,k:"missing"},{t:3,v:", so you can't reach it."}]}},none_missing_more:{t:0,b:{t:2,i:[{t:3,v:"You have no Go to page tiles to "},{t:4,k:"missing"},{t:3,v:", so you can't reach them."}]}},cut_off:{t:0,b:{t:2,i:[{t:3,v:"The tiles to "},{t:4,k:"pages"},{t:3,v:" are only on pages you can't reach."}]}},no_way_back:{t:0,b:{t:2,i:[{t:3,v:"From "},{t:4,k:"pages"},{t:3,v:" no tile leads back to page 1."}]}}},status:{offline:{t:0,b:{t:2,i:[{t:3}],s:"This screen is offline. Its settings can change once it's back."}},screen:{t:0,b:{t:2,i:[{t:3}],s:"Changes apply on the screen at once, and show up here when they change there."}},app:{t:0,b:{t:2,i:[{t:3}],s:"Changes apply at once. Firmware 0.2.49 lets the screen keep them itself."}}},unavailable:{t:0,b:{t:2,i:[{t:3}],s:"This entity is off in Home Assistant, or the screen is restarting."}},lower:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:" lower"}]}},higher:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:" higher"}]}}},update:{starting:{t:0,b:{t:2,i:[{t:3}],s:"Starting update…"}},building:{t:0,b:{t:2,i:[{t:3}],s:"Building the firmware…"}},writing:{t:0,b:{t:2,i:[{t:3}],s:"Writing the firmware over Wi-Fi…"}},phases:{install:{t:0,b:{t:2,i:[{t:3}],s:"Building and installing…"}},verify:{t:0,b:{t:2,i:[{t:3}],s:"Waiting for the screen to come back…"}},settle:{t:0,b:{t:2,i:[{t:3}],s:"Checking that it stays stable…"}}},new_language:{t:0,b:{t:2,i:[{t:3,v:"New language: "},{t:4,k:"name"}]}}},settings:{updates:{auto_on:{t:0,b:{t:2,i:[{t:3}],s:"Screens will now update automatically at night."}},auto_off:{t:0,b:{t:2,i:[{t:3}],s:"Automatic updates are off."}},title:{t:0,b:{t:2,i:[{t:3}],s:"Firmware updates"}},busy:{t:0,b:{t:2,i:[{t:3,v:"Updating to firmware "},{t:4,k:"version"},{t:3,v:"…"}]}},no_screens:{t:0,b:{t:2,i:[{t:3,v:"No screen paired yet. New screens get firmware "},{t:4,k:"version"},{t:3,v:"."}]}},available:{t:0,b:{t:1,c:[{t:2,i:[{t:3,v:"Firmware "},{t:4,k:"version"},{t:3,v:" is available for "},{t:4,k:"n"},{t:3,v:" screen."}]},{t:2,i:[{t:3,v:"Firmware "},{t:4,k:"version"},{t:3,v:" is available for "},{t:4,k:"n"},{t:3,v:" screens."}]}]}},current:{t:0,b:{t:2,i:[{t:3,v:"All screens have firmware "},{t:4,k:"version"},{t:3,v:"."}]}},all:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"Update 1 screen"},{t:2,i:[{t:3,v:"Update all "},{t:4,k:"n"},{t:3,v:" screens"}]}]}},whats_new:{t:0,b:{t:2,i:[{t:3,v:"What's new in firmware "},{t:4,k:"version"}]}},auto_label:{t:0,b:{t:2,i:[{t:3}],s:"Update automatically every night"}},auto_hint:{t:0,b:{t:2,i:[{t:3}],s:"Between 03:00 and 06:00, one screen at a time. Stops on an error and reports it in Home Assistant."}}},claude:{installed:{t:0,b:{t:2,i:[{t:3}],s:"Skill installed. Claude Code picks it up right away."}},installed_restart:{t:0,b:{t:2,i:[{t:3}],s:"Skill installed. Restart Claude Code once so it finds the new skills folder."}},text:{t:0,b:{t:2,i:[{t:3}],s:'Teach Claude about ESP Screens, then ask: "Show an alert on all my screens when the mailbox is full." Claude knows the alert events, every field, color, and icon.'}},install:{t:0,b:{t:2,i:[{t:3}],s:"Install for Claude Code"}},install_again:{t:0,b:{t:2,i:[{t:3}],s:"Install again"}},update:{t:0,b:{t:2,i:[{t:3}],s:"Update the skill"}},not_installed:{t:0,b:{t:2,i:[{t:3}],s:"Not installed"}},installed_chip:{t:0,b:{t:2,i:[{t:3}],s:"● Installed"}},newer:{t:0,b:{t:2,i:[{t:3}],s:"Installed · a newer version is ready"}},writes:{t:0,b:{t:2,i:[{t:3,v:"For Claude Code in Home Assistant. Writes one file to "},{t:4,k:"path"},{t:3,v:"; installing again replaces it."}]}},download:{t:0,b:{t:2,i:[{t:3}],s:"Download for claude.ai"}},upload:{t:0,b:{t:2,i:[{t:3}],s:"Upload the zip in Claude under Customize → Skills."}}},title:{t:0,b:{t:2,i:[{t:3}],s:"Everything around your screens."}},back:{t:0,b:{t:2,i:[{t:3}],s:"← My screens"}},screens:{title:{t:0,b:{t:2,i:[{t:3}],s:"Screens"}},text:{t:0,b:{t:2,i:[{t:3}],s:"Add a screen, or build and reinstall the firmware of one you already have."}},firmware_detail:{t:0,b:{t:2,i:[{t:3}],s:"Build and install via USB or Wi-Fi"}}},language:{title:{t:0,b:{t:2,i:[{t:3}],s:"Language & region"}},screen_language:{t:0,b:{t:2,i:[{t:3}],s:"Screen language"}},auto:{t:0,b:{t:2,i:[{t:3,v:"Home Assistant's language ("},{t:4,k:"name"},{t:3,v:")"}]}},auto_plain:{t:0,b:{t:2,i:[{t:3}],s:"Home Assistant's language"}},ha_missing:{t:0,b:{t:2,i:[{t:3}],s:"The screens use English until Home Assistant's language is available."}},unchecked:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:" · not checked yet, help welcome"}]}},help:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:" is not checked yet, help welcome: "},{t:4,k:"guide"}]}},guide:{t:0,b:{t:2,i:[{t:3}],s:"how to translate"}},update_hint:{t:0,b:{t:2,i:[{t:3}],s:"After a change every screen needs a firmware update, one build each: with its Update button, or in the nightly updates."}},time:{t:0,b:{t:2,i:[{t:3}],s:"Time format"}},time_auto:{t:0,b:{t:2,i:[{t:3,v:"Automatic, follows the language ("},{t:4,k:"clock"},{t:3,v:")"}]}},clock_24:{t:0,b:{t:2,i:[{t:3}],s:"24 hour"}},clock_12:{t:0,b:{t:2,i:[{t:3}],s:"12 hour"}},numbers:{t:0,b:{t:2,i:[{t:3}],s:"Number format"}},numbers_auto:{t:0,b:{t:2,i:[{t:3,v:"Automatic, follows the language ("},{t:4,k:"example"},{t:3,v:")"}]}},profile:{t:0,b:{t:2,i:[{t:3,v:"Your Home Assistant profile: "},{t:4,k:"formats"}]}},use_profile:{t:0,b:{t:2,i:[{t:3}],s:"Use these"}},editor_hint:{t:0,b:{t:2,i:[{t:3}],s:"The editor itself follows the language of your Home Assistant profile."}},saved:{t:0,b:{t:2,i:[{t:3}],s:"Saved."}},saved_language:{t:0,b:{t:2,i:[{t:3}],s:"Saved. Every screen takes the new language with its next update."}}},alerts:{text:{t:0,b:{t:2,i:[{t:3}],s:"A card over the whole screen from an automation, on one screen or on all of them. The cheatsheet has the action names, fields, icons, and colors, and a form to try one."}},detail:{t:0,b:{t:2,i:[{t:3}],s:"Full-screen notifications, from an automation"}}}},firmware:{title:{t:0,b:{t:2,i:[{t:3}],s:"Build and install screen firmware"}},intro:{t:0,b:{t:2,i:[{t:3,v:"The built-in ESPHome CLI uses your own profile (YAML with keys) and secrets. Choose the screen's profile, then a USB port (screen connected to the Home Assistant machine), "},{t:4,k:"ota"},{t:3,v:" with the hostname, or "},{t:4,k:"download"},{t:3,v:" to put the firmware on the screen from your own computer. "},{t:4,k:"check"},{t:3,v:" only validates, "},{t:4,k:"build"},{t:3,v:" compiles, "},{t:4,k:"install"},{t:3,v:" puts the firmware on the screen. Your tiles stay as they are in ESP Screens. The first build takes a few minutes."}]}},ota:{t:0,b:{t:2,i:[{t:3}],s:"Wi-Fi / OTA"}},download:{t:0,b:{t:2,i:[{t:3}],s:"Download"}},check:{t:0,b:{t:2,i:[{t:3}],s:"Check"}},build:{t:0,b:{t:2,i:[{t:3}],s:"Build only"}},install:{t:0,b:{t:2,i:[{t:3}],s:"Build & install"}},build_download:{t:0,b:{t:2,i:[{t:3}],s:"Build & download"}},no_cli:{t:0,b:{t:2,i:[{t:3}],s:"The ESPHome CLI is missing. Update the app to 0.2.0."}},choose:{t:0,b:{t:2,i:[{t:3}],s:"Choose the intended profile, then a USB port, an IP address, or Download."}},profile:{t:0,b:{t:2,i:[{t:3}],s:"ESPHome profile"}},install_to:{t:0,b:{t:2,i:[{t:3}],s:"Install to"}},no_board:{t:0,b:{t:2,i:[{t:3}],s:"USB · no board found on the Home Assistant machine yet"}},download_target:{t:0,b:{t:2,i:[{t:3}],s:"Download · flash from your own computer"}},host:{t:0,b:{t:2,i:[{t:3}],s:"IP address or hostname"}},download_file:{t:0,b:{t:2,i:[{t:3,v:"Download "},{t:4,k:"name"}]}},download_how:{t:0,b:{t:2,i:[{t:3,v:"Put it on the screen with "},{t:4,k:"esphome_web"},{t:3,v:" in Chrome or Edge: Connect, choose the screen's USB port, Install, and select this file. It holds your Wi-Fi password and the screen's keys: keep it to yourself."}]}}},installer:{title:{setup:{t:0,b:{t:2,i:[{t:3}],s:"Connect and install."}},saved:{t:0,b:{t:2,i:[{t:3}],s:"Profile saved."}},running:{t:0,b:{t:2,i:[{t:3}],s:"One moment…"}},ready:{t:0,b:{t:2,i:[{t:3}],s:"Ready to download."}},done:{t:0,b:{t:2,i:[{t:3}],s:"Done."}},failed:{t:0,b:{t:2,i:[{t:3}],s:"That didn't work."}}},intro:{t:0,b:{t:2,i:[{t:3}],s:"ESP Screens creates the screen's own profile with unique keys and builds the firmware. Connect the screen with a USB data cable to the machine running Home Assistant, or download the firmware and put it on the screen from your own computer."}},board:{t:0,b:{t:2,i:[{t:3}],s:"Which screen do you have?"}},board_cyd:{t:0,b:{t:2,i:[{t:3}],s:"CYD · 2.8 inch"}},board_guition:{t:0,b:{t:2,i:[{t:3}],s:"Guition · 4 inch"}},name:{t:0,b:{t:2,i:[{t:3}],s:"Name"}},name_placeholder:{t:0,b:{t:2,i:[{t:3}],s:"Living room screen"}},device_name:{t:0,b:{t:2,i:[{t:3}],s:"Device name"}},customize:{t:0,b:{t:2,i:[{t:3}],s:"customize"}},name_hint:{t:0,b:{t:2,i:[{t:3}],s:"Every screen gets its own profile with its own keys. Four screens? Go through this four times with a different name."}},device_name_hint:{t:0,b:{t:2,i:[{t:3}],s:"Lowercase letters, digits, and dashes. A different name for each screen."}},wifi:{title:{t:0,b:{t:2,i:[{t:3}],s:"Wi-Fi"}},ssid:{t:0,b:{t:2,i:[{t:3}],s:"Wi-Fi name (2.4 GHz)"}},password:{t:0,b:{t:2,i:[{t:3}],s:"Wi-Fi password"}},new:{t:0,b:{t:2,i:[{t:3}],s:"Fill in once: ESP Screens saves this in ESPHome secrets.yaml, later screens use it automatically."}},missing:{t:0,b:{t:2,i:[{t:3}],s:"Your ESPHome secrets.yaml is still missing Wi-Fi details. ESP Screens only fills in the missing lines."}},ready:{t:0,b:{t:2,i:[{t:3}],s:"Wi-Fi comes from your ESPHome secrets.yaml."}},invalid:{t:0,b:{t:2,i:[{t:3}],s:"secrets.yaml in the ESPHome folder isn't valid YAML. Fix the file first; it won't be overwritten."}}},install_via:{t:0,b:{t:2,i:[{t:3}],s:"Install via"}},later:{t:0,b:{t:2,i:[{t:3}],s:"Later · save profile only"}},target:{usb:{t:0,b:{t:2,i:[{t:3}],s:"Connect the screen with a USB data cable to the Home Assistant machine; the list refreshes on its own. Or choose Download to use your own computer."}},download:{t:0,b:{t:2,i:[{t:3}],s:"Download the firmware and put it on the screen from your own computer, in Chrome or Edge. After that, updates go over Wi-Fi."}},later:{t:0,b:{t:2,i:[{t:3}],s:"The profile goes into the ESPHome folder. You can install later via Firmware & USB, or from ESPHome Device Builder."}},several:{t:0,b:{t:2,i:[{t:3}],s:"More than one board connected: choose this screen's port."}},once:{t:0,b:{t:2,i:[{t:3}],s:"Once over USB; after that, everything is wireless."}}},install:{t:0,b:{t:2,i:[{t:3}],s:"Install"}},save_profile:{t:0,b:{t:2,i:[{t:3}],s:"Save profile"}},busy:{t:0,b:{t:2,i:[{t:3,v:"A build or installation is already running ("},{t:4,k:"file"},{t:3,v:"). Wait for it to finish."}]}},no_cli:{t:0,b:{t:2,i:[{t:3}],s:"The ESPHome CLI is missing from this installation; only saving the profile is possible."}},progress:{saved:{t:0,b:{t:2,i:[{t:4,k:"file"},{t:3,v:" is in the ESPHome folder"}]}},writing:{t:0,b:{t:2,i:[{t:3,v:"Writing firmware to "},{t:4,k:"name"},{t:3,v:"…"}]}},building:{t:0,b:{t:2,i:[{t:3}],s:"Building firmware…"}},ready:{t:0,b:{t:2,i:[{t:3,v:"Firmware for "},{t:4,k:"name"},{t:3,v:" is ready"}]}},installed:{t:0,b:{t:2,i:[{t:3,v:"Firmware is on "},{t:4,k:"name"}]}},build_failed:{t:0,b:{t:2,i:[{t:3}],s:"Build failed"}},install_failed:{t:0,b:{t:2,i:[{t:3}],s:"Install failed"}}},detail:{saved:{t:0,b:{t:2,i:[{t:3}],s:"Install it later from Firmware & USB: choose this profile, then the USB port of the Home Assistant machine, or Download to put the firmware on the screen from your own computer. Save the API key for pairing:"}},uploading:{t:0,b:{t:2,i:[{t:3}],s:"Don't disconnect the USB cable yet."}},building:{t:0,b:{t:2,i:[{t:3}],s:"A first build takes a few minutes on a Raspberry Pi. You can leave this page: the installation keeps running and you'll find it again under New screen."}},building_download:{t:0,b:{t:2,i:[{t:3}],s:"A first build takes a few minutes on a Raspberry Pi. You can leave this page: the build keeps running and you'll find it again under New screen."}},downloaded:{t:0,b:{t:2,i:[{t:3}],s:"Put it on the screen from your own computer, then pair the screen with Home Assistant."}},booted:{t:0,b:{t:2,i:[{t:3}],s:"The screen boots up and connects to your Wi-Fi. Pair it with Home Assistant now:"}},booted_cyd:{t:0,b:{t:2,i:[{t:3}],s:"The screen boots up and connects to your Wi-Fi. The CYD first asks for a touch calibration: tap the crosshairs. Pair it with Home Assistant now:"}},see_log:{t:0,b:{t:2,i:[{t:3}],s:"See the log below."}}},download_steps:{plug:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" with a USB data cable."}]}},plug_bold:{t:0,b:{t:2,i:[{t:3}],s:"Plug the screen into your computer"}},open:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" in Chrome or Edge, click Connect and choose the screen's USB port."}]}},open_bold:{t:0,b:{t:2,i:[{t:3,v:"Open "},{t:4,k:"esphome_web"}]}},install:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" and select "},{t:4,k:"file"},{t:3,v:". The screen restarts and joins your Wi-Fi."}]}},install_cyd:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" and select "},{t:4,k:"file"},{t:3,v:". The screen restarts and joins your Wi-Fi. The CYD first asks for a touch calibration: tap the crosshairs."}]}},install_bold:{t:0,b:{t:2,i:[{t:3}],s:"Click Install"}}},download_keep:{t:0,b:{t:2,i:[{t:3}],s:"The file holds your Wi-Fi password and the screen's keys: keep it to yourself."}},api_key:{t:0,b:{t:2,i:[{t:3}],s:"API key"}},pairing:{ha:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" This happens outside ESP Screens. Home Assistant discovers "},{t:4,k:"name"},{t:3,v:" as an ESPHome device; click Add. Not discovered? Add ESPHome manually with the screen's IP address."}]}},ha_bold:{t:0,b:{t:2,i:[{t:3}],s:"Go to Home Assistant → Settings → Devices & services."}},key:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" above when Home Assistant asks for an encryption key."}]}},key_bold:{t:0,b:{t:2,i:[{t:3}],s:"Paste the API key"}},actions:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" ESPHome integration → Configure → “Allow the device to perform Home Assistant actions”. Without this, the screen sees everything but controls nothing."}]}},actions_bold:{t:0,b:{t:2,i:[{t:3}],s:"Allow HA actions:"}},tiles:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" Back in ESP Screens, the screen appears in the list on the left within about thirty seconds; until then it's shown there as “not yet in Home Assistant”."}]}},tiles_bold:{t:0,b:{t:2,i:[{t:3}],s:"Choose your tiles."}}},log:{t:0,b:{t:2,i:[{t:3}],s:"ESPHome log"}},retry:{t:0,b:{t:2,i:[{t:3}],s:"Retry"}},another:{t:0,b:{t:2,i:[{t:3}],s:"Install another screen"}},start_over:{t:0,b:{t:2,i:[{t:3}],s:"Start over"}},done:{t:0,b:{t:2,i:[{t:3}],s:"Done"}}},alerts:{eyebrow:{t:0,b:{t:2,i:[{t:3}],s:"Alerts · cheatsheet"}},title:{t:0,b:{t:2,i:[{t:3}],s:"A full-screen notification, from an automation."}},intro:{t:0,b:{t:2,i:[{t:3,v:"Every screen has the "},{t:4,k:"action"},{t:3,v:" action. It places a card over everything, wakes the screen, and keeps the backlight at normal brightness until someone taps the button or the timeout runs out. Home Assistant itself shows no explanation or dropdowns for ESPHome actions; everything you can fill in is listed here."}]}},loading:{t:0,b:{t:2,i:[{t:3}],s:"The cheatsheet is still loading; one moment."}},example:{title:{t:0,b:{t:2,i:[{t:3}],s:"Someone is at the door"}},subtitle:{t:0,b:{t:2,i:[{t:3}],s:"Door 3, back"}},button:{t:0,b:{t:2,i:[{t:3}],s:"Coming"}}},sections:{t:0,b:{t:2,i:[{t:3}],s:"Sections"}},nav:{try:{t:0,b:{t:2,i:[{t:3}],s:"Try it"}},screens:{t:0,b:{t:2,i:[{t:3}],s:"Your screens"}},howto:{t:0,b:{t:2,i:[{t:3}],s:"In an automation"}},all:{t:0,b:{t:2,i:[{t:3}],s:"All screens"}},fields:{t:0,b:{t:2,i:[{t:3}],s:"The fields"}},icons:{t:0,b:{t:2,i:[{t:3}],s:"Icons"}},colors:{t:0,b:{t:2,i:[{t:3}],s:"Colors"}},behaviour:{t:0,b:{t:2,i:[{t:3}],s:"Behavior"}},events:{t:0,b:{t:2,i:[{t:3}],s:"Events"}},tips:{t:0,b:{t:2,i:[{t:3}],s:"Tips"}}},try:{text:{t:0,b:{t:2,i:[{t:3}],s:"Send one alert now, with the same fields an automation sends. The screen shows the card and, with blinking on, flashes its backlight."}},screen:{t:0,b:{t:2,i:[{t:3}],s:"Screen"}},all:{t:0,b:{t:2,i:[{t:3,v:"All screens ("},{t:4,k:"ready"},{t:3,v:" ready)"}]}},not_ready:{t:0,b:{t:2,i:[{t:4,k:"name"},{t:3,v:" · not ready"}]}},title:{t:0,b:{t:2,i:[{t:3}],s:"Title"}},subtitle:{t:0,b:{t:2,i:[{t:3}],s:"Subtitle"}},icon:{t:0,b:{t:2,i:[{t:3}],s:"Icon"}},color:{t:0,b:{t:2,i:[{t:3}],s:"Color"}},button:{t:0,b:{t:2,i:[{t:3}],s:"Button text"}},timeout:{t:0,b:{t:2,i:[{t:3}],s:"Timeout (seconds, 0 waits for the button)"}},flash:{t:0,b:{t:2,i:[{t:3}],s:"Blink the backlight"}},flash_hint:{t:0,b:{t:2,i:[{t:3}],s:"Four times when the alert arrives."}},sending:{t:0,b:{t:2,i:[{t:3}],s:"Sending…"}},send:{t:0,b:{t:2,i:[{t:3}],s:"Send alert"}},sent_all:{t:0,b:{t:1,c:[{t:2,i:[{t:3,v:"Sent to "},{t:4,k:"n"},{t:3,v:" screen."}]},{t:2,i:[{t:3,v:"Sent to "},{t:4,k:"n"},{t:3,v:" screens."}]}]}},sent_to:{t:0,b:{t:2,i:[{t:3,v:"Sent to "},{t:4,k:"name"},{t:3,v:"."}]}},sent_one:{t:0,b:{t:2,i:[{t:3}],s:"Sent to the screen."}},skipped:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"1 skipped (offline or old firmware)."},{t:2,i:[{t:4,k:"n"},{t:3,v:" skipped (offline or old firmware)."}]}]}},left_empty:{t:0,b:{t:2,i:[{t:3,v:"Left empty: "},{t:4,k:"fields"},{t:3,v:"."}]}},nothing:{t:0,b:{t:2,i:[{t:3,v:"No screen could show it: check that a screen is online with firmware "},{t:4,k:"version"},{t:3,v:" or newer."}]}}},white:{t:0,b:{t:2,i:[{t:3}],s:"White (default)"}},screens:{text:{t:0,b:{t:2,i:[{t:3,v:"Every screen has its own action, with the device name in it. From firmware "},{t:4,k:"version"},{t:3,v:"; update an older screen with its Update button under Screens."}]}},none:{t:0,b:{t:2,i:[{t:3}],s:"No screen paired yet. Install one via New screen; the action appears once Home Assistant sees the screen."}},ready:{t:0,b:{t:2,i:[{t:3,v:"● firmware "},{t:4,k:"version"}]}},update:{t:0,b:{t:2,i:[{t:3,v:"Update needed · firmware "},{t:4,k:"version"}]}},unknown:{t:0,b:{t:2,i:[{t:3}],s:"Device name unknown · update the screen"}},show:{t:0,b:{t:2,i:[{t:3}],s:"Show alert"}},dismiss:{t:0,b:{t:2,i:[{t:3}],s:"Dismiss alert"}}},howto:{add:{t:0,b:{t:2,i:[{t:4,k:"add"},{t:3,v:" and search for "},{t:4,k:"esphome"},{t:3,v:`. Choose your screen's action: Home Assistant calls it "Performs the action show_alert of the node `},{t:4,k:"device"},{t:3,v:'".'}]}},add_bold:{t:0,b:{t:2,i:[{t:3}],s:"Add action"}},device:{t:0,b:{t:2,i:[{t:3}],s:"device name"}},fields:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" Home Assistant asks for all seven; leave what you don't use empty ("},{t:4,k:"empty"},{t:3,v:", "},{t:4,k:"zero"},{t:3,v:", off)."}]}},fields_bold:{t:0,b:{t:2,i:[{t:3}],s:"Fill in the fields."}},yaml:{t:0,b:{t:2,i:[{t:3,v:"Prefer YAML? Choose "},{t:4,k:"edit"},{t:3,v:" on the action and paste the example below."}]}},example_for:{t:0,b:{t:2,i:[{t:3}],s:"Example for"}},no_screen:{t:0,b:{t:2,i:[{t:3}],s:"a screen (not paired yet)"}}},edit_yaml:{t:0,b:{t:2,i:[{t:3}],s:"Edit in YAML"}},copy_yaml:{t:0,b:{t:2,i:[{t:3}],s:"Copy YAML"}},all:{title:{t:0,b:{t:2,i:[{t:3}],s:"All screens at once"}},text:{t:0,b:{t:2,i:[{t:3,v:"Fire the event "},{t:4,k:"show"},{t:3,v:" with the same fields, and ESP Screens passes the alert on to every screen that is online, including screens you add later. "},{t:4,k:"dismiss"},{t:3,v:" clears it everywhere. In an automation, add the "},{t:4,k:"event"},{t:3,v:" action or paste the example under "},{t:4,k:"edit"},{t:3,v:". Leave out the fields you don't use. ESP Screens has to be running for this."}]}},event:{t:0,b:{t:2,i:[{t:3}],s:"Event"}}},fields:{text:{t:0,b:{t:2,i:[{t:3}],s:"Text is free-form; the limit is in bytes, and an accented letter counts as two. What doesn't fit gets an ellipsis (title) or is dropped (subtitle)."}},field:{t:0,b:{t:2,i:[{t:3}],s:"Field"}},type:{t:0,b:{t:2,i:[{t:3}],s:"Type"}},what:{t:0,b:{t:2,i:[{t:3}],s:"What it does"}},example:{t:0,b:{t:2,i:[{t:3}],s:"Example"}},limit:{t:0,b:{t:2,i:[{t:3}],s:"Limit"}},types:{string:{t:0,b:{t:2,i:[{t:3}],s:"text"}},int:{t:0,b:{t:2,i:[{t:3}],s:"number"}},bool:{t:0,b:{t:2,i:[{t:3}],s:"on / off"}},entity:{t:0,b:{t:2,i:[{t:3}],s:"entity"}}},bytes:{t:0,b:{t:2,i:[{t:3,v:"CYD "},{t:4,k:"cyd"},{t:3,v:" · Guition "},{t:4,k:"guition"},{t:3,v:" bytes"}]}},seconds:{t:0,b:{t:2,i:[{t:3}],s:"0 to 86400 s"}},camera_limit:{t:0,b:{t:2,i:[{t:3}],s:"Guition, firmware 0.2.57+"}}},icons:{text:{t:0,b:{t:2,i:[{t:3,v:"Fill in the name in "},{t:4,k:"field"},{t:3,v:", for example "},{t:4,k:"example"},{t:3,v:". "},{t:4,k:"mdi"},{t:3,v:" and the hex codepoint ("},{t:4,k:"hex"},{t:3,v:") also work. Only these icons are included in the firmware; any other name shows the warning triangle. Tap an icon to copy its name."}]}},handy:{t:0,b:{t:2,i:[{t:3}],s:"Handy for notifications"}},search_label:{t:0,b:{t:2,i:[{t:3}],s:"Search for an icon"}},search:{t:0,b:{t:2,i:[{t:3}],s:"Search by name or description…"}},extra:{t:0,b:{t:2,i:[{t:3}],s:"Also available: control and weather icons"}},copy:{t:0,b:{t:2,i:[{t:3,v:"Copy "},{t:4,k:"name"}]}},none:{t:0,b:{t:2,i:[{t:3,v:'No icon for "'},{t:4,k:"query"},{t:3,v:'". Unknown names show the warning triangle ('},{t:4,k:"fallback"},{t:3,v:")."}]}}},colors:{text:{t:0,b:{t:2,i:[{t:3,v:"Fill in the name in "},{t:4,k:"field"},{t:3,v:". These are the pastel shades of the tiles, with dark text. Empty or unknown gives the white card. Tap to copy."}]}}},behaviour:{wakes:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" An alert immediately wakes a dimmed or dark screen and appears above every page, every open light card, and the standby layer."}]}},wakes_bold:{t:0,b:{t:2,i:[{t:3}],s:"Wakes the screen."}},on:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" As long as the card is showing, the backlight stays at normal brightness. Standby and night hours wait. After the button, the regular standby time starts again."}]}},on_bold:{t:0,b:{t:2,i:[{t:3}],s:"On until the button."}},timeout:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" "},{t:4,k:"zero"},{t:3,v:" waits for the button, however long that takes. With "},{t:4,k:"minute"},{t:3,v:" the card disappears after a minute, but the button closes it sooner."}]}},timeout_bold:{t:0,b:{t:2,i:[{t:3}],s:"Timeout."}},blinking:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" "},{t:4,k:"flash"},{t:3,v:" blinks the backlight four times when the alert arrives (about a second) and leaves the screen on afterward."}]}},blinking_bold:{t:0,b:{t:2,i:[{t:3}],s:"Blinking."}},replacing:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" A new alert replaces the current one; there's no stack. The replaced alert reports itself as "},{t:4,k:"replaced"},{t:3,v:"."}]}},replacing_bold:{t:0,b:{t:2,i:[{t:3}],s:"Replacing."}},closing:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" "},{t:4,k:"dismiss"},{t:3,v:" clears the card, for example if the door is already open. Without an alert, that action does nothing."}]}},closing_bold:{t:0,b:{t:2,i:[{t:3}],s:"Closing remotely."}},beside:{t:0,b:{t:2,i:[{t:4,k:"bold"},{t:3,v:" does nothing; only the button closes it. That way a wake-up tap never accidentally dismisses the alert."}]}},beside_bold:{t:0,b:{t:2,i:[{t:3}],s:"Tapping beside the card"}}},events:{text:{t:0,b:{t:2,i:[{t:3,v:"Every end fires the event "},{t:4,k:"event"},{t:3,v:" with "},{t:4,k:"action"},{t:3,v:", "},{t:4,k:"title"},{t:3,v:", "},{t:4,k:"screen"},{t:3,v:" (the device name) and the "},{t:4,k:"device_id"},{t:3,v:" that Home Assistant adds. Visible under Settings → Tools → Events."}]}},when:{t:0,b:{t:2,i:[{t:3}],s:"When"}},wait:{t:0,b:{t:2,i:[{t:3}],s:"Waiting until someone presses the button"}}},tips:{color:{t:0,b:{t:2,i:[{t:3,v:"Use a "},{t:4,k:"bold"},{t:3,v:': orange for the door, red for smoke or water, green for "done". The text always stays dark and readable.'}]}},color_bold:{t:0,b:{t:2,i:[{t:3}],s:"color per kind of notification"}},short:{t:0,b:{t:2,i:[{t:3,v:"Keep the title "},{t:4,k:"bold"},{t:3,v:"; a screen shows about twenty characters on one line and ends a longer title with an ellipsis. Put details in the subtitle."}]}},short_bold:{t:0,b:{t:2,i:[{t:3}],s:"short"}},button:{t:0,b:{t:2,i:[{t:3,v:"A "},{t:4,k:"bold"},{t:3,v:' turns the notification into a question: "Coming", "Seen", "Turn off". The event then tells you who responded.'}]}},button_bold:{t:0,b:{t:2,i:[{t:3}],s:"custom button text"}},resolve:{t:0,b:{t:2,i:[{t:3,v:"For an alert that resolves itself (the door opens, the laundry gets taken out) close it in the same automation with "},{t:4,k:"dismiss"},{t:3,v:"."}]}},every:{t:0,b:{t:2,i:[{t:3,v:"Every screen? Fire "},{t:4,k:"event"},{t:3,v:" once (see All screens at once). The screens still work independently and each reports with its own "},{t:4,k:"screen"},{t:3,v:"."}]}},claude:{t:0,b:{t:2,i:[{t:3,v:"Rather "},{t:4,k:"bold"},{t:3,v:" for the automation? Install the ESP Screens skill under Settings → Claude."}]}},claude_bold:{t:0,b:{t:2,i:[{t:3}],s:"ask Claude"}}}},override:{eyebrow:{t:0,b:{t:2,i:[{t:3}],s:"Advanced · local override"}},title:{t:0,b:{t:2,i:[{t:3}],s:"Override YAML"}},title_named:{t:0,b:{t:2,i:[{t:3,v:"Override YAML · "},{t:4,k:"name"}]}},intro:{t:0,b:{t:2,i:[{t:3}],s:"This small file is yours. It is loaded after the shared screen package and stays in place when ESP Screen Manager updates. Change hardware-specific details here, such as a display model."}},safe_title:{t:0,b:{t:2,i:[{t:3}],s:"What is safe to change?"}},safe_text:{t:0,b:{t:2,i:[{t:3}],s:"Display, touchscreen, substitutions, pins and other device details. Name, Wi-Fi, API, OTA and package links remain managed."}},active:{t:0,b:{t:2,i:[{t:3}],s:"Active"}},ready:{t:0,b:{t:2,i:[{t:3}],s:"Ready to attach"}},editor_label:{t:0,b:{t:2,i:[{t:3}],s:"Local override YAML"}},use_example:{t:0,b:{t:2,i:[{t:3}],s:"Use example"}},clear:{t:0,b:{t:2,i:[{t:3}],s:"Clear"}},characters:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"1 character"},{t:2,i:[{t:4,k:"n"},{t:3,v:" characters"}]}]}},lines:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"1 line"},{t:2,i:[{t:4,k:"n"},{t:3,v:" lines"}]}]}},save_check:{t:0,b:{t:2,i:[{t:3}],s:"Save & check"}},save:{t:0,b:{t:2,i:[{t:3}],s:"Save override"}},no_profile:{t:0,b:{t:2,i:[{t:3}],s:"No ESPHome profile was found for this screen."}},attached:{t:0,b:{t:2,i:[{t:3}],s:"Changes here apply on the next build."}},not_attached:{t:0,b:{t:2,i:[{t:3}],s:"Save once to attach this file to the profile."}},saving:{t:0,b:{t:2,i:[{t:3}],s:"Checking and saving…"}},saved:{t:0,b:{t:2,i:[{t:3}],s:"Saved. The override is kept during firmware updates."}},saved_toast:{t:0,b:{t:2,i:[{t:3}],s:"Override YAML saved."}},checking:{t:0,b:{t:2,i:[{t:3}],s:"Saved. ESPHome is checking the complete profile…"}},checking_profile:{t:0,b:{t:2,i:[{t:3}],s:"ESPHome is checking the profile…"}},checking_stage:{t:0,b:{t:2,i:[{t:3,v:"ESPHome is checking the profile… "},{t:4,k:"stage"}]}},valid:{t:0,b:{t:2,i:[{t:3}],s:"The complete profile is valid. Safe to build and install."}},rejected:{t:0,b:{t:2,i:[{t:3}],s:"ESPHome rejected the complete profile. See Firmware & USB for the full log."}},confirm_example:{t:0,b:{t:2,i:[{t:3}],s:"Replace the current text with the example?"}},example_loaded:{t:0,b:{t:2,i:[{t:3}],s:"Example loaded. Save it when you are ready."}},confirm_clear:{t:0,b:{t:2,i:[{t:3}],s:"Clear the local override?"}},cleared:{t:0,b:{t:2,i:[{t:3}],s:"The override will be empty after you save."}}},mockup:{home:{t:0,b:{t:2,i:[{t:3}],s:"Home"}},unknown:{t:0,b:{t:2,i:[{t:3}],s:"Unknown"}}}},screen:{ha:{on:{t:0,b:{t:2,i:[{t:3}],s:"On"}},off:{t:0,b:{t:2,i:[{t:3}],s:"Off"}},unavailable:{t:0,b:{t:2,i:[{t:3}],s:"Unavailable"}},climate:{off:{t:0,b:{t:2,i:[{t:3}],s:"Off"}},heat:{t:0,b:{t:2,i:[{t:3}],s:"Heat"}},cool:{t:0,b:{t:2,i:[{t:3}],s:"Cool"}},heat_cool:{t:0,b:{t:2,i:[{t:3}],s:"Heat/Cool"}},auto:{t:0,b:{t:2,i:[{t:3}],s:"Auto"}},dry:{t:0,b:{t:2,i:[{t:3}],s:"Dry"}},fan_only:{t:0,b:{t:2,i:[{t:3}],s:"Fan only"}}},hvac_action:{heating:{t:0,b:{t:2,i:[{t:3}],s:"Heating"}},cooling:{t:0,b:{t:2,i:[{t:3}],s:"Cooling"}},idle:{t:0,b:{t:2,i:[{t:3}],s:"Idle"}},off:{t:0,b:{t:2,i:[{t:3}],s:"Off"}},drying:{t:0,b:{t:2,i:[{t:3}],s:"Drying"}},fan:{t:0,b:{t:2,i:[{t:3}],s:"Fan"}},preheating:{t:0,b:{t:2,i:[{t:3}],s:"Preheating"}},defrosting:{t:0,b:{t:2,i:[{t:3}],s:"Defrosting"}}},cover:{open:{t:0,b:{t:2,i:[{t:3}],s:"Open"}},closed:{t:0,b:{t:2,i:[{t:3}],s:"Closed"}},opening:{t:0,b:{t:2,i:[{t:3}],s:"Opening"}},closing:{t:0,b:{t:2,i:[{t:3}],s:"Closing"}}},media:{playing:{t:0,b:{t:2,i:[{t:3}],s:"Playing"}},paused:{t:0,b:{t:2,i:[{t:3}],s:"Paused"}},idle:{t:0,b:{t:2,i:[{t:3}],s:"Idle"}},standby:{t:0,b:{t:2,i:[{t:3}],s:"Standby"}}},person:{home:{t:0,b:{t:2,i:[{t:3}],s:"Home"}},not_home:{t:0,b:{t:2,i:[{t:3}],s:"Away"}}},sun:{above_horizon:{t:0,b:{t:2,i:[{t:3}],s:"Above horizon"}},below_horizon:{t:0,b:{t:2,i:[{t:3}],s:"Below horizon"}}},vacuum:{docked:{t:0,b:{t:2,i:[{t:3}],s:"Docked"}},cleaning:{t:0,b:{t:2,i:[{t:3}],s:"Cleaning"}},paused:{t:0,b:{t:2,i:[{t:3}],s:"Paused"}},returning:{t:0,b:{t:2,i:[{t:3}],s:"Returning to dock"}},idle:{t:0,b:{t:2,i:[{t:3}],s:"Idle"}}},weather:{sunny:{t:0,b:{t:2,i:[{t:3}],s:"Sunny"}},clear_night:{t:0,b:{t:2,i:[{t:3}],s:"Clear, night"}},cloudy:{t:0,b:{t:2,i:[{t:3}],s:"Cloudy"}},partlycloudy:{t:0,b:{t:2,i:[{t:3}],s:"Partly cloudy"}},rainy:{t:0,b:{t:2,i:[{t:3}],s:"Rainy"}},pouring:{t:0,b:{t:2,i:[{t:3}],s:"Pouring"}},snowy:{t:0,b:{t:2,i:[{t:3}],s:"Snowy"}},snowy_rainy:{t:0,b:{t:2,i:[{t:3}],s:"Snowy, rainy"}},fog:{t:0,b:{t:2,i:[{t:3}],s:"Fog"}},hail:{t:0,b:{t:2,i:[{t:3}],s:"Hail"}},lightning:{t:0,b:{t:2,i:[{t:3}],s:"Lightning"}},lightning_rainy:{t:0,b:{t:2,i:[{t:3}],s:"Lightning, rainy"}},windy:{t:0,b:{t:2,i:[{t:3}],s:"Windy"}},exceptional:{t:0,b:{t:2,i:[{t:3}],s:"Exceptional"}}},binary:{battery_on:{t:0,b:{t:2,i:[{t:3}],s:"Low"}},battery_off:{t:0,b:{t:2,i:[{t:3}],s:"Normal"}},battery_charging_on:{t:0,b:{t:2,i:[{t:3}],s:"Charging"}},battery_charging_off:{t:0,b:{t:2,i:[{t:3}],s:"Not charging"}},carbon_monoxide_on:{t:0,b:{t:2,i:[{t:3}],s:"Detected"}},carbon_monoxide_off:{t:0,b:{t:2,i:[{t:3}],s:"Clear"}},cold_on:{t:0,b:{t:2,i:[{t:3}],s:"Cold"}},cold_off:{t:0,b:{t:2,i:[{t:3}],s:"Normal"}},connectivity_on:{t:0,b:{t:2,i:[{t:3}],s:"Connected"}},connectivity_off:{t:0,b:{t:2,i:[{t:3}],s:"Disconnected"}},door_on:{t:0,b:{t:2,i:[{t:3}],s:"Open"}},door_off:{t:0,b:{t:2,i:[{t:3}],s:"Closed"}},garage_door_on:{t:0,b:{t:2,i:[{t:3}],s:"Open"}},garage_door_off:{t:0,b:{t:2,i:[{t:3}],s:"Closed"}},gas_on:{t:0,b:{t:2,i:[{t:3}],s:"Detected"}},gas_off:{t:0,b:{t:2,i:[{t:3}],s:"Clear"}},heat_on:{t:0,b:{t:2,i:[{t:3}],s:"Hot"}},heat_off:{t:0,b:{t:2,i:[{t:3}],s:"Normal"}},light_on:{t:0,b:{t:2,i:[{t:3}],s:"Light detected"}},light_off:{t:0,b:{t:2,i:[{t:3}],s:"No light"}},lock_on:{t:0,b:{t:2,i:[{t:3}],s:"Unlocked"}},lock_off:{t:0,b:{t:2,i:[{t:3}],s:"Locked"}},moisture_on:{t:0,b:{t:2,i:[{t:3}],s:"Wet"}},moisture_off:{t:0,b:{t:2,i:[{t:3}],s:"Dry"}},motion_on:{t:0,b:{t:2,i:[{t:3}],s:"Detected"}},motion_off:{t:0,b:{t:2,i:[{t:3}],s:"Clear"}},moving_on:{t:0,b:{t:2,i:[{t:3}],s:"Moving"}},moving_off:{t:0,b:{t:2,i:[{t:3}],s:"Not moving"}},occupancy_on:{t:0,b:{t:2,i:[{t:3}],s:"Detected"}},occupancy_off:{t:0,b:{t:2,i:[{t:3}],s:"Clear"}},opening_on:{t:0,b:{t:2,i:[{t:3}],s:"Open"}},opening_off:{t:0,b:{t:2,i:[{t:3}],s:"Closed"}},plug_on:{t:0,b:{t:2,i:[{t:3}],s:"Plugged in"}},plug_off:{t:0,b:{t:2,i:[{t:3}],s:"Unplugged"}},power_on:{t:0,b:{t:2,i:[{t:3}],s:"On"}},power_off:{t:0,b:{t:2,i:[{t:3}],s:"Off"}},presence_on:{t:0,b:{t:2,i:[{t:3}],s:"Home"}},presence_off:{t:0,b:{t:2,i:[{t:3}],s:"Away"}},problem_on:{t:0,b:{t:2,i:[{t:3}],s:"Problem"}},problem_off:{t:0,b:{t:2,i:[{t:3}],s:"OK"}},running_on:{t:0,b:{t:2,i:[{t:3}],s:"Running"}},running_off:{t:0,b:{t:2,i:[{t:3}],s:"Not running"}},safety_on:{t:0,b:{t:2,i:[{t:3}],s:"Unsafe"}},safety_off:{t:0,b:{t:2,i:[{t:3}],s:"Safe"}},smoke_on:{t:0,b:{t:2,i:[{t:3}],s:"Detected"}},smoke_off:{t:0,b:{t:2,i:[{t:3}],s:"Clear"}},sound_on:{t:0,b:{t:2,i:[{t:3}],s:"Detected"}},sound_off:{t:0,b:{t:2,i:[{t:3}],s:"Clear"}},tamper_on:{t:0,b:{t:2,i:[{t:3}],s:"Tampering detected"}},tamper_off:{t:0,b:{t:2,i:[{t:3}],s:"Clear"}},update_on:{t:0,b:{t:2,i:[{t:3}],s:"Update available"}},update_off:{t:0,b:{t:2,i:[{t:3}],s:"Up-to-date"}},vibration_on:{t:0,b:{t:2,i:[{t:3}],s:"Detected"}},vibration_off:{t:0,b:{t:2,i:[{t:3}],s:"Clear"}},window_on:{t:0,b:{t:2,i:[{t:3}],s:"Open"}},window_off:{t:0,b:{t:2,i:[{t:3}],s:"Closed"}}},button:{activate:{t:0,b:{t:2,i:[{t:3}],s:"Activate"}},run:{t:0,b:{t:2,i:[{t:3}],s:"Run"}},press:{t:0,b:{t:2,i:[{t:3}],s:"Press"}}}},time:{just_now:{t:0,b:{t:2,i:[{t:3}],s:"Just now"}},minutes_ago:{t:0,b:{t:2,i:[{t:4,k:"n"},{t:3,v:" min ago"}]}},hours_ago:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"1 hour ago"},{t:2,i:[{t:4,k:"n"},{t:3,v:" hours ago"}]}]}},yesterday:{t:0,b:{t:2,i:[{t:3}],s:"Yesterday"}},days_ago:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"1 day ago"},{t:2,i:[{t:4,k:"n"},{t:3,v:" days ago"}]}]}},weeks_ago:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"1 week ago"},{t:2,i:[{t:4,k:"n"},{t:3,v:" weeks ago"}]}]}},months_ago:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"1 month ago"},{t:2,i:[{t:4,k:"n"},{t:3,v:" months ago"}]}]}},years_ago:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"1 year ago"},{t:2,i:[{t:4,k:"n"},{t:3,v:" years ago"}]}]}},in_minutes:{t:0,b:{t:2,i:[{t:3,v:"In "},{t:4,k:"n"},{t:3,v:" min"}]}},in_hours:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"In 1 hour"},{t:2,i:[{t:3,v:"In "},{t:4,k:"n"},{t:3,v:" hours"}]}]}},tomorrow:{t:0,b:{t:2,i:[{t:3}],s:"Tomorrow"}},in_days:{t:0,b:{t:1,c:[{t:2,i:[{t:3}],s:"In 1 day"},{t:2,i:[{t:3,v:"In "},{t:4,k:"n"},{t:3,v:" days"}]}]}},am:{t:0,b:{t:2,i:[{t:3}],s:"AM"}},pm:{t:0,b:{t:2,i:[{t:3}],s:"PM"}}},date:{weekdays:[{t:0,b:{t:2,i:[{t:3}],s:"Sunday"}},{t:0,b:{t:2,i:[{t:3}],s:"Monday"}},{t:0,b:{t:2,i:[{t:3}],s:"Tuesday"}},{t:0,b:{t:2,i:[{t:3}],s:"Wednesday"}},{t:0,b:{t:2,i:[{t:3}],s:"Thursday"}},{t:0,b:{t:2,i:[{t:3}],s:"Friday"}},{t:0,b:{t:2,i:[{t:3}],s:"Saturday"}}],weekdays_short:[{t:0,b:{t:2,i:[{t:3}],s:"Sun"}},{t:0,b:{t:2,i:[{t:3}],s:"Mon"}},{t:0,b:{t:2,i:[{t:3}],s:"Tue"}},{t:0,b:{t:2,i:[{t:3}],s:"Wed"}},{t:0,b:{t:2,i:[{t:3}],s:"Thu"}},{t:0,b:{t:2,i:[{t:3}],s:"Fri"}},{t:0,b:{t:2,i:[{t:3}],s:"Sat"}}],weekdays_min:[{t:0,b:{t:2,i:[{t:3}],s:"Su"}},{t:0,b:{t:2,i:[{t:3}],s:"Mo"}},{t:0,b:{t:2,i:[{t:3}],s:"Tu"}},{t:0,b:{t:2,i:[{t:3}],s:"We"}},{t:0,b:{t:2,i:[{t:3}],s:"Th"}},{t:0,b:{t:2,i:[{t:3}],s:"Fr"}},{t:0,b:{t:2,i:[{t:3}],s:"Sa"}}],months:[{t:0,b:{t:2,i:[{t:3}],s:"January"}},{t:0,b:{t:2,i:[{t:3}],s:"February"}},{t:0,b:{t:2,i:[{t:3}],s:"March"}},{t:0,b:{t:2,i:[{t:3}],s:"April"}},{t:0,b:{t:2,i:[{t:3}],s:"May"}},{t:0,b:{t:2,i:[{t:3}],s:"June"}},{t:0,b:{t:2,i:[{t:3}],s:"July"}},{t:0,b:{t:2,i:[{t:3}],s:"August"}},{t:0,b:{t:2,i:[{t:3}],s:"September"}},{t:0,b:{t:2,i:[{t:3}],s:"October"}},{t:0,b:{t:2,i:[{t:3}],s:"November"}},{t:0,b:{t:2,i:[{t:3}],s:"December"}}],months_short:[{t:0,b:{t:2,i:[{t:3}],s:"Jan"}},{t:0,b:{t:2,i:[{t:3}],s:"Feb"}},{t:0,b:{t:2,i:[{t:3}],s:"Mar"}},{t:0,b:{t:2,i:[{t:3}],s:"Apr"}},{t:0,b:{t:2,i:[{t:3}],s:"May"}},{t:0,b:{t:2,i:[{t:3}],s:"Jun"}},{t:0,b:{t:2,i:[{t:3}],s:"Jul"}},{t:0,b:{t:2,i:[{t:3}],s:"Aug"}},{t:0,b:{t:2,i:[{t:3}],s:"Sep"}},{t:0,b:{t:2,i:[{t:3}],s:"Oct"}},{t:0,b:{t:2,i:[{t:3}],s:"Nov"}},{t:0,b:{t:2,i:[{t:3}],s:"Dec"}}],top_bar:{t:0,b:{t:2,i:[{t:4,k:"weekday"},{t:3,v:" "},{t:4,k:"day"},{t:3,v:" "},{t:4,k:"month"}]}},full:{t:0,b:{t:2,i:[{t:4,k:"weekday"},{t:3,v:" "},{t:4,k:"day"},{t:3,v:" "},{t:4,k:"month"}]}},day_month:{t:0,b:{t:2,i:[{t:4,k:"day"},{t:3,v:" "},{t:4,k:"month"}]}},weekday_time:{t:0,b:{t:2,i:[{t:4,k:"weekday"},{t:3,v:" "},{t:4,k:"time"}]}}},number:{decimal:{t:0,b:{t:2,i:[{t:3}],s:"."}},group:{t:0,b:{t:2,i:[{t:3}],s:","}},group_min:{t:0,b:{t:2,i:[{t:3}],s:"1"}}},tile:{page:{t:0,b:{t:2,i:[{t:3,v:"Page "},{t:4,k:"n"}]}}}}},Wh=Vh,Ka=e=>e%10>=2&&e%10<=4&&(e%100<12||e%100>14),qa={one_other:e=>e===1?0:1,one_upto_1:e=>Math.abs(e)<=1?0:1,slavic_pl:e=>e===1?0:Ka(e)?1:2,east_slavic:e=>e%10===1&&e%100!==11?0:Ka(e)?1:2,none:()=>0},Bh=Object.assign({"../../screen_manager/translations/de.json":()=>fn(()=>import("./de-B5ljNtf2.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/en-GB.json":()=>fn(()=>import("./en-GB-v9zPRS2K.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/es.json":()=>fn(()=>import("./es-DUs4hvEG.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/fr.json":()=>fn(()=>import("./fr-C0TB0UkD.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/it.json":()=>fn(()=>import("./it-OWvw4Kib.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/nl.json":()=>fn(()=>import("./nl-DV7drWRf.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/pl.json":()=>fn(()=>import("./pl-CGqJEGr1.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/pt.json":()=>fn(()=>import("./pt-Brv5sHYu.js"),[],import.meta.url).then(e=>e.default)}),Kh=Object.fromEntries(Object.entries(Bh).map(([e,t])=>[e.slice(e.lastIndexOf("/")+1,-5),t])),Ls={...cp},eu=new Set(["en"]),_l={},tu=e=>_l[e]=(t,n)=>Math.min((qa[Ls[e]?.plural]||qa.one_other)(t),n-1),yl=()=>["en",...Object.keys(Ls).filter(e=>e!=="en").sort()];yl().forEach(tu);const ls=Ih({locale:"en",fallbackLocale:"en",messages:{en:Wh},pluralRules:_l,missingWarn:!1,fallbackWarn:!1,missing:(e,t)=>{}}),c=ls.global.t,qh=(e,t="en")=>ls.global.te(e,t),wl=()=>ls.global.locale.value,zh=e=>Ls[e];function Yh(e=window){try{if(e.parent!==e){const t=e.parent.document.documentElement.lang;if(t)return t}}catch{}return e.navigator.language||"en"}function nu(e,t=yl()){const n=i=>t.find(l=>l.toLowerCase()===i.toLowerCase()),s=(e||"").trim();return s?n(s)||n(s.split("-")[0]):void 0}const su=(e,t=yl())=>nu(e,t)||"en";function Gh(e,t,n=Ls[e]){n&&(Ls[e]=n),_l[e]||tu(e),ls.global.setLocaleMessage(e,t),eu.add(e)}const za={};function iu(e){if(eu.has(e))return Promise.resolve(!0);const t=Kh[e];return t?za[e]??=t().then(n=>(Gh(e,n),!0),()=>(delete za[e],!1)):Promise.resolve(!1)}async function Jh(e=su(Yh())){const t=await iu(e)?e:"en";return ls.global.locale.value=t,document.documentElement.lang=t,t}const Fo={point:{decimal:".",group:",",from:4},comma:{decimal:",",group:".",from:4},space:{decimal:",",group:" ",from:4}};function Xh(e){const t=n=>c(`screen.number.${n}`,{},{locale:e});return{decimal:t("decimal"),group:t("group"),from:Number(t("group_min"))>=2?5:4}}function ou(e,t){const n=String(e),s=/^(-?)(\d+)(?:\.(\d+))?$/.exec(n);if(!s)return n;const i=s[2].length>=t.from?s[2].replace(/\B(?=(\d{3})+$)/g,t.group):s[2];return`${s[1]}${i}${s[3]!==void 0?t.decimal+s[3]:""}`}const Ya={comma_decimal:"point",decimal_comma:"comma",space_comma:"space"};function Zh(e=window){try{if(e.parent===e)return{};const t=e.parent.document.querySelector("home-assistant")?.hass?.locale,n=["12","24"].includes(t?.time_format)?t.time_format:void 0;return{...n?{clock:n}:{},...Ya[t?.number_format]?{numbers:Ya[t.number_format]}:{}}}catch{return{}}}const Qh=(e,t=wl())=>new Intl.ListFormat(t==="en"?"en-GB":t,{type:"conjunction"}).format(e.map(String)),ze=6,rn=8,Ms=rn*ze,lu=["single","wide","full"],$n=e=>e===!0?"wide":e===!1?"single":e,as=e=>/^screen\.page_[1-8]$/.test(e)?Number(e.slice(-1)):0,ut=e=>lu.includes(e.options?.size)?e.options.size:"single",Do=e=>ut(e)!=="single",au=e=>ut(e)==="full",ru=e=>e-e%ze,cu=e=>e-e%2,Tt=e=>Math.floor(e/ze),kl=e=>$n(e)==="full"?ze:$n(e)==="wide"?2:1,Hn=(e,t)=>$n(t)==="full"?Array.from({length:ze},(n,s)=>ru(e)+s):$n(t)==="wide"?[e,e+1]:[e],Ga=(e,t)=>$n(t)==="full"?ru(e):$n(t)==="wide"?cu(e):e,Ze=e=>e.tiles.map(t=>({tile:t,slot:t.slot}));function uu(e){let t=0;return e.map(n=>{const s=ut(n);s==="full"&&t%ze?t+=ze-t%ze:s==="wide"&&t%2===1&&t++;const i=t;return t+=kl(s),i})}function em(e){const t=uu(e);return e.some((n,s)=>n.slot!==t[s])}function Hi(e){if(e.tiles.some(t=>!Number.isInteger(t.slot))){const t=uu(e.tiles);e.tiles.forEach((n,s)=>n.slot=t[s])}e.tiles.sort((t,n)=>t.slot-n.slot)}function Qn(e){const t=new Set;for(const{tile:n,slot:s}of e)for(const i of Hn(s,ut(n)))t.add(i);return t}const Rs=(e,t,n)=>Number.isInteger(t)&&t>=0&&t<Ms&&($n(n)==="full"?t%ze===0:$n(n)==="wide"?t+1<Ms&&!(t%2):!0)&&Hn(t,n).every(s=>!e.has(s));function yi(e,t,n=0){for(let s=n;s<Ms;s++)if(Rs(e,s,t))return s;return-1}function du(e,t,n){let s=-1;for(let i=0;i<Ms;i++)Rs(e,i,t)&&(s<0||Math.abs(i-n)<=Math.abs(s-n))&&(s=i);return s}function fu(e,t,n){const s=ut(t);if(n=Ga(n,s),!Rs(new Set,n,s))return null;const i=Hn(n,s),l=e.includes(t)?Hn(t.slot,s):[],r=[{tile:t,slot:n}],u=[];for(const f of e)f!==t&&(Hn(f.slot,ut(f)).some(h=>i.includes(h))?u.push(f):r.push({tile:f,slot:f.slot}));for(const f of u){const h=ut(f),p=Qn(r);let b=l.map(v=>Ga(v,h)).find(v=>Rs(p,v,h));if(b===void 0&&(b=du(p,h,f.slot)),b<0)return null;r.push({tile:f,slot:b})}return r.sort((f,h)=>f.slot-h.slot)}function Pt(e,t=1){const n=Math.max(0,...e.map(({tile:s,slot:i})=>i+kl(ut(s))));return Math.min(rn,Math.max(1,Math.ceil(n/ze),t||1))}function tm(e,t){const n=Array.from({length:t},()=>new Set);let s=0;for(const{tile:h,slot:p}of e){const b=as(h.entity)-1,v=Tt(p);b<0||b>=t||v>=t||(s++,n[v].add(b))}const i=h=>{const p=new Set([0]),b=[0];for(;b.length;)for(const v of h(b.shift()))p.has(v)||(p.add(v),b.push(v));return p},l=i(h=>[...n[h]]),r=i(h=>n.flatMap((p,b)=>p.has(h)?[b]:[])),u=Array.from({length:t},(h,p)=>p),f=h=>h.map(p=>p+1);return{tiles:s,targets:f(u.filter(h=>n.some(p=>p.has(h)))),unreachable:f(u.filter(h=>!l.has(h))),noWayBack:f(u.filter(h=>l.has(h)&&!r.has(h)))}}function nm(e){const t=e.split(".")[0];return t==="sun"?{options:{display:"sunpath",size:"wide"}}:t==="weather"?{options:{display:"forecast",size:"wide"}}:as(e)?{}:t==="screen"?{options:{display:"digital",size:"wide"}}:{}}const pu=e=>({entity:e,name:"",slot:-1,...nm(e)});function hu(e,t){const n=e.entity.split(".")[0],s=t.controls?.[n],i=e.options||{};if(!s||!["wide","full"].includes(i.size)||(i.display||"standard")!=="standard"||i.inline==="slider")return null;const l=i.controls??(i.size==="full"?"none":s.default);return l==="none"?null:l}function sm(e,t){const n=hu(e,t);return n?t.controls?.[e.entity.split(".")[0]]?.choices.find(s=>s.key===n)?.label.toLocaleLowerCase()||n:c("editor.inspect.control_none")}const Uo=e=>(/^(\d+)\.(\d+)\.(\d+)$/.exec(e||"")||[]).slice(1).map(Number);function cn(e,t){const[n,s]=[Uo(e),Uo(t)];if(n.length!==3||s.length!==3)return!1;for(let i=0;i<3;i++)if(n[i]!==s[i])return n[i]>s[i];return!0}const im=(e,t,n,s)=>cn(e,`${t}.${n}.${s}`),om=Ms;function lm(e){return Uo(e).length!==3?10:cn(e,"0.2.62")?om:cn(e,"0.2.7")?20:10}const am=["standard","watch","forecast","graph","digital","analog","sunpath"],mu=e=>am.includes(e)?c(`editor.displays.${e}`):e,rm=e=>c(`editor.sizes.${lu.includes(e)?e:"single"}`),Ja=["light","switch","input_boolean","fan","media_player","climate"],cm=["light","fan","cover","number","input_number","media_player"],um={light:["☀","#ad7600","#fff3d3"],climate:["❄","#c86620","#ffebdc"],vacuum:["◉","#008577","#def3ed"],fan:["✣","#008aab","#def5fa"],cover:["▤","#8053af","#eee5f8"],media_player:["▶","#007cad","#def2fc"],sensor:["⌁","#3476b1","#e5effa"],binary_sensor:["◈","#ad7600","#fff3d3"],switch:["⏻","#ad7600","#fff3d3"],input_boolean:["⏻","#ad7600","#fff3d3"],scene:["✦","#8053af","#eee5f8"],script:["▷","#8053af","#eee5f8"],weather:["☁","#007cad","#def2fc"],number:["±","#008577","#def3ed"],input_number:["±","#008577","#def3ed"],select:["≡","#5862af","#eaecfa"],input_select:["≡","#5862af","#eaecfa"],button:["↗","#5862af","#eaecfa"],input_button:["↗","#5862af","#eaecfa"],screen:["◷","#25282c","#e9ecf1"],sun:["☼","#c86620","#ffebdc"],timer:["⏱","#008577","#def3ed"],person:["☺","#2f7d32","#e1f2e2"],camera:["◧","#3d4a57","#e6ebf0"],image:["◧","#3d4a57","#e6ebf0"]};function Ut(e){const t=e.split(".")[0],n=um[t];return n?[c(`editor.domains.${t}`),...n]:[c("editor.domains.entity"),"◇","#637184","#edf0f4"]}const bu={clock:"clock-outline",analog:"clock-outline",date:"calendar"},at=e=>JSON.stringify(e),Pe=e=>String.fromCodePoint(parseInt(e,16));function Vi(e,t=new Date){let n=t.getHours();return e||(n=n%12||12),`${String(n).padStart(2,"0")}:${String(t.getMinutes()).padStart(2,"0")}`}const $l=(e=new Date,t="en")=>c("screen.date.top_bar",{weekday:c(`screen.date.weekdays_min.${e.getDay()}`,{},{locale:t}),day:e.getDate(),month:c(`screen.date.months_short.${e.getMonth()}`,{},{locale:t})},{locale:t});function dm(e,t=Math.floor(Date.now()/1e3),n="en"){const s=t-e,i=Math.abs(s),l=u=>Math.floor(i/u),r=(u,f)=>f===void 0?c(`screen.time.${u}`,{},{locale:n}):c(`screen.time.${u}`,f,{locale:n});return s<0?i<3600?r("in_minutes",Math.max(1,l(60))):i<86400?r("in_hours",l(3600)):i<172800?r("tomorrow"):r("in_days",l(86400)):i<60?r("just_now"):i<3600?r("minutes_ago",l(60)):i<86400?r("hours_ago",l(3600)):i<172800?r("yesterday"):i<604800?r("days_ago",l(86400)):i<2592e3?r("weeks_ago",l(604800)):i<31536e3?r("months_ago",l(2592e3)):r("years_ago",l(31536e3))}const fm={guition:{width:448,top:36,name:27,text:21,icon:26},cyd:{width:298,top:24,name:18,text:14,icon:18}};let ds;const jo=new Map,pm=()=>jo.clear();function Rn(e,t){const n=`${t}|${e}`;let s=jo.get(n);if(!s){if(ds===void 0&&(ds=document.createElement("canvas").getContext("2d")),ds){ds.font=t;const i=ds.measureText(e);s={left:-i.actualBoundingBoxLeft,right:i.actualBoundingBoxRight,top:-i.actualBoundingBoxAscent,bottom:i.actualBoundingBoxDescent,advance:i.width}}else{const i=Number(/(\d+(?:\.\d+)?)px/.exec(t)?.[1]||14),l=[...e].length*i*.55;s={left:0,right:l,top:-i*.72,bottom:i*.02,advance:l}}jo.set(n,s)}return s}const hm=e=>({name:`500 ${e.name}px "Bar Roboto"`,text:`400 ${e.text}px "Bar Roboto"`,icon:`${e.icon}px "Tile Icons"`});function mm(e){return{icon:Math.max(2,Math.floor((e*4+5)/10)),item:Math.max(6,Math.floor((e*125+50)/100)),name:Math.max(8,Math.floor((e*16+5)/10))}}function vu(e,t,n,s){const i=hm(t),l=Rn("0",i.text),r=Math.round(l.bottom-l.top),u=mm(r),f=Rn(String.fromCodePoint(983376),i.icon),h=Math.round(f.bottom-f.top),p=e.map((T,V)=>{const L=s(T),k={index:V,item:T,view:L,shown:L.shown,width:0};return L.analog?(k.dial=h,k.width=h,k):(L.icon&&(k.icon={glyph:Pe(L.icon),ink:Rn(Pe(L.icon),i.icon)},k.width+=k.icon.ink.right-k.icon.ink.left),L.text&&(k.text={value:L.text,ink:Rn(L.text,i.text)},k.width+=(k.icon?u.icon:0)+k.text.ink.right-k.text.ink.left),k)}),b=p.filter(T=>T.shown),v=Rn(n,i.name).advance,y=Math.min(v,Math.floor(t.width*35/100)),M=T=>T.reduce((V,L)=>V+L.width,0)+Math.max(0,T.length-1)*u.item;let E=0;for(;E<b.length&&M(b.slice(E))+u.name+y>t.width;)E++;const x=b.slice(E),O=new Set(b.slice(0,E).map(T=>T.index));let C=t.width-M(x);for(const T of x)T.x=C,C+=T.width+u.item;const F=x.length?x[0].x-u.name:t.width;return{metrics:t,fonts:i,cap:r,zero:l,gaps:u,parts:p,placed:x,dropped:O,nameText:n,natural:v,nameRoom:F}}function bm(e,t,n){if(Rn(e,t).advance<=n)return e;const s=[...e];for(;s.length&&Rn(s.join("")+"...",t).advance>n;)s.pop();return s.join("")+"..."}function vm(e){"fonts"in document&&Promise.all([document.fonts.load('500 27px "Bar Roboto"',"Studio 0"),document.fonts.load('400 21px "Bar Roboto"',"Away 0"),document.fonts.load('26px "Tile Icons"',String.fromCodePoint(983376))]).then(()=>{pm(),e()}).catch(()=>{})}let gu="";function gm(e){gu=e||""}async function xl(e,t={}){const n=await fetch(`api/${e}`,{...t,headers:{"Content-Type":"application/json","X-Screen-CSRF":gu,"X-ESP-Screens-Language":wl(),...t.headers}});if(!n.ok){let s=c("editor.api.failed");try{const i=(await n.json())?.error;typeof i=="string"&&i.trim()&&(s=i)}catch{}throw new Error(s)}return n}const Rt=async e=>(await xl(e)).json(),ft=async(e,t,n,s={})=>{const l=await(await xl(e,{method:t,body:n===void 0?void 0:JSON.stringify(n),...s})).text();return l?JSON.parse(l):null},m=Bn({inventory:{screens:[],entities:[]},connected:!1,reachable:!0,selected:null,layout:null,dirty:!1,busy:!1,saved:0,tab:"layout",selectedTile:null,inspector:null,iconPickerOpen:!1,actionPickerOpen:!1,actionSearch:"",insertAt:-1,filter:"",search:"",capabilities:{},entityActions:{},topbarPreviews:{},topbarAdded:null,topbarOverflow:[],settingEdits:{},settingPending:!1,updating:[],toast:null,now:Date.now(),fontsVersion:0,route:location.hash,overrideProfile:null,overrideFriendly:"",drag:{active:!1,moving:null,preview:null},menuOpen:!1,liveStates:{},room:"",hidePlaced:!1,palette:!1,firmwareJob:null}),_t=$(()=>m.inventory.screens.find(e=>e.id===m.selected)),ss=e=>(e&&"firmware_known"in e?e.firmware_known:e?.firmware)||"",_u=$(()=>ss(_t.value)),yn=(e,t,n)=>im(_u.value,e,t,n),Vn=$(()=>{const e=_t.value?.tile_limit;return typeof e=="number"&&Number.isInteger(e)&&e>0?e:lm(_u.value)}),Xa=$(()=>{const e=_t.value?.full_page;return typeof e=="boolean"?e:yn(0,2,62)}),_m=$(()=>{const e=_t.value?.page_tiles_repeat;return typeof e=="boolean"?e:yn(0,2,65)}),Wi=e=>_m.value&&as(e)>0,Sl=$(()=>_t.value?.board==="guition"),yu=$(()=>fm[Sl.value?"guition":"cyd"]),ro=$(()=>m.selectedTile&&m.layout?.tiles.includes(m.selectedTile)?m.selectedTile:void 0),Cl=e=>!!m.selectedTile&&xe(m.selectedTile)===xe(e);let Za=0;function Ce(e,t){m.toast={message:e,action:t},clearTimeout(Za),Za=window.setTimeout(()=>m.toast=null,t?8e3:5e3)}function ym(){m.toast=null}async function Ot(e,t,n="api_key"){try{if(!navigator.clipboard||!window.isSecureContext)throw new Error;await navigator.clipboard.writeText(e),Ce(c(`editor.copy.${n}.copied`))}catch{if(t){const s=document.createRange();s.selectNodeContents(t);const i=window.getSelection();i?.removeAllRanges(),i?.addRange(s)}Ce(c(document.execCommand("copy")?`editor.copy.${n}.copied`:`editor.copy.${n}.selected`))}}function wi(){const e="/config/integrations/dashboard";try{window.top.location.assign(e)}catch{window.open(e,"_blank")}}const wm=["","#settings","#new-screen","#firmware","#alerts","#override"],kt=$(()=>wm.includes(m.route)?m.route:"");function Ve(e){if(location.hash===e){m.route=e;return}location.hash=e}window.addEventListener("hashchange",()=>{m.route=location.hash,window.scrollTo(0,0)});function Bs(e){return m.inventory.entities.find(t=>t.id===e)?.name||m.inventory.builtin?.find(t=>t.id===e)?.name||e}let co={source:null,byName:{}};function Ks(e){return co.source!==m.inventory.icons&&(co={source:m.inventory.icons,byName:Object.fromEntries((m.inventory.icons?.groups||[]).flatMap(t=>t.icons.map(n=>[n.name,n])))}),e?co.byName[e]:void 0}function xn(e){const t=m.inventory.icons;if(!t)return"F0335";const n=m.inventory.entities.find(i=>i.id===e),s=e.split(".")[0];return t.builtin?.[e]?t.builtin[e]:n?.icon?n.icon:s==="weather"?t.weather[n?.state||""]||t.weather.partlycloudy:s==="sun"?t.sun[n?.state||""]||t.sun.below_horizon:t.defaults[s]||t.fallback}const ms=e=>Ks(e.options?.icon)?.cp||xn(e.entity),uo=new Set;async function Bi(e){const t=[...new Set(e)].filter(n=>!uo.has(n)&&!n.startsWith("screen."));if(t.length){t.forEach(n=>uo.add(n));try{for(let n=0;n<t.length;n+=40){const s=t.slice(n,n+40).map(i=>`entity=${encodeURIComponent(i)}`).join("&");Object.assign(m.capabilities,(await Rt(`capabilities?${s}`)).capabilities||{})}}catch{t.forEach(n=>uo.delete(n))}}}const fo=new Set;async function km(e){if(!fo.has(e)){fo.add(e);try{m.entityActions[e]=(await Rt(`entity-actions?entity=${encodeURIComponent(e)}`)).actions}catch{fo.delete(e)}}}let po=!1;async function Ki(){const e=[...new Set((m.layout?.tiles||[]).map(t=>t.entity).filter(t=>!t.startsWith("screen.")))];if(!(!e.length||po)){po=!0;try{for(let t=0;t<e.length;t+=60){const n=e.slice(t,t+60).map(s=>`entity=${encodeURIComponent(s)}`).join("&");Object.assign(m.liveStates,(await Rt(`states?${n}`)).states||{})}}catch{}finally{po=!1}}}function $m(e){const t=m.liveStates[e];if(t)return t;const n=m.inventory.entities.find(s=>s.id===e);return n?.state?{state:n.state,word:null,a:{}}:null}let Ho=0;function pt(){m.dirty=!0,m.saved=0,Ho++}function wu(e){if(e===m.selected&&m.layout&&m.dirty){Qe(),m.tab="layout",m.menuOpen=!1,Ve("");return}if(e!==m.selected&&m.dirty&&!confirm(c("editor.screen_view.confirm.switch")))return;e!==m.selected&&(Fs(),m.settingEdits={}),m.selected=e,m.selectedTile=null,m.inspector=null,m.tab="layout",m.menuOpen=!1;const t=m.inventory.screens.find(s=>s.id===e);if(!t){m.layout=null;return}const n=JSON.parse(JSON.stringify(t.layout));Hi(n),n.pages=Pt(Ze(n),n.pages),m.layout=n,m.insertAt=-1,m.dirty=!1,m.saved=0,qi(0),Bi(n.tiles.map(s=>s.entity)),Ki(),Ve("")}const xm=()=>m.layout?Ze(m.layout):[];function Sm(e){const t=m.layout,n=t.tiles.map(i=>`${i.entity}@${i.slot}`).join();for(const{tile:i,slot:l}of e)i.slot=l,t.tiles.includes(i)||t.tiles.push(i);Hi(t),t.pages=Pt(Ze(t),t.pages);const s=t.tiles.map(i=>`${i.entity}@${i.slot}`).join()!==n;return s&&pt(),s}function qs(e,t){if(!m.layout)return!1;Bi([e.entity]);const n=fu(m.layout.tiles,e,t),s=n?Sm(n):!1;return s&&!m.liveStates[e.entity]&&Ki(),s}function ku(e){const t=m.layout;if(!t||!Wi(e)&&t.tiles.some(i=>i.entity===e)||t.tiles.length>=Vn.value)return;const n=pu(e),s=m.insertAt>=0?m.insertAt:yi(Qn(Ze(t)),ut(n));m.insertAt=-1,s>=0&&qs(n,s)&&Vo(n)}function $u(e){const t=m.layout;if(!t)return;const n=t.tiles.indexOf(e);n<0||(t.tiles.splice(n,1),Cl(e)&&Qe(),pt(),t.pages=Pt(Ze(t),t.pages),Ce(c("editor.layout.removed",{name:e.name||Bs(e.entity)}),{label:c("editor.common.undo"),run:()=>qs(e,e.slot)}))}function Qa(){const e=m.layout;e&&(e.pages=Math.min(rn,Pt(Ze(e),e.pages)+1),pt())}function Cm(e){const t=m.layout;if(t){for(const n of t.tiles)Tt(n.slot)>e&&(n.slot-=ze);t.pages=Math.max(1,Pt(Ze(t),t.pages)-1),pt()}}function Tm(e,t){const n=m.layout;if(!n||!Number.isInteger(t)||t<0||t>=rn||t===Tt(e.slot))return!1;const s=yi(Qn(Ze(n).filter(l=>l.tile!==e)),ut(e),t*ze),i=qs(e,s>=0&&Tt(s)===t?s:t*ze);return i||Ce(c("editor.layout.no_room",{page:t+1})),i}function Em(){const e=m.layout;if(!e)return 1;const t=m.drag.preview||Ze(e),n=Pt(t,e.pages);return m.drag.active&&n<rn?n+1:n}function pn(e,t,n){const s=e.entity.split(".")[0],i=m.capabilities[e.entity],l=Do(e),r=ut(e);e.options={...e.options,[t]:n},t==="display"&&n==="watch"&&(e.options.inline="none",m.inventory.controls?.[s]&&(e.options.controls="none")),t==="display"&&["forecast","sunpath"].includes(n)&&(e.options.size="wide"),t==="inline"&&n==="slider"&&(e.options.display="standard",m.inventory.controls?.[s]&&(e.options.controls="none")),t==="controls"&&n!=="none"&&(e.options.display="standard",e.options.inline="none");const u=m.inventory.controls?.[s];t==="size"&&n==="wide"&&i&&u&&!("controls"in e.options)&&!i.controls.includes(u.default)&&(e.options.controls=u.choices.find(h=>h.key!=="none"&&i.controls.includes(h.key))?.key||"none"),pt();const f=m.layout;if(f){if(au(e)&&r!=="full"){const h=Tt(e.slot),p=f.tiles.filter(y=>y!==e&&Tt(y.slot)===h),b=Qn(Ze(f).filter(y=>y.tile!==e&&!p.includes(y.tile))),v=[];for(const y of p){const M=yi(b,ut(y),(h+1)*ze);if(M<0){v.length=0;break}v.push([y,M]);for(const E of Hn(M,ut(y)))b.add(E)}if(v.length===p.length){for(const[y,M]of v)y.slot=M;e.slot=h*ze}else{const y=yi(Qn(Ze(f).filter(M=>M.tile!==e)),"full");y>=0?e.slot=y:(e.options.size=r,Ce(c("editor.layout.no_free_page")))}}else if(Do(e)&&!l){const h=Qn(Ze(f).filter(v=>v.tile!==e)),p=cu(e.slot),b=Rs(h,p,"wide")?p:du(h,"wide",p);b>=0&&(e.slot=b)}Hi(f),f.pages=Pt(Ze(f),f.pages)}}function Am(e,t){const n=`screen.page_${t}`,s=m.layout;return!s||n===e.entity||!as(n)?!1:!Wi(n)&&s.tiles.some(i=>i.entity===n)?(Ce(c("editor.layout.page_taken",{page:t})),!1):(e.entity=n,s.pages=Math.max(Pt(Ze(s),s.pages),t),pt(),!0)}function Vo(e){Cl(e)||(m.iconPickerOpen=!1,m.actionPickerOpen=!1,m.actionSearch=""),m.selectedTile=e,m.inspector={kind:"tile"},Bi([e.entity])}function Jt(e){m.inspector?.kind==="bar"&&m.inspector.index===e||(m.iconPickerOpen=!1),m.selectedTile=null,m.inspector={kind:"bar",index:e}}function er(){m.selectedTile=null,m.inspector={kind:"bar-add"}}function Qe(){m.inspector=null,m.selectedTile=null}async function Wo(){if(m.busy||!m.layout||!m.selected)return;m.busy=!0;const e=Ho,t=m.selected;try{const{settings:n,...s}=m.layout;if(await ft(`screens/${encodeURIComponent(m.selected)}`,"PUT",s),m.selected!==t){const i=m.inventory.screens.find(l=>l.id===t)?.name;Ce(i?c("editor.screen_view.saved.other",{name:i}):c("editor.screen_view.saved.other_unnamed"))}else Ho===e?(m.dirty=!1,m.saved=Date.now(),Ce(c("editor.screen_view.saved.current"))):Ce(c("editor.screen_view.saved.newer_edit"));await Sn()}catch(n){Ce(n.message)}finally{m.busy=!1}}const Wn=e=>!!(e&&e.alert_action&&cn(ss(e),m.inventory.alerts?.min_firmware||"0.2.31"));async function xu(e){try{await ft(`screens/${encodeURIComponent(e.id)}/identify`,"POST"),Ce(c("editor.screen_view.identified",{name:e.name}))}catch(t){Ce(t.message)}}async function Pm(e,t){return await ft("alerts/test","POST",{screen:e,data:t})}const Om=["title","tiles","header","pages"];function Su(e,t){const n=m.layout;if(!n)return;const s=(Array.isArray(e.tiles)?e.tiles:[]).filter(u=>!!(u&&typeof u=="object"&&typeof u.entity=="string"&&u.entity.includes("."))).map(u=>({entity:u.entity,name:typeof u.name=="string"?u.name:"",slot:Number.isInteger(u.slot)?u.slot:-1,...u.options&&typeof u.options=="object"?{options:{...u.options}}:{}})),i=new Set,l=s.filter(u=>Wi(u.entity)||!i.has(u.entity)&&i.add(u.entity)),r=l.slice(0,Vn.value);n.tiles=r,e.header&&Array.isArray(e.header.items)?n.header={items:e.header.items.map(u=>({...u}))}:delete n.header,n.pages=Number.isInteger(e.pages)?e.pages:1,Hi(n),n.pages=Pt(Ze(n),n.pages),Qe(),pt(),Bi(r.map(u=>u.entity)),Ki(),qi(0),Ce(t(r.length<l.length?{kept:r.length,total:l.length}:void 0))}function Im(e){const t=m.inventory.screens.find(n=>n.id===e);!t||!m.layout||Su(JSON.parse(JSON.stringify(t.layout)),n=>n?c("editor.layout.copied_part",{name:t.name,...n}):c("editor.layout.copied",{name:t.name}))}function Lm(){const e=m.layout;if(!e)return"";const t={esp_screens_layout:1};for(const n of Om)e[n]!==void 0&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Cu(){const e=Lm();if(!e)return;const t=`${(_t.value?.name||"screen").toLowerCase().replace(/[^a-z0-9]+/g,"-")}.layout.json`,n=URL.createObjectURL(new Blob([e],{type:"application/json"})),s=document.createElement("a");s.href=n,s.download=t,s.click(),setTimeout(()=>URL.revokeObjectURL(n),5e3),Ot(e,void 0,"layout_json")}function Mm(e){let t;try{t=JSON.parse(e)}catch{Ce(c("editor.layout.not_json"));return}if(!t||typeof t!="object"||!Array.isArray(t.tiles)){Ce(c("editor.layout.no_tiles_in_file"));return}Su(t,n=>n?c("editor.layout.imported_part",n):c("editor.layout.imported"))}function Rm(e){const t=m.inventory.updates?.target,n=m.inventory.changelog;if(!Array.isArray(n)||!t)return[];const s=ss(e),i=[];for(const l of n)if(!(cn(l.firmware,t)&&l.firmware!==t)&&!(s&&cn(s,l.firmware)))for(const r of l.lines)i.includes(r)||i.push(r);return i}let ho=!1;async function Nm(){if(!ho){ho=!0;try{const e=await Rt("firmware");m.firmwareJob={job:e.job,logs:e.logs||[]}}catch{}finally{ho=!1}}}const Bo=()=>m.inventory.screens.some(e=>e.update?.state==="running")||m.updating.length>0;function Gn(e){const t=e.update||{};if(!(t.state==="running"||m.updating.includes(e.id)))return null;const n=m.firmwareJob?.job?.stage;return t.phase==="verify"?{percent:78,text:vs("verify")}:t.phase==="settle"?{percent:92,text:vs("settle")}:t.phase==="install"||!t.phase?n==="upload"?{percent:66,text:c("editor.update.writing")}:n?{percent:40,text:c("editor.update.building")}:{percent:12,text:vs("install")}:{percent:12,text:vs(t.phase)}}const un=()=>m.layout?.header?.items??(m.layout?.settings?.show_clock??!0?[{type:"clock"}]:[]),bn=()=>m.inventory.header?.max_items||6;function Ns(e){m.layout&&(m.layout.header={items:e},pt(),qi())}let tr=0;function qi(e=150){clearTimeout(tr),tr=window.setTimeout(async()=>{const t=un();if(t.some(n=>n.type==="entity"))try{const n=await ft("header-preview","POST",{header:{items:t}});t.forEach((s,i)=>m.topbarPreviews[at(s)]=n.items[i])}catch{}},e)}function bs(e){return e.type==="entity"?Bs(e.entity):m.inventory.header?.builtin.find(t=>t.type===e.type)?.label||e.type}function hn(e){const t=new Date(m.now);if(e.type==="clock")return{text:Vi(is.value,t),shown:!0};if(e.type==="date")return{text:$l(t,Kn.value),shown:!0};if(e.type==="analog")return{analog:!0,shown:!0};const n=m.topbarPreviews[at(e)];return n?{icon:n.i||null,text:n.k==="ago"?dm(n.e,Math.floor(m.now/1e3),Kn.value):n.t,color:n.c?`#${n.c}`:null,shown:n.shown}:{icon:e.icon==="none"?null:Ks(e.icon)?.cp||xn(e.entity),text:"…",shown:!0,loading:!0}}function mo(e,t){const n=[...un()];return t<0||t>=n.length||e===t?!1:(n.splice(t,0,...n.splice(e,1)),Ns(n),!0)}function nr(e){const t=[...un()],[n]=t.splice(e,1);n&&(m.inspector?.kind==="bar"&&Qe(),Ns(t),Ce(c("editor.topbar.removed",{name:bs(n)}),{label:c("editor.common.undo"),run:()=>{const s=[...un()];s.splice(Math.min(e,s.length),0,n),Ns(s)}}))}function bo(e){const t=un();if(t.length>=bn())return Ce(c("editor.topbar.full",bn()));if(t.some(n=>at(n)===at(e)))return Ce(c("editor.topbar.already"));m.topbarAdded={key:at(e),time:Date.now()},Ns([...t,e]),Jt(t.length)}const Fm=[{group:"brightness",icon:"F0599",rows:[{key:"brightness",kind:"number",min:5,max:100,step:5,unit:"%"},{key:"dark_mode",kind:"toggle"},{key:"standby_enabled",kind:"toggle"},{key:"standby_seconds",kind:"duration",min:60,max:86400,needs:"standby_enabled"},{key:"standby_brightness",kind:"number",min:0,max:100,step:5,unit:"%",needs:"standby_enabled",cap:"brightness"}]},{group:"night",icon:"F0594",rows:[{key:"night_enabled",kind:"toggle"},{key:"night_start",kind:"moment",needs:"night_enabled"},{key:"night_end",kind:"moment",needs:"night_enabled"},{key:"night_brightness",kind:"number",min:0,max:100,step:5,unit:"%",needs:"night_enabled",cap:"brightness"}]},{group:"screen",icon:"F0379",rows:[{key:"auto_home",kind:"toggle"},{key:"auto_home_seconds",kind:"duration",min:30,max:3600,needs:"auto_home"},{key:"home_on_standby",kind:"toggle"},{key:"swipe_pages",kind:"toggle"},{key:"page_buttons",kind:"toggle"},{key:"rotation",kind:"choice",options:[0,90,180,270]}]}],vo=e=>c(`editor.screen_settings.rows.${e.key}`),Dm=(e,t)=>`${t}°`;function Tu(e=xm(),t=m.layout?Pt(e,m.layout.pages):1){const n=$i();if(t<2||n.page_buttons!==!1||n.swipe_pages!==!1)return"";const{tiles:s,targets:i,unreachable:l,noWayBack:r}=tm(e,t);if(!l.length&&!r.length)return"";const u=v=>c("editor.screen_settings.reach.pages",{list:Qh(v)},v.length),f=l.filter(v=>!i.includes(v)),h=l.filter(v=>i.includes(v)),p=f.length===1?"one":"more",b=[c("editor.screen_settings.reach.intro")];return s&&f.length?b.push(c(`editor.screen_settings.reach.tiles_missing_${p}`,{targets:u(i),missing:u(f)},s)):s?b.push(c("editor.screen_settings.reach.tiles",{targets:u(i)},s)):f.length?b.push(c(`editor.screen_settings.reach.none_missing_${p}`,{missing:u(f)})):b.push(c("editor.screen_settings.reach.none")),h.length&&b.push(c("editor.screen_settings.reach.cut_off",{pages:u(h)})),r.length&&b.push(c("editor.screen_settings.reach.no_way_back",{pages:u(r)})),b.join(" ")}const Eu=4e3;let vn={},es=null,ki=0,oi=null;const Tl=()=>_t.value?.settings;function $i(){const e=Tl(),t={...e?.values||{}};for(const[n,s]of Object.entries(m.settingEdits))t[n]=s.value;return t}const Um=e=>e<300?30:e<900?60:e<3600?300:e<7200?900:1800;function sr(e,t,n,s,i){if(e.kind==="moment"){let u=s&&t%60?Math.floor(t/60)*60+(n>0?60:0):t+n*(s?60:15);return u%=1440,u<0?u+1440:u}const l=e.kind==="duration"?Um(n<0?t-1:t):e.step,r=e.cap?Math.min(e.max,i[e.cap]):e.max;return Math.min(r,Math.max(e.min,t+n*l))}function jm(e){if(e<60)return c("editor.screen_settings.duration.seconds",{n:e});if(e<3600)return c("editor.screen_settings.duration.minutes",{n:Math.floor(e/60)});const t=Math.floor(e/3600),n=Math.floor(e%3600/60);return n?c("editor.screen_settings.duration.hours_minutes",{h:t,m:String(n).padStart(2,"0")}):c("editor.screen_settings.duration.hours",{n:t})}function Hm(e,t){const n=Math.floor(e/60),s=String(e%60).padStart(2,"0");return t?`${String(n).padStart(2,"0")}:${s}`:c(n<12?"editor.screen_settings.time.am":"editor.screen_settings.time.pm",{time:`${n%12||12}:${s}`})}function Vm(e,t){const n=t[e.key];return n==null?"—":e.kind==="number"?`${n}${e.unit||""}`:e.kind==="duration"?jm(n):e.kind==="moment"?Hm(n,is.value):""}function ti(e,t,n){if(es&&es!==m.selected&&Object.keys(vn).length){Fs(),Ce(c("editor.screen_settings.other_screen_busy"));return}es=m.selected;const s=$i();if(m.settingEdits[e]={value:t,at:Date.now()},vn[e]=t,e==="brightness")for(const i of["standby_brightness","night_brightness"])s[i]>t&&(m.settingEdits[i]={value:t,at:Date.now()});m.settingPending=!0,clearTimeout(ki),ki=window.setTimeout(()=>Fs(),n)}async function Fs(e=!1){if(clearTimeout(ki),oi||!Object.keys(vn).length||!es)return;const t=es,n=vn;vn={};const s=xl(`screens/${encodeURIComponent(t)}/settings`,{method:"PUT",body:JSON.stringify({settings:n}),keepalive:e});oi=s;try{const i=await(await s).json(),l=m.inventory.screens.find(r=>r.id===t);l&&(l.settings=i)}catch(i){if(Ce(i.message),t===m.selected)for(const l of Object.keys(n))delete m.settingEdits[l];if(t===m.selected&&n.brightness!==void 0)for(const l of["standby_brightness","night_brightness"])delete m.settingEdits[l]}finally{oi=null,Object.keys(vn).length?ki=window.setTimeout(()=>Fs(),150):es=null,m.settingPending=!!Object.keys(vn).length,t===m.selected&&xi(),setTimeout(()=>{t===m.selected&&xi()},Eu+100)}}function xi(){const e=Tl();for(const[t,n]of Object.entries(m.settingEdits))vn[t]!==void 0||oi||(e&&e.values[t]===n.value||Date.now()-n.at>Eu)&&delete m.settingEdits[t]}const vs=e=>["install","verify","settle"].includes(e||"")?c(`editor.update.phases.${e}`):c("editor.update.starting");async function Ko(e,t){m.updating.push(e.id);try{await ft(`screens/${encodeURIComponent(e.id)}/update`,"POST",t?{host:t}:{}),await Sn()}catch(n){m.updating=m.updating.filter(s=>s!==e.id),Ce(n.message)}}async function ir(){try{await ft("updates/run","POST"),await Sn()}catch(e){Ce(e.message)}}async function Wm(e){try{await ft("updates","PUT",{auto:e}),m.inventory.updates&&(m.inventory.updates.auto=e),Ce(c(e?"editor.settings.updates.auto_on":"editor.settings.updates.auto_off"))}catch(t){Ce(t.message)}}async function Bm(){try{m.inventory.claude_skill=await ft("claude-skill","POST"),Ce(c(m.inventory.claude_skill?.restart?"editor.settings.claude.installed_restart":"editor.settings.claude.installed"))}catch(e){Ce(e.message)}}const Kn=$(()=>su(m.inventory.language?.effective));St(Kn,e=>iu(e),{immediate:!0});const Fn=(e,t={})=>c(e,t,{locale:Kn.value}),Km=e=>m.inventory.language?.languages?.find(t=>t.code===e)?.name||zh(e||"")?.name||e||"",Au=e=>!!(e.update?.available||e.update?.language),or=()=>c("editor.update.new_language",{name:Km(m.inventory.language?.effective)}),is=$(()=>m.inventory.language?.clock_effective!=="12"),Pu=$(()=>Xh(Kn.value)),qm=$(()=>{const e=m.inventory.language?m.inventory.language.numbers||"auto":"point";return e==="auto"?Pu.value:Fo[e]});async function lr(e){try{const t=await ft("language","PUT",e);return t?.language&&(m.inventory.language=t.language),Ce(c(e.setting===void 0?"editor.settings.language.saved":"editor.settings.language.saved_language")),await Sn(),!0}catch(t){return Ce(t.message),!1}}async function Sn(e=!0){try{const t=await Rt(e?"inventory":"inventory?light=1");m.inventory=e?t:{...m.inventory,...t},t.csrf&&gm(t.csrf),m.connected=!!m.inventory.connected,m.reachable=!0;for(const n of m.inventory.screens)n.update?.state==="running"&&(m.updating=m.updating.filter(s=>s!==n.id));m.selected&&xi()}catch{m.reachable=!1}}function zm(e){m.inventory={...m.inventory,...e},m.connected=!!m.inventory.connected;for(const t of m.inventory.screens)t.update?.state==="running"&&(m.updating=m.updating.filter(n=>n!==t.id));m.selected&&xi()}let ar=0,qo=Date.now(),Si=!1,fs=null;function Ym(){fs||typeof EventSource>"u"||(fs=new EventSource(`api/events?language=${encodeURIComponent(wl())}`),fs.onopen=()=>{Si=!0,Ds()},fs.onmessage=e=>{document.hidden||zm(JSON.parse(e.data))},fs.onerror=()=>{Si=!1,Ds()})}function Ds(){clearTimeout(ar);const e=Si?6e4:m.inventory.updates?.busy?3e3:1e4;ar=window.setTimeout(async()=>{if(!document.hidden){const t=Date.now()-qo>=3e5;t&&(qo=Date.now()),(t||!Si)&&await Sn(t)}Ds()},e)}let rr=!1;function Gm(){rr||(rr=!0,Sn(),Ym(),Ds(),vm(()=>m.fontsVersion++),setInterval(()=>{!m.layout||document.hidden||m.drag.active||(m.now=Date.now(),qi(0))},3e4),setInterval(()=>{!document.hidden&&m.layout&&m.tab==="layout"&&kt.value===""&&Ki()},8e3),setInterval(()=>{!document.hidden&&Bo()?Nm():m.firmwareJob&&!Bo()&&(m.firmwareJob=null)},3e3),document.addEventListener("visibilitychange",async()=>{document.hidden||(qo=Date.now(),m.now=Date.now(),await Sn(),Ds())}),window.addEventListener("pagehide",()=>Fs(!0)),window.addEventListener("beforeunload",e=>{m.dirty&&(e.preventDefault(),e.returnValue="")}))}const Jm={class:"side"},Xm={class:"label"},Zm={id:"screens"},Qm=["aria-current","onClick"],eb={class:"txt"},tb=["aria-label","title"],nb={key:1,class:"pill"},sb={key:2,class:"spin small"},ib=["onSubmit"],ob=["placeholder","aria-label"],lb={type:"submit",class:"btn mini primary"},ab=["aria-label"],rb=["disabled","title","onClick"],cb={key:2,class:"whatsnew"},ub=["aria-valuenow"],db={class:"progress-text"},fb=["title"],pb=["title"],hb={id:"pending"},mb={class:"pending-actions"},bb=["onClick"],vb=["aria-current"],gb={class:"txt"},_b={class:"more"},yb={class:"label"},wb=["aria-current"],kb={class:"mdi"},$b={class:"txt"},xb=["aria-current"],Sb={class:"mdi"},Cb={class:"txt"},Tb=["aria-current"],Eb={class:"mdi"},Ab={class:"txt"},Pb={class:"txt"},Ob=Me({__name:"Sidebar",setup(e){const t=ke(null),n=ke(""),s=p=>{const b=p.update||{};return!!b.language&&(!b.target||cn(ss(p),b.target))};function i(p){const b=p.update||{};return b.state==="running"||m.updating.includes(p.id)?{kind:"running",text:vs(b.phase)}:b.state==="queued"?{kind:"queued",text:c("editor.sidebar.update.queued")}:Au(p)&&p.online?{kind:"available",text:s(p)?or():c("editor.sidebar.update.available",{version:b.target})}:b.result&&Date.now()/1e3-b.result.time<86400?{kind:b.result.state==="failed"?"failed":"done",text:b.result.message}:null}const l=p=>[...p.update?.language&&!s(p)?[or()]:[],...Rm(p)];function r(p){const b=p.update||{};b.host&&b.profile?Ko(p):b.profile&&(t.value=p.id,n.value="")}function u(p){const b=n.value.trim();b&&(t.value=null,Ko(p,b))}const f=()=>{const p=m.firmwareJob?.logs||[];return p.length?p[p.length-1]:""},h=p=>p.installed?c("editor.sidebar.pending.installed"):p.downloaded?c("editor.sidebar.pending.downloaded"):c("editor.sidebar.pending.not_flashed",{file:p.file});return(p,b)=>(g(),_("aside",Jm,[b[13]||(b[13]=o("div",{class:"brand"},[o("span",{class:"mark"},"▦"),o("span",null,"ESP Screens")],-1)),o("span",{id:"connection",class:me(["conn",{online:a(m).connected}]),role:"status"},d(a(m).reachable?a(m).connected?a(c)("editor.sidebar.connection.connected"):a(c)("editor.sidebar.connection.reconnecting"):a(c)("editor.sidebar.connection.unreachable")),3),o("button",{type:"button",class:"search-btn",id:"open-palette",onClick:b[0]||(b[0]=v=>a(m).palette=!0)},[Re("⌕ "+d(a(c)("editor.sidebar.search")),1),b[10]||(b[10]=o("kbd",null,"⌘K",-1))]),o("div",Xm,d(a(c)("editor.sidebar.screens")),1),o("div",Zm,[(g(!0),_(B,null,he(a(m).inventory.screens,v=>(g(),_("div",{key:v.id,class:me(["screen-item",{selected:v.id===a(m).selected&&a(kt)===""}])},[o("button",{type:"button",class:"nav-item","aria-current":v.id===a(m).selected&&a(kt)===""?"true":"false",onClick:y=>a(wu)(v.id)},[o("span",{class:me(["dot",{off:!v.online}])},null,2),o("span",eb,[o("span",null,d(v.name),1),o("small",null,d(v.online?a(c)("editor.common.online"):a(c)("editor.common.offline"))+d(v.area?" · "+v.area:"")+" · "+d(v.firmware||a(c)("editor.common.unknown")),1)]),v.id===a(m).selected&&a(m).dirty?(g(),_("span",{key:0,class:"unsaved",role:"img","aria-label":a(c)("editor.common.unsaved"),title:a(c)("editor.common.unsaved")},null,8,tb)):H("",!0),i(v)?.kind==="available"?(g(),_("span",nb,d(a(c)("editor.sidebar.update.pill")),1)):i(v)?.kind==="running"?(g(),_("span",sb)):H("",!0)],8,Qm),i(v)?(g(),_("div",{key:0,class:me(["screen-update",i(v).kind])},[i(v).kind==="available"?(g(),_(B,{key:0},[t.value===v.id?(g(),_(B,{key:0},[o("small",null,d(a(c)("editor.sidebar.host.hint")),1),o("form",{class:"screen-host",onSubmit:At(y=>u(v),["prevent"])},[Ae(o("input",{"onUpdate:modelValue":b[1]||(b[1]=y=>n.value=y),placeholder:a(c)("editor.sidebar.host.placeholder"),required:"",pattern:"[A-Za-z0-9][A-Za-z0-9.\\-]*","aria-label":a(c)("editor.sidebar.host.label"),autofocus:""},null,8,ob),[[Xe,n.value]]),o("button",lb,d(a(c)("editor.sidebar.host.start")),1),o("button",{type:"button",class:"icon-btn","aria-label":a(c)("editor.common.cancel"),onClick:b[2]||(b[2]=y=>t.value=null)},"✕",8,ab)],40,ib)],64)):(g(),_(B,{key:1},[o("small",null,d(i(v).text),1),o("button",{type:"button",class:"btn mini primary",disabled:!v.update?.profile,title:v.update?.profile?"":a(c)("editor.sidebar.update.no_profile"),onClick:y=>r(v)},d(a(c)("editor.sidebar.update.button")),9,rb)],64)),l(v).length?(g(),_("details",cb,[o("summary",null,d(a(c)("editor.sidebar.update.whats_new")),1),o("ul",null,[(g(!0),_(B,null,he(l(v).slice(0,8),y=>(g(),_("li",{key:y},d(y),1))),128))])])):H("",!0)],64)):i(v).kind==="running"&&a(Gn)(v)?(g(),_(B,{key:1},[o("div",{class:"progress",role:"progressbar","aria-valuenow":a(Gn)(v).percent,"aria-valuemin":"0","aria-valuemax":"100"},[o("i",{style:je({width:a(Gn)(v).percent+"%"})},null,4)],8,ub),o("div",db,[o("span",null,d(a(Gn)(v).percent)+" %",1),o("span",{title:f()},d(a(Gn)(v).text),9,fb)]),f()?(g(),_("small",{key:0,title:f(),style:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"}},d(f()),9,pb)):H("",!0),o("button",{type:"button",class:"btn link mini",style:{"justify-self":"start"},onClick:b[3]||(b[3]=y=>a(Ve)("#firmware"))},d(a(c)("editor.sidebar.update.full_log")),1)],64)):(g(),_("small",{key:2,class:me({failed:i(v).kind==="failed"})},d(i(v).text),3))],2)):H("",!0)],2))),128))]),o("div",hb,[(g(!0),_(B,null,he(a(m).inventory.pending||[],v=>(g(),_("div",{key:v.file,class:"pending"},[o("strong",null,d(v.friendly),1),o("small",null,d(h(v)),1),o("div",mb,[o("button",{type:"button",class:"btn mini quiet",onClick:b[4]||(b[4]=(...y)=>a(wi)&&a(wi)(...y))},d(a(c)("editor.common.open_integrations")),1),v.api_key?(g(),_("button",{key:0,type:"button",class:"btn mini quiet",onClick:y=>a(Ot)(v.api_key)},d(a(c)("editor.sidebar.copy_api_key")),9,bb)):H("",!0)])]))),128))]),o("button",{id:"new-screen",type:"button",class:"nav-item ghost","aria-current":a(kt)==="#new-screen"?"true":"false",onClick:b[5]||(b[5]=v=>a(Ve)("#new-screen"))},[b[11]||(b[11]=o("span",{class:"plus"},"+",-1)),o("span",gb,d(a(c)("editor.nav.new_screen")),1)],8,vb),b[14]||(b[14]=o("div",{class:"spacer"},null,-1)),o("div",_b,[o("div",yb,d(a(c)("editor.sidebar.more")),1),o("button",{id:"open-firmware",type:"button",class:"nav-item","aria-current":a(kt)==="#firmware"?"true":"false",onClick:b[6]||(b[6]=v=>a(Ve)("#firmware"))},[o("span",kb,d(a(Pe)("F0241")),1),o("span",$b,d(a(c)("editor.nav.firmware")),1)],8,wb),o("button",{id:"open-alerts",type:"button",class:"nav-item","aria-current":a(kt)==="#alerts"?"true":"false",onClick:b[7]||(b[7]=v=>a(Ve)("#alerts"))},[o("span",Sb,d(a(Pe)("F0594")),1),o("span",Cb,d(a(c)("editor.nav.alerts")),1)],8,xb),o("button",{id:"open-settings",type:"button",class:"nav-item","aria-current":a(kt)==="#settings"?"true":"false",onClick:b[8]||(b[8]=v=>a(Ve)("#settings"))},[o("span",Eb,d(a(Pe)("F0493")),1),o("span",Ab,d(a(c)("editor.nav.settings")),1)],8,Tb),o("button",{id:"refresh",type:"button",class:"nav-item ghost",onClick:b[9]||(b[9]=v=>a(Sn)())},[b[12]||(b[12]=o("span",{class:"plus"},"↻",-1)),o("span",Pb,d(a(c)("editor.sidebar.refresh")),1)])])]))}}),Ib={key:0,id:"toast",class:"toast",role:"status"},Lb=Me({__name:"Toast",setup(e){return(t,n)=>a(m).toast?(g(),_("div",Ib,[o("span",null,d(a(m).toast.message),1),a(m).toast.action?(g(),_("button",{key:0,type:"button",onClick:n[0]||(n[0]=s=>{a(m).toast.action.run(),a(ym)()})},d(a(m).toast.action.label),1)):H("",!0)])):H("",!0)}}),Mb=["aria-label"],Rb=["placeholder","aria-label"],Nb={class:"palette-list"},Fb={class:"palette-group"},Db=["onMouseenter","onClick"],Ub={key:0,class:"mdi"},jb={key:1,class:"glyph"},Hb={class:"tx"},Vb={key:0},Wb={key:2,class:"hint-key"},Bb={key:0,class:"palette-empty"},Kb=Me({__name:"CommandPalette",setup(e){const t=ke(""),n=ke(0),s=ke(null),i=$(()=>{const h=t.value.trim().toLocaleLowerCase(),p=[],b=c("editor.palette.groups.screens"),v=c("editor.palette.groups.actions");for(const E of m.inventory.screens)p.push({group:b,label:E.name,detail:`${E.online?c("editor.common.online"):c("editor.common.offline")} · ${E.firmware||c("editor.common.unknown")}`,glyphText:"▦",run:()=>wu(E.id)});const y=_t.value,M=[{group:v,label:c("editor.nav.new_screen"),detail:c("editor.nav.new_screen_detail"),glyphText:"+",run:()=>Ve("#new-screen")},{group:v,label:c("editor.nav.firmware"),icon:"F0241",run:()=>Ve("#firmware")},{group:v,label:c("editor.nav.alerts"),detail:c("editor.palette.alerts_detail"),icon:"F0594",run:()=>Ve("#alerts")},{group:v,label:c("editor.nav.settings"),detail:c("editor.palette.settings_detail"),icon:"F0493",run:()=>Ve("#settings")}];if(y&&m.layout&&M.unshift({group:v,label:c("editor.common.save_send"),detail:m.dirty?c("editor.common.unsaved"):c("editor.palette.nothing_to_save"),key:"⌘S",run:()=>Wo()},{group:v,label:c("editor.screen_view.tabs.layout"),detail:y.name,run:()=>{Ve(""),m.tab="layout"}},{group:v,label:c("editor.screen_view.tabs.settings"),detail:y.name,run:()=>{Ve(""),m.tab="settings"}},{group:v,label:c("editor.palette.identify"),detail:Wn(y)?c("editor.palette.identify_detail"):c("editor.palette.identify_needs"),run:()=>{Wn(y)&&xu(y)}},{group:v,label:c("editor.palette.export"),detail:c("editor.palette.export_detail"),run:Cu}),p.push(...M),y&&m.layout&&h){const E=new Set(m.layout.tiles.map(O=>O.entity)),x=m.layout.tiles.length>=Vn.value;for(const O of m.inventory.entities)if(!(O.tile===!1||E.has(O.id))&&`${O.name} ${O.id} ${O.area||""} ${O.device||""}`.toLocaleLowerCase().includes(h)&&(p.push({group:c("editor.palette.groups.add"),label:O.name,detail:[Ut(O.id)[0],O.area].filter(Boolean).join(" · "),icon:m.inventory.icons?xn(O.id):void 0,run:()=>{x||ku(O.id)}}),p.length>60))break}return h?p.filter(E=>`${E.label} ${E.detail||""}`.toLocaleLowerCase().includes(h)):p}),l=$(()=>{const h=[];return i.value.forEach((p,b)=>{(h.find(y=>y.group===p.group)||(h.push({group:p.group,items:[]}),h[h.length-1])).items.push({item:p,index:b})}),h});function r(){m.palette=!1}function u(h){r(),h.run()}function f(h){if(h.key==="Escape")h.preventDefault(),r();else if(h.key==="ArrowDown")h.preventDefault(),n.value=Math.min(i.value.length-1,n.value+1);else if(h.key==="ArrowUp")h.preventDefault(),n.value=Math.max(0,n.value-1);else if(h.key==="Enter"){h.preventDefault();const p=i.value[n.value];p&&u(p)}}return St(t,()=>n.value=0),St(()=>m.palette,async h=>{h&&(t.value="",n.value=0,await Ri(),s.value?.focus())}),(h,p)=>a(m).palette?(g(),_("div",{key:0,class:"palette-backdrop",onClick:r},[o("div",{class:"palette",role:"dialog","aria-label":a(c)("editor.sidebar.search"),onClick:p[1]||(p[1]=At(()=>{},["stop"])),onKeydown:f},[Ae(o("input",{ref_key:"input",ref:s,"onUpdate:modelValue":p[0]||(p[0]=b=>t.value=b),id:"palette-input",placeholder:a(c)("editor.palette.placeholder"),"aria-label":a(c)("editor.sidebar.search"),autocomplete:"off"},null,8,Rb),[[Xe,t.value]]),o("div",Nb,[(g(!0),_(B,null,he(l.value,b=>(g(),_(B,{key:b.group},[o("div",Fb,d(b.group),1),(g(!0),_(B,null,he(b.items,({item:v,index:y})=>(g(),_("button",{key:y,type:"button",class:me(["palette-item",{active:y===n.value}]),onMouseenter:M=>n.value=y,onClick:M=>u(v)},[v.icon?(g(),_("span",Ub,d(a(Pe)(v.icon)),1)):(g(),_("span",jb,d(v.glyphText||"›"),1)),o("span",Hb,[o("span",null,d(v.label),1),v.detail?(g(),_("small",Vb,d(v.detail),1)):H("",!0)]),v.key?(g(),_("kbd",Wb,d(v.key),1)):H("",!0)],42,Db))),128))],64))),128)),i.value.length?H("",!0):(g(),_("p",Bb,d(a(c)("editor.palette.empty")),1))])],40,Mb)])):H("",!0)}}),ve={source:null,element:null,ghost:null,timer:0,start:null,offset:{x:0,y:0},pointerId:null,suppressUntil:0,last:null,scroller:0,target:null},Ou={mounted(e,t){e.__dragSource=t.value,e.addEventListener("pointerdown",s=>{const i=e.__dragSource;if(!(s.button!==0||e.disabled||s.target.closest(".remove"))){s.pointerType!=="touch"&&s.preventDefault(),Object.assign(ve,{source:i,element:e,start:{x:s.clientX,y:s.clientY},pointerId:s.pointerId});try{e.setPointerCapture(s.pointerId)}catch{}clearTimeout(ve.timer),s.pointerType==="touch"&&(ve.timer=window.setTimeout(()=>cr(s),260))}}),e.addEventListener("pointermove",s=>{if(m.drag.active||!ve.start||ve.element!==e)return;const i=Math.hypot(s.clientX-ve.start.x,s.clientY-ve.start.y);if(s.pointerType==="touch"){i>10&&(clearTimeout(ve.timer),ve.start=null);return}i>=6&&cr(s)});const n=()=>{ve.element===e&&!m.drag.active&&(clearTimeout(ve.timer),ve.start=null)};e.addEventListener("pointerup",n),e.addEventListener("pointercancel",n)},updated(e,t){e.__dragSource=t.value}};function cr(e){if(m.drag.active||!ve.start||!ve.source||!ve.element)return;m.drag.active=!0,m.drag.moving=ve.source.kind==="tile"?ve.source.tile:pu(ve.source.id),m.drag.preview=null,ve.target=null,getSelection()?.removeAllRanges();const t=ve.element.getBoundingClientRect(),n=ve.element.cloneNode(!0);n.classList.add("drag-ghost"),n.style.width=`${t.width}px`,n.style.height=`${t.height}px`,ve.offset={x:e.clientX-t.left,y:e.clientY-t.top},document.body.append(n),ve.ghost=n,document.addEventListener("pointermove",zo),document.addEventListener("pointerup",Ci),document.addEventListener("pointercancel",Ci);try{ve.element.releasePointerCapture(ve.pointerId)}catch{}try{document.documentElement.setPointerCapture(ve.pointerId)}catch{}document.addEventListener("touchmove",Iu,{passive:!1}),ve.scroller=window.setInterval(()=>{if(!ve.last)return;const{x:s,y:i}=qb(document),l=s?fr(ve.last.x,dr(s,"x")):0,r=i?fr(ve.last.y,dr(i,"y")):0;l&&s.scrollBy(l,0),r&&i.scrollBy(0,r),(l||r)&&Yo(Lu(ve.last.x,ve.last.y))},16),Yo(-1),zo(e)}function ur(e,t){if(!e)return!1;const n=t==="x"?e.scrollWidth>e.clientWidth:e.scrollHeight>e.clientHeight,s=getComputedStyle(e)[t==="x"?"overflowX":"overflowY"];return n&&(s==="auto"||s==="scroll")}function qb(e){const t=e.querySelector(".pages"),n=e.querySelector(".canvas");return{x:ur(t,"x")?t:n,y:ur(n,"y")?n:e.scrollingElement}}function dr(e,t){const n=t==="x"?window.innerWidth:window.innerHeight;if(e===e.ownerDocument.scrollingElement)return[0,n];const s=e.getBoundingClientRect();return t==="x"?[Math.max(s.left,0),Math.min(s.right,n)]:[Math.max(s.top,0),Math.min(s.bottom,n)]}function fr(e,[t,n]){return e<t+60?-12:e>n-60?12:0}function Iu(e){m.drag.active&&e.preventDefault()}function Ci(e){e.pointerId===ve.pointerId&&zb(e.type==="pointerup")}function zo(e){!ve.ghost||e.pointerId!==ve.pointerId||(ve.last={x:e.clientX,y:e.clientY},ve.ghost.style.transform=`translate(${e.clientX-ve.offset.x}px, ${e.clientY-ve.offset.y}px)`,Yo(Lu(e.clientX,e.clientY)))}function Lu(e,t){let n=null,s=1/0;for(const l of document.querySelectorAll(".pages [data-slot]")){const r=l.getBoundingClientRect(),u=Math.hypot(Math.max(r.left-e,0,e-r.right),Math.max(r.top-t,0,t-r.bottom));u<s&&(s=u,n={cell:l,r})}if(!n||s>16)return-1;let i=Number(n.cell.dataset.slot);return n.cell.classList.contains("wide")&&e>(n.r.left+n.r.right)/2&&(i+=1),i}function Yo(e){ve.target===e||!m.layout||!m.drag.moving||(ve.target=e,m.drag.preview=e>=0?fu(m.layout.tiles,m.drag.moving,e):null)}function zb(e){const t=m.drag.preview,n=m.drag.moving;document.removeEventListener("pointermove",zo),document.removeEventListener("pointerup",Ci),document.removeEventListener("pointercancel",Ci),document.removeEventListener("touchmove",Iu);try{document.documentElement.releasePointerCapture(ve.pointerId)}catch{}if(ve.ghost?.remove(),Object.assign(ve,{ghost:null,suppressUntil:Date.now()+400,last:null,start:null,target:null,element:null,source:null}),clearInterval(ve.scroller),m.drag.active=!1,m.drag.preview=null,m.drag.moving=null,e&&t&&n&&m.layout){const s=m.layout.tiles.map(l=>`${l.entity}@${l.slot}`).join(),i=!m.layout.tiles.includes(n);for(const{tile:l,slot:r}of t)l.slot=r,m.layout.tiles.includes(l)||m.layout.tiles.push(l);m.layout.tiles.sort((l,r)=>l.slot-r.slot),m.layout.tiles.map(l=>`${l.entity}@${l.slot}`).join()!==s&&pt(),i&&qs(n,n.slot)}}window.addEventListener("click",e=>{Date.now()<ve.suppressUntil&&(e.stopPropagation(),e.preventDefault())},!0);const Yb=["data-slot","tabindex","role","aria-label"],Gb={class:"clockface",viewBox:"0 0 60 60","aria-hidden":"true"},Jb=["transform"],Xb=["transform"],Zb=["transform"],Qb={key:0,class:"lead"},ev={class:"tx"},tv={class:"nm"},nv={class:"st"},sv={class:"ic mdi"},iv={class:"lead"},ov={class:"big"},lv={class:"nm"},av={class:"lead"},rv={class:"nm"},cv={key:0,class:"goto"},uv={key:1,class:"big"},dv={key:0},fv={key:1,class:"ctl"},pv={key:1,class:"stp"},hv={class:"mdi"},mv={class:"mdi"},bv={class:"key mdi"},vv={class:"key mdi"},gv={class:"key mdi"},_v={class:"key mdi"},yv={class:"key mdi"},wv={class:"key mdi"},kv={class:"key mdi"},$v={key:5,class:"run"},xv={class:"lead"},Sv={class:"tx"},Cv={class:"nm"},Tv={key:0,class:"goto"},Ev={key:1,class:"big"},Av={key:0},Pv={key:1,class:"ctl"},Ov={key:1,class:"stp"},Iv={class:"mdi"},Lv={class:"mdi"},Mv={class:"key mdi"},Rv={class:"key mdi"},Nv={key:3,class:"stp"},Fv={class:"mdi"},Dv={class:"mdi"},Uv={class:"key mdi"},jv={class:"key mdi"},Hv={class:"key mdi"},Vv={class:"key mdi"},Wv={class:"key mdi"},Bv={class:"key mdi"},Kv={class:"key mdi"},qv={class:"key mdi"},zv={class:"key mdi"},Yv={class:"key mdi"},Gv={class:"key mdi"},Jv={class:"key mdi"},Xv={class:"key mdi"},Zv={class:"key mdi"},Qv={class:"key mdi"},eg={key:10,class:"run"},tg={class:"tx"},ng={class:"nm"},sg={key:0,class:"goto"},ig={key:0,class:"big"},og={key:0},lg=["title","aria-label"],ag=Me({__name:"TileCard",props:{tile:{},slot:{},placeholder:{type:Boolean}},setup(e){const t=e,n=$(()=>t.tile.name||Bs(t.tile.entity)),s=$(()=>au(t.tile)),i=$(()=>Do(t.tile)&&!s.value),l=$(()=>as(t.tile.entity)),r=$(()=>m.inventory.backgrounds?.[t.tile.options?.background||""]?.color),u=$(()=>t.tile.options?.background==="none"),f=$(()=>t.tile.options?.display||"standard"),h=$(()=>f.value!=="standard"?mu(f.value):""),p=$(()=>hu(t.tile,m.inventory)),b=$(()=>t.tile.entity.split(".")[0]),v=$(()=>m.inventory.icons?.controls||{}),y=de=>v.value[de]?Pe(v.value[de]):"",M=$(()=>Cl(t.tile)&&m.inspector?.kind==="tile"),E=$(()=>!t.placeholder&&m.layout?.tiles.includes(t.tile)),x=$(()=>c("editor.tile_card.label",{name:n.value,slot:t.slot%ze+1,page:Tt(t.slot)+1})),O=$(()=>new Date(m.now)),C=$(()=>(O.value.getHours()%12+O.value.getMinutes()/60)*30),F=$(()=>O.value.getMinutes()*6),T=$(()=>b.value==="screen"?null:$m(t.tile.entity)),V=$(()=>!T.value||["unavailable","unknown",""].includes(T.value.state)),L=$(()=>!!T.value&&!V.value&&T.value.state!=="off"&&T.value.state!=="closed"&&T.value.state!=="standby"&&T.value.state!=="idle"&&T.value.state!=="docked"),k=$(()=>["light","switch","input_boolean","fan"].includes(b.value)&&T.value?.state==="on"),A=$(()=>T.value?.a?.unit_of_measurement),z=de=>de.charAt(0).toUpperCase()+de.slice(1).replace(/_/g," "),P=de=>ou(de,qm.value),ge={climate:"climate",cover:"cover",media_player:"media",person:"person",sun:"sun",vacuum:"vacuum",weather:"weather"};function G(de){const X=Te=>qh(`screen.ha.${Te}`)?Fn(`screen.ha.${Te}`):"",K=de.state==="windy-variant"?"windy":de.state.replace(/-/g,"_");return b.value==="binary_sensor"&&["on","off"].includes(K)?X(`binary.${de.a?.device_class}_${K}`)||X(K):ge[b.value]?X(`${ge[b.value]}.${K}`)||(["on","off"].includes(K)?X(K):""):["on","off"].includes(K)?X(K):""}const ie=["scene","script","button","input_button"],be=$(()=>{const de=T.value;if(!de||ie.includes(b.value))return h.value;if(V.value)return Fn(de.state==="unknown"?"editor.mockup.unknown":"screen.ha.unavailable");const X=de.a||{},K=de.word||G(de)||z(de.state);return b.value==="climate"?`${X.current_temperature!==void 0?`${P(X.current_temperature)}° · `:""}${K}`:b.value==="weather"?`${K}${X.temperature!==void 0?` · ${P(X.temperature)}°`:""}`:b.value==="cover"&&X.current_position!==void 0&&X.current_position>0&&X.current_position<100?`${K} · ${X.current_position} %`:b.value==="media_player"&&X.media_title?`${K} · ${X.media_title}`:b.value==="sensor"?`${P(de.state)}${A.value?` ${A.value}`:""}`:K}),se=$(()=>T.value&&!V.value?P(T.value.state):"—"),ue=$(()=>{const de=T.value;if(!de||V.value)return 0;const X=de.a||{};if(b.value==="light")return de.state==="on"?X.brightness!==void 0?Math.round(X.brightness/255*100):100:0;if(b.value==="fan")return de.state==="on"?X.percentage??100:0;if(b.value==="cover")return 100-(X.current_position??(de.state==="open"?100:0));if(b.value==="media_player")return Math.round((X.volume_level??0)*100);if(b.value==="number"||b.value==="input_number"){const K=Number(de.state),Te=Number(X.min??0),we=Number(X.max??100);return Number.isFinite(K)&&we>Te?Math.round((K-Te)/(we-Te)*100):0}return 0}),ye=$(()=>Fn(`screen.ha.button.${{scene:"activate",script:"run"}[b.value]||"press"}`)),$e=$(()=>`${Fn("screen.tile.page",{n:l.value})} ›`),Ye=$(()=>({background:`linear-gradient(to right, ${ue.value?"#ffbf38":"#c9ccd1"} ${ue.value}%, ${ue.value?"#fff1d3":"#e6e8ec"} ${ue.value}%)`})),le=$(()=>({background:`linear-gradient(to right, #2196f3 ${ue.value}%, #d3e8fb ${ue.value}%)`})),ee=$(()=>{const de=T.value?.a?.temperature;return de!=null?`${P(de)}°`:"—"});async function ae(de){if(de.key==="Enter"||de.key===" "){de.preventDefault(),Vo(t.tile);return}const X={ArrowLeft:-1,ArrowRight:1,ArrowUp:-2,ArrowDown:2}[de.key];X&&(de.preventDefault(),qs(t.tile,t.tile.slot+(s.value?Math.sign(X)*ze:i.value?Math.sign(X)*2:X))&&(await Ri(),document.querySelector(`.pages [data-slot="${t.tile.slot}"]`)?.focus()))}return(de,X)=>Ae((g(),_("div",{class:me(["tile",{wide:i.value,full:s.value,bare:u.value,placeholder:e.placeholder||!E.value,chosen:M.value}]),"data-slot":e.slot,style:je(r.value&&!u.value?{backgroundColor:r.value}:void 0),tabindex:E.value?0:-1,role:E.value?"button":void 0,"aria-label":E.value?x.value:void 0,onClick:X[1]||(X[1]=K=>E.value&&a(Vo)(e.tile)),onKeydown:X[2]||(X[2]=K=>E.value&&ae(K))},[f.value==="analog"?(g(),_(B,{key:0},[(g(),_("svg",Gb,[X[3]||(X[3]=o("circle",{cx:"30",cy:"30",r:"27",fill:"#fff",stroke:"#c9ccd1"},null,-1)),(g(),_(B,null,he([0,90,180,270],K=>o("line",{key:K,x1:"30",y1:"5",x2:"30",y2:"9",stroke:"#1b1b1b","stroke-width":"1.5",transform:`rotate(${K} 30 30)`},null,8,Jb)),64)),o("line",{x1:"30",y1:"30",x2:"30",y2:"16",stroke:"#1b1b1b","stroke-width":"2.4","stroke-linecap":"round",transform:`rotate(${C.value} 30 30)`},null,8,Xb),o("line",{x1:"30",y1:"30",x2:"30",y2:"11",stroke:"#1b1b1b","stroke-width":"1.6","stroke-linecap":"round",transform:`rotate(${F.value} 30 30)`},null,8,Zb),X[4]||(X[4]=o("circle",{cx:"30",cy:"30",r:"1.8",fill:"#1b1b1b"},null,-1))])),i.value?(g(),_("span",Qb,[o("span",ev,[o("span",tv,d(n.value),1),o("span",nv,d(h.value),1)])])):H("",!0)],64)):f.value==="digital"&&b.value==="screen"?(g(),_(B,{key:1},[o("span",sv,d(a(Pe)(a(ms)(e.tile))),1),o("span",iv,[o("span",ov,d(a(Vi)(a(is),O.value)),1),o("span",lv,d(n.value),1)])],64)):s.value?(g(),_(B,{key:2},[o("span",{class:me(["ic mdi",{lit:k.value}])},d(a(Pe)(a(ms)(e.tile))),3),o("span",av,[o("span",rv,d(n.value),1),l.value?(g(),_("span",cv,d($e.value),1)):f.value==="watch"?(g(),_("span",uv,[Re(d(se.value),1),A.value&&!V.value?(g(),_("small",dv,d(A.value),1)):H("",!0)])):be.value?(g(),_("span",{key:2,class:me(["st",{off:V.value}])},d(be.value),3)):H("",!0)]),e.tile.options?.inline==="slider"?(g(),_("span",{key:0,class:"mini-slider",style:je(Ye.value)},null,4)):H("",!0),p.value?(g(),_("span",fv,[p.value==="toggle"?(g(),_("span",{key:0,class:me(["tog",{off:!L.value}])},null,2)):p.value==="setpoint"?(g(),_("span",pv,[o("span",hv,d(y("minus")||"−"),1),o("b",null,d(ee.value),1),o("span",mv,d(y("plus")||"+"),1)])):p.value==="volume"?(g(),_(B,{key:2},[o("span",{class:"range",style:je(le.value)},null,4),o("span",bv,d(y("volume-high")),1)],64)):p.value==="playback"?(g(),_(B,{key:3},[o("span",vv,d(y("skip-previous")),1),o("span",gv,d(y(L.value?"pause":"play")||y("play")),1),o("span",_v,d(y("skip-next")),1)],64)):p.value==="buttons"&&b.value==="cover"?(g(),_(B,{key:4},[o("span",yv,d(y("arrow-expand-horizontal")),1),o("span",wv,d(y("stop")),1),o("span",kv,d(y("arrow-collapse-horizontal")),1)],64)):p.value==="run"?(g(),_("span",$v,d(ye.value),1)):(g(),_("span",{key:6,class:"range",style:je({background:`linear-gradient(to right, #2196f3 ${ue.value}%, #d3e8fb ${ue.value}%)`})},null,4))])):H("",!0)],64)):i.value?(g(),_(B,{key:3},[o("span",xv,[o("span",{class:me(["ic mdi",{lit:k.value}])},d(a(Pe)(a(ms)(e.tile))),3),o("span",Sv,[o("span",Cv,d(n.value),1),l.value?(g(),_("span",Tv,d($e.value),1)):f.value==="watch"?(g(),_("span",Ev,[Re(d(se.value),1),A.value&&!V.value?(g(),_("small",Av,d(A.value),1)):H("",!0)])):be.value?(g(),_("span",{key:2,class:me(["st",{off:V.value}])},d(be.value),3)):H("",!0)])]),e.tile.options?.inline==="slider"?(g(),_("span",{key:0,class:"mini-slider",style:je(Ye.value)},null,4)):H("",!0),p.value?(g(),_("span",Pv,[p.value==="toggle"?(g(),_("span",{key:0,class:me(["tog",{off:!L.value}])},null,2)):p.value==="setpoint"?(g(),_("span",Ov,[o("span",Iv,d(y("minus")||"−"),1),o("b",null,d(ee.value),1),o("span",Lv,d(y("plus")||"+"),1)])):p.value==="stepper"&&b.value.endsWith("select")?(g(),_(B,{key:2},[o("span",Mv,d(y("chevron-left")),1),o("span",Rv,d(y("chevron-right")),1)],64)):p.value==="stepper"?(g(),_("span",Nv,[o("span",Fv,d(y("minus")||"−"),1),o("b",null,d(se.value),1),o("span",Dv,d(y("plus")||"+"),1)])):p.value==="mode"?(g(),_(B,{key:4},[o("span",Uv,d(y("power")),1),o("span",jv,d(y("fire")),1),o("span",Hv,d(y("snowflake")),1)],64)):p.value==="volume"?(g(),_(B,{key:5},[o("span",{class:"range",style:je(le.value)},null,4),o("span",Vv,d(y("volume-high")),1)],64)):p.value==="playback"?(g(),_(B,{key:6},[o("span",Wv,d(y("skip-previous")),1),o("span",Bv,d(y(L.value?"pause":"play")||y("play")),1),o("span",Kv,d(y("skip-next")),1)],64)):p.value==="buttons"&&b.value==="cover"?(g(),_(B,{key:7},[o("span",qv,d(y("arrow-expand-horizontal")),1),o("span",zv,d(y("stop")),1),o("span",Yv,d(y("arrow-collapse-horizontal")),1)],64)):p.value==="buttons"&&b.value==="vacuum"?(g(),_(B,{key:8},[o("span",Gv,d(y("play")),1),o("span",Jv,d(y("stop")),1),o("span",Xv,d(y("home-map-marker")),1)],64)):p.value==="buttons"&&b.value==="timer"?(g(),_(B,{key:9},[o("span",Zv,d(y("play")),1),o("span",Qv,d(y("close")),1)],64)):p.value==="run"?(g(),_("span",eg,d(ye.value),1)):(g(),_("span",{key:11,class:"range",style:je({background:`linear-gradient(to right, #2196f3 ${ue.value}%, #d3e8fb ${ue.value}%)`})},null,4))])):H("",!0)],64)):(g(),_(B,{key:4},[o("span",{class:me(["head",{top:f.value==="watch"}])},[o("span",{class:me(["ic mdi",{lit:k.value}])},d(a(Pe)(a(ms)(e.tile))),3),o("span",tg,[o("span",ng,d(n.value),1),l.value?(g(),_("span",sg,d($e.value),1)):f.value!=="watch"&&be.value?(g(),_("span",{key:1,class:me(["st",{off:V.value}])},d(be.value),3)):H("",!0)])],2),f.value==="watch"?(g(),_("span",ig,[Re(d(se.value),1),A.value&&!V.value?(g(),_("small",og,d(A.value),1)):H("",!0)])):H("",!0),e.tile.options?.inline==="slider"?(g(),_("span",{key:1,class:"mini-slider",style:je(Ye.value)},null,4)):H("",!0)],64)),E.value?(g(),_("button",{key:5,type:"button",class:"remove",title:a(c)("editor.tile_card.remove"),"aria-label":a(c)("editor.tile_card.remove_named",{name:n.value}),onClick:X[0]||(X[0]=At(K=>a($u)(e.tile),["stop"]))},"✕",8,lg)):H("",!0)],46,Yb)),[[a(Ou),{kind:"tile",tile:e.tile}]])}}),rg=["viewBox","aria-label"],cg=["y"],ug=["cx","cy","r","stroke","stroke-width"],dg=["x1","y1","x2","y2","stroke","stroke-width"],fg=["x","y","fill"],pg=["x","y"],Mu=Me({__name:"TopbarSvg",props:{items:{},nameText:{},single:{type:Boolean}},setup(e,{expose:t}){const n=e,s=$(()=>{m.fontsVersion,m.now,m.topbarPreviews;const x=n.items||un();return vu(x,yu.value,n.nameText??(m.layout?.title||Fn("editor.mockup.home")),hn)}),i=$(()=>s.value.metrics),l=$(()=>n.single?Math.round(i.value.text*1.4):i.value.top+Math.round(i.value.name*.45)),r=$(()=>n.single?Math.round(i.value.text*1.05):i.value.top),u=$(()=>{if(!n.single)return s.value.placed;const x=s.value.parts[0];return x&&(x.x=0),x?[x]:[]}),f=$(()=>n.single?`-2 0 ${Math.max(1,u.value[0]?.width||1)+4} ${l.value}`:`0 0 ${i.value.width} ${l.value}`),h=$(()=>r.value+(s.value.zero.top+s.value.zero.bottom)/2),p=$(()=>bm(s.value.nameText,s.value.fonts.name,Math.min(s.value.natural,s.value.nameRoom))),b=$(()=>new Date(m.now));function v(x){const O=b.value;return[[(O.getHours()%12+O.getMinutes()/60)*30,x*.24],[O.getMinutes()*6,x*.34]].map(([C,F])=>{const T=C*Math.PI/180;return{x2:F*Math.sin(T),y2:-F*Math.cos(T)}})}const y=x=>x.x-x.icon.ink.left,M=x=>(x.icon?x.x+(x.icon.ink.right-x.icon.ink.left)+s.value.gaps.icon:x.x)-x.text.ink.left,E=$(()=>`${(Math.max(1,u.value[0]?.width||1)+4)*(26/i.value.icon)}px`);return t({lay:s}),(x,O)=>(g(),_("svg",{viewBox:f.value,role:"img","aria-label":e.single?a(c)("editor.topbar.live.looks"):a(c)("editor.topbar.aria",{name:s.value.nameText}),style:je(e.single?{width:E.value}:void 0)},[e.single?H("",!0):(g(),_("text",{key:0,x:"0",y:i.value.top,fill:"#1b1b1b",style:je({font:s.value.fonts.name})},d(p.value),13,cg)),o("g",null,[(g(!0),_(B,null,he(u.value,C=>(g(),_(B,{key:C.index},[C.dial?(g(),_(B,{key:0},[o("circle",{cx:C.x+C.dial/2,cy:h.value,r:C.dial/2-Math.max(1,Math.round(C.dial/10))/2,fill:"none",stroke:C.view.color||"#46525e","stroke-width":Math.max(1,Math.round(C.dial/10))},null,8,ug),(g(!0),_(B,null,he(v(C.dial),(F,T)=>(g(),_("line",{key:T,x1:C.x+C.dial/2,y1:h.value,x2:C.x+C.dial/2+F.x2,y2:h.value+F.y2,stroke:C.view.color||"#46525e","stroke-width":Math.max(1,Math.round(C.dial*.075)),"stroke-linecap":"round"},null,8,dg))),128))],64)):(g(),_(B,{key:1},[C.icon?(g(),_("text",{key:0,x:y(C),y:h.value-(C.icon.ink.top+C.icon.ink.bottom)/2,fill:C.view.color||"#46525e",style:je({font:s.value.fonts.icon})},d(C.icon.glyph),13,fg)):H("",!0),C.text?(g(),_("text",{key:1,x:M(C),y:r.value,fill:"#46525e",style:je({font:s.value.fonts.text})},d(C.text.value),13,pg)):H("",!0)],64))],64))),128))])],12,rg))}}),hg={class:"page"},mg={class:"page-label"},bg=["title"],vg={key:1},gg=["title"],_g={class:"tiles"},yg=["data-slot","title","aria-label","onClick"],wg=Me({__name:"DevicePage",props:{page:{},entries:{},pages:{},moving:{}},setup(e){const t=e,n=$(()=>new Map(t.entries.map(h=>[h.slot,h]))),s=$(()=>new Set(t.entries.flatMap(h=>Hn(h.slot,ut(h.tile)).slice(1)))),i=$(()=>Array.from({length:ze},(h,p)=>t.page*ze+p).filter(h=>!s.value.has(h))),l=$(()=>t.pages>1&&!t.entries.some(h=>Tt(h.slot)===t.page)),r=$(()=>m.inspector?.kind==="bar"||m.inspector?.kind==="bar-add"),u=$(()=>t.entries.filter(h=>Tt(h.slot)===t.page).reduce((h,p)=>h+kl(ut(p.tile)),0));function f(h){const p=m.insertAt===h;m.insertAt=p?-1:h,m.insertAt>=0&&document.querySelector("#search")?.focus()}return(h,p)=>(g(),_("div",hg,[o("div",mg,[o("span",null,d(a(c)("editor.page.label",{page:e.page+1})),1),l.value?(g(),_("button",{key:0,type:"button",class:"btn mini",title:a(c)("editor.page.remove_title"),onClick:p[0]||(p[0]=b=>a(Cm)(e.page))},d(a(c)("editor.page.remove")),9,bg)):(g(),_("span",vg,d(u.value)+" / "+d(a(ze)),1))]),o("div",{class:me(["device",{cyd:!a(Sl)}])},[o("div",{class:me(["bar-wrap",{selected:r.value}]),title:a(c)("editor.page.edit_bar"),role:"button",tabindex:"0",onClick:p[1]||(p[1]=b=>a(Jt)(0)),onKeydown:p[2]||(p[2]=$c(At(b=>a(Jt)(0),["prevent"]),["enter"]))},[te(Mu)],42,gg),o("div",_g,[(g(!0),_(B,null,he(i.value,b=>(g(),_(B,{key:b},[n.value.get(b)?(g(),it(ag,{key:0,tile:n.value.get(b).tile,slot:b,placeholder:n.value.get(b).tile===e.moving},null,8,["tile","slot","placeholder"])):(g(),_("button",{key:1,type:"button",class:me(["cell",{"insert-here":a(m).insertAt===b}]),"data-slot":b,title:a(c)("editor.page.cell.title"),"aria-label":a(c)("editor.page.cell.aria",{slot:b%a(ze)+1,page:e.page+1}),onClick:v=>f(b)},[p[3]||(p[3]=o("span",null,"+",-1)),o("small",null,d(a(m).insertAt===b?a(c)("editor.page.cell.next"):a(c)("editor.page.cell.empty")),1)],10,yg))],64))),128))])],2)]))}}),kg={class:"library",id:"library"},$g={class:"lib-head"},xg={class:"lib-title"},Sg=["placeholder","aria-label"],Cg={class:"filters",id:"filters"},Tg=["aria-pressed","onClick"],Eg={class:"lib-row"},Ag=["aria-label"],Pg={value:""},Og=["value"],Ig=["aria-pressed","title"],Lg={class:"lib-list",id:"results","aria-live":"polite"},Mg=["title","disabled","onClick"],Rg={class:"tx"},Ng={key:0,class:"hint"},Fg={key:1,class:"hint"},Dg={class:"lib-foot"},Ug=Me({__name:"Library",setup(e){const t=["","light","climate","switch","binary_sensor","button","script","fan","cover","scene","vacuum","sensor","media_player","weather","number","select","person","timer","screen"],n={switch:"input_boolean",number:"input_number",select:"input_select",weather:"sun",button:"input_button"},s=$(()=>new Set(m.layout?.tiles.map(p=>p.entity)||[])),i=p=>s.value.has(p)&&!Wi(p),l=$(()=>[...new Set(m.inventory.entities.map(p=>p.area).filter(p=>!!p))].sort((p,b)=>p.localeCompare(b))),r=$(()=>{const p=m.search.toLocaleLowerCase(),b=m.filter,v=m.room;return[...m.inventory.builtin||[],...m.inventory.entities].filter(y=>y.tile!==!1&&(Sl.value||!["camera","image"].includes(y.id.split(".")[0]))&&(!b||y.id.startsWith(b+".")||n[b]===y.id.split(".")[0])&&(!v||y.area===v)&&(!m.hidePlaced||!i(y.id))&&`${y.name} ${y.id} ${y.device||""} ${y.area||""}`.toLocaleLowerCase().includes(p))}),u=$(()=>(m.layout?.tiles.length||0)>=Vn.value),f=$(()=>m.inventory.entities.length),h=p=>{const b=p.id.split(".")[0];return p.state==="unavailable"||p.state==="unknown"?"gone":["light","switch","input_boolean","fan"].includes(b)&&p.state==="on"?"on":""};return(p,b)=>(g(),_("aside",kg,[o("div",$g,[o("div",xg,[Re(d(a(c)("editor.library.title"))+" ",1),o("small",null,d(a(c)("editor.library.entities",f.value)),1)]),Ae(o("input",{id:"search","onUpdate:modelValue":b[0]||(b[0]=v=>a(m).search=v),type:"search",placeholder:a(c)("editor.library.search"),autocomplete:"off","aria-label":a(c)("editor.library.search_label")},null,8,Sg),[[Xe,a(m).search]]),o("div",Cg,[(g(),_(B,null,he(t,v=>o("button",{key:v,type:"button","aria-pressed":a(m).filter===v?"true":"false",onClick:y=>a(m).filter=v},[v?(g(),_("span",{key:0,class:"domain-icon",style:je({color:a(Ut)(v+".")[2],background:a(Ut)(v+".")[3]}),"aria-hidden":"true"},d(a(Ut)(v+".")[1]),5)):H("",!0),Re(d(a(c)(`editor.library.filters.${v||"all"}`)),1)],8,Tg)),64))]),o("div",Eg,[Ae(o("select",{id:"room","onUpdate:modelValue":b[1]||(b[1]=v=>a(m).room=v),"aria-label":a(c)("editor.library.room")},[o("option",Pg,d(a(c)("editor.library.all_rooms")),1),(g(!0),_(B,null,he(l.value,v=>(g(),_("option",{key:v,value:v},d(v),9,Og))),128))],8,Ag),[[jn,a(m).room]]),o("button",{type:"button",class:"chip-toggle",id:"hide-placed","aria-pressed":a(m).hidePlaced?"true":"false",title:a(c)("editor.library.hide_placed_title"),onClick:b[2]||(b[2]=v=>a(m).hidePlaced=!a(m).hidePlaced)},d(a(c)("editor.library.hide_placed")),9,Ig)])]),o("div",Lg,[(g(!0),_(B,null,he(r.value.slice(0,80),v=>Ae((g(),_("button",{key:v.id,type:"button",class:"ent",title:v.id,disabled:i(v.id)||u.value,onClick:y=>a(ku)(v.id)},[o("span",{class:me(["av mdi",h(v)]),style:je({color:a(Ut)(v.id)[2],background:a(Ut)(v.id)[3]})},d(a(m).inventory.icons?a(Pe)(a(xn)(v.id)):a(Ut)(v.id)[1]),7),o("span",Rg,[o("b",null,d(v.name),1),o("small",null,d([a(Ut)(v.id)[0],v.area,v.device].filter(Boolean).join(" · ")),1)]),o("span",{class:me(["add",{done:i(v.id)}])},d(i(v.id)?"✓":"+"),3)],8,Mg)),[[a(Ou),{kind:"entity",id:v.id}]])),128)),r.value.length?r.value.length>80?(g(),_("p",Fg,d(a(c)("editor.common.results",r.value.length)),1)):H("",!0):(g(),_("p",Ng,d(a(m).hidePlaced&&!a(m).search&&!a(m).filter&&!a(m).room?a(c)("editor.library.all_placed"):a(c)("editor.library.none_found")),1))]),o("div",Dg,d(u.value?a(c)(a(Vn)<48?"editor.library.full_update":"editor.library.full",a(Vn)):a(c)("editor.library.hint")),1)]))}}),jg={class:"canvas-head"},Hg={id:"count"},Vg={key:0,id:"no-tiles"},Wg={key:1},Bg={key:2,id:"positions-hint",class:"warn"},Kg={key:3,id:"page-reach-hint",class:"warn"},qg=["aria-label"],zg={class:"page-label"},Yg=["tabindex"],Gg=Me({__name:"LayoutView",setup(e){const t=$(()=>m.layout),n=$(()=>m.drag.preview||Ze(t.value)),s=$(()=>Pt(n.value,t.value.pages)),i=$(()=>Em()),l=$(()=>s.value<rn),r=$(()=>em(t.value.tiles)&&!yn(0,2,26)?c("editor.layout.positions_hint",{firmware:_t.value?.firmware||c("editor.common.unknown")}):""),u=$(()=>Tu(n.value,s.value));function f(h){h.target.closest(".device, .page-label, .canvas-head")||m.inspector&&Qe()}return(h,p)=>(g(),_(B,null,[o("div",{class:"canvas",id:"canvas",onClick:f},[o("div",jg,[o("b",Hg,d(a(c)("editor.layout.count",{tiles:t.value.tiles.length,limit:a(Vn)},s.value)),1),t.value.tiles.length?(g(),_("span",Wg,d(a(c)("editor.layout.how_to")),1)):(g(),_("span",Vg,d(a(c)("editor.layout.no_tiles")),1)),r.value?(g(),_("span",Bg,d(r.value),1)):H("",!0),u.value?(g(),_("span",Kg,d(u.value),1)):H("",!0)]),o("div",{class:"pages",id:"layout-preview","aria-label":a(c)("editor.layout.aria")},[(g(!0),_(B,null,he(i.value,b=>(g(),it(wg,{key:b,page:b-1,entries:n.value,pages:s.value,moving:a(m).drag.moving},null,8,["page","entries","pages","moving"]))),128)),o("div",{class:me(["page ghost",{disabled:!l.value}])},[o("div",zg,[o("span",null,d(a(c)("editor.page.label",{page:i.value+1})),1)]),o("div",{class:me(["device",{cyd:a(_t)?.board!=="guition"}]),id:"add-page",role:"button",tabindex:l.value?0:-1,onClick:p[0]||(p[0]=b=>l.value&&a(Qa)()),onKeydown:p[1]||(p[1]=$c(At(b=>l.value&&a(Qa)(),["prevent"]),["enter"]))},d(l.value?a(c)("editor.layout.add_page"):a(c)("editor.layout.max_pages",a(rn))),43,Yg)],2)],8,qg)]),te(Ug)],64))}}),Jg={class:"status",id:"settings-status",role:"status"},Xg={key:0,class:"set-grid",id:"settings-groups"},Zg={class:"mdi"},Qg=["data-setting","title","onClick"],e_=["id"],t_={class:"s-control"},n_=["id","aria-checked","aria-labelledby","disabled","onClick"],s_=["aria-labelledby"],i_=["aria-pressed","disabled","onClick"],o_={key:2,class:"step"},l_=["aria-label","disabled","onPointerdown","onClick"],a_={class:"mdi"},r_=["id","aria-labelledby"],c_=["aria-label","disabled","onPointerdown","onClick"],u_={class:"mdi"},d_={key:0,class:"hint warn",id:"settings-page-reach"},f_=Me({__name:"SettingsTab",setup(e){const t=$(()=>Tl()),n=$(()=>$i()),s=$(()=>t.value?.owner==="screen"&&!_t.value?.online),i=$(()=>Fm.map(E=>({...E,rows:E.rows.filter(x=>t.value?.keys.includes(x.key))})).filter(E=>E.rows.length)),l=$(()=>Tu()),r=E=>s.value||!!t.value?.unavailable.includes(E.key),u=E=>E.needs?!!n.value[E.needs]:!0,f=$(()=>s.value?c("editor.screen_settings.status.offline"):m.settingPending?c("editor.common.saving"):t.value?.owner==="screen"?c("editor.screen_settings.status.screen"):c("editor.screen_settings.status.app")),h=(E,x)=>{const O=n.value[E.key];return r(E)||!u(E)||O===null||O===void 0?!0:E.kind!=="moment"&&sr(E,O,x,!1,n.value)===O},p=new WeakMap;function b(E,x,O){const C=$i(),F=sr(E,C[E.key],x,O,C);F!==C[E.key]&&ti(E.key,F,600)}function v(E,x,O){const C=E.currentTarget;if(C.disabled||E.button!==0)return;const F={timer:0,held:!1};p.set(C,F);let T=0;F.timer=window.setTimeout(function V(){F.held=!0,T+=1,b(x,O,T>5),F.timer=window.setTimeout(V,180)},450)}function y(E){const x=p.get(E.currentTarget);x&&clearTimeout(x.timer)}function M(E,x,O){const C=p.get(E.currentTarget);if(C?.held){C.held=!1;return}b(x,O,!1)}return(E,x)=>(g(),_("div",{class:me(["settings",{offline:s.value}]),id:"general-settings"},[o("span",Jg,d(f.value),1),t.value?(g(),_("div",Xg,[(g(!0),_(B,null,he(i.value,O=>(g(),_("section",{key:O.group,class:"set-card"},[o("h4",null,[o("span",Zg,d(a(Pe)(O.icon)),1),Re(d(a(c)(`editor.screen_settings.groups.${O.group}`)),1)]),(g(!0),_(B,null,he(O.rows,C=>(g(),_("div",{key:C.key,class:me(["srow",[`setting-${C.kind}`,{inactive:!u(C)||r(C)}]]),"data-setting":C.key,title:r(C)&&!s.value?a(c)("editor.screen_settings.unavailable"):"",onClick:F=>C.kind==="toggle"&&F.target.closest(".srow")===F.currentTarget&&!F.target.closest("button")&&!r(C)&&a(ti)(C.key,!n.value[C.key],150)},[o("span",{class:"s-label",id:`setting-label-${C.key}`},d(a(vo)(C)),9,e_),o("div",t_,[C.kind==="toggle"?(g(),_("button",{key:0,type:"button",class:me(["switch",{unknown:n.value[C.key]===null||n.value[C.key]===void 0}]),role:"switch",id:`setting-${C.key}`,"aria-checked":n.value[C.key]?"true":"false","aria-labelledby":`setting-label-${C.key}`,disabled:r(C),onClick:At(F=>a(ti)(C.key,!n.value[C.key],150),["stop"])},null,10,n_)):C.kind==="choice"?(g(),_("div",{key:1,class:"seg",role:"group","aria-labelledby":`setting-label-${C.key}`},[(g(!0),_(B,null,he(C.options,F=>(g(),_("button",{key:String(F),type:"button","aria-pressed":n.value[C.key]===F?"true":"false",disabled:r(C),onClick:T=>a(ti)(C.key,F,150)},d(a(Dm)(C,F)),9,i_))),128))],8,s_)):(g(),_("div",o_,[o("button",{type:"button","aria-label":a(c)("editor.screen_settings.lower",{name:a(vo)(C)}),disabled:h(C,-1),onPointerdown:F=>v(F,C,-1),onPointerup:y,onPointercancel:y,onPointerleave:y,onClick:F=>M(F,C,-1)},[o("span",a_,d(a(Pe)("F0374")),1)],40,l_),o("output",{id:`setting-${C.key}`,"aria-labelledby":`setting-label-${C.key}`},d(a(Vm)(C,n.value)),9,r_),o("button",{type:"button","aria-label":a(c)("editor.screen_settings.higher",{name:a(vo)(C)}),disabled:h(C,1),onPointerdown:F=>v(F,C,1),onPointerup:y,onPointercancel:y,onPointerleave:y,onClick:F=>M(F,C,1)},[o("span",u_,d(a(Pe)("F0415")),1)],40,c_)]))])],10,Qg))),128)),l.value&&O.rows.some(C=>C.key==="page_buttons")?(g(),_("p",d_,d(l.value),1)):H("",!0)]))),128))])):H("",!0)],2))}}),p_={class:"seg wrap",role:"group"},h_=["disabled","aria-pressed","onClick"],wt=Me({__name:"Segmented",props:{choices:{},value:{},disabled:{type:Boolean}},emits:["pick"],setup(e,{emit:t}){const n=t;return(s,i)=>(g(),_("div",p_,[(g(!0),_(B,null,he(e.choices,([l,r])=>(g(),_("button",{key:String(l),type:"button",disabled:e.disabled,"aria-pressed":String(l)===String(e.value)?"true":"false",onClick:u=>n("pick",l)},d(r),9,h_))),128))]))}}),m_={class:"f"},b_={class:"f-label"},v_={key:0},g_={key:1,class:"warn"},__=["aria-expanded"],y_={class:"tx"},w_={key:0,class:"mono"},k_={class:"link"},$_={key:0,class:"picker"},x_=["placeholder","aria-label"],S_={class:"action-list"},C_=["aria-pressed","onClick"],T_={key:0,class:"hint"},E_={key:1,class:"warn"},A_={class:"f-label"},P_=["aria-label","value","onChange"],O_={value:""},I_=["value"],L_={key:3,class:"action-number"},M_=["aria-label","value","onInput"],R_=["onClick"],N_={key:4,class:"action-number"},F_=["aria-label","min","max","step","value","placeholder","onInput"],D_={key:0},U_=["aria-label","value","placeholder","onInput"],j_={key:6},H_={key:0,class:"warn"},V_={key:3},W_=Me({__name:"ActionPicker",props:{tile:{}},setup(e){const t=e,n=$(()=>m.entityActions[t.tile.entity]),s=$(()=>t.tile.options?.action),i=$(()=>n.value?.find(T=>T.action===s.value?.action)),l=$(()=>m.actionPickerOpen||!s.value),r=$(()=>{const T=m.actionSearch.trim().toLocaleLowerCase();return(n.value||[]).filter(V=>`${V.name} ${V.action} ${V.description}`.toLocaleLowerCase().includes(T))});n.value===void 0&&km(t.tile.entity);function u(T){const V=T.action===s.value?.action;t.tile.options={...t.tile.options,action:V?s.value:{action:T.action}},m.actionPickerOpen=!1,pt()}function f(T,V){const L={...t.tile.options?.action?.data||{}};V===void 0?delete L[T]:L[T]=V,t.tile.options={...t.tile.options,action:{action:s.value.action,...Object.keys(L).length?{data:L}:{}}},pt()}const h=$(()=>{if(!i.value)return[];const T=t.tile.options?.action?.data||{};return i.value.fields.filter(V=>V.required&&T[V.key]===void 0).map(V=>V.name)}),p=T=>Object.keys(T.selector||{})[0]||"text",b=T=>(T.selector||{})[p(T)]||{},v=T=>T.example===void 0?"":typeof T.example=="string"?T.example:JSON.stringify(T.example);function y(T){const V=b(T),L=p(T);return Array.isArray(T.options)?T.options.map(k=>[k,k]):L==="select"&&Array.isArray(V.options)&&!V.multiple?V.options.map(k=>k&&typeof k=="object"?[String(k.value),String(k.label??k.value)]:[String(k),String(k)]):null}const M=T=>"#"+T.map(V=>Math.max(0,Math.min(255,Number(V)||0)).toString(16).padStart(2,"0")).join(""),E=T=>Array.isArray(T)&&T.length===3?M(T):"#ffffff",x=T=>T===void 0?"":typeof T=="string"?T:JSON.stringify(T);function O(T,V){const L=V.trim();if(!L)return f(T.key,void 0);if(p(T)==="text")return f(T.key,V);try{f(T.key,JSON.parse(L))}catch{f(T.key,V)}}function C(T,V){f(T.key,V===""||!Number.isFinite(Number(V))?void 0:Number(V))}const F=T=>b(T).unit_of_measurement||p(T)==="color_temp"&&b(T).unit||"";return(T,V)=>(g(),_("div",m_,[o("span",b_,d(a(c)("editor.action.label")),1),n.value===void 0?(g(),_("small",v_,d(a(c)("editor.action.asking")),1)):n.value===null?(g(),_("small",g_,d(a(c)("editor.action.not_answering")),1)):(g(),_(B,{key:2},[o("button",{type:"button",class:"row","aria-expanded":l.value?"true":"false",onClick:V[0]||(V[0]=L=>a(m).actionPickerOpen=!l.value)},[o("span",y_,[o("b",null,d(i.value?i.value.name:s.value?s.value.action:a(c)("editor.action.choose")),1),s.value?(g(),_("small",w_,d(s.value.action),1)):H("",!0)]),o("span",k_,d(l.value?a(c)("editor.common.close"):a(c)("editor.common.change")),1)],8,__),l.value?(g(),_("div",$_,[Ae(o("input",{"onUpdate:modelValue":V[1]||(V[1]=L=>a(m).actionSearch=L),type:"search",placeholder:a(c)("editor.action.search"),"aria-label":a(c)("editor.action.search_label")},null,8,x_),[[Xe,a(m).actionSearch]]),o("div",S_,[(g(!0),_(B,null,he(r.value,L=>(g(),_("button",{key:L.action,type:"button",class:"action-choice","aria-pressed":L.action===s.value?.action?"true":"false",onClick:k=>u(L)},[o("strong",null,d(L.name),1),o("small",null,d(L.description?`${L.action} · ${L.description}`:L.action),1)],8,C_))),128)),r.value.length?H("",!0):(g(),_("p",T_,d(a(c)("editor.action.none_found")),1))])])):H("",!0),s.value&&!i.value?(g(),_("small",E_,d(a(c)("editor.action.gone")),1)):H("",!0),i.value&&!l.value?(g(),_(B,{key:2},[(g(!0),_(B,null,he(i.value.fields,L=>(g(),_("div",{key:L.key,class:"f"},[o("span",A_,d(L.required?L.name:a(c)("editor.action.optional",{name:L.name})),1),p(L)==="boolean"?(g(),it(wt,{key:0,choices:[["",a(c)("editor.action.not_set")],["true",a(c)("editor.action.on")],["false",a(c)("editor.action.off")]],value:s.value?.data?.[L.key]===void 0?"":String(s.value?.data?.[L.key]),onPick:k=>f(L.key,k===""?void 0:k==="true")},null,8,["choices","value","onPick"])):y(L)&&y(L).length<=4?(g(),it(wt,{key:1,choices:[["",a(c)("editor.action.not_set")],...y(L)],value:s.value?.data?.[L.key]===void 0?"":String(s.value?.data?.[L.key]),onPick:k=>f(L.key,k===""?void 0:k)},null,8,["choices","value","onPick"])):y(L)?(g(),_("select",{key:2,"aria-label":L.name,value:String(s.value?.data?.[L.key]??""),onChange:k=>f(L.key,k.target.value===""?void 0:k.target.value)},[o("option",O_,d(a(c)("editor.action.not_set")),1),(g(!0),_(B,null,he(y(L),([k,A])=>(g(),_("option",{key:k,value:k},d(A),9,I_))),128))],40,P_)):p(L)==="color_rgb"?(g(),_("div",L_,[o("input",{type:"color","aria-label":L.name,value:E(s.value?.data?.[L.key]),onInput:k=>f(L.key,[1,3,5].map(A=>parseInt(k.target.value.slice(A,A+2),16)))},null,40,M_),o("button",{type:"button",class:"btn quiet mini",onClick:k=>f(L.key,void 0)},d(a(c)("editor.action.not_set")),9,R_)])):p(L)==="number"||p(L)==="color_temp"?(g(),_("div",N_,[o("input",{type:"number","aria-label":L.name,min:b(L).min,max:b(L).max,step:b(L).step==="any"?"any":b(L).step,value:s.value?.data?.[L.key]??"",placeholder:v(L),onInput:k=>C(L,k.target.value)},null,40,F_),F(L)?(g(),_("span",D_,d(F(L)),1)):H("",!0)])):(g(),_("input",{key:5,type:"text","aria-label":L.name,value:x(s.value?.data?.[L.key]),placeholder:v(L),onInput:k=>O(L,k.target.value)},null,40,U_)),L.description?(g(),_("small",j_,d(L.description),1)):H("",!0)]))),128)),h.value.length?(g(),_("small",H_,d(a(c)("editor.action.needs",{fields:h.value.join(", ")})),1)):H("",!0)],64)):H("",!0),a(yn)(0,2,58)?H("",!0):(g(),_("small",V_,d(a(c)("editor.action.needs_firmware")),1))],64))]))}}),B_={class:"f"},K_={class:"f-label"},q_=["aria-expanded"],z_={class:"av mdi"},Y_={class:"tx"},G_={class:"link"},J_={key:0,class:"picker"},X_=["placeholder","aria-label"],Z_=["aria-pressed","title"],Q_={class:"mdi"},ey=["aria-pressed","title"],ty={class:"icon-list"},ny={class:"icon-grid"},sy=["title","aria-label","aria-pressed","onClick"],iy={class:"mdi"},oy={key:0,class:"hint"},ly={key:1},Ru=Me({__name:"IconPicker",props:{selected:{},automatic:{},autoLabel:{},allowNone:{type:Boolean},note:{}},emits:["pick"],setup(e,{emit:t}){const n=e,s=t,i=ke(""),l=$(()=>Ks(n.selected)),r=$(()=>n.selected==="none"?"":Pe(l.value?.cp||n.automatic)),u=$(()=>n.selected==="none"?c("editor.icon.none"):l.value?.label||n.autoLabel),f=$(()=>{const h=i.value.trim().toLocaleLowerCase();return(m.inventory.icons?.groups||[]).map(p=>({label:p.label,icons:p.icons.filter(b=>!h||`${b.label} ${b.name.replaceAll("-"," ")} ${p.label}`.toLocaleLowerCase().includes(h))})).filter(p=>p.icons.length)});return(h,p)=>(g(),_("div",B_,[o("span",K_,d(a(c)("editor.icon.label")),1),o("button",{type:"button",class:"row","aria-expanded":a(m).iconPickerOpen?"true":"false",onClick:p[0]||(p[0]=b=>a(m).iconPickerOpen=!a(m).iconPickerOpen)},[o("span",z_,d(r.value),1),o("span",Y_,[o("b",null,d(u.value),1)]),o("span",G_,d(a(m).iconPickerOpen?a(c)("editor.common.close"):a(c)("editor.common.change")),1)],8,q_),a(m).iconPickerOpen?(g(),_("div",J_,[Ae(o("input",{"onUpdate:modelValue":p[1]||(p[1]=b=>i.value=b),type:"search",placeholder:a(c)("editor.icon.search"),"aria-label":a(c)("editor.icon.search_label")},null,8,X_),[[Xe,i.value]]),o("button",{type:"button",class:"icon-choice icon-auto","aria-pressed":e.selected==="auto"?"true":"false",title:e.autoLabel,onClick:p[2]||(p[2]=b=>s("pick","auto"))},[o("span",Q_,d(a(Pe)(e.automatic)),1),o("span",null,d(e.autoLabel),1)],8,Z_),e.allowNone?(g(),_("button",{key:0,type:"button",class:"icon-choice icon-auto","aria-pressed":e.selected==="none"?"true":"false",title:a(c)("editor.icon.none"),onClick:p[3]||(p[3]=b=>s("pick","none"))},[p[4]||(p[4]=o("span",{class:"mdi"},null,-1)),o("span",null,d(a(c)("editor.icon.none_text_only")),1)],8,ey)):H("",!0),o("div",ty,[(g(!0),_(B,null,he(f.value,b=>(g(),_("section",{key:b.label},[o("small",null,d(b.label),1),o("div",ny,[(g(!0),_(B,null,he(b.icons,v=>(g(),_("button",{key:v.name,type:"button",class:"icon-choice",title:v.label,"aria-label":a(c)("editor.icon.aria",{name:v.label}),"aria-pressed":e.selected===v.name?"true":"false",onClick:y=>s("pick",v.name)},[o("span",iy,d(a(Pe)(v.cp)),1)],8,sy))),128))])]))),128)),f.value.length?H("",!0):(g(),_("p",oy,d(a(c)("editor.icon.none_found")),1))])])):H("",!0),e.note?(g(),_("small",ly,d(e.note),1)):H("",!0)]))}}),ay={class:"dr-head"},ry={class:"tx"},cy={class:"mono"},uy=["aria-label"],dy={class:"dr-body"},fy={class:"f"},py={class:"f-label",for:"tile-name"},hy=["value","placeholder"],my={key:1,class:"f"},by={class:"f-label"},vy={key:2,class:"f"},gy={class:"f-label"},_y={key:0,class:"warn"},yy={class:"f"},wy={class:"f-label"},ky={key:0},$y={key:3,class:"f"},xy={class:"f-label"},Sy={key:4,class:"f"},Cy={class:"f-label"},Ty={key:5,class:"f"},Ey={class:"f-label"},Ay={key:7,class:"f"},Py={class:"f-label"},Oy={key:0,class:"warn"},Iy={key:8,class:"f"},Ly={class:"f-label"},My={class:"f"},Ry={class:"f-label"},Ny={class:"sw"},Fy=["aria-label","aria-pressed","onClick"],Dy={class:"dr-foot"},Uy=Me({__name:"TileInspector",props:{tile:{}},setup(e){const t=e,n=$(()=>t.tile.entity.split(".")[0]),s=$(()=>Bs(t.tile.entity)),i=$(()=>as(t.tile.entity)),l=$(()=>m.layout?Pt(Ze(m.layout),m.layout.pages):1),r=$(()=>Tt(t.tile.slot)+1),u=le=>!m.layout?.tiles.some(ee=>Tt(ee.slot)===le-1),f=$(()=>{const le=Array.from({length:Math.min(rn,l.value+1)},(ee,ae)=>ae+1);return i.value>le.length&&le.push(i.value),le.map(ee=>[ee,u(ee)?c("editor.tile.goes_to.empty",{page:ee}):String(ee)])}),h=$(()=>Xa.value?i.value>l.value?{text:c("editor.tile.goes_to.no_page",{page:i.value}),warn:!0}:{text:c("editor.tile.goes_to.hint"),warn:!1}:{text:c("editor.tile.goes_to.needs_firmware"),warn:!1}),p=$(()=>!m.layout?.tiles.some(le=>xe(le)!==xe(t.tile)&&Tt(le.slot)===r.value-1)),b=$(()=>{const le=Array.from({length:l.value},(ee,ae)=>[ae+1,String(ae+1)]);return l.value<rn&&!(p.value&&r.value===l.value)&&le.push([l.value+1,c("editor.tile.page.new")]),le}),v=$(()=>(i.value?["single","wide"]:["single","wide","full"]).map(le=>[le,c(`editor.tile.size.${le}`)])),y=$(()=>i.value?"":Xa.value?c("editor.tile.size.full_hint"):c("editor.tile.size.needs_firmware")),M=$(()=>m.capabilities[t.tile.entity]),E=(le,ee)=>t.tile.options?.[le]??ee,x=$(()=>E("display",n.value==="screen"?"digital":"standard")),O=$(()=>{const le=n.value==="screen"?["digital","analog"]:["standard","watch"],ee=M.value;return n.value==="weather"&&(!ee||ee.displays.includes("forecast")||x.value==="forecast")&&le.push("forecast"),n.value==="sensor"&&(!ee||ee.displays.includes("graph")||x.value==="graph")&&le.push("graph"),n.value==="sun"&&le.push("sunpath"),le.map(ae=>[ae,c(`editor.tile.display.${ae}`)])}),C=$(()=>{const le=M.value;return le&&x.value==="graph"&&!le.displays.includes("graph")?c("editor.tile.display.no_graph"):le&&x.value==="forecast"&&!le.displays.includes("forecast")?c("editor.tile.display.no_forecast"):""}),F=$(()=>E("size","single")),T=$(()=>m.inventory.controls?.[n.value]),V=$(()=>E("controls",F.value==="full"?"none":T.value?.default)),L=$(()=>{const le=M.value;return(T.value?.choices||[]).filter(ee=>!le||ee.key==="none"||ee.key===V.value||le.controls.includes(ee.key)).map(ee=>[ee.key,ee.label])}),k=$(()=>{const le=M.value;return le&&V.value!=="none"&&!le.controls.includes(V.value)?{text:c("editor.tile.controls.not_offered"),warn:!0}:{text:yn(0,2,19)?c(F.value==="full"?"editor.tile.controls.full_hint":"editor.tile.controls.wide_hint"):c("editor.tile.controls.needs_firmware"),warn:!1}}),A=$(()=>E("tap","auto")),z=$(()=>{const le=["auto","detail","none"];return((M.value?M.value.toggle:Ja.includes(n.value))||A.value==="toggle")&&le.push("toggle"),le.push("action"),le.map(ee=>[ee,c(`editor.tile.tap.${ee}`)])}),P=$(()=>A.value==="toggle"&&M.value&&!M.value.toggle?{text:c("editor.tile.tap.no_toggle"),warn:!0}:A.value==="toggle"&&!Ja.includes(n.value)&&!yn(0,2,58)?{text:c("editor.tile.tap.toggle_needs_firmware"),warn:!1}:A.value==="toggle"?{text:c("editor.tile.tap.hold"),warn:!1}:null),ge=$(()=>E("inline","none")),G=$(()=>cm.includes(n.value)&&(!M.value||M.value.inline||ge.value==="slider")),ie=$(()=>ge.value==="slider"&&M.value&&!M.value.inline),be=$(()=>E("history_hours",24)),se=$(()=>Object.entries(m.inventory.backgrounds||{})),ue=$(()=>!!m.inventory.entities.find(le=>le.id===t.tile.entity)?.icon),ye=$(()=>!!m.inventory.icons&&(n.value!=="screen"||i.value>0)&&!["forecast","sunpath"].includes(x.value));function $e(le){t.tile.name=le,pt()}function Ye(){m.inspector={kind:"inspect",entity:t.tile.entity}}return(le,ee)=>(g(),_(B,null,[o("div",ay,[o("span",{class:"av mdi",style:je({color:a(Ut)(e.tile.entity)[2],background:a(Ut)(e.tile.entity)[3]})},d(a(Pe)(a(ms)(e.tile))),5),o("span",ry,[o("b",null,d(e.tile.name||s.value),1),o("small",cy,d(e.tile.entity),1)]),o("button",{type:"button",class:"icon-btn","aria-label":a(c)("editor.common.close"),onClick:ee[0]||(ee[0]=(...ae)=>a(Qe)&&a(Qe)(...ae))},"✕",8,uy)]),o("div",dy,[o("div",fy,[o("label",py,d(a(c)("editor.tile.name")),1),o("input",{id:"tile-name",value:e.tile.name,placeholder:s.value,maxlength:"60",onInput:ee[1]||(ee[1]=ae=>$e(ae.target.value))},null,40,hy)]),ye.value?(g(),it(Ru,{key:0,selected:e.tile.options?.icon||"auto",automatic:a(xn)(e.tile.entity),"auto-label":a(c)(ue.value?"editor.tile.icon.auto_ha":"editor.tile.icon.auto_default"),note:a(yn)(0,2,18)?"":a(c)("editor.tile.icon.needs_firmware"),onPick:ee[2]||(ee[2]=ae=>a(pn)(e.tile,"icon",ae))},null,8,["selected","automatic","auto-label","note"])):H("",!0),i.value?(g(),_("div",my,[o("span",by,d(a(c)("editor.tile.goes_to.label")),1),te(wt,{choices:f.value,value:i.value,onPick:ee[3]||(ee[3]=ae=>a(Am)(e.tile,Number(ae)))},null,8,["choices","value"]),o("small",{class:me({warn:h.value.warn})},d(h.value.text),3)])):(g(),_("div",vy,[o("span",gy,d(a(c)("editor.tile.display.label")),1),te(wt,{choices:O.value,value:x.value,onPick:ee[4]||(ee[4]=ae=>a(pn)(e.tile,"display",ae))},null,8,["choices","value"]),C.value?(g(),_("small",_y,d(C.value),1)):H("",!0)])),o("div",yy,[o("span",wy,d(a(c)("editor.tile.size.label")),1),te(wt,{choices:v.value,value:F.value,onPick:ee[5]||(ee[5]=ae=>a(pn)(e.tile,"size",ae))},null,8,["choices","value"]),y.value?(g(),_("small",ky,d(y.value),1)):H("",!0)]),b.value.length>1?(g(),_("div",$y,[o("span",xy,d(a(c)("editor.tile.page.label")),1),te(wt,{choices:b.value,value:r.value,onPick:ee[6]||(ee[6]=ae=>a(Tm)(e.tile,Number(ae)-1))},null,8,["choices","value"])])):H("",!0),T.value&&F.value!=="single"&&!i.value?(g(),_("div",Sy,[o("span",Cy,d(a(c)("editor.tile.controls.label")),1),te(wt,{choices:L.value,value:V.value,onPick:ee[7]||(ee[7]=ae=>a(pn)(e.tile,"controls",ae))},null,8,["choices","value"]),o("small",{class:me({warn:k.value.warn})},d(k.value.text),3)])):H("",!0),n.value!=="screen"&&!i.value?(g(),_("div",Ty,[o("span",Ey,d(a(c)("editor.tile.tap.label")),1),te(wt,{choices:z.value,value:A.value,onPick:ee[8]||(ee[8]=ae=>a(pn)(e.tile,"tap",ae))},null,8,["choices","value"]),P.value?(g(),_("small",{key:0,class:me({warn:P.value.warn})},d(P.value.text),3)):H("",!0)])):H("",!0),n.value!=="screen"&&!i.value&&A.value==="action"?(g(),it(W_,{key:6,tile:e.tile},null,8,["tile"])):H("",!0),G.value&&!i.value?(g(),_("div",Ay,[o("span",Py,d(a(c)("editor.tile.slider.label")),1),te(wt,{choices:[["none",a(c)("editor.tile.slider.no")],["slider",a(c)("editor.tile.slider.yes")]],value:ge.value,onPick:ee[9]||(ee[9]=ae=>a(pn)(e.tile,"inline",ae))},null,8,["choices","value"]),ie.value?(g(),_("small",Oy,d(a(c)("editor.tile.slider.nothing")),1)):H("",!0)])):H("",!0),n.value==="sensor"&&!i.value?(g(),_("div",Iy,[o("span",Ly,d(a(c)("editor.tile.history.label")),1),te(wt,{choices:[1,6,24].map(ae=>[ae,a(c)("editor.tile.history.hours",ae)]),value:be.value,onPick:ee[10]||(ee[10]=ae=>a(pn)(e.tile,"history_hours",Number(ae)))},null,8,["choices","value"])])):H("",!0),o("div",My,[o("span",Ry,d(a(c)("editor.tile.background.label")),1),o("div",Ny,[(g(!0),_(B,null,he(se.value,([ae,de])=>(g(),_("button",{key:ae,type:"button","aria-label":a(c)("editor.tile.background.aria",{name:de.label}),"aria-pressed":(e.tile.options?.background||"auto")===ae?"true":"false",onClick:X=>a(pn)(e.tile,"background",ae)},[o("i",{class:me(de.color?"":ae==="none"?"none":"auto"),style:je(de.color?{background:de.color}:void 0)},null,6),Re(d(de.label),1)],8,Fy))),128))])])]),o("div",Dy,[o("button",{type:"button",class:"btn danger",onClick:ee[11]||(ee[11]=ae=>a($u)(e.tile))},d(a(c)("editor.common.remove")),1),ee[12]||(ee[12]=o("span",{class:"spacer"},null,-1)),n.value!=="screen"?(g(),_("button",{key:0,type:"button",class:"btn quiet",onClick:Ye},d(a(c)("editor.common.read_current_data")),1)):H("",!0)])],64))}}),jy={class:"dr-head"},Hy={class:"av mdi",style:{background:"var(--seg)",color:"var(--ink-2)"}},Vy={class:"tx"},Wy=["aria-label"],By={class:"dr-body"},Ky={class:"f"},qy={class:"f-label",for:"title"},zy=["value","placeholder"],Yy={class:"f"},Gy={class:"f-label",id:"topbar-caption"},Jy={style:{"text-transform":"none","letter-spacing":"0","font-weight":"500"}},Xy={class:"items",id:"topbar-chips",role:"list","aria-labelledby":"topbar-caption"},Zy=["data-index","aria-label","onPointerdown","onClick","onKeydown"],Qy={class:"tx"},e0=["aria-label","onClick"],t0=["disabled","title"],n0={class:"live",id:"topbar-live"},s0={class:"f"},i0={class:"f-label"},o0={class:"f"},l0={class:"f-label"},a0={href:"#settings"},r0={key:2},c0={key:0,class:"dr-foot"},u0=["disabled"],d0=["disabled"],f0=Me({__name:"TopbarInspector",props:{index:{}},setup(e){const t=e,n=$(()=>un()),s=$(()=>n.value[t.index]),i=$(()=>(m.fontsVersion,m.now,m.topbarPreviews,vu(n.value,yu.value,m.layout?.title||Fn("editor.mockup.home"),hn))),l=$(()=>i.value.dropped),r=$(()=>m.inventory.header?.min_firmware||"0.2.32"),u=$(()=>{const[G,ie,be]=r.value.split(".").map(Number);return yn(G,ie,be)}),f=$(()=>u.value?c(l.value.size?"editor.topbar.hint.overflow":"editor.topbar.hint.reorder"):c("editor.topbar.hint.needs_firmware",{version:r.value})),h=(G,ie)=>{const be=hn(G);return be.shown?l.value.has(ie)?c("editor.topbar.detail.overflow"):be.analog?c("editor.topbar.detail.dial"):be.text:c("editor.topbar.detail.hidden")},p=G=>{const ie=hn(G);return ie.analog||G.type!=="entity"?Ks(bu[G.type])?.cp:ie.icon},b=G=>m.topbarAdded?.key===at(G)&&Date.now()-m.topbarAdded.time<1200;function v(G){m.layout&&(m.layout.title=G,pt())}function y(G){const ie=[...n.value];ie[t.index]={...ie[t.index],...G},Ns(ie)}const M=$(()=>s.value?hn(s.value).shown?l.value.has(t.index)?c("editor.topbar.live.overflow"):c("editor.topbar.live.looks"):c("editor.topbar.live.hidden"):""),E=$(()=>({clock:Vi(is.value,new Date(m.now)),analog:c("editor.topbar.analog_sample"),date:$l(new Date(m.now),Kn.value)})),x=ke({index:-1,active:!1,moved:!1});let O=null,C=0,F=null,T=0;function V(G,ie){G.button!==0||G.target.closest(".x")||(G.pointerType!=="touch"&&G.preventDefault(),x.value={index:ie,active:!1,moved:!1},O={x:G.clientX,y:G.clientY},F=G.pointerId,clearTimeout(C),G.pointerType==="touch"&&(C=window.setTimeout(L,260)),document.addEventListener("pointermove",A),document.addEventListener("pointerup",z),document.addEventListener("pointercancel",z))}function L(){x.value.active=!0,document.addEventListener("touchmove",k,{passive:!1})}function k(G){x.value.active&&G.preventDefault()}function A(G){if(G.pointerId!==F||!O)return;if(!x.value.active){const se=Math.hypot(G.clientX-O.x,G.clientY-O.y);if(G.pointerType==="touch"){se>10&&(clearTimeout(C),O=null);return}if(se<6)return;L()}const ie=[...document.querySelectorAll(".items .item[data-index]")];let be=x.value.index;if(ie.forEach((se,ue)=>{const ye=se.getBoundingClientRect();ue<x.value.index&&G.clientY<ye.top+ye.height/2&&(be=Math.min(be,ue)),ue>x.value.index&&G.clientY>ye.top+ye.height/2&&(be=Math.max(be,ue))}),be!==x.value.index&&m.layout){const se=[...n.value];se.splice(be,0,...se.splice(x.value.index,1)),m.layout.header={items:se};const ue=t.index===x.value.index;x.value.index=be,x.value.moved=!0,ue&&Jt(be)}}function z(G){G.pointerId===F&&(clearTimeout(C),document.removeEventListener("pointermove",A),document.removeEventListener("pointerup",z),document.removeEventListener("pointercancel",z),document.removeEventListener("touchmove",k),x.value.active&&(T=Date.now()+400,x.value.moved&&pt()),x.value={index:-1,active:!1,moved:!1},O=null,F=null)}function P(G){Date.now()<T||Jt(G)}function ge(G,ie){if(G.key==="Enter"||G.key===" "){G.preventDefault(),Jt(ie);return}const be={ArrowUp:-1,ArrowDown:1}[G.key];be&&mo(ie,ie+be)&&(t.index===ie&&Jt(ie+be),G.preventDefault())}return(G,ie)=>{const be=Hs("i18n-t");return g(),_(B,null,[o("div",jy,[o("span",Hy,d(s.value?a(Pe)(p(s.value)||"F0150"):a(Pe)("F0150")),1),o("span",Vy,[o("b",null,d(s.value?s.value.type==="entity"?a(Bs)(s.value.entity):a(bs)(s.value):a(c)("editor.topbar.title")),1),o("small",{class:me({mono:s.value?.type==="entity"})},d(s.value?s.value.type==="entity"?s.value.entity:a(c)("editor.topbar.builtin"):a(c)("editor.topbar.items",{used:n.value.length},a(bn)())),3)]),o("button",{type:"button",class:"icon-btn","aria-label":a(c)("editor.common.close"),onClick:ie[0]||(ie[0]=(...se)=>a(Qe)&&a(Qe)(...se))},"✕",8,Wy)]),o("div",By,[o("div",Ky,[o("label",qy,d(a(c)("editor.topbar.name")),1),o("input",{id:"title",value:a(m).layout?.title,maxlength:"60",placeholder:a(c)("editor.topbar.name_placeholder"),onInput:ie[1]||(ie[1]=se=>v(se.target.value))},null,40,zy)]),o("div",Yy,[o("span",Gy,[Re(d(a(c)("editor.topbar.right"))+" ",1),o("span",Jy," · "+d(n.value.length)+" / "+d(a(bn)()),1)]),o("div",Xy,[(g(!0),_(B,null,he(n.value,(se,ue)=>(g(),_("div",{key:a(at)(se)+ue,class:me(["item",{selected:ue===e.index,"is-hidden":!a(hn)(se).shown,"is-overflow":l.value.has(ue),"just-added":b(se),"dragging-chip":x.value.active&&x.value.index===ue}]),role:"listitem",tabindex:"0","data-index":ue,"aria-label":a(c)("editor.topbar.item_label",{name:a(bs)(se),slot:ue+1}),onPointerdown:ye=>V(ye,ue),onClick:ye=>P(ue),onKeydown:ye=>ge(ye,ue)},[ie[9]||(ie[9]=o("span",{class:"grip","aria-hidden":"true"},"⋮⋮",-1)),o("span",{class:"av mdi",style:je(a(hn)(se).color?{color:a(hn)(se).color}:void 0)},d(p(se)?a(Pe)(p(se)):""),5),o("span",Qy,[o("b",null,d(a(bs)(se)),1),o("small",null,d(h(se,ue)),1)]),o("button",{type:"button",class:"x","aria-label":a(c)("editor.topbar.remove_named",{name:a(bs)(se)}),onClick:At(ye=>a(nr)(ue),["stop"])},"✕",8,e0)],42,Zy))),128)),o("button",{type:"button",class:"ghost-btn",id:"topbar-add",disabled:n.value.length>=a(bn)(),title:n.value.length>=a(bn)()?a(c)("editor.topbar.max",a(bn)()):a(c)("editor.topbar.add_title"),onClick:ie[2]||(ie[2]=(...se)=>a(er)&&a(er)(...se))},d(a(c)("editor.topbar.add_button")),9,t0)]),o("small",{id:"topbar-hint",class:me({warn:l.value.size>0&&u.value})},d(f.value),3)]),s.value?(g(),_(B,{key:0},[o("div",n0,[o("small",null,d(M.value),1),te(Mu,{items:[s.value],single:""},null,8,["items"])]),s.value.type==="entity"?(g(),_(B,{key:0},[o("div",s0,[o("span",i0,d(a(c)("editor.topbar.content.label")),1),te(wt,{choices:(a(m).inventory.header?.contents||[]).map(se=>[se.key,se.label]),value:s.value.content,onPick:ie[3]||(ie[3]=se=>y({content:se}))},null,8,["choices","value"]),o("small",null,d(a(c)("editor.topbar.content.hint")),1)]),te(Ru,{selected:s.value.icon||"auto",automatic:a(m).topbarPreviews[a(at)(s.value)]?.auto_icon||a(xn)(s.value.entity),"auto-label":a(c)("editor.topbar.auto_icon"),"allow-none":"",onPick:ie[4]||(ie[4]=se=>y({icon:se}))},null,8,["selected","automatic","auto-label"]),o("div",o0,[o("span",l0,d(a(c)("editor.topbar.show.label")),1),te(wt,{choices:(a(m).inventory.header?.shows||[]).map(se=>[se.key,se.label]),value:s.value.show,onPick:ie[5]||(ie[5]=se=>y({show:se}))},null,8,["choices","value"]),o("small",null,d(a(c)("editor.topbar.show.hint")),1)])],64)):s.value.type!=="date"?(g(),it(be,{key:1,keypath:a(is)?"editor.topbar.clock_24":"editor.topbar.clock_12",tag:"small",id:"topbar-clock",scope:"global"},{settings:ne(()=>[o("a",a0,d(a(c)("editor.topbar.clock_settings")),1)]),_:1},8,["keypath"])):(g(),_("small",r0,d(a(c)("editor.topbar.date_hint",{date:E.value.date})),1))],64)):H("",!0)]),s.value?(g(),_("div",c0,[o("button",{type:"button",class:"btn danger",onClick:ie[6]||(ie[6]=se=>a(nr)(e.index))},d(a(c)("editor.common.remove")),1),ie[10]||(ie[10]=o("span",{class:"spacer"},null,-1)),o("button",{type:"button",class:"btn quiet",disabled:e.index===0,onClick:ie[7]||(ie[7]=se=>a(mo)(e.index,e.index-1)&&a(Jt)(e.index-1))},d(a(c)("editor.topbar.up")),9,u0),o("button",{type:"button",class:"btn quiet",disabled:e.index>=n.value.length-1,onClick:ie[8]||(ie[8]=se=>a(mo)(e.index,e.index+1)&&a(Jt)(e.index+1))},d(a(c)("editor.topbar.down")),9,d0)])):H("",!0)],64)}}}),p0={class:"dr-head"},h0={class:"tx"},m0=["aria-label"],b0={class:"dr-body"},v0={class:"f"},g0={class:"f-label"},_0={class:"options"},y0=["disabled","onClick"],w0={class:"mdi"},k0={class:"tx"},$0={key:0,class:"f"},x0={class:"f-label"},S0={class:"options"},C0=["disabled","onClick"],T0={class:"mdi"},E0={class:"tx"},A0={class:"f"},P0={class:"f-label",for:"topbar-search"},O0=["placeholder","aria-label"],I0={class:"options"},L0=["disabled","onClick"],M0={class:"mdi"},R0={class:"tx"},N0={key:0,class:"hint"},F0={key:1,class:"hint"},D0={class:"dr-foot"},U0=Me({__name:"TopbarAdd",setup(e){const t=ke(""),n=$(()=>new Set(un().map(at))),s=$(()=>({clock:Vi(is.value,new Date(m.now)),analog:c("editor.topbar.analog_sample"),date:$l(new Date(m.now),Kn.value)})),i=$(()=>m.inventory.header?.suggestions?.[m.selected||""]||[]),l=$(()=>{const u=t.value.trim().toLocaleLowerCase();return m.inventory.entities.filter(f=>`${f.name} ${f.id} ${f.area||""} ${f.device||""}`.toLocaleLowerCase().includes(u))}),r=u=>({type:"entity",entity:u,content:"state",icon:"auto",show:"always"});return(u,f)=>(g(),_(B,null,[o("div",p0,[f[3]||(f[3]=o("span",{class:"av",style:{background:"var(--seg)",color:"var(--ink-2)","font-size":"18px"}},"+",-1)),o("span",h0,[o("b",null,d(a(c)("editor.topbar.add.title")),1),o("small",null,d(a(c)("editor.topbar.add.slots",{used:a(un)().length},a(bn)())),1)]),o("button",{type:"button",class:"icon-btn","aria-label":a(c)("editor.common.close"),onClick:f[0]||(f[0]=(...h)=>a(Qe)&&a(Qe)(...h))},"✕",8,m0)]),o("div",b0,[o("div",v0,[o("span",g0,d(a(c)("editor.topbar.add.builtin")),1),o("div",_0,[(g(!0),_(B,null,he(a(m).inventory.header?.builtin||[],h=>(g(),_("button",{key:h.type,type:"button",class:"option",disabled:n.value.has(a(at)({type:h.type})),onClick:p=>a(bo)({type:h.type})},[o("span",w0,d(a(Pe)(a(Ks)(a(bu)[h.type])?.cp||"F0150")),1),o("span",k0,[o("strong",null,d(h.label),1),o("small",null,d(n.value.has(a(at)({type:h.type}))?a(c)("editor.topbar.add.added"):s.value[h.type]),1)])],8,y0))),128))])]),i.value.length?(g(),_("div",$0,[o("span",x0,d(a(c)("editor.topbar.add.suggestions")),1),o("div",S0,[(g(!0),_(B,null,he(i.value,h=>(g(),_("button",{key:a(at)(h.item),type:"button",class:"option",disabled:n.value.has(a(at)(h.item)),onClick:p=>a(bo)(h.item)},[o("span",T0,d(a(Pe)(h.icon||a(xn)(h.item.entity))),1),o("span",E0,[o("strong",null,d(h.label),1),o("small",null,d(n.value.has(a(at)(h.item))?a(c)("editor.topbar.add.added"):[h.name,h.area].filter(Boolean).join(" · ")),1)])],8,C0))),128))])])):H("",!0),o("div",A0,[o("label",P0,d(a(c)("editor.topbar.add.entity")),1),Ae(o("input",{id:"topbar-search","onUpdate:modelValue":f[1]||(f[1]=h=>t.value=h),type:"search",placeholder:a(c)("editor.topbar.add.search"),"aria-label":a(c)("editor.topbar.add.search_label")},null,8,O0),[[Xe,t.value]]),o("div",I0,[(g(!0),_(B,null,he(l.value.slice(0,40),h=>(g(),_("button",{key:h.id,type:"button",class:"option",disabled:n.value.has(a(at)(r(h.id))),onClick:p=>a(bo)(r(h.id))},[o("span",M0,d(a(Pe)(a(xn)(h.id))),1),o("span",R0,[o("strong",null,d(h.name),1),o("small",null,d([h.area,h.id].filter(Boolean).join(" · ")),1)])],8,L0))),128)),l.value.length?l.value.length>40?(g(),_("p",F0,d(a(c)("editor.common.results",l.value.length)),1)):H("",!0):(g(),_("p",N0,d(a(c)("editor.topbar.add.none_found")),1))])])]),o("div",D0,[f[4]||(f[4]=o("span",{class:"spacer"},null,-1)),o("button",{type:"button",class:"btn quiet",onClick:f[2]||(f[2]=(...h)=>a(Qe)&&a(Qe)(...h))},d(a(c)("editor.common.cancel")),1)])],64))}}),j0={class:"dr-head"},H0={class:"tx"},V0=["aria-label"],W0={class:"dr-body",id:"inspector-section"},B0={id:"inspection-summary"},K0={key:0,class:"hint warn"},q0={key:1,class:"hint"},z0={id:"inspection"},Y0={class:"dr-foot"},G0=Me({__name:"InspectPanel",props:{entity:{}},setup(e){const t=e,n=ke(null),s=ke(c("editor.inspect.reading")),i=ke("");async function l(){if(m.selected){n.value=null,i.value="",s.value=c("editor.inspect.fetching");try{const u=await Rt(`screens/${encodeURIComponent(m.selected)}/inspect`),f=t.entity?u.tiles.filter(h=>h.entity===t.entity):u.tiles;n.value=f,s.value=JSON.stringify(t.entity?f[0]:u,null,2)}catch(u){i.value=u.message,s.value="",Ce(u.message)}}}const r=u=>{const f=m.layout?.tiles.find(h=>h.entity===u)?.options||{};return c("editor.inspect.options",{slider:c(f.inline==="slider"?"editor.inspect.yes":"editor.inspect.no"),display:mu(f.display||"standard"),size:rm(f.size),control:sm({entity:u,options:f},m.inventory),background:m.inventory.backgrounds?.[f.background||"auto"]?.label||c("editor.inspect.background_default")})};return Tn(l),St(()=>t.entity,l),(u,f)=>(g(),_(B,null,[o("div",j0,[f[1]||(f[1]=o("span",{class:"av",style:{background:"var(--seg)",color:"var(--ink-2)","font-size":"16px"}},"⌕",-1)),o("span",H0,[o("b",null,d(a(c)("editor.inspect.title")),1),o("small",{class:me({mono:e.entity})},d(e.entity||a(c)("editor.inspect.subtitle")),3)]),o("button",{type:"button",class:"icon-btn","aria-label":a(c)("editor.common.close"),onClick:f[0]||(f[0]=(...h)=>a(Qe)&&a(Qe)(...h))},"✕",8,V0)]),o("div",W0,[o("div",B0,[i.value?(g(),_("p",K0,d(i.value),1)):n.value?H("",!0):(g(),_("p",q0,d(a(c)("editor.inspect.fetching")),1)),(g(!0),_(B,null,he(n.value||[],(h,p)=>(g(),_("article",{key:p,class:"inspection-tile"},[o("strong",null,d(h.entity),1),o("span",null,d(a(c)("editor.inspect.status",{status:h.word||h.state})),1),o("small",null,d(r(h.entity)),1)]))),128))]),o("pre",z0,d(s.value),1)]),o("div",Y0,[o("button",{type:"button",class:"btn quiet",onClick:l},d(a(c)("editor.inspect.read_again")),1),f[2]||(f[2]=o("span",{class:"spacer"},null,-1))])],64))}}),J0=["aria-hidden"],X0=Me({__name:"Drawer",setup(e){const t=$(()=>!!(m.inspector&&(m.inspector.kind!=="tile"||ro.value)));return(n,s)=>(g(),_("aside",{class:me(["drawer",{open:t.value}]),id:"tile-sheet","aria-hidden":t.value?"false":"true",onClick:s[0]||(s[0]=At(()=>{},["stop"]))},[a(m).inspector?(g(),_(B,{key:0},[a(m).inspector.kind==="tile"&&a(ro)?(g(),it(Uy,{key:0,tile:a(ro)},null,8,["tile"])):a(m).inspector.kind==="bar"?(g(),it(f0,{key:1,index:a(m).inspector.index},null,8,["index"])):a(m).inspector.kind==="bar-add"?(g(),it(U0,{key:2})):a(m).inspector.kind==="inspect"?(g(),it(G0,{key:3,entity:a(m).inspector.entity},null,8,["entity"])):H("",!0)],64)):H("",!0)],10,J0))}}),Z0={class:"main-head"},Q0={class:"eyebrow",id:"screen-name"},e1=["title"],t1={class:"head-right"},n1={class:"seg",role:"tablist"},s1=["aria-pressed"],i1=["aria-pressed"],o1={key:1,id:"dirty",class:"chip dirty"},l1=["disabled"],a1={key:0,class:"spin small"},r1=["aria-label","aria-expanded"],c1={key:3,class:"menu",role:"menu"},u1=["disabled","title"],d1=["disabled","aria-expanded"],f1={key:0,class:"sub"},p1=["onClick"],h1=["disabled","title"],m1={class:"body",id:"body"},b1=Me({__name:"ScreenView",setup(e){const t=$(()=>_t.value),n=$(()=>t.value.online?`${t.value.delivery} · ${t.value.status}`:c("editor.screen_view.offline")),s=$(()=>Au(t.value)&&t.value.online&&t.value.update?.profile&&t.value.update?.host),i=$(()=>m.inventory.screens.filter(E=>E.id!==t.value.id&&E.layout?.tiles?.length)),l=ke(!1),r=ke(null);function u(){m.menuOpen=!1,l.value=!1}function f(){u(),m.overrideProfile=t.value.update?.profile||null,m.overrideFriendly=t.value.name,Ve("#override")}function h(){u(),m.selectedTile=null,m.inspector={kind:"inspect"}}function p(E){u(),!(m.dirty&&!confirm(c("editor.screen_view.confirm.copy")))&&Im(E)}function b(){u(),r.value?.click()}async function v(E){const x=E.target,O=x.files?.[0];x.value="",O&&(m.dirty&&!confirm(c("editor.screen_view.confirm.import"))||Mm(await O.text()))}function y(E){if(E.key==="Escape")if(m.menuOpen)u();else{if(m.palette)return;m.inspector&&!E.target?.closest?.(".picker")&&Qe()}else(E.metaKey||E.ctrlKey)&&E.key.toLowerCase()==="s"&&(E.preventDefault(),m.dirty&&Wo())}function M(E){m.menuOpen&&!E.target.closest(".head-right .menu, #more")&&u()}return Tn(()=>{document.addEventListener("keydown",y),document.addEventListener("click",M)}),os(()=>{document.removeEventListener("keydown",y),document.removeEventListener("click",M)}),(E,x)=>(g(),_(B,null,[o("header",Z0,[o("div",null,[o("span",Q0,d(t.value.name),1),o("h1",null,d(a(m).layout?.title||a(Fn)("editor.mockup.home")),1)]),o("span",{id:"delivery",class:me(["chip",{off:!t.value.online}]),title:n.value},[x[9]||(x[9]=o("span",{class:"dot"},null,-1)),Re(d(n.value),1)],10,e1),o("div",t1,[o("div",n1,[o("button",{type:"button",id:"tab-layout",role:"tab","aria-pressed":a(m).tab==="layout"?"true":"false",onClick:x[0]||(x[0]=O=>a(m).tab="layout")},d(a(c)("editor.screen_view.tabs.layout")),9,s1),o("button",{type:"button",id:"tab-settings",role:"tab","aria-pressed":a(m).tab==="settings"?"true":"false",onClick:x[1]||(x[1]=O=>{a(m).tab="settings",a(Qe)()})},d(a(c)("editor.screen_view.tabs.settings")),9,i1)]),a(m).dirty?(g(),_("span",o1,d(a(c)("editor.common.unsaved")),1)):(g(),_("span",{key:0,id:"dirty",class:me(["chip",{sent:a(m).saved}])},d(a(m).saved?a(c)("editor.screen_view.sent"):a(c)("editor.screen_view.all_saved")),3)),a(m).dirty?(g(),_("button",{key:2,id:"save",type:"button",class:"btn primary",disabled:a(m).busy,title:"⌘S",onClick:x[2]||(x[2]=O=>a(Wo)())},[a(m).busy?(g(),_("span",a1)):H("",!0),Re(d(a(m).busy?a(c)("editor.common.saving"):a(c)("editor.common.save_send")),1)],8,l1)):H("",!0),o("button",{id:"more",type:"button",class:"icon-btn","aria-label":a(c)("editor.screen_view.more"),"aria-haspopup":"menu","aria-expanded":a(m).menuOpen?"true":"false",onClick:x[3]||(x[3]=At(O=>{a(m).menuOpen=!a(m).menuOpen,l.value=!1},["stop"]))},"···",8,r1),a(m).menuOpen?(g(),_("div",c1,[o("button",{type:"button",role:"menuitem",id:"identify",disabled:!a(Wn)(t.value)||!t.value.online,title:a(Wn)(t.value)?"":a(c)("editor.screen_view.menu.identify_needs"),onClick:x[4]||(x[4]=O=>{u(),a(xu)(t.value)})},[Re(d(a(c)("editor.screen_view.menu.identify"))+" ",1),o("small",null,d(a(c)("editor.screen_view.menu.identify_hint")),1)],8,u1),o("button",{type:"button",role:"menuitem",id:"inspect",onClick:h},[Re(d(a(c)("editor.common.read_current_data"))+" ",1),o("small",null,d(a(c)("editor.screen_view.menu.inspect_hint")),1)]),x[12]||(x[12]=o("div",{class:"sep"},null,-1)),o("button",{type:"button",role:"menuitem",id:"copy-layout",disabled:!i.value.length,"aria-expanded":l.value?"true":"false",onClick:x[5]||(x[5]=At(O=>l.value=!l.value,["stop"]))},[Re(d(a(c)("editor.screen_view.menu.copy"))+" ",1),o("small",null,d(i.value.length?a(c)("editor.screen_view.menu.copy_screens",i.value.length):a(c)("editor.screen_view.menu.copy_none")),1)],8,d1),l.value?(g(),_("div",f1,[(g(!0),_(B,null,he(i.value,O=>(g(),_("button",{key:O.id,type:"button",role:"menuitem",onClick:C=>p(O.id)},[Re(d(O.name)+" ",1),o("small",null,d(a(c)("editor.screen_view.menu.copy_tiles",O.layout.tiles.length)),1)],8,p1))),128))])):H("",!0),o("button",{type:"button",role:"menuitem",id:"export-layout",onClick:x[6]||(x[6]=O=>{u(),a(Cu)()})},[Re(d(a(c)("editor.screen_view.menu.export"))+" ",1),x[10]||(x[10]=o("small",null,"JSON",-1))]),o("button",{type:"button",role:"menuitem",id:"import-layout",onClick:b},[Re(d(a(c)("editor.screen_view.menu.import"))+" ",1),x[11]||(x[11]=o("small",null,"JSON",-1))]),x[13]||(x[13]=o("div",{class:"sep"},null,-1)),o("button",{type:"button",role:"menuitem",id:"open-override",disabled:!t.value.update?.profile,title:t.value.update?.profile?"":a(c)("editor.screen_view.menu.override_none"),onClick:f},[Re(d(a(c)("editor.screen_view.menu.override"))+" ",1),o("small",null,d(a(c)("editor.screen_view.menu.override_hint")),1)],8,h1),o("button",{type:"button",role:"menuitem",onClick:x[7]||(x[7]=O=>{u(),a(Ve)("#firmware")})},d(a(c)("editor.nav.firmware")),1),s.value?(g(),_("button",{key:1,type:"button",role:"menuitem",onClick:x[8]||(x[8]=O=>{u(),a(Ko)(t.value)})},[Re(d(a(c)("editor.screen_view.menu.update"))+" ",1),o("small",null,d(t.value.update?.target),1)])):H("",!0)])):H("",!0),o("input",{ref_key:"fileInput",ref:r,type:"file",accept:"application/json,.json",hidden:"",onChange:v},null,544)])]),o("div",m1,[a(m).tab==="layout"?(g(),it(Gg,{key:0})):(g(),it(f_,{key:1})),te(X0)])],64))}}),v1={key:0,id:"choose",class:"empty"},g1={key:1,id:"empty",class:"empty"},_1=Me({__name:"EmptyState",setup(e){return(t,n)=>a(m).inventory.screens.length?(g(),_("section",v1,[n[1]||(n[1]=o("span",{class:"empty-icon"},"▦",-1)),o("h2",null,d(a(c)("editor.empty.choose.title")),1),o("p",null,d(a(c)("editor.empty.choose.text")),1)])):(g(),_("section",g1,[n[2]||(n[2]=o("span",{class:"empty-icon"},"▦",-1)),o("h2",null,d(a(c)("editor.empty.start.title")),1),o("p",null,d(a(c)("editor.empty.start.text")),1),o("button",{id:"start",type:"button",class:"btn primary",onClick:n[0]||(n[0]=s=>a(Ve)("#new-screen"))},d(a(c)("editor.empty.start.button")),1)]))}}),y1={class:"panel",id:"settings-view"},w1={class:"panel-head"},k1={class:"tx"},$1={class:"eyebrow"},x1={id:"settings-title"},S1={class:"card-grid"},C1={class:"card"},T1={class:"tools"},E1={class:"tx"},A1={class:"tx"},P1={key:0,class:"card updates",id:"updates"},O1={id:"updates-hint"},I1=["aria-valuenow"],L1={class:"progress-text"},M1={key:0,class:"log-lines"},R1={key:2,class:"whatsnew"},N1={class:"check"},F1=["checked"],D1={key:1,class:"card",id:"language"},U1={class:"field"},j1={class:"f-label",for:"screen-language"},H1=["value","disabled"],V1={value:"auto"},W1=["value"],B1={key:0,id:"language-ha-missing"},K1={class:"field"},q1={class:"f-label",for:"time-format"},z1=["value","disabled"],Y1={value:"auto"},G1={value:"24"},J1={value:"12"},X1={class:"field"},Z1={class:"f-label",for:"number-format"},Q1=["value","disabled"],e2={value:"auto"},t2=["value"],n2={key:0,class:"actions",id:"language-profile"},s2=["disabled"],i2={class:"card"},o2={class:"tools"},l2={class:"tx"},a2={class:"card",id:"claude"},r2={class:"actions"},c2=["disabled"],u2={id:"claude-path"},d2={class:"actions"},f2={class:"btn quiet",id:"claude-download",href:"api/claude-skill.zip",download:"esp-screens.zip"},p2="https://github.com/MaxGramser/homeassistant_espscreen/blob/main/docs/TRANSLATING.md",h2=Me({__name:"AppSettingsView",setup(e){const t=$(()=>m.inventory.updates),n=$(()=>m.inventory.screens.filter(k=>k.update?.available).length),s=$(()=>t.value?t.value.busy?c("editor.settings.updates.busy",{version:t.value.target}):m.inventory.screens.length?n.value?c("editor.settings.updates.available",{version:t.value.target},n.value):c("editor.settings.updates.current",{version:t.value.target}):c("editor.settings.updates.no_screens",{version:t.value.target}):""),i=$(()=>m.inventory.screens.find(k=>k.update?.state==="running"||m.updating.includes(k.id))),l=$(()=>i.value?Gn(i.value):null),r=$(()=>(m.firmwareJob?.logs||[]).slice(-12).join(`
`)),u=$(()=>{const k=m.inventory.changelog,A=t.value?.target;return!Array.isArray(k)||!A?[]:k.filter(z=>z.firmware===A).flatMap(z=>z.lines).slice(0,10)}),f=$(()=>m.inventory.claude_skill),h=ke(!1);async function p(){h.value=!0;try{await Bm()}finally{h.value=!1}}const b=["point","comma","space"],v=$(()=>m.inventory.language),y=$(()=>{const k=v.value,A=k?.ha?nu(k.ha,k.languages.map(z=>z.code)):void 0;return k?.languages.find(z=>z.code===A)?.name}),M=$(()=>v.value?.languages.find(k=>k.code===v.value.effective&&!k.checked)),E=k=>c(k==="12"?"editor.settings.language.clock_12":"editor.settings.language.clock_24"),x=k=>ou("1234.5",k),O=Zh(),C=$(()=>{const k=v.value;return k?{...O.clock&&O.clock!==(k.clock_effective||"24")?{clock:O.clock}:{},...O.numbers&&O.numbers!==(k.numbers_effective||"point")?{numbers:O.numbers}:{}}:{}}),F=$(()=>[C.value.clock&&E(C.value.clock),C.value.numbers&&x(Fo[C.value.numbers])].filter(Boolean).join(" · ")),T=ke(!1);async function V(k,A){const z=A.target;T.value=!0;const P=await lr({[k]:z.value});T.value=!1,P||(z.value=String(v.value?.[k]??"auto"))}async function L(){T.value=!0,await lr(C.value),T.value=!1}return(k,A)=>{const z=Hs("i18n-t");return g(),_("div",y1,[o("div",w1,[o("div",k1,[o("span",$1,d(a(c)("editor.nav.settings")),1),o("h1",x1,d(a(c)("editor.settings.title")),1)]),o("button",{type:"button",class:"btn quiet",id:"close-settings",onClick:A[0]||(A[0]=P=>a(Ve)(""))},d(a(c)("editor.settings.back")),1)]),o("div",S1,[o("section",C1,[o("h2",null,d(a(c)("editor.settings.screens.title")),1),o("p",null,d(a(c)("editor.settings.screens.text")),1),o("div",T1,[o("button",{type:"button",class:"tool",onClick:A[1]||(A[1]=P=>a(Ve)("#new-screen"))},[A[9]||(A[9]=o("span",{class:"tool-icon"},"+",-1)),o("span",E1,[o("b",null,d(a(c)("editor.nav.new_screen")),1),o("small",null,d(a(c)("editor.nav.new_screen_detail")),1)])]),o("button",{type:"button",class:"tool",onClick:A[2]||(A[2]=P=>a(Ve)("#firmware"))},[A[10]||(A[10]=o("span",{class:"tool-icon"},"⇪",-1)),o("span",A1,[o("b",null,d(a(c)("editor.nav.firmware")),1),o("small",null,d(a(c)("editor.settings.screens.firmware_detail")),1)])])])]),t.value?(g(),_("section",P1,[o("h2",null,d(a(c)("editor.settings.updates.title")),1),o("p",O1,d(s.value),1),i.value&&l.value?(g(),_(B,{key:0},[o("div",{class:"progress",role:"progressbar","aria-valuenow":l.value.percent,"aria-valuemin":"0","aria-valuemax":"100"},[o("i",{style:je({width:l.value.percent+"%"})},null,4)],8,I1),o("div",L1,[o("span",null,d(i.value.name)+" · "+d(l.value.percent)+" %",1),o("span",null,d(l.value.text),1)]),r.value?(g(),_("pre",M1,d(r.value),1)):H("",!0)],64)):H("",!0),t.value.pending&&!t.value.busy&&t.value.pending>=2?(g(),_("button",{key:1,id:"update-all",type:"button",class:"btn primary",onClick:A[3]||(A[3]=(...P)=>a(ir)&&a(ir)(...P))},d(a(c)("editor.settings.updates.all",t.value.pending)),1)):H("",!0),u.value.length&&!a(Bo)()?(g(),_("details",R1,[o("summary",null,d(a(c)("editor.settings.updates.whats_new",{version:t.value.target})),1),o("ul",null,[(g(!0),_(B,null,he(u.value,P=>(g(),_("li",{key:P},d(P),1))),128))])])):H("",!0),o("label",N1,[o("input",{type:"checkbox",id:"auto-update",checked:!!t.value.auto,onChange:A[4]||(A[4]=P=>a(Wm)(P.target.checked))},null,40,F1),o("span",null,[Re(d(a(c)("editor.settings.updates.auto_label")),1),o("small",null,d(a(c)("editor.settings.updates.auto_hint")),1)])])])):H("",!0),v.value?(g(),_("section",D1,[o("h2",null,d(a(c)("editor.settings.language.title")),1),o("div",U1,[o("label",j1,d(a(c)("editor.settings.language.screen_language")),1),o("select",{id:"screen-language",value:v.value.setting,disabled:T.value,onChange:A[5]||(A[5]=P=>V("setting",P))},[o("option",V1,d(y.value?a(c)("editor.settings.language.auto",{name:y.value}):a(c)("editor.settings.language.auto_plain")),1),(g(!0),_(B,null,he(v.value.languages,P=>(g(),_("option",{key:P.code,value:P.code},d(P.checked?P.name:a(c)("editor.settings.language.unchecked",{name:P.name})),9,W1))),128))],40,H1),v.value.setting==="auto"&&!y.value?(g(),_("small",B1,d(a(c)("editor.settings.language.ha_missing")),1)):H("",!0),M.value?(g(),it(z,{key:1,keypath:"editor.settings.language.help",tag:"small",id:"language-help",scope:"global"},{name:ne(()=>[Re(d(M.value.name),1)]),guide:ne(()=>[o("a",{href:p2,target:"_blank",rel:"noopener"},d(a(c)("editor.settings.language.guide")),1)]),_:1})):H("",!0),o("small",null,d(a(c)("editor.settings.language.update_hint")),1)]),o("div",K1,[o("label",q1,d(a(c)("editor.settings.language.time")),1),o("select",{id:"time-format",value:v.value.clock||"auto",disabled:T.value,onChange:A[6]||(A[6]=P=>V("clock",P))},[o("option",Y1,d(a(c)("editor.settings.language.time_auto",{clock:E(v.value.clock_effective)})),1),o("option",G1,d(E("24")),1),o("option",J1,d(E("12")),1)],40,z1)]),o("div",X1,[o("label",Z1,d(a(c)("editor.settings.language.numbers")),1),o("select",{id:"number-format",value:v.value.numbers||"auto",disabled:T.value,onChange:A[7]||(A[7]=P=>V("numbers",P))},[o("option",e2,d(a(c)("editor.settings.language.numbers_auto",{example:x(a(Pu))})),1),(g(),_(B,null,he(b,P=>o("option",{key:P,value:P},d(x(a(Fo)[P])),9,t2)),64))],40,Q1)]),F.value?(g(),_("div",n2,[o("small",null,d(a(c)("editor.settings.language.profile",{formats:F.value})),1),o("button",{type:"button",class:"btn quiet mini",disabled:T.value,onClick:L},d(a(c)("editor.settings.language.use_profile")),9,s2)])):H("",!0),o("small",null,d(a(c)("editor.settings.language.editor_hint")),1)])):H("",!0),o("section",i2,[o("h2",null,d(a(c)("editor.nav.alerts")),1),o("p",null,d(a(c)("editor.settings.alerts.text")),1),o("div",o2,[o("button",{type:"button",class:"tool",onClick:A[8]||(A[8]=P=>a(Ve)("#alerts"))},[A[11]||(A[11]=o("span",{class:"tool-icon"},"!",-1)),o("span",l2,[o("b",null,d(a(c)("editor.nav.alerts")),1),o("small",null,d(a(c)("editor.settings.alerts.detail")),1)])])])]),o("section",a2,[A[12]||(A[12]=o("h2",null,"Claude",-1)),o("p",null,d(a(c)("editor.settings.claude.text")),1),o("div",r2,[o("button",{type:"button",id:"claude-install",class:me(["btn",f.value?.installed&&f.value.current?"quiet":"primary"]),disabled:!f.value||h.value,onClick:p},d(!f.value||!f.value.installed?a(c)("editor.settings.claude.install"):f.value.current?a(c)("editor.settings.claude.install_again"):a(c)("editor.settings.claude.update")),11,c2),o("span",{id:"claude-status",class:me(["chip",f.value&&f.value.installed?f.value.current?"good":"update":""]),role:"status"},d(f.value?f.value.installed?f.value.current?a(c)("editor.settings.claude.installed_chip"):a(c)("editor.settings.claude.newer"):a(c)("editor.settings.claude.not_installed"):a(c)("editor.common.loading")),3)]),te(z,{keypath:"editor.settings.claude.writes",tag:"small",scope:"global"},{path:ne(()=>[o("code",u2,d(f.value?.path||"/homeassistant/.claude/skills/esp-screens"),1)]),_:1}),o("div",d2,[o("a",f2,d(a(c)("editor.settings.claude.download")),1),o("small",null,d(a(c)("editor.settings.claude.upload")),1)])])])])}}}),m2={class:"panel",id:"installer"},b2={class:"panel-head"},v2={class:"tx"},g2={class:"eyebrow"},_2={id:"install-title"},y2={key:0},w2=["aria-label"],k2={class:"boards"},$2={class:"board"},x2={class:"board"},S2={class:"field"},C2={class:"f-label",for:"friendly_name"},T2=["placeholder"],E2={class:"node-line"},A2={id:"node-preview"},P2={key:0,class:"field",id:"node-label"},O2={class:"f-label",for:"node-name"},I2={key:1,id:"wifi-fields",class:"wifi"},L2={class:"hint",id:"wifi-status"},M2={key:0,class:"field",id:"wifi-ssid-label"},R2={class:"f-label",for:"wifi_ssid"},N2={key:1,class:"field",id:"wifi-password-label"},F2={class:"f-label",for:"wifi_password"},D2={class:"field"},U2={class:"f-label",for:"install-target"},j2={key:0,value:"usb"},H2=["value"],V2={value:"download"},W2={value:""},B2={id:"target-hint"},K2={key:2,class:"hint",id:"install-note"},q2={class:"actions"},z2=["disabled"],Y2={id:"install-status",class:"status-line error",role:"status"},G2={key:1,id:"install-progress",class:"card"},J2={class:"progress-head"},X2={key:0,class:"spin",id:"progress-spin"},Z2={id:"progress-title"},Q2={id:"progress-detail"},ew={key:0,id:"install-download",class:"card",style:{background:"var(--surface-2)"}},tw=["href","download"],nw={class:"steps",id:"download-steps"},sw={key:1,id:"install-result",class:"field"},iw={class:"key-box"},ow={class:"steps",id:"install-steps"},lw=["open"],aw={id:"install-log",class:"log"},rw={class:"actions"},cw="https://web.esphome.io/?dashboard_install",uw=Me({__name:"InstallerView",setup(e){const t=Bn({board:"cyd",friendly_name:"",name:"",wifi_ssid:"",wifi_password:"",target:""}),n=Bn({view:"setup",file:null,friendly:"",board:"cyd",target:"",apiKey:null,nodeEdited:!1,jobState:null,picked:!1,action:null}),s=ke(!1),i=ke(null),l=ke(null),r=ke([]),u=ke(""),f=ke(""),h=ke(!1),p=ke(!1),b=ke(null);let v=0;function y(X){return X.toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^[^a-z]+/,"").slice(0,30).replace(/-+$/,"")||"screen"}function M(X){const K=X.replace(/^\/dev\/serial\/by-id\/usb-/,"").replace(/-if\d+(-port\d+)?$/,"").replace(/_/g," ");return`USB · ${K===X?X.replace(/^\/dev\//,""):K}`}St(()=>t.friendly_name,()=>{n.nodeEdited||(t.name=y(t.friendly_name))});const E=$(()=>t.name||"…"),x=$(()=>i.value?.ports||[]),O=$(()=>i.value?.wifi),C=$(()=>O.value?.state==="new"||O.value?.state==="missing"),F=$(()=>O.value?.missing||[]),T=$(()=>c(O.value?.state==="new"?"editor.installer.wifi.new":"editor.installer.wifi.missing")),V=$(()=>O.value?.state==="ready"?c("editor.installer.wifi.ready"):O.value?.state==="invalid"?c("editor.installer.wifi.invalid"):""),L=$(()=>c(t.target==="usb"?"editor.installer.target.usb":t.target==="download"?"editor.installer.target.download":t.target?x.value.length>1?"editor.installer.target.several":"editor.installer.target.once":"editor.installer.target.later")),k=$(()=>t.target==="download"?c("editor.firmware.build_download"):t.target?c("editor.installer.install"):c("editor.installer.save_profile")),A=$(()=>i.value?.job?.state==="running"&&!(n.file&&i.value.job.file===n.file)),z=$(()=>h.value||O.value?.state==="invalid"||t.target==="usb"||!!t.target&&(A.value||!i.value?.available));function P(){const X=t.target;(X==="download"||X===""?n.picked:x.value.includes(X))||(t.target=x.value[0]||"usb")}async function ge(){let X;try{X=await Rt("firmware")}catch(we){u.value=we.message;return}i.value=X;const K=X.job,Te=K&&n.file&&K.file===n.file;if(Te&&(n.jobState=K.state),n.view==="setup"){if(Te&&K.state==="running"){G(K,X.logs||[]);return}P(),u.value=A.value?c("editor.installer.busy",{file:K.file}):!X.available&&t.target?c("editor.installer.no_cli"):V.value}else n.view==="progress"&&Te&&(l.value=K,r.value=X.logs||[],K.state!=="running"&&K.state!=="success"&&(p.value=!0))}function G(X,K){n.view="progress",n.jobState=X.state,n.action=X.action,l.value=X,r.value=K}const ie=$(()=>l.value?.state==="running"),be=$(()=>n.view==="done"||l.value?.state==="success"),se=$(()=>n.action==="download"),ue=$(()=>c(n.view==="done"?"editor.installer.title.saved":ie.value?"editor.installer.title.running":be.value?se.value?"editor.installer.title.ready":"editor.installer.title.done":"editor.installer.title.failed")),ye=$(()=>n.view==="done"?c("editor.installer.progress.saved",{file:n.file}):ie.value?l.value?.stage==="upload"?c("editor.installer.progress.writing",{name:n.friendly}):c("editor.installer.progress.building"):be.value?se.value?c("editor.installer.progress.ready",{name:n.friendly}):c("editor.installer.progress.installed",{name:n.friendly}):c(se.value?"editor.installer.progress.build_failed":"editor.installer.progress.install_failed")),$e=$(()=>n.view==="done"?c("editor.installer.detail.saved"):ie.value?l.value?.stage==="upload"?c("editor.installer.detail.uploading"):c(se.value?"editor.installer.detail.building_download":"editor.installer.detail.building"):be.value?se.value?c("editor.installer.detail.downloaded"):c(n.board==="cyd"?"editor.installer.detail.booted_cyd":"editor.installer.detail.booted"):r.value.filter(X=>/error/i.test(X)).pop()||r.value.filter(X=>/failed/i.test(X)).pop()||c("editor.installer.detail.see_log")),Ye=$(()=>({href:`api/firmware/profiles/${encodeURIComponent(n.file||"")}/download`,name:(n.file||"").replace(/\.yaml$/,"")+".factory.bin"}));async function le(X){const K=X.target;if(n.nodeEdited||(t.name=y(t.friendly_name)),!!K.reportValidity()){h.value=!0,f.value="";try{const Te={board:t.board,friendly_name:t.friendly_name,name:t.name,target:t.target};C.value&&(F.value.includes("wifi_ssid")&&(Te.wifi_ssid=t.wifi_ssid),F.value.includes("wifi_password")&&(Te.wifi_password=t.wifi_password));const we=await ft("firmware/profiles","POST",Te);Object.assign(n,{file:we.file,apiKey:we.api_key,friendly:t.friendly_name.trim(),board:t.board,target:t.target}),t.wifi_password="",we.job?G(we.job,[]):n.view="done"}catch(Te){f.value=Te.message}finally{h.value=!1}}}async function ee(){try{if(!se.value){const{ports:K}=await Rt("firmware");!K.includes(n.target)&&K.length===1&&(n.target=K[0])}const X=await ft("firmware/jobs","POST",se.value?{file:n.file,action:"download"}:{file:n.file,action:"install",target:n.target});G(X,[])}catch(X){Ce(X.message)}}function ae(){Object.assign(n,{view:"setup",file:null,apiKey:null,nodeEdited:!1,jobState:null,target:"",picked:!1,action:null}),Object.assign(t,{board:"cyd",friendly_name:"",name:"",wifi_ssid:"",wifi_password:"",target:""}),s.value=!1,l.value=null,r.value=[],f.value="",u.value="",p.value=!1,ge()}function de(){n.view==="progress"&&n.jobState!=="running"&&(n.view="done"),Ve("")}return Tn(()=>{ge(),v=window.setInterval(ge,3e3)}),os(()=>clearInterval(v)),(X,K)=>{const Te=Hs("i18n-t");return g(),_("div",m2,[o("div",b2,[o("div",v2,[o("span",g2,d(a(c)("editor.nav.new_screen")),1),o("h1",_2,d(n.view==="setup"?a(c)("editor.installer.title.setup"):ue.value),1),n.view==="setup"?(g(),_("p",y2,d(a(c)("editor.installer.intro")),1)):H("",!0)]),o("button",{type:"button",class:"btn quiet",id:"close-install","aria-label":a(c)("editor.common.close"),onClick:de},d(a(c)("editor.common.back")),9,w2)]),n.view==="setup"?(g(),_("form",{key:0,id:"install-form",class:"card",onSubmit:At(le,["prevent"])},[o("fieldset",null,[o("legend",null,d(a(c)("editor.installer.board")),1),o("div",k2,[o("label",$2,[Ae(o("input",{type:"radio",name:"board",value:"cyd","onUpdate:modelValue":K[0]||(K[0]=we=>t.board=we)},null,512),[[ca,t.board]]),o("span",null,[o("b",null,d(a(c)("editor.installer.board_cyd")),1),K[13]||(K[13]=o("small",null,"ESP32-2432S028 · 320 × 240",-1))])]),o("label",x2,[Ae(o("input",{type:"radio",name:"board",value:"guition","onUpdate:modelValue":K[1]||(K[1]=we=>t.board=we)},null,512),[[ca,t.board]]),o("span",null,[o("b",null,d(a(c)("editor.installer.board_guition")),1),K[14]||(K[14]=o("small",null,"ESP32-S3-4848S040 · 480 × 480 · GT911",-1))])])])]),o("div",S2,[o("label",C2,d(a(c)("editor.installer.name")),1),Ae(o("input",{id:"friendly_name",name:"friendly_name","onUpdate:modelValue":K[2]||(K[2]=we=>t.friendly_name=we),required:"",maxlength:"60",placeholder:a(c)("editor.installer.name_placeholder"),autocomplete:"off"},null,8,T2),[[Xe,t.friendly_name]]),o("small",E2,[Re(d(a(c)("editor.installer.device_name"))+" ",1),o("code",A2,d(E.value),1),o("button",{type:"button",class:"btn link mini",id:"edit-node",onClick:K[3]||(K[3]=we=>{n.nodeEdited=!0,s.value=!0})},d(a(c)("editor.installer.customize")),1)]),o("small",null,d(a(c)("editor.installer.name_hint")),1)]),s.value?(g(),_("div",P2,[o("label",O2,d(a(c)("editor.installer.device_name")),1),Ae(o("input",{id:"node-name",name:"name","onUpdate:modelValue":K[4]||(K[4]=we=>t.name=we),pattern:"[a-z][a-z0-9\\-]{0,29}",maxlength:"30",autocomplete:"off",onInput:K[5]||(K[5]=we=>n.nodeEdited=!0)},null,544),[[Xe,t.name]]),o("small",null,d(a(c)("editor.installer.device_name_hint")),1)])):H("",!0),C.value?(g(),_("fieldset",I2,[o("legend",null,d(a(c)("editor.installer.wifi.title")),1),o("p",L2,d(T.value),1),F.value.includes("wifi_ssid")?(g(),_("div",M2,[o("label",R2,d(a(c)("editor.installer.wifi.ssid")),1),Ae(o("input",{id:"wifi_ssid",name:"wifi_ssid","onUpdate:modelValue":K[6]||(K[6]=we=>t.wifi_ssid=we),autocomplete:"off"},null,512),[[Xe,t.wifi_ssid]])])):H("",!0),F.value.includes("wifi_password")?(g(),_("div",N2,[o("label",F2,d(a(c)("editor.installer.wifi.password")),1),Ae(o("input",{id:"wifi_password",name:"wifi_password",type:"password","onUpdate:modelValue":K[7]||(K[7]=we=>t.wifi_password=we),autocomplete:"new-password"},null,512),[[Xe,t.wifi_password]])])):H("",!0)])):H("",!0),o("div",D2,[o("label",U2,d(a(c)("editor.installer.install_via")),1),Ae(o("select",{id:"install-target",name:"target","onUpdate:modelValue":K[8]||(K[8]=we=>t.target=we),onChange:K[9]||(K[9]=we=>{n.picked=!0,ge()})},[x.value.length?H("",!0):(g(),_("option",j2,d(a(c)("editor.firmware.no_board")),1)),(g(!0),_(B,null,he(x.value,we=>(g(),_("option",{key:we,value:we},d(M(we)),9,H2))),128)),o("option",V2,d(a(c)("editor.firmware.download_target")),1),o("option",W2,d(a(c)("editor.installer.later")),1)],544),[[jn,t.target]]),o("small",B2,d(L.value),1)]),u.value?(g(),_("p",K2,d(u.value),1)):H("",!0),o("div",q2,[o("button",{type:"submit",class:"btn primary",id:"install-go",disabled:z.value},d(k.value),9,z2),o("span",Y2,d(f.value),1)])],32)):(g(),_("div",G2,[o("div",J2,[ie.value?(g(),_("span",X2)):(g(),_("span",{key:1,class:me(["outcome",be.value?"ok":"bad"]),id:"progress-mark"},d(be.value?"✓":"✕"),3)),o("strong",Z2,d(ye.value),1)]),o("p",Q2,d($e.value),1),be.value&&se.value&&n.view!=="done"?(g(),_("div",ew,[o("a",{class:"btn primary",id:"download-firmware",href:Ye.value.href,download:Ye.value.name},d(a(c)("editor.firmware.download_file",{name:Ye.value.name})),9,tw),o("ol",nw,[o("li",null,[te(Te,{keypath:"editor.installer.download_steps.plug",scope:"global"},{bold:ne(()=>[o("b",null,d(a(c)("editor.installer.download_steps.plug_bold")),1)]),_:1})]),o("li",null,[te(Te,{keypath:"editor.installer.download_steps.open",scope:"global"},{bold:ne(()=>[o("b",null,[te(Te,{keypath:"editor.installer.download_steps.open_bold",scope:"global"},{esphome_web:ne(()=>[o("a",{href:cw,target:"_blank",rel:"noopener"},"ESPHome Web")]),_:1})])]),_:1})]),o("li",null,[te(Te,{keypath:n.board==="cyd"?"editor.installer.download_steps.install_cyd":"editor.installer.download_steps.install",scope:"global"},{bold:ne(()=>[o("b",null,d(a(c)("editor.installer.download_steps.install_bold")),1)]),file:ne(()=>[Re(d(Ye.value.name),1)]),_:1},8,["keypath"])])]),o("small",null,d(a(c)("editor.installer.download_keep")),1)])):H("",!0),be.value?(g(),_("div",sw,[o("div",iw,[o("span",null,d(a(c)("editor.installer.api_key")),1),o("code",{id:"api-key",ref_key:"keyBox",ref:b},d(n.apiKey||""),513),o("button",{type:"button",class:"btn quiet mini",id:"copy-key",onClick:K[10]||(K[10]=we=>a(Ot)(n.apiKey||"",b.value))},d(a(c)("editor.common.copy")),1)]),o("ol",ow,[o("li",null,[te(Te,{keypath:"editor.installer.pairing.ha",scope:"global"},{bold:ne(()=>[o("b",null,d(a(c)("editor.installer.pairing.ha_bold")),1)]),name:ne(()=>[Re(d(n.friendly),1)]),_:1}),K[15]||(K[15]=Re()),o("button",{type:"button",class:"btn quiet mini",onClick:K[11]||(K[11]=(...we)=>a(wi)&&a(wi)(...we))},d(a(c)("editor.common.open_integrations")),1)]),o("li",null,[te(Te,{keypath:"editor.installer.pairing.key",scope:"global"},{bold:ne(()=>[o("b",null,d(a(c)("editor.installer.pairing.key_bold")),1)]),_:1})]),o("li",null,[te(Te,{keypath:"editor.installer.pairing.actions",scope:"global"},{bold:ne(()=>[o("b",null,d(a(c)("editor.installer.pairing.actions_bold")),1)]),_:1})]),o("li",null,[te(Te,{keypath:"editor.installer.pairing.tiles",scope:"global"},{bold:ne(()=>[o("b",null,d(a(c)("editor.installer.pairing.tiles_bold")),1)]),_:1})])])])):H("",!0),n.view!=="done"?(g(),_("details",{key:2,id:"install-log-wrap",class:"log-wrap",open:p.value,onToggle:K[12]||(K[12]=we=>p.value=we.target.open)},[o("summary",null,d(a(c)("editor.installer.log")),1),o("pre",aw,d(r.value.join(`
`)),1)],40,lw)):H("",!0),o("div",rw,[!ie.value&&!be.value?(g(),_("button",{key:0,type:"button",class:"btn primary",id:"install-retry",onClick:ee},d(a(c)("editor.installer.retry")),1)):H("",!0),o("button",{type:"button",class:"btn quiet",id:"install-close",onClick:ae},d(be.value?a(c)("editor.installer.another"):a(c)("editor.installer.start_over")),1),o("button",{type:"button",class:me(["btn",be.value?"primary":"quiet"]),onClick:de},d(be.value?a(c)("editor.installer.done"):a(c)("editor.common.close")),3)])]))])}}}),dw={class:"panel",id:"firmware-dialog"},fw={class:"panel-head"},pw={class:"tx"},hw={class:"eyebrow"},mw={class:"card"},bw={class:"card-grid"},vw={class:"field"},gw={class:"f-label",for:"firmware-file"},_w=["value"],yw={class:"field"},ww={class:"f-label",for:"firmware-port"},kw={value:"ota"},$w={key:0,value:"usb"},xw=["value"],Sw={value:"download"},Cw={key:0,class:"field",id:"firmware-host-label"},Tw={class:"f-label",for:"firmware-host"},Ew=["placeholder"],Aw={class:"actions"},Pw=["disabled"],Ow=["disabled"],Iw=["disabled"],Lw={key:0,class:"spin"},Mw={id:"firmware-status",class:"status-line",role:"status"},Rw={key:0,id:"firmware-download",class:"card",style:{background:"var(--surface-2)"}},Nw=["href","download"],Fw={id:"firmware-log",class:"log"},Dw="https://web.esphome.io/?dashboard_install",Uw=Me({__name:"FirmwareView",setup(e){const t=ke(null),n=ke(""),s=ke("ota"),i=ke("");let l=0;async function r(E=!1){try{const x=await Rt("firmware");t.value=x,(E||!n.value)&&(n.value=x.profiles[0]?.file||"");const O=x.ports||[];s.value.startsWith("/")&&!O.includes(s.value)&&(s.value=O[0]||"usb"),s.value==="usb"&&O.length&&(s.value=O[0])}catch(x){Ce(x.message)}}const u=$(()=>t.value?.job?.state==="running"),f=$(()=>!t.value||u.value||!t.value.available||!t.value.profiles?.length),h=$(()=>f.value||s.value==="usb"),p=$(()=>t.value?.ports||[]),b=$(()=>t.value?t.value.available?t.value.job?`${t.value.job.file} · ${t.value.job.action} · ${t.value.job.state}`:c("editor.firmware.choose"):c("editor.firmware.no_cli"):c("editor.common.loading")),v=$(()=>s.value==="download"&&!!n.value&&!!t.value?.downloads?.includes(n.value)),y=$(()=>({href:`api/firmware/profiles/${encodeURIComponent(n.value)}/download`,name:n.value.replace(/\.yaml$/,"")+".factory.bin"}));async function M(E){try{await ft("firmware/jobs","POST",{file:n.value,action:E==="validate"?"validate":E==="build"?"build":s.value==="download"?"download":"install",target:s.value==="ota"?i.value.trim():s.value==="download"?"":s.value}),await r()}catch(x){Ce(x.message)}}return Tn(()=>{r(!0),l=window.setInterval(()=>r(),3e3)}),os(()=>clearInterval(l)),(E,x)=>{const O=Hs("i18n-t");return g(),_("div",dw,[o("div",fw,[o("div",pw,[o("span",hw,d(a(c)("editor.nav.firmware")),1),o("h1",null,d(a(c)("editor.firmware.title")),1),te(O,{keypath:"editor.firmware.intro",tag:"p",scope:"global"},{ota:ne(()=>[o("b",null,d(a(c)("editor.firmware.ota")),1)]),download:ne(()=>[o("b",null,d(a(c)("editor.firmware.download")),1)]),check:ne(()=>[o("b",null,d(a(c)("editor.firmware.check")),1)]),build:ne(()=>[o("b",null,d(a(c)("editor.firmware.build")),1)]),install:ne(()=>[o("b",null,d(a(c)("editor.firmware.install")),1)]),_:1})]),o("button",{type:"button",class:"btn quiet",id:"close-firmware",onClick:x[0]||(x[0]=C=>a(Ve)(""))},d(a(c)("editor.common.back")),1)]),o("div",mw,[o("div",bw,[o("div",vw,[o("label",gw,d(a(c)("editor.firmware.profile")),1),Ae(o("select",{id:"firmware-file","onUpdate:modelValue":x[1]||(x[1]=C=>n.value=C)},[(g(!0),_(B,null,he(t.value?.profiles||[],C=>(g(),_("option",{key:C.file,value:C.file},d(C.file),9,_w))),128))],512),[[jn,n.value]])]),o("div",yw,[o("label",ww,d(a(c)("editor.firmware.install_to")),1),Ae(o("select",{id:"firmware-port","onUpdate:modelValue":x[2]||(x[2]=C=>s.value=C)},[o("option",kw,d(a(c)("editor.firmware.ota")),1),p.value.length?H("",!0):(g(),_("option",$w,d(a(c)("editor.firmware.no_board")),1)),(g(!0),_(B,null,he(p.value,C=>(g(),_("option",{key:C,value:C},d(C),9,xw))),128)),o("option",Sw,d(a(c)("editor.firmware.download_target")),1)],512),[[jn,s.value]])]),s.value==="ota"?(g(),_("div",Cw,[o("label",Tw,d(a(c)("editor.firmware.host")),1),Ae(o("input",{id:"firmware-host","onUpdate:modelValue":x[3]||(x[3]=C=>i.value=C),placeholder:n.value?n.value.replace(/\.yaml$/,".local"):"screen-livingroom.local"},null,8,Ew),[[Xe,i.value]])])):H("",!0)]),o("div",Aw,[o("button",{type:"button",class:"btn quiet",id:"firmware-validate",disabled:f.value,onClick:x[4]||(x[4]=C=>M("validate"))},d(a(c)("editor.firmware.check")),9,Pw),o("button",{type:"button",class:"btn quiet",id:"firmware-build",disabled:f.value,onClick:x[5]||(x[5]=C=>M("build"))},d(a(c)("editor.firmware.build")),9,Ow),o("button",{type:"button",class:"btn primary",id:"firmware-install",disabled:h.value,onClick:x[6]||(x[6]=C=>M("install"))},d(s.value==="download"?a(c)("editor.firmware.build_download"):a(c)("editor.firmware.install")),9,Iw),u.value?(g(),_("span",Lw)):H("",!0)]),o("p",Mw,d(b.value),1),v.value?(g(),_("div",Rw,[o("a",{class:"btn primary",id:"firmware-download-link",href:y.value.href,download:y.value.name},d(a(c)("editor.firmware.download_file",{name:y.value.name})),9,Nw),te(O,{keypath:"editor.firmware.download_how",tag:"small",scope:"global"},{esphome_web:ne(()=>[o("a",{href:Dw,target:"_blank",rel:"noopener"},"ESPHome Web")]),_:1})])):H("",!0)]),o("pre",Fw,d((t.value?.logs||[]).join(`
`)),1)])}}}),jw={class:"panel wide alerts",id:"alerts-dialog"},Hw={class:"panel-head"},Vw={class:"tx"},Ww={class:"eyebrow"},Bw={key:0,class:"hint"},Kw={class:"alert-hero"},qw={class:"alert-mock",id:"alert-mock","aria-hidden":"true"},zw={class:"mdi alert-mock-icon",id:"alert-mock-icon"},Yw={id:"alert-mock-title"},Gw={id:"alert-mock-subtitle"},Jw={class:"fake",id:"alert-mock-button"},Xw=["aria-label"],Zw=["data-jump","onClick"],Qw={id:"alerts-try",class:"card"},ek={class:"field"},tk={class:"f-label",for:"try-screen"},nk={value:"all"},sk=["value","disabled"],ik={class:"field"},ok={class:"f-label",for:"try-title"},lk={class:"field"},ak={class:"f-label",for:"try-subtitle"},rk={class:"field"},ck={class:"f-label",for:"try-icon"},uk={id:"try-icons"},dk=["value"],fk={class:"field"},pk={class:"f-label",for:"try-color"},hk={value:""},mk=["value"],bk={class:"field"},vk={class:"f-label",for:"try-button"},gk={class:"field"},_k={class:"f-label",for:"try-timeout"},yk={class:"check field"},wk={class:"actions field wide"},kk=["disabled"],$k={class:"status-line",id:"try-result",role:"status"},xk={id:"alerts-screens",class:"card"},Sk={id:"alerts-min-firmware"},Ck={id:"alerts-screen-list",class:"options"},Tk={key:0,class:"hint"},Ek={class:"alert-screen-head"},Ak={class:"copy-label"},Pk=["onClick"],Ok={id:"alerts-howto",class:"card"},Ik={class:"steps"},Lk={class:"field"},Mk={class:"f-label",for:"alerts-example-screen"},Rk=["value"],Nk={key:0,value:""},Fk={class:"copy-line"},Dk={id:"alerts-example"},Uk={id:"alerts-all",class:"card"},jk={id:"alerts-all-event"},Hk={id:"alerts-all-dismiss"},Vk={class:"copy-line"},Wk={id:"alerts-all-example"},Bk={id:"alerts-fields",class:"card"},Kk={class:"table-scroll"},qk={id:"alerts-field-table"},zk={key:0},Yk={id:"alerts-icons",class:"card"},Gk={class:"subhead"},Jk={class:"chips",id:"alerts-suggested"},Xk=["onClick"],Zk={class:"mdi"},Qk={class:"field"},e3={class:"f-label",for:"alerts-icon-search"},t3=["placeholder"],n3={id:"alerts-icon-groups"},s3={class:"subhead"},i3={class:"alert-icon-grid"},o3=["title","onClick"],l3={class:"mdi"},a3={key:0},r3={key:0,class:"hint"},c3={id:"alerts-colors",class:"card"},u3={class:"swatches",id:"alerts-swatches"},d3=["onClick"],f3={id:"alerts-behaviour",class:"card"},p3={class:"alerts-list"},h3={id:"alerts-events",class:"card"},m3={id:"alerts-event-name"},b3={class:"table-scroll"},v3={id:"alerts-ending-table"},g3={class:"subhead"},_3={class:"copy-line"},y3={id:"alerts-wait-example"},w3={id:"alerts-tips",class:"card"},k3={class:"alerts-list"},$3=Me({__name:"AlertsView",setup(e){const t=$(()=>m.inventory.alerts),n=Bn({screen:"all",title:c("editor.alerts.example.title"),subtitle:c("editor.alerts.example.subtitle"),icon:"doorbell",color:"orange",button_text:c("editor.alerts.example.button"),timeout:30,flash:!0}),s=ke(!1),i=ke(""),l=$(()=>m.inventory.screens.filter(k=>Wn(k)&&k.online));async function r(){s.value=!0,i.value="";try{const{screen:k,...A}=n,z=await Pm(k,A),P=m.inventory.screens.find(G=>G.id===k)?.name,ge=k==="all"?c("editor.alerts.try.sent_all",z.sent):P?c("editor.alerts.try.sent_to",{name:P}):c("editor.alerts.try.sent_one");i.value=z.sent?[ge,z.skipped?c("editor.alerts.try.skipped",z.skipped):"",z.unusable?.length?c("editor.alerts.try.left_empty",{fields:z.unusable.join(", ")}):""].filter(Boolean).join(" "):c("editor.alerts.try.nothing",{version:t.value?.min_firmware||"0.2.31"})}catch(k){i.value=k.message}finally{s.value=!1}}const u=$(()=>m.inventory.icons),f=ke(""),h=ke(""),p=k=>`"${String(k).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,b=k=>k.type==="string"?/^[a-z][a-z0-9-]*$/.test(k.example)?k.example:p(k.example):k.example===!0?"true":k.example===!1?"false":String(k.example),v=$(()=>m.inventory.screens.filter(k=>k.alert_action)),y=$(()=>f.value||v.value[0]?.alert_action||""),M=$(()=>{const k=(t.value?.fields||[]).map(A=>` ${A.name}: ${b(A)}`);return`action: ${y.value||"esphome.<device_name>_show_alert"}
data:
${k.join(`
`)}`}),E=$(()=>["# Doorbell: show the alert and wait until someone presses the button.","actions:",` - action: ${y.value||"esphome.<device_name>_show_alert"}`," data:",' title: "Someone is at the door"',' subtitle: "Door 3, back"'," icon: doorbell"," color: orange",' button_text: "Coming"'," timeout: 0"," flash: true"," - wait_for_trigger:"," - trigger: event",` event_type: ${t.value?.event||"esphome.screen_alert"}`," event_data:"," action: ok",' timeout: "00:05:00"'," - if:"," - condition: template",' value_template: "{{ wait.trigger is not none }}"'," then:"," - action: notify.notify"," data:",' message: "Someone is coming to the door."'].join(`
`)),x=$(()=>{const k=(t.value?.fields||[]).map(z=>` ${z.name}: ${b(z)}`),A=t.value?.camera;return A&&k.push(` # ${A.name}: ${A.example} # a Guition shows its picture on the card`),`event: ${t.value?.broadcast?.show||"esp_screens_show_alert"}
event_data:
${k.join(`
`)}`}),O=$(()=>{if(!t.value||!u.value)return[];const k=h.value.trim().toLowerCase();return[...u.value.groups,{label:c("editor.alerts.icons.extra"),icons:t.value.extra_icons}].map(z=>({label:z.label,icons:z.icons.filter(P=>!k||P.name.includes(k)||(P.label||"").toLowerCase().includes(k))})).filter(z=>z.icons.length)}),C=$(()=>t.value?.suggested_icons?.find(k=>k.name==="doorbell")),F=$(()=>t.value?.colors?.find(k=>k.name==="orange")),T=k=>["string","int","bool"].includes(k)?c(`editor.alerts.fields.types.${k}`):k;function V(k){document.getElementById(k)?.scrollIntoView({behavior:"smooth",block:"start"})}const L=["alerts-try","alerts-screens","alerts-howto","alerts-all","alerts-fields","alerts-icons","alerts-colors","alerts-behaviour","alerts-events","alerts-tips"];return(k,A)=>{const z=Hs("i18n-t");return g(),_("div",jw,[o("div",Hw,[o("div",Vw,[o("span",Ww,d(a(c)("editor.alerts.eyebrow")),1),o("h1",null,d(a(c)("editor.alerts.title")),1),te(z,{keypath:"editor.alerts.intro",tag:"p",scope:"global"},{action:ne(()=>[...A[15]||(A[15]=[o("code",null,"show_alert",-1)])]),_:1})]),o("button",{type:"button",class:"btn quiet",id:"close-alerts",onClick:A[0]||(A[0]=P=>a(Ve)(""))},d(a(c)("editor.common.back")),1)]),t.value?(g(),_(B,{key:1},[o("div",Kw,[o("div",qw,[o("div",{class:"alert-mock-card",style:je(F.value?{background:F.value.color}:void 0)},[o("span",zw,d(C.value?a(Pe)(C.value.cp):""),1),o("strong",Yw,d(a(c)("editor.alerts.example.title")),1),o("span",Gw,d(a(c)("editor.alerts.example.subtitle")),1),o("span",Jw,d(a(c)("editor.alerts.example.button")),1)],4)]),o("nav",{class:"alerts-nav","aria-label":a(c)("editor.alerts.sections")},[(g(),_(B,null,he(L,P=>o("button",{key:P,type:"button","data-jump":P,onClick:ge=>V(P)},d(a(c)(`editor.alerts.nav.${P.slice(7)}`)),9,Zw)),64))],8,Xw)]),o("section",Qw,[o("h2",null,d(a(c)("editor.alerts.nav.try")),1),o("p",null,d(a(c)("editor.alerts.try.text")),1),o("form",{class:"try-grid",onSubmit:At(r,["prevent"])},[o("div",ek,[o("label",tk,d(a(c)("editor.alerts.try.screen")),1),Ae(o("select",{id:"try-screen","onUpdate:modelValue":A[1]||(A[1]=P=>n.screen=P)},[o("option",nk,d(a(c)("editor.alerts.try.all",{ready:l.value.length})),1),(g(!0),_(B,null,he(a(m).inventory.screens,P=>(g(),_("option",{key:P.id,value:P.id,disabled:!a(Wn)(P)||!P.online},d(a(Wn)(P)&&P.online?P.name:a(c)("editor.alerts.try.not_ready",{name:P.name})),9,sk))),128))],512),[[jn,n.screen]])]),o("div",ik,[o("label",ok,d(a(c)("editor.alerts.try.title")),1),Ae(o("input",{id:"try-title","onUpdate:modelValue":A[2]||(A[2]=P=>n.title=P),maxlength:"64"},null,512),[[Xe,n.title]])]),o("div",lk,[o("label",ak,d(a(c)("editor.alerts.try.subtitle")),1),Ae(o("input",{id:"try-subtitle","onUpdate:modelValue":A[3]||(A[3]=P=>n.subtitle=P),maxlength:"240"},null,512),[[Xe,n.subtitle]])]),o("div",rk,[o("label",ck,d(a(c)("editor.alerts.try.icon")),1),Ae(o("input",{id:"try-icon","onUpdate:modelValue":A[4]||(A[4]=P=>n.icon=P),list:"try-icons",placeholder:"doorbell"},null,512),[[Xe,n.icon]]),o("datalist",uk,[(g(!0),_(B,null,he(t.value.suggested_icons,P=>(g(),_("option",{key:P.name,value:P.name},d(P.label||P.name),9,dk))),128))])]),o("div",fk,[o("label",pk,d(a(c)("editor.alerts.try.color")),1),Ae(o("select",{id:"try-color","onUpdate:modelValue":A[5]||(A[5]=P=>n.color=P)},[o("option",hk,d(a(c)("editor.alerts.white")),1),(g(!0),_(B,null,he(t.value.colors,P=>(g(),_("option",{key:P.name,value:P.name},d(P.label),9,mk))),128))],512),[[jn,n.color]])]),o("div",bk,[o("label",vk,d(a(c)("editor.alerts.try.button")),1),Ae(o("input",{id:"try-button","onUpdate:modelValue":A[6]||(A[6]=P=>n.button_text=P),maxlength:"16"},null,512),[[Xe,n.button_text]])]),o("div",gk,[o("label",_k,d(a(c)("editor.alerts.try.timeout")),1),Ae(o("input",{id:"try-timeout","onUpdate:modelValue":A[7]||(A[7]=P=>n.timeout=P),type:"number",min:"0",max:"86400"},null,512),[[Xe,n.timeout,void 0,{number:!0}]])]),o("label",yk,[Ae(o("input",{type:"checkbox",id:"try-flash","onUpdate:modelValue":A[8]||(A[8]=P=>n.flash=P)},null,512),[[Xf,n.flash]]),o("span",null,[Re(d(a(c)("editor.alerts.try.flash")),1),o("small",null,d(a(c)("editor.alerts.try.flash_hint")),1)])]),o("div",wk,[o("button",{type:"submit",class:"btn primary",id:"try-send",disabled:s.value||!l.value.length},d(s.value?a(c)("editor.alerts.try.sending"):a(c)("editor.alerts.try.send")),9,kk),o("span",$k,d(i.value),1)])],32)]),o("section",xk,[o("h2",null,d(a(c)("editor.alerts.nav.screens")),1),te(z,{keypath:"editor.alerts.screens.text",tag:"p",scope:"global"},{version:ne(()=>[o("code",Sk,d(t.value.min_firmware),1)]),_:1}),o("div",Ck,[a(m).inventory.screens.length?H("",!0):(g(),_("p",Tk,d(a(c)("editor.alerts.screens.none")),1)),(g(!0),_(B,null,he(a(m).inventory.screens,P=>(g(),_("div",{key:P.id,class:"alert-screen"},[o("div",Ek,[o("strong",null,d(P.name),1),o("span",{class:me(["chip",a(cn)(a(ss)(P),t.value.min_firmware)&&P.alert_action?"good":"update"])},d(a(cn)(a(ss)(P),t.value.min_firmware)&&P.alert_action?a(c)("editor.alerts.screens.ready",{version:P.firmware}):P.alert_action?a(c)("editor.alerts.screens.update",{version:P.firmware||a(c)("editor.common.unknown")}):a(c)("editor.alerts.screens.unknown")),3)]),(g(!0),_(B,null,he([[a(c)("editor.alerts.screens.show"),P.alert_action],[a(c)("editor.alerts.screens.dismiss"),P.dismiss_action]],([ge,G])=>(g(),_("div",{key:ge,class:"copy-line"},[o("span",Ak,d(ge),1),o("code",null,d(G||"esphome.<device_name>_show_alert"),1),G?(g(),_("button",{key:0,type:"button",class:"btn quiet mini",onClick:ie=>a(Ot)(G,void 0,"action_name")},d(a(c)("editor.common.copy")),9,Pk)):H("",!0)]))),128))]))),128))])]),o("section",Ok,[o("h2",null,d(a(c)("editor.alerts.nav.howto")),1),o("ol",Ik,[te(z,{keypath:"editor.alerts.howto.add",tag:"li",scope:"global"},{add:ne(()=>[o("b",null,d(a(c)("editor.alerts.howto.add_bold")),1)]),esphome:ne(()=>[...A[16]||(A[16]=[o("b",null,"ESPHome",-1)])]),device:ne(()=>[o("i",null,d(a(c)("editor.alerts.howto.device")),1)]),_:1}),te(z,{keypath:"editor.alerts.howto.fields",tag:"li",scope:"global"},{bold:ne(()=>[o("b",null,d(a(c)("editor.alerts.howto.fields_bold")),1)]),empty:ne(()=>[...A[17]||(A[17]=[o("code",null,'""',-1)])]),zero:ne(()=>[...A[18]||(A[18]=[o("code",null,"0",-1)])]),_:1}),te(z,{keypath:"editor.alerts.howto.yaml",tag:"li",scope:"global"},{edit:ne(()=>[o("b",null,d(a(c)("editor.alerts.edit_yaml")),1)]),_:1})]),o("div",Lk,[o("label",Mk,d(a(c)("editor.alerts.howto.example_for")),1),Ae(o("select",{id:"alerts-example-screen","onUpdate:modelValue":A[9]||(A[9]=P=>f.value=P),style:{"max-width":"360px"}},[(g(!0),_(B,null,he(v.value,P=>(g(),_("option",{key:P.id,value:P.alert_action},d(P.name),9,Rk))),128)),v.value.length?H("",!0):(g(),_("option",Nk,d(a(c)("editor.alerts.howto.no_screen")),1))],512),[[jn,f.value]])]),o("div",Fk,[o("pre",Dk,d(M.value),1),o("button",{type:"button",class:"btn quiet mini",id:"alerts-example-copy",onClick:A[10]||(A[10]=P=>a(Ot)(M.value,void 0,"yaml"))},d(a(c)("editor.alerts.copy_yaml")),1)])]),o("section",Uk,[o("h2",null,d(a(c)("editor.alerts.all.title")),1),te(z,{keypath:"editor.alerts.all.text",tag:"p",scope:"global"},{show:ne(()=>[o("code",jk,d(t.value.broadcast?.show||"esp_screens_show_alert"),1)]),dismiss:ne(()=>[o("code",Hk,d(t.value.broadcast?.dismiss||"esp_screens_dismiss_alert"),1)]),event:ne(()=>[o("b",null,d(a(c)("editor.alerts.all.event")),1)]),edit:ne(()=>[o("b",null,d(a(c)("editor.alerts.edit_yaml")),1)]),_:1}),o("div",Vk,[o("pre",Wk,d(x.value),1),o("button",{type:"button",class:"btn quiet mini",id:"alerts-all-copy",onClick:A[11]||(A[11]=P=>a(Ot)(x.value,void 0,"yaml"))},d(a(c)("editor.alerts.copy_yaml")),1)])]),o("section",Bk,[o("h2",null,d(a(c)("editor.alerts.nav.fields")),1),o("p",null,d(a(c)("editor.alerts.fields.text")),1),o("div",Kk,[o("table",qk,[o("tr",null,[o("th",null,d(a(c)("editor.alerts.fields.field")),1),o("th",null,d(a(c)("editor.alerts.fields.type")),1),o("th",null,d(a(c)("editor.alerts.fields.what")),1),o("th",null,d(a(c)("editor.alerts.fields.example")),1),o("th",null,d(a(c)("editor.alerts.fields.limit")),1)]),(g(!0),_(B,null,he(t.value.fields,P=>(g(),_("tr",{key:P.name},[o("td",null,[o("code",null,d(P.name),1),o("small",null,d(P.label),1)]),o("td",null,d(T(P.type)),1),o("td",null,d(P.help),1),o("td",null,[o("code",null,d(typeof P.example=="string"?P.example:String(P.example)),1)]),o("td",null,d(t.value.limits.cyd[P.name]?a(c)("editor.alerts.fields.bytes",{cyd:t.value.limits.cyd[P.name],guition:t.value.limits.guition[P.name]}):P.type==="int"?a(c)("editor.alerts.fields.seconds"):"—"),1)]))),128)),t.value.camera?(g(),_("tr",zk,[o("td",null,[o("code",null,d(t.value.camera.name),1),o("small",null,d(t.value.camera.label),1)]),o("td",null,d(a(c)("editor.alerts.fields.types.entity")),1),o("td",null,d(t.value.camera.help),1),o("td",null,[o("code",null,d(t.value.camera.example),1)]),o("td",null,d(a(c)("editor.alerts.fields.camera_limit")),1)])):H("",!0)])])]),o("section",Yk,[o("h2",null,d(a(c)("editor.alerts.nav.icons")),1),te(z,{keypath:"editor.alerts.icons.text",tag:"p",scope:"global"},{field:ne(()=>[...A[19]||(A[19]=[o("code",null,"icon",-1)])]),example:ne(()=>[...A[20]||(A[20]=[o("code",null,"doorbell",-1)])]),mdi:ne(()=>[...A[21]||(A[21]=[o("code",null,"mdi:doorbell",-1)])]),hex:ne(()=>[...A[22]||(A[22]=[o("code",null,"F12E6",-1)])]),_:1}),o("p",Gk,d(a(c)("editor.alerts.icons.handy")),1),o("div",Jk,[(g(!0),_(B,null,he(t.value.suggested_icons,P=>(g(),_("button",{key:P.name,type:"button",class:"chip",onClick:ge=>a(Ot)(P.name,void 0,"icon_name")},[o("span",Zk,d(a(Pe)(P.cp)),1),o("code",null,d(P.name),1)],8,Xk))),128))]),o("div",Qk,[o("label",e3,d(a(c)("editor.alerts.icons.search_label")),1),Ae(o("input",{id:"alerts-icon-search","onUpdate:modelValue":A[12]||(A[12]=P=>h.value=P),type:"search",placeholder:a(c)("editor.alerts.icons.search"),autocomplete:"off"},null,8,t3),[[Xe,h.value]])]),o("div",n3,[(g(!0),_(B,null,he(O.value,P=>(g(),_("div",{key:P.label,class:"field"},[o("p",s3,d(P.label)+" · "+d(P.icons.length),1),o("div",i3,[(g(!0),_(B,null,he(P.icons,ge=>(g(),_("button",{key:ge.name,type:"button",class:"alert-icon",title:a(c)("editor.alerts.icons.copy",{name:ge.name}),onClick:G=>a(Ot)(ge.name,void 0,"icon_name")},[o("span",l3,d(a(Pe)(ge.cp)),1),o("code",null,d(ge.name),1),ge.label?(g(),_("small",a3,d(ge.label),1)):H("",!0)],8,o3))),128))])]))),128)),O.value.length?H("",!0):(g(),_("p",r3,d(a(c)("editor.alerts.icons.none",{query:h.value,fallback:t.value.fallback_icon})),1))])]),o("section",c3,[o("h2",null,d(a(c)("editor.alerts.nav.colors")),1),te(z,{keypath:"editor.alerts.colors.text",tag:"p",scope:"global"},{field:ne(()=>[...A[23]||(A[23]=[o("code",null,"color",-1)])]),_:1}),o("div",u3,[o("button",{type:"button",class:"swatch",onClick:A[13]||(A[13]=P=>a(Ot)("",void 0,"empty_color"))},[A[25]||(A[25]=o("i",{style:{background:"#ffffff"}},null,-1)),o("span",null,[A[24]||(A[24]=o("code",null,"empty",-1)),o("small",null,d(a(c)("editor.alerts.white")),1)])]),(g(!0),_(B,null,he(t.value.colors,P=>(g(),_("button",{key:P.name,type:"button",class:"swatch",onClick:ge=>a(Ot)(P.name,void 0,"color_name")},[o("i",{style:je({background:P.color})},null,4),o("span",null,[o("code",null,d(P.name),1),o("small",null,d(P.label)+" · "+d(P.color),1)])],8,d3))),128))])]),o("section",f3,[o("h2",null,d(a(c)("editor.alerts.nav.behaviour")),1),o("ul",p3,[te(z,{keypath:"editor.alerts.behaviour.wakes",tag:"li",scope:"global"},{bold:ne(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.wakes_bold")),1)]),_:1}),te(z,{keypath:"editor.alerts.behaviour.on",tag:"li",scope:"global"},{bold:ne(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.on_bold")),1)]),_:1}),te(z,{keypath:"editor.alerts.behaviour.timeout",tag:"li",scope:"global"},{bold:ne(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.timeout_bold")),1)]),zero:ne(()=>[...A[26]||(A[26]=[o("code",null,"timeout: 0",-1)])]),minute:ne(()=>[...A[27]||(A[27]=[o("code",null,"timeout: 60",-1)])]),_:1}),te(z,{keypath:"editor.alerts.behaviour.blinking",tag:"li",scope:"global"},{bold:ne(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.blinking_bold")),1)]),flash:ne(()=>[...A[28]||(A[28]=[o("code",null,"flash: true",-1)])]),_:1}),te(z,{keypath:"editor.alerts.behaviour.replacing",tag:"li",scope:"global"},{bold:ne(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.replacing_bold")),1)]),replaced:ne(()=>[...A[29]||(A[29]=[o("code",null,"replaced",-1)])]),_:1}),te(z,{keypath:"editor.alerts.behaviour.closing",tag:"li",scope:"global"},{bold:ne(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.closing_bold")),1)]),dismiss:ne(()=>[...A[30]||(A[30]=[o("code",null,"dismiss_alert",-1)])]),_:1}),te(z,{keypath:"editor.alerts.behaviour.beside",tag:"li",scope:"global"},{bold:ne(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.beside_bold")),1)]),_:1})])]),o("section",h3,[o("h2",null,d(a(c)("editor.alerts.nav.events")),1),te(z,{keypath:"editor.alerts.events.text",tag:"p",scope:"global"},{event:ne(()=>[o("code",m3,d(t.value.event),1)]),action:ne(()=>[...A[31]||(A[31]=[o("code",null,"action",-1)])]),title:ne(()=>[...A[32]||(A[32]=[o("code",null,"title",-1)])]),screen:ne(()=>[...A[33]||(A[33]=[o("code",null,"screen",-1)])]),device_id:ne(()=>[...A[34]||(A[34]=[o("code",null,"device_id",-1)])]),_:1}),o("div",b3,[o("table",v3,[o("tr",null,[A[35]||(A[35]=o("th",null,"action",-1)),o("th",null,d(a(c)("editor.alerts.events.when")),1)]),(g(!0),_(B,null,he(t.value.endings,P=>(g(),_("tr",{key:P.action},[o("td",null,[o("code",null,d(P.action),1)]),o("td",null,d(P.label),1)]))),128))])]),o("p",g3,d(a(c)("editor.alerts.events.wait")),1),o("div",_3,[o("pre",y3,d(E.value),1),o("button",{type:"button",class:"btn quiet mini",id:"alerts-wait-copy",onClick:A[14]||(A[14]=P=>a(Ot)(E.value,void 0,"yaml"))},d(a(c)("editor.alerts.copy_yaml")),1)])]),o("section",w3,[o("h2",null,d(a(c)("editor.alerts.nav.tips")),1),o("ul",k3,[te(z,{keypath:"editor.alerts.tips.color",tag:"li",scope:"global"},{bold:ne(()=>[o("b",null,d(a(c)("editor.alerts.tips.color_bold")),1)]),_:1}),te(z,{keypath:"editor.alerts.tips.short",tag:"li",scope:"global"},{bold:ne(()=>[o("b",null,d(a(c)("editor.alerts.tips.short_bold")),1)]),_:1}),te(z,{keypath:"editor.alerts.tips.button",tag:"li",scope:"global"},{bold:ne(()=>[o("b",null,d(a(c)("editor.alerts.tips.button_bold")),1)]),_:1}),te(z,{keypath:"editor.alerts.tips.resolve",tag:"li",scope:"global"},{dismiss:ne(()=>[...A[36]||(A[36]=[o("code",null,"dismiss_alert",-1)])]),_:1}),te(z,{keypath:"editor.alerts.tips.every",tag:"li",scope:"global"},{event:ne(()=>[o("code",null,d(t.value.broadcast?.show||"esp_screens_show_alert"),1)]),screen:ne(()=>[...A[37]||(A[37]=[o("code",null,"screen",-1)])]),_:1}),te(z,{keypath:"editor.alerts.tips.claude",tag:"li",scope:"global"},{bold:ne(()=>[o("b",null,d(a(c)("editor.alerts.tips.claude_bold")),1)]),_:1})])])],64)):(g(),_("p",Bw,d(a(c)("editor.alerts.loading")),1))])}}}),x3={class:"panel",id:"override-dialog"},S3={class:"panel-head"},C3={class:"tx"},T3={class:"eyebrow"},E3={id:"override-title"},A3={class:"notice"},P3={class:"mdi"},O3={class:"file-row"},I3={id:"override-file"},L3={class:"yaml-editor",id:"yaml-editor-wrap"},M3=["aria-label"],R3={class:"actions"},N3={id:"override-count",class:"hint"},F3={class:"actions"},D3=["disabled"],U3=["disabled"],j3=`# Hardware-specific changes for this screen.
# This file is kept when the shared firmware package updates.
# Do not add esphome:, api:, ota:, wifi: or packages: here.
# Example: a CYD with the ST7789V display controller.
# "!extend" changes the display the shared package already defines;
# a bare id would add a second, incomplete display and fail the build.
display:
- id: !extend my_display
model: ST7789V
`,H3=Me({__name:"OverrideView",setup(e){const t=$(()=>m.overrideProfile),n=ke(""),s=ke(""),i=ke(!1),l=ke(c("editor.common.loading")),r=ke(""),u=ke(!1),f=ke(null),h=ke(null),p=$(()=>n.value.split(`
`).length),b=$(()=>Array.from({length:p.value},(L,k)=>k+1).join(`
`)),v=$(()=>`${c("editor.override.characters",n.value.length)} · ${c("editor.override.lines",p.value)}`);let y=!0;function M(L,k=""){l.value=L,r.value=k}async function E(){if(!t.value){M(c("editor.override.no_profile"),"error");return}M(c("editor.common.loading"));try{const L=await Rt(`firmware/profiles/${encodeURIComponent(t.value)}/override`);s.value=L.override_file,i.value=!!L.attached,n.value=L.exists&&L.content!==`{}
`?L.content:"",M(c(L.attached?"editor.override.attached":"editor.override.not_attached"))}catch(L){M(L.message,"error")}}async function x(L=!1){if(!(!t.value||u.value)){u.value=!0,M(c("editor.override.saving"));try{const k=await ft(`firmware/profiles/${encodeURIComponent(t.value)}/override`,"PUT",{content:n.value});if(s.value=k.override_file,i.value=!0,!L){M(c("editor.override.saved"),"ok"),Ce(c("editor.override.saved_toast"));return}M(c("editor.override.checking")),await ft("firmware/jobs","POST",{file:t.value,action:"validate"}),O()}catch(k){M(k.message,"error")}finally{u.value=!1}}}function O(){const L=Date.now(),k=t.value,A=async()=>{if(!(!y||t.value!==k))try{const z=await Rt("firmware"),P=z.job;if(P&&P.file===k&&P.state==="running")M(P.stage?c("editor.override.checking_stage",{stage:P.stage}):c("editor.override.checking_profile"));else if(P&&P.file===k&&P.state==="success"){M(c("editor.override.valid"),"ok");return}else if(P&&P.file===k&&P.state==="failed"){const ge=(z.logs||[]).filter(G=>/error|failed/i.test(G)).pop();M(ge||c("editor.override.rejected"),"error");return}Date.now()-L<72e5&&setTimeout(A,1200)}catch(z){M(z.message,"error")}};A()}function C(){(!n.value.trim()||confirm(c("editor.override.confirm_example")))&&(n.value=j3,M(c("editor.override.example_loaded")),f.value?.focus())}function F(){(!n.value.trim()||confirm(c("editor.override.confirm_clear")))&&(n.value="",M(c("editor.override.cleared")),f.value?.focus())}function T(L){const k=f.value;if(L.key==="Tab"){L.preventDefault();const A=k.selectionStart,z=k.selectionEnd;k.setRangeText(" ",A,z,"end"),n.value=k.value}else(L.ctrlKey||L.metaKey)&&L.key.toLowerCase()==="s"&&(L.preventDefault(),x(!1))}function V(){h.value&&f.value&&(h.value.scrollTop=f.value.scrollTop)}return Tn(E),os(()=>{y=!1}),(L,k)=>(g(),_("div",x3,[o("div",S3,[o("div",C3,[o("span",T3,d(a(c)("editor.override.eyebrow")),1),o("h1",E3,d(a(m).overrideFriendly?a(c)("editor.override.title_named",{name:a(m).overrideFriendly}):a(c)("editor.override.title")),1),o("p",null,d(a(c)("editor.override.intro")),1)]),o("button",{type:"button",class:"btn quiet",id:"close-override",onClick:k[0]||(k[0]=A=>a(Ve)(""))},d(a(c)("editor.common.back")),1)]),o("div",A3,[o("span",P3,d(a(Pe)("F0493")),1),o("div",null,[o("strong",null,d(a(c)("editor.override.safe_title")),1),o("span",null,d(a(c)("editor.override.safe_text")),1)])]),o("div",O3,[o("code",I3,d(s.value||t.value||""),1),o("span",{id:"override-state",class:me(["chip",{good:i.value}])},d(i.value?a(c)("editor.override.active"):a(c)("editor.override.ready")),3)]),o("div",L3,[o("div",{ref_key:"gutter",ref:h,class:"yaml-gutter",id:"override-gutter","aria-hidden":"true"},d(b.value),513),Ae(o("textarea",{ref_key:"editor",ref:f,id:"override-editor","onUpdate:modelValue":k[1]||(k[1]=A=>n.value=A),spellcheck:"false",autocapitalize:"off",autocomplete:"off",autocorrect:"off","aria-label":a(c)("editor.override.editor_label"),placeholder:`# Example
display:
- id: !extend my_display
model: ST7789V`,onKeydown:T,onScroll:V},null,40,M3),[[Xe,n.value]])]),o("div",R3,[o("button",{type:"button",class:"btn quiet mini",id:"override-example",onClick:C},d(a(c)("editor.override.use_example")),1),o("button",{type:"button",class:"btn quiet mini",id:"override-empty",onClick:F},d(a(c)("editor.override.clear")),1),o("span",N3,d(v.value),1)]),o("p",{id:"override-status",class:me(["status-line",r.value]),role:"status"},d(l.value),3),o("div",F3,[o("button",{type:"button",class:"btn quiet",id:"override-check",disabled:u.value||!t.value,onClick:k[2]||(k[2]=A=>x(!0))},d(a(c)("editor.override.save_check")),9,D3),o("button",{type:"button",class:"btn primary",id:"override-save",disabled:u.value||!t.value,onClick:k[3]||(k[3]=A=>x(!1))},d(a(c)("editor.override.save")),9,U3)])]))}}),V3={class:"main"},W3=Me({__name:"App",setup(e){const t=$(()=>kt.value==="#settings"?h2:kt.value==="#new-screen"?uw:kt.value==="#firmware"?Uw:kt.value==="#alerts"?$3:kt.value==="#override"?H3:_t.value&&m.layout?b1:_1);function n(s){(s.metaKey||s.ctrlKey)&&s.key.toLowerCase()==="k"&&(s.preventDefault(),m.palette=!m.palette)}return Tn(()=>document.addEventListener("keydown",n)),os(()=>document.removeEventListener("keydown",n)),(s,i)=>(g(),_("div",{class:me(["app",{dragging:a(m).drag.active}])},[te(Ob),o("main",V3,[(g(),it(Hd(t.value)))]),te(Lb),te(Kb)],2))}});Jh().finally(()=>{ip(W3).use(ls).mount("#app"),Gm()});