iobroker.javascript 9.0.10 → 9.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{j as M}from"./createSvgIcon-C_ElRFrf.js";import{R as dt,i as Rt}from"./iobroker_javascript__loadShare__react__loadShare__-B-pIv4x_.js";import{i as Oe,m as Ft,z as Nt,g as Lt}from"./index-vw185EVR.js";import{i as G,M as Vt,l as zt,m as qt,O as It,ar as Wt,J as Kt,o as $t,u as Jt,w as Ut,v as Ht,as as Gt,at as Yt,au as Qt,Y as Zt}from"./index-DeFm7TiX.js";import Xt from"./ScriptEditorVanillaMonaco-CkDzb80s.js";import{g as ea}from"./_commonjsHelpers-Cpj98o6Y.js";import"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CmuPLb0X.js";import"./inheritsLoose-CLw44UEv.js";import"./preload-helper-Dp1pzeXC.js";const ta={editorDiv:{height:"100%",width:"100%",overflow:"hidden",position:"relative"}};class aa extends dt.Component{constructor(v){super(v),this.state={lines:(this.props.script||"").split(/\r\n|\n/)}}render(){return M.jsx("div",{style:ta.editorDiv,children:M.jsx(Xt,{triggerPrettier:1,name:this.props.scriptName,adapterName:this.props.adapterName,readOnly:!0,code:this.props.script||"",isDark:this.props.themeType==="dark",socket:this.props.socket,runningInstances:this.props.runningInstances,language:"javascript",breakpoints:this.props.breakpoints,location:this.props.paused?this.props.location:null,onToggleBreakpoint:v=>this.props.onToggleBreakpoint(v)},"scriptEditor2")},"scriptEditorDiv2")}}const At=34,Ke={logBox:{width:"100%",height:"100%",position:"relative",overflow:"hidden"},logBoxInner:X=>({display:"inline-block",color:X.palette.mode==="dark"?"white":"black",width:`calc(100% - ${At}px)`,height:"100%",overflow:"auto",position:"relative",verticalAlign:"top"}),info:X=>({background:X.palette.mode==="dark"?"darkgrey":"lightgrey",color:(X.palette.mode==="dark","black")}),error:X=>({background:"#FF0000",color:X.palette.mode==="dark"?"black":"white"}),warn:X=>({background:"#FF8000",color:X.palette.mode==="dark"?"black":"white"}),debug:X=>({background:"gray",opacity:.8,color:X.palette.mode==="dark"?"black":"white"}),silly:X=>({background:"gray",opacity:.6,color:X.palette.mode==="dark"?"black":"white"}),table:{fontFamily:"monospace",width:"100%"},toolbox:{width:At,height:"100%",boxShadow:"2px 0px 4px -1px rgba(0, 0, 0, 0.2), 4px 0px 5px 0px rgba(0, 0, 0, 0.14), 1px 0px 10px 0px rgba(0, 0, 0, 0.12)",display:"inline-block",verticalAlign:"top",overflow:"hidden"},trTime:{width:90},trSeverity:{width:40,fontWeight:"bold"},iconButtons:{width:32,height:32,padding:4}};function ra(X){let v,g=X.getHours();return g<10&&(g=`0${g.toString()}`),v=`${g}:`,g=X.getMinutes(),g<10&&(g=`0${g.toString()}`),v+=`${g}:`,g=X.getSeconds(),g<10&&(g=`0${g.toString()}`),v+=`${g}.`,g=X.getMilliseconds(),g<10?g=`00${g.toString()}`:g<100&&(g=`0${g.toString()}`),v+=g,v}class _t extends dt.Component{messagesEnd;constructor(v){super(v),this.state={goBottom:!0},this.messagesEnd=dt.createRef()}static generateLine(v){return M.jsxs(G.Box,{component:"tr",sx:Ke[v.severity],children:[M.jsx("td",{style:Ke.trTime,children:ra(new Date(v.ts))}),M.jsx("td",{style:Ke.trSeverity,children:v.severity}),M.jsx("td",{children:v.text})]},`tr_${v.ts}_${v.text.substring(v.text.length-10,v.text.length)}`)}renderLogList(v){return v!=null&&v.length?M.jsxs(G.Box,{sx:Ke.logBoxInner,children:[M.jsx("table",{style:Ke.table,children:M.jsx("tbody",{children:v.map(g=>_t.generateLine(g))})},"logTable"),M.jsx("div",{ref:this.messagesEnd,style:{float:"left",clear:"both"}},"logScrollPoint")]},"logList"):M.jsx(G.Box,{sx:Ke.logBoxInner,style:{paddingLeft:10},children:Oe.I18n.t("Log outputs")},"logList")}onCopy(){Oe.Utils.copyToClipboard(this.props.console.join(`
1
+ import{j as M}from"./createSvgIcon-C_ElRFrf.js";import{R as dt,i as Rt}from"./iobroker_javascript__loadShare__react__loadShare__-B-pIv4x_.js";import{i as Oe,m as Ft,z as Nt,g as Lt}from"./index-BUU5hWiL.js";import{i as G,M as Vt,l as zt,m as qt,O as It,ar as Wt,J as Kt,o as $t,u as Jt,w as Ut,v as Ht,as as Gt,at as Yt,au as Qt,Y as Zt}from"./index-DeFm7TiX.js";import Xt from"./ScriptEditorVanillaMonaco-BWe9MiKn.js";import{g as ea}from"./_commonjsHelpers-Cpj98o6Y.js";import"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CmuPLb0X.js";import"./inheritsLoose-CLw44UEv.js";import"./preload-helper-Dp1pzeXC.js";const ta={editorDiv:{height:"100%",width:"100%",overflow:"hidden",position:"relative"}};class aa extends dt.Component{constructor(v){super(v),this.state={lines:(this.props.script||"").split(/\r\n|\n/)}}render(){return M.jsx("div",{style:ta.editorDiv,children:M.jsx(Xt,{triggerPrettier:1,name:this.props.scriptName,adapterName:this.props.adapterName,readOnly:!0,code:this.props.script||"",isDark:this.props.themeType==="dark",socket:this.props.socket,runningInstances:this.props.runningInstances,language:"javascript",breakpoints:this.props.breakpoints,location:this.props.paused?this.props.location:null,onToggleBreakpoint:v=>this.props.onToggleBreakpoint(v)},"scriptEditor2")},"scriptEditorDiv2")}}const At=34,Ke={logBox:{width:"100%",height:"100%",position:"relative",overflow:"hidden"},logBoxInner:X=>({display:"inline-block",color:X.palette.mode==="dark"?"white":"black",width:`calc(100% - ${At}px)`,height:"100%",overflow:"auto",position:"relative",verticalAlign:"top"}),info:X=>({background:X.palette.mode==="dark"?"darkgrey":"lightgrey",color:(X.palette.mode==="dark","black")}),error:X=>({background:"#FF0000",color:X.palette.mode==="dark"?"black":"white"}),warn:X=>({background:"#FF8000",color:X.palette.mode==="dark"?"black":"white"}),debug:X=>({background:"gray",opacity:.8,color:X.palette.mode==="dark"?"black":"white"}),silly:X=>({background:"gray",opacity:.6,color:X.palette.mode==="dark"?"black":"white"}),table:{fontFamily:"monospace",width:"100%"},toolbox:{width:At,height:"100%",boxShadow:"2px 0px 4px -1px rgba(0, 0, 0, 0.2), 4px 0px 5px 0px rgba(0, 0, 0, 0.14), 1px 0px 10px 0px rgba(0, 0, 0, 0.12)",display:"inline-block",verticalAlign:"top",overflow:"hidden"},trTime:{width:90},trSeverity:{width:40,fontWeight:"bold"},iconButtons:{width:32,height:32,padding:4}};function ra(X){let v,g=X.getHours();return g<10&&(g=`0${g.toString()}`),v=`${g}:`,g=X.getMinutes(),g<10&&(g=`0${g.toString()}`),v+=`${g}:`,g=X.getSeconds(),g<10&&(g=`0${g.toString()}`),v+=`${g}.`,g=X.getMilliseconds(),g<10?g=`00${g.toString()}`:g<100&&(g=`0${g.toString()}`),v+=g,v}class _t extends dt.Component{messagesEnd;constructor(v){super(v),this.state={goBottom:!0},this.messagesEnd=dt.createRef()}static generateLine(v){return M.jsxs(G.Box,{component:"tr",sx:Ke[v.severity],children:[M.jsx("td",{style:Ke.trTime,children:ra(new Date(v.ts))}),M.jsx("td",{style:Ke.trSeverity,children:v.severity}),M.jsx("td",{children:v.text})]},`tr_${v.ts}_${v.text.substring(v.text.length-10,v.text.length)}`)}renderLogList(v){return v!=null&&v.length?M.jsxs(G.Box,{sx:Ke.logBoxInner,children:[M.jsx("table",{style:Ke.table,children:M.jsx("tbody",{children:v.map(g=>_t.generateLine(g))})},"logTable"),M.jsx("div",{ref:this.messagesEnd,style:{float:"left",clear:"both"}},"logScrollPoint")]},"logList"):M.jsx(G.Box,{sx:Ke.logBoxInner,style:{paddingLeft:10},children:Oe.I18n.t("Log outputs")},"logList")}onCopy(){Oe.Utils.copyToClipboard(this.props.console.join(`
2
2
  `))}scrollToBottom(){var v,g;(g=(v=this.messagesEnd)==null?void 0:v.current)==null||g.scrollIntoView({behavior:"smooth"})}componentDidUpdate(){this.state.goBottom&&this.scrollToBottom()}render(){const v=this.props.console;return M.jsxs("div",{style:Ke.logBox,children:[M.jsxs("div",{style:Ke.toolbox,children:[M.jsx(G.IconButton,{style:Ke.iconButtons,onClick:()=>this.setState({goBottom:!this.state.goBottom}),color:this.state.goBottom?"secondary":void 0,size:"medium",children:M.jsx(Vt,{})}),v!=null&&v.length?M.jsx(G.IconButton,{style:Ke.iconButtons,onClick:()=>this.props.onClearAllLogs(),size:"medium",children:M.jsx(zt,{})}):null,v!=null&&v.length?M.jsx(G.IconButton,{style:Ke.iconButtons,onClick:()=>this.onCopy(),size:"medium",children:M.jsx(qt,{})}):null]},"toolbox"),this.renderLogList(v)]})}}var wt={exports:{}},na=wt.exports;(function(X,v){(function(g,a){X.exports=a(Rt)})(na,function(g){return function(a){var t={};function e(s){if(t[s])return t[s].exports;var c=t[s]={i:s,l:!1,exports:{}};return a[s].call(c.exports,c,c.exports,e),c.l=!0,c.exports}return e.m=a,e.c=t,e.d=function(s,c,d){e.o(s,c)||Object.defineProperty(s,c,{enumerable:!0,get:d})},e.r=function(s){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(s,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(s,"__esModule",{value:!0})},e.t=function(s,c){if(1&c&&(s=e(s)),8&c||4&c&&typeof s=="object"&&s&&s.__esModule)return s;var d=Object.create(null);if(e.r(d),Object.defineProperty(d,"default",{enumerable:!0,value:s}),2&c&&typeof s!="string")for(var p in s)e.d(d,p,function(f){return s[f]}.bind(null,p));return d},e.n=function(s){var c=s&&s.__esModule?function(){return s.default}:function(){return s};return e.d(c,"a",c),c},e.o=function(s,c){return Object.prototype.hasOwnProperty.call(s,c)},e.p="",e(e.s=48)}([function(a,t){a.exports=g},function(a,t){var e=a.exports={version:"2.6.12"};typeof __e=="number"&&(__e=e)},function(a,t,e){var s=e(26)("wks"),c=e(17),d=e(3).Symbol,p=typeof d=="function";(a.exports=function(f){return s[f]||(s[f]=p&&d[f]||(p?d:c)("Symbol."+f))}).store=s},function(a,t){var e=a.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=e)},function(a,t,e){a.exports=!e(8)(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},function(a,t){var e={}.hasOwnProperty;a.exports=function(s,c){return e.call(s,c)}},function(a,t,e){var s=e(7),c=e(16);a.exports=e(4)?function(d,p,f){return s.f(d,p,c(1,f))}:function(d,p,f){return d[p]=f,d}},function(a,t,e){var s=e(10),c=e(35),d=e(23),p=Object.defineProperty;t.f=e(4)?Object.defineProperty:function(f,h,E){if(s(f),h=d(h,!0),s(E),c)try{return p(f,h,E)}catch{}if("get"in E||"set"in E)throw TypeError("Accessors not supported!");return"value"in E&&(f[h]=E.value),f}},function(a,t){a.exports=function(e){try{return!!e()}catch{return!0}}},function(a,t,e){var s=e(40),c=e(22);a.exports=function(d){return s(c(d))}},function(a,t,e){var s=e(11);a.exports=function(c){if(!s(c))throw TypeError(c+" is not an object!");return c}},function(a,t){a.exports=function(e){return typeof e=="object"?e!==null:typeof e=="function"}},function(a,t){a.exports={}},function(a,t,e){var s=e(39),c=e(27);a.exports=Object.keys||function(d){return s(d,c)}},function(a,t){a.exports=!0},function(a,t,e){var s=e(3),c=e(1),d=e(53),p=e(6),f=e(5),h=function(E,b,w){var I,D,H,L=E&h.F,ee=E&h.G,r=E&h.S,B=E&h.P,V=E&h.B,z=E&h.W,q=ee?c:c[b]||(c[b]={}),k=q.prototype,A=ee?s:r?s[b]:(s[b]||{}).prototype;for(I in ee&&(w=b),w)(D=!L&&A&&A[I]!==void 0)&&f(q,I)||(H=D?A[I]:w[I],q[I]=ee&&typeof A[I]!="function"?w[I]:V&&D?d(H,s):z&&A[I]==H?function(T){var W=function(S,te,J){if(this instanceof T){switch(arguments.length){case 0:return new T;case 1:return new T(S);case 2:return new T(S,te)}return new T(S,te,J)}return T.apply(this,arguments)};return W.prototype=T.prototype,W}(H):B&&typeof H=="function"?d(Function.call,H):H,B&&((q.virtual||(q.virtual={}))[I]=H,E&h.R&&k&&!k[I]&&p(k,I,H)))};h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,h.U=64,h.R=128,a.exports=h},function(a,t){a.exports=function(e,s){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:s}}},function(a,t){var e=0,s=Math.random();a.exports=function(c){return"Symbol(".concat(c===void 0?"":c,")_",(++e+s).toString(36))}},function(a,t,e){var s=e(22);a.exports=function(c){return Object(s(c))}},function(a,t){t.f={}.propertyIsEnumerable},function(a,t,e){var s=e(52)(!0);e(34)(String,"String",function(c){this._t=String(c),this._i=0},function(){var c,d=this._t,p=this._i;return p>=d.length?{value:void 0,done:!0}:(c=s(d,p),this._i+=c.length,{value:c,done:!1})})},function(a,t){var e=Math.ceil,s=Math.floor;a.exports=function(c){return isNaN(c=+c)?0:(c>0?s:e)(c)}},function(a,t){a.exports=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e}},function(a,t,e){var s=e(11);a.exports=function(c,d){if(!s(c))return c;var p,f;if(d&&typeof(p=c.toString)=="function"&&!s(f=p.call(c))||typeof(p=c.valueOf)=="function"&&!s(f=p.call(c))||!d&&typeof(p=c.toString)=="function"&&!s(f=p.call(c)))return f;throw TypeError("Can't convert object to primitive value")}},function(a,t){var e={}.toString;a.exports=function(s){return e.call(s).slice(8,-1)}},function(a,t,e){var s=e(26)("keys"),c=e(17);a.exports=function(d){return s[d]||(s[d]=c(d))}},function(a,t,e){var s=e(1),c=e(3),d=c["__core-js_shared__"]||(c["__core-js_shared__"]={});(a.exports=function(p,f){return d[p]||(d[p]=f!==void 0?f:{})})("versions",[]).push({version:s.version,mode:e(14)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(a,t){a.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(a,t,e){var s=e(7).f,c=e(5),d=e(2)("toStringTag");a.exports=function(p,f,h){p&&!c(p=h?p:p.prototype,d)&&s(p,d,{configurable:!0,value:f})}},function(a,t,e){e(62);for(var s=e(3),c=e(6),d=e(12),p=e(2)("toStringTag"),f="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),h=0;h<f.length;h++){var E=f[h],b=s[E],w=b&&b.prototype;w&&!w[p]&&c(w,p,E),d[E]=d.Array}},function(a,t,e){t.f=e(2)},function(a,t,e){var s=e(3),c=e(1),d=e(14),p=e(30),f=e(7).f;a.exports=function(h){var E=c.Symbol||(c.Symbol=d?{}:s.Symbol||{});h.charAt(0)=="_"||h in E||f(E,h,{value:p.f(h)})}},function(a,t){t.f=Object.getOwnPropertySymbols},function(a,t){a.exports=function(e,s,c){return Math.min(Math.max(e,s),c)}},function(a,t,e){var s=e(14),c=e(15),d=e(37),p=e(6),f=e(12),h=e(55),E=e(28),b=e(61),w=e(2)("iterator"),I=!([].keys&&"next"in[].keys()),D=function(){return this};a.exports=function(H,L,ee,r,B,V,z){h(ee,L,r);var q,k,A,T=function(U){if(!I&&U in J)return J[U];switch(U){case"keys":case"values":return function(){return new ee(this,U)}}return function(){return new ee(this,U)}},W=L+" Iterator",S=B=="values",te=!1,J=H.prototype,C=J[w]||J["@@iterator"]||B&&J[B],Q=C||T(B),he=B?S?T("entries"):Q:void 0,ue=L=="Array"&&J.entries||C;if(ue&&(A=b(ue.call(new H)))!==Object.prototype&&A.next&&(E(A,W,!0),s||typeof A[w]=="function"||p(A,w,D)),S&&C&&C.name!=="values"&&(te=!0,Q=function(){return C.call(this)}),s&&!z||!I&&!te&&J[w]||p(J,w,Q),f[L]=Q,f[W]=D,B)if(q={values:S?Q:T("values"),keys:V?Q:T("keys"),entries:he},z)for(k in q)k in J||d(J,k,q[k]);else c(c.P+c.F*(I||te),L,q);return q}},function(a,t,e){a.exports=!e(4)&&!e(8)(function(){return Object.defineProperty(e(36)("div"),"a",{get:function(){return 7}}).a!=7})},function(a,t,e){var s=e(11),c=e(3).document,d=s(c)&&s(c.createElement);a.exports=function(p){return d?c.createElement(p):{}}},function(a,t,e){a.exports=e(6)},function(a,t,e){var s=e(10),c=e(56),d=e(27),p=e(25)("IE_PROTO"),f=function(){},h=function(){var E,b=e(36)("iframe"),w=d.length;for(b.style.display="none",e(60).appendChild(b),b.src="javascript:",(E=b.contentWindow.document).open(),E.write("<script>document.F=Object<\/script>"),E.close(),h=E.F;w--;)delete h.prototype[d[w]];return h()};a.exports=Object.create||function(E,b){var w;return E!==null?(f.prototype=s(E),w=new f,f.prototype=null,w[p]=E):w=h(),b===void 0?w:c(w,b)}},function(a,t,e){var s=e(5),c=e(9),d=e(57)(!1),p=e(25)("IE_PROTO");a.exports=function(f,h){var E,b=c(f),w=0,I=[];for(E in b)E!=p&&s(b,E)&&I.push(E);for(;h.length>w;)s(b,E=h[w++])&&(~d(I,E)||I.push(E));return I}},function(a,t,e){var s=e(24);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(c){return s(c)=="String"?c.split(""):Object(c)}},function(a,t,e){var s=e(39),c=e(27).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(d){return s(d,c)}},function(a,t,e){var s=e(24),c=e(2)("toStringTag"),d=s(function(){return arguments}())=="Arguments";a.exports=function(p){var f,h,E;return p===void 0?"Undefined":p===null?"Null":typeof(h=function(b,w){try{return b[w]}catch{}}(f=Object(p),c))=="string"?h:d?s(f):(E=s(f))=="Object"&&typeof f.callee=="function"?"Arguments":E}},function(a,t){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch{typeof window=="object"&&(e=window)}a.exports=e},function(a,t){var e=/-?\d+(\.\d+)?%?/g;a.exports=function(s){return s.match(e)}},function(a,t,e){Object.defineProperty(t,"__esModule",{value:!0}),t.getBase16Theme=t.createStyling=t.invertTheme=void 0;var s=D(e(49)),c=D(e(76)),d=D(e(81)),p=D(e(89)),f=D(e(93)),h=function(k){if(k&&k.__esModule)return k;var A={};if(k!=null)for(var T in k)Object.prototype.hasOwnProperty.call(k,T)&&(A[T]=k[T]);return A.default=k,A}(e(94)),E=D(e(132)),b=D(e(133)),w=D(e(138)),I=e(139);function D(k){return k&&k.__esModule?k:{default:k}}var H=h.default,L=(0,p.default)(H),ee=(0,w.default)(b.default,I.rgb2yuv,function(k){var A,T=(0,d.default)(k,3),W=T[0],S=T[1],te=T[2];return[(A=W,A<.25?1:A<.5?.9-A:1.1-A),S,te]},I.yuv2rgb,E.default),r=function(k){return function(A){return{className:[A.className,k.className].filter(Boolean).join(" "),style:(0,c.default)({},A.style||{},k.style||{})}}},B=function(k,A){var T=(0,p.default)(A);for(var W in k)T.indexOf(W)===-1&&T.push(W);return T.reduce(function(S,te){return S[te]=function(J,C){if(J===void 0)return C;if(C===void 0)return J;var Q=J===void 0?"undefined":(0,s.default)(J),he=C===void 0?"undefined":(0,s.default)(C);switch(Q){case"string":switch(he){case"string":return[C,J].filter(Boolean).join(" ");case"object":return r({className:J,style:C});case"function":return function(ue){for(var U=arguments.length,ce=Array(U>1?U-1:0),Z=1;Z<U;Z++)ce[Z-1]=arguments[Z];return r({className:J})(C.apply(void 0,[ue].concat(ce)))}}case"object":switch(he){case"string":return r({className:C,style:J});case"object":return(0,c.default)({},C,J);case"function":return function(ue){for(var U=arguments.length,ce=Array(U>1?U-1:0),Z=1;Z<U;Z++)ce[Z-1]=arguments[Z];return r({style:J})(C.apply(void 0,[ue].concat(ce)))}}case"function":switch(he){case"string":return function(ue){for(var U=arguments.length,ce=Array(U>1?U-1:0),Z=1;Z<U;Z++)ce[Z-1]=arguments[Z];return J.apply(void 0,[r(ue)({className:C})].concat(ce))};case"object":return function(ue){for(var U=arguments.length,ce=Array(U>1?U-1:0),Z=1;Z<U;Z++)ce[Z-1]=arguments[Z];return J.apply(void 0,[r(ue)({style:C})].concat(ce))};case"function":return function(ue){for(var U=arguments.length,ce=Array(U>1?U-1:0),Z=1;Z<U;Z++)ce[Z-1]=arguments[Z];return J.apply(void 0,[C.apply(void 0,[ue].concat(ce))].concat(ce))}}}}(k[te],A[te]),S},{})},V=function(k,A){for(var T=arguments.length,W=Array(T>2?T-2:0),S=2;S<T;S++)W[S-2]=arguments[S];if(A===null)return k;Array.isArray(A)||(A=[A]);var te=A.map(function(C){return k[C]}).filter(Boolean),J=te.reduce(function(C,Q){return typeof Q=="string"?C.className=[C.className,Q].filter(Boolean).join(" "):(Q===void 0?"undefined":(0,s.default)(Q))==="object"?C.style=(0,c.default)({},C.style,Q):typeof Q=="function"&&(C=(0,c.default)({},C,Q.apply(void 0,[C].concat(W)))),C},{className:"",style:{}});return J.className||delete J.className,(0,p.default)(J.style).length===0&&delete J.style,J},z=t.invertTheme=function(k){return(0,p.default)(k).reduce(function(A,T){return A[T]=/^base/.test(T)?ee(k[T]):T==="scheme"?k[T]+":inverted":k[T],A},{})},q=(t.createStyling=(0,f.default)(function(k){for(var A=arguments.length,T=Array(A>3?A-3:0),W=3;W<A;W++)T[W-3]=arguments[W];var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},J=S.defaultBase16,C=J===void 0?H:J,Q=S.base16Themes,he=Q===void 0?null:Q,ue=q(te,he);ue&&(te=(0,c.default)({},ue,te));var U=L.reduce(function(ge,Me){return ge[Me]=te[Me]||C[Me],ge},{}),ce=(0,p.default)(te).reduce(function(ge,Me){return L.indexOf(Me)===-1&&(ge[Me]=te[Me]),ge},{}),Z=k(U),me=B(ce,Z);return(0,f.default)(V,2).apply(void 0,[me].concat(T))},3),t.getBase16Theme=function(k,A){if(k&&k.extend&&(k=k.extend),typeof k=="string"){var T=k.split(":"),W=(0,d.default)(T,2),S=W[0],te=W[1];k=(A||{})[S]||h[S],te==="inverted"&&(k=z(k))}return k&&k.hasOwnProperty("base00")?k:void 0})},function(a,t,e){var s,c=typeof Reflect=="object"?Reflect:null,d=c&&typeof c.apply=="function"?c.apply:function(r,B,V){return Function.prototype.apply.call(r,B,V)};s=c&&typeof c.ownKeys=="function"?c.ownKeys:Object.getOwnPropertySymbols?function(r){return Object.getOwnPropertyNames(r).concat(Object.getOwnPropertySymbols(r))}:function(r){return Object.getOwnPropertyNames(r)};var p=Number.isNaN||function(r){return r!=r};function f(){f.init.call(this)}a.exports=f,a.exports.once=function(r,B){return new Promise(function(V,z){function q(){k!==void 0&&r.removeListener("error",k),V([].slice.call(arguments))}var k;B!=="error"&&(k=function(A){r.removeListener(B,q),z(A)},r.once("error",k)),r.once(B,q)})},f.EventEmitter=f,f.prototype._events=void 0,f.prototype._eventsCount=0,f.prototype._maxListeners=void 0;var h=10;function E(r){if(typeof r!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof r)}function b(r){return r._maxListeners===void 0?f.defaultMaxListeners:r._maxListeners}function w(r,B,V,z){var q,k,A,T;if(E(V),(k=r._events)===void 0?(k=r._events=Object.create(null),r._eventsCount=0):(k.newListener!==void 0&&(r.emit("newListener",B,V.listener?V.listener:V),k=r._events),A=k[B]),A===void 0)A=k[B]=V,++r._eventsCount;else if(typeof A=="function"?A=k[B]=z?[V,A]:[A,V]:z?A.unshift(V):A.push(V),(q=b(r))>0&&A.length>q&&!A.warned){A.warned=!0;var W=new Error("Possible EventEmitter memory leak detected. "+A.length+" "+String(B)+" listeners added. Use emitter.setMaxListeners() to increase limit");W.name="MaxListenersExceededWarning",W.emitter=r,W.type=B,W.count=A.length,T=W,console&&console.warn&&console.warn(T)}return r}function I(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function D(r,B,V){var z={fired:!1,wrapFn:void 0,target:r,type:B,listener:V},q=I.bind(z);return q.listener=V,z.wrapFn=q,q}function H(r,B,V){var z=r._events;if(z===void 0)return[];var q=z[B];return q===void 0?[]:typeof q=="function"?V?[q.listener||q]:[q]:V?function(k){for(var A=new Array(k.length),T=0;T<A.length;++T)A[T]=k[T].listener||k[T];return A}(q):ee(q,q.length)}function L(r){var B=this._events;if(B!==void 0){var V=B[r];if(typeof V=="function")return 1;if(V!==void 0)return V.length}return 0}function ee(r,B){for(var V=new Array(B),z=0;z<B;++z)V[z]=r[z];return V}Object.defineProperty(f,"defaultMaxListeners",{enumerable:!0,get:function(){return h},set:function(r){if(typeof r!="number"||r<0||p(r))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+r+".");h=r}}),f.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},f.prototype.setMaxListeners=function(r){if(typeof r!="number"||r<0||p(r))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+r+".");return this._maxListeners=r,this},f.prototype.getMaxListeners=function(){return b(this)},f.prototype.emit=function(r){for(var B=[],V=1;V<arguments.length;V++)B.push(arguments[V]);var z=r==="error",q=this._events;if(q!==void 0)z=z&&q.error===void 0;else if(!z)return!1;if(z){var k;if(B.length>0&&(k=B[0]),k instanceof Error)throw k;var A=new Error("Unhandled error."+(k?" ("+k.message+")":""));throw A.context=k,A}var T=q[r];if(T===void 0)return!1;if(typeof T=="function")d(T,this,B);else{var W=T.length,S=ee(T,W);for(V=0;V<W;++V)d(S[V],this,B)}return!0},f.prototype.addListener=function(r,B){return w(this,r,B,!1)},f.prototype.on=f.prototype.addListener,f.prototype.prependListener=function(r,B){return w(this,r,B,!0)},f.prototype.once=function(r,B){return E(B),this.on(r,D(this,r,B)),this},f.prototype.prependOnceListener=function(r,B){return E(B),this.prependListener(r,D(this,r,B)),this},f.prototype.removeListener=function(r,B){var V,z,q,k,A;if(E(B),(z=this._events)===void 0)return this;if((V=z[r])===void 0)return this;if(V===B||V.listener===B)--this._eventsCount==0?this._events=Object.create(null):(delete z[r],z.removeListener&&this.emit("removeListener",r,V.listener||B));else if(typeof V!="function"){for(q=-1,k=V.length-1;k>=0;k--)if(V[k]===B||V[k].listener===B){A=V[k].listener,q=k;break}if(q<0)return this;q===0?V.shift():function(T,W){for(;W+1<T.length;W++)T[W]=T[W+1];T.pop()}(V,q),V.length===1&&(z[r]=V[0]),z.removeListener!==void 0&&this.emit("removeListener",r,A||B)}return this},f.prototype.off=f.prototype.removeListener,f.prototype.removeAllListeners=function(r){var B,V,z;if((V=this._events)===void 0)return this;if(V.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):V[r]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete V[r]),this;if(arguments.length===0){var q,k=Object.keys(V);for(z=0;z<k.length;++z)(q=k[z])!=="removeListener"&&this.removeAllListeners(q);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(B=V[r])=="function")this.removeListener(r,B);else if(B!==void 0)for(z=B.length-1;z>=0;z--)this.removeListener(r,B[z]);return this},f.prototype.listeners=function(r){return H(this,r,!0)},f.prototype.rawListeners=function(r){return H(this,r,!1)},f.listenerCount=function(r,B){return typeof r.listenerCount=="function"?r.listenerCount(B):L.call(r,B)},f.prototype.listenerCount=L,f.prototype.eventNames=function(){return this._eventsCount>0?s(this._events):[]}},function(a,t,e){a.exports.Dispatcher=e(140)},function(a,t,e){a.exports=e(142)},function(a,t,e){t.__esModule=!0;var s=p(e(50)),c=p(e(65)),d=typeof c.default=="function"&&typeof s.default=="symbol"?function(f){return typeof f}:function(f){return f&&typeof c.default=="function"&&f.constructor===c.default&&f!==c.default.prototype?"symbol":typeof f};function p(f){return f&&f.__esModule?f:{default:f}}t.default=typeof c.default=="function"&&d(s.default)==="symbol"?function(f){return f===void 0?"undefined":d(f)}:function(f){return f&&typeof c.default=="function"&&f.constructor===c.default&&f!==c.default.prototype?"symbol":f===void 0?"undefined":d(f)}},function(a,t,e){a.exports={default:e(51),__esModule:!0}},function(a,t,e){e(20),e(29),a.exports=e(30).f("iterator")},function(a,t,e){var s=e(21),c=e(22);a.exports=function(d){return function(p,f){var h,E,b=String(c(p)),w=s(f),I=b.length;return w<0||w>=I?d?"":void 0:(h=b.charCodeAt(w))<55296||h>56319||w+1===I||(E=b.charCodeAt(w+1))<56320||E>57343?d?b.charAt(w):h:d?b.slice(w,w+2):E-56320+(h-55296<<10)+65536}}},function(a,t,e){var s=e(54);a.exports=function(c,d,p){if(s(c),d===void 0)return c;switch(p){case 1:return function(f){return c.call(d,f)};case 2:return function(f,h){return c.call(d,f,h)};case 3:return function(f,h,E){return c.call(d,f,h,E)}}return function(){return c.apply(d,arguments)}}},function(a,t){a.exports=function(e){if(typeof e!="function")throw TypeError(e+" is not a function!");return e}},function(a,t,e){var s=e(38),c=e(16),d=e(28),p={};e(6)(p,e(2)("iterator"),function(){return this}),a.exports=function(f,h,E){f.prototype=s(p,{next:c(1,E)}),d(f,h+" Iterator")}},function(a,t,e){var s=e(7),c=e(10),d=e(13);a.exports=e(4)?Object.defineProperties:function(p,f){c(p);for(var h,E=d(f),b=E.length,w=0;b>w;)s.f(p,h=E[w++],f[h]);return p}},function(a,t,e){var s=e(9),c=e(58),d=e(59);a.exports=function(p){return function(f,h,E){var b,w=s(f),I=c(w.length),D=d(E,I);if(p&&h!=h){for(;I>D;)if((b=w[D++])!=b)return!0}else for(;I>D;D++)if((p||D in w)&&w[D]===h)return p||D||0;return!p&&-1}}},function(a,t,e){var s=e(21),c=Math.min;a.exports=function(d){return d>0?c(s(d),9007199254740991):0}},function(a,t,e){var s=e(21),c=Math.max,d=Math.min;a.exports=function(p,f){return(p=s(p))<0?c(p+f,0):d(p,f)}},function(a,t,e){var s=e(3).document;a.exports=s&&s.documentElement},function(a,t,e){var s=e(5),c=e(18),d=e(25)("IE_PROTO"),p=Object.prototype;a.exports=Object.getPrototypeOf||function(f){return f=c(f),s(f,d)?f[d]:typeof f.constructor=="function"&&f instanceof f.constructor?f.constructor.prototype:f instanceof Object?p:null}},function(a,t,e){var s=e(63),c=e(64),d=e(12),p=e(9);a.exports=e(34)(Array,"Array",function(f,h){this._t=p(f),this._i=0,this._k=h},function(){var f=this._t,h=this._k,E=this._i++;return!f||E>=f.length?(this._t=void 0,c(1)):c(0,h=="keys"?E:h=="values"?f[E]:[E,f[E]])},"values"),d.Arguments=d.Array,s("keys"),s("values"),s("entries")},function(a,t){a.exports=function(){}},function(a,t){a.exports=function(e,s){return{value:s,done:!!e}}},function(a,t,e){a.exports={default:e(66),__esModule:!0}},function(a,t,e){e(67),e(73),e(74),e(75),a.exports=e(1).Symbol},function(a,t,e){var s=e(3),c=e(5),d=e(4),p=e(15),f=e(37),h=e(68).KEY,E=e(8),b=e(26),w=e(28),I=e(17),D=e(2),H=e(30),L=e(31),ee=e(69),r=e(70),B=e(10),V=e(11),z=e(18),q=e(9),k=e(23),A=e(16),T=e(38),W=e(71),S=e(72),te=e(32),J=e(7),C=e(13),Q=S.f,he=J.f,ue=W.f,U=s.Symbol,ce=s.JSON,Z=ce&&ce.stringify,me=D("_hidden"),ge=D("toPrimitive"),Me={}.propertyIsEnumerable,Ee=b("symbol-registry"),Ce=b("symbols"),be=b("op-symbols"),ye=Object.prototype,Be=typeof U=="function"&&!!te.f,Ue=s.QObject,Ze=!Ue||!Ue.prototype||!Ue.prototype.findChild,Xe=d&&E(function(){return T(he({},"a",{get:function(){return he(this,"a",{value:7}).a}})).a!=7})?function(j,N,R){var K=Q(ye,N);K&&delete ye[N],he(j,N,R),K&&j!==ye&&he(ye,N,K)}:he,et=function(j){var N=Ce[j]=T(U.prototype);return N._k=j,N},tt=Be&&typeof U.iterator=="symbol"?function(j){return typeof j=="symbol"}:function(j){return j instanceof U},He=function(j,N,R){return j===ye&&He(be,N,R),B(j),N=k(N,!0),B(R),c(Ce,N)?(R.enumerable?(c(j,me)&&j[me][N]&&(j[me][N]=!1),R=T(R,{enumerable:A(0,!1)})):(c(j,me)||he(j,me,A(1,{})),j[me][N]=!0),Xe(j,N,R)):he(j,N,R)},nt=function(j,N){B(j);for(var R,K=ee(N=q(N)),ne=0,ae=K.length;ae>ne;)He(j,R=K[ne++],N[R]);return j},st=function(j){var N=Me.call(this,j=k(j,!0));return!(this===ye&&c(Ce,j)&&!c(be,j))&&(!(N||!c(this,j)||!c(Ce,j)||c(this,me)&&this[me][j])||N)},at=function(j,N){if(j=q(j),N=k(N,!0),j!==ye||!c(Ce,N)||c(be,N)){var R=Q(j,N);return!R||!c(Ce,N)||c(j,me)&&j[me][N]||(R.enumerable=!0),R}},ot=function(j){for(var N,R=ue(q(j)),K=[],ne=0;R.length>ne;)c(Ce,N=R[ne++])||N==me||N==h||K.push(N);return K},Ge=function(j){for(var N,R=j===ye,K=ue(R?be:q(j)),ne=[],ae=0;K.length>ae;)!c(Ce,N=K[ae++])||R&&!c(ye,N)||ne.push(Ce[N]);return ne};Be||(f((U=function(){if(this instanceof U)throw TypeError("Symbol is not a constructor!");var j=I(arguments.length>0?arguments[0]:void 0),N=function(R){this===ye&&N.call(be,R),c(this,me)&&c(this[me],j)&&(this[me][j]=!1),Xe(this,j,A(1,R))};return d&&Ze&&Xe(ye,j,{configurable:!0,set:N}),et(j)}).prototype,"toString",function(){return this._k}),S.f=at,J.f=He,e(41).f=W.f=ot,e(19).f=st,te.f=Ge,d&&!e(14)&&f(ye,"propertyIsEnumerable",st,!0),H.f=function(j){return et(D(j))}),p(p.G+p.W+p.F*!Be,{Symbol:U});for(var Ve="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),Ie=0;Ve.length>Ie;)D(Ve[Ie++]);for(var rt=C(D.store),F=0;rt.length>F;)L(rt[F++]);p(p.S+p.F*!Be,"Symbol",{for:function(j){return c(Ee,j+="")?Ee[j]:Ee[j]=U(j)},keyFor:function(j){if(!tt(j))throw TypeError(j+" is not a symbol!");for(var N in Ee)if(Ee[N]===j)return N},useSetter:function(){Ze=!0},useSimple:function(){Ze=!1}}),p(p.S+p.F*!Be,"Object",{create:function(j,N){return N===void 0?T(j):nt(T(j),N)},defineProperty:He,defineProperties:nt,getOwnPropertyDescriptor:at,getOwnPropertyNames:ot,getOwnPropertySymbols:Ge});var x=E(function(){te.f(1)});p(p.S+p.F*x,"Object",{getOwnPropertySymbols:function(j){return te.f(z(j))}}),ce&&p(p.S+p.F*(!Be||E(function(){var j=U();return Z([j])!="[null]"||Z({a:j})!="{}"||Z(Object(j))!="{}"})),"JSON",{stringify:function(j){for(var N,R,K=[j],ne=1;arguments.length>ne;)K.push(arguments[ne++]);if(R=N=K[1],(V(N)||j!==void 0)&&!tt(j))return r(N)||(N=function(ae,pe){if(typeof R=="function"&&(pe=R.call(this,ae,pe)),!tt(pe))return pe}),K[1]=N,Z.apply(ce,K)}}),U.prototype[ge]||e(6)(U.prototype,ge,U.prototype.valueOf),w(U,"Symbol"),w(Math,"Math",!0),w(s.JSON,"JSON",!0)},function(a,t,e){var s=e(17)("meta"),c=e(11),d=e(5),p=e(7).f,f=0,h=Object.isExtensible||function(){return!0},E=!e(8)(function(){return h(Object.preventExtensions({}))}),b=function(I){p(I,s,{value:{i:"O"+ ++f,w:{}}})},w=a.exports={KEY:s,NEED:!1,fastKey:function(I,D){if(!c(I))return typeof I=="symbol"?I:(typeof I=="string"?"S":"P")+I;if(!d(I,s)){if(!h(I))return"F";if(!D)return"E";b(I)}return I[s].i},getWeak:function(I,D){if(!d(I,s)){if(!h(I))return!0;if(!D)return!1;b(I)}return I[s].w},onFreeze:function(I){return E&&w.NEED&&h(I)&&!d(I,s)&&b(I),I}}},function(a,t,e){var s=e(13),c=e(32),d=e(19);a.exports=function(p){var f=s(p),h=c.f;if(h)for(var E,b=h(p),w=d.f,I=0;b.length>I;)w.call(p,E=b[I++])&&f.push(E);return f}},function(a,t,e){var s=e(24);a.exports=Array.isArray||function(c){return s(c)=="Array"}},function(a,t,e){var s=e(9),c=e(41).f,d={}.toString,p=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];a.exports.f=function(f){return p&&d.call(f)=="[object Window]"?function(h){try{return c(h)}catch{return p.slice()}}(f):c(s(f))}},function(a,t,e){var s=e(19),c=e(16),d=e(9),p=e(23),f=e(5),h=e(35),E=Object.getOwnPropertyDescriptor;t.f=e(4)?E:function(b,w){if(b=d(b),w=p(w,!0),h)try{return E(b,w)}catch{}if(f(b,w))return c(!s.f.call(b,w),b[w])}},function(a,t){},function(a,t,e){e(31)("asyncIterator")},function(a,t,e){e(31)("observable")},function(a,t,e){t.__esModule=!0;var s,c=e(77),d=(s=c)&&s.__esModule?s:{default:s};t.default=d.default||function(p){for(var f=1;f<arguments.length;f++){var h=arguments[f];for(var E in h)Object.prototype.hasOwnProperty.call(h,E)&&(p[E]=h[E])}return p}},function(a,t,e){a.exports={default:e(78),__esModule:!0}},function(a,t,e){e(79),a.exports=e(1).Object.assign},function(a,t,e){var s=e(15);s(s.S+s.F,"Object",{assign:e(80)})},function(a,t,e){var s=e(4),c=e(13),d=e(32),p=e(19),f=e(18),h=e(40),E=Object.assign;a.exports=!E||e(8)(function(){var b={},w={},I=Symbol(),D="abcdefghijklmnopqrst";return b[I]=7,D.split("").forEach(function(H){w[H]=H}),E({},b)[I]!=7||Object.keys(E({},w)).join("")!=D})?function(b,w){for(var I=f(b),D=arguments.length,H=1,L=d.f,ee=p.f;D>H;)for(var r,B=h(arguments[H++]),V=L?c(B).concat(L(B)):c(B),z=V.length,q=0;z>q;)r=V[q++],s&&!ee.call(B,r)||(I[r]=B[r]);return I}:E},function(a,t,e){t.__esModule=!0;var s=d(e(82)),c=d(e(85));function d(p){return p&&p.__esModule?p:{default:p}}t.default=function(p,f){if(Array.isArray(p))return p;if((0,s.default)(Object(p)))return function(h,E){var b=[],w=!0,I=!1,D=void 0;try{for(var H,L=(0,c.default)(h);!(w=(H=L.next()).done)&&(b.push(H.value),!E||b.length!==E);w=!0);}catch(ee){I=!0,D=ee}finally{try{!w&&L.return&&L.return()}finally{if(I)throw D}}return b}(p,f);throw new TypeError("Invalid attempt to destructure non-iterable instance")}},function(a,t,e){a.exports={default:e(83),__esModule:!0}},function(a,t,e){e(29),e(20),a.exports=e(84)},function(a,t,e){var s=e(42),c=e(2)("iterator"),d=e(12);a.exports=e(1).isIterable=function(p){var f=Object(p);return f[c]!==void 0||"@@iterator"in f||d.hasOwnProperty(s(f))}},function(a,t,e){a.exports={default:e(86),__esModule:!0}},function(a,t,e){e(29),e(20),a.exports=e(87)},function(a,t,e){var s=e(10),c=e(88);a.exports=e(1).getIterator=function(d){var p=c(d);if(typeof p!="function")throw TypeError(d+" is not iterable!");return s(p.call(d))}},function(a,t,e){var s=e(42),c=e(2)("iterator"),d=e(12);a.exports=e(1).getIteratorMethod=function(p){if(p!=null)return p[c]||p["@@iterator"]||d[s(p)]}},function(a,t,e){a.exports={default:e(90),__esModule:!0}},function(a,t,e){e(91),a.exports=e(1).Object.keys},function(a,t,e){var s=e(18),c=e(13);e(92)("keys",function(){return function(d){return c(s(d))}})},function(a,t,e){var s=e(15),c=e(1),d=e(8);a.exports=function(p,f){var h=(c.Object||{})[p]||Object[p],E={};E[p]=f(h),s(s.S+s.F*d(function(){h(1)}),"Object",E)}},function(a,t,e){(function(s){var c=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],d=/^\s+|\s+$/g,p=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,f=/\{\n\/\* \[wrapped with (.+)\] \*/,h=/,? & /,E=/^[-+]0x[0-9a-f]+$/i,b=/^0b[01]+$/i,w=/^\[object .+?Constructor\]$/,I=/^0o[0-7]+$/i,D=/^(?:0|[1-9]\d*)$/,H=parseInt,L=typeof s=="object"&&s&&s.Object===Object&&s,ee=typeof self=="object"&&self&&self.Object===Object&&self,r=L||ee||Function("return this")();function B(F,x,j){switch(j.length){case 0:return F.call(x);case 1:return F.call(x,j[0]);case 2:return F.call(x,j[0],j[1]);case 3:return F.call(x,j[0],j[1],j[2])}return F.apply(x,j)}function V(F,x){return!!(F&&F.length)&&function(j,N,R){if(N!=N)return function(ae,pe,xe,je){for(var Ae=ae.length,ve=xe+-1;++ve<Ae;)if(pe(ae[ve],ve,ae))return ve;return-1}(j,z,R);for(var K=R-1,ne=j.length;++K<ne;)if(j[K]===N)return K;return-1}(F,x,0)>-1}function z(F){return F!=F}function q(F,x){for(var j=F.length,N=0;j--;)F[j]===x&&N++;return N}function k(F,x){for(var j=-1,N=F.length,R=0,K=[];++j<N;){var ne=F[j];ne!==x&&ne!=="__lodash_placeholder__"||(F[j]="__lodash_placeholder__",K[R++]=j)}return K}var A,T,W,S=Function.prototype,te=Object.prototype,J=r["__core-js_shared__"],C=(A=/[^.]+$/.exec(J&&J.keys&&J.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"",Q=S.toString,he=te.hasOwnProperty,ue=te.toString,U=RegExp("^"+Q.call(he).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ce=Object.create,Z=Math.max,me=Math.min,ge=(T=et(Object,"defineProperty"),(W=et.name)&&W.length>2?T:void 0);function Me(F){return Ve(F)?ce(F):{}}function Ee(F){return!(!Ve(F)||function(x){return!!C&&C in x}(F))&&(function(x){var j=Ve(x)?ue.call(x):"";return j=="[object Function]"||j=="[object GeneratorFunction]"}(F)||function(x){var j=!1;if(x!=null&&typeof x.toString!="function")try{j=!!(x+"")}catch{}return j}(F)?U:w).test(function(x){if(x!=null){try{return Q.call(x)}catch{}try{return x+""}catch{}}return""}(F))}function Ce(F,x,j,N){for(var R=-1,K=F.length,ne=j.length,ae=-1,pe=x.length,xe=Z(K-ne,0),je=Array(pe+xe),Ae=!N;++ae<pe;)je[ae]=x[ae];for(;++R<ne;)(Ae||R<K)&&(je[j[R]]=F[R]);for(;xe--;)je[ae++]=F[R++];return je}function be(F,x,j,N){for(var R=-1,K=F.length,ne=-1,ae=j.length,pe=-1,xe=x.length,je=Z(K-ae,0),Ae=Array(je+xe),ve=!N;++R<je;)Ae[R]=F[R];for(var Te=R;++pe<xe;)Ae[Te+pe]=x[pe];for(;++ne<ae;)(ve||R<K)&&(Ae[Te+j[ne]]=F[R++]);return Ae}function ye(F){return function(){var x=arguments;switch(x.length){case 0:return new F;case 1:return new F(x[0]);case 2:return new F(x[0],x[1]);case 3:return new F(x[0],x[1],x[2]);case 4:return new F(x[0],x[1],x[2],x[3]);case 5:return new F(x[0],x[1],x[2],x[3],x[4]);case 6:return new F(x[0],x[1],x[2],x[3],x[4],x[5]);case 7:return new F(x[0],x[1],x[2],x[3],x[4],x[5],x[6])}var j=Me(F.prototype),N=F.apply(j,x);return Ve(N)?N:j}}function Be(F,x,j,N,R,K,ne,ae,pe,xe){var je=128&x,Ae=1&x,ve=2&x,Te=24&x,De=512&x,$e=ve?void 0:ye(F);return function ze(){for(var ke=arguments.length,oe=Array(ke),Fe=ke;Fe--;)oe[Fe]=arguments[Fe];if(Te)var Pe=Xe(ze),Je=q(oe,Pe);if(N&&(oe=Ce(oe,N,R,Te)),K&&(oe=be(oe,K,ne,Te)),ke-=Je,Te&&ke<xe){var qe=k(oe,Pe);return Ue(F,x,Be,ze.placeholder,j,oe,qe,ae,pe,xe-ke)}var Re=Ae?j:this,We=ve?Re[F]:F;return ke=oe.length,ae?oe=st(oe,ae):De&&ke>1&&oe.reverse(),je&&pe<ke&&(oe.length=pe),this&&this!==r&&this instanceof ze&&(We=$e||ye(We)),We.apply(Re,oe)}}function Ue(F,x,j,N,R,K,ne,ae,pe,xe){var je=8&x;x|=je?32:64,4&(x&=~(je?64:32))||(x&=-4);var Ae=j(F,x,R,je?K:void 0,je?ne:void 0,je?void 0:K,je?void 0:ne,ae,pe,xe);return Ae.placeholder=N,at(Ae,F,x)}function Ze(F,x,j,N,R,K,ne,ae){var pe=2&x;if(!pe&&typeof F!="function")throw new TypeError("Expected a function");var xe=N?N.length:0;if(xe||(x&=-97,N=R=void 0),ne=ne===void 0?ne:Z(rt(ne),0),ae=ae===void 0?ae:rt(ae),xe-=R?R.length:0,64&x){var je=N,Ae=R;N=R=void 0}var ve=[F,x,j,N,R,je,Ae,K,ne,ae];if(F=ve[0],x=ve[1],j=ve[2],N=ve[3],R=ve[4],!(ae=ve[9]=ve[9]==null?pe?0:F.length:Z(ve[9]-xe,0))&&24&x&&(x&=-25),x&&x!=1)Te=x==8||x==16?function(De,$e,ze){var ke=ye(De);return function oe(){for(var Fe=arguments.length,Pe=Array(Fe),Je=Fe,qe=Xe(oe);Je--;)Pe[Je]=arguments[Je];var Re=Fe<3&&Pe[0]!==qe&&Pe[Fe-1]!==qe?[]:k(Pe,qe);if((Fe-=Re.length)<ze)return Ue(De,$e,Be,oe.placeholder,void 0,Pe,Re,void 0,void 0,ze-Fe);var We=this&&this!==r&&this instanceof oe?ke:De;return B(We,this,Pe)}}(F,x,ae):x!=32&&x!=33||R.length?Be.apply(void 0,ve):function(De,$e,ze,ke){var oe=1&$e,Fe=ye(De);return function Pe(){for(var Je=-1,qe=arguments.length,Re=-1,We=ke.length,it=Array(We+qe),ft=this&&this!==r&&this instanceof Pe?Fe:De;++Re<We;)it[Re]=ke[Re];for(;qe--;)it[Re++]=arguments[++Je];return B(ft,oe?ze:this,it)}}(F,x,j,N);else var Te=function(De,$e,ze){var ke=1&$e,oe=ye(De);return function Fe(){var Pe=this&&this!==r&&this instanceof Fe?oe:De;return Pe.apply(ke?ze:this,arguments)}}(F,x,j);return at(Te,F,x)}function Xe(F){return F.placeholder}function et(F,x){var j=function(N,R){return N==null?void 0:N[R]}(F,x);return Ee(j)?j:void 0}function tt(F){var x=F.match(f);return x?x[1].split(h):[]}function He(F,x){var j=x.length,N=j-1;return x[N]=(j>1?"& ":"")+x[N],x=x.join(j>2?", ":" "),F.replace(p,`{
3
3
  /* [wrapped with `+x+`] */
4
4
  `)}function nt(F,x){return!!(x=x??9007199254740991)&&(typeof F=="number"||D.test(F))&&F>-1&&F%1==0&&F<x}function st(F,x){for(var j=F.length,N=me(x.length,j),R=function(ne,ae){var pe=-1,xe=ne.length;for(ae||(ae=Array(xe));++pe<xe;)ae[pe]=ne[pe];return ae}(F);N--;){var K=x[N];F[N]=nt(K,j)?R[K]:void 0}return F}var at=ge?function(F,x,j){var N,R=x+"";return ge(F,"toString",{configurable:!0,enumerable:!1,value:(N=He(R,ot(tt(R),j)),function(){return N})})}:function(F){return F};function ot(F,x){return function(j,N){for(var R=-1,K=j?j.length:0;++R<K&&N(j[R],R,j)!==!1;);}(c,function(j){var N="_."+j[0];x&j[1]&&!V(F,N)&&F.push(N)}),F.sort()}function Ge(F,x,j){var N=Ze(F,8,void 0,void 0,void 0,void 0,void 0,x=j?void 0:x);return N.placeholder=Ge.placeholder,N}function Ve(F){var x=typeof F;return!!F&&(x=="object"||x=="function")}function Ie(F){return F?(F=function(x){if(typeof x=="number")return x;if(function(R){return typeof R=="symbol"||function(K){return!!K&&typeof K=="object"}(R)&&ue.call(R)=="[object Symbol]"}(x))return NaN;if(Ve(x)){var j=typeof x.valueOf=="function"?x.valueOf():x;x=Ve(j)?j+"":j}if(typeof x!="string")return x===0?x:+x;x=x.replace(d,"");var N=b.test(x);return N||I.test(x)?H(x.slice(2),N?2:8):E.test(x)?NaN:+x}(F))===1/0||F===-1/0?17976931348623157e292*(F<0?-1:1):F==F?F:0:F===0?F:0}function rt(F){var x=Ie(F),j=x%1;return x==x?j?x-j:x:0}Ge.placeholder={},a.exports=Ge}).call(this,e(43))},function(a,t,e){function s(be){return be&&be.__esModule?be.default:be}t.__esModule=!0;var c=e(95);t.threezerotwofour=s(c);var d=e(96);t.apathy=s(d);var p=e(97);t.ashes=s(p);var f=e(98);t.atelierDune=s(f);var h=e(99);t.atelierForest=s(h);var E=e(100);t.atelierHeath=s(E);var b=e(101);t.atelierLakeside=s(b);var w=e(102);t.atelierSeaside=s(w);var I=e(103);t.bespin=s(I);var D=e(104);t.brewer=s(D);var H=e(105);t.bright=s(H);var L=e(106);t.chalk=s(L);var ee=e(107);t.codeschool=s(ee);var r=e(108);t.colors=s(r);var B=e(109);t.default=s(B);var V=e(110);t.eighties=s(V);var z=e(111);t.embers=s(z);var q=e(112);t.flat=s(q);var k=e(113);t.google=s(k);var A=e(114);t.grayscale=s(A);var T=e(115);t.greenscreen=s(T);var W=e(116);t.harmonic=s(W);var S=e(117);t.hopscotch=s(S);var te=e(118);t.isotope=s(te);var J=e(119);t.marrakesh=s(J);var C=e(120);t.mocha=s(C);var Q=e(121);t.monokai=s(Q);var he=e(122);t.ocean=s(he);var ue=e(123);t.paraiso=s(ue);var U=e(124);t.pop=s(U);var ce=e(125);t.railscasts=s(ce);var Z=e(126);t.shapeshifter=s(Z);var me=e(127);t.solarized=s(me);var ge=e(128);t.summerfruit=s(ge);var Me=e(129);t.tomorrow=s(Me);var Ee=e(130);t.tube=s(Ee);var Ce=e(131);t.twilight=s(Ce)},function(a,t,e){t.__esModule=!0,t.default={scheme:"threezerotwofour",author:"jan t. sott (http://github.com/idleberg)",base00:"#090300",base01:"#3a3432",base02:"#4a4543",base03:"#5c5855",base04:"#807d7c",base05:"#a5a2a2",base06:"#d6d5d4",base07:"#f7f7f7",base08:"#db2d20",base09:"#e8bbd0",base0A:"#fded02",base0B:"#01a252",base0C:"#b5e4f4",base0D:"#01a0e4",base0E:"#a16a94",base0F:"#cdab53"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"apathy",author:"jannik siebert (https://github.com/janniks)",base00:"#031A16",base01:"#0B342D",base02:"#184E45",base03:"#2B685E",base04:"#5F9C92",base05:"#81B5AC",base06:"#A7CEC8",base07:"#D2E7E4",base08:"#3E9688",base09:"#3E7996",base0A:"#3E4C96",base0B:"#883E96",base0C:"#963E4C",base0D:"#96883E",base0E:"#4C963E",base0F:"#3E965B"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"ashes",author:"jannik siebert (https://github.com/janniks)",base00:"#1C2023",base01:"#393F45",base02:"#565E65",base03:"#747C84",base04:"#ADB3BA",base05:"#C7CCD1",base06:"#DFE2E5",base07:"#F3F4F5",base08:"#C7AE95",base09:"#C7C795",base0A:"#AEC795",base0B:"#95C7AE",base0C:"#95AEC7",base0D:"#AE95C7",base0E:"#C795AE",base0F:"#C79595"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"atelier dune",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)",base00:"#20201d",base01:"#292824",base02:"#6e6b5e",base03:"#7d7a68",base04:"#999580",base05:"#a6a28c",base06:"#e8e4cf",base07:"#fefbec",base08:"#d73737",base09:"#b65611",base0A:"#cfb017",base0B:"#60ac39",base0C:"#1fad83",base0D:"#6684e1",base0E:"#b854d4",base0F:"#d43552"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"atelier forest",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest)",base00:"#1b1918",base01:"#2c2421",base02:"#68615e",base03:"#766e6b",base04:"#9c9491",base05:"#a8a19f",base06:"#e6e2e0",base07:"#f1efee",base08:"#f22c40",base09:"#df5320",base0A:"#d5911a",base0B:"#5ab738",base0C:"#00ad9c",base0D:"#407ee7",base0E:"#6666ea",base0F:"#c33ff3"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"atelier heath",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath)",base00:"#1b181b",base01:"#292329",base02:"#695d69",base03:"#776977",base04:"#9e8f9e",base05:"#ab9bab",base06:"#d8cad8",base07:"#f7f3f7",base08:"#ca402b",base09:"#a65926",base0A:"#bb8a35",base0B:"#379a37",base0C:"#159393",base0D:"#516aec",base0E:"#7b59c0",base0F:"#cc33cc"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"atelier lakeside",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/)",base00:"#161b1d",base01:"#1f292e",base02:"#516d7b",base03:"#5a7b8c",base04:"#7195a8",base05:"#7ea2b4",base06:"#c1e4f6",base07:"#ebf8ff",base08:"#d22d72",base09:"#935c25",base0A:"#8a8a0f",base0B:"#568c3b",base0C:"#2d8f6f",base0D:"#257fad",base0E:"#5d5db1",base0F:"#b72dd2"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"atelier seaside",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/)",base00:"#131513",base01:"#242924",base02:"#5e6e5e",base03:"#687d68",base04:"#809980",base05:"#8ca68c",base06:"#cfe8cf",base07:"#f0fff0",base08:"#e6193c",base09:"#87711d",base0A:"#c3c322",base0B:"#29a329",base0C:"#1999b3",base0D:"#3d62f5",base0E:"#ad2bee",base0F:"#e619c3"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"bespin",author:"jan t. sott",base00:"#28211c",base01:"#36312e",base02:"#5e5d5c",base03:"#666666",base04:"#797977",base05:"#8a8986",base06:"#9d9b97",base07:"#baae9e",base08:"#cf6a4c",base09:"#cf7d34",base0A:"#f9ee98",base0B:"#54be0d",base0C:"#afc4db",base0D:"#5ea6ea",base0E:"#9b859d",base0F:"#937121"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"brewer",author:"timothée poisot (http://github.com/tpoisot)",base00:"#0c0d0e",base01:"#2e2f30",base02:"#515253",base03:"#737475",base04:"#959697",base05:"#b7b8b9",base06:"#dadbdc",base07:"#fcfdfe",base08:"#e31a1c",base09:"#e6550d",base0A:"#dca060",base0B:"#31a354",base0C:"#80b1d3",base0D:"#3182bd",base0E:"#756bb1",base0F:"#b15928"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"bright",author:"chris kempson (http://chriskempson.com)",base00:"#000000",base01:"#303030",base02:"#505050",base03:"#b0b0b0",base04:"#d0d0d0",base05:"#e0e0e0",base06:"#f5f5f5",base07:"#ffffff",base08:"#fb0120",base09:"#fc6d24",base0A:"#fda331",base0B:"#a1c659",base0C:"#76c7b7",base0D:"#6fb3d2",base0E:"#d381c3",base0F:"#be643c"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"chalk",author:"chris kempson (http://chriskempson.com)",base00:"#151515",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#f5f5f5",base08:"#fb9fb1",base09:"#eda987",base0A:"#ddb26f",base0B:"#acc267",base0C:"#12cfc0",base0D:"#6fc2ef",base0E:"#e1a3ee",base0F:"#deaf8f"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"codeschool",author:"brettof86",base00:"#232c31",base01:"#1c3657",base02:"#2a343a",base03:"#3f4944",base04:"#84898c",base05:"#9ea7a6",base06:"#a7cfa3",base07:"#b5d8f6",base08:"#2a5491",base09:"#43820d",base0A:"#a03b1e",base0B:"#237986",base0C:"#b02f30",base0D:"#484d79",base0E:"#c59820",base0F:"#c98344"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"colors",author:"mrmrs (http://clrs.cc)",base00:"#111111",base01:"#333333",base02:"#555555",base03:"#777777",base04:"#999999",base05:"#bbbbbb",base06:"#dddddd",base07:"#ffffff",base08:"#ff4136",base09:"#ff851b",base0A:"#ffdc00",base0B:"#2ecc40",base0C:"#7fdbff",base0D:"#0074d9",base0E:"#b10dc9",base0F:"#85144b"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"default",author:"chris kempson (http://chriskempson.com)",base00:"#181818",base01:"#282828",base02:"#383838",base03:"#585858",base04:"#b8b8b8",base05:"#d8d8d8",base06:"#e8e8e8",base07:"#f8f8f8",base08:"#ab4642",base09:"#dc9656",base0A:"#f7ca88",base0B:"#a1b56c",base0C:"#86c1b9",base0D:"#7cafc2",base0E:"#ba8baf",base0F:"#a16946"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"eighties",author:"chris kempson (http://chriskempson.com)",base00:"#2d2d2d",base01:"#393939",base02:"#515151",base03:"#747369",base04:"#a09f93",base05:"#d3d0c8",base06:"#e8e6df",base07:"#f2f0ec",base08:"#f2777a",base09:"#f99157",base0A:"#ffcc66",base0B:"#99cc99",base0C:"#66cccc",base0D:"#6699cc",base0E:"#cc99cc",base0F:"#d27b53"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"embers",author:"jannik siebert (https://github.com/janniks)",base00:"#16130F",base01:"#2C2620",base02:"#433B32",base03:"#5A5047",base04:"#8A8075",base05:"#A39A90",base06:"#BEB6AE",base07:"#DBD6D1",base08:"#826D57",base09:"#828257",base0A:"#6D8257",base0B:"#57826D",base0C:"#576D82",base0D:"#6D5782",base0E:"#82576D",base0F:"#825757"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"flat",author:"chris kempson (http://chriskempson.com)",base00:"#2C3E50",base01:"#34495E",base02:"#7F8C8D",base03:"#95A5A6",base04:"#BDC3C7",base05:"#e0e0e0",base06:"#f5f5f5",base07:"#ECF0F1",base08:"#E74C3C",base09:"#E67E22",base0A:"#F1C40F",base0B:"#2ECC71",base0C:"#1ABC9C",base0D:"#3498DB",base0E:"#9B59B6",base0F:"#be643c"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"google",author:"seth wright (http://sethawright.com)",base00:"#1d1f21",base01:"#282a2e",base02:"#373b41",base03:"#969896",base04:"#b4b7b4",base05:"#c5c8c6",base06:"#e0e0e0",base07:"#ffffff",base08:"#CC342B",base09:"#F96A38",base0A:"#FBA922",base0B:"#198844",base0C:"#3971ED",base0D:"#3971ED",base0E:"#A36AC7",base0F:"#3971ED"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"grayscale",author:"alexandre gavioli (https://github.com/alexx2/)",base00:"#101010",base01:"#252525",base02:"#464646",base03:"#525252",base04:"#ababab",base05:"#b9b9b9",base06:"#e3e3e3",base07:"#f7f7f7",base08:"#7c7c7c",base09:"#999999",base0A:"#a0a0a0",base0B:"#8e8e8e",base0C:"#868686",base0D:"#686868",base0E:"#747474",base0F:"#5e5e5e"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"green screen",author:"chris kempson (http://chriskempson.com)",base00:"#001100",base01:"#003300",base02:"#005500",base03:"#007700",base04:"#009900",base05:"#00bb00",base06:"#00dd00",base07:"#00ff00",base08:"#007700",base09:"#009900",base0A:"#007700",base0B:"#00bb00",base0C:"#005500",base0D:"#009900",base0E:"#00bb00",base0F:"#005500"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"harmonic16",author:"jannik siebert (https://github.com/janniks)",base00:"#0b1c2c",base01:"#223b54",base02:"#405c79",base03:"#627e99",base04:"#aabcce",base05:"#cbd6e2",base06:"#e5ebf1",base07:"#f7f9fb",base08:"#bf8b56",base09:"#bfbf56",base0A:"#8bbf56",base0B:"#56bf8b",base0C:"#568bbf",base0D:"#8b56bf",base0E:"#bf568b",base0F:"#bf5656"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"hopscotch",author:"jan t. sott",base00:"#322931",base01:"#433b42",base02:"#5c545b",base03:"#797379",base04:"#989498",base05:"#b9b5b8",base06:"#d5d3d5",base07:"#ffffff",base08:"#dd464c",base09:"#fd8b19",base0A:"#fdcc59",base0B:"#8fc13e",base0C:"#149b93",base0D:"#1290bf",base0E:"#c85e7c",base0F:"#b33508"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"isotope",author:"jan t. sott",base00:"#000000",base01:"#404040",base02:"#606060",base03:"#808080",base04:"#c0c0c0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#ffffff",base08:"#ff0000",base09:"#ff9900",base0A:"#ff0099",base0B:"#33ff00",base0C:"#00ffff",base0D:"#0066ff",base0E:"#cc00ff",base0F:"#3300ff"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"marrakesh",author:"alexandre gavioli (http://github.com/alexx2/)",base00:"#201602",base01:"#302e00",base02:"#5f5b17",base03:"#6c6823",base04:"#86813b",base05:"#948e48",base06:"#ccc37a",base07:"#faf0a5",base08:"#c35359",base09:"#b36144",base0A:"#a88339",base0B:"#18974e",base0C:"#75a738",base0D:"#477ca1",base0E:"#8868b3",base0F:"#b3588e"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"mocha",author:"chris kempson (http://chriskempson.com)",base00:"#3B3228",base01:"#534636",base02:"#645240",base03:"#7e705a",base04:"#b8afad",base05:"#d0c8c6",base06:"#e9e1dd",base07:"#f5eeeb",base08:"#cb6077",base09:"#d28b71",base0A:"#f4bc87",base0B:"#beb55b",base0C:"#7bbda4",base0D:"#8ab3b5",base0E:"#a89bb9",base0F:"#bb9584"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"monokai",author:"wimer hazenberg (http://www.monokai.nl)",base00:"#272822",base01:"#383830",base02:"#49483e",base03:"#75715e",base04:"#a59f85",base05:"#f8f8f2",base06:"#f5f4f1",base07:"#f9f8f5",base08:"#f92672",base09:"#fd971f",base0A:"#f4bf75",base0B:"#a6e22e",base0C:"#a1efe4",base0D:"#66d9ef",base0E:"#ae81ff",base0F:"#cc6633"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"ocean",author:"chris kempson (http://chriskempson.com)",base00:"#2b303b",base01:"#343d46",base02:"#4f5b66",base03:"#65737e",base04:"#a7adba",base05:"#c0c5ce",base06:"#dfe1e8",base07:"#eff1f5",base08:"#bf616a",base09:"#d08770",base0A:"#ebcb8b",base0B:"#a3be8c",base0C:"#96b5b4",base0D:"#8fa1b3",base0E:"#b48ead",base0F:"#ab7967"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"paraiso",author:"jan t. sott",base00:"#2f1e2e",base01:"#41323f",base02:"#4f424c",base03:"#776e71",base04:"#8d8687",base05:"#a39e9b",base06:"#b9b6b0",base07:"#e7e9db",base08:"#ef6155",base09:"#f99b15",base0A:"#fec418",base0B:"#48b685",base0C:"#5bc4bf",base0D:"#06b6ef",base0E:"#815ba4",base0F:"#e96ba8"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"pop",author:"chris kempson (http://chriskempson.com)",base00:"#000000",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#ffffff",base08:"#eb008a",base09:"#f29333",base0A:"#f8ca12",base0B:"#37b349",base0C:"#00aabb",base0D:"#0e5a94",base0E:"#b31e8d",base0F:"#7a2d00"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"railscasts",author:"ryan bates (http://railscasts.com)",base00:"#2b2b2b",base01:"#272935",base02:"#3a4055",base03:"#5a647e",base04:"#d4cfc9",base05:"#e6e1dc",base06:"#f4f1ed",base07:"#f9f7f3",base08:"#da4939",base09:"#cc7833",base0A:"#ffc66d",base0B:"#a5c261",base0C:"#519f50",base0D:"#6d9cbe",base0E:"#b6b3eb",base0F:"#bc9458"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"shapeshifter",author:"tyler benziger (http://tybenz.com)",base00:"#000000",base01:"#040404",base02:"#102015",base03:"#343434",base04:"#555555",base05:"#ababab",base06:"#e0e0e0",base07:"#f9f9f9",base08:"#e92f2f",base09:"#e09448",base0A:"#dddd13",base0B:"#0ed839",base0C:"#23edda",base0D:"#3b48e3",base0E:"#f996e2",base0F:"#69542d"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"solarized",author:"ethan schoonover (http://ethanschoonover.com/solarized)",base00:"#002b36",base01:"#073642",base02:"#586e75",base03:"#657b83",base04:"#839496",base05:"#93a1a1",base06:"#eee8d5",base07:"#fdf6e3",base08:"#dc322f",base09:"#cb4b16",base0A:"#b58900",base0B:"#859900",base0C:"#2aa198",base0D:"#268bd2",base0E:"#6c71c4",base0F:"#d33682"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"summerfruit",author:"christopher corley (http://cscorley.github.io/)",base00:"#151515",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#B0B0B0",base05:"#D0D0D0",base06:"#E0E0E0",base07:"#FFFFFF",base08:"#FF0086",base09:"#FD8900",base0A:"#ABA800",base0B:"#00C918",base0C:"#1faaaa",base0D:"#3777E6",base0E:"#AD00A1",base0F:"#cc6633"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"tomorrow",author:"chris kempson (http://chriskempson.com)",base00:"#1d1f21",base01:"#282a2e",base02:"#373b41",base03:"#969896",base04:"#b4b7b4",base05:"#c5c8c6",base06:"#e0e0e0",base07:"#ffffff",base08:"#cc6666",base09:"#de935f",base0A:"#f0c674",base0B:"#b5bd68",base0C:"#8abeb7",base0D:"#81a2be",base0E:"#b294bb",base0F:"#a3685a"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"london tube",author:"jan t. sott",base00:"#231f20",base01:"#1c3f95",base02:"#5a5758",base03:"#737171",base04:"#959ca1",base05:"#d9d8d8",base06:"#e7e7e8",base07:"#ffffff",base08:"#ee2e24",base09:"#f386a1",base0A:"#ffd204",base0B:"#00853e",base0C:"#85cebc",base0D:"#009ddc",base0E:"#98005d",base0F:"#b06110"},a.exports=t.default},function(a,t,e){t.__esModule=!0,t.default={scheme:"twilight",author:"david hart (http://hart-dev.com)",base00:"#1e1e1e",base01:"#323537",base02:"#464b50",base03:"#5f5a60",base04:"#838184",base05:"#a7a7a7",base06:"#c3c3c3",base07:"#ffffff",base08:"#cf6a4c",base09:"#cda869",base0A:"#f9ee98",base0B:"#8f9d6a",base0C:"#afc4db",base0D:"#7587a6",base0E:"#9b859d",base0F:"#9b703f"},a.exports=t.default},function(a,t,e){var s=e(33);function c(d){var p=Math.round(s(d,0,255)).toString(16);return p.length==1?"0"+p:p}a.exports=function(d){var p=d.length===4?c(255*d[3]):"";return"#"+c(d[0])+c(d[1])+c(d[2])+p}},function(a,t,e){var s=e(134),c=e(135),d=e(136),p=e(137),f={"#":c,hsl:function(E){var b=s(E),w=p(b);return b.length===4&&w.push(b[3]),w},rgb:d};function h(E){for(var b in f)if(E.indexOf(b)===0)return f[b](E)}h.rgb=d,h.hsl=s,h.hex=c,a.exports=h},function(a,t,e){var s=e(44),c=e(33);function d(p,f){switch(p=parseFloat(p),f){case 0:return c(p,0,360);case 1:case 2:return c(p,0,100);case 3:return c(p,0,1)}}a.exports=function(p){return s(p).map(d)}},function(a,t){a.exports=function(e){e.length!==4&&e.length!==5||(e=function(d){for(var p="#",f=1;f<d.length;f++){var h=d.charAt(f);p+=h+h}return p}(e));var s=[parseInt(e.substring(1,3),16),parseInt(e.substring(3,5),16),parseInt(e.substring(5,7),16)];if(e.length===9){var c=parseFloat((parseInt(e.substring(7,9),16)/255).toFixed(2));s.push(c)}return s}},function(a,t,e){var s=e(44),c=e(33);function d(p,f){return f<3?p.indexOf("%")!=-1?Math.round(255*c(parseInt(p,10),0,100)/100):c(parseInt(p,10),0,255):c(parseFloat(p),0,1)}a.exports=function(p){return s(p).map(d)}},function(a,t){a.exports=function(e){var s,c,d,p,f,h=e[0]/360,E=e[1]/100,b=e[2]/100;if(E==0)return[f=255*b,f,f];s=2*b-(c=b<.5?b*(1+E):b+E-b*E),p=[0,0,0];for(var w=0;w<3;w++)(d=h+1/3*-(w-1))<0&&d++,d>1&&d--,f=6*d<1?s+6*(c-s)*d:2*d<1?c:3*d<2?s+(c-s)*(2/3-d)*6:s,p[w]=255*f;return p}},function(a,t,e){(function(s){var c=typeof s=="object"&&s&&s.Object===Object&&s,d=typeof self=="object"&&self&&self.Object===Object&&self,p=c||d||Function("return this")();function f(k,A,T){switch(T.length){case 0:return k.call(A);case 1:return k.call(A,T[0]);case 2:return k.call(A,T[0],T[1]);case 3:return k.call(A,T[0],T[1],T[2])}return k.apply(A,T)}function h(k,A){for(var T=-1,W=A.length,S=k.length;++T<W;)k[S+T]=A[T];return k}var E=Object.prototype,b=E.hasOwnProperty,w=E.toString,I=p.Symbol,D=E.propertyIsEnumerable,H=I?I.isConcatSpreadable:void 0,L=Math.max;function ee(k){return r(k)||function(A){return function(T){return function(W){return!!W&&typeof W=="object"}(T)&&function(W){return W!=null&&function(S){return typeof S=="number"&&S>-1&&S%1==0&&S<=9007199254740991}(W.length)&&!function(S){var te=function(J){var C=typeof J;return!!J&&(C=="object"||C=="function")}(S)?w.call(S):"";return te=="[object Function]"||te=="[object GeneratorFunction]"}(W)}(T)}(A)&&b.call(A,"callee")&&(!D.call(A,"callee")||w.call(A)=="[object Arguments]")}(k)||!!(H&&k&&k[H])}var r=Array.isArray,B,V,z,q=(V=function(k){var A=(k=function(S,te,J,C,Q){var he=-1,ue=S.length;for(J||(J=ee),Q||(Q=[]);++he<ue;){var U=S[he];J(U)?h(Q,U):Q[Q.length]=U}return Q}(k)).length,T=A;for(B;T--;)if(typeof k[T]!="function")throw new TypeError("Expected a function");return function(){for(var W=0,S=A?k[W].apply(this,arguments):arguments[0];++W<A;)S=k[W].call(this,S);return S}},z=L(z===void 0?V.length-1:z,0),function(){for(var k=arguments,A=-1,T=L(k.length-z,0),W=Array(T);++A<T;)W[A]=k[z+A];A=-1;for(var S=Array(z+1);++A<z;)S[A]=k[A];return S[z]=W,f(V,this,S)});a.exports=q}).call(this,e(43))},function(a,t,e){Object.defineProperty(t,"__esModule",{value:!0}),t.yuv2rgb=function(s){var c,d,p,f=s[0],h=s[1],E=s[2];return c=1*f+0*h+1.13983*E,d=1*f+-.39465*h+-.5806*E,p=1*f+2.02311*h+0*E,c=Math.min(Math.max(0,c),1),d=Math.min(Math.max(0,d),1),p=Math.min(Math.max(0,p),1),[255*c,255*d,255*p]},t.rgb2yuv=function(s){var c=s[0]/255,d=s[1]/255,p=s[2]/255;return[.299*c+.587*d+.114*p,-.14713*c+-.28886*d+.436*p,.615*c+-.51499*d+-.10001*p]}},function(a,t,e){function s(p,f,h){return f in p?Object.defineProperty(p,f,{value:h,enumerable:!0,configurable:!0,writable:!0}):p[f]=h,p}var c=e(141),d=function(){function p(){s(this,"_callbacks",void 0),s(this,"_isDispatching",void 0),s(this,"_isHandled",void 0),s(this,"_isPending",void 0),s(this,"_lastID",void 0),s(this,"_pendingPayload",void 0),this._callbacks={},this._isDispatching=!1,this._isHandled={},this._isPending={},this._lastID=1}var f=p.prototype;return f.register=function(h){var E="ID_"+this._lastID++;return this._callbacks[E]=h,E},f.unregister=function(h){this._callbacks[h]||c(!1),delete this._callbacks[h]},f.waitFor=function(h){this._isDispatching||c(!1);for(var E=0;E<h.length;E++){var b=h[E];this._isPending[b]?this._isHandled[b]||c(!1):(this._callbacks[b]||c(!1),this._invokeCallback(b))}},f.dispatch=function(h){this._isDispatching&&c(!1),this._startDispatching(h);try{for(var E in this._callbacks)this._isPending[E]||this._invokeCallback(E)}finally{this._stopDispatching()}},f.isDispatching=function(){return this._isDispatching},f._invokeCallback=function(h){this._isPending[h]=!0,this._callbacks[h](this._pendingPayload),this._isHandled[h]=!0},f._startDispatching=function(h){for(var E in this._callbacks)this._isPending[E]=!1,this._isHandled[E]=!1;this._pendingPayload=h,this._isDispatching=!0},f._stopDispatching=function(){delete this._pendingPayload,this._isDispatching=!1},p}();a.exports=d},function(a,t,e){a.exports=function(s,c){for(var d=arguments.length,p=new Array(d>2?d-2:0),f=2;f<d;f++)p[f-2]=arguments[f];if(!s){var h;if(c===void 0)h=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var E=0;(h=new Error(c.replace(/%s/g,function(){return String(p[E++])}))).name="Invariant Violation"}throw h.framesToPop=1,h}}},function(a,t,e){function s(l,u,n){return u in l?Object.defineProperty(l,u,{value:n,enumerable:!0,configurable:!0,writable:!0}):l[u]=n,l}function c(l,u){var n=Object.keys(l);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(l);u&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(l,i).enumerable})),n.push.apply(n,o)}return n}function d(l){for(var u=1;u<arguments.length;u++){var n=arguments[u]!=null?arguments[u]:{};u%2?c(Object(n),!0).forEach(function(o){s(l,o,n[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(l,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(o){Object.defineProperty(l,o,Object.getOwnPropertyDescriptor(n,o))})}return l}function p(l,u){if(!(l instanceof u))throw new TypeError("Cannot call a class as a function")}function f(l,u){for(var n=0;n<u.length;n++){var o=u[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(l,o.key,o)}}function h(l,u,n){return u&&f(l.prototype,u),n&&f(l,n),l}function E(l,u){return(E=Object.setPrototypeOf||function(n,o){return n.__proto__=o,n})(l,u)}function b(l,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(u&&u.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),u&&E(l,u)}function w(l){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)})(l)}function I(l){return(I=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(l)}function D(l){if(l===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return l}function H(l,u){return!u||I(u)!=="object"&&typeof u!="function"?D(l):u}function L(l){var u=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var n,o=w(l);if(u){var i=w(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return H(this,n)}}e.r(t);var ee=e(0),r=e.n(ee);function B(){var l=this.constructor.getDerivedStateFromProps(this.props,this.state);l!=null&&this.setState(l)}function V(l){this.setState(function(u){var n=this.constructor.getDerivedStateFromProps(l,u);return n??null}.bind(this))}function z(l,u){try{var n=this.props,o=this.state;this.props=l,this.state=u,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,o)}finally{this.props=n,this.state=o}}function q(l){var u=l.prototype;if(!u||!u.isReactComponent)throw new Error("Can only polyfill class components");if(typeof l.getDerivedStateFromProps!="function"&&typeof u.getSnapshotBeforeUpdate!="function")return l;var n=null,o=null,i=null;if(typeof u.componentWillMount=="function"?n="componentWillMount":typeof u.UNSAFE_componentWillMount=="function"&&(n="UNSAFE_componentWillMount"),typeof u.componentWillReceiveProps=="function"?o="componentWillReceiveProps":typeof u.UNSAFE_componentWillReceiveProps=="function"&&(o="UNSAFE_componentWillReceiveProps"),typeof u.componentWillUpdate=="function"?i="componentWillUpdate":typeof u.UNSAFE_componentWillUpdate=="function"&&(i="UNSAFE_componentWillUpdate"),n!==null||o!==null||i!==null){var y=l.displayName||l.name,O=typeof l.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
@@ -1,4 +1,4 @@
1
- import{c as $,j as U,o as Pe,a as vM,b as bM,d as QM,P as S}from"./createSvgIcon-C_ElRFrf.js";import{i as f,R as M}from"./iobroker_javascript__loadShare__react__loadShare__-B-pIv4x_.js";import{i as j,c as Ne,C as Oe,a as nt,L as yL,g as TL,k as Ai,j as yN,H as TN,b as dN,S as dL,T as X,U as DL,V as hL,W as zL,X as wL,Y as UM,Z as CL,$ as IL,a0 as pL,a1 as AL,a2 as mL,a3 as $M,a4 as OL,a5 as EL,a6 as fL,a7 as xL,a8 as _L,a9 as SL,aa as kL,ab as YL,ac as vL,ad as bL,ae as QL,af as UL,ag as PM,ah as WM,ai as $L,aj as BM,t as PL,ak as WL,al as BL,am as JL,an as JM,ao as RL,ap as FL,aq as GL,N as HL,h as cn,I as $i}from"./index-DeFm7TiX.js";import{I as un}from"./Save--0ldNXLf.js";import{c as ir,g as VL}from"./_commonjsHelpers-Cpj98o6Y.js";import{u as ZL}from"./useTheme-CpAj0H76.js";import{t as B}from"./index-BompUVvy.js";import"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CmuPLb0X.js";const XL=$(U.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack"),KL=$(U.jsx("path",{d:"m10 17 5-5-5-5z"}),"ArrowRight"),qL=$(U.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 11h-3v3.75c0 1.24-1.01 2.25-2.25 2.25S8.5 17.99 8.5 16.75s1.01-2.25 2.25-2.25c.46 0 .89.14 1.25.38V11h4zm-3-4V3.5L18.5 9z"}),"AudioFile"),eg=$([U.jsx("path",{d:"M16.5 12h-9c-.55 0-1 .45-1 1v1h11v-1c0-.55-.45-1-1-1M7.25 8.5h4v2h-4zm5.5 0h4v2h-4z"},"0"),U.jsx("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-1 15h-1.5v-1.5h-11V17H5v-3.83c0-.66.25-1.26.65-1.72V9c0-1.1.9-2 2-2H11c.37 0 .72.12 1 .32.28-.2.63-.32 1-.32h3.35c1.1 0 2 .9 2 2v2.45c.4.46.65 1.06.65 1.72z"},"1")],"BedroomParent"),tg=$(U.jsx("path",{d:"M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2"}),"Bookmark"),sg=$(U.jsx("path",{d:"M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2m0 15-5-2.18L7 18V5h10z"}),"BookmarkBorder"),ig=$(U.jsx("path",{d:"M22 24H2v-4h20zM13.06 5.19l3.75 3.75L7.75 18H4v-3.75zm4.82 2.68-3.75-3.75 1.83-1.83c.39-.39 1.02-.39 1.41 0l2.34 2.34c.39.39.39 1.02 0 1.41z"}),"BorderColor"),rg=$(U.jsx("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6c3.31 0 6 2.69 6 6s-2.69 6-6 6"}),"Brightness4"),og=$(U.jsx("path",{d:"M20 15.31 23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6"}),"Brightness5"),Ma=$(U.jsx("path",{d:"M20 15.31 23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20zM12 18V6c3.31 0 6 2.69 6 6s-2.69 6-6 6"}),"Brightness6"),ng=$(U.jsx("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6m0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4"}),"Brightness7"),ag=$(U.jsx("path",{d:"m22.7 19-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4"}),"Build"),Mg=$(U.jsx("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday"),ca=$(U.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"}),"Code"),cg=$(U.jsx("path",{d:"m20.71 5.63-2.34-2.34a.996.996 0 0 0-1.41 0l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42M6.92 19 5 17.08l8.06-8.06 1.92 1.92z"}),"Colorize"),ug=$(U.jsx("path",{d:"m13.7826 15.1719 2.1213-2.1213 5.9963 5.9962-2.1213 2.1213zM17.5 10c1.93 0 3.5-1.57 3.5-3.5 0-.58-.16-1.12-.41-1.6l-2.7 2.7-1.49-1.49 2.7-2.7c-.48-.25-1.02-.41-1.6-.41C15.57 3 14 4.57 14 6.5c0 .41.08.8.21 1.16l-1.85 1.85-1.78-1.78.71-.71-1.41-1.41L12 3.49c-1.17-1.17-3.07-1.17-4.24 0L4.22 7.03l1.41 1.41H2.81l-.71.71 3.54 3.54.71-.71V9.15l1.41 1.41.71-.71 1.78 1.78-7.41 7.41 2.12 2.12L16.34 9.79c.36.13.75.21 1.16.21"}),"Construction"),lg=$(U.jsx("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2z"}),"Crop"),Ng=$(U.jsx("path",{d:"M4 7v2c0 .55-.45 1-1 1H2v4h1c.55 0 1 .45 1 1v2c0 1.65 1.35 3 3 3h3v-2H7c-.55 0-1-.45-1-1v-2c0-1.3-.84-2.42-2-2.83v-.34C5.16 11.42 6 10.3 6 9V7c0-.55.45-1 1-1h3V4H7C5.35 4 4 5.35 4 7m17 3c-.55 0-1-.45-1-1V7c0-1.65-1.35-3-3-3h-3v2h3c.55 0 1 .45 1 1v2c0 1.3.84 2.42 2 2.83v.34c-1.16.41-2 1.52-2 2.83v2c0 .55-.45 1-1 1h-3v2h3c1.65 0 3-1.35 3-3v-2c0-.55.45-1 1-1h1v-4z"}),"DataObject"),Kr=$(U.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description"),Lg=$(U.jsx("path",{d:"M18.41 5.8 17.2 4.59c-.78-.78-2.05-.78-2.83 0l-2.68 2.68L3 15.96V20h4.04l8.74-8.74 2.63-2.63c.79-.78.79-2.05 0-2.83M6.21 18H5v-1.21l8.66-8.66 1.21 1.21zM11 20l4-4h6v4z"}),"DriveFileRenameOutline"),gg=$(U.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),jg=$(U.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),yg=$(U.jsx("path",{d:"M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.15 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75zM9 13c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3"}),"FindInPage"),Tg=$(U.jsx("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m0 12H4V8h16z"}),"FolderOpen"),dg=$(U.jsx("path",{d:"M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m-2.06 11L15 15.28 12.06 17l.78-3.33-2.59-2.24 3.41-.29L15 8l1.34 3.14 3.41.29-2.59 2.24z"}),"FolderSpecial"),Dg=$(U.jsx("path",{d:"M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-4.05 16.5-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13z"}),"FontDownload"),hg=$(U.jsx("path",{d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"}),"FormatItalic"),zg=$(U.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),ua=$(U.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),DN=$(U.jsx("path",{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm7 7V3.5L18.5 9z"}),"InsertDriveFile"),wg=$(U.jsx("path",{d:"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"}),"KeyboardReturn"),hN=$(U.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link"),Cg=$(U.jsx("path",{d:"M3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm4 4h14v-2H7zm0 4h14v-2H7zM7 7v2h14V7z"}),"List"),Ig=$(U.jsx("path",{d:"M19 5v14H5V5zm1.1-2H3.9c-.5 0-.9.4-.9.9v16.2c0 .4.4.9.9.9h16.2c.4 0 .9-.5.9-.9V3.9c0-.5-.5-.9-.9-.9M11 7h6v2h-6zm0 4h6v2h-6zm0 4h6v2h-6zM7 7h2v2H7zm0 4h2v2H7zm0 4h2v2H7z"}),"ListAlt"),pg=$(U.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-5 14h-2V9h-2V7h4z"}),"LooksOne"),Ag=$(U.jsx("path",{d:"M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3z"}),"MusicNote"),mg=$(U.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),la=$(U.jsx("path",{d:"M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"PersonOutlined"),Og=$(U.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Photo"),Sr=$(U.jsx("path",{d:"M5 4v2h14V4zm0 10h4v6h6v-6h4l-7-7z"}),"Publish"),zN=$(U.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh"),Na=$(U.jsx("path",{d:"m20.2 5.9.8-.8C19.6 3.7 17.8 3 16 3s-3.6.7-5 2.1l.8.8C13 4.8 14.5 4.2 16 4.2s3 .6 4.2 1.7m-.9.8c-.9-.9-2.1-1.4-3.3-1.4s-2.4.5-3.3 1.4l.8.8c.7-.7 1.6-1 2.5-1s1.8.3 2.5 1zM19 13h-2V9h-2v4H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2M8 18H6v-2h2zm3.5 0h-2v-2h2zm3.5 0h-2v-2h2z"}),"Router"),Eg=$(U.jsx("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7zm-6 .67 2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),ln=$(U.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),kr=$(U.jsx("path",{d:"M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m7-7H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2m-1.75 9c0 .23-.02.46-.05.68l1.48 1.16c.13.11.17.3.08.45l-1.4 2.42c-.09.15-.27.21-.43.15l-1.74-.7c-.36.28-.76.51-1.18.69l-.26 1.85c-.03.17-.18.3-.35.3h-2.8c-.17 0-.32-.13-.35-.29l-.26-1.85c-.43-.18-.82-.41-1.18-.69l-1.74.7c-.16.06-.34 0-.43-.15l-1.4-2.42c-.09-.15-.05-.34.08-.45l1.48-1.16c-.03-.23-.05-.46-.05-.69s.02-.46.05-.68l-1.48-1.16c-.13-.11-.17-.3-.08-.45l1.4-2.42c.09-.15.27-.21.43-.15l1.74.7c.36-.28.76-.51 1.18-.69l.26-1.85c.03-.17.18-.3.35-.3h2.8c.17 0 .32.13.35.29l.26 1.85c.43.18.82.41 1.18.69l1.74-.7c.16-.06.34 0 .43.15l1.4 2.42c.09.15.05.34-.08.45l-1.48 1.16c.03.23.05.46.05.69"}),"SettingsApplications"),fg=$(U.jsx("path",{d:"m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"}),"ShowChart"),La=$(U.jsx("path",{d:"M11.99 2c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10m3.61 6.34c1.07 0 1.93.86 1.93 1.93s-.86 1.93-1.93 1.93-1.93-.86-1.93-1.93c-.01-1.07.86-1.93 1.93-1.93m-6-1.58c1.3 0 2.36 1.06 2.36 2.36s-1.06 2.36-2.36 2.36-2.36-1.06-2.36-2.36c0-1.31 1.05-2.36 2.36-2.36m0 9.13v3.75c-2.4-.75-4.3-2.6-5.14-4.96 1.05-1.12 3.67-1.69 5.14-1.69.53 0 1.2.08 1.9.22-1.64.87-1.9 2.02-1.9 2.68M11.99 20c-.27 0-.53-.01-.79-.04v-4.07c0-1.42 2.94-2.13 4.4-2.13 1.07 0 2.92.39 3.84 1.15-1.17 2.97-4.06 5.09-7.45 5.09"}),"SupervisedUserCircle"),xg=$(U.jsx("path",{d:"M2.5 4v3h5v12h3V7h5V4zm19 5h-9v3h3v7h3v-7h3z"}),"TextFields"),_g=$(U.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5zM8 15.01l1.41 1.41L11 14.84V19h2v-4.16l1.59 1.59L16 15.01 12.01 11z"}),"UploadFileOutlined"),Sg=$(U.jsx("path",{d:"M16 13h-3V3h-2v10H8l4 4zM4 19v2h16v-2z"}),"VerticalAlignBottom"),kg=$(U.jsx("path",{d:"M8 11h3v10h2V11h3l-4-4zM4 3v2h16V3z"}),"VerticalAlignTop"),Yg=$(U.jsx("path",{d:"M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11z"}),"Videocam"),vg=$(U.jsx("path",{d:"M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z"}),"ViewColumn"),bg=$(U.jsx("path",{d:"M4 15h16v-2H4zm0 4h16v-2H4zm0-8h16V9H4zm0-6v2h16V5z"}),"ViewHeadline"),Qg=$(U.jsx("path",{d:"M14.67 5v6.5H9.33V5zm1 6.5H21V5h-5.33zm-1 7.5v-6.5H9.33V19zm1-6.5V19H21v-6.5zm-7.34 0H3V19h5.33zm0-1V5H3v6.5z"}),"ViewModule"),Ug=$(U.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),$g=$(U.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),bs=$(U.jsx("path",{d:"m1 9 2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9m8 8 3 3 3-3c-1.65-1.66-4.34-1.66-6 0m-4-4 2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13"}),"Wifi"),rr=$(U.jsx("path",{d:"M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7zm-4 4c-1.29-1.29-2.84-2.13-4.49-2.56l3.53 3.53zM2 3.05 5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24C7.81 10.89 6.27 11.73 5 13v.01L6.99 15c1.36-1.36 3.14-2.04 4.92-2.06L18.98 20l1.27-1.26L3.29 1.79zM9 17l3 3 3-3c-1.65-1.66-4.34-1.66-6 0"}),"WifiOff"),mo=11/23/100;function RM(s){const e={r:0,g:0,b:0};if(s.length===7)e.r=parseInt(s.substring(1,3),16),e.g=parseInt(s.substring(3,5),16),e.b=parseInt(s.substring(5,7),16);else if(s.length===4){const t=s[1],i=s[2],r=s[3];e.r=parseInt(t+t,16),e.g=parseInt(i+i,16),e.b=parseInt(r+r,16)}return e}function Pg(s){return`#${Math.round(s.r).toString(16)}${Math.round(s.g).toString(16)}${Math.round(s.b).toString(16)}`}function Wg(s,e,t){const i=RM(s),r=RM(e);return i.r+=r.r*(.05+mo*(t-1)),i.g+=r.g*(.05+mo*(t-1)),i.b+=r.b*(.05+mo*(t-1)),Pg(i)}function FM(s,e){const t={};for(let i=1;i<=24;i++)t[`elevation${i}`]={backgroundColor:Wg(s,e,i)};return t}function Bg(s,e){var n,a,c,l,N,u,L,g,y,T,d;let t,i;s==="dark"?(i={MuiAppBar:{colorDefault:{backgroundColor:"#272727"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[200],"&:hover":{color:Pe[100]}}},MuiPaper:FM("#121212","#fff")},t={name:s,palette:{mode:"dark",background:{paper:"#121212",default:"#121212"},primary:{main:"#4dabf5"},secondary:{main:"#436a93"},expert:"#14bb00",text:{primary:"#ffffff",secondary:"#ffffff"}}}):s==="blue"?(i={MuiAppBar:{colorDefault:{backgroundColor:"#3399CC"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[400],"&:hover":{color:Pe[300]}}}},t={name:s,palette:{mode:"dark",background:{paper:"#151d21",default:"#151d21"},primary:{main:"#4dabf5"},secondary:{main:"#436a93"},expert:"#14bb00",text:{primary:"#ffffff",secondary:"#ffffff"}}}):s==="colored"?(i={MuiAppBar:{colorDefault:{backgroundColor:"#2a3135"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[200],"&:hover":{color:Pe[100]}}},MuiPaper:FM("#151d21","#fff")},t={name:s,palette:{mode:"light",primary:{main:"#3399CC"},secondary:{main:"#164477"},expert:"#96fc96"}}):s==="PT"?(i={MuiAppBar:{colorDefault:{backgroundColor:"#0F99DE"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[400],"&:hover":{color:Pe[300]}}}},t={name:s,palette:{mode:"light",primary:{main:"#0F99DE"},secondary:{main:"#88A536"},expert:"#BD1B24"}}):s==="DX"?(i={MuiAppBar:{colorDefault:{backgroundColor:"#a9a9a9"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[400],"&:hover":{color:Pe[300]}}}},t={name:s,palette:{mode:"light",primary:{main:"#F5F5F7"},secondary:{main:"#a9a9a9"},expert:"#BD1B24",text:{primary:"#007AFE",secondary:"#007AFE",disabled:"#007AFEAA"}}}):(i={MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[400],"&:hover":{color:Pe[300]}}}},t={name:s,palette:{mode:"light",primary:{main:"#3399CC",dark:"#256c97",light:"#76d0fd"},secondary:{main:"#164477"},expert:"#14bb00"}}),t.toolbar={height:48},t.saveToolbar={background:(a=(n=t.palette)==null?void 0:n.primary)==null?void 0:a.main,button:{borderRadius:3,height:32}},t.palette&&(t.palette.grey={main:vM[300],dark:vM[400]});const r=bM(t),o=r.palette;return bM(r,{...e||void 0,components:{...i,MuiButton:{variants:[{props:{variant:"contained",color:"grey"},style:{backgroundColor:(c=o.grey)==null?void 0:c[300],color:o.getContrastText&&((l=o.grey)!=null&&l[300])?o.getContrastText(o.grey[300]):void 0}},{props:{variant:"outlined",color:"grey"},style:{color:(N=o.text)==null?void 0:N.primary,borderColor:o.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)","&.Mui-disabled":{border:`1px solid ${(u=o.action)==null?void 0:u.disabledBackground}`},"&:hover":{borderColor:o.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)",backgroundColor:QM(((L=o.text)==null?void 0:L.primary)||"",((g=o.action)==null?void 0:g.hoverOpacity)||.04)}}},{props:{variant:"text",color:"grey"},style:{color:(y=o.text)==null?void 0:y.primary,"&:hover":{backgroundColor:QM(((T=o.text)==null?void 0:T.primary)||"",((d=o.action)==null?void 0:d.hoverOpacity)||.04)}}}]},...(e==null?void 0:e.components)||void 0}})}function Jg(){let s,e;const t=new Promise((i,r)=>{s=i,e=r});return t.resolve=s,t.reject=e,t}function Nn(s){return(s==null?void 0:s.rows.map(e=>e.value).filter(e=>!!e))??[]}function Tt(s){return s!=null&&s.startsWith("system.host.")||(s=`system.host.${s}`),s}function ci(s){return s!=null&&s.startsWith("system.host.")&&(s=s.substring(12)),s}function GM(s){return new Promise(e=>{setTimeout(e,s)})}function or(s){s=(s||"").toString();const e=s[0]==="*",t=s[s.length-1]==="*";return s=s.replace(/[-/\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*"),(e?"":"^")+s+(t?"":"$")}var rt;(function(s){s[s.CONNECTING=0]="CONNECTING",s[s.CONNECTED=1]="CONNECTED",s[s.OBJECTS_LOADED=2]="OBJECTS_LOADED",s[s.READY=3]="READY"})(rt||(rt={}));var Ie;(function(s){s.PERMISSION_ERROR="permissionError",s.NOT_CONNECTED="notConnectedError",s.TIMEOUT="timeout",s.NOT_ADMIN="Allowed only in admin",s.NOT_SUPPORTED="Not supported"})(Ie||(Ie={}));const t5e=Ie.PERMISSION_ERROR;Ie.NOT_CONNECTED;const Rg=["material","echarts","vis"];class ze{constructor(e){this.props=this.applyDefaultProps(e),this.connId=`${this.props.name?`${this.props.name}-`:""}${Math.round(Math.random()*1e6).toString().padStart(6,"0")}`,this.waitForSocketLib().then(()=>this.startSocket()).catch(t=>{alert(`Socket connection could not be initialized: ${t}`)})}applyDefaultProps(e){return{...e,protocol:e.protocol||window.location.protocol,host:e.host||window.location.hostname,port:e.port||(window.location.port==="3000"?8081:window.location.port),ioTimeout:Math.max(e.ioTimeout||2e4,2e4),cmdTimeout:Math.max(e.cmdTimeout||5e3,5e3),admin5only:e.admin5only||!1,autoSubscribes:e.autoSubscribes??[],autoSubscribeLog:e.autoSubscribeLog??!1,doNotLoadACL:e.doNotLoadACL??!0,doNotLoadAllObjects:e.doNotLoadAllObjects??!0}}props;connId;lastAccessToken=null;ignoreState="";connected=!1;subscribed=!1;firstConnect=!0;waitForRestart=!1;loaded=!1;simStates={};statesSubscribes={};filesSubscribes={};objectsSubscribes={};objects={};states={};acl=null;isSecure=!1;onReadyDone=!1;onConnectionHandlers=[];onLogHandlers=[];onCmdStdoutHandler;onCmdStderrHandler;onCmdExitHandler;onError(e){(this.props.onError??console.error)(e)}_socket;_waitForSocketPromise;_waitForFirstConnectionPromise=Jg();_instanceSubscriptions={};_promises={};_authTimer=null;_refreshTimer=null;_systemConfig;get systemConfig(){return this._systemConfig}systemLang="en";static isWeb(){return window.socketUrl!==void 0}waitForSocketLib(){return this._waitForSocketPromise?this._waitForSocketPromise:(this._waitForSocketPromise=new Promise(async(e,t)=>{if(typeof window.io>"u"&&typeof window.iob>"u")if(typeof window.registerSocketOnLoad=="function")window.registerSocketOnLoad(()=>e());else{for(let i=1;i<=30;i++){if(window.io||window.iob)return e();await GM(100)}t(new Error("Socket library could not be loaded!"))}else e()}),this._waitForSocketPromise)}async startSocket(){if(this._socket)return;let e=this.props.host,t=this.props.port,i=(this.props.protocol||window.location.protocol).replace(":",""),r=window.location.pathname;if(window.location.hostname==="iobroker.net"||window.location.hostname==="iobroker.pro")r="";else{if(window.socketUrl){const a=new URL(window.socketUrl);e=a.hostname,t=a.port,i=a.protocol.replace(":","")}const n=r.lastIndexOf("/");if(n!==-1&&(r=r.substring(0,n+1)),ze.isWeb()){const a=r.split("/");a.length>2&&(a.pop(),a.pop(),Rg.includes(a[a.length-1])&&a.pop(),r=a.join("/"),r.endsWith("/")||(r+="/"))}}const o=t?`${i}://${e}:${t}`:`${i}://${e}`;return this._socket=(window.io||window.iob).connect(o,{path:r.endsWith("/")?`${r}socket.io`:`${r}/socket.io`,query:"ws=true",name:this.props.name,timeout:this.props.ioTimeout,uuid:this.props.uuid,token:this.props.token}),this._socket.on("connect",n=>{window.addEventListener("storage",this.onAccessTokenUpdated);const a=ze.readTokens();if(a&&!a.owner){const c=Date.now();this.saveTokens({access_token:a.access_token,refresh_token:a.refresh_token,expires_in:Math.round((a.expires_in.getTime()-c)/1e3),refresh_token_expires_in:Math.round((a.refresh_token_expires_in.getTime()-c)/1e3),token_type:"Bearer"},a.stayLoggedIn)}this.onReadyDone=!1,n!==!0?(this.connected=!0,setTimeout(()=>this.getVersion().then(c=>{const[l,N,u]=c.version.split(".");parseInt(l,10)*1e4+parseInt(N,10)*100+parseInt(u,10)<40102?(this._authTimer=null,this.onPreConnect(!1,!1)):this._socket.emit("authenticate",(g,y)=>this.onPreConnect(g,y))}).catch(c=>this.onError({message:c.toString(),operation:"getVersion"})),500)):this._socket.emit("authenticate",(c,l)=>{this.onPreConnect(c,l)})}),this._socket.on("reconnect",()=>{var n,a;this.onReadyDone=!1,(a=(n=this.props).onProgress)==null||a.call(n,rt.READY),this.connected=!0,this.waitForRestart?window.location.reload():(this._subscribe(!0),this.onConnectionHandlers.forEach(c=>c(!0)))}),this._socket.on("disconnect",()=>{var n,a;this.onReadyDone=!1,this.connected=!1,this.subscribed=!1,(a=(n=this.props).onProgress)==null||a.call(n,rt.CONNECTING),this.onConnectionHandlers.forEach(c=>c(!1))}),this._socket.on("reauthenticate",()=>this.authenticate()),this._socket.on("log",n=>{var a,c;(c=(a=this.props).onLog)==null||c.call(a,n),this.onLogHandlers.forEach(l=>l(n))}),this._socket.on("error",n=>{let a;n==null?a="":typeof n.toString=="function"?a=n.toString():(a=JSON.stringify(n),console.error(`Received strange error: ${a}`)),a.includes("User not authorized")?this.authenticate():a.includes("websocket error")?(console.error(`Socket Error => reload: ${n}`),window.location.reload()):console.error(`Socket Error: ${n}`)}),this._socket.on("connect_error",n=>console.error(`Connect error: ${n}`)),this._socket.on("permissionError",n=>this.onError({message:"no permission",operation:n.operation,type:n.type,id:n.id||""})),this._socket.on("objectChange",(n,a)=>{setTimeout(()=>this.objectChange(n,a),0)}),this._socket.on("stateChange",(n,a)=>{setTimeout(()=>this.stateChange(n,a),0)}),this._socket.on("im",(n,a,c)=>{setTimeout(()=>this.instanceMessage(n,a,c),0)}),this._socket.on("fileChange",(n,a,c)=>{setTimeout(()=>this.fileChange(n,a,c),0)}),this._socket.on("cmdStdout",(n,a)=>{var c;(c=this.onCmdStdoutHandler)==null||c.call(this,n,a)}),this._socket.on("cmdStderr",(n,a)=>{var c;(c=this.onCmdStderrHandler)==null||c.call(this,n,a)}),this._socket.on("cmdExit",(n,a)=>{var c;(c=this.onCmdExitHandler)==null||c.call(this,n,a)}),Promise.resolve()}onPreConnect(e,t){var i,r;this._authTimer&&(clearTimeout(this._authTimer),this._authTimer=null),this.connected=!0,this.isSecure=t,this.waitForRestart?window.location.reload():(this.firstConnect?this.loadData().catch(o=>console.error(`Cannot load data: ${o}`)):(r=(i=this.props).onProgress)==null||r.call(i,rt.READY),this._subscribe(!0),this.onConnectionHandlers.forEach(o=>o(!0)),this.checkAccessTokenExpire()),this._waitForFirstConnectionPromise.resolve()}static readTokens(){let e=window.sessionStorage.getItem("iob_tokens");const t=!e;if(e||(e=window.localStorage.getItem("iob_tokens")),!e)return null;const[i,r,o,n,a]=e.split(";"),c=new Date(r);return c.getTime()<Date.now()?null:{refresh_token:i,refresh_token_expires_in:c,access_token:o,expires_in:new Date(n),owner:a,stayLoggedIn:t}}static saveTokensStatic(e,t,i){const r=`${e.refresh_token};${new Date(Date.now()+e.refresh_token_expires_in*1e3).toISOString()};${e.access_token};${new Date(Date.now()+e.expires_in*1e3).toISOString()}${i?`;${i}`:""}`;t?window.localStorage.setItem("iob_tokens",r):window.sessionStorage.setItem("iob_tokens",r)}saveTokens(e,t){ze.saveTokensStatic(e,t,this.connId)}static deleteTokensStatic(){window.localStorage.removeItem("iob_tokens"),window.sessionStorage.removeItem("iob_tokens")}deleteTokens(e,t){const i=ze.readTokens();i&&(t?ze.deleteTokensStatic():i.stayLoggedIn===e&&i.owner===this.connId&&(i.stayLoggedIn?window.localStorage.removeItem("iob_tokens"):window.sessionStorage.removeItem("iob_tokens")))}onAccessTokenUpdated=e=>{if(e.key==="iob_tokens"){const t=ze.readTokens();t&&(console.log(`Tab ${this.connId} received updated token: ${t.access_token}`),this.updateTokenExpiration(t.access_token))}};updateTokenExpiration(e){this.lastAccessToken!==e&&(this.lastAccessToken=e,this._socket.emit("updateTokenExpiration",e,(t,i)=>{t?(console.error(`[UPDATE/${new Date().toISOString()}] cannot say to server about new token: ${t}`),window.location.reload()):i?console.log(`[UPDATE/${new Date().toISOString()}] server accepted new token: ${e}`):(console.error(`[UPDATE/${new Date().toISOString()}] cannot say to server about new token`),window.location.reload())})),this.checkAccessTokenExpire()}refreshTokens(e,t){if(!e){console.log(`[REFRESH/${new Date().toISOString()}] No token structure found => reloading the page`),setTimeout(()=>window.location.reload(),500);return}t||!e.owner||e.owner===this.connId?(console.log(`[REFRESH/${new Date().toISOString()}] claim ownership of the token`),this.acquireTokenLock()?(console.log(`[REFRESH/${new Date().toISOString()}] refreshing token`),fetch("./oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`grant_type=refresh_token&refresh_token=${e.refresh_token}&client_id=ioBroker&stayloggedin=${e.stayLoggedIn}`}).then(i=>{if(i.ok)return i.json();throw new Error("Cannot refresh access token")}).then(i=>{if(i.access_token)console.log(`[REFRESH/${new Date().toISOString()}] received new token: ${i.access_token}`),this.saveTokens(i,e.stayLoggedIn),this.releaseTokenLock(),this.updateTokenExpiration(i.access_token);else throw new Error("Cannot get access token")}).catch(i=>{console.warn(`[REFRESH/${new Date().toISOString()}] cannot refresh token: ${i}`),this.releaseTokenLock(),this.deleteTokens(e.stayLoggedIn),console.error(i),window.location.reload()})):(console.log(`[REFRESH/${new Date().toISOString()}] Someone else is updating the token, so wait for the next check`),this.checkAccessTokenExpire())):this.lastAccessToken!==e.access_token&&this.updateTokenExpiration(e.access_token)}acquireTokenLock(){const e=Date.now(),t=localStorage.getItem("iob_token_semaphore");if(t)try{const r=JSON.parse(t);if(e<r.expiry)return!1}catch{}const i={connId:this.connId,expiry:e+10*1e3};return localStorage.setItem("iob_token_semaphore",JSON.stringify(i)),!0}releaseTokenLock(){const e=localStorage.getItem("iob_token_semaphore");if(e)try{JSON.parse(e).connId===this.connId&&localStorage.removeItem("iob_token_semaphore")}catch{localStorage.removeItem("iob_token_semaphore")}}checkAccessTokenExpire(){if(this._refreshTimer&&(clearTimeout(this._refreshTimer),this._refreshTimer=null),this.isSecure){const e=ze.readTokens();if(e){const t=e.expires_in.getTime();if(t<Date.now()+3e4){const i=t<Date.now()+5500;console.log(`[TOKEN/${new Date().toISOString()}] Updating refresh token ${e.access_token}`),e.refresh_token?e.owner===this.connId||i?(e.owner===this.connId?console.log(`[TOKEN/${new Date().toISOString()}] We are the owner of the token`):console.log(`[TOKEN/${new Date().toISOString()}] We are not the owner of the token, but we will take ownership`),this.props.tokenTimeoutHandler?(console.log(`[TOKEN/${new Date().toISOString()}] Asking GUI if we should prolong the token`),this.props.tokenTimeoutHandler(t).then(r=>{r?(console.log(`[TOKEN/${new Date().toISOString()}] Token will be prolonged`),this.refreshTokens(e,i)):(console.log(`[TOKEN/${new Date().toISOString()}] Token will not be prolonged. Reloading the page`),setTimeout(()=>window.location.reload(),Date.now()>t?500:t-Date.now()))})):(console.log(`[TOKEN/${new Date().toISOString()}] No tokenTimeoutHandler defined. Prolonging the token`),this.refreshTokens(e,i))):this.lastAccessToken!==e.access_token?(console.log(`[TOKEN/${new Date().toISOString()}] We are not the owner of the token, but we will inform the server about new token`),this.refreshTokens(e)):(console.log(`[TOKEN/${new Date().toISOString()}] We are not the owner of the token and the token did not change. Check in 3 seconds if the owner updated the token`),this._refreshTimer=setTimeout(()=>{this._refreshTimer=null,this.checkAccessTokenExpire()},3e3)):(console.log(`[TOKEN/${new Date().toISOString()}] We do not have a refresh token, so we need to reauthenticate`),setTimeout(()=>window.location.reload(),Date.now()>t?500:t-Date.now()))}else this._refreshTimer=setTimeout(()=>{this._refreshTimer=null,this.checkAccessTokenExpire()},t-Date.now()-3e4>12e4?12e4:t-Date.now()-3e4)}}}static isCloud(){return window.location.hostname.includes("amazonaws.com")||window.location.hostname.includes("iobroker.in")?!0:typeof window.socketUrl>"u"?!1:window.socketUrl.includes("iobroker.in")||window.socketUrl.includes("amazonaws")}isConnected(){return this.connected}waitForFirstConnection(){return this._waitForFirstConnectionPromise}async getUserPermissions(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getUserPermissions",(i,r)=>{i?t(i):e(r||null)})}})}async loadData(){if(this.loaded)return;const e=10;for(let t=1;t<=e;t++){if(this.doLoadData().catch(i=>console.error(`Cannot load data: ${i}`)),this.loaded)return;await GM(ze.isCloud()?5e3:1e3)}}async doLoadData(){var e,t,i,r,o,n,a,c,l;if(!this.loaded){if(!this.props.doNotLoadACL)try{this.acl=await this.getUserPermissions()}catch(N){this.onError(`Cannot read user permissions: ${N}`);return}try{this.props.admin5only&&!ze.isWeb()&&(!window.vendorPrefix||window.vendorPrefix==="@@vendorPrefix@@")?this._systemConfig=await this.getCompactSystemConfig():this._systemConfig=await this.getSystemConfig()}catch(N){this.onError(`Cannot read system config: ${N}`);return}this._systemConfig&&(this.systemLang=(e=this._systemConfig.common)==null?void 0:e.language,this.systemLang||(this.systemLang=window.navigator.userLanguage||window.navigator.language,/^(en|de|ru|pt|nl|fr|it|es|pl|uk)-?/.test(this.systemLang)?this.systemLang=this.systemLang.substring(0,2):/^(en|de|ru|pt|nl|fr|it|es|pl|uk|zh-cn)$/.test(this.systemLang)||(this.systemLang="en"),this._systemConfig.common.language=this.systemLang)),(i=(t=this.props).onLanguage)==null||i.call(t,this.systemLang),this.loaded=!0,(o=(r=this.props).onProgress)==null||o.call(r,rt.CONNECTED),this.firstConnect=!1,this.props.doNotLoadAllObjects?this.props.admin5only?this.objects={}:this.objects={"system.config":this._systemConfig}:this.objects=await this.getObjects(),(a=(n=this.props).onProgress)==null||a.call(n,rt.READY),this.onReadyDone||(this.onReadyDone=!0,(l=(c=this.props).onReady)==null||l.call(c,this.objects))}}authenticate(){window.location.search.includes("&href=")?window.location.href=`${window.location.protocol}//${window.location.host}${window.location.pathname}${window.location.search}`:window.location.href=`${window.location.protocol}//${window.location.host}${window.location.pathname}?login&href=${encodeURIComponent(window.location.search+window.location.hash)}`}async subscribeState(...e){let t,i,r;e.length===3?[t,i,r]=e:([t,r]=e,i=!1);let o;if(Array.isArray(t)?o=t:o=[t],typeof r!="function")throw new Error("The state change handler must be a function!");const n=[];for(let a=0;a<o.length;a++){const c=o[a];this.statesSubscribes[c]?!this.statesSubscribes[c].cbs.includes(r)&&this.statesSubscribes[c].cbs.push(r):(this.statesSubscribes[c]={reg:new RegExp(or(c)),cbs:[r]},t!==this.ignoreState&&n.push(c))}if(this.connected)if(n.length&&this._socket.emit("subscribe",n),i){let a;for(let c=0;c<o.length;c++){try{a=await this.getBinaryState(o[c])}catch(l){console.error(`Cannot getBinaryState "${o[c]}": ${JSON.stringify(l)}`),a=void 0}a!=null&&r(o[c],a)}}else if(o.find(a=>a.includes("*"))){let a;for(let c=0;c<o.length;c++){try{a=await this.getForeignStates(o[c])}catch(l){console.error(`Cannot getForeignStates "${o[c]}": ${JSON.stringify(l)}`);return}if(a)for(const[l,N]of Object.entries(a)){const u=r(l,N);u instanceof Promise&&u.catch(L=>console.error(`Cannot call state change handler: ${L}`))}}}else try{const a=await(ze.isWeb()?this.getStates(o):this.getForeignStates(o));if(a)for(const[c,l]of Object.entries(a)){const N=r(c,l);N instanceof Promise&&N.catch(u=>console.error(`Cannot call state change handler: ${u}`))}}catch(a){console.error(`Cannot getState "${o.join(", ")}": ${a.message}`);return}}async subscribeStateAsync(e,t){return this.subscribeState(e,t)}unsubscribeState(e,t){var o;let i;Array.isArray(e)?i=e:i=[e];const r=[];for(let n=0;n<i.length;n++){const a=i[n];if(this.statesSubscribes[a]){const c=this.statesSubscribes[a];if(t){const l=c.cbs.indexOf(t);l!==-1&&c.cbs.splice(l,1)}else c.cbs=[];(o=c.cbs)!=null&&o.length||(delete this.statesSubscribes[a],a!==this.ignoreState&&r.push(a))}}this.connected&&r.length&&this._socket.emit("unsubscribe",i)}subscribeObject(e,t){let i;if(Array.isArray(e)?i=e:i=[e],typeof t!="function")throw new Error("The object change handler must be a function!");const r=[];for(let o=0;o<i.length;o++){const n=i[o];this.objectsSubscribes[n]?!this.objectsSubscribes[n].cbs.includes(t)&&this.objectsSubscribes[n].cbs.push(t):(this.objectsSubscribes[n]={reg:new RegExp(or(n)),cbs:[t]},r.push(n))}return this.connected&&r.length&&this._socket.emit("subscribeObjects",r),Promise.resolve()}unsubscribeObject(e,t){var o;let i;Array.isArray(e)?i=e:i=[e];const r=[];for(let n=0;n<i.length;n++){const a=i[n];if(this.objectsSubscribes[a]){const c=this.objectsSubscribes[a];if(t){const l=c.cbs.indexOf(t);l!==-1&&c.cbs.splice(l,1)}else c.cbs=[];(o=c.cbs)!=null&&o.length||(delete this.objectsSubscribes[a],r.push(a))}}return this.connected&&r.length&&this._socket.emit("unsubscribeObjects",r),Promise.resolve()}objectChange(e,t){var o,n;let i;this.objects[e]&&(i={_id:e,type:this.objects[e].type});let r=!1;t?(t._rev&&this.objects[e]&&(this.objects[e]._rev=t._rev),(!this.objects[e]||JSON.stringify(this.objects[e])!==JSON.stringify(t))&&(this.objects[e]=t,r=!0)):this.objects[e]&&(delete this.objects[e],r=!0);for(const[a,c]of Object.entries(this.objectsSubscribes))(a===e||c.reg.test(e))&&c.cbs.forEach(l=>{try{const N=l(e,t,i);N instanceof Promise&&N.catch(u=>console.error(`Cannot call object change handler: ${u}`))}catch(N){console.error(`Error by callback of objectChange: ${N}`)}});if(r){const a=(n=(o=this.props).onObjectChange)==null?void 0:n.call(o,e,t);a instanceof Promise&&a.catch(c=>console.error(`Cannot call object change handler: ${c}`))}}stateChange(e,t){for(const i of Object.values(this.statesSubscribes))if(i.reg.test(e))for(const r of i.cbs)try{const o=r(e,t??null);o instanceof Promise&&o.catch(n=>console.error(`Cannot call state change handler: ${n}`))}catch(o){console.error(`Error by callback of stateChanged: ${o}`)}}instanceMessage(e,t,i){var r;(r=this._instanceSubscriptions[t])==null||r.forEach(o=>{if(o.messageType===e){const n=o.callback(i,t,e);n instanceof Promise&&n.catch(a=>console.error(`Cannot call instance message handler: ${a}`))}})}fileChange(e,t,i){for(const r of Object.values(this.filesSubscribes))if(r.regId.test(e)&&r.regFilePattern.test(t))for(const o of r.cbs)try{o(e,t,i)}catch(n){console.error(`Error by callback of fileChange: ${n}`)}}async subscribeFiles(e,t,i){if(typeof i!="function")throw new Error("The state change handler must be a function!");let r;Array.isArray(t)?r=t:r=[t];const o=[];for(let n=0;n<r.length;n++){const a=r[n],c=`${e}$%$${a}`;this.filesSubscribes[c]?!this.filesSubscribes[c].cbs.includes(i)&&this.filesSubscribes[c].cbs.push(i):(this.filesSubscribes[c]={regId:new RegExp(or(e)),regFilePattern:new RegExp(or(a)),cbs:[i]},o.push(a))}return this.connected&&o.length&&this._socket.emit("subscribeFiles",e,o),Promise.resolve()}unsubscribeFiles(e,t,i){var n;let r;Array.isArray(t)?r=t:r=[t];const o=[];for(let a=0;a<r.length;a++){const c=r[a],l=`${e}$%$${c}`;if(this.filesSubscribes[l]){const N=this.filesSubscribes[l];if(i){const u=N.cbs.indexOf(i);u!==-1&&N.cbs.splice(u,1)}else N.cbs=[];(n=N.cbs)!=null&&n.length||(delete this.filesSubscribes[l],o.push(c))}}this.connected&&o.length&&this._socket.emit("unsubscribeFiles",e,o)}async request({cacheKey:e,forceUpdate:t,commandTimeout:i,onTimeout:r,requireAdmin:o,requireFeatures:n,executor:a}){if(o&&ze.isWeb())return Promise.reject(new Error(Ie.NOT_ADMIN));if(e&&!t&&e in this._promises)return this._promises[e];if(!this.connected)return Promise.reject(new Error(Ie.NOT_CONNECTED));if(n!=null&&n.length){for(const l of n)if(!await this.checkFeatureSupported(l))throw new Error(Ie.NOT_SUPPORTED)}const c=new Promise(async(l,N)=>{const u={elapsed:!1,clearTimeout:()=>{}};let L;i!==!1&&(L=setTimeout(()=>{u.elapsed=!0,r==null||r(),e&&this._promises[e]instanceof Promise&&delete this._promises[e],N(new Error(Ie.TIMEOUT))},i??this.props.cmdTimeout),u.clearTimeout=()=>{clearTimeout(L)});try{await a(l,N,u)}catch(g){e&&this._promises[e]instanceof Promise&&delete this._promises[e],N(new Error(g.toString()))}});return e&&(this._promises[e]=c),c}resetCache(e,t){t?Object.keys(this._promises).filter(i=>i.startsWith(e)).forEach(i=>{delete this._promises[i]}):delete this._promises[e]}getStates(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getStates",e,(r,o)=>{this.states=o??{},r?i(r):t(this.states)})}})}getState(e){return this.request({commandTimeout:!1,executor:(t,i)=>{if(e&&e===this.ignoreState){t(this.simStates[e]||{val:null,ack:!0});return}this._socket.emit("getState",e,(r,o)=>{r?i(r):t(o)})}})}getBinaryState(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getBinaryState",e,(r,o)=>{r?i(r):t(o)})}})}setBinaryState(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("setBinaryState",e,t,o=>{o?r(o):i()})}})}setState(e,t,i){return typeof i=="boolean"&&(t={val:t,ack:i}),this.request({commandTimeout:!1,executor:(r,o)=>{if(e&&e===this.ignoreState){let n;if(typeof i=="boolean"||typeof t=="object"&&t.val!==void 0?n=t:n={val:t,ack:!1,ts:Date.now(),lc:Date.now(),from:"system.adapter.vis.0"},this.simStates[e]=n,this.statesSubscribes[e])for(const a of this.statesSubscribes[e].cbs)try{const c=a(e,n);c instanceof Promise&&c.catch(l=>console.error(`Cannot call state change handler: ${l}`))}catch(c){console.error(`Error by callback of stateChanged: ${c}`)}r();return}this._socket.emit("setState",e,t,n=>{n?o(n):r()})}})}getObjects(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{if(!e&&this.objects){i(this.objects);return}this._socket.emit(ze.isWeb()?"getObjects":"getAllObjects",(o,n)=>{var a,c;t||(c=(a=this.props).onProgress)==null||c.call(a,rt.OBJECTS_LOADED),o?r(o):(this.objects=n??{},i(this.objects))})}})}getObjectsById(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getObjects",e,(r,o)=>{r?i(r):t(o)})}})}_subscribe(e){var t,i;if(e&&!this.subscribed){this.subscribed=!0,(t=this.props.autoSubscribes)!=null&&t.length&&this._socket.emit("subscribeObjects",this.props.autoSubscribes);const r=Object.keys(this.objectsSubscribes);r.length&&this._socket.emit("subscribeObjects",r),Object.keys(this.objectsSubscribes).forEach(o=>this._socket.emit("subscribeObjects",o)),this.props.autoSubscribeLog&&this._socket.emit("requireLog",!0),Object.keys(this.statesSubscribes).forEach(o=>this._socket.emit("subscribe",o)),Object.keys(this.filesSubscribes).forEach(o=>{const[n,a]=o.split("$%$");this._socket.emit("subscribeFiles",n,a)})}else if(!e&&this.subscribed){this.subscribed=!1,(i=this.props.autoSubscribes)!=null&&i.length&&this._socket.emit("unsubscribeObjects",this.props.autoSubscribes);const r=Object.keys(this.objectsSubscribes);r.length&&this._socket.emit("unsubscribeObjects",r),this.props.autoSubscribeLog&&this._socket.emit("requireLog",!1),Object.keys(this.statesSubscribes).forEach(o=>this._socket.emit("unsubscribe",o)),Object.keys(this.filesSubscribes).forEach(o=>{const[n,a]=o.split("$%$");this._socket.emit("unsubscribeFiles",n,a)})}}requireLog(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("requireLog",e,r=>{r?i(r):t()})}})}delObject(e,t=!1){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("delObject",e,{maintenance:t},o=>{o?r(o):i()})}})}delObjects(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("delObjects",e,{maintenance:t},o=>{o?r(o):i()})}})}setObject(e,t){return t?(t=JSON.parse(JSON.stringify(t)),delete t.from,delete t.user,delete t.ts,this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("setObject",e,t,o=>{o?r(o):i()})}})):Promise.reject(new Error("Null object is not allowed"))}getObject(e){return this.request({commandTimeout:!1,executor:(t,i)=>{if(e&&e===this.ignoreState){t({_id:this.ignoreState,type:"state",common:{name:"ignored state",type:"mixed"}});return}this._socket.emit("getObject",e,(r,o)=>{r?i(r):t(o)})}})}sendTo(e,t,i){return this.request({commandTimeout:!1,executor:r=>{this._socket.emit("sendTo",e,t,i,o=>{r(o)})}})}extendObject(e,t){return t?(t=JSON.parse(JSON.stringify(t)),delete t.from,delete t.user,delete t.ts,this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("extendObject",e,t,o=>{o?r(o):i()})}})):Promise.reject(new Error("Null object is not allowed"))}registerLogHandler(e){this.onLogHandlers.includes(e)||this.onLogHandlers.push(e)}unregisterLogHandler(e){const t=this.onLogHandlers.indexOf(e);t!==-1&&this.onLogHandlers.splice(t,1)}registerConnectionHandler(e){this.onConnectionHandlers.includes(e)||this.onConnectionHandlers.push(e)}unregisterConnectionHandler(e){const t=this.onConnectionHandlers.indexOf(e);t!==-1&&this.onConnectionHandlers.splice(t,1)}registerCmdStdoutHandler(e){this.onCmdStdoutHandler=e}unregisterCmdStdoutHandler(){this.onCmdStdoutHandler=void 0}registerCmdStderrHandler(e){this.onCmdStderrHandler=e}unregisterCmdStderrHandler(){this.onCmdStderrHandler=void 0}registerCmdExitHandler(e){this.onCmdExitHandler=e}unregisterCmdExitHandler(){this.onCmdExitHandler=void 0}getEnums(e,t){return this.request({cacheKey:`enums_${e||"all"}`,forceUpdate:t,commandTimeout:!1,executor:(i,r)=>{this._socket.emit("getObjectView","system","enum",{startkey:`enum.${e||""}`,endkey:e?`enum.${e}.香`:"enum.香"},(o,n)=>{if(o)r(o);else{const a={};if(n)for(let c=0;c<n.rows.length;c++)e&&n.rows[c].id===`enum.${e}`||(a[n.rows[c].id]=n.rows[c].value);i(a)}})}})}getObjectView(e,t,i){return this.getObjectViewCustom("system",i,e,t)}getObjectViewSystem(e,t,i){return this.getObjectViewCustom("system",e,t,i)}getObjectViewCustom(e,t,i,r){return this.request({commandTimeout:!1,executor:(o,n)=>{i=i||"",r=r||"香",this._socket.emit("getObjectView",e,t,{startkey:i,endkey:r},(a,c)=>{if(a)n(a);else{const l={};if(c&&c.rows)for(let N=0;N<c.rows.length;N++)l[c.rows[N].id]=c.rows[N].value;o(l)}})}})}readMetaItems(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getObjectView","system","meta",{startkey:"",endkey:"香"},(i,r)=>{var o;i?t(i):e((o=r.rows)==null?void 0:o.map(n=>n.value).filter(n=>!!n))})}})}readDir(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("readDir",e,t,(o,n)=>{o?r(o):i(n)})}})}readFile(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit(i?"readFile64":"readFile",e,t,(n,a,c)=>{n?o(n):r({file:a,mimeType:c})})}})}writeFile64(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{if(typeof i=="string")this._socket.emit("writeFile",e,t,i,n=>{n?o(n):r()});else{const n=btoa(new Uint8Array(i).reduce((a,c)=>a+String.fromCharCode(c),""));this._socket.emit("writeFile64",e,t,n,a=>{a?o(a):r()})}}})}deleteFile(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("deleteFile",e,t,o=>{o?r(o):i()})}})}deleteFolder(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("deleteFolder",e,t,o=>{o?r(o):i()})}})}rename(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("rename",e,t,i,n=>{n?o(n):r()})}})}renameFile(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("renameFile",e,t,i,n=>{n?o(n):r()})}})}cmdExec(e,t,i,r){return this.request({commandTimeout:r,executor:(o,n,a)=>{e=Tt(e),this._socket.emit("cmdExec",e,i,t,c=>{a.elapsed||(a.clearTimeout(),c?n(c):o())})}})}getSystemConfig(e){return this.request({cacheKey:"systemConfig",forceUpdate:e,commandTimeout:!1,executor:async t=>{let i=await this.getObject("system.config");i??={},i.common??={},i.native??={},t(i)}})}getCompactSystemConfig(e){return this.request({cacheKey:"systemConfigCommon",forceUpdate:e,commandTimeout:!1,requireAdmin:!0,executor:(t,i)=>{this._socket.emit("getCompactSystemConfig",(r,o)=>{r?i(r):(o??={},o.common??={},o.native??={},t(o))})}})}getForeignStates(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getForeignStates",e||"*",(r,o)=>{r?i(r):t(o??{})})}})}getForeignObjects(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("getForeignObjects",e||"*",t,(o,n)=>{o?r(o):i(n)})}})}setSystemConfig(e){return this.setObject("system.config",e)}getRawSocket(){return this._socket}getHistory(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("getHistory",e,t,(o,n)=>{o?r(o):i(n)})}})}getHistoryEx(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("getHistory",e,t,(o,n,a,c)=>{o?r(o):i({values:n,sessionId:c,step:a})})}})}getIpAddresses(e,t){return e=Tt(e),this.request({cacheKey:`IPs_${e}`,forceUpdate:t,commandTimeout:!1,executor:async i=>{const r=await this.getObject(e);i((r==null?void 0:r.common.address)??[])}})}getVersion(e){return this.request({cacheKey:"version",forceUpdate:e,commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getVersion",(r,o,n)=>{r&&!o&&typeof r=="string"&&r.match(/\d+\.\d+\.\d+/)?t({version:r,serverName:"socketio"}):r?i(r):t({version:o,serverName:n})})}})}getWebServerName(){return this.request({cacheKey:"webName",commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getAdapterName",(i,r)=>{i?t(i):e(r)})}})}fileExists(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("fileExists",e,t,(o,n)=>{o?r(o):i(!!n)})}})}getCurrentUser(){return this.request({commandTimeout:!1,executor:e=>{this._socket.emit("authEnabled",(t,i)=>{e(i)})}})}getUuid(){return this.request({cacheKey:"uuid",commandTimeout:!1,executor:async e=>{var i;const t=await this.getObject("system.meta.uuid");e((i=t==null?void 0:t.native)==null?void 0:i.uuid)}})}checkFeatureSupported(e,t){return this.request({cacheKey:`supportedFeatures_${e}`,forceUpdate:t,commandTimeout:!1,executor:(i,r)=>{this._socket.emit("checkFeatureSupported",e,(o,n)=>{o?r(o):i(n)})}})}getAdapterInstances(e,t){return typeof e=="boolean"&&(t=e,e=""),e=e||"",this.request({cacheKey:`instances_${e}`,forceUpdate:t,commandTimeout:!1,executor:async i=>{const r=e?`system.adapter.${e}.`:"system.adapter.",o=`${r}香`,n=await this.getObjectViewSystem("instance",r,o),a=Object.values(n);i(e?a.filter(c=>c.common.name===e):a)}})}getAdapters(e,t){return typeof e=="boolean"&&(t=e,e=""),e=e||"",this.request({cacheKey:`adapter_${e}`,forceUpdate:t,commandTimeout:!1,executor:async i=>{const r=await this.getObjectViewSystem("adapter",`system.adapter.${e||""}`,`system.adapter.${e||"香"}`),o=Object.values(r);i(e?o.filter(n=>n.common.name===e):o)}})}getGroups(e){return this.request({cacheKey:"groups",forceUpdate:e,commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getObjectView","system","group",{startkey:"system.group.",endkey:"system.group.香"},(r,o)=>{r?i(r):t(Nn(o))})}})}logout(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("logout",i=>{i?t(i):e(null)})}})}subscribeOnInstance(e,t,i,r){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit("clientSubscribe",e,t,i,(a,c)=>{a?n(a):c&&(c.error?n(c.error):(e.startsWith("system.adapter.")||(e=`system.adapter.${e}`),this._instanceSubscriptions[e]=this._instanceSubscriptions[e]||[],this._instanceSubscriptions[e].find(l=>l.messageType===t&&l.callback===r)||this._instanceSubscriptions[e].push({messageType:t,callback:r}),o(c)))})}})}unsubscribeFromInstance(e,t,i){var n;e.startsWith("system.adapter.")||(e=`system.adapter.${e}`);let r;const o=[];do{r=!1;const a=(n=this._instanceSubscriptions[e])==null?void 0:n.findIndex(c=>(!t||c.messageType===t)&&(!i||c.callback===i));if(a!=null&&a!==-1){r=!0;const c=this._instanceSubscriptions[e][a].messageType;this._instanceSubscriptions[e].splice(a,1),this._instanceSubscriptions[e].length||delete this._instanceSubscriptions[e],this._instanceSubscriptions[e]&&this._instanceSubscriptions[e].find(N=>N.messageType===c)||o.push(this.request({commandTimeout:!1,executor:(N,u)=>{this._socket.emit("clientUnsubscribe",e,t,(L,g)=>L?u(L):N(g))}}))}}while(r&&(!i||!t));return o.length?Promise.all(o).then(a=>!!a.find(c=>c)):Promise.resolve(!1)}log(e,t){return e?this.request({commandTimeout:!1,executor:i=>(this._socket.emit("log",e,t),i(null))}):Promise.resolve(null)}setStateToIgnore(e){this.ignoreState=e}}function Fg(s,e){if(!e)return;let t;if(e.length<700&&(e.indexOf("/")!==-1||e.indexOf("\\")!==-1))if(s.toLowerCase().includes("private"))t="private";else if(e.toLowerCase().includes("private"))t="private";else if(s.toLowerCase().includes("public"))t="public";else if(e.toLowerCase().includes("public"))t="public";else if(s.toLowerCase().includes("chain"))t="chained";else if(e.toLowerCase().includes("chain"))t="chained";else return;else t=e.substring(0,26)==="-----BEGIN RSA PRIVATE KEY"||e.substring(0,22)==="-----BEGIN PRIVATE KEY"?"private":"public",t==="public"&&e.split("-----END CERTIFICATE-----").filter(r=>r.replace(/\r\n|\r|\n/,"").trim()).length>1&&(t="chained");return{name:s,type:t}}function Gg(s){var i,r,o,n;const e=[{name:"[IPv4] 0.0.0.0 - Listen on all IPs",address:"0.0.0.0",family:"ipv4"}],t=[{name:"[IPv6] :: - Listen on all IPs",address:"::",family:"ipv6"}];if((r=(i=s.native)==null?void 0:i.hardware)!=null&&r.networkInterfaces){const a=(n=(o=s.native)==null?void 0:o.hardware)==null?void 0:n.networkInterfaces;Object.keys(a).forEach(c=>{a[c].forEach(l=>{l.family!=="IPv6"?e.push({name:`[${l.family}] ${l.address} - ${c}`,address:l.address,family:"ipv4"}):t.push({name:`[${l.family}] ${l.address} - ${c}`,address:l.address,family:"ipv6"})})})}return{IPs4:e,IPs6:t}}class s5e extends ze{constructor(e){super(e)}request(e){return super.request({requireAdmin:!0,...e})}getCertificates(e){return this.request({cacheKey:"cert",forceUpdate:e,commandTimeout:!1,executor:async t=>{var r;const i=await this.getObject("system.certificates");(r=i==null?void 0:i.native)!=null&&r.certificates?t(Object.entries(i.native.certificates).map(([o,n])=>Fg(o,n)).filter(o=>!!o)):t([])}})}getLogs(e,t=200){return this.request({commandTimeout:!1,executor:i=>{this._socket.emit("sendToHost",e,"getLogs",t||200,r=>{i(r)})}})}upgradeAdapterWithWebserver(e,t){return this.request({commandTimeout:!1,executor:i=>{this._socket.emit("sendToHost",e,"upgradeAdapterWithWebserver",t,r=>{i(r)})}})}upgradeController(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("sendToHost",e,"upgradeController",{version:t,adminInstance:i},n=>{const a=n;a.error?o(a.error):r(a.result)})}})}updateLicenses(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("updateLicenses",e,t,(o,n)=>{o?r(o):i(n)})}})}upgradeOsPackages(e,t,i){return this.request({commandTimeout:!1,executor:r=>{this._socket.emit("sendToHost",e,"upgradeOsPackages",{packages:t,restart:!!i},o=>{r(o)})}})}getLogsFiles(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("readLogs",e,(r,o)=>{r&&i(r),t(o)})}})}delLogs(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("sendToHost",e,"delLogs",null,r=>{r&&i(r),t()})}})}deleteFile(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("deleteFile",e,t,o=>{o&&r(o),i()})}})}deleteFolder(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("deleteFolder",e,t,o=>{o&&r(o),i()})}})}rename(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("rename",e,t,i,n=>{n&&o(n),r()})}})}renameFile(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("renameFile",e,t,i,n=>{n&&o(n),r()})}})}getHosts(e){return this.request({cacheKey:"hosts",forceUpdate:e,commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getObjectView","system","host",{startkey:"system.host.",endkey:"system.host.香"},(r,o)=>{r?i(r):t(Nn(o))})}})}getUsers(e){return this.request({cacheKey:"users",forceUpdate:e,commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getObjectView","system","user",{startkey:"system.user.",endkey:"system.user.香"},(r,o)=>{r?i(r):t(Nn(o))})}})}renameGroup(e,t,i){return this.request({commandTimeout:!1,executor:async r=>{const o=await this.getGroups(!0),n=o.filter(c=>c._id.startsWith(`${e}.`));for(const c of n){const l=c._id,N=t+c._id.substring(e.length);c._id=N,await this.setObject(N,c),await this.delObject(l)}const a=o.find(c=>c._id===e);if(a){const c=a._id;a._id=t,i!==void 0&&(a.common??={},a.common.name=i),await this.setObject(t,a),await this.delObject(c)}r()}})}getHostInfo(e,t,i){return e=Tt(e),this.request({cacheKey:`hostInfo_${e}`,forceUpdate:t,commandTimeout:i,executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"getHostInfo",null,a=>{n.elapsed||(n.clearTimeout(),a===Ie.PERMISSION_ERROR?o('May not read "getHostInfo"'):a?r(a):o('Cannot read "getHostInfo"'))})}})}getHostInfoShort(e,t,i){return e=Tt(e),this.request({cacheKey:`hostInfoShort_${e}`,forceUpdate:t,commandTimeout:i,executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"getHostInfoShort",null,a=>{n.elapsed||(n.clearTimeout(),a===Ie.PERMISSION_ERROR?o('May not read "getHostInfoShort"'):a?r(a):o('Cannot read "getHostInfoShort"'))})}})}getRepository(e,t,i,r){return this.request({cacheKey:`repository_${e}`,forceUpdate:i,commandTimeout:r,executor:(o,n,a)=>{this._socket.emit("sendToHost",e,"getRepository",t,c=>{a.elapsed||(a.clearTimeout(),c===Ie.PERMISSION_ERROR?n('May not read "getRepository"'):c?o(c):n('Cannot read "getRepository"'))})}})}getInstalled(e,t,i){return e=Tt(e),this.request({cacheKey:`installed_${e}`,forceUpdate:t,commandTimeout:i,executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"getInstalled",null,a=>{n.elapsed||(n.clearTimeout(),a===Ie.PERMISSION_ERROR?o('May not read "getInstalled"'):a?r(a):o('Cannot read "getInstalled"'))})}})}cmdExec(e,t,i,r){return this.request({commandTimeout:r,executor:(o,n,a)=>{e=Tt(e),this._socket.emit("cmdExec",e,i,t,c=>{a.elapsed||(a.clearTimeout(),c&&n(c),o())})}})}readBaseSettings(e){return e=ci(e),this.request({requireFeatures:["CONTROLLER_READWRITE_BASE_SETTINGS"],executor:(t,i,r)=>{this._socket.emit("sendToHost",e,"readBaseSettings",null,o=>{r.elapsed||(r.clearTimeout(),o===Ie.PERMISSION_ERROR?i('May not read "BaseSettings"'):o?o.error?i(new Error(o.error)):t(o):i('Cannot read "BaseSettings"'))})}})}writeBaseSettings(e,t){return e=ci(e),this.request({requireFeatures:["CONTROLLER_READWRITE_BASE_SETTINGS"],executor:(i,r,o)=>{this._socket.emit("sendToHost",e,"writeBaseSettings",t,n=>{o.elapsed||(o.clearTimeout(),n===Ie.PERMISSION_ERROR?r('May not write "BaseSettings"'):n?i(n):r('Cannot write "BaseSettings"'))})}})}restartController(e){return e=ci(e),this.request({executor:(t,i,r)=>{this._socket.emit("sendToHost",e,"restartController",null,()=>{r.elapsed||(r.clearTimeout(),t(!0))})}})}getDiagData(e,t){return e=ci(e),this.request({executor:(i,r,o)=>{this._socket.emit("sendToHost",e,"getDiagData",t,n=>{o.elapsed||(o.clearTimeout(),i(n||null))})}})}changePassword(e,t){return this.request({executor:(i,r,o)=>{this._socket.emit("changePassword",e,t,n=>{o.elapsed||(o.clearTimeout(),n&&r(n),i())})}})}getIpAddresses(e,t){return e=Tt(e),this.request({cacheKey:`IPs_${e}`,forceUpdate:t,commandTimeout:!1,executor:async i=>{const r=await this.getObject(e);i((r==null?void 0:r.common.address)??[])}})}getHostByIp(e,t){return e=ci(e),this.request({cacheKey:`rIPs_${e}`,forceUpdate:t,executor:(i,r,o)=>{this._socket.emit("getHostByIp",e,(n,a)=>{if(o.elapsed)return;o.clearTimeout();const{IPs4:c,IPs6:l}=Gg(a);i([...c,...l])})}})}encrypt(e){return this.request({executor:(t,i,r)=>{this._socket.emit("encrypt",e,(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}decrypt(e){return this.request({executor:(t,i,r)=>{this._socket.emit("decrypt",e,(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}chmodFile(e,t,i){return this.request({executor:(r,o,n)=>{this._socket.emit("chmodFile",e,t,i,(a,c)=>{n.elapsed||(n.clearTimeout(),a&&o(a),r(c))})}})}chownFile(e,t,i){return this.request({executor:(r,o,n)=>{this._socket.emit("chownFile",e,t,i,(a,c)=>{n.elapsed||(n.clearTimeout(),a&&o(a),r(c))})}})}getNotifications(e,t){return this.request({executor:(i,r,o)=>{this._socket.emit("sendToHost",e,"getNotifications",{category:t},n=>{o.elapsed||(o.clearTimeout(),i(n))})}})}clearNotifications(e,t){return this.request({executor:(i,r,o)=>{this._socket.emit("sendToHost",e,"clearNotifications",{category:t},n=>{o.elapsed||(o.clearTimeout(),i(n))})}})}getIsEasyModeStrict(){return this.request({executor:(e,t,i)=>{this._socket.emit("getIsEasyModeStrict",(r,o)=>{i.elapsed||(i.clearTimeout(),r&&t(r),e(!!o))})}})}getEasyMode(){return this.request({executor:(e,t,i)=>{this._socket.emit("getEasyMode",(r,o)=>{i.elapsed||(i.clearTimeout(),r?t(new Error(r)):e(o))})}})}getRatings(e){return this.request({executor:(t,i,r)=>{this._socket.emit("getRatings",!!e,(o,n)=>{r.elapsed||(r.clearTimeout(),o?i(new Error(o)):t(n))})}})}getCurrentSession(e){const t=new AbortController;return this.request({commandTimeout:e||5e3,onTimeout:()=>{t.abort()},executor:async(i,r,o)=>{try{const n=await fetch("./session",{signal:t.signal});if(o.elapsed)return;o.clearTimeout();const a=await n.json();i(a)}catch(n){r(`getCurrentSession: ${n}`)}}})}getCurrentInstance(){return this.request({cacheKey:"currentInstance",executor:(e,t,i)=>{this._socket.emit("getCurrentInstance",(r,o)=>{i.elapsed||(i.clearTimeout(),r?t(r):e(o))})}})}getAdapterInstances(e,t){let i;return typeof e=="boolean"?(t=e,i=""):i=e||"",this.request({cacheKey:`instances_${i}`,forceUpdate:t,executor:(r,o,n)=>{this._socket.emit("getAdapterInstances",i,(a,c)=>{n.elapsed||(n.clearTimeout(),a&&o(a),r(c))})}})}getAdapters(e,t){let i;return typeof e=="boolean"?(t=e,i=""):i=e||"",this.request({cacheKey:`adapter_${i}`,forceUpdate:t,executor:(r,o,n)=>{this._socket.emit("getAdapters",i,(a,c)=>{n.elapsed||(n.clearTimeout(),a&&o(a),r(c))})}})}getCompactAdapters(e){return this.request({cacheKey:"compactAdapters",forceUpdate:e,executor:(t,i,r)=>{this._socket.emit("getCompactAdapters",(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}getAdaptersResetCache(e){e=e??"",this.resetCache(`adapter_${e}`),this.resetCache("compactAdapters")}getCompactInstances(e){return this.request({cacheKey:"compactInstances",forceUpdate:e,executor:(t,i,r)=>{this._socket.emit("getCompactInstances",(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}getAdapterInstancesResetCache(e){e=e??"",this.resetCache(`instances_${e}`),this.resetCache("compactInstances")}getCompactInstalled(e,t,i){return e=Tt(e),this.request({cacheKey:`installedCompact_${e}`,forceUpdate:t,commandTimeout:i,executor:(r,o,n)=>{this._socket.emit("getCompactInstalled",e,a=>{n.elapsed||(n.clearTimeout(),a===Ie.PERMISSION_ERROR?o('May not read "getCompactInstalled"'):a?r(a):o('Cannot read "getCompactInstalled"'))})}})}getInstalledResetCache(e){e?(this.resetCache(`installedCompact_${e}`),this.resetCache(`installed_${e}`)):(this.resetCache("installedCompact_",!0),this.resetCache("installed_",!0))}getCompactRepository(e,t,i){return e=Tt(e),this.request({cacheKey:`repositoryCompact_${e}`,forceUpdate:t,commandTimeout:i,executor:(r,o,n)=>{this._socket.emit("getCompactRepository",e,a=>{n.elapsed||(n.clearTimeout(),a===Ie.PERMISSION_ERROR?o('May not read "getCompactRepository"'):a?r(a):o('Cannot read "getCompactRepository"'))})}})}getRepositoryResetCache(e){e?(this.resetCache(`repositoryCompact_${e}`),this.resetCache(`repository_${e}`)):(this.resetCache("repositoryCompact_",!0),this.resetCache("repository_",!0))}getCompactHosts(e){return this.request({cacheKey:"hostsCompact",forceUpdate:e,executor:(t,i,r)=>{this._socket.emit("getCompactHosts",(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}getCompactSystemRepositories(e){return this.request({cacheKey:"repositoriesCompact",forceUpdate:e,executor:(t,i,r)=>{this._socket.emit("getCompactSystemRepositories",(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}}const H=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ie=globalThis,Zt="9.42.0";function qr(){return eo(ie),ie}function eo(s){const e=s.__SENTRY__=s.__SENTRY__||{};return e.version=e.version||Zt,e[Zt]=e[Zt]||{}}function Pi(s,e,t=ie){const i=t.__SENTRY__=t.__SENTRY__||{},r=i[Zt]=i[Zt]||{};return r[s]||(r[s]=e())}const Hg=["debug","info","warn","error","log","assert","trace"],Vg="Sentry Logger ",Yr={};function Hs(s){if(!("console"in ie))return s();const e=ie.console,t={},i=Object.keys(Yr);i.forEach(r=>{const o=Yr[r];t[r]=e[r],e[r]=o});try{return s()}finally{i.forEach(r=>{e[r]=t[r]})}}function Zg(){ja().enabled=!0}function Xg(){ja().enabled=!1}function wN(){return ja().enabled}function Kg(...s){ga("log",...s)}function qg(...s){ga("warn",...s)}function ej(...s){ga("error",...s)}function ga(s,...e){H&&wN()&&Hs(()=>{ie.console[s](`${Vg}[${s}]:`,...e)})}function ja(){return H?Pi("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const R={enable:Zg,disable:Xg,isEnabled:wN,log:Kg,warn:qg,error:ej},CN=50,Xt="?",HM=/\(error: (.*)\)/,VM=/captureMessage|captureException/;function IN(...s){const e=s.sort((t,i)=>t[0]-i[0]).map(t=>t[1]);return(t,i=0,r=0)=>{const o=[],n=t.split(`
1
+ import{c as $,j as U,o as Pe,a as vM,b as bM,d as QM,P as S}from"./createSvgIcon-C_ElRFrf.js";import{i as f,R as M}from"./iobroker_javascript__loadShare__react__loadShare__-B-pIv4x_.js";import{i as j,c as Ne,C as Oe,a as nt,L as yL,g as TL,k as Ai,j as yN,H as TN,b as dN,S as dL,T as X,U as DL,V as hL,W as zL,X as wL,Y as UM,Z as CL,$ as IL,a0 as pL,a1 as AL,a2 as mL,a3 as $M,a4 as OL,a5 as EL,a6 as fL,a7 as xL,a8 as _L,a9 as SL,aa as kL,ab as YL,ac as vL,ad as bL,ae as QL,af as UL,ag as PM,ah as WM,ai as $L,aj as BM,t as PL,ak as WL,al as BL,am as JL,an as JM,ao as RL,ap as FL,aq as GL,N as HL,h as cn,I as $i}from"./index-DeFm7TiX.js";import{I as un}from"./Save--0ldNXLf.js";import{c as ir,g as VL}from"./_commonjsHelpers-Cpj98o6Y.js";import{u as ZL}from"./useTheme-CpAj0H76.js";import{t as B}from"./index-BompUVvy.js";import"./iobroker_javascript__mf_v__runtimeInit__mf_v__-CmuPLb0X.js";const XL=$(U.jsx("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack"),KL=$(U.jsx("path",{d:"m10 17 5-5-5-5z"}),"ArrowRight"),qL=$(U.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 11h-3v3.75c0 1.24-1.01 2.25-2.25 2.25S8.5 17.99 8.5 16.75s1.01-2.25 2.25-2.25c.46 0 .89.14 1.25.38V11h4zm-3-4V3.5L18.5 9z"}),"AudioFile"),eg=$([U.jsx("path",{d:"M16.5 12h-9c-.55 0-1 .45-1 1v1h11v-1c0-.55-.45-1-1-1M7.25 8.5h4v2h-4zm5.5 0h4v2h-4z"},"0"),U.jsx("path",{d:"M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-1 15h-1.5v-1.5h-11V17H5v-3.83c0-.66.25-1.26.65-1.72V9c0-1.1.9-2 2-2H11c.37 0 .72.12 1 .32.28-.2.63-.32 1-.32h3.35c1.1 0 2 .9 2 2v2.45c.4.46.65 1.06.65 1.72z"},"1")],"BedroomParent"),tg=$(U.jsx("path",{d:"M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2"}),"Bookmark"),sg=$(U.jsx("path",{d:"M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2m0 15-5-2.18L7 18V5h10z"}),"BookmarkBorder"),ig=$(U.jsx("path",{d:"M22 24H2v-4h20zM13.06 5.19l3.75 3.75L7.75 18H4v-3.75zm4.82 2.68-3.75-3.75 1.83-1.83c.39-.39 1.02-.39 1.41 0l2.34 2.34c.39.39.39 1.02 0 1.41z"}),"BorderColor"),rg=$(U.jsx("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6c3.31 0 6 2.69 6 6s-2.69 6-6 6"}),"Brightness4"),og=$(U.jsx("path",{d:"M20 15.31 23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6"}),"Brightness5"),Ma=$(U.jsx("path",{d:"M20 15.31 23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20zM12 18V6c3.31 0 6 2.69 6 6s-2.69 6-6 6"}),"Brightness6"),ng=$(U.jsx("path",{d:"M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6m0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4"}),"Brightness7"),ag=$(U.jsx("path",{d:"m22.7 19-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4"}),"Build"),Mg=$(U.jsx("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday"),ca=$(U.jsx("path",{d:"M9.4 16.6 4.8 12l4.6-4.6L8 6l-6 6 6 6zm5.2 0 4.6-4.6-4.6-4.6L16 6l6 6-6 6z"}),"Code"),cg=$(U.jsx("path",{d:"m20.71 5.63-2.34-2.34a.996.996 0 0 0-1.41 0l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42M6.92 19 5 17.08l8.06-8.06 1.92 1.92z"}),"Colorize"),ug=$(U.jsx("path",{d:"m13.7826 15.1719 2.1213-2.1213 5.9963 5.9962-2.1213 2.1213zM17.5 10c1.93 0 3.5-1.57 3.5-3.5 0-.58-.16-1.12-.41-1.6l-2.7 2.7-1.49-1.49 2.7-2.7c-.48-.25-1.02-.41-1.6-.41C15.57 3 14 4.57 14 6.5c0 .41.08.8.21 1.16l-1.85 1.85-1.78-1.78.71-.71-1.41-1.41L12 3.49c-1.17-1.17-3.07-1.17-4.24 0L4.22 7.03l1.41 1.41H2.81l-.71.71 3.54 3.54.71-.71V9.15l1.41 1.41.71-.71 1.78 1.78-7.41 7.41 2.12 2.12L16.34 9.79c.36.13.75.21 1.16.21"}),"Construction"),lg=$(U.jsx("path",{d:"M17 15h2V7c0-1.1-.9-2-2-2H9v2h8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2z"}),"Crop"),Ng=$(U.jsx("path",{d:"M4 7v2c0 .55-.45 1-1 1H2v4h1c.55 0 1 .45 1 1v2c0 1.65 1.35 3 3 3h3v-2H7c-.55 0-1-.45-1-1v-2c0-1.3-.84-2.42-2-2.83v-.34C5.16 11.42 6 10.3 6 9V7c0-.55.45-1 1-1h3V4H7C5.35 4 4 5.35 4 7m17 3c-.55 0-1-.45-1-1V7c0-1.65-1.35-3-3-3h-3v2h3c.55 0 1 .45 1 1v2c0 1.3.84 2.42 2 2.83v.34c-1.16.41-2 1.52-2 2.83v2c0 .55-.45 1-1 1h-3v2h3c1.65 0 3-1.35 3-3v-2c0-.55.45-1 1-1h1v-4z"}),"DataObject"),Kr=$(U.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm2 16H8v-2h8zm0-4H8v-2h8zm-3-5V3.5L18.5 9z"}),"Description"),Lg=$(U.jsx("path",{d:"M18.41 5.8 17.2 4.59c-.78-.78-2.05-.78-2.83 0l-2.68 2.68L3 15.96V20h4.04l8.74-8.74 2.63-2.63c.79-.78.79-2.05 0-2.83M6.21 18H5v-1.21l8.66-8.66 1.21 1.21zM11 20l4-4h6v4z"}),"DriveFileRenameOutline"),gg=$(U.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error"),jg=$(U.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"}),"ExpandMore"),yg=$(U.jsx("path",{d:"M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.15 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75zM9 13c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3"}),"FindInPage"),Tg=$(U.jsx("path",{d:"M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m0 12H4V8h16z"}),"FolderOpen"),dg=$(U.jsx("path",{d:"M20 6h-8l-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m-2.06 11L15 15.28 12.06 17l.78-3.33-2.59-2.24 3.41-.29L15 8l1.34 3.14 3.41.29-2.59 2.24z"}),"FolderSpecial"),Dg=$(U.jsx("path",{d:"M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-4.05 16.5-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13z"}),"FontDownload"),hg=$(U.jsx("path",{d:"M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z"}),"FormatItalic"),zg=$(U.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Image"),ua=$(U.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info"),DN=$(U.jsx("path",{d:"M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm7 7V3.5L18.5 9z"}),"InsertDriveFile"),wg=$(U.jsx("path",{d:"M19 7v4H5.83l3.58-3.59L8 6l-6 6 6 6 1.41-1.41L5.83 13H21V7z"}),"KeyboardReturn"),hN=$(U.jsx("path",{d:"M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1M8 13h8v-2H8zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5"}),"Link"),Cg=$(U.jsx("path",{d:"M3 13h2v-2H3zm0 4h2v-2H3zm0-8h2V7H3zm4 4h14v-2H7zm0 4h14v-2H7zM7 7v2h14V7z"}),"List"),Ig=$(U.jsx("path",{d:"M19 5v14H5V5zm1.1-2H3.9c-.5 0-.9.4-.9.9v16.2c0 .4.4.9.9.9h16.2c.4 0 .9-.5.9-.9V3.9c0-.5-.5-.9-.9-.9M11 7h6v2h-6zm0 4h6v2h-6zm0 4h6v2h-6zM7 7h2v2H7zm0 4h2v2H7zm0 4h2v2H7z"}),"ListAlt"),pg=$(U.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-5 14h-2V9h-2V7h4z"}),"LooksOne"),Ag=$(U.jsx("path",{d:"M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3z"}),"MusicNote"),mg=$(U.jsx("path",{d:"M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"}),"NavigateNext"),la=$(U.jsx("path",{d:"M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"}),"PersonOutlined"),Og=$(U.jsx("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.5 13.5l2.5 3.01L14.5 12l4.5 6H5z"}),"Photo"),Sr=$(U.jsx("path",{d:"M5 4v2h14V4zm0 10h4v6h6v-6h4l-7-7z"}),"Publish"),zN=$(U.jsx("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"}),"Refresh"),Na=$(U.jsx("path",{d:"m20.2 5.9.8-.8C19.6 3.7 17.8 3 16 3s-3.6.7-5 2.1l.8.8C13 4.8 14.5 4.2 16 4.2s3 .6 4.2 1.7m-.9.8c-.9-.9-2.1-1.4-3.3-1.4s-2.4.5-3.3 1.4l.8.8c.7-.7 1.6-1 2.5-1s1.8.3 2.5 1zM19 13h-2V9h-2v4H5c-1.1 0-2 .9-2 2v4c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-4c0-1.1-.9-2-2-2M8 18H6v-2h2zm3.5 0h-2v-2h2zm3.5 0h-2v-2h2z"}),"Router"),Eg=$(U.jsx("path",{d:"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7zm-6 .67 2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"}),"SaveAlt"),ln=$(U.jsx("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings"),kr=$(U.jsx("path",{d:"M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m7-7H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2m-1.75 9c0 .23-.02.46-.05.68l1.48 1.16c.13.11.17.3.08.45l-1.4 2.42c-.09.15-.27.21-.43.15l-1.74-.7c-.36.28-.76.51-1.18.69l-.26 1.85c-.03.17-.18.3-.35.3h-2.8c-.17 0-.32-.13-.35-.29l-.26-1.85c-.43-.18-.82-.41-1.18-.69l-1.74.7c-.16.06-.34 0-.43-.15l-1.4-2.42c-.09-.15-.05-.34.08-.45l1.48-1.16c-.03-.23-.05-.46-.05-.69s.02-.46.05-.68l-1.48-1.16c-.13-.11-.17-.3-.08-.45l1.4-2.42c.09-.15.27-.21.43-.15l1.74.7c.36-.28.76-.51 1.18-.69l.26-1.85c.03-.17.18-.3.35-.3h2.8c.17 0 .32.13.35.29l.26 1.85c.43.18.82.41 1.18.69l1.74-.7c.16-.06.34 0 .43.15l1.4 2.42c.09.15.05.34-.08.45l-1.48 1.16c.03.23.05.46.05.69"}),"SettingsApplications"),fg=$(U.jsx("path",{d:"m3.5 18.49 6-6.01 4 4L22 6.92l-1.41-1.41-7.09 7.97-4-4L2 16.99z"}),"ShowChart"),La=$(U.jsx("path",{d:"M11.99 2c-5.52 0-10 4.48-10 10s4.48 10 10 10 10-4.48 10-10-4.48-10-10-10m3.61 6.34c1.07 0 1.93.86 1.93 1.93s-.86 1.93-1.93 1.93-1.93-.86-1.93-1.93c-.01-1.07.86-1.93 1.93-1.93m-6-1.58c1.3 0 2.36 1.06 2.36 2.36s-1.06 2.36-2.36 2.36-2.36-1.06-2.36-2.36c0-1.31 1.05-2.36 2.36-2.36m0 9.13v3.75c-2.4-.75-4.3-2.6-5.14-4.96 1.05-1.12 3.67-1.69 5.14-1.69.53 0 1.2.08 1.9.22-1.64.87-1.9 2.02-1.9 2.68M11.99 20c-.27 0-.53-.01-.79-.04v-4.07c0-1.42 2.94-2.13 4.4-2.13 1.07 0 2.92.39 3.84 1.15-1.17 2.97-4.06 5.09-7.45 5.09"}),"SupervisedUserCircle"),xg=$(U.jsx("path",{d:"M2.5 4v3h5v12h3V7h5V4zm19 5h-9v3h3v7h3v-7h3z"}),"TextFields"),_g=$(U.jsx("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5zM8 15.01l1.41 1.41L11 14.84V19h2v-4.16l1.59 1.59L16 15.01 12.01 11z"}),"UploadFileOutlined"),Sg=$(U.jsx("path",{d:"M16 13h-3V3h-2v10H8l4 4zM4 19v2h16v-2z"}),"VerticalAlignBottom"),kg=$(U.jsx("path",{d:"M8 11h3v10h2V11h3l-4-4zM4 3v2h16V3z"}),"VerticalAlignTop"),Yg=$(U.jsx("path",{d:"M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11z"}),"Videocam"),vg=$(U.jsx("path",{d:"M14.67 5v14H9.33V5zm1 14H21V5h-5.33zm-7.34 0V5H3v14z"}),"ViewColumn"),bg=$(U.jsx("path",{d:"M4 15h16v-2H4zm0 4h16v-2H4zm0-8h16V9H4zm0-6v2h16V5z"}),"ViewHeadline"),Qg=$(U.jsx("path",{d:"M14.67 5v6.5H9.33V5zm1 6.5H21V5h-5.33zm-1 7.5v-6.5H9.33V19zm1-6.5V19H21v-6.5zm-7.34 0H3V19h5.33zm0-1V5H3v6.5z"}),"ViewModule"),Ug=$(U.jsx("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"Visibility"),$g=$(U.jsx("path",{d:"M1 21h22L12 2zm12-3h-2v-2h2zm0-4h-2v-4h2z"}),"Warning"),bs=$(U.jsx("path",{d:"m1 9 2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9m8 8 3 3 3-3c-1.65-1.66-4.34-1.66-6 0m-4-4 2 2c2.76-2.76 7.24-2.76 10 0l2-2C15.14 9.14 8.87 9.14 5 13"}),"Wifi"),rr=$(U.jsx("path",{d:"M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7zm-4 4c-1.29-1.29-2.84-2.13-4.49-2.56l3.53 3.53zM2 3.05 5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24C7.81 10.89 6.27 11.73 5 13v.01L6.99 15c1.36-1.36 3.14-2.04 4.92-2.06L18.98 20l1.27-1.26L3.29 1.79zM9 17l3 3 3-3c-1.65-1.66-4.34-1.66-6 0"}),"WifiOff"),mo=11/23/100;function RM(s){const e={r:0,g:0,b:0};if(s.length===7)e.r=parseInt(s.substring(1,3),16),e.g=parseInt(s.substring(3,5),16),e.b=parseInt(s.substring(5,7),16);else if(s.length===4){const t=s[1],i=s[2],r=s[3];e.r=parseInt(t+t,16),e.g=parseInt(i+i,16),e.b=parseInt(r+r,16)}return e}function Pg(s){return`#${Math.round(s.r).toString(16)}${Math.round(s.g).toString(16)}${Math.round(s.b).toString(16)}`}function Wg(s,e,t){const i=RM(s),r=RM(e);return i.r+=r.r*(.05+mo*(t-1)),i.g+=r.g*(.05+mo*(t-1)),i.b+=r.b*(.05+mo*(t-1)),Pg(i)}function FM(s,e){const t={};for(let i=1;i<=24;i++)t[`elevation${i}`]={backgroundColor:Wg(s,e,i)};return t}function Bg(s,e){var n,a,c,l,N,u,L,g,y,T,d;let t,i;s==="dark"?(i={MuiAppBar:{colorDefault:{backgroundColor:"#272727"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[200],"&:hover":{color:Pe[100]}}},MuiPaper:FM("#121212","#fff")},t={name:s,palette:{mode:"dark",background:{paper:"#121212",default:"#121212"},primary:{main:"#4dabf5"},secondary:{main:"#436a93"},expert:"#14bb00",text:{primary:"#ffffff",secondary:"#ffffff"}}}):s==="blue"?(i={MuiAppBar:{colorDefault:{backgroundColor:"#3399CC"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[400],"&:hover":{color:Pe[300]}}}},t={name:s,palette:{mode:"dark",background:{paper:"#151d21",default:"#151d21"},primary:{main:"#4dabf5"},secondary:{main:"#436a93"},expert:"#14bb00",text:{primary:"#ffffff",secondary:"#ffffff"}}}):s==="colored"?(i={MuiAppBar:{colorDefault:{backgroundColor:"#2a3135"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[200],"&:hover":{color:Pe[100]}}},MuiPaper:FM("#151d21","#fff")},t={name:s,palette:{mode:"light",primary:{main:"#3399CC"},secondary:{main:"#164477"},expert:"#96fc96"}}):s==="PT"?(i={MuiAppBar:{colorDefault:{backgroundColor:"#0F99DE"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[400],"&:hover":{color:Pe[300]}}}},t={name:s,palette:{mode:"light",primary:{main:"#0F99DE"},secondary:{main:"#88A536"},expert:"#BD1B24"}}):s==="DX"?(i={MuiAppBar:{colorDefault:{backgroundColor:"#a9a9a9"}},MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[400],"&:hover":{color:Pe[300]}}}},t={name:s,palette:{mode:"light",primary:{main:"#F5F5F7"},secondary:{main:"#a9a9a9"},expert:"#BD1B24",text:{primary:"#007AFE",secondary:"#007AFE",disabled:"#007AFEAA"}}}):(i={MuiLink:{root:{textTransform:"uppercase",transition:"color .3s ease",color:Pe[400],"&:hover":{color:Pe[300]}}}},t={name:s,palette:{mode:"light",primary:{main:"#3399CC",dark:"#256c97",light:"#76d0fd"},secondary:{main:"#164477"},expert:"#14bb00"}}),t.toolbar={height:48},t.saveToolbar={background:(a=(n=t.palette)==null?void 0:n.primary)==null?void 0:a.main,button:{borderRadius:3,height:32}},t.palette&&(t.palette.grey={main:vM[300],dark:vM[400]});const r=bM(t),o=r.palette;return bM(r,{...e||void 0,components:{...i,MuiButton:{variants:[{props:{variant:"contained",color:"grey"},style:{backgroundColor:(c=o.grey)==null?void 0:c[300],color:o.getContrastText&&((l=o.grey)!=null&&l[300])?o.getContrastText(o.grey[300]):void 0}},{props:{variant:"outlined",color:"grey"},style:{color:(N=o.text)==null?void 0:N.primary,borderColor:o.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)","&.Mui-disabled":{border:`1px solid ${(u=o.action)==null?void 0:u.disabledBackground}`},"&:hover":{borderColor:o.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)",backgroundColor:QM(((L=o.text)==null?void 0:L.primary)||"",((g=o.action)==null?void 0:g.hoverOpacity)||.04)}}},{props:{variant:"text",color:"grey"},style:{color:(y=o.text)==null?void 0:y.primary,"&:hover":{backgroundColor:QM(((T=o.text)==null?void 0:T.primary)||"",((d=o.action)==null?void 0:d.hoverOpacity)||.04)}}}]},...(e==null?void 0:e.components)||void 0}})}function Jg(){let s,e;const t=new Promise((i,r)=>{s=i,e=r});return t.resolve=s,t.reject=e,t}function Nn(s){return(s==null?void 0:s.rows.map(e=>e.value).filter(e=>!!e))??[]}function Tt(s){return s!=null&&s.startsWith("system.host.")||(s=`system.host.${s}`),s}function ci(s){return s!=null&&s.startsWith("system.host.")&&(s=s.substring(12)),s}function GM(s){return new Promise(e=>{setTimeout(e,s)})}function or(s){s=(s||"").toString();const e=s[0]==="*",t=s[s.length-1]==="*";return s=s.replace(/[-/\\^$+?.()|[\]{}]/g,"\\$&").replace(/\*/g,".*"),(e?"":"^")+s+(t?"":"$")}var rt;(function(s){s[s.CONNECTING=0]="CONNECTING",s[s.CONNECTED=1]="CONNECTED",s[s.OBJECTS_LOADED=2]="OBJECTS_LOADED",s[s.READY=3]="READY"})(rt||(rt={}));var Ie;(function(s){s.PERMISSION_ERROR="permissionError",s.NOT_CONNECTED="notConnectedError",s.TIMEOUT="timeout",s.NOT_ADMIN="Allowed only in admin",s.NOT_SUPPORTED="Not supported"})(Ie||(Ie={}));const t5e=Ie.PERMISSION_ERROR;Ie.NOT_CONNECTED;const Rg=["material","echarts","vis"];class ze{constructor(e){this.props=this.applyDefaultProps(e),this.connId=`${this.props.name?`${this.props.name}-`:""}${Math.round(Math.random()*1e6).toString().padStart(6,"0")}`,this.waitForSocketLib().then(()=>this.startSocket()).catch(t=>{alert(`Socket connection could not be initialized: ${t}`)})}applyDefaultProps(e){return{...e,protocol:e.protocol||window.location.protocol,host:e.host||window.location.hostname,port:e.port||(window.location.port==="3000"?8081:window.location.port),ioTimeout:Math.max(e.ioTimeout||2e4,2e4),cmdTimeout:Math.max(e.cmdTimeout||5e3,5e3),admin5only:e.admin5only||!1,autoSubscribes:e.autoSubscribes??[],autoSubscribeLog:e.autoSubscribeLog??!1,doNotLoadACL:e.doNotLoadACL??!0,doNotLoadAllObjects:e.doNotLoadAllObjects??!0}}props;connId;lastAccessToken=null;ignoreState="";connected=!1;subscribed=!1;firstConnect=!0;waitForRestart=!1;loaded=!1;simStates={};statesSubscribes={};filesSubscribes={};objectsSubscribes={};objects={};states={};acl=null;isSecure=!1;onReadyDone=!1;onConnectionHandlers=[];onLogHandlers=[];onCmdStdoutHandler;onCmdStderrHandler;onCmdExitHandler;onError(e){(this.props.onError??console.error)(e)}_socket;_waitForSocketPromise;_waitForFirstConnectionPromise=Jg();_instanceSubscriptions={};_promises={};_authTimer=null;_refreshTimer=null;_systemConfig;get systemConfig(){return this._systemConfig}systemLang="en";static isWeb(){return window.socketUrl!==void 0}waitForSocketLib(){return this._waitForSocketPromise?this._waitForSocketPromise:(this._waitForSocketPromise=new Promise(async(e,t)=>{if(typeof window.io>"u"&&typeof window.iob>"u")if(typeof window.registerSocketOnLoad=="function")window.registerSocketOnLoad(()=>e());else{for(let i=1;i<=30;i++){if(window.io||window.iob)return e();await GM(100)}t(new Error("Socket library could not be loaded!"))}else e()}),this._waitForSocketPromise)}async startSocket(){if(this._socket)return;let e=this.props.host,t=this.props.port,i=(this.props.protocol||window.location.protocol).replace(":",""),r=window.location.pathname;if(window.location.hostname==="iobroker.net"||window.location.hostname==="iobroker.pro")r="";else{if(window.socketUrl){const a=new URL(window.socketUrl);e=a.hostname,t=a.port,i=a.protocol.replace(":","")}const n=r.lastIndexOf("/");if(n!==-1&&(r=r.substring(0,n+1)),ze.isWeb()){const a=r.split("/");a.length>2&&(a.pop(),a.pop(),Rg.includes(a[a.length-1])&&a.pop(),r=a.join("/"),r.endsWith("/")||(r+="/"))}}const o=t?`${i}://${e}:${t}`:`${i}://${e}`;return this._socket=(window.io||window.iob).connect(o,{path:r.endsWith("/")?`${r}socket.io`:`${r}/socket.io`,query:"ws=true",name:this.props.name,timeout:this.props.ioTimeout,uuid:this.props.uuid,token:this.props.token}),this._socket.on("connect",n=>{window.addEventListener("storage",this.onAccessTokenUpdated);const a=ze.readTokens();if(a&&!a.owner){const c=Date.now();this.saveTokens({access_token:a.access_token,refresh_token:a.refresh_token,expires_in:Math.round((a.expires_in.getTime()-c)/1e3),refresh_token_expires_in:Math.round((a.refresh_token_expires_in.getTime()-c)/1e3),token_type:"Bearer"},a.stayLoggedIn)}this.onReadyDone=!1,n!==!0?(this.connected=!0,setTimeout(()=>this.getVersion().then(c=>{const[l,N,u]=c.version.split(".");parseInt(l,10)*1e4+parseInt(N,10)*100+parseInt(u,10)<40102?(this._authTimer=null,this.onPreConnect(!1,!1)):this._socket.emit("authenticate",(g,y)=>this.onPreConnect(g,y))}).catch(c=>this.onError({message:c.toString(),operation:"getVersion"})),500)):this._socket.emit("authenticate",(c,l)=>{this.onPreConnect(c,l)})}),this._socket.on("reconnect",()=>{var n,a;this.onReadyDone=!1,(a=(n=this.props).onProgress)==null||a.call(n,rt.READY),this.connected=!0,this.waitForRestart?window.location.reload():(this._subscribe(!0),this.onConnectionHandlers.forEach(c=>c(!0)))}),this._socket.on("disconnect",()=>{var n,a;this.onReadyDone=!1,this.connected=!1,this.subscribed=!1,(a=(n=this.props).onProgress)==null||a.call(n,rt.CONNECTING),this.onConnectionHandlers.forEach(c=>c(!1))}),this._socket.on("reauthenticate",()=>this.authenticate()),this._socket.on("log",n=>{var a,c;(c=(a=this.props).onLog)==null||c.call(a,n),this.onLogHandlers.forEach(l=>l(n))}),this._socket.on("error",n=>{let a;n==null?a="":typeof n.toString=="function"?a=n.toString():(a=JSON.stringify(n),console.error(`Received strange error: ${a}`)),a.includes("User not authorized")?this.authenticate():a.includes("websocket error")?(console.error(`Socket Error => reload: ${n}`),window.location.reload()):console.error(`Socket Error: ${n}`)}),this._socket.on("connect_error",n=>console.error(`Connect error: ${n}`)),this._socket.on("permissionError",n=>this.onError({message:"no permission",operation:n.operation,type:n.type,id:n.id||""})),this._socket.on("objectChange",(n,a)=>{setTimeout(()=>this.objectChange(n,a),0)}),this._socket.on("stateChange",(n,a)=>{setTimeout(()=>this.stateChange(n,a),0)}),this._socket.on("im",(n,a,c)=>{setTimeout(()=>this.instanceMessage(n,a,c),0)}),this._socket.on("fileChange",(n,a,c)=>{setTimeout(()=>this.fileChange(n,a,c),0)}),this._socket.on("cmdStdout",(n,a)=>{var c;(c=this.onCmdStdoutHandler)==null||c.call(this,n,a)}),this._socket.on("cmdStderr",(n,a)=>{var c;(c=this.onCmdStderrHandler)==null||c.call(this,n,a)}),this._socket.on("cmdExit",(n,a)=>{var c;(c=this.onCmdExitHandler)==null||c.call(this,n,a)}),Promise.resolve()}onPreConnect(e,t){var i,r;this._authTimer&&(clearTimeout(this._authTimer),this._authTimer=null),this.connected=!0,this.isSecure=t,this.waitForRestart?window.location.reload():(this.firstConnect?this.loadData().catch(o=>console.error(`Cannot load data: ${o}`)):(r=(i=this.props).onProgress)==null||r.call(i,rt.READY),this._subscribe(!0),this.onConnectionHandlers.forEach(o=>o(!0)),this.checkAccessTokenExpire()),this._waitForFirstConnectionPromise.resolve()}static readTokens(){let e=window.sessionStorage.getItem("iob_tokens");const t=!e;if(e||(e=window.localStorage.getItem("iob_tokens")),!e)return null;const[i,r,o,n,a]=e.split(";"),c=new Date(r);return c.getTime()<Date.now()?null:{refresh_token:i,refresh_token_expires_in:c,access_token:o,expires_in:new Date(n),owner:a,stayLoggedIn:t}}static saveTokensStatic(e,t,i){const r=`${e.refresh_token};${new Date(Date.now()+e.refresh_token_expires_in*1e3).toISOString()};${e.access_token};${new Date(Date.now()+e.expires_in*1e3).toISOString()}${i?`;${i}`:""}`;t?window.localStorage.setItem("iob_tokens",r):window.sessionStorage.setItem("iob_tokens",r)}saveTokens(e,t){ze.saveTokensStatic(e,t,this.connId)}static deleteTokensStatic(){window.localStorage.removeItem("iob_tokens"),window.sessionStorage.removeItem("iob_tokens")}deleteTokens(e,t){const i=ze.readTokens();i&&(t?ze.deleteTokensStatic():i.stayLoggedIn===e&&i.owner===this.connId&&(i.stayLoggedIn?window.localStorage.removeItem("iob_tokens"):window.sessionStorage.removeItem("iob_tokens")))}onAccessTokenUpdated=e=>{if(e.key==="iob_tokens"){const t=ze.readTokens();t&&(console.log(`Tab ${this.connId} received updated token: ${t.access_token}`),this.updateTokenExpiration(t.access_token))}};updateTokenExpiration(e){this.lastAccessToken!==e&&(this.lastAccessToken=e,this._socket.emit("updateTokenExpiration",e,(t,i)=>{t?(console.error(`[UPDATE/${new Date().toISOString()}] cannot say to server about new token: ${t}`),window.location.reload()):i?console.log(`[UPDATE/${new Date().toISOString()}] server accepted new token: ${e}`):(console.error(`[UPDATE/${new Date().toISOString()}] cannot say to server about new token`),window.location.reload())})),this.checkAccessTokenExpire()}refreshTokens(e,t){if(!e){console.log(`[REFRESH/${new Date().toISOString()}] No token structure found => reloading the page`),setTimeout(()=>window.location.reload(),500);return}t||!e.owner||e.owner===this.connId?(console.log(`[REFRESH/${new Date().toISOString()}] claim ownership of the token`),this.acquireTokenLock()?(console.log(`[REFRESH/${new Date().toISOString()}] refreshing token`),fetch("./oauth/token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:`grant_type=refresh_token&refresh_token=${e.refresh_token}&client_id=ioBroker&stayloggedin=${e.stayLoggedIn}`}).then(i=>{if(i.ok)return i.json();throw new Error("Cannot refresh access token")}).then(i=>{if(i.access_token)console.log(`[REFRESH/${new Date().toISOString()}] received new token: ${i.access_token}`),this.saveTokens(i,e.stayLoggedIn),this.releaseTokenLock(),this.updateTokenExpiration(i.access_token);else throw new Error("Cannot get access token")}).catch(i=>{console.warn(`[REFRESH/${new Date().toISOString()}] cannot refresh token: ${i}`),this.releaseTokenLock(),this.deleteTokens(e.stayLoggedIn),console.error(i),window.location.reload()})):(console.log(`[REFRESH/${new Date().toISOString()}] Someone else is updating the token, so wait for the next check`),this.checkAccessTokenExpire())):this.lastAccessToken!==e.access_token&&this.updateTokenExpiration(e.access_token)}acquireTokenLock(){const e=Date.now(),t=localStorage.getItem("iob_token_semaphore");if(t)try{const r=JSON.parse(t);if(e<r.expiry)return!1}catch{}const i={connId:this.connId,expiry:e+10*1e3};return localStorage.setItem("iob_token_semaphore",JSON.stringify(i)),!0}releaseTokenLock(){const e=localStorage.getItem("iob_token_semaphore");if(e)try{JSON.parse(e).connId===this.connId&&localStorage.removeItem("iob_token_semaphore")}catch{localStorage.removeItem("iob_token_semaphore")}}checkAccessTokenExpire(){if(this._refreshTimer&&(clearTimeout(this._refreshTimer),this._refreshTimer=null),this.isSecure){const e=ze.readTokens();if(e){const t=e.expires_in.getTime();if(t<Date.now()+3e4){const i=t<Date.now()+5500;console.log(`[TOKEN/${new Date().toISOString()}] Updating refresh token ${e.access_token}`),e.refresh_token?e.owner===this.connId||i?(e.owner===this.connId?console.log(`[TOKEN/${new Date().toISOString()}] We are the owner of the token`):console.log(`[TOKEN/${new Date().toISOString()}] We are not the owner of the token, but we will take ownership`),this.props.tokenTimeoutHandler?(console.log(`[TOKEN/${new Date().toISOString()}] Asking GUI if we should prolong the token`),this.props.tokenTimeoutHandler(t).then(r=>{r?(console.log(`[TOKEN/${new Date().toISOString()}] Token will be prolonged`),this.refreshTokens(e,i)):(console.log(`[TOKEN/${new Date().toISOString()}] Token will not be prolonged. Reloading the page`),setTimeout(()=>window.location.reload(),Date.now()>t?500:t-Date.now()))})):(console.log(`[TOKEN/${new Date().toISOString()}] No tokenTimeoutHandler defined. Prolonging the token`),this.refreshTokens(e,i))):this.lastAccessToken!==e.access_token?(console.log(`[TOKEN/${new Date().toISOString()}] We are not the owner of the token, but we will inform the server about new token`),this.refreshTokens(e)):(console.log(`[TOKEN/${new Date().toISOString()}] We are not the owner of the token and the token did not change. Check in 3 seconds if the owner updated the token`),this._refreshTimer=setTimeout(()=>{this._refreshTimer=null,this.checkAccessTokenExpire()},3e3)):(console.log(`[TOKEN/${new Date().toISOString()}] We do not have a refresh token, so we need to reauthenticate`),setTimeout(()=>window.location.reload(),Date.now()>t?500:t-Date.now()))}else this._refreshTimer=setTimeout(()=>{this._refreshTimer=null,this.checkAccessTokenExpire()},t-Date.now()-3e4>12e4?12e4:t-Date.now()-3e4)}}}static isCloud(){return window.location.hostname.includes("amazonaws.com")||window.location.hostname.includes("iobroker.in")?!0:typeof window.socketUrl>"u"?!1:window.socketUrl.includes("iobroker.in")||window.socketUrl.includes("amazonaws")}isConnected(){return this.connected}waitForFirstConnection(){return this._waitForFirstConnectionPromise}async getUserPermissions(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getUserPermissions",(i,r)=>{i?t(i):e(r||null)})}})}async loadData(){if(this.loaded)return;const e=10;for(let t=1;t<=e;t++){if(this.doLoadData().catch(i=>console.error(`Cannot load data: ${i}`)),this.loaded)return;await GM(ze.isCloud()?5e3:1e3)}}async doLoadData(){var e,t,i,r,o,n,a,c,l;if(!this.loaded){if(!this.props.doNotLoadACL)try{this.acl=await this.getUserPermissions()}catch(N){this.onError(`Cannot read user permissions: ${N}`);return}try{this.props.admin5only&&!ze.isWeb()&&(!window.vendorPrefix||window.vendorPrefix==="@@vendorPrefix@@")?this._systemConfig=await this.getCompactSystemConfig():this._systemConfig=await this.getSystemConfig()}catch(N){this.onError(`Cannot read system config: ${N}`);return}this._systemConfig&&(this.systemLang=(e=this._systemConfig.common)==null?void 0:e.language,this.systemLang||(this.systemLang=window.navigator.userLanguage||window.navigator.language,/^(en|de|ru|pt|nl|fr|it|es|pl|uk)-?/.test(this.systemLang)?this.systemLang=this.systemLang.substring(0,2):/^(en|de|ru|pt|nl|fr|it|es|pl|uk|zh-cn)$/.test(this.systemLang)||(this.systemLang="en"),this._systemConfig.common.language=this.systemLang)),(i=(t=this.props).onLanguage)==null||i.call(t,this.systemLang),this.loaded=!0,(o=(r=this.props).onProgress)==null||o.call(r,rt.CONNECTED),this.firstConnect=!1,this.props.doNotLoadAllObjects?this.props.admin5only?this.objects={}:this.objects={"system.config":this._systemConfig}:this.objects=await this.getObjects(),(a=(n=this.props).onProgress)==null||a.call(n,rt.READY),this.onReadyDone||(this.onReadyDone=!0,(l=(c=this.props).onReady)==null||l.call(c,this.objects))}}authenticate(){window.location.search.includes("&href=")?window.location.href=`${window.location.protocol}//${window.location.host}${window.location.pathname}${window.location.search}`:window.location.href=`${window.location.protocol}//${window.location.host}${window.location.pathname}?login&href=${encodeURIComponent(window.location.search+window.location.hash)}`}async subscribeState(...e){let t,i,r;e.length===3?[t,i,r]=e:([t,r]=e,i=!1);let o;if(Array.isArray(t)?o=t:o=[t],typeof r!="function")throw new Error("The state change handler must be a function!");const n=[];for(let a=0;a<o.length;a++){const c=o[a];this.statesSubscribes[c]?!this.statesSubscribes[c].cbs.includes(r)&&this.statesSubscribes[c].cbs.push(r):(this.statesSubscribes[c]={reg:new RegExp(or(c)),cbs:[r]},t!==this.ignoreState&&n.push(c))}if(this.connected)if(n.length&&this._socket.emit("subscribe",n),i){let a;for(let c=0;c<o.length;c++){try{a=await this.getBinaryState(o[c])}catch(l){console.error(`Cannot getBinaryState "${o[c]}": ${JSON.stringify(l)}`),a=void 0}a!=null&&r(o[c],a)}}else if(o.find(a=>a.includes("*"))){let a;for(let c=0;c<o.length;c++){try{a=await this.getForeignStates(o[c])}catch(l){console.error(`Cannot getForeignStates "${o[c]}": ${JSON.stringify(l)}`);return}if(a)for(const[l,N]of Object.entries(a)){const u=r(l,N);u instanceof Promise&&u.catch(L=>console.error(`Cannot call state change handler: ${L}`))}}}else try{const a=await(ze.isWeb()?this.getStates(o):this.getForeignStates(o));if(a)for(const[c,l]of Object.entries(a)){const N=r(c,l);N instanceof Promise&&N.catch(u=>console.error(`Cannot call state change handler: ${u}`))}}catch(a){console.error(`Cannot getState "${o.join(", ")}": ${a.message}`);return}}async subscribeStateAsync(e,t){return this.subscribeState(e,t)}unsubscribeState(e,t){var o;let i;Array.isArray(e)?i=e:i=[e];const r=[];for(let n=0;n<i.length;n++){const a=i[n];if(this.statesSubscribes[a]){const c=this.statesSubscribes[a];if(t){const l=c.cbs.indexOf(t);l!==-1&&c.cbs.splice(l,1)}else c.cbs=[];(o=c.cbs)!=null&&o.length||(delete this.statesSubscribes[a],a!==this.ignoreState&&r.push(a))}}this.connected&&r.length&&this._socket.emit("unsubscribe",i)}subscribeObject(e,t){let i;if(Array.isArray(e)?i=e:i=[e],typeof t!="function")throw new Error("The object change handler must be a function!");const r=[];for(let o=0;o<i.length;o++){const n=i[o];this.objectsSubscribes[n]?!this.objectsSubscribes[n].cbs.includes(t)&&this.objectsSubscribes[n].cbs.push(t):(this.objectsSubscribes[n]={reg:new RegExp(or(n)),cbs:[t]},r.push(n))}return this.connected&&r.length&&this._socket.emit("subscribeObjects",r),Promise.resolve()}unsubscribeObject(e,t){var o;let i;Array.isArray(e)?i=e:i=[e];const r=[];for(let n=0;n<i.length;n++){const a=i[n];if(this.objectsSubscribes[a]){const c=this.objectsSubscribes[a];if(t){const l=c.cbs.indexOf(t);l!==-1&&c.cbs.splice(l,1)}else c.cbs=[];(o=c.cbs)!=null&&o.length||(delete this.objectsSubscribes[a],r.push(a))}}return this.connected&&r.length&&this._socket.emit("unsubscribeObjects",r),Promise.resolve()}objectChange(e,t){var o,n;let i;this.objects[e]&&(i={_id:e,type:this.objects[e].type});let r=!1;t?(t._rev&&this.objects[e]&&(this.objects[e]._rev=t._rev),(!this.objects[e]||JSON.stringify(this.objects[e])!==JSON.stringify(t))&&(this.objects[e]=t,r=!0)):this.objects[e]&&(delete this.objects[e],r=!0);for(const[a,c]of Object.entries(this.objectsSubscribes))(a===e||c.reg.test(e))&&c.cbs.forEach(l=>{try{const N=l(e,t,i);N instanceof Promise&&N.catch(u=>console.error(`Cannot call object change handler: ${u}`))}catch(N){console.error(`Error by callback of objectChange: ${N}`)}});if(r){const a=(n=(o=this.props).onObjectChange)==null?void 0:n.call(o,e,t);a instanceof Promise&&a.catch(c=>console.error(`Cannot call object change handler: ${c}`))}}stateChange(e,t){for(const i of Object.values(this.statesSubscribes))if(i.reg.test(e))for(const r of i.cbs)try{const o=r(e,t??null);o instanceof Promise&&o.catch(n=>console.error(`Cannot call state change handler: ${n}`))}catch(o){console.error(`Error by callback of stateChanged: ${o}`)}}instanceMessage(e,t,i){var r;(r=this._instanceSubscriptions[t])==null||r.forEach(o=>{if(o.messageType===e){const n=o.callback(i,t,e);n instanceof Promise&&n.catch(a=>console.error(`Cannot call instance message handler: ${a}`))}})}fileChange(e,t,i){for(const r of Object.values(this.filesSubscribes))if(r.regId.test(e)&&r.regFilePattern.test(t))for(const o of r.cbs)try{o(e,t,i)}catch(n){console.error(`Error by callback of fileChange: ${n}`)}}async subscribeFiles(e,t,i){if(typeof i!="function")throw new Error("The state change handler must be a function!");let r;Array.isArray(t)?r=t:r=[t];const o=[];for(let n=0;n<r.length;n++){const a=r[n],c=`${e}$%$${a}`;this.filesSubscribes[c]?!this.filesSubscribes[c].cbs.includes(i)&&this.filesSubscribes[c].cbs.push(i):(this.filesSubscribes[c]={regId:new RegExp(or(e)),regFilePattern:new RegExp(or(a)),cbs:[i]},o.push(a))}return this.connected&&o.length&&this._socket.emit("subscribeFiles",e,o),Promise.resolve()}unsubscribeFiles(e,t,i){var n;let r;Array.isArray(t)?r=t:r=[t];const o=[];for(let a=0;a<r.length;a++){const c=r[a],l=`${e}$%$${c}`;if(this.filesSubscribes[l]){const N=this.filesSubscribes[l];if(i){const u=N.cbs.indexOf(i);u!==-1&&N.cbs.splice(u,1)}else N.cbs=[];(n=N.cbs)!=null&&n.length||(delete this.filesSubscribes[l],o.push(c))}}this.connected&&o.length&&this._socket.emit("unsubscribeFiles",e,o)}async request({cacheKey:e,forceUpdate:t,commandTimeout:i,onTimeout:r,requireAdmin:o,requireFeatures:n,executor:a}){if(o&&ze.isWeb())return Promise.reject(new Error(Ie.NOT_ADMIN));if(e&&!t&&e in this._promises)return this._promises[e];if(!this.connected)return Promise.reject(new Error(Ie.NOT_CONNECTED));if(n!=null&&n.length){for(const l of n)if(!await this.checkFeatureSupported(l))throw new Error(Ie.NOT_SUPPORTED)}const c=new Promise(async(l,N)=>{const u={elapsed:!1,clearTimeout:()=>{}};let L;i!==!1&&(L=setTimeout(()=>{u.elapsed=!0,r==null||r(),e&&this._promises[e]instanceof Promise&&delete this._promises[e],N(new Error(Ie.TIMEOUT))},i??this.props.cmdTimeout),u.clearTimeout=()=>{clearTimeout(L)});try{await a(l,N,u)}catch(g){e&&this._promises[e]instanceof Promise&&delete this._promises[e],N(new Error(g.toString()))}});return e&&(this._promises[e]=c),c}resetCache(e,t){t?Object.keys(this._promises).filter(i=>i.startsWith(e)).forEach(i=>{delete this._promises[i]}):delete this._promises[e]}getStates(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getStates",e,(r,o)=>{this.states=o??{},r?i(r):t(this.states)})}})}getState(e){return this.request({commandTimeout:!1,executor:(t,i)=>{if(e&&e===this.ignoreState){t(this.simStates[e]||{val:null,ack:!0});return}this._socket.emit("getState",e,(r,o)=>{r?i(r):t(o)})}})}getBinaryState(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getBinaryState",e,(r,o)=>{r?i(r):t(o)})}})}setBinaryState(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("setBinaryState",e,t,o=>{o?r(o):i()})}})}setState(e,t,i){return typeof i=="boolean"&&(t={val:t,ack:i}),this.request({commandTimeout:!1,executor:(r,o)=>{if(e&&e===this.ignoreState){let n;if(typeof i=="boolean"||typeof t=="object"&&t.val!==void 0?n=t:n={val:t,ack:!1,ts:Date.now(),lc:Date.now(),from:"system.adapter.vis.0"},this.simStates[e]=n,this.statesSubscribes[e])for(const a of this.statesSubscribes[e].cbs)try{const c=a(e,n);c instanceof Promise&&c.catch(l=>console.error(`Cannot call state change handler: ${l}`))}catch(c){console.error(`Error by callback of stateChanged: ${c}`)}r();return}this._socket.emit("setState",e,t,n=>{n?o(n):r()})}})}getObjects(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{if(!e&&this.objects){i(this.objects);return}this._socket.emit(ze.isWeb()?"getObjects":"getAllObjects",(o,n)=>{var a,c;t||(c=(a=this.props).onProgress)==null||c.call(a,rt.OBJECTS_LOADED),o?r(o):(this.objects=n??{},i(this.objects))})}})}getObjectsById(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getObjects",e,(r,o)=>{r?i(r):t(o)})}})}_subscribe(e){var t,i;if(e&&!this.subscribed){this.subscribed=!0,(t=this.props.autoSubscribes)!=null&&t.length&&this._socket.emit("subscribeObjects",this.props.autoSubscribes);const r=Object.keys(this.objectsSubscribes);r.length&&this._socket.emit("subscribeObjects",r),Object.keys(this.objectsSubscribes).forEach(o=>this._socket.emit("subscribeObjects",o)),this.props.autoSubscribeLog&&this._socket.emit("requireLog",!0),Object.keys(this.statesSubscribes).forEach(o=>this._socket.emit("subscribe",o)),Object.keys(this.filesSubscribes).forEach(o=>{const[n,a]=o.split("$%$");this._socket.emit("subscribeFiles",n,a)})}else if(!e&&this.subscribed){this.subscribed=!1,(i=this.props.autoSubscribes)!=null&&i.length&&this._socket.emit("unsubscribeObjects",this.props.autoSubscribes);const r=Object.keys(this.objectsSubscribes);r.length&&this._socket.emit("unsubscribeObjects",r),this.props.autoSubscribeLog&&this._socket.emit("requireLog",!1),Object.keys(this.statesSubscribes).forEach(o=>this._socket.emit("unsubscribe",o)),Object.keys(this.filesSubscribes).forEach(o=>{const[n,a]=o.split("$%$");this._socket.emit("unsubscribeFiles",n,a)})}}requireLog(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("requireLog",e,r=>{r?i(r):t()})}})}delObject(e,t=!1){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("delObject",e,{maintenance:t},o=>{o?r(o):i()})}})}delObjects(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("delObjects",e,{maintenance:t},o=>{o?r(o):i()})}})}setObject(e,t){return t?(t=JSON.parse(JSON.stringify(t)),delete t.from,delete t.user,delete t.ts,this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("setObject",e,t,o=>{o?r(o):i()})}})):Promise.reject(new Error("Null object is not allowed"))}getObject(e){return this.request({commandTimeout:!1,executor:(t,i)=>{if(e&&e===this.ignoreState){t({_id:this.ignoreState,type:"state",common:{name:"ignored state",type:"mixed"}});return}this._socket.emit("getObject",e,(r,o)=>{r?i(r):t(o)})}})}sendTo(e,t,i){return this.request({commandTimeout:!1,executor:r=>{this._socket.emit("sendTo",e,t,i,o=>{r(o)})}})}extendObject(e,t){return t?(t=JSON.parse(JSON.stringify(t)),delete t.from,delete t.user,delete t.ts,this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("extendObject",e,t,o=>{o?r(o):i()})}})):Promise.reject(new Error("Null object is not allowed"))}registerLogHandler(e){this.onLogHandlers.includes(e)||this.onLogHandlers.push(e)}unregisterLogHandler(e){const t=this.onLogHandlers.indexOf(e);t!==-1&&this.onLogHandlers.splice(t,1)}registerConnectionHandler(e){this.onConnectionHandlers.includes(e)||this.onConnectionHandlers.push(e)}unregisterConnectionHandler(e){const t=this.onConnectionHandlers.indexOf(e);t!==-1&&this.onConnectionHandlers.splice(t,1)}registerCmdStdoutHandler(e){this.onCmdStdoutHandler=e}unregisterCmdStdoutHandler(){this.onCmdStdoutHandler=void 0}registerCmdStderrHandler(e){this.onCmdStderrHandler=e}unregisterCmdStderrHandler(){this.onCmdStderrHandler=void 0}registerCmdExitHandler(e){this.onCmdExitHandler=e}unregisterCmdExitHandler(){this.onCmdExitHandler=void 0}getEnums(e,t){return this.request({cacheKey:`enums_${e||"all"}`,forceUpdate:t,commandTimeout:!1,executor:(i,r)=>{this._socket.emit("getObjectView","system","enum",{startkey:`enum.${e||""}`,endkey:e?`enum.${e}.香`:"enum.香"},(o,n)=>{if(o)r(o);else{const a={};if(n)for(let c=0;c<n.rows.length;c++)e&&n.rows[c].id===`enum.${e}`||(a[n.rows[c].id]=n.rows[c].value);i(a)}})}})}getObjectView(e,t,i){return this.getObjectViewCustom("system",i,e,t)}getObjectViewSystem(e,t,i){return this.getObjectViewCustom("system",e,t,i)}getObjectViewCustom(e,t,i,r){return this.request({commandTimeout:!1,executor:(o,n)=>{i=i||"",r=r||"香",this._socket.emit("getObjectView",e,t,{startkey:i,endkey:r},(a,c)=>{if(a)n(a);else{const l={};if(c&&c.rows)for(let N=0;N<c.rows.length;N++)l[c.rows[N].id]=c.rows[N].value;o(l)}})}})}readMetaItems(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getObjectView","system","meta",{startkey:"",endkey:"香"},(i,r)=>{var o;i?t(i):e((o=r.rows)==null?void 0:o.map(n=>n.value).filter(n=>!!n))})}})}readDir(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("readDir",e,t,(o,n)=>{o?r(o):i(n)})}})}readFile(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit(i?"readFile64":"readFile",e,t,(n,a,c)=>{n?o(n):r({file:a,mimeType:c})})}})}writeFile64(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{if(typeof i=="string")this._socket.emit("writeFile",e,t,i,n=>{n?o(n):r()});else{const n=btoa(new Uint8Array(i).reduce((a,c)=>a+String.fromCharCode(c),""));this._socket.emit("writeFile64",e,t,n,a=>{a?o(a):r()})}}})}deleteFile(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("deleteFile",e,t,o=>{o?r(o):i()})}})}deleteFolder(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("deleteFolder",e,t,o=>{o?r(o):i()})}})}rename(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("rename",e,t,i,n=>{n?o(n):r()})}})}renameFile(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("renameFile",e,t,i,n=>{n?o(n):r()})}})}cmdExec(e,t,i,r){return this.request({commandTimeout:r,executor:(o,n,a)=>{e=Tt(e),this._socket.emit("cmdExec",e,i,t,c=>{a.elapsed||(a.clearTimeout(),c?n(c):o())})}})}getSystemConfig(e){return this.request({cacheKey:"systemConfig",forceUpdate:e,commandTimeout:!1,executor:async t=>{let i=await this.getObject("system.config");i??={},i.common??={},i.native??={},t(i)}})}getCompactSystemConfig(e){return this.request({cacheKey:"systemConfigCommon",forceUpdate:e,commandTimeout:!1,requireAdmin:!0,executor:(t,i)=>{this._socket.emit("getCompactSystemConfig",(r,o)=>{r?i(r):(o??={},o.common??={},o.native??={},t(o))})}})}getForeignStates(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getForeignStates",e||"*",(r,o)=>{r?i(r):t(o??{})})}})}getForeignObjects(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("getForeignObjects",e||"*",t,(o,n)=>{o?r(o):i(n)})}})}setSystemConfig(e){return this.setObject("system.config",e)}getRawSocket(){return this._socket}getHistory(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("getHistory",e,t,(o,n)=>{o?r(o):i(n)})}})}getHistoryEx(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("getHistory",e,t,(o,n,a,c)=>{o?r(o):i({values:n,sessionId:c,step:a})})}})}getIpAddresses(e,t){return e=Tt(e),this.request({cacheKey:`IPs_${e}`,forceUpdate:t,commandTimeout:!1,executor:async i=>{const r=await this.getObject(e);i((r==null?void 0:r.common.address)??[])}})}getVersion(e){return this.request({cacheKey:"version",forceUpdate:e,commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getVersion",(r,o,n)=>{r&&!o&&typeof r=="string"&&r.match(/\d+\.\d+\.\d+/)?t({version:r,serverName:"socketio"}):r?i(r):t({version:o,serverName:n})})}})}getWebServerName(){return this.request({cacheKey:"webName",commandTimeout:!1,executor:(e,t)=>{this._socket.emit("getAdapterName",(i,r)=>{i?t(i):e(r)})}})}fileExists(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("fileExists",e,t,(o,n)=>{o?r(o):i(!!n)})}})}getCurrentUser(){return this.request({commandTimeout:!1,executor:e=>{this._socket.emit("authEnabled",(t,i)=>{e(i)})}})}getUuid(){return this.request({cacheKey:"uuid",commandTimeout:!1,executor:async e=>{var i;const t=await this.getObject("system.meta.uuid");e((i=t==null?void 0:t.native)==null?void 0:i.uuid)}})}checkFeatureSupported(e,t){return this.request({cacheKey:`supportedFeatures_${e}`,forceUpdate:t,commandTimeout:!1,executor:(i,r)=>{this._socket.emit("checkFeatureSupported",e,(o,n)=>{o?r(o):i(n)})}})}getAdapterInstances(e,t){return typeof e=="boolean"&&(t=e,e=""),e=e||"",this.request({cacheKey:`instances_${e}`,forceUpdate:t,commandTimeout:!1,executor:async i=>{const r=e?`system.adapter.${e}.`:"system.adapter.",o=`${r}香`,n=await this.getObjectViewSystem("instance",r,o),a=Object.values(n);i(e?a.filter(c=>c.common.name===e):a)}})}getAdapters(e,t){return typeof e=="boolean"&&(t=e,e=""),e=e||"",this.request({cacheKey:`adapter_${e}`,forceUpdate:t,commandTimeout:!1,executor:async i=>{const r=await this.getObjectViewSystem("adapter",`system.adapter.${e||""}`,`system.adapter.${e||"香"}`),o=Object.values(r);i(e?o.filter(n=>n.common.name===e):o)}})}getGroups(e){return this.request({cacheKey:"groups",forceUpdate:e,commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getObjectView","system","group",{startkey:"system.group.",endkey:"system.group.香"},(r,o)=>{r?i(r):t(Nn(o))})}})}logout(){return this.request({commandTimeout:!1,executor:(e,t)=>{this._socket.emit("logout",i=>{i?t(i):e(null)})}})}subscribeOnInstance(e,t,i,r){return this.request({commandTimeout:!1,executor:(o,n)=>{this._socket.emit("clientSubscribe",e,t,i,(a,c)=>{a?n(a):c&&(c.error?n(c.error):(e.startsWith("system.adapter.")||(e=`system.adapter.${e}`),this._instanceSubscriptions[e]=this._instanceSubscriptions[e]||[],this._instanceSubscriptions[e].find(l=>l.messageType===t&&l.callback===r)||this._instanceSubscriptions[e].push({messageType:t,callback:r}),o(c)))})}})}unsubscribeFromInstance(e,t,i){var n;e.startsWith("system.adapter.")||(e=`system.adapter.${e}`);let r;const o=[];do{r=!1;const a=(n=this._instanceSubscriptions[e])==null?void 0:n.findIndex(c=>(!t||c.messageType===t)&&(!i||c.callback===i));if(a!=null&&a!==-1){r=!0;const c=this._instanceSubscriptions[e][a].messageType;this._instanceSubscriptions[e].splice(a,1),this._instanceSubscriptions[e].length||delete this._instanceSubscriptions[e],this._instanceSubscriptions[e]&&this._instanceSubscriptions[e].find(N=>N.messageType===c)||o.push(this.request({commandTimeout:!1,executor:(N,u)=>{this._socket.emit("clientUnsubscribe",e,t,(L,g)=>L?u(L):N(g))}}))}}while(r&&(!i||!t));return o.length?Promise.all(o).then(a=>!!a.find(c=>c)):Promise.resolve(!1)}log(e,t){return e?this.request({commandTimeout:!1,executor:i=>(this._socket.emit("log",e,t),i(null))}):Promise.resolve(null)}setStateToIgnore(e){this.ignoreState=e}}function Fg(s,e){if(!e)return;let t;if(e.length<700&&(e.indexOf("/")!==-1||e.indexOf("\\")!==-1))if(s.toLowerCase().includes("private"))t="private";else if(e.toLowerCase().includes("private"))t="private";else if(s.toLowerCase().includes("public"))t="public";else if(e.toLowerCase().includes("public"))t="public";else if(s.toLowerCase().includes("chain"))t="chained";else if(e.toLowerCase().includes("chain"))t="chained";else return;else t=e.substring(0,26)==="-----BEGIN RSA PRIVATE KEY"||e.substring(0,22)==="-----BEGIN PRIVATE KEY"?"private":"public",t==="public"&&e.split("-----END CERTIFICATE-----").filter(r=>r.replace(/\r\n|\r|\n/,"").trim()).length>1&&(t="chained");return{name:s,type:t}}function Gg(s){var i,r,o,n;const e=[{name:"[IPv4] 0.0.0.0 - Listen on all IPs",address:"0.0.0.0",family:"ipv4"}],t=[{name:"[IPv6] :: - Listen on all IPs",address:"::",family:"ipv6"}];if((r=(i=s.native)==null?void 0:i.hardware)!=null&&r.networkInterfaces){const a=(n=(o=s.native)==null?void 0:o.hardware)==null?void 0:n.networkInterfaces;Object.keys(a).forEach(c=>{a[c].forEach(l=>{l.family!=="IPv6"?e.push({name:`[${l.family}] ${l.address} - ${c}`,address:l.address,family:"ipv4"}):t.push({name:`[${l.family}] ${l.address} - ${c}`,address:l.address,family:"ipv6"})})})}return{IPs4:e,IPs6:t}}class s5e extends ze{constructor(e){super(e)}request(e){return super.request({requireAdmin:!0,...e})}getCertificates(e){return this.request({cacheKey:"cert",forceUpdate:e,commandTimeout:!1,executor:async t=>{var r;const i=await this.getObject("system.certificates");(r=i==null?void 0:i.native)!=null&&r.certificates?t(Object.entries(i.native.certificates).map(([o,n])=>Fg(o,n)).filter(o=>!!o)):t([])}})}getLogs(e,t=200){return this.request({commandTimeout:!1,executor:i=>{this._socket.emit("sendToHost",e,"getLogs",t||200,r=>{i(r)})}})}upgradeAdapterWithWebserver(e,t){return this.request({commandTimeout:!1,executor:i=>{this._socket.emit("sendToHost",e,"upgradeAdapterWithWebserver",t,r=>{i(r)})}})}upgradeController(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("sendToHost",e,"upgradeController",{version:t,adminInstance:i},n=>{const a=n;a.error?o(a.error):r(a.result)})}})}updateLicenses(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("updateLicenses",e,t,(o,n)=>{o?r(o):i(n)})}})}upgradeOsPackages(e,t,i){return this.request({commandTimeout:!1,executor:r=>{this._socket.emit("sendToHost",e,"upgradeOsPackages",{packages:t,restart:!!i},o=>{r(o)})}})}getLogsFiles(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("readLogs",e,(r,o)=>{r&&i(r),t(o)})}})}delLogs(e){return this.request({commandTimeout:!1,executor:(t,i)=>{this._socket.emit("sendToHost",e,"delLogs",null,r=>{r&&i(r),t()})}})}deleteFile(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("deleteFile",e,t,o=>{o&&r(o),i()})}})}deleteFolder(e,t){return this.request({commandTimeout:!1,executor:(i,r)=>{this._socket.emit("deleteFolder",e,t,o=>{o&&r(o),i()})}})}rename(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("rename",e,t,i,n=>{n&&o(n),r()})}})}renameFile(e,t,i){return this.request({commandTimeout:!1,executor:(r,o)=>{this._socket.emit("renameFile",e,t,i,n=>{n&&o(n),r()})}})}getHosts(e){return this.request({cacheKey:"hosts",forceUpdate:e,commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getObjectView","system","host",{startkey:"system.host.",endkey:"system.host.香"},(r,o)=>{r?i(r):t(Nn(o))})}})}getUsers(e){return this.request({cacheKey:"users",forceUpdate:e,commandTimeout:!1,executor:(t,i)=>{this._socket.emit("getObjectView","system","user",{startkey:"system.user.",endkey:"system.user.香"},(r,o)=>{r?i(r):t(Nn(o))})}})}renameGroup(e,t,i){return this.request({commandTimeout:!1,executor:async r=>{const o=await this.getGroups(!0),n=o.filter(c=>c._id.startsWith(`${e}.`));for(const c of n){const l=c._id,N=t+c._id.substring(e.length);c._id=N,await this.setObject(N,c),await this.delObject(l)}const a=o.find(c=>c._id===e);if(a){const c=a._id;a._id=t,i!==void 0&&(a.common??={},a.common.name=i),await this.setObject(t,a),await this.delObject(c)}r()}})}getHostInfo(e,t,i){return e=Tt(e),this.request({cacheKey:`hostInfo_${e}`,forceUpdate:t,commandTimeout:i,executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"getHostInfo",null,a=>{n.elapsed||(n.clearTimeout(),a===Ie.PERMISSION_ERROR?o('May not read "getHostInfo"'):a?r(a):o('Cannot read "getHostInfo"'))})}})}getHostInfoShort(e,t,i){return e=Tt(e),this.request({cacheKey:`hostInfoShort_${e}`,forceUpdate:t,commandTimeout:i,executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"getHostInfoShort",null,a=>{n.elapsed||(n.clearTimeout(),a===Ie.PERMISSION_ERROR?o('May not read "getHostInfoShort"'):a?r(a):o('Cannot read "getHostInfoShort"'))})}})}getRepository(e,t,i,r){return this.request({cacheKey:`repository_${e}`,forceUpdate:i,commandTimeout:r,executor:(o,n,a)=>{this._socket.emit("sendToHost",e,"getRepository",t,c=>{a.elapsed||(a.clearTimeout(),c===Ie.PERMISSION_ERROR?n('May not read "getRepository"'):c?o(c):n('Cannot read "getRepository"'))})}})}getInstalled(e,t,i){return e=Tt(e),this.request({cacheKey:`installed_${e}`,forceUpdate:t,commandTimeout:i,executor:(r,o,n)=>{this._socket.emit("sendToHost",e,"getInstalled",null,a=>{n.elapsed||(n.clearTimeout(),a===Ie.PERMISSION_ERROR?o('May not read "getInstalled"'):a?r(a):o('Cannot read "getInstalled"'))})}})}cmdExec(e,t,i,r){return this.request({commandTimeout:r,executor:(o,n,a)=>{e=Tt(e),this._socket.emit("cmdExec",e,i,t,c=>{a.elapsed||(a.clearTimeout(),c&&n(c),o())})}})}readBaseSettings(e){return e=ci(e),this.request({requireFeatures:["CONTROLLER_READWRITE_BASE_SETTINGS"],executor:(t,i,r)=>{this._socket.emit("sendToHost",e,"readBaseSettings",null,o=>{r.elapsed||(r.clearTimeout(),o===Ie.PERMISSION_ERROR?i('May not read "BaseSettings"'):o?o.error?i(new Error(o.error)):t(o):i('Cannot read "BaseSettings"'))})}})}writeBaseSettings(e,t){return e=ci(e),this.request({requireFeatures:["CONTROLLER_READWRITE_BASE_SETTINGS"],executor:(i,r,o)=>{this._socket.emit("sendToHost",e,"writeBaseSettings",t,n=>{o.elapsed||(o.clearTimeout(),n===Ie.PERMISSION_ERROR?r('May not write "BaseSettings"'):n?i(n):r('Cannot write "BaseSettings"'))})}})}restartController(e){return e=ci(e),this.request({executor:(t,i,r)=>{this._socket.emit("sendToHost",e,"restartController",null,()=>{r.elapsed||(r.clearTimeout(),t(!0))})}})}getDiagData(e,t){return e=ci(e),this.request({executor:(i,r,o)=>{this._socket.emit("sendToHost",e,"getDiagData",t,n=>{o.elapsed||(o.clearTimeout(),i(n||null))})}})}changePassword(e,t){return this.request({executor:(i,r,o)=>{this._socket.emit("changePassword",e,t,n=>{o.elapsed||(o.clearTimeout(),n&&r(n),i())})}})}getIpAddresses(e,t){return e=Tt(e),this.request({cacheKey:`IPs_${e}`,forceUpdate:t,commandTimeout:!1,executor:async i=>{const r=await this.getObject(e);i((r==null?void 0:r.common.address)??[])}})}getHostByIp(e,t){return e=ci(e),this.request({cacheKey:`rIPs_${e}`,forceUpdate:t,executor:(i,r,o)=>{this._socket.emit("getHostByIp",e,(n,a)=>{if(o.elapsed)return;o.clearTimeout();const{IPs4:c,IPs6:l}=Gg(a);i([...c,...l])})}})}encrypt(e){return this.request({executor:(t,i,r)=>{this._socket.emit("encrypt",e,(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}decrypt(e){return this.request({executor:(t,i,r)=>{this._socket.emit("decrypt",e,(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}chmodFile(e,t,i){return this.request({executor:(r,o,n)=>{this._socket.emit("chmodFile",e,t,i,(a,c)=>{n.elapsed||(n.clearTimeout(),a&&o(a),r(c))})}})}chownFile(e,t,i){return this.request({executor:(r,o,n)=>{this._socket.emit("chownFile",e,t,i,(a,c)=>{n.elapsed||(n.clearTimeout(),a&&o(a),r(c))})}})}getNotifications(e,t){return this.request({executor:(i,r,o)=>{this._socket.emit("sendToHost",e,"getNotifications",{category:t},n=>{o.elapsed||(o.clearTimeout(),i(n))})}})}clearNotifications(e,t){return this.request({executor:(i,r,o)=>{this._socket.emit("sendToHost",e,"clearNotifications",{category:t},n=>{o.elapsed||(o.clearTimeout(),i(n))})}})}getIsEasyModeStrict(){return this.request({executor:(e,t,i)=>{this._socket.emit("getIsEasyModeStrict",(r,o)=>{i.elapsed||(i.clearTimeout(),r&&t(r),e(!!o))})}})}getEasyMode(){return this.request({executor:(e,t,i)=>{this._socket.emit("getEasyMode",(r,o)=>{i.elapsed||(i.clearTimeout(),r?t(new Error(r)):e(o))})}})}getRatings(e){return this.request({executor:(t,i,r)=>{this._socket.emit("getRatings",!!e,(o,n)=>{r.elapsed||(r.clearTimeout(),o?i(new Error(o)):t(n))})}})}getCurrentSession(e){const t=new AbortController;return this.request({commandTimeout:e||5e3,onTimeout:()=>{t.abort()},executor:async(i,r,o)=>{try{const n=await fetch("./session",{signal:t.signal});if(o.elapsed)return;o.clearTimeout();const a=await n.json();i(a)}catch(n){r(`getCurrentSession: ${n}`)}}})}getCurrentInstance(){return this.request({cacheKey:"currentInstance",executor:(e,t,i)=>{this._socket.emit("getCurrentInstance",(r,o)=>{i.elapsed||(i.clearTimeout(),r?t(r):e(o))})}})}getAdapterInstances(e,t){let i;return typeof e=="boolean"?(t=e,i=""):i=e||"",this.request({cacheKey:`instances_${i}`,forceUpdate:t,executor:(r,o,n)=>{this._socket.emit("getAdapterInstances",i,(a,c)=>{n.elapsed||(n.clearTimeout(),a&&o(a),r(c))})}})}getAdapters(e,t){let i;return typeof e=="boolean"?(t=e,i=""):i=e||"",this.request({cacheKey:`adapter_${i}`,forceUpdate:t,executor:(r,o,n)=>{this._socket.emit("getAdapters",i,(a,c)=>{n.elapsed||(n.clearTimeout(),a&&o(a),r(c))})}})}getCompactAdapters(e){return this.request({cacheKey:"compactAdapters",forceUpdate:e,executor:(t,i,r)=>{this._socket.emit("getCompactAdapters",(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}getAdaptersResetCache(e){e=e??"",this.resetCache(`adapter_${e}`),this.resetCache("compactAdapters")}getCompactInstances(e){return this.request({cacheKey:"compactInstances",forceUpdate:e,executor:(t,i,r)=>{this._socket.emit("getCompactInstances",(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}getAdapterInstancesResetCache(e){e=e??"",this.resetCache(`instances_${e}`),this.resetCache("compactInstances")}getCompactInstalled(e,t,i){return e=Tt(e),this.request({cacheKey:`installedCompact_${e}`,forceUpdate:t,commandTimeout:i,executor:(r,o,n)=>{this._socket.emit("getCompactInstalled",e,a=>{n.elapsed||(n.clearTimeout(),a===Ie.PERMISSION_ERROR?o('May not read "getCompactInstalled"'):a?r(a):o('Cannot read "getCompactInstalled"'))})}})}getInstalledResetCache(e){e?(this.resetCache(`installedCompact_${e}`),this.resetCache(`installed_${e}`)):(this.resetCache("installedCompact_",!0),this.resetCache("installed_",!0))}getCompactRepository(e,t,i){return e=Tt(e),this.request({cacheKey:`repositoryCompact_${e}`,forceUpdate:t,commandTimeout:i,executor:(r,o,n)=>{this._socket.emit("getCompactRepository",e,a=>{n.elapsed||(n.clearTimeout(),a===Ie.PERMISSION_ERROR?o('May not read "getCompactRepository"'):a?r(a):o('Cannot read "getCompactRepository"'))})}})}getRepositoryResetCache(e){e?(this.resetCache(`repositoryCompact_${e}`),this.resetCache(`repository_${e}`)):(this.resetCache("repositoryCompact_",!0),this.resetCache("repository_",!0))}getCompactHosts(e){return this.request({cacheKey:"hostsCompact",forceUpdate:e,executor:(t,i,r)=>{this._socket.emit("getCompactHosts",(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}getCompactSystemRepositories(e){return this.request({cacheKey:"repositoriesCompact",forceUpdate:e,executor:(t,i,r)=>{this._socket.emit("getCompactSystemRepositories",(o,n)=>{r.elapsed||(r.clearTimeout(),o&&i(o),t(n))})}})}}const H=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,ie=globalThis,Zt="9.43.0";function qr(){return eo(ie),ie}function eo(s){const e=s.__SENTRY__=s.__SENTRY__||{};return e.version=e.version||Zt,e[Zt]=e[Zt]||{}}function Pi(s,e,t=ie){const i=t.__SENTRY__=t.__SENTRY__||{},r=i[Zt]=i[Zt]||{};return r[s]||(r[s]=e())}const Hg=["debug","info","warn","error","log","assert","trace"],Vg="Sentry Logger ",Yr={};function Hs(s){if(!("console"in ie))return s();const e=ie.console,t={},i=Object.keys(Yr);i.forEach(r=>{const o=Yr[r];t[r]=e[r],e[r]=o});try{return s()}finally{i.forEach(r=>{e[r]=t[r]})}}function Zg(){ja().enabled=!0}function Xg(){ja().enabled=!1}function wN(){return ja().enabled}function Kg(...s){ga("log",...s)}function qg(...s){ga("warn",...s)}function ej(...s){ga("error",...s)}function ga(s,...e){H&&wN()&&Hs(()=>{ie.console[s](`${Vg}[${s}]:`,...e)})}function ja(){return H?Pi("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const R={enable:Zg,disable:Xg,isEnabled:wN,log:Kg,warn:qg,error:ej},CN=50,Xt="?",HM=/\(error: (.*)\)/,VM=/captureMessage|captureException/;function IN(...s){const e=s.sort((t,i)=>t[0]-i[0]).map(t=>t[1]);return(t,i=0,r=0)=>{const o=[],n=t.split(`
2
2
  `);for(let a=i;a<n.length;a++){const c=n[a];if(c.length>1024)continue;const l=HM.test(c)?c.replace(HM,"$1"):c;if(!l.match(/\S*Error: /)){for(const N of e){const u=N(l);if(u){o.push(u);break}}if(o.length>=CN+r)break}}return sj(o.slice(r))}}function tj(s){return Array.isArray(s)?IN(...s):s}function sj(s){if(!s.length)return[];const e=Array.from(s);return/sentryWrapped/.test(nr(e).function||"")&&e.pop(),e.reverse(),VM.test(nr(e).function||"")&&(e.pop(),VM.test(nr(e).function||"")&&e.pop()),e.slice(0,CN).map(t=>({...t,filename:t.filename||nr(e).filename,function:t.function||Xt}))}function nr(s){return s[s.length-1]||{}}const Oo="<anonymous>";function vt(s){try{return!s||typeof s!="function"?Oo:s.name||Oo}catch{return Oo}}function ZM(s){const e=s.exception;if(e){const t=[];try{return e.values.forEach(i=>{i.stacktrace.frames&&t.push(...i.stacktrace.frames)}),t}catch{return}}}const Ar={},XM={};function is(s,e){Ar[s]=Ar[s]||[],Ar[s].push(e)}function rs(s,e){if(!XM[s]){XM[s]=!0;try{e()}catch(t){H&&R.error(`Error while instrumenting ${s}`,t)}}}function Ke(s,e){const t=s&&Ar[s];if(t)for(const i of t)try{i(e)}catch(r){H&&R.error(`Error while triggering instrumentation handler.
3
3
  Type: ${s}
4
4
  Name: ${vt(i)}