iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
1 lines • 10.9 kB
JavaScript
"use strict";(self.rspackChunkhome_assistant_frontend=self.rspackChunkhome_assistant_frontend||[]).push([[64502],{60706:function(t,e,n){var i=n(10350).PROPER,s=n(79039),r=n(47452);t.exports=function(t){return s(function(){return!!r[t]()||"
"!=="
"[t]()||i&&r[t].name!==t})}},43802:function(t,e,n){var i=n(79504),s=n(67750),r=n(655),a=n(47452),_=i("".replace),N=RegExp("^["+a+"]+"),I=RegExp("(^|[^"+a+"])["+a+"]+$"),c=function(t){return function(e){var n=r(s(e));return 1&t&&(n=_(n,N,"")),2&t&&(n=_(n,I,"$1")),n}};t.exports={start:c(1),end:c(2),trim:c(3)}},47452:function(t){t.exports="\t\n\v\f\r \u2028\u2029\ufeff"},55081:function(t,e,n){var i=n(46518),s=n(44576);i({global:!0,forced:s.globalThis!==s},{globalThis:s})},42762:function(t,e,n){var i=n(46518),s=n(43802).trim;i({target:"String",proto:!0,forced:n(60706)("trim")},{trim:function(){return s(this)}})},97309:function(t,e,n){n.d(e,{Ay:function(){return _},Ww:function(){return _},gZ:function(){return _}});n(27495),n(42762),n(62953);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 s(t,e){if(0n===t)return[0n,0];for(;t%10n==0n;)t/=10n,e++;return[t,e]}function r(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 _=class t{static _create(e,n,i,s){const r=Object.create(t.prototype);return r._mantissa=e,r._exponent=n,r._special=i,r._negativeZero=s,r}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[r,a]=s(this._mantissa*n._mantissa,this._exponent+n._exponent);return t._create(r,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[r,_]=s(this._mantissa*a(40)/n._mantissa,this._exponent-n._exponent-40);return t._create(r,_,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 r=this._mantissa,_=n._mantissa;const N=this._exponent,I=n._exponent,c=Math.min(N,I);N>c&&(r*=a(N-c)),I>c&&(_*=a(I-c));const o=r+_;if(0n===o)return t._create(0n,0,i.NONE,!1);const[h,u]=s(o,c);return t._create(h,u,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 r=this._mantissa,_=n._mantissa;const N=this._exponent,I=n._exponent,c=Math.min(N,I);N>c&&(r*=a(N-c)),I>c&&(_*=a(I-c));const o=r%_;if(0n===o)return t._create(0n,0,i.NONE,!1);const[h,u]=s(o,c);return t._create(h,u,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(r(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,r]=s(this._mantissa**BigInt(e),this._exponent*e);return t._create(n,r,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 r=n/e;if(n<0n&&n%e!==0n&&(r-=1n),0n===r){const e=this._mantissa<0n;return t._create(0n,0,i.NONE,e)}const[_,N]=s(r,0);return t._create(_,N,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 r=n/e;if(n>0n&&n%e!==0n&&(r+=1n),0n===r)return t._create(0n,0,i.NONE,!1);const[_,N]=s(r,0);return t._create(_,N,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(),s=new t(Math.log10(e));return n.div(s)}_log10(){const e=r(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,s=e/a(t);i=Math.log10(Number(s))+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 s=this._mantissa<0n;if(s!==t._mantissa<0n)return s?-1:1;let r=this._mantissa,_=t._mantissa;const N=this._exponent,I=t._exponent,c=Math.min(N,I);return N>c&&(r*=a(N-c)),I>c&&(_*=a(I-c)),r<_?-1:r>_?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=r(this._mantissa).toString(),n=t?"-":"";if(0===this._exponent)return n+e;if(this._exponent>0)return n+e+"0".repeat(this._exponent);const s=-this._exponent;if(s<e.length){return n+e.slice(0,e.length-s)+"."+e.slice(e.length-s)}{const t=s-e.length;return n+"0."+"0".repeat(t)+e}}static pow(e,n){const s="number"==typeof n?n:n.toNumber();return"number"==typeof e&&10===e?t._create(1n,s,i.NONE,!1):(e instanceof t?e:new t(e)).pow(s)}static set(t){}_isSignNegative(){return this._special===i.NEGATIVE_INFINITY||(this._mantissa<0n||0n===this._mantissa&&this._negativeZero)}_specialArith(e,n){const s=this._special,r=e._special;if(s===i.NAN||r===i.NAN)return t._create(0n,0,i.NAN,!1);const a=this._isSignNegative(),_=e._isSignNegative(),N=s===i.POSITIVE_INFINITY||s===i.NEGATIVE_INFINITY,I=r===i.POSITIVE_INFINITY||r===i.NEGATIVE_INFINITY;if("times"===n&&(N||I)){if(N&&0n===e._mantissa&&!I||I&&0n===this._mantissa&&!N)return t._create(0n,0,i.NAN,!1);const n=a!==_;return t._create(0n,0,n?i.NEGATIVE_INFINITY:i.POSITIVE_INFINITY,!1)}if("div"===n){if(N&&I)return t._create(0n,0,i.NAN,!1);if(N){const e=a!==_;return t._create(0n,0,e?i.NEGATIVE_INFINITY:i.POSITIVE_INFINITY,!1)}if(I){const e=a!==_;return t._create(0n,0,i.NONE,e)}}if("plus"===n){if(N&&I)return a!==_?t._create(0n,0,i.NAN,!1):this;if(N)return this;if(I)return e}return t._create(0n,0,i.NAN,!1)}constructor(t){if("bigint"==typeof t){const[e,n]=s(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 r=t.indexOf("e",n);-1===r&&(r=t.indexOf("E",n));let a,_=0;-1!==r?(_=parseInt(t.substring(r+1),10),a=t.substring(n,r)):a=t.substring(n);const N=a.indexOf(".");let I,c;-1!==N?(I=a.substring(0,N),c=a.substring(N+1)):(I=a,c="");const o=I+c,h=_-c.length;if(""===o||"0"===o||/^0+$/.test(o))return{mantissa:0n,exponent:0,special:i.NONE,negativeZero:e};let u=BigInt(o);e&&(u=-u);const[p,f]=s(u,h);return{mantissa:p,exponent:f,special:i.NONE,negativeZero:!1}}(t);this._mantissa=e.mantissa,this._exponent=e.exponent,this._special=e.special,this._negativeZero=e.negativeZero}}}}]);