homebridge-config-ui-x 5.0.0-beta.86 → 5.0.0-beta.88

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.
Files changed (84) hide show
  1. package/CHANGELOG.md +3 -3
  2. package/config.schema.json +0 -12
  3. package/dist/core/auth/auth.controller.d.ts +6 -0
  4. package/dist/core/config/config.service.d.ts +6 -0
  5. package/dist/core/config/config.service.js +6 -0
  6. package/dist/core/config/config.service.js.map +1 -1
  7. package/dist/main.js +1 -0
  8. package/dist/main.js.map +1 -1
  9. package/package.json +3 -3
  10. package/public/{chunk-6XORWM6U.js → chunk-2GY53VDW.js} +1 -1
  11. package/public/{chunk-6B2RZNXN.js → chunk-2OEG7XPN.js} +1 -1
  12. package/public/{chunk-3BS4LV54.js → chunk-2P72Z5GQ.js} +1 -1
  13. package/public/{chunk-OB3DRFUW.js → chunk-2ZIVRYEW.js} +1 -1
  14. package/public/{chunk-QDQR3ZJF.js → chunk-3GG5OHAL.js} +1 -1
  15. package/public/{chunk-JBSOG3K2.js → chunk-3VB3AW6E.js} +1 -1
  16. package/public/chunk-4JO4BZXN.js +1 -0
  17. package/public/{chunk-F3P3PZQR.js → chunk-4MSR3JUA.js} +1 -1
  18. package/public/{chunk-USP3JGJG.js → chunk-4T6QUAUK.js} +1 -1
  19. package/public/chunk-6EJDUITC.js +1 -0
  20. package/public/chunk-6GW5TYOW.js +1 -0
  21. package/public/{chunk-IWA3TOG2.js → chunk-7XITHR3W.js} +1 -1
  22. package/public/{chunk-RVS3XXFW.js → chunk-A2PQ3T4C.js} +1 -1
  23. package/public/{chunk-UDDEGACW.js → chunk-ALZ2VKRE.js} +1 -1
  24. package/public/{chunk-4OFN5X2Y.js → chunk-CU4KLIWT.js} +1 -1
  25. package/public/{chunk-QUACBYEX.js → chunk-D76SU6HH.js} +1 -1
  26. package/public/{chunk-BG2WSSJ4.js → chunk-DAWRVRMV.js} +1 -1
  27. package/public/chunk-DI37RMF4.js +1 -0
  28. package/public/{chunk-YHWBUU7X.js → chunk-EMZ4I5EZ.js} +1 -1
  29. package/public/{chunk-WGMA3BLJ.js → chunk-F5PFK5KP.js} +1 -1
  30. package/public/{chunk-IWVLVUZD.js → chunk-FU7E6OMM.js} +1 -1
  31. package/public/chunk-FUYZJ5A5.js +1 -0
  32. package/public/{chunk-FXR7CTH7.js → chunk-FZC446UQ.js} +1 -1
  33. package/public/{chunk-RJGZEV2W.js → chunk-H3IOZMDH.js} +1 -1
  34. package/public/{chunk-UVLB2ENM.js → chunk-JDC75DEA.js} +1 -1
  35. package/public/{chunk-B454JU5N.js → chunk-JEVUBVIW.js} +1 -1
  36. package/public/{chunk-7AZ4UU6X.js → chunk-JYNDHHKS.js} +1 -1
  37. package/public/chunk-JZUATNVB.js +1 -0
  38. package/public/chunk-KHXSLNEQ.js +1 -0
  39. package/public/{chunk-TMMFITOH.js → chunk-L3HYMYAM.js} +1 -1
  40. package/public/{chunk-DZVDMMEY.js → chunk-LA4JXO55.js} +1 -1
  41. package/public/{chunk-XNFNTTCN.js → chunk-LBFWQVUA.js} +1 -1
  42. package/public/{chunk-XY3PFHZ6.js → chunk-LFQTC3JD.js} +1 -1
  43. package/public/chunk-LHQPGOZD.js +1 -0
  44. package/public/{chunk-SX4HEBEE.js → chunk-LVFP22MJ.js} +1 -1
  45. package/public/{chunk-OE5UHUN3.js → chunk-MHXMQUVU.js} +1 -1
  46. package/public/{chunk-BF4EH34O.js → chunk-MUCE3524.js} +1 -1
  47. package/public/{chunk-A7NP35TI.js → chunk-OYBAO5D4.js} +1 -1
  48. package/public/{chunk-G6RNKKPJ.js → chunk-QUJJHTI7.js} +1 -1
  49. package/public/chunk-R35MAK5U.js +1 -0
  50. package/public/{chunk-MHCIZSEW.js → chunk-RDRJSNDD.js} +1 -1
  51. package/public/{chunk-2PUMXV54.js → chunk-RPCPH2GJ.js} +1 -1
  52. package/public/{chunk-LAPG6TY4.js → chunk-SD6WI76W.js} +1 -1
  53. package/public/{chunk-IFICSVUO.js → chunk-SF3KWWNT.js} +1 -1
  54. package/public/{chunk-NGOJKCBK.js → chunk-TNXCVVXQ.js} +1 -1
  55. package/public/chunk-TPZQI2CE.js +1 -0
  56. package/public/chunk-TRRQFGWG.js +1 -0
  57. package/public/chunk-URU3ZBPS.js +1 -0
  58. package/public/chunk-UVG5GEHI.js +1 -0
  59. package/public/{chunk-MH5ZUPB5.js → chunk-VSJQXCHH.js} +1 -1
  60. package/public/{chunk-F22JGE7A.js → chunk-VZLOSGS7.js} +1 -1
  61. package/public/{chunk-5JP4FXOB.js → chunk-WBVWEXDQ.js} +1 -1
  62. package/public/chunk-WEAJZSV4.js +1 -0
  63. package/public/{chunk-OTS6PS3Z.js → chunk-WIFIII43.js} +1 -1
  64. package/public/{chunk-T4ATDPUM.js → chunk-XOPP6Y6C.js} +1 -1
  65. package/public/{chunk-XWCZPT6A.js → chunk-XPQ27PA2.js} +1 -1
  66. package/public/{chunk-NF4IEKEP.js → chunk-Z346FY4Q.js} +1 -1
  67. package/public/{chunk-NTUIMSK6.js → chunk-ZC52B47N.js} +1 -1
  68. package/public/index.html +1 -1
  69. package/public/main-NZVCJ2LY.js +1 -0
  70. package/public/chunk-3ZJC6SVJ.js +0 -1
  71. package/public/chunk-AS2LLEEB.js +0 -1
  72. package/public/chunk-DTUCS6ZI.js +0 -1
  73. package/public/chunk-HZ4AZCZF.js +0 -1
  74. package/public/chunk-LSDTC764.js +0 -1
  75. package/public/chunk-NSB5ON2L.js +0 -1
  76. package/public/chunk-O36YZXBO.js +0 -1
  77. package/public/chunk-PDFRV7MA.js +0 -1
  78. package/public/chunk-RHO55I2P.js +0 -1
  79. package/public/chunk-RUCXK46A.js +0 -1
  80. package/public/chunk-VJBLBCZM.js +0 -1
  81. package/public/chunk-W6FEQP6L.js +0 -1
  82. package/public/chunk-W6OMHBCB.js +0 -1
  83. package/public/chunk-WM2MFS26.js +0 -1
  84. package/public/main-5OJMP6YW.js +0 -1
@@ -1 +1 @@
1
- import{h as w,k as S}from"./chunk-VJBLBCZM.js";import{a as _,b as h}from"./chunk-KPKQNEWS.js";import{$a as e,Ac as s,Bc as m,Hb as d,Ib as c,Ob as n,Pb as i,Qb as u,Yb as v,jc as o,kc as a,la as p,lb as f}from"./chunk-QSPBB6EE.js";function y(t,C){t&1&&(n(0,"p",7),o(1),s(2,"translate"),i()),t&2&&(e(),a(m(2,1,"platform.linux.server_will_power_down")))}function g(t,C){if(t&1&&(n(0,"div",8),o(1),i()),t&2){let r=v();e(),a(r.error)}}var B=(()=>{class t{$api=p(S);$toastr=p(w);$translate=p(_);error=!1;constructor(){}ngOnInit(){this.$api.put("/platform-tools/linux/shutdown-host",{}).subscribe({error:r=>{console.error(r),this.error=this.$translate.instant("platform.linux.server_restart_error"),this.$toastr.error(this.$translate.instant("platform.linux.server_restart_error"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(l){return new(l||t)};static \u0275cmp=f({type:t,selectors:[["ng-component"]],decls:13,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"grey-text"],[1,"alert","alert-error","my-4"]],template:function(l,x){l&1&&(n(0,"div",0)(1,"h3",1),o(2),s(3,"translate"),i()(),n(4,"div",2)(5,"div",3),u(6,"i",4),i(),n(7,"div",5)(8,"h4",6),o(9),s(10,"translate"),i(),d(11,y,3,3,"p",7),d(12,g,2,1,"div",8),i()()),l&2&&(e(2),a(m(3,4,"menu.restart.title")),e(7),a(m(10,6,"platform.linux.shutting_down_server")),e(2),c(x.error?-1:11),e(),c(x.error?12:-1))},dependencies:[h],encapsulation:2})}return t})();export{B as a};
1
+ import{h as w,k as S}from"./chunk-6GW5TYOW.js";import{a as _,b as h}from"./chunk-KPKQNEWS.js";import{$a as e,Ac as s,Bc as m,Hb as d,Ib as c,Ob as n,Pb as i,Qb as u,Yb as v,jc as o,kc as a,la as p,lb as f}from"./chunk-QSPBB6EE.js";function y(t,C){t&1&&(n(0,"p",7),o(1),s(2,"translate"),i()),t&2&&(e(),a(m(2,1,"platform.linux.server_will_power_down")))}function g(t,C){if(t&1&&(n(0,"div",8),o(1),i()),t&2){let r=v();e(),a(r.error)}}var B=(()=>{class t{$api=p(S);$toastr=p(w);$translate=p(_);error=!1;constructor(){}ngOnInit(){this.$api.put("/platform-tools/linux/shutdown-host",{}).subscribe({error:r=>{console.error(r),this.error=this.$translate.instant("platform.linux.server_restart_error"),this.$toastr.error(this.$translate.instant("platform.linux.server_restart_error"),this.$translate.instant("toast.title_error"))}})}static \u0275fac=function(l){return new(l||t)};static \u0275cmp=f({type:t,selectors:[["ng-component"]],decls:13,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"grey-text"],[1,"alert","alert-error","my-4"]],template:function(l,x){l&1&&(n(0,"div",0)(1,"h3",1),o(2),s(3,"translate"),i()(),n(4,"div",2)(5,"div",3),u(6,"i",4),i(),n(7,"div",5)(8,"h4",6),o(9),s(10,"translate"),i(),d(11,y,3,3,"p",7),d(12,g,2,1,"div",8),i()()),l&2&&(e(2),a(m(3,4,"menu.restart.title")),e(7),a(m(10,6,"platform.linux.shutting_down_server")),e(2),c(x.error?-1:11),e(),c(x.error?12:-1))},dependencies:[h],encapsulation:2})}return t})();export{B as a};
@@ -1 +1 @@
1
- import{a}from"./chunk-LAPG6TY4.js";import"./chunk-JRQEWFL4.js";import"./chunk-SHW4IV7S.js";import"./chunk-XJY7A24W.js";import"./chunk-6SEBWKRM.js";import"./chunk-OHFVMRCL.js";import"./chunk-MMYB2ZMV.js";import"./chunk-QY7HUYL5.js";import"./chunk-IWA3TOG2.js";import"./chunk-VJBLBCZM.js";import"./chunk-R3JWGCC5.js";import"./chunk-KPKQNEWS.js";import"./chunk-QSPBB6EE.js";export{a as ConfigEditorComponent};
1
+ import{a}from"./chunk-SD6WI76W.js";import"./chunk-JRQEWFL4.js";import"./chunk-SHW4IV7S.js";import"./chunk-XJY7A24W.js";import"./chunk-6SEBWKRM.js";import"./chunk-OHFVMRCL.js";import"./chunk-MMYB2ZMV.js";import"./chunk-QY7HUYL5.js";import"./chunk-7XITHR3W.js";import"./chunk-6GW5TYOW.js";import"./chunk-R3JWGCC5.js";import"./chunk-KPKQNEWS.js";import"./chunk-QSPBB6EE.js";export{a as ConfigEditorComponent};
@@ -1,4 +1,4 @@
1
- import{a as pu,b as eb}from"./chunk-SHW4IV7S.js";import{a as A1}from"./chunk-XJY7A24W.js";import{a as en,b as tn}from"./chunk-TIE2WSHM.js";import{a as T1}from"./chunk-6SEBWKRM.js";import{a as j1,b as of}from"./chunk-DZVDMMEY.js";import{a as O1,b as M1}from"./chunk-DSBAEBB7.js";import{a as P1}from"./chunk-ZCCLGLMW.js";import{a as Yr}from"./chunk-HHPGR3HF.js";import{a as $1}from"./chunk-6M524CF7.js";import{a as Ur,b as Wr,c as Gr,d as Kr,e as Jr,f as Xr,g as du,m as ve,n as it,o as Qi}from"./chunk-OHFVMRCL.js";import{A as ss,a as y1,b as Ji,c as Xi,e as vt,f as v1,h as B1,i as x1,k as w1,l as Zu,m as S1,o as Yi,r as Zi,s as Bi,t as xi,y as I1,z as tu}from"./chunk-MMYB2ZMV.js";import{d as cu}from"./chunk-QY7HUYL5.js";import{a as ei}from"./chunk-6B2RZNXN.js";import{a as k1}from"./chunk-7AZ4UU6X.js";import{b as ze}from"./chunk-IWA3TOG2.js";import{h as _e,j as Qu,k as he}from"./chunk-VJBLBCZM.js";import{e as _1}from"./chunk-R3JWGCC5.js";import{a as Ee,b as Be}from"./chunk-KPKQNEWS.js";import{$a as l,Ac as y,Bc as B,Ca as Uu,Cc as je,D as r1,Da as D1,Fa as Wu,Gb as K,Hb as x,Ib as w,Jc as gt,Kb as nt,Kc as U,Lb as ft,Lc as Yu,M as Vr,Mb as rt,Nb as b,Nc as g1,Ob as c,Pb as p,Qb as S,Rb as p1,Sb as m1,Ub as H,Xa as de,Xb as O,Yb as h,Z as fs,_a as l1,a as X,aa as rf,ac as rs,b as Se,bc as os,bd as zt,cc as as,cd as vi,dc as Gu,dd as bt,e as F,eb as Lr,ec as Ku,fa as o1,fb as vu,g as Le,ga as Ot,gc as Qt,gd as b1,h as G,ha as Wi,hb as yi,hc as Ju,ic as Z,ja as a1,jc as E,k as u1,ka as s1,kc as L,kd as Hr,la as I,lb as Y,lc as q,mb as Gi,mc as xu,n as Pt,nb as Bu,nc as F1,o as ns,ob as d1,q as i1,qc as Pe,ra as j,rb as ce,rc as Oe,sa as N,sc as Me,sd as E1,tb as c1,tc as C1,ub as zr,uc as h1,v as n1,vc as ke,w as ae,wc as eu,x as f1,xc as Xu,yc as wu,za as Rr,zc as Ki}from"./chunk-QSPBB6EE.js";var Df=F(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.regexpCode=be.getEsmExportName=be.getProperty=be.safeStringify=be.stringify=be.strConcat=be.addCodeArg=be.str=be._=be.nil=be._Code=be.Name=be.IDENTIFIER=be._CodeOrName=void 0;var af=class{};be._CodeOrName=af;be.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var wi=class extends af{constructor(u){if(super(),!be.IDENTIFIER.test(u))throw new Error("CodeGen: name must be a valid identifier");this.str=u}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};be.Name=wi;var Ht=class extends af{constructor(u){super(),this._items=typeof u=="string"?[u]:u}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let u=this._items[0];return u===""||u==='""'}get str(){var u;return(u=this._str)!==null&&u!==void 0?u:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var u;return(u=this._names)!==null&&u!==void 0?u:this._names=this._items.reduce((t,i)=>(i instanceof wi&&(t[i.str]=(t[i.str]||0)+1),t),{})}};be._Code=Ht;be.nil=new Ht("");function N1(e,...u){let t=[e[0]],i=0;for(;i<u.length;)ls(t,u[i]),t.push(e[++i]);return new Ht(t)}be._=N1;var Ds=new Ht("+");function q1(e,...u){let t=[sf(e[0])],i=0;for(;i<u.length;)t.push(Ds),ls(t,u[i]),t.push(Ds,sf(e[++i]));return ub(t),new Ht(t)}be.str=q1;function ls(e,u){u instanceof Ht?e.push(...u._items):u instanceof wi?e.push(u):e.push(fb(u))}be.addCodeArg=ls;function ub(e){let u=1;for(;u<e.length-1;){if(e[u]===Ds){let t=ib(e[u-1],e[u+1]);if(t!==void 0){e.splice(u-1,3,t);continue}e[u++]="+"}u++}}function ib(e,u){if(u==='""')return e;if(e==='""')return u;if(typeof e=="string")return u instanceof wi||e[e.length-1]!=='"'?void 0:typeof u!="string"?`${e.slice(0,-1)}${u}"`:u[0]==='"'?e.slice(0,-1)+u.slice(1):void 0;if(typeof u=="string"&&u[0]==='"'&&!(e instanceof wi))return`"${e}${u.slice(1)}`}function nb(e,u){return u.emptyStr()?e:e.emptyStr()?u:q1`${e}${u}`}be.strConcat=nb;function fb(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:sf(Array.isArray(e)?e.join(","):e)}function rb(e){return new Ht(sf(e))}be.stringify=rb;function sf(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}be.safeStringify=sf;function ob(e){return typeof e=="string"&&be.IDENTIFIER.test(e)?new Ht(`.${e}`):N1`[${e}]`}be.getProperty=ob;function ab(e){if(typeof e=="string"&&be.IDENTIFIER.test(e))return new Ht(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}be.getEsmExportName=ab;function sb(e){return new Ht(e.toString())}be.regexpCode=sb});var ps=F(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.ValueScope=xt.ValueScopeName=xt.Scope=xt.varKinds=xt.UsedValueState=void 0;var Bt=Df(),ds=class extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}},Zr=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(Zr||(xt.UsedValueState=Zr={}));xt.varKinds={const:new Bt.Name("const"),let:new Bt.Name("let"),var:new Bt.Name("var")};var Qr=class{constructor({prefixes:u,parent:t}={}){this._names={},this._prefixes=u,this._parent=t}toName(u){return u instanceof Bt.Name?u:this.name(u)}name(u){return new Bt.Name(this._newName(u))}_newName(u){let t=this._names[u]||this._nameGroup(u);return`${u}${t.index++}`}_nameGroup(u){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}};xt.Scope=Qr;var eo=class extends Bt.Name{constructor(u,t){super(t),this.prefix=u}setValue(u,{property:t,itemIndex:i}){this.value=u,this.scopePath=(0,Bt._)`.${new Bt.Name(t)}[${i}]`}};xt.ValueScopeName=eo;var Db=(0,Bt._)`\n`,cs=class extends Qr{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts=Se(X({},u),{_n:u.lines?Db:Bt.nil})}get(){return this._scope}name(u){return new eo(u,this._newName(u))}value(u,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(u),{prefix:f}=n,r=(i=t.key)!==null&&i!==void 0?i:t.ref,o=this._values[f];if(o){let D=o.get(r);if(D)return D}else o=this._values[f]=new Map;o.set(r,n);let a=this._scope[f]||(this._scope[f]=[]),s=a.length;return a[s]=t.ref,n.setValue(t,{property:f,itemIndex:s}),n}getValue(u,t){let i=this._values[u];if(i)return i.get(t)}scopeRefs(u,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,Bt._)`${u}${i.scopePath}`})}scopeCode(u=this._values,t,i){return this._reduceValues(u,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,i)}_reduceValues(u,t,i={},n){let f=Bt.nil;for(let r in u){let o=u[r];if(!o)continue;let a=i[r]=i[r]||new Map;o.forEach(s=>{if(a.has(s))return;a.set(s,Zr.Started);let D=t(s);if(D){let d=this.opts.es5?xt.varKinds.var:xt.varKinds.const;f=(0,Bt._)`${f}${d} ${s} = ${D};${this.opts._n}`}else if(D=n?.(s))f=(0,Bt._)`${f}${D}${this.opts._n}`;else throw new ds(s);a.set(s,Zr.Completed)})}return f}};xt.ValueScope=cs});var ee=F(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.or=se.and=se.not=se.CodeGen=se.operators=se.varKinds=se.ValueScopeName=se.ValueScope=se.Scope=se.Name=se.regexpCode=se.stringify=se.getProperty=se.nil=se.strConcat=se.str=se._=void 0;var Fe=Df(),uu=ps(),ti=Df();Object.defineProperty(se,"_",{enumerable:!0,get:function(){return ti._}});Object.defineProperty(se,"str",{enumerable:!0,get:function(){return ti.str}});Object.defineProperty(se,"strConcat",{enumerable:!0,get:function(){return ti.strConcat}});Object.defineProperty(se,"nil",{enumerable:!0,get:function(){return ti.nil}});Object.defineProperty(se,"getProperty",{enumerable:!0,get:function(){return ti.getProperty}});Object.defineProperty(se,"stringify",{enumerable:!0,get:function(){return ti.stringify}});Object.defineProperty(se,"regexpCode",{enumerable:!0,get:function(){return ti.regexpCode}});Object.defineProperty(se,"Name",{enumerable:!0,get:function(){return ti.Name}});var fo=ps();Object.defineProperty(se,"Scope",{enumerable:!0,get:function(){return fo.Scope}});Object.defineProperty(se,"ValueScope",{enumerable:!0,get:function(){return fo.ValueScope}});Object.defineProperty(se,"ValueScopeName",{enumerable:!0,get:function(){return fo.ValueScopeName}});Object.defineProperty(se,"varKinds",{enumerable:!0,get:function(){return fo.varKinds}});se.operators={GT:new Fe._Code(">"),GTE:new Fe._Code(">="),LT:new Fe._Code("<"),LTE:new Fe._Code("<="),EQ:new Fe._Code("==="),NEQ:new Fe._Code("!=="),NOT:new Fe._Code("!"),OR:new Fe._Code("||"),AND:new Fe._Code("&&"),ADD:new Fe._Code("+")};var Su=class{optimizeNodes(){return this}optimizeNames(u,t){return this}},ms=class extends Su{constructor(u,t,i){super(),this.varKind=u,this.name=t,this.rhs=i}render({es5:u,_n:t}){let i=u?uu.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${n};`+t}optimizeNames(u,t){if(u[this.name.str])return this.rhs&&(this.rhs=nn(this.rhs,u,t)),this}get names(){return this.rhs instanceof Fe._CodeOrName?this.rhs.names:{}}},uo=class extends Su{constructor(u,t,i){super(),this.lhs=u,this.rhs=t,this.sideEffects=i}render({_n:u}){return`${this.lhs} = ${this.rhs};`+u}optimizeNames(u,t){if(!(this.lhs instanceof Fe.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=nn(this.rhs,u,t),this}get names(){let u=this.lhs instanceof Fe.Name?{}:X({},this.lhs.names);return no(u,this.rhs)}},Fs=class extends uo{constructor(u,t,i,n){super(u,i,n),this.op=t}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}},Cs=class extends Su{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}},hs=class extends Su{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}},gs=class extends Su{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}},bs=class extends Su{constructor(u){super(),this.code=u}render({_n:u}){return`${this.code};`+u}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(u,t){return this.code=nn(this.code,u,t),this}get names(){return this.code instanceof Fe._CodeOrName?this.code.names:{}}},lf=class extends Su{constructor(u=[]){super(),this.nodes=u}render(u){return this.nodes.reduce((t,i)=>t+i.render(u),"")}optimizeNodes(){let{nodes:u}=this,t=u.length;for(;t--;){let i=u[t].optimizeNodes();Array.isArray(i)?u.splice(t,1,...i):i?u[t]=i:u.splice(t,1)}return u.length>0?this:void 0}optimizeNames(u,t){let{nodes:i}=this,n=i.length;for(;n--;){let f=i[n];f.optimizeNames(u,t)||(lb(u,f.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((u,t)=>Si(u,t.names),{})}},Iu=class extends lf{render(u){return"{"+u._n+super.render(u)+"}"+u._n}},Es=class extends lf{},_s=(()=>{class e extends Iu{}return e.kind="else",e})(),to=(()=>{class e extends Iu{constructor(t,i){super(i),this.condition=t}render(t){let i=`if(${this.condition})`+super.render(t);return this.else&&(i+="else "+this.else.render(t)),i}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let i=this.else;if(i){let n=i.optimizeNodes();i=this.else=Array.isArray(n)?new _s(n):n}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(H1(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=nn(this.condition,t,i),this}get names(){let t=super.names;return no(t,this.condition),this.else&&Si(t,this.else.names),t}}return e.kind="if",e})(),ro=(()=>{class e extends Iu{}return e.kind="for",e})(),ys=class extends ro{constructor(u){super(),this.iteration=u}render(u){return`for(${this.iteration})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iteration=nn(this.iteration,u,t),this}get names(){return Si(super.names,this.iteration.names)}},vs=class extends ro{constructor(u,t,i,n){super(),this.varKind=u,this.name=t,this.from=i,this.to=n}render(u){let t=u.es5?uu.varKinds.var:this.varKind,{name:i,from:n,to:f}=this;return`for(${t} ${i}=${n}; ${i}<${f}; ${i}++)`+super.render(u)}get names(){let u=no(super.names,this.from);return no(u,this.to)}},io=class extends ro{constructor(u,t,i,n){super(),this.loop=u,this.varKind=t,this.name=i,this.iterable=n}render(u){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iterable=nn(this.iterable,u,t),this}get names(){return Si(super.names,this.iterable.names)}},V1=(()=>{class e extends Iu{constructor(t,i,n){super(),this.name=t,this.args=i,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),R1=(()=>{class e extends lf{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Bs=class extends Iu{render(u){let t="try"+super.render(u);return this.catch&&(t+=this.catch.render(u)),this.finally&&(t+=this.finally.render(u)),t}optimizeNodes(){var u,t;return super.optimizeNodes(),(u=this.catch)===null||u===void 0||u.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(u,t){var i,n;return super.optimizeNames(u,t),(i=this.catch)===null||i===void 0||i.optimizeNames(u,t),(n=this.finally)===null||n===void 0||n.optimizeNames(u,t),this}get names(){let u=super.names;return this.catch&&Si(u,this.catch.names),this.finally&&Si(u,this.finally.names),u}},L1=(()=>{class e extends Iu{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),z1=(()=>{class e extends Iu{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),xs=class{constructor(u,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Se(X({},t),{_n:t.lines?`
1
+ import{a as pu,b as eb}from"./chunk-SHW4IV7S.js";import{a as A1}from"./chunk-XJY7A24W.js";import{a as en,b as tn}from"./chunk-TIE2WSHM.js";import{a as T1}from"./chunk-6SEBWKRM.js";import{a as j1,b as of}from"./chunk-LA4JXO55.js";import{a as O1,b as M1}from"./chunk-DSBAEBB7.js";import{a as P1}from"./chunk-ZCCLGLMW.js";import{a as Yr}from"./chunk-HHPGR3HF.js";import{a as $1}from"./chunk-6M524CF7.js";import{a as Ur,b as Wr,c as Gr,d as Kr,e as Jr,f as Xr,g as du,m as ve,n as it,o as Qi}from"./chunk-OHFVMRCL.js";import{A as ss,a as y1,b as Ji,c as Xi,e as vt,f as v1,h as B1,i as x1,k as w1,l as Zu,m as S1,o as Yi,r as Zi,s as Bi,t as xi,y as I1,z as tu}from"./chunk-MMYB2ZMV.js";import{d as cu}from"./chunk-QY7HUYL5.js";import{a as ei}from"./chunk-2OEG7XPN.js";import{a as k1}from"./chunk-JYNDHHKS.js";import{b as ze}from"./chunk-7XITHR3W.js";import{h as _e,j as Qu,k as he}from"./chunk-6GW5TYOW.js";import{e as _1}from"./chunk-R3JWGCC5.js";import{a as Ee,b as Be}from"./chunk-KPKQNEWS.js";import{$a as l,Ac as y,Bc as B,Ca as Uu,Cc as je,D as r1,Da as D1,Fa as Wu,Gb as K,Hb as x,Ib as w,Jc as gt,Kb as nt,Kc as U,Lb as ft,Lc as Yu,M as Vr,Mb as rt,Nb as b,Nc as g1,Ob as c,Pb as p,Qb as S,Rb as p1,Sb as m1,Ub as H,Xa as de,Xb as O,Yb as h,Z as fs,_a as l1,a as X,aa as rf,ac as rs,b as Se,bc as os,bd as zt,cc as as,cd as vi,dc as Gu,dd as bt,e as F,eb as Lr,ec as Ku,fa as o1,fb as vu,g as Le,ga as Ot,gc as Qt,gd as b1,h as G,ha as Wi,hb as yi,hc as Ju,ic as Z,ja as a1,jc as E,k as u1,ka as s1,kc as L,kd as Hr,la as I,lb as Y,lc as q,mb as Gi,mc as xu,n as Pt,nb as Bu,nc as F1,o as ns,ob as d1,q as i1,qc as Pe,ra as j,rb as ce,rc as Oe,sa as N,sc as Me,sd as E1,tb as c1,tc as C1,ub as zr,uc as h1,v as n1,vc as ke,w as ae,wc as eu,x as f1,xc as Xu,yc as wu,za as Rr,zc as Ki}from"./chunk-QSPBB6EE.js";var Df=F(be=>{"use strict";Object.defineProperty(be,"__esModule",{value:!0});be.regexpCode=be.getEsmExportName=be.getProperty=be.safeStringify=be.stringify=be.strConcat=be.addCodeArg=be.str=be._=be.nil=be._Code=be.Name=be.IDENTIFIER=be._CodeOrName=void 0;var af=class{};be._CodeOrName=af;be.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var wi=class extends af{constructor(u){if(super(),!be.IDENTIFIER.test(u))throw new Error("CodeGen: name must be a valid identifier");this.str=u}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};be.Name=wi;var Ht=class extends af{constructor(u){super(),this._items=typeof u=="string"?[u]:u}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let u=this._items[0];return u===""||u==='""'}get str(){var u;return(u=this._str)!==null&&u!==void 0?u:this._str=this._items.reduce((t,i)=>`${t}${i}`,"")}get names(){var u;return(u=this._names)!==null&&u!==void 0?u:this._names=this._items.reduce((t,i)=>(i instanceof wi&&(t[i.str]=(t[i.str]||0)+1),t),{})}};be._Code=Ht;be.nil=new Ht("");function N1(e,...u){let t=[e[0]],i=0;for(;i<u.length;)ls(t,u[i]),t.push(e[++i]);return new Ht(t)}be._=N1;var Ds=new Ht("+");function q1(e,...u){let t=[sf(e[0])],i=0;for(;i<u.length;)t.push(Ds),ls(t,u[i]),t.push(Ds,sf(e[++i]));return ub(t),new Ht(t)}be.str=q1;function ls(e,u){u instanceof Ht?e.push(...u._items):u instanceof wi?e.push(u):e.push(fb(u))}be.addCodeArg=ls;function ub(e){let u=1;for(;u<e.length-1;){if(e[u]===Ds){let t=ib(e[u-1],e[u+1]);if(t!==void 0){e.splice(u-1,3,t);continue}e[u++]="+"}u++}}function ib(e,u){if(u==='""')return e;if(e==='""')return u;if(typeof e=="string")return u instanceof wi||e[e.length-1]!=='"'?void 0:typeof u!="string"?`${e.slice(0,-1)}${u}"`:u[0]==='"'?e.slice(0,-1)+u.slice(1):void 0;if(typeof u=="string"&&u[0]==='"'&&!(e instanceof wi))return`"${e}${u.slice(1)}`}function nb(e,u){return u.emptyStr()?e:e.emptyStr()?u:q1`${e}${u}`}be.strConcat=nb;function fb(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:sf(Array.isArray(e)?e.join(","):e)}function rb(e){return new Ht(sf(e))}be.stringify=rb;function sf(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}be.safeStringify=sf;function ob(e){return typeof e=="string"&&be.IDENTIFIER.test(e)?new Ht(`.${e}`):N1`[${e}]`}be.getProperty=ob;function ab(e){if(typeof e=="string"&&be.IDENTIFIER.test(e))return new Ht(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}be.getEsmExportName=ab;function sb(e){return new Ht(e.toString())}be.regexpCode=sb});var ps=F(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.ValueScope=xt.ValueScopeName=xt.Scope=xt.varKinds=xt.UsedValueState=void 0;var Bt=Df(),ds=class extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}},Zr=function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e}(Zr||(xt.UsedValueState=Zr={}));xt.varKinds={const:new Bt.Name("const"),let:new Bt.Name("let"),var:new Bt.Name("var")};var Qr=class{constructor({prefixes:u,parent:t}={}){this._names={},this._prefixes=u,this._parent=t}toName(u){return u instanceof Bt.Name?u:this.name(u)}name(u){return new Bt.Name(this._newName(u))}_newName(u){let t=this._names[u]||this._nameGroup(u);return`${u}${t.index++}`}_nameGroup(u){var t,i;if(!((i=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||i===void 0)&&i.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}};xt.Scope=Qr;var eo=class extends Bt.Name{constructor(u,t){super(t),this.prefix=u}setValue(u,{property:t,itemIndex:i}){this.value=u,this.scopePath=(0,Bt._)`.${new Bt.Name(t)}[${i}]`}};xt.ValueScopeName=eo;var Db=(0,Bt._)`\n`,cs=class extends Qr{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts=Se(X({},u),{_n:u.lines?Db:Bt.nil})}get(){return this._scope}name(u){return new eo(u,this._newName(u))}value(u,t){var i;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let n=this.toName(u),{prefix:f}=n,r=(i=t.key)!==null&&i!==void 0?i:t.ref,o=this._values[f];if(o){let D=o.get(r);if(D)return D}else o=this._values[f]=new Map;o.set(r,n);let a=this._scope[f]||(this._scope[f]=[]),s=a.length;return a[s]=t.ref,n.setValue(t,{property:f,itemIndex:s}),n}getValue(u,t){let i=this._values[u];if(i)return i.get(t)}scopeRefs(u,t=this._values){return this._reduceValues(t,i=>{if(i.scopePath===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return(0,Bt._)`${u}${i.scopePath}`})}scopeCode(u=this._values,t,i){return this._reduceValues(u,n=>{if(n.value===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return n.value.code},t,i)}_reduceValues(u,t,i={},n){let f=Bt.nil;for(let r in u){let o=u[r];if(!o)continue;let a=i[r]=i[r]||new Map;o.forEach(s=>{if(a.has(s))return;a.set(s,Zr.Started);let D=t(s);if(D){let d=this.opts.es5?xt.varKinds.var:xt.varKinds.const;f=(0,Bt._)`${f}${d} ${s} = ${D};${this.opts._n}`}else if(D=n?.(s))f=(0,Bt._)`${f}${D}${this.opts._n}`;else throw new ds(s);a.set(s,Zr.Completed)})}return f}};xt.ValueScope=cs});var ee=F(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.or=se.and=se.not=se.CodeGen=se.operators=se.varKinds=se.ValueScopeName=se.ValueScope=se.Scope=se.Name=se.regexpCode=se.stringify=se.getProperty=se.nil=se.strConcat=se.str=se._=void 0;var Fe=Df(),uu=ps(),ti=Df();Object.defineProperty(se,"_",{enumerable:!0,get:function(){return ti._}});Object.defineProperty(se,"str",{enumerable:!0,get:function(){return ti.str}});Object.defineProperty(se,"strConcat",{enumerable:!0,get:function(){return ti.strConcat}});Object.defineProperty(se,"nil",{enumerable:!0,get:function(){return ti.nil}});Object.defineProperty(se,"getProperty",{enumerable:!0,get:function(){return ti.getProperty}});Object.defineProperty(se,"stringify",{enumerable:!0,get:function(){return ti.stringify}});Object.defineProperty(se,"regexpCode",{enumerable:!0,get:function(){return ti.regexpCode}});Object.defineProperty(se,"Name",{enumerable:!0,get:function(){return ti.Name}});var fo=ps();Object.defineProperty(se,"Scope",{enumerable:!0,get:function(){return fo.Scope}});Object.defineProperty(se,"ValueScope",{enumerable:!0,get:function(){return fo.ValueScope}});Object.defineProperty(se,"ValueScopeName",{enumerable:!0,get:function(){return fo.ValueScopeName}});Object.defineProperty(se,"varKinds",{enumerable:!0,get:function(){return fo.varKinds}});se.operators={GT:new Fe._Code(">"),GTE:new Fe._Code(">="),LT:new Fe._Code("<"),LTE:new Fe._Code("<="),EQ:new Fe._Code("==="),NEQ:new Fe._Code("!=="),NOT:new Fe._Code("!"),OR:new Fe._Code("||"),AND:new Fe._Code("&&"),ADD:new Fe._Code("+")};var Su=class{optimizeNodes(){return this}optimizeNames(u,t){return this}},ms=class extends Su{constructor(u,t,i){super(),this.varKind=u,this.name=t,this.rhs=i}render({es5:u,_n:t}){let i=u?uu.varKinds.var:this.varKind,n=this.rhs===void 0?"":` = ${this.rhs}`;return`${i} ${this.name}${n};`+t}optimizeNames(u,t){if(u[this.name.str])return this.rhs&&(this.rhs=nn(this.rhs,u,t)),this}get names(){return this.rhs instanceof Fe._CodeOrName?this.rhs.names:{}}},uo=class extends Su{constructor(u,t,i){super(),this.lhs=u,this.rhs=t,this.sideEffects=i}render({_n:u}){return`${this.lhs} = ${this.rhs};`+u}optimizeNames(u,t){if(!(this.lhs instanceof Fe.Name&&!u[this.lhs.str]&&!this.sideEffects))return this.rhs=nn(this.rhs,u,t),this}get names(){let u=this.lhs instanceof Fe.Name?{}:X({},this.lhs.names);return no(u,this.rhs)}},Fs=class extends uo{constructor(u,t,i,n){super(u,i,n),this.op=t}render({_n:u}){return`${this.lhs} ${this.op}= ${this.rhs};`+u}},Cs=class extends Su{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`${this.label}:`+u}},hs=class extends Su{constructor(u){super(),this.label=u,this.names={}}render({_n:u}){return`break${this.label?` ${this.label}`:""};`+u}},gs=class extends Su{constructor(u){super(),this.error=u}render({_n:u}){return`throw ${this.error};`+u}get names(){return this.error.names}},bs=class extends Su{constructor(u){super(),this.code=u}render({_n:u}){return`${this.code};`+u}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(u,t){return this.code=nn(this.code,u,t),this}get names(){return this.code instanceof Fe._CodeOrName?this.code.names:{}}},lf=class extends Su{constructor(u=[]){super(),this.nodes=u}render(u){return this.nodes.reduce((t,i)=>t+i.render(u),"")}optimizeNodes(){let{nodes:u}=this,t=u.length;for(;t--;){let i=u[t].optimizeNodes();Array.isArray(i)?u.splice(t,1,...i):i?u[t]=i:u.splice(t,1)}return u.length>0?this:void 0}optimizeNames(u,t){let{nodes:i}=this,n=i.length;for(;n--;){let f=i[n];f.optimizeNames(u,t)||(lb(u,f.names),i.splice(n,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((u,t)=>Si(u,t.names),{})}},Iu=class extends lf{render(u){return"{"+u._n+super.render(u)+"}"+u._n}},Es=class extends lf{},_s=(()=>{class e extends Iu{}return e.kind="else",e})(),to=(()=>{class e extends Iu{constructor(t,i){super(i),this.condition=t}render(t){let i=`if(${this.condition})`+super.render(t);return this.else&&(i+="else "+this.else.render(t)),i}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let i=this.else;if(i){let n=i.optimizeNodes();i=this.else=Array.isArray(n)?new _s(n):n}if(i)return t===!1?i instanceof e?i:i.nodes:this.nodes.length?this:new e(H1(t),i instanceof e?[i]:i.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,i){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(t,i),!!(super.optimizeNames(t,i)||this.else))return this.condition=nn(this.condition,t,i),this}get names(){let t=super.names;return no(t,this.condition),this.else&&Si(t,this.else.names),t}}return e.kind="if",e})(),ro=(()=>{class e extends Iu{}return e.kind="for",e})(),ys=class extends ro{constructor(u){super(),this.iteration=u}render(u){return`for(${this.iteration})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iteration=nn(this.iteration,u,t),this}get names(){return Si(super.names,this.iteration.names)}},vs=class extends ro{constructor(u,t,i,n){super(),this.varKind=u,this.name=t,this.from=i,this.to=n}render(u){let t=u.es5?uu.varKinds.var:this.varKind,{name:i,from:n,to:f}=this;return`for(${t} ${i}=${n}; ${i}<${f}; ${i}++)`+super.render(u)}get names(){let u=no(super.names,this.from);return no(u,this.to)}},io=class extends ro{constructor(u,t,i,n){super(),this.loop=u,this.varKind=t,this.name=i,this.iterable=n}render(u){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(u)}optimizeNames(u,t){if(super.optimizeNames(u,t))return this.iterable=nn(this.iterable,u,t),this}get names(){return Si(super.names,this.iterable.names)}},V1=(()=>{class e extends Iu{constructor(t,i,n){super(),this.name=t,this.args=i,this.async=n}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),R1=(()=>{class e extends lf{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Bs=class extends Iu{render(u){let t="try"+super.render(u);return this.catch&&(t+=this.catch.render(u)),this.finally&&(t+=this.finally.render(u)),t}optimizeNodes(){var u,t;return super.optimizeNodes(),(u=this.catch)===null||u===void 0||u.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(u,t){var i,n;return super.optimizeNames(u,t),(i=this.catch)===null||i===void 0||i.optimizeNames(u,t),(n=this.finally)===null||n===void 0||n.optimizeNames(u,t),this}get names(){let u=super.names;return this.catch&&Si(u,this.catch.names),this.finally&&Si(u,this.finally.names),u}},L1=(()=>{class e extends Iu{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),z1=(()=>{class e extends Iu{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),xs=class{constructor(u,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Se(X({},t),{_n:t.lines?`
2
2
  `:""}),this._extScope=u,this._scope=new uu.Scope({parent:u}),this._nodes=[new Es]}toString(){return this._root.render(this.opts)}name(u){return this._scope.name(u)}scopeName(u){return this._extScope.name(u)}scopeValue(u,t){let i=this._extScope.value(u,t);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(u,t){return this._extScope.getValue(u,t)}scopeRefs(u){return this._extScope.scopeRefs(u,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(u,t,i,n){let f=this._scope.toName(t);return i!==void 0&&n&&(this._constants[f.str]=i),this._leafNode(new ms(u,f,i)),f}const(u,t,i){return this._def(uu.varKinds.const,u,t,i)}let(u,t,i){return this._def(uu.varKinds.let,u,t,i)}var(u,t,i){return this._def(uu.varKinds.var,u,t,i)}assign(u,t,i){return this._leafNode(new uo(u,t,i))}add(u,t){return this._leafNode(new Fs(u,se.operators.ADD,t))}code(u){return typeof u=="function"?u():u!==Fe.nil&&this._leafNode(new bs(u)),this}object(...u){let t=["{"];for(let[i,n]of u)t.length>1&&t.push(","),t.push(i),(i!==n||this.opts.es5)&&(t.push(":"),(0,Fe.addCodeArg)(t,n));return t.push("}"),new Fe._Code(t)}if(u,t,i){if(this._blockNode(new to(u)),t&&i)this.code(t).else().code(i).endIf();else if(t)this.code(t).endIf();else if(i)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(u){return this._elseNode(new to(u))}else(){return this._elseNode(new _s)}endIf(){return this._endBlockNode(to,_s)}_for(u,t){return this._blockNode(u),t&&this.code(t).endFor(),this}for(u,t){return this._for(new ys(u),t)}forRange(u,t,i,n,f=this.opts.es5?uu.varKinds.var:uu.varKinds.let){let r=this._scope.toName(u);return this._for(new vs(f,r,t,i),()=>n(r))}forOf(u,t,i,n=uu.varKinds.const){let f=this._scope.toName(u);if(this.opts.es5){let r=t instanceof Fe.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Fe._)`${r}.length`,o=>{this.var(f,(0,Fe._)`${r}[${o}]`),i(f)})}return this._for(new io("of",n,f,t),()=>i(f))}forIn(u,t,i,n=this.opts.es5?uu.varKinds.var:uu.varKinds.const){if(this.opts.ownProperties)return this.forOf(u,(0,Fe._)`Object.keys(${t})`,i);let f=this._scope.toName(u);return this._for(new io("in",n,f,t),()=>i(f))}endFor(){return this._endBlockNode(ro)}label(u){return this._leafNode(new Cs(u))}break(u){return this._leafNode(new hs(u))}return(u){let t=new R1;if(this._blockNode(t),this.code(u),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(R1)}try(u,t,i){if(!t&&!i)throw new Error('CodeGen: "try" without "catch" and "finally"');let n=new Bs;if(this._blockNode(n),this.code(u),t){let f=this.name("e");this._currNode=n.catch=new L1(f),t(f)}return i&&(this._currNode=n.finally=new z1,this.code(i)),this._endBlockNode(L1,z1)}throw(u){return this._leafNode(new gs(u))}block(u,t){return this._blockStarts.push(this._nodes.length),u&&this.code(u).endBlock(t),this}endBlock(u){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let i=this._nodes.length-t;if(i<0||u!==void 0&&i!==u)throw new Error(`CodeGen: wrong number of nodes: ${i} vs ${u} expected`);return this._nodes.length=t,this}func(u,t=Fe.nil,i,n){return this._blockNode(new V1(u,t,i)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(V1)}optimize(u=1){for(;u-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(u){return this._currNode.nodes.push(u),this}_blockNode(u){this._currNode.nodes.push(u),this._nodes.push(u)}_endBlockNode(u,t){let i=this._currNode;if(i instanceof u||t&&i instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${u.kind}/${t.kind}`:u.kind}"`)}_elseNode(u){let t=this._currNode;if(!(t instanceof to))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=u,this}get _root(){return this._nodes[0]}get _currNode(){let u=this._nodes;return u[u.length-1]}set _currNode(u){let t=this._nodes;t[t.length-1]=u}};se.CodeGen=xs;function Si(e,u){for(let t in u)e[t]=(e[t]||0)+(u[t]||0);return e}function no(e,u){return u instanceof Fe._CodeOrName?Si(e,u.names):e}function nn(e,u,t){if(e instanceof Fe.Name)return i(e);if(!n(e))return e;return new Fe._Code(e._items.reduce((f,r)=>(r instanceof Fe.Name&&(r=i(r)),r instanceof Fe._Code?f.push(...r._items):f.push(r),f),[]));function i(f){let r=t[f.str];return r===void 0||u[f.str]!==1?f:(delete u[f.str],r)}function n(f){return f instanceof Fe._Code&&f._items.some(r=>r instanceof Fe.Name&&u[r.str]===1&&t[r.str]!==void 0)}}function lb(e,u){for(let t in u)e[t]=(e[t]||0)-(u[t]||0)}function H1(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Fe._)`!${ws(e)}`}se.not=H1;var db=U1(se.operators.AND);function cb(...e){return e.reduce(db)}se.and=cb;var pb=U1(se.operators.OR);function mb(...e){return e.reduce(pb)}se.or=mb;function U1(e){return(u,t)=>u===Fe.nil?t:t===Fe.nil?u:(0,Fe._)`${ws(u)} ${e} ${ws(t)}`}function ws(e){return e instanceof Fe.Name?e:(0,Fe._)`(${e})`}});var le=F(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.checkStrictMode=De.getErrorPath=De.Type=De.useFunc=De.setEvaluated=De.evaluatedPropsToName=De.mergeEvaluated=De.eachItem=De.unescapeJsonPointer=De.escapeJsonPointer=De.escapeFragment=De.unescapeFragment=De.schemaRefOrVal=De.schemaHasRulesButRef=De.schemaHasRules=De.checkUnknownRules=De.alwaysValidSchema=De.toHash=void 0;var Ie=ee(),Fb=Df();function Cb(e){let u={};for(let t of e)u[t]=!0;return u}De.toHash=Cb;function hb(e,u){return typeof u=="boolean"?u:Object.keys(u).length===0?!0:(K1(e,u),!J1(u,e.self.RULES.all))}De.alwaysValidSchema=hb;function K1(e,u=e.schema){let{opts:t,self:i}=e;if(!t.strictSchema||typeof u=="boolean")return;let n=i.RULES.keywords;for(let f in u)n[f]||Z1(e,`unknown keyword: "${f}"`)}De.checkUnknownRules=K1;function J1(e,u){if(typeof e=="boolean")return!e;for(let t in e)if(u[t])return!0;return!1}De.schemaHasRules=J1;function gb(e,u){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&u.all[t])return!0;return!1}De.schemaHasRulesButRef=gb;function bb({topSchemaRef:e,schemaPath:u},t,i,n){if(!n){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Ie._)`${t}`}return(0,Ie._)`${e}${u}${(0,Ie.getProperty)(i)}`}De.schemaRefOrVal=bb;function Eb(e){return X1(decodeURIComponent(e))}De.unescapeFragment=Eb;function _b(e){return encodeURIComponent(Is(e))}De.escapeFragment=_b;function Is(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}De.escapeJsonPointer=Is;function X1(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}De.unescapeJsonPointer=X1;function yb(e,u){if(Array.isArray(e))for(let t of e)u(t);else u(e)}De.eachItem=yb;function W1({mergeNames:e,mergeToName:u,mergeValues:t,resultToName:i}){return(n,f,r,o)=>{let a=r===void 0?f:r instanceof Ie.Name?(f instanceof Ie.Name?e(n,f,r):u(n,f,r),r):f instanceof Ie.Name?(u(n,r,f),f):t(f,r);return o===Ie.Name&&!(a instanceof Ie.Name)?i(n,a):a}}De.mergeEvaluated={props:W1({mergeNames:(e,u,t)=>e.if((0,Ie._)`${t} !== true && ${u} !== undefined`,()=>{e.if((0,Ie._)`${u} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,Ie._)`${t} || {}`).code((0,Ie._)`Object.assign(${t}, ${u})`))}),mergeToName:(e,u,t)=>e.if((0,Ie._)`${t} !== true`,()=>{u===!0?e.assign(t,!0):(e.assign(t,(0,Ie._)`${t} || {}`),As(e,t,u))}),mergeValues:(e,u)=>e===!0?!0:X(X({},e),u),resultToName:Y1}),items:W1({mergeNames:(e,u,t)=>e.if((0,Ie._)`${t} !== true && ${u} !== undefined`,()=>e.assign(t,(0,Ie._)`${u} === true ? true : ${t} > ${u} ? ${t} : ${u}`)),mergeToName:(e,u,t)=>e.if((0,Ie._)`${t} !== true`,()=>e.assign(t,u===!0?!0:(0,Ie._)`${t} > ${u} ? ${t} : ${u}`)),mergeValues:(e,u)=>e===!0?!0:Math.max(e,u),resultToName:(e,u)=>e.var("items",u)})};function Y1(e,u){if(u===!0)return e.var("props",!0);let t=e.var("props",(0,Ie._)`{}`);return u!==void 0&&As(e,t,u),t}De.evaluatedPropsToName=Y1;function As(e,u,t){Object.keys(t).forEach(i=>e.assign((0,Ie._)`${u}${(0,Ie.getProperty)(i)}`,!0))}De.setEvaluated=As;var G1={};function vb(e,u){return e.scopeValue("func",{ref:u,code:G1[u.code]||(G1[u.code]=new Fb._Code(u.code))})}De.useFunc=vb;var Ss=function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e}(Ss||(De.Type=Ss={}));function Bb(e,u,t){if(e instanceof Ie.Name){let i=u===Ss.Num;return t?i?(0,Ie._)`"[" + ${e} + "]"`:(0,Ie._)`"['" + ${e} + "']"`:i?(0,Ie._)`"/" + ${e}`:(0,Ie._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Ie.getProperty)(e).toString():"/"+Is(e)}De.getErrorPath=Bb;function Z1(e,u,t=e.opts.strictSchema){if(t){if(u=`strict mode: ${u}`,t===!0)throw new Error(u);e.self.logger.warn(u)}}De.checkStrictMode=Z1});var Ut=F(ks=>{"use strict";Object.defineProperty(ks,"__esModule",{value:!0});var lt=ee(),xb={data:new lt.Name("data"),valCxt:new lt.Name("valCxt"),instancePath:new lt.Name("instancePath"),parentData:new lt.Name("parentData"),parentDataProperty:new lt.Name("parentDataProperty"),rootData:new lt.Name("rootData"),dynamicAnchors:new lt.Name("dynamicAnchors"),vErrors:new lt.Name("vErrors"),errors:new lt.Name("errors"),this:new lt.Name("this"),self:new lt.Name("self"),scope:new lt.Name("scope"),json:new lt.Name("json"),jsonPos:new lt.Name("jsonPos"),jsonLen:new lt.Name("jsonLen"),jsonPart:new lt.Name("jsonPart")};ks.default=xb});var df=F(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.extendErrors=dt.resetErrorsCount=dt.reportExtraError=dt.reportError=dt.keyword$DataError=dt.keywordError=void 0;var ge=ee(),oo=le(),Et=Ut();dt.keywordError={message:({keyword:e})=>(0,ge.str)`must pass "${e}" keyword validation`};dt.keyword$DataError={message:({keyword:e,schemaType:u})=>u?(0,ge.str)`"${e}" keyword must be ${u} ($data)`:(0,ge.str)`"${e}" keyword is invalid ($data)`};function wb(e,u=dt.keywordError,t,i){let{it:n}=e,{gen:f,compositeRule:r,allErrors:o}=n,a=td(e,u,t);i??(r||o)?Q1(f,a):ed(n,(0,ge._)`[${a}]`)}dt.reportError=wb;function Sb(e,u=dt.keywordError,t){let{it:i}=e,{gen:n,compositeRule:f,allErrors:r}=i,o=td(e,u,t);Q1(n,o),f||r||ed(i,Et.default.vErrors)}dt.reportExtraError=Sb;function Ib(e,u){e.assign(Et.default.errors,u),e.if((0,ge._)`${Et.default.vErrors} !== null`,()=>e.if(u,()=>e.assign((0,ge._)`${Et.default.vErrors}.length`,u),()=>e.assign(Et.default.vErrors,null)))}dt.resetErrorsCount=Ib;function Ab({gen:e,keyword:u,schemaValue:t,data:i,errsCount:n,it:f}){if(n===void 0)throw new Error("ajv implementation error");let r=e.name("err");e.forRange("i",n,Et.default.errors,o=>{e.const(r,(0,ge._)`${Et.default.vErrors}[${o}]`),e.if((0,ge._)`${r}.instancePath === undefined`,()=>e.assign((0,ge._)`${r}.instancePath`,(0,ge.strConcat)(Et.default.instancePath,f.errorPath))),e.assign((0,ge._)`${r}.schemaPath`,(0,ge.str)`${f.errSchemaPath}/${u}`),f.opts.verbose&&(e.assign((0,ge._)`${r}.schema`,t),e.assign((0,ge._)`${r}.data`,i))})}dt.extendErrors=Ab;function Q1(e,u){let t=e.const("err",u);e.if((0,ge._)`${Et.default.vErrors} === null`,()=>e.assign(Et.default.vErrors,(0,ge._)`[${t}]`),(0,ge._)`${Et.default.vErrors}.push(${t})`),e.code((0,ge._)`${Et.default.errors}++`)}function ed(e,u){let{gen:t,validateName:i,schemaEnv:n}=e;n.$async?t.throw((0,ge._)`new ${e.ValidationError}(${u})`):(t.assign((0,ge._)`${i}.errors`,u),t.return(!1))}var Ii={keyword:new ge.Name("keyword"),schemaPath:new ge.Name("schemaPath"),params:new ge.Name("params"),propertyName:new ge.Name("propertyName"),message:new ge.Name("message"),schema:new ge.Name("schema"),parentSchema:new ge.Name("parentSchema")};function td(e,u,t){let{createErrors:i}=e.it;return i===!1?(0,ge._)`{}`:kb(e,u,t)}function kb(e,u,t={}){let{gen:i,it:n}=e,f=[$b(n,t),Tb(e,t)];return Pb(e,u,f),i.object(...f)}function $b({errorPath:e},{instancePath:u}){let t=u?(0,ge.str)`${e}${(0,oo.getErrorPath)(u,oo.Type.Str)}`:e;return[Et.default.instancePath,(0,ge.strConcat)(Et.default.instancePath,t)]}function Tb({keyword:e,it:{errSchemaPath:u}},{schemaPath:t,parentSchema:i}){let n=i?u:(0,ge.str)`${u}/${e}`;return t&&(n=(0,ge.str)`${n}${(0,oo.getErrorPath)(t,oo.Type.Str)}`),[Ii.schemaPath,n]}function Pb(e,{params:u,message:t},i){let{keyword:n,data:f,schemaValue:r,it:o}=e,{opts:a,propertyName:s,topSchemaRef:D,schemaPath:d}=o;i.push([Ii.keyword,n],[Ii.params,typeof u=="function"?u(e):u||(0,ge._)`{}`]),a.messages&&i.push([Ii.message,typeof t=="function"?t(e):t]),a.verbose&&i.push([Ii.schema,r],[Ii.parentSchema,(0,ge._)`${D}${d}`],[Et.default.data,f]),s&&i.push([Ii.propertyName,s])}});var id=F(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.boolOrEmptySchema=fn.topBoolOrEmptySchema=void 0;var Ob=df(),Mb=ee(),jb=Ut(),Nb={message:"boolean schema is false"};function qb(e){let{gen:u,schema:t,validateName:i}=e;t===!1?ud(e,!1):typeof t=="object"&&t.$async===!0?u.return(jb.default.data):(u.assign((0,Mb._)`${i}.errors`,null),u.return(!0))}fn.topBoolOrEmptySchema=qb;function Vb(e,u){let{gen:t,schema:i}=e;i===!1?(t.var(u,!1),ud(e)):t.var(u,!0)}fn.boolOrEmptySchema=Vb;function ud(e,u){let{gen:t,data:i}=e,n={gen:t,keyword:"false schema",data:i,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,Ob.reportError)(n,Nb,void 0,u)}});var $s=F(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.getRules=rn.isJSONType=void 0;var Rb=["string","number","integer","boolean","null","object","array"],Lb=new Set(Rb);function zb(e){return typeof e=="string"&&Lb.has(e)}rn.isJSONType=zb;function Hb(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Se(X({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}rn.getRules=Hb});var Ts=F(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.shouldUseRule=ui.shouldUseGroup=ui.schemaHasRulesForType=void 0;function Ub({schema:e,self:u},t){let i=u.RULES.types[t];return i&&i!==!0&&nd(e,i)}ui.schemaHasRulesForType=Ub;function nd(e,u){return u.rules.some(t=>fd(e,t))}ui.shouldUseGroup=nd;function fd(e,u){var t;return e[u.keyword]!==void 0||((t=u.definition.implements)===null||t===void 0?void 0:t.some(i=>e[i]!==void 0))}ui.shouldUseRule=fd});var cf=F(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.reportTypeError=ct.checkDataTypes=ct.checkDataType=ct.coerceAndCheckDataType=ct.getJSONTypes=ct.getSchemaTypes=ct.DataType=void 0;var Wb=$s(),Gb=Ts(),Kb=df(),re=ee(),rd=le(),on=function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e}(on||(ct.DataType=on={}));function Jb(e){let u=od(e.type);if(u.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!u.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&u.push("null")}return u}ct.getSchemaTypes=Jb;function od(e){let u=Array.isArray(e)?e:e?[e]:[];if(u.every(Wb.isJSONType))return u;throw new Error("type must be JSONType or JSONType[]: "+u.join(","))}ct.getJSONTypes=od;function Xb(e,u){let{gen:t,data:i,opts:n}=e,f=Yb(u,n.coerceTypes),r=u.length>0&&!(f.length===0&&u.length===1&&(0,Gb.schemaHasRulesForType)(e,u[0]));if(r){let o=Os(u,i,n.strictNumbers,on.Wrong);t.if(o,()=>{f.length?Zb(e,u,f):Ms(e)})}return r}ct.coerceAndCheckDataType=Xb;var ad=new Set(["string","number","integer","boolean","null"]);function Yb(e,u){return u?e.filter(t=>ad.has(t)||u==="array"&&t==="array"):[]}function Zb(e,u,t){let{gen:i,data:n,opts:f}=e,r=i.let("dataType",(0,re._)`typeof ${n}`),o=i.let("coerced",(0,re._)`undefined`);f.coerceTypes==="array"&&i.if((0,re._)`${r} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>i.assign(n,(0,re._)`${n}[0]`).assign(r,(0,re._)`typeof ${n}`).if(Os(u,n,f.strictNumbers),()=>i.assign(o,n))),i.if((0,re._)`${o} !== undefined`);for(let s of t)(ad.has(s)||s==="array"&&f.coerceTypes==="array")&&a(s);i.else(),Ms(e),i.endIf(),i.if((0,re._)`${o} !== undefined`,()=>{i.assign(n,o),Qb(e,o)});function a(s){switch(s){case"string":i.elseIf((0,re._)`${r} == "number" || ${r} == "boolean"`).assign(o,(0,re._)`"" + ${n}`).elseIf((0,re._)`${n} === null`).assign(o,(0,re._)`""`);return;case"number":i.elseIf((0,re._)`${r} == "boolean" || ${n} === null
3
3
  || (${r} == "string" && ${n} && ${n} == +${n})`).assign(o,(0,re._)`+${n}`);return;case"integer":i.elseIf((0,re._)`${r} === "boolean" || ${n} === null
4
4
  || (${r} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(o,(0,re._)`+${n}`);return;case"boolean":i.elseIf((0,re._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(o,!1).elseIf((0,re._)`${n} === "true" || ${n} === 1`).assign(o,!0);return;case"null":i.elseIf((0,re._)`${n} === "" || ${n} === 0 || ${n} === false`),i.assign(o,null);return;case"array":i.elseIf((0,re._)`${r} === "string" || ${r} === "number"
@@ -1 +1 @@
1
- import{a}from"./chunk-IWVLVUZD.js";import"./chunk-OHFVMRCL.js";import"./chunk-MMYB2ZMV.js";import"./chunk-QY7HUYL5.js";import"./chunk-IWA3TOG2.js";import"./chunk-VJBLBCZM.js";import"./chunk-R3JWGCC5.js";import"./chunk-KPKQNEWS.js";import"./chunk-QSPBB6EE.js";export{a as PowerOptionsComponent};
1
+ import{a}from"./chunk-FU7E6OMM.js";import"./chunk-OHFVMRCL.js";import"./chunk-MMYB2ZMV.js";import"./chunk-QY7HUYL5.js";import"./chunk-7XITHR3W.js";import"./chunk-6GW5TYOW.js";import"./chunk-R3JWGCC5.js";import"./chunk-KPKQNEWS.js";import"./chunk-QSPBB6EE.js";export{a as PowerOptionsComponent};
@@ -1 +1 @@
1
- import{a as _,b as D}from"./chunk-IWA3TOG2.js";import{j as c,k as S}from"./chunk-VJBLBCZM.js";import{f as x}from"./chunk-R3JWGCC5.js";import{C as v,g as O,ga as h,h as a,ha as E,ja as y,ka as l,la as f,mb as I,r as p,va as j,w as d,x as T,z as w}from"./chunk-QSPBB6EE.js";var g=new y("JWT_OPTIONS"),m=(()=>{class r{constructor(e=null){this.tokenGetter=e&&e.tokenGetter||function(){}}urlBase64Decode(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:{t+="==";break}case 3:{t+="=";break}default:throw new Error("Illegal base64url string!")}return this.b64DecodeUnicode(t)}b64decode(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="";if(e=String(e).replace(/=+$/,""),e.length%4===1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(let i=0,s,n,b=0;n=e.charAt(b++);~n&&(s=i%4?s*64+n:n,i++%4)?o+=String.fromCharCode(255&s>>(-2*i&6)):0)n=t.indexOf(n);return o}b64DecodeUnicode(e){return decodeURIComponent(Array.prototype.map.call(this.b64decode(e),t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join(""))}decodeToken(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._decodeToken(t)):this._decodeToken(e)}_decodeToken(e){if(!e||e==="")return null;let t=e.split(".");if(t.length!==3)throw new Error("The inspected token doesn't appear to be a JWT. Check to make sure it has three parts and see https://jwt.io for more.");let o=this.urlBase64Decode(t[1]);if(!o)throw new Error("Cannot decode the token.");return JSON.parse(o)}getTokenExpirationDate(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._getTokenExpirationDate(t)):this._getTokenExpirationDate(e)}_getTokenExpirationDate(e){let t;if(t=this.decodeToken(e),!t||!t.hasOwnProperty("exp"))return null;let o=new Date(0);return o.setUTCSeconds(t.exp),o}isTokenExpired(e=this.tokenGetter(),t){return e instanceof Promise?e.then(o=>this._isTokenExpired(o,t)):this._isTokenExpired(e,t)}_isTokenExpired(e,t){if(!e||e==="")return!0;let o=this.getTokenExpirationDate(e);return t=t||0,o===null?!1:!(o.valueOf()>new Date().valueOf()+t*1e3)}getAuthScheme(e,t){return typeof e=="function"?e(t):e}}return r.\u0275fac=function(e){return new(e||r)(l(g))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),$=r=>r instanceof Promise?v(()=>r):p(r),R=(()=>{class r{constructor(e,t,o){this.jwtHelper=t,this.document=o,this.standardPorts=["80","443"],this.tokenGetter=e.tokenGetter,this.headerName=e.headerName||"Authorization",this.authScheme=e.authScheme||e.authScheme===""?e.authScheme:"Bearer ",this.allowedDomains=e.allowedDomains||[],this.disallowedRoutes=e.disallowedRoutes||[],this.throwNoTokenError=e.throwNoTokenError||!1,this.skipWhenExpired=e.skipWhenExpired}isAllowedDomain(e){let t=new URL(e.url,this.document.location.origin);if(t.host===this.document.location.host)return!0;let o=`${t.hostname}${t.port&&!this.standardPorts.includes(t.port)?":"+t.port:""}`;return this.allowedDomains.findIndex(i=>typeof i=="string"?i===o:i instanceof RegExp?i.test(o):!1)>-1}isDisallowedRoute(e){let t=new URL(e.url,this.document.location.origin);return this.disallowedRoutes.findIndex(o=>{if(typeof o=="string"){let i=new URL(o,this.document.location.origin);return i.hostname===t.hostname&&i.pathname===t.pathname}return o instanceof RegExp?o.test(e.url):!1})>-1}handleInterception(e,t,o){let i=this.jwtHelper.getAuthScheme(this.authScheme,t);if(!e&&this.throwNoTokenError)throw new Error("Could not get token from tokenGetter function.");let s=p(!1);return this.skipWhenExpired&&(s=e?$(this.jwtHelper.isTokenExpired(e)):p(!0)),e?s.pipe(T(n=>n&&this.skipWhenExpired?t.clone():t.clone({setHeaders:{[this.headerName]:`${i}${e}`}})),w(n=>o.handle(n))):o.handle(t)}intercept(e,t){if(!this.isAllowedDomain(e)||this.isDisallowedRoute(e))return t.handle(e);let o=this.tokenGetter(e);return $(o).pipe(w(i=>this.handleInterception(i,e,t)))}}return r.\u0275fac=function(e){return new(e||r)(l(g),l(m),l(j))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),F=(()=>{class r{constructor(e){if(e)throw new Error("JwtModule is already loaded. It should only be imported in your application's main module.")}static forRoot(e){return{ngModule:r,providers:[{provide:x,useClass:R,multi:!0},e.jwtOptionsProvider||{provide:g,useValue:e.config},m]}}}return r.\u0275fac=function(e){return new(e||r)(l(r,12))},r.\u0275mod=I({type:r}),r.\u0275inj=E({}),r})();var k=O(_(),1);var q=(()=>{class r{$api=f(S);$jwtHelper=f(m);$settings=f(D);token;user={};logoutTimer;constructor(){this.loadToken()}login(e){return a(this,null,function*(){let t=yield d(this.$api.post("/auth/login",e));if(!this.validateToken(t.access_token))throw new Error("Invalid username or password.");window.localStorage.setItem(c.jwt.tokenKey,t.access_token),yield this.$settings.getAppSettings()})}noauth(){return a(this,null,function*(){let e=yield d(this.$api.post("/auth/noauth",{}));if(this.validateToken(e.access_token))window.localStorage.setItem(c.jwt.tokenKey,e.access_token),yield this.$settings.getAppSettings();else throw new Error("Invalid username or password.")})}logout(){this.user=null,this.token=null,window.localStorage.removeItem(c.jwt.tokenKey),window.location.reload()}loadToken(){return a(this,null,function*(){this.$settings.settingsLoaded||(yield d(this.$settings.onSettingsLoaded));let e=window.localStorage.getItem(c.jwt.tokenKey);e&&this.validateToken(e)})}validateToken(e){try{return this.$jwtHelper.isTokenExpired(e,this.$settings.serverTimeOffset)&&this.logout(),this.user=this.$jwtHelper.decodeToken(e),this.token=e,this.setLogoutTimer(),!0}catch{return window.localStorage.removeItem(c.jwt.tokenKey),this.token=null,!1}}checkToken(){return a(this,null,function*(){try{return yield d(this.$api.get("/auth/check"))}catch(e){e.status===401&&(console.error("Current token is not valid"),this.logout())}})}setLogoutTimer(){if(clearTimeout(this.logoutTimer),!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)){let t=(0,k.default)(this.$jwtHelper.getTokenExpirationDate(this.token)).diff((0,k.default)().add(this.$settings.serverTimeOffset,"s"),"millisecond");t<=2147483647&&(this.logoutTimer=setTimeout(()=>a(this,null,function*(){this.$settings.formAuth===!1?(yield this.noauth(),window.location.reload()):this.logout()}),t))}}isLoggedIn(){return this.$settings.env.instanceId!==this.user.instanceId?(console.error("Token does not match instance"),!1):this.user&&this.token&&!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac})}return r})();export{m as a,F as b,q as c};
1
+ import{a as _,b as D}from"./chunk-7XITHR3W.js";import{j as c,k as S}from"./chunk-6GW5TYOW.js";import{f as x}from"./chunk-R3JWGCC5.js";import{C as v,g as O,ga as h,h as a,ha as E,ja as y,ka as l,la as f,mb as I,r as p,va as j,w as d,x as T,z as w}from"./chunk-QSPBB6EE.js";var g=new y("JWT_OPTIONS"),m=(()=>{class r{constructor(e=null){this.tokenGetter=e&&e.tokenGetter||function(){}}urlBase64Decode(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:{t+="==";break}case 3:{t+="=";break}default:throw new Error("Illegal base64url string!")}return this.b64DecodeUnicode(t)}b64decode(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",o="";if(e=String(e).replace(/=+$/,""),e.length%4===1)throw new Error("'atob' failed: The string to be decoded is not correctly encoded.");for(let i=0,s,n,b=0;n=e.charAt(b++);~n&&(s=i%4?s*64+n:n,i++%4)?o+=String.fromCharCode(255&s>>(-2*i&6)):0)n=t.indexOf(n);return o}b64DecodeUnicode(e){return decodeURIComponent(Array.prototype.map.call(this.b64decode(e),t=>"%"+("00"+t.charCodeAt(0).toString(16)).slice(-2)).join(""))}decodeToken(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._decodeToken(t)):this._decodeToken(e)}_decodeToken(e){if(!e||e==="")return null;let t=e.split(".");if(t.length!==3)throw new Error("The inspected token doesn't appear to be a JWT. Check to make sure it has three parts and see https://jwt.io for more.");let o=this.urlBase64Decode(t[1]);if(!o)throw new Error("Cannot decode the token.");return JSON.parse(o)}getTokenExpirationDate(e=this.tokenGetter()){return e instanceof Promise?e.then(t=>this._getTokenExpirationDate(t)):this._getTokenExpirationDate(e)}_getTokenExpirationDate(e){let t;if(t=this.decodeToken(e),!t||!t.hasOwnProperty("exp"))return null;let o=new Date(0);return o.setUTCSeconds(t.exp),o}isTokenExpired(e=this.tokenGetter(),t){return e instanceof Promise?e.then(o=>this._isTokenExpired(o,t)):this._isTokenExpired(e,t)}_isTokenExpired(e,t){if(!e||e==="")return!0;let o=this.getTokenExpirationDate(e);return t=t||0,o===null?!1:!(o.valueOf()>new Date().valueOf()+t*1e3)}getAuthScheme(e,t){return typeof e=="function"?e(t):e}}return r.\u0275fac=function(e){return new(e||r)(l(g))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),$=r=>r instanceof Promise?v(()=>r):p(r),R=(()=>{class r{constructor(e,t,o){this.jwtHelper=t,this.document=o,this.standardPorts=["80","443"],this.tokenGetter=e.tokenGetter,this.headerName=e.headerName||"Authorization",this.authScheme=e.authScheme||e.authScheme===""?e.authScheme:"Bearer ",this.allowedDomains=e.allowedDomains||[],this.disallowedRoutes=e.disallowedRoutes||[],this.throwNoTokenError=e.throwNoTokenError||!1,this.skipWhenExpired=e.skipWhenExpired}isAllowedDomain(e){let t=new URL(e.url,this.document.location.origin);if(t.host===this.document.location.host)return!0;let o=`${t.hostname}${t.port&&!this.standardPorts.includes(t.port)?":"+t.port:""}`;return this.allowedDomains.findIndex(i=>typeof i=="string"?i===o:i instanceof RegExp?i.test(o):!1)>-1}isDisallowedRoute(e){let t=new URL(e.url,this.document.location.origin);return this.disallowedRoutes.findIndex(o=>{if(typeof o=="string"){let i=new URL(o,this.document.location.origin);return i.hostname===t.hostname&&i.pathname===t.pathname}return o instanceof RegExp?o.test(e.url):!1})>-1}handleInterception(e,t,o){let i=this.jwtHelper.getAuthScheme(this.authScheme,t);if(!e&&this.throwNoTokenError)throw new Error("Could not get token from tokenGetter function.");let s=p(!1);return this.skipWhenExpired&&(s=e?$(this.jwtHelper.isTokenExpired(e)):p(!0)),e?s.pipe(T(n=>n&&this.skipWhenExpired?t.clone():t.clone({setHeaders:{[this.headerName]:`${i}${e}`}})),w(n=>o.handle(n))):o.handle(t)}intercept(e,t){if(!this.isAllowedDomain(e)||this.isDisallowedRoute(e))return t.handle(e);let o=this.tokenGetter(e);return $(o).pipe(w(i=>this.handleInterception(i,e,t)))}}return r.\u0275fac=function(e){return new(e||r)(l(g),l(m),l(j))},r.\u0275prov=h({token:r,factory:r.\u0275fac}),r})(),F=(()=>{class r{constructor(e){if(e)throw new Error("JwtModule is already loaded. It should only be imported in your application's main module.")}static forRoot(e){return{ngModule:r,providers:[{provide:x,useClass:R,multi:!0},e.jwtOptionsProvider||{provide:g,useValue:e.config},m]}}}return r.\u0275fac=function(e){return new(e||r)(l(r,12))},r.\u0275mod=I({type:r}),r.\u0275inj=E({}),r})();var k=O(_(),1);var q=(()=>{class r{$api=f(S);$jwtHelper=f(m);$settings=f(D);token;user={};logoutTimer;constructor(){this.loadToken()}login(e){return a(this,null,function*(){let t=yield d(this.$api.post("/auth/login",e));if(!this.validateToken(t.access_token))throw new Error("Invalid username or password.");window.localStorage.setItem(c.jwt.tokenKey,t.access_token),yield this.$settings.getAppSettings()})}noauth(){return a(this,null,function*(){let e=yield d(this.$api.post("/auth/noauth",{}));if(this.validateToken(e.access_token))window.localStorage.setItem(c.jwt.tokenKey,e.access_token),yield this.$settings.getAppSettings();else throw new Error("Invalid username or password.")})}logout(){this.user=null,this.token=null,window.localStorage.removeItem(c.jwt.tokenKey),window.location.reload()}loadToken(){return a(this,null,function*(){this.$settings.settingsLoaded||(yield d(this.$settings.onSettingsLoaded));let e=window.localStorage.getItem(c.jwt.tokenKey);e&&this.validateToken(e)})}validateToken(e){try{return this.$jwtHelper.isTokenExpired(e,this.$settings.serverTimeOffset)&&this.logout(),this.user=this.$jwtHelper.decodeToken(e),this.token=e,this.setLogoutTimer(),!0}catch{return window.localStorage.removeItem(c.jwt.tokenKey),this.token=null,!1}}checkToken(){return a(this,null,function*(){try{return yield d(this.$api.get("/auth/check"))}catch(e){e.status===401&&(console.error("Current token is not valid"),this.logout())}})}setLogoutTimer(){if(clearTimeout(this.logoutTimer),!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)){let t=(0,k.default)(this.$jwtHelper.getTokenExpirationDate(this.token)).diff((0,k.default)().add(this.$settings.serverTimeOffset,"s"),"millisecond");t<=2147483647&&(this.logoutTimer=setTimeout(()=>a(this,null,function*(){this.$settings.formAuth===!1?(yield this.noauth(),window.location.reload()):this.logout()}),t))}}isLoggedIn(){return this.$settings.env.instanceId!==this.user.instanceId?(console.error("Token does not match instance"),!1):this.user&&this.token&&!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=h({token:r,factory:r.\u0275fac})}return r})();export{m as a,F as b,q as c};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-CU4KLIWT.js";import"./chunk-MMYB2ZMV.js";import"./chunk-QY7HUYL5.js";import"./chunk-JYNDHHKS.js";import"./chunk-7XITHR3W.js";import"./chunk-6GW5TYOW.js";import"./chunk-R3JWGCC5.js";import"./chunk-KPKQNEWS.js";import"./chunk-QSPBB6EE.js";export{a as LoginComponent};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-LBFWQVUA.js";import"./chunk-QY7HUYL5.js";import"./chunk-2OEG7XPN.js";import"./chunk-JYNDHHKS.js";import"./chunk-7XITHR3W.js";import"./chunk-6GW5TYOW.js";import"./chunk-R3JWGCC5.js";import"./chunk-KPKQNEWS.js";import"./chunk-QSPBB6EE.js";export{a as RestartComponent};
@@ -1 +1 @@
1
- import{d as i}from"./chunk-QY7HUYL5.js";import{c as s}from"./chunk-7AZ4UU6X.js";import{h as o}from"./chunk-VJBLBCZM.js";import{a}from"./chunk-KPKQNEWS.js";import{ga as e,la as r}from"./chunk-QSPBB6EE.js";var v=(()=>{class t{$auth=r(s);$router=r(i);$translate=r(a);$toastr=r(o);constructor(){}canActivate(){return this.$auth.user&&this.$auth.user.admin?!0:(this.$toastr.error(this.$translate.instant("toast.no_auth"),this.$translate.instant("toast.title_error")),this.$router.navigate(["/"]),!1)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=e({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{v as a};
1
+ import{d as i}from"./chunk-QY7HUYL5.js";import{c as s}from"./chunk-JYNDHHKS.js";import{h as o}from"./chunk-6GW5TYOW.js";import{a}from"./chunk-KPKQNEWS.js";import{ga as e,la as r}from"./chunk-QSPBB6EE.js";var v=(()=>{class t{$auth=r(s);$router=r(i);$translate=r(a);$toastr=r(o);constructor(){}canActivate(){return this.$auth.user&&this.$auth.user.admin?!0:(this.$toastr.error(this.$translate.instant("toast.no_auth"),this.$translate.instant("toast.title_error")),this.$router.navigate(["/"]),!1)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=e({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{v as a};
@@ -1,4 +1,4 @@
1
- import{a as S,b as O,c as U}from"./chunk-DSBAEBB7.js";import{a as g}from"./chunk-6B2RZNXN.js";import{M as w,e as x,g as h,ga as E,la as L,n as R}from"./chunk-QSPBB6EE.js";var F=x((v,b)=>{(function(a,l){typeof define=="function"&&define.amd?define([],l):typeof v<"u"?l():(l(),a.FileSaver={})})(v,function(){"use strict";function a(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function l(e,t,n){var i=new XMLHttpRequest;i.open("GET",e),i.responseType="blob",i.onload=function(){r(i.response,t,n)},i.onerror=function(){console.error("could not download file")},i.send()}function d(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function c(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0,m=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),r=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!m?function(e,t,n){var i=s.URL||s.webkitURL,o=document.createElement("a");t=t||e.name||"download",o.download=t,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin===location.origin?c(o):d(o.href)?l(e,t,n):c(o,o.target="_blank")):(o.href=i.createObjectURL(e),setTimeout(function(){i.revokeObjectURL(o.href)},4e4),setTimeout(function(){c(o)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,n){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(a(e,n),t);else if(d(e))l(e,t,n);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout(function(){c(i)})}}:function(e,t,n,i){if(i=i||open("","_blank"),i&&(i.document.title=i.document.body.innerText="downloading..."),typeof e=="string")return l(e,t,n);var o=e.type==="application/octet-stream",z=/constructor/i.test(s.HTMLElement)||s.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||o&&z||m)&&typeof FileReader<"u"){var u=new FileReader;u.onloadend=function(){var f=u.result;f=y?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=f:location=f,i=null},u.readAsDataURL(e)}else{var A=s.URL||s.webkitURL,p=A.createObjectURL(e);i?i.location=p:location.href=p,i=null,setTimeout(function(){A.revokeObjectURL(p)},4e4)}});s.saveAs=r.saveAs=r,typeof b<"u"&&(b.exports=r)})});var k=h(S(),1),j=h(O(),1),T=h(U(),1);var W=(()=>{class a{$ws=L(g);term;io;fitAddon;webLinksAddon;resize;elementResize;pluginName;constructor(){}startTerminal(d,c={},s,m){this.pluginName=m,this.elementResize=s,this.io=this.$ws.connectToNamespace("log"),this.term=new k.Terminal(c),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new j.FitAddon,this.webLinksAddon=new T.WebLinksAddon,this.resize=new R,this.term.open(d.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.subscribe(()=>{this.term.reset(),this.io.socket.emit("tail-log",{cols:this.term.cols,rows:this.term.rows})}),this.io.socket.on("disconnect",()=>{this.term.write(`
1
+ import{a as S,b as O,c as U}from"./chunk-DSBAEBB7.js";import{a as g}from"./chunk-2OEG7XPN.js";import{M as w,e as x,g as h,ga as E,la as L,n as R}from"./chunk-QSPBB6EE.js";var F=x((v,b)=>{(function(a,l){typeof define=="function"&&define.amd?define([],l):typeof v<"u"?l():(l(),a.FileSaver={})})(v,function(){"use strict";function a(e,t){return typeof t>"u"?t={autoBom:!1}:typeof t!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function l(e,t,n){var i=new XMLHttpRequest;i.open("GET",e),i.responseType="blob",i.onload=function(){r(i.response,t,n)},i.onerror=function(){console.error("could not download file")},i.send()}function d(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function c(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var s=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof global=="object"&&global.global===global?global:void 0,m=s.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),r=s.saveAs||(typeof window!="object"||window!==s?function(){}:"download"in HTMLAnchorElement.prototype&&!m?function(e,t,n){var i=s.URL||s.webkitURL,o=document.createElement("a");t=t||e.name||"download",o.download=t,o.rel="noopener",typeof e=="string"?(o.href=e,o.origin===location.origin?c(o):d(o.href)?l(e,t,n):c(o,o.target="_blank")):(o.href=i.createObjectURL(e),setTimeout(function(){i.revokeObjectURL(o.href)},4e4),setTimeout(function(){c(o)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,n){if(t=t||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(a(e,n),t);else if(d(e))l(e,t,n);else{var i=document.createElement("a");i.href=e,i.target="_blank",setTimeout(function(){c(i)})}}:function(e,t,n,i){if(i=i||open("","_blank"),i&&(i.document.title=i.document.body.innerText="downloading..."),typeof e=="string")return l(e,t,n);var o=e.type==="application/octet-stream",z=/constructor/i.test(s.HTMLElement)||s.safari,y=/CriOS\/[\d]+/.test(navigator.userAgent);if((y||o&&z||m)&&typeof FileReader<"u"){var u=new FileReader;u.onloadend=function(){var f=u.result;f=y?f:f.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=f:location=f,i=null},u.readAsDataURL(e)}else{var A=s.URL||s.webkitURL,p=A.createObjectURL(e);i?i.location=p:location.href=p,i=null,setTimeout(function(){A.revokeObjectURL(p)},4e4)}});s.saveAs=r.saveAs=r,typeof b<"u"&&(b.exports=r)})});var k=h(S(),1),j=h(O(),1),T=h(U(),1);var W=(()=>{class a{$ws=L(g);term;io;fitAddon;webLinksAddon;resize;elementResize;pluginName;constructor(){}startTerminal(d,c={},s,m){this.pluginName=m,this.elementResize=s,this.io=this.$ws.connectToNamespace("log"),this.term=new k.Terminal(c),setTimeout(()=>{this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon)}),this.fitAddon=new j.FitAddon,this.webLinksAddon=new T.WebLinksAddon,this.resize=new R,this.term.open(d.nativeElement),setTimeout(()=>{this.fitAddon.activate(this.term),this.fitAddon.fit()}),this.io.connected.subscribe(()=>{this.term.reset(),this.io.socket.emit("tail-log",{cols:this.term.cols,rows:this.term.rows})}),this.io.socket.on("disconnect",()=>{this.term.write(`
2
2
  \r
3
3
  \rWebsocket failed to connect. Is the server running?
4
4
  \r
@@ -1 +1 @@
1
- import{d as E}from"./chunk-QY7HUYL5.js";import{a as D}from"./chunk-6B2RZNXN.js";import{b as B}from"./chunk-IWA3TOG2.js";import{h as O,k as R}from"./chunk-VJBLBCZM.js";import{a as k,b as I}from"./chunk-KPKQNEWS.js";import{$a as e,Ac as o,Bc as l,Hb as u,Ib as f,Nb as v,Ob as r,Pb as n,Qb as x,Ub as $,Xb as S,Yb as _,bd as T,jc as a,kc as p,la as m,lb as w,lc as h,ra as C,sa as y,wc as b,xc as g}from"./chunk-QSPBB6EE.js";var U=(t,c)=>({"fas fa-fw fa-spinner fa-spin":t,"far fa-fw fa-check-circle":c}),F=t=>({"grey-text":t}),P=(t,c)=>({"far fa-fw fa-circle":t,"fas fa-fw fa-spinner fa-spin":c});function j(t,c){t&1&&(r(0,"p",7),a(1),o(2,"translate"),n()),t&2&&(e(),p(l(2,1,"restart.please_wait_while_server_restarts")))}function M(t,c){if(t&1&&(r(0,"div",8),a(1),n()),t&2){let i=_();e(),p(i.error)}}function V(t,c){if(t&1&&(r(0,"div",9)(1,"div",11)(2,"span"),x(3,"i",12),a(4),o(5,"translate"),n()(),r(6,"div",11)(7,"span",12),x(8,"i",12),a(9),o(10,"translate"),n()()()),t&2){let i=_();e(3),v("ngClass",g(9,U,!i.uiOnline,i.uiOnline)),e(),h(" ",l(5,5,"restart.ui_online")," "),e(3),v("ngClass",b(12,F,!i.uiOnline)),e(),v("ngClass",g(14,P,!i.uiOnline,i.uiOnline)),e(),h(" ",l(10,7,"restart.service_ready")," ")}}function z(t,c){if(t&1){let i=$();r(0,"p",15)(1,"button",16),S("click",function(){C(i);let d=_(2);return y(d.viewLogs())}),a(2),o(3,"translate"),n()()}t&2&&(e(2),p(l(3,1,"menu.tooltip_view_logs")))}function A(t,c){if(t&1&&(r(0,"div",10)(1,"p"),a(2),o(3,"translate"),n(),r(4,"p",13),a(5),o(6,"translate"),r(7,"span",14),a(8),n()(),u(9,z,4,3,"p",15),n()),t&2){let i=_();e(2),p(l(3,4,"restart.server_is_taking_long_time_to_restart")),e(3),h(" ",l(6,6,"restart.label_restart_command_executed"),": "),e(3),p(i.resp.command||"End Process"),e(),f(i.uiOnline?9:-1)}}var Y=(()=>{class t{$api=m(R);$router=m(E);$settings=m(B);$toastr=m(O);$translate=m(k);$ws=m(D);checkTimeout;checkDelay;resp={};timeout=!1;error=!1;uiOnline=!1;io;constructor(){}ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$router.parseUrl(this.$router.url).queryParams.restarting?(this.uiOnline=!0,this.checkIfServerUp()):this.$api.put("/server/restart",{}).subscribe({next:s=>{this.resp=s,this.checkIfServerUp(),s.restartingUI||(this.uiOnline=!0)},error:s=>{console.error(s),this.error=this.$translate.instant("restart.toast_server_restart_error"),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",i=>{this.uiOnline=!0,(i.status==="up"||i.status==="pending")&&(this.$toastr.success(this.$translate.instant("restart.toast_server_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},7e3),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("restart.toast_server_restart_timeout"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},4e4)}viewLogs(){this.$router.navigate(["/logs"])}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=w({type:t,selectors:[["ng-component"]],decls:15,vars:10,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"grey-text"],[1,"alert","alert-error","my-4"],[1,"justify-content-center","my-4"],[1,"alert","alert-warning","my-4"],[1,"restart-progress-box","primary-text"],[3,"ngClass"],[1,"grey-text","mb-0"],[1,"font-monospace"],[1,"mt-2","mb-0"],[1,"btn","btn-primary","mb-0",3,"click"]],template:function(s,d){s&1&&(r(0,"div",0)(1,"h3",1),a(2),o(3,"translate"),n()(),r(4,"div",2)(5,"div",3),x(6,"i",4),n(),r(7,"div",5)(8,"h4",6),a(9),o(10,"translate"),n(),u(11,j,3,3,"p",7),u(12,M,2,1,"div",8),u(13,V,11,17,"div",9),u(14,A,10,8,"div",10),n()()),s&2&&(e(2),p(l(3,6,"menu.restart.title")),e(7),p(l(10,8,"restart.title_restart")),e(2),f(d.error?-1:11),e(),f(d.error?12:-1),e(),f(d.error?-1:13),e(),f(d.timeout?14:-1))},dependencies:[T,I],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{Y as a};
1
+ import{d as E}from"./chunk-QY7HUYL5.js";import{a as D}from"./chunk-2OEG7XPN.js";import{b as B}from"./chunk-7XITHR3W.js";import{h as O,k as R}from"./chunk-6GW5TYOW.js";import{a as k,b as I}from"./chunk-KPKQNEWS.js";import{$a as e,Ac as o,Bc as l,Hb as u,Ib as f,Nb as v,Ob as r,Pb as n,Qb as x,Ub as $,Xb as S,Yb as _,bd as T,jc as a,kc as p,la as m,lb as w,lc as h,ra as C,sa as y,wc as b,xc as g}from"./chunk-QSPBB6EE.js";var U=(t,c)=>({"fas fa-fw fa-spinner fa-spin":t,"far fa-fw fa-check-circle":c}),F=t=>({"grey-text":t}),P=(t,c)=>({"far fa-fw fa-circle":t,"fas fa-fw fa-spinner fa-spin":c});function j(t,c){t&1&&(r(0,"p",7),a(1),o(2,"translate"),n()),t&2&&(e(),p(l(2,1,"restart.please_wait_while_server_restarts")))}function M(t,c){if(t&1&&(r(0,"div",8),a(1),n()),t&2){let i=_();e(),p(i.error)}}function V(t,c){if(t&1&&(r(0,"div",9)(1,"div",11)(2,"span"),x(3,"i",12),a(4),o(5,"translate"),n()(),r(6,"div",11)(7,"span",12),x(8,"i",12),a(9),o(10,"translate"),n()()()),t&2){let i=_();e(3),v("ngClass",g(9,U,!i.uiOnline,i.uiOnline)),e(),h(" ",l(5,5,"restart.ui_online")," "),e(3),v("ngClass",b(12,F,!i.uiOnline)),e(),v("ngClass",g(14,P,!i.uiOnline,i.uiOnline)),e(),h(" ",l(10,7,"restart.service_ready")," ")}}function z(t,c){if(t&1){let i=$();r(0,"p",15)(1,"button",16),S("click",function(){C(i);let d=_(2);return y(d.viewLogs())}),a(2),o(3,"translate"),n()()}t&2&&(e(2),p(l(3,1,"menu.tooltip_view_logs")))}function A(t,c){if(t&1&&(r(0,"div",10)(1,"p"),a(2),o(3,"translate"),n(),r(4,"p",13),a(5),o(6,"translate"),r(7,"span",14),a(8),n()(),u(9,z,4,3,"p",15),n()),t&2){let i=_();e(2),p(l(3,4,"restart.server_is_taking_long_time_to_restart")),e(3),h(" ",l(6,6,"restart.label_restart_command_executed"),": "),e(3),p(i.resp.command||"End Process"),e(),f(i.uiOnline?9:-1)}}var Y=(()=>{class t{$api=m(R);$router=m(E);$settings=m(B);$toastr=m(O);$translate=m(k);$ws=m(D);checkTimeout;checkDelay;resp={};timeout=!1;error=!1;uiOnline=!1;io;constructor(){}ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$router.parseUrl(this.$router.url).queryParams.restarting?(this.uiOnline=!0,this.checkIfServerUp()):this.$api.put("/server/restart",{}).subscribe({next:s=>{this.resp=s,this.checkIfServerUp(),s.restartingUI||(this.uiOnline=!0)},error:s=>{console.error(s),this.error=this.$translate.instant("restart.toast_server_restart_error"),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",i=>{this.uiOnline=!0,(i.status==="up"||i.status==="pending")&&(this.$toastr.success(this.$translate.instant("restart.toast_server_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},7e3),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("restart.toast_server_restart_timeout"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},4e4)}viewLogs(){this.$router.navigate(["/logs"])}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=w({type:t,selectors:[["ng-component"]],decls:15,vars:10,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fas","fa-fw","fa-power-off",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"grey-text"],[1,"alert","alert-error","my-4"],[1,"justify-content-center","my-4"],[1,"alert","alert-warning","my-4"],[1,"restart-progress-box","primary-text"],[3,"ngClass"],[1,"grey-text","mb-0"],[1,"font-monospace"],[1,"mt-2","mb-0"],[1,"btn","btn-primary","mb-0",3,"click"]],template:function(s,d){s&1&&(r(0,"div",0)(1,"h3",1),a(2),o(3,"translate"),n()(),r(4,"div",2)(5,"div",3),x(6,"i",4),n(),r(7,"div",5)(8,"h4",6),a(9),o(10,"translate"),n(),u(11,j,3,3,"p",7),u(12,M,2,1,"div",8),u(13,V,11,17,"div",9),u(14,A,10,8,"div",10),n()()),s&2&&(e(2),p(l(3,6,"menu.restart.title")),e(7),p(l(10,8,"restart.title_restart")),e(2),f(d.error?-1:11),e(),f(d.error?12:-1),e(),f(d.error?-1:13),e(),f(d.timeout?14:-1))},dependencies:[T,I],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{Y as a};
@@ -1 +1 @@
1
- import{a}from"./chunk-FXR7CTH7.js";import"./chunk-VJBLBCZM.js";import"./chunk-R3JWGCC5.js";import"./chunk-KPKQNEWS.js";import"./chunk-QSPBB6EE.js";export{a as ShutdownLinuxComponent};
1
+ import{a}from"./chunk-FZC446UQ.js";import"./chunk-6GW5TYOW.js";import"./chunk-R3JWGCC5.js";import"./chunk-KPKQNEWS.js";import"./chunk-QSPBB6EE.js";export{a as ShutdownLinuxComponent};
@@ -0,0 +1 @@
1
+ import{f as a}from"./chunk-FUYZJ5A5.js";import"./chunk-SF3KWWNT.js";import"./chunk-JDC75DEA.js";import"./chunk-SHW4IV7S.js";import"./chunk-XJY7A24W.js";import"./chunk-TIE2WSHM.js";import"./chunk-6SEBWKRM.js";import"./chunk-LA4JXO55.js";import"./chunk-DSBAEBB7.js";import"./chunk-ZCCLGLMW.js";import"./chunk-HHPGR3HF.js";import"./chunk-6M524CF7.js";import"./chunk-OHFVMRCL.js";import"./chunk-MMYB2ZMV.js";import"./chunk-QY7HUYL5.js";import"./chunk-2OEG7XPN.js";import"./chunk-JYNDHHKS.js";import"./chunk-7XITHR3W.js";import"./chunk-6GW5TYOW.js";import"./chunk-R3JWGCC5.js";import"./chunk-KPKQNEWS.js";import"./chunk-QSPBB6EE.js";export{a as SettingsComponent};
@@ -1 +1 @@
1
- import"./chunk-5JP4FXOB.js";import"./chunk-DZVDMMEY.js";import"./chunk-DSBAEBB7.js";import"./chunk-6M524CF7.js";import{q as n}from"./chunk-OHFVMRCL.js";import"./chunk-MMYB2ZMV.js";import{g as i}from"./chunk-QY7HUYL5.js";import"./chunk-6B2RZNXN.js";import"./chunk-7AZ4UU6X.js";import"./chunk-IWA3TOG2.js";import"./chunk-VJBLBCZM.js";import"./chunk-R3JWGCC5.js";import{c as s}from"./chunk-KPKQNEWS.js";import{ha as t,kd as m,mb as r}from"./chunk-QSPBB6EE.js";var f=[{path:"",loadComponent:()=>import("./chunk-PDFRV7MA.js").then(o=>o.LogsComponent)}],p=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i.forChild(f),i]})}return o})();var h=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[m,p,n,s.forChild()]})}return o})();export{h as LogsModule};
1
+ import"./chunk-WBVWEXDQ.js";import"./chunk-LA4JXO55.js";import"./chunk-DSBAEBB7.js";import"./chunk-6M524CF7.js";import{q as n}from"./chunk-OHFVMRCL.js";import"./chunk-MMYB2ZMV.js";import{g as i}from"./chunk-QY7HUYL5.js";import"./chunk-2OEG7XPN.js";import"./chunk-JYNDHHKS.js";import"./chunk-7XITHR3W.js";import"./chunk-6GW5TYOW.js";import"./chunk-R3JWGCC5.js";import{c as s}from"./chunk-KPKQNEWS.js";import{ha as t,kd as m,mb as r}from"./chunk-QSPBB6EE.js";var f=[{path:"",loadComponent:()=>import("./chunk-R35MAK5U.js").then(o=>o.LogsComponent)}],p=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[i.forChild(f),i]})}return o})();var h=(()=>{class o{static \u0275fac=function(e){return new(e||o)};static \u0275mod=r({type:o});static \u0275inj=t({imports:[m,p,n,s.forChild()]})}return o})();export{h as LogsModule};