diff --git a/dist/scheduler-card.js b/dist/scheduler-card.js index fcefdff8..d85ba9cf 100644 --- a/dist/scheduler-card.js +++ b/dist/scheduler-card.js @@ -184,7 +184,7 @@ const Z=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShad * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ -(window.litElementVersions||(window.litElementVersions=[])).push("2.4.0");const re={};class ie extends G{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const e=this.getStyles();if(Array.isArray(e)){const t=(e,r)=>e.reduceRight((e,r)=>Array.isArray(r)?t(r,e):(e.add(r),e),r),r=t(e,new Set),i=[];r.forEach(e=>i.unshift(e)),this._styles=i}else this._styles=void 0===e?[]:[e];this._styles=this._styles.map(e=>{if(e instanceof CSSStyleSheet&&!Z){const t=Array.prototype.slice.call(e.cssRules).reduce((e,t)=>e+t.cssText,"");return new ee(String(t),X)}return e})}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?Z?this.renderRoot.adoptedStyleSheets=e.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map(e=>e.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(e){const t=this.render();super.update(e),t!==re&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(e=>{const t=document.createElement("style");t.textContent=e.cssText,this.renderRoot.appendChild(t)}))}render(){return re}}ie.finalized=!0,ie.render=(e,t,r)=>{if(!r||"object"!=typeof r||!r.scopeName)throw new Error("The `scopeName` option is required.");const s=r.scopeName,a=R.has(t),n=L&&11===t.nodeType&&!!t.host,o=n&&!q.has(s),c=o?document.createDocumentFragment():t;if(((e,t,r)=>{let s=R.get(t);void 0===s&&(i(t,t.firstChild),R.set(t,s=new $(Object.assign({templateFactory:T},r))),s.appendInto(t)),s.setValue(e),s.commit()})(e,c,Object.assign({templateFactory:V(s)},r)),o){const e=R.get(c);R.delete(c);const r=e.value instanceof _?e.value.template:void 0;H(s,c,r),i(t,t.firstChild),t.appendChild(c),R.set(t,e)}!a&&n&&window.ShadyCSS.styleElement(t.host)};var se=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,ae="[^\\s]+",ne=/\[([^]*?)\]/gm;function oe(e,t){for(var r=[],i=0,s=e.length;i-1?i:null}};function le(e){for(var t=[],r=1;r3?0:(e-e%10!=10?1:0)*e%10]}},me=le({},pe),ve=function(e,t){for(void 0===t&&(t=2),e=String(e);e.length0?"-":"+")+ve(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+ve(Math.floor(Math.abs(t)/60),2)+":"+ve(Math.abs(t)%60,2)}},ge=function(e){return+e-1},ye=[null,"[1-9]\\d?"],_e=[null,ae],be=["isPm",ae,function(e,t){var r=e.toLowerCase();return r===t.amPm[0]?0:r===t.amPm[1]?1:null}],we=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var t=(e+"").match(/([+-]|\d\d)/gi);if(t){var r=60*+t[1]+parseInt(t[2],10);return"+"===t[0]?r:-r}return 0}],Ee=(ce("monthNamesShort"),ce("monthNames"),{default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"});var Pe=function(e,t,r){if(void 0===t&&(t=Ee.default),void 0===r&&(r={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var i=[];t=(t=Ee[t]||t).replace(ne,(function(e,t){return i.push(t),"@@@"}));var s=le(le({},me),r);return(t=t.replace(se,(function(t){return fe[t](e,s)}))).replace(/@@@/g,(function(){return i.shift()}))};(function(){try{(new Date).toLocaleDateString("i")}catch(e){return"RangeError"===e.name}})(),function(){try{(new Date).toLocaleString("i")}catch(e){return"RangeError"===e.name}}(),function(){try{(new Date).toLocaleTimeString("i")}catch(e){return"RangeError"===e.name}}();function Se(e){return e.substr(0,e.indexOf("."))}function ke(e){return e.substr(e.indexOf(".")+1)}var xe,$e,Oe,je=function(e,t,r,i){i=i||{},r=null==r?{}:r;var s=new Event(t,{bubbles:void 0===i.bubbles||i.bubbles,cancelable:Boolean(i.cancelable),composed:void 0===i.composed||i.composed});return s.detail=r,e.dispatchEvent(s),s};!function(e){e.Level="LEVEL",e.List="LIST"}(xe||(xe={})),function(e){e.Equal="is",e.Unequal="not",e.Below="below",e.Above="above"}($e||($e={})),function(e){e.Any="or",e.All="and"}(Oe||(Oe={}));var Ce={add:"přidat plán",cancel:"zrušit",next:"další",save:"uložit",delete:"smazat"},De={no_group_selected:"Vyberte skupinu",no_entity_selected:"Vyberte entitu",no_groups_defined:"Nejsou definovány žádné skupiny",no_entities_for_group:"V této skupině nejsou žádné entity",no_actions_for_entity:"Pro tuto entitu neexistují žádné akce",no_entries_defined:"Nejsou žádné položky k zobrazení"},ze={group:"Skupiny",entity:"Entity",action:"Akce",days:"Dny",time:"Čas",options:"Možnosti",day_type_daily:"denně",day_type_workday:"pracovní dny",day_type_weekend:"víkend",day_type_custom:"možnosti"},Ae={mon:"po",tue:"út",wed:"st",thu:"čt",fri:"pá",sat:"so",sun:"ne"},Te={mon:"Pondělí",tue:"Úterý",wed:"Středa",thu:"Čtvrtek",fri:"Pátek",sat:"Sobota",sun:"Neděle"},Ne={and:"a",before:"před",after:"po"},Re={turn_on:"zapnout",turn_on_brightness:"zapnout {at brightness}",turn_off:"vypnout",close_cover:"zavřít",open_cover:"otevřít",set_temperature:"nastavená teplota {to temperature}",set_temperature_hvac_mode_heat:"topení {to temperature}",set_temperature_hvac_mode_cool:"chlazení {to temperature}",set_cover_position:"nastavit pozici {to position}",set_hvac_mode:"nastavit režim {to hvac_mode}",set_hvac_mode_hvac_mode_off:"vypnout",set_preset_mode:"předvolba {to preset_mode}",set_value:"nastavená hodnota {to value}",select_option:"vyberte možnost {option}",select_source:"vyberte zdroj {source}",start:"start",run_script:"běží"},Fe={brightness:"jas",temperature:"teplota",position:"pozice",hvac_mode:"režim",preset_mode:"přednastavení"},Ie={camera:"kamery",climate:"klima",cover:"kryty",fan:"ventilátory",group:"skupiny",input_boolean:"input_boolean",input_number:"input_number",input_select:"input_select",light:"světla",media_player:"media přehrávače",scene:"scény",switch:"spínače",vacuum:"vysavače"},Me={tomorrow:"zítra",daily:"denně",daily_except_days:"každý den kromě {days}",working_days:"pracovní dny",weekend:"víkend",interval:"{startDay} do {endDay}"},Le={absolute:"o {time}",relative:"za {time}",interval:"od {startTime} do {endTime}",seconds:"{seconds} vteřin",hour:"1 hodina",hours:"{hours} hodin",minute:"1 minuta",minutes:"{minutes} minut",now:"nyní",midnight:"půlnoc",noon:"poledne",at_sun_event:"při {sunEvent}",sun_event_sunrise:"svítání",sun_event_sunset:"západu slunce"},Ve={one_additional_task:"1 další úkol",x_additional_tasks:"{count} úkolů"},Ue={scheduler:"Plánovač",actions:Ce,instructions:De,fields:ze,days_short:Ae,days_long:Te,words:Ne,services:Re,service_parameters:Fe,domains:Ie,days:Me,time:Le,misc:Ve},qe=Object.freeze({__proto__:null,scheduler:"Plánovač",actions:Ce,instructions:De,fields:ze,days_short:Ae,days_long:Te,words:Ne,services:Re,service_parameters:Fe,domains:Ie,days:Me,time:Le,misc:Ve,default:Ue}),He={add:"hinzufügen",cancel:"abbrechen",next:"weiter",save:"speichern",delete:"löschen"},Qe={no_group_selected:"Wähle zuerst eine Gruppe aus",no_entity_selected:"Wähle zuerst eine Entity aus",no_groups_defined:"Es gibt keine Gruppe",no_entities_for_group:"Es gibt keine Entities in dieser Gruppe",no_actions_for_entity:"Es gibt keine Aktionen für diese Entity",no_entries_defined:"Es gibt keine Einträge"},Be={group:"Gruppe",entity:"Entity",action:"Aktion",days:"Tage",time:"Zeit",options:"Optionen",day_type_daily:"jeden Tag",day_type_workday:"Werktags",day_type_weekend:"Wochenende",day_type_custom:"benutzerdefiniert"},Ke={mon:"Mo",tue:"Di",wed:"Mi",thu:"Do",fri:"Fr",sat:"Sa",sun:"So"},Ge={mon:"Montag",tue:"Dienstag",wed:"Mittwoch",thu:"Donnerstag",fri:"Freitag",sat:"Samstag",sun:"Sonntag"},We={and:"und",before:"vor",after:"nach"},Ye={turn_on:"anschalten",turn_on_brightness:"anschalten {auf brightness}",turn_off:"ausschalten",close_cover:"schließen",open_cover:"öffnen",set_temperature:"Temperatur einstellen {auf temperature}",set_temperature_hvac_mode_heat:"aufwärmen {auf temperature}",set_temperature_hvac_mode_cool:"kühlen {auf temperature}",set_cover_position:"Position setzen {nach position}",set_hvac_mode:"Modus setzen {zu hvac_mode}",set_hvac_mode_hvac_mode_off:"ausschalten",set_preset_mode:"Voreinstellung setzen {zu preset_mode}",set_value:"Wert setzen {zu value}",select_option:"Option {option} auswählen",select_source:"Quelle {source} auswählen",start:"start",run_script:"ausführen"},Je={brightness:"Helligkeit",temperature:"Temperatur",position:"Position",hvac_mode:"Modus",preset_mode:"Voreinstellung"},Ze={camera:"Kameras",climate:"Heizung",cover:"Beschattung",fan:"Lüfter",group:"Gruppen",input_boolean:"input_boolean",input_number:"input_number",input_select:"input_select",light:"Licht",media_player:"Media Player",scene:"Szene",switch:"Schalter",vacuum:"Staubsauger"},Xe={tomorrow:"morgen",daily:"täglich",daily_except_days:"täglich außer {days}",working_days:"Werktags",weekend:"Wochenende",interval:"{startDay} bis {endDay}"},et={absolute:"um {time}",relative:"in {time}",interval:"von {startTime} bis {endTime}",seconds:"{seconds} Sekunden",hour:"1 Stunde",hours:"{hours} Stunden",minute:"1 Minute",minutes:"{minutes} Minuten",now:"jetzt",midnight:"Mitternacht",noon:"Mittag",at_sun_event:"am {sunEvent}",sun_event_sunrise:"Sonnenaufgang",sun_event_sunset:"Sonnenuntergang"},tt={one_additional_task:"1 weitere Aufgabe",x_additional_tasks:"{count} weitere Aufgaben"},rt={scheduler:"Zeitplaner",actions:He,instructions:Qe,fields:Be,days_short:Ke,days_long:Ge,words:We,services:Ye,service_parameters:Je,domains:Ze,days:Xe,time:et,misc:tt},it=Object.freeze({__proto__:null,scheduler:"Zeitplaner",actions:He,instructions:Qe,fields:Be,days_short:Ke,days_long:Ge,words:We,services:Ye,service_parameters:Je,domains:Ze,days:Xe,time:et,misc:tt,default:rt}),st={add:"add item",cancel:"cancel",next:"next",save:"save",delete:"delete"},at={no_group_selected:"Select a group first",no_entity_selected:"Select an entity first",no_groups_defined:"There are no groups defined",no_entities_for_group:"There are no entities in this group",no_actions_for_entity:"There are no actions for this entity",no_entries_defined:"There are no items to show"},nt={group:"Group",entity:"Entity",action:"Action",days:"Days",time:"Time",options:"Options",day_type_daily:"daily",day_type_workday:"workdays",day_type_weekend:"weekend",day_type_custom:"custom"},ot={mon:"mon",tue:"tue",wed:"wed",thu:"thu",fri:"fri",sat:"sat",sun:"sun"},ct={mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday",sun:"Sunday"},lt={and:"and",before:"before",after:"after"},dt={turn_on:"turn on",turn_on_brightness:"turn on {at brightness}",turn_off:"turn off",close_cover:"close",open_cover:"open",set_temperature:"set temperature {to temperature}",set_temperature_hvac_mode_heat:"heat {to temperature}",set_temperature_hvac_mode_cool:"cool {to temperature}",set_cover_position:"set position {to position}",set_hvac_mode:"set mode {to hvac_mode}",set_hvac_mode_hvac_mode_off:"turn off",set_preset_mode:"set preset {to preset_mode}",set_value:"set value {to value}",select_option:"select option {option}",select_source:"select source {source}",start:"start",run_script:"run"},ut={brightness:"brightness",temperature:"temperature",position:"position",hvac_mode:"mode",preset_mode:"preset"},ht={camera:"cameras",climate:"climate",cover:"covers",fan:"fans",group:"groups",input_boolean:"input_boolean",input_number:"input_number",input_select:"input_select",light:"lights",media_player:"media players",scene:"scenes",switch:"switches",vacuum:"vacuum"},pt={tomorrow:"tomorrow",daily:"daily",daily_except_days:"every day except {days}",working_days:"working days",weekend:"weekend",interval:"{startDay} to {endDay}"},mt={absolute:"at {time}",relative:"in {time}",interval:"from {startTime} to {endTime}",seconds:"{seconds} seconds",hour:"1 hour",hours:"{hours} hours",minute:"1 minute",minutes:"{minutes} minutes",now:"now",midnight:"midnight",noon:"noon",at_sun_event:"at {sunEvent}",sun_event_sunrise:"sunrise",sun_event_sunset:"sunset"},vt={one_additional_task:"1 more task",x_additional_tasks:"{count} more tasks"},ft={scheduler:"Scheduler",actions:st,instructions:at,fields:nt,days_short:ot,days_long:ct,words:lt,services:dt,service_parameters:ut,domains:ht,days:pt,time:mt,misc:vt},gt=Object.freeze({__proto__:null,scheduler:"Scheduler",actions:st,instructions:at,fields:nt,days_short:ot,days_long:ct,words:lt,services:dt,service_parameters:ut,domains:ht,days:pt,time:mt,misc:vt,default:ft}),yt={add:"Agregar",cancel:"cancelar",next:"siguiente",save:"guardar",delete:"borrar"},_t={no_group_selected:"Selecciona un grupo primero",no_entity_selected:"Selecciona una entidad primero",no_groups_defined:"No hay grupos definidos",no_entities_for_group:"No hay entidades en este grupo",no_actions_for_entity:"No hay acciones para esta entidad",no_entries_defined:"No hay dispositivos definidos"},bt={group:"Grupo",entity:"Entidad",action:"Acción",days:"Días",time:"Hora",options:"Opciones",day_type_daily:"cada día",day_type_weekdays:"dias semanales",day_type_weekend:"fin de semana",day_type_custom:"personalizado"},wt={mon:"lun",tue:"mar",wed:"mie",thu:"jue",fri:"vie",sat:"sab",sun:"dom"},Et={mon:"lunes",tue:"martes",wed:"miércoles",thu:"jueves",fri:"viernes",sat:"sábado",sun:"domingo"},Pt={and:"y",before:"antes",after:"después"},St={turn_on:"encender",turn_on_brightness:"encender {a brightness}",turn_off:"apagar",close_cover:"cerrar",open_cover:"abrir",set_temperature:"establecer temperatura {a temperature}",set_temperature_hvac_mode_heat:"calentar {a temperature}",set_temperature_hvac_mode_cool:"enfriar {a temperature}",set_to:"establecer a",set_cover_position:"establecer posición {a position}",set_hvac_mode:"establecer modo {a hvac_mode}",set_hvac_mode_hvac_mode_off:"apagar",set_preset_mode:"establecer modo {a preset_mode}",set_value:"establecer valor {value}",select_option:"seleccionar opción {option}",select_source:"seleccionar fuente {source}",start:"empezar",run_script:"ejecutar"},kt={brightness:"brillo",temperature:"temperatura",position:"posición",hvac_mode:"modo",preset_mode:"pre-ajuste"},xt={camera:"cámaras",climate:"climatización",cover:"persiana",fan:"ventilador",group:"grupo",input_boolean:"input_boolean",input_number:"input_number",input_select:"input_select",light:"luces",media_player:"reproductor multimedia",scene:"escena",switch:"interruptor",vacuum:"aspirador"},$t={tomorrow:"mañana",daily:"a diario",daily_except_days:"todos los dias excepto {days}",working_days:"días hábiles",weekend:"fin de semana",interval:"{startDay} a {endDay}"},Ot={absolute:"a las {time}",relative:"en {time}",interval:"desde las {startTime} a las {endTime}",seconds:"{seconds} segundos",hour:"1 hora",hours:"{hours} horas",minute:"1 minuto",minutes:"{minutes} minutos",now:"ahora",midnight:"medianoche",noon:"mediodía",at_sun_event:"al {sunEvent}",sun_event_sunrise:"amanecer",sun_event_sunset:"atardecer"},jt={one_additional_task:"1 tarea más",x_additional_tasks:"{count} tareas más"},Ct={scheduler:"Programador",actions:yt,instructions:_t,fields:bt,days_short:wt,days_long:Et,words:Pt,services:St,service_parameters:kt,domains:xt,days:$t,time:Ot,misc:jt},Dt=Object.freeze({__proto__:null,scheduler:"Programador",actions:yt,instructions:_t,fields:bt,days_short:wt,days_long:Et,words:Pt,services:St,service_parameters:kt,domains:xt,days:$t,time:Ot,misc:jt,default:Ct}),zt={add:"lisa",cancel:"loobu",next:"edasi",save:"salvesta",delete:"kustuta"},At={no_group_selected:"Vali grupp",no_entity_selected:"Vali olem",no_groups_defined:"Gruppe pole määratud",no_entities_for_group:"Antud grupis puuduvad olemid",no_actions_for_entity:"Selles olemis puuduvad tegevused",no_entries_defined:"Pole midagi kuvada"},Tt={group:"Grupp",entity:"Olem",action:"Tegevus",days:"Päevad",time:"Aeg",options:"Suvandid",day_type_daily:"iga päev",day_type_weekdays:"tööpäevadel",day_type_weekend:"nädalavahetus",day_type_custom:"valikuline"},Nt={mon:"E",tue:"T",wed:"K",thu:"N",fri:"R",sat:"L",sun:"P"},Rt={mon:"Esmaspäev",tue:"Teisipäev",wed:"Kolmapäev",thu:"Neljapäev",fri:"Reede",sat:"Laupäev",sun:"Pühapäev"},Ft={and:"ja",before:"enne",after:"pärast"},It={turn_on:"lülita sisse",turn_on_brightness:"turn on {at brightness}",turn_off:"lülita välja",close_cover:"sulge",open_cover:"ava",set_temperature:"määra temperatuur {to temperature}",set_temperature_hvac_mode_heat:"heat {to temperature}",set_temperature_hvac_mode_cool:"cool {to temperature}",set_cover_position:"seadista asendisse {to position}",set_hvac_mode:"vali töörežiim {to hvac_mode}",set_hvac_mode_hvac_mode_off:"turn off",set_preset_mode:"eelseadistatud {to preset_mode}",set_value:"määra väärtus {value}",select_option:"valikud {option}",select_source:"vali allikas {source}",start:"alusta",run_script:"alusta"},Mt={brightness:"heledus",temperature:"temperatuur",position:"asend",hvac_mode:"töörežiim",preset_mode:"eelseadistus"},Lt={camera:"kaamerad",climate:"kliimaseade",cover:"(akna)katted",fan:"ventilaatorid",group:"grupid",input_boolean:"binaarsisestus",input_number:"arvsisestus",input_select:"sisendivalik",light:"valgustid",media_player:"media players",scene:"stseenid",switch:"lülitid",vacuum:"tolmuimejad"},Vt={tomorrow:"homme",daily:"iga päev",daily_except_days:"iga päev välja arvatud {days}",working_days:"tööpäevadel",weekend:"nädalavahetusel",interval:"{startDay} kuni {endDay}"},Ut={absolute:"kell {time}",relative:"{time} pärast",interval:"alates {startTime} kuni {endTime}",seconds:"{seconds} sekundit",hour:"1 tund",hours:"{hours} tundi",minute:"1 minut",minutes:"{minutes} minutit",now:"kohe",midnight:"keskööl",noon:"keskpäeval",at_sun_event:"{sunEvent}",sun_event_sunrise:"päikesetõusu",sun_event_sunset:"loojangut"},qt={one_additional_task:"veel 1 ajastus",x_additional_tasks:"{count} ajastust"},Ht={scheduler:"Ajastaja",actions:zt,instructions:At,fields:Tt,days_short:Nt,days_long:Rt,words:Ft,services:It,service_parameters:Mt,domains:Lt,days:Vt,time:Ut,misc:qt},Qt=Object.freeze({__proto__:null,scheduler:"Ajastaja",actions:zt,instructions:At,fields:Tt,days_short:Nt,days_long:Rt,words:Ft,services:It,service_parameters:Mt,domains:Lt,days:Vt,time:Ut,misc:qt,default:Ht}),Bt={add:"ajouter un item",cancel:"annuler",next:"suivant",save:"sauvegarder",delete:"effacer"},Kt={no_group_selected:"Sélectionner un groupe en premier",no_entity_selected:"Sélectionner une entité en premier",no_groups_defined:"Il n'y a pas de groupe défini",no_entities_for_group:"Il n'y a pas d'entité dans ce groupe",no_actions_for_entity:"Il n'y a pas d'action pour cette entité",no_entries_defined:"Il n'y a pas d'item à afficher"},Gt={group:"Groupe",entity:"Entité",action:"Action",days:"Jours",time:"Temps",options:"Options",day_type_daily:"chaque jour",day_type_weekdays:"en semaine",day_type_weekend:"weekend",day_type_custom:"sur mesure"},Wt={mon:"lun",tue:"mar",wed:"mer",thu:"jeu",fri:"ven",sat:"sam",sun:"dim"},Yt={mon:"lundi",tue:"mardi",wed:"mercredi",thu:"jeudi",fri:"vendredi",sat:"samedi",sun:"dimanche"},Jt={and:"et",before:"avant",after:"après"},Zt={turn_on:"allumer",turn_on_brightness:"allumer {à brightness}",turn_off:"éteindre",close_cover:"fermer",open_cover:"ouvrir",set_temperature:"régler la température {à temperature}",set_temperature_hvac_mode_heat:"heat {à temperature}",set_temperature_hvac_mode_cool:"cool {à temperature}",set_cover_position:"position définie {à position}",set_hvac_mode:"set mode {to hvac_mode}",set_hvac_mode_hvac_mode_off:"turn off",set_preset_mode:"set preset {to preset_mode}",set_value:"set value {to value}",select_option:"select option {option}",select_source:"select source {source}",start:"start",run_script:"run"},Xt={brightness:"brightness",temperature:"temperature",position:"position",hvac_mode:"mode",preset_mode:"preset"},er={camera:"cameras",climate:"climat",cover:"contrôleur",fan:"ventilateur",group:"groups",input_boolean:"input_boolean",input_number:"input_number",input_select:"input_select",light:"lumière",media_player:"media players",scene:"scenes",switch:"interrupteurs",vacuum:"aspirateur"},tr={tomorrow:"tomorrow",daily:"daily",daily_except_days:"every day except {days}",working_days:"working days",weekend:"weekend",interval:"{startDay} to {endDay}"},rr={absolute:"at {time}",relative:"in {time}",interval:"from {startTime} to {endTime}",seconds:"{seconds} seconds",hour:"1 hour",hours:"{hours} hours",minute:"1 minute",minutes:"{minutes} minutes",now:"now",midnight:"midnight",noon:"noon",at_sun_event:"at {sunEvent}",sun_event_sunrise:"sunrise",sun_event_sunset:"sunset"},ir={one_additional_task:"1 more task",x_additional_tasks:"{count} more tasks"},sr={scheduler:"Planificateur",actions:Bt,instructions:Kt,fields:Gt,days_short:Wt,days_long:Yt,words:Jt,services:Zt,service_parameters:Xt,domains:er,days:tr,time:rr,misc:ir},ar=Object.freeze({__proto__:null,scheduler:"Planificateur",actions:Bt,instructions:Kt,fields:Gt,days_short:Wt,days_long:Yt,words:Jt,services:Zt,service_parameters:Xt,domains:er,days:tr,time:rr,misc:ir,default:sr}),nr={add:"új időzítés",cancel:"mégse",next:"tovább",save:"mentés",delete:"törlés"},or={no_group_selected:"Előbb egy csoportot szükséges választani",no_entity_selected:"Előbb egy entitást szükséges választani",no_groups_defined:"Nincsenek deffiniált csoportok",no_entities_for_group:"Ebben a csoportban nem találhatók entitások",no_actions_for_entity:"Ehhez az entitáshoz nem tartoznak műveletek",no_entries_defined:"Nincs megjeleníthető elem"},cr={group:"Csoport",entity:"Entitás",action:"Művelet",days:"Napokon",time:"Időpontban",options:"Opciók",day_type_daily:"minden nap",day_type_workday:"munkanapokon",day_type_weekend:"hétvégén",day_type_custom:"egyedi"},lr={mon:"hét",tue:"ked",wed:"sze",thu:"csü",fri:"pén",sat:"szo",sun:"vas"},dr={mon:"hétfő",tue:"kedd",wed:"szerda",thu:"csütörtök",fri:"péntek",sat:"szombat",sun:"vasárnap"},ur={and:"és",before:"előtt",after:"után"},hr={turn_on:"bekapcsolás",turn_on_brightness:"bekapcsolás {at brightness}",turn_off:"kikapcsolás",close_cover:"zárás",open_cover:"nyitás",set_temperature:"hőmérséklet {to temperature}",set_temperature_hvac_mode_heat:"heat {to temperature}",set_temperature_hvac_mode_cool:"cool {to temperature}",set_cover_position:"változtass pozíciót {to position}",set_hvac_mode:"mód beállítása {to hvac_mode}",set_hvac_mode_hvac_mode_off:"kikapcsolás",set_preset_mode:"preset beállítása {to preset_mode}",set_value:"érték beállítása {value}",select_option:"opció kiválasztása {option}",select_source:"forrás kiválasztása {source}",start:"kezdés",run_script:"kezdés"},pr={brightness:"világosság",temperature:"hőmérséklet",position:"pozíció",hvac_mode:"mód",preset_mode:"preset"},mr={camera:"kamera",climate:"termosztát",cover:"redőny",fan:"ventilátor",group:"csoportok",input_boolean:"logikai bemenet",input_number:"szám bemenet",input_select:"legördülő bemenet",light:"lámpa",media_player:"lejátszó",scene:"jelenetek",switch:"kapcsoló",vacuum:"pórszívó"},vr={tomorrow:"holnap",daily:"minden nap",daily_except_days:"minden nap, kivéve {days}",working_days:"munkanapokon",weekend:"hétvégén",interval:"{startDay} - {endDay}"},fr={absolute:"{time}-kor",relative:"{time} múlva",interval:"{startTime} - {endTime}",seconds:"{seconds} másodperc",hour:"1 óra",hours:"{hours} óra",minute:"1 perc",minutes:"{minutes} perc",now:"most",midnight:"éjfél",noon:"dél",at_sun_event:"{sunEvent}kor",sun_event_sunrise:"napfelkelte",sun_event_sunset:"napnyugta"},gr={one_additional_task:"még egy feladat",x_additional_tasks:"még {count} feladat"},yr={scheduler:"Időzítések",actions:nr,instructions:or,fields:cr,days_short:lr,days_long:dr,words:ur,services:hr,service_parameters:pr,domains:mr,days:vr,time:fr,misc:gr},_r=Object.freeze({__proto__:null,scheduler:"Időzítések",actions:nr,instructions:or,fields:cr,days_short:lr,days_long:dr,words:ur,services:hr,service_parameters:pr,domains:mr,days:vr,time:fr,misc:gr,default:yr}),br={add:"aggiungi oggetto",cancel:"annulla",next:"avanti",save:"salva",delete:"elimina"},wr={no_group_selected:"Seleziona prima un gruppo",no_entity_selected:"Seleziona prima un'entità",no_groups_defined:"Non ci sono gruppi definiti",no_entities_for_group:"Non ci sono entità in questo gruppo",no_actions_for_entity:"Non ci sono azioni per questa entità",no_entries_defined:"Non ci sono oggetti da visualizzare"},Er={group:"Gruppo",entity:"Entità",action:"Azione",days:"Giorni",time:"Ora",options:"Opzioni",day_type_daily:"giornaliero",day_type_workday:"giorni lavorativi",day_type_weekend:"weekend",day_type_custom:"personalizzato"},Pr={mon:"lun",tue:"mar",wed:"mer",thu:"gio",fri:"ven",sat:"sab",sun:"dom"},Sr={mon:"lunedì",tue:"martedì",wed:"mercoledì",thu:"giovedì",fri:"venerdì",sat:"sabato",sun:"domenica"},kr={and:"e",before:"prima",after:"dopo"},xr={turn_on:"accendi",turn_on_brightness:"accendi {at brightness}",turn_off:"spegni",close_cover:"chiudi",open_cover:"apri",set_temperature:"imposta temperatura {to temperature}",set_temperature_hvac_mode_heat:"aumenta {to temperature}",set_temperature_hvac_mode_cool:"diminuisci {to temperature}",set_cover_position:"imposta posizione {to position}",set_hvac_mode:"imposta modalità {to hvac_mode}",set_hvac_mode_hvac_mode_off:"spegni",set_preset_mode:"imposta programmazione {to preset_mode}",set_value:"imposta valore {value}",select_option:"seleziona opzione {option}",select_source:"seleziona sorgente {source}",start:"avvia",run_script:"esegui"},$r={brightness:"luminosità",temperature:"temperatura",position:"posizione",hvac_mode:"modalità",preset_mode:"programmazione"},Or={camera:"telecamere",climate:"clima",cover:"cover",fan:"ventole",group:"gruppi",input_boolean:"input_boolean",input_number:"input_number",input_select:"input_select",light:"luci",media_player:"media player",scene:"scene",switch:"interruttori",vacuum:"aspirapolvere"},jr={tomorrow:"domani",daily:"giornaliero",daily_except_days:"tutti i giorni eccetto {days}",working_days:"giorni lavorativi",weekend:"weekend",interval:"{startDay} a {endDay}"},Cr={absolute:"alle {time}",relative:"entro {time}",interval:"dalle {startTime} alle {endTime}",seconds:"{seconds} secondi",hour:"1 ora",hours:"{hours} ore",minute:"1 minuto",minutes:"{minutes} minuti",now:"ora",midnight:"mezzanotte",noon:"mezzogiorno",at_sun_event:"al {sunEvent}",sun_event_sunrise:"l' alba",sun_event_sunset:"tramonto"},Dr={one_additional_task:"un altro task",x_additional_tasks:"{count} altri task"},zr={scheduler:"Schedulatore",actions:br,instructions:wr,fields:Er,days_short:Pr,days_long:Sr,words:kr,services:xr,service_parameters:$r,domains:Or,days:jr,time:Cr,misc:Dr},Ar=Object.freeze({__proto__:null,scheduler:"Schedulatore",actions:br,instructions:wr,fields:Er,days_short:Pr,days_long:Sr,words:kr,services:xr,service_parameters:$r,domains:Or,days:jr,time:Cr,misc:Dr,default:zr}),Tr={add:"Nieuw item",cancel:"annuleren",next:"verder",save:"opslaan",delete:"verwijder"},Nr={no_group_selected:"Selecteer eerst een groep",no_entity_selected:"Selecteer eerst een entiteit",no_groups_defined:"Er zijn geen groepen gedefinieerd",no_entities_for_group:"Deze groep heeft geen entiteiten",no_actions_for_entity:"Deze entiteit heeft geen acties",no_entries_defined:"Er zijn geen items aangemaakt"},Rr={group:"Groep",entity:"Entiteit",action:"Actie",days:"Dagen",time:"Tijdstip",options:"Opties",day_type_daily:"dagelijks",day_type_workday:"werkdagen",day_type_weekend:"weekend",day_type_custom:"anders"},Fr={mon:"ma",tue:"di",wed:"wo",thu:"do",fri:"vr",sat:"za",sun:"zo"},Ir={mon:"maandag",tue:"dinsdag",wed:"woensdag",thu:"donderdag",fri:"vrijdag",sat:"zaterdag",sun:"zondag"},Mr={and:"en",before:"voor",after:"na"},Lr={turn_on:"aanzetten",turn_on_brightness:"aanzetten {op brightness}",turn_off:"uitzetten",close_cover:"sluiten",open_cover:"openen",set_temperature:"temperatuur instellen {naar temperature}",set_temperature_hvac_mode_heat:"verwarmen {naar temperature}",set_temperature_hvac_mode_cool:"koelen {naar temperature}",set_cover_position:"positie instellen {naar position}",set_hvac_mode:"stand aanpassen {naar hvac_mode}",set_hvac_mode_hvac_mode_off:"uitzetten",set_preset_mode:"kies voorinstelling {preset_mode}",set_value:"waarde {value} instellen",select_option:"optie {option} selecteren",select_source:"ingang {source} selecteren",start:"starten",run_script:"uitvoeren"},Vr={brightness:"helderheid",temperature:"temperatuur",position:"positie",hvac_mode:"stand",preset_mode:"voorinstelling"},Ur={camera:"cameras",climate:"verwarming",cover:"zonwering",fan:"ventilatie",group:"groepen",input_boolean:"input_boolean",input_number:"input_number",input_select:"input_select",light:"verlichting",media_player:"mediaspelers",scene:"scènes",switch:"schakelaars",vacuum:"stofzuigers"},qr={tomorrow:"morgen",daily:"dagelijks",daily_except_days:"elke dag behalve {days}",working_days:"op werkdagen",weekend:"in het weekend",interval:"{startDay} t/m {endDay}"},Hr={absolute:"om {time}",relative:"over {time}",interval:"van {startTime} tot {endTime}",seconds:"{seconds} seconden",hour:"1 uur",hours:"{hours} uur",minute:"1 minuut",minutes:"{minutes} minuten",now:"nu",midnight:"middernacht",noon:"12 uur",at_sun_event:"bij {sunEvent}",sun_event_sunrise:"zonsopgang",sun_event_sunset:"zonsondergang"},Qr={one_additional_task:"1 overige taak",x_additional_tasks:"{count} overige taken"},Br={scheduler:"Tijdplanner",actions:Tr,instructions:Nr,fields:Rr,days_short:Fr,days_long:Ir,words:Mr,services:Lr,service_parameters:Vr,domains:Ur,days:qr,time:Hr,misc:Qr},Kr=Object.freeze({__proto__:null,scheduler:"Tijdplanner",actions:Tr,instructions:Nr,fields:Rr,days_short:Fr,days_long:Ir,words:Mr,services:Lr,service_parameters:Vr,domains:Ur,days:qr,time:Hr,misc:Qr,default:Br}),Gr={add:"legg til",cancel:"avbryt",next:"neste",save:"lagre",delete:"slett"},Wr={no_group_selected:"Velg en gruppe først",no_entity_selected:"Velg en entitet først",no_groups_defined:"Ingen grupper definert",no_entities_for_group:"Det finnes ingen entiteter i denne gruppen",no_actions_for_entity:"Det finnes ingen handlinger for denne entiteten",no_entries_defined:"Det er ingen definerte tidsplaner å vise"},Yr={group:"Gruppe",entity:"Entitet",action:"Handling",days:"Dager",time:"Tid",options:"Valg",day_type_daily:"hver dag",day_type_weekdays:"ukedager",day_type_weekend:"weekend",day_type_custom:"egendefinert"},Jr={mon:"man",tue:"tir",wed:"ons",thu:"tor",fri:"fre",sat:"lør",sun:"søn"},Zr={mon:"mandag",tue:"tirsdag",wed:"onsdag",thu:"torsdag",fri:"fredag",sat:"lørdag",sun:"søndag"},Xr={and:"og",before:"før",after:"etter"},ei={turn_on:"slå på",turn_on_brightness:"slå på {at brightness}",turn_off:"slå av",close_cover:"lukk",open_cover:"åpne",set_temperature:"sett temperatur {to temperature}",set_temperature_hvac_mode_heat:"heat {to temperature}",set_temperature_hvac_mode_cool:"cool {to temperature}",set_cover_position:"sett posisjon {to position}",set_hvac_mode:"set mode {to hvac_mode}",set_hvac_mode_hvac_mode_off:"slå av",set_preset_mode:"set preset {to preset_mode}",set_value:"set value {to value}",select_option:"select option {option}",select_source:"select source {source}",start:"start",run_script:"run"},ti={brightness:"brightness",temperature:"temperature",position:"position",hvac_mode:"mode",preset_mode:"preset"},ri={camera:"cameras",climate:"klima",cover:"cover",fan:"vifter",group:"groups",input_boolean:"input_boolean",input_number:"input_number",input_select:"input_select",media_player:"media players",scene:"scenes",light:"lys",switch:"brytere",vacuum:"støvsugere"},ii={tomorrow:"tomorrow",daily:"daily",daily_except_days:"every day except {days}",working_days:"working days",weekend:"weekend",interval:"{startDay} to {endDay}"},si={absolute:"at {time}",relative:"in {time}",interval:"from {startTime} to {endTime}",seconds:"{seconds} seconds",hour:"1 hour",hours:"{hours} hours",minute:"1 minute",minutes:"{minutes} minutes",now:"now",midnight:"midnight",noon:"noon",at_sun_event:"at {sunEvent}",sun_event_sunrise:"sunrise",sun_event_sunset:"sunset"},ai={one_additional_task:"1 more task",x_additional_tasks:"{count} more tasks"},ni={scheduler:"Tidsplan",actions:Gr,instructions:Wr,fields:Yr,days_short:Jr,days_long:Zr,words:Xr,services:ei,service_parameters:ti,domains:ri,days:ii,time:si,misc:ai},oi=Object.freeze({__proto__:null,scheduler:"Tidsplan",actions:Gr,instructions:Wr,fields:Yr,days_short:Jr,days_long:Zr,words:Xr,services:ei,service_parameters:ti,domains:ri,days:ii,time:si,misc:ai,default:ni}),ci={add:"dodaj",cancel:"anuluj",next:"dalej",save:"zapisz",delete:"usuń"},li={no_group_selected:"Najpierw wybierz grupę",no_entity_selected:"Najpierw wybierz encję",no_groups_defined:"Nie ma zdefiniowanych grup",no_entities_for_group:"Nie ma encji w tej grupie",no_actions_for_entity:"Nie ma akcji dla tej encji",no_entries_defined:"Nie ma elementów do pokazania"},di={group:"Grupa",entity:"Encja",action:"Akcja",days:"Dni",time:"Czas",options:"Opcje",day_type_daily:"codziennie",day_type_workday:"dni robocze",day_type_weekend:"weekend",day_type_custom:"niestandardowy"},ui={mon:"pon.",tue:"wt.",wed:"śr.",thu:"czw.",fri:"pt.",sat:"sob.",sun:"niedz."},hi={mon:"poniedziałek",tue:"wtorek",wed:"środa",thu:"czwartek",fri:"piątek",sat:"sobota",sun:"niedziela"},pi={and:"oraz",before:"przed",after:"po"},mi={turn_on:"włącz",turn_on_brightness:"włącz {at brightness}",turn_off:"wyłącz",close_cover:"zamknij",open_cover:"otwórz",set_temperature:"ustaw temperaturę {to temperature}",set_temperature_hvac_mode_heat:"heat {to temperature}",set_temperature_hvac_mode_cool:"cool {to temperature}",set_cover_position:"ustaw pozycję {to position}",set_hvac_mode:"ustaw tryb {to hvac_mode}",set_hvac_mode_hvac_mode_off:"wyłącz",set_preset_mode:"ustaw preset {preset_mode}",set_value:"ustaw wartość {value}",select_option:"wybierz opcję {option}",select_source:"wybierz źródło {source}",start:"start",run_script:"start"},vi={brightness:"jasność",temperature:"temperatura",position:"pozycja",hvac_mode:"tryb",preset_mode:"preset"},fi={camera:"kamera",climate:"termostat",cover:"roleta",fan:"wentylator",group:"grupa",input_boolean:"wejście logiczne",input_number:"wejście liczbowe",input_select:"wybór wejścia",media_player:"odtwarzacz av",scene:"scena",light:"światło",switch:"włącznik",vacuum:"odkurzacz"},gi={tomorrow:"jutro",daily:"codziennie",daily_except_days:"codziennie za wyjątkiem {days}",working_days:"dni robocze",weekend:"weekend",interval:"{startDay} do {endDay}"},yi={absolute:"o {time}",relative:"za {time}",interval:"od {startTime} do {endTime}",seconds:"{seconds} sekund(a/y)",hour:"1 godzina",hours:"{hours} godzin(y)",minute:"1 minuta",minutes:"{minutes} minut(y)",now:"teraz",midnight:"północ",noon:"południe",at_sun_event:"o {sunEvent}",sun_event_sunrise:"wschodzie",sun_event_sunset:"zachodzie"},_i={one_additional_task:"jeszcze 1 zadanie",x_additional_tasks:"{count} więcej zadań"},bi={scheduler:"Harmonogram",actions:ci,instructions:li,fields:di,days_short:ui,days_long:hi,words:pi,services:mi,service_parameters:vi,domains:fi,days:gi,time:yi,misc:_i},wi=Object.freeze({__proto__:null,scheduler:"Harmonogram",actions:ci,instructions:li,fields:di,days_short:ui,days_long:hi,words:pi,services:mi,service_parameters:vi,domains:fi,days:gi,time:yi,misc:_i,default:bi}),Ei={add:"adicionar item",cancel:"cancelar",next:"próximo",save:"gravar",delete:"apagar"},Pi={no_group_selected:"Selecione um grupo primeiro",no_entity_selected:"Selecione uma entidade primeiro",no_groups_defined:"Não tem grupo definido",no_entities_for_group:"Não tem entidade no grupo",no_actions_for_entity:"Não há ações para esta entidade",no_entries_defined:"Não tem item pra mostar"},Si={group:"Grupo",entity:"Entidade",action:"Ação",days:"Dias",time:"Hora",options:"Opções",day_type_daily:"todos os dias",day_type_weekdays:"dias da semana",day_type_weekend:"final da semana",day_type_custom:"personalizado"},ki={mon:"seg",tue:"ter",wed:"qua",thu:"qui",fri:"sex",sat:"sab",sun:"dom"},xi={mon:"segunda",tue:"terça",wed:"quarta",thu:"quinta",fri:"sexta",sat:"sabádo",sun:"domingo"},$i={and:"e",before:"antes",after:"depois"},Oi={turn_on:"ligar",turn_on_brightness:"ligar {a brightness}",turn_off:"desligar",close_cover:"fechar",open_cover:"abrir",set_temperature:"ajustar temperatura {a temperature}",set_temperature_hvac_mode_heat:"heat {to temperature}",set_temperature_hvac_mode_cool:"cool {to temperature}",set_cover_position:"ajustar posição {a position}",set_hvac_mode:"set mode {to hvac_mode}",set_hvac_mode_hvac_mode_off:"turn off",set_preset_mode:"set preset {to preset_mode}",set_value:"set value {to value}",select_option:"select option {option}",select_source:"select source {source}",start:"start",run_script:"run"},ji={brightness:"Brilho",temperature:"Temperatura",position:"Posição",hvac_mode:"mode",preset_mode:"preset"},Ci={camera:"cameras",climate:"ar condicionado",cover:"persiana",fan:"ventilador",group:"groups",input_boolean:"input_boolean",input_number:"input_number",input_select:"input_select",media_player:"media players",scene:"scenes",light:"luz",switch:"interruptor",vacuum:"aspirador"},Di={tomorrow:"tomorrow",daily:"daily",daily_except_days:"every day except {days}",working_days:"working days",weekend:"weekend",interval:"{startDay} to {endDay}"},zi={absolute:"at {time}",relative:"in {time}",interval:"from {startTime} to {endTime}",seconds:"{seconds} seconds",hour:"1 hour",hours:"{hours} hours",minute:"1 minute",minutes:"{minutes} minutes",now:"now",midnight:"midnight",noon:"noon",at_sun_event:"at {sunEvent}",sun_event_sunrise:"sunrise",sun_event_sunset:"sunset"},Ai={one_additional_task:"1 more task",x_additional_tasks:"{count} more tasks"},Ti={scheduler:"Agenda",actions:Ei,instructions:Pi,fields:Si,days_short:ki,days_long:xi,words:$i,services:Oi,service_parameters:ji,domains:Ci,days:Di,time:zi,misc:Ai},Ni=Object.freeze({__proto__:null,scheduler:"Agenda",actions:Ei,instructions:Pi,fields:Si,days_short:ki,days_long:xi,words:$i,services:Oi,service_parameters:ji,domains:Ci,days:Di,time:zi,misc:Ai,default:Ti}),Ri={add:"adaugă element",cancel:"abandon",next:"următorul",save:"salvează",delete:"șterge"},Fi={no_group_selected:"Prima dată selectați un grup",no_entity_selected:"Prima dată selectați o entitate",no_groups_defined:"Nu există grupuri definite",no_entities_for_group:"Nu există entități definite în acest grup",no_actions_for_entity:"Nu există acțiuni pentru această entitate",no_entries_defined:"Nu există elemente de afișat"},Ii={group:"Grup",entity:"Entitate",action:"Acțiune",days:"Zile",time:"Timp",options:"Opțiuni",day_type_daily:"zilnic",day_type_workday:"zile lucrătoare",day_type_weekend:"sfârșit de săptămână",day_type_custom:"personalizat"},Mi={mon:"lun",tue:"mar",wed:"mie",thu:"joi",fri:"vin",sat:"sâm",sun:"dum"},Li={mon:"Luni",tue:"Marți",wed:"Miercuri",thu:"Joi",fri:"Vineri",sat:"Sâmbătă",sun:"Duminică"},Vi={and:"și",before:"înainte",after:"după"},Ui={turn_on:"pornire",turn_on_brightness:"pornire {la brightness}",turn_off:"oprire",close_cover:"închidere",open_cover:"deschidere",set_temperature:"setare temperatură {la temperature}",set_temperature_hvac_mode_heat:"heat {to temperature}",set_temperature_hvac_mode_cool:"cool {to temperature}",set_cover_position:"setare poziție",set_hvac_mode:"setare mod {hvac_mode}",set_hvac_mode_hvac_mode_off:"oprire",set_preset_mode:"setare preset {preset_mode}",set_value:"setare valoare {value}",select_option:"selectare opțiune {option}",select_source:"selectare sursă {source}",start:"start",run_script:"run"},qi={brightness:"intensitate luminoasă",temperature:"temperatură",position:"poziție",hvac_mode:"mod",preset_mode:"preset"},Hi={camera:"camere",climate:"climat",cover:"jaluzele",fan:"ventilatoare",group:"grupuri",input_boolean:"input_boolean",input_number:"input_number",input_select:"input_select",light:"lumini",media_player:"media playere",scene:"scene",switch:"întrerupătpare",vacuum:"aspiratoare"},Qi={tomorrow:"mâine",daily:"zilnic",daily_except_days:"zilnic cu excepția {days}",working_days:"zile lucrătoare",weekend:"sfârșit de săptămână",interval:"{startDay} până la {endDay}"},Bi={absolute:"la {time}",relative:"în {time}",interval:"de la {startTime} la {endTime}",seconds:"{seconds} secunde",hour:"1 oră",hours:"{hours} ore",minute:"1 minut",minutes:"{minutes} minute",now:"acum",midnight:"miezul nopții",noon:"amiază",at_sun_event:"la {sunEvent}",sun_event_sunrise:"răsărit",sun_event_sunset:"apus"},Ki={one_additional_task:"încă o sarcină",x_additional_tasks:"încă {count} sarcini"},Gi={scheduler:"Planificator",actions:Ri,instructions:Fi,fields:Ii,days_short:Mi,days_long:Li,words:Vi,services:Ui,service_parameters:qi,domains:Hi,days:Qi,time:Bi,misc:Ki},Wi={add:"добавить",cancel:"отменить",next:"далее",save:"сохранить",delete:"удалить"},Yi={no_group_selected:"Необходимо выбрать группу",no_entity_selected:"Необходимо выбрать объект",no_groups_defined:"Ни одной группы не создано",no_entities_for_group:"В этой группе нет объектов",no_actions_for_entity:"Для этого объекта нет действий",no_entries_defined:"Объекты отсутствуют"},Ji={group:"Группа",entity:"Объект",action:"Действие",days:"Дни",time:"Время",options:"Опции",day_type_daily:"ежедневно",day_type_weekdays:"по будням",day_type_weekend:"weekend",day_type_custom:"выбрать дни"},Zi={mon:"пн",tue:"вт",wed:"ср",thu:"чт",fri:"пт",sat:"сб",sun:"вс"},Xi={mon:"понедельник",tue:"вторник",wed:"среда",thu:"четверг",fri:"пятница",sat:"суббота",sun:"воскресенье"},es={and:"и",before:"до",after:"после"},ts={turn_on:"включить",turn_on_brightness:"включить {на brightness}",turn_off:"выключить",close_cover:"закрыть",open_cover:"открыть",set_temperature:"задать температуру {к temperature}",set_temperature_hvac_mode_heat:"обогрев {к temperature}",set_temperature_hvac_mode_cool:"охлаждение {к temperature}",set_cover_position:"установить позицию {position}",set_hvac_mode:"установить режим {hvac_mode}",set_hvac_mode_hvac_mode_off:"выключить",set_preset_mode:"выбрать набор настроек {preset_mode}",set_value:"установить значение {value}",select_option:"выбрать вариант {option}",select_source:"выбрать источник {source}",start:"запуск",run_script:"запустить"},rs={brightness:"Яркость",temperature:"Температура",position:"Позицию",hvac_mode:"режим",preset_mode:"предуставновлено"},is={camera:"Камеры",climate:"Климат",cover:"Жалюзи",fan:"Вентиляторы",group:"Группы",input_boolean:"Переключатели",input_number:"Числа",input_select:"Списки",media_player:"Медиаплееры",scene:"Сцены",light:"Освещение",switch:"Выключатели",vacuum:"Пылесосы"},ss={tomorrow:"завтра",daily:"ежедневно",daily_except_days:"каждый день исключая {days}",working_days:"рабочие дни",weekend:"выходные",interval:"{startDay} до {endDay}"},as={absolute:"в {time}",relative:"в {time}",interval:"с {startTime} до {endTime}",seconds:"{seconds} секунд",hour:"1 час",hours:"{hours} часов",minute:"1 минута",minutes:"{minutes} минут",now:"сейчас",midnight:"полночь",noon:"полдень",at_sun_event:"на {sunEvent}",sun_event_sunrise:"восходе",sun_event_sunset:"закате"},ns={one_additional_task:"1 задача",x_additional_tasks:"{count} задач"},os={scheduler:"Планирование",actions:Wi,instructions:Yi,fields:Ji,days_short:Zi,days_long:Xi,words:es,services:ts,service_parameters:rs,domains:is,days:ss,time:as,misc:ns},cs={cs:qe,de:it,en:gt,es:Dt,et:Qt,es_419:Dt,fr:ar,hu:_r,it:Ar,nb:oi,nl:Kr,nn:oi,no:oi,pl:wi,pt:Ni,pt_BR:Ni,ro:Object.freeze({__proto__:null,scheduler:"Planificator",actions:Ri,instructions:Fi,fields:Ii,days_short:Mi,days_long:Li,words:Vi,services:Ui,service_parameters:qi,domains:Hi,days:Qi,time:Bi,misc:Ki,default:Gi}),ru:Object.freeze({__proto__:null,scheduler:"Планирование",actions:Wi,instructions:Yi,fields:Ji,days_short:Zi,days_long:Xi,words:es,services:ts,service_parameters:rs,domains:is,days:ss,time:as,misc:ns,default:os})};function ls(e,t="",r=""){const i=ds();var s;try{if("test"==i)return"TRANSLATED";s=e.split(".").reduce((e,t)=>e[t],cs[i])}catch(t){s=e.split(".").reduce((e,t)=>e[t],cs.en)}if(void 0===s&&(s=e.split(".").reduce((e,t)=>e[t],cs.en)),""!==t&&""!==r)if(Array.isArray(t)||Array.isArray(r))for(var a=0;a=0?Math.floor(e/60):Math.ceil(e/60),i=e-60*r;return i%t!=0&&(i=Math.round(i/t)*t),i>=60&&(r++,i-=60),r>=24&&(r-=24),60*r+i}function fs(e,t={}){const r=!!t.amPm&&t.amPm,i=!!t.absolute&&t.absolute;e>=1440&&(e-=1440);let s=e>=0?Math.floor(e/60):Math.ceil(e/60);const a=e-60*s;let n="";r&&(n=s>=12?"PM":"AM",(s>12||12==s&&a>0)&&(s-=12));const o=String(Math.abs(s)).padStart(2,"0"),c=String(Math.abs(a)).padStart(2,"0"),l=s<0||a<0;return{hours:o,minutes:c,time:`${l&&!i?"-":""}${o}:${c}${r?" "+n:""}`,signed:l,amPm:n}}function gs(e,t={}){const r=t.stepSize?t.stepSize:1,i=!!t.signed&&t.signed,s=t.max?t.max:1440,a=vs(e,r);return a<0&&!i?e+=1440:a>=1440&&(e-=1440),a<-s?-s:a>s?s:e}function ys(e){let t,r,i;if("object"==typeof e)return ys(`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`);if(null!==(i=/^([0-9]{2}):([0-9]{2})$/.exec(e)))[t,r]=[Number(i[1]),Number(i[2])];else if(null!==(i=/^([0-9]{2})([0-9]{2})$/.exec(e)))[t,r]=[Number(i[1]),Number(i[2])];else{if(null!==(i=/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[\+|\-][0-9]{2}:[0-9]{2}$/.exec(e))){const e=new Date(i[0]);return ys(`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`)}console.log(`failed to parse timestamp '${e}'`)}return 60*t+r}function _s(e){return e.type==ms.Daily?[1,2,3,4,5,6,7]:e.type==ms.Workday?[1,2,3,4,5]:e.type==ms.Weekend?[6,7]:e.type==ms.Custom?e.custom_days:[]}function bs(e){return e==ps.Sunrise?"sunrise":"sunset"}function ws(e){let t=e.getDay();return 0==t&&(t=7),t}function Es(e,t){const r=new Date,i=Math.round((e.valueOf()-r.valueOf())/1e3);if(i<5)return ls("time.now");if(i<60)return ls("time.relative","{time}",ls("time.seconds","{seconds}",String(i)));if(i<3300){const e=i%60,t=Math.round(i/60);if(e<5||e>55)return ls("time.relative","{time}",1==t?ls("time.minute"):ls("time.minutes","{minutes}",String(t)));if(1==Math.floor(i/60)){const e=Math.round(i-60);return ls("time.relative","{time}",`${ls("time.minute")} ${ls("words.and")} ${ls("time.seconds","{seconds}",String(e))}`)}return ls("time.relative","{time}",ls("time.minutes","{minutes}",String(t)))}if(1==Math.floor(i/3600)){const e=Math.round(i/60-60);return ls("time.relative","{time}",`${ls("time.hour")} ${ls("words.and")} ${ls("time.minutes","{minutes}",String(e))}`)}const s=Math.round(i/3600);if(s<=6)return ls("time.relative","{time}",1==s?ls("time.hour"):ls("time.hours","{hours}",String(s)));const a=new Date;a.setHours(0,0,0,0);const n=Math.floor((e.valueOf()-a.valueOf())/864e5),o=""+fs(ys(e),{amPm:null==t?void 0:t.amPm}).time;return 0==n?12==e.getHours()&&0==e.getMinutes()?ls("time.absolute","{time}",ls("time.noon")):ls("time.absolute","{time}",o):1==n?0==e.getHours()&&0==e.getMinutes()?ls("time.absolute","{time}",ls("time.midnight")):12==e.getHours()&&0==e.getMinutes()?`${ls("days.tomorrow")} ${ls("time.absolute","{time}",ls("time.noon"))}`:`${ls("days.tomorrow")} ${ls("time.absolute","{time}",o)}`:`${function(e){switch(e){case 1:return ls("days_long.mon");case 2:return ls("days_long.tue");case 3:return ls("days_long.wed");case 4:return ls("days_long.thu");case 5:return ls("days_long.fri");case 6:return ls("days_long.sat");case 7:return ls("days_long.sun");default:return""}}(ws(e))} ${ls("time.absolute","{time}",o)}`}!function(e){e.Sunrise="SUNRISE",e.Sunset="SUNSET"}(ps||(ps={})),function(e){e.Daily="DAILY",e.Workday="WORKDAY",e.Weekend="WEEKEND",e.Custom="CUSTOM"}(ms||(ms={}));const Ps=[{id:1,name:ls("days_short.mon")},{id:2,name:ls("days_short.tue")},{id:3,name:ls("days_short.wed")},{id:4,name:ls("days_short.thu")},{id:5,name:ls("days_short.fri")},{id:6,name:ls("days_short.sat")},{id:7,name:ls("days_short.sun")}],Ss=[{id:ms.Daily,name:ls("fields.day_type_daily")},{id:ms.Workday,name:ls("fields.day_type_workday")},{id:ms.Weekend,name:ls("fields.day_type_weekend")},{id:ms.Custom,name:ls("fields.day_type_custom")}];var ks;!function(e){e.Overview="OVERVIEW",e.NewSchedule="NEW_SCHEDULE",e.TimePicker="TIME_PICKER",e.TimeScheme="TIME_SCHEME",e.Options="OPTIONS"}(ks||(ks={}));const xs={service:"turn_on",icon:"power"},$s={service:"turn_off",icon:"power-off"},Os=/^([0-9]+)?D([0-7]+)?T([0-9SRDUW]+)T?([0-9SRDUW]+)?(A[A0-9]+)+(C([C0-9]+))?(F([F0-9]+))?$/,js=/^([0-9]{4})?([SRDUW]{2})([0-9]{4})?$/;function Cs(e){var t,r,i;const s=Os.exec(e),a={time:{value:0},days:{type:ms.Daily},actions:[]};if(s[1])"15"==s[1]?Object.assign(a,{days:{type:ms.Workday}}):"67"==s[1]&&Object.assign(a,{days:{type:ms.Weekend}});else{const e=s[2].split("").map(Number);e.sort(),1==e.length&&0==e[0]||Object.assign(a,{days:{type:ms.Custom,custom_days:e.filter(e=>0!=e)}})}const n=js.exec(s[3]);if(n?Object.assign(a,{time:{event:"SR"==n[2]?ps.Sunrise:ps.Sunset,value:n[1]?-ys(n[1]):ys(n[3])}}):Object.assign(a,{time:{value:ys(s[3])}}),s[4]){const e=js.exec(s[4]);e?Object.assign(a,{endTime:{event:"SR"==e[2]?ps.Sunrise:ps.Sunset,value:e[1]?-ys(e[1]):ys(e[4])}}):Object.assign(a,{endTime:{value:ys(s[4])}})}const o=null===(t=s[5].match(/A[0-9]+/g))||void 0===t?void 0:t.map(e=>Number(e.substring(1)));if(Object.assign(a,{actions:o}),s[6]){let e=null===(r=s[6].match(/C[0-9]+/g))||void 0===r?void 0:r.map(e=>Number(e.substring(1)));1==(null==e?void 0:e.length)&&s[7].length>1?(e=s[7].split("").map(Number),Object.assign(a,{conditions:{type:Oe.All,items:e}})):Object.assign(a,{conditions:{type:Oe.Any,items:e}})}if(s[8]){const e=null===(i=s[8].match(/F[0-9]+/g))||void 0===i?void 0:i.map(e=>Number(e.substring(1)));Object.assign(a,{options:e})}return a}const Ds=["disarmed","armed_away","armed_home","armed_night"];function zs(e){return{type:xe.Level,field:e.field,min:e.min||0,max:e.max||255,step:e.step||1,optional:e.optional||!1,unit:e.unit||""}}function As(e){return{type:xe.List,field:e.field,options:e.options}}function Ts(e,t={}){let r={value:String(e)};return t.icons&&e in t.icons&&(r=Object.assign(Object.assign({},r),{icon:t.icons[e]})),t.name&&(r=Object.assign(Object.assign({},r),{name:t.name})),r}const Ns={heat:"fire",cool:"snowflake",heat_cool:"thermometer",auto:"autorenew",dry:"water-percent",fan_only:"fan"};const Rs=e=>{switch(e.attributes.device_class){case"garage":return"garage";case"door":return"door-closed";case"shutter":return"window-shutter";case"blind":return"blinds";case"window":return"window-closed";default:return"window-shutter"}},Fs=e=>{switch(e.attributes.device_class){case"garage":return"garage-open";case"door":return"door-open";case"shutter":return"window-shutter-open";case"blind":return"blinds-open";case"window":return"window-open";default:return"window-shutter-open"}},Is=["open","closed"],Ms={off:"fan-off",low:"fan-speed-1",medium:"fan-speed-2",high:"fan-speed-3"};const Ls={normal:"account-outline",eco:"leaf",away:"car-traction-control",boost:"rocket-launch-outline",comfort:"car-seat-cooler",home:"home-outline",sleep:"sleep",auto:"autorenew",baby:"baby-bottle-outline"};const Vs=[{service:"unlock",icon:"lock-open-variant-outline"},{service:"lock",icon:"lock-outline"}],Us=["locked","unlocked"];function qs(e){const t=Se(e.entity_id);e.attributes.supported_features;switch(t){case"alarm_control_panel":return(e=>{const t=e.attributes.supported_features;let r=[{service:"alarm_disarm",icon:"lock-open-variant-outline"}];return 1&t&&r.push({service:"alarm_arm_home",icon:"home-outline"}),2&t&&r.push({service:"alarm_arm_away",icon:"exit-run"}),4&t&&r.push({service:"alarm_arm_night",icon:"power-sleep"}),16&t&&r.push({service:"alarm_arm_custom_bypass",icon:"shield-lock-outline"}),r})(e);case"climate":return function(e){const t=e.attributes.supported_features,r=e.attributes.preset_modes,i=e.attributes.hvac_modes,s=i.filter(e=>!["off","heat","cool","heat_cool"].includes(e)),a=zs({field:"temperature",min:e.attributes.min_temp,max:e.attributes.max_temp,step:.5});let n=[];return i.includes("off")?n.push({service:"set_hvac_mode",service_data:{hvac_mode:"off"},icon:"power"}):n.push($s),i.includes("heat")&&1&t&&n.push({service:"set_temperature",service_data:{hvac_mode:"heat"},variable:a,icon:Ns.heat}),i.includes("cool")&&1&t&&n.push({service:"set_temperature",service_data:{hvac_mode:"cool"},variable:a,icon:Ns.cool}),!i.includes("heat")&&!i.includes("cool")&&1&t&&n.push({service:"set_temperature",variable:a,icon:"thermometer"}),i.length>1&&s.length&&n.push({service:"set_hvac_mode",variable:As({field:"hvac_mode",options:s.map(e=>Ts(e,{icons:Ns}))}),icon:"cog-transfer-outline"}),r&&r.length&&16&t&&n.push({service:"set_preset_mode",variable:As({field:"preset_mode",options:r.map(e=>Ts(e))}),icon:"cloud-download-outline"}),n}(e);case"cover":return function(e){const t=e.attributes.supported_features;let r=[{service:"open_cover",icon:Fs(e)},{service:"close_cover",icon:Rs(e)}];return 4&t&&r.push({supported_feature:4,service:"set_cover_position",variable:zs({field:"position",min:0,max:100,unit:"%"}),icon:"ray-vertex"}),r}(e);case"fan":return function(e){const t=e.attributes.supported_features,r=e.attributes.speed_list;let i=[xs,$s];return 1&t&&r&&r.length>1&&i.push({service:"set_speed",variable:As({field:"speed",options:r.map(e=>Ts(e,{icons:Ms}))}),icon:"weather-windy"}),2&t&&i.push({service:"oscillate",variable:As({field:"oscillating",options:[{value:"True"},{value:"False"}]}),icon:"arrow-left-right"}),4&t&&i.push({service:"set_direction",variable:As({field:"direction",options:[{value:"forward"},{value:"reverse"}]}),icon:"cog-clockwise"}),i}(e);case"group":return function(e){return e.attributes.entity_id,[xs,$s]}(e);case"humidifer":return function(e){const t=e.attributes.supported_features,r=e.attributes.available_modes,i=zs({field:"humidity",min:e.attributes.min_humidity,max:e.attributes.max_humidity,step:1,unit:"%"});let s=[];return s.push({service:"set_humidity",variable:i}),r&&r.length>1&&1&t&&s.push({service:"set_mode",variable:As({field:"mode",options:r.map(e=>Ts(e,{icons:Ls}))})}),s}(e);case"input_boolean":return[Object.assign(Object.assign({},xs),{icon:"flash"}),Object.assign(Object.assign({},$s),{icon:"flash-off"})];case"input_number":return function(e){return[{service:"set_value",variable:zs({field:"value",min:Number(e.attributes.min),max:Number(e.attributes.max),step:Number(e.attributes.step)}),icon:"counter"}]}(e);case"input_select":return function(e){const t=e.attributes.options;return t.length<2?[]:[{service:"select_option",variable:As({field:"option",options:t.map(e=>({value:e}))}),icon:"counter"}]}(e);case"light":return function(e){const t=e.attributes.supported_features,r=zs({field:"brightness",min:0,max:255,unit:"%",optional:!0});let i=[];return i.push(Object.assign(Object.assign({},$s),{icon:"lightbulb-off"})),1&t?i.push(Object.assign(Object.assign({},xs),{icon:"lightbulb",variable:r})):i.push(Object.assign(Object.assign({},xs),{icon:"lightbulb"})),i}(e);case"lock":return Vs;case"media_player":return function(e){const t=Array(e.attributes.source_list),r=e.attributes.supported_features;let i=[];return 128&r&&i.push(xs),256&r&&i.push($s),2048&r&&t.length>1&&i.push({service:"select_source",variable:As({field:"source",options:t.map(e=>({value:e}))}),icon:"music-box-multiple-outline"}),i}(e);case"scene":return[Object.assign(Object.assign({},xs),{icon:"play"})];case"script":return function(e){let t=[xs,$s];return t.push({service:ke(e.entity_id),icon:"play",name:ls("services.run_script")}),t}(e);case"switch":return[Object.assign(Object.assign({},xs),{icon:"flash"}),Object.assign(Object.assign({},$s),{icon:"flash-off"})];case"vacuum":return function(e){const t=e.attributes.supported_features;let r=[];return 1&t&&r.push(xs),8192&t&&r.push({service:"start",icon:"play-circle-outline"}),4&t&&r.push({service:"start_pause",icon:"play-circle-outline"}),r}(e);case"water_heater":return function(e){const t=e.attributes.supported_features,r=e.attributes.operation_list,i=zs({field:"temperature",min:e.attributes.min_temp,max:e.attributes.max_temp,step:.5});let s=[];return 1&t&&s.push({service:"set_temperature",variable:i,icon:"thermometer"}),2&t&&s.push({service:"set_operation_mode",variable:As({field:"operation_mode",options:r.map(e=>({value:e}))}),icon:"cog-transfer-outline"}),4&t&&s.push({service:"set_away_mode",variable:As({field:"mode",options:[{value:"on",icon:"toggle-switch-outline"},{value:"off",icon:"toggle-switch-off-outline"}]}),icon:"car-traction-control"}),s}(e);default:return[]}}function Hs(e,t){let r=!1;if(e.match(/^[a-z0-9_\.]+$/))r=e.includes(".")?e==t:e==Se(t);else try{if(e.startsWith("/")&&e.endsWith("/")||-1!==e.indexOf("*")){e.startsWith("/")||(e=`/^${e=e.replace(/\./g,".").replace(/\*/g,".*")}$/`);r=new RegExp(e.slice(1,-1)).test(t)}}catch(e){}return r}function Qs(e,t){return!(!t.include||!t.include.length)&&(!(t.include&&!t.include.find(t=>Hs(t,e)))&&(!t.exclude||!t.exclude.find(t=>Hs(t,e))))}const Bs={alarm_control_panel:"alarm-light-outline",automation:"playlist-play",binary_sensor:"radiobox-blank",camera:"camera",climate:"home-thermometer-outline",cover:"window-shutter",device_tracker:"account",fan:"fan",group:"google-circles-communities",humidifier:"air-humidifier",input_boolean:"drawing",input_number:"ray-vertex",input_select:"format-list-bulleted",input_text:"textbox",light:"lightbulb-outline",lock:"lock-open-outline",media_player:"cast-connected",notify:"comment-alert",person:"account-outline",remote:"remote",scene:"palette-outline",script:"file-document",sensor:"eye",switch:"flash",timer:"timer",vacuum:"robot-vacuum",water_heater:"water-boiler"},Ks=e=>{const t=Se(e.entity_id);switch(t){case"binary_sensor":return(e=>{switch(e.attributes.device_class){case"battery":return"battery-outline";case"cold":return"snowflake";case"connectivity":return"server-network";case"door":return"door-closed";case"garage_door":return"hass:garage";case"gas":case"power":case"problem":case"safety":case"smoke":return"shield-check";case"heat":return"fire";case"light":return"brightness-5";case"lock":return"lock";case"moisture":return"water";case"motion":return"walk";case"occupancy":case"presence":return"home-outline";case"opening":return"hass:square";case"plug":return"hass:power-plug-outline";case"sound":return"music-note";case"vibration":return"vibrate";case"window":return"window-closed";default:return"radiobox-blank"}})(e);case"cover":return Rs(e);case"sensor":return(e=>{switch(e.attributes.device_class){case"humidity":return"water-percent";case"illuminance":return"brightness-5";case"temperature":return"thermometer";case"power":return"flash";case"pressure":return"gauge";case"signal_strength":return"wifi";default:return"°C"==e.attributes.unit_of_measurement||"°F"==e.attributes.unit_of_measurement?"thermometer":"eye"}})(e);default:return t in Bs?Bs[t]:"folder-outline"}},Gs=e=>{switch(Se(e.entity_id)){case"alarm_control_panel":return Ds;case"binary_sensor":case"cover":return Is;case"input_boolean":case"switch":return["on","off"];case"lock":return Us;case"person":return["home","not_home"];default:return}};function Ws(e,t){return e?Object.entries(e).filter(([e])=>t.includes(e)).reduce((e,[t,r])=>Object.assign(e,{[t]:r}),{}):{}}function Ys(e,t){return e?Object.entries(e).filter(([e])=>!t.includes(e)).reduce((e,[t,r])=>Object.assign(e,{[t]:r}),{}):{}}function Js(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Zs(e){return"string"!=typeof e&&(e=String(e)),Js(e.replace(/_/g," "))}function Xs(e){if(e)return"string"!=typeof e&&(e=String(e)),e.match(/^[a-z]+:[a-z0-9-]+$/i)?e:"hass:"+e}function ea(e){const t=e=>Object.entries(e).sort((e,t)=>e[0]>t[0]?1:-1).map(([e,r])=>[e,"object"==typeof r&&null!==r?t(r):r]).reduce((e,[t,r])=>Object.assign(e,{[t]:r}),{});let r=Ws(e,["service","service_data"]);r=t(r);return Object.values(r).map(e=>JSON.stringify(e).replace(/[\W]/g," ").split(" ").filter(e=>" "!=e&&""!=e).join("_")).join("_")}function ta(e){const t=e.service;let r={id:"",name:e.name,icon:e.icon||"flash",service:t};return e.service_data&&Object.keys(e.service_data).length&&Object.assign(r,{service_data:e.service_data}),e.variable&&("options"in e.variable?Object.assign(r,{variable:As(e.variable)}):Object.assign(r,{variable:zs(e.variable)})),Object.assign(r,{id:ea(r)}),r}function ra(e){let t=e.entity,r=e.service;const i=Se(t),s=Se(r);i&&s?i==s&&(r=ke(r)):i||(t=s+"."+t,r=ke(r));let a=Ys(e,["service","entity","service_data"]),n={entity:t,service:r};return a=Object.assign(Object.assign({},a),e.service_data),Object.keys(a).length&&(n=Object.assign(Object.assign({},n),{service_data:a})),n}function ia(e,t){const r=e.actions.map(ta),i=ea(Ys(t,["entity"]));return r.map(e=>{if(e.id==i)return!0;if(e.variable&&t.service_data&&Object.keys(t.service_data).includes(e.variable.field)){let r=Object.entries(t.service_data).filter(([t])=>t!=e.variable.field).reduce((e,[t,r])=>Object.assign(e,{[t]:r}),{}),i=Object.keys(r).length?Object.assign(Object.assign({},t),{service_data:r}):Ys(t,["service_data"]);return e.id==ea(i)}return!1}).map((e,t)=>e?t:null).filter(e=>null!==e)}function sa(e,t){const r=ia(e,t);return r.length?ta(e.actions[r[0]]):ta(Ys(t,["entity"]))}function aa(e){return e.match(/^switch.schedule_[0-9a-f]{6}$/)}function na(e,t){if(!e)return;const r="string"==typeof e?e:e.entity_id;let i={id:r,name:e.attributes.friendly_name||ke(r),icon:"folder-outline",actions:[]};if((void 0===t.standard_configuration||t.standard_configuration)&&(i=Object.assign(Object.assign({},i),{actions:[...qs(e)],icon:Ks(e),states:Gs(e)})),i=Object.assign(Object.assign({},i),{icon:e.attributes.icon||i.icon}),t.customize){Object.entries(t.customize).filter(([e])=>Hs(e,r)).map(([,e])=>e).forEach(e=>{if(i=Object.assign(Object.assign({},i),Ys(e,["actions","exclude_actions"])),e.actions&&e.actions.forEach(e=>{const t=ia(i,e);let r=i.actions;t.length?r=i.actions.map((r,i)=>t.includes(i)?Object.assign(r,e):r):i.actions.push(e),i=Object.assign(Object.assign({},i),{actions:r})}),e.exclude_actions){let t=e.exclude_actions.map(e=>e.replace(/_/g," ").trim().toLowerCase());i.exclude_actions&&(t=t.concat(i.exclude_actions).filter((e,t,r)=>r.indexOf(e)===t)),i=Object.assign(Object.assign({},i),{exclude_actions:t})}})}return i}function oa(e,t,r){const i="object"==typeof e?e.entity_id:e;if(aa(i))return!1;if(!(Qs(i,t)||t.groups&&t.groups.some(e=>Qs(i,e))))return!1;if(r&&"object"==typeof e){const i=na(e,t);if(!i)return!1;if(r.states&&!i.states)return!1;if(r.actions&&!i.actions.length)return!1}return!0}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function ca(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var la=ca((function(e,t){ +(window.litElementVersions||(window.litElementVersions=[])).push("2.4.0");const re={};class ie extends G{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const e=this.getStyles();if(Array.isArray(e)){const t=(e,r)=>e.reduceRight((e,r)=>Array.isArray(r)?t(r,e):(e.add(r),e),r),r=t(e,new Set),i=[];r.forEach(e=>i.unshift(e)),this._styles=i}else this._styles=void 0===e?[]:[e];this._styles=this._styles.map(e=>{if(e instanceof CSSStyleSheet&&!Z){const t=Array.prototype.slice.call(e.cssRules).reduce((e,t)=>e+t.cssText,"");return new ee(String(t),X)}return e})}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?Z?this.renderRoot.adoptedStyleSheets=e.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map(e=>e.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(e){const t=this.render();super.update(e),t!==re&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(e=>{const t=document.createElement("style");t.textContent=e.cssText,this.renderRoot.appendChild(t)}))}render(){return re}}ie.finalized=!0,ie.render=(e,t,r)=>{if(!r||"object"!=typeof r||!r.scopeName)throw new Error("The `scopeName` option is required.");const s=r.scopeName,a=R.has(t),n=L&&11===t.nodeType&&!!t.host,o=n&&!q.has(s),c=o?document.createDocumentFragment():t;if(((e,t,r)=>{let s=R.get(t);void 0===s&&(i(t,t.firstChild),R.set(t,s=new $(Object.assign({templateFactory:T},r))),s.appendInto(t)),s.setValue(e),s.commit()})(e,c,Object.assign({templateFactory:V(s)},r)),o){const e=R.get(c);R.delete(c);const r=e.value instanceof _?e.value.template:void 0;H(s,c,r),i(t,t.firstChild),t.appendChild(c),R.set(t,e)}!a&&n&&window.ShadyCSS.styleElement(t.host)};var se=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,ae="[^\\s]+",ne=/\[([^]*?)\]/gm;function oe(e,t){for(var r=[],i=0,s=e.length;i-1?i:null}};function le(e){for(var t=[],r=1;r3?0:(e-e%10!=10?1:0)*e%10]}},me=le({},pe),ve=function(e,t){for(void 0===t&&(t=2),e=String(e);e.length0?"-":"+")+ve(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+ve(Math.floor(Math.abs(t)/60),2)+":"+ve(Math.abs(t)%60,2)}},ge=function(e){return+e-1},ye=[null,"[1-9]\\d?"],_e=[null,ae],be=["isPm",ae,function(e,t){var r=e.toLowerCase();return r===t.amPm[0]?0:r===t.amPm[1]?1:null}],we=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var t=(e+"").match(/([+-]|\d\d)/gi);if(t){var r=60*+t[1]+parseInt(t[2],10);return"+"===t[0]?r:-r}return 0}],Ee=(ce("monthNamesShort"),ce("monthNames"),{default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"});var Pe=function(e,t,r){if(void 0===t&&(t=Ee.default),void 0===r&&(r={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");var i=[];t=(t=Ee[t]||t).replace(ne,(function(e,t){return i.push(t),"@@@"}));var s=le(le({},me),r);return(t=t.replace(se,(function(t){return fe[t](e,s)}))).replace(/@@@/g,(function(){return i.shift()}))};(function(){try{(new Date).toLocaleDateString("i")}catch(e){return"RangeError"===e.name}})(),function(){try{(new Date).toLocaleString("i")}catch(e){return"RangeError"===e.name}}(),function(){try{(new Date).toLocaleTimeString("i")}catch(e){return"RangeError"===e.name}}();function Se(e){return e.substr(0,e.indexOf("."))}function ke(e){return e.substr(e.indexOf(".")+1)}var xe,$e,Oe,je=function(e,t,r,i){i=i||{},r=null==r?{}:r;var s=new Event(t,{bubbles:void 0===i.bubbles||i.bubbles,cancelable:Boolean(i.cancelable),composed:void 0===i.composed||i.composed});return s.detail=r,e.dispatchEvent(s),s};!function(e){e.Level="LEVEL",e.List="LIST"}(xe||(xe={})),function(e){e.Equal="is",e.Unequal="not",e.Below="below",e.Above="above"}($e||($e={})),function(e){e.Any="or",e.All="and"}(Oe||(Oe={}));var Ce={add:"přidat plán",cancel:"zrušit",next:"další",save:"uložit",delete:"smazat"},De={no_group_selected:"Vyberte skupinu",no_entity_selected:"Vyberte entitu",no_groups_defined:"Nejsou definovány žádné skupiny",no_entities_for_group:"V této skupině nejsou žádné entity",no_actions_for_entity:"Pro tuto entitu neexistují žádné akce",no_entries_defined:"Nejsou žádné položky k zobrazení"},ze={group:"Skupiny",entity:"Entity",action:"Akce",days:"Dny",time:"Čas",options:"Možnosti",day_type_daily:"denně",day_type_workday:"pracovní dny",day_type_weekend:"víkend",day_type_custom:"možnosti"},Ae={mon:"po",tue:"út",wed:"st",thu:"čt",fri:"pá",sat:"so",sun:"ne"},Te={mon:"Pondělí",tue:"Úterý",wed:"Středa",thu:"Čtvrtek",fri:"Pátek",sat:"Sobota",sun:"Neděle"},Ne={and:"a",before:"před",after:"po"},Re={turn_on:"zapnout",turn_on_brightness:"zapnout {at brightness}",turn_off:"vypnout",close_cover:"zavřít",open_cover:"otevřít",set_temperature:"nastavená teplota {to temperature}",set_temperature_hvac_mode_heat:"topení {to temperature}",set_temperature_hvac_mode_cool:"chlazení {to temperature}",set_cover_position:"nastavit pozici {to position}",set_hvac_mode:"nastavit režim {to hvac_mode}",set_hvac_mode_hvac_mode_off:"vypnout",set_preset_mode:"předvolba {to preset_mode}",set_value:"nastavená hodnota {to value}",select_option:"vyberte možnost {option}",select_source:"vyberte zdroj {source}",start:"start",run_script:"běží"},Fe={brightness:"jas",temperature:"teplota",position:"pozice",hvac_mode:"režim",preset_mode:"přednastavení"},Ie={camera:"kamery",climate:"klima",cover:"kryty",fan:"ventilátory",group:"skupiny",input_boolean:"input_boolean",input_number:"input_number",input_select:"input_select",light:"světla",media_player:"media přehrávače",scene:"scény",switch:"spínače",vacuum:"vysavače"},Me={tomorrow:"zítra",daily:"denně",daily_except_days:"každý den kromě {days}",working_days:"pracovní dny",weekend:"víkend",interval:"{startDay} do {endDay}"},Le={absolute:"o {time}",relative:"za {time}",interval:"od {startTime} do {endTime}",seconds:"{seconds} vteřin",hour:"1 hodina",hours:"{hours} hodin",minute:"1 minuta",minutes:"{minutes} minut",now:"nyní",midnight:"půlnoc",noon:"poledne",at_sun_event:"při {sunEvent}",sun_event_sunrise:"svítání",sun_event_sunset:"západu slunce"},Ve={one_additional_task:"1 další úkol",x_additional_tasks:"{count} úkolů"},Ue={scheduler:"Plánovač",actions:Ce,instructions:De,fields:ze,days_short:Ae,days_long:Te,words:Ne,services:Re,service_parameters:Fe,domains:Ie,days:Me,time:Le,misc:Ve},qe=Object.freeze({__proto__:null,scheduler:"Plánovač",actions:Ce,instructions:De,fields:ze,days_short:Ae,days_long:Te,words:Ne,services:Re,service_parameters:Fe,domains:Ie,days:Me,time:Le,misc:Ve,default:Ue}),He={add:"hinzufügen",cancel:"abbrechen",next:"weiter",save:"speichern",delete:"löschen"},Qe={no_group_selected:"Wähle zuerst eine Gruppe aus",no_entity_selected:"Wähle zuerst eine Entity aus",no_groups_defined:"Es gibt keine Gruppe",no_entities_for_group:"Es gibt keine Entities in dieser Gruppe",no_actions_for_entity:"Es gibt keine Aktionen für diese Entity",no_entries_defined:"Es gibt keine Einträge"},Be={group:"Gruppe",entity:"Entity",action:"Aktion",days:"Tage",time:"Zeit",options:"Optionen",day_type_daily:"jeden Tag",day_type_workday:"Werktags",day_type_weekend:"Wochenende",day_type_custom:"benutzerdefiniert"},Ke={mon:"Mo",tue:"Di",wed:"Mi",thu:"Do",fri:"Fr",sat:"Sa",sun:"So"},Ge={mon:"Montag",tue:"Dienstag",wed:"Mittwoch",thu:"Donnerstag",fri:"Freitag",sat:"Samstag",sun:"Sonntag"},We={and:"und",before:"vor",after:"nach"},Ye={turn_on:"anschalten",turn_on_brightness:"anschalten {auf brightness}",turn_off:"ausschalten",close_cover:"schließen",open_cover:"öffnen",set_temperature:"Temperatur einstellen {auf temperature}",set_temperature_hvac_mode_heat:"aufwärmen {auf temperature}",set_temperature_hvac_mode_cool:"kühlen {auf temperature}",set_cover_position:"Position setzen {nach position}",set_hvac_mode:"Modus setzen {zu hvac_mode}",set_hvac_mode_hvac_mode_off:"ausschalten",set_preset_mode:"Voreinstellung setzen {zu preset_mode}",set_value:"Wert setzen {zu value}",select_option:"Option {option} auswählen",select_source:"Quelle {source} auswählen",start:"start",run_script:"ausführen"},Je={brightness:"Helligkeit",temperature:"Temperatur",position:"Position",hvac_mode:"Modus",preset_mode:"Voreinstellung"},Ze={camera:"Kameras",climate:"Heizung",cover:"Beschattung",fan:"Lüfter",group:"Gruppen",input_boolean:"input_boolean",input_number:"input_number",input_select:"input_select",light:"Licht",media_player:"Media Player",scene:"Szene",switch:"Schalter",vacuum:"Staubsauger"},Xe={tomorrow:"morgen",daily:"täglich",daily_except_days:"täglich außer {days}",working_days:"Werktags",weekend:"Wochenende",interval:"{startDay} bis {endDay}"},et={absolute:"um {time}",relative:"in {time}",interval:"von {startTime} bis {endTime}",seconds:"{seconds} Sekunden",hour:"1 Stunde",hours:"{hours} Stunden",minute:"1 Minute",minutes:"{minutes} Minuten",now:"jetzt",midnight:"Mitternacht",noon:"Mittag",at_sun_event:"am {sunEvent}",sun_event_sunrise:"Sonnenaufgang",sun_event_sunset:"Sonnenuntergang"},tt={one_additional_task:"1 weitere Aufgabe",x_additional_tasks:"{count} weitere Aufgaben"},rt={scheduler:"Zeitplaner",actions:He,instructions:Qe,fields:Be,days_short:Ke,days_long:Ge,words:We,services:Ye,service_parameters:Je,domains:Ze,days:Xe,time:et,misc:tt},it=Object.freeze({__proto__:null,scheduler:"Zeitplaner",actions:He,instructions:Qe,fields:Be,days_short:Ke,days_long:Ge,words:We,services:Ye,service_parameters:Je,domains:Ze,days:Xe,time:et,misc:tt,default:rt}),st={add:"add item",cancel:"cancel",next:"next",save:"save",delete:"delete"},at={no_group_selected:"Select a group first",no_entity_selected:"Select an entity first",no_groups_defined:"There are no groups defined",no_entities_for_group:"There are no entities in this group",no_actions_for_entity:"There are no actions for this entity",no_entries_defined:"There are no items to show"},nt={group:"Group",entity:"Entity",action:"Action",days:"Days",time:"Time",options:"Options",day_type_daily:"daily",day_type_workday:"workdays",day_type_weekend:"weekend",day_type_custom:"custom"},ot={mon:"mon",tue:"tue",wed:"wed",thu:"thu",fri:"fri",sat:"sat",sun:"sun"},ct={mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday",sun:"Sunday"},lt={and:"and",before:"before",after:"after"},dt={turn_on:"turn on",turn_on_brightness:"turn on {at brightness}",turn_off:"turn off",close_cover:"close",open_cover:"open",set_temperature:"set temperature {to temperature}",set_temperature_hvac_mode_heat:"heat {to temperature}",set_temperature_hvac_mode_cool:"cool {to temperature}",set_cover_position:"set position {to position}",set_hvac_mode:"set mode {to hvac_mode}",set_hvac_mode_hvac_mode_off:"turn off",set_preset_mode:"set preset {to preset_mode}",set_value:"set value {to value}",select_option:"select option {option}",select_source:"select source {source}",start:"start",run_script:"run"},ut={brightness:"brightness",temperature:"temperature",position:"position",hvac_mode:"mode",preset_mode:"preset"},ht={camera:"cameras",climate:"climate",cover:"covers",fan:"fans",group:"groups",input_boolean:"input_boolean",input_number:"input_number",input_select:"input_select",light:"lights",media_player:"media players",scene:"scenes",switch:"switches",vacuum:"vacuum"},pt={tomorrow:"tomorrow",daily:"daily",daily_except_days:"every day except {days}",working_days:"working days",weekend:"weekend",interval:"{startDay} to {endDay}"},mt={absolute:"at {time}",relative:"in {time}",interval:"from {startTime} to {endTime}",seconds:"{seconds} seconds",hour:"1 hour",hours:"{hours} hours",minute:"1 minute",minutes:"{minutes} minutes",now:"now",midnight:"midnight",noon:"noon",at_sun_event:"at {sunEvent}",sun_event_sunrise:"sunrise",sun_event_sunset:"sunset"},vt={one_additional_task:"1 more task",x_additional_tasks:"{count} more tasks"},ft={scheduler:"Scheduler",actions:st,instructions:at,fields:nt,days_short:ot,days_long:ct,words:lt,services:dt,service_parameters:ut,domains:ht,days:pt,time:mt,misc:vt},gt=Object.freeze({__proto__:null,scheduler:"Scheduler",actions:st,instructions:at,fields:nt,days_short:ot,days_long:ct,words:lt,services:dt,service_parameters:ut,domains:ht,days:pt,time:mt,misc:vt,default:ft}),yt={add:"Agregar",cancel:"cancelar",next:"siguiente",save:"guardar",delete:"borrar"},_t={no_group_selected:"Selecciona un grupo primero",no_entity_selected:"Selecciona una entidad primero",no_groups_defined:"No hay grupos definidos",no_entities_for_group:"No hay entidades en este grupo",no_actions_for_entity:"No hay acciones para esta entidad",no_entries_defined:"No hay dispositivos definidos"},bt={group:"Grupo",entity:"Entidad",action:"Acción",days:"Días",time:"Hora",options:"Opciones",day_type_daily:"cada día",day_type_weekdays:"dias semanales",day_type_weekend:"fin de semana",day_type_custom:"personalizado"},wt={mon:"lun",tue:"mar",wed:"mie",thu:"jue",fri:"vie",sat:"sab",sun:"dom"},Et={mon:"lunes",tue:"martes",wed:"miércoles",thu:"jueves",fri:"viernes",sat:"sábado",sun:"domingo"},Pt={and:"y",before:"antes",after:"después"},St={turn_on:"encender",turn_on_brightness:"encender {a brightness}",turn_off:"apagar",close_cover:"cerrar",open_cover:"abrir",set_temperature:"establecer temperatura {a temperature}",set_temperature_hvac_mode_heat:"calentar {a temperature}",set_temperature_hvac_mode_cool:"enfriar {a temperature}",set_to:"establecer a",set_cover_position:"establecer posición {a position}",set_hvac_mode:"establecer modo {a hvac_mode}",set_hvac_mode_hvac_mode_off:"apagar",set_preset_mode:"establecer modo {a preset_mode}",set_value:"establecer valor {value}",select_option:"seleccionar opción {option}",select_source:"seleccionar fuente {source}",start:"empezar",run_script:"ejecutar"},kt={brightness:"brillo",temperature:"temperatura",position:"posición",hvac_mode:"modo",preset_mode:"pre-ajuste"},xt={camera:"cámaras",climate:"climatización",cover:"persiana",fan:"ventilador",group:"grupo",input_boolean:"input_boolean",input_number:"input_number",input_select:"input_select",light:"luces",media_player:"reproductor multimedia",scene:"escena",switch:"interruptor",vacuum:"aspirador"},$t={tomorrow:"mañana",daily:"a diario",daily_except_days:"todos los dias excepto {days}",working_days:"días hábiles",weekend:"fin de semana",interval:"{startDay} a {endDay}"},Ot={absolute:"a las {time}",relative:"en {time}",interval:"desde las {startTime} a las {endTime}",seconds:"{seconds} segundos",hour:"1 hora",hours:"{hours} horas",minute:"1 minuto",minutes:"{minutes} minutos",now:"ahora",midnight:"medianoche",noon:"mediodía",at_sun_event:"al {sunEvent}",sun_event_sunrise:"amanecer",sun_event_sunset:"atardecer"},jt={one_additional_task:"1 tarea más",x_additional_tasks:"{count} tareas más"},Ct={scheduler:"Programador",actions:yt,instructions:_t,fields:bt,days_short:wt,days_long:Et,words:Pt,services:St,service_parameters:kt,domains:xt,days:$t,time:Ot,misc:jt},Dt=Object.freeze({__proto__:null,scheduler:"Programador",actions:yt,instructions:_t,fields:bt,days_short:wt,days_long:Et,words:Pt,services:St,service_parameters:kt,domains:xt,days:$t,time:Ot,misc:jt,default:Ct}),zt={add:"lisa",cancel:"loobu",next:"edasi",save:"salvesta",delete:"kustuta"},At={no_group_selected:"Vali grupp",no_entity_selected:"Vali olem",no_groups_defined:"Gruppe pole määratud",no_entities_for_group:"Antud grupis puuduvad olemid",no_actions_for_entity:"Selles olemis puuduvad tegevused",no_entries_defined:"Pole midagi kuvada"},Tt={group:"Grupp",entity:"Olem",action:"Tegevus",days:"Päevad",time:"Aeg",options:"Suvandid",day_type_daily:"iga päev",day_type_weekdays:"tööpäevadel",day_type_weekend:"nädalavahetus",day_type_custom:"valikuline"},Nt={mon:"E",tue:"T",wed:"K",thu:"N",fri:"R",sat:"L",sun:"P"},Rt={mon:"Esmaspäev",tue:"Teisipäev",wed:"Kolmapäev",thu:"Neljapäev",fri:"Reede",sat:"Laupäev",sun:"Pühapäev"},Ft={and:"ja",before:"enne",after:"pärast"},It={turn_on:"lülita sisse",turn_on_brightness:"turn on {at brightness}",turn_off:"lülita välja",close_cover:"sulge",open_cover:"ava",set_temperature:"määra temperatuur {to temperature}",set_temperature_hvac_mode_heat:"heat {to temperature}",set_temperature_hvac_mode_cool:"cool {to temperature}",set_cover_position:"seadista asendisse {to position}",set_hvac_mode:"vali töörežiim {to hvac_mode}",set_hvac_mode_hvac_mode_off:"turn off",set_preset_mode:"eelseadistatud {to preset_mode}",set_value:"määra väärtus {value}",select_option:"valikud {option}",select_source:"vali allikas {source}",start:"alusta",run_script:"alusta"},Mt={brightness:"heledus",temperature:"temperatuur",position:"asend",hvac_mode:"töörežiim",preset_mode:"eelseadistus"},Lt={camera:"kaamerad",climate:"kliimaseade",cover:"(akna)katted",fan:"ventilaatorid",group:"grupid",input_boolean:"binaarsisestus",input_number:"arvsisestus",input_select:"sisendivalik",light:"valgustid",media_player:"media players",scene:"stseenid",switch:"lülitid",vacuum:"tolmuimejad"},Vt={tomorrow:"homme",daily:"iga päev",daily_except_days:"iga päev välja arvatud {days}",working_days:"tööpäevadel",weekend:"nädalavahetusel",interval:"{startDay} kuni {endDay}"},Ut={absolute:"kell {time}",relative:"{time} pärast",interval:"alates {startTime} kuni {endTime}",seconds:"{seconds} sekundit",hour:"1 tund",hours:"{hours} tundi",minute:"1 minut",minutes:"{minutes} minutit",now:"kohe",midnight:"keskööl",noon:"keskpäeval",at_sun_event:"{sunEvent}",sun_event_sunrise:"päikesetõusu",sun_event_sunset:"loojangut"},qt={one_additional_task:"veel 1 ajastus",x_additional_tasks:"{count} ajastust"},Ht={scheduler:"Ajastaja",actions:zt,instructions:At,fields:Tt,days_short:Nt,days_long:Rt,words:Ft,services:It,service_parameters:Mt,domains:Lt,days:Vt,time:Ut,misc:qt},Qt=Object.freeze({__proto__:null,scheduler:"Ajastaja",actions:zt,instructions:At,fields:Tt,days_short:Nt,days_long:Rt,words:Ft,services:It,service_parameters:Mt,domains:Lt,days:Vt,time:Ut,misc:qt,default:Ht}),Bt={add:"ajouter un item",cancel:"annuler",next:"suivant",save:"sauvegarder",delete:"effacer"},Kt={no_group_selected:"Sélectionner un groupe en premier",no_entity_selected:"Sélectionner une entité en premier",no_groups_defined:"Il n'y a pas de groupe défini",no_entities_for_group:"Il n'y a pas d'entité dans ce groupe",no_actions_for_entity:"Il n'y a pas d'action pour cette entité",no_entries_defined:"Il n'y a pas d'item à afficher"},Gt={group:"Groupe",entity:"Entité",action:"Action",days:"Jours",time:"Temps",options:"Options",day_type_daily:"chaque jour",day_type_weekdays:"en semaine",day_type_weekend:"weekend",day_type_custom:"sur mesure"},Wt={mon:"lun",tue:"mar",wed:"mer",thu:"jeu",fri:"ven",sat:"sam",sun:"dim"},Yt={mon:"lundi",tue:"mardi",wed:"mercredi",thu:"jeudi",fri:"vendredi",sat:"samedi",sun:"dimanche"},Jt={and:"et",before:"avant",after:"après"},Zt={turn_on:"allumer",turn_on_brightness:"allumer {à brightness}",turn_off:"éteindre",close_cover:"fermer",open_cover:"ouvrir",set_temperature:"régler la température {à temperature}",set_temperature_hvac_mode_heat:"heat {à temperature}",set_temperature_hvac_mode_cool:"cool {à temperature}",set_cover_position:"position définie {à position}",set_hvac_mode:"set mode {to hvac_mode}",set_hvac_mode_hvac_mode_off:"turn off",set_preset_mode:"set preset {to preset_mode}",set_value:"set value {to value}",select_option:"select option {option}",select_source:"select source {source}",start:"start",run_script:"run"},Xt={brightness:"brightness",temperature:"temperature",position:"position",hvac_mode:"mode",preset_mode:"preset"},er={camera:"cameras",climate:"climat",cover:"contrôleur",fan:"ventilateur",group:"groups",input_boolean:"input_boolean",input_number:"input_number",input_select:"input_select",light:"lumière",media_player:"media players",scene:"scenes",switch:"interrupteurs",vacuum:"aspirateur"},tr={tomorrow:"tomorrow",daily:"daily",daily_except_days:"every day except {days}",working_days:"working days",weekend:"weekend",interval:"{startDay} to {endDay}"},rr={absolute:"at {time}",relative:"in {time}",interval:"from {startTime} to {endTime}",seconds:"{seconds} seconds",hour:"1 hour",hours:"{hours} hours",minute:"1 minute",minutes:"{minutes} minutes",now:"now",midnight:"midnight",noon:"noon",at_sun_event:"at {sunEvent}",sun_event_sunrise:"sunrise",sun_event_sunset:"sunset"},ir={one_additional_task:"1 more task",x_additional_tasks:"{count} more tasks"},sr={scheduler:"Planificateur",actions:Bt,instructions:Kt,fields:Gt,days_short:Wt,days_long:Yt,words:Jt,services:Zt,service_parameters:Xt,domains:er,days:tr,time:rr,misc:ir},ar=Object.freeze({__proto__:null,scheduler:"Planificateur",actions:Bt,instructions:Kt,fields:Gt,days_short:Wt,days_long:Yt,words:Jt,services:Zt,service_parameters:Xt,domains:er,days:tr,time:rr,misc:ir,default:sr}),nr={add:"új időzítés",cancel:"mégse",next:"tovább",save:"mentés",delete:"törlés"},or={no_group_selected:"Előbb egy csoportot szükséges választani",no_entity_selected:"Előbb egy entitást szükséges választani",no_groups_defined:"Nincsenek deffiniált csoportok",no_entities_for_group:"Ebben a csoportban nem találhatók entitások",no_actions_for_entity:"Ehhez az entitáshoz nem tartoznak műveletek",no_entries_defined:"Nincs megjeleníthető elem"},cr={group:"Csoport",entity:"Entitás",action:"Művelet",days:"Napokon",time:"Időpontban",options:"Opciók",day_type_daily:"minden nap",day_type_workday:"munkanapokon",day_type_weekend:"hétvégén",day_type_custom:"egyedi"},lr={mon:"hét",tue:"ked",wed:"sze",thu:"csü",fri:"pén",sat:"szo",sun:"vas"},dr={mon:"hétfő",tue:"kedd",wed:"szerda",thu:"csütörtök",fri:"péntek",sat:"szombat",sun:"vasárnap"},ur={and:"és",before:"előtt",after:"után"},hr={turn_on:"bekapcsolás",turn_on_brightness:"bekapcsolás {at brightness}",turn_off:"kikapcsolás",close_cover:"zárás",open_cover:"nyitás",set_temperature:"hőmérséklet {to temperature}",set_temperature_hvac_mode_heat:"heat {to temperature}",set_temperature_hvac_mode_cool:"cool {to temperature}",set_cover_position:"változtass pozíciót {to position}",set_hvac_mode:"mód beállítása {to hvac_mode}",set_hvac_mode_hvac_mode_off:"kikapcsolás",set_preset_mode:"preset beállítása {to preset_mode}",set_value:"érték beállítása {value}",select_option:"opció kiválasztása {option}",select_source:"forrás kiválasztása {source}",start:"kezdés",run_script:"kezdés"},pr={brightness:"világosság",temperature:"hőmérséklet",position:"pozíció",hvac_mode:"mód",preset_mode:"preset"},mr={camera:"kamera",climate:"termosztát",cover:"redőny",fan:"ventilátor",group:"csoportok",input_boolean:"logikai bemenet",input_number:"szám bemenet",input_select:"legördülő bemenet",light:"lámpa",media_player:"lejátszó",scene:"jelenetek",switch:"kapcsoló",vacuum:"pórszívó"},vr={tomorrow:"holnap",daily:"minden nap",daily_except_days:"minden nap, kivéve {days}",working_days:"munkanapokon",weekend:"hétvégén",interval:"{startDay} - {endDay}"},fr={absolute:"{time}-kor",relative:"{time} múlva",interval:"{startTime} - {endTime}",seconds:"{seconds} másodperc",hour:"1 óra",hours:"{hours} óra",minute:"1 perc",minutes:"{minutes} perc",now:"most",midnight:"éjfél",noon:"dél",at_sun_event:"{sunEvent}kor",sun_event_sunrise:"napfelkelte",sun_event_sunset:"napnyugta"},gr={one_additional_task:"még egy feladat",x_additional_tasks:"még {count} feladat"},yr={scheduler:"Időzítések",actions:nr,instructions:or,fields:cr,days_short:lr,days_long:dr,words:ur,services:hr,service_parameters:pr,domains:mr,days:vr,time:fr,misc:gr},_r=Object.freeze({__proto__:null,scheduler:"Időzítések",actions:nr,instructions:or,fields:cr,days_short:lr,days_long:dr,words:ur,services:hr,service_parameters:pr,domains:mr,days:vr,time:fr,misc:gr,default:yr}),br={add:"aggiungi oggetto",cancel:"annulla",next:"avanti",save:"salva",delete:"elimina"},wr={no_group_selected:"Seleziona prima un gruppo",no_entity_selected:"Seleziona prima un'entità",no_groups_defined:"Non ci sono gruppi definiti",no_entities_for_group:"Non ci sono entità in questo gruppo",no_actions_for_entity:"Non ci sono azioni per questa entità",no_entries_defined:"Non ci sono oggetti da visualizzare"},Er={group:"Gruppo",entity:"Entità",action:"Azione",days:"Giorni",time:"Ora",options:"Opzioni",day_type_daily:"giornaliero",day_type_workday:"giorni lavorativi",day_type_weekend:"weekend",day_type_custom:"personalizzato"},Pr={mon:"lun",tue:"mar",wed:"mer",thu:"gio",fri:"ven",sat:"sab",sun:"dom"},Sr={mon:"lunedì",tue:"martedì",wed:"mercoledì",thu:"giovedì",fri:"venerdì",sat:"sabato",sun:"domenica"},kr={and:"e",before:"prima",after:"dopo"},xr={turn_on:"accendi",turn_on_brightness:"accendi {at brightness}",turn_off:"spegni",close_cover:"chiudi",open_cover:"apri",set_temperature:"imposta temperatura {to temperature}",set_temperature_hvac_mode_heat:"aumenta {to temperature}",set_temperature_hvac_mode_cool:"diminuisci {to temperature}",set_cover_position:"imposta posizione {to position}",set_hvac_mode:"imposta modalità {to hvac_mode}",set_hvac_mode_hvac_mode_off:"spegni",set_preset_mode:"imposta programmazione {to preset_mode}",set_value:"imposta valore {value}",select_option:"seleziona opzione {option}",select_source:"seleziona sorgente {source}",start:"avvia",run_script:"esegui"},$r={brightness:"luminosità",temperature:"temperatura",position:"posizione",hvac_mode:"modalità",preset_mode:"programmazione"},Or={camera:"telecamere",climate:"clima",cover:"cover",fan:"ventole",group:"gruppi",input_boolean:"input_boolean",input_number:"input_number",input_select:"input_select",light:"luci",media_player:"media player",scene:"scene",switch:"interruttori",vacuum:"aspirapolvere"},jr={tomorrow:"domani",daily:"giornaliero",daily_except_days:"tutti i giorni eccetto {days}",working_days:"giorni lavorativi",weekend:"weekend",interval:"{startDay} a {endDay}"},Cr={absolute:"alle {time}",relative:"entro {time}",interval:"dalle {startTime} alle {endTime}",seconds:"{seconds} secondi",hour:"1 ora",hours:"{hours} ore",minute:"1 minuto",minutes:"{minutes} minuti",now:"ora",midnight:"mezzanotte",noon:"mezzogiorno",at_sun_event:"al {sunEvent}",sun_event_sunrise:"l' alba",sun_event_sunset:"tramonto"},Dr={one_additional_task:"un altro task",x_additional_tasks:"{count} altri task"},zr={scheduler:"Schedulatore",actions:br,instructions:wr,fields:Er,days_short:Pr,days_long:Sr,words:kr,services:xr,service_parameters:$r,domains:Or,days:jr,time:Cr,misc:Dr},Ar=Object.freeze({__proto__:null,scheduler:"Schedulatore",actions:br,instructions:wr,fields:Er,days_short:Pr,days_long:Sr,words:kr,services:xr,service_parameters:$r,domains:Or,days:jr,time:Cr,misc:Dr,default:zr}),Tr={add:"Nieuw item",cancel:"annuleren",next:"verder",save:"opslaan",delete:"verwijder"},Nr={no_group_selected:"Selecteer eerst een groep",no_entity_selected:"Selecteer eerst een entiteit",no_groups_defined:"Er zijn geen groepen gedefinieerd",no_entities_for_group:"Deze groep heeft geen entiteiten",no_actions_for_entity:"Deze entiteit heeft geen acties",no_entries_defined:"Er zijn geen items aangemaakt"},Rr={group:"Groep",entity:"Entiteit",action:"Actie",days:"Dagen",time:"Tijdstip",options:"Opties",day_type_daily:"dagelijks",day_type_workday:"werkdagen",day_type_weekend:"weekend",day_type_custom:"anders"},Fr={mon:"ma",tue:"di",wed:"wo",thu:"do",fri:"vr",sat:"za",sun:"zo"},Ir={mon:"maandag",tue:"dinsdag",wed:"woensdag",thu:"donderdag",fri:"vrijdag",sat:"zaterdag",sun:"zondag"},Mr={and:"en",before:"voor",after:"na"},Lr={turn_on:"aanzetten",turn_on_brightness:"aanzetten {op brightness}",turn_off:"uitzetten",close_cover:"sluiten",open_cover:"openen",set_temperature:"temperatuur instellen {naar temperature}",set_temperature_hvac_mode_heat:"verwarmen {naar temperature}",set_temperature_hvac_mode_cool:"koelen {naar temperature}",set_cover_position:"positie instellen {naar position}",set_hvac_mode:"stand aanpassen {naar hvac_mode}",set_hvac_mode_hvac_mode_off:"uitzetten",set_preset_mode:"kies voorinstelling {preset_mode}",set_value:"waarde {value} instellen",select_option:"optie {option} selecteren",select_source:"ingang {source} selecteren",start:"starten",run_script:"uitvoeren"},Vr={brightness:"helderheid",temperature:"temperatuur",position:"positie",hvac_mode:"stand",preset_mode:"voorinstelling"},Ur={camera:"cameras",climate:"verwarming",cover:"zonwering",fan:"ventilatie",group:"groepen",input_boolean:"input_boolean",input_number:"input_number",input_select:"input_select",light:"verlichting",media_player:"mediaspelers",scene:"scènes",switch:"schakelaars",vacuum:"stofzuigers"},qr={tomorrow:"morgen",daily:"dagelijks",daily_except_days:"elke dag behalve {days}",working_days:"op werkdagen",weekend:"in het weekend",interval:"{startDay} t/m {endDay}"},Hr={absolute:"om {time}",relative:"over {time}",interval:"van {startTime} tot {endTime}",seconds:"{seconds} seconden",hour:"1 uur",hours:"{hours} uur",minute:"1 minuut",minutes:"{minutes} minuten",now:"nu",midnight:"middernacht",noon:"12 uur",at_sun_event:"bij {sunEvent}",sun_event_sunrise:"zonsopgang",sun_event_sunset:"zonsondergang"},Qr={one_additional_task:"1 overige taak",x_additional_tasks:"{count} overige taken"},Br={scheduler:"Tijdplanner",actions:Tr,instructions:Nr,fields:Rr,days_short:Fr,days_long:Ir,words:Mr,services:Lr,service_parameters:Vr,domains:Ur,days:qr,time:Hr,misc:Qr},Kr=Object.freeze({__proto__:null,scheduler:"Tijdplanner",actions:Tr,instructions:Nr,fields:Rr,days_short:Fr,days_long:Ir,words:Mr,services:Lr,service_parameters:Vr,domains:Ur,days:qr,time:Hr,misc:Qr,default:Br}),Gr={add:"legg til",cancel:"avbryt",next:"neste",save:"lagre",delete:"slett"},Wr={no_group_selected:"Velg en gruppe først",no_entity_selected:"Velg en entitet først",no_groups_defined:"Ingen grupper definert",no_entities_for_group:"Det finnes ingen entiteter i denne gruppen",no_actions_for_entity:"Det finnes ingen handlinger for denne entiteten",no_entries_defined:"Det er ingen definerte tidsplaner å vise"},Yr={group:"Gruppe",entity:"Entitet",action:"Handling",days:"Dager",time:"Tid",options:"Valg",day_type_daily:"hver dag",day_type_weekdays:"ukedager",day_type_weekend:"weekend",day_type_custom:"egendefinert"},Jr={mon:"man",tue:"tir",wed:"ons",thu:"tor",fri:"fre",sat:"lør",sun:"søn"},Zr={mon:"mandag",tue:"tirsdag",wed:"onsdag",thu:"torsdag",fri:"fredag",sat:"lørdag",sun:"søndag"},Xr={and:"og",before:"før",after:"etter"},ei={turn_on:"slå på",turn_on_brightness:"slå på {at brightness}",turn_off:"slå av",close_cover:"lukk",open_cover:"åpne",set_temperature:"sett temperatur {to temperature}",set_temperature_hvac_mode_heat:"heat {to temperature}",set_temperature_hvac_mode_cool:"cool {to temperature}",set_cover_position:"sett posisjon {to position}",set_hvac_mode:"set mode {to hvac_mode}",set_hvac_mode_hvac_mode_off:"slå av",set_preset_mode:"set preset {to preset_mode}",set_value:"set value {to value}",select_option:"select option {option}",select_source:"select source {source}",start:"start",run_script:"run"},ti={brightness:"brightness",temperature:"temperature",position:"position",hvac_mode:"mode",preset_mode:"preset"},ri={camera:"cameras",climate:"klima",cover:"cover",fan:"vifter",group:"groups",input_boolean:"input_boolean",input_number:"input_number",input_select:"input_select",media_player:"media players",scene:"scenes",light:"lys",switch:"brytere",vacuum:"støvsugere"},ii={tomorrow:"tomorrow",daily:"daily",daily_except_days:"every day except {days}",working_days:"working days",weekend:"weekend",interval:"{startDay} to {endDay}"},si={absolute:"at {time}",relative:"in {time}",interval:"from {startTime} to {endTime}",seconds:"{seconds} seconds",hour:"1 hour",hours:"{hours} hours",minute:"1 minute",minutes:"{minutes} minutes",now:"now",midnight:"midnight",noon:"noon",at_sun_event:"at {sunEvent}",sun_event_sunrise:"sunrise",sun_event_sunset:"sunset"},ai={one_additional_task:"1 more task",x_additional_tasks:"{count} more tasks"},ni={scheduler:"Tidsplan",actions:Gr,instructions:Wr,fields:Yr,days_short:Jr,days_long:Zr,words:Xr,services:ei,service_parameters:ti,domains:ri,days:ii,time:si,misc:ai},oi=Object.freeze({__proto__:null,scheduler:"Tidsplan",actions:Gr,instructions:Wr,fields:Yr,days_short:Jr,days_long:Zr,words:Xr,services:ei,service_parameters:ti,domains:ri,days:ii,time:si,misc:ai,default:ni}),ci={add:"dodaj",cancel:"anuluj",next:"dalej",save:"zapisz",delete:"usuń"},li={no_group_selected:"Najpierw wybierz grupę",no_entity_selected:"Najpierw wybierz encję",no_groups_defined:"Nie ma zdefiniowanych grup",no_entities_for_group:"Nie ma encji w tej grupie",no_actions_for_entity:"Nie ma akcji dla tej encji",no_entries_defined:"Nie ma elementów do pokazania"},di={group:"Grupa",entity:"Encja",action:"Akcja",days:"Dni",time:"Czas",options:"Opcje",day_type_daily:"codziennie",day_type_workday:"dni robocze",day_type_weekend:"weekend",day_type_custom:"niestandardowy"},ui={mon:"pon.",tue:"wt.",wed:"śr.",thu:"czw.",fri:"pt.",sat:"sob.",sun:"niedz."},hi={mon:"poniedziałek",tue:"wtorek",wed:"środa",thu:"czwartek",fri:"piątek",sat:"sobota",sun:"niedziela"},pi={and:"oraz",before:"przed",after:"po"},mi={turn_on:"włącz",turn_on_brightness:"włącz {at brightness}",turn_off:"wyłącz",close_cover:"zamknij",open_cover:"otwórz",set_temperature:"ustaw temperaturę {to temperature}",set_temperature_hvac_mode_heat:"heat {to temperature}",set_temperature_hvac_mode_cool:"cool {to temperature}",set_cover_position:"ustaw pozycję {to position}",set_hvac_mode:"ustaw tryb {to hvac_mode}",set_hvac_mode_hvac_mode_off:"wyłącz",set_preset_mode:"ustaw preset {preset_mode}",set_value:"ustaw wartość {value}",select_option:"wybierz opcję {option}",select_source:"wybierz źródło {source}",start:"start",run_script:"start"},vi={brightness:"jasność",temperature:"temperatura",position:"pozycja",hvac_mode:"tryb",preset_mode:"preset"},fi={camera:"kamera",climate:"termostat",cover:"roleta",fan:"wentylator",group:"grupa",input_boolean:"wejście logiczne",input_number:"wejście liczbowe",input_select:"wybór wejścia",media_player:"odtwarzacz av",scene:"scena",light:"światło",switch:"włącznik",vacuum:"odkurzacz"},gi={tomorrow:"jutro",daily:"codziennie",daily_except_days:"codziennie za wyjątkiem {days}",working_days:"dni robocze",weekend:"weekend",interval:"{startDay} do {endDay}"},yi={absolute:"o {time}",relative:"za {time}",interval:"od {startTime} do {endTime}",seconds:"{seconds} sekund(a/y)",hour:"1 godzina",hours:"{hours} godzin(y)",minute:"1 minuta",minutes:"{minutes} minut(y)",now:"teraz",midnight:"północ",noon:"południe",at_sun_event:"o {sunEvent}",sun_event_sunrise:"wschodzie",sun_event_sunset:"zachodzie"},_i={one_additional_task:"jeszcze 1 zadanie",x_additional_tasks:"{count} więcej zadań"},bi={scheduler:"Harmonogram",actions:ci,instructions:li,fields:di,days_short:ui,days_long:hi,words:pi,services:mi,service_parameters:vi,domains:fi,days:gi,time:yi,misc:_i},wi=Object.freeze({__proto__:null,scheduler:"Harmonogram",actions:ci,instructions:li,fields:di,days_short:ui,days_long:hi,words:pi,services:mi,service_parameters:vi,domains:fi,days:gi,time:yi,misc:_i,default:bi}),Ei={add:"adicionar item",cancel:"cancelar",next:"próximo",save:"gravar",delete:"apagar"},Pi={no_group_selected:"Selecione um grupo primeiro",no_entity_selected:"Selecione uma entidade primeiro",no_groups_defined:"Não tem grupo definido",no_entities_for_group:"Não tem entidade no grupo",no_actions_for_entity:"Não há ações para esta entidade",no_entries_defined:"Não tem item pra mostar"},Si={group:"Grupo",entity:"Entidade",action:"Ação",days:"Dias",time:"Hora",options:"Opções",day_type_daily:"todos os dias",day_type_weekdays:"dias da semana",day_type_weekend:"final da semana",day_type_custom:"personalizado"},ki={mon:"seg",tue:"ter",wed:"qua",thu:"qui",fri:"sex",sat:"sab",sun:"dom"},xi={mon:"segunda",tue:"terça",wed:"quarta",thu:"quinta",fri:"sexta",sat:"sabádo",sun:"domingo"},$i={and:"e",before:"antes",after:"depois"},Oi={turn_on:"ligar",turn_on_brightness:"ligar {a brightness}",turn_off:"desligar",close_cover:"fechar",open_cover:"abrir",set_temperature:"ajustar temperatura {a temperature}",set_temperature_hvac_mode_heat:"heat {to temperature}",set_temperature_hvac_mode_cool:"cool {to temperature}",set_cover_position:"ajustar posição {a position}",set_hvac_mode:"set mode {to hvac_mode}",set_hvac_mode_hvac_mode_off:"turn off",set_preset_mode:"set preset {to preset_mode}",set_value:"set value {to value}",select_option:"select option {option}",select_source:"select source {source}",start:"start",run_script:"run"},ji={brightness:"Brilho",temperature:"Temperatura",position:"Posição",hvac_mode:"mode",preset_mode:"preset"},Ci={camera:"cameras",climate:"ar condicionado",cover:"persiana",fan:"ventilador",group:"groups",input_boolean:"input_boolean",input_number:"input_number",input_select:"input_select",media_player:"media players",scene:"scenes",light:"luz",switch:"interruptor",vacuum:"aspirador"},Di={tomorrow:"tomorrow",daily:"daily",daily_except_days:"every day except {days}",working_days:"working days",weekend:"weekend",interval:"{startDay} to {endDay}"},zi={absolute:"at {time}",relative:"in {time}",interval:"from {startTime} to {endTime}",seconds:"{seconds} seconds",hour:"1 hour",hours:"{hours} hours",minute:"1 minute",minutes:"{minutes} minutes",now:"now",midnight:"midnight",noon:"noon",at_sun_event:"at {sunEvent}",sun_event_sunrise:"sunrise",sun_event_sunset:"sunset"},Ai={one_additional_task:"1 more task",x_additional_tasks:"{count} more tasks"},Ti={scheduler:"Agenda",actions:Ei,instructions:Pi,fields:Si,days_short:ki,days_long:xi,words:$i,services:Oi,service_parameters:ji,domains:Ci,days:Di,time:zi,misc:Ai},Ni=Object.freeze({__proto__:null,scheduler:"Agenda",actions:Ei,instructions:Pi,fields:Si,days_short:ki,days_long:xi,words:$i,services:Oi,service_parameters:ji,domains:Ci,days:Di,time:zi,misc:Ai,default:Ti}),Ri={add:"adaugă element",cancel:"abandon",next:"următorul",save:"salvează",delete:"șterge"},Fi={no_group_selected:"Prima dată selectați un grup",no_entity_selected:"Prima dată selectați o entitate",no_groups_defined:"Nu există grupuri definite",no_entities_for_group:"Nu există entități definite în acest grup",no_actions_for_entity:"Nu există acțiuni pentru această entitate",no_entries_defined:"Nu există elemente de afișat"},Ii={group:"Grup",entity:"Entitate",action:"Acțiune",days:"Zile",time:"Timp",options:"Opțiuni",day_type_daily:"zilnic",day_type_workday:"zile lucrătoare",day_type_weekend:"sfârșit de săptămână",day_type_custom:"personalizat"},Mi={mon:"lun",tue:"mar",wed:"mie",thu:"joi",fri:"vin",sat:"sâm",sun:"dum"},Li={mon:"Luni",tue:"Marți",wed:"Miercuri",thu:"Joi",fri:"Vineri",sat:"Sâmbătă",sun:"Duminică"},Vi={and:"și",before:"înainte",after:"după"},Ui={turn_on:"pornire",turn_on_brightness:"pornire {la brightness}",turn_off:"oprire",close_cover:"închidere",open_cover:"deschidere",set_temperature:"setare temperatură {la temperature}",set_temperature_hvac_mode_heat:"heat {to temperature}",set_temperature_hvac_mode_cool:"cool {to temperature}",set_cover_position:"setare poziție",set_hvac_mode:"setare mod {hvac_mode}",set_hvac_mode_hvac_mode_off:"oprire",set_preset_mode:"setare preset {preset_mode}",set_value:"setare valoare {value}",select_option:"selectare opțiune {option}",select_source:"selectare sursă {source}",start:"start",run_script:"run"},qi={brightness:"intensitate luminoasă",temperature:"temperatură",position:"poziție",hvac_mode:"mod",preset_mode:"preset"},Hi={camera:"camere",climate:"climat",cover:"jaluzele",fan:"ventilatoare",group:"grupuri",input_boolean:"input_boolean",input_number:"input_number",input_select:"input_select",light:"lumini",media_player:"media playere",scene:"scene",switch:"întrerupătpare",vacuum:"aspiratoare"},Qi={tomorrow:"mâine",daily:"zilnic",daily_except_days:"zilnic cu excepția {days}",working_days:"zile lucrătoare",weekend:"sfârșit de săptămână",interval:"{startDay} până la {endDay}"},Bi={absolute:"la {time}",relative:"în {time}",interval:"de la {startTime} la {endTime}",seconds:"{seconds} secunde",hour:"1 oră",hours:"{hours} ore",minute:"1 minut",minutes:"{minutes} minute",now:"acum",midnight:"miezul nopții",noon:"amiază",at_sun_event:"la {sunEvent}",sun_event_sunrise:"răsărit",sun_event_sunset:"apus"},Ki={one_additional_task:"încă o sarcină",x_additional_tasks:"încă {count} sarcini"},Gi={scheduler:"Planificator",actions:Ri,instructions:Fi,fields:Ii,days_short:Mi,days_long:Li,words:Vi,services:Ui,service_parameters:qi,domains:Hi,days:Qi,time:Bi,misc:Ki},Wi={add:"добавить",cancel:"отменить",next:"далее",save:"сохранить",delete:"удалить"},Yi={no_group_selected:"Необходимо выбрать группу",no_entity_selected:"Необходимо выбрать объект",no_groups_defined:"Ни одной группы не создано",no_entities_for_group:"В этой группе нет объектов",no_actions_for_entity:"Для этого объекта нет действий",no_entries_defined:"Объекты отсутствуют"},Ji={group:"Группа",entity:"Объект",action:"Действие",days:"Дни",time:"Время",options:"Опции",day_type_daily:"ежедневно",day_type_weekdays:"по будням",day_type_weekend:"weekend",day_type_custom:"выбрать дни"},Zi={mon:"пн",tue:"вт",wed:"ср",thu:"чт",fri:"пт",sat:"сб",sun:"вс"},Xi={mon:"понедельник",tue:"вторник",wed:"среда",thu:"четверг",fri:"пятница",sat:"суббота",sun:"воскресенье"},es={and:"и",before:"до",after:"после"},ts={turn_on:"включить",turn_on_brightness:"включить {на brightness}",turn_off:"выключить",close_cover:"закрыть",open_cover:"открыть",set_temperature:"задать температуру {к temperature}",set_temperature_hvac_mode_heat:"обогрев {к temperature}",set_temperature_hvac_mode_cool:"охлаждение {к temperature}",set_cover_position:"установить позицию {position}",set_hvac_mode:"установить режим {hvac_mode}",set_hvac_mode_hvac_mode_off:"выключить",set_preset_mode:"выбрать набор настроек {preset_mode}",set_value:"установить значение {value}",select_option:"выбрать вариант {option}",select_source:"выбрать источник {source}",start:"запуск",run_script:"запустить"},rs={brightness:"Яркость",temperature:"Температура",position:"Позицию",hvac_mode:"режим",preset_mode:"предуставновлено"},is={camera:"Камеры",climate:"Климат",cover:"Жалюзи",fan:"Вентиляторы",group:"Группы",input_boolean:"Переключатели",input_number:"Числа",input_select:"Списки",media_player:"Медиаплееры",scene:"Сцены",light:"Освещение",switch:"Выключатели",vacuum:"Пылесосы"},ss={tomorrow:"завтра",daily:"ежедневно",daily_except_days:"каждый день исключая {days}",working_days:"рабочие дни",weekend:"выходные",interval:"{startDay} до {endDay}"},as={absolute:"в {time}",relative:"через {time}",interval:"с {startTime} до {endTime}",seconds:"{seconds} секунд",hour:"1 час",hours:"{hours} часа",minute:"1 минуту",minutes:"{minutes} минут",now:"сейчас",midnight:"полночь",noon:"полдень",at_sun_event:"на {sunEvent}",sun_event_sunrise:"восходе",sun_event_sunset:"закате"},ns={one_additional_task:"1 задача",x_additional_tasks:"{count} задач"},os={scheduler:"Планирование",actions:Wi,instructions:Yi,fields:Ji,days_short:Zi,days_long:Xi,words:es,services:ts,service_parameters:rs,domains:is,days:ss,time:as,misc:ns},cs={cs:qe,de:it,en:gt,es:Dt,et:Qt,es_419:Dt,fr:ar,hu:_r,it:Ar,nb:oi,nl:Kr,nn:oi,no:oi,pl:wi,pt:Ni,pt_BR:Ni,ro:Object.freeze({__proto__:null,scheduler:"Planificator",actions:Ri,instructions:Fi,fields:Ii,days_short:Mi,days_long:Li,words:Vi,services:Ui,service_parameters:qi,domains:Hi,days:Qi,time:Bi,misc:Ki,default:Gi}),ru:Object.freeze({__proto__:null,scheduler:"Планирование",actions:Wi,instructions:Yi,fields:Ji,days_short:Zi,days_long:Xi,words:es,services:ts,service_parameters:rs,domains:is,days:ss,time:as,misc:ns,default:os})};function ls(e,t="",r=""){const i=ds();var s;try{if("test"==i)return"TRANSLATED";s=e.split(".").reduce((e,t)=>e[t],cs[i])}catch(t){s=e.split(".").reduce((e,t)=>e[t],cs.en)}if(void 0===s&&(s=e.split(".").reduce((e,t)=>e[t],cs.en)),""!==t&&""!==r)if(Array.isArray(t)||Array.isArray(r))for(var a=0;a=0?Math.floor(e/60):Math.ceil(e/60),i=e-60*r;return i%t!=0&&(i=Math.round(i/t)*t),i>=60&&(r++,i-=60),r>=24&&(r-=24),60*r+i}function fs(e,t={}){const r=!!t.amPm&&t.amPm,i=!!t.absolute&&t.absolute;e>=1440&&(e-=1440);let s=e>=0?Math.floor(e/60):Math.ceil(e/60);const a=e-60*s;let n="";r&&(n=s>=12?"PM":"AM",(s>12||12==s&&a>0)&&(s-=12));const o=String(Math.abs(s)).padStart(2,"0"),c=String(Math.abs(a)).padStart(2,"0"),l=s<0||a<0;return{hours:o,minutes:c,time:`${l&&!i?"-":""}${o}:${c}${r?" "+n:""}`,signed:l,amPm:n}}function gs(e,t={}){const r=t.stepSize?t.stepSize:1,i=!!t.signed&&t.signed,s=t.max?t.max:1440,a=vs(e,r);return a<0&&!i?e+=1440:a>=1440&&(e-=1440),a<-s?-s:a>s?s:e}function ys(e){let t,r,i;if("object"==typeof e)return ys(`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`);if(null!==(i=/^([0-9]{2}):([0-9]{2})$/.exec(e)))[t,r]=[Number(i[1]),Number(i[2])];else if(null!==(i=/^([0-9]{2})([0-9]{2})$/.exec(e)))[t,r]=[Number(i[1]),Number(i[2])];else{if(null!==(i=/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}[\+|\-][0-9]{2}:[0-9]{2}$/.exec(e))){const e=new Date(i[0]);return ys(`${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}`)}console.log(`failed to parse timestamp '${e}'`)}return 60*t+r}function _s(e){return e.type==ms.Daily?[1,2,3,4,5,6,7]:e.type==ms.Workday?[1,2,3,4,5]:e.type==ms.Weekend?[6,7]:e.type==ms.Custom?e.custom_days:[]}function bs(e){return e==ps.Sunrise?"sunrise":"sunset"}function ws(e){let t=e.getDay();return 0==t&&(t=7),t}function Es(e,t){const r=new Date,i=Math.round((e.valueOf()-r.valueOf())/1e3);if(i<5)return ls("time.now");if(i<60)return ls("time.relative","{time}",ls("time.seconds","{seconds}",String(i)));if(i<3300){const e=i%60,t=Math.round(i/60);if(e<5||e>55)return ls("time.relative","{time}",1==t?ls("time.minute"):ls("time.minutes","{minutes}",String(t)));if(1==Math.floor(i/60)){const e=Math.round(i-60);return ls("time.relative","{time}",`${ls("time.minute")} ${ls("words.and")} ${ls("time.seconds","{seconds}",String(e))}`)}return ls("time.relative","{time}",ls("time.minutes","{minutes}",String(t)))}if(1==Math.floor(i/3600)){const e=Math.round(i/60-60);return ls("time.relative","{time}",`${ls("time.hour")} ${ls("words.and")} ${ls("time.minutes","{minutes}",String(e))}`)}const s=Math.round(i/3600);if(s<=6)return ls("time.relative","{time}",1==s?ls("time.hour"):ls("time.hours","{hours}",String(s)));const a=new Date;a.setHours(0,0,0,0);const n=Math.floor((e.valueOf()-a.valueOf())/864e5),o=""+fs(ys(e),{amPm:null==t?void 0:t.amPm}).time;return 0==n?12==e.getHours()&&0==e.getMinutes()?ls("time.absolute","{time}",ls("time.noon")):ls("time.absolute","{time}",o):1==n?0==e.getHours()&&0==e.getMinutes()?ls("time.absolute","{time}",ls("time.midnight")):12==e.getHours()&&0==e.getMinutes()?`${ls("days.tomorrow")} ${ls("time.absolute","{time}",ls("time.noon"))}`:`${ls("days.tomorrow")} ${ls("time.absolute","{time}",o)}`:`${function(e){switch(e){case 1:return ls("days_long.mon");case 2:return ls("days_long.tue");case 3:return ls("days_long.wed");case 4:return ls("days_long.thu");case 5:return ls("days_long.fri");case 6:return ls("days_long.sat");case 7:return ls("days_long.sun");default:return""}}(ws(e))} ${ls("time.absolute","{time}",o)}`}!function(e){e.Sunrise="SUNRISE",e.Sunset="SUNSET"}(ps||(ps={})),function(e){e.Daily="DAILY",e.Workday="WORKDAY",e.Weekend="WEEKEND",e.Custom="CUSTOM"}(ms||(ms={}));const Ps=[{id:1,name:ls("days_short.mon")},{id:2,name:ls("days_short.tue")},{id:3,name:ls("days_short.wed")},{id:4,name:ls("days_short.thu")},{id:5,name:ls("days_short.fri")},{id:6,name:ls("days_short.sat")},{id:7,name:ls("days_short.sun")}],Ss=[{id:ms.Daily,name:ls("fields.day_type_daily")},{id:ms.Workday,name:ls("fields.day_type_workday")},{id:ms.Weekend,name:ls("fields.day_type_weekend")},{id:ms.Custom,name:ls("fields.day_type_custom")}];var ks;!function(e){e.Overview="OVERVIEW",e.NewSchedule="NEW_SCHEDULE",e.TimePicker="TIME_PICKER",e.TimeScheme="TIME_SCHEME",e.Options="OPTIONS"}(ks||(ks={}));const xs={service:"turn_on",icon:"power"},$s={service:"turn_off",icon:"power-off"},Os=/^([0-9]+)?D([0-7]+)?T([0-9SRDUW]+)T?([0-9SRDUW]+)?(A[A0-9]+)+(C([C0-9]+))?(F([F0-9]+))?$/,js=/^([0-9]{4})?([SRDUW]{2})([0-9]{4})?$/;function Cs(e){var t,r,i;const s=Os.exec(e),a={time:{value:0},days:{type:ms.Daily},actions:[]};if(s[1])"15"==s[1]?Object.assign(a,{days:{type:ms.Workday}}):"67"==s[1]&&Object.assign(a,{days:{type:ms.Weekend}});else{const e=s[2].split("").map(Number);e.sort(),1==e.length&&0==e[0]||Object.assign(a,{days:{type:ms.Custom,custom_days:e.filter(e=>0!=e)}})}const n=js.exec(s[3]);if(n?Object.assign(a,{time:{event:"SR"==n[2]?ps.Sunrise:ps.Sunset,value:n[1]?-ys(n[1]):ys(n[3])}}):Object.assign(a,{time:{value:ys(s[3])}}),s[4]){const e=js.exec(s[4]);e?Object.assign(a,{endTime:{event:"SR"==e[2]?ps.Sunrise:ps.Sunset,value:e[1]?-ys(e[1]):ys(e[4])}}):Object.assign(a,{endTime:{value:ys(s[4])}})}const o=null===(t=s[5].match(/A[0-9]+/g))||void 0===t?void 0:t.map(e=>Number(e.substring(1)));if(Object.assign(a,{actions:o}),s[6]){let e=null===(r=s[6].match(/C[0-9]+/g))||void 0===r?void 0:r.map(e=>Number(e.substring(1)));1==(null==e?void 0:e.length)&&s[7].length>1?(e=s[7].split("").map(Number),Object.assign(a,{conditions:{type:Oe.All,items:e}})):Object.assign(a,{conditions:{type:Oe.Any,items:e}})}if(s[8]){const e=null===(i=s[8].match(/F[0-9]+/g))||void 0===i?void 0:i.map(e=>Number(e.substring(1)));Object.assign(a,{options:e})}return a}const Ds=["disarmed","armed_away","armed_home","armed_night"];function zs(e){return{type:xe.Level,field:e.field,min:e.min||0,max:e.max||255,step:e.step||1,optional:e.optional||!1,unit:e.unit||""}}function As(e){return{type:xe.List,field:e.field,options:e.options}}function Ts(e,t={}){let r={value:String(e)};return t.icons&&e in t.icons&&(r=Object.assign(Object.assign({},r),{icon:t.icons[e]})),t.name&&(r=Object.assign(Object.assign({},r),{name:t.name})),r}const Ns={heat:"fire",cool:"snowflake",heat_cool:"thermometer",auto:"autorenew",dry:"water-percent",fan_only:"fan"};const Rs=e=>{switch(e.attributes.device_class){case"garage":return"garage";case"door":return"door-closed";case"shutter":return"window-shutter";case"blind":return"blinds";case"window":return"window-closed";default:return"window-shutter"}},Fs=e=>{switch(e.attributes.device_class){case"garage":return"garage-open";case"door":return"door-open";case"shutter":return"window-shutter-open";case"blind":return"blinds-open";case"window":return"window-open";default:return"window-shutter-open"}},Is=["open","closed"],Ms={off:"fan-off",low:"fan-speed-1",medium:"fan-speed-2",high:"fan-speed-3"};const Ls={normal:"account-outline",eco:"leaf",away:"car-traction-control",boost:"rocket-launch-outline",comfort:"car-seat-cooler",home:"home-outline",sleep:"sleep",auto:"autorenew",baby:"baby-bottle-outline"};const Vs=[{service:"unlock",icon:"lock-open-variant-outline"},{service:"lock",icon:"lock-outline"}],Us=["locked","unlocked"];function qs(e){const t=Se(e.entity_id);e.attributes.supported_features;switch(t){case"alarm_control_panel":return(e=>{const t=e.attributes.supported_features;let r=[{service:"alarm_disarm",icon:"lock-open-variant-outline"}];return 1&t&&r.push({service:"alarm_arm_home",icon:"home-outline"}),2&t&&r.push({service:"alarm_arm_away",icon:"exit-run"}),4&t&&r.push({service:"alarm_arm_night",icon:"power-sleep"}),16&t&&r.push({service:"alarm_arm_custom_bypass",icon:"shield-lock-outline"}),r})(e);case"climate":return function(e){const t=e.attributes.supported_features,r=e.attributes.preset_modes,i=e.attributes.hvac_modes,s=i.filter(e=>!["off","heat","cool","heat_cool"].includes(e)),a=zs({field:"temperature",min:e.attributes.min_temp,max:e.attributes.max_temp,step:.5});let n=[];return i.includes("off")?n.push({service:"set_hvac_mode",service_data:{hvac_mode:"off"},icon:"power"}):n.push($s),i.includes("heat")&&1&t&&n.push({service:"set_temperature",service_data:{hvac_mode:"heat"},variable:a,icon:Ns.heat}),i.includes("cool")&&1&t&&n.push({service:"set_temperature",service_data:{hvac_mode:"cool"},variable:a,icon:Ns.cool}),!i.includes("heat")&&!i.includes("cool")&&1&t&&n.push({service:"set_temperature",variable:a,icon:"thermometer"}),i.length>1&&s.length&&n.push({service:"set_hvac_mode",variable:As({field:"hvac_mode",options:s.map(e=>Ts(e,{icons:Ns}))}),icon:"cog-transfer-outline"}),r&&r.length&&16&t&&n.push({service:"set_preset_mode",variable:As({field:"preset_mode",options:r.map(e=>Ts(e))}),icon:"cloud-download-outline"}),n}(e);case"cover":return function(e){const t=e.attributes.supported_features;let r=[{service:"open_cover",icon:Fs(e)},{service:"close_cover",icon:Rs(e)}];return 4&t&&r.push({supported_feature:4,service:"set_cover_position",variable:zs({field:"position",min:0,max:100,unit:"%"}),icon:"ray-vertex"}),r}(e);case"fan":return function(e){const t=e.attributes.supported_features,r=e.attributes.speed_list;let i=[xs,$s];return 1&t&&r&&r.length>1&&i.push({service:"set_speed",variable:As({field:"speed",options:r.map(e=>Ts(e,{icons:Ms}))}),icon:"weather-windy"}),2&t&&i.push({service:"oscillate",variable:As({field:"oscillating",options:[{value:"True"},{value:"False"}]}),icon:"arrow-left-right"}),4&t&&i.push({service:"set_direction",variable:As({field:"direction",options:[{value:"forward"},{value:"reverse"}]}),icon:"cog-clockwise"}),i}(e);case"group":return function(e){return e.attributes.entity_id,[xs,$s]}(e);case"humidifer":return function(e){const t=e.attributes.supported_features,r=e.attributes.available_modes,i=zs({field:"humidity",min:e.attributes.min_humidity,max:e.attributes.max_humidity,step:1,unit:"%"});let s=[];return s.push({service:"set_humidity",variable:i}),r&&r.length>1&&1&t&&s.push({service:"set_mode",variable:As({field:"mode",options:r.map(e=>Ts(e,{icons:Ls}))})}),s}(e);case"input_boolean":return[Object.assign(Object.assign({},xs),{icon:"flash"}),Object.assign(Object.assign({},$s),{icon:"flash-off"})];case"input_number":return function(e){return[{service:"set_value",variable:zs({field:"value",min:Number(e.attributes.min),max:Number(e.attributes.max),step:Number(e.attributes.step)}),icon:"counter"}]}(e);case"input_select":return function(e){const t=e.attributes.options;return t.length<2?[]:[{service:"select_option",variable:As({field:"option",options:t.map(e=>({value:e}))}),icon:"counter"}]}(e);case"light":return function(e){const t=e.attributes.supported_features,r=zs({field:"brightness",min:0,max:255,unit:"%",optional:!0});let i=[];return i.push(Object.assign(Object.assign({},$s),{icon:"lightbulb-off"})),1&t?i.push(Object.assign(Object.assign({},xs),{icon:"lightbulb",variable:r})):i.push(Object.assign(Object.assign({},xs),{icon:"lightbulb"})),i}(e);case"lock":return Vs;case"media_player":return function(e){const t=Array(e.attributes.source_list),r=e.attributes.supported_features;let i=[];return 128&r&&i.push(xs),256&r&&i.push($s),2048&r&&t.length>1&&i.push({service:"select_source",variable:As({field:"source",options:t.map(e=>({value:e}))}),icon:"music-box-multiple-outline"}),i}(e);case"scene":return[Object.assign(Object.assign({},xs),{icon:"play"})];case"script":return function(e){let t=[xs,$s];return t.push({service:ke(e.entity_id),icon:"play",name:ls("services.run_script")}),t}(e);case"switch":return[Object.assign(Object.assign({},xs),{icon:"flash"}),Object.assign(Object.assign({},$s),{icon:"flash-off"})];case"vacuum":return function(e){const t=e.attributes.supported_features;let r=[];return 1&t&&r.push(xs),8192&t&&r.push({service:"start",icon:"play-circle-outline"}),4&t&&r.push({service:"start_pause",icon:"play-circle-outline"}),r}(e);case"water_heater":return function(e){const t=e.attributes.supported_features,r=e.attributes.operation_list,i=zs({field:"temperature",min:e.attributes.min_temp,max:e.attributes.max_temp,step:.5});let s=[];return 1&t&&s.push({service:"set_temperature",variable:i,icon:"thermometer"}),2&t&&s.push({service:"set_operation_mode",variable:As({field:"operation_mode",options:r.map(e=>({value:e}))}),icon:"cog-transfer-outline"}),4&t&&s.push({service:"set_away_mode",variable:As({field:"mode",options:[{value:"on",icon:"toggle-switch-outline"},{value:"off",icon:"toggle-switch-off-outline"}]}),icon:"car-traction-control"}),s}(e);default:return[]}}function Hs(e,t){let r=!1;if(e.match(/^[a-z0-9_\.]+$/))r=e.includes(".")?e==t:e==Se(t);else try{if(e.startsWith("/")&&e.endsWith("/")||-1!==e.indexOf("*")){e.startsWith("/")||(e=`/^${e=e.replace(/\./g,".").replace(/\*/g,".*")}$/`);r=new RegExp(e.slice(1,-1)).test(t)}}catch(e){}return r}function Qs(e,t){return!(!t.include||!t.include.length)&&(!(t.include&&!t.include.find(t=>Hs(t,e)))&&(!t.exclude||!t.exclude.find(t=>Hs(t,e))))}const Bs={alarm_control_panel:"alarm-light-outline",automation:"playlist-play",binary_sensor:"radiobox-blank",camera:"camera",climate:"home-thermometer-outline",cover:"window-shutter",device_tracker:"account",fan:"fan",group:"google-circles-communities",humidifier:"air-humidifier",input_boolean:"drawing",input_number:"ray-vertex",input_select:"format-list-bulleted",input_text:"textbox",light:"lightbulb-outline",lock:"lock-open-outline",media_player:"cast-connected",notify:"comment-alert",person:"account-outline",remote:"remote",scene:"palette-outline",script:"file-document",sensor:"eye",switch:"flash",timer:"timer",vacuum:"robot-vacuum",water_heater:"water-boiler"},Ks=e=>{const t=Se(e.entity_id);switch(t){case"binary_sensor":return(e=>{switch(e.attributes.device_class){case"battery":return"battery-outline";case"cold":return"snowflake";case"connectivity":return"server-network";case"door":return"door-closed";case"garage_door":return"hass:garage";case"gas":case"power":case"problem":case"safety":case"smoke":return"shield-check";case"heat":return"fire";case"light":return"brightness-5";case"lock":return"lock";case"moisture":return"water";case"motion":return"walk";case"occupancy":case"presence":return"home-outline";case"opening":return"hass:square";case"plug":return"hass:power-plug-outline";case"sound":return"music-note";case"vibration":return"vibrate";case"window":return"window-closed";default:return"radiobox-blank"}})(e);case"cover":return Rs(e);case"sensor":return(e=>{switch(e.attributes.device_class){case"humidity":return"water-percent";case"illuminance":return"brightness-5";case"temperature":return"thermometer";case"power":return"flash";case"pressure":return"gauge";case"signal_strength":return"wifi";default:return"°C"==e.attributes.unit_of_measurement||"°F"==e.attributes.unit_of_measurement?"thermometer":"eye"}})(e);default:return t in Bs?Bs[t]:"folder-outline"}},Gs=e=>{switch(Se(e.entity_id)){case"alarm_control_panel":return Ds;case"binary_sensor":case"cover":return Is;case"input_boolean":case"switch":return["on","off"];case"lock":return Us;case"person":return["home","not_home"];default:return}};function Ws(e,t){return e?Object.entries(e).filter(([e])=>t.includes(e)).reduce((e,[t,r])=>Object.assign(e,{[t]:r}),{}):{}}function Ys(e,t){return e?Object.entries(e).filter(([e])=>!t.includes(e)).reduce((e,[t,r])=>Object.assign(e,{[t]:r}),{}):{}}function Js(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Zs(e){return"string"!=typeof e&&(e=String(e)),Js(e.replace(/_/g," "))}function Xs(e){if(e)return"string"!=typeof e&&(e=String(e)),e.match(/^[a-z]+:[a-z0-9-]+$/i)?e:"hass:"+e}function ea(e){const t=e=>Object.entries(e).sort((e,t)=>e[0]>t[0]?1:-1).map(([e,r])=>[e,"object"==typeof r&&null!==r?t(r):r]).reduce((e,[t,r])=>Object.assign(e,{[t]:r}),{});let r=Ws(e,["service","service_data"]);r=t(r);return Object.values(r).map(e=>JSON.stringify(e).replace(/[\W]/g," ").split(" ").filter(e=>" "!=e&&""!=e).join("_")).join("_")}function ta(e){const t=e.service;let r={id:"",name:e.name,icon:e.icon||"flash",service:t};return e.service_data&&Object.keys(e.service_data).length&&Object.assign(r,{service_data:e.service_data}),e.variable&&("options"in e.variable?Object.assign(r,{variable:As(e.variable)}):Object.assign(r,{variable:zs(e.variable)})),Object.assign(r,{id:ea(r)}),r}function ra(e){let t=e.entity,r=e.service;const i=Se(t),s=Se(r);i&&s?i==s&&(r=ke(r)):i||(t=s+"."+t,r=ke(r));let a=Ys(e,["service","entity","service_data"]),n={entity:t,service:r};return a=Object.assign(Object.assign({},a),e.service_data),Object.keys(a).length&&(n=Object.assign(Object.assign({},n),{service_data:a})),n}function ia(e,t){const r=e.actions.map(ta),i=ea(Ys(t,["entity"]));return r.map(e=>{if(e.id==i)return!0;if(e.variable&&t.service_data&&Object.keys(t.service_data).includes(e.variable.field)){let r=Object.entries(t.service_data).filter(([t])=>t!=e.variable.field).reduce((e,[t,r])=>Object.assign(e,{[t]:r}),{}),i=Object.keys(r).length?Object.assign(Object.assign({},t),{service_data:r}):Ys(t,["service_data"]);return e.id==ea(i)}return!1}).map((e,t)=>e?t:null).filter(e=>null!==e)}function sa(e,t){const r=ia(e,t);return r.length?ta(e.actions[r[0]]):ta(Ys(t,["entity"]))}function aa(e){return e.match(/^switch.schedule_[0-9a-f]{6}$/)}function na(e,t){if(!e)return;const r="string"==typeof e?e:e.entity_id;let i={id:r,name:e.attributes.friendly_name||ke(r),icon:"folder-outline",actions:[]};if((void 0===t.standard_configuration||t.standard_configuration)&&(i=Object.assign(Object.assign({},i),{actions:[...qs(e)],icon:Ks(e),states:Gs(e)})),i=Object.assign(Object.assign({},i),{icon:e.attributes.icon||i.icon}),t.customize){Object.entries(t.customize).filter(([e])=>Hs(e,r)).map(([,e])=>e).forEach(e=>{if(i=Object.assign(Object.assign({},i),Ys(e,["actions","exclude_actions"])),e.actions&&e.actions.forEach(e=>{const t=ia(i,e);let r=i.actions;t.length?r=i.actions.map((r,i)=>t.includes(i)?Object.assign(r,e):r):i.actions.push(e),i=Object.assign(Object.assign({},i),{actions:r})}),e.exclude_actions){let t=e.exclude_actions.map(e=>e.replace(/_/g," ").trim().toLowerCase());i.exclude_actions&&(t=t.concat(i.exclude_actions).filter((e,t,r)=>r.indexOf(e)===t)),i=Object.assign(Object.assign({},i),{exclude_actions:t})}})}return i}function oa(e,t,r){const i="object"==typeof e?e.entity_id:e;if(aa(i))return!1;if(!(Qs(i,t)||t.groups&&t.groups.some(e=>Qs(i,e))))return!1;if(r&&"object"==typeof e){const i=na(e,t);if(!i)return!1;if(r.states&&!i.states)return!1;if(r.actions&&!i.actions.length)return!1}return!0}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function ca(e,t,r){return e(r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},r.exports),r.exports}var la=ca((function(e,t){ /** @license URI.js v4.4.0 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */ !function(e){function t(){for(var e=arguments.length,t=Array(e),r=0;r1){t[0]=t[0].slice(0,-1);for(var i=t.length-1,s=1;s= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,v=String.fromCharCode;function f(e){throw new RangeError(p[e])}function g(e,t){var r=e.split("@"),i="";r.length>1&&(i=r[0]+"@",e=r[1]);var s=function(e,t){for(var r=[],i=e.length;i--;)r[i]=t(e[i]);return r}((e=e.replace(h,".")).split("."),t).join(".");return i+s}function y(e){for(var t=[],r=0,i=e.length;r=55296&&s<=56319&&r>1,e+=m(e/t);e>455;i+=36)e=m(e/35);return m(i+36*e/(e+38))},w=function(e){var t,r=[],i=e.length,s=0,a=128,n=72,o=e.lastIndexOf("-");o<0&&(o=0);for(var c=0;c=128&&f("not-basic"),r.push(e.charCodeAt(c));for(var d=o>0?o+1:0;d=i&&f("invalid-input");var v=(t=e.charCodeAt(d++))-48<10?t-22:t-65<26?t-65:t-97<26?t-97:36;(v>=36||v>m((l-s)/h))&&f("overflow"),s+=v*h;var g=p<=n?1:p>=n+26?26:p-n;if(vm(l/y)&&f("overflow"),h*=y}var _=r.length+1;n=b(s-u,_,0==u),m(s/_)>l-a&&f("overflow"),a+=m(s/_),s%=_,r.splice(s++,0,a)}return String.fromCodePoint.apply(String,r)},E=function(e){var t=[],r=(e=y(e)).length,i=128,s=0,a=72,n=!0,o=!1,c=void 0;try{for(var d,u=e[Symbol.iterator]();!(n=(d=u.next()).done);n=!0){var h=d.value;h<128&&t.push(v(h))}}catch(e){o=!0,c=e}finally{try{!n&&u.return&&u.return()}finally{if(o)throw c}}var p=t.length,g=p;for(p&&t.push("-");g=i&&$m((l-s)/O)&&f("overflow"),s+=(w-i)*O,i=w;var j=!0,C=!1,D=void 0;try{for(var z,A=e[Symbol.iterator]();!(j=(z=A.next()).done);j=!0){var T=z.value;if(Tl&&f("overflow"),T==i){for(var N=s,R=36;;R+=36){var F=R<=a?1:R>=a+26?26:R-a;if(N>6|192).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase():"%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(63&t|128).toString(16).toUpperCase()}function $(e){for(var t="",r=0,i=e.length;r=194&&s<224){if(i-r>=6){var a=parseInt(e.substr(r+4,2),16);t+=String.fromCharCode((31&s)<<6|63&a)}else t+=e.substr(r,6);r+=6}else if(s>=224){if(i-r>=9){var n=parseInt(e.substr(r+4,2),16),o=parseInt(e.substr(r+7,2),16);t+=String.fromCharCode((15&s)<<12|(63&n)<<6|63&o)}else t+=e.substr(r,9);r+=9}else t+=e.substr(r,3),r+=3}return t}function O(e,t){function r(e){var r=$(e);return r.match(t.UNRESERVED)?r:e}return e.scheme&&(e.scheme=String(e.scheme).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_SCHEME,"")),void 0!==e.userinfo&&(e.userinfo=String(e.userinfo).replace(t.PCT_ENCODED,r).replace(t.NOT_USERINFO,x).replace(t.PCT_ENCODED,s)),void 0!==e.host&&(e.host=String(e.host).replace(t.PCT_ENCODED,r).toLowerCase().replace(t.NOT_HOST,x).replace(t.PCT_ENCODED,s)),void 0!==e.path&&(e.path=String(e.path).replace(t.PCT_ENCODED,r).replace(e.scheme?t.NOT_PATH:t.NOT_PATH_NOSCHEME,x).replace(t.PCT_ENCODED,s)),void 0!==e.query&&(e.query=String(e.query).replace(t.PCT_ENCODED,r).replace(t.NOT_QUERY,x).replace(t.PCT_ENCODED,s)),void 0!==e.fragment&&(e.fragment=String(e.fragment).replace(t.PCT_ENCODED,r).replace(t.NOT_FRAGMENT,x).replace(t.PCT_ENCODED,s)),e}function j(e){return e.replace(/^0*(.*)/,"$1")||"0"}function C(e,t){var r=e.match(t.IPV4ADDRESS)||[],i=c(r,2)[1];return i?i.split(".").map(j).join("."):e}function D(e,t){var r=e.match(t.IPV6ADDRESS)||[],i=c(r,3),s=i[1],a=i[2];if(s){for(var n=s.toLowerCase().split("::").reverse(),o=c(n,2),l=o[0],d=o[1],u=d?d.split(":").map(j):[],h=l.split(":").map(j),p=t.IPV4ADDRESS.test(h[h.length-1]),m=p?7:8,v=h.length-m,f=Array(m),g=0;g1){var b=f.slice(0,y.index),w=f.slice(y.index+y.length);_=b.join(":")+"::"+w.join(":")}else _=f.join(":");return a&&(_+="%"+a),_}return e}var z=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,A=void 0==="".match(/(){0}/)[1];function T(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={},i=!1!==t.iri?o:n;"suffix"===t.reference&&(e=(t.scheme?t.scheme+":":"")+"//"+e);var s=e.match(z);if(s){A?(r.scheme=s[1],r.userinfo=s[3],r.host=s[4],r.port=parseInt(s[5],10),r.path=s[6]||"",r.query=s[7],r.fragment=s[8],isNaN(r.port)&&(r.port=s[5])):(r.scheme=s[1]||void 0,r.userinfo=-1!==e.indexOf("@")?s[3]:void 0,r.host=-1!==e.indexOf("//")?s[4]:void 0,r.port=parseInt(s[5],10),r.path=s[6]||"",r.query=-1!==e.indexOf("?")?s[7]:void 0,r.fragment=-1!==e.indexOf("#")?s[8]:void 0,isNaN(r.port)&&(r.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?s[4]:void 0)),r.host&&(r.host=D(C(r.host,i),i)),void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||r.path||void 0!==r.query?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",t.reference&&"suffix"!==t.reference&&t.reference!==r.reference&&(r.error=r.error||"URI is not a "+t.reference+" reference.");var a=k[(t.scheme||r.scheme||"").toLowerCase()];if(t.unicodeSupport||a&&a.unicodeSupport)O(r,i);else{if(r.host&&(t.domainHost||a&&a.domainHost))try{r.host=P(r.host.replace(i.PCT_ENCODED,$).toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII via punycode: "+e}O(r,n)}a&&a.parse&&a.parse(r,t)}else r.error=r.error||"URI can not be parsed.";return r}function N(e,t){var r=!1!==t.iri?o:n,i=[];return void 0!==e.userinfo&&(i.push(e.userinfo),i.push("@")),void 0!==e.host&&i.push(D(C(String(e.host),r),r).replace(r.IPV6ADDRESS,(function(e,t,r){return"["+t+(r?"%25"+r:"")+"]"}))),"number"!=typeof e.port&&"string"!=typeof e.port||(i.push(":"),i.push(String(e.port))),i.length?i.join(""):void 0}var R=/^\.\.?\//,F=/^\/\.(\/|$)/,I=/^\/\.\.(\/|$)/,M=/^\/?(?:.|\n)*?(?=\/|$)/;function L(e){for(var t=[];e.length;)if(e.match(R))e=e.replace(R,"");else if(e.match(F))e=e.replace(F,"/");else if(e.match(I))e=e.replace(I,"/"),t.pop();else if("."===e||".."===e)e="";else{var r=e.match(M);if(!r)throw new Error("Unexpected dot segment condition");var i=r[0];e=e.slice(i.length),t.push(i)}return t.join("")}function V(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.iri?o:n,i=[],s=k[(t.scheme||e.scheme||"").toLowerCase()];if(s&&s.serialize&&s.serialize(e,t),e.host)if(r.IPV6ADDRESS.test(e.host));else if(t.domainHost||s&&s.domainHost)try{e.host=t.iri?S(e.host):P(e.host.replace(r.PCT_ENCODED,$).toLowerCase())}catch(r){e.error=e.error||"Host's domain name can not be converted to "+(t.iri?"Unicode":"ASCII")+" via punycode: "+r}O(e,r),"suffix"!==t.reference&&e.scheme&&(i.push(e.scheme),i.push(":"));var a=N(e,t);if(void 0!==a&&("suffix"!==t.reference&&i.push("//"),i.push(a),e.path&&"/"!==e.path.charAt(0)&&i.push("/")),void 0!==e.path){var c=e.path;t.absolutePath||s&&s.absolutePath||(c=L(c)),void 0===a&&(c=c.replace(/^\/\//,"/%2F")),i.push(c)}return void 0!==e.query&&(i.push("?"),i.push(e.query)),void 0!==e.fragment&&(i.push("#"),i.push(e.fragment)),i.join("")}function U(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments[3],s={};return i||(e=T(V(e,r),r),t=T(V(t,r),r)),!(r=r||{}).tolerant&&t.scheme?(s.scheme=t.scheme,s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=L(t.path||""),s.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=L(t.path||""),s.query=t.query):(t.path?("/"===t.path.charAt(0)?s.path=L(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?s.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:s.path=t.path:s.path="/"+t.path,s.path=L(s.path)),s.query=t.query):(s.path=e.path,void 0!==t.query?s.query=t.query:s.query=e.query),s.userinfo=e.userinfo,s.host=e.host,s.port=e.port),s.scheme=e.scheme),s.fragment=t.fragment,s}function q(e,t){return e&&e.toString().replace(t&&t.iri?o.PCT_ENCODED:n.PCT_ENCODED,$)}var H={scheme:"http",domainHost:!0,parse:function(e,t){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e},serialize:function(e,t){var r="https"===String(e.scheme).toLowerCase();return e.port!==(r?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}},Q={scheme:"https",domainHost:H.domainHost,parse:H.parse,serialize:H.serialize};function B(e){return"boolean"==typeof e.secure?e.secure:"wss"===String(e.scheme).toLowerCase()}var K={scheme:"ws",domainHost:!0,parse:function(e,t){var r=e;return r.secure=B(r),r.resourceName=(r.path||"/")+(r.query?"?"+r.query:""),r.path=void 0,r.query=void 0,r},serialize:function(e,t){if(e.port!==(B(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){var r=e.resourceName.split("?"),i=c(r,2),s=i[0],a=i[1];e.path=s&&"/"!==s?s:void 0,e.query=a,e.resourceName=void 0}return e.fragment=void 0,e}},G={scheme:"wss",domainHost:K.domainHost,parse:K.parse,serialize:K.serialize},W={},Y="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",J="[0-9A-Fa-f]",Z=r(r("%[EFef]"+J+"%"+J+J+"%"+J+J)+"|"+r("%[89A-Fa-f]"+J+"%"+J+J)+"|"+r("%"+J+J)),X=t("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),ee=new RegExp(Y,"g"),te=new RegExp(Z,"g"),re=new RegExp(t("[^]","[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]","[\\.]",'[\\"]',X),"g"),ie=new RegExp(t("[^]",Y,"[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]"),"g"),se=ie;function ae(e){var t=$(e);return t.match(ee)?t:e}var ne={scheme:"mailto",parse:function(e,t){var r=e,i=r.to=r.path?r.path.split(","):[];if(r.path=void 0,r.query){for(var s=!1,a={},n=r.query.split("&"),o=0,c=n.length;o=55296&&t<=56319&&s=t)throw new Error("Cannot access property/index "+i+" levels up, current level is "+t);return r[t-i]}if(i>t)throw new Error("Cannot access data "+i+" levels up, current level is "+t);if(a="data"+(t-i||""),!s)return a}for(var o=a,c=s.split("/"),l=0;l=0?{index:i,compiling:!0}:(i=this._compilations.length,this._compilations[i]={schema:e,root:t,baseId:r},{index:i,compiling:!1})}function Wa(e,t,r){var i=Ya.call(this,e,t,r);i>=0&&this._compilations.splice(i,1)}function Ya(e,t,r){for(var i=0;i%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,dn=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-?)*(?:[0-9KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[KSa-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,un=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,hn=/^(?:\/(?:[^~/]|~0|~1)*)*$/,pn=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,mn=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,vn=fn;function fn(e){return e="full"==e?"full":"fast",ua.copy(fn[e])}function gn(e){var t=e.match(sn);if(!t)return!1;var r=+t[1],i=+t[2],s=+t[3];return i>=1&&i<=12&&s>=1&&s<=(2==i&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:an[i])}function yn(e,t){var r=e.match(nn);if(!r)return!1;var i=r[1],s=r[2],a=r[3],n=r[5];return(i<=23&&s<=59&&a<=59||23==i&&59==s&&60==a)&&(!t||n)}fn.fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":ln,url:dn,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:on,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:En,uuid:un,"json-pointer":hn,"json-pointer-uri-fragment":pn,"relative-json-pointer":mn},fn.full={date:gn,time:yn,"date-time":function(e){var t=e.split(_n);return 2==t.length&&gn(t[0])&&yn(t[1],!0)},uri:function(e){return bn.test(e)&&cn.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":ln,url:dn,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:on,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:En,uuid:un,"json-pointer":hn,"json-pointer-uri-fragment":pn,"relative-json-pointer":mn};var _n=/t|\s/i;var bn=/\/|:/;var wn=/[^\\]\\Z/;function En(e){if(wn.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}var Pn=function(e,t,r){var i,s=" ",a=e.level,n=e.dataLevel,o=e.schema[t],c=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,u="data"+(n||""),h=e.opts.$data&&o&&o.$data;h?(s+=" var schema"+a+" = "+e.util.getData(o.$data,n,e.dataPathArr)+"; ",i="schema"+a):i=o;var p="maximum"==t,m=p?"exclusiveMaximum":"exclusiveMinimum",v=e.schema[m],f=e.opts.$data&&v&&v.$data,g=p?"<":">",y=p?">":"<",_=void 0;if(!h&&"number"!=typeof o&&void 0!==o)throw new Error(t+" must be number");if(!f&&void 0!==v&&"number"!=typeof v&&"boolean"!=typeof v)throw new Error(m+" must be number or boolean");if(f){var b=e.util.getData(v.$data,n,e.dataPathArr),w="exclusive"+a,E="exclType"+a,P="exclIsNumber"+a,S="' + "+($="op"+a)+" + '";s+=" var schemaExcl"+a+" = "+b+"; ",s+=" var "+w+"; var "+E+" = typeof "+(b="schemaExcl"+a)+"; if ("+E+" != 'boolean' && "+E+" != 'undefined' && "+E+" != 'number') { ";var k;_=m;(k=k||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(_||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: {} ",!1!==e.opts.messages&&(s+=" , message: '"+m+" should be boolean' "),e.opts.verbose&&(s+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var x=s;s=k.pop(),!e.compositeRule&&d?e.async?s+=" throw new ValidationError(["+x+"]); ":s+=" validate.errors = ["+x+"]; return false; ":s+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } else if ( ",h&&(s+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),s+=" "+E+" == 'number' ? ( ("+w+" = "+i+" === undefined || "+b+" "+g+"= "+i+") ? "+u+" "+y+"= "+b+" : "+u+" "+y+" "+i+" ) : ( ("+w+" = "+b+" === true) ? "+u+" "+y+"= "+i+" : "+u+" "+y+" "+i+" ) || "+u+" !== "+u+") { var op"+a+" = "+w+" ? '"+g+"' : '"+g+"='; ",void 0===o&&(_=m,l=e.errSchemaPath+"/"+m,i=b,h=f)}else{S=g;if((P="number"==typeof v)&&h){var $="'"+S+"'";s+=" if ( ",h&&(s+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),s+=" ( "+i+" === undefined || "+v+" "+g+"= "+i+" ? "+u+" "+y+"= "+v+" : "+u+" "+y+" "+i+" ) || "+u+" !== "+u+") { "}else{P&&void 0===o?(w=!0,_=m,l=e.errSchemaPath+"/"+m,i=v,y+="="):(P&&(i=Math[p?"min":"max"](v,o)),v===(!P||i)?(w=!0,_=m,l=e.errSchemaPath+"/"+m,y+="="):(w=!1,S+="="));$="'"+S+"'";s+=" if ( ",h&&(s+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),s+=" "+u+" "+y+" "+i+" || "+u+" !== "+u+") { "}}_=_||t,(k=k||[]).push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(_||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { comparison: "+$+", limit: "+i+", exclusive: "+w+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be "+S+" ",s+=h?"' + "+i:i+"'"),e.opts.verbose&&(s+=" , schema: ",s+=h?"validate.schema"+c:""+o,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";x=s;return s=k.pop(),!e.compositeRule&&d?e.async?s+=" throw new ValidationError(["+x+"]); ":s+=" validate.errors = ["+x+"]; return false; ":s+=" var err = "+x+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",d&&(s+=" else { "),s},Sn=function(e,t,r){var i,s=" ",a=e.level,n=e.dataLevel,o=e.schema[t],c=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,u="data"+(n||""),h=e.opts.$data&&o&&o.$data;if(h?(s+=" var schema"+a+" = "+e.util.getData(o.$data,n,e.dataPathArr)+"; ",i="schema"+a):i=o,!h&&"number"!=typeof o)throw new Error(t+" must be number");s+="if ( ",h&&(s+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),s+=" "+u+".length "+("maxItems"==t?">":"<")+" "+i+") { ";var p=t,m=m||[];m.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(p||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxItems"==t?"more":"fewer",s+=" than ",s+=h?"' + "+i+" + '":""+o,s+=" items' "),e.opts.verbose&&(s+=" , schema: ",s+=h?"validate.schema"+c:""+o,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var v=s;return s=m.pop(),!e.compositeRule&&d?e.async?s+=" throw new ValidationError(["+v+"]); ":s+=" validate.errors = ["+v+"]; return false; ":s+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",d&&(s+=" else { "),s},kn=function(e,t,r){var i,s=" ",a=e.level,n=e.dataLevel,o=e.schema[t],c=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,u="data"+(n||""),h=e.opts.$data&&o&&o.$data;if(h?(s+=" var schema"+a+" = "+e.util.getData(o.$data,n,e.dataPathArr)+"; ",i="schema"+a):i=o,!h&&"number"!=typeof o)throw new Error(t+" must be number");var p="maxLength"==t?">":"<";s+="if ( ",h&&(s+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),!1===e.opts.unicode?s+=" "+u+".length ":s+=" ucs2length("+u+") ",s+=" "+p+" "+i+") { ";var m=t,v=v||[];v.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(m||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT be ",s+="maxLength"==t?"longer":"shorter",s+=" than ",s+=h?"' + "+i+" + '":""+o,s+=" characters' "),e.opts.verbose&&(s+=" , schema: ",s+=h?"validate.schema"+c:""+o,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var f=s;return s=v.pop(),!e.compositeRule&&d?e.async?s+=" throw new ValidationError(["+f+"]); ":s+=" validate.errors = ["+f+"]; return false; ":s+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",d&&(s+=" else { "),s},xn=function(e,t,r){var i,s=" ",a=e.level,n=e.dataLevel,o=e.schema[t],c=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,u="data"+(n||""),h=e.opts.$data&&o&&o.$data;if(h?(s+=" var schema"+a+" = "+e.util.getData(o.$data,n,e.dataPathArr)+"; ",i="schema"+a):i=o,!h&&"number"!=typeof o)throw new Error(t+" must be number");s+="if ( ",h&&(s+=" ("+i+" !== undefined && typeof "+i+" != 'number') || "),s+=" Object.keys("+u+").length "+("maxProperties"==t?">":"<")+" "+i+") { ";var p=t,m=m||[];m.push(s),s="",!1!==e.createErrors?(s+=" { keyword: '"+(p||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { limit: "+i+" } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have ",s+="maxProperties"==t?"more":"fewer",s+=" than ",s+=h?"' + "+i+" + '":""+o,s+=" properties' "),e.opts.verbose&&(s+=" , schema: ",s+=h?"validate.schema"+c:""+o,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var v=s;return s=m.pop(),!e.compositeRule&&d?e.async?s+=" throw new ValidationError(["+v+"]); ":s+=" validate.errors = ["+v+"]; return false; ":s+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",d&&(s+=" else { "),s},$n={$ref:function(e,t,r){var i,s,a=" ",n=e.level,o=e.dataLevel,c=e.schema[t],l=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,u="data"+(o||""),h="valid"+n;if("#"==c||"#/"==c)e.isRoot?(i=e.async,s="validate"):(i=!0===e.root.schema.$async,s="root.refVal[0]");else{var p=e.resolveRef(e.baseId,c,e.isRoot);if(void 0===p){var m=e.MissingRefError.message(e.baseId,c);if("fail"==e.opts.missingRefs){e.logger.error(m),(y=y||[]).push(a),a="",!1!==e.createErrors?(a+=" { keyword: '$ref' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { ref: '"+e.util.escapeQuotes(c)+"' } ",!1!==e.opts.messages&&(a+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(c)+"' "),e.opts.verbose&&(a+=" , schema: "+e.util.toQuotedString(c)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),a+=" } "):a+=" {} ";var v=a;a=y.pop(),!e.compositeRule&&d?e.async?a+=" throw new ValidationError(["+v+"]); ":a+=" validate.errors = ["+v+"]; return false; ":a+=" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",d&&(a+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs)throw new e.MissingRefError(e.baseId,c,m);e.logger.warn(m),d&&(a+=" if (true) { ")}}else if(p.inline){var f=e.util.copy(e);f.level++;var g="valid"+f.level;f.schema=p.schema,f.schemaPath="",f.errSchemaPath=c,a+=" "+e.validate(f).replace(/validate\.schema/g,p.code)+" ",d&&(a+=" if ("+g+") { ")}else i=!0===p.$async||e.async&&!1!==p.$async,s=p.code}if(s){var y;(y=y||[]).push(a),a="",e.opts.passContext?a+=" "+s+".call(this, ":a+=" "+s+"( ",a+=" "+u+", (dataPath || '')",'""'!=e.errorPath&&(a+=" + "+e.errorPath);var _=a+=" , "+(o?"data"+(o-1||""):"parentData")+" , "+(o?e.dataPathArr[o]:"parentDataProperty")+", rootData) ";if(a=y.pop(),i){if(!e.async)throw new Error("async schema referenced by sync schema");d&&(a+=" var "+h+"; "),a+=" try { await "+_+"; ",d&&(a+=" "+h+" = true; "),a+=" } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; ",d&&(a+=" "+h+" = false; "),a+=" } ",d&&(a+=" if ("+h+") { ")}else a+=" if (!"+_+") { if (vErrors === null) vErrors = "+s+".errors; else vErrors = vErrors.concat("+s+".errors); errors = vErrors.length; } ",d&&(a+=" else { ")}return a},allOf:function(e,t,r){var i=" ",s=e.schema[t],a=e.schemaPath+e.util.getProperty(t),n=e.errSchemaPath+"/"+t,o=!e.opts.allErrors,c=e.util.copy(e),l="";c.level++;var d="valid"+c.level,u=c.baseId,h=!0,p=s;if(p)for(var m,v=-1,f=p.length-1;v0:e.util.schemaHasRules(m,e.RULES.all))&&(h=!1,c.schema=m,c.schemaPath=a+"["+v+"]",c.errSchemaPath=n+"/"+v,i+=" "+e.validate(c)+" ",c.baseId=u,o&&(i+=" if ("+d+") { ",l+="}"));return o&&(i+=h?" if (true) { ":" "+l.slice(0,-1)+" "),i},anyOf:function(e,t,r){var i=" ",s=e.level,a=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,d="data"+(a||""),u="valid"+s,h="errs__"+s,p=e.util.copy(e),m="";p.level++;var v="valid"+p.level;if(n.every((function(t){return e.opts.strictKeywords?"object"==typeof t&&Object.keys(t).length>0:e.util.schemaHasRules(t,e.RULES.all)}))){var f=p.baseId;i+=" var "+h+" = errors; var "+u+" = false; ";var g=e.compositeRule;e.compositeRule=p.compositeRule=!0;var y=n;if(y)for(var _,b=-1,w=y.length-1;b0:e.util.schemaHasRules(n,e.RULES.all);if(i+="var "+h+" = errors;var "+u+";",_){var b=e.compositeRule;e.compositeRule=p.compositeRule=!0,p.schema=n,p.schemaPath=o,p.errSchemaPath=c,i+=" var "+m+" = false; for (var "+v+" = 0; "+v+" < "+d+".length; "+v+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers,!0);var w=d+"["+v+"]";p.dataPathArr[f]=v;var E=e.validate(p);p.baseId=y,e.util.varOccurences(E,g)<2?i+=" "+e.util.varReplace(E,g,w)+" ":i+=" var "+g+" = "+w+"; "+E+" ",i+=" if ("+m+") break; } ",e.compositeRule=p.compositeRule=b,i+=" if (!"+m+") {"}else i+=" if ("+d+".length == 0) {";var P=P||[];P.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'contains' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: 'should contain a valid item' "),e.opts.verbose&&(i+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var S=i;return i=P.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+S+"]); ":i+=" validate.errors = ["+S+"]; return false; ":i+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { ",_&&(i+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } "),e.opts.allErrors&&(i+=" } "),i},dependencies:function(e,t,r){var i=" ",s=e.level,a=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,d="data"+(a||""),u="errs__"+s,h=e.util.copy(e),p="";h.level++;var m="valid"+h.level,v={},f={},g=e.opts.ownProperties;for(w in n)if("__proto__"!=w){var y=n[w],_=Array.isArray(y)?f:v;_[w]=y}i+="var "+u+" = errors;";var b=e.errorPath;for(var w in i+="var missing"+s+";",f)if((_=f[w]).length){if(i+=" if ( "+d+e.util.getProperty(w)+" !== undefined ",g&&(i+=" && Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(w)+"') "),l){i+=" && ( ";var E=_;if(E)for(var P=-1,S=E.length-1;P0:e.util.schemaHasRules(y,e.RULES.all))&&(i+=" "+m+" = true; if ( "+d+e.util.getProperty(w)+" !== undefined ",g&&(i+=" && Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(w)+"') "),i+=") { ",h.schema=y,h.schemaPath=o+e.util.getProperty(w),h.errSchemaPath=c+"/"+e.util.escapeFragment(w),i+=" "+e.validate(h)+" ",h.baseId=N,i+=" } ",l&&(i+=" if ("+m+") { ",p+="}"))}return l&&(i+=" "+p+" if ("+u+" == errors) {"),i},enum:function(e,t,r){var i=" ",s=e.level,a=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,d="data"+(a||""),u="valid"+s,h=e.opts.$data&&n&&n.$data;h&&(i+=" var schema"+s+" = "+e.util.getData(n.$data,a,e.dataPathArr)+"; ");var p="i"+s,m="schema"+s;h||(i+=" var "+m+" = validate.schema"+o+";"),i+="var "+u+";",h&&(i+=" if (schema"+s+" === undefined) "+u+" = true; else if (!Array.isArray(schema"+s+")) "+u+" = false; else {"),i+=u+" = false;for (var "+p+"=0; "+p+"<"+m+".length; "+p+"++) if (equal("+d+", "+m+"["+p+"])) { "+u+" = true; break; }",h&&(i+=" } "),i+=" if (!"+u+") { ";var v=v||[];v.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'enum' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { allowedValues: schema"+s+" } ",!1!==e.opts.messages&&(i+=" , message: 'should be equal to one of the allowed values' "),e.opts.verbose&&(i+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var f=i;return i=v.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+f+"]); ":i+=" validate.errors = ["+f+"]; return false; ":i+=" var err = "+f+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" }",l&&(i+=" else { "),i},format:function(e,t,r){var i=" ",s=e.level,a=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,d="data"+(a||"");if(!1===e.opts.format)return l&&(i+=" if (true) { "),i;var u,h=e.opts.$data&&n&&n.$data;h?(i+=" var schema"+s+" = "+e.util.getData(n.$data,a,e.dataPathArr)+"; ",u="schema"+s):u=n;var p=e.opts.unknownFormats,m=Array.isArray(p);if(h){i+=" var "+(v="format"+s)+" = formats["+u+"]; var "+(f="isObject"+s)+" = typeof "+v+" == 'object' && !("+v+" instanceof RegExp) && "+v+".validate; var "+(g="formatType"+s)+" = "+f+" && "+v+".type || 'string'; if ("+f+") { ",e.async&&(i+=" var async"+s+" = "+v+".async; "),i+=" "+v+" = "+v+".validate; } if ( ",h&&(i+=" ("+u+" !== undefined && typeof "+u+" != 'string') || "),i+=" (","ignore"!=p&&(i+=" ("+u+" && !"+v+" ",m&&(i+=" && self._opts.unknownFormats.indexOf("+u+") == -1 "),i+=") || "),i+=" ("+v+" && "+g+" == '"+r+"' && !(typeof "+v+" == 'function' ? ",e.async?i+=" (async"+s+" ? await "+v+"("+d+") : "+v+"("+d+")) ":i+=" "+v+"("+d+") ",i+=" : "+v+".test("+d+"))))) {"}else{var v;if(!(v=e.formats[n])){if("ignore"==p)return e.logger.warn('unknown format "'+n+'" ignored in schema at path "'+e.errSchemaPath+'"'),l&&(i+=" if (true) { "),i;if(m&&p.indexOf(n)>=0)return l&&(i+=" if (true) { "),i;throw new Error('unknown format "'+n+'" is used in schema at path "'+e.errSchemaPath+'"')}var f,g=(f="object"==typeof v&&!(v instanceof RegExp)&&v.validate)&&v.type||"string";if(f){var y=!0===v.async;v=v.validate}if(g!=r)return l&&(i+=" if (true) { "),i;if(y){if(!e.async)throw new Error("async format in sync schema");i+=" if (!(await "+(_="formats"+e.util.getProperty(n)+".validate")+"("+d+"))) { "}else{i+=" if (! ";var _="formats"+e.util.getProperty(n);f&&(_+=".validate"),i+="function"==typeof v?" "+_+"("+d+") ":" "+_+".test("+d+") ",i+=") { "}}var b=b||[];b.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'format' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { format: ",i+=h?""+u:""+e.util.toQuotedString(n),i+=" } ",!1!==e.opts.messages&&(i+=" , message: 'should match format \"",i+=h?"' + "+u+" + '":""+e.util.escapeQuotes(n),i+="\"' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+o:""+e.util.toQuotedString(n),i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var w=i;return i=b.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+w+"]); ":i+=" validate.errors = ["+w+"]; return false; ":i+=" var err = "+w+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { "),i},if:function(e,t,r){var i=" ",s=e.level,a=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,d="data"+(a||""),u="valid"+s,h="errs__"+s,p=e.util.copy(e);p.level++;var m="valid"+p.level,v=e.schema.then,f=e.schema.else,g=void 0!==v&&(e.opts.strictKeywords?"object"==typeof v&&Object.keys(v).length>0:e.util.schemaHasRules(v,e.RULES.all)),y=void 0!==f&&(e.opts.strictKeywords?"object"==typeof f&&Object.keys(f).length>0:e.util.schemaHasRules(f,e.RULES.all)),_=p.baseId;if(g||y){var b;p.createErrors=!1,p.schema=n,p.schemaPath=o,p.errSchemaPath=c,i+=" var "+h+" = errors; var "+u+" = true; ";var w=e.compositeRule;e.compositeRule=p.compositeRule=!0,i+=" "+e.validate(p)+" ",p.baseId=_,p.createErrors=!0,i+=" errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; } ",e.compositeRule=p.compositeRule=w,g?(i+=" if ("+m+") { ",p.schema=e.schema.then,p.schemaPath=e.schemaPath+".then",p.errSchemaPath=e.errSchemaPath+"/then",i+=" "+e.validate(p)+" ",p.baseId=_,i+=" "+u+" = "+m+"; ",g&&y?i+=" var "+(b="ifClause"+s)+" = 'then'; ":b="'then'",i+=" } ",y&&(i+=" else { ")):i+=" if (!"+m+") { ",y&&(p.schema=e.schema.else,p.schemaPath=e.schemaPath+".else",p.errSchemaPath=e.errSchemaPath+"/else",i+=" "+e.validate(p)+" ",p.baseId=_,i+=" "+u+" = "+m+"; ",g&&y?i+=" var "+(b="ifClause"+s)+" = 'else'; ":b="'else'",i+=" } "),i+=" if (!"+u+") { var err = ",!1!==e.createErrors?(i+=" { keyword: 'if' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { failingKeyword: "+b+" } ",!1!==e.opts.messages&&(i+=" , message: 'should match \"' + "+b+" + '\" schema' "),e.opts.verbose&&(i+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&l&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+=" } ",l&&(i+=" else { ")}else l&&(i+=" if (true) { ");return i},items:function(e,t,r){var i=" ",s=e.level,a=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,d="data"+(a||""),u="valid"+s,h="errs__"+s,p=e.util.copy(e),m="";p.level++;var v="valid"+p.level,f="i"+s,g=p.dataLevel=e.dataLevel+1,y="data"+g,_=e.baseId;if(i+="var "+h+" = errors;var "+u+";",Array.isArray(n)){var b=e.schema.additionalItems;if(!1===b){i+=" "+u+" = "+d+".length <= "+n.length+"; ";var w=c;c=e.errSchemaPath+"/additionalItems",i+=" if (!"+u+") { ";var E=E||[];E.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'additionalItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+n.length+" } ",!1!==e.opts.messages&&(i+=" , message: 'should NOT have more than "+n.length+" items' "),e.opts.verbose&&(i+=" , schema: false , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var P=i;i=E.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+P+"]); ":i+=" validate.errors = ["+P+"]; return false; ":i+=" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",c=w,l&&(m+="}",i+=" else { ")}var S=n;if(S)for(var k,x=-1,$=S.length-1;x<$;)if(k=S[x+=1],e.opts.strictKeywords?"object"==typeof k&&Object.keys(k).length>0:e.util.schemaHasRules(k,e.RULES.all)){i+=" "+v+" = true; if ("+d+".length > "+x+") { ";var O=d+"["+x+"]";p.schema=k,p.schemaPath=o+"["+x+"]",p.errSchemaPath=c+"/"+x,p.errorPath=e.util.getPathExpr(e.errorPath,x,e.opts.jsonPointers,!0),p.dataPathArr[g]=x;var j=e.validate(p);p.baseId=_,e.util.varOccurences(j,y)<2?i+=" "+e.util.varReplace(j,y,O)+" ":i+=" var "+y+" = "+O+"; "+j+" ",i+=" } ",l&&(i+=" if ("+v+") { ",m+="}")}if("object"==typeof b&&(e.opts.strictKeywords?"object"==typeof b&&Object.keys(b).length>0:e.util.schemaHasRules(b,e.RULES.all))){p.schema=b,p.schemaPath=e.schemaPath+".additionalItems",p.errSchemaPath=e.errSchemaPath+"/additionalItems",i+=" "+v+" = true; if ("+d+".length > "+n.length+") { for (var "+f+" = "+n.length+"; "+f+" < "+d+".length; "+f+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);O=d+"["+f+"]";p.dataPathArr[g]=f;j=e.validate(p);p.baseId=_,e.util.varOccurences(j,y)<2?i+=" "+e.util.varReplace(j,y,O)+" ":i+=" var "+y+" = "+O+"; "+j+" ",l&&(i+=" if (!"+v+") break; "),i+=" } } ",l&&(i+=" if ("+v+") { ",m+="}")}}else if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0:e.util.schemaHasRules(n,e.RULES.all)){p.schema=n,p.schemaPath=o,p.errSchemaPath=c,i+=" for (var "+f+" = 0; "+f+" < "+d+".length; "+f+"++) { ",p.errorPath=e.util.getPathExpr(e.errorPath,f,e.opts.jsonPointers,!0);O=d+"["+f+"]";p.dataPathArr[g]=f;j=e.validate(p);p.baseId=_,e.util.varOccurences(j,y)<2?i+=" "+e.util.varReplace(j,y,O)+" ":i+=" var "+y+" = "+O+"; "+j+" ",l&&(i+=" if (!"+v+") break; "),i+=" }"}return l&&(i+=" "+m+" if ("+h+" == errors) {"),i},maximum:Pn,minimum:Pn,maxItems:Sn,minItems:Sn,maxLength:kn,minLength:kn,maxProperties:xn,minProperties:xn,multipleOf:function(e,t,r){var i,s=" ",a=e.level,n=e.dataLevel,o=e.schema[t],c=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,u="data"+(n||""),h=e.opts.$data&&o&&o.$data;if(h?(s+=" var schema"+a+" = "+e.util.getData(o.$data,n,e.dataPathArr)+"; ",i="schema"+a):i=o,!h&&"number"!=typeof o)throw new Error(t+" must be number");s+="var division"+a+";if (",h&&(s+=" "+i+" !== undefined && ( typeof "+i+" != 'number' || "),s+=" (division"+a+" = "+u+" / "+i+", ",e.opts.multipleOfPrecision?s+=" Math.abs(Math.round(division"+a+") - division"+a+") > 1e-"+e.opts.multipleOfPrecision+" ":s+=" division"+a+" !== parseInt(division"+a+") ",s+=" ) ",h&&(s+=" ) "),s+=" ) { ";var p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { multipleOf: "+i+" } ",!1!==e.opts.messages&&(s+=" , message: 'should be multiple of ",s+=h?"' + "+i:i+"'"),e.opts.verbose&&(s+=" , schema: ",s+=h?"validate.schema"+c:""+o,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),!e.compositeRule&&d?e.async?s+=" throw new ValidationError(["+m+"]); ":s+=" validate.errors = ["+m+"]; return false; ":s+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",d&&(s+=" else { "),s},not:function(e,t,r){var i=" ",s=e.level,a=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,d="data"+(a||""),u="errs__"+s,h=e.util.copy(e);h.level++;var p="valid"+h.level;if(e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0:e.util.schemaHasRules(n,e.RULES.all)){h.schema=n,h.schemaPath=o,h.errSchemaPath=c,i+=" var "+u+" = errors; ";var m,v=e.compositeRule;e.compositeRule=h.compositeRule=!0,h.createErrors=!1,h.opts.allErrors&&(m=h.opts.allErrors,h.opts.allErrors=!1),i+=" "+e.validate(h)+" ",h.createErrors=!0,m&&(h.opts.allErrors=m),e.compositeRule=h.compositeRule=v,i+=" if ("+p+") { ";var f=f||[];f.push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be valid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var g=i;i=f.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+g+"]); ":i+=" validate.errors = ["+g+"]; return false; ":i+=" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { errors = "+u+"; if (vErrors !== null) { if ("+u+") vErrors.length = "+u+"; else vErrors = null; } ",e.opts.allErrors&&(i+=" } ")}else i+=" var err = ",!1!==e.createErrors?(i+=" { keyword: 'not' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",!1!==e.opts.messages&&(i+=" , message: 'should NOT be valid' "),e.opts.verbose&&(i+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l&&(i+=" if (false) { ");return i},oneOf:function(e,t,r){var i=" ",s=e.level,a=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,d="data"+(a||""),u="valid"+s,h="errs__"+s,p=e.util.copy(e),m="";p.level++;var v="valid"+p.level,f=p.baseId,g="prevValid"+s,y="passingSchemas"+s;i+="var "+h+" = errors , "+g+" = false , "+u+" = false , "+y+" = null; ";var _=e.compositeRule;e.compositeRule=p.compositeRule=!0;var b=n;if(b)for(var w,E=-1,P=b.length-1;E0:e.util.schemaHasRules(w,e.RULES.all))?(p.schema=w,p.schemaPath=o+"["+E+"]",p.errSchemaPath=c+"/"+E,i+=" "+e.validate(p)+" ",p.baseId=f):i+=" var "+v+" = true; ",E&&(i+=" if ("+v+" && "+g+") { "+u+" = false; "+y+" = ["+y+", "+E+"]; } else { ",m+="}"),i+=" if ("+v+") { "+u+" = "+g+" = true; "+y+" = "+E+"; }";return e.compositeRule=p.compositeRule=_,i+=m+"if (!"+u+") { var err = ",!1!==e.createErrors?(i+=" { keyword: 'oneOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { passingSchemas: "+y+" } ",!1!==e.opts.messages&&(i+=" , message: 'should match exactly one schema in oneOf' "),e.opts.verbose&&(i+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",!e.compositeRule&&l&&(e.async?i+=" throw new ValidationError(vErrors); ":i+=" validate.errors = vErrors; return false; "),i+="} else { errors = "+h+"; if (vErrors !== null) { if ("+h+") vErrors.length = "+h+"; else vErrors = null; }",e.opts.allErrors&&(i+=" } "),i},pattern:function(e,t,r){var i,s=" ",a=e.level,n=e.dataLevel,o=e.schema[t],c=e.schemaPath+e.util.getProperty(t),l=e.errSchemaPath+"/"+t,d=!e.opts.allErrors,u="data"+(n||""),h=e.opts.$data&&o&&o.$data;h?(s+=" var schema"+a+" = "+e.util.getData(o.$data,n,e.dataPathArr)+"; ",i="schema"+a):i=o,s+="if ( ",h&&(s+=" ("+i+" !== undefined && typeof "+i+" != 'string') || "),s+=" !"+(h?"(new RegExp("+i+"))":e.usePattern(o))+".test("+u+") ) { ";var p=p||[];p.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'pattern' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { pattern: ",s+=h?""+i:""+e.util.toQuotedString(o),s+=" } ",!1!==e.opts.messages&&(s+=" , message: 'should match pattern \"",s+=h?"' + "+i+" + '":""+e.util.escapeQuotes(o),s+="\"' "),e.opts.verbose&&(s+=" , schema: ",s+=h?"validate.schema"+c:""+e.util.toQuotedString(o),s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var m=s;return s=p.pop(),!e.compositeRule&&d?e.async?s+=" throw new ValidationError(["+m+"]); ":s+=" validate.errors = ["+m+"]; return false; ":s+=" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+="} ",d&&(s+=" else { "),s},properties:function(e,t,r){var i=" ",s=e.level,a=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,d="data"+(a||""),u="errs__"+s,h=e.util.copy(e),p="";h.level++;var m="valid"+h.level,v="key"+s,f="idx"+s,g=h.dataLevel=e.dataLevel+1,y="data"+g,_="dataProperties"+s,b=Object.keys(n||{}).filter(A),w=e.schema.patternProperties||{},E=Object.keys(w).filter(A),P=e.schema.additionalProperties,S=b.length||E.length,k=!1===P,x="object"==typeof P&&Object.keys(P).length,$=e.opts.removeAdditional,O=k||x||$,j=e.opts.ownProperties,C=e.baseId,D=e.schema.required;if(D&&(!e.opts.$data||!D.$data)&&D.length8)i+=" || validate.schema"+o+".hasOwnProperty("+v+") ";else{var T=b;if(T)for(var N=-1,R=T.length-1;N0:e.util.schemaHasRules(Z,e.RULES.all)){var X=e.util.getProperty(W),ee=(Q=d+X,K&&void 0!==Z.default);h.schema=Z,h.schemaPath=o+X,h.errSchemaPath=c+"/"+e.util.escapeFragment(W),h.errorPath=e.util.getPath(e.errorPath,W,e.opts.jsonPointers),h.dataPathArr[g]=e.util.toQuotedString(W);B=e.validate(h);if(h.baseId=C,e.util.varOccurences(B,y)<2){B=e.util.varReplace(B,y,Q);var te=Q}else{te=y;i+=" var "+y+" = "+Q+"; "}if(ee)i+=" "+B+" ";else{if(z&&z[W]){i+=" if ( "+te+" === undefined ",j&&(i+=" || ! Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(W)+"') "),i+=") { "+m+" = false; ";L=e.errorPath,U=c;var re,ie=e.util.escapeQuotes(W);e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPath(L,W,e.opts.jsonPointers)),c=e.errSchemaPath+"/required",(re=re||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+ie+"' } ",!1!==e.opts.messages&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+ie+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";q=i;i=re.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+q+"]); ":i+=" validate.errors = ["+q+"]; return false; ":i+=" var err = "+q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",c=U,e.errorPath=L,i+=" } else { "}else l?(i+=" if ( "+te+" === undefined ",j&&(i+=" || ! Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(W)+"') "),i+=") { "+m+" = true; } else { "):(i+=" if ("+te+" !== undefined ",j&&(i+=" && Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(W)+"') "),i+=" ) { ");i+=" "+B+" } "}}l&&(i+=" if ("+m+") { ",p+="}")}}if(E.length){var se=E;if(se)for(var ae,ne=-1,oe=se.length-1;ne0:e.util.schemaHasRules(Z,e.RULES.all)){h.schema=Z,h.schemaPath=e.schemaPath+".patternProperties"+e.util.getProperty(ae),h.errSchemaPath=e.errSchemaPath+"/patternProperties/"+e.util.escapeFragment(ae),i+=j?" "+_+" = "+_+" || Object.keys("+d+"); for (var "+f+"=0; "+f+"<"+_+".length; "+f+"++) { var "+v+" = "+_+"["+f+"]; ":" for (var "+v+" in "+d+") { ",i+=" if ("+e.usePattern(ae)+".test("+v+")) { ",h.errorPath=e.util.getPathExpr(e.errorPath,v,e.opts.jsonPointers);Q=d+"["+v+"]";h.dataPathArr[g]=v;B=e.validate(h);h.baseId=C,e.util.varOccurences(B,y)<2?i+=" "+e.util.varReplace(B,y,Q)+" ":i+=" var "+y+" = "+Q+"; "+B+" ",l&&(i+=" if (!"+m+") break; "),i+=" } ",l&&(i+=" else "+m+" = true; "),i+=" } ",l&&(i+=" if ("+m+") { ",p+="}")}}}return l&&(i+=" "+p+" if ("+u+" == errors) {"),i},propertyNames:function(e,t,r){var i=" ",s=e.level,a=e.dataLevel,n=e.schema[t],o=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,d="data"+(a||""),u="errs__"+s,h=e.util.copy(e);h.level++;var p="valid"+h.level;if(i+="var "+u+" = errors;",e.opts.strictKeywords?"object"==typeof n&&Object.keys(n).length>0:e.util.schemaHasRules(n,e.RULES.all)){h.schema=n,h.schemaPath=o,h.errSchemaPath=c;var m="key"+s,v="idx"+s,f="i"+s,g="' + "+m+" + '",y="data"+(h.dataLevel=e.dataLevel+1),_="dataProperties"+s,b=e.opts.ownProperties,w=e.baseId;b&&(i+=" var "+_+" = undefined; "),i+=b?" "+_+" = "+_+" || Object.keys("+d+"); for (var "+v+"=0; "+v+"<"+_+".length; "+v+"++) { var "+m+" = "+_+"["+v+"]; ":" for (var "+m+" in "+d+") { ",i+=" var startErrs"+s+" = errors; ";var E=m,P=e.compositeRule;e.compositeRule=h.compositeRule=!0;var S=e.validate(h);h.baseId=w,e.util.varOccurences(S,y)<2?i+=" "+e.util.varReplace(S,y,E)+" ":i+=" var "+y+" = "+E+"; "+S+" ",e.compositeRule=h.compositeRule=P,i+=" if (!"+p+") { for (var "+f+"=startErrs"+s+"; "+f+"0:e.util.schemaHasRules(_,e.RULES.all))||(m[m.length]=f)}}else m=n;if(h||m.length){var b=e.errorPath,w=h||m.length>=e.opts.loopRequired,E=e.opts.ownProperties;if(l)if(i+=" var missing"+s+"; ",w){h||(i+=" var "+p+" = validate.schema"+o+"; ");var P="' + "+(j="schema"+s+"["+(x="i"+s)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(b,j,e.opts.jsonPointers)),i+=" var "+u+" = true; ",h&&(i+=" if (schema"+s+" === undefined) "+u+" = true; else if (!Array.isArray(schema"+s+")) "+u+" = false; else {"),i+=" for (var "+x+" = 0; "+x+" < "+p+".length; "+x+"++) { "+u+" = "+d+"["+p+"["+x+"]] !== undefined ",E&&(i+=" && Object.prototype.hasOwnProperty.call("+d+", "+p+"["+x+"]) "),i+="; if (!"+u+") break; } ",h&&(i+=" } "),i+=" if (!"+u+") { ",(O=O||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+P+"' } ",!1!==e.opts.messages&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+P+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";var S=i;i=O.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+S+"]); ":i+=" validate.errors = ["+S+"]; return false; ":i+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { "}else{i+=" if ( ";var k=m;if(k)for(var x=-1,$=k.length-1;x<$;){D=k[x+=1],x&&(i+=" || "),i+=" ( ( "+(N=d+(T=e.util.getProperty(D)))+" === undefined ",E&&(i+=" || ! Object.prototype.hasOwnProperty.call("+d+", '"+e.util.escapeQuotes(D)+"') "),i+=") && (missing"+s+" = "+e.util.toQuotedString(e.opts.jsonPointers?D:T)+") ) "}i+=") { ";var O;P="' + "+(j="missing"+s)+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.opts.jsonPointers?e.util.getPathExpr(b,j,!0):b+" + "+j),(O=O||[]).push(i),i="",!1!==e.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+P+"' } ",!1!==e.opts.messages&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+P+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ";S=i;i=O.pop(),!e.compositeRule&&l?e.async?i+=" throw new ValidationError(["+S+"]); ":i+=" validate.errors = ["+S+"]; return false; ":i+=" var err = "+S+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { "}else if(w){h||(i+=" var "+p+" = validate.schema"+o+"; ");var j;P="' + "+(j="schema"+s+"["+(x="i"+s)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(b,j,e.opts.jsonPointers)),h&&(i+=" if ("+p+" && !Array.isArray("+p+")) { var err = ",!1!==e.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+P+"' } ",!1!==e.opts.messages&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+P+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } else if ("+p+" !== undefined) { "),i+=" for (var "+x+" = 0; "+x+" < "+p+".length; "+x+"++) { if ("+d+"["+p+"["+x+"]] === undefined ",E&&(i+=" || ! Object.prototype.hasOwnProperty.call("+d+", "+p+"["+x+"]) "),i+=") { var err = ",!1!==e.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { missingProperty: '"+P+"' } ",!1!==e.opts.messages&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+P+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+o+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),i+=" } "):i+=" {} ",i+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; } } ",h&&(i+=" } ")}else{var C=m;if(C)for(var D,z=-1,A=C.length-1;z 1) { ";var m=e.schema.items&&e.schema.items.type,v=Array.isArray(m);if(!m||"object"==m||"array"==m||v&&(m.indexOf("object")>=0||m.indexOf("array")>=0))s+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+u+"[i], "+u+"[j])) { "+h+" = false; break outer; } } } ";else{s+=" var itemIndices = {}, item; for (;i--;) { var item = "+u+"[i]; ";var f="checkDataType"+(v?"s":"");s+=" if ("+e.util[f](m,"item",e.opts.strictNumbers,!0)+") continue; ",v&&(s+=" if (typeof item == 'string') item = '\"' + item; "),s+=" if (typeof itemIndices[item] == 'number') { "+h+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "}s+=" } ",p&&(s+=" } "),s+=" if (!"+h+") { ";var g=g||[];g.push(s),s="",!1!==e.createErrors?(s+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(s+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(s+=" , schema: ",s+=p?"validate.schema"+c:""+o,s+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+u+" "),s+=" } "):s+=" {} ";var y=s;s=g.pop(),!e.compositeRule&&d?e.async?s+=" throw new ValidationError(["+y+"]); ":s+=" validate.errors = ["+y+"]; return false; ":s+=" var err = "+y+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",s+=" } ",d&&(s+=" else { ")}else d&&(s+=" if (true) { ");return s},validate:Ha},On=ua.toHash,jn=["multipleOf","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","additionalItems","maxItems","minItems","uniqueItems","maxProperties","minProperties","required","additionalProperties","enum","format","const"],Cn=function(e,t){for(var r=0;r