iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
5 lines • 26.5 kB
JavaScript
webpackChunkhome_assistant_frontend=self.webpackChunkhome_assistant_frontend||[]).push([["3098"],{50875:function(e,t,i){i.d(t,{Eu:()=>r,hZ:()=>a,o9:()=>d});var n=i(27486),o=i(11259);const s=["#4269d0","#f4bd4a","#ff725c","#6cc5b0","#a463f2","#ff8ab7","#9c6b4e","#97bbf5","#01ab63","#9498a0","#094bad","#c99000","#d84f3e","#49a28f","#048732","#d96895","#8043ce","#7599d1","#7a4c31","#74787f","#6989f4","#ffd444","#ff957c","#8fe9d3","#62cc71","#ffadda","#c884ff","#badeff","#bf8b6d","#b6bac2","#927acc","#97ee3f","#bf3947","#9f5b00","#f48758","#8caed6","#f2b94f","#eff26e","#e43872","#d9b100","#9d7a00","#698cff","#d9d9d9","#00d27e","#d06800","#009f82","#c49200","#cbe8ff","#fecddf","#c27eb6","#8cd2ce","#c4b8d9","#f883b0","#a49100","#f48800","#27d0df","#a04a9b"];function r(e){return s[e%s.length]}function a(e,t){const i=t.getPropertyValue(`--graph-color-${e+1}`)||r(e);return(0,o.Rq)(i)}const d=(0,n.Z)((e=>s.map(((t,i)=>a(i,e)))),((e,t)=>e[0].getPropertyValue("--graph-color-1")===t[0].getPropertyValue("--graph-color-1")))},31146:function(e,t,i){i.d(t,{i:()=>o});const n=(0,i(93826).P)((e=>{history.replaceState({scrollPosition:e},"")}),300),o=e=>t=>({kind:"method",placement:"prototype",key:t.key,descriptor:{set(e){n(e),this[`__${String(t.key)}`]=e},get(){var e;return this[`__${String(t.key)}`]||(null===(e=history.state)||void 0===e?void 0:e.scrollPosition)},enumerable:!0,configurable:!0},finisher(i){const n=i.prototype.connectedCallback;i.prototype.connectedCallback=function(){n.call(this);const i=this[t.key];i&&this.updateComplete.then((()=>{const t=this.renderRoot.querySelector(e);t&&setTimeout((()=>{t.scrollTop=i}),0)}))}}})},85746:function(e,t,i){i.d(t,{V:()=>o});var n=i(87733);const o=(e,t)=>(e=>{switch(e){case"de":case"lb":return!0;default:return!1}})(t)?(0,n.f)(e):e.toLocaleLowerCase(t)},17170:function(e,t,i){i.a(e,(async function(e,n){try{i.r(t),i.d(t,{HaSpinner:()=>g});var o=i(61701),s=i(72621),r=(i(71695),i(47021),i(97677)),a=i(43580),d=i(57243),c=i(50778),l=e([r]);r=(l.then?(await l)():l)[0];let u,h=e=>e,g=(0,o.Z)([(0,c.Mo)("ha-spinner")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,c.Cb)()],key:"size",value:void 0},{kind:"method",key:"updated",value:function(e){if((0,s.Z)(i,"updated",this,3)([e]),e.has("size"))switch(this.size){case"tiny":this.style.setProperty("--ha-spinner-size","16px");break;case"small":this.style.setProperty("--ha-spinner-size","28px");break;case"medium":this.style.setProperty("--ha-spinner-size","48px");break;case"large":this.style.setProperty("--ha-spinner-size","68px");break;case void 0:this.style.removeProperty("--ha-progress-ring-size")}}},{kind:"field",static:!0,key:"styles",value(){return[a.Z,(0,d.iv)(u||(u=h`:host{--indicator-color:var(
--ha-spinner-indicator-color,
var(--primary-color)
);--track-color:var(--ha-spinner-divider-color, var(--divider-color));--track-width:4px;--speed:3.5s;font-size:var(--ha-spinner-size, 48px)}`))]}}]}}),r.Z);n()}catch(u){n(u)}}))},25433:function(e,t,i){i.d(t,{MY:()=>b,Yc:()=>g,hb:()=>v,jV:()=>c,o1:()=>f,ri:()=>p,sS:()=>u});i(71695),i(40251),i(19134),i(11740),i(97003),i(88044),i(47021);var n=i(73358),o=i(73850),s=i(59847),r=i(85746),a=i(96194);const d="ui.components.logbook.messages",c=["counter","proximity","sensor","zone"],l={triggered_by_numeric_state_of:"numeric state of",triggered_by_state_of:"state of",triggered_by_event:"event",triggered_by_time_pattern:"time pattern",triggered_by_time:"time",triggered_by_homeassistant_stopping:"ioBroker stopping",triggered_by_homeassistant_starting:"ioBroker starting"},u=async(e,t,i)=>h(e,t,void 0,void 0,i),h=(e,t,i,n,o,s)=>{if((n||s)&&(!n||0===n.length)&&(!s||0===s.length))return Promise.resolve([]);const r={type:"logbook/get_events",start_time:t};return i&&(r.end_time=i),null!=n&&n.length&&(r.entity_ids=n),null!=s&&s.length&&(r.device_ids=s),o&&(r.context_id=o),e.callWS(r)},g=(e,t,i,n,o,s)=>{if((o||s)&&(!o||0===o.length)&&(!s||0===s.length))return Promise.reject("No entities or devices");const r={type:"logbook/event_stream",start_time:i,end_time:n};return null!=o&&o.length&&(r.entity_ids=o),null!=s&&s.length&&(r.device_ids=s),e.connection.subscribeMessage((e=>t(e)),r)},f=(e,t)=>({entity_id:e.entity_id,state:t,attributes:{device_class:null==e?void 0:e.attributes.device_class,source_type:null==e?void 0:e.attributes.source_type,has_date:null==e?void 0:e.attributes.has_date,has_time:null==e?void 0:e.attributes.has_time,entity_picture_local:n.iY.has((0,o.M)(e.entity_id))||null==e?void 0:e.attributes.entity_picture_local,entity_picture:n.iY.has((0,o.M)(e.entity_id))||null==e?void 0:e.attributes.entity_picture}}),v=(e,t)=>{for(const i of Object.keys(l)){const n=l[i];if(t.startsWith(n))return t.replace(n,`${e(`ui.components.logbook.${i}`)}`)}return t},p=(e,t,i,o,s)=>{switch(s){case"device_tracker":case"person":return"not_home"===i?t(`${d}.was_away`):"home"===i?t(`${d}.was_at_home`):t(`${d}.was_at_state`,{state:i});case"sun":return t("above_horizon"===i?`${d}.rose`:`${d}.set`);case"binary_sensor":{const s=i===n.uo,a=i===n.lC,c=o.attributes.device_class;if(c&&(s||a))return t(`${d}.${s?"detected_device_classes":"cleared_device_classes"}.${c}`,{device_class:(0,r.V)(t(`component.binary_sensor.entity_component.${c}.name`)||c,e.language)})||t(`${d}.${s?"detected_device_class":"cleared_device_class"}`,{device_class:(0,r.V)(t(`component.binary_sensor.entity_component.${c}.name`)||c,e.language)});break}case"cover":switch(i){case"open":return t(`${d}.was_opened`);case"opening":return t(`${d}.is_opening`);case"closing":return t(`${d}.is_closing`);case"closed":return t(`${d}.was_closed`)}break;case"event":return t(`${d}.detected_event_no_type`);case"lock":switch(i){case"unlocked":return t(`${d}.was_unlocked`);case"locking":return t(`${d}.is_locking`);case"unlocking":return t(`${d}.is_unlocking`);case"opening":return t(`${d}.is_opening`);case"open":return t(`${d}.is_opened`);case"locked":return t(`${d}.was_locked`);case"jammed":return t(`${d}.is_jammed`)}}return i===n.uo?t(`${d}.turned_on`):i===n.lC?t(`${d}.turned_off`):i===a.lz?t(`${d}.became_unknown`):i===a.nZ?t(`${d}.became_unavailable`):e.localize(`${d}.changed_to_state`,{state:o?e.formatEntityState(o,i):i})},b=e=>"sensor"!==(0,s.N)(e)||void 0===e.attributes.unit_of_measurement&&void 0===e.attributes.state_class},16581:function(e,t,i){i.a(e,(async function(e,t){try{var n=i(61701),o=i(72621),s=(i(52247),i(19083),i(71695),i(92745),i(61495),i(61893),i(9359),i(56475),i(31526),i(52924),i(40251),i(61006),i(47021),i(57243)),r=i(50778),a=i(72344),d=i(59847),c=i(93826),l=i(17170),u=i(25433),h=i(75244),g=i(4242),f=i(82480),v=e([l,f]);[l,f]=v.then?(await v)():v;let p,b,m,_,k,y=e=>e;const w=(e,t)=>new Date(e.getTime()-1e3*t).getTime()/1e3,$=(e,t)=>(void 0!==e||void 0!==t)&&(!e||!t||e.length!==t.length||e.some((e=>!t.includes(e)))||t.some((t=>!e.includes(t))));(0,n.Z)([(0,r.Mo)("ha-logbook")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"time",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"entityIds",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"deviceIds",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"narrow",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,reflect:!0})],key:"virtualize",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,attribute:"no-icon"})],key:"noIcon",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,attribute:"no-name"})],key:"noName",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,attribute:"show-indicator"})],key:"showIndicator",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,attribute:"relative-time"})],key:"relativeTime",value(){return!1}},{kind:"field",decorators:[(0,r.Cb)({attribute:"show-more-link",type:Boolean})],key:"showMoreLink",value(){return!0}},{kind:"field",decorators:[(0,r.SB)()],key:"_logbookEntries",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_traceContexts",value(){return{}}},{kind:"field",decorators:[(0,r.SB)()],key:"_userIdToName",value(){return{}}},{kind:"field",decorators:[(0,r.SB)()],key:"_error",value:void 0},{kind:"field",key:"_unsubLogbook",value:void 0},{kind:"field",key:"_liveUpdatesEnabled",value(){return!0}},{kind:"field",key:"_pendingStreamMessages",value(){return[]}},{kind:"field",key:"_throttleGetLogbookEntries",value(){return(0,c.P)((()=>this._getLogBookData()),1e3)}},{kind:"method",key:"render",value:function(){return(0,a.p)(this.hass,"logbook")?this._error?(0,s.dy)(p||(p=y`<div class="no-entries"> ${0} </div>`),`${this.hass.localize("ui.components.logbook.retrieval_error")}: ${this._error}`):void 0===this._logbookEntries?(0,s.dy)(b||(b=y` <div class="progress-wrapper"> <ha-spinner></ha-spinner> </div> `)):0===this._logbookEntries.length?(0,s.dy)(m||(m=y`<div class="no-entries"> ${0} </div>`),this.hass.localize("ui.components.logbook.entries_not_found")):(0,s.dy)(_||(_=y` <ha-logbook-renderer .hass="${0}" .narrow="${0}" .virtualize="${0}" .noIcon="${0}" .noName="${0}" .showIndicator="${0}" .relativeTime="${0}" .entries="${0}" .traceContexts="${0}" .userIdToName="${0}" @hass-logbook-live="${0}"></ha-logbook-renderer> `),this.hass,this.narrow,this.virtualize,this.noIcon,this.noName,this.showIndicator,this.relativeTime,this._logbookEntries,this._traceContexts,this._userIdToName,this._handleLogbookLive):s.Ld}},{kind:"method",key:"refresh",value:async function(e=!1){(e||!this._unsubLogbook&&void 0!==this._logbookEntries)&&(this._throttleGetLogbookEntries.cancel(),this._updateTraceContexts.cancel(),this._updateUsers.cancel(),this._unsubscribe(!0),this._liveUpdatesEnabled=!0,e?this._getLogBookData():this._throttleGetLogbookEntries())}},{kind:"method",key:"shouldUpdate",value:function(e){if(1!==e.size||!e.has("hass"))return!0;const t=e.get("hass");return!t||t.localize!==this.hass.localize}},{kind:"method",key:"willUpdate",value:function(e){let t=e.has("time");for(const i of["entityIds","deviceIds"]){if(!e.has(i))continue;const n=e.get(i),o=this[i];if($(n,o)){t=!0;break}}t&&this.refresh(!0)}},{kind:"method",key:"_handleLogbookLive",value:function(e){e.detail.enable&&!this._liveUpdatesEnabled&&(this._pendingStreamMessages.forEach((e=>this._processStreamMessage(e))),this._pendingStreamMessages=[]),this._liveUpdatesEnabled=e.detail.enable}},{kind:"get",key:"_filterAlwaysEmptyResults",value:function(){const e=this.entityIds,t=this.deviceIds;return Boolean(e||t)&&(!e||0===e.length)&&(!t||0===t.length)}},{kind:"method",key:"_unsubscribe",value:function(e){this._unsubLogbook&&(this._unsubLogbook.then((e=>e())),this._unsubLogbook=void 0,this._logbookEntries=e?void 0:[],this._pendingStreamMessages=[])}},{kind:"method",key:"connectedCallback",value:function(){(0,o.Z)(i,"connectedCallback",this,3)([]),this.hasUpdated&&this._subscribeLogbookPeriod(this._calculateLogbookPeriod())}},{kind:"method",key:"disconnectedCallback",value:function(){(0,o.Z)(i,"disconnectedCallback",this,3)([]),this._unsubscribe(!0)}},{kind:"method",key:"_calculateLogbookPeriod",value:function(){const e=new Date;if("range"in this.time)return{now:e,startTime:this.time.range[0],endTime:this.time.range[1],purgeBeforePythonTime:void 0};if("recent"in this.time){const t=w(e,this.time.recent);return{now:e,startTime:new Date(1e3*t),endTime:new Date(e.getTime()+31536e6),purgeBeforePythonTime:w(e,this.time.recent)}}throw new Error("Unexpected time specified")}},{kind:"method",key:"_subscribeLogbookPeriod",value:async function(e){if(!this._unsubLogbook)try{this._unsubLogbook=(0,u.Yc)(this.hass,(e=>{this._processOrQueueStreamMessage(e)}),e.startTime.toISOString(),e.endTime.toISOString(),this.entityIds,this.deviceIds),await this._unsubLogbook}catch(t){this._unsubLogbook=void 0,this._error=t}}},{kind:"method",key:"_getLogBookData",value:async function(){var e;if(this._error=void 0,this._filterAlwaysEmptyResults)return void this._unsubscribe(!1);const t=this._calculateLogbookPeriod();t.startTime>t.now?this._unsubscribe(!1):(this._updateUsers(),null!==(e=this.hass.user)&&void 0!==e&&e.is_admin&&this._updateTraceContexts(),this._subscribeLogbookPeriod(t))}},{kind:"field",key:"_nonExpiredRecords",value(){return e=>this._logbookEntries?e?this._logbookEntries.filter((t=>t.when>e)):this._logbookEntries:[]}},{kind:"field",key:"_processOrQueueStreamMessage",value(){return e=>{this._liveUpdatesEnabled?this._processStreamMessage(e):this._pendingStreamMessages.push(e)}}},{kind:"field",key:"_processStreamMessage",value(){return e=>{const t="recent"in this.time?w(new Date,this.time.recent):void 0,i=[...e.events].reverse();if(!this._logbookEntries||!this._logbookEntries.length)return void(this._logbookEntries=i);if(!i.length)return;const n=this._nonExpiredRecords(t);n.length?i[i.length-1].when>n[0].when?this._logbookEntries=i.concat(n):n[n.length-1].when>i[0].when?this._logbookEntries=n.concat(i):this._logbookEntries=n.concat(i).sort(((e,t)=>t.when-e.when)):this._logbookEntries=i}}},{kind:"field",key:"_updateTraceContexts",value(){return(0,c.P)((async()=>{this._traceContexts=await(0,h.U_)(this.hass)}),6e4)}},{kind:"field",key:"_updateUsers",value(){return(0,c.P)((async()=>{var e;const t={},i=(null===(e=this.hass.user)||void 0===e?void 0:e.is_admin)&&(0,g.uh)(this.hass);for(const n of Object.values(this.hass.states))n.attributes.user_id&&"person"===(0,d.N)(n)&&(t[n.attributes.user_id]=n.attributes.friendly_name);if(i){const e=await i;for(const i of e)i.id in t||(t[i.id]=i.name)}this._userIdToName=t}),6e4)}},{kind:"get",static:!0,key:"styles",value:function(){return[(0,s.iv)(k||(k=y`:host{display:block}:host([virtualize]){height:100%}.no-entries{text-align:center;padding:16px;color:var(--secondary-text-color)}.progress-wrapper{display:flex;justify-content:center;height:100%;align-items:center}`))]}}]}}),s.oi);t()}catch(p){t(p)}}))},18573:function(e,t,i){i.a(e,(async function(e,n){try{i.r(t),i.d(t,{DEFAULT_HOURS_TO_SHOW:()=>w,HuiLogbookCard:()=>$});var o=i(61701),s=i(72621),r=(i(22152),i(52247),i(71695),i(9359),i(70104),i(19423),i(40251),i(47021),i(57243)),a=i(50778),d=i(35359),c=i(27486),l=i(72344),u=i(82393),h=(i(54977),i(16581)),g=i(69223),f=i(29401),v=(i(62577),i(41063)),p=i(95262),b=e([h]);h=(b.then?(await b)():b)[0];let m,_,k,y=e=>e;const w=24;let $=(0,o.Z)([(0,a.Mo)("hui-logbook-card")],(function(e,t){class n extends t{constructor(...t){super(...t),e(this)}}return{F:n,d:[{kind:"method",static:!0,key:"getConfigElement",value:async function(){return await Promise.all([i.e("46379"),i.e("24199"),i.e("78943"),i.e("99287"),i.e("27090"),i.e("3049"),i.e("71958"),i.e("47973")]).then(i.bind(i,31075)),document.createElement("hui-logbook-card-editor")}},{kind:"method",static:!0,key:"getStubConfig",value:function(e,t,i){return{target:{entity_id:(0,g.j)(e,3,t,i,["light","switch"])}}}},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"layout",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_config",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_time",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_targetPickerValue",value(){return{}}},{kind:"method",key:"getCardSize",value:function(){var e;return 9+(null!==(e=this._config)&&void 0!==e&&e.title?1:0)}},{kind:"method",key:"validateTarget",value:function(e){var t,i,n,o,s,r;if((!e.entities||e.entities.length)&&(!e.target||null!==(t=e.target.area_id)&&void 0!==t&&t.length||null!==(i=e.target.device_id)&&void 0!==i&&i.length||null!==(n=e.target.entity_id)&&void 0!==n&&n.length||null!==(o=e.target.floor_id)&&void 0!==o&&o.length||null!==(s=e.target.label_id)&&void 0!==s&&s.length))return e.entities?{entity_id:(0,f.A)(e.entities).map((e=>e.entity))}:null!==(r=e.target)&&void 0!==r&&r.entity_id?Object.assign(Object.assign({},e.target),{},{entity_id:(0,f.A)((0,p.r)(e.target.entity_id)).map((e=>e.entity))}):e.target}},{kind:"method",key:"setConfig",value:function(e){const t=this.validateTarget(e);if(!t)throw new Error("The provided target in the logbook card has no entities. Targets can include entities, devices, labels, or areas, with devices, areas, and labels resolving to entities.");this._config=Object.assign({hours_to_show:w},e),this._time={recent:60*this._config.hours_to_show*60},this._targetPickerValue=t}},{kind:"method",key:"_getEntityIds",value:function(){const e=this._getMemoizedEntityIds(this._targetPickerValue,this.hass.entities,this.hass.devices,this.hass.areas);if(0!==e.length)return e}},{kind:"field",key:"_getMemoizedEntityIds",value(){return(0,c.Z)(((e,t,i,n)=>(0,v.dh)(this.hass,e,t,i,n)))}},{kind:"method",key:"update",value:function(e){(0,s.Z)(n,"update",this,3)([e]),e.has("layout")&&this.toggleAttribute("ispanel","panel"===this.layout)}},{kind:"method",key:"updated",value:function(e){if((0,s.Z)(n,"updated",this,3)([e]),!this._config||!this.hass)return;const t=e.has("_config"),i=e.has("hass"),o=e.get("hass"),r=e.get("_config");(i&&(null==o?void 0:o.themes)!==this.hass.themes||t&&(null==r?void 0:r.theme)!==this._config.theme)&&(0,u.R)(this,this.hass.themes,this._config.theme)}},{kind:"method",key:"render",value:function(){return this.hass&&this._config?(0,l.p)(this.hass,"logbook")?(0,r.dy)(_||(_=y` <ha-card .header="${0}" class="${0}"> <div class="content"> <ha-logbook .hass="${0}" .time="${0}" .entityIds="${0}" narrow relative-time virtualize></ha-logbook> </div> </ha-card> `),this._config.title,(0,d.$)({"no-header":!this._config.title}),this.hass,this._time,this._getEntityIds()):(0,r.dy)(m||(m=y` <hui-warning> ${0}</hui-warning> `),this.hass.localize("ui.components.logbook.not_loaded",{platform:"logbook"})):r.Ld}},{kind:"get",static:!0,key:"styles",value:function(){return[(0,r.iv)(k||(k=y`ha-card{height:100%;display:flex;flex-direction:column;justify-content:space-between}.content{padding:0 16px 16px}.no-header .content{padding-top:16px}ha-logbook{height:385px;display:block}:host([ispanel]) .content,:host([ispanel]) ha-logbook{height:100%}`))]}}]}}),r.oi);n()}catch(m){n(m)}}))},47641:function(e,t,i){i.d(t,{o:()=>n});i(71695),i(40251),i(47021);const n=async()=>{await Promise.all([i.e("37066"),i.e("24606")]).then(i.bind(i,24700))}},88238:function(e,t,i){i.d(t,{RU:()=>o,X1:()=>n,u4:()=>s,zC:()=>r});i(88044);const n=e=>`https://brands.home-assistant.io/${e.brand?"brands/":""}${e.useFallback?"_/":""}${e.domain}/${e.darkOptimized?"dark_":""}${e.type}.png`,o=e=>`https://brands.home-assistant.io/hardware/${e.category}/${e.darkOptimized?"dark_":""}${e.manufacturer}${e.model?`_${e.model}`:""}.png`,s=e=>e.split("/")[4],r=e=>e.startsWith("https://brands.home-assistant.io/")},48734:function(e,t,i){i.a(e,(async function(e,n){try{i.d(t,{P5:()=>g,Ve:()=>v});var o=i(16485),s=(i(71695),i(9359),i(70104),i(19423),i(19134),i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814),i(97003),i(47021),e([o]));o=(s.then?(await s)():s)[0];const a=new Set,d=new Map;let c,l="ltr",u="en";const h="undefined"!=typeof MutationObserver&&"undefined"!=typeof document&&void 0!==document.documentElement;if(h){const p=new MutationObserver(f);l=document.documentElement.dir||"ltr",u=document.documentElement.lang||navigator.language,p.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function g(...e){e.map((e=>{const t=e.$code.toLowerCase();d.has(t)?d.set(t,Object.assign(Object.assign({},d.get(t)),e)):d.set(t,e),c||(c=e)})),f()}function f(){h&&(l=document.documentElement.dir||"ltr",u=document.documentElement.lang||navigator.language),[...a.keys()].map((e=>{"function"==typeof e.requestUpdate&&e.requestUpdate()}))}class v{constructor(e){this.host=e,this.host.addController(this)}hostConnected(){a.add(this.host)}hostDisconnected(){a.delete(this.host)}dir(){return`${this.host.dir||l}`.toLowerCase()}lang(){return`${this.host.lang||u}`.toLowerCase()}getTranslationData(e){var t,i;const n=new Intl.Locale(e.replace(/_/g,"-")),o=null==n?void 0:n.language.toLowerCase(),s=null!==(i=null===(t=null==n?void 0:n.region)||void 0===t?void 0:t.toLowerCase())&&void 0!==i?i:"";return{locale:n,language:o,region:s,primary:d.get(`${o}-${s}`),secondary:d.get(o)}}exists(e,t){var i;const{primary:n,secondary:o}=this.getTranslationData(null!==(i=t.lang)&&void 0!==i?i:this.lang());return t=Object.assign({includeFallback:!1},t),!!(n&&n[e]||o&&o[e]||t.includeFallback&&c&&c[e])}term(e,...t){const{primary:i,secondary:n}=this.getTranslationData(this.lang());let o;if(i&&i[e])o=i[e];else if(n&&n[e])o=n[e];else{if(!c||!c[e])return console.error(`No translation found for: ${String(e)}`),String(e);o=c[e]}return"function"==typeof o?o(...t):o}date(e,t){return e=new Date(e),new Intl.DateTimeFormat(this.lang(),t).format(e)}number(e,t){return e=Number(e),isNaN(e)?"":new Intl.NumberFormat(this.lang(),t).format(e)}relativeTime(e,t,i){return new Intl.RelativeTimeFormat(this.lang(),i).format(e,t)}}n()}catch(r){n(r)}}))},68783:function(e,t,i){i.a(e,(async function(e,n){try{i.d(t,{A:()=>l});i(71695),i(47021);var o=i(64699),s=i(15073),r=i(81048),a=i(31027),d=i(57243),c=e([s]);s=(c.then?(await c)():c)[0];let u,h=e=>e;var l=class extends a.P{constructor(){super(...arguments),this.localize=new s.V(this)}render(){return(0,d.dy)(u||(u=h` <svg part="base" class="spinner" role="progressbar" aria-label="${0}"> <circle class="spinner__track"></circle> <circle class="spinner__indicator"></circle> </svg> `),this.localize.term("loading"))}};l.styles=[r.N,o.D],n()}catch(u){n(u)}}))},31027:function(e,t,i){i.d(t,{P:()=>a});i(71695),i(9359),i(31526),i(46692),i(47021);var n,o=i(52812),s=i(57243),r=i(50778),a=class extends s.oi{constructor(){super(),(0,o.Ko)(this,n,!1),this.initialReflectedProperties=new Map,Object.entries(this.constructor.dependencies).forEach((([e,t])=>{this.constructor.define(e,t)}))}emit(e,t){const i=new CustomEvent(e,(0,o.ih)({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(i),i}static define(e,t=this,i={}){const n=customElements.get(e);if(!n){try{customElements.define(e,t,i)}catch(r){customElements.define(e,class extends t{},i)}return}let o=" (unknown version)",s=o;"version"in t&&t.version&&(o=" v"+t.version),"version"in n&&n.version&&(s=" v"+n.version),o&&s&&o===s||console.warn(`Attempted to register <${e}>${o}, but <${e}>${s} has already been registered.`)}attributeChangedCallback(e,t,i){(0,o.ac)(this,n)||(this.constructor.elementProperties.forEach(((e,t)=>{e.reflect&&null!=this[t]&&this.initialReflectedProperties.set(t,this[t])})),(0,o.qx)(this,n,!0)),super.attributeChangedCallback(e,t,i)}willUpdate(e){super.willUpdate(e),this.initialReflectedProperties.forEach(((t,i)=>{e.has(i)&&null==this[i]&&(this[i]=t)}))}};n=new WeakMap,a.version="2.20.1",a.dependencies={},(0,o.u2)([(0,r.Cb)()],a.prototype,"dir",2),(0,o.u2)([(0,r.Cb)()],a.prototype,"lang",2)},15073:function(e,t,i){i.a(e,(async function(e,n){try{i.d(t,{V:()=>a});var o=i(21262),s=i(48734),r=e([s,o]);[s,o]=r.then?(await r)():r;var a=class extends s.Ve{};(0,s.P5)(o.K),n()}catch(d){n(d)}}))},21262:function(e,t,i){i.a(e,(async function(e,n){try{i.d(t,{K:()=>a});var o=i(48734),s=e([o]);o=(s.then?(await s)():s)[0];var r={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(e,t)=>`Go to slide ${e} of ${t}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:e=>0===e?"No options selected":1===e?"1 option selected":`${e} options selected`,previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:e=>`Slide ${e}`,toggleColorFormat:"Toggle color format"};(0,o.P5)(r);var a=r;n()}catch(d){n(d)}}))},64699:function(e,t,i){i.d(t,{D:()=>o});let n;var o=(0,i(57243).iv)(n||(n=(e=>e)`:host{--track-width:2px;--track-color:rgb(128 128 128 / 25%);--indicator-color:var(--sl-color-primary-600);--speed:2s;display:inline-flex;width:1em;height:1em;flex:none}.spinner{flex:1 1 auto;height:100%;width:100%}.spinner__indicator,.spinner__track{fill:none;stroke-width:var(--track-width);r:calc(0.5em - var(--track-width)/ 2);cx:0.5em;cy:0.5em;transform-origin:50% 50%}.spinner__track{stroke:var(--track-color);transform-origin:0% 0%}.spinner__indicator{stroke:var(--indicator-color);stroke-linecap:round;stroke-dasharray:150% 75%;animation:spin var(--speed) linear infinite}@keyframes spin{0%{transform:rotate(0deg);stroke-dasharray:0.05em,3em}50%{transform:rotate(450deg);stroke-dasharray:1.375em,1.375em}100%{transform:rotate(1080deg);stroke-dasharray:0.05em,3em}}`))},52812:function(e,t,i){i.d(t,{EZ:()=>g,Ko:()=>b,ac:()=>p,ih:()=>h,qx:()=>m,u2:()=>f});i(63721),i(52247),i(71695),i(40251),i(47021);var n=Object.defineProperty,o=Object.defineProperties,s=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,l=e=>{throw TypeError(e)},u=(e,t,i)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,h=(e,t)=>{for(var i in t||(t={}))d.call(t,i)&&u(e,i,t[i]);if(a)for(var i of a(t))c.call(t,i)&&u(e,i,t[i]);return e},g=(e,t)=>o(e,r(t)),f=(e,t,i,o)=>{for(var r,a=o>1?void 0:o?s(t,i):t,d=e.length-1;d>=0;d--)(r=e[d])&&(a=(o?r(t,i,a):r(a))||a);return o&&a&&n(t,i,a),a},v=(e,t,i)=>t.has(e)||l("Cannot "+i),p=(e,t,i)=>(v(e,t,"read from private field"),i?i.call(e):t.get(e)),b=(e,t,i)=>t.has(e)?l("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),m=(e,t,i,n)=>(v(e,t,"write to private field"),n?n.call(e,i):t.set(e,i),i)},81048:function(e,t,i){i.d(t,{N:()=>o});let n;var o=(0,i(57243).iv)(n||(n=(e=>e)`:host{box-sizing:border-box}:host *,:host ::after,:host ::before{box-sizing:inherit}[hidden]{display:none!important}`))},97677:function(e,t,i){i.a(e,(async function(e,n){try{i.d(t,{Z:()=>o.A});var o=i(68783),s=(i(64699),i(15073)),r=i(21262),a=(i(81048),i(31027),i(52812),e([s,r,o]));[s,r,o]=a.then?(await a)():a,n()}catch(d){n(d)}}))},43580:function(e,t,i){i.d(t,{Z:()=>n.D});var n=i(64699);i(52812)}}]);
//# sourceMappingURL=3098.5f09e73b975420df.js.map
;(self.