iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
1 lines • 27.6 kB
JavaScript
export const __rspack_esm_id=6463;export const __rspack_esm_ids=[6463];export const __webpack_modules__={97309(t,e,n){n.d(e,{Ay:()=>o,Ww:()=>o,gZ:()=>o});var i=function(t){return t[t.NONE=0]="NONE",t[t.NAN=1]="NAN",t[t.POSITIVE_INFINITY=2]="POSITIVE_INFINITY",t[t.NEGATIVE_INFINITY=3]="NEGATIVE_INFINITY",t}(i||{});function r(t,e){if(0n===t)return[0n,0];for(;t%10n==0n;)t/=10n,e++;return[t,e]}function s(t){return t<0n?-t:t}function a(t){if(t<=0)return 1n;let e=1n,n=10n,i=t;for(;i>0;)1&i&&(e*=n),n*=n,i>>=1;return e}var o=class t{static _create(e,n,i,r){const s=Object.create(t.prototype);return s._mantissa=e,s._exponent=n,s._special=i,s._negativeZero=r,s}static _coerce(e){return e instanceof t?e:new t(e)}times(e){const n=t._coerce(e);if(this._special||n._special)return this._specialArith(n,"times");if(0n===this._mantissa||0n===n._mantissa){const e=this._isSignNegative()?!n._isSignNegative():n._isSignNegative();return t._create(0n,0,i.NONE,e)}const[s,a]=r(this._mantissa*n._mantissa,this._exponent+n._exponent);return t._create(s,a,i.NONE,!1)}div(e){const n=t._coerce(e);if(this._special||n._special)return this._specialArith(n,"div");if(0n===n._mantissa){if(0n===this._mantissa)return t._create(0n,0,i.NAN,!1);const e=this._isSignNegative()!==n._isSignNegative();return t._create(0n,0,e?i.NEGATIVE_INFINITY:i.POSITIVE_INFINITY,!1)}if(0n===this._mantissa){const e=this._isSignNegative()!==n._isSignNegative();return t._create(0n,0,i.NONE,e)}const[s,o]=r(this._mantissa*a(40)/n._mantissa,this._exponent-n._exponent-40);return t._create(s,o,i.NONE,!1)}plus(e){const n=t._coerce(e);if(this._special||n._special)return this._specialArith(n,"plus");if(0n===this._mantissa&&0n===n._mantissa){const e=this._negativeZero&&n._negativeZero;return t._create(0n,0,i.NONE,e)}if(0n===this._mantissa)return n;if(0n===n._mantissa)return this;let s=this._mantissa,o=n._mantissa;const l=this._exponent,c=n._exponent,u=Math.min(l,c);l>u&&(s*=a(l-u)),c>u&&(o*=a(c-u));const f=s+o;if(0n===f)return t._create(0n,0,i.NONE,!1);const[g,m]=r(f,u);return t._create(g,m,i.NONE,!1)}minus(e){return this.plus(t._coerce(e).negated())}mod(e){const n=t._coerce(e);if(this._special||n._special){if(this._special===i.NAN||n._special===i.NAN)return t._create(0n,0,i.NAN,!1);if(this._special===i.POSITIVE_INFINITY||this._special===i.NEGATIVE_INFINITY)return t._create(0n,0,i.NAN,!1);if(n._special===i.POSITIVE_INFINITY||n._special===i.NEGATIVE_INFINITY)return this}if(0n===n._mantissa)return t._create(0n,0,i.NAN,!1);if(0n===this._mantissa)return this;let s=this._mantissa,o=n._mantissa;const l=this._exponent,c=n._exponent,u=Math.min(l,c);l>u&&(s*=a(l-u)),c>u&&(o*=a(c-u));const f=s%o;if(0n===f)return t._create(0n,0,i.NONE,!1);const[g,m]=r(f,u);return t._create(g,m,i.NONE,!1)}abs(){return this._special===i.NAN?this:this._special===i.NEGATIVE_INFINITY?t._create(0n,0,i.POSITIVE_INFINITY,!1):t._create(s(this._mantissa),this._exponent,this._special,!1)}negated(){return this._special===i.NAN?this:this._special===i.POSITIVE_INFINITY?t._create(0n,0,i.NEGATIVE_INFINITY,!1):this._special===i.NEGATIVE_INFINITY?t._create(0n,0,i.POSITIVE_INFINITY,!1):0n===this._mantissa?t._create(0n,0,i.NONE,!this._negativeZero):t._create(-this._mantissa,this._exponent,i.NONE,!1)}pow(e){if(this._special===i.NAN)return this;if(0===e)return new t(1);if(e<0)return new t(1).div(this.pow(-e));if(this._special===i.POSITIVE_INFINITY)return this;if(this._special===i.NEGATIVE_INFINITY)return e%2==0?t._create(0n,0,i.POSITIVE_INFINITY,!1):this;if(0n===this._mantissa)return new t(0);const[n,s]=r(this._mantissa**BigInt(e),this._exponent*e);return t._create(n,s,i.NONE,!1)}floor(){if(this._special!==i.NONE)return this;if(0n===this._mantissa)return this;if(this._exponent>=0)return this;const e=a(-this._exponent),n=this._mantissa;let s=n/e;if(n<0n&&n%e!==0n&&(s-=1n),0n===s){const e=this._mantissa<0n;return t._create(0n,0,i.NONE,e)}const[o,l]=r(s,0);return t._create(o,l,i.NONE,!1)}ceil(){if(this._special!==i.NONE)return this;if(0n===this._mantissa)return this;if(this._exponent>=0)return this;const e=a(-this._exponent),n=this._mantissa;let s=n/e;if(n>0n&&n%e!==0n&&(s+=1n),0n===s)return t._create(0n,0,i.NONE,!1);const[o,l]=r(s,0);return t._create(o,l,i.NONE,!1)}log(e){if(this._special===i.NAN)return this;if(this._special===i.NEGATIVE_INFINITY)return t._create(0n,0,i.NAN,!1);if(this._special===i.POSITIVE_INFINITY)return t._create(0n,0,i.POSITIVE_INFINITY,!1);if(this._mantissa<0n)return t._create(0n,0,i.NAN,!1);if(0n===this._mantissa)return t._create(0n,0,i.NEGATIVE_INFINITY,!1);if(10===e)return this._log10();const n=this._log10(),r=new t(Math.log10(e));return n.div(r)}_log10(){const e=s(this._mantissa),n=function(t){if(0n===t)return 1;t<0n&&(t=-t);let e=0;const n=1000000000000000n;for(;t>=n;)t/=n,e+=15;let i=Number(t);for(;i>=1;)i/=10,e++;return e}(e);let i;if(n<=15)i=Math.log10(Number(e));else{const t=n-17,r=e/a(t);i=Math.log10(Number(r))+t}return new t(i+this._exponent)}eq(e){const n=t._coerce(e);return this._special!==i.NAN&&n._special!==i.NAN&&(this._special===n._special&&(this._special!==i.NONE||(0n===this._mantissa&&0n===n._mantissa||this._mantissa===n._mantissa&&this._exponent===n._exponent)))}_compareTo(t){if(this._special===i.NAN||t._special===i.NAN)return NaN;if(this._special===i.POSITIVE_INFINITY)return t._special===i.POSITIVE_INFINITY?0:1;if(this._special===i.NEGATIVE_INFINITY)return t._special===i.NEGATIVE_INFINITY?0:-1;if(t._special===i.POSITIVE_INFINITY)return-1;if(t._special===i.NEGATIVE_INFINITY)return 1;const e=0n===this._mantissa,n=0n===t._mantissa;if(e&&n)return 0;if(e)return t._mantissa>0n?-1:1;if(n)return this._mantissa>0n?1:-1;const r=this._mantissa<0n;if(r!==t._mantissa<0n)return r?-1:1;let s=this._mantissa,o=t._mantissa;const l=this._exponent,c=t._exponent,u=Math.min(l,c);return l>u&&(s*=a(l-u)),c>u&&(o*=a(c-u)),s<o?-1:s>o?1:0}lessThan(e){return-1===this._compareTo(t._coerce(e))}greaterThan(e){return 1===this._compareTo(t._coerce(e))}lessThanOrEqualTo(e){const n=this._compareTo(t._coerce(e));return 0===n||-1===n}greaterThanOrEqualTo(e){const n=this._compareTo(t._coerce(e));return 0===n||1===n}isZero(){return this._special===i.NONE&&0n===this._mantissa}isNaN(){return this._special===i.NAN}isFinite(){return this._special===i.NONE}isNegative(){return this._special!==i.NAN&&(this._special===i.NEGATIVE_INFINITY||this._special!==i.POSITIVE_INFINITY&&(0n===this._mantissa?this._negativeZero:this._mantissa<0n))}isPositive(){return this._special!==i.NAN&&(this._special===i.POSITIVE_INFINITY||this._special!==i.NEGATIVE_INFINITY&&(0n===this._mantissa?!this._negativeZero:this._mantissa>0n))}isInteger(){return this._special===i.NONE&&(0n===this._mantissa||this._exponent>=0)}toJSON(){return this.toString()}toNumber(){return this._special===i.NAN?NaN:this._special===i.POSITIVE_INFINITY?1/0:this._special===i.NEGATIVE_INFINITY?-1/0:0n===this._mantissa?this._negativeZero?-0:0:Number(this.toString())}toString(){if(this._special===i.NAN)return"NaN";if(this._special===i.POSITIVE_INFINITY)return"Infinity";if(this._special===i.NEGATIVE_INFINITY)return"-Infinity";if(0n===this._mantissa)return"0";const t=this._mantissa<0n,e=s(this._mantissa).toString(),n=t?"-":"";if(0===this._exponent)return n+e;if(this._exponent>0)return n+e+"0".repeat(this._exponent);const r=-this._exponent;if(r<e.length){return n+e.slice(0,e.length-r)+"."+e.slice(e.length-r)}{const t=r-e.length;return n+"0."+"0".repeat(t)+e}}static pow(e,n){const r="number"==typeof n?n:n.toNumber();return"number"==typeof e&&10===e?t._create(1n,r,i.NONE,!1):(e instanceof t?e:new t(e)).pow(r)}static set(t){}_isSignNegative(){return this._special===i.NEGATIVE_INFINITY||(this._mantissa<0n||0n===this._mantissa&&this._negativeZero)}_specialArith(e,n){const r=this._special,s=e._special;if(r===i.NAN||s===i.NAN)return t._create(0n,0,i.NAN,!1);const a=this._isSignNegative(),o=e._isSignNegative(),l=r===i.POSITIVE_INFINITY||r===i.NEGATIVE_INFINITY,c=s===i.POSITIVE_INFINITY||s===i.NEGATIVE_INFINITY;if("times"===n&&(l||c)){if(l&&0n===e._mantissa&&!c||c&&0n===this._mantissa&&!l)return t._create(0n,0,i.NAN,!1);const n=a!==o;return t._create(0n,0,n?i.NEGATIVE_INFINITY:i.POSITIVE_INFINITY,!1)}if("div"===n){if(l&&c)return t._create(0n,0,i.NAN,!1);if(l){const e=a!==o;return t._create(0n,0,e?i.NEGATIVE_INFINITY:i.POSITIVE_INFINITY,!1)}if(c){const e=a!==o;return t._create(0n,0,i.NONE,e)}}if("plus"===n){if(l&&c)return a!==o?t._create(0n,0,i.NAN,!1):this;if(l)return this;if(c)return e}return t._create(0n,0,i.NAN,!1)}constructor(t){if("bigint"==typeof t){const[e,n]=r(t,0);return this._mantissa=e,this._exponent=n,this._special=i.NONE,void(this._negativeZero=!1)}if("number"==typeof t){if(Number.isNaN(t))return this._mantissa=0n,this._exponent=0,this._special=i.NAN,void(this._negativeZero=!1);if(t===1/0)return this._mantissa=0n,this._exponent=0,this._special=i.POSITIVE_INFINITY,void(this._negativeZero=!1);if(t===-1/0)return this._mantissa=0n,this._exponent=0,this._special=i.NEGATIVE_INFINITY,void(this._negativeZero=!1);if(0===t)return this._mantissa=0n,this._exponent=0,this._special=i.NONE,void(this._negativeZero=Object.is(t,-0));t=String(t)}const e=function(t){if("NaN"===(t=t.trim()))return{mantissa:0n,exponent:0,special:i.NAN,negativeZero:!1};if("Infinity"===t||"+Infinity"===t)return{mantissa:0n,exponent:0,special:i.POSITIVE_INFINITY,negativeZero:!1};if("-Infinity"===t)return{mantissa:0n,exponent:0,special:i.NEGATIVE_INFINITY,negativeZero:!1};let e=!1,n=0;"-"===t[n]?(e=!0,n++):"+"===t[n]&&n++;let s=t.indexOf("e",n);-1===s&&(s=t.indexOf("E",n));let a,o=0;-1!==s?(o=parseInt(t.substring(s+1),10),a=t.substring(n,s)):a=t.substring(n);const l=a.indexOf(".");let c,u;-1!==l?(c=a.substring(0,l),u=a.substring(l+1)):(c=a,u="");const f=c+u,g=o-u.length;if(""===f||"0"===f||/^0+$/.test(f))return{mantissa:0n,exponent:0,special:i.NONE,negativeZero:e};let m=BigInt(f);e&&(m=-m);const[h,_]=r(m,g);return{mantissa:h,exponent:_,special:i.NONE,negativeZero:!1}}(t);this._mantissa=e.mantissa,this._exponent=e.exponent,this._special=e.special,this._negativeZero=e.negativeZero}}},77666(t,e,n){n.r(e);n(74423),n(18111),n(22489),n(33110),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(88454),n(29452);var i,r=n(32838),s=n(97309);function a(t){return Intl.getCanonicalLocales(t)}function o(t){if(null==t)throw new TypeError("undefined/null cannot be converted to object");return Object(t)}function l(t,e,n,i,r){if("object"!=typeof t)throw new TypeError("Options must be an object");let s=t[e];if(void 0!==s){if("boolean"!==n&&"string"!==n)throw new TypeError("invalid type");if("boolean"===n&&(s=Boolean(s)),"string"===n&&(s=function(t){if("symbol"==typeof t)throw TypeError("Cannot convert a Symbol value to a string");return String(t)}(s)),void 0!==i&&!i.filter(t=>t==s).length)throw new RangeError(`${s} is not within ${i.join(", ")}`);return s}return r}function c(t){return"function"==typeof t}function u(t,e){if("object"==typeof t&&null!=t){const n=Symbol.toPrimitive in t?t[Symbol.toPrimitive]:void 0;let i;if(void 0!==n){void 0===e?i="default":"string"===e?i="string":(!function(t,e,n=Error){if(!t)throw new n(e)}("number"===e,'preferredType must be "string" or "number"'),i="number");let r=n.call(t,i);if("object"!=typeof r)return r;throw new TypeError("Cannot convert exotic object to primitive.")}return void 0===e&&(e="number"),function(t,e){let n;n="string"===e?["toString","valueOf"]:["valueOf","toString"];for(const e of n){const n=t[e];if(c(n)){let e=n.call(t);if("object"!=typeof e)return e}}throw new TypeError("Cannot convert object to primitive value")}(t,e)}return t}function f(t){if("bigint"==typeof t)return new s.Ww(t.toString());let e=u(t,"number");if(void 0===e)return new s.Ww(NaN);if(!0===e)return new s.Ww(1);if(!1===e)return new s.Ww(0);if(null===e)return new s.Ww(0);try{return new s.Ww(e)}catch{return new s.Ww(NaN)}}function g(t,e,n,i){if(void 0===t)return i;const r=Number(t);if(isNaN(r)||r<e||r>n)throw new RangeError(`${r} is outside of range [${e}, ${n}]`);return Math.floor(r)}function m(t,e,n,i,r){return g(t[e],n,i,r)}function h(t,e){const n=e&&e.cache?e.cache:b,i=e&&e.serializer?e.serializer:d;return(e&&e.strategy?e.strategy:I)(t,{cache:n,serializer:i})}function _(t,e,n,i){const r=null==(s=i)||"number"==typeof s||"boolean"==typeof s?i:n(i);var s;let a=e.get(r);return void 0===a&&(a=t.call(this,i),e.set(r,a)),a}function N(t,e,n){const i=Array.prototype.slice.call(arguments,3),r=n(i);let s=e.get(r);return void 0===s&&(s=t.apply(this,i),e.set(r,s)),s}function p(t,e,n,i,r){return n.bind(e,t,i,r)}function I(t,e){return p(t,this,1===t.length?_:N,e.cache.create(),e.serializer)}const d=function(){return JSON.stringify(arguments)};var T=class{get(t){return this.cache[t]}set(t,e){this.cache[t]=e}constructor(){this.cache=Object.create(null)}};const b={create:function(){return new T}},E={variadic:function(t,e){return p(t,this,N,e.cache.create(),e.serializer)},monadic:function(t,e){return p(t,this,_,e.cache.create(),e.serializer)}};function v(t,e){if("function"==typeof t.repeat)return t.repeat(e);const n=Array.from({length:e});for(let e=0;e<n.length;e++)n[e]=t;return n.join("")}function y(t,e,n=Error){if(!t)throw new n(e)}h((...t)=>new Intl.NumberFormat(...t),{strategy:E.variadic}),h((...t)=>new Intl.PluralRules(...t),{strategy:E.variadic}),h((...t)=>new Intl.Locale(...t),{strategy:E.variadic}),h((...t)=>new Intl.ListFormat(...t),{strategy:E.variadic});const S=new Set([1,2,5,10,20,25,50,100,200,250,500,1e3,2e3,2500,5e3]);function O(t,e,n,{availableLocales:i,relevantExtensionKeys:s,localeData:c,getDefaultLocale:u,getInternalSlots:f}){const h=a(e),_=Object.create(null),N=function(t){return void 0===t?Object.create(null):o(t)}(n),p=f(t);p.initializedPluralRules=!0,_.localeMatcher=l(N,"localeMatcher","string",["best fit","lookup"],"best fit");const I=(0,r.Bg)(i,h,_,s,c,u);p.locale=I.locale,p.type=l(N,"type","string",["cardinal","ordinal"],"cardinal");const d=l(N,"notation","string",["standard","compact"],"standard");return p.notation=d,"compact"===d&&(p.compactDisplay=l(N,"compactDisplay","string",["short","long"],"short"),"undefined"!=typeof Intl&&Intl.NumberFormat&&Intl.NumberFormat.localeData&&(p.dataLocaleData=Intl.NumberFormat.localeData[I.locale])),function(t,e,n,i,r){const s=m(e,"minimumIntegerDigits",1,21,1);let a=e.minimumFractionDigits,o=e.maximumFractionDigits,c=e.minimumSignificantDigits,u=e.maximumSignificantDigits;t.minimumIntegerDigits=s;const f=m(e,"roundingIncrement",1,5e3,1);y(S.has(f),`Invalid rounding increment value: ${f}.\nValid values are ${Array.from(S).join(", ")}.`);const h=l(e,"roundingMode","string",["ceil","floor","expand","trunc","halfCeil","halfFloor","halfExpand","halfTrunc","halfEven"],"halfExpand"),_=l(e,"roundingPriority","string",["auto","morePrecision","lessPrecision"],"auto"),N=l(e,"trailingZeroDisplay","string",["auto","stripIfInteger"],"auto");1!==f&&(i=n),t.roundingIncrement=f,t.roundingMode=h,t.trailingZeroDisplay=N;const p=void 0!==c||void 0!==u,I=void 0!==a||void 0!==o;let d=!0,T=!0;if("auto"===_&&(d=p,(p||!I&&"compact"===r)&&(T=!1)),d&&(p?(t.minimumSignificantDigits=g(c,1,21,1),t.maximumSignificantDigits=g(u,t.minimumSignificantDigits,21,21)):(t.minimumSignificantDigits=1,t.maximumSignificantDigits=21)),T)if(I){if(a=g(a,0,100,void 0),o=g(o,0,100,void 0),void 0===a)y(void 0!==o,"maximumFractionDigits must be defined"),a=Math.min(n,o);else if(void 0===o)o=Math.max(i,a);else if(a>o)throw new RangeError(`Invalid range, ${a} > ${o}`);t.minimumFractionDigits=a,t.maximumFractionDigits=o}else t.minimumFractionDigits=n,t.maximumFractionDigits=i;d||T?"morePrecision"===_?(t.roundingType="morePrecision",t.roundingPriority="morePrecision"):"lessPrecision"===_?(t.roundingType="lessPrecision",t.roundingPriority="lessPrecision"):p?(t.roundingType="significantDigits",t.roundingPriority="auto"):(t.roundingType="fractionDigits",t.roundingPriority="auto"):(t.minimumFractionDigits=0,t.maximumFractionDigits=0,t.minimumSignificantDigits=1,t.maximumSignificantDigits=2,t.roundingType="morePrecision",t.roundingPriority="morePrecision"),1!==f&&(y("fractionDigits"===t.roundingType,"Invalid roundingType",TypeError),y(t.maximumFractionDigits===t.minimumFractionDigits,"With roundingIncrement > 1, maximumFractionDigits and minimumFractionDigits must be equal.",RangeError))}(p,N,0,3,"standard"),t}function w(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":"symbol"==typeof t?"Symbol":"bigint"==typeof t?"BigInt":void 0}const F=h(t=>s.Ww.pow(10,t));new s.Ww(10);const x=new s.Ww(0),D=new s.Ww(-0),A={ceil:"zero",floor:"infinity",expand:"infinity",trunc:"zero",halfCeil:"half-zero",halfFloor:"half-infinity",halfExpand:"half-infinity",halfTrunc:"half-zero",halfEven:"half-even"},P={ceil:"infinity",floor:"zero",expand:"infinity",trunc:"zero",halfCeil:"half-infinity",halfFloor:"half-zero",halfExpand:"half-infinity",halfTrunc:"half-zero",halfEven:"half-even"};function V(t,e,n,i){if(t.eq(e)||e.eq(n))return e;if(t.eq(n))return n;if(y(e.lessThan(t)&&t.lessThan(n),`x should be between r1 and r2 but x=${t}, r1=${e}, r2=${n}`),"zero"===i)return e;if("infinity"===i)return n;const r=t.minus(e),s=n.minus(t);return r.lessThan(s)?e:s.lessThan(r)?n:(y(r.eq(s),"d1 should be equal to d2"),"half-zero"===i?e:"half-infinity"===i?n:(y("half-even"===i,"unsignedRoundingMode should be half-even"),e.div(n.minus(e)).mod(2).isZero()?e:n))}function Y(t,e){return t.times(F(-e))}function R(t,e,n,i,r){const s=n,{n1:a,r1:o}=function(t,e,n){const i=t.times(F(e)).floor().div(n).floor().times(n);return{n1:i,r1:Y(i,e)}}(t,s,i),{n2:l,r2:c}=function(t,e,n){const i=t.times(F(e)).ceil().div(n).ceil().times(n);return{n2:i,r2:Y(i,e)}}(t,s,i);let u,f,g,m;if(V(t,o,c,r).eq(o)?(u=a,f=o):(u=l,f=c),g=u.isZero()?"0":u.toString(),0!==s){let t=g.length;t<=s&&(g=v("0",s-t+1)+g,t=s+1);const e=g.slice(0,t-s),n=g.slice(g.length-s);g=e+"."+n,m=e.length}else m=g.length;let h=n-e;for(;h>0&&"0"===g[g.length-1];)g=g.slice(0,g.length-1),h--;return"."===g[g.length-1]&&(g=g.slice(0,g.length-1)),{formattedString:g,roundedNumber:f,integerDigitsCount:m,roundingMagnitude:-s}}function j(t,e,n,i){const r=n;let s,a,o,l;if(t.isZero())s=v("0",r),a=0,o=x;else{const{n1:e,e1:n,r1:l}=function(t,e){const n=F(e),i=F(e-1);let r=t.log(10).floor();const s=F(r.minus(e).plus(1));let a=t.div(s).floor(),o=a.times(s);if(a.greaterThanOrEqualTo(n)){r=r.plus(1);const n=F(r.minus(e).plus(1));a=t.div(n).floor(),o=a.times(n)}else if(a.lessThan(i)){r=r.minus(1);const n=F(r.minus(e).plus(1));a=t.div(n).floor(),o=a.times(n)}if(o.lessThanOrEqualTo(t)&&a.lessThan(n)&&a.greaterThanOrEqualTo(i))return{n1:a,e1:r,r1:o};let l=t.div(i).log(10).plus(e).minus(1).ceil();for(;;){const r=F(l.minus(e).plus(1));let s=t.div(r).floor();if(s.lessThan(n)&&s.greaterThanOrEqualTo(i)){const e=s.times(r);if(e.lessThanOrEqualTo(t))return{n1:s,e1:l,r1:e}}l=l.minus(1)}}(t,r),{n2:c,e2:u,r2:f}=function(t,e){const n=F(e),i=F(e-1);let r=t.log(10).floor();const s=F(r.minus(e).plus(1));let a=t.div(s).ceil(),o=a.times(s);if(a.greaterThanOrEqualTo(n)){r=r.plus(1);const n=F(r.minus(e).plus(1));a=t.div(n).ceil(),o=a.times(n)}else if(a.lessThan(i)){r=r.minus(1);const n=F(r.minus(e).plus(1));a=t.div(n).ceil(),o=a.times(n)}if(o.greaterThanOrEqualTo(t)&&a.lessThan(n)&&a.greaterThanOrEqualTo(i))return{n2:a,e2:r,r2:o};let l=t.div(n).log(10).plus(e).minus(1).floor();for(;;){const r=F(l.minus(e).plus(1));let s=t.div(r).ceil();if(s.lessThan(n)&&s.greaterThanOrEqualTo(i)){const e=s.times(r);if(e.greaterThanOrEqualTo(t))return{n2:s,e2:l,r2:e}}l=l.plus(1)}}(t,r);let g;V(t,l,f,i).eq(l)?(g=e,a=n.toNumber(),o=l):(g=c,a=u.toNumber(),o=f),s=g.toString()}if(a>=r-1?(s+=v("0",a-r+1),l=a+1):a>=0?(s=s.slice(0,a+1)+"."+s.slice(s.length-(r-(a+1))),l=a+1):(y(a<0,"e should be less than 0"),s="0."+v("0",-a-1)+s,l=1),s.includes(".")&&n>e){let t=n-e;for(;t>0&&"0"===s[s.length-1];)s=s.slice(0,s.length-1),t--;"."===s[s.length-1]&&(s=s.slice(0,s.length-1))}return{formattedString:s,roundedNumber:o,integerDigitsCount:l,roundingMagnitude:a}}function Z(t,e){let n,i,r=e;r.isZero()&&r.isNegative()?(n="negative",r=x):(y(r.isFinite(),"NumberFormatDigitInternalSlots value is not finite"),n=r.lessThan(0)?"negative":"positive","negative"===n&&(r=r.negated()));const s=t.roundingType,a=(o=t.roundingMode,"negative"===n?A[o]:P[o]);var o;switch(s){case"significantDigits":i=j(r,t.minimumSignificantDigits,t.maximumSignificantDigits,a);break;case"fractionDigits":i=R(r,t.minimumFractionDigits,t.maximumFractionDigits,t.roundingIncrement,a);break;default:let e=j(r,t.minimumSignificantDigits,t.maximumSignificantDigits,a),n=R(r,t.minimumFractionDigits,t.maximumFractionDigits,t.roundingIncrement,a);"morePrecision"===t.roundingType?i=e.roundingMagnitude<=n.roundingMagnitude?e:n:(y("lessPrecision"===t.roundingType,"Invalid roundingType"),i=e.roundingMagnitude<=n.roundingMagnitude?n:e)}r=i.roundedNumber;let l=i.formattedString;if("stripIfInteger"===t.trailingZeroDisplay&&r.isInteger()){let t=l.indexOf(".");t>-1&&(l=l.slice(0,t))}const c=i.integerDigitsCount,u=t.minimumIntegerDigits;return c<u&&(l=v("0",u-c)+l),"negative"===n&&(r=r.isZero()?D:r.negated()),{roundedNumber:r,formattedString:l}}const M=new s.Ww(0);function L(t,e,n=Error){if(!t)throw new n(e)}function G(t){if("number"==typeof t)return new s.Ww(t);if("bigint"==typeof t)return new s.Ww(t.toString());if(L("symbol"!=typeof t,"Symbol is not supported",TypeError),void 0===t)return new s.Ww(NaN);if(null===t||0===t)return M;if(!0===t)return new s.Ww(1);if("string"==typeof t)try{return new s.Ww(t)}catch{return new s.Ww(NaN)}L("object"==typeof t,"object expected",TypeError);let e=u(t,"number");return L("object"!=typeof e,"object expected",TypeError),G(e)}function q(t,e=0){y("string"==typeof t,"GetOperands should have been called with a string");const n=G(t);y(n.isFinite(),"n should be finite");let i,r,s,a=t.indexOf("."),o="";-1===a?(i=n,r=x,s=0):(i=t.slice(0,a),o=t.slice(a,t.length),r=G(o),s=o.length);const l=G(i).abs();let c,u;if(r.isZero())c=0,u=x;else{const t=o.replace(/0+$/,"");c=t.length,u=G(t)}return{Number:n,IntegerDigits:l.lessThanOrEqualTo(Number.MAX_SAFE_INTEGER)&&l.greaterThanOrEqualTo(-Number.MAX_SAFE_INTEGER)?l.toNumber():l.toString(),NumberOfFractionDigits:s,NumberOfFractionDigitsWithoutTrailing:c,FractionDigits:r.toNumber(),FractionDigitsWithoutTrailing:u.toNumber(),CompactExponent:e}}function W(t,e,{getInternalSlots:n,PluralRuleSelect:i}){const r=n(t);if(y("Object"===w(r),"pl has to be an object"),y("initializedPluralRules"in r,"pluralrules must be initialized"),!e.isFinite())return{formattedString:String(e),pluralCategory:"other"};const{locale:a,type:o,notation:l}=r,c=Z(r,e).formattedString;let u=0;if("compact"===l&&!e.isZero()&&r.dataLocaleData?.numbers)try{u=function(t,e){const{notation:n,dataLocaleData:i,numberingSystem:r}=t;switch(n){case"standard":return 0;case"scientific":return e.toNumber();case"engineering":return e.div(3).floor().times(3).toNumber();default:{y("compact"===n,"Invalid notation");const{compactDisplay:s,style:a,currencyDisplay:o}=t;let l;if("currency"===a&&"name"!==o)l=(i.numbers.currency[r]||i.numbers.currency[i.numbers.nu[0]]).short;else{const t=i.numbers.decimal[r]||i.numbers.decimal[i.numbers.nu[0]];l="long"===s?t.long:t.short}if(!l)return 0;const c=F(e).toString(),u=Object.keys(l);if(c<u[0])return 0;if(c>u[u.length-1]){const t=u[u.length-1];return"0"===l[t].other?0:t.length-l[t].other.match(/0+/)[0].length}const f=u.indexOf(c);if(-1===f)return 0;const g=u[f];return"0"===l[g].other?0:g.length-l[g].other.match(/0+/)[0].length}}}(r,new s.Ay(Math.floor(Math.log10(Math.abs(e.toNumber())))))}catch{u=0}return{formattedString:c,pluralCategory:i(a,o,e,q(c,u))}}const z=new WeakMap;function $(t){let e=z.get(t);return e||(e=Object.create(null),z.set(t,e)),e}function C(t,e){if(!(t instanceof U))throw new TypeError(`Method Intl.PluralRules.prototype.${e} called on incompatible receiver ${String(t)}`)}function k(t,e,n,{IntegerDigits:i,NumberOfFractionDigits:r,FractionDigits:s,CompactExponent:a}){return U.localeData[t].fn(r?`${i}.${s}`:String(i),"ordinal"===e,a)}function B(t,e,n,i){const r=U.localeData[t];if(!r||!r.pluralRanges)return i;const s=`${n}_${i}`;return("ordinal"===e?r.pluralRanges.ordinal:r.pluralRanges.cardinal)?.[s]??i}var U=(i=class t{resolvedOptions(){C(this,"resolvedOptions");const e=Object.create(null),n=$(this);return e.locale=n.locale,e.type=n.type,["minimumIntegerDigits","minimumFractionDigits","maximumFractionDigits","minimumSignificantDigits","maximumSignificantDigits"].forEach(t=>{const i=n[t];void 0!==i&&(e[t]=i)}),e.pluralCategories=[...t.localeData[e.locale].categories[e.type]],e}select(t){C(this,"select");return function(t,e,{getInternalSlots:n,PluralRuleSelect:i}){return W(t,e,{getInternalSlots:n,PluralRuleSelect:i}).pluralCategory}(this,f(t),{getInternalSlots:$,PluralRuleSelect:k})}selectRange(t,e){if(C(this,"selectRange"),void 0===t||void 0===e)throw new TypeError("selectRange requires both start and end arguments");return function(t,e,n,{getInternalSlots:i,PluralRuleSelect:r,PluralRuleSelectRange:s}){if(!e.isFinite()||!n.isFinite())throw new RangeError("selectRange requires start and end values to be finite numbers");const a=i(t);y("Object"===w(a),"pluralRules has to be an object"),y("initializedPluralRules"in a,"pluralrules must be initialized");const o=W(t,e,{getInternalSlots:i,PluralRuleSelect:r}),l=W(t,n,{getInternalSlots:i,PluralRuleSelect:r});if(o.formattedString===l.formattedString)return o.pluralCategory;const{locale:c,type:u}=a;return s(c,u,o.pluralCategory,l.pluralCategory)}(this,f(t),f(e),{getInternalSlots:$,PluralRuleSelect:k,PluralRuleSelectRange:B})}toString(){return"[object Intl.PluralRules]"}static supportedLocalesOf(e,n){return function(t,e,n){let i="best fit";return void 0!==n&&(i=l(n=o(n),"localeMatcher","string",["lookup","best fit"],"best fit")),(0,r.s8)(Array.from(t),e)}(t.availableLocales,a(e),n)}static __addLocaleData(...e){for(const{data:n,locale:i}of e)t.localeData[i]=n,t.availableLocales.add(i),t.__defaultLocale||(t.__defaultLocale=i)}static getDefaultLocale(){return t.__defaultLocale}constructor(e,n){if(!(this&&this instanceof t?this.constructor:void 0))throw new TypeError("Intl.PluralRules must be called with 'new'");return O(this,e,n,{availableLocales:t.availableLocales,relevantExtensionKeys:t.relevantExtensionKeys,localeData:t.localeData,getDefaultLocale:t.getDefaultLocale,getInternalSlots:$})}},i.localeData={},i.availableLocales=new Set,i.__defaultLocale="",i.relevantExtensionKeys=[],i.polyfilled=!0,i);try{"undefined"!=typeof Symbol&&Object.defineProperty(U.prototype,Symbol.toStringTag,{value:"Intl.PluralRules",writable:!1,enumerable:!1,configurable:!0});try{Object.defineProperty(U,"length",{value:0,writable:!1,enumerable:!1,configurable:!0})}catch{}Object.defineProperty(U.prototype.constructor,"length",{value:0,writable:!1,enumerable:!1,configurable:!0}),Object.defineProperty(U.supportedLocalesOf,"length",{value:1,writable:!1,enumerable:!1,configurable:!0}),Object.defineProperty(U,"name",{value:"PluralRules",writable:!1,enumerable:!1,configurable:!0})}catch{}!function(t,e,{value:n}){Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:!0,value:n})}(("undefined"==typeof Intl&&Object.defineProperty(globalThis,"Intl",{configurable:!0,enumerable:!1,writable:!0,value:{}}),Intl),"PluralRules",{value:U});const J=globalThis.__FORMATJS_PLURALRULES_DATA__;if(J){for(const t of J)U.__addLocaleData(t);delete globalThis.__FORMATJS_PLURALRULES_DATA__}}};