Files
homeassistant_espscreen/screen_manager/app/static/assets/index-C4Uqwn3z.js
T
Xandrossian 9857cc3bda
CI / checks (push) Successful in 12m50s
CI / firmware (add-on) (push) Successful in 18m19s
CI / firmware (min_version) (push) Successful in 17m55s
Add the Elecrow CrowPanel 7.0" as a third board, and take the packages and the add-on from Gitea (0.2.93)
A board file for the Elecrow CrowPanel 7.0" (DIS08070H, ESP32-S3-WROOM-1-N4R8): 800x480 through mipi_rgb, GT911 on the
ESP32-S3's USB pins (elecrow_usb_phy.h frees them, behind a flag only this board sets), the Guition's vertical sizes
across a wider page, no rotation. Its 4 MB of flash take the CYD's budget: a partition table of the component's
(smart_display: partitions: 4mb_wide_slots, 1,984 KB slots), the icon fonts at 2 bits a pixel and the TLS client only
bring the firmware to 1,865,440 bytes, 91.8 % of a slot, with camera images kept. docs/ELECROW.md has the numbers and
the trade.

The add-on reads a large board's name from the type sensor's value, the editor offers the board under New screen and
draws the wide preview, tools/check.sh builds it with the budget, render_topbar and capture_ui take the panel's size.
Firmware 0.2.79; the CYD image is unchanged (1,633,760 bytes).

This fork builds from gittea.trippedonmy.name/Xandrossian/homeassistant_espscreen: the packages, the fonts, the
component and the add-on repository point there instead of GitHub.
2026-09-20 23:18:01 -07:00

29 lines
327 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 Xo(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Re={},Un=[],Kt=()=>{},mr=()=>!1,Ei=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ai=e=>e.startsWith("onUpdate:"),tt=Object.assign,Zo=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Du=Object.prototype.hasOwnProperty,Ee=(e,t)=>Du.call(e,t),pe=Array.isArray,wn=e=>Hs(e)==="[object Map]",rn=e=>Hs(e)==="[object Set]",Ll=e=>Hs(e)==="[object Date]",_e=e=>typeof e=="function",We=e=>typeof e=="string",qt=e=>typeof e=="symbol",Pe=e=>e!==null&&typeof e=="object",br=e=>(Pe(e)||_e(e))&&_e(e.then)&&_e(e.catch),vr=Object.prototype.toString,Hs=e=>vr.call(e),Uu=e=>Hs(e).slice(8,-1),gr=e=>Hs(e)==="[object Object]",Qo=e=>We(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,ys=Xo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Pi=e=>{const t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},ju=/-\w/g,ct=Pi(e=>e.replace(ju,t=>t.slice(1).toUpperCase())),Hu=/\B([A-Z])/g,En=Pi(e=>e.replace(Hu,"-$1").toLowerCase()),Oi=Pi(e=>e.charAt(0).toUpperCase()+e.slice(1)),Gi=Pi(e=>e?`on${Oi(e)}`:""),Bt=(e,t)=>!Object.is(e,t),si=(e,...t)=>{for(let n=0;n<e.length;n++)e[n](...t)},_r=(e,t,n,s=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Ii=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Ml;const Li=()=>Ml||(Ml=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Ue(e){if(pe(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],i=We(s)?Ku(s):Ue(s);if(i)for(const l in i)t[l]=i[l]}return t}else if(We(e)||Pe(e))return e}const Vu=/;(?![^(]*\))/g,Wu=/:([^]+)/,Bu=/"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;function Ku(e){const t={};return e.replace(Bu,n=>n.startsWith("/*")?"":n).split(Vu).forEach(n=>{if(n){const s=n.split(Wu);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function he(e){let t="";if(We(e))t=e;else if(pe(e))for(let n=0;n<e.length;n++){const s=he(e[n]);s&&(t+=s+" ")}else if(Pe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}const zu="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",qu=Xo(zu);function yr(e){return!!e||e===""}function Yu(e,t,n){if(e.length!==t.length)return!1;let s=!0;for(let i=0;s&&i<e.length;i++)s=Rt(e[i],t[i],n);return s}function Rl(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]&&Rt(l,s[u],n)){r=u;break}if(r<0)return!1;i[r]=1}return!0}function Gu(e,t,n){let s=wn(e),i=wn(t);if(s||i||(s=rn(e),i=rn(t),s||i))return s&&i?Rl(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||!Rt(e[u],t[u],n))return!1}return String(e)===String(t)}function Nl(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 Rt(e,t,n){if(e===t)return!0;let s=Ll(e),i=Ll(t);return s||i?s&&i?e.getTime()===t.getTime():!1:(s=qt(e),i=qt(t),s||i?e===t:(s=pe(e),i=pe(t),s||i?s&&i?Nl(e,t,n,Yu):!1:(s=Pe(e),i=Pe(t),s||i?!s||!i?!1:Nl(e,t,n,Gu):String(e)===String(t))))}function el(e,t){return e.findIndex(n=>Rt(n,t))}const wr=e=>!!(e&&e.__v_isRef===!0),d=e=>We(e)?e:e==null?"":pe(e)||Pe(e)&&(e.toString===vr||!_e(e.toString))?wr(e)?d(e.value):JSON.stringify(e,kr,2):String(e),kr=(e,t)=>wr(t)?kr(e,t.value):wn(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,i],l)=>(n[Ji(s,l)+" =>"]=i,n),{})}:rn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ji(n))}:qt(t)?Ji(t):Pe(t)&&!pe(t)&&!gr(t)?String(t):t,Ji=(e,t="")=>{var n;return qt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};let Je;class $r{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 Ju(e){return new $r(e)}function xr(){return Je}function Xu(e,t=!1){Je&&Je.cleanups.push(e)}let Ne;const Xi=new WeakSet;class Sr{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,Xi.has(this)&&(Xi.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||Tr(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,Fl(this),Er(this);const t=Ne,n=Mt;Ne=this,Mt=!0;try{return this.fn()}finally{Ar(this),Ne=t,Mt=n,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)sl(t);this.deps=this.depsTail=void 0,Fl(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?Xi.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){wo(this)&&this.run()}get dirty(){return wo(this)}}let Cr=0,ws,ks;function Tr(e,t=!1){if(e.flags|=8,t){e.next=ks,ks=e;return}e.next=ws,ws=e}function tl(){Cr++}function nl(){if(--Cr>0)return;if(ks){let t=ks;for(ks=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;ws;){let t=ws;for(ws=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 Er(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ar(e){let t,n=e.depsTail,s=n;for(;s;){const i=s.prevDep;s.version===-1?(s===n&&(n=i),sl(s),Zu(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=i}e.deps=t,e.depsTail=n}function wo(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Pr(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Pr(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Ts)||(e.globalVersion=Ts,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!wo(e))))return;e.flags|=2;const t=e.dep,n=Ne,s=Mt;Ne=e,Mt=!0;try{Er(e);const i=e.fn(e._value);(t.version===0||Bt(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Ne=n,Mt=s,Ar(e),e.flags&=-3}}function sl(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)sl(l,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function Zu(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Mt=!0;const Or=[];function cn(){Or.push(Mt),Mt=!1}function un(){const e=Or.pop();Mt=e===void 0?!0:e}function Fl(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ne;Ne=void 0;try{t()}finally{Ne=n}}}let Ts=0;class Qu{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 il{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(!Ne||!Mt||Ne===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ne)n=this.activeLink=new Qu(Ne,this),Ne.deps?(n.prevDep=Ne.depsTail,Ne.depsTail.nextDep=n,Ne.depsTail=n):Ne.deps=Ne.depsTail=n,Ir(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=Ne.depsTail,n.nextDep=void 0,Ne.depsTail.nextDep=n,Ne.depsTail=n,Ne.deps===n&&(Ne.deps=s)}return n}trigger(t){this.version++,Ts++,this.notify(t)}notify(t){tl();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{nl()}}}function Ir(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)Ir(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ko=new WeakMap,Hn=Symbol(""),$o=Symbol(""),Es=Symbol("");function nt(e,t,n){if(Mt&&Ne){let s=ko.get(e);s||ko.set(e,s=new Map);let i=s.get(n);i||(s.set(n,i=new il),i.map=s,i.key=n),i.track()}}function en(e,t,n,s,i,l){const r=ko.get(e);if(!r){Ts++;return}const u=f=>{f&&f.trigger()};if(tl(),t==="clear")r.forEach(u);else{const f=pe(e),h=f&&Qo(n);if(f&&n==="length"){const p=Number(s);r.forEach((b,v)=>{(v==="length"||v===Es||!qt(v)&&v>=p)&&u(b)})}else switch((n!==void 0||r.has(void 0))&&u(r.get(n)),h&&u(r.get(Es)),t){case"add":f?h&&u(r.get("length")):(u(r.get(Hn)),wn(e)&&u(r.get($o)));break;case"delete":f||(u(r.get(Hn)),wn(e)&&u(r.get($o)));break;case"set":wn(e)&&u(r.get(Hn));break}}nl()}function Gn(e){const t=xe(e);return t===e||(nt(t,"iterate",Es),Ct(e))?t:Yt(e)?kn(e)?t.map(n=>$n(Pt(n))):t.map($n):t.map(Pt)}function Mi(e){return nt(e=xe(e),"iterate",Es),e}function Vt(e,t){return Yt(e)?$n(kn(e)?Pt(t):t):Pt(t)}const ed={__proto__:null,[Symbol.iterator](){return Zi(this,Symbol.iterator,e=>Vt(this,e))},concat(...e){return Gn(this).concat(...e.map(t=>pe(t)?Gn(t):t))},entries(){return Zi(this,"entries",e=>(e[1]=Vt(this,e[1]),e))},every(e,t){return Gt(this,"every",e,t,void 0,arguments)},filter(e,t){return Gt(this,"filter",e,t,n=>n.map(s=>Vt(this,s)),arguments)},find(e,t){return Gt(this,"find",e,t,n=>Vt(this,n),arguments)},findIndex(e,t){return Gt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Gt(this,"findLast",e,t,n=>Vt(this,n),arguments)},findLastIndex(e,t){return Gt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Gt(this,"forEach",e,t,void 0,arguments)},includes(...e){return Qi(this,"includes",e)},indexOf(...e){return Qi(this,"indexOf",e)},join(e){return Gn(this).join(e)},lastIndexOf(...e){return Qi(this,"lastIndexOf",e)},map(e,t){return Gt(this,"map",e,t,void 0,arguments)},pop(){return ds(this,"pop")},push(...e){return ds(this,"push",e)},reduce(e,...t){return Dl(this,"reduce",e,t)},reduceRight(e,...t){return Dl(this,"reduceRight",e,t)},shift(){return ds(this,"shift")},some(e,t){return Gt(this,"some",e,t,void 0,arguments)},splice(...e){return ds(this,"splice",e)},toReversed(){return Gn(this).toReversed()},toSorted(e){return Gn(this).toSorted(e)},toSpliced(...e){return Gn(this).toSpliced(...e)},unshift(...e){return ds(this,"unshift",e)},values(){return Zi(this,"values",e=>Vt(this,e))}};function Zi(e,t,n){const s=Mi(e),i=s[t]();return s!==e&&!Ct(e)&&(i._next=i.next,i.next=()=>{const l=i._next();return l.done||(l.value=n(l.value)),l}),i}const td=Array.prototype;function Gt(e,t,n,s,i,l){const r=Mi(e),u=r!==e&&!Ct(e),f=r[t];if(f!==td[t]){const b=f.apply(e,l);return u?Pt(b):b}let h=n;r!==e&&(u?h=function(b,v){return n.call(this,Vt(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 Dl(e,t,n,s){const i=Mi(e),l=i!==e&&!Ct(e);let r=n,u=!1;i!==e&&(l?(u=s.length===0,r=function(h,p,b){return u&&(u=!1,h=Vt(e,h)),n.call(this,h,Vt(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?Vt(e,f):f}function Qi(e,t,n){const s=xe(e);nt(s,"iterate",Es);const i=s[t](...n);return(i===-1||i===!1)&&al(n[0])?(n[0]=xe(n[0]),s[t](...n)):i}function ds(e,t,n=[]){cn(),tl();const s=xe(e)[t].apply(e,n);return nl(),un(),s}const nd=Xo("__proto__,__v_isRef,__isVue"),Lr=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(qt));function sd(e){qt(e)||(e=String(e));const t=xe(this);return nt(t,"has",e),t.hasOwnProperty(e)}class Mr{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?pd:Dr:l?Fr:Nr).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const r=pe(t);if(!i){let f;if(r&&(f=ed[n]))return f;if(n==="hasOwnProperty")return sd}const u=Reflect.get(t,n,et(t)?t:s);if((qt(n)?Lr.has(n):nd(n))||(i||nt(t,"get",n),l))return u;if(et(u)){const f=r&&Qo(n)?u:u.value;return i&&Pe(f)?So(f):f}return Pe(u)?i?So(u):qn(u):u}}class Rr extends Mr{constructor(t=!1){super(!1,t)}set(t,n,s,i){let l=t[n];const r=pe(t)&&Qo(n);if(!this._isShallow){const h=Yt(l);if(!Ct(s)&&!Yt(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?Bt(s,l)&&en(t,"set",n,s):en(t,"add",n,s)),f}deleteProperty(t,n){const s=Ee(t,n);t[n];const i=Reflect.deleteProperty(t,n);return i&&s&&en(t,"delete",n,void 0),i}has(t,n){const s=Reflect.has(t,n);return(!qt(n)||!Lr.has(n))&&nt(t,"has",n),s}ownKeys(t){return nt(t,"iterate",pe(t)?"length":Hn),Reflect.ownKeys(t)}}class id extends Mr{constructor(t=!1){super(!0,t)}set(t,n){return!0}deleteProperty(t,n){return!0}}const od=new Rr,ld=new id,ad=new Rr(!0);const xo=e=>e,Gs=e=>Reflect.getPrototypeOf(e);function rd(e,t,n){return function(...s){const i=this.__v_raw,l=xe(i),r=wn(l),u=e==="entries"||e===Symbol.iterator&&r,f=e==="keys"&&r,h=i[e](...s),p=n?xo:t?$n:Pt;return!t&&nt(l,"iterate",f?$o:Hn),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 Js(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function cd(e,t){const n={get(i){const l=this.__v_raw,r=xe(l),u=xe(i);e||(Bt(i,u)&&nt(r,"get",i),nt(r,"get",u));const{has:f}=Gs(r),h=t?xo:e?$n:Pt;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",Hn),i.size},has(i){const l=this.__v_raw,r=xe(l),u=xe(i);return e||(Bt(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?xo:e?$n:Pt;return!e&&nt(f,"iterate",Hn),u.forEach((p,b)=>i.call(l,h(p),h(b),r))}};return tt(n,e?{add:Js("add"),set:Js("set"),delete:Js("delete"),clear:Js("clear")}:{add(i){const l=xe(this),r=Gs(l),u=xe(i),f=!t&&!Ct(i)&&!Yt(i)?u:i;return r.has.call(l,f)||Bt(i,f)&&r.has.call(l,i)||Bt(u,f)&&r.has.call(l,u)||(l.add(f),en(l,"add",f,f)),this},set(i,l){!t&&!Ct(l)&&!Yt(l)&&(l=xe(l));const r=xe(this),{has:u,get:f}=Gs(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?Bt(l,p)&&en(r,"set",i,l):en(r,"add",i,l),this},delete(i){const l=xe(this),{has:r,get:u}=Gs(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&&en(l,"delete",i,void 0),h},clear(){const i=xe(this),l=i.size!==0,r=i.clear();return l&&en(i,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=rd(i,e,t)}),n}function ol(e,t){const n=cd(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 ud={get:ol(!1,!1)},dd={get:ol(!1,!0)},fd={get:ol(!0,!1)};const Nr=new WeakMap,Fr=new WeakMap,Dr=new WeakMap,pd=new WeakMap;function hd(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function qn(e){return Yt(e)?e:ll(e,!1,od,ud,Nr)}function md(e){return ll(e,!1,ad,dd,Fr)}function So(e){return ll(e,!0,ld,fd,Dr)}function ll(e,t,n,s,i){if(!Pe(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=hd(Uu(e));if(r===0)return e;const u=new Proxy(e,r===2?s:n);return i.set(e,u),u}function kn(e){return Yt(e)?kn(e.__v_raw):!!(e&&e.__v_isReactive)}function Yt(e){return!!(e&&e.__v_isReadonly)}function Ct(e){return!!(e&&e.__v_isShallow)}function al(e){return e?!!e.__v_raw:!1}function xe(e){const t=e&&e.__v_raw;return t?xe(t):e}function bd(e){return!Ee(e,"__v_skip")&&Object.isExtensible(e)&&_r(e,"__v_skip",!0),e}const Pt=e=>Pe(e)?qn(e):e,$n=e=>Pe(e)?So(e):e;function et(e){return e?e.__v_isRef===!0:!1}function $e(e){return Ur(e,!1)}function vd(e){return Ur(e,!0)}function Ur(e,t){return et(e)?e:new gd(e,t)}class gd{constructor(t,n){this.dep=new il,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:xe(t),this._value=n?t:Pt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||Ct(t)||Yt(t);t=s?t:xe(t),Bt(t,n)&&(this._rawValue=t,this._value=s?t:Pt(t),this.dep.trigger())}}function a(e){return et(e)?e.value:e}const _d={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 jr(e){return kn(e)?e:new Proxy(e,_d)}class yd{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new il(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ts-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Ne!==this)return Tr(this,!0),!0}get value(){const t=this.dep.track();return Pr(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function wd(e,t,n=!1){let s,i;return _e(e)?s=e:(s=e.get,i=e.set),new yd(s,i,n)}const Xs={},ai=new WeakMap;let Fn;function kd(e,t=!1,n=Fn){if(n){let s=ai.get(n);s||ai.set(n,s=[]),s.push(e)}}function $d(e,t,n=Re){const{immediate:s,deep:i,once:l,scheduler:r,augmentJob:u,call:f}=n,h=C=>i?C:Ct(C)||i===!1||i===0?tn(C,1):tn(C);let p,b,v,y,I=!1,T=!1;if(et(e)?(b=()=>e.value,I=Ct(e)):kn(e)?(b=()=>h(e),I=!0):pe(e)?(T=!0,I=e.some(C=>kn(C)||Ct(C)),b=()=>e.map(C=>{if(et(C))return C.value;if(kn(C))return h(C);if(_e(C))return f?f(C,2):C()})):_e(e)?t?b=f?()=>f(e,2):e:b=()=>{if(v){cn();try{v()}finally{un()}}const C=Fn;Fn=p;try{return f?f(e,3,[y]):e(y)}finally{Fn=C}}:b=Kt,t&&i){const C=b,K=i===!0?1/0:i;b=()=>tn(C(),K)}const k=xr(),A=()=>{p.stop(),k&&k.active&&Zo(k.effects,p)};if(l&&t){const C=t;t=(...K)=>{const O=C(...K);return A(),O}}let S=T?new Array(e.length).fill(Xs):Xs;const U=C=>{if(!(!(p.flags&1)||!p.dirty&&!C))if(t){const K=p.run();if(C||i||I||(T?K.some((O,E)=>Bt(O,S[E])):Bt(K,S))){v&&v();const O=Fn;Fn=p;try{const E=[K,S===Xs?void 0:T&&S[0]===Xs?[]:S,y];S=K,f?f(t,3,E):t(...E)}finally{Fn=O}}}else p.run()};return u&&u(U),p=new Sr(b),p.scheduler=r?()=>r(U,!1):U,y=C=>kd(C,!1,p),v=p.onStop=()=>{const C=ai.get(p);if(C){if(f)f(C,4);else for(const K of C)K();ai.delete(p)}},t?s?U(!0):S=p.run():r?r(U.bind(null,!0),!0):p.run(),A.pause=p.pause.bind(p),A.resume=p.resume.bind(p),A.stop=A,A}function tn(e,t=1/0,n){if(t<=0||!Pe(e)||e.__v_skip||(n=n||new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,et(e))tn(e.value,t,n);else if(pe(e))for(let s=0;s<e.length;s++)tn(e[s],t,n);else if(rn(e)||wn(e))e.forEach(s=>{tn(s,t,n)});else if(gr(e)){for(const s in e)tn(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&tn(e[s],t,n)}return e}function Vs(e,t,n,s){try{return s?e(...s):e()}catch(i){Ri(i,t,n)}}function Nt(e,t,n,s){if(_e(e)){const i=Vs(e,t,n,s);return i&&br(i)&&i.catch(l=>{Ri(l,t,n)}),i}if(pe(e)){const i=[];for(let l=0;l<e.length;l++)i.push(Nt(e[l],t,n,s));return i}}function Ri(e,t,n,s=!0){const i=t?t.vnode:null,{errorHandler:l,throwUnhandledErrorInProduction:r}=t&&t.appContext.config||Re;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){cn(),Vs(l,null,10,[e,f,h]),un();return}}xd(e,n,i,s,r)}function xd(e,t,n,s=!0,i=!1){if(i)throw e;console.error(e)}const rt=[];let jt=-1;const Qn=[];let gn=null,Jn=0;const Hr=Promise.resolve();let ri=null;function Ni(e){const t=ri||Hr;return e?t.then(this?e.bind(this):e):t}function Sd(e){let t=jt+1,n=rt.length;for(;t<n;){const s=t+n>>>1,i=rt[s],l=As(i);l<e||l===e&&i.flags&2?t=s+1:n=s}return t}function rl(e){if(!(e.flags&1)){const t=As(e),n=rt[rt.length-1];!n||!(e.flags&2)&&t>=As(n)?rt.push(e):rt.splice(Sd(t),0,e),e.flags|=1,Vr()}}function Vr(){ri||(ri=Hr.then(Br))}function Cd(e){if(!pe(e))gn&&e.id===-1?gn.splice(Jn+1,0,e):e.flags&1||(Qn.push(e),e.flags|=1);else for(let t=0;t<e.length;t++)Qn.push(e[t]);Vr()}function Ul(e,t,n=jt+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 Wr(e){if(Qn.length){const t=[...new Set(Qn)].sort((n,s)=>As(n)-As(s));if(Qn.length=0,gn){for(let n=0;n<t.length;n++)gn.push(t[n]);return}for(gn=t,Jn=0;Jn<gn.length;Jn++){const n=gn[Jn];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}gn=null,Jn=0}}const As=e=>e.id==null?e.flags&2?-1:1/0:e.id;function Br(e){try{for(jt=0;jt<rt.length;jt++){const t=rt[jt];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),Vs(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;jt<rt.length;jt++){const t=rt[jt];t&&(t.flags&=-2)}jt=-1,rt.length=0,Wr(),ri=null,(rt.length||Qn.length)&&Br()}}let vt=null,Kr=null;function ci(e){const t=vt;return vt=e,Kr=e&&e.type.__scopeId||null,t}function oe(e,t=vt,n){if(!t||e._n)return e;const s=(...i)=>{s._d&&fi(-1);const l=ci(t),r=Vn.length;let u;try{u=e(...i)}finally{for(let f=Vn.length;f>r;f--)vc();ci(l),s._d&&fi(1)}return u};return s._n=!0,s._c=!0,s._d=!0,s}function Te(e,t){if(vt===null)return e;const n=ji(vt),s=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[l,r,u,f=Re]=t[i];l&&(_e(l)&&(l={mounted:l,updated:l}),l.deep&&tn(r),s.push({dir:l,instance:n,value:r,oldValue:void 0,arg:u,modifiers:f}))}return e}function Rn(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&&(cn(),Nt(f,n,8,[e.el,u,e,t]),un())}}function Td(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 $s(e,t,n=!1){const s=yc();if(s||es){let i=es?es._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 Ed=Symbol.for("v-scx"),Ad=()=>$s(Ed);function Tt(e,t,n){return zr(e,t,n)}function zr(e,t,n=Re){const{immediate:s,deep:i,flush:l,once:r}=n,u=tt({},n),f=t&&s||!t&&l!=="post";let h;if(Is){if(l==="sync"){const y=Ad();h=y.__watcherHandles||(y.__watcherHandles=[])}else if(!f){const y=()=>{};return y.stop=Kt,y.resume=Kt,y.pause=Kt,y}}const p=st;u.call=(y,I,T)=>Nt(y,p,I,T);let b=!1;l==="post"?u.scheduler=y=>{dt(y,p&&p.suspense)}:l!=="sync"&&(b=!0,u.scheduler=(y,I)=>{I?y():rl(y)}),u.augmentJob=y=>{t&&(y.flags|=4),b&&(y.flags|=2,p&&(y.id=p.uid,y.i=p))};const v=$d(e,t,u);return Is&&(h?h.push(v):f&&v()),v}function Pd(e,t,n){const s=this.proxy,i=We(e)?e.includes(".")?qr(s,e):()=>s[e]:e.bind(s,s);let l;_e(t)?l=t:(l=t.handler,n=t);const r=Ks(this),u=zr(i,l.bind(s),n);return r(),u}function qr(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 Od=Symbol("_vte"),Fi=e=>e.__isTeleport,eo=Symbol("_leaveCb");function Id(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==dn){t=n;break}}return t}function Yr(e){if(!ul(e))return Fi(e.type)&&e.children?Id(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 cl(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;const n=e.component.subTree;cl(Fi(n.type)&&Yr(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 Le(e,t){return _e(e)?tt({name:e.name},t,{setup:e}):e}function Gr(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function jl(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}const ui=new WeakMap;function xs(e,t,n,s,i=!1){if(pe(e)){e.forEach((T,k)=>xs(T,t&&(pe(t)?t[k]:t),n,s,i));return}if(Ss(s)&&!i){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&xs(e,t,n,s.component.subTree);return}const l=s.shapeFlag&4?ji(s.component):s.el,r=i?null:l,{i:u,r:f}=e,h=t&&t.r,p=u.refs===Re?u.refs={}:u.refs,b=u.setupState,v=xe(b),y=b===Re?mr:T=>jl(p,T)?!1:Ee(v,T),I=(T,k)=>!(k&&jl(p,k));if(h!=null&&h!==f){if(Hl(t),We(h))p[h]=null,y(h)&&(b[h]=null);else if(et(h)){const T=t;I(h,T.k)&&(h.value=null),T.k&&(p[T.k]=null)}}if(_e(f))Vs(f,u,12,[r,p]);else{const T=We(f),k=et(f);if(T||k){const A=()=>{if(e.f){const S=T?y(f)?b[f]:p[f]:I()||!e.k?f.value:p[e.k];if(i)pe(S)&&Zo(S,l);else if(pe(S))S.includes(l)||S.push(l);else if(T)p[f]=[l],y(f)&&(b[f]=p[f]);else{const U=[l];I(f,e.k)&&(f.value=U),e.k&&(p[e.k]=U)}}else T?(p[f]=r,y(f)&&(b[f]=r)):k&&(I(f,e.k)&&(f.value=r),e.k&&(p[e.k]=r))};if(r){const S=()=>{A(),ui.delete(e)};S.id=-1,ui.set(e,S),dt(S,n)}else Hl(e),A()}}}function Hl(e){const t=ui.get(e);t&&(t.flags|=8,ui.delete(e))}Li().requestIdleCallback;Li().cancelIdleCallback;const Ss=e=>!!e.type.__asyncLoader,ul=e=>e.type.__isKeepAlive;function Ld(e,t){Jr(e,"a",t)}function Md(e,t){Jr(e,"da",t)}function Jr(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(Di(t,s,n),n){let i=n.parent;for(;i&&i.parent;)ul(i.parent.vnode)&&Rd(s,t,n,i),i=i.parent}}function Rd(e,t,n,s){const i=Di(t,e,s,!0);dl(()=>{Zo(s[t],i)},n)}function Di(e,t,n=st,s=!1){if(n){const i=n[e]||(n[e]=[]),l=t.__weh||(t.__weh=(...r)=>{cn();const u=Ks(n),f=Nt(t,n,e,r);return u(),un(),f});return s?i.unshift(l):i.push(l),l}}const mn=e=>(t,n=st)=>{(!Is||e==="sp")&&Di(e,(...s)=>t(...s),n)},Nd=mn("bm"),An=mn("m"),Fd=mn("bu"),Dd=mn("u"),rs=mn("bum"),dl=mn("um"),Ud=mn("sp"),jd=mn("rtg"),Hd=mn("rtc");function Vd(e,t=st){Di("ec",e,t)}const Xr="components";function Ws(e,t){return Qr(Xr,e,!0,t)||e}const Zr=Symbol.for("v-ndc");function Wd(e){return We(e)?Qr(Xr,e,!1)||e:e||Zr}function Qr(e,t,n=!0,s=!1){const i=vt||st;if(i){const l=i.type;{const u=Tf(l,!1);if(u&&(u===t||u===ct(t)||u===Oi(ct(t))))return l}const r=Vl(i[e]||l[e],t)||Vl(i.appContext[e],t);return!r&&s?l:r}}function Vl(e,t){return e&&(e[t]||e[ct(t)]||e[Oi(ct(t))])}function me(e,t,n,s){let i;const l=n,r=pe(e);if(r||We(e)){const u=r&&kn(e);let f=!1,h=!1;u&&(f=!Ct(e),h=Yt(e),e=Mi(e)),i=new Array(e.length);for(let p=0,b=e.length;p<b;p++)i[p]=t(f?h?$n(Pt(e[p])):Pt(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(Pe(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 Co=e=>e?wc(e)?ji(e):Co(e.parent):null,Cs=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=>Co(e.parent),$root:e=>Co(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>tc(e),$forceUpdate:e=>e.f||(e.f=()=>{rl(e.update)}),$nextTick:e=>e.n||(e.n=Ni.bind(e.proxy)),$watch:e=>Pd.bind(e)}),to=(e,t)=>e!==Re&&!e.__isScriptSetup&&Ee(e,t),Bd={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(to(s,t))return r[t]=1,s[t];if(i!==Re&&Ee(i,t))return r[t]=2,i[t];if(Ee(l,t))return r[t]=3,l[t];if(n!==Re&&Ee(n,t))return r[t]=4,n[t];To&&(r[t]=0)}}const h=Cs[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!==Re&&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 to(i,t)?(i[t]=n,!0):s!==Re&&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!==Re&&u[0]!=="$"&&Ee(e,u)||to(t,u)||Ee(l,u)||Ee(s,u)||Ee(Cs,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 Wl(e){return pe(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let To=!0;function Kd(e){const t=tc(e),n=e.proxy,s=e.ctx;To=!1,t.beforeCreate&&Bl(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:I,activated:T,deactivated:k,beforeDestroy:A,beforeUnmount:S,destroyed:U,unmounted:C,render:K,renderTracked:O,renderTriggered:E,errorCaptured:R,serverPrefetch:L,expose:D,inheritAttrs:M,components:Y,directives:te,filters:ye}=t;if(h&&zd(h,s,null),r)for(const ge in r){const we=r[ge];_e(we)&&(s[ge]=we.bind(n))}if(i){const ge=i.call(n,n);Pe(ge)&&(e.data=qn(ge))}if(To=!0,l)for(const ge in l){const we=l[ge],Ge=_e(we)?we.bind(n,n):_e(we.get)?we.get.bind(n,n):Kt,qe=!_e(we)&&_e(we.set)?we.set.bind(n):Kt,le=$({get:Ge,set:qe});Object.defineProperty(s,ge,{enumerable:!0,configurable:!0,get:()=>le.value,set:Z=>le.value=Z})}if(u)for(const ge in u)ec(u[ge],s,n,ge);if(f){const ge=_e(f)?f.call(n):f;Reflect.ownKeys(ge).forEach(we=>{Td(we,ge[we])})}p&&Bl(p,e,"c");function be(ge,we){pe(we)?we.forEach(Ge=>ge(Ge.bind(n))):we&&ge(we.bind(n))}if(be(Nd,b),be(An,v),be(Fd,y),be(Dd,I),be(Ld,T),be(Md,k),be(Vd,R),be(Hd,O),be(jd,E),be(rs,S),be(dl,C),be(Ud,L),pe(D))if(D.length){const ge=e.exposed||(e.exposed={});D.forEach(we=>{Object.defineProperty(ge,we,{get:()=>n[we],set:Ge=>n[we]=Ge,enumerable:!0})})}else e.exposed||(e.exposed={});K&&e.render===Kt&&(e.render=K),M!=null&&(e.inheritAttrs=M),Y&&(e.components=Y),te&&(e.directives=te),L&&Gr(e)}function zd(e,t,n=Kt){pe(e)&&(e=Eo(e));for(const s in e){const i=e[s];let l;Pe(i)?"default"in i?l=$s(i.from||s,i.default,!0):l=$s(i.from||s):l=$s(i),et(l)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>l.value,set:r=>l.value=r}):t[s]=l}}function Bl(e,t,n){Nt(pe(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function ec(e,t,n,s){let i=s.includes(".")?qr(n,s):()=>n[s];if(We(e)){const l=t[e];_e(l)&&Tt(i,l)}else if(_e(e))Tt(i,e.bind(n));else if(Pe(e))if(pe(e))e.forEach(l=>ec(l,t,n,s));else{const l=_e(e.handler)?e.handler.bind(n):t[e.handler];_e(l)&&Tt(i,l,e)}}function tc(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=>di(f,h,r,!0)),di(f,t,r)),Pe(t)&&l.set(t,f),f}function di(e,t,n,s=!1){const{mixins:i,extends:l}=t;l&&di(e,l,n,!0),i&&i.forEach(r=>di(e,r,n,!0));for(const r in t)if(!(s&&r==="expose")){const u=qd[r]||n&&n[r];e[r]=u?u(e[r],t[r]):t[r]}return e}const qd={data:Kl,props:zl,emits:zl,methods:ms,computed:ms,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:ms,directives:ms,watch:Gd,provide:Kl,inject:Yd};function Kl(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 Yd(e,t){return ms(Eo(e),Eo(t))}function Eo(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 ms(e,t){return e?tt(Object.create(null),e,t):t}function zl(e,t){return e?pe(e)&&pe(t)?[...new Set([...e,...t])]:tt(Object.create(null),Wl(e),Wl(t??{})):t}function Gd(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 nc(){return{app:null,config:{isNativeTag:mr,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 Jd=0;function Xd(e,t){return function(s,i=null){_e(s)||(s=tt({},s)),i!=null&&!Pe(i)&&(i=null);const l=nc(),r=new WeakSet,u=[];let f=!1;const h=l.app={_uid:Jd++,_component:s,_props:i,_container:null,_context:l,_instance:null,version:Af,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||ie(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,ji(y.component)}},onUnmount(p){u.push(p)},unmount(){f&&(Nt(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=es;es=h;try{return p()}finally{es=b}}};return h}}let es=null;const Zd=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ct(t)}Modifiers`]||e[`${En(t)}Modifiers`];function Qd(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||Re;let i=n;const l=t.startsWith("update:"),r=l&&Zd(s,t.slice(7));r&&(r.trim&&(i=n.map(p=>We(p)?p.trim():p)),r.number&&(i=i.map(Ii)));let u,f=s[u=Gi(t)]||s[u=Gi(ct(t))];!f&&l&&(f=s[u=Gi(En(t))]),f&&Nt(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,Nt(h,e,6,i)}}const ef=new WeakMap;function sc(e,t,n=!1){const s=n?ef: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=sc(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?(Pe(e)&&s.set(e,null),null):(pe(l)?l.forEach(f=>r[f]=null):tt(r,l),Pe(e)&&s.set(e,r),r)}function Ui(e,t){return!e||!Ei(t)?!1:(t=t.slice(2),t=t==="Once"?t:t.replace(/Once$/,""),Ee(e,t[0].toLowerCase()+t.slice(1))||Ee(e,En(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:I,inheritAttrs:T}=e,k=ci(e);let A,S;try{if(n.shapeFlag&4){const C=i||s,K=C;A=Wt(h.call(K,C,p,b,y,v,I)),S=u}else{const C=t;A=Wt(C.length>1?C(b,{attrs:u,slots:r,emit:f}):C(b,null)),S=t.props?u:tf(u)}}catch(C){Vn.length=0,Ri(C,e,1),A=ie(dn)}let U=A;if(S&&T!==!1){const C=Object.keys(S),{shapeFlag:K}=U;C.length&&K&7&&(l&&C.some(Ai)&&(S=nf(S,l)),U=ss(U,S,!1,!0))}if(n.dirs&&(U=ss(U,null,!1,!0),U.dirs=U.dirs?U.dirs.concat(n.dirs):n.dirs),n.transition){const C=Fi(U.type)&&Yr(U)||U;cl(C,n.transition)}return A=U,ci(k),A}const tf=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ei(n))&&((t||(t={}))[n]=e[n]);return t},nf=(e,t)=>{const n={};for(const s in e)(!Ai(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function sf(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?Yl(s,r,h):!!r;if(f&8){const p=t.dynamicProps;for(let b=0;b<p.length;b++){const v=p[b];if(ic(r,s,v)&&!Ui(h,v))return!0}}}else return(i||u)&&(!u||!u.$stable)?!0:s===r?!1:s?r?Yl(s,r,h):!0:!!r;return!1}function Yl(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(ic(t,e,l)&&!Ui(n,l))return!0}return!1}function ic(e,t,n){const s=e[n],i=t[n];return n==="style"&&Pe(s)&&Pe(i)?!Rt(s,i):s!==i}function of({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 oc={},lc=()=>Object.create(oc),ac=e=>Object.getPrototypeOf(e)===oc;function lf(e,t,n,s=!1){const i={},l=lc();e.propsDefaults=Object.create(null),rc(e,t,i,l);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);n?e.props=s?i:md(i):e.type.props?e.props=i:e.props=l,e.attrs=l}function af(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(Ui(e.emitsOptions,v))continue;const y=t[v];if(f)if(Ee(l,v))y!==l[v]&&(l[v]=y,h=!0);else{const I=ct(v);i[I]=Ao(f,u,I,y,e,!1)}else y!==l[v]&&(l[v]=y,h=!0)}}}else{rc(e,t,i,l)&&(h=!0);let p;for(const b in u)(!t||!Ee(t,b)&&((p=En(b))===b||!Ee(t,p)))&&(f?n&&(n[b]!==void 0||n[p]!==void 0)&&(i[b]=Ao(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&&en(e.attrs,"set","")}function rc(e,t,n,s){const[i,l]=e.propsOptions;let r=!1,u;if(t)for(let f in t){if(ys(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:Ui(e.emitsOptions,f)||(!(f in s)||h!==s[f])&&(s[f]=h,r=!0)}if(l){const f=xe(n),h=u||Re;for(let p=0;p<l.length;p++){const b=l[p];n[b]=Ao(i,f,b,h[b],e,!Ee(h,b))}}return r}function Ao(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=Ks(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===En(n))&&(s=!0))}return s}const rf=new WeakMap;function cc(e,t,n=!1){const s=n?rf: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]=cc(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 Pe(e)&&s.set(e,Un),Un;if(pe(l))for(let p=0;p<l.length;p++){const b=ct(l[p]);Gl(b)&&(r[b]=Re)}else if(l)for(const p in l){const b=ct(p);if(Gl(b)){const v=l[p],y=r[b]=pe(v)||_e(v)?{type:v}:tt({},v),I=y.type;let T=!1,k=!0;if(pe(I))for(let A=0;A<I.length;++A){const S=I[A],U=_e(S)&&S.name;if(U==="Boolean"){T=!0;break}else U==="String"&&(k=!1)}else T=_e(I)&&I.name==="Boolean";y[0]=T,y[1]=k,(T||Ee(y,"default"))&&u.push(b)}}const h=[r,u];return Pe(e)&&s.set(e,h),h}function Gl(e){return e[0]!=="$"&&!ys(e)}const fl=e=>e==="_"||e==="_ctx"||e==="$stable",pl=e=>pe(e)?e.map(Wt):[Wt(e)],cf=(e,t,n)=>{if(t._n)return t;const s=oe((...i)=>pl(t(...i)),n);return s._c=!1,s},uc=(e,t,n)=>{const s=e._ctx;for(const i in e){if(fl(i))continue;const l=e[i];if(_e(l))t[i]=cf(i,l,s);else if(l!=null){const r=pl(l);t[i]=()=>r}}},dc=(e,t)=>{const n=pl(t);e.slots.default=()=>n},fc=(e,t,n)=>{for(const s in t)(n||!fl(s))&&(e[s]=t[s])},uf=(e,t,n)=>{const s=e.slots=lc();if(e.vnode.shapeFlag&32){const i=t._;i?(fc(s,t,n),n&&_r(s,"_",i,!0)):uc(t,s)}else t&&dc(e,t)},df=(e,t,n)=>{const{vnode:s,slots:i}=e;let l=!0,r=Re;if(s.shapeFlag&32){const u=t._;u?n&&u===1?l=!1:fc(i,t,n):(l=!t.$stable,uc(t,i)),r=t}else t&&(dc(e,t),r={default:1});if(l)for(const u in i)!fl(u)&&r[u]==null&&delete i[u]},dt=bf;function ff(e){return pf(e)}function pf(e,t){const n=Li();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=Kt,insertStaticContent:I}=e,T=(w,x,N,z=null,j=null,W=null,X=void 0,J=null,G=!!x.dynamicChildren)=>{if(w===x)return;w&&!fs(w,x)&&(z=se(w),Z(w,j,W,!0),w=null),x.patchFlag===-2&&(G=!1,x.dynamicChildren=null),x.dynamicChildren&&w&&w.dynamicChildren&&w.dynamicChildren.hasOnce&&(x.dynamicChildren===Un&&(x.dynamicChildren=[]),x.dynamicChildren.hasOnce=!0);const{type:V,ref:de,shapeFlag:ee}=x;switch(V){case Bs:k(w,x,N,z);break;case dn:A(w,x,N,z);break;case so:w==null&&S(x,N,z,X);break;case q:Y(w,x,N,z,j,W,X,J,G);break;default:ee&1?K(w,x,N,z,j,W,X,J,G):ee&6?te(w,x,N,z,j,W,X,J,G):(ee&64||ee&128)&&V.process(w,x,N,z,j,W,X,J,G,Mn)}de!=null&&j?xs(de,w&&w.ref,W,x||w,!x):de==null&&w&&w.ref!=null&&xs(w.ref,null,W,w,!0)},k=(w,x,N,z)=>{if(w==null)s(x.el=u(x.children),N,z);else{const j=x.el=w.el;x.children!==w.children&&h(j,x.children)}},A=(w,x,N,z)=>{w==null?s(x.el=f(x.children||""),N,z):x.el=w.el},S=(w,x,N,z)=>{[w.el,w.anchor]=I(w.children,x,N,z,w.el,w.anchor)},U=({el:w,anchor:x},N,z)=>{let j;for(;w&&w!==x;)j=v(w),s(w,N,z),w=j;s(x,N,z)},C=({el:w,anchor:x})=>{let N;for(;w&&w!==x;)N=v(w),i(w),w=N;i(x)},K=(w,x,N,z,j,W,X,J,G)=>{if(x.type==="svg"?X="svg":x.type==="math"&&(X="mathml"),w==null)O(x,N,z,j,W,X,J,G);else{const V=w.el&&w.el._isVueCE?w.el:null;try{V&&V._beginPatch(),L(w,x,j,W,X,J,G)}finally{V&&V._endPatch()}}},O=(w,x,N,z,j,W,X,J)=>{let G,V;const{props:de,shapeFlag:ee,transition:Q,dirs:P}=w;if(G=w.el=r(w.type,W,de&&de.is,de),ee&8?p(G,w.children):ee&16&&R(w.children,G,null,z,j,no(w,W),X,J),P&&Rn(w,null,z,"created"),E(G,w,w.scopeId,X,z),de){for(const ce in de)ce!=="value"&&!ys(ce)&&l(G,ce,null,de[ce],W,z);"value"in de&&l(G,"value",null,de.value,W),(V=de.onVnodeBeforeMount)&&Ut(V,z,w)}P&&Rn(w,null,z,"beforeMount");const F=hf(j,Q);F&&Q.beforeEnter(G),s(G,x,N),((V=de&&de.onVnodeMounted)||F||P)&&dt(()=>{V&&Ut(V,z,w),F&&Q.enter(G),P&&Rn(w,null,z,"mounted")},j)},E=(w,x,N,z,j)=>{if(N&&y(w,N),z)for(let W=0;W<z.length;W++)y(w,z[W]);if(j){let W=j.subTree;if(x===W||bc(W.type)&&(W.ssContent===x||W.ssFallback===x)){const X=j.vnode;E(w,X,X.scopeId,X.slotScopeIds,j.parent)}}},R=(w,x,N,z,j,W,X,J,G=0)=>{for(let V=G;V<w.length;V++){const de=w[V]=J?Zt(w[V]):Wt(w[V]);T(null,de,x,N,z,j,W,X,J)}},L=(w,x,N,z,j,W,X)=>{const J=x.el=w.el;let{patchFlag:G,dynamicChildren:V,dirs:de}=x;G|=w.patchFlag&16;const ee=w.props||Re,Q=x.props||Re;let P;if(N&&Nn(N,!1),(P=Q.onVnodeBeforeUpdate)&&Ut(P,N,x,w),de&&Rn(x,w,N,"beforeUpdate"),N&&Nn(N,!0),V&&(!w.dynamicChildren||w.dynamicChildren.length!==V.length)&&(G=0,X=!1,V=null),(ee.innerHTML&&Q.innerHTML==null||ee.textContent&&Q.textContent==null)&&p(J,""),V?D(w.dynamicChildren,V,J,N,z,no(x,j),W):X||we(w,x,J,null,N,z,no(x,j),W,!1),G>0){if(G&16)M(J,ee,Q,N,j);else if(G&2&&ee.class!==Q.class&&l(J,"class",null,Q.class,j),G&4&&l(J,"style",ee.style,Q.style,j),G&8){const F=x.dynamicProps;for(let ce=0;ce<F.length;ce++){const fe=F[ce],Oe=ee[fe],De=Q[fe];(De!==Oe||fe==="value")&&l(J,fe,Oe,De,j,N)}}G&1&&w.children!==x.children&&p(J,x.children)}else!X&&V==null&&M(J,ee,Q,N,j);((P=Q.onVnodeUpdated)||de)&&dt(()=>{P&&Ut(P,N,x,w),de&&Rn(x,w,N,"updated")},z)},D=(w,x,N,z,j,W,X)=>{for(let J=0;J<x.length;J++){const G=w[J],V=x[J],de=G.el&&(G.type===q||!fs(G,V)||G.shapeFlag&198)?b(G.el):N;T(G,V,de,null,z,j,W,X,!0)}},M=(w,x,N,z,j)=>{if(x!==N){if(x!==Re)for(const W in x)!ys(W)&&!(W in N)&&l(w,W,x[W],null,j,z);for(const W in N){if(ys(W))continue;const X=N[W],J=x[W];X!==J&&W!=="value"&&l(w,W,J,X,j,z)}"value"in N&&l(w,"value",x.value,N.value,j)}},Y=(w,x,N,z,j,W,X,J,G)=>{const V=x.el=w?w.el:u(""),de=x.anchor=w?w.anchor:u("");let{patchFlag:ee,dynamicChildren:Q,slotScopeIds:P}=x;P&&(J=J?J.concat(P):P),w==null?(s(V,N,z),s(de,N,z),R(x.children||[],N,de,j,W,X,J,G)):ee>0&&ee&64&&Q&&w.dynamicChildren&&w.dynamicChildren.length===Q.length?(D(w.dynamicChildren,Q,N,j,W,X,J),(x.key!=null||j&&x===j.subTree)&&pc(w,x,!0)):we(w,x,N,de,j,W,X,J,G)},te=(w,x,N,z,j,W,X,J,G)=>{x.slotScopeIds=J,w==null?x.shapeFlag&512?j.ctx.activate(x,N,z,X,G):ye(x,N,z,j,W,X,G):re(w,x,G)},ye=(w,x,N,z,j,W,X)=>{const J=w.component=kf(w,z,j);if(ul(w)&&(J.ctx.renderer=Mn),$f(J,!1,X),J.asyncDep){if(j&&j.registerDep(J,be,X),!w.el){const G=J.subTree=ie(dn);A(null,G,x,N),w.placeholder=G.el}}else be(J,w,x,N,j,W,X)},re=(w,x,N)=>{const z=x.component=w.component;if(sf(w,x,N))if(z.asyncDep&&!z.asyncResolved){x.el=w.el,ge(z,x,N);return}else z.next=x,z.update();else x.el=w.el,z.vnode=x},be=(w,x,N,z,j,W,X)=>{const J=()=>{if(w.isMounted){let{next:ee,bu:Q,u:P,parent:F,vnode:ce}=w;{const kt=hc(w);if(kt){ee&&(ee.el=ce.el,ge(w,ee,X)),kt.asyncDep.then(()=>{dt(()=>{w.isUnmounted||V()},j)});return}}let fe=ee,Oe;Nn(w,!1),ee?(ee.el=ce.el,ge(w,ee,X)):ee=ce,Q&&si(Q),(Oe=ee.props&&ee.props.onVnodeBeforeUpdate)&&Ut(Oe,F,ee,ce),Nn(w,!0);const De=ql(w),Ve=w.subTree;w.subTree=De,T(Ve,De,b(Ve.el),se(Ve),w,j,W),ee.el=De.el,fe===null&&of(w,De.el),P&&dt(P,j),(Oe=ee.props&&ee.props.onVnodeUpdated)&&dt(()=>Ut(Oe,F,ee,ce),j)}else{let ee;const{el:Q,props:P}=x,{bm:F,m:ce,parent:fe,root:Oe,type:De}=w,Ve=Ss(x);Nn(w,!1),F&&si(F),!Ve&&(ee=P&&P.onVnodeBeforeMount)&&Ut(ee,fe,x),Nn(w,!0);{Oe.ce&&Oe.ce._hasShadowRoot()&&Oe.ce._injectChildStyle(De,w.parent?w.parent.type:void 0);const kt=w.subTree=ql(w);T(null,kt,N,z,w,j,W),x.el=kt.el}if(ce&&dt(ce,j),!Ve&&(ee=P&&P.onVnodeMounted)){const kt=x;dt(()=>Ut(ee,fe,kt),j)}(x.shapeFlag&256||fe&&Ss(fe.vnode)&&fe.vnode.shapeFlag&256)&&w.a&&dt(w.a,j),w.isMounted=!0,x=N=z=null}};w.scope.on();const G=w.effect=new Sr(J);w.scope.off();const V=w.update=G.run.bind(G),de=w.job=G.runIfDirty.bind(G);de.i=w,de.id=w.uid,G.scheduler=()=>rl(de),Nn(w,!0),V()},ge=(w,x,N)=>{x.component=w;const z=w.vnode.props;w.vnode=x,w.next=null,af(w,x.props,z,N),df(w,x.children,N),cn(),Ul(w),un()},we=(w,x,N,z,j,W,X,J,G=!1)=>{const V=w&&w.children,de=w?w.shapeFlag:0,ee=x.children,{patchFlag:Q,shapeFlag:P}=x;if(Q>0){if(Q&128){qe(V,ee,N,z,j,W,X,J,G);return}else if(Q&256){Ge(V,ee,N,z,j,W,X,J,G);return}}P&8?(de&16&&ne(V,j,W),ee!==V&&p(N,ee)):de&16?P&16?qe(V,ee,N,z,j,W,X,J,G):ne(V,j,W,!0):(de&8&&p(N,""),P&16&&R(ee,N,z,j,W,X,J,G))},Ge=(w,x,N,z,j,W,X,J,G)=>{w=w||Un,x=x||Un;const V=w.length,de=x.length,ee=Math.min(V,de);let Q;for(Q=0;Q<ee;Q++){const P=x[Q]=G?Zt(x[Q]):Wt(x[Q]);T(w[Q],P,N,null,j,W,X,J,G)}V>de?ne(w,j,W,!0,!1,ee):R(x,N,z,j,W,X,J,G,ee)},qe=(w,x,N,z,j,W,X,J,G)=>{let V=0;const de=x.length;let ee=w.length-1,Q=de-1;for(;V<=ee&&V<=Q;){const P=w[V],F=x[V]=G?Zt(x[V]):Wt(x[V]);if(fs(P,F))T(P,F,N,null,j,W,X,J,G);else break;V++}for(;V<=ee&&V<=Q;){const P=w[ee],F=x[Q]=G?Zt(x[Q]):Wt(x[Q]);if(fs(P,F))T(P,F,N,null,j,W,X,J,G);else break;ee--,Q--}if(V>ee){if(V<=Q){const P=Q+1,F=P<de?x[P].el:z;for(;V<=Q;)T(null,x[V]=G?Zt(x[V]):Wt(x[V]),N,F,j,W,X,J,G),V++}}else if(V>Q)for(;V<=ee;)Z(w[V],j,W,!0),V++;else{const P=V,F=V,ce=new Map;for(V=F;V<=Q;V++){const mt=x[V]=G?Zt(x[V]):Wt(x[V]);mt.key!=null&&ce.set(mt.key,V)}let fe,Oe=0;const De=Q-F+1;let Ve=!1,kt=0;const Yn=new Array(De);for(V=0;V<De;V++)Yn[V]=0;for(V=P;V<=ee;V++){const mt=w[V];if(Oe>=De){Z(mt,j,W,!0);continue}let Dt;if(mt.key!=null)Dt=ce.get(mt.key);else for(fe=F;fe<=Q;fe++)if(Yn[fe-F]===0&&fs(mt,x[fe])){Dt=fe;break}Dt===void 0?Z(mt,j,W,!0):(Yn[Dt-F]=V+1,Dt>=kt?kt=Dt:Ve=!0,T(mt,x[Dt],N,null,j,W,X,J,G),Oe++)}const Pl=Ve?mf(Yn):Un;for(fe=Pl.length-1,V=De-1;V>=0;V--){const mt=F+V,Dt=x[mt],Ol=x[mt+1],Il=mt+1<de?Ol.el||mc(Ol):z;Yn[V]===0?T(null,Dt,N,Il,j,W,X,J,G):Ve&&(fe<0||V!==Pl[fe]?le(Dt,N,Il,2):fe--)}}},le=(w,x,N,z,j=null)=>{const{el:W,type:X,transition:J,children:G,shapeFlag:V}=w;if(V&6){le(w.component.subTree,x,N,z);return}if(V&128){w.suspense.move(x,N,z);return}if(V&64){X.move(w,x,N,Mn);return}if(X===q){s(W,x,N);for(let ee=0;ee<G.length;ee++)le(G[ee],x,N,z);s(w.anchor,x,N);return}if(X===so){U(w,x,N);return}if(z!==2&&V&1&&J)if(z===0)J.persisted&&!W[eo]?s(W,x,N):(J.beforeEnter(W),s(W,x,N),dt(()=>J.enter(W),j));else{const{leave:ee,delayLeave:Q,afterLeave:P}=J,F=()=>{w.ctx.isUnmounted?i(W):s(W,x,N)},ce=()=>{const fe=W._isLeaving||!!W[eo];W._isLeaving&&W[eo](!0),J.persisted&&!fe?F():ee(W,()=>{F(),P&&P()})};Q?Q(W,F,ce):ce()}else s(W,x,N)},Z=(w,x,N,z=!1,j=!1)=>{const{type:W,props:X,ref:J,children:G,dynamicChildren:V,shapeFlag:de,patchFlag:ee,dirs:Q,cacheIndex:P,memo:F}=w;if((ee===-2||V&&V.hasOnce)&&(j=!1),J!=null&&(cn(),xs(J,null,N,w,!0),un()),P!=null&&(!w.ctx||w.ctx===x)&&(x.renderCache[P]=void 0),de&256){x.ctx.deactivate(w);return}const ce=de&1&&Q,fe=!Ss(w);let Oe;if(fe&&(Oe=X&&X.onVnodeBeforeUnmount)&&Ut(Oe,x,w),de&6)H(w.component,N,z);else{if(de&128){w.suspense.unmount(N,z);return}ce&&Rn(w,null,x,"beforeUnmount"),de&64?w.type.remove(w,x,N,Mn,z):V&&!V.hasOnce&&(W!==q||ee>0&&ee&64)?ne(V,x,N,!1,!0):(W===q&&ee&384||!j&&de&16)&&ne(G,x,N),z&&ue(w)}const De=F!=null&&P==null;(fe&&(Oe=X&&X.onVnodeUnmounted)||ce||De)&&dt(()=>{Oe&&Ut(Oe,x,w),ce&&Rn(w,null,x,"unmounted"),De&&(w.el=null)},N)},ue=w=>{const{type:x,el:N,anchor:z,transition:j}=w;if(x===q){ke(N,z);return}if(x===so){C(w),j&&!j.persisted&&j.afterLeave&&j.afterLeave();return}const W=()=>{i(N),j&&!j.persisted&&j.afterLeave&&j.afterLeave()};if(w.shapeFlag&1&&j&&!j.persisted){const{leave:X,delayLeave:J}=j,G=()=>X(N,W);J?J(w.el,W,G):G()}else W()},ke=(w,x)=>{let N;for(;w!==x;)N=v(w),i(w),w=N;i(x)},H=(w,x,N)=>{const{bum:z,scope:j,job:W,subTree:X,um:J,m:G,a:V}=w;Jl(G),Jl(V),z&&si(z),j.stop(),W?(W.flags|=8,Z(X,w,x,N)):w.vnode.el&&X&&(X.transition=w.vnode.transition,Z(X,w,x,N)),J&&dt(J,x),dt(()=>{w.isUnmounted=!0},x)},ne=(w,x,N,z=!1,j=!1,W=0)=>{for(let X=W;X<w.length;X++)Z(w[X],x,N,z,j)},se=w=>{if(w.shapeFlag&6)return se(w.component.subTree);if(w.shapeFlag&128)return w.suspense.next();const x=v(w.anchor||w.el),N=x&&x[Od];return N?v(N):x};let wt=!1;const Ln=(w,x,N)=>{let z;w==null?x._vnode&&(Z(x._vnode,null,null,!0),z=x._vnode.component):T(x._vnode||null,w,x,null,null,null,N),x._vnode=w,wt||(wt=!0,Ul(z),Wr(),wt=!1)},Mn={p:T,um:Z,m:le,r:ue,mt:ye,mc:R,pc:we,pbc:D,n:se,o:e};return{render:Ln,hydrate:void 0,createApp:Xd(Ln)}}function no({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 Nn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function hf(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function pc(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]=Zt(i[l]),u.el=r.el),!n&&u.patchFlag!==-2&&pc(r,u)),u.type===Bs&&(u.patchFlag===-1&&(u=i[l]=Zt(u)),u.el=r.el),u.type===dn&&!u.el&&(u.el=r.el)}}function mf(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 hc(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:hc(t)}function Jl(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}function mc(e){if(e.placeholder)return e.placeholder;const t=e.component;return t?mc(t.subTree):null}const bc=e=>e.__isSuspense;function bf(e,t){t&&t.pendingBranch?pe(e)?t.effects.push(...e):t.effects.push(e):Cd(e)}const q=Symbol.for("v-fgt"),Bs=Symbol.for("v-txt"),dn=Symbol.for("v-cmt"),so=Symbol.for("v-stc"),Vn=[];let gt=null;function g(e=!1){Vn.push(gt=e?null:[])}function vc(){Vn.pop(),gt=Vn[Vn.length-1]||null}let Ps=1;function fi(e,t=!1){Ps+=e,e<0&&gt&&t&&(gt.hasOnce=!0)}function gc(e){return e.dynamicChildren=Ps>0?gt||Un:null,vc(),Ps>0&&gt&&gt.push(e),e}function _(e,t,n,s,i,l){return gc(o(e,t,n,s,i,l,!0))}function it(e,t,n,s,i){return gc(ie(e,t,n,s,i,!0))}function pi(e){return e?e.__v_isVNode===!0:!1}function fs(e,t){return e.type===t.type&&e.key===t.key}const _c=({key:e})=>e??null,ii=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?We(e)||et(e)||_e(e)?{i:vt,r:e,k:t,f:!!n}:e:null);function o(e,t=null,n=null,s=0,i=null,l=e===q?0:1,r=!1,u=!1){const f={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&_c(t),ref:t&&ii(t),scopeId:Kr,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:vt};return u?(hi(f,n),l&128&&e.normalize(f)):n&&(f.shapeFlag|=We(n)?8:16),Ps>0&&!r&&gt&&(f.patchFlag>0||l&6)&&f.patchFlag!==32&&gt.push(f),f}const ie=vf;function vf(e,t=null,n=null,s=0,i=null,l=!1){if((!e||e===Zr)&&(e=dn),pi(e)){const u=ss(e,t,!0);return n&&hi(u,n),Ps>0&&!l&&gt&&(u.shapeFlag&6?gt[gt.indexOf(e)]=u:gt.push(u)),u.patchFlag=-2,u}if(Ef(e)&&(e=e.__vccOpts),t){t=gf(t);let{class:u,style:f}=t;u&&!We(u)&&(t.class=he(u)),Pe(f)&&(al(f)&&!pe(f)&&(f=tt({},f)),t.style=Ue(f))}const r=We(e)?1:bc(e)?128:Fi(e)?64:Pe(e)?4:_e(e)?2:0;return o(e,t,n,s,i,r,l,!0)}function gf(e){return e?al(e)||ac(e)?tt({},e):e:null}function ss(e,t,n=!1,s=!1){const{props:i,ref:l,patchFlag:r,children:u,transition:f}=e,h=t?_f(i||{},t):i,p={__v_isVNode:!0,__v_skip:!0,type:e.type,props:h,key:h&&_c(h),ref:t&&t.ref?n&&l?pe(l)?l.concat(ii(t)):[l,ii(t)]:ii(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!==q?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&&ss(e.ssContent),ssFallback:e.ssFallback&&ss(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce,cacheIndex:e.cacheIndex};return f&&s&&cl(p,f.clone(p)),p}function Me(e=" ",t=0){return ie(Bs,null,e,t)}function B(e="",t=!1){return t?(g(),it(dn,null,e)):ie(dn,null,e)}function Wt(e){return e==null||typeof e=="boolean"?ie(dn):pe(e)?ie(q,null,e.slice()):pi(e)?Zt(e):ie(Bs,null,String(e))}function Zt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:ss(e)}function hi(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),hi(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!ac(t)?t._ctx=vt:i===3&&vt&&(vt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else if(_e(t)){if(s&65){hi(e,{default:t});return}t={default:t,_ctx:vt},n=32}else t=String(t),s&64?(n=16,t=[Me(t)]):n=8;e.children=t,e.shapeFlag|=n}function _f(...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=he([t.class,s.class]));else if(i==="style")t.style=Ue([t.style,s.style]);else if(Ei(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&&!Ai(i)&&(t[i]=r)}else i!==""&&(t[i]=s[i])}return t}function Ut(e,t,n,s=null){Nt(e,t,7,[n,s])}const yf=nc();let wf=0;function kf(e,t,n){const s=e.type,i=(t?t.appContext:e.appContext)||yf,l={uid:wf++,vnode:e,type:s,parent:t,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new $r(!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:cc(s,i),emitsOptions:sc(s,i),emit:null,emitted:null,propsDefaults:Re,inheritAttrs:s.inheritAttrs,ctx:Re,data:Re,props:Re,attrs:Re,slots:Re,refs:Re,setupState:Re,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=Qd.bind(null,l),e.ce&&e.ce(l),l}let st=null;const yc=()=>st||vt;let mi,Os;{const e=Li(),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)}};mi=t("__VUE_INSTANCE_SETTERS__",n=>st=n),Os=t("__VUE_SSR_SETTERS__",n=>Is=n)}const Ks=e=>{const t=st;return mi(e),e.scope.on(),()=>{e.scope.off(),mi(t)}},Xl=()=>{st&&st.scope.off(),mi(null)};function wc(e){return e.vnode.shapeFlag&4}let Is=!1;function $f(e,t=!1,n=!1){t&&Os(t);const{props:s,children:i}=e.vnode,l=wc(e);lf(e,s,l,t),uf(e,i,n||t);const r=l?xf(e,t):void 0;return t&&Os(!1),r}function xf(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Bd);const{setup:s}=n;if(s){cn();const i=e.setupContext=s.length>1?Cf(e):null,l=Ks(e),r=Vs(s,e,0,[e.props,i]),u=br(r);if(un(),l(),(u||e.sp)&&!Ss(e)&&Gr(e),u){if(r.then(Xl,Xl),t)return r.then(f=>{Os(!0);try{Zl(e,f,t)}finally{Os(!1)}}).catch(f=>{Ri(f,e,0)});e.asyncDep=r}else Zl(e,r)}else kc(e)}function Zl(e,t,n){_e(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Pe(t)&&(e.setupState=jr(t)),kc(e)}function kc(e,t,n){const s=e.type;e.render||(e.render=s.render||Kt);{const i=Ks(e);cn();try{Kd(e)}finally{un(),i()}}}const Sf={get(e,t){return nt(e,"get",""),e[t]}};function Cf(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,Sf),slots:e.slots,emit:e.emit,expose:t}}function ji(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(jr(bd(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Cs)return Cs[n](e)},has(t,n){return n in t||n in Cs}})):e.proxy}function Tf(e,t=!0){return _e(e)?e.displayName||e.name:e.name||t&&e.__name}function Ef(e){return _e(e)&&"__vccOpts"in e}const $=(e,t)=>wd(e,t,Is);function bi(e,t,n){try{fi(-1);const s=arguments.length;return s===2?Pe(t)&&!pe(t)?pi(t)?ie(e,null,[t]):ie(e,t):ie(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&pi(n)&&(n=[n]),ie(e,t,n))}finally{fi(1)}}const Af="3.5.43";let Po;const Ql=typeof window<"u"&&window.trustedTypes;if(Ql)try{Po=Ql.createPolicy("vue",{createHTML:e=>e})}catch{}const $c=Po?e=>Po.createHTML(e):e=>e,Pf="http://www.w3.org/2000/svg",Of="http://www.w3.org/1998/Math/MathML",Xt=typeof document<"u"?document:null,ea=Xt&&Xt.createElement("template"),If={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"?Xt.createElementNS(Pf,e):t==="mathml"?Xt.createElementNS(Of,e):n?Xt.createElement(e,{is:n}):Xt.createElement(e);return e==="select"&&s&&s.multiple!=null&&i.setAttribute("multiple",s.multiple),i},createText:e=>Xt.createTextNode(e),createComment:e=>Xt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Xt.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{ea.innerHTML=$c(s==="svg"?`<svg>${e}</svg>`:s==="mathml"?`<math>${e}</math>`:e);const u=ea.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]}},Lf=Symbol("_vtc");function Mf(e,t,n){const s=e[Lf];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const ta=Symbol("_vod"),Rf=Symbol("_vsh"),Nf=Symbol(""),Ff=/(?:^|;)\s*display\s*:/;function Df(e,t,n){const s=e.style,i=We(n);let l=!1;if(n&&!i){if(t)if(We(t))for(const r of t.split(";")){const u=r.slice(0,r.indexOf(":")).trim();n[u]==null&&bs(s,u,"")}else for(const r in t)n[r]==null&&bs(s,r,"");for(const r in n){r==="display"&&(l=!0);const u=n[r];u!=null?jf(e,r,!We(t)&&t?t[r]:void 0,u)||bs(s,r,u):bs(s,r,"")}}else if(i){if(t!==n){const r=s[Nf];r&&(n+=";"+r),s.cssText=n,l=Ff.test(n)}}else t&&e.removeAttribute("style");ta in e&&(e[ta]=l?s.display:"",e[Rf]&&(s.display="none"))}const Zs=/\s*!important$/;function bs(e,t,n){if(pe(n))n.forEach(s=>bs(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))Zs.test(n)?e.setProperty(t,n.replace(Zs,""),"important"):e.setProperty(t,n);else{const s=Uf(e,t);Zs.test(n)?e.setProperty(En(s),n.replace(Zs,""),"important"):e[s]=n}}const na=["Webkit","Moz","ms"],io={};function Uf(e,t){const n=io[t];if(n)return n;let s=ct(t);if(s!=="filter"&&s in e)return io[t]=s;s=Oi(s);for(let i=0;i<na.length;i++){const l=na[i]+s;if(l in e)return io[t]=l}return t}function jf(e,t,n,s){return e.tagName==="TEXTAREA"&&(t==="width"||t==="height")&&We(s)&&n===s}const sa="http://www.w3.org/1999/xlink";function ia(e,t,n,s,i,l=qu(t)){s&&t.startsWith("xlink:")?n==null?e.removeAttributeNS(sa,t.slice(6,t.length)):e.setAttributeNS(sa,t,n):n==null||l&&!yr(n)?e.removeAttribute(t):e.setAttribute(t,l?"":qt(n)?String(n):n)}function oa(e,t,n,s,i){if(t==="innerHTML"||t==="textContent"){n!=null&&(e[t]=t==="innerHTML"?$c(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=yr(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 nn(e,t,n,s){e.addEventListener(t,n,s)}function Hf(e,t,n,s){e.removeEventListener(t,n,s)}const la=Symbol("_vei");function Vf(e,t,n,s,i=null){const l=e[la]||(e[la]={}),r=l[t];if(s&&r)r.value=s;else{const[u,f]=Kf(t);if(s){const h=l[t]=Yf(s,i);nn(e,u,h,f)}else r&&(Hf(e,u,r,f),l[t]=void 0)}}const Wf=/(Once|Passive|Capture)$/,Bf=/^on:?(?:Once|Passive|Capture)$/;function Kf(e){let t,n;for(;(n=e.match(Wf))&&!Bf.test(e);)t||(t={}),e=e.slice(0,e.length-n[1].length),t[n[1].toLowerCase()]=!0;return[e[2]===":"?e.slice(3):En(e.slice(2)),t]}let oo=0;const zf=Promise.resolve(),qf=()=>oo||(zf.then(()=>oo=0),oo=Date.now());function Yf(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&&Nt(h,t,5,u)}}else Nt(i,t,5,[s])};return n.value=e,n.attached=qf(),n}const aa=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Gf=(e,t,n,s,i,l)=>{const r=i==="svg";t==="class"?Mf(e,s,r):t==="style"?Df(e,n,s):Ei(t)?Ai(t)||Vf(e,t,n,s,l):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Jf(e,t,s,r))?(oa(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&ia(e,t,s,r,l,t!=="value")):e._isVueCE&&(Xf(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!We(s)))?oa(e,ct(t),s,l,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),ia(e,t,s,r))};function Jf(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&aa(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 aa(t)&&We(n)?!1:t in e}function Xf(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 xn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return pe(t)?n=>si(t,n):t};function Zf(e){e.target.composing=!0}function ra(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const _t=Symbol("_assign"),Qs=Symbol("_initialValue");function lo(e,t,n){return t&&(e=e.trim()),n&&(e=Ii(e)),e}const Xe={created(e,{modifiers:{lazy:t,trim:n,number:s}},i){e.parentNode&&(e.type==="text"?e[Qs]=e.defaultValue.replace(/[\r\n]/g,""):e.type==="textarea"&&(e[Qs]=e.defaultValue.replace(/\r\n?/g,`
`))),e[_t]=xn(i);const l=s||i.props&&i.props.type==="number";nn(e,t?"change":"input",r=>{r.target.composing||e[_t](lo(e.value,n,l))}),(n||l)&&nn(e,"change",()=>{e.value=lo(e.value,n,l)}),t||(nn(e,"compositionstart",Zf),nn(e,"compositionend",ra),nn(e,"change",ra))},mounted(e,{value:t,modifiers:{trim:n,number:s}}){const i=t??"",l=e[Qs];delete e[Qs],l!==void 0&&(e.type==="text"||e.type==="textarea")&&e.value!==l?e[_t](lo(e.value,n,s)):e.value=i},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:i,number:l}},r){if(e[_t]=xn(r),e.composing)return;const u=(l||e.type==="number")&&!/^0\d/.test(e.value)?Ii(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)}},Qf={deep:!0,created(e,t,n){e[_t]=xn(n),nn(e,"change",()=>{const s=e._modelValue,i=is(e),l=e.checked,r=e[_t];if(pe(s)){const u=el(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(rn(s)){const u=new Set(s);l?u.add(i):u.delete(i),r(u)}else r(xc(e,l))})},mounted:ca,beforeUpdate(e,t,n){e[_t]=xn(n),ca(e,t,n)}};function ca(e,{value:t,oldValue:n},s){e._modelValue=t;let i;if(pe(t))i=el(t,s.props.value)>-1;else if(rn(t))i=t.has(s.props.value);else{if(t===n)return;i=Rt(t,xc(e,!0))}e.checked!==i&&(e.checked=i)}const ao={created(e,{value:t},n){e.checked=Rt(t,n.props.value),e[_t]=xn(n),nn(e,"change",()=>{e[_t](is(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[_t]=xn(s),t!==n&&(e.checked=Rt(t,s.props.value))}},Wn={deep:!0,created(e,{value:t,modifiers:{number:n}},s){e._modelValue=t,nn(e,"change",()=>{const i=Array.prototype.filter.call(e.options,f=>f.selected).map(f=>n?Ii(is(f)):is(f)),l=e.multiple,r=l?rn(e._modelValue)?new Set(i):i:i[0],u=e._pendingValue=[l,l?pe(r)?i.slice():i:r];try{e[_t](r)}finally{Ni(()=>{e._pendingValue===u&&(e._pendingValue=void 0)})}}),e[_t]=xn(s)},mounted(e,{value:t}){ua(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[_t]=xn(n)},updated(e,{value:t}){const n=e._pendingValue;e._pendingValue=void 0,(!n||n[0]!==e.multiple||!ep(t,n[1],n[0]))&&ua(e,t)}};function ep(e,t,n){if(!n||pe(e))return Rt(e,t);if(rn(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&&!rn(t))){for(let i=0,l=e.options.length;i<l;i++){const r=e.options[i],u=is(r);if(n)if(s){const f=typeof u;f==="string"||f==="number"?r.selected=t.some(h=>String(h)===String(u)):r.selected=el(t,u)>-1}else r.selected=t.has(u);else if(Rt(is(r),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function is(e){return"_value"in e?e._value:e.value}function xc(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const tp=["ctrl","shift","alt","meta"],np={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)=>tp.some(n=>e[`${n}Key`]&&!t.includes(n))},Ot=(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=np[t[r]];if(u&&u(i,t))return}return e(i,...l)}))},sp={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},Sc=(e,t)=>{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=(i=>{if(!("key"in i))return;const l=En(i.key);if(t.some(r=>r===l||sp[r]===l))return e(i)}))},ip=tt({patchProp:Gf},If);let da;function op(){return da||(da=ff(ip))}const lp=((...e)=>{const t=op().createApp(...e),{mount:n}=t;return t.mount=s=>{const i=rp(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,ap(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},t});function ap(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function rp(e){return We(e)?document.querySelector(e):e}const cp="modulepreload",up=function(e,t){return new URL(e,t).href},fa={},bn=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=up(p,s),p in fa)return;fa[p]=!0;const b=p.endsWith(".css"),v=b?'[rel="stylesheet"]':"";if(s)for(let I=r.length-1;I>=0;I--){const T=r[I];if(T.href===p&&(!b||T.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${p}"]${v}`))return;const y=document.createElement("link");if(y.rel=b?"stylesheet":cp,b||(y.as="script"),y.crossOrigin="",y.href=p,f&&y.setAttribute("nonce",f),document.head.appendChild(y),b)return new Promise((I,T)=>{y.addEventListener("load",I),y.addEventListener("error",()=>T(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)})},dp={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_other",clock:"24",checked:!1}};const vi=typeof window<"u",Pn=(e,t=!1)=>t?Symbol.for(e):Symbol(e),fp=(e,t,n)=>pp({l:e,k:t,s:n}),pp=e=>JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029").replace(/\u0027/g,"\\u0027"),Ye=e=>typeof e=="number"&&isFinite(e),Cc=e=>ml(e)==="[object Date]",gi=e=>ml(e)==="[object RegExp]",hl=e=>Fe(e)&&Object.keys(e).length===0,ot=Object.assign,hp=Object.create,Ie=(e=null)=>hp(e);let pa;const mp=()=>pa||(pa=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:Ie()),bp=Object.prototype.hasOwnProperty;function St(e,t){return bp.call(e,t)}const je=Array.isArray,Be=e=>typeof e=="function",ae=e=>typeof e=="string",Ke=e=>typeof e=="boolean",Se=e=>e!==null&&typeof e=="object",vp=e=>Se(e)&&Be(e.then)&&Be(e.catch),Tc=Object.prototype.toString,ml=e=>Tc.call(e),Fe=e=>ml(e)==="[object Object]",gp=e=>e==null?"":je(e)||Fe(e)&&e.toString===Tc?JSON.stringify(e,null,2):String(e);function _p(e,t=""){return e.reduce((n,s,i)=>i===0?n+s:n+t+s,"")}function yp(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 wp(e){return e.replace(/&(?![a-z0-9#]{2,6};)/gi,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}const kp=/^javascript:/i,$p=/^(?:href|src|action|formaction)$/i,xp=/&#(?:x([0-9a-f]+)|(\d+));?/gi,Sp=/&(?:Tab|NewLine);/g,Cp=/&colon;?/gi,Tp=/[\u0000-\u0020\u007f-\u009f]/g,Ep=/(?:^|[\s"'<>/])on\w+\s*=\s*["']?[^"'>]+["']?/i,Ap=/(^|[\s"'<>/])on(\w+\s*=)/gi,Pp=/(^|[\s"'<>/])((?:href|src|action|formaction)\s*=\s*)([^\s"'=<>`]+)/gi;function Op(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 bl(e){const t=e.replace(xp,Op).replace(Sp,"").replace(Cp,":").replace(Tp,"");return kp.test(t)}function Ip(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+=bl(b)?"url(about:blank)":e.slice(l,u+1),s=u+1}return n+e.slice(s)}function ma(e,t){if($p.test(e)&&bl(t))return"about:blank";const n=e.toLowerCase()==="style"?Ip(t):t;return wp(n)}function Lp(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)}'`),Ep.test(e)&&(e=e.replace(Ap,"$1&#111;n$2")),e=e.replace(Pp,(t,n,s,i)=>bl(i)?`${n}${s}about:blank`:t),e}const ba=e=>!Se(e)||je(e);function oi(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(je(r)){const u=[];u.length=r.length,i[l]=u,n.push({src:r,des:u})}else Se(r)?((!Se(i[l])||je(i[l]))&&(i[l]=Ie()),n.push({src:r,des:i[l]})):i[l]=r})}}const Mp=17;function Ec(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 zt(e){return Se(e)&&vl(e)===0&&(St(e,"b")||St(e,"body"))}const Ac=["b","body"];function Rp(e){return On(e,Ac)}const Pc=["c","cases"];function Np(e){return On(e,Pc,[])}const Oc=["s","static"];function Fp(e){return On(e,Oc)}const Ic=["i","items"];function Dp(e){return On(e,Ic,[])}const Lc=["t","type"];function vl(e){return On(e,Lc)}const Mc=["v","value"];function ei(e,t){const n=On(e,Mc);if(n!=null)return n;throw Ls(t)}const Rc=["m","modifier"];function Up(e){return On(e,Rc)}const Nc=["k","key"];function jp(e){const t=On(e,Nc);if(t)return t;throw Ls(6)}function On(e,t,n){for(let s=0;s<t.length;s++){const i=t[s];if(St(e,i)&&e[i]!=null)return e[i]}return n}const Fc=[...Ac,...Pc,...Oc,...Ic,...Nc,...Rc,...Mc,...Lc];function Ls(e){return new Error(`unhandled node type: ${e}`)}function va(e){return n=>Hp(n,e)}function Hp(e,t){const n=Rp(t);if(n==null)throw Ls(0);if(vl(n)===1){const l=Np(n);return e.plural(l.reduce((r,u)=>[...r,ga(e,u)],[]))}else return ga(e,n)}function ga(e,t){const n=Fp(t);if(n!=null)return e.type==="text"?n:e.normalize([n]);{const s=Dp(t).reduce((i,l)=>[...i,Oo(e,l)],[]);return e.normalize(s)}}function Oo(e,t){const n=vl(t);switch(n){case 3:return ei(t,n);case 9:return ei(t,n);case 4:{const s=t;if(St(s,"k")&&s.k)return e.interpolate(e.named(s.k));if(St(s,"key")&&s.key)return e.interpolate(e.named(s.key));throw Ls(n)}case 5:{const s=t;if(St(s,"i")&&Ye(s.i))return e.interpolate(e.list(s.i));if(St(s,"index")&&Ye(s.index))return e.interpolate(e.list(s.index));throw Ls(n)}case 6:{const s=t,i=Up(s),l=jp(s);return e.linked(Oo(e,l),i?Oo(e,i):void 0,e.type)}case 7:return ei(t,n);case 8:return ei(t,n);default:throw new Error(`unhandled node on format message part: ${n}`)}}let _a=Ie();function Vp(e,t){{const n=e.cacheKey;if(n){const s=_a[n];return s||(_a[n]=va(e))}else return va(e)}}const sn={INVALID_ARGUMENT:Mp,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},Wp=24;function on(e){return Ec(e,null,void 0)}function gl(e,t){return t.locale!=null?ya(t.locale):ya(e.locale)}let ro;function ya(e){if(ae(e))return e;if(Be(e)){if(e.resolvedOnce&&ro!=null)return ro;if(e.constructor.name==="Function"){const t=e();if(vp(t))throw on(sn.NOT_SUPPORT_LOCALE_PROMISE_VALUE);return ro=t}else throw on(sn.NOT_SUPPORT_LOCALE_ASYNC_FUNCTION)}else throw on(sn.NOT_SUPPORT_LOCALE_TYPE)}function Bp(e,t,n){return[...new Set([n,...je(t)?t:Se(t)?Object.keys(t).filter(s=>s!=="default"):ae(t)?[t]:[n]])]}function Io(e,t,n){const s=ae(n)?n:_i,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(;je(f);)f=wa(u,f,t);const h=je(t)||!Fe(t)?t:t.default?t.default:null;return f=ae(h)?[h]:h,je(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&&Ke(s);i++){const l=t[i];ae(l)&&(s=Kp(e,t[i],n))}return s}function Kp(e,t,n){let s;const i=t.split("-");do{const l=i.join("-");s=zp(e,l,n),i.splice(-1,1)}while(i.length&&s===!0);return s}function zp(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),(je(n)||Fe(n))&&n[i]&&(s=n[i])}return s}const In=[];In[0]={w:[0],i:[3,0],"[":[4],o:[7]};In[1]={w:[1],".":[2],"[":[4],o:[7]};In[2]={w:[2],i:[3,0],0:[3,0]};In[3]={i:[3,0],0:[3,0],w:[1,1],".":[2,1],"[":[4,1],o:[7,1]};In[4]={"'":[5,0],'"':[6,0],"[":[4,2],"]":[1,3],o:8,l:[4,0]};In[5]={"'":[4,0],o:8,l:[5,0]};In[6]={'"':[4,0],o:8,l:[6,0]};const qp=/^\s?(?:true|false|-?[\d.]+|'[^']*'|"[^"]*")\s?$/;function Yp(e){return qp.test(e)}function Gp(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 Jp(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 Xp(e){const t=e.trim();return e.charAt(0)==="0"&&isNaN(parseInt(e))?!1:Yp(t)?Gp(t):"*"+t}function Zp(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=Xp(r),r===!1))return!1;v[1]()}};function y(){const I=e[n+1];if(s===5&&I==="'"||s===6&&I==='"')return n++,u="\\"+I,v[0](),!0}for(;s!==null;)if(n++,l=e[n],!(l==="\\"&&y())){if(f=Jp(l),b=In[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 Qp(e,t){return Se(e)?e[t]:null}function eh(e,t){if(!Se(e))return null;let n=ka.get(t);if(n||(n=Zp(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(Fc.includes(r)&&zt(i)||!Se(i)||!St(i,r))return null;const u=i[r];if(u===void 0||Be(i))return null;i=u,l++}return i}const th="11.4.12",Hi=-1,_i="en-US",yi="",$a=e=>`${e.charAt(0).toLocaleUpperCase()}${e.substr(1)}`;function nh(){return{upper:(e,t)=>t==="text"&&ae(e)?e.toUpperCase():t==="vnode"&&Se(e)&&"__v_isVNode"in e?e.children.toUpperCase():e,lower:(e,t)=>t==="text"&&ae(e)?e.toLowerCase():t==="vnode"&&Se(e)&&"__v_isVNode"in e?e.children.toLowerCase():e,capitalize:(e,t)=>t==="text"&&ae(e)?$a(e):t==="vnode"&&Se(e)&&"__v_isVNode"in e?$a(e.children):e}}let Dc;function sh(e){Dc=e}let Uc;function ih(e){Uc=e}let jc;function oh(e){jc=e}let Hc=null;const xa=e=>{Hc=e},Sa=()=>Hc;let Ca=0;function lh(e={}){const t=Be(e.onWarn)?e.onWarn:yp,n=ae(e.version)?e.version:th,s=ae(e.locale)||Be(e.locale)?e.locale:_i,i=Be(s)?_i:s,l=je(e.fallbackLocale)||Fe(e.fallbackLocale)||ae(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:i,r=Fe(e.messages)?e.messages:co(i),u=Fe(e.datetimeFormats)?e.datetimeFormats:co(i),f=Fe(e.numberFormats)?e.numberFormats:co(i),h=ot(Ie(),e.modifiers,nh()),p=e.pluralRules||Ie(),b=Be(e.missing)?e.missing:null,v=Ke(e.missingWarn)||gi(e.missingWarn)?e.missingWarn:!0,y=Ke(e.fallbackWarn)||gi(e.fallbackWarn)?e.fallbackWarn:!0,I=!!e.fallbackFormat,T=!!e.unresolving,k=Be(e.postTranslation)?e.postTranslation:null,A=Fe(e.processor)?e.processor:null,S=Ke(e.warnHtmlMessage)?e.warnHtmlMessage:!0,U=!!e.escapeParameter,C=Be(e.messageCompiler)?e.messageCompiler:Dc,K=Be(e.messageResolver)?e.messageResolver:Uc||Qp,O=Be(e.localeFallbacker)?e.localeFallbacker:jc||Bp,E=Se(e.fallbackContext)?e.fallbackContext:void 0,R=e,L=Se(R.__datetimeFormatters)?R.__datetimeFormatters:new Map,D=Se(R.__numberFormatters)?R.__numberFormatters:new Map,M=Se(R.__meta)?R.__meta:{};Ca++;const Y={version:n,cid:Ca,locale:s,fallbackLocale:l,messages:r,modifiers:h,pluralRules:p,missing:b,missingWarn:v,fallbackWarn:y,fallbackFormat:I,unresolving:T,postTranslation:k,processor:A,warnHtmlMessage:S,escapeParameter:U,messageCompiler:C,messageResolver:K,localeFallbacker:O,fallbackContext:E,onWarn:t,__meta:M};return Y.datetimeFormats=u,Y.numberFormats=f,Y.__datetimeFormatters=L,Y.__numberFormatters=D,Y}const co=e=>({[e]:Ie()});function Vc(e,t,n,s,i){const{missing:l,onWarn:r}=e;if(l!==null){const u=l(e,n,t,i);return ae(u)?u:t}else return t}function Ta(e,t){const n=e;Se(t)?n.__localeChainObjectCache?.delete(t):n.__localeChainCache?.delete(t)}function ti(e,t,n){Ta(e,n),e.fallbackContext&&Ta(e.fallbackContext,n),e.localeFallbacker(e,n,t)}function ah(e,t){return e===t?!1:e.split("-")[0]===t.split("-")[0]}function rh(e,t){const n=t.indexOf(e);if(n===-1)return!1;for(let s=n+1;s<t.length;s++)if(ah(e,t[s]))return!0;return!1}function Wc(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(Fe(y)&&ae(v))return v;Vc(e,t,v,i,r)}return null}function Bc(e,t,n){let s=`${e}__${t}`;return Fe(n)&&!hl(n)&&(s=`${s}__${JSON.stringify(n)}`),s}function Kc(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 zc(e,t,n,s){const[,i,l,r]=e;let u=n;return ae(i)?t.key=i:Fe(i)&&Object.keys(i).forEach(f=>{s.includes(f)?u[f]=i[f]:t[f]=i[f]}),ae(l)?t.locale=l:Fe(l)&&(u=l),Fe(r)&&(u=r),u}function Ea(e,...t){const{datetimeFormats:n,unresolving:s,onWarn:i}=e,{__datetimeFormatters:l}=e;if(!ae(t[0])&&!Cc(t[0])&&!Ye(t[0]))return yi;const[r,u,f,h]=Lo(...t),p=Ke(f.missingWarn)?f.missingWarn:e.missingWarn,b=Ke(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn,v=!!f.part,y=gl(e,f);if(!ae(r)||r===""){const S=new Intl.DateTimeFormat(y.replace(/!/g,""),h);return v?S.formatToParts(u):S.format(u)}const I=Wc(e,r,y,n,p,b,"datetime format");if(!ae(I))return s?Hi:r;const T=n[I][r],k=Bc(I,r,h);let A=l.get(k);return A||(A=new Intl.DateTimeFormat(I,ot({},T,h)),l.set(k,A)),v?A.formatToParts(u):A.format(u)}const qc=["localeMatcher","weekday","era","year","month","day","hour","minute","second","timeZoneName","formatMatcher","hour12","timeZone","dateStyle","timeStyle","calendar","dayPeriod","numberingSystem","hourCycle","fractionalSecondDigits"];function Lo(...e){const[t]=e,n=Ie(),s=Ie();let i;if(ae(t)){const r=t.match(/(\d{4}-\d{2}-\d{2})(T|\s)?(.*)/);if(!r)throw on(sn.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 on(sn.INVALID_ISO_DATE_ARGUMENT)}}else if(Cc(t)){if(isNaN(t.getTime()))throw on(sn.INVALID_DATE_ARGUMENT);i=t}else if(Ye(t))i=t;else throw on(sn.INVALID_ARGUMENT);const l=zc(e,n,s,qc);return[n.key||"",i,n,l]}function Aa(e,t,n){Kc(e.__datetimeFormatters,t,n)}function Pa(e,...t){const{numberFormats:n,unresolving:s,onWarn:i}=e,{__numberFormatters:l}=e;if(!Ye(t[0]))return yi;const[r,u,f,h]=Mo(...t),p=Ke(f.missingWarn)?f.missingWarn:e.missingWarn,b=Ke(f.fallbackWarn)?f.fallbackWarn:e.fallbackWarn,v=!!f.part,y=gl(e,f);if(!ae(r)||r===""){const S=new Intl.NumberFormat(y.replace(/!/g,""),h);return v?S.formatToParts(u):S.format(u)}const I=Wc(e,r,y,n,p,b,"number format");if(!ae(I))return s?Hi:r;const T=n[I][r],k=Bc(I,r,h);let A=l.get(k);return A||(A=new Intl.NumberFormat(I,ot({},T,h)),l.set(k,A)),v?A.formatToParts(u):A.format(u)}const Yc=["localeMatcher","style","currency","currencyDisplay","currencySign","useGrouping","minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits","compactDisplay","notation","signDisplay","unit","unitDisplay","roundingMode","roundingPriority","roundingIncrement","trailingZeroDisplay"];function Mo(...e){const[t]=e,n=Ie(),s=Ie();if(!Ye(t))throw on(sn.INVALID_ARGUMENT);const i=t,l=zc(e,n,s,Yc);return[n.key||"",i,n,l]}function Oa(e,t,n){Kc(e.__numberFormatters,t,n)}const ch=e=>e,uh=e=>"",dh="text",fh=e=>e.length===0?"":_p(e),ph=gp;function uo(e,t){return e=Math.abs(e),t===2?e===1?0:1:Math.min(e,2)}function hh(e){const t=Ye(e.pluralIndex)?e.pluralIndex:-1;return Ye(e.named?.count)?e.named.count:Ye(e.named?.n)?e.named.n:t}function mh(e={}){const t=e.locale,n=hh(e),s=ae(t)&&Be(e.pluralRules?.[t])?e.pluralRules[t]:uo,i=s===uo?void 0:uo,l=A=>A[s(n,A.length,i)],r=e.list||[],u=A=>r[A],f=e.named||Ie();Ye(e.pluralIndex)&&(f.count||=e.pluralIndex,f.n||=e.pluralIndex);const h=A=>f[A];function p(A,S){const U=Be(e.messages)?e.messages(A,!!S):Se(e.messages)?e.messages[A]:!1;return U||(e.parent?e.parent.message(A):uh)}const b=A=>e.modifiers?e.modifiers[A]:ch,v=Be(e.processor?.normalize)?e.processor.normalize:fh,y=Be(e.processor?.interpolate)?e.processor.interpolate:ph,I=ae(e.processor?.type)?e.processor.type:dh,k={list:u,named:h,plural:l,linked:(A,...S)=>{const[U,C]=S;let K="text",O="";S.length===1?Se(U)?(O=U.modifier||O,K=U.type||K):ae(U)&&(O=U||O):S.length===2&&(ae(U)&&(O=U||O),ae(C)&&(K=C||K));const E=p(A,!0)(k),R=E===""||E===void 0?A:E,L=K==="vnode"&&je(R)&&O?R[0]:R;return O?b(O)(L,K):L},message:p,type:I,interpolate:y,normalize:v,values:ot(Ie(),r,f)};return k}const Ia=()=>"",ln=e=>Be(e);function La(e,...t){const{fallbackFormat:n,postTranslation:s,unresolving:i,messageCompiler:l,fallbackLocale:r,messages:u}=e,[f,h]=Ro(...t),p=Ke(h.missingWarn)?h.missingWarn:e.missingWarn,b=Ke(h.fallbackWarn)?h.fallbackWarn:e.fallbackWarn,v=Ke(h.escapeParameter)?h.escapeParameter:e.escapeParameter,y=!!h.resolvedMessage,I=ae(h.default)||Ke(h.default)?Ke(h.default)?l?f:()=>f:h.default:n?l?f:()=>f:null,T=n||I!=null&&(ae(I)||Be(I)),k=gl(e,h);v&&bh(h);let[A,S,U]=y?[f,k,u[k]||Ie()]:Gc(e,f,k,r,b,p),C=A,K=f;if(!y&&!(ae(C)||zt(C)||ln(C))&&T&&(C=I,K=C),!y&&(!(ae(C)||zt(C)||ln(C))||!ae(S)))return i?Hi:f;let O=!1;const E=()=>{O=!0},R=ln(C)?C:Jc(e,f,S,C,K,E);if(O)return C;const L=_h(e,S,U,h),D=mh(L),M=vh(e,R,D);let Y=s?s(M,f):M;return v&&ae(Y)&&(Y=Lp(Y)),Y}function bh(e){je(e.list)?e.list=e.list.map(t=>ae(t)?ha(t):t):Se(e.named)&&Object.keys(e.named).forEach(t=>{ae(e.named[t])&&(e.named[t]=ha(e.named[t]))})}function Gc(e,t,n,s,i,l){const{messages:r,onWarn:u,messageResolver:f,localeFallbacker:h}=e,p=h(e,s,n);let b=Ie(),v,y=null;const I="translate";for(let T=0;T<p.length&&(v=p[T],b=r[v]||Ie(),(y=f(b,t))===null&&(y=b[t]),!(ae(y)||zt(y)||ln(y)));T++)if(!rh(v,p)){const k=Vc(e,t,v,l,I);k!==t&&(y=k)}return[y,v,b]}function Jc(e,t,n,s,i,l){const{messageCompiler:r,warnHtmlMessage:u}=e;if(ln(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,gh(e,n,i,s,u,l));return f.locale=n,f.key=t,f.source=s,f}function vh(e,t,n){return t(n)}function Ro(...e){const[t,n,s]=e,i=Ie();if(!ae(t)&&!Ye(t)&&!ln(t)&&!zt(t))throw on(sn.INVALID_ARGUMENT);const l=Ye(t)?String(t):(ln(t),t);return Ye(n)?i.plural=n:ae(n)?i.default=n:Fe(n)&&!hl(n)?i.named=n:je(n)&&(i.list=n),Ye(s)?i.plural=s:ae(s)?i.default=s:Fe(s)&&ot(i,s),[l,i]}function gh(e,t,n,s,i,l){return{locale:t,key:n,warnHtmlMessage:i,onError:r=>{throw l&&l(r),r},onCacheKey:r=>fp(t,n,r)}}function _h(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,I)=>{let T=r(n,y);if(T==null&&(p||I)){const[k,,A]=Gc(p||e,y,t,u,f,h);T=k??r(A,y)}if(ae(T)||zt(T)){let k=!1;const S=Jc(e,y,t,T,y,()=>{k=!0});return k?Ia:S}else return ln(T)?T:Ia}};return e.processor&&(v.processor=e.processor),s.list&&(v.list=s.list),s.named&&(v.named=s.named),Ye(s.plural)&&(v.pluralIndex=s.plural),v}const yh="11.4.12",yt={UNEXPECTED_RETURN_TYPE:Wp,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 Et(e,...t){return Ec(e,null,void 0)}const No=Pn("__translateVNode"),Fo=Pn("__datetimeParts"),Do=Pn("__numberParts"),wh=Pn("__setPluralRules"),kh=Pn("__injectWithOption"),Zn=Pn("__dispose");let Xc=null;{const e=mp().__VUE_INSTANCE_SETTERS__;je(e)&&e.push(t=>{Xc=t})}function Ms(e){if(!Se(e)||zt(e))return e;for(const t in e)if(St(e,t))if(!t.includes("."))Se(e[t])&&Ms(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]]=Ie()),!Se(i[n[r]])){l=!0;break}i=i[n[r]]}if(l||(zt(i)?Fc.includes(n[s])||delete e[t]:(i[n[s]]=e[t],delete e[t])),!zt(i)){const r=i[n[s]];Se(r)&&Ms(r)}}return e}function Zc(e,t){const{messages:n,__i18n:s,messageResolver:i,flatJson:l}=t,r=Fe(n)?n:je(s)?Ie():{[e]:Ie()};if(je(s)&&s.forEach(u=>{if("locale"in u&&"resource"in u){const{locale:f,resource:h}=u;f?(r[f]=r[f]||Ie(),oi(h,r[f])):oi(h,r)}else ae(u)&&oi(JSON.parse(u),r)}),i==null&&l)for(const u in r)St(r,u)&&Ms(r[u]);return r}function $h(e){return e.type}function xh(e,t,n){let s=Se(t.messages)?t.messages:Ie();"__i18nGlobal"in n&&(s=Zc(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 ie(Bs,null,e,0)}function Qc(){return Xc??yc()}const Ra=()=>[],Sh=()=>!1;let Na=0;function Fa(e){return((t,n,s,i)=>e(n,s,Qc()||void 0,i))}function Uo(e={}){const{__root:t,__injectWithOption:n}=e,s=t===void 0,i=e.flatJson,l=vi?$e:vd;let r=Ke(e.inheritLocale)?e.inheritLocale:!0;const u=l(t&&r?t.locale.value:ae(e.locale)?e.locale:_i),f=l(t&&r?t.fallbackLocale.value:ae(e.fallbackLocale)||je(e.fallbackLocale)||Fe(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:u.value),h=l(Zc(u.value,e)),p=l(Fe(e.datetimeFormats)?e.datetimeFormats:{[u.value]:{}}),b=l(Fe(e.numberFormats)?e.numberFormats:{[u.value]:{}});let v=t?t.missingWarn:Ke(e.missingWarn)||gi(e.missingWarn)?e.missingWarn:!0,y=t?t.fallbackWarn:Ke(e.fallbackWarn)||gi(e.fallbackWarn)?e.fallbackWarn:!0,I=t?t.fallbackRoot:Ke(e.fallbackRoot)?e.fallbackRoot:!0,T=!!e.fallbackFormat,k=Be(e.missing)?e.missing:null,A=Be(e.missing)?Fa(e.missing):null,S=Be(e.postTranslation)?e.postTranslation:null,U=t?t.warnHtmlMessage:Ke(e.warnHtmlMessage)?e.warnHtmlMessage:!0,C=!!e.escapeParameter;const K=t?t.modifiers:Fe(e.modifiers)?e.modifiers:{};let O=e.pluralRules||t&&t.pluralRules,E;E=(()=>{s&&xa(null);const P={version:yh,locale:u.value,fallbackLocale:f.value,messages:h.value,modifiers:K,pluralRules:O,missing:A===null?void 0:A,missingWarn:v,fallbackWarn:y,fallbackFormat:T,unresolving:!0,postTranslation:S===null?void 0:S,warnHtmlMessage:U,escapeParameter:C,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};P.datetimeFormats=p.value,P.numberFormats=b.value,P.__datetimeFormatters=Fe(E)?E.__datetimeFormatters:void 0,P.__numberFormatters=Fe(E)?E.__numberFormatters:void 0;const F=lh(P);return s&&xa(F),F})(),ti(E,u.value,f.value);function L(){return[u.value,f.value,h.value,p.value,b.value]}const D=$({get:()=>u.value,set:P=>{E.locale=P,u.value=P}});function M(P){s||(E.fallbackContext=t?Sa():void 0);try{ti(E,u.value,P)}finally{s||(E.fallbackContext=void 0)}}const Y=$({get:()=>f.value,set:P=>{f.value=P,E.fallbackLocale=f.value,M(f.value)}}),te=$(()=>h.value),ye=$(()=>p.value),re=$(()=>b.value);function be(){return Be(S)?S:null}function ge(P){S=P,E.postTranslation=P}function we(){return k}function Ge(P){P!==null&&(A=Fa(P)),k=P,E.missing=A}const qe=(P,F,ce,fe,Oe,De)=>{L();let Ve;try{s||(E.fallbackContext=t?Sa():void 0),Ve=P(E)}finally{s||(E.fallbackContext=void 0)}if(ce!=="translate exists"&&Ye(Ve)&&Ve===Hi||ce==="translate exists"&&!Ve){const[kt,Yn]=F();return t&&I?fe(t):Oe(kt)}else{if(De(Ve))return Ve;throw Et(yt.UNEXPECTED_RETURN_TYPE)}};function le(...P){return qe(F=>Reflect.apply(La,null,[F,...P]),()=>Ro(...P),"translate",F=>Reflect.apply(F.t,F,[...P]),F=>F,F=>ae(F))}function Z(...P){const[F,ce,fe]=P;if(fe&&!Se(fe))throw Et(yt.INVALID_ARGUMENT);return le(F,ce,ot({resolvedMessage:!0},fe||{}))}function ue(...P){return qe(F=>Reflect.apply(Ea,null,[F,...P]),()=>Lo(...P),"datetime format",F=>Reflect.apply(F.d,F,[...P]),()=>yi,F=>ae(F)||je(F))}function ke(...P){return qe(F=>Reflect.apply(Pa,null,[F,...P]),()=>Mo(...P),"number format",F=>Reflect.apply(F.n,F,[...P]),()=>yi,F=>ae(F)||je(F))}function H(P){return P.map(F=>ae(F)||Ye(F)||Ke(F)?Ma(String(F)):F)}const se={normalize:H,interpolate:P=>P,type:"vnode"};function wt(...P){return qe(F=>{let ce;const fe=F;try{fe.processor=se,ce=Reflect.apply(La,null,[fe,...P])}finally{fe.processor=null}return ce},()=>Ro(...P),"translate",F=>F[No](...P),F=>[Ma(F)],F=>je(F))}function Ln(...P){return qe(F=>Reflect.apply(Pa,null,[F,...P]),()=>Mo(...P),"number format",F=>F[Do](...P),Ra,F=>ae(F)||je(F))}function Mn(...P){return qe(F=>Reflect.apply(Ea,null,[F,...P]),()=>Lo(...P),"datetime format",F=>F[Fo](...P),Ra,F=>ae(F)||je(F))}function Al(P){O=P,E.pluralRules=O}function w(P,F){return qe(()=>{if(!P)return!1;const ce=ae(F)?F:u.value,fe=ae(F)?[ce]:Io(E,f.value,ce);for(let Oe=0;Oe<fe.length;Oe++){const De=z(fe[Oe]);let Ve=E.messageResolver(De,P);if(Ve===null&&(Ve=De[P]),zt(Ve)||ln(Ve)||ae(Ve))return!0}return!1},()=>[P],"translate exists",ce=>Reflect.apply(ce.te,ce,[P,F]),Sh,ce=>Ke(ce))}function x(P){let F=null;const ce=Io(E,f.value,u.value);for(let fe=0;fe<ce.length;fe++){const Oe=h.value[ce[fe]]||{},De=E.messageResolver(Oe,P);if(De!=null){F=De;break}}return F}function N(P){const F=x(P);return F??(t?t.tm(P)||{}:{})}function z(P){return h.value[P]||{}}function j(P,F){if(i){const ce={[P]:F};for(const fe in ce)St(ce,fe)&&Ms(ce[fe]);F=ce[P]}h.value[P]=F,E.messages=h.value}function W(P,F){h.value[P]=h.value[P]||{};const ce={[P]:F};if(i)for(const fe in ce)St(ce,fe)&&Ms(ce[fe]);F=ce[P],oi(F,h.value[P]),E.messages=h.value}function X(P){return p.value[P]||{}}function J(P,F){p.value[P]=F,E.datetimeFormats=p.value,Aa(E,P,F)}function G(P,F){p.value[P]=ot(p.value[P]||{},F),E.datetimeFormats=p.value,Aa(E,P,F)}function V(P){return b.value[P]||{}}function de(P,F){b.value[P]=F,E.numberFormats=b.value,Oa(E,P,F)}function ee(P,F){b.value[P]=ot(b.value[P]||{},F),E.numberFormats=b.value,Oa(E,P,F)}Na++,Tt(f,()=>M(f.value),{deep:!0,flush:"sync"}),t&&vi&&(Tt(t.locale,P=>{r&&(u.value=P,E.locale=P,ti(E,u.value,f.value))}),Tt(t.fallbackLocale,P=>{r&&(f.value=P,E.fallbackLocale=f.value,ti(E,u.value,f.value))}));const Q={id:Na,locale:D,fallbackLocale:Y,get inheritLocale(){return r},set inheritLocale(P){r=P,P&&t&&(D.value=t.locale.value,Y.value=t.fallbackLocale.value)},get availableLocales(){return Object.keys(h.value).sort()},messages:te,get modifiers(){return K},get pluralRules(){return O||{}},get isGlobal(){return s},get missingWarn(){return v},set missingWarn(P){v=P,E.missingWarn=v},get fallbackWarn(){return y},set fallbackWarn(P){y=P,E.fallbackWarn=y},get fallbackRoot(){return I},set fallbackRoot(P){I=P},get fallbackFormat(){return T},set fallbackFormat(P){T=P,E.fallbackFormat=T},get warnHtmlMessage(){return U},set warnHtmlMessage(P){U=P,E.warnHtmlMessage=P},get escapeParameter(){return C},set escapeParameter(P){C=P,E.escapeParameter=P},t:le,getLocaleMessage:z,setLocaleMessage:j,mergeLocaleMessage:W,getPostTranslationHandler:be,setPostTranslationHandler:ge,getMissingHandler:we,setMissingHandler:Ge,[wh]:Al};return Q.datetimeFormats=ye,Q.numberFormats=re,Q.rt=Z,Q.te=w,Q.tm=N,Q.d=ue,Q.n=ke,Q.getDateTimeFormat=X,Q.setDateTimeFormat=J,Q.mergeDateTimeFormat=G,Q.getNumberFormat=V,Q.setNumberFormat=de,Q.mergeNumberFormat=ee,Q[kh]=n,Q[No]=wt,Q[Fo]=Mn,Q[Do]=Ln,Q}const _l={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function Ch({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((s,i)=>[...s,...i.type===q?i.children:[i]],[]):t.reduce((n,s)=>{const i=e[s];return i&&(n[s]=i()),n},Ie())}function eu(){return q}const Th=Le({name:"i18n-t",props:ot({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>Ye(e)||!isNaN(e)}},_l),setup(e,t){const{slots:n,attrs:s}=t,i=e.i18n||yl({useScope:e.scope,__useComponent:!0});return()=>{const l=()=>{const f=Object.keys(n).filter(b=>b[0]!=="_"),h=Ie();e.locale&&(h.locale=e.locale),e.plural!==void 0&&(h.plural=ae(e.plural)?+e.plural:e.plural);const p=Ch(t,f);return i[No](e.keypath,p,h)},r=ot(Ie(),s),u=ae(e.tag)||Se(e.tag)?e.tag:eu();return Se(u)?bi(u,r,{default:l}):bi(u,r,l())}}}),Da=Th;function Eh(e){return je(e)&&!ae(e[0])}function tu(e,t,n,s){const{slots:i,attrs:l}=t;return()=>{const r=()=>{const h={part:!0};let p=Ie();e.locale&&(h.locale=e.locale),ae(e.format)?h.key=e.format:Se(e.format)&&(ae(e.format.key)&&(h.key=e.format.key),p=Object.keys(e.format).reduce((y,I)=>n.includes(I)?ot(Ie(),y,{[I]:e.format[I]}):y,Ie()));const b=s(e.value,h,p);let v=[h.key];return je(b)?v=b.map((y,I)=>{const T=i[y.type],k=T?T({[y.type]:y.value,index:I,parts:b}):[y.value];return Eh(k)&&(k[0].key=`${y.type}-${I}`),k}):ae(b)&&(v=[b]),v},u=ot(Ie(),l),f=ae(e.tag)||Se(e.tag)?e.tag:eu();return Se(f)?bi(f,u,{default:r}):bi(f,u,r())}}const Ah=Le({name:"i18n-n",props:ot({value:{type:Number,required:!0},format:{type:[String,Object]}},_l),setup(e,t){const n=e.i18n||yl({useScope:e.scope,__useComponent:!0});return tu(e,t,Yc,(...s)=>n[Do](...s))}}),Ua=Ah;function Ph(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 Oh(e){const t=r=>{const{instance:u,value:f}=r;if(!u||!u.$)throw Et(yt.UNEXPECTED_ERROR);const h=Ph(e,u.$),p=ja(f);return[Reflect.apply(h.t,h,[...Ha(p)]),h]};return{created:(r,u)=>{const[f,h]=t(u);vi&&(r.__i18nWatcher=Tt(h.locale,()=>{u.instance&&u.instance.$forceUpdate()})),r.__composer=h,r.textContent=f},unmounted:r=>{vi&&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(ae(e))return{path:e};if(Fe(e)){if(!("path"in e))throw Et(yt.REQUIRED_VALUE,"path");return e}else throw Et(yt.INVALID_VALUE)}function Ha(e){const{path:t,locale:n,args:s,choice:i,plural:l}=e,r={},u=s||{};return ae(n)&&(r.locale=n),Ye(i)&&(r.plural=i),Ye(l)&&(r.plural=l),[t,u,r]}function Ih(e,t,...n){const s=Fe(n[0])?n[0]:{};(!Ke(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",Oh(t))}const Lh=Pn("global-vue-i18n");function Mh(e={}){const t=Ke(e.globalInjection)?e.globalInjection:!0,n=new Map,[s,i]=Rh(e),l=Pn("");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),Fe(b[0])){const I=b[0];h.__composerExtend=I.__composerExtend,h.__vueI18nExtend=I.__vueI18nExtend}let v=null;t&&(v=Vh(p,h.global)),Ih(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 yl(e={}){const t=Qc();if(t==null)throw Et(yt.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw Et(yt.NOT_INSTALLED);const n=Nh(t),s=Dh(n),i=$h(t),l=Fh(e,i);if(l==="global")return xh(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 Et(yt.NOT_AVAILABLE_COMPOSITION_IN_LEGACY);const f=n,h=ot({},e),p=Va(n,t);h.__root=p||s;const b=Uo(h);return f.__composerExtend&&(b[Zn]=f.__composerExtend(b)),xr()&&Xu(()=>{const y=b[Zn];y&&(y(),delete b[Zn])}),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=Uo(f),r.__composerExtend&&(u[Zn]=r.__composerExtend(u)),jh(r,t,u),r.__setInstance(t,u)}return u}function Rh(e,t){const n=Ju(),s=n.run(()=>Uo(e));if(s==null)throw Et(yt.UNEXPECTED_ERROR);return[n,s]}function Nh(e){const t=$s(e.isCE?Lh:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw Et(e.isCE?yt.NOT_INSTALLED_WITH_PROVIDE:yt.UNEXPECTED_ERROR);return t}function Fh(e,t){return hl(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function Dh(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=Uh(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 Uh(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function jh(e,t,n){An(()=>{},t),dl(()=>{const s=n;e.__deleteInstance(t);const i=s[Zn];i&&(i(),delete s[Zn])},t)}const Hh=["locale","fallbackLocale","availableLocales"],Wa=["t","rt","d","n","tm","te"];function Vh(e,t){const n=Object.create(null);return Hh.forEach(i=>{const l=Object.getOwnPropertyDescriptor(t,i);if(!l)throw Et(yt.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 Et(yt.UNEXPECTED_ERROR);Object.defineProperty(e.config.globalProperties,`$${i}`,l)}),()=>{delete e.config.globalProperties.$i18n,Wa.forEach(i=>{delete e.config.globalProperties[`$${i}`]})}}const Wh=Le({name:"i18n-d",props:ot({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},_l),setup(e,t){const n=e.i18n||yl({useScope:e.scope,__useComponent:!0});return tu(e,t,qc,(...s)=>n[Fo](...s))}}),Ba=Wh;sh(Vp);ih(eh);oh(Io);const Bh={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"}},live:{t:0,b:{t:2,i:[{t:3}],s:"live picture"}},cover:{t:0,b:{t:2,i:[{t:3}],s:"album cover"}}},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"}},live:{t:0,b:{t:2,i:[{t:3}],s:"Live picture"}},live_hint:{t:0,b:{t:2,i:[{t:3}],s:"A small picture of the camera in the icon's place, refreshed at the pace below while the page is on screen. A tap still opens it full screen."}},live_needs_firmware:{t:0,b:{t:2,i:[{t:3}],s:"A live picture needs firmware 0.2.77 or newer: press Update on the screen after saving."}},cover:{t:0,b:{t:2,i:[{t:3}],s:"Album cover"}},cover_hint:{t:0,b:{t:2,i:[{t:3}],s:"The album cover of what plays in the icon's place, like Home Assistant's own tile; a player without a picture keeps its icon. A tap still opens the card."}},cover_needs_firmware:{t:0,b:{t:2,i:[{t:3}],s:"The album cover on the tile needs firmware 0.2.78 or newer: press Update on the screen after saving."}},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."}}},refresh:{label:{t:0,b:{t:2,i:[{t:3}],s:"Refresh"}},seconds:{t:0,b:{t:2,i:[{t:3,v:"Every "},{t:4,k:"n"},{t:3,v:" s"}]}}},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 in the tile's own colour; 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"}},board_elecrow:{t:0,b:{t:2,i:[{t:3}],s:"Elecrow CrowPanel · 7 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:"Fire manual 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"}}},wait_yaml:{comment:{t:0,b:{t:2,i:[{t:3}],s:"Doorbell: show the alert and wait until someone presses the button."}},message:{t:0,b:{t:2,i:[{t:3}],s:"Someone is coming to the door."}}}},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 Screens 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"}}},climate_fan:{auto:{t:0,b:{t:2,i:[{t:3}],s:"Auto"}},low:{t:0,b:{t:2,i:[{t:3}],s:"Low"}},medium:{t:0,b:{t:2,i:[{t:3}],s:"Medium"}},high:{t:0,b:{t:2,i:[{t:3}],s:"High"}},middle:{t:0,b:{t:2,i:[{t:3}],s:"Middle"}},focus:{t:0,b:{t:2,i:[{t:3}],s:"Focus"}},diffuse:{t:0,b:{t:2,i:[{t:3}],s:"Diffuse"}},top:{t:0,b:{t:2,i:[{t:3}],s:"Top"}},on:{t:0,b:{t:2,i:[{t:3}],s:"On"}},off:{t:0,b:{t:2,i:[{t:3}],s:"Off"}}},climate_swing:{on:{t:0,b:{t:2,i:[{t:3}],s:"On"}},off:{t:0,b:{t:2,i:[{t:3}],s:"Off"}},both:{t:0,b:{t:2,i:[{t:3}],s:"Both"}},vertical:{t:0,b:{t:2,i:[{t:3}],s:"Vertical"}},horizontal:{t:0,b:{t:2,i:[{t:3}],s:"Horizontal"}}}},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_min"},{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"}},percent:{t:0,b:{t:2,i:[{t:3}],s:"%"}}},tile:{page:{t:0,b:{t:2,i:[{t:3,v:"Page "},{t:4,k:"n"}]}}}}},Kh=Bh,Ka=e=>e%10>=2&&e%10<=4&&(e%100<12||e%100>14),za={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},zh=Object.assign({"../../screen_manager/translations/de.json":()=>bn(()=>import("./de-CMx0ATkh.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/en-GB.json":()=>bn(()=>import("./en-GB-v7qWKoyN.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/es.json":()=>bn(()=>import("./es-CiY4kmZ6.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/fr.json":()=>bn(()=>import("./fr-PLcoeSWe.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/it.json":()=>bn(()=>import("./it-VhrDkYVK.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/nl.json":()=>bn(()=>import("./nl-BvCFf3cV.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/pl.json":()=>bn(()=>import("./pl-B4qhbPaP.js"),[],import.meta.url).then(e=>e.default),"../../screen_manager/translations/pt.json":()=>bn(()=>import("./pt-Cj4BVpRQ.js"),[],import.meta.url).then(e=>e.default)}),qh=Object.fromEntries(Object.entries(zh).map(([e,t])=>[e.slice(e.lastIndexOf("/")+1,-5),t])),Rs={...dp},nu=new Set(["en"]),wl={},su=e=>wl[e]=(t,n)=>Math.min((za[Rs[e]?.plural]||za.one_other)(t),n-1),kl=()=>["en",...Object.keys(Rs).filter(e=>e!=="en").sort()];kl().forEach(su);const cs=Mh({locale:"en",fallbackLocale:"en",messages:{en:Kh},pluralRules:wl,missingWarn:!1,fallbackWarn:!1,missing:(e,t)=>{}}),c=cs.global.t,Yh=(e,t="en")=>cs.global.te(e,t),$l=()=>cs.global.locale.value,Gh=e=>Rs[e];function Jh(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 iu(e,t=kl()){const n=i=>t.find(l=>l.toLowerCase()===i.toLowerCase()),s=(e||"").trim();return s?n(s)||n(s.split("-")[0]):void 0}const ou=(e,t=kl())=>iu(e,t)||"en";function Xh(e,t,n=Rs[e]){n&&(Rs[e]=n),wl[e]||su(e),cs.global.setLocaleMessage(e,t),nu.add(e)}const qa={};function lu(e){if(nu.has(e))return Promise.resolve(!0);const t=qh[e];return t?qa[e]??=t().then(n=>(Xh(e,n),!0),()=>(delete qa[e],!1)):Promise.resolve(!1)}async function Zh(e=ou(Jh())){const t=await lu(e)?e:"en";return cs.global.locale.value=t,document.documentElement.lang=t,t}const os={point:{decimal:".",group:",",from:4},comma:{decimal:",",group:".",from:4},space:{decimal:",",group:" ",from:4}};function au(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 Qh(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 em=(e,t=$l())=>new Intl.ListFormat(t==="en"?"en-GB":t,{type:"conjunction"}).format(e.map(String)),ze=6,fn=8,Ns=fn*ze,ru=["single","wide","full"],Sn=e=>e===!0?"wide":e===!1?"single":e,us=e=>/^screen\.page_[1-8]$/.test(e)?Number(e.slice(-1)):0,ut=e=>ru.includes(e.options?.size)?e.options.size:"single",jo=e=>ut(e)!=="single",cu=e=>ut(e)==="full",uu=e=>e-e%ze,du=e=>e-e%2,At=e=>Math.floor(e/ze),xl=e=>Sn(e)==="full"?ze:Sn(e)==="wide"?2:1,Bn=(e,t)=>Sn(t)==="full"?Array.from({length:ze},(n,s)=>uu(e)+s):Sn(t)==="wide"?[e,e+1]:[e],Ga=(e,t)=>Sn(t)==="full"?uu(e):Sn(t)==="wide"?du(e):e,Ze=e=>e.tiles.map(t=>({tile:t,slot:t.slot}));function fu(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+=xl(s),i})}function tm(e){const t=fu(e);return e.some((n,s)=>n.slot!==t[s])}function Vi(e){if(e.tiles.some(t=>!Number.isInteger(t.slot))){const t=fu(e.tiles);e.tiles.forEach((n,s)=>n.slot=t[s])}e.tiles.sort((t,n)=>t.slot-n.slot)}function ts(e){const t=new Set;for(const{tile:n,slot:s}of e)for(const i of Bn(s,ut(n)))t.add(i);return t}const Fs=(e,t,n)=>Number.isInteger(t)&&t>=0&&t<Ns&&(Sn(n)==="full"?t%ze===0:Sn(n)==="wide"?t+1<Ns&&!(t%2):!0)&&Bn(t,n).every(s=>!e.has(s));function wi(e,t,n=0){for(let s=n;s<Ns;s++)if(Fs(e,s,t))return s;return-1}function pu(e,t,n){let s=-1;for(let i=0;i<Ns;i++)Fs(e,i,t)&&(s<0||Math.abs(i-n)<=Math.abs(s-n))&&(s=i);return s}function hu(e,t,n){const s=ut(t);if(n=Ga(n,s),!Fs(new Set,n,s))return null;const i=Bn(n,s),l=e.includes(t)?Bn(t.slot,s):[],r=[{tile:t,slot:n}],u=[];for(const f of e)f!==t&&(Bn(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=ts(r);let b=l.map(v=>Ga(v,h)).find(v=>Fs(p,v,h));if(b===void 0&&(b=pu(p,h,f.slot)),b<0)return null;r.push({tile:f,slot:b})}return r.sort((f,h)=>f.slot-h.slot)}function It(e,t=1){const n=Math.max(0,...e.map(({tile:s,slot:i})=>i+xl(ut(s))));return Math.min(fn,Math.max(1,Math.ceil(n/ze),t||1))}function nm(e,t){const n=Array.from({length:t},()=>new Set);let s=0;for(const{tile:h,slot:p}of e){const b=us(h.entity)-1,v=At(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 sm(e){const t=e.split(".")[0];return t==="sun"?{options:{display:"sunpath",size:"wide"}}:t==="weather"?{options:{display:"forecast",size:"wide"}}:us(e)?{}:t==="screen"?{options:{display:"digital",size:"wide"}}:{}}const mu=e=>({entity:e,name:"",slot:-1,...sm(e)});function bu(e,t){const n=e.entity.split(".")[0],s=t.controls?.[n],i=e.options||{};if(!s||!["wide","full"].includes(i.size)||!["standard","cover"].includes(i.display||"standard")||i.inline==="slider")return null;const l=i.controls??(i.size==="full"?"none":s.default);return l==="none"?null:l}function im(e,t){const n=bu(e,t);return n?t.controls?.[e.entity.split(".")[0]]?.choices.find(s=>s.key===n)?.label||n:c("editor.inspect.control_none")}const Ho=e=>(/^(\d+)\.(\d+)\.(\d+)$/.exec(e||"")||[]).slice(1).map(Number);function pn(e,t){const[n,s]=[Ho(e),Ho(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 om=(e,t,n,s)=>pn(e,`${t}.${n}.${s}`),lm=Ns;function am(e){return Ho(e).length!==3?10:pn(e,"0.2.62")?lm:pn(e,"0.2.7")?20:10}const rm=["standard","watch","forecast","graph","digital","analog","sunpath","live","cover"],vu=e=>rm.includes(e)?c(`editor.displays.${e}`):e,cm=e=>c(`editor.sizes.${ru.includes(e)?e:"single"}`),Ja=["light","switch","input_boolean","fan","media_player","climate"],um=["light","fan","cover","number","input_number","media_player"],dm={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 Ht(e){const t=e.split(".")[0],n=dm[t];return n?[c(`editor.domains.${t}`),...n]:[c("editor.domains.entity"),"◇","#637184","#edf0f4"]}const gu={clock:"clock-outline",analog:"clock-outline",date:"calendar"},at=e=>JSON.stringify(e),Ae=e=>String.fromCodePoint(parseInt(e,16));function Wi(e,t=new Date,n){const s=String(t.getMinutes()).padStart(2,"0");if(e)return`${String(t.getHours()).padStart(2,"0")}:${s}`;const i=`${t.getHours()%12||12}:${s}`;return n?`${i} ${c(`screen.time.${t.getHours()<12?"am":"pm"}`,{},{locale:n})}`:i}const Sl=(e=new Date,t="en")=>c("screen.date.top_bar",{weekday:c(`screen.date.weekdays_short.${e.getDay()}`,{},{locale:t}),weekday_min: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 fm(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 Xa={guition:{width:448,top:36,name:27,text:21,icon:26},elecrow:{width:768,top:36,name:27,text:21,icon:26},cyd:{width:298,top:24,name:18,text:14,icon:18}};let ps;const Vo=new Map,pm=()=>Vo.clear();function Dn(e,t){const n=`${t}|${e}`;let s=Vo.get(n);if(!s){if(ps===void 0&&(ps=document.createElement("canvas").getContext("2d")),ps){ps.font=t;const i=ps.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}}Vo.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 _u(e,t,n,s){const i=hm(t),l=Dn("0",i.text),r=Math.round(l.bottom-l.top),u=mm(r),f=Dn(String.fromCodePoint(983376),i.icon),h=Math.round(f.bottom-f.top),p=e.map((C,K)=>{const O=s(C),E={index:K,item:C,view:O,shown:O.shown,width:0};return O.analog?(E.dial=h,E.width=h,E):(O.icon&&(E.icon={glyph:Ae(O.icon),ink:Dn(Ae(O.icon),i.icon)},E.width+=E.icon.ink.right-E.icon.ink.left),O.text&&(E.text={value:O.text,ink:Dn(O.text,i.text)},E.width+=(E.icon?u.icon:0)+E.text.ink.right-E.text.ink.left),E)}),b=p.filter(C=>C.shown),v=Dn(n,i.name).advance,y=Math.min(v,Math.floor(t.width*35/100)),I=C=>C.reduce((K,O)=>K+O.width,0)+Math.max(0,C.length-1)*u.item;let T=0;for(;T<b.length&&I(b.slice(T))+u.name+y>t.width;)T++;const k=b.slice(T),A=new Set(b.slice(0,T).map(C=>C.index));let S=t.width-I(k);for(const C of k)C.x=S,S+=C.width+u.item;const U=k.length?k[0].x-u.name:t.width;return{metrics:t,fonts:i,cap:r,zero:l,gaps:u,parts:p,placed:k,dropped:A,nameText:n,natural:v,nameRoom:U}}function bm(e,t,n){if(Dn(e,t).advance<=n)return e;const s=[...e];for(;s.length&&Dn(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 yu="";function gm(e){yu=e||""}async function Cl(e,t={}){const n=await fetch(`api/${e}`,{...t,headers:{"Content-Type":"application/json","X-Screen-CSRF":yu,"X-ESP-Screens-Language":$l(),...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 Ft=async e=>(await Cl(e)).json(),ft=async(e,t,n,s={})=>{const l=await(await Cl(e,{method:t,body:n===void 0?void 0:JSON.stringify(n),...s})).text();return l?JSON.parse(l):null},m=qn({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}),ht=$(()=>m.inventory.screens.find(e=>e.id===m.selected)),ls=e=>(e&&"firmware_known"in e?e.firmware_known:e?.firmware)||"",wu=$(()=>ls(ht.value)),$t=(e,t,n)=>om(wu.value,e,t,n),Kn=$(()=>{const e=ht.value?.tile_limit;return typeof e=="number"&&Number.isInteger(e)&&e>0?e:am(wu.value)}),Za=$(()=>{const e=ht.value?.full_page;return typeof e=="boolean"?e:$t(0,2,62)}),_m=$(()=>{const e=ht.value?.page_tiles_repeat;return typeof e=="boolean"?e:$t(0,2,65)}),Bi=e=>_m.value&&us(e)>0,ym=["guition","elecrow"],Ki=$(()=>ym.includes(ht.value?.board??"")),ku=$(()=>ht.value?.board==="elecrow"),$u=$(()=>Xa[ht.value?.board??""]??Xa.cyd),fo=$(()=>m.selectedTile&&m.layout?.tiles.includes(m.selectedTile)?m.selectedTile:void 0),Tl=e=>!!m.selectedTile&&xe(m.selectedTile)===xe(e);let Qa=0;function Ce(e,t){m.toast={message:e,action:t},clearTimeout(Qa),Qa=window.setTimeout(()=>m.toast=null,t?8e3:5e3)}function wm(){m.toast=null}async function Lt(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 ki(){const e="/config/integrations/dashboard";try{window.top.location.assign(e)}catch{window.open(e,"_blank")}}const km=["","#settings","#new-screen","#firmware","#alerts","#override"],xt=$(()=>km.includes(m.route)?m.route:"");function He(e){if(location.hash===e){m.route=e;return}location.hash=e}window.addEventListener("hashchange",()=>{m.route=location.hash,window.scrollTo(0,0)});function zs(e){return m.inventory.entities.find(t=>t.id===e)?.name||m.inventory.builtin?.find(t=>t.id===e)?.name||e}let po={source:null,byName:{}};function qs(e){return po.source!==m.inventory.icons&&(po={source:m.inventory.icons,byName:Object.fromEntries((m.inventory.icons?.groups||[]).flatMap(t=>t.icons.map(n=>[n.name,n])))}),e?po.byName[e]:void 0}function Cn(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 vs=e=>qs(e.options?.icon)?.cp||Cn(e.entity),ho=new Set;async function zi(e){const t=[...new Set(e)].filter(n=>!ho.has(n)&&!n.startsWith("screen."));if(t.length){t.forEach(n=>ho.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 Ft(`capabilities?${s}`)).capabilities||{})}}catch{t.forEach(n=>ho.delete(n))}}}const mo=new Set;async function $m(e){if(!mo.has(e)){mo.add(e);try{m.entityActions[e]=(await Ft(`entity-actions?entity=${encodeURIComponent(e)}`)).actions}catch{mo.delete(e)}}}let bo=!1;async function qi(){const e=[...new Set((m.layout?.tiles||[]).map(t=>t.entity).filter(t=>!t.startsWith("screen.")))];if(!(!e.length||bo)){bo=!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 Ft(`states?${n}`)).states||{})}}catch{}finally{bo=!1}}}function xm(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 Wo=0;function pt(){m.dirty=!0,m.saved=0,Wo++}function xu(e){if(e===m.selected&&m.layout&&m.dirty){Qe(),m.tab="layout",m.menuOpen=!1,He("");return}if(e!==m.selected&&m.dirty&&!confirm(c("editor.screen_view.confirm.switch")))return;e!==m.selected&&(Us(),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));Vi(n),n.pages=It(Ze(n),n.pages),m.layout=n,m.insertAt=-1,m.dirty=!1,m.saved=0,Yi(0),zi(n.tiles.map(s=>s.entity)),qi(),He("")}const Sm=()=>m.layout?Ze(m.layout):[];function Cm(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);Vi(t),t.pages=It(Ze(t),t.pages);const s=t.tiles.map(i=>`${i.entity}@${i.slot}`).join()!==n;return s&&pt(),s}function Ys(e,t){if(!m.layout)return!1;zi([e.entity]);const n=hu(m.layout.tiles,e,t),s=n?Cm(n):!1;return s&&!m.liveStates[e.entity]&&qi(),s}function Su(e){const t=m.layout;if(!t||!Bi(e)&&t.tiles.some(i=>i.entity===e)||t.tiles.length>=Kn.value)return;const n=mu(e),s=m.insertAt>=0?m.insertAt:wi(ts(Ze(t)),ut(n));m.insertAt=-1,s>=0&&Ys(n,s)&&Bo(n)}function Cu(e){const t=m.layout;if(!t)return;const n=t.tiles.indexOf(e);n<0||(t.tiles.splice(n,1),Tl(e)&&Qe(),pt(),t.pages=It(Ze(t),t.pages),Ce(c("editor.layout.removed",{name:e.name||zs(e.entity)}),{label:c("editor.common.undo"),run:()=>Ys(e,e.slot)}))}function er(){const e=m.layout;e&&(e.pages=Math.min(fn,It(Ze(e),e.pages)+1),pt())}function Tm(e){const t=m.layout;if(t){for(const n of t.tiles)At(n.slot)>e&&(n.slot-=ze);t.pages=Math.max(1,It(Ze(t),t.pages)-1),pt()}}function Em(e,t){const n=m.layout;if(!n||!Number.isInteger(t)||t<0||t>=fn||t===At(e.slot))return!1;const s=wi(ts(Ze(n).filter(l=>l.tile!==e)),ut(e),t*ze),i=Ys(e,s>=0&&At(s)===t?s:t*ze);return i||Ce(c("editor.layout.no_room",{page:t+1})),i}function Am(){const e=m.layout;if(!e)return 1;const t=m.drag.preview||Ze(e),n=It(t,e.pages);return m.drag.active&&n<fn?n+1:n}function Jt(e,t,n){const s=e.entity.split(".")[0],i=m.capabilities[e.entity],l=jo(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(cu(e)&&r!=="full"){const h=At(e.slot),p=f.tiles.filter(y=>y!==e&&At(y.slot)===h),b=ts(Ze(f).filter(y=>y.tile!==e&&!p.includes(y.tile))),v=[];for(const y of p){const I=wi(b,ut(y),(h+1)*ze);if(I<0){v.length=0;break}v.push([y,I]);for(const T of Bn(I,ut(y)))b.add(T)}if(v.length===p.length){for(const[y,I]of v)y.slot=I;e.slot=h*ze}else{const y=wi(ts(Ze(f).filter(I=>I.tile!==e)),"full");y>=0?e.slot=y:(e.options.size=r,Ce(c("editor.layout.no_free_page")))}}else if(jo(e)&&!l){const h=ts(Ze(f).filter(v=>v.tile!==e)),p=du(e.slot),b=Fs(h,p,"wide")?p:pu(h,"wide",p);b>=0&&(e.slot=b)}Vi(f),f.pages=It(Ze(f),f.pages)}}function Pm(e,t){const n=`screen.page_${t}`,s=m.layout;return!s||n===e.entity||!us(n)?!1:!Bi(n)&&s.tiles.some(i=>i.entity===n)?(Ce(c("editor.layout.page_taken",{page:t})),!1):(e.entity=n,s.pages=Math.max(It(Ze(s),s.pages),t),pt(),!0)}function Bo(e){Tl(e)||(m.iconPickerOpen=!1,m.actionPickerOpen=!1,m.actionSearch=""),m.selectedTile=e,m.inspector={kind:"tile"},zi([e.entity])}function Qt(e){m.inspector?.kind==="bar"&&m.inspector.index===e||(m.iconPickerOpen=!1),m.selectedTile=null,m.inspector={kind:"bar",index:e}}function tr(){m.selectedTile=null,m.inspector={kind:"bar-add"}}function Qe(){m.inspector=null,m.selectedTile=null}async function Ko(){if(m.busy||!m.layout||!m.selected)return;m.busy=!0;const e=Wo,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 Wo===e?(m.dirty=!1,m.saved=Date.now(),Ce(c("editor.screen_view.saved.current"))):Ce(c("editor.screen_view.saved.newer_edit"));await Tn()}catch(n){Ce(n.message)}finally{m.busy=!1}}const zn=e=>!!(e&&e.alert_action&&pn(ls(e),m.inventory.alerts?.min_firmware||"0.2.31"));async function Tu(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 Om(e,t){return await ft("alerts/test","POST",{screen:e,data:t})}const Im=["title","tiles","header","pages"];function Eu(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=>Bi(u.entity)||!i.has(u.entity)&&i.add(u.entity)),r=l.slice(0,Kn.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,Vi(n),n.pages=It(Ze(n),n.pages),Qe(),pt(),zi(r.map(u=>u.entity)),qi(),Yi(0),Ce(t(r.length<l.length?{kept:r.length,total:l.length}:void 0))}function Lm(e){const t=m.inventory.screens.find(n=>n.id===e);!t||!m.layout||Eu(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 Mm(){const e=m.layout;if(!e)return"";const t={esp_screens_layout:1};for(const n of Im)e[n]!==void 0&&(t[n]=e[n]);return JSON.stringify(t,null,2)}function Au(){const e=Mm();if(!e)return;const t=`${(ht.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),Lt(e,void 0,"layout_json")}function Rm(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}Eu(t,n=>n?c("editor.layout.imported_part",n):c("editor.layout.imported"))}function Nm(e){const t=m.inventory.updates?.target,n=m.inventory.changelog;if(!Array.isArray(n)||!t)return[];const s=ls(e),i=[];for(const l of n)if(!(pn(l.firmware,t)&&l.firmware!==t)&&!(s&&pn(s,l.firmware)))for(const r of l.lines)i.includes(r)||i.push(r);return i}let vo=!1;async function Fm(){if(!vo){vo=!0;try{const e=await Ft("firmware");m.firmwareJob={job:e.job,logs:e.logs||[]}}catch{}finally{vo=!1}}}const zo=()=>m.inventory.screens.some(e=>e.update?.state==="running")||m.updating.length>0;function Xn(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:_s("verify")}:t.phase==="settle"?{percent:92,text:_s("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:_s("install")}:{percent:12,text:_s(t.phase)}}const hn=()=>m.layout?.header?.items??(m.layout?.settings?.show_clock??!0?[{type:"clock"}]:[]),_n=()=>m.inventory.header?.max_items||6;function Ds(e){m.layout&&(m.layout.header={items:e},pt(),Yi())}let nr=0;function Yi(e=150){clearTimeout(nr),nr=window.setTimeout(async()=>{const t=hn();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 gs(e){return e.type==="entity"?zs(e.entity):m.inventory.header?.builtin.find(t=>t.type===e.type)?.label||e.type}function vn(e){const t=new Date(m.now);if(e.type==="clock")return{text:Wi(as.value,t,an.value),shown:!0};if(e.type==="date")return{text:Sl(t,an.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"?fm(n.e,Math.floor(m.now/1e3),an.value):n.t,color:n.c?`#${n.c}`:null,shown:n.shown}:{icon:e.icon==="none"?null:qs(e.icon)?.cp||Cn(e.entity),text:"…",shown:!0,loading:!0}}function go(e,t){const n=[...hn()];return t<0||t>=n.length||e===t?!1:(n.splice(t,0,...n.splice(e,1)),Ds(n),!0)}function sr(e){const t=[...hn()],[n]=t.splice(e,1);n&&(m.inspector?.kind==="bar"&&Qe(),Ds(t),Ce(c("editor.topbar.removed",{name:gs(n)}),{label:c("editor.common.undo"),run:()=>{const s=[...hn()];s.splice(Math.min(e,s.length),0,n),Ds(s)}}))}function _o(e){const t=hn();if(t.length>=_n())return Ce(c("editor.topbar.full",_n()));if(t.some(n=>at(n)===at(e)))return Ce(c("editor.topbar.already"));m.topbarAdded={key:at(e),time:Date.now()},Ds([...t,e]),Qt(t.length)}const Dm=[{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]}]}],yo=e=>c(`editor.screen_settings.rows.${e.key}`),Um=(e,t)=>`${t}°`;function Pu(e=Sm(),t=m.layout?It(e,m.layout.pages):1){const n=xi();if(t<2||n.page_buttons!==!1||n.swipe_pages!==!1)return"";const{tiles:s,targets:i,unreachable:l,noWayBack:r}=nm(e,t);if(!l.length&&!r.length)return"";const u=v=>c("editor.screen_settings.reach.pages",{list:em(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 Ou=4e3;let yn={},ns=null,$i=0,li=null;const El=()=>ht.value?.settings;function xi(){const e=El(),t={...e?.values||{}};for(const[n,s]of Object.entries(m.settingEdits))t[n]=s.value;return t}const jm=e=>e<300?30:e<900?60:e<3600?300:e<7200?900:1800;function ir(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"?jm(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 Hm(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 Vm(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 Wm(e,t){const n=t[e.key];return n==null?"—":e.kind==="number"?`${n}${e.unit||""}`:e.kind==="duration"?Hm(n):e.kind==="moment"?Vm(n,as.value):""}function ni(e,t,n){if(ns&&ns!==m.selected&&Object.keys(yn).length){Us(),Ce(c("editor.screen_settings.other_screen_busy"));return}ns=m.selected;const s=xi();if(m.settingEdits[e]={value:t,at:Date.now()},yn[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($i),$i=window.setTimeout(()=>Us(),n)}async function Us(e=!1){if(clearTimeout($i),li||!Object.keys(yn).length||!ns)return;const t=ns,n=yn;yn={};const s=Cl(`screens/${encodeURIComponent(t)}/settings`,{method:"PUT",body:JSON.stringify({settings:n}),keepalive:e});li=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{li=null,Object.keys(yn).length?$i=window.setTimeout(()=>Us(),150):ns=null,m.settingPending=!!Object.keys(yn).length,t===m.selected&&Si(),setTimeout(()=>{t===m.selected&&Si()},Ou+100)}}function Si(){const e=El();for(const[t,n]of Object.entries(m.settingEdits))yn[t]!==void 0||li||(e&&e.values[t]===n.value||Date.now()-n.at>Ou)&&delete m.settingEdits[t]}const _s=e=>["install","verify","settle"].includes(e||"")?c(`editor.update.phases.${e}`):c("editor.update.starting");async function qo(e,t){m.updating.push(e.id);try{await ft(`screens/${encodeURIComponent(e.id)}/update`,"POST",t?{host:t}:{}),await Tn()}catch(n){m.updating=m.updating.filter(s=>s!==e.id),Ce(n.message)}}async function or(){try{await ft("updates/run","POST"),await Tn()}catch(e){Ce(e.message)}}async function Bm(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 Km(){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 an=$(()=>ou(m.inventory.language?.effective));Tt(an,e=>lu(e),{immediate:!0});const jn=(e,t={})=>c(e,t,{locale:an.value}),zm=e=>m.inventory.language?.languages?.find(t=>t.code===e)?.name||Gh(e||"")?.name||e||"",Iu=e=>!!(e.update?.available||e.update?.language),lr=()=>c("editor.update.new_language",{name:zm(m.inventory.language?.effective)}),as=$(()=>m.inventory.language?.clock_effective!=="12"),qm=$(()=>{const e=m.inventory.language;return{...os[e?.numbers_effective||"point"]||os.point,from:(e?.group_min||1)>=2?5:4}}),Ym=$(()=>{const e=m.inventory.language;return{...os[e?.numbers_auto||"point"]||os.point,from:(e?.group_min_auto||1)>=2?5:4}});function ar(e){return!e||e==="°"?e||"":e==="%"?m.inventory.language?.percent_space?" %":"%":` ${e}`}const Gm=e=>m.inventory.builtin?.find(t=>t.id===e)?.screen_name;async function rr(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 Tn(),!0}catch(t){return Ce(t.message),!1}}async function Tn(e=!0){try{const t=await Ft(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&&Si()}catch{m.reachable=!1}}function Jm(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&&Si()}let cr=0,Yo=Date.now(),Ci=!1,hs=null;function Xm(){hs||typeof EventSource>"u"||(hs=new EventSource(`api/events?language=${encodeURIComponent($l())}`),hs.onopen=()=>{Ci=!0,js()},hs.onmessage=e=>{document.hidden||Jm(JSON.parse(e.data))},hs.onerror=()=>{Ci=!1,js()})}function js(){clearTimeout(cr);const e=Ci?6e4:m.inventory.updates?.busy?3e3:1e4;cr=window.setTimeout(async()=>{if(!document.hidden){const t=Date.now()-Yo>=3e5;t&&(Yo=Date.now()),(t||!Ci)&&await Tn(t)}js()},e)}let ur=!1;function Zm(){ur||(ur=!0,Tn(),Xm(),js(),vm(()=>m.fontsVersion++),setInterval(()=>{!m.layout||document.hidden||m.drag.active||(m.now=Date.now(),Yi(0))},3e4),setInterval(()=>{!document.hidden&&m.layout&&m.tab==="layout"&&xt.value===""&&qi()},8e3),setInterval(()=>{!document.hidden&&zo()?Fm():m.firmwareJob&&!zo()&&(m.firmwareJob=null)},3e3),document.addEventListener("visibilitychange",async()=>{document.hidden||(Yo=Date.now(),m.now=Date.now(),await Tn(),js())}),window.addEventListener("pagehide",()=>Us(!0)),window.addEventListener("beforeunload",e=>{m.dirty&&(e.preventDefault(),e.returnValue="")}))}const Qm={class:"side"},eb={class:"label"},tb={id:"screens"},nb=["aria-current","onClick"],sb={class:"txt"},ib=["aria-label","title"],ob={key:1,class:"pill"},lb={key:2,class:"spin small"},ab=["onSubmit"],rb=["placeholder","aria-label"],cb={type:"submit",class:"btn mini primary"},ub=["aria-label"],db=["disabled","title","onClick"],fb={key:2,class:"whatsnew"},pb=["aria-valuenow"],hb={class:"progress-text"},mb=["title"],bb=["title"],vb={id:"pending"},gb={class:"pending-actions"},_b=["onClick"],yb=["aria-current"],wb={class:"txt"},kb={class:"more"},$b={class:"label"},xb=["aria-current"],Sb={class:"mdi"},Cb={class:"txt"},Tb=["aria-current"],Eb={class:"mdi"},Ab={class:"txt"},Pb=["aria-current"],Ob={class:"mdi"},Ib={class:"txt"},Lb={class:"txt"},Mb=Le({__name:"Sidebar",setup(e){const t=$e(null),n=$e(""),s=p=>{const b=p.update||{};return!!b.language&&(!b.target||pn(ls(p),b.target))};function i(p){const b=p.update||{};return b.state==="running"||m.updating.includes(p.id)?{kind:"running",text:_s(b.phase)}:b.state==="queued"?{kind:"queued",text:c("editor.sidebar.update.queued")}:Iu(p)&&p.online?{kind:"available",text:s(p)?lr():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)?[lr()]:[],...Nm(p)];function r(p){const b=p.update||{};b.host&&b.profile?qo(p):b.profile&&(t.value=p.id,n.value="")}function u(p){const b=n.value.trim();b&&(t.value=null,qo(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",Qm,[b[13]||(b[13]=o("div",{class:"brand"},[o("span",{class:"mark"},"▦"),o("span",null,"ESP Screens")],-1)),o("span",{id:"connection",class:he(["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)},[Me("⌕ "+d(a(c)("editor.sidebar.search")),1),b[10]||(b[10]=o("kbd",null,"⌘K",-1))]),o("div",eb,d(a(c)("editor.sidebar.screens")),1),o("div",tb,[(g(!0),_(q,null,me(a(m).inventory.screens,v=>(g(),_("div",{key:v.id,class:he(["screen-item",{selected:v.id===a(m).selected&&a(xt)===""}])},[o("button",{type:"button",class:"nav-item","aria-current":v.id===a(m).selected&&a(xt)===""?"true":"false",onClick:y=>a(xu)(v.id)},[o("span",{class:he(["dot",{off:!v.online}])},null,2),o("span",sb,[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,ib)):B("",!0),i(v)?.kind==="available"?(g(),_("span",ob,d(a(c)("editor.sidebar.update.pill")),1)):i(v)?.kind==="running"?(g(),_("span",lb)):B("",!0)],8,nb),i(v)?(g(),_("div",{key:0,class:he(["screen-update",i(v).kind])},[i(v).kind==="available"?(g(),_(q,{key:0},[t.value===v.id?(g(),_(q,{key:0},[o("small",null,d(a(c)("editor.sidebar.host.hint")),1),o("form",{class:"screen-host",onSubmit:Ot(y=>u(v),["prevent"])},[Te(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,rb),[[Xe,n.value]]),o("button",cb,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,ub)],40,ab)],64)):(g(),_(q,{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,db)],64)),l(v).length?(g(),_("details",fb,[o("summary",null,d(a(c)("editor.sidebar.update.whats_new")),1),o("ul",null,[(g(!0),_(q,null,me(l(v).slice(0,8),y=>(g(),_("li",{key:y},d(y),1))),128))])])):B("",!0)],64)):i(v).kind==="running"&&a(Xn)(v)?(g(),_(q,{key:1},[o("div",{class:"progress",role:"progressbar","aria-valuenow":a(Xn)(v).percent,"aria-valuemin":"0","aria-valuemax":"100"},[o("i",{style:Ue({width:a(Xn)(v).percent+"%"})},null,4)],8,pb),o("div",hb,[o("span",null,d(a(Xn)(v).percent)+" %",1),o("span",{title:f()},d(a(Xn)(v).text),9,mb)]),f()?(g(),_("small",{key:0,title:f(),style:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"}},d(f()),9,bb)):B("",!0),o("button",{type:"button",class:"btn link mini",style:{"justify-self":"start"},onClick:b[3]||(b[3]=y=>a(He)("#firmware"))},d(a(c)("editor.sidebar.update.full_log")),1)],64)):(g(),_("small",{key:2,class:he({failed:i(v).kind==="failed"})},d(i(v).text),3))],2)):B("",!0)],2))),128))]),o("div",vb,[(g(!0),_(q,null,me(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",gb,[o("button",{type:"button",class:"btn mini quiet",onClick:b[4]||(b[4]=(...y)=>a(ki)&&a(ki)(...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(Lt)(v.api_key)},d(a(c)("editor.sidebar.copy_api_key")),9,_b)):B("",!0)])]))),128))]),o("button",{id:"new-screen",type:"button",class:"nav-item ghost","aria-current":a(xt)==="#new-screen"?"true":"false",onClick:b[5]||(b[5]=v=>a(He)("#new-screen"))},[b[11]||(b[11]=o("span",{class:"plus"},"+",-1)),o("span",wb,d(a(c)("editor.nav.new_screen")),1)],8,yb),b[14]||(b[14]=o("div",{class:"spacer"},null,-1)),o("div",kb,[o("div",$b,d(a(c)("editor.sidebar.more")),1),o("button",{id:"open-firmware",type:"button",class:"nav-item","aria-current":a(xt)==="#firmware"?"true":"false",onClick:b[6]||(b[6]=v=>a(He)("#firmware"))},[o("span",Sb,d(a(Ae)("F0241")),1),o("span",Cb,d(a(c)("editor.nav.firmware")),1)],8,xb),o("button",{id:"open-alerts",type:"button",class:"nav-item","aria-current":a(xt)==="#alerts"?"true":"false",onClick:b[7]||(b[7]=v=>a(He)("#alerts"))},[o("span",Eb,d(a(Ae)("F0594")),1),o("span",Ab,d(a(c)("editor.nav.alerts")),1)],8,Tb),o("button",{id:"open-settings",type:"button",class:"nav-item","aria-current":a(xt)==="#settings"?"true":"false",onClick:b[8]||(b[8]=v=>a(He)("#settings"))},[o("span",Ob,d(a(Ae)("F0493")),1),o("span",Ib,d(a(c)("editor.nav.settings")),1)],8,Pb),o("button",{id:"refresh",type:"button",class:"nav-item ghost",onClick:b[9]||(b[9]=v=>a(Tn)())},[b[12]||(b[12]=o("span",{class:"plus"},"↻",-1)),o("span",Lb,d(a(c)("editor.sidebar.refresh")),1)])])]))}}),Rb={key:0,id:"toast",class:"toast",role:"status"},Nb=Le({__name:"Toast",setup(e){return(t,n)=>a(m).toast?(g(),_("div",Rb,[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(wm)()})},d(a(m).toast.action.label),1)):B("",!0)])):B("",!0)}}),Fb=["aria-label"],Db=["placeholder","aria-label"],Ub={class:"palette-list"},jb={class:"palette-group"},Hb=["onMouseenter","onClick"],Vb={key:0,class:"mdi"},Wb={key:1,class:"glyph"},Bb={class:"tx"},Kb={key:0},zb={key:2,class:"hint-key"},qb={key:0,class:"palette-empty"},Yb=Le({__name:"CommandPalette",setup(e){const t=$e(""),n=$e(0),s=$e(null),i=$(()=>{const h=t.value.trim().toLocaleLowerCase(),p=[],b=c("editor.palette.groups.screens"),v=c("editor.palette.groups.actions");for(const T of m.inventory.screens)p.push({group:b,label:T.name,detail:`${T.online?c("editor.common.online"):c("editor.common.offline")} · ${T.firmware||c("editor.common.unknown")}`,glyphText:"▦",run:()=>xu(T.id)});const y=ht.value,I=[{group:v,label:c("editor.nav.new_screen"),detail:c("editor.nav.new_screen_detail"),glyphText:"+",run:()=>He("#new-screen")},{group:v,label:c("editor.nav.firmware"),icon:"F0241",run:()=>He("#firmware")},{group:v,label:c("editor.nav.alerts"),detail:c("editor.palette.alerts_detail"),icon:"F0594",run:()=>He("#alerts")},{group:v,label:c("editor.nav.settings"),detail:c("editor.palette.settings_detail"),icon:"F0493",run:()=>He("#settings")}];if(y&&m.layout&&I.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:()=>Ko()},{group:v,label:c("editor.screen_view.tabs.layout"),detail:y.name,run:()=>{He(""),m.tab="layout"}},{group:v,label:c("editor.screen_view.tabs.settings"),detail:y.name,run:()=>{He(""),m.tab="settings"}},{group:v,label:c("editor.palette.identify"),detail:zn(y)?c("editor.palette.identify_detail"):c("editor.palette.identify_needs"),run:()=>{zn(y)&&Tu(y)}},{group:v,label:c("editor.palette.export"),detail:c("editor.palette.export_detail"),run:Au}),p.push(...I),y&&m.layout&&h){const T=new Set(m.layout.tiles.map(A=>A.entity)),k=m.layout.tiles.length>=Kn.value;for(const A of m.inventory.entities)if(!(A.tile===!1||T.has(A.id))&&`${A.name} ${A.id} ${A.area||""} ${A.device||""}`.toLocaleLowerCase().includes(h)&&(p.push({group:c("editor.palette.groups.add"),label:A.name,detail:[Ht(A.id)[0],A.area].filter(Boolean).join(" · "),icon:m.inventory.icons?Cn(A.id):void 0,run:()=>{k||Su(A.id)}}),p.length>60))break}return h?p.filter(T=>`${T.label} ${T.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 Tt(t,()=>n.value=0),Tt(()=>m.palette,async h=>{h&&(t.value="",n.value=0,await Ni(),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]=Ot(()=>{},["stop"])),onKeydown:f},[Te(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,Db),[[Xe,t.value]]),o("div",Ub,[(g(!0),_(q,null,me(l.value,b=>(g(),_(q,{key:b.group},[o("div",jb,d(b.group),1),(g(!0),_(q,null,me(b.items,({item:v,index:y})=>(g(),_("button",{key:y,type:"button",class:he(["palette-item",{active:y===n.value}]),onMouseenter:I=>n.value=y,onClick:I=>u(v)},[v.icon?(g(),_("span",Vb,d(a(Ae)(v.icon)),1)):(g(),_("span",Wb,d(v.glyphText||"›"),1)),o("span",Bb,[o("span",null,d(v.label),1),v.detail?(g(),_("small",Kb,d(v.detail),1)):B("",!0)]),v.key?(g(),_("kbd",zb,d(v.key),1)):B("",!0)],42,Hb))),128))],64))),128)),i.value.length?B("",!0):(g(),_("p",qb,d(a(c)("editor.palette.empty")),1))])],40,Fb)])):B("",!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},Lu={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(()=>dr(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&&dr(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 dr(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:mu(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",Go),document.addEventListener("pointerup",Ti),document.addEventListener("pointercancel",Ti);try{ve.element.releasePointerCapture(ve.pointerId)}catch{}try{document.documentElement.setPointerCapture(ve.pointerId)}catch{}document.addEventListener("touchmove",Mu,{passive:!1}),ve.scroller=window.setInterval(()=>{if(!ve.last)return;const{x:s,y:i}=Gb(document),l=s?hr(ve.last.x,pr(s,"x")):0,r=i?hr(ve.last.y,pr(i,"y")):0;l&&s.scrollBy(l,0),r&&i.scrollBy(0,r),(l||r)&&Jo(Ru(ve.last.x,ve.last.y))},16),Jo(-1),Go(e)}function fr(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 Gb(e){const t=e.querySelector(".pages"),n=e.querySelector(".canvas");return{x:fr(t,"x")?t:n,y:fr(n,"y")?n:e.scrollingElement}}function pr(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 hr(e,[t,n]){return e<t+60?-12:e>n-60?12:0}function Mu(e){m.drag.active&&e.preventDefault()}function Ti(e){e.pointerId===ve.pointerId&&Jb(e.type==="pointerup")}function Go(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)`,Jo(Ru(e.clientX,e.clientY)))}function Ru(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 Jo(e){ve.target===e||!m.layout||!m.drag.moving||(ve.target=e,m.drag.preview=e>=0?hu(m.layout.tiles,m.drag.moving,e):null)}function Jb(e){const t=m.drag.preview,n=m.drag.moving;document.removeEventListener("pointermove",Go),document.removeEventListener("pointerup",Ti),document.removeEventListener("pointercancel",Ti),document.removeEventListener("touchmove",Mu);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&&Ys(n,n.slot)}}window.addEventListener("click",e=>{Date.now()<ve.suppressUntil&&(e.stopPropagation(),e.preventDefault())},!0);const Xb=["data-slot","tabindex","role","aria-label"],Zb={class:"clockface",viewBox:"0 0 60 60","aria-hidden":"true"},Qb=["transform"],ev=["transform"],tv=["transform"],nv={key:0,class:"lead"},sv={class:"tx"},iv={class:"nm"},ov={class:"st"},lv={class:"ic mdi"},av={class:"lead"},rv={class:"big"},cv={class:"nm"},uv={class:"lead"},dv={class:"nm"},fv={key:0,class:"goto"},pv={key:1,class:"big"},hv={key:0},mv={key:1,class:"ctl"},bv={key:1,class:"stp"},vv={class:"mdi"},gv={class:"mdi"},_v={class:"key mdi"},yv={class:"key mdi"},wv={class:"key mdi"},kv={class:"key mdi"},$v={class:"key mdi"},xv={class:"key mdi"},Sv={class:"key mdi"},Cv={key:5,class:"run"},Tv={class:"lead"},Ev={class:"tx"},Av={class:"nm"},Pv={key:0,class:"goto"},Ov={key:1,class:"big"},Iv={key:0},Lv={key:1,class:"ctl"},Mv={key:1,class:"stp"},Rv={class:"mdi"},Nv={class:"mdi"},Fv={class:"key mdi"},Dv={class:"key mdi"},Uv={key:3,class:"stp"},jv={class:"mdi"},Hv={class:"mdi"},Vv={class:"key mdi"},Wv={class:"key mdi"},Bv={class:"key mdi"},Kv={class:"key mdi"},zv={class:"key mdi"},qv={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={class:"key mdi"},tg={class:"key mdi"},ng={class:"key mdi"},sg={key:10,class:"run"},ig={class:"tx"},og={class:"nm"},lg={key:0,class:"goto"},ag={key:0,class:"big"},rg={key:0},cg=["title","aria-label"],ug=Le({__name:"TileCard",props:{tile:{},slot:{},placeholder:{type:Boolean}},setup(e){const t=e,n=$(()=>t.tile.name||b.value==="screen"&&Gm(t.tile.entity)||zs(t.tile.entity)),s=$(()=>cu(t.tile)),i=$(()=>jo(t.tile)&&!s.value),l=$(()=>us(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"?vu(f.value):""),p=$(()=>bu(t.tile,m.inventory)),b=$(()=>t.tile.entity.split(".")[0]),v=$(()=>m.inventory.icons?.controls||{}),y=H=>v.value[H]?Ae(v.value[H]):"",I=$(()=>Tl(t.tile)&&m.inspector?.kind==="tile"),T=$(()=>!t.placeholder&&m.layout?.tiles.includes(t.tile)),k=$(()=>c("editor.tile_card.label",{name:n.value,slot:t.slot%ze+1,page:At(t.slot)+1})),A=$(()=>new Date(m.now)),S=$(()=>(A.value.getHours()%12+A.value.getMinutes()/60)*30),U=$(()=>A.value.getMinutes()*6),C=$(()=>b.value==="screen"?null:xm(t.tile.entity)),K=$(()=>!C.value||["unavailable","unknown",""].includes(C.value.state)),O=$(()=>!!C.value&&!K.value&&C.value.state!=="off"&&C.value.state!=="closed"&&C.value.state!=="standby"&&C.value.state!=="idle"&&C.value.state!=="docked"),E=$(()=>["light","switch","input_boolean","fan"].includes(b.value)&&C.value?.state==="on"),R=$(()=>C.value?.a?.unit_of_measurement),L=H=>H.charAt(0).toUpperCase()+H.slice(1).replace(/_/g," "),D=H=>au(H,qm.value),M=["number","input_number","counter"],Y=H=>R.value||M.includes(b.value)?`${D(H)}${ar(R.value)}`:H,te={climate:"climate",cover:"cover",media_player:"media",person:"person",sun:"sun",vacuum:"vacuum",weather:"weather"};function ye(H){const ne=wt=>Yh(`screen.ha.${wt}`)?jn(`screen.ha.${wt}`):"",se=H.state==="windy-variant"?"windy":H.state.replace(/-/g,"_");return b.value==="binary_sensor"&&["on","off"].includes(se)?ne(`binary.${H.a?.device_class}_${se}`)||ne(se):te[b.value]?ne(`${te[b.value]}.${se}`)||(["on","off"].includes(se)?ne(se):""):["on","off"].includes(se)?ne(se):""}const re=["scene","script","button","input_button"],be=$(()=>{const H=C.value;if(!H||re.includes(b.value))return h.value;if(K.value)return jn(H.state==="unknown"?"editor.mockup.unknown":"screen.ha.unavailable");const ne=H.a||{},se=H.word||ye(H)||L(H.state);return b.value==="climate"?`${ne.current_temperature!==void 0?`${D(ne.current_temperature)}° · `:""}${se}`:b.value==="weather"?`${se}${ne.temperature!==void 0?` · ${D(ne.temperature)}°`:""}`:b.value==="cover"&&ne.current_position!==void 0&&ne.current_position>0&&ne.current_position<100?`${se} · ${ne.current_position}${ar("%")}`:b.value==="media_player"&&ne.media_title?`${se} · ${ne.media_title}`:b.value==="sensor"||M.includes(b.value)?Y(H.state):se}),ge=$(()=>C.value&&!K.value?R.value||M.includes(b.value)?D(C.value.state):C.value.state:"—"),we=$(()=>{const H=C.value;if(!H||K.value)return 0;const ne=H.a||{};if(b.value==="light")return H.state==="on"?ne.brightness!==void 0?Math.round(ne.brightness/255*100):100:0;if(b.value==="fan")return H.state==="on"?ne.percentage??100:0;if(b.value==="cover")return 100-(ne.current_position??(H.state==="open"?100:0));if(b.value==="media_player")return Math.round((ne.volume_level??0)*100);if(b.value==="number"||b.value==="input_number"){const se=Number(H.state),wt=Number(ne.min??0),Ln=Number(ne.max??100);return Number.isFinite(se)&&Ln>wt?Math.round((se-wt)/(Ln-wt)*100):0}return 0}),Ge=$(()=>jn(`screen.ha.button.${{scene:"activate",script:"run"}[b.value]||"press"}`)),qe=$(()=>`${jn("screen.tile.page",{n:l.value})} ›`),le=$(()=>({background:`linear-gradient(to right, ${we.value?"#ffbf38":"#c9ccd1"} ${we.value}%, ${we.value?"#fff1d3":"#e6e8ec"} ${we.value}%)`})),Z=$(()=>({background:`linear-gradient(to right, #2196f3 ${we.value}%, #d3e8fb ${we.value}%)`})),ue=$(()=>{const H=C.value?.a?.temperature;return H!=null?`${D(H)}°`:"—"});async function ke(H){if(H.key==="Enter"||H.key===" "){H.preventDefault(),Bo(t.tile);return}const ne={ArrowLeft:-1,ArrowRight:1,ArrowUp:-2,ArrowDown:2}[H.key];ne&&(H.preventDefault(),Ys(t.tile,t.tile.slot+(s.value?Math.sign(ne)*ze:i.value?Math.sign(ne)*2:ne))&&(await Ni(),document.querySelector(`.pages [data-slot="${t.tile.slot}"]`)?.focus()))}return(H,ne)=>Te((g(),_("div",{class:he(["tile",{wide:i.value,full:s.value,bare:u.value,placeholder:e.placeholder||!T.value,chosen:I.value}]),"data-slot":e.slot,style:Ue(r.value&&!u.value?{backgroundColor:r.value}:void 0),tabindex:T.value?0:-1,role:T.value?"button":void 0,"aria-label":T.value?k.value:void 0,onClick:ne[1]||(ne[1]=se=>T.value&&a(Bo)(e.tile)),onKeydown:ne[2]||(ne[2]=se=>T.value&&ke(se))},[f.value==="analog"?(g(),_(q,{key:0},[(g(),_("svg",Zb,[ne[3]||(ne[3]=o("circle",{cx:"30",cy:"30",r:"27",fill:"#fff",stroke:"#c9ccd1"},null,-1)),(g(),_(q,null,me([0,90,180,270],se=>o("line",{key:se,x1:"30",y1:"5",x2:"30",y2:"9",stroke:"#1b1b1b","stroke-width":"1.5",transform:`rotate(${se} 30 30)`},null,8,Qb)),64)),o("line",{x1:"30",y1:"30",x2:"30",y2:"16",stroke:"#1b1b1b","stroke-width":"2.4","stroke-linecap":"round",transform:`rotate(${S.value} 30 30)`},null,8,ev),o("line",{x1:"30",y1:"30",x2:"30",y2:"11",stroke:"#1b1b1b","stroke-width":"1.6","stroke-linecap":"round",transform:`rotate(${U.value} 30 30)`},null,8,tv),ne[4]||(ne[4]=o("circle",{cx:"30",cy:"30",r:"1.8",fill:"#1b1b1b"},null,-1))])),i.value?(g(),_("span",nv,[o("span",sv,[o("span",iv,d(n.value),1),o("span",ov,d(h.value),1)])])):B("",!0)],64)):f.value==="digital"&&b.value==="screen"?(g(),_(q,{key:1},[o("span",lv,d(a(Ae)(a(vs)(e.tile))),1),o("span",av,[o("span",rv,d(a(Wi)(a(as),A.value)),1),o("span",cv,d(n.value),1)])],64)):s.value?(g(),_(q,{key:2},[o("span",{class:he(["ic mdi",{lit:E.value,thumb:f.value==="live"||f.value==="cover"}])},d(a(Ae)(a(vs)(e.tile))),3),o("span",uv,[o("span",dv,d(n.value),1),l.value?(g(),_("span",fv,d(qe.value),1)):f.value==="watch"?(g(),_("span",pv,[Me(d(ge.value),1),R.value&&!K.value?(g(),_("small",hv,d(R.value),1)):B("",!0)])):be.value?(g(),_("span",{key:2,class:he(["st",{off:K.value}])},d(be.value),3)):B("",!0)]),e.tile.options?.inline==="slider"?(g(),_("span",{key:0,class:"mini-slider",style:Ue(le.value)},null,4)):B("",!0),p.value?(g(),_("span",mv,[p.value==="toggle"?(g(),_("span",{key:0,class:he(["tog",{off:!O.value}])},null,2)):p.value==="setpoint"?(g(),_("span",bv,[o("span",vv,d(y("minus")||"−"),1),o("b",null,d(ue.value),1),o("span",gv,d(y("plus")||"+"),1)])):p.value==="volume"?(g(),_(q,{key:2},[o("span",{class:"range",style:Ue(Z.value)},null,4),o("span",_v,d(y("volume-high")),1)],64)):p.value==="playback"?(g(),_(q,{key:3},[o("span",yv,d(y("skip-previous")),1),o("span",wv,d(y(O.value?"pause":"play")||y("play")),1),o("span",kv,d(y("skip-next")),1)],64)):p.value==="buttons"&&b.value==="cover"?(g(),_(q,{key:4},[o("span",$v,d(y("arrow-expand-horizontal")),1),o("span",xv,d(y("stop")),1),o("span",Sv,d(y("arrow-collapse-horizontal")),1)],64)):p.value==="run"?(g(),_("span",Cv,d(Ge.value),1)):(g(),_("span",{key:6,class:"range",style:Ue({background:`linear-gradient(to right, #2196f3 ${we.value}%, #d3e8fb ${we.value}%)`})},null,4))])):B("",!0)],64)):i.value?(g(),_(q,{key:3},[o("span",Tv,[o("span",{class:he(["ic mdi",{lit:E.value,thumb:f.value==="live"||f.value==="cover"}])},d(a(Ae)(a(vs)(e.tile))),3),o("span",Ev,[o("span",Av,d(n.value),1),l.value?(g(),_("span",Pv,d(qe.value),1)):f.value==="watch"?(g(),_("span",Ov,[Me(d(ge.value),1),R.value&&!K.value?(g(),_("small",Iv,d(R.value),1)):B("",!0)])):be.value?(g(),_("span",{key:2,class:he(["st",{off:K.value}])},d(be.value),3)):B("",!0)])]),e.tile.options?.inline==="slider"?(g(),_("span",{key:0,class:"mini-slider",style:Ue(le.value)},null,4)):B("",!0),p.value?(g(),_("span",Lv,[p.value==="toggle"?(g(),_("span",{key:0,class:he(["tog",{off:!O.value}])},null,2)):p.value==="setpoint"?(g(),_("span",Mv,[o("span",Rv,d(y("minus")||"−"),1),o("b",null,d(ue.value),1),o("span",Nv,d(y("plus")||"+"),1)])):p.value==="stepper"&&b.value.endsWith("select")?(g(),_(q,{key:2},[o("span",Fv,d(y("chevron-left")),1),o("span",Dv,d(y("chevron-right")),1)],64)):p.value==="stepper"?(g(),_("span",Uv,[o("span",jv,d(y("minus")||"−"),1),o("b",null,d(ge.value),1),o("span",Hv,d(y("plus")||"+"),1)])):p.value==="mode"?(g(),_(q,{key:4},[o("span",Vv,d(y("power")),1),o("span",Wv,d(y("fire")),1),o("span",Bv,d(y("snowflake")),1)],64)):p.value==="volume"?(g(),_(q,{key:5},[o("span",{class:"range",style:Ue(Z.value)},null,4),o("span",Kv,d(y("volume-high")),1)],64)):p.value==="playback"?(g(),_(q,{key:6},[o("span",zv,d(y("skip-previous")),1),o("span",qv,d(y(O.value?"pause":"play")||y("play")),1),o("span",Yv,d(y("skip-next")),1)],64)):p.value==="buttons"&&b.value==="cover"?(g(),_(q,{key:7},[o("span",Gv,d(y("arrow-expand-horizontal")),1),o("span",Jv,d(y("stop")),1),o("span",Xv,d(y("arrow-collapse-horizontal")),1)],64)):p.value==="buttons"&&b.value==="vacuum"?(g(),_(q,{key:8},[o("span",Zv,d(y("play")),1),o("span",Qv,d(y("stop")),1),o("span",eg,d(y("home-map-marker")),1)],64)):p.value==="buttons"&&b.value==="timer"?(g(),_(q,{key:9},[o("span",tg,d(y("play")),1),o("span",ng,d(y("close")),1)],64)):p.value==="run"?(g(),_("span",sg,d(Ge.value),1)):(g(),_("span",{key:11,class:"range",style:Ue({background:`linear-gradient(to right, #2196f3 ${we.value}%, #d3e8fb ${we.value}%)`})},null,4))])):B("",!0)],64)):(g(),_(q,{key:4},[o("span",{class:he(["head",{top:f.value==="watch"}])},[o("span",{class:he(["ic mdi",{lit:E.value,thumb:f.value==="live"||f.value==="cover"}])},d(a(Ae)(a(vs)(e.tile))),3),o("span",ig,[o("span",og,d(n.value),1),l.value?(g(),_("span",lg,d(qe.value),1)):f.value!=="watch"&&be.value?(g(),_("span",{key:1,class:he(["st",{off:K.value}])},d(be.value),3)):B("",!0)])],2),f.value==="watch"?(g(),_("span",ag,[Me(d(ge.value),1),R.value&&!K.value?(g(),_("small",rg,d(R.value),1)):B("",!0)])):B("",!0),e.tile.options?.inline==="slider"?(g(),_("span",{key:1,class:"mini-slider",style:Ue(le.value)},null,4)):B("",!0)],64)),T.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:ne[0]||(ne[0]=Ot(se=>a(Cu)(e.tile),["stop"]))},"✕",8,cg)):B("",!0)],46,Xb)),[[a(Lu),{kind:"tile",tile:e.tile}]])}}),dg=["viewBox","aria-label"],fg=["y"],pg=["cx","cy","r","stroke","stroke-width"],hg=["x1","y1","x2","y2","stroke","stroke-width"],mg=["x","y","fill"],bg=["x","y"],Nu=Le({__name:"TopbarSvg",props:{items:{},nameText:{},single:{type:Boolean}},setup(e,{expose:t}){const n=e,s=$(()=>{m.fontsVersion,m.now,m.topbarPreviews;const k=n.items||hn();return _u(k,$u.value,n.nameText??(m.layout?.title||jn("editor.mockup.home")),vn)}),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 k=s.value.parts[0];return k&&(k.x=0),k?[k]:[]}),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(k){const A=b.value;return[[(A.getHours()%12+A.getMinutes()/60)*30,k*.24],[A.getMinutes()*6,k*.34]].map(([S,U])=>{const C=S*Math.PI/180;return{x2:U*Math.sin(C),y2:-U*Math.cos(C)}})}const y=k=>k.x-k.icon.ink.left,I=k=>(k.icon?k.x+(k.icon.ink.right-k.icon.ink.left)+s.value.gaps.icon:k.x)-k.text.ink.left,T=$(()=>`${(Math.max(1,u.value[0]?.width||1)+4)*(26/i.value.icon)}px`);return t({lay:s}),(k,A)=>(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:Ue(e.single?{width:T.value}:void 0)},[e.single?B("",!0):(g(),_("text",{key:0,x:"0",y:i.value.top,fill:"#1b1b1b",style:Ue({font:s.value.fonts.name})},d(p.value),13,fg)),o("g",null,[(g(!0),_(q,null,me(u.value,S=>(g(),_(q,{key:S.index},[S.dial?(g(),_(q,{key:0},[o("circle",{cx:S.x+S.dial/2,cy:h.value,r:S.dial/2-Math.max(1,Math.round(S.dial/10))/2,fill:"none",stroke:S.view.color||"#46525e","stroke-width":Math.max(1,Math.round(S.dial/10))},null,8,pg),(g(!0),_(q,null,me(v(S.dial),(U,C)=>(g(),_("line",{key:C,x1:S.x+S.dial/2,y1:h.value,x2:S.x+S.dial/2+U.x2,y2:h.value+U.y2,stroke:S.view.color||"#46525e","stroke-width":Math.max(1,Math.round(S.dial*.075)),"stroke-linecap":"round"},null,8,hg))),128))],64)):(g(),_(q,{key:1},[S.icon?(g(),_("text",{key:0,x:y(S),y:h.value-(S.icon.ink.top+S.icon.ink.bottom)/2,fill:S.view.color||"#46525e",style:Ue({font:s.value.fonts.icon})},d(S.icon.glyph),13,mg)):B("",!0),S.text?(g(),_("text",{key:1,x:I(S),y:r.value,fill:"#46525e",style:Ue({font:s.value.fonts.text})},d(S.text.value),13,bg)):B("",!0)],64))],64))),128))])],12,dg))}}),vg={class:"page"},gg={class:"page-label"},_g=["title"],yg={key:1},wg=["title"],kg={class:"tiles"},$g=["data-slot","title","aria-label","onClick"],xg=Le({__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=>Bn(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=>At(h.slot)===t.page)),r=$(()=>m.inspector?.kind==="bar"||m.inspector?.kind==="bar-add"),u=$(()=>t.entries.filter(h=>At(h.slot)===t.page).reduce((h,p)=>h+xl(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",vg,[o("div",gg,[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(Tm)(e.page))},d(a(c)("editor.page.remove")),9,_g)):(g(),_("span",yg,d(u.value)+" / "+d(a(ze)),1))]),o("div",{class:he(["device",{cyd:!a(Ki),wide:a(ku)}])},[o("div",{class:he(["bar-wrap",{selected:r.value}]),title:a(c)("editor.page.edit_bar"),role:"button",tabindex:"0",onClick:p[1]||(p[1]=b=>a(Qt)(0)),onKeydown:p[2]||(p[2]=Sc(Ot(b=>a(Qt)(0),["prevent"]),["enter"]))},[ie(Nu)],42,wg),o("div",kg,[(g(!0),_(q,null,me(i.value,b=>(g(),_(q,{key:b},[n.value.get(b)?(g(),it(ug,{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:he(["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,$g))],64))),128))])],2)]))}}),Sg={class:"library",id:"library"},Cg={class:"lib-head"},Tg={class:"lib-title"},Eg=["placeholder","aria-label"],Ag={class:"filters",id:"filters"},Pg=["aria-pressed","onClick"],Og={class:"lib-row"},Ig=["aria-label"],Lg={value:""},Mg=["value"],Rg=["aria-pressed","title"],Ng={class:"lib-list",id:"results","aria-live":"polite"},Fg=["title","disabled","onClick"],Dg={class:"tx"},Ug={key:0,class:"hint"},jg={key:1,class:"hint"},Hg={class:"lib-foot"},Vg=Le({__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)&&!Bi(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&&(Ki.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)>=Kn.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",Sg,[o("div",Cg,[o("div",Tg,[Me(d(a(c)("editor.library.title"))+" ",1),o("small",null,d(a(c)("editor.library.entities",f.value)),1)]),Te(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,Eg),[[Xe,a(m).search]]),o("div",Ag,[(g(),_(q,null,me(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:Ue({color:a(Ht)(v+".")[2],background:a(Ht)(v+".")[3]}),"aria-hidden":"true"},d(a(Ht)(v+".")[1]),5)):B("",!0),Me(d(a(c)(`editor.library.filters.${v||"all"}`)),1)],8,Pg)),64))]),o("div",Og,[Te(o("select",{id:"room","onUpdate:modelValue":b[1]||(b[1]=v=>a(m).room=v),"aria-label":a(c)("editor.library.room")},[o("option",Lg,d(a(c)("editor.library.all_rooms")),1),(g(!0),_(q,null,me(l.value,v=>(g(),_("option",{key:v,value:v},d(v),9,Mg))),128))],8,Ig),[[Wn,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,Rg)])]),o("div",Ng,[(g(!0),_(q,null,me(r.value.slice(0,80),v=>Te((g(),_("button",{key:v.id,type:"button",class:"ent",title:v.id,disabled:i(v.id)||u.value,onClick:y=>a(Su)(v.id)},[o("span",{class:he(["av mdi",h(v)]),style:Ue({color:a(Ht)(v.id)[2],background:a(Ht)(v.id)[3]})},d(a(m).inventory.icons?a(Ae)(a(Cn)(v.id)):a(Ht)(v.id)[1]),7),o("span",Dg,[o("b",null,d(v.name),1),o("small",null,d([a(Ht)(v.id)[0],v.area,v.device].filter(Boolean).join(" · ")),1)]),o("span",{class:he(["add",{done:i(v.id)}])},d(i(v.id)?"✓":"+"),3)],8,Fg)),[[a(Lu),{kind:"entity",id:v.id}]])),128)),r.value.length?r.value.length>80?(g(),_("p",jg,d(a(c)("editor.common.results",r.value.length)),1)):B("",!0):(g(),_("p",Ug,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",Hg,d(u.value?a(c)(a(Kn)<48?"editor.library.full_update":"editor.library.full",a(Kn)):a(c)("editor.library.hint")),1)]))}}),Wg={class:"canvas-head"},Bg={id:"count"},Kg={key:0,id:"no-tiles"},zg={key:1},qg={key:2,id:"positions-hint",class:"warn"},Yg={key:3,id:"page-reach-hint",class:"warn"},Gg=["aria-label"],Jg={class:"page-label"},Xg=["tabindex"],Zg=Le({__name:"LayoutView",setup(e){const t=$(()=>m.layout),n=$(()=>m.drag.preview||Ze(t.value)),s=$(()=>It(n.value,t.value.pages)),i=$(()=>Am()),l=$(()=>s.value<fn),r=$(()=>tm(t.value.tiles)&&!$t(0,2,26)?c("editor.layout.positions_hint",{firmware:ht.value?.firmware||c("editor.common.unknown")}):""),u=$(()=>Pu(n.value,s.value));function f(h){h.target.closest(".device, .page-label, .canvas-head")||m.inspector&&Qe()}return(h,p)=>(g(),_(q,null,[o("div",{class:"canvas",id:"canvas",onClick:f},[o("div",Wg,[o("b",Bg,d(a(c)("editor.layout.count",{tiles:t.value.tiles.length,limit:a(Kn)},s.value)),1),t.value.tiles.length?(g(),_("span",zg,d(a(c)("editor.layout.how_to")),1)):(g(),_("span",Kg,d(a(c)("editor.layout.no_tiles")),1)),r.value?(g(),_("span",qg,d(r.value),1)):B("",!0),u.value?(g(),_("span",Yg,d(u.value),1)):B("",!0)]),o("div",{class:"pages",id:"layout-preview","aria-label":a(c)("editor.layout.aria")},[(g(!0),_(q,null,me(i.value,b=>(g(),it(xg,{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:he(["page ghost",{disabled:!l.value}])},[o("div",Jg,[o("span",null,d(a(c)("editor.page.label",{page:i.value+1})),1)]),o("div",{class:he(["device",{cyd:!a(Ki),wide:a(ku)}]),id:"add-page",role:"button",tabindex:l.value?0:-1,onClick:p[0]||(p[0]=b=>l.value&&a(er)()),onKeydown:p[1]||(p[1]=Sc(Ot(b=>l.value&&a(er)(),["prevent"]),["enter"]))},d(l.value?a(c)("editor.layout.add_page"):a(c)("editor.layout.max_pages",a(fn))),43,Xg)],2)],8,Gg)]),ie(Vg)],64))}}),Qg={class:"status",id:"settings-status",role:"status"},e_={key:0,class:"set-grid",id:"settings-groups"},t_={class:"mdi"},n_=["data-setting","title","onClick"],s_=["id"],i_={class:"s-control"},o_=["id","aria-checked","aria-labelledby","disabled","onClick"],l_=["aria-labelledby"],a_=["aria-pressed","disabled","onClick"],r_={key:2,class:"step"},c_=["aria-label","disabled","onPointerdown","onClick"],u_={class:"mdi"},d_=["id","aria-labelledby"],f_=["aria-label","disabled","onPointerdown","onClick"],p_={class:"mdi"},h_={key:0,class:"hint warn",id:"settings-page-reach"},m_=Le({__name:"SettingsTab",setup(e){const t=$(()=>El()),n=$(()=>xi()),s=$(()=>t.value?.owner==="screen"&&!ht.value?.online),i=$(()=>Dm.map(T=>({...T,rows:T.rows.filter(k=>t.value?.keys.includes(k.key))})).filter(T=>T.rows.length)),l=$(()=>Pu()),r=T=>s.value||!!t.value?.unavailable.includes(T.key),u=T=>T.needs?!!n.value[T.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=(T,k)=>{const A=n.value[T.key];return r(T)||!u(T)||A===null||A===void 0?!0:T.kind!=="moment"&&ir(T,A,k,!1,n.value)===A},p=new WeakMap;function b(T,k,A){const S=xi(),U=ir(T,S[T.key],k,A,S);U!==S[T.key]&&ni(T.key,U,600)}function v(T,k,A){const S=T.currentTarget;if(S.disabled||T.button!==0)return;const U={timer:0,held:!1};p.set(S,U);let C=0;U.timer=window.setTimeout(function K(){U.held=!0,C+=1,b(k,A,C>5),U.timer=window.setTimeout(K,180)},450)}function y(T){const k=p.get(T.currentTarget);k&&clearTimeout(k.timer)}function I(T,k,A){const S=p.get(T.currentTarget);if(S?.held){S.held=!1;return}b(k,A,!1)}return(T,k)=>(g(),_("div",{class:he(["settings",{offline:s.value}]),id:"general-settings"},[o("span",Qg,d(f.value),1),t.value?(g(),_("div",e_,[(g(!0),_(q,null,me(i.value,A=>(g(),_("section",{key:A.group,class:"set-card"},[o("h4",null,[o("span",t_,d(a(Ae)(A.icon)),1),Me(d(a(c)(`editor.screen_settings.groups.${A.group}`)),1)]),(g(!0),_(q,null,me(A.rows,S=>(g(),_("div",{key:S.key,class:he(["srow",[`setting-${S.kind}`,{inactive:!u(S)||r(S)}]]),"data-setting":S.key,title:r(S)&&!s.value?a(c)("editor.screen_settings.unavailable"):"",onClick:U=>S.kind==="toggle"&&U.target.closest(".srow")===U.currentTarget&&!U.target.closest("button")&&!r(S)&&a(ni)(S.key,!n.value[S.key],150)},[o("span",{class:"s-label",id:`setting-label-${S.key}`},d(a(yo)(S)),9,s_),o("div",i_,[S.kind==="toggle"?(g(),_("button",{key:0,type:"button",class:he(["switch",{unknown:n.value[S.key]===null||n.value[S.key]===void 0}]),role:"switch",id:`setting-${S.key}`,"aria-checked":n.value[S.key]?"true":"false","aria-labelledby":`setting-label-${S.key}`,disabled:r(S),onClick:Ot(U=>a(ni)(S.key,!n.value[S.key],150),["stop"])},null,10,o_)):S.kind==="choice"?(g(),_("div",{key:1,class:"seg",role:"group","aria-labelledby":`setting-label-${S.key}`},[(g(!0),_(q,null,me(S.options,U=>(g(),_("button",{key:String(U),type:"button","aria-pressed":n.value[S.key]===U?"true":"false",disabled:r(S),onClick:C=>a(ni)(S.key,U,150)},d(a(Um)(S,U)),9,a_))),128))],8,l_)):(g(),_("div",r_,[o("button",{type:"button","aria-label":a(c)("editor.screen_settings.lower",{name:a(yo)(S)}),disabled:h(S,-1),onPointerdown:U=>v(U,S,-1),onPointerup:y,onPointercancel:y,onPointerleave:y,onClick:U=>I(U,S,-1)},[o("span",u_,d(a(Ae)("F0374")),1)],40,c_),o("output",{id:`setting-${S.key}`,"aria-labelledby":`setting-label-${S.key}`},d(a(Wm)(S,n.value)),9,d_),o("button",{type:"button","aria-label":a(c)("editor.screen_settings.higher",{name:a(yo)(S)}),disabled:h(S,1),onPointerdown:U=>v(U,S,1),onPointerup:y,onPointercancel:y,onPointerleave:y,onClick:U=>I(U,S,1)},[o("span",p_,d(a(Ae)("F0415")),1)],40,f_)]))])],10,n_))),128)),l.value&&A.rows.some(S=>S.key==="page_buttons")?(g(),_("p",h_,d(l.value),1)):B("",!0)]))),128))])):B("",!0)],2))}}),b_={class:"seg wrap",role:"group"},v_=["disabled","aria-pressed","onClick"],bt=Le({__name:"Segmented",props:{choices:{},value:{},disabled:{type:Boolean}},emits:["pick"],setup(e,{emit:t}){const n=t;return(s,i)=>(g(),_("div",b_,[(g(!0),_(q,null,me(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,v_))),128))]))}}),g_={class:"f"},__={class:"f-label"},y_={key:0},w_={key:1,class:"warn"},k_=["aria-expanded"],$_={class:"tx"},x_={key:0,class:"mono"},S_={class:"link"},C_={key:0,class:"picker"},T_=["placeholder","aria-label"],E_={class:"action-list"},A_=["aria-pressed","onClick"],P_={key:0,class:"hint"},O_={key:1,class:"warn"},I_={class:"f-label"},L_=["aria-label","value","onChange"],M_={value:""},R_=["value"],N_={key:3,class:"action-number"},F_=["aria-label","value","onInput"],D_=["onClick"],U_={key:4,class:"action-number"},j_=["aria-label","min","max","step","value","placeholder","onInput"],H_={key:0},V_=["aria-label","value","placeholder","onInput"],W_={key:6},B_={key:0,class:"warn"},K_={key:3},z_=Le({__name:"ActionPicker",props:{tile:{}},setup(e){const t=e,n=$(()=>m.entityActions[t.tile.entity]),s=$(()=>t.tile.options?.action),i=$(()=>n.value?.find(C=>C.action===s.value?.action)),l=$(()=>m.actionPickerOpen||!s.value),r=$(()=>{const C=m.actionSearch.trim().toLocaleLowerCase();return(n.value||[]).filter(K=>`${K.name} ${K.action} ${K.description}`.toLocaleLowerCase().includes(C))});n.value===void 0&&$m(t.tile.entity);function u(C){const K=C.action===s.value?.action;t.tile.options={...t.tile.options,action:K?s.value:{action:C.action}},m.actionPickerOpen=!1,pt()}function f(C,K){const O={...t.tile.options?.action?.data||{}};K===void 0?delete O[C]:O[C]=K,t.tile.options={...t.tile.options,action:{action:s.value.action,...Object.keys(O).length?{data:O}:{}}},pt()}const h=$(()=>{if(!i.value)return[];const C=t.tile.options?.action?.data||{};return i.value.fields.filter(K=>K.required&&C[K.key]===void 0).map(K=>K.name)}),p=C=>Object.keys(C.selector||{})[0]||"text",b=C=>(C.selector||{})[p(C)]||{},v=C=>C.example===void 0?"":typeof C.example=="string"?C.example:JSON.stringify(C.example);function y(C){const K=b(C),O=p(C);return Array.isArray(C.options)?C.options.map(E=>[E,E]):O==="select"&&Array.isArray(K.options)&&!K.multiple?K.options.map(E=>E&&typeof E=="object"?[String(E.value),String(E.label??E.value)]:[String(E),String(E)]):null}const I=C=>"#"+C.map(K=>Math.max(0,Math.min(255,Number(K)||0)).toString(16).padStart(2,"0")).join(""),T=C=>Array.isArray(C)&&C.length===3?I(C):"#ffffff",k=C=>C===void 0?"":typeof C=="string"?C:JSON.stringify(C);function A(C,K){const O=K.trim();if(!O)return f(C.key,void 0);if(p(C)==="text")return f(C.key,K);try{f(C.key,JSON.parse(O))}catch{f(C.key,K)}}function S(C,K){f(C.key,K===""||!Number.isFinite(Number(K))?void 0:Number(K))}const U=C=>b(C).unit_of_measurement||p(C)==="color_temp"&&b(C).unit||"";return(C,K)=>(g(),_("div",g_,[o("span",__,d(a(c)("editor.action.label")),1),n.value===void 0?(g(),_("small",y_,d(a(c)("editor.action.asking")),1)):n.value===null?(g(),_("small",w_,d(a(c)("editor.action.not_answering")),1)):(g(),_(q,{key:2},[o("button",{type:"button",class:"row","aria-expanded":l.value?"true":"false",onClick:K[0]||(K[0]=O=>a(m).actionPickerOpen=!l.value)},[o("span",$_,[o("b",null,d(i.value?i.value.name:s.value?s.value.action:a(c)("editor.action.choose")),1),s.value?(g(),_("small",x_,d(s.value.action),1)):B("",!0)]),o("span",S_,d(l.value?a(c)("editor.common.close"):a(c)("editor.common.change")),1)],8,k_),l.value?(g(),_("div",C_,[Te(o("input",{"onUpdate:modelValue":K[1]||(K[1]=O=>a(m).actionSearch=O),type:"search",placeholder:a(c)("editor.action.search"),"aria-label":a(c)("editor.action.search_label")},null,8,T_),[[Xe,a(m).actionSearch]]),o("div",E_,[(g(!0),_(q,null,me(r.value,O=>(g(),_("button",{key:O.action,type:"button",class:"action-choice","aria-pressed":O.action===s.value?.action?"true":"false",onClick:E=>u(O)},[o("strong",null,d(O.name),1),o("small",null,d(O.description?`${O.action} · ${O.description}`:O.action),1)],8,A_))),128)),r.value.length?B("",!0):(g(),_("p",P_,d(a(c)("editor.action.none_found")),1))])])):B("",!0),s.value&&!i.value?(g(),_("small",O_,d(a(c)("editor.action.gone")),1)):B("",!0),i.value&&!l.value?(g(),_(q,{key:2},[(g(!0),_(q,null,me(i.value.fields,O=>(g(),_("div",{key:O.key,class:"f"},[o("span",I_,d(O.required?O.name:a(c)("editor.action.optional",{name:O.name})),1),p(O)==="boolean"?(g(),it(bt,{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?.[O.key]===void 0?"":String(s.value?.data?.[O.key]),onPick:E=>f(O.key,E===""?void 0:E==="true")},null,8,["choices","value","onPick"])):y(O)&&y(O).length<=4?(g(),it(bt,{key:1,choices:[["",a(c)("editor.action.not_set")],...y(O)],value:s.value?.data?.[O.key]===void 0?"":String(s.value?.data?.[O.key]),onPick:E=>f(O.key,E===""?void 0:E)},null,8,["choices","value","onPick"])):y(O)?(g(),_("select",{key:2,"aria-label":O.name,value:String(s.value?.data?.[O.key]??""),onChange:E=>f(O.key,E.target.value===""?void 0:E.target.value)},[o("option",M_,d(a(c)("editor.action.not_set")),1),(g(!0),_(q,null,me(y(O),([E,R])=>(g(),_("option",{key:E,value:E},d(R),9,R_))),128))],40,L_)):p(O)==="color_rgb"?(g(),_("div",N_,[o("input",{type:"color","aria-label":O.name,value:T(s.value?.data?.[O.key]),onInput:E=>f(O.key,[1,3,5].map(R=>parseInt(E.target.value.slice(R,R+2),16)))},null,40,F_),o("button",{type:"button",class:"btn quiet mini",onClick:E=>f(O.key,void 0)},d(a(c)("editor.action.not_set")),9,D_)])):p(O)==="number"||p(O)==="color_temp"?(g(),_("div",U_,[o("input",{type:"number","aria-label":O.name,min:b(O).min,max:b(O).max,step:b(O).step==="any"?"any":b(O).step,value:s.value?.data?.[O.key]??"",placeholder:v(O),onInput:E=>S(O,E.target.value)},null,40,j_),U(O)?(g(),_("span",H_,d(U(O)),1)):B("",!0)])):(g(),_("input",{key:5,type:"text","aria-label":O.name,value:k(s.value?.data?.[O.key]),placeholder:v(O),onInput:E=>A(O,E.target.value)},null,40,V_)),O.description?(g(),_("small",W_,d(O.description),1)):B("",!0)]))),128)),h.value.length?(g(),_("small",B_,d(a(c)("editor.action.needs",{fields:h.value.join(", ")})),1)):B("",!0)],64)):B("",!0),a($t)(0,2,58)?B("",!0):(g(),_("small",K_,d(a(c)("editor.action.needs_firmware")),1))],64))]))}}),q_={class:"f"},Y_={class:"f-label"},G_=["aria-expanded"],J_={class:"av mdi"},X_={class:"tx"},Z_={class:"link"},Q_={key:0,class:"picker"},ey=["placeholder","aria-label"],ty=["aria-pressed","title"],ny={class:"mdi"},sy=["aria-pressed","title"],iy={class:"icon-list"},oy={class:"icon-grid"},ly=["title","aria-label","aria-pressed","onClick"],ay={class:"mdi"},ry={key:0,class:"hint"},cy={key:1},Fu=Le({__name:"IconPicker",props:{selected:{},automatic:{},autoLabel:{},allowNone:{type:Boolean},note:{}},emits:["pick"],setup(e,{emit:t}){const n=e,s=t,i=$e(""),l=$(()=>qs(n.selected)),r=$(()=>n.selected==="none"?"":Ae(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",q_,[o("span",Y_,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",J_,d(r.value),1),o("span",X_,[o("b",null,d(u.value),1)]),o("span",Z_,d(a(m).iconPickerOpen?a(c)("editor.common.close"):a(c)("editor.common.change")),1)],8,G_),a(m).iconPickerOpen?(g(),_("div",Q_,[Te(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,ey),[[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",ny,d(a(Ae)(e.automatic)),1),o("span",null,d(e.autoLabel),1)],8,ty),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,sy)):B("",!0),o("div",iy,[(g(!0),_(q,null,me(f.value,b=>(g(),_("section",{key:b.label},[o("small",null,d(b.label),1),o("div",oy,[(g(!0),_(q,null,me(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",ay,d(a(Ae)(v.cp)),1)],8,ly))),128))])]))),128)),f.value.length?B("",!0):(g(),_("p",ry,d(a(c)("editor.icon.none_found")),1))])])):B("",!0),e.note?(g(),_("small",cy,d(e.note),1)):B("",!0)]))}}),uy={class:"dr-head"},dy={class:"tx"},fy={class:"mono"},py=["aria-label"],hy={class:"dr-body"},my={class:"f"},by={class:"f-label",for:"tile-name"},vy=["value","placeholder"],gy={key:1,class:"f"},_y={class:"f-label"},yy={key:2,class:"f"},wy={class:"f-label"},ky={key:3,class:"f"},$y={class:"f-label"},xy={class:"f"},Sy={class:"f-label"},Cy={key:0},Ty={key:4,class:"f"},Ey={class:"f-label"},Ay={key:5,class:"f"},Py={class:"f-label"},Oy={key:6,class:"f"},Iy={class:"f-label"},Ly={key:8,class:"f"},My={class:"f-label"},Ry={key:0,class:"warn"},Ny={key:9,class:"f"},Fy={class:"f-label"},Dy={class:"f"},Uy={class:"f-label"},jy={class:"sw"},Hy=["aria-label","aria-pressed","onClick"],Vy={class:"dr-foot"},Wy=Le({__name:"TileInspector",props:{tile:{}},setup(e){const t=e,n=$(()=>t.tile.entity.split(".")[0]),s=$(()=>zs(t.tile.entity)),i=$(()=>us(t.tile.entity)),l=$(()=>m.layout?It(Ze(m.layout),m.layout.pages):1),r=$(()=>At(t.tile.slot)+1),u=le=>!m.layout?.tiles.some(Z=>At(Z.slot)===le-1),f=$(()=>{const le=Array.from({length:Math.min(fn,l.value+1)},(Z,ue)=>ue+1);return i.value>le.length&&le.push(i.value),le.map(Z=>[Z,u(Z)?c("editor.tile.goes_to.empty",{page:Z}):String(Z)])}),h=$(()=>Za.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)&&At(le.slot)===r.value-1)),b=$(()=>{const le=Array.from({length:l.value},(Z,ue)=>[ue+1,String(ue+1)]);return l.value<fn&&!(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?"":Za.value?c("editor.tile.size.full_hint"):c("editor.tile.size.needs_firmware")),I=$(()=>m.capabilities[t.tile.entity]),T=(le,Z)=>t.tile.options?.[le]??Z,k=$(()=>T("display",n.value==="screen"?"digital":"standard")),A=$(()=>{const le=n.value==="screen"?["digital","analog"]:["standard","watch"],Z=I.value;return n.value==="weather"&&(!Z||Z.displays.includes("forecast")||k.value==="forecast")&&le.push("forecast"),n.value==="sensor"&&(!Z||Z.displays.includes("graph")||k.value==="graph")&&le.push("graph"),n.value==="sun"&&le.push("sunpath"),["camera","image"].includes(n.value)&&le.push("live"),n.value==="media_player"&&(Ki.value||k.value==="cover")&&C.value!=="full"&&le.push("cover"),le.map(ue=>[ue,c(`editor.tile.display.${ue}`)])}),S=$(()=>{const le=I.value;return le&&k.value==="graph"&&!le.displays.includes("graph")?c("editor.tile.display.no_graph"):le&&k.value==="forecast"&&!le.displays.includes("forecast")?c("editor.tile.display.no_forecast"):k.value==="live"?c($t(0,2,77)?"editor.tile.display.live_hint":"editor.tile.display.live_needs_firmware"):k.value==="cover"?c($t(0,2,78)?"editor.tile.display.cover_hint":"editor.tile.display.cover_needs_firmware"):""}),U=$(()=>T("refresh",15)),C=$(()=>T("size","single")),K=$(()=>m.inventory.controls?.[n.value]),O=$(()=>T("controls",C.value==="full"?"none":K.value?.default)),E=$(()=>{const le=I.value;return(K.value?.choices||[]).filter(Z=>!le||Z.key==="none"||Z.key===O.value||le.controls.includes(Z.key)).map(Z=>[Z.key,Z.label])}),R=$(()=>{const le=I.value;return le&&O.value!=="none"&&!le.controls.includes(O.value)?{text:c("editor.tile.controls.not_offered"),warn:!0}:{text:$t(0,2,19)?c(C.value==="full"?"editor.tile.controls.full_hint":"editor.tile.controls.wide_hint"):c("editor.tile.controls.needs_firmware"),warn:!1}}),L=$(()=>T("tap","auto")),D=$(()=>{const le=["auto","detail","none"];return((I.value?I.value.toggle:Ja.includes(n.value))||L.value==="toggle")&&le.push("toggle"),le.push("action"),le.map(Z=>[Z,c(`editor.tile.tap.${Z}`)])}),M=$(()=>L.value==="toggle"&&I.value&&!I.value.toggle?{text:c("editor.tile.tap.no_toggle"),warn:!0}:L.value==="toggle"&&!Ja.includes(n.value)&&!$t(0,2,58)?{text:c("editor.tile.tap.toggle_needs_firmware"),warn:!1}:L.value==="toggle"?{text:c("editor.tile.tap.hold"),warn:!1}:null),Y=$(()=>T("inline","none")),te=$(()=>um.includes(n.value)&&(!I.value||I.value.inline||Y.value==="slider")),ye=$(()=>Y.value==="slider"&&I.value&&!I.value.inline),re=$(()=>T("history_hours",24)),be=$(()=>Object.entries(m.inventory.backgrounds||{})),ge=$(()=>!!m.inventory.entities.find(le=>le.id===t.tile.entity)?.icon),we=$(()=>!!m.inventory.icons&&(n.value!=="screen"||i.value>0)&&!["forecast","sunpath"].includes(k.value));function Ge(le){t.tile.name=le,pt()}function qe(){m.inspector={kind:"inspect",entity:t.tile.entity}}return(le,Z)=>(g(),_(q,null,[o("div",uy,[o("span",{class:"av mdi",style:Ue({color:a(Ht)(e.tile.entity)[2],background:a(Ht)(e.tile.entity)[3]})},d(a(Ae)(a(vs)(e.tile))),5),o("span",dy,[o("b",null,d(e.tile.name||s.value),1),o("small",fy,d(e.tile.entity),1)]),o("button",{type:"button",class:"icon-btn","aria-label":a(c)("editor.common.close"),onClick:Z[0]||(Z[0]=(...ue)=>a(Qe)&&a(Qe)(...ue))},"✕",8,py)]),o("div",hy,[o("div",my,[o("label",by,d(a(c)("editor.tile.name")),1),o("input",{id:"tile-name",value:e.tile.name,placeholder:s.value,maxlength:"60",onInput:Z[1]||(Z[1]=ue=>Ge(ue.target.value))},null,40,vy)]),we.value?(g(),it(Fu,{key:0,selected:e.tile.options?.icon||"auto",automatic:a(Cn)(e.tile.entity),"auto-label":a(c)(ge.value?"editor.tile.icon.auto_ha":"editor.tile.icon.auto_default"),note:a($t)(0,2,18)?"":a(c)("editor.tile.icon.needs_firmware"),onPick:Z[2]||(Z[2]=ue=>a(Jt)(e.tile,"icon",ue))},null,8,["selected","automatic","auto-label","note"])):B("",!0),i.value?(g(),_("div",gy,[o("span",_y,d(a(c)("editor.tile.goes_to.label")),1),ie(bt,{choices:f.value,value:i.value,onPick:Z[3]||(Z[3]=ue=>a(Pm)(e.tile,Number(ue)))},null,8,["choices","value"]),o("small",{class:he({warn:h.value.warn})},d(h.value.text),3)])):(g(),_("div",yy,[o("span",wy,d(a(c)("editor.tile.display.label")),1),ie(bt,{choices:A.value,value:k.value,onPick:Z[4]||(Z[4]=ue=>a(Jt)(e.tile,"display",ue))},null,8,["choices","value"]),S.value?(g(),_("small",{key:0,class:he({warn:!(k.value==="live"&&a($t)(0,2,77))&&!(k.value==="cover"&&a($t)(0,2,78))})},d(S.value),3)):B("",!0)])),k.value==="live"?(g(),_("div",ky,[o("span",$y,d(a(c)("editor.tile.refresh.label")),1),ie(bt,{choices:[15,30].map(ue=>[ue,a(c)("editor.tile.refresh.seconds",{n:ue})]),value:U.value,onPick:Z[5]||(Z[5]=ue=>a(Jt)(e.tile,"refresh",Number(ue)))},null,8,["choices","value"])])):B("",!0),o("div",xy,[o("span",Sy,d(a(c)("editor.tile.size.label")),1),ie(bt,{choices:v.value,value:C.value,onPick:Z[6]||(Z[6]=ue=>a(Jt)(e.tile,"size",ue))},null,8,["choices","value"]),y.value?(g(),_("small",Cy,d(y.value),1)):B("",!0)]),b.value.length>1?(g(),_("div",Ty,[o("span",Ey,d(a(c)("editor.tile.page.label")),1),ie(bt,{choices:b.value,value:r.value,onPick:Z[7]||(Z[7]=ue=>a(Em)(e.tile,Number(ue)-1))},null,8,["choices","value"])])):B("",!0),K.value&&C.value!=="single"&&!i.value?(g(),_("div",Ay,[o("span",Py,d(a(c)("editor.tile.controls.label")),1),ie(bt,{choices:E.value,value:O.value,onPick:Z[8]||(Z[8]=ue=>a(Jt)(e.tile,"controls",ue))},null,8,["choices","value"]),o("small",{class:he({warn:R.value.warn})},d(R.value.text),3)])):B("",!0),n.value!=="screen"&&!i.value?(g(),_("div",Oy,[o("span",Iy,d(a(c)("editor.tile.tap.label")),1),ie(bt,{choices:D.value,value:L.value,onPick:Z[9]||(Z[9]=ue=>a(Jt)(e.tile,"tap",ue))},null,8,["choices","value"]),M.value?(g(),_("small",{key:0,class:he({warn:M.value.warn})},d(M.value.text),3)):B("",!0)])):B("",!0),n.value!=="screen"&&!i.value&&L.value==="action"?(g(),it(z_,{key:7,tile:e.tile},null,8,["tile"])):B("",!0),te.value&&!i.value?(g(),_("div",Ly,[o("span",My,d(a(c)("editor.tile.slider.label")),1),ie(bt,{choices:[["none",a(c)("editor.tile.slider.no")],["slider",a(c)("editor.tile.slider.yes")]],value:Y.value,onPick:Z[10]||(Z[10]=ue=>a(Jt)(e.tile,"inline",ue))},null,8,["choices","value"]),ye.value?(g(),_("small",Ry,d(a(c)("editor.tile.slider.nothing")),1)):B("",!0)])):B("",!0),n.value==="sensor"&&!i.value?(g(),_("div",Ny,[o("span",Fy,d(a(c)("editor.tile.history.label")),1),ie(bt,{choices:[1,6,24].map(ue=>[ue,a(c)("editor.tile.history.hours",ue)]),value:re.value,onPick:Z[11]||(Z[11]=ue=>a(Jt)(e.tile,"history_hours",Number(ue)))},null,8,["choices","value"])])):B("",!0),o("div",Dy,[o("span",Uy,d(a(c)("editor.tile.background.label")),1),o("div",jy,[(g(!0),_(q,null,me(be.value,([ue,ke])=>(g(),_("button",{key:ue,type:"button","aria-label":a(c)("editor.tile.background.aria",{name:ke.label}),"aria-pressed":(e.tile.options?.background||"auto")===ue?"true":"false",onClick:H=>a(Jt)(e.tile,"background",ue)},[o("i",{class:he(ke.color?"":ue==="none"?"none":"auto"),style:Ue(ke.color?{background:ke.color}:void 0)},null,6),Me(d(ke.label),1)],8,Hy))),128))])])]),o("div",Vy,[o("button",{type:"button",class:"btn danger",onClick:Z[12]||(Z[12]=ue=>a(Cu)(e.tile))},d(a(c)("editor.common.remove")),1),Z[13]||(Z[13]=o("span",{class:"spacer"},null,-1)),n.value!=="screen"?(g(),_("button",{key:0,type:"button",class:"btn quiet",onClick:qe},d(a(c)("editor.common.read_current_data")),1)):B("",!0)])],64))}}),By={class:"dr-head"},Ky={class:"av mdi",style:{background:"var(--seg)",color:"var(--ink-2)"}},zy={class:"tx"},qy=["aria-label"],Yy={class:"dr-body"},Gy={class:"f"},Jy={class:"f-label",for:"title"},Xy=["value","placeholder"],Zy={class:"f"},Qy={class:"f-label",id:"topbar-caption"},e0={style:{"text-transform":"none","letter-spacing":"0","font-weight":"500"}},t0={class:"items",id:"topbar-chips",role:"list","aria-labelledby":"topbar-caption"},n0=["data-index","aria-label","onPointerdown","onClick","onKeydown"],s0={class:"tx"},i0=["aria-label","onClick"],o0=["disabled","title"],l0={class:"live",id:"topbar-live"},a0={class:"f"},r0={class:"f-label"},c0={class:"f"},u0={class:"f-label"},d0={href:"#settings"},f0={key:2},p0={key:0,class:"dr-foot"},h0=["disabled"],m0=["disabled"],b0=Le({__name:"TopbarInspector",props:{index:{}},setup(e){const t=e,n=$(()=>hn()),s=$(()=>n.value[t.index]),i=$(()=>(m.fontsVersion,m.now,m.topbarPreviews,_u(n.value,$u.value,m.layout?.title||jn("editor.mockup.home"),vn))),l=$(()=>i.value.dropped),r=$(()=>m.inventory.header?.min_firmware||"0.2.32"),u=$(()=>{const[Y,te,ye]=r.value.split(".").map(Number);return $t(Y,te,ye)}),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=(Y,te)=>{const ye=vn(Y);return ye.shown?l.value.has(te)?c("editor.topbar.detail.overflow"):ye.analog?c("editor.topbar.detail.dial"):ye.text:c("editor.topbar.detail.hidden")},p=Y=>{const te=vn(Y);return te.analog||Y.type!=="entity"?qs(gu[Y.type])?.cp:te.icon},b=Y=>m.topbarAdded?.key===at(Y)&&Date.now()-m.topbarAdded.time<1200;function v(Y){m.layout&&(m.layout.title=Y,pt())}function y(Y){const te=[...n.value];te[t.index]={...te[t.index],...Y},Ds(te)}const I=$(()=>s.value?vn(s.value).shown?l.value.has(t.index)?c("editor.topbar.live.overflow"):c("editor.topbar.live.looks"):c("editor.topbar.live.hidden"):""),T=$(()=>({clock:Wi(as.value,new Date(m.now),an.value),analog:c("editor.topbar.analog_sample"),date:Sl(new Date(m.now),an.value)})),k=$e({index:-1,active:!1,moved:!1});let A=null,S=0,U=null,C=0;function K(Y,te){Y.button!==0||Y.target.closest(".x")||(Y.pointerType!=="touch"&&Y.preventDefault(),k.value={index:te,active:!1,moved:!1},A={x:Y.clientX,y:Y.clientY},U=Y.pointerId,clearTimeout(S),Y.pointerType==="touch"&&(S=window.setTimeout(O,260)),document.addEventListener("pointermove",R),document.addEventListener("pointerup",L),document.addEventListener("pointercancel",L))}function O(){k.value.active=!0,document.addEventListener("touchmove",E,{passive:!1})}function E(Y){k.value.active&&Y.preventDefault()}function R(Y){if(Y.pointerId!==U||!A)return;if(!k.value.active){const re=Math.hypot(Y.clientX-A.x,Y.clientY-A.y);if(Y.pointerType==="touch"){re>10&&(clearTimeout(S),A=null);return}if(re<6)return;O()}const te=[...document.querySelectorAll(".items .item[data-index]")];let ye=k.value.index;if(te.forEach((re,be)=>{const ge=re.getBoundingClientRect();be<k.value.index&&Y.clientY<ge.top+ge.height/2&&(ye=Math.min(ye,be)),be>k.value.index&&Y.clientY>ge.top+ge.height/2&&(ye=Math.max(ye,be))}),ye!==k.value.index&&m.layout){const re=[...n.value];re.splice(ye,0,...re.splice(k.value.index,1)),m.layout.header={items:re};const be=t.index===k.value.index;k.value.index=ye,k.value.moved=!0,be&&Qt(ye)}}function L(Y){Y.pointerId===U&&(clearTimeout(S),document.removeEventListener("pointermove",R),document.removeEventListener("pointerup",L),document.removeEventListener("pointercancel",L),document.removeEventListener("touchmove",E),k.value.active&&(C=Date.now()+400,k.value.moved&&pt()),k.value={index:-1,active:!1,moved:!1},A=null,U=null)}function D(Y){Date.now()<C||Qt(Y)}function M(Y,te){if(Y.key==="Enter"||Y.key===" "){Y.preventDefault(),Qt(te);return}const ye={ArrowUp:-1,ArrowDown:1}[Y.key];ye&&go(te,te+ye)&&(t.index===te&&Qt(te+ye),Y.preventDefault())}return(Y,te)=>{const ye=Ws("i18n-t");return g(),_(q,null,[o("div",By,[o("span",Ky,d(s.value?a(Ae)(p(s.value)||"F0150"):a(Ae)("F0150")),1),o("span",zy,[o("b",null,d(s.value?s.value.type==="entity"?a(zs)(s.value.entity):a(gs)(s.value):a(c)("editor.topbar.title")),1),o("small",{class:he({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(_n)())),3)]),o("button",{type:"button",class:"icon-btn","aria-label":a(c)("editor.common.close"),onClick:te[0]||(te[0]=(...re)=>a(Qe)&&a(Qe)(...re))},"✕",8,qy)]),o("div",Yy,[o("div",Gy,[o("label",Jy,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:te[1]||(te[1]=re=>v(re.target.value))},null,40,Xy)]),o("div",Zy,[o("span",Qy,[Me(d(a(c)("editor.topbar.right"))+" ",1),o("span",e0," · "+d(n.value.length)+" / "+d(a(_n)()),1)]),o("div",t0,[(g(!0),_(q,null,me(n.value,(re,be)=>(g(),_("div",{key:a(at)(re)+be,class:he(["item",{selected:be===e.index,"is-hidden":!a(vn)(re).shown,"is-overflow":l.value.has(be),"just-added":b(re),"dragging-chip":k.value.active&&k.value.index===be}]),role:"listitem",tabindex:"0","data-index":be,"aria-label":a(c)("editor.topbar.item_label",{name:a(gs)(re),slot:be+1}),onPointerdown:ge=>K(ge,be),onClick:ge=>D(be),onKeydown:ge=>M(ge,be)},[te[9]||(te[9]=o("span",{class:"grip","aria-hidden":"true"},"⋮⋮",-1)),o("span",{class:"av mdi",style:Ue(a(vn)(re).color?{color:a(vn)(re).color}:void 0)},d(p(re)?a(Ae)(p(re)):""),5),o("span",s0,[o("b",null,d(a(gs)(re)),1),o("small",null,d(h(re,be)),1)]),o("button",{type:"button",class:"x","aria-label":a(c)("editor.topbar.remove_named",{name:a(gs)(re)}),onClick:Ot(ge=>a(sr)(be),["stop"])},"✕",8,i0)],42,n0))),128)),o("button",{type:"button",class:"ghost-btn",id:"topbar-add",disabled:n.value.length>=a(_n)(),title:n.value.length>=a(_n)()?a(c)("editor.topbar.max",a(_n)()):a(c)("editor.topbar.add_title"),onClick:te[2]||(te[2]=(...re)=>a(tr)&&a(tr)(...re))},d(a(c)("editor.topbar.add_button")),9,o0)]),o("small",{id:"topbar-hint",class:he({warn:l.value.size>0&&u.value})},d(f.value),3)]),s.value?(g(),_(q,{key:0},[o("div",l0,[o("small",null,d(I.value),1),ie(Nu,{items:[s.value],single:""},null,8,["items"])]),s.value.type==="entity"?(g(),_(q,{key:0},[o("div",a0,[o("span",r0,d(a(c)("editor.topbar.content.label")),1),ie(bt,{choices:(a(m).inventory.header?.contents||[]).map(re=>[re.key,re.label]),value:s.value.content,onPick:te[3]||(te[3]=re=>y({content:re}))},null,8,["choices","value"]),o("small",null,d(a(c)("editor.topbar.content.hint")),1)]),ie(Fu,{selected:s.value.icon||"auto",automatic:a(m).topbarPreviews[a(at)(s.value)]?.auto_icon||a(Cn)(s.value.entity),"auto-label":a(c)("editor.topbar.auto_icon"),"allow-none":"",onPick:te[4]||(te[4]=re=>y({icon:re}))},null,8,["selected","automatic","auto-label"]),o("div",c0,[o("span",u0,d(a(c)("editor.topbar.show.label")),1),ie(bt,{choices:(a(m).inventory.header?.shows||[]).map(re=>[re.key,re.label]),value:s.value.show,onPick:te[5]||(te[5]=re=>y({show:re}))},null,8,["choices","value"]),o("small",null,d(a(c)("editor.topbar.show.hint")),1)])],64)):s.value.type!=="date"?(g(),it(ye,{key:1,keypath:a(as)?"editor.topbar.clock_24":"editor.topbar.clock_12",tag:"small",id:"topbar-clock",scope:"global"},{settings:oe(()=>[o("a",d0,d(a(c)("editor.topbar.clock_settings")),1)]),_:1},8,["keypath"])):(g(),_("small",f0,d(a(c)("editor.topbar.date_hint",{date:T.value.date})),1))],64)):B("",!0)]),s.value?(g(),_("div",p0,[o("button",{type:"button",class:"btn danger",onClick:te[6]||(te[6]=re=>a(sr)(e.index))},d(a(c)("editor.common.remove")),1),te[10]||(te[10]=o("span",{class:"spacer"},null,-1)),o("button",{type:"button",class:"btn quiet",disabled:e.index===0,onClick:te[7]||(te[7]=re=>a(go)(e.index,e.index-1)&&a(Qt)(e.index-1))},d(a(c)("editor.topbar.up")),9,h0),o("button",{type:"button",class:"btn quiet",disabled:e.index>=n.value.length-1,onClick:te[8]||(te[8]=re=>a(go)(e.index,e.index+1)&&a(Qt)(e.index+1))},d(a(c)("editor.topbar.down")),9,m0)])):B("",!0)],64)}}}),v0={class:"dr-head"},g0={class:"tx"},_0=["aria-label"],y0={class:"dr-body"},w0={class:"f"},k0={class:"f-label"},$0={class:"options"},x0=["disabled","onClick"],S0={class:"mdi"},C0={class:"tx"},T0={key:0,class:"f"},E0={class:"f-label"},A0={class:"options"},P0=["disabled","onClick"],O0={class:"mdi"},I0={class:"tx"},L0={class:"f"},M0={class:"f-label",for:"topbar-search"},R0=["placeholder","aria-label"],N0={class:"options"},F0=["disabled","onClick"],D0={class:"mdi"},U0={class:"tx"},j0={key:0,class:"hint"},H0={key:1,class:"hint"},V0={class:"dr-foot"},W0=Le({__name:"TopbarAdd",setup(e){const t=$e(""),n=$(()=>new Set(hn().map(at))),s=$(()=>({clock:Wi(as.value,new Date(m.now),an.value),analog:c("editor.topbar.analog_sample"),date:Sl(new Date(m.now),an.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(),_(q,null,[o("div",v0,[f[3]||(f[3]=o("span",{class:"av",style:{background:"var(--seg)",color:"var(--ink-2)","font-size":"18px"}},"+",-1)),o("span",g0,[o("b",null,d(a(c)("editor.topbar.add.title")),1),o("small",null,d(a(c)("editor.topbar.add.slots",{used:a(hn)().length},a(_n)())),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,_0)]),o("div",y0,[o("div",w0,[o("span",k0,d(a(c)("editor.topbar.add.builtin")),1),o("div",$0,[(g(!0),_(q,null,me(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(_o)({type:h.type})},[o("span",S0,d(a(Ae)(a(qs)(a(gu)[h.type])?.cp||"F0150")),1),o("span",C0,[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,x0))),128))])]),i.value.length?(g(),_("div",T0,[o("span",E0,d(a(c)("editor.topbar.add.suggestions")),1),o("div",A0,[(g(!0),_(q,null,me(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(_o)(h.item)},[o("span",O0,d(a(Ae)(h.icon||a(Cn)(h.item.entity))),1),o("span",I0,[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,P0))),128))])])):B("",!0),o("div",L0,[o("label",M0,d(a(c)("editor.topbar.add.entity")),1),Te(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,R0),[[Xe,t.value]]),o("div",N0,[(g(!0),_(q,null,me(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(_o)(r(h.id))},[o("span",D0,d(a(Ae)(a(Cn)(h.id))),1),o("span",U0,[o("strong",null,d(h.name),1),o("small",null,d([h.area,h.id].filter(Boolean).join(" · ")),1)])],8,F0))),128)),l.value.length?l.value.length>40?(g(),_("p",H0,d(a(c)("editor.common.results",l.value.length)),1)):B("",!0):(g(),_("p",j0,d(a(c)("editor.topbar.add.none_found")),1))])])]),o("div",V0,[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))}}),B0={class:"dr-head"},K0={class:"tx"},z0=["aria-label"],q0={class:"dr-body",id:"inspector-section"},Y0={id:"inspection-summary"},G0={key:0,class:"hint warn"},J0={key:1,class:"hint"},X0={id:"inspection"},Z0={class:"dr-foot"},Q0=Le({__name:"InspectPanel",props:{entity:{}},setup(e){const t=e,n=$e(null),s=$e(c("editor.inspect.reading")),i=$e("");async function l(){if(m.selected){n.value=null,i.value="",s.value=c("editor.inspect.fetching");try{const u=await Ft(`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:vu(f.display||"standard"),size:cm(f.size),control:im({entity:u,options:f},m.inventory),background:m.inventory.backgrounds?.[f.background||"auto"]?.label||c("editor.inspect.background_default")})};return An(l),Tt(()=>t.entity,l),(u,f)=>(g(),_(q,null,[o("div",B0,[f[1]||(f[1]=o("span",{class:"av",style:{background:"var(--seg)",color:"var(--ink-2)","font-size":"16px"}},"⌕",-1)),o("span",K0,[o("b",null,d(a(c)("editor.inspect.title")),1),o("small",{class:he({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,z0)]),o("div",q0,[o("div",Y0,[i.value?(g(),_("p",G0,d(i.value),1)):n.value?B("",!0):(g(),_("p",J0,d(a(c)("editor.inspect.fetching")),1)),(g(!0),_(q,null,me(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",X0,d(s.value),1)]),o("div",Z0,[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))}}),e1=["aria-hidden"],t1=Le({__name:"Drawer",setup(e){const t=$(()=>!!(m.inspector&&(m.inspector.kind!=="tile"||fo.value)));return(n,s)=>(g(),_("aside",{class:he(["drawer",{open:t.value}]),id:"tile-sheet","aria-hidden":t.value?"false":"true",onClick:s[0]||(s[0]=Ot(()=>{},["stop"]))},[a(m).inspector?(g(),_(q,{key:0},[a(m).inspector.kind==="tile"&&a(fo)?(g(),it(Wy,{key:0,tile:a(fo)},null,8,["tile"])):a(m).inspector.kind==="bar"?(g(),it(b0,{key:1,index:a(m).inspector.index},null,8,["index"])):a(m).inspector.kind==="bar-add"?(g(),it(W0,{key:2})):a(m).inspector.kind==="inspect"?(g(),it(Q0,{key:3,entity:a(m).inspector.entity},null,8,["entity"])):B("",!0)],64)):B("",!0)],10,e1))}}),n1={class:"main-head"},s1={class:"eyebrow",id:"screen-name"},i1=["title"],o1={class:"head-right"},l1={class:"seg",role:"tablist"},a1=["aria-pressed"],r1=["aria-pressed"],c1={key:1,id:"dirty",class:"chip dirty"},u1=["disabled"],d1={key:0,class:"spin small"},f1=["aria-label","aria-expanded"],p1={key:3,class:"menu",role:"menu"},h1=["disabled","title"],m1=["disabled","aria-expanded"],b1={key:0,class:"sub"},v1=["onClick"],g1=["disabled","title"],_1={class:"body",id:"body"},y1=Le({__name:"ScreenView",setup(e){const t=$(()=>ht.value),n=$(()=>t.value.online?`${t.value.delivery} · ${t.value.status}`:c("editor.screen_view.offline")),s=$(()=>Iu(t.value)&&t.value.online&&t.value.update?.profile&&t.value.update?.host),i=$(()=>m.inventory.screens.filter(T=>T.id!==t.value.id&&T.layout?.tiles?.length)),l=$e(!1),r=$e(null);function u(){m.menuOpen=!1,l.value=!1}function f(){u(),m.overrideProfile=t.value.update?.profile||null,m.overrideFriendly=t.value.name,He("#override")}function h(){u(),m.selectedTile=null,m.inspector={kind:"inspect"}}function p(T){u(),!(m.dirty&&!confirm(c("editor.screen_view.confirm.copy")))&&Lm(T)}function b(){u(),r.value?.click()}async function v(T){const k=T.target,A=k.files?.[0];k.value="",A&&(m.dirty&&!confirm(c("editor.screen_view.confirm.import"))||Rm(await A.text()))}function y(T){if(T.key==="Escape")if(m.menuOpen)u();else{if(m.palette)return;m.inspector&&!T.target?.closest?.(".picker")&&Qe()}else(T.metaKey||T.ctrlKey)&&T.key.toLowerCase()==="s"&&(T.preventDefault(),m.dirty&&Ko())}function I(T){m.menuOpen&&!T.target.closest(".head-right .menu, #more")&&u()}return An(()=>{document.addEventListener("keydown",y),document.addEventListener("click",I)}),rs(()=>{document.removeEventListener("keydown",y),document.removeEventListener("click",I)}),(T,k)=>(g(),_(q,null,[o("header",n1,[o("div",null,[o("span",s1,d(t.value.name),1),o("h1",null,d(a(m).layout?.title||a(jn)("editor.mockup.home")),1)]),o("span",{id:"delivery",class:he(["chip",{off:!t.value.online}]),title:n.value},[k[9]||(k[9]=o("span",{class:"dot"},null,-1)),Me(d(n.value),1)],10,i1),o("div",o1,[o("div",l1,[o("button",{type:"button",id:"tab-layout",role:"tab","aria-pressed":a(m).tab==="layout"?"true":"false",onClick:k[0]||(k[0]=A=>a(m).tab="layout")},d(a(c)("editor.screen_view.tabs.layout")),9,a1),o("button",{type:"button",id:"tab-settings",role:"tab","aria-pressed":a(m).tab==="settings"?"true":"false",onClick:k[1]||(k[1]=A=>{a(m).tab="settings",a(Qe)()})},d(a(c)("editor.screen_view.tabs.settings")),9,r1)]),a(m).dirty?(g(),_("span",c1,d(a(c)("editor.common.unsaved")),1)):(g(),_("span",{key:0,id:"dirty",class:he(["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:k[2]||(k[2]=A=>a(Ko)())},[a(m).busy?(g(),_("span",d1)):B("",!0),Me(d(a(m).busy?a(c)("editor.common.saving"):a(c)("editor.common.save_send")),1)],8,u1)):B("",!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:k[3]||(k[3]=Ot(A=>{a(m).menuOpen=!a(m).menuOpen,l.value=!1},["stop"]))},"···",8,f1),a(m).menuOpen?(g(),_("div",p1,[o("button",{type:"button",role:"menuitem",id:"identify",disabled:!a(zn)(t.value)||!t.value.online,title:a(zn)(t.value)?"":a(c)("editor.screen_view.menu.identify_needs"),onClick:k[4]||(k[4]=A=>{u(),a(Tu)(t.value)})},[Me(d(a(c)("editor.screen_view.menu.identify"))+" ",1),o("small",null,d(a(c)("editor.screen_view.menu.identify_hint")),1)],8,h1),o("button",{type:"button",role:"menuitem",id:"inspect",onClick:h},[Me(d(a(c)("editor.common.read_current_data"))+" ",1),o("small",null,d(a(c)("editor.screen_view.menu.inspect_hint")),1)]),k[12]||(k[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:k[5]||(k[5]=Ot(A=>l.value=!l.value,["stop"]))},[Me(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,m1),l.value?(g(),_("div",b1,[(g(!0),_(q,null,me(i.value,A=>(g(),_("button",{key:A.id,type:"button",role:"menuitem",onClick:S=>p(A.id)},[Me(d(A.name)+" ",1),o("small",null,d(a(c)("editor.screen_view.menu.copy_tiles",A.layout.tiles.length)),1)],8,v1))),128))])):B("",!0),o("button",{type:"button",role:"menuitem",id:"export-layout",onClick:k[6]||(k[6]=A=>{u(),a(Au)()})},[Me(d(a(c)("editor.screen_view.menu.export"))+" ",1),k[10]||(k[10]=o("small",null,"JSON",-1))]),o("button",{type:"button",role:"menuitem",id:"import-layout",onClick:b},[Me(d(a(c)("editor.screen_view.menu.import"))+" ",1),k[11]||(k[11]=o("small",null,"JSON",-1))]),k[13]||(k[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},[Me(d(a(c)("editor.screen_view.menu.override"))+" ",1),o("small",null,d(a(c)("editor.screen_view.menu.override_hint")),1)],8,g1),o("button",{type:"button",role:"menuitem",onClick:k[7]||(k[7]=A=>{u(),a(He)("#firmware")})},d(a(c)("editor.nav.firmware")),1),s.value?(g(),_("button",{key:1,type:"button",role:"menuitem",onClick:k[8]||(k[8]=A=>{u(),a(qo)(t.value)})},[Me(d(a(c)("editor.screen_view.menu.update"))+" ",1),o("small",null,d(t.value.update?.target),1)])):B("",!0)])):B("",!0),o("input",{ref_key:"fileInput",ref:r,type:"file",accept:"application/json,.json",hidden:"",onChange:v},null,544)])]),o("div",_1,[a(m).tab==="layout"?(g(),it(Zg,{key:0})):(g(),it(m_,{key:1})),ie(t1)])],64))}}),w1={key:0,id:"choose",class:"empty"},k1={key:1,id:"empty",class:"empty"},$1=Le({__name:"EmptyState",setup(e){return(t,n)=>a(m).inventory.screens.length?(g(),_("section",w1,[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",k1,[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(He)("#new-screen"))},d(a(c)("editor.empty.start.button")),1)]))}}),x1={class:"panel",id:"settings-view"},S1={class:"panel-head"},C1={class:"tx"},T1={class:"eyebrow"},E1={id:"settings-title"},A1={class:"card-grid"},P1={class:"card"},O1={class:"tools"},I1={class:"tx"},L1={class:"tx"},M1={key:0,class:"card updates",id:"updates"},R1={id:"updates-hint"},N1=["aria-valuenow"],F1={class:"progress-text"},D1={key:0,class:"log-lines"},U1={key:2,class:"whatsnew"},j1={class:"check"},H1=["checked"],V1={key:1,class:"card",id:"language"},W1={class:"field"},B1={class:"f-label",for:"screen-language"},K1=["value","disabled"],z1={value:"auto"},q1=["value"],Y1={key:0,id:"language-ha-missing"},G1={class:"field"},J1={class:"f-label",for:"time-format"},X1=["value","disabled"],Z1={value:"auto"},Q1={value:"24"},e2={value:"12"},t2={class:"field"},n2={class:"f-label",for:"number-format"},s2=["value","disabled"],i2={value:"auto"},o2=["value"],l2={key:0,class:"actions",id:"language-profile"},a2=["disabled"],r2={class:"card"},c2={class:"tools"},u2={class:"tx"},d2={class:"card",id:"claude"},f2={class:"actions"},p2=["disabled"],h2={id:"claude-path"},m2={class:"actions"},b2={class:"btn quiet",id:"claude-download",href:"api/claude-skill.zip",download:"esp-screens.zip"},v2="https://github.com/MaxGramser/homeassistant_espscreen/blob/main/docs/TRANSLATING.md",g2=Le({__name:"AppSettingsView",setup(e){const t=$(()=>m.inventory.updates),n=$(()=>m.inventory.screens.filter(E=>E.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(E=>E.update?.state==="running"||m.updating.includes(E.id))),l=$(()=>i.value?Xn(i.value):null),r=$(()=>(m.firmwareJob?.logs||[]).slice(-12).join(`
`)),u=$(()=>{const E=m.inventory.changelog,R=t.value?.target;return!Array.isArray(E)||!R?[]:E.filter(L=>L.firmware===R).flatMap(L=>L.lines).slice(0,10)}),f=$(()=>m.inventory.claude_skill),h=$e(!1);async function p(){h.value=!0;try{await Km()}finally{h.value=!1}}const b=["point","comma","space"],v=$(()=>m.inventory.language),y=$(()=>{const E=v.value,R=E?.ha?iu(E.ha,E.languages.map(L=>L.code)):void 0;return E?.languages.find(L=>L.code===R)?.name}),I=$(()=>v.value?.languages.find(E=>E.code===v.value.effective&&!E.checked)),T=E=>c(E==="12"?"editor.settings.language.clock_12":"editor.settings.language.clock_24"),k=E=>au("1234.5",E),A=Qh(),S=$(()=>{const E=v.value;return E?{...A.clock&&A.clock!==(E.clock_effective||"24")?{clock:A.clock}:{},...A.numbers&&A.numbers!==(E.numbers_effective||"point")?{numbers:A.numbers}:{}}:{}}),U=$(()=>[S.value.clock&&T(S.value.clock),S.value.numbers&&k(os[S.value.numbers])].filter(Boolean).join(" · ")),C=$e(!1);async function K(E,R){const L=R.target;C.value=!0;const D=await rr({[E]:L.value});C.value=!1,D||(L.value=String(v.value?.[E]??"auto"))}async function O(){C.value=!0,await rr(S.value),C.value=!1}return(E,R)=>{const L=Ws("i18n-t");return g(),_("div",x1,[o("div",S1,[o("div",C1,[o("span",T1,d(a(c)("editor.nav.settings")),1),o("h1",E1,d(a(c)("editor.settings.title")),1)]),o("button",{type:"button",class:"btn quiet",id:"close-settings",onClick:R[0]||(R[0]=D=>a(He)(""))},d(a(c)("editor.settings.back")),1)]),o("div",A1,[o("section",P1,[o("h2",null,d(a(c)("editor.settings.screens.title")),1),o("p",null,d(a(c)("editor.settings.screens.text")),1),o("div",O1,[o("button",{type:"button",class:"tool",onClick:R[1]||(R[1]=D=>a(He)("#new-screen"))},[R[9]||(R[9]=o("span",{class:"tool-icon"},"+",-1)),o("span",I1,[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:R[2]||(R[2]=D=>a(He)("#firmware"))},[R[10]||(R[10]=o("span",{class:"tool-icon"},"⇪",-1)),o("span",L1,[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",M1,[o("h2",null,d(a(c)("editor.settings.updates.title")),1),o("p",R1,d(s.value),1),i.value&&l.value?(g(),_(q,{key:0},[o("div",{class:"progress",role:"progressbar","aria-valuenow":l.value.percent,"aria-valuemin":"0","aria-valuemax":"100"},[o("i",{style:Ue({width:l.value.percent+"%"})},null,4)],8,N1),o("div",F1,[o("span",null,d(i.value.name)+" · "+d(l.value.percent)+" %",1),o("span",null,d(l.value.text),1)]),r.value?(g(),_("pre",D1,d(r.value),1)):B("",!0)],64)):B("",!0),t.value.pending&&!t.value.busy&&t.value.pending>=2?(g(),_("button",{key:1,id:"update-all",type:"button",class:"btn primary",onClick:R[3]||(R[3]=(...D)=>a(or)&&a(or)(...D))},d(a(c)("editor.settings.updates.all",t.value.pending)),1)):B("",!0),u.value.length&&!a(zo)()?(g(),_("details",U1,[o("summary",null,d(a(c)("editor.settings.updates.whats_new",{version:t.value.target})),1),o("ul",null,[(g(!0),_(q,null,me(u.value,D=>(g(),_("li",{key:D},d(D),1))),128))])])):B("",!0),o("label",j1,[o("input",{type:"checkbox",id:"auto-update",checked:!!t.value.auto,onChange:R[4]||(R[4]=D=>a(Bm)(D.target.checked))},null,40,H1),o("span",null,[Me(d(a(c)("editor.settings.updates.auto_label")),1),o("small",null,d(a(c)("editor.settings.updates.auto_hint")),1)])])])):B("",!0),v.value?(g(),_("section",V1,[o("h2",null,d(a(c)("editor.settings.language.title")),1),o("div",W1,[o("label",B1,d(a(c)("editor.settings.language.screen_language")),1),o("select",{id:"screen-language",value:v.value.setting,disabled:C.value,onChange:R[5]||(R[5]=D=>K("setting",D))},[o("option",z1,d(y.value?a(c)("editor.settings.language.auto",{name:y.value}):a(c)("editor.settings.language.auto_plain")),1),(g(!0),_(q,null,me(v.value.languages,D=>(g(),_("option",{key:D.code,value:D.code},d(D.checked?D.name:a(c)("editor.settings.language.unchecked",{name:D.name})),9,q1))),128))],40,K1),v.value.setting==="auto"&&!y.value?(g(),_("small",Y1,d(a(c)("editor.settings.language.ha_missing")),1)):B("",!0),I.value?(g(),it(L,{key:1,keypath:"editor.settings.language.help",tag:"small",id:"language-help",scope:"global"},{name:oe(()=>[Me(d(I.value.name),1)]),guide:oe(()=>[o("a",{href:v2,target:"_blank",rel:"noopener"},d(a(c)("editor.settings.language.guide")),1)]),_:1})):B("",!0),o("small",null,d(a(c)("editor.settings.language.update_hint")),1)]),o("div",G1,[o("label",J1,d(a(c)("editor.settings.language.time")),1),o("select",{id:"time-format",value:v.value.clock||"auto",disabled:C.value,onChange:R[6]||(R[6]=D=>K("clock",D))},[o("option",Z1,d(a(c)("editor.settings.language.time_auto",{clock:T(v.value.clock_auto||v.value.clock_effective)})),1),o("option",Q1,d(T("24")),1),o("option",e2,d(T("12")),1)],40,X1)]),o("div",t2,[o("label",n2,d(a(c)("editor.settings.language.numbers")),1),o("select",{id:"number-format",value:v.value.numbers||"auto",disabled:C.value,onChange:R[7]||(R[7]=D=>K("numbers",D))},[o("option",i2,d(a(c)("editor.settings.language.numbers_auto",{example:k(a(Ym))})),1),(g(),_(q,null,me(b,D=>o("option",{key:D,value:D},d(k(a(os)[D])),9,o2)),64))],40,s2)]),U.value?(g(),_("div",l2,[o("small",null,d(a(c)("editor.settings.language.profile",{formats:U.value})),1),o("button",{type:"button",class:"btn quiet mini",disabled:C.value,onClick:O},d(a(c)("editor.settings.language.use_profile")),9,a2)])):B("",!0),o("small",null,d(a(c)("editor.settings.language.editor_hint")),1)])):B("",!0),o("section",r2,[o("h2",null,d(a(c)("editor.nav.alerts")),1),o("p",null,d(a(c)("editor.settings.alerts.text")),1),o("div",c2,[o("button",{type:"button",class:"tool",onClick:R[8]||(R[8]=D=>a(He)("#alerts"))},[R[11]||(R[11]=o("span",{class:"tool-icon"},"!",-1)),o("span",u2,[o("b",null,d(a(c)("editor.nav.alerts")),1),o("small",null,d(a(c)("editor.settings.alerts.detail")),1)])])])]),o("section",d2,[R[12]||(R[12]=o("h2",null,"Claude",-1)),o("p",null,d(a(c)("editor.settings.claude.text")),1),o("div",f2,[o("button",{type:"button",id:"claude-install",class:he(["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,p2),o("span",{id:"claude-status",class:he(["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)]),ie(L,{keypath:"editor.settings.claude.writes",tag:"small",scope:"global"},{path:oe(()=>[o("code",h2,d(f.value?.path||"/homeassistant/.claude/skills/esp-screens"),1)]),_:1}),o("div",m2,[o("a",b2,d(a(c)("editor.settings.claude.download")),1),o("small",null,d(a(c)("editor.settings.claude.upload")),1)])])])])}}}),_2={class:"panel",id:"installer"},y2={class:"panel-head"},w2={class:"tx"},k2={class:"eyebrow"},$2={id:"install-title"},x2={key:0},S2=["aria-label"],C2={class:"boards"},T2={class:"board"},E2={class:"board"},A2={class:"board"},P2={class:"field"},O2={class:"f-label",for:"friendly_name"},I2=["placeholder"],L2={class:"node-line"},M2={id:"node-preview"},R2={key:0,class:"field",id:"node-label"},N2={class:"f-label",for:"node-name"},F2={key:1,id:"wifi-fields",class:"wifi"},D2={class:"hint",id:"wifi-status"},U2={key:0,class:"field",id:"wifi-ssid-label"},j2={class:"f-label",for:"wifi_ssid"},H2={key:1,class:"field",id:"wifi-password-label"},V2={class:"f-label",for:"wifi_password"},W2={class:"field"},B2={class:"f-label",for:"install-target"},K2={key:0,value:"usb"},z2=["value"],q2={value:"download"},Y2={value:""},G2={id:"target-hint"},J2={key:2,class:"hint",id:"install-note"},X2={class:"actions"},Z2=["disabled"],Q2={id:"install-status",class:"status-line error",role:"status"},ew={key:1,id:"install-progress",class:"card"},tw={class:"progress-head"},nw={key:0,class:"spin",id:"progress-spin"},sw={id:"progress-title"},iw={id:"progress-detail"},ow={key:0,id:"install-download",class:"card",style:{background:"var(--surface-2)"}},lw=["href","download"],aw={class:"steps",id:"download-steps"},rw={key:1,id:"install-result",class:"field"},cw={class:"key-box"},uw={class:"steps",id:"install-steps"},dw=["open"],fw={id:"install-log",class:"log"},pw={class:"actions"},hw="https://web.esphome.io/?dashboard_install",mw=Le({__name:"InstallerView",setup(e){const t=qn({board:"cyd",friendly_name:"",name:"",wifi_ssid:"",wifi_password:"",target:""}),n=qn({view:"setup",file:null,friendly:"",board:"cyd",target:"",apiKey:null,nodeEdited:!1,jobState:null,picked:!1,action:null}),s=$e(!1),i=$e(null),l=$e(null),r=$e([]),u=$e(""),f=$e(""),h=$e(!1),p=$e(!1),b=$e(null);let v=0;function y(ke){return ke.toLowerCase().normalize("NFD").replace(/[̀-ͯ]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^[^a-z]+/,"").slice(0,30).replace(/-+$/,"")||"screen"}function I(ke){const H=ke.replace(/^\/dev\/serial\/by-id\/usb-/,"").replace(/-if\d+(-port\d+)?$/,"").replace(/_/g," ");return`USB · ${H===ke?ke.replace(/^\/dev\//,""):H}`}Tt(()=>t.friendly_name,()=>{n.nodeEdited||(t.name=y(t.friendly_name))});const T=$(()=>t.name||"…"),k=$(()=>i.value?.ports||[]),A=$(()=>i.value?.wifi),S=$(()=>A.value?.state==="new"||A.value?.state==="missing"),U=$(()=>A.value?.missing||[]),C=$(()=>c(A.value?.state==="new"?"editor.installer.wifi.new":"editor.installer.wifi.missing")),K=$(()=>A.value?.state==="ready"?c("editor.installer.wifi.ready"):A.value?.state==="invalid"?c("editor.installer.wifi.invalid"):""),O=$(()=>c(t.target==="usb"?"editor.installer.target.usb":t.target==="download"?"editor.installer.target.download":t.target?k.value.length>1?"editor.installer.target.several":"editor.installer.target.once":"editor.installer.target.later")),E=$(()=>t.target==="download"?c("editor.firmware.build_download"):t.target?c("editor.installer.install"):c("editor.installer.save_profile")),R=$(()=>i.value?.job?.state==="running"&&!(n.file&&i.value.job.file===n.file)),L=$(()=>h.value||A.value?.state==="invalid"||t.target==="usb"||!!t.target&&(R.value||!i.value?.available));function D(){const ke=t.target;(ke==="download"||ke===""?n.picked:k.value.includes(ke))||(t.target=k.value[0]||"usb")}async function M(){let ke;try{ke=await Ft("firmware")}catch(se){u.value=se.message;return}i.value=ke;const H=ke.job,ne=H&&n.file&&H.file===n.file;if(ne&&(n.jobState=H.state),n.view==="setup"){if(ne&&H.state==="running"){Y(H,ke.logs||[]);return}D(),u.value=R.value?c("editor.installer.busy",{file:H.file}):!ke.available&&t.target?c("editor.installer.no_cli"):K.value}else n.view==="progress"&&ne&&(l.value=H,r.value=ke.logs||[],H.state!=="running"&&H.state!=="success"&&(p.value=!0))}function Y(ke,H){n.view="progress",n.jobState=ke.state,n.action=ke.action,l.value=ke,r.value=H}const te=$(()=>l.value?.state==="running"),ye=$(()=>n.view==="done"||l.value?.state==="success"),re=$(()=>n.action==="download"),be=$(()=>c(n.view==="done"?"editor.installer.title.saved":te.value?"editor.installer.title.running":ye.value?re.value?"editor.installer.title.ready":"editor.installer.title.done":"editor.installer.title.failed")),ge=$(()=>n.view==="done"?c("editor.installer.progress.saved",{file:n.file}):te.value?l.value?.stage==="upload"?c("editor.installer.progress.writing",{name:n.friendly}):c("editor.installer.progress.building"):ye.value?re.value?c("editor.installer.progress.ready",{name:n.friendly}):c("editor.installer.progress.installed",{name:n.friendly}):c(re.value?"editor.installer.progress.build_failed":"editor.installer.progress.install_failed")),we=$(()=>n.view==="done"?c("editor.installer.detail.saved"):te.value?l.value?.stage==="upload"?c("editor.installer.detail.uploading"):c(re.value?"editor.installer.detail.building_download":"editor.installer.detail.building"):ye.value?re.value?c("editor.installer.detail.downloaded"):c(n.board==="cyd"?"editor.installer.detail.booted_cyd":"editor.installer.detail.booted"):r.value.filter(ke=>/error/i.test(ke)).pop()||r.value.filter(ke=>/failed/i.test(ke)).pop()||c("editor.installer.detail.see_log")),Ge=$(()=>({href:`api/firmware/profiles/${encodeURIComponent(n.file||"")}/download`,name:(n.file||"").replace(/\.yaml$/,"")+".factory.bin"}));async function qe(ke){const H=ke.target;if(n.nodeEdited||(t.name=y(t.friendly_name)),!!H.reportValidity()){h.value=!0,f.value="";try{const ne={board:t.board,friendly_name:t.friendly_name,name:t.name,target:t.target};S.value&&(U.value.includes("wifi_ssid")&&(ne.wifi_ssid=t.wifi_ssid),U.value.includes("wifi_password")&&(ne.wifi_password=t.wifi_password));const se=await ft("firmware/profiles","POST",ne);Object.assign(n,{file:se.file,apiKey:se.api_key,friendly:t.friendly_name.trim(),board:t.board,target:t.target}),t.wifi_password="",se.job?Y(se.job,[]):n.view="done"}catch(ne){f.value=ne.message}finally{h.value=!1}}}async function le(){try{if(!re.value){const{ports:H}=await Ft("firmware");!H.includes(n.target)&&H.length===1&&(n.target=H[0])}const ke=await ft("firmware/jobs","POST",re.value?{file:n.file,action:"download"}:{file:n.file,action:"install",target:n.target});Y(ke,[])}catch(ke){Ce(ke.message)}}function Z(){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,M()}function ue(){n.view==="progress"&&n.jobState!=="running"&&(n.view="done"),He("")}return An(()=>{M(),v=window.setInterval(M,3e3)}),rs(()=>clearInterval(v)),(ke,H)=>{const ne=Ws("i18n-t");return g(),_("div",_2,[o("div",y2,[o("div",w2,[o("span",k2,d(a(c)("editor.nav.new_screen")),1),o("h1",$2,d(n.view==="setup"?a(c)("editor.installer.title.setup"):be.value),1),n.view==="setup"?(g(),_("p",x2,d(a(c)("editor.installer.intro")),1)):B("",!0)]),o("button",{type:"button",class:"btn quiet",id:"close-install","aria-label":a(c)("editor.common.close"),onClick:ue},d(a(c)("editor.common.back")),9,S2)]),n.view==="setup"?(g(),_("form",{key:0,id:"install-form",class:"card",onSubmit:Ot(qe,["prevent"])},[o("fieldset",null,[o("legend",null,d(a(c)("editor.installer.board")),1),o("div",C2,[o("label",T2,[Te(o("input",{type:"radio",name:"board",value:"cyd","onUpdate:modelValue":H[0]||(H[0]=se=>t.board=se)},null,512),[[ao,t.board]]),o("span",null,[o("b",null,d(a(c)("editor.installer.board_cyd")),1),H[14]||(H[14]=o("small",null,"ESP32-2432S028 · 320 × 240",-1))])]),o("label",E2,[Te(o("input",{type:"radio",name:"board",value:"guition","onUpdate:modelValue":H[1]||(H[1]=se=>t.board=se)},null,512),[[ao,t.board]]),o("span",null,[o("b",null,d(a(c)("editor.installer.board_guition")),1),H[15]||(H[15]=o("small",null,"ESP32-S3-4848S040 · 480 × 480 · GT911",-1))])]),o("label",A2,[Te(o("input",{type:"radio",name:"board",value:"elecrow","onUpdate:modelValue":H[2]||(H[2]=se=>t.board=se)},null,512),[[ao,t.board]]),o("span",null,[o("b",null,d(a(c)("editor.installer.board_elecrow")),1),H[16]||(H[16]=o("small",null,"DIS08070H · ESP32-S3 N4R8 · 800 × 480 · GT911",-1))])])])]),o("div",P2,[o("label",O2,d(a(c)("editor.installer.name")),1),Te(o("input",{id:"friendly_name",name:"friendly_name","onUpdate:modelValue":H[3]||(H[3]=se=>t.friendly_name=se),required:"",maxlength:"60",placeholder:a(c)("editor.installer.name_placeholder"),autocomplete:"off"},null,8,I2),[[Xe,t.friendly_name]]),o("small",L2,[Me(d(a(c)("editor.installer.device_name"))+" ",1),o("code",M2,d(T.value),1),o("button",{type:"button",class:"btn link mini",id:"edit-node",onClick:H[4]||(H[4]=se=>{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",R2,[o("label",N2,d(a(c)("editor.installer.device_name")),1),Te(o("input",{id:"node-name",name:"name","onUpdate:modelValue":H[5]||(H[5]=se=>t.name=se),pattern:"[a-z][a-z0-9\\-]{0,29}",maxlength:"30",autocomplete:"off",onInput:H[6]||(H[6]=se=>n.nodeEdited=!0)},null,544),[[Xe,t.name]]),o("small",null,d(a(c)("editor.installer.device_name_hint")),1)])):B("",!0),S.value?(g(),_("fieldset",F2,[o("legend",null,d(a(c)("editor.installer.wifi.title")),1),o("p",D2,d(C.value),1),U.value.includes("wifi_ssid")?(g(),_("div",U2,[o("label",j2,d(a(c)("editor.installer.wifi.ssid")),1),Te(o("input",{id:"wifi_ssid",name:"wifi_ssid","onUpdate:modelValue":H[7]||(H[7]=se=>t.wifi_ssid=se),autocomplete:"off"},null,512),[[Xe,t.wifi_ssid]])])):B("",!0),U.value.includes("wifi_password")?(g(),_("div",H2,[o("label",V2,d(a(c)("editor.installer.wifi.password")),1),Te(o("input",{id:"wifi_password",name:"wifi_password",type:"password","onUpdate:modelValue":H[8]||(H[8]=se=>t.wifi_password=se),autocomplete:"new-password"},null,512),[[Xe,t.wifi_password]])])):B("",!0)])):B("",!0),o("div",W2,[o("label",B2,d(a(c)("editor.installer.install_via")),1),Te(o("select",{id:"install-target",name:"target","onUpdate:modelValue":H[9]||(H[9]=se=>t.target=se),onChange:H[10]||(H[10]=se=>{n.picked=!0,M()})},[k.value.length?B("",!0):(g(),_("option",K2,d(a(c)("editor.firmware.no_board")),1)),(g(!0),_(q,null,me(k.value,se=>(g(),_("option",{key:se,value:se},d(I(se)),9,z2))),128)),o("option",q2,d(a(c)("editor.firmware.download_target")),1),o("option",Y2,d(a(c)("editor.installer.later")),1)],544),[[Wn,t.target]]),o("small",G2,d(O.value),1)]),u.value?(g(),_("p",J2,d(u.value),1)):B("",!0),o("div",X2,[o("button",{type:"submit",class:"btn primary",id:"install-go",disabled:L.value},d(E.value),9,Z2),o("span",Q2,d(f.value),1)])],32)):(g(),_("div",ew,[o("div",tw,[te.value?(g(),_("span",nw)):(g(),_("span",{key:1,class:he(["outcome",ye.value?"ok":"bad"]),id:"progress-mark"},d(ye.value?"✓":"✕"),3)),o("strong",sw,d(ge.value),1)]),o("p",iw,d(we.value),1),ye.value&&re.value&&n.view!=="done"?(g(),_("div",ow,[o("a",{class:"btn primary",id:"download-firmware",href:Ge.value.href,download:Ge.value.name},d(a(c)("editor.firmware.download_file",{name:Ge.value.name})),9,lw),o("ol",aw,[o("li",null,[ie(ne,{keypath:"editor.installer.download_steps.plug",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.installer.download_steps.plug_bold")),1)]),_:1})]),o("li",null,[ie(ne,{keypath:"editor.installer.download_steps.open",scope:"global"},{bold:oe(()=>[o("b",null,[ie(ne,{keypath:"editor.installer.download_steps.open_bold",scope:"global"},{esphome_web:oe(()=>[o("a",{href:hw,target:"_blank",rel:"noopener"},"ESPHome Web")]),_:1})])]),_:1})]),o("li",null,[ie(ne,{keypath:n.board==="cyd"?"editor.installer.download_steps.install_cyd":"editor.installer.download_steps.install",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.installer.download_steps.install_bold")),1)]),file:oe(()=>[Me(d(Ge.value.name),1)]),_:1},8,["keypath"])])]),o("small",null,d(a(c)("editor.installer.download_keep")),1)])):B("",!0),ye.value?(g(),_("div",rw,[o("div",cw,[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:H[11]||(H[11]=se=>a(Lt)(n.apiKey||"",b.value))},d(a(c)("editor.common.copy")),1)]),o("ol",uw,[o("li",null,[ie(ne,{keypath:"editor.installer.pairing.ha",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.installer.pairing.ha_bold")),1)]),name:oe(()=>[Me(d(n.friendly),1)]),_:1}),H[17]||(H[17]=Me()),o("button",{type:"button",class:"btn quiet mini",onClick:H[12]||(H[12]=(...se)=>a(ki)&&a(ki)(...se))},d(a(c)("editor.common.open_integrations")),1)]),o("li",null,[ie(ne,{keypath:"editor.installer.pairing.key",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.installer.pairing.key_bold")),1)]),_:1})]),o("li",null,[ie(ne,{keypath:"editor.installer.pairing.actions",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.installer.pairing.actions_bold")),1)]),_:1})]),o("li",null,[ie(ne,{keypath:"editor.installer.pairing.tiles",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.installer.pairing.tiles_bold")),1)]),_:1})])])])):B("",!0),n.view!=="done"?(g(),_("details",{key:2,id:"install-log-wrap",class:"log-wrap",open:p.value,onToggle:H[13]||(H[13]=se=>p.value=se.target.open)},[o("summary",null,d(a(c)("editor.installer.log")),1),o("pre",fw,d(r.value.join(`
`)),1)],40,dw)):B("",!0),o("div",pw,[!te.value&&!ye.value?(g(),_("button",{key:0,type:"button",class:"btn primary",id:"install-retry",onClick:le},d(a(c)("editor.installer.retry")),1)):B("",!0),o("button",{type:"button",class:"btn quiet",id:"install-close",onClick:Z},d(ye.value?a(c)("editor.installer.another"):a(c)("editor.installer.start_over")),1),o("button",{type:"button",class:he(["btn",ye.value?"primary":"quiet"]),onClick:ue},d(ye.value?a(c)("editor.installer.done"):a(c)("editor.common.close")),3)])]))])}}}),bw={class:"panel",id:"firmware-dialog"},vw={class:"panel-head"},gw={class:"tx"},_w={class:"eyebrow"},yw={class:"card"},ww={class:"card-grid"},kw={class:"field"},$w={class:"f-label",for:"firmware-file"},xw=["value"],Sw={class:"field"},Cw={class:"f-label",for:"firmware-port"},Tw={value:"ota"},Ew={key:0,value:"usb"},Aw=["value"],Pw={value:"download"},Ow={key:0,class:"field",id:"firmware-host-label"},Iw={class:"f-label",for:"firmware-host"},Lw=["placeholder"],Mw={class:"actions"},Rw=["disabled"],Nw=["disabled"],Fw=["disabled"],Dw={key:0,class:"spin"},Uw={id:"firmware-status",class:"status-line",role:"status"},jw={key:0,id:"firmware-download",class:"card",style:{background:"var(--surface-2)"}},Hw=["href","download"],Vw={id:"firmware-log",class:"log"},Ww="https://web.esphome.io/?dashboard_install",Bw=Le({__name:"FirmwareView",setup(e){const t=$e(null),n=$e(""),s=$e("ota"),i=$e("");let l=0;async function r(T=!1){try{const k=await Ft("firmware");t.value=k,(T||!n.value)&&(n.value=k.profiles[0]?.file||"");const A=k.ports||[];s.value.startsWith("/")&&!A.includes(s.value)&&(s.value=A[0]||"usb"),s.value==="usb"&&A.length&&(s.value=A[0])}catch(k){Ce(k.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 I(T){try{await ft("firmware/jobs","POST",{file:n.value,action:T==="validate"?"validate":T==="build"?"build":s.value==="download"?"download":"install",target:s.value==="ota"?i.value.trim():s.value==="download"?"":s.value}),await r()}catch(k){Ce(k.message)}}return An(()=>{r(!0),l=window.setInterval(()=>r(),3e3)}),rs(()=>clearInterval(l)),(T,k)=>{const A=Ws("i18n-t");return g(),_("div",bw,[o("div",vw,[o("div",gw,[o("span",_w,d(a(c)("editor.nav.firmware")),1),o("h1",null,d(a(c)("editor.firmware.title")),1),ie(A,{keypath:"editor.firmware.intro",tag:"p",scope:"global"},{ota:oe(()=>[o("b",null,d(a(c)("editor.firmware.ota")),1)]),download:oe(()=>[o("b",null,d(a(c)("editor.firmware.download")),1)]),check:oe(()=>[o("b",null,d(a(c)("editor.firmware.check")),1)]),build:oe(()=>[o("b",null,d(a(c)("editor.firmware.build")),1)]),install:oe(()=>[o("b",null,d(a(c)("editor.firmware.install")),1)]),_:1})]),o("button",{type:"button",class:"btn quiet",id:"close-firmware",onClick:k[0]||(k[0]=S=>a(He)(""))},d(a(c)("editor.common.back")),1)]),o("div",yw,[o("div",ww,[o("div",kw,[o("label",$w,d(a(c)("editor.firmware.profile")),1),Te(o("select",{id:"firmware-file","onUpdate:modelValue":k[1]||(k[1]=S=>n.value=S)},[(g(!0),_(q,null,me(t.value?.profiles||[],S=>(g(),_("option",{key:S.file,value:S.file},d(S.file),9,xw))),128))],512),[[Wn,n.value]])]),o("div",Sw,[o("label",Cw,d(a(c)("editor.firmware.install_to")),1),Te(o("select",{id:"firmware-port","onUpdate:modelValue":k[2]||(k[2]=S=>s.value=S)},[o("option",Tw,d(a(c)("editor.firmware.ota")),1),p.value.length?B("",!0):(g(),_("option",Ew,d(a(c)("editor.firmware.no_board")),1)),(g(!0),_(q,null,me(p.value,S=>(g(),_("option",{key:S,value:S},d(S),9,Aw))),128)),o("option",Pw,d(a(c)("editor.firmware.download_target")),1)],512),[[Wn,s.value]])]),s.value==="ota"?(g(),_("div",Ow,[o("label",Iw,d(a(c)("editor.firmware.host")),1),Te(o("input",{id:"firmware-host","onUpdate:modelValue":k[3]||(k[3]=S=>i.value=S),placeholder:n.value?n.value.replace(/\.yaml$/,".local"):"screen-livingroom.local"},null,8,Lw),[[Xe,i.value]])])):B("",!0)]),o("div",Mw,[o("button",{type:"button",class:"btn quiet",id:"firmware-validate",disabled:f.value,onClick:k[4]||(k[4]=S=>I("validate"))},d(a(c)("editor.firmware.check")),9,Rw),o("button",{type:"button",class:"btn quiet",id:"firmware-build",disabled:f.value,onClick:k[5]||(k[5]=S=>I("build"))},d(a(c)("editor.firmware.build")),9,Nw),o("button",{type:"button",class:"btn primary",id:"firmware-install",disabled:h.value,onClick:k[6]||(k[6]=S=>I("install"))},d(s.value==="download"?a(c)("editor.firmware.build_download"):a(c)("editor.firmware.install")),9,Fw),u.value?(g(),_("span",Dw)):B("",!0)]),o("p",Uw,d(b.value),1),v.value?(g(),_("div",jw,[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,Hw),ie(A,{keypath:"editor.firmware.download_how",tag:"small",scope:"global"},{esphome_web:oe(()=>[o("a",{href:Ww,target:"_blank",rel:"noopener"},"ESPHome Web")]),_:1})])):B("",!0)]),o("pre",Vw,d((t.value?.logs||[]).join(`
`)),1)])}}}),Kw={class:"panel wide alerts",id:"alerts-dialog"},zw={class:"panel-head"},qw={class:"tx"},Yw={class:"eyebrow"},Gw={key:0,class:"hint"},Jw={class:"alert-hero"},Xw={class:"alert-mock",id:"alert-mock","aria-hidden":"true"},Zw={class:"mdi alert-mock-icon",id:"alert-mock-icon"},Qw={id:"alert-mock-title"},ek={id:"alert-mock-subtitle"},tk={class:"fake",id:"alert-mock-button"},nk=["aria-label"],sk=["data-jump","onClick"],ik={id:"alerts-try",class:"card"},ok={class:"field"},lk={class:"f-label",for:"try-screen"},ak={value:"all"},rk=["value","disabled"],ck={class:"field"},uk={class:"f-label",for:"try-title"},dk={class:"field"},fk={class:"f-label",for:"try-subtitle"},pk={class:"field"},hk={class:"f-label",for:"try-icon"},mk={id:"try-icons"},bk=["value"],vk={class:"field"},gk={class:"f-label",for:"try-color"},_k={value:""},yk=["value"],wk={class:"field"},kk={class:"f-label",for:"try-button"},$k={class:"field"},xk={class:"f-label",for:"try-timeout"},Sk={class:"check field"},Ck={class:"actions field wide"},Tk=["disabled"],Ek={class:"status-line",id:"try-result",role:"status"},Ak={id:"alerts-screens",class:"card"},Pk={id:"alerts-min-firmware"},Ok={id:"alerts-screen-list",class:"options"},Ik={key:0,class:"hint"},Lk={class:"alert-screen-head"},Mk={class:"copy-label"},Rk=["onClick"],Nk={id:"alerts-howto",class:"card"},Fk={class:"steps"},Dk={class:"field"},Uk={class:"f-label",for:"alerts-example-screen"},jk=["value"],Hk={key:0,value:""},Vk={class:"copy-line"},Wk={id:"alerts-example"},Bk={id:"alerts-all",class:"card"},Kk={id:"alerts-all-event"},zk={id:"alerts-all-dismiss"},qk={class:"copy-line"},Yk={id:"alerts-all-example"},Gk={id:"alerts-fields",class:"card"},Jk={class:"table-scroll"},Xk={id:"alerts-field-table"},Zk={key:0},Qk={id:"alerts-icons",class:"card"},e3={class:"subhead"},t3={class:"chips",id:"alerts-suggested"},n3=["onClick"],s3={class:"mdi"},i3={class:"field"},o3={class:"f-label",for:"alerts-icon-search"},l3=["placeholder"],a3={id:"alerts-icon-groups"},r3={class:"subhead"},c3={class:"alert-icon-grid"},u3=["title","onClick"],d3={class:"mdi"},f3={key:0},p3={key:0,class:"hint"},h3={id:"alerts-colors",class:"card"},m3={class:"swatches",id:"alerts-swatches"},b3=["onClick"],v3={id:"alerts-behaviour",class:"card"},g3={class:"alerts-list"},_3={id:"alerts-events",class:"card"},y3={id:"alerts-event-name"},w3={class:"table-scroll"},k3={id:"alerts-ending-table"},$3={class:"subhead"},x3={class:"copy-line"},S3={id:"alerts-wait-example"},C3={id:"alerts-tips",class:"card"},T3={class:"alerts-list"},E3=Le({__name:"AlertsView",setup(e){const t=$(()=>m.inventory.alerts),n=qn({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=$e(!1),i=$e(""),l=$(()=>m.inventory.screens.filter(R=>zn(R)&&R.online));async function r(){s.value=!0,i.value="";try{const{screen:R,...L}=n,D=await Om(R,L),M=m.inventory.screens.find(te=>te.id===R)?.name,Y=R==="all"?c("editor.alerts.try.sent_all",D.sent):M?c("editor.alerts.try.sent_to",{name:M}):c("editor.alerts.try.sent_one");i.value=D.sent?[Y,D.skipped?c("editor.alerts.try.skipped",D.skipped):"",D.unusable?.length?c("editor.alerts.try.left_empty",{fields:D.unusable.join(", ")}):""].filter(Boolean).join(" "):c("editor.alerts.try.nothing",{version:t.value?.min_firmware||"0.2.31"})}catch(R){i.value=R.message}finally{s.value=!1}}const u=$(()=>m.inventory.icons),f=$e(""),h=$e(""),p=R=>`"${String(R).replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,b=R=>R.type==="string"?/^[a-z][a-z0-9-]*$/.test(R.example)?R.example:p(R.example):R.example===!0?"true":R.example===!1?"false":String(R.example),v=$(()=>m.inventory.screens.filter(R=>R.alert_action)),y=$(()=>f.value||v.value[0]?.alert_action||""),I=$(()=>{const R=(t.value?.fields||[]).map(L=>` ${L.name}: ${b(L)}`);return`action: ${y.value||"esphome.<device_name>_show_alert"}
data:
${R.join(`
`)}`}),T=(R,L)=>p((t.value?.fields||[]).find(D=>D.name===R)?.example||L),k=$(()=>[`# ${c("editor.alerts.wait_yaml.comment")}`,"actions:",` - action: ${y.value||"esphome.<device_name>_show_alert"}`," data:",` title: ${T("title","Someone is at the door")}`,` subtitle: ${T("subtitle","Door 3, back")}`," icon: doorbell"," color: orange",` button_text: ${T("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: ${p(c("editor.alerts.wait_yaml.message"))}`].join(`
`)),A=$(()=>{const R=(t.value?.fields||[]).map(D=>` ${D.name}: ${b(D)}`),L=t.value?.camera;return L&&R.push(` # ${L.name}: ${L.example} # a Guition shows its picture on the card`),`event: ${t.value?.broadcast?.show||"esp_screens_show_alert"}
event_data:
${R.join(`
`)}`}),S=$(()=>{if(!t.value||!u.value)return[];const R=h.value.trim().toLowerCase();return[...u.value.groups,{label:c("editor.alerts.icons.extra"),icons:t.value.extra_icons}].map(D=>({label:D.label,icons:D.icons.filter(M=>!R||M.name.includes(R)||(M.label||"").toLowerCase().includes(R))})).filter(D=>D.icons.length)}),U=$(()=>t.value?.suggested_icons?.find(R=>R.name==="doorbell")),C=$(()=>t.value?.colors?.find(R=>R.name==="orange")),K=R=>["string","int","bool"].includes(R)?c(`editor.alerts.fields.types.${R}`):R;function O(R){document.getElementById(R)?.scrollIntoView({behavior:"smooth",block:"start"})}const E=["alerts-try","alerts-screens","alerts-howto","alerts-all","alerts-fields","alerts-icons","alerts-colors","alerts-behaviour","alerts-events","alerts-tips"];return(R,L)=>{const D=Ws("i18n-t");return g(),_("div",Kw,[o("div",zw,[o("div",qw,[o("span",Yw,d(a(c)("editor.alerts.eyebrow")),1),o("h1",null,d(a(c)("editor.alerts.title")),1),ie(D,{keypath:"editor.alerts.intro",tag:"p",scope:"global"},{action:oe(()=>[...L[15]||(L[15]=[o("code",null,"show_alert",-1)])]),_:1})]),o("button",{type:"button",class:"btn quiet",id:"close-alerts",onClick:L[0]||(L[0]=M=>a(He)(""))},d(a(c)("editor.common.back")),1)]),t.value?(g(),_(q,{key:1},[o("div",Jw,[o("div",Xw,[o("div",{class:"alert-mock-card",style:Ue(C.value?{background:C.value.color}:void 0)},[o("span",Zw,d(U.value?a(Ae)(U.value.cp):""),1),o("strong",Qw,d(a(c)("editor.alerts.example.title")),1),o("span",ek,d(a(c)("editor.alerts.example.subtitle")),1),o("span",tk,d(a(c)("editor.alerts.example.button")),1)],4)]),o("nav",{class:"alerts-nav","aria-label":a(c)("editor.alerts.sections")},[(g(),_(q,null,me(E,M=>o("button",{key:M,type:"button","data-jump":M,onClick:Y=>O(M)},d(a(c)(`editor.alerts.nav.${M.slice(7)}`)),9,sk)),64))],8,nk)]),o("section",ik,[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:Ot(r,["prevent"])},[o("div",ok,[o("label",lk,d(a(c)("editor.alerts.try.screen")),1),Te(o("select",{id:"try-screen","onUpdate:modelValue":L[1]||(L[1]=M=>n.screen=M)},[o("option",ak,d(a(c)("editor.alerts.try.all",{ready:l.value.length})),1),(g(!0),_(q,null,me(a(m).inventory.screens,M=>(g(),_("option",{key:M.id,value:M.id,disabled:!a(zn)(M)||!M.online},d(a(zn)(M)&&M.online?M.name:a(c)("editor.alerts.try.not_ready",{name:M.name})),9,rk))),128))],512),[[Wn,n.screen]])]),o("div",ck,[o("label",uk,d(a(c)("editor.alerts.try.title")),1),Te(o("input",{id:"try-title","onUpdate:modelValue":L[2]||(L[2]=M=>n.title=M),maxlength:"64"},null,512),[[Xe,n.title]])]),o("div",dk,[o("label",fk,d(a(c)("editor.alerts.try.subtitle")),1),Te(o("input",{id:"try-subtitle","onUpdate:modelValue":L[3]||(L[3]=M=>n.subtitle=M),maxlength:"240"},null,512),[[Xe,n.subtitle]])]),o("div",pk,[o("label",hk,d(a(c)("editor.alerts.try.icon")),1),Te(o("input",{id:"try-icon","onUpdate:modelValue":L[4]||(L[4]=M=>n.icon=M),list:"try-icons",placeholder:"doorbell"},null,512),[[Xe,n.icon]]),o("datalist",mk,[(g(!0),_(q,null,me(t.value.suggested_icons,M=>(g(),_("option",{key:M.name,value:M.name},d(M.label||M.name),9,bk))),128))])]),o("div",vk,[o("label",gk,d(a(c)("editor.alerts.try.color")),1),Te(o("select",{id:"try-color","onUpdate:modelValue":L[5]||(L[5]=M=>n.color=M)},[o("option",_k,d(a(c)("editor.alerts.white")),1),(g(!0),_(q,null,me(t.value.colors,M=>(g(),_("option",{key:M.name,value:M.name},d(M.label),9,yk))),128))],512),[[Wn,n.color]])]),o("div",wk,[o("label",kk,d(a(c)("editor.alerts.try.button")),1),Te(o("input",{id:"try-button","onUpdate:modelValue":L[6]||(L[6]=M=>n.button_text=M),maxlength:"16"},null,512),[[Xe,n.button_text]])]),o("div",$k,[o("label",xk,d(a(c)("editor.alerts.try.timeout")),1),Te(o("input",{id:"try-timeout","onUpdate:modelValue":L[7]||(L[7]=M=>n.timeout=M),type:"number",min:"0",max:"86400"},null,512),[[Xe,n.timeout,void 0,{number:!0}]])]),o("label",Sk,[Te(o("input",{type:"checkbox",id:"try-flash","onUpdate:modelValue":L[8]||(L[8]=M=>n.flash=M)},null,512),[[Qf,n.flash]]),o("span",null,[Me(d(a(c)("editor.alerts.try.flash")),1),o("small",null,d(a(c)("editor.alerts.try.flash_hint")),1)])]),o("div",Ck,[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,Tk),o("span",Ek,d(i.value),1)])],32)]),o("section",Ak,[o("h2",null,d(a(c)("editor.alerts.nav.screens")),1),ie(D,{keypath:"editor.alerts.screens.text",tag:"p",scope:"global"},{version:oe(()=>[o("code",Pk,d(t.value.min_firmware),1)]),_:1}),o("div",Ok,[a(m).inventory.screens.length?B("",!0):(g(),_("p",Ik,d(a(c)("editor.alerts.screens.none")),1)),(g(!0),_(q,null,me(a(m).inventory.screens,M=>(g(),_("div",{key:M.id,class:"alert-screen"},[o("div",Lk,[o("strong",null,d(M.name),1),o("span",{class:he(["chip",a(pn)(a(ls)(M),t.value.min_firmware)&&M.alert_action?"good":"update"])},d(a(pn)(a(ls)(M),t.value.min_firmware)&&M.alert_action?a(c)("editor.alerts.screens.ready",{version:M.firmware}):M.alert_action?a(c)("editor.alerts.screens.update",{version:M.firmware||a(c)("editor.common.unknown")}):a(c)("editor.alerts.screens.unknown")),3)]),(g(!0),_(q,null,me([[a(c)("editor.alerts.screens.show"),M.alert_action],[a(c)("editor.alerts.screens.dismiss"),M.dismiss_action]],([Y,te])=>(g(),_("div",{key:Y,class:"copy-line"},[o("span",Mk,d(Y),1),o("code",null,d(te||"esphome.<device_name>_show_alert"),1),te?(g(),_("button",{key:0,type:"button",class:"btn quiet mini",onClick:ye=>a(Lt)(te,void 0,"action_name")},d(a(c)("editor.common.copy")),9,Rk)):B("",!0)]))),128))]))),128))])]),o("section",Nk,[o("h2",null,d(a(c)("editor.alerts.nav.howto")),1),o("ol",Fk,[ie(D,{keypath:"editor.alerts.howto.add",tag:"li",scope:"global"},{add:oe(()=>[o("b",null,d(a(c)("editor.alerts.howto.add_bold")),1)]),esphome:oe(()=>[...L[16]||(L[16]=[o("b",null,"ESPHome",-1)])]),device:oe(()=>[o("i",null,d(a(c)("editor.alerts.howto.device")),1)]),_:1}),ie(D,{keypath:"editor.alerts.howto.fields",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.howto.fields_bold")),1)]),empty:oe(()=>[...L[17]||(L[17]=[o("code",null,'""',-1)])]),zero:oe(()=>[...L[18]||(L[18]=[o("code",null,"0",-1)])]),_:1}),ie(D,{keypath:"editor.alerts.howto.yaml",tag:"li",scope:"global"},{edit:oe(()=>[o("b",null,d(a(c)("editor.alerts.edit_yaml")),1)]),_:1})]),o("div",Dk,[o("label",Uk,d(a(c)("editor.alerts.howto.example_for")),1),Te(o("select",{id:"alerts-example-screen","onUpdate:modelValue":L[9]||(L[9]=M=>f.value=M),style:{"max-width":"360px"}},[(g(!0),_(q,null,me(v.value,M=>(g(),_("option",{key:M.id,value:M.alert_action},d(M.name),9,jk))),128)),v.value.length?B("",!0):(g(),_("option",Hk,d(a(c)("editor.alerts.howto.no_screen")),1))],512),[[Wn,f.value]])]),o("div",Vk,[o("pre",Wk,d(I.value),1),o("button",{type:"button",class:"btn quiet mini",id:"alerts-example-copy",onClick:L[10]||(L[10]=M=>a(Lt)(I.value,void 0,"yaml"))},d(a(c)("editor.alerts.copy_yaml")),1)])]),o("section",Bk,[o("h2",null,d(a(c)("editor.alerts.all.title")),1),ie(D,{keypath:"editor.alerts.all.text",tag:"p",scope:"global"},{show:oe(()=>[o("code",Kk,d(t.value.broadcast?.show||"esp_screens_show_alert"),1)]),dismiss:oe(()=>[o("code",zk,d(t.value.broadcast?.dismiss||"esp_screens_dismiss_alert"),1)]),event:oe(()=>[o("b",null,d(a(c)("editor.alerts.all.event")),1)]),edit:oe(()=>[o("b",null,d(a(c)("editor.alerts.edit_yaml")),1)]),_:1}),o("div",qk,[o("pre",Yk,d(A.value),1),o("button",{type:"button",class:"btn quiet mini",id:"alerts-all-copy",onClick:L[11]||(L[11]=M=>a(Lt)(A.value,void 0,"yaml"))},d(a(c)("editor.alerts.copy_yaml")),1)])]),o("section",Gk,[o("h2",null,d(a(c)("editor.alerts.nav.fields")),1),o("p",null,d(a(c)("editor.alerts.fields.text")),1),o("div",Jk,[o("table",Xk,[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),_(q,null,me(t.value.fields,M=>(g(),_("tr",{key:M.name},[o("td",null,[o("code",null,d(M.name),1),o("small",null,d(M.label),1)]),o("td",null,d(K(M.type)),1),o("td",null,d(M.help),1),o("td",null,[o("code",null,d(typeof M.example=="string"?M.example:String(M.example)),1)]),o("td",null,d(t.value.limits.cyd[M.name]?a(c)("editor.alerts.fields.bytes",{cyd:t.value.limits.cyd[M.name],guition:t.value.limits.guition[M.name]}):M.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)])):B("",!0)])])]),o("section",Qk,[o("h2",null,d(a(c)("editor.alerts.nav.icons")),1),ie(D,{keypath:"editor.alerts.icons.text",tag:"p",scope:"global"},{field:oe(()=>[...L[19]||(L[19]=[o("code",null,"icon",-1)])]),example:oe(()=>[...L[20]||(L[20]=[o("code",null,"doorbell",-1)])]),mdi:oe(()=>[...L[21]||(L[21]=[o("code",null,"mdi:doorbell",-1)])]),hex:oe(()=>[...L[22]||(L[22]=[o("code",null,"F12E6",-1)])]),_:1}),o("p",e3,d(a(c)("editor.alerts.icons.handy")),1),o("div",t3,[(g(!0),_(q,null,me(t.value.suggested_icons,M=>(g(),_("button",{key:M.name,type:"button",class:"chip",onClick:Y=>a(Lt)(M.name,void 0,"icon_name")},[o("span",s3,d(a(Ae)(M.cp)),1),o("code",null,d(M.name),1)],8,n3))),128))]),o("div",i3,[o("label",o3,d(a(c)("editor.alerts.icons.search_label")),1),Te(o("input",{id:"alerts-icon-search","onUpdate:modelValue":L[12]||(L[12]=M=>h.value=M),type:"search",placeholder:a(c)("editor.alerts.icons.search"),autocomplete:"off"},null,8,l3),[[Xe,h.value]])]),o("div",a3,[(g(!0),_(q,null,me(S.value,M=>(g(),_("div",{key:M.label,class:"field"},[o("p",r3,d(M.label)+" · "+d(M.icons.length),1),o("div",c3,[(g(!0),_(q,null,me(M.icons,Y=>(g(),_("button",{key:Y.name,type:"button",class:"alert-icon",title:a(c)("editor.alerts.icons.copy",{name:Y.name}),onClick:te=>a(Lt)(Y.name,void 0,"icon_name")},[o("span",d3,d(a(Ae)(Y.cp)),1),o("code",null,d(Y.name),1),Y.label?(g(),_("small",f3,d(Y.label),1)):B("",!0)],8,u3))),128))])]))),128)),S.value.length?B("",!0):(g(),_("p",p3,d(a(c)("editor.alerts.icons.none",{query:h.value,fallback:t.value.fallback_icon})),1))])]),o("section",h3,[o("h2",null,d(a(c)("editor.alerts.nav.colors")),1),ie(D,{keypath:"editor.alerts.colors.text",tag:"p",scope:"global"},{field:oe(()=>[...L[23]||(L[23]=[o("code",null,"color",-1)])]),_:1}),o("div",m3,[o("button",{type:"button",class:"swatch",onClick:L[13]||(L[13]=M=>a(Lt)("",void 0,"empty_color"))},[L[25]||(L[25]=o("i",{style:{background:"#ffffff"}},null,-1)),o("span",null,[L[24]||(L[24]=o("code",null,"empty",-1)),o("small",null,d(a(c)("editor.alerts.white")),1)])]),(g(!0),_(q,null,me(t.value.colors,M=>(g(),_("button",{key:M.name,type:"button",class:"swatch",onClick:Y=>a(Lt)(M.name,void 0,"color_name")},[o("i",{style:Ue({background:M.color})},null,4),o("span",null,[o("code",null,d(M.name),1),o("small",null,d(M.label)+" · "+d(M.color),1)])],8,b3))),128))])]),o("section",v3,[o("h2",null,d(a(c)("editor.alerts.nav.behaviour")),1),o("ul",g3,[ie(D,{keypath:"editor.alerts.behaviour.wakes",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.wakes_bold")),1)]),_:1}),ie(D,{keypath:"editor.alerts.behaviour.on",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.on_bold")),1)]),_:1}),ie(D,{keypath:"editor.alerts.behaviour.timeout",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.timeout_bold")),1)]),zero:oe(()=>[...L[26]||(L[26]=[o("code",null,"timeout: 0",-1)])]),minute:oe(()=>[...L[27]||(L[27]=[o("code",null,"timeout: 60",-1)])]),_:1}),ie(D,{keypath:"editor.alerts.behaviour.blinking",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.blinking_bold")),1)]),flash:oe(()=>[...L[28]||(L[28]=[o("code",null,"flash: true",-1)])]),_:1}),ie(D,{keypath:"editor.alerts.behaviour.replacing",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.replacing_bold")),1)]),replaced:oe(()=>[...L[29]||(L[29]=[o("code",null,"replaced",-1)])]),_:1}),ie(D,{keypath:"editor.alerts.behaviour.closing",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.closing_bold")),1)]),dismiss:oe(()=>[...L[30]||(L[30]=[o("code",null,"dismiss_alert",-1)])]),_:1}),ie(D,{keypath:"editor.alerts.behaviour.beside",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.behaviour.beside_bold")),1)]),_:1})])]),o("section",_3,[o("h2",null,d(a(c)("editor.alerts.nav.events")),1),ie(D,{keypath:"editor.alerts.events.text",tag:"p",scope:"global"},{event:oe(()=>[o("code",y3,d(t.value.event),1)]),action:oe(()=>[...L[31]||(L[31]=[o("code",null,"action",-1)])]),title:oe(()=>[...L[32]||(L[32]=[o("code",null,"title",-1)])]),screen:oe(()=>[...L[33]||(L[33]=[o("code",null,"screen",-1)])]),device_id:oe(()=>[...L[34]||(L[34]=[o("code",null,"device_id",-1)])]),_:1}),o("div",w3,[o("table",k3,[o("tr",null,[L[35]||(L[35]=o("th",null,"action",-1)),o("th",null,d(a(c)("editor.alerts.events.when")),1)]),(g(!0),_(q,null,me(t.value.endings,M=>(g(),_("tr",{key:M.action},[o("td",null,[o("code",null,d(M.action),1)]),o("td",null,d(M.label),1)]))),128))])]),o("p",$3,d(a(c)("editor.alerts.events.wait")),1),o("div",x3,[o("pre",S3,d(k.value),1),o("button",{type:"button",class:"btn quiet mini",id:"alerts-wait-copy",onClick:L[14]||(L[14]=M=>a(Lt)(k.value,void 0,"yaml"))},d(a(c)("editor.alerts.copy_yaml")),1)])]),o("section",C3,[o("h2",null,d(a(c)("editor.alerts.nav.tips")),1),o("ul",T3,[ie(D,{keypath:"editor.alerts.tips.color",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.tips.color_bold")),1)]),_:1}),ie(D,{keypath:"editor.alerts.tips.short",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.tips.short_bold")),1)]),_:1}),ie(D,{keypath:"editor.alerts.tips.button",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.tips.button_bold")),1)]),_:1}),ie(D,{keypath:"editor.alerts.tips.resolve",tag:"li",scope:"global"},{dismiss:oe(()=>[...L[36]||(L[36]=[o("code",null,"dismiss_alert",-1)])]),_:1}),ie(D,{keypath:"editor.alerts.tips.every",tag:"li",scope:"global"},{event:oe(()=>[o("code",null,d(t.value.broadcast?.show||"esp_screens_show_alert"),1)]),screen:oe(()=>[...L[37]||(L[37]=[o("code",null,"screen",-1)])]),_:1}),ie(D,{keypath:"editor.alerts.tips.claude",tag:"li",scope:"global"},{bold:oe(()=>[o("b",null,d(a(c)("editor.alerts.tips.claude_bold")),1)]),_:1})])])],64)):(g(),_("p",Gw,d(a(c)("editor.alerts.loading")),1))])}}}),A3={class:"panel",id:"override-dialog"},P3={class:"panel-head"},O3={class:"tx"},I3={class:"eyebrow"},L3={id:"override-title"},M3={class:"notice"},R3={class:"mdi"},N3={class:"file-row"},F3={id:"override-file"},D3={class:"yaml-editor",id:"yaml-editor-wrap"},U3=["aria-label"],j3={class:"actions"},H3={id:"override-count",class:"hint"},V3={class:"actions"},W3=["disabled"],B3=["disabled"],K3=`# 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
`,z3=Le({__name:"OverrideView",setup(e){const t=$(()=>m.overrideProfile),n=$e(""),s=$e(""),i=$e(!1),l=$e(c("editor.common.loading")),r=$e(""),u=$e(!1),f=$e(null),h=$e(null),p=$(()=>n.value.split(`
`).length),b=$(()=>Array.from({length:p.value},(O,E)=>E+1).join(`
`)),v=$(()=>`${c("editor.override.characters",n.value.length)} · ${c("editor.override.lines",p.value)}`);let y=!0;function I(O,E=""){l.value=O,r.value=E}async function T(){if(!t.value){I(c("editor.override.no_profile"),"error");return}I(c("editor.common.loading"));try{const O=await Ft(`firmware/profiles/${encodeURIComponent(t.value)}/override`);s.value=O.override_file,i.value=!!O.attached,n.value=O.exists&&O.content!==`{}
`?O.content:"",I(c(O.attached?"editor.override.attached":"editor.override.not_attached"))}catch(O){I(O.message,"error")}}async function k(O=!1){if(!(!t.value||u.value)){u.value=!0,I(c("editor.override.saving"));try{const E=await ft(`firmware/profiles/${encodeURIComponent(t.value)}/override`,"PUT",{content:n.value});if(s.value=E.override_file,i.value=!0,!O){I(c("editor.override.saved"),"ok"),Ce(c("editor.override.saved_toast"));return}I(c("editor.override.checking")),await ft("firmware/jobs","POST",{file:t.value,action:"validate"}),A()}catch(E){I(E.message,"error")}finally{u.value=!1}}}function A(){const O=Date.now(),E=t.value,R=async()=>{if(!(!y||t.value!==E))try{const L=await Ft("firmware"),D=L.job;if(D&&D.file===E&&D.state==="running")I(D.stage?c("editor.override.checking_stage",{stage:D.stage}):c("editor.override.checking_profile"));else if(D&&D.file===E&&D.state==="success"){I(c("editor.override.valid"),"ok");return}else if(D&&D.file===E&&D.state==="failed"){const M=(L.logs||[]).filter(Y=>/error|failed/i.test(Y)).pop();I(M||c("editor.override.rejected"),"error");return}Date.now()-O<72e5&&setTimeout(R,1200)}catch(L){I(L.message,"error")}};R()}function S(){(!n.value.trim()||confirm(c("editor.override.confirm_example")))&&(n.value=K3,I(c("editor.override.example_loaded")),f.value?.focus())}function U(){(!n.value.trim()||confirm(c("editor.override.confirm_clear")))&&(n.value="",I(c("editor.override.cleared")),f.value?.focus())}function C(O){const E=f.value;if(O.key==="Tab"){O.preventDefault();const R=E.selectionStart,L=E.selectionEnd;E.setRangeText(" ",R,L,"end"),n.value=E.value}else(O.ctrlKey||O.metaKey)&&O.key.toLowerCase()==="s"&&(O.preventDefault(),k(!1))}function K(){h.value&&f.value&&(h.value.scrollTop=f.value.scrollTop)}return An(T),rs(()=>{y=!1}),(O,E)=>(g(),_("div",A3,[o("div",P3,[o("div",O3,[o("span",I3,d(a(c)("editor.override.eyebrow")),1),o("h1",L3,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:E[0]||(E[0]=R=>a(He)(""))},d(a(c)("editor.common.back")),1)]),o("div",M3,[o("span",R3,d(a(Ae)("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",N3,[o("code",F3,d(s.value||t.value||""),1),o("span",{id:"override-state",class:he(["chip",{good:i.value}])},d(i.value?a(c)("editor.override.active"):a(c)("editor.override.ready")),3)]),o("div",D3,[o("div",{ref_key:"gutter",ref:h,class:"yaml-gutter",id:"override-gutter","aria-hidden":"true"},d(b.value),513),Te(o("textarea",{ref_key:"editor",ref:f,id:"override-editor","onUpdate:modelValue":E[1]||(E[1]=R=>n.value=R),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:C,onScroll:K},null,40,U3),[[Xe,n.value]])]),o("div",j3,[o("button",{type:"button",class:"btn quiet mini",id:"override-example",onClick:S},d(a(c)("editor.override.use_example")),1),o("button",{type:"button",class:"btn quiet mini",id:"override-empty",onClick:U},d(a(c)("editor.override.clear")),1),o("span",H3,d(v.value),1)]),o("p",{id:"override-status",class:he(["status-line",r.value]),role:"status"},d(l.value),3),o("div",V3,[o("button",{type:"button",class:"btn quiet",id:"override-check",disabled:u.value||!t.value,onClick:E[2]||(E[2]=R=>k(!0))},d(a(c)("editor.override.save_check")),9,W3),o("button",{type:"button",class:"btn primary",id:"override-save",disabled:u.value||!t.value,onClick:E[3]||(E[3]=R=>k(!1))},d(a(c)("editor.override.save")),9,B3)])]))}}),q3={class:"main"},Y3=Le({__name:"App",setup(e){const t=$(()=>xt.value==="#settings"?g2:xt.value==="#new-screen"?mw:xt.value==="#firmware"?Bw:xt.value==="#alerts"?E3:xt.value==="#override"?z3:ht.value&&m.layout?y1:$1);function n(s){(s.metaKey||s.ctrlKey)&&s.key.toLowerCase()==="k"&&(s.preventDefault(),m.palette=!m.palette)}return An(()=>document.addEventListener("keydown",n)),rs(()=>document.removeEventListener("keydown",n)),(s,i)=>(g(),_("div",{class:he(["app",{dragging:a(m).drag.active}])},[ie(Mb),o("main",q3,[(g(),it(Wd(t.value)))]),ie(Nb),ie(Yb)],2))}});Zh().finally(()=>{lp(Y3).use(cs).mount("#app"),Zm()});