UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

1 lines 6.77 kB
export const __rspack_esm_id=89305;export const __rspack_esm_ids=[89305];export const __webpack_modules__={38016(t,e,r){r.r(e);r(44114),r(18111),r(22489),r(18237),r(33110),r(17642),r(58004),r(33853),r(45876),r(32475),r(15024),r(31698),r(88454),r(29452);var n,o=r(32838);function a(t){return Intl.getCanonicalLocales(t)}function l(t,e,r,n,o){if("object"!=typeof t)throw new TypeError("Options must be an object");let a=t[e];if(void 0!==a){if("boolean"!==r&&"string"!==r)throw new TypeError("invalid type");if("boolean"===r&&(a=Boolean(a)),"string"===r&&(a=function(t){if("symbol"==typeof t)throw TypeError("Cannot convert a Symbol value to a string");return String(t)}(a)),void 0!==n&&!n.filter(t=>t==a).length)throw new RangeError(`${a} is not within ${n.join(", ")}`);return a}return o}function i(t,e){const r=e&&e.cache?e.cache:h,n=e&&e.serializer?e.serializer:f;return(e&&e.strategy?e.strategy:_)(t,{cache:r,serializer:n})}function c(t,e,r,n){const o=null==(a=n)||"number"==typeof a||"boolean"==typeof a?n:r(n);var a;let l=e.get(o);return void 0===l&&(l=t.call(this,n),e.set(o,l)),l}function s(t,e,r){const n=Array.prototype.slice.call(arguments,3),o=r(n);let a=e.get(o);return void 0===a&&(a=t.apply(this,n),e.set(o,a)),a}function u(t,e,r,n,o){return r.bind(e,t,n,o)}function _(t,e){return u(t,this,1===t.length?c:s,e.cache.create(),e.serializer)}const f=function(){return JSON.stringify(arguments)};var p=class{get(t){return this.cache[t]}set(t,e){this.cache[t]=e}constructor(){this.cache=Object.create(null)}};const h={create:function(){return new p}},d={variadic:function(t,e){return u(t,this,s,e.cache.create(),e.serializer)},monadic:function(t,e){return u(t,this,c,e.cache.create(),e.serializer)}};function y(t,e,r,n){t.get(e)||t.set(e,Object.create(null));t.get(e)[r]=n}function b(t,e,r){return function(t,e,...r){const n=t.get(e);if(!n)throw new TypeError(`${e} InternalSlot has not been initialized`);return r.reduce((t,e)=>(t[e]=n[e],t),Object.create(null))}(t,e,r)[r]}function L(t){return"literal"===t.type}function g(t,e,r=Error){if(!t)throw new r(e)}function v(t,e,r){let n="best fit";return void 0!==r&&(n=l(r=function(t){if(null==t)throw new TypeError("undefined/null cannot be converted to object");return Object(t)}(r),"localeMatcher","string",["lookup","best fit"],"best fit")),(0,o.s8)(Array.from(t),e)}function T(t,e){if(!(t instanceof O))throw new TypeError(`Method Intl.ListFormat.prototype.${e} called on incompatible receiver ${String(t)}`)}function m(t){if("object"!=typeof t)return[];const e=[],r=t[Symbol.iterator]();let n;for(;n=r.next(),!n.done;){if("string"!=typeof n.value){const t=n.value;throw new TypeError(`Iterable yielded ${t} which is not a string`)}e.push(n.value)}return e}function A(t,e,r){const n=r.length;if(0===n)return[];if(2===n)return w(b(t,e,"templatePair"),{0:{type:"element",value:r[0]},1:{type:"element",value:r[1]}});let o={type:"element",value:r[n-1]},a=n-2;for(;a>=0;){let l;l=b(t,e,0===a?"templateStart":a<n-2?"templateMiddle":"templateEnd");o=w(l,{0:{type:"element",value:r[a]},1:o}),a--}return o}function w(t,e){const r=function(t){const e=[];let r=t.indexOf("{"),n=0,o=0;const a=t.length;for(;r<t.length&&r>-1;)n=t.indexOf("}",r),g(n>r,`Invalid pattern ${t}`),r>o&&e.push({type:"literal",value:t.substring(o,r)}),e.push({type:t.substring(r+1,n),value:void 0}),o=n+1,r=t.indexOf("{",o);return o<a&&e.push({type:"literal",value:t.substring(o,a)}),e}(t),n=[];for(const t of r){const{type:r}=t;if(L(t))n.push({type:"literal",value:t.value});else{g(r in e,`${r} is missing from placables`);const t=e[r];Array.isArray(t)?n.push(...t):n.push(t)}}return n}i((...t)=>new Intl.NumberFormat(...t),{strategy:d.variadic}),i((...t)=>new Intl.PluralRules(...t),{strategy:d.variadic}),i((...t)=>new Intl.Locale(...t),{strategy:d.variadic}),i((...t)=>new Intl.ListFormat(...t),{strategy:d.variadic});var O=(n=class t{format(e){T(this,"format");let r="";const n=A(t.__INTERNAL_SLOT_MAP__,this,m(e));if(!Array.isArray(n))return n.value;for(const t of n)r+=t.value;return r}formatToParts(e){T(this,"format");const r=A(t.__INTERNAL_SLOT_MAP__,this,m(e));if(!Array.isArray(r))return[r];const n=[];for(const t of r)n.push({...t});return n}resolvedOptions(){return T(this,"resolvedOptions"),{locale:b(t.__INTERNAL_SLOT_MAP__,this,"locale"),type:b(t.__INTERNAL_SLOT_MAP__,this,"type"),style:b(t.__INTERNAL_SLOT_MAP__,this,"style")}}static supportedLocalesOf(e,r){return v(t.availableLocales,a(e),r)}static __addLocaleData(...e){for(const{data:r,locale:n}of e){const e=new Intl.Locale(n).minimize().toString();t.localeData[n]=t.localeData[e]=r,t.availableLocales.add(e),t.availableLocales.add(n),t.__defaultLocale||(t.__defaultLocale=e)}}static getDefaultLocale(){return t.__defaultLocale}constructor(e,r){if(!(this&&this instanceof t?this.constructor:void 0))throw new TypeError("Intl.ListFormat must be called with 'new'");y(t.__INTERNAL_SLOT_MAP__,this,"initializedListFormat",!0);const n=a(e),i=Object.create(null),c=function(t){if(void 0===t)return Object.create(null);if("object"==typeof t)return t;throw new TypeError("Options must be an object")}(r);i.localeMatcher=l(c,"localeMatcher","string",["best fit","lookup"],"best fit");const{localeData:s}=t,u=(0,o.Bg)(t.availableLocales,n,i,t.relevantExtensionKeys,s,t.getDefaultLocale);y(t.__INTERNAL_SLOT_MAP__,this,"locale",u.locale);const _=l(c,"type","string",["conjunction","disjunction","unit"],"conjunction");y(t.__INTERNAL_SLOT_MAP__,this,"type",_);const f=l(c,"style","string",["long","short","narrow"],"long");y(t.__INTERNAL_SLOT_MAP__,this,"style",f);const{dataLocale:p}=u,h=s[p];g(!!h,`Missing locale data for ${p}`);const d=h[_][f];y(t.__INTERNAL_SLOT_MAP__,this,"templatePair",d.pair),y(t.__INTERNAL_SLOT_MAP__,this,"templateStart",d.start),y(t.__INTERNAL_SLOT_MAP__,this,"templateMiddle",d.middle),y(t.__INTERNAL_SLOT_MAP__,this,"templateEnd",d.end)}},n.localeData={},n.availableLocales=new Set,n.__defaultLocale="",n.relevantExtensionKeys=[],n.polyfilled=!0,n.__INTERNAL_SLOT_MAP__=new WeakMap,n);try{"undefined"!=typeof Symbol&&Object.defineProperty(O.prototype,Symbol.toStringTag,{value:"Intl.ListFormat",writable:!1,enumerable:!1,configurable:!0}),Object.defineProperty(O.prototype.constructor,"length",{value:0,writable:!1,enumerable:!1,configurable:!0}),Object.defineProperty(O.supportedLocalesOf,"length",{value:1,writable:!1,enumerable:!1,configurable:!0})}catch{}!function(t,e,{value:r}){Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:!0,value:r})}(("undefined"==typeof Intl&&Object.defineProperty(globalThis,"Intl",{configurable:!0,enumerable:!1,writable:!0,value:{}}),Intl),"ListFormat",{value:O});const I=globalThis.__FORMATJS_LISTFORMAT_DATA__;if(I){for(const t of I)O.__addLocaleData(t);delete globalThis.__FORMATJS_LISTFORMAT_DATA__}}};