homebridge-config-ui-x 5.11.2-beta.4 → 5.11.2-beta.5

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 (59) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/package.json +1 -1
  3. package/public/chunk-2YQMYSXT.js +1 -0
  4. package/public/{chunk-XGK5YFH6.js → chunk-3JBXVUFP.js} +2 -2
  5. package/public/{chunk-QBG7SKRK.js → chunk-47LZZIPJ.js} +6 -6
  6. package/public/{chunk-7JNVXXNR.js → chunk-5F6SGJZO.js} +1 -1
  7. package/public/{chunk-GJ42U6LP.js → chunk-5UTHYAO4.js} +1 -1
  8. package/public/chunk-5V5T5YDK.js +1 -0
  9. package/public/{chunk-T472BWYK.js → chunk-72SK6LN3.js} +1 -1
  10. package/public/{chunk-AM5CKSLZ.js → chunk-746K2W65.js} +1 -1
  11. package/public/{chunk-2TQEV57U.js → chunk-B6EPFA4V.js} +1 -1
  12. package/public/{chunk-BVJS76CN.js → chunk-BHYS7LPU.js} +1 -1
  13. package/public/{chunk-GT2YL2TI.js → chunk-BQMRSELR.js} +1 -1
  14. package/public/{chunk-4VLAXCSY.js → chunk-CDVVVWKM.js} +1 -1
  15. package/public/{chunk-MRPQNEON.js → chunk-CYKWMDCC.js} +1 -1
  16. package/public/{chunk-LVBVUIJY.js → chunk-D3MUNCMG.js} +1 -1
  17. package/public/{chunk-E35SHTFY.js → chunk-D3NFARXL.js} +1 -1
  18. package/public/{chunk-PEOTW7KR.js → chunk-G7V2J2JO.js} +1 -1
  19. package/public/{chunk-VBQ2CSUE.js → chunk-GFM46DC6.js} +1 -1
  20. package/public/{chunk-CPECPTSN.js → chunk-H53NQXNF.js} +1 -1
  21. package/public/chunk-HBNZXYWD.js +4 -0
  22. package/public/chunk-HQLIDFFL.js +1 -0
  23. package/public/chunk-IF2VXUU3.js +3 -0
  24. package/public/{chunk-S4BMZ4C4.js → chunk-IMR3XZ37.js} +1 -1
  25. package/public/chunk-J24WFLH3.js +1 -0
  26. package/public/{chunk-CNUIQJSO.js → chunk-J6JCLCR6.js} +1 -1
  27. package/public/chunk-JN6IF7KG.js +1 -0
  28. package/public/{chunk-MS4K4KAK.js → chunk-K3VXCKFJ.js} +1 -1
  29. package/public/{chunk-42Y35W3J.js → chunk-LKRXJ4NQ.js} +1 -1
  30. package/public/{chunk-WX345PMX.js → chunk-LQNKSANI.js} +1 -1
  31. package/public/{chunk-EMF6ZINV.js → chunk-N74OZDD6.js} +1 -1
  32. package/public/{chunk-TRDYZJYI.js → chunk-P2U63MCR.js} +1 -1
  33. package/public/chunk-PK2CVZPI.js +1 -0
  34. package/public/{chunk-TTX3XSDC.js → chunk-QCD43BXL.js} +1 -1
  35. package/public/{chunk-6ZOSTYPR.js → chunk-RMWS37MG.js} +1 -1
  36. package/public/chunk-S6MSUZ3J.js +1 -0
  37. package/public/{chunk-QGLAR7UC.js → chunk-TRA6X3HB.js} +1 -1
  38. package/public/{chunk-WBTFILXV.js → chunk-VQI4BA3M.js} +7 -7
  39. package/public/{chunk-IZHFI46L.js → chunk-W3WJ3GLW.js} +1 -1
  40. package/public/{chunk-5K3S6ZXB.js → chunk-WPJDSHYO.js} +1 -1
  41. package/public/chunk-XF7D4C2H.js +1 -0
  42. package/public/{chunk-UO7KCTHV.js → chunk-YAUW3QQV.js} +1 -1
  43. package/public/chunk-YDOFHXZH.js +1 -0
  44. package/public/chunk-ZDIBPB2V.js +5 -0
  45. package/public/index.html +1 -1
  46. package/public/main-VBBHOBST.js +1 -0
  47. package/public/chunk-3LKYOCGJ.js +0 -1
  48. package/public/chunk-4KXPUEE3.js +0 -4
  49. package/public/chunk-4TAGCB7R.js +0 -1
  50. package/public/chunk-DBMKB5Z2.js +0 -1
  51. package/public/chunk-FQDRGOO5.js +0 -1
  52. package/public/chunk-FYHEIYSO.js +0 -5
  53. package/public/chunk-GYMWB5SQ.js +0 -1
  54. package/public/chunk-N6AN65NK.js +0 -3
  55. package/public/chunk-SE6AXFTZ.js +0 -1
  56. package/public/chunk-SIODBMHU.js +0 -1
  57. package/public/chunk-VAD47NOZ.js +0 -1
  58. package/public/chunk-ZDUAXPNP.js +0 -1
  59. package/public/main-SPPQL5YI.js +0 -1
@@ -1 +1 @@
1
- import{a as E}from"./chunk-VAD47NOZ.js";import{a as S}from"./chunk-FYHEIYSO.js";import"./chunk-BMOLDRJ3.js";import"./chunk-QGLAR7UC.js";import"./chunk-6ZOSTYPR.js";import"./chunk-MS4K4KAK.js";import"./chunk-BGCYR25X.js";import"./chunk-E35SHTFY.js";import"./chunk-UO7KCTHV.js";import{b as C}from"./chunk-T472BWYK.js";import{E as b,F as w}from"./chunk-2TQEV57U.js";import{Ec as T,Fc as y,Jb as s,Kb as l,Lb as u,Pc as $,Xb as h,Ya as a,Za as d,aa as n,d as m,ec as v,fc as f,kc as g,lc as p,nb as c}from"./chunk-MKV5RAJQ.js";import"./chunk-B4AJQJMI.js";var B=["terminaloutput"],L=(()=>{class r{$terminal=n(S);$settings=n(C);$navigationGuard=n(E);$translate=n(b);resizeEvent=new m;termTarget=$("terminaloutput",{});onWindowResize(){this.resizeEvent.next(void 0)}onBeforeUnload(i){return this.$navigationGuard.handleBeforeUnload(i)}onWindowFocus(){this.activateTerminal()}onClick(){this.activateTerminal()}activateTerminal(){this.$terminal.isTerminalReady()&&this.$terminal.term&&this.$terminal.term.focus()}ngOnInit(){let i=this.$translate.instant("menu.linux.label_terminal");this.$settings.setPageTitle(i),window.document.querySelector("body").classList.add("bg-black"),this.$terminal.isTerminalReady()&&this.$terminal.destroyTerminal(),this.$settings.env.terminal?.persistence&&this.$terminal.hasActiveSession()?this.$terminal.reconnectTerminal(this.termTarget(),{},this.resizeEvent):(!this.$settings.env.terminal?.persistence&&this.$terminal.hasActiveSession()&&this.$terminal.destroyPersistentSession(),this.$terminal.startTerminal(this.termTarget(),{},this.resizeEvent)),requestAnimationFrame(()=>{this.activateTerminal()})}ngAfterViewInit(){document.addEventListener("visibilitychange",this.onVisibilityChange.bind(this))}onVisibilityChange(){!document.hidden&&this.$terminal.isTerminalReady()&&requestAnimationFrame(()=>{this.activateTerminal()})}canDeactivate(){return this.$navigationGuard.canDeactivate()}ngOnDestroy(){document.removeEventListener("visibilitychange",this.onVisibilityChange.bind(this)),window.document.querySelector("body").classList.remove("bg-black"),this.$settings.env.terminal?.persistence?this.$terminal.detachTerminal():this.$terminal.destroyPersistentSession()}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=c({type:r,selectors:[["ng-component"]],viewQuery:function(e,t){e&1&&v(t.termTarget,B,5),e&2&&f()},hostBindings:function(e,t){e&1&&h("resize",function(){return t.onWindowResize()},a)("beforeunload",function(_){return t.onBeforeUnload(_)},a)("focus",function(){return t.onWindowFocus()},a)("click",function(){return t.onClick()})},decls:8,vars:3,consts:[["terminaloutput",""],[1,"row","mb-3"],[1,"col-12"],[1,"primary-text","m-0"],[1,"flex-column","d-flex","align-items-stretch","adjust-for-mobile"],["id","docker-terminal",1,"align-self-end","w-100","h-100","mb-1"]],template:function(e,t){e&1&&(s(0,"div",1)(1,"div",2)(2,"h3",3),g(3),T(4,"translate"),l()()(),s(5,"div",4),u(6,"div",5,0),l()),e&2&&(d(3),p(y(4,1,"menu.linux.label_terminal")))},dependencies:[w],encapsulation:2})}return r})();export{L as TerminalComponent};
1
+ import{a as E}from"./chunk-XF7D4C2H.js";import{a as S}from"./chunk-ZDIBPB2V.js";import"./chunk-BMOLDRJ3.js";import"./chunk-TRA6X3HB.js";import"./chunk-RMWS37MG.js";import"./chunk-K3VXCKFJ.js";import"./chunk-BGCYR25X.js";import"./chunk-D3NFARXL.js";import"./chunk-YAUW3QQV.js";import{b as C}from"./chunk-72SK6LN3.js";import{E as b,F as w}from"./chunk-B6EPFA4V.js";import{Ec as T,Fc as y,Jb as s,Kb as l,Lb as u,Pc as $,Xb as h,Ya as a,Za as d,aa as n,d as m,ec as v,fc as f,kc as g,lc as p,nb as c}from"./chunk-MKV5RAJQ.js";import"./chunk-B4AJQJMI.js";var B=["terminaloutput"],L=(()=>{class r{$terminal=n(S);$settings=n(C);$navigationGuard=n(E);$translate=n(b);resizeEvent=new m;termTarget=$("terminaloutput",{});onWindowResize(){this.resizeEvent.next(void 0)}onBeforeUnload(i){return this.$navigationGuard.handleBeforeUnload(i)}onWindowFocus(){this.activateTerminal()}onClick(){this.activateTerminal()}activateTerminal(){this.$terminal.isTerminalReady()&&this.$terminal.term&&this.$terminal.term.focus()}ngOnInit(){let i=this.$translate.instant("menu.linux.label_terminal");this.$settings.setPageTitle(i),window.document.querySelector("body").classList.add("bg-black"),this.$terminal.isTerminalReady()&&this.$terminal.destroyTerminal(),this.$settings.env.terminal?.persistence&&this.$terminal.hasActiveSession()?this.$terminal.reconnectTerminal(this.termTarget(),{},this.resizeEvent):(!this.$settings.env.terminal?.persistence&&this.$terminal.hasActiveSession()&&this.$terminal.destroyPersistentSession(),this.$terminal.startTerminal(this.termTarget(),{},this.resizeEvent)),requestAnimationFrame(()=>{this.activateTerminal()})}ngAfterViewInit(){document.addEventListener("visibilitychange",this.onVisibilityChange.bind(this))}onVisibilityChange(){!document.hidden&&this.$terminal.isTerminalReady()&&requestAnimationFrame(()=>{this.activateTerminal()})}canDeactivate(){return this.$navigationGuard.canDeactivate()}ngOnDestroy(){document.removeEventListener("visibilitychange",this.onVisibilityChange.bind(this)),window.document.querySelector("body").classList.remove("bg-black"),this.$settings.env.terminal?.persistence?this.$terminal.detachTerminal():this.$terminal.destroyPersistentSession()}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=c({type:r,selectors:[["ng-component"]],viewQuery:function(e,t){e&1&&v(t.termTarget,B,5),e&2&&f()},hostBindings:function(e,t){e&1&&h("resize",function(){return t.onWindowResize()},a)("beforeunload",function(_){return t.onBeforeUnload(_)},a)("focus",function(){return t.onWindowFocus()},a)("click",function(){return t.onClick()})},decls:8,vars:3,consts:[["terminaloutput",""],[1,"row","mb-3"],[1,"col-12"],[1,"primary-text","m-0"],[1,"flex-column","d-flex","align-items-stretch","adjust-for-mobile"],["id","docker-terminal",1,"align-self-end","w-100","h-100","mb-1"]],template:function(e,t){e&1&&(s(0,"div",1)(1,"div",2)(2,"h3",3),g(3),T(4,"translate"),l()()(),s(5,"div",4),u(6,"div",5,0),l()),e&2&&(d(3),p(y(4,1,"menu.linux.label_terminal")))},dependencies:[w],encapsulation:2})}return r})();export{L as TerminalComponent};
@@ -1,4 +1,4 @@
1
- import{C as nf,D as rf,a as Zy,b as Yy,c as _s,e as Wr,f as Xy,h as Qy,i as e0,k as t0,l as Ul,m as n0,o as r0,p as i0,q as so,t as o0,u as Wl,v as tf,w as Gl}from"./chunk-UO7KCTHV.js";import{d as Br,e as xt,m as Ur,o as Ky,y as Jy}from"./chunk-2TQEV57U.js";import{$ as Fl,Aa as rr,C as Ud,Ca as zy,Ea as Hy,Fb as E,G as qy,Gb as ee,Hb as X,Ib as oe,Mb as Zd,Nb as Yd,Nc as zn,Oc as B,P as Al,Pc as Bl,Q as Wd,Qc as Uy,R as Ln,Rb as gt,S as jy,Sc as cn,Ua as $e,W as Gd,Wc as bi,X as Je,Xb as rt,Xc as Wy,Y as Cn,Yc as Gy,Za as L,Zb as j,_ as Vn,a as gi,aa as U,bc as jl,c as _i,cc as Ll,d as Ae,db as Kd,dc as Vl,e as no,ea as Ly,ec as zl,f as Bd,fc as Hl,ga as ct,gb as ro,h as Ry,ha as dt,hb as ql,hc as Dn,i as My,ib as gs,ic as wt,jc as Y,ka as ms,kb as ir,kc as un,la as yi,lc as io,m as Ny,mc as By,nb as Fe,o as Nl,oa as ln,ob as Sn,pa as Hr,pb as vi,rc as Xd,sa as nr,sc as Qd,tb as se,tc as ef,u as ky,wc as oo,x as Ay,xa as Kt,xb as Jd,xc as qt,y as kl,ya as Vy,yb as De,z as Fy}from"./chunk-MKV5RAJQ.js";import{a as ue,b as Ke,e as v,g as Gt,h as to}from"./chunk-B4AJQJMI.js";var p0=v(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.formatNames=sr.fastFormats=sr.fullFormats=void 0;function or(e,n){return{validate:e,compare:n}}sr.fullFormats={date:or(u0,lf),time:or(sf(!0),uf),"date-time":or(s0(!0),d0),"iso-time":or(sf(),c0),"iso-date-time":or(s0(),f0),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:SF,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:RF,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:DF,int32:{type:"number",validate:EF},int64:{type:"number",validate:TF},float:{type:"number",validate:l0},double:{type:"number",validate:l0},password:!0,binary:!0};sr.fastFormats=Ke(ue({},sr.fullFormats),{date:or(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,lf),time:or(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uf),"date-time":or(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,d0),"iso-time":or(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c0),"iso-date-time":or(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,f0),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i});sr.formatNames=Object.keys(sr.fullFormats);function bF(e){return e%4===0&&(e%100!==0||e%400===0)}var wF=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,xF=[0,31,28,31,30,31,30,31,31,30,31,30,31];function u0(e){let n=wF.exec(e);if(!n)return!1;let t=+n[1],r=+n[2],i=+n[3];return r>=1&&r<=12&&i>=1&&i<=(r===2&&bF(t)?29:xF[r])}function lf(e,n){if(e&&n)return e>n?1:e<n?-1:0}var of=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function sf(e){return function(t){let r=of.exec(t);if(!r)return!1;let i=+r[1],a=+r[2],l=+r[3],u=r[4],d=r[5]==="-"?-1:1,p=+(r[6]||0),m=+(r[7]||0);if(p>23||m>59||e&&!u)return!1;if(i<=23&&a<=59&&l<60)return!0;let _=a-m*d,w=i-p*d-(_<0?1:0);return(w===23||w===-1)&&(_===59||_===-1)&&l<61}}function uf(e,n){if(!(e&&n))return;let t=new Date("2020-01-01T"+e).valueOf(),r=new Date("2020-01-01T"+n).valueOf();if(t&&r)return t-r}function c0(e,n){if(!(e&&n))return;let t=of.exec(e),r=of.exec(n);if(t&&r)return e=t[1]+t[2]+t[3],n=r[1]+r[2]+r[3],e>n?1:e<n?-1:0}var af=/t|\s/i;function s0(e){let n=sf(e);return function(r){let i=r.split(af);return i.length===2&&u0(i[0])&&n(i[1])}}function d0(e,n){if(!(e&&n))return;let t=new Date(e).valueOf(),r=new Date(n).valueOf();if(t&&r)return t-r}function f0(e,n){if(!(e&&n))return;let[t,r]=e.split(af),[i,a]=n.split(af),l=lf(t,i);if(l!==void 0)return l||uf(r,a)}var IF=/\/|:/,CF=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function SF(e){return IF.test(e)&&CF.test(e)}var a0=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function DF(e){return a0.lastIndex=0,a0.test(e)}var OF=-(2**31),PF=2**31-1;function EF(e){return Number.isInteger(e)&&e<=PF&&e>=OF}function TF(e){return Number.isInteger(e)}function l0(){return!0}var $F=/[^\\]\\Z/;function RF(e){if($F.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var bs=v(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.regexpCode=Me.getEsmExportName=Me.getProperty=Me.safeStringify=Me.stringify=Me.strConcat=Me.addCodeArg=Me.str=Me._=Me.nil=Me._Code=Me.Name=Me.IDENTIFIER=Me._CodeOrName=void 0;var ys=class{};Me._CodeOrName=ys;Me.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var wi=class extends ys{constructor(n){if(super(),!Me.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Me.Name=wi;var On=class extends ys{constructor(n){super(),this._items=typeof n=="string"?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let n=this._items[0];return n===""||n==='""'}get str(){var n;return(n=this._str)!==null&&n!==void 0?n:this._str=this._items.reduce((t,r)=>`${t}${r}`,"")}get names(){var n;return(n=this._names)!==null&&n!==void 0?n:this._names=this._items.reduce((t,r)=>(r instanceof wi&&(t[r.str]=(t[r.str]||0)+1),t),{})}};Me._Code=On;Me.nil=new On("");function h0(e,...n){let t=[e[0]],r=0;for(;r<n.length;)df(t,n[r]),t.push(e[++r]);return new On(t)}Me._=h0;var cf=new On("+");function m0(e,...n){let t=[vs(e[0])],r=0;for(;r<n.length;)t.push(cf),df(t,n[r]),t.push(cf,vs(e[++r]));return MF(t),new On(t)}Me.str=m0;function df(e,n){n instanceof On?e.push(...n._items):n instanceof wi?e.push(n):e.push(AF(n))}Me.addCodeArg=df;function MF(e){let n=1;for(;n<e.length-1;){if(e[n]===cf){let t=NF(e[n-1],e[n+1]);if(t!==void 0){e.splice(n-1,3,t);continue}e[n++]="+"}n++}}function NF(e,n){if(n==='""')return e;if(e==='""')return n;if(typeof e=="string")return n instanceof wi||e[e.length-1]!=='"'?void 0:typeof n!="string"?`${e.slice(0,-1)}${n}"`:n[0]==='"'?e.slice(0,-1)+n.slice(1):void 0;if(typeof n=="string"&&n[0]==='"'&&!(e instanceof wi))return`"${e}${n.slice(1)}`}function kF(e,n){return n.emptyStr()?e:e.emptyStr()?n:m0`${e}${n}`}Me.strConcat=kF;function AF(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:vs(Array.isArray(e)?e.join(","):e)}function FF(e){return new On(vs(e))}Me.stringify=FF;function vs(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Me.safeStringify=vs;function qF(e){return typeof e=="string"&&Me.IDENTIFIER.test(e)?new On(`.${e}`):h0`[${e}]`}Me.getProperty=qF;function jF(e){if(typeof e=="string"&&Me.IDENTIFIER.test(e))return new On(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Me.getEsmExportName=jF;function LF(e){return new On(e.toString())}Me.regexpCode=LF});var hf=v(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.ValueScope=Zt.ValueScopeName=Zt.Scope=Zt.varKinds=Zt.UsedValueState=void 0;var Jt=bs(),ff=class extends Error{constructor(n){super(`CodeGen: "code" for ${n} not defined`),this.value=n.value}},Kl=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e})(Kl||(Zt.UsedValueState=Kl={}));Zt.varKinds={const:new Jt.Name("const"),let:new Jt.Name("let"),var:new Jt.Name("var")};var Jl=class{constructor({prefixes:n,parent:t}={}){this._names={},this._prefixes=n,this._parent=t}toName(n){return n instanceof Jt.Name?n:this.name(n)}name(n){return new Jt.Name(this._newName(n))}_newName(n){let t=this._names[n]||this._nameGroup(n);return`${n}${t.index++}`}_nameGroup(n){var t,r;if(!((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0)&&r.has(n)||this._prefixes&&!this._prefixes.has(n))throw new Error(`CodeGen: prefix "${n}" is not allowed in this scope`);return this._names[n]={prefix:n,index:0}}};Zt.Scope=Jl;var Zl=class extends Jt.Name{constructor(n,t){super(t),this.prefix=n}setValue(n,{property:t,itemIndex:r}){this.value=n,this.scopePath=(0,Jt._)`.${new Jt.Name(t)}[${r}]`}};Zt.ValueScopeName=Zl;var VF=(0,Jt._)`\n`,pf=class extends Jl{constructor(n){super(n),this._values={},this._scope=n.scope,this.opts=Ke(ue({},n),{_n:n.lines?VF:Jt.nil})}get(){return this._scope}name(n){return new Zl(n,this._newName(n))}value(n,t){var r;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(n),{prefix:a}=i,l=(r=t.key)!==null&&r!==void 0?r:t.ref,u=this._values[a];if(u){let m=u.get(l);if(m)return m}else u=this._values[a]=new Map;u.set(l,i);let d=this._scope[a]||(this._scope[a]=[]),p=d.length;return d[p]=t.ref,i.setValue(t,{property:a,itemIndex:p}),i}getValue(n,t){let r=this._values[n];if(r)return r.get(t)}scopeRefs(n,t=this._values){return this._reduceValues(t,r=>{if(r.scopePath===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return(0,Jt._)`${n}${r.scopePath}`})}scopeCode(n=this._values,t,r){return this._reduceValues(n,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},t,r)}_reduceValues(n,t,r={},i){let a=Jt.nil;for(let l in n){let u=n[l];if(!u)continue;let d=r[l]=r[l]||new Map;u.forEach(p=>{if(d.has(p))return;d.set(p,Kl.Started);let m=t(p);if(m){let _=this.opts.es5?Zt.varKinds.var:Zt.varKinds.const;a=(0,Jt._)`${a}${_} ${p} = ${m};${this.opts._n}`}else if(m=i?.(p))a=(0,Jt._)`${a}${m}${this.opts._n}`;else throw new ff(p);d.set(p,Kl.Completed)})}return a}};Zt.ValueScope=pf});var ae=v(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.or=Ie.and=Ie.not=Ie.CodeGen=Ie.operators=Ie.varKinds=Ie.ValueScopeName=Ie.ValueScope=Ie.Scope=Ie.Name=Ie.regexpCode=Ie.stringify=Ie.getProperty=Ie.nil=Ie.strConcat=Ie.str=Ie._=void 0;var Te=bs(),Hn=hf(),Gr=bs();Object.defineProperty(Ie,"_",{enumerable:!0,get:function(){return Gr._}});Object.defineProperty(Ie,"str",{enumerable:!0,get:function(){return Gr.str}});Object.defineProperty(Ie,"strConcat",{enumerable:!0,get:function(){return Gr.strConcat}});Object.defineProperty(Ie,"nil",{enumerable:!0,get:function(){return Gr.nil}});Object.defineProperty(Ie,"getProperty",{enumerable:!0,get:function(){return Gr.getProperty}});Object.defineProperty(Ie,"stringify",{enumerable:!0,get:function(){return Gr.stringify}});Object.defineProperty(Ie,"regexpCode",{enumerable:!0,get:function(){return Gr.regexpCode}});Object.defineProperty(Ie,"Name",{enumerable:!0,get:function(){return Gr.Name}});var tu=hf();Object.defineProperty(Ie,"Scope",{enumerable:!0,get:function(){return tu.Scope}});Object.defineProperty(Ie,"ValueScope",{enumerable:!0,get:function(){return tu.ValueScope}});Object.defineProperty(Ie,"ValueScopeName",{enumerable:!0,get:function(){return tu.ValueScopeName}});Object.defineProperty(Ie,"varKinds",{enumerable:!0,get:function(){return tu.varKinds}});Ie.operators={GT:new Te._Code(">"),GTE:new Te._Code(">="),LT:new Te._Code("<"),LTE:new Te._Code("<="),EQ:new Te._Code("==="),NEQ:new Te._Code("!=="),NOT:new Te._Code("!"),OR:new Te._Code("||"),AND:new Te._Code("&&"),ADD:new Te._Code("+")};var xr=class{optimizeNodes(){return this}optimizeNames(n,t){return this}},mf=class extends xr{constructor(n,t,r){super(),this.varKind=n,this.name=t,this.rhs=r}render({es5:n,_n:t}){let r=n?Hn.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(n,t){if(n[this.name.str])return this.rhs&&(this.rhs=ao(this.rhs,n,t)),this}get names(){return this.rhs instanceof Te._CodeOrName?this.rhs.names:{}}},Xl=class extends xr{constructor(n,t,r){super(),this.lhs=n,this.rhs=t,this.sideEffects=r}render({_n:n}){return`${this.lhs} = ${this.rhs};`+n}optimizeNames(n,t){if(!(this.lhs instanceof Te.Name&&!n[this.lhs.str]&&!this.sideEffects))return this.rhs=ao(this.rhs,n,t),this}get names(){let n=this.lhs instanceof Te.Name?{}:ue({},this.lhs.names);return eu(n,this.rhs)}},gf=class extends Xl{constructor(n,t,r,i){super(n,r,i),this.op=t}render({_n:n}){return`${this.lhs} ${this.op}= ${this.rhs};`+n}},_f=class extends xr{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`${this.label}:`+n}},yf=class extends xr{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`break${this.label?` ${this.label}`:""};`+n}},vf=class extends xr{constructor(n){super(),this.error=n}render({_n:n}){return`throw ${this.error};`+n}get names(){return this.error.names}},bf=class extends xr{constructor(n){super(),this.code=n}render({_n:n}){return`${this.code};`+n}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(n,t){return this.code=ao(this.code,n,t),this}get names(){return this.code instanceof Te._CodeOrName?this.code.names:{}}},ws=class extends xr{constructor(n=[]){super(),this.nodes=n}render(n){return this.nodes.reduce((t,r)=>t+r.render(n),"")}optimizeNodes(){let{nodes:n}=this,t=n.length;for(;t--;){let r=n[t].optimizeNodes();Array.isArray(r)?n.splice(t,1,...r):r?n[t]=r:n.splice(t,1)}return n.length>0?this:void 0}optimizeNames(n,t){let{nodes:r}=this,i=r.length;for(;i--;){let a=r[i];a.optimizeNames(n,t)||(zF(n,a.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((n,t)=>xi(n,t.names),{})}},Ir=class extends ws{render(n){return"{"+n._n+super.render(n)+"}"+n._n}},wf=class extends ws{},xf=(()=>{class e extends Ir{}return e.kind="else",e})(),Yl=(()=>{class e extends Ir{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let i=r.optimizeNodes();r=this.else=Array.isArray(i)?new xf(i):i}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(b0(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var i;if(this.else=(i=this.else)===null||i===void 0?void 0:i.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=ao(this.condition,t,r),this}get names(){let t=super.names;return eu(t,this.condition),this.else&&xi(t,this.else.names),t}}return e.kind="if",e})(),nu=(()=>{class e extends Ir{}return e.kind="for",e})(),If=class extends nu{constructor(n){super(),this.iteration=n}render(n){return`for(${this.iteration})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iteration=ao(this.iteration,n,t),this}get names(){return xi(super.names,this.iteration.names)}},Cf=class extends nu{constructor(n,t,r,i){super(),this.varKind=n,this.name=t,this.from=r,this.to=i}render(n){let t=n.es5?Hn.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(n)}get names(){let n=eu(super.names,this.from);return eu(n,this.to)}},Ql=class extends nu{constructor(n,t,r,i){super(),this.loop=n,this.varKind=t,this.name=r,this.iterable=i}render(n){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iterable=ao(this.iterable,n,t),this}get names(){return xi(super.names,this.iterable.names)}},g0=(()=>{class e extends Ir{constructor(t,r,i){super(),this.name=t,this.args=r,this.async=i}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),_0=(()=>{class e extends ws{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Sf=class extends Ir{render(n){let t="try"+super.render(n);return this.catch&&(t+=this.catch.render(n)),this.finally&&(t+=this.finally.render(n)),t}optimizeNodes(){var n,t;return super.optimizeNodes(),(n=this.catch)===null||n===void 0||n.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(n,t){var r,i;return super.optimizeNames(n,t),(r=this.catch)===null||r===void 0||r.optimizeNames(n,t),(i=this.finally)===null||i===void 0||i.optimizeNames(n,t),this}get names(){let n=super.names;return this.catch&&xi(n,this.catch.names),this.finally&&xi(n,this.finally.names),n}},y0=(()=>{class e extends Ir{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),v0=(()=>{class e extends Ir{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Df=class{constructor(n,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Ke(ue({},t),{_n:t.lines?`
1
+ import{C as nf,D as rf,a as Zy,b as Yy,c as _s,e as Wr,f as Xy,h as Qy,i as e0,k as t0,l as Ul,m as n0,o as r0,p as i0,q as so,t as o0,u as Wl,v as tf,w as Gl}from"./chunk-YAUW3QQV.js";import{d as Br,e as xt,m as Ur,o as Ky,y as Jy}from"./chunk-B6EPFA4V.js";import{$ as Fl,Aa as rr,C as Ud,Ca as zy,Ea as Hy,Fb as E,G as qy,Gb as ee,Hb as X,Ib as oe,Mb as Zd,Nb as Yd,Nc as zn,Oc as B,P as Al,Pc as Bl,Q as Wd,Qc as Uy,R as Ln,Rb as gt,S as jy,Sc as cn,Ua as $e,W as Gd,Wc as bi,X as Je,Xb as rt,Xc as Wy,Y as Cn,Yc as Gy,Za as L,Zb as j,_ as Vn,a as gi,aa as U,bc as jl,c as _i,cc as Ll,d as Ae,db as Kd,dc as Vl,e as no,ea as Ly,ec as zl,f as Bd,fc as Hl,ga as ct,gb as ro,h as Ry,ha as dt,hb as ql,hc as Dn,i as My,ib as gs,ic as wt,jc as Y,ka as ms,kb as ir,kc as un,la as yi,lc as io,m as Ny,mc as By,nb as Fe,o as Nl,oa as ln,ob as Sn,pa as Hr,pb as vi,rc as Xd,sa as nr,sc as Qd,tb as se,tc as ef,u as ky,wc as oo,x as Ay,xa as Kt,xb as Jd,xc as qt,y as kl,ya as Vy,yb as De,z as Fy}from"./chunk-MKV5RAJQ.js";import{a as ue,b as Ke,e as v,g as Gt,h as to}from"./chunk-B4AJQJMI.js";var p0=v(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.formatNames=sr.fastFormats=sr.fullFormats=void 0;function or(e,n){return{validate:e,compare:n}}sr.fullFormats={date:or(u0,lf),time:or(sf(!0),uf),"date-time":or(s0(!0),d0),"iso-time":or(sf(),c0),"iso-date-time":or(s0(),f0),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:SF,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:RF,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:DF,int32:{type:"number",validate:EF},int64:{type:"number",validate:TF},float:{type:"number",validate:l0},double:{type:"number",validate:l0},password:!0,binary:!0};sr.fastFormats=Ke(ue({},sr.fullFormats),{date:or(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,lf),time:or(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uf),"date-time":or(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,d0),"iso-time":or(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c0),"iso-date-time":or(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,f0),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i});sr.formatNames=Object.keys(sr.fullFormats);function bF(e){return e%4===0&&(e%100!==0||e%400===0)}var wF=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,xF=[0,31,28,31,30,31,30,31,31,30,31,30,31];function u0(e){let n=wF.exec(e);if(!n)return!1;let t=+n[1],r=+n[2],i=+n[3];return r>=1&&r<=12&&i>=1&&i<=(r===2&&bF(t)?29:xF[r])}function lf(e,n){if(e&&n)return e>n?1:e<n?-1:0}var of=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function sf(e){return function(t){let r=of.exec(t);if(!r)return!1;let i=+r[1],a=+r[2],l=+r[3],u=r[4],d=r[5]==="-"?-1:1,p=+(r[6]||0),m=+(r[7]||0);if(p>23||m>59||e&&!u)return!1;if(i<=23&&a<=59&&l<60)return!0;let _=a-m*d,w=i-p*d-(_<0?1:0);return(w===23||w===-1)&&(_===59||_===-1)&&l<61}}function uf(e,n){if(!(e&&n))return;let t=new Date("2020-01-01T"+e).valueOf(),r=new Date("2020-01-01T"+n).valueOf();if(t&&r)return t-r}function c0(e,n){if(!(e&&n))return;let t=of.exec(e),r=of.exec(n);if(t&&r)return e=t[1]+t[2]+t[3],n=r[1]+r[2]+r[3],e>n?1:e<n?-1:0}var af=/t|\s/i;function s0(e){let n=sf(e);return function(r){let i=r.split(af);return i.length===2&&u0(i[0])&&n(i[1])}}function d0(e,n){if(!(e&&n))return;let t=new Date(e).valueOf(),r=new Date(n).valueOf();if(t&&r)return t-r}function f0(e,n){if(!(e&&n))return;let[t,r]=e.split(af),[i,a]=n.split(af),l=lf(t,i);if(l!==void 0)return l||uf(r,a)}var IF=/\/|:/,CF=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function SF(e){return IF.test(e)&&CF.test(e)}var a0=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function DF(e){return a0.lastIndex=0,a0.test(e)}var OF=-(2**31),PF=2**31-1;function EF(e){return Number.isInteger(e)&&e<=PF&&e>=OF}function TF(e){return Number.isInteger(e)}function l0(){return!0}var $F=/[^\\]\\Z/;function RF(e){if($F.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var bs=v(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.regexpCode=Me.getEsmExportName=Me.getProperty=Me.safeStringify=Me.stringify=Me.strConcat=Me.addCodeArg=Me.str=Me._=Me.nil=Me._Code=Me.Name=Me.IDENTIFIER=Me._CodeOrName=void 0;var ys=class{};Me._CodeOrName=ys;Me.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var wi=class extends ys{constructor(n){if(super(),!Me.IDENTIFIER.test(n))throw new Error("CodeGen: name must be a valid identifier");this.str=n}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Me.Name=wi;var On=class extends ys{constructor(n){super(),this._items=typeof n=="string"?[n]:n}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let n=this._items[0];return n===""||n==='""'}get str(){var n;return(n=this._str)!==null&&n!==void 0?n:this._str=this._items.reduce((t,r)=>`${t}${r}`,"")}get names(){var n;return(n=this._names)!==null&&n!==void 0?n:this._names=this._items.reduce((t,r)=>(r instanceof wi&&(t[r.str]=(t[r.str]||0)+1),t),{})}};Me._Code=On;Me.nil=new On("");function h0(e,...n){let t=[e[0]],r=0;for(;r<n.length;)df(t,n[r]),t.push(e[++r]);return new On(t)}Me._=h0;var cf=new On("+");function m0(e,...n){let t=[vs(e[0])],r=0;for(;r<n.length;)t.push(cf),df(t,n[r]),t.push(cf,vs(e[++r]));return MF(t),new On(t)}Me.str=m0;function df(e,n){n instanceof On?e.push(...n._items):n instanceof wi?e.push(n):e.push(AF(n))}Me.addCodeArg=df;function MF(e){let n=1;for(;n<e.length-1;){if(e[n]===cf){let t=NF(e[n-1],e[n+1]);if(t!==void 0){e.splice(n-1,3,t);continue}e[n++]="+"}n++}}function NF(e,n){if(n==='""')return e;if(e==='""')return n;if(typeof e=="string")return n instanceof wi||e[e.length-1]!=='"'?void 0:typeof n!="string"?`${e.slice(0,-1)}${n}"`:n[0]==='"'?e.slice(0,-1)+n.slice(1):void 0;if(typeof n=="string"&&n[0]==='"'&&!(e instanceof wi))return`"${e}${n.slice(1)}`}function kF(e,n){return n.emptyStr()?e:e.emptyStr()?n:m0`${e}${n}`}Me.strConcat=kF;function AF(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:vs(Array.isArray(e)?e.join(","):e)}function FF(e){return new On(vs(e))}Me.stringify=FF;function vs(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Me.safeStringify=vs;function qF(e){return typeof e=="string"&&Me.IDENTIFIER.test(e)?new On(`.${e}`):h0`[${e}]`}Me.getProperty=qF;function jF(e){if(typeof e=="string"&&Me.IDENTIFIER.test(e))return new On(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Me.getEsmExportName=jF;function LF(e){return new On(e.toString())}Me.regexpCode=LF});var hf=v(Zt=>{"use strict";Object.defineProperty(Zt,"__esModule",{value:!0});Zt.ValueScope=Zt.ValueScopeName=Zt.Scope=Zt.varKinds=Zt.UsedValueState=void 0;var Jt=bs(),ff=class extends Error{constructor(n){super(`CodeGen: "code" for ${n} not defined`),this.value=n.value}},Kl=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e})(Kl||(Zt.UsedValueState=Kl={}));Zt.varKinds={const:new Jt.Name("const"),let:new Jt.Name("let"),var:new Jt.Name("var")};var Jl=class{constructor({prefixes:n,parent:t}={}){this._names={},this._prefixes=n,this._parent=t}toName(n){return n instanceof Jt.Name?n:this.name(n)}name(n){return new Jt.Name(this._newName(n))}_newName(n){let t=this._names[n]||this._nameGroup(n);return`${n}${t.index++}`}_nameGroup(n){var t,r;if(!((r=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||r===void 0)&&r.has(n)||this._prefixes&&!this._prefixes.has(n))throw new Error(`CodeGen: prefix "${n}" is not allowed in this scope`);return this._names[n]={prefix:n,index:0}}};Zt.Scope=Jl;var Zl=class extends Jt.Name{constructor(n,t){super(t),this.prefix=n}setValue(n,{property:t,itemIndex:r}){this.value=n,this.scopePath=(0,Jt._)`.${new Jt.Name(t)}[${r}]`}};Zt.ValueScopeName=Zl;var VF=(0,Jt._)`\n`,pf=class extends Jl{constructor(n){super(n),this._values={},this._scope=n.scope,this.opts=Ke(ue({},n),{_n:n.lines?VF:Jt.nil})}get(){return this._scope}name(n){return new Zl(n,this._newName(n))}value(n,t){var r;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let i=this.toName(n),{prefix:a}=i,l=(r=t.key)!==null&&r!==void 0?r:t.ref,u=this._values[a];if(u){let m=u.get(l);if(m)return m}else u=this._values[a]=new Map;u.set(l,i);let d=this._scope[a]||(this._scope[a]=[]),p=d.length;return d[p]=t.ref,i.setValue(t,{property:a,itemIndex:p}),i}getValue(n,t){let r=this._values[n];if(r)return r.get(t)}scopeRefs(n,t=this._values){return this._reduceValues(t,r=>{if(r.scopePath===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return(0,Jt._)`${n}${r.scopePath}`})}scopeCode(n=this._values,t,r){return this._reduceValues(n,i=>{if(i.value===void 0)throw new Error(`CodeGen: name "${i}" has no value`);return i.value.code},t,r)}_reduceValues(n,t,r={},i){let a=Jt.nil;for(let l in n){let u=n[l];if(!u)continue;let d=r[l]=r[l]||new Map;u.forEach(p=>{if(d.has(p))return;d.set(p,Kl.Started);let m=t(p);if(m){let _=this.opts.es5?Zt.varKinds.var:Zt.varKinds.const;a=(0,Jt._)`${a}${_} ${p} = ${m};${this.opts._n}`}else if(m=i?.(p))a=(0,Jt._)`${a}${m}${this.opts._n}`;else throw new ff(p);d.set(p,Kl.Completed)})}return a}};Zt.ValueScope=pf});var ae=v(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.or=Ie.and=Ie.not=Ie.CodeGen=Ie.operators=Ie.varKinds=Ie.ValueScopeName=Ie.ValueScope=Ie.Scope=Ie.Name=Ie.regexpCode=Ie.stringify=Ie.getProperty=Ie.nil=Ie.strConcat=Ie.str=Ie._=void 0;var Te=bs(),Hn=hf(),Gr=bs();Object.defineProperty(Ie,"_",{enumerable:!0,get:function(){return Gr._}});Object.defineProperty(Ie,"str",{enumerable:!0,get:function(){return Gr.str}});Object.defineProperty(Ie,"strConcat",{enumerable:!0,get:function(){return Gr.strConcat}});Object.defineProperty(Ie,"nil",{enumerable:!0,get:function(){return Gr.nil}});Object.defineProperty(Ie,"getProperty",{enumerable:!0,get:function(){return Gr.getProperty}});Object.defineProperty(Ie,"stringify",{enumerable:!0,get:function(){return Gr.stringify}});Object.defineProperty(Ie,"regexpCode",{enumerable:!0,get:function(){return Gr.regexpCode}});Object.defineProperty(Ie,"Name",{enumerable:!0,get:function(){return Gr.Name}});var tu=hf();Object.defineProperty(Ie,"Scope",{enumerable:!0,get:function(){return tu.Scope}});Object.defineProperty(Ie,"ValueScope",{enumerable:!0,get:function(){return tu.ValueScope}});Object.defineProperty(Ie,"ValueScopeName",{enumerable:!0,get:function(){return tu.ValueScopeName}});Object.defineProperty(Ie,"varKinds",{enumerable:!0,get:function(){return tu.varKinds}});Ie.operators={GT:new Te._Code(">"),GTE:new Te._Code(">="),LT:new Te._Code("<"),LTE:new Te._Code("<="),EQ:new Te._Code("==="),NEQ:new Te._Code("!=="),NOT:new Te._Code("!"),OR:new Te._Code("||"),AND:new Te._Code("&&"),ADD:new Te._Code("+")};var xr=class{optimizeNodes(){return this}optimizeNames(n,t){return this}},mf=class extends xr{constructor(n,t,r){super(),this.varKind=n,this.name=t,this.rhs=r}render({es5:n,_n:t}){let r=n?Hn.varKinds.var:this.varKind,i=this.rhs===void 0?"":` = ${this.rhs}`;return`${r} ${this.name}${i};`+t}optimizeNames(n,t){if(n[this.name.str])return this.rhs&&(this.rhs=ao(this.rhs,n,t)),this}get names(){return this.rhs instanceof Te._CodeOrName?this.rhs.names:{}}},Xl=class extends xr{constructor(n,t,r){super(),this.lhs=n,this.rhs=t,this.sideEffects=r}render({_n:n}){return`${this.lhs} = ${this.rhs};`+n}optimizeNames(n,t){if(!(this.lhs instanceof Te.Name&&!n[this.lhs.str]&&!this.sideEffects))return this.rhs=ao(this.rhs,n,t),this}get names(){let n=this.lhs instanceof Te.Name?{}:ue({},this.lhs.names);return eu(n,this.rhs)}},gf=class extends Xl{constructor(n,t,r,i){super(n,r,i),this.op=t}render({_n:n}){return`${this.lhs} ${this.op}= ${this.rhs};`+n}},_f=class extends xr{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`${this.label}:`+n}},yf=class extends xr{constructor(n){super(),this.label=n,this.names={}}render({_n:n}){return`break${this.label?` ${this.label}`:""};`+n}},vf=class extends xr{constructor(n){super(),this.error=n}render({_n:n}){return`throw ${this.error};`+n}get names(){return this.error.names}},bf=class extends xr{constructor(n){super(),this.code=n}render({_n:n}){return`${this.code};`+n}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(n,t){return this.code=ao(this.code,n,t),this}get names(){return this.code instanceof Te._CodeOrName?this.code.names:{}}},ws=class extends xr{constructor(n=[]){super(),this.nodes=n}render(n){return this.nodes.reduce((t,r)=>t+r.render(n),"")}optimizeNodes(){let{nodes:n}=this,t=n.length;for(;t--;){let r=n[t].optimizeNodes();Array.isArray(r)?n.splice(t,1,...r):r?n[t]=r:n.splice(t,1)}return n.length>0?this:void 0}optimizeNames(n,t){let{nodes:r}=this,i=r.length;for(;i--;){let a=r[i];a.optimizeNames(n,t)||(zF(n,a.names),r.splice(i,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce((n,t)=>xi(n,t.names),{})}},Ir=class extends ws{render(n){return"{"+n._n+super.render(n)+"}"+n._n}},wf=class extends ws{},xf=(()=>{class e extends Ir{}return e.kind="else",e})(),Yl=(()=>{class e extends Ir{constructor(t,r){super(r),this.condition=t}render(t){let r=`if(${this.condition})`+super.render(t);return this.else&&(r+="else "+this.else.render(t)),r}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let r=this.else;if(r){let i=r.optimizeNodes();r=this.else=Array.isArray(i)?new xf(i):i}if(r)return t===!1?r instanceof e?r:r.nodes:this.nodes.length?this:new e(b0(t),r instanceof e?[r]:r.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,r){var i;if(this.else=(i=this.else)===null||i===void 0?void 0:i.optimizeNames(t,r),!!(super.optimizeNames(t,r)||this.else))return this.condition=ao(this.condition,t,r),this}get names(){let t=super.names;return eu(t,this.condition),this.else&&xi(t,this.else.names),t}}return e.kind="if",e})(),nu=(()=>{class e extends Ir{}return e.kind="for",e})(),If=class extends nu{constructor(n){super(),this.iteration=n}render(n){return`for(${this.iteration})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iteration=ao(this.iteration,n,t),this}get names(){return xi(super.names,this.iteration.names)}},Cf=class extends nu{constructor(n,t,r,i){super(),this.varKind=n,this.name=t,this.from=r,this.to=i}render(n){let t=n.es5?Hn.varKinds.var:this.varKind,{name:r,from:i,to:a}=this;return`for(${t} ${r}=${i}; ${r}<${a}; ${r}++)`+super.render(n)}get names(){let n=eu(super.names,this.from);return eu(n,this.to)}},Ql=class extends nu{constructor(n,t,r,i){super(),this.loop=n,this.varKind=t,this.name=r,this.iterable=i}render(n){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(n)}optimizeNames(n,t){if(super.optimizeNames(n,t))return this.iterable=ao(this.iterable,n,t),this}get names(){return xi(super.names,this.iterable.names)}},g0=(()=>{class e extends Ir{constructor(t,r,i){super(),this.name=t,this.args=r,this.async=i}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),_0=(()=>{class e extends ws{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),Sf=class extends Ir{render(n){let t="try"+super.render(n);return this.catch&&(t+=this.catch.render(n)),this.finally&&(t+=this.finally.render(n)),t}optimizeNodes(){var n,t;return super.optimizeNodes(),(n=this.catch)===null||n===void 0||n.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(n,t){var r,i;return super.optimizeNames(n,t),(r=this.catch)===null||r===void 0||r.optimizeNames(n,t),(i=this.finally)===null||i===void 0||i.optimizeNames(n,t),this}get names(){let n=super.names;return this.catch&&xi(n,this.catch.names),this.finally&&xi(n,this.finally.names),n}},y0=(()=>{class e extends Ir{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),v0=(()=>{class e extends Ir{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Df=class{constructor(n,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Ke(ue({},t),{_n:t.lines?`
2
2
  `:""}),this._extScope=n,this._scope=new Hn.Scope({parent:n}),this._nodes=[new wf]}toString(){return this._root.render(this.opts)}name(n){return this._scope.name(n)}scopeName(n){return this._extScope.name(n)}scopeValue(n,t){let r=this._extScope.value(n,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(n,t){return this._extScope.getValue(n,t)}scopeRefs(n){return this._extScope.scopeRefs(n,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(n,t,r,i){let a=this._scope.toName(t);return r!==void 0&&i&&(this._constants[a.str]=r),this._leafNode(new mf(n,a,r)),a}const(n,t,r){return this._def(Hn.varKinds.const,n,t,r)}let(n,t,r){return this._def(Hn.varKinds.let,n,t,r)}var(n,t,r){return this._def(Hn.varKinds.var,n,t,r)}assign(n,t,r){return this._leafNode(new Xl(n,t,r))}add(n,t){return this._leafNode(new gf(n,Ie.operators.ADD,t))}code(n){return typeof n=="function"?n():n!==Te.nil&&this._leafNode(new bf(n)),this}object(...n){let t=["{"];for(let[r,i]of n)t.length>1&&t.push(","),t.push(r),(r!==i||this.opts.es5)&&(t.push(":"),(0,Te.addCodeArg)(t,i));return t.push("}"),new Te._Code(t)}if(n,t,r){if(this._blockNode(new Yl(n)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(n){return this._elseNode(new Yl(n))}else(){return this._elseNode(new xf)}endIf(){return this._endBlockNode(Yl,xf)}_for(n,t){return this._blockNode(n),t&&this.code(t).endFor(),this}for(n,t){return this._for(new If(n),t)}forRange(n,t,r,i,a=this.opts.es5?Hn.varKinds.var:Hn.varKinds.let){let l=this._scope.toName(n);return this._for(new Cf(a,l,t,r),()=>i(l))}forOf(n,t,r,i=Hn.varKinds.const){let a=this._scope.toName(n);if(this.opts.es5){let l=t instanceof Te.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Te._)`${l}.length`,u=>{this.var(a,(0,Te._)`${l}[${u}]`),r(a)})}return this._for(new Ql("of",i,a,t),()=>r(a))}forIn(n,t,r,i=this.opts.es5?Hn.varKinds.var:Hn.varKinds.const){if(this.opts.ownProperties)return this.forOf(n,(0,Te._)`Object.keys(${t})`,r);let a=this._scope.toName(n);return this._for(new Ql("in",i,a,t),()=>r(a))}endFor(){return this._endBlockNode(nu)}label(n){return this._leafNode(new _f(n))}break(n){return this._leafNode(new yf(n))}return(n){let t=new _0;if(this._blockNode(t),this.code(n),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(_0)}try(n,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');let i=new Sf;if(this._blockNode(i),this.code(n),t){let a=this.name("e");this._currNode=i.catch=new y0(a),t(a)}return r&&(this._currNode=i.finally=new v0,this.code(r)),this._endBlockNode(y0,v0)}throw(n){return this._leafNode(new vf(n))}block(n,t){return this._blockStarts.push(this._nodes.length),n&&this.code(n).endBlock(t),this}endBlock(n){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let r=this._nodes.length-t;if(r<0||n!==void 0&&r!==n)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${n} expected`);return this._nodes.length=t,this}func(n,t=Te.nil,r,i){return this._blockNode(new g0(n,t,r)),i&&this.code(i).endFunc(),this}endFunc(){return this._endBlockNode(g0)}optimize(n=1){for(;n-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(n){return this._currNode.nodes.push(n),this}_blockNode(n){this._currNode.nodes.push(n),this._nodes.push(n)}_endBlockNode(n,t){let r=this._currNode;if(r instanceof n||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${n.kind}/${t.kind}`:n.kind}"`)}_elseNode(n){let t=this._currNode;if(!(t instanceof Yl))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=n,this}get _root(){return this._nodes[0]}get _currNode(){let n=this._nodes;return n[n.length-1]}set _currNode(n){let t=this._nodes;t[t.length-1]=n}};Ie.CodeGen=Df;function xi(e,n){for(let t in n)e[t]=(e[t]||0)+(n[t]||0);return e}function eu(e,n){return n instanceof Te._CodeOrName?xi(e,n.names):e}function ao(e,n,t){if(e instanceof Te.Name)return r(e);if(!i(e))return e;return new Te._Code(e._items.reduce((a,l)=>(l instanceof Te.Name&&(l=r(l)),l instanceof Te._Code?a.push(...l._items):a.push(l),a),[]));function r(a){let l=t[a.str];return l===void 0||n[a.str]!==1?a:(delete n[a.str],l)}function i(a){return a instanceof Te._Code&&a._items.some(l=>l instanceof Te.Name&&n[l.str]===1&&t[l.str]!==void 0)}}function zF(e,n){for(let t in n)e[t]=(e[t]||0)-(n[t]||0)}function b0(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,Te._)`!${Of(e)}`}Ie.not=b0;var HF=w0(Ie.operators.AND);function BF(...e){return e.reduce(HF)}Ie.and=BF;var UF=w0(Ie.operators.OR);function WF(...e){return e.reduce(UF)}Ie.or=WF;function w0(e){return(n,t)=>n===Te.nil?t:t===Te.nil?n:(0,Te._)`${Of(n)} ${e} ${Of(t)}`}function Of(e){return e instanceof Te.Name?e:(0,Te._)`(${e})`}});var Oe=v(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.checkStrictMode=Ce.getErrorPath=Ce.Type=Ce.useFunc=Ce.setEvaluated=Ce.evaluatedPropsToName=Ce.mergeEvaluated=Ce.eachItem=Ce.unescapeJsonPointer=Ce.escapeJsonPointer=Ce.escapeFragment=Ce.unescapeFragment=Ce.schemaRefOrVal=Ce.schemaHasRulesButRef=Ce.schemaHasRules=Ce.checkUnknownRules=Ce.alwaysValidSchema=Ce.toHash=void 0;var Ue=ae(),GF=bs();function KF(e){let n={};for(let t of e)n[t]=!0;return n}Ce.toHash=KF;function JF(e,n){return typeof n=="boolean"?n:Object.keys(n).length===0?!0:(C0(e,n),!S0(n,e.self.RULES.all))}Ce.alwaysValidSchema=JF;function C0(e,n=e.schema){let{opts:t,self:r}=e;if(!t.strictSchema||typeof n=="boolean")return;let i=r.RULES.keywords;for(let a in n)i[a]||P0(e,`unknown keyword: "${a}"`)}Ce.checkUnknownRules=C0;function S0(e,n){if(typeof e=="boolean")return!e;for(let t in e)if(n[t])return!0;return!1}Ce.schemaHasRules=S0;function ZF(e,n){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&n.all[t])return!0;return!1}Ce.schemaHasRulesButRef=ZF;function YF({topSchemaRef:e,schemaPath:n},t,r,i){if(!i){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,Ue._)`${t}`}return(0,Ue._)`${e}${n}${(0,Ue.getProperty)(r)}`}Ce.schemaRefOrVal=YF;function XF(e){return D0(decodeURIComponent(e))}Ce.unescapeFragment=XF;function QF(e){return encodeURIComponent(Ef(e))}Ce.escapeFragment=QF;function Ef(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Ce.escapeJsonPointer=Ef;function D0(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Ce.unescapeJsonPointer=D0;function e2(e,n){if(Array.isArray(e))for(let t of e)n(t);else n(e)}Ce.eachItem=e2;function x0({mergeNames:e,mergeToName:n,mergeValues:t,resultToName:r}){return(i,a,l,u)=>{let d=l===void 0?a:l instanceof Ue.Name?(a instanceof Ue.Name?e(i,a,l):n(i,a,l),l):a instanceof Ue.Name?(n(i,l,a),a):t(a,l);return u===Ue.Name&&!(d instanceof Ue.Name)?r(i,d):d}}Ce.mergeEvaluated={props:x0({mergeNames:(e,n,t)=>e.if((0,Ue._)`${t} !== true && ${n} !== undefined`,()=>{e.if((0,Ue._)`${n} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,Ue._)`${t} || {}`).code((0,Ue._)`Object.assign(${t}, ${n})`))}),mergeToName:(e,n,t)=>e.if((0,Ue._)`${t} !== true`,()=>{n===!0?e.assign(t,!0):(e.assign(t,(0,Ue._)`${t} || {}`),Tf(e,t,n))}),mergeValues:(e,n)=>e===!0?!0:ue(ue({},e),n),resultToName:O0}),items:x0({mergeNames:(e,n,t)=>e.if((0,Ue._)`${t} !== true && ${n} !== undefined`,()=>e.assign(t,(0,Ue._)`${n} === true ? true : ${t} > ${n} ? ${t} : ${n}`)),mergeToName:(e,n,t)=>e.if((0,Ue._)`${t} !== true`,()=>e.assign(t,n===!0?!0:(0,Ue._)`${t} > ${n} ? ${t} : ${n}`)),mergeValues:(e,n)=>e===!0?!0:Math.max(e,n),resultToName:(e,n)=>e.var("items",n)})};function O0(e,n){if(n===!0)return e.var("props",!0);let t=e.var("props",(0,Ue._)`{}`);return n!==void 0&&Tf(e,t,n),t}Ce.evaluatedPropsToName=O0;function Tf(e,n,t){Object.keys(t).forEach(r=>e.assign((0,Ue._)`${n}${(0,Ue.getProperty)(r)}`,!0))}Ce.setEvaluated=Tf;var I0={};function t2(e,n){return e.scopeValue("func",{ref:n,code:I0[n.code]||(I0[n.code]=new GF._Code(n.code))})}Ce.useFunc=t2;var Pf=(function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e})(Pf||(Ce.Type=Pf={}));function n2(e,n,t){if(e instanceof Ue.Name){let r=n===Pf.Num;return t?r?(0,Ue._)`"[" + ${e} + "]"`:(0,Ue._)`"['" + ${e} + "']"`:r?(0,Ue._)`"/" + ${e}`:(0,Ue._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,Ue.getProperty)(e).toString():"/"+Ef(e)}Ce.getErrorPath=n2;function P0(e,n,t=e.opts.strictSchema){if(t){if(n=`strict mode: ${n}`,t===!0)throw new Error(n);e.self.logger.warn(n)}}Ce.checkStrictMode=P0});var Pn=v($f=>{"use strict";Object.defineProperty($f,"__esModule",{value:!0});var Tt=ae(),r2={data:new Tt.Name("data"),valCxt:new Tt.Name("valCxt"),instancePath:new Tt.Name("instancePath"),parentData:new Tt.Name("parentData"),parentDataProperty:new Tt.Name("parentDataProperty"),rootData:new Tt.Name("rootData"),dynamicAnchors:new Tt.Name("dynamicAnchors"),vErrors:new Tt.Name("vErrors"),errors:new Tt.Name("errors"),this:new Tt.Name("this"),self:new Tt.Name("self"),scope:new Tt.Name("scope"),json:new Tt.Name("json"),jsonPos:new Tt.Name("jsonPos"),jsonLen:new Tt.Name("jsonLen"),jsonPart:new Tt.Name("jsonPart")};$f.default=r2});var xs=v($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.extendErrors=$t.resetErrorsCount=$t.reportExtraError=$t.reportError=$t.keyword$DataError=$t.keywordError=void 0;var Re=ae(),ru=Oe(),jt=Pn();$t.keywordError={message:({keyword:e})=>(0,Re.str)`must pass "${e}" keyword validation`};$t.keyword$DataError={message:({keyword:e,schemaType:n})=>n?(0,Re.str)`"${e}" keyword must be ${n} ($data)`:(0,Re.str)`"${e}" keyword is invalid ($data)`};function i2(e,n=$t.keywordError,t,r){let{it:i}=e,{gen:a,compositeRule:l,allErrors:u}=i,d=$0(e,n,t);r??(l||u)?E0(a,d):T0(i,(0,Re._)`[${d}]`)}$t.reportError=i2;function o2(e,n=$t.keywordError,t){let{it:r}=e,{gen:i,compositeRule:a,allErrors:l}=r,u=$0(e,n,t);E0(i,u),a||l||T0(r,jt.default.vErrors)}$t.reportExtraError=o2;function s2(e,n){e.assign(jt.default.errors,n),e.if((0,Re._)`${jt.default.vErrors} !== null`,()=>e.if(n,()=>e.assign((0,Re._)`${jt.default.vErrors}.length`,n),()=>e.assign(jt.default.vErrors,null)))}$t.resetErrorsCount=s2;function a2({gen:e,keyword:n,schemaValue:t,data:r,errsCount:i,it:a}){if(i===void 0)throw new Error("ajv implementation error");let l=e.name("err");e.forRange("i",i,jt.default.errors,u=>{e.const(l,(0,Re._)`${jt.default.vErrors}[${u}]`),e.if((0,Re._)`${l}.instancePath === undefined`,()=>e.assign((0,Re._)`${l}.instancePath`,(0,Re.strConcat)(jt.default.instancePath,a.errorPath))),e.assign((0,Re._)`${l}.schemaPath`,(0,Re.str)`${a.errSchemaPath}/${n}`),a.opts.verbose&&(e.assign((0,Re._)`${l}.schema`,t),e.assign((0,Re._)`${l}.data`,r))})}$t.extendErrors=a2;function E0(e,n){let t=e.const("err",n);e.if((0,Re._)`${jt.default.vErrors} === null`,()=>e.assign(jt.default.vErrors,(0,Re._)`[${t}]`),(0,Re._)`${jt.default.vErrors}.push(${t})`),e.code((0,Re._)`${jt.default.errors}++`)}function T0(e,n){let{gen:t,validateName:r,schemaEnv:i}=e;i.$async?t.throw((0,Re._)`new ${e.ValidationError}(${n})`):(t.assign((0,Re._)`${r}.errors`,n),t.return(!1))}var Ii={keyword:new Re.Name("keyword"),schemaPath:new Re.Name("schemaPath"),params:new Re.Name("params"),propertyName:new Re.Name("propertyName"),message:new Re.Name("message"),schema:new Re.Name("schema"),parentSchema:new Re.Name("parentSchema")};function $0(e,n,t){let{createErrors:r}=e.it;return r===!1?(0,Re._)`{}`:l2(e,n,t)}function l2(e,n,t={}){let{gen:r,it:i}=e,a=[u2(i,t),c2(e,t)];return d2(e,n,a),r.object(...a)}function u2({errorPath:e},{instancePath:n}){let t=n?(0,Re.str)`${e}${(0,ru.getErrorPath)(n,ru.Type.Str)}`:e;return[jt.default.instancePath,(0,Re.strConcat)(jt.default.instancePath,t)]}function c2({keyword:e,it:{errSchemaPath:n}},{schemaPath:t,parentSchema:r}){let i=r?n:(0,Re.str)`${n}/${e}`;return t&&(i=(0,Re.str)`${i}${(0,ru.getErrorPath)(t,ru.Type.Str)}`),[Ii.schemaPath,i]}function d2(e,{params:n,message:t},r){let{keyword:i,data:a,schemaValue:l,it:u}=e,{opts:d,propertyName:p,topSchemaRef:m,schemaPath:_}=u;r.push([Ii.keyword,i],[Ii.params,typeof n=="function"?n(e):n||(0,Re._)`{}`]),d.messages&&r.push([Ii.message,typeof t=="function"?t(e):t]),d.verbose&&r.push([Ii.schema,l],[Ii.parentSchema,(0,Re._)`${m}${_}`],[jt.default.data,a]),p&&r.push([Ii.propertyName,p])}});var M0=v(lo=>{"use strict";Object.defineProperty(lo,"__esModule",{value:!0});lo.boolOrEmptySchema=lo.topBoolOrEmptySchema=void 0;var f2=xs(),p2=ae(),h2=Pn(),m2={message:"boolean schema is false"};function g2(e){let{gen:n,schema:t,validateName:r}=e;t===!1?R0(e,!1):typeof t=="object"&&t.$async===!0?n.return(h2.default.data):(n.assign((0,p2._)`${r}.errors`,null),n.return(!0))}lo.topBoolOrEmptySchema=g2;function _2(e,n){let{gen:t,schema:r}=e;r===!1?(t.var(n,!1),R0(e)):t.var(n,!0)}lo.boolOrEmptySchema=_2;function R0(e,n){let{gen:t,data:r}=e,i={gen:t,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,f2.reportError)(i,m2,void 0,n)}});var Rf=v(uo=>{"use strict";Object.defineProperty(uo,"__esModule",{value:!0});uo.getRules=uo.isJSONType=void 0;var y2=["string","number","integer","boolean","null","object","array"],v2=new Set(y2);function b2(e){return typeof e=="string"&&v2.has(e)}uo.isJSONType=b2;function w2(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Ke(ue({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}uo.getRules=w2});var Mf=v(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.shouldUseRule=Kr.shouldUseGroup=Kr.schemaHasRulesForType=void 0;function x2({schema:e,self:n},t){let r=n.RULES.types[t];return r&&r!==!0&&N0(e,r)}Kr.schemaHasRulesForType=x2;function N0(e,n){return n.rules.some(t=>k0(e,t))}Kr.shouldUseGroup=N0;function k0(e,n){var t;return e[n.keyword]!==void 0||((t=n.definition.implements)===null||t===void 0?void 0:t.some(r=>e[r]!==void 0))}Kr.shouldUseRule=k0});var Is=v(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.reportTypeError=Rt.checkDataTypes=Rt.checkDataType=Rt.coerceAndCheckDataType=Rt.getJSONTypes=Rt.getSchemaTypes=Rt.DataType=void 0;var I2=Rf(),C2=Mf(),S2=xs(),ve=ae(),A0=Oe(),co=(function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e})(co||(Rt.DataType=co={}));function D2(e){let n=F0(e.type);if(n.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!n.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&n.push("null")}return n}Rt.getSchemaTypes=D2;function F0(e){let n=Array.isArray(e)?e:e?[e]:[];if(n.every(I2.isJSONType))return n;throw new Error("type must be JSONType or JSONType[]: "+n.join(","))}Rt.getJSONTypes=F0;function O2(e,n){let{gen:t,data:r,opts:i}=e,a=P2(n,i.coerceTypes),l=n.length>0&&!(a.length===0&&n.length===1&&(0,C2.schemaHasRulesForType)(e,n[0]));if(l){let u=kf(n,r,i.strictNumbers,co.Wrong);t.if(u,()=>{a.length?E2(e,n,a):Af(e)})}return l}Rt.coerceAndCheckDataType=O2;var q0=new Set(["string","number","integer","boolean","null"]);function P2(e,n){return n?e.filter(t=>q0.has(t)||n==="array"&&t==="array"):[]}function E2(e,n,t){let{gen:r,data:i,opts:a}=e,l=r.let("dataType",(0,ve._)`typeof ${i}`),u=r.let("coerced",(0,ve._)`undefined`);a.coerceTypes==="array"&&r.if((0,ve._)`${l} == 'object' && Array.isArray(${i}) && ${i}.length == 1`,()=>r.assign(i,(0,ve._)`${i}[0]`).assign(l,(0,ve._)`typeof ${i}`).if(kf(n,i,a.strictNumbers),()=>r.assign(u,i))),r.if((0,ve._)`${u} !== undefined`);for(let p of t)(q0.has(p)||p==="array"&&a.coerceTypes==="array")&&d(p);r.else(),Af(e),r.endIf(),r.if((0,ve._)`${u} !== undefined`,()=>{r.assign(i,u),T2(e,u)});function d(p){switch(p){case"string":r.elseIf((0,ve._)`${l} == "number" || ${l} == "boolean"`).assign(u,(0,ve._)`"" + ${i}`).elseIf((0,ve._)`${i} === null`).assign(u,(0,ve._)`""`);return;case"number":r.elseIf((0,ve._)`${l} == "boolean" || ${i} === null
3
3
  || (${l} == "string" && ${i} && ${i} == +${i})`).assign(u,(0,ve._)`+${i}`);return;case"integer":r.elseIf((0,ve._)`${l} === "boolean" || ${i} === null
4
4
  || (${l} === "string" && ${i} && ${i} == +${i} && !(${i} % 1))`).assign(u,(0,ve._)`+${i}`);return;case"boolean":r.elseIf((0,ve._)`${i} === "false" || ${i} === 0 || ${i} === null`).assign(u,!1).elseIf((0,ve._)`${i} === "true" || ${i} === 1`).assign(u,!0);return;case"null":r.elseIf((0,ve._)`${i} === "" || ${i} === 0 || ${i} === false`),r.assign(u,null);return;case"array":r.elseIf((0,ve._)`${l} === "string" || ${l} === "number"
@@ -1,4 +1,4 @@
1
- import{a as z,b as S,c as F}from"./chunk-BMOLDRJ3.js";import{a}from"./chunk-6ZOSTYPR.js";import{F as c,X as f,aa as u,d as m}from"./chunk-MKV5RAJQ.js";import{g as h}from"./chunk-B4AJQJMI.js";var d=h(z(),1),p=h(S(),1),b=h(F(),1);var B=(()=>{class s{$ws=u(a);io;fitAddon;webLinksAddon;resize;elementResize;pluginName;connectedSubscription;resizeSubscription;elementResizeSubscription;searchFilter=null;logBuffer=[];maxBufferSize=1e3;term;startTerminal(e,r={},n,w){this.pluginName=w,this.elementResize=n,this.io=this.$ws.connectToNamespace("log"),this.fitAddon=new d.FitAddon,this.webLinksAddon=new p.WebLinksAddon,this.term=new b.Terminal(r),this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon),this.resize=new m,this.term.open(e.nativeElement),setTimeout(()=>{this.fitAddon.fit()}),this.connectedSubscription=this.io.connected.subscribe(()=>{this.term.reset(),this.logBuffer=[],this.io.socket.emit("tail-log",{cols:this.term.cols,rows:this.term.rows})}),this.io.socket.connected&&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 z,b as S,c as F}from"./chunk-BMOLDRJ3.js";import{a}from"./chunk-RMWS37MG.js";import{F as c,X as f,aa as u,d as m}from"./chunk-MKV5RAJQ.js";import{g as h}from"./chunk-B4AJQJMI.js";var d=h(z(),1),p=h(S(),1),b=h(F(),1);var B=(()=>{class s{$ws=u(a);io;fitAddon;webLinksAddon;resize;elementResize;pluginName;connectedSubscription;resizeSubscription;elementResizeSubscription;searchFilter=null;logBuffer=[];maxBufferSize=1e3;term;startTerminal(e,r={},n,w){this.pluginName=w,this.elementResize=n,this.io=this.$ws.connectToNamespace("log"),this.fitAddon=new d.FitAddon,this.webLinksAddon=new p.WebLinksAddon,this.term=new b.Terminal(r),this.term.loadAddon(this.fitAddon),this.term.loadAddon(this.webLinksAddon),this.resize=new m,this.term.open(e.nativeElement),setTimeout(()=>{this.fitAddon.fit()}),this.connectedSubscription=this.io.connected.subscribe(()=>{this.term.reset(),this.logBuffer=[],this.io.socket.emit("tail-log",{cols:this.term.cols,rows:this.term.rows})}),this.io.socket.connected&&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{b as S}from"./chunk-T472BWYK.js";import{J as h,K as j,x as E}from"./chunk-2TQEV57U.js";import{$ as c,X as l,Y as T,_ as v,aa as f,i as u,la as y,o as g,ob as I,q as m,t as k}from"./chunk-MKV5RAJQ.js";import{h as a}from"./chunk-B4AJQJMI.js";var w=new v("JWT_OPTIONS"),p=(()=>{class o{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+/=",i="";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 r=0,s,n,x=0;n=e.charAt(x++);~n&&(s=r%4?s*64+n:n,r++%4)?i+=String.fromCharCode(255&s>>(-2*r&6)):0)n=t.indexOf(n);return i}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 i=this.urlBase64Decode(t[1]);if(!i)throw new Error("Cannot decode the token.");return JSON.parse(i)}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 i=new Date(0);return i.setUTCSeconds(t.exp),i}isTokenExpired(e=this.tokenGetter(),t){return e instanceof Promise?e.then(i=>this._isTokenExpired(i,t)):this._isTokenExpired(e,t)}_isTokenExpired(e,t){if(!e||e==="")return!0;let i=this.getTokenExpirationDate(e);return t=t||0,i===null?!1:!(i.valueOf()>new Date().valueOf()+t*1e3)}getAuthScheme(e,t){return typeof e=="function"?e(t):e}}return o.\u0275fac=function(e){return new(e||o)(c(w))},o.\u0275prov=l({token:o,factory:o.\u0275fac}),o})(),$=o=>o instanceof Promise?k(()=>o):u(o),R=(()=>{class o{constructor(e,t,i){this.jwtHelper=t,this.document=i,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 i=`${t.hostname}${t.port&&!this.standardPorts.includes(t.port)?":"+t.port:""}`;return this.allowedDomains.findIndex(r=>typeof r=="string"?r===i:r instanceof RegExp?r.test(i):!1)>-1}isDisallowedRoute(e){let t=new URL(e.url,this.document.location.origin);return this.disallowedRoutes.findIndex(i=>{if(typeof i=="string"){let r=new URL(i,this.document.location.origin);return r.hostname===t.hostname&&r.pathname===t.pathname}return i instanceof RegExp?i.test(e.url):!1})>-1}handleInterception(e,t,i){let r=this.jwtHelper.getAuthScheme(this.authScheme,t);if(!e&&this.throwNoTokenError)throw new Error("Could not get token from tokenGetter function.");let s=u(!1);return this.skipWhenExpired&&(s=e?$(this.jwtHelper.isTokenExpired(e)):u(!0)),e?s.pipe(g(n=>n&&this.skipWhenExpired?t.clone():t.clone({setHeaders:{[this.headerName]:`${r}${e}`}})),m(n=>i.handle(n))):i.handle(t)}intercept(e,t){if(!this.isAllowedDomain(e)||this.isDisallowedRoute(e))return t.handle(e);let i=this.tokenGetter(e);return $(i).pipe(m(r=>this.handleInterception(r,e,t)))}}return o.\u0275fac=function(e){return new(e||o)(c(w),c(p),c(y))},o.\u0275prov=l({token:o,factory:o.\u0275fac}),o})(),L=(()=>{class o{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:o,providers:[{provide:E,useClass:R,multi:!0},e.jwtOptionsProvider||{provide:w,useValue:e.config},p]}}}return o.\u0275fac=function(e){return new(e||o)(c(o,12))},o.\u0275mod=I({type:o}),o.\u0275inj=T({}),o})();var z=(()=>{class o{$api=f(j);$jwtHelper=f(p);$settings=f(S);token;user={};logoutTimer;lastRefreshTime=Date.now();isRefreshing=!1;constructor(){this.loadToken()}login(e){return a(this,null,function*(){let t=yield this.$api.post("/auth/login",e);if(!this.validateToken(t.access_token))throw new Error("Invalid username or password.");window.localStorage.setItem(h.jwt.tokenKey,t.access_token),yield this.$settings.getAppSettings()})}noauth(){return a(this,null,function*(){let e=yield this.$api.post("/auth/noauth",{});if(this.validateToken(e.access_token))window.localStorage.setItem(h.jwt.tokenKey,e.access_token),yield this.$settings.getAppSettings();else throw new Error("Invalid username or password.")})}logout(){this.user=null,this.token=null,clearTimeout(this.logoutTimer),window.localStorage.removeItem(h.jwt.tokenKey),window.location.reload()}loadToken(){return a(this,null,function*(){this.$settings.settingsLoaded||(yield this.$settings.onSettingsLoaded);let e=window.localStorage.getItem(h.jwt.tokenKey);e&&this.validateToken(e)})}checkToken(){return a(this,null,function*(){if(!this.token||this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)){console.warn("Token expired on client side, logging out immediately"),this.logout();return}try{return yield this.$api.get("/auth/check")}catch(e){throw e.status===401&&(console.warn("Current token is not valid on server"),this.logout()),e}})}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)}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(h.jwt.tokenKey),this.token=null,!1}}setLogoutTimer(){if(clearTimeout(this.logoutTimer),!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)){let e=this.$settings.sessionTimeout*1e3;e<=2147483647&&(this.logoutTimer=setTimeout(()=>a(this,null,function*(){this.$settings.formAuth===!1?(yield this.noauth(),window.location.reload()):this.logout()}),e))}}checkAndRefreshIfNeeded(){return a(this,null,function*(){if(!this.$settings.formAuth||!this.$settings.sessionTimeoutInactivityBased||!this.token||!this.isLoggedIn()||this.isRefreshing)return;let t=Date.now()-this.lastRefreshTime,r=this.$settings.sessionTimeout*1e3*.7;if(t>r)try{yield this.refreshSession()}catch(s){console.error("Failed to refresh session:",s)}})}refreshSession(){return a(this,null,function*(){if(!this.isRefreshing){this.isRefreshing=!0;try{let e=yield this.$api.post("/auth/refresh",{});e.access_token&&(this.token=e.access_token,window.localStorage.setItem(h.jwt.tokenKey,e.access_token),this.lastRefreshTime=Date.now(),this.setLogoutTimer())}finally{this.isRefreshing=!1}}})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=l({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{L as a,z as b};
1
+ import{b as S}from"./chunk-72SK6LN3.js";import{J as h,K as j,x as E}from"./chunk-B6EPFA4V.js";import{$ as c,X as l,Y as T,_ as v,aa as f,i as u,la as y,o as g,ob as I,q as m,t as k}from"./chunk-MKV5RAJQ.js";import{h as a}from"./chunk-B4AJQJMI.js";var w=new v("JWT_OPTIONS"),p=(()=>{class o{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+/=",i="";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 r=0,s,n,x=0;n=e.charAt(x++);~n&&(s=r%4?s*64+n:n,r++%4)?i+=String.fromCharCode(255&s>>(-2*r&6)):0)n=t.indexOf(n);return i}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 i=this.urlBase64Decode(t[1]);if(!i)throw new Error("Cannot decode the token.");return JSON.parse(i)}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 i=new Date(0);return i.setUTCSeconds(t.exp),i}isTokenExpired(e=this.tokenGetter(),t){return e instanceof Promise?e.then(i=>this._isTokenExpired(i,t)):this._isTokenExpired(e,t)}_isTokenExpired(e,t){if(!e||e==="")return!0;let i=this.getTokenExpirationDate(e);return t=t||0,i===null?!1:!(i.valueOf()>new Date().valueOf()+t*1e3)}getAuthScheme(e,t){return typeof e=="function"?e(t):e}}return o.\u0275fac=function(e){return new(e||o)(c(w))},o.\u0275prov=l({token:o,factory:o.\u0275fac}),o})(),$=o=>o instanceof Promise?k(()=>o):u(o),R=(()=>{class o{constructor(e,t,i){this.jwtHelper=t,this.document=i,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 i=`${t.hostname}${t.port&&!this.standardPorts.includes(t.port)?":"+t.port:""}`;return this.allowedDomains.findIndex(r=>typeof r=="string"?r===i:r instanceof RegExp?r.test(i):!1)>-1}isDisallowedRoute(e){let t=new URL(e.url,this.document.location.origin);return this.disallowedRoutes.findIndex(i=>{if(typeof i=="string"){let r=new URL(i,this.document.location.origin);return r.hostname===t.hostname&&r.pathname===t.pathname}return i instanceof RegExp?i.test(e.url):!1})>-1}handleInterception(e,t,i){let r=this.jwtHelper.getAuthScheme(this.authScheme,t);if(!e&&this.throwNoTokenError)throw new Error("Could not get token from tokenGetter function.");let s=u(!1);return this.skipWhenExpired&&(s=e?$(this.jwtHelper.isTokenExpired(e)):u(!0)),e?s.pipe(g(n=>n&&this.skipWhenExpired?t.clone():t.clone({setHeaders:{[this.headerName]:`${r}${e}`}})),m(n=>i.handle(n))):i.handle(t)}intercept(e,t){if(!this.isAllowedDomain(e)||this.isDisallowedRoute(e))return t.handle(e);let i=this.tokenGetter(e);return $(i).pipe(m(r=>this.handleInterception(r,e,t)))}}return o.\u0275fac=function(e){return new(e||o)(c(w),c(p),c(y))},o.\u0275prov=l({token:o,factory:o.\u0275fac}),o})(),L=(()=>{class o{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:o,providers:[{provide:E,useClass:R,multi:!0},e.jwtOptionsProvider||{provide:w,useValue:e.config},p]}}}return o.\u0275fac=function(e){return new(e||o)(c(o,12))},o.\u0275mod=I({type:o}),o.\u0275inj=T({}),o})();var z=(()=>{class o{$api=f(j);$jwtHelper=f(p);$settings=f(S);token;user={};logoutTimer;lastRefreshTime=Date.now();isRefreshing=!1;constructor(){this.loadToken()}login(e){return a(this,null,function*(){let t=yield this.$api.post("/auth/login",e);if(!this.validateToken(t.access_token))throw new Error("Invalid username or password.");window.localStorage.setItem(h.jwt.tokenKey,t.access_token),yield this.$settings.getAppSettings()})}noauth(){return a(this,null,function*(){let e=yield this.$api.post("/auth/noauth",{});if(this.validateToken(e.access_token))window.localStorage.setItem(h.jwt.tokenKey,e.access_token),yield this.$settings.getAppSettings();else throw new Error("Invalid username or password.")})}logout(){this.user=null,this.token=null,clearTimeout(this.logoutTimer),window.localStorage.removeItem(h.jwt.tokenKey),window.location.reload()}loadToken(){return a(this,null,function*(){this.$settings.settingsLoaded||(yield this.$settings.onSettingsLoaded);let e=window.localStorage.getItem(h.jwt.tokenKey);e&&this.validateToken(e)})}checkToken(){return a(this,null,function*(){if(!this.token||this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)){console.warn("Token expired on client side, logging out immediately"),this.logout();return}try{return yield this.$api.get("/auth/check")}catch(e){throw e.status===401&&(console.warn("Current token is not valid on server"),this.logout()),e}})}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)}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(h.jwt.tokenKey),this.token=null,!1}}setLogoutTimer(){if(clearTimeout(this.logoutTimer),!this.$jwtHelper.isTokenExpired(this.token,this.$settings.serverTimeOffset)){let e=this.$settings.sessionTimeout*1e3;e<=2147483647&&(this.logoutTimer=setTimeout(()=>a(this,null,function*(){this.$settings.formAuth===!1?(yield this.noauth(),window.location.reload()):this.logout()}),e))}}checkAndRefreshIfNeeded(){return a(this,null,function*(){if(!this.$settings.formAuth||!this.$settings.sessionTimeoutInactivityBased||!this.token||!this.isLoggedIn()||this.isRefreshing)return;let t=Date.now()-this.lastRefreshTime,r=this.$settings.sessionTimeout*1e3*.7;if(t>r)try{yield this.refreshSession()}catch(s){console.error("Failed to refresh session:",s)}})}refreshSession(){return a(this,null,function*(){if(!this.isRefreshing){this.isRefreshing=!0;try{let e=yield this.$api.post("/auth/refresh",{});e.access_token&&(this.token=e.access_token,window.localStorage.setItem(h.jwt.tokenKey,e.access_token),this.lastRefreshTime=Date.now(),this.setLogoutTimer())}finally{this.isRefreshing=!1}}})}static \u0275fac=function(t){return new(t||o)};static \u0275prov=l({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{L as a,z as b};
@@ -1 +1 @@
1
- import{b as T,c as D,d as N}from"./chunk-WX345PMX.js";import{m as w}from"./chunk-MS4K4KAK.js";import{F as L}from"./chunk-2TQEV57U.js";import{Ab as r,Ec as _,Fb as p,Fc as u,Gb as o,Hb as a,Ib as m,Rb as P,Ua as C,Va as v,Xb as M,Za as i,Zb as d,aa as O,ga as k,ha as x,jc as S,kc as f,lc as B,mc as h,nb as y,sa as l,vc as I,yb as b,zb as s}from"./chunk-MKV5RAJQ.js";function H(n,c){if(n&1&&m(0,"i",16),n&2){let t=d();S(I("fas ",t.faIconClassSignal()," mb-3"))}}function E(n,c){if(n&1&&m(0,"h5",6),n&2){let t=d();p("innerHTML",t.subtitleSignal(),C)}}function R(n,c){if(n&1&&m(0,"p",8),n&2){let t=d();p("innerHTML",t.message2Signal(),C)}}function z(n,c){if(n&1&&m(0,"markdown",9),n&2){let t=d();p("data",t.markdownMessage2Signal())}}function V(n,c){if(n&1){let t=P();o(0,"button",17),_(1,"translate"),M("click",function(){k(t);let e=d();return x(e.dismissModal())}),f(2),_(3,"translate"),a()}n&2&&(b("aria-label",u(1,2,"form.button_close")),i(2),h(" ",u(3,4,"form.button_close")," "))}function j(n,c){if(n&1){let t=P();o(0,"button",17),_(1,"translate"),M("click",function(){k(t);let e=d();return x(e.dismissModal())}),f(2),_(3,"translate"),a()}n&2&&(b("aria-label",u(1,2,"form.button_close")),i(2),h(" ",u(3,4,"form.button_close")," "))}function A(n,c){if(n&1&&(o(0,"a",15),f(1),m(2,"i",18),a()),n&2){let t=d();p("href",t.ctaButtonLinkSignal(),v),i(),h(" ",t.ctaButtonLabelSignal()," ")}}var X=(()=>{class n{$activeModal=O(w);_title=l(null,{});_subtitle=l(void 0,{});_message=l(null,{});_message2=l(void 0,{});_ctaButtonLabel=l(void 0,{});_ctaButtonLink=l(void 0,{});_faIconClass=l(null,{});_markdownMessage2=l(void 0,{});set title(t){this._title.set(t)}get title(){return this._title()}set subtitle(t){this._subtitle.set(t)}get subtitle(){return this._subtitle()}set message(t){this._message.set(t)}get message(){return this._message()}set message2(t){this._message2.set(t)}get message2(){return this._message2()}set ctaButtonLabel(t){this._ctaButtonLabel.set(t)}get ctaButtonLabel(){return this._ctaButtonLabel()}set ctaButtonLink(t){this._ctaButtonLink.set(t)}get ctaButtonLink(){return this._ctaButtonLink()}set faIconClass(t){this._faIconClass.set(t)}get faIconClass(){return this._faIconClass()}set markdownMessage2(t){this._markdownMessage2.set(t)}get markdownMessage2(){return this._markdownMessage2()}titleSignal=this._title.asReadonly();subtitleSignal=this._subtitle.asReadonly();messageSignal=this._message.asReadonly();message2Signal=this._message2.asReadonly();ctaButtonLabelSignal=this._ctaButtonLabel.asReadonly();ctaButtonLinkSignal=this._ctaButtonLink.asReadonly();faIconClassSignal=this._faIconClass.asReadonly();markdownMessage2Signal=this._markdownMessage2.asReadonly();dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(g){return new(g||n)};static \u0275cmp=y({type:n,selectors:[["ng-component"]],decls:19,vars:13,consts:[["role","dialog","aria-modal","true",1,"modal-content"],[1,"modal-header"],["id","information-modal-title",1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center"],[2,"font-size","75px",3,"class"],[1,"mb-3",3,"innerHTML"],[1,"mb-0",3,"innerHTML"],[1,"mb-0","mt-3",3,"innerHTML"],[1,"plugin-md",3,"data"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","text-decoration-none",3,"href"],[2,"font-size","75px"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"fas","fa-external-link-alt"]],template:function(g,e){g&1&&(o(0,"div",0)(1,"div",1)(2,"h5",2),f(3),a(),o(4,"button",3),_(5,"translate"),M("click",function(){return e.dismissModal()}),a()(),o(6,"div",4),s(7,H,1,3,"i",5),s(8,E,1,1,"h5",6),m(9,"p",7),s(10,R,1,1,"p",8),s(11,z,1,1,"markdown",9),a(),o(12,"div",10)(13,"div",11),s(14,V,4,6,"button",12),a(),o(15,"div",13),s(16,j,4,6,"button",12),a(),o(17,"div",14),s(18,A,3,2,"a",15),a()()()),g&2&&(b("aria-labelledby","information-modal-title"),i(3),B(e.titleSignal()),i(),b("aria-label",u(5,11,"form.button_close")),i(3),r(e.faIconClassSignal()?7:-1),i(),r(e.subtitleSignal()?8:-1),i(),p("innerHTML",e.messageSignal(),C),i(),r(e.message2Signal()?10:-1),i(),r(e.markdownMessage2Signal()?11:-1),i(3),r(e.ctaButtonLinkSignal()?14:-1),i(2),r(e.ctaButtonLinkSignal()?-1:16),i(2),r(e.ctaButtonLinkSignal()?18:-1))},dependencies:[D,T,N,L],styles:["[_nghost-%COMP%] .plugin-md{display:block!important;background-color:#f6f8fa!important;border-radius:6px!important;padding:16px!important;margin:16px auto!important;width:100%!important;max-width:632px!important}[_nghost-%COMP%] .plugin-md table{width:100%;max-width:600px;margin:0 auto!important;border-collapse:collapse;border:1px solid #d0d7de!important;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif!important;font-size:14px!important;color:#24292e!important}[_nghost-%COMP%] .plugin-md th, [_nghost-%COMP%] .plugin-md td{padding:6px 13px!important;border:1px solid #d0d7de!important;text-align:left;color:#24292e!important}[_nghost-%COMP%] .plugin-md th{background-color:#f6f8fa!important;font-weight:600!important;text-align:center!important}[_nghost-%COMP%] .plugin-md td[align=center]{text-align:center!important}[_nghost-%COMP%] .plugin-md tr{color:#24292e!important}[_nghost-%COMP%] .plugin-md tr:nth-child(odd){background-color:#fff!important}[_nghost-%COMP%] .plugin-md tr:nth-child(2n){background-color:#f6f8fa!important}[_nghost-%COMP%] .plugin-md tr:hover{background-color:#f0f2f5!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%]{background-color:#2b2b2b!important;color:#fff!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] table[_ngcontent-%COMP%], [_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], [_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] th[_ngcontent-%COMP%], [_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{color:#fff!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#3c3c3c!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(odd){background-color:#323232!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#2b2b2b!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:#454545!important}"]})}return n})();export{X as a};
1
+ import{b as T,c as D,d as N}from"./chunk-LQNKSANI.js";import{m as w}from"./chunk-K3VXCKFJ.js";import{F as L}from"./chunk-B6EPFA4V.js";import{Ab as r,Ec as _,Fb as p,Fc as u,Gb as o,Hb as a,Ib as m,Rb as P,Ua as C,Va as v,Xb as M,Za as i,Zb as d,aa as O,ga as k,ha as x,jc as S,kc as f,lc as B,mc as h,nb as y,sa as l,vc as I,yb as b,zb as s}from"./chunk-MKV5RAJQ.js";function H(n,c){if(n&1&&m(0,"i",16),n&2){let t=d();S(I("fas ",t.faIconClassSignal()," mb-3"))}}function E(n,c){if(n&1&&m(0,"h5",6),n&2){let t=d();p("innerHTML",t.subtitleSignal(),C)}}function R(n,c){if(n&1&&m(0,"p",8),n&2){let t=d();p("innerHTML",t.message2Signal(),C)}}function z(n,c){if(n&1&&m(0,"markdown",9),n&2){let t=d();p("data",t.markdownMessage2Signal())}}function V(n,c){if(n&1){let t=P();o(0,"button",17),_(1,"translate"),M("click",function(){k(t);let e=d();return x(e.dismissModal())}),f(2),_(3,"translate"),a()}n&2&&(b("aria-label",u(1,2,"form.button_close")),i(2),h(" ",u(3,4,"form.button_close")," "))}function j(n,c){if(n&1){let t=P();o(0,"button",17),_(1,"translate"),M("click",function(){k(t);let e=d();return x(e.dismissModal())}),f(2),_(3,"translate"),a()}n&2&&(b("aria-label",u(1,2,"form.button_close")),i(2),h(" ",u(3,4,"form.button_close")," "))}function A(n,c){if(n&1&&(o(0,"a",15),f(1),m(2,"i",18),a()),n&2){let t=d();p("href",t.ctaButtonLinkSignal(),v),i(),h(" ",t.ctaButtonLabelSignal()," ")}}var X=(()=>{class n{$activeModal=O(w);_title=l(null,{});_subtitle=l(void 0,{});_message=l(null,{});_message2=l(void 0,{});_ctaButtonLabel=l(void 0,{});_ctaButtonLink=l(void 0,{});_faIconClass=l(null,{});_markdownMessage2=l(void 0,{});set title(t){this._title.set(t)}get title(){return this._title()}set subtitle(t){this._subtitle.set(t)}get subtitle(){return this._subtitle()}set message(t){this._message.set(t)}get message(){return this._message()}set message2(t){this._message2.set(t)}get message2(){return this._message2()}set ctaButtonLabel(t){this._ctaButtonLabel.set(t)}get ctaButtonLabel(){return this._ctaButtonLabel()}set ctaButtonLink(t){this._ctaButtonLink.set(t)}get ctaButtonLink(){return this._ctaButtonLink()}set faIconClass(t){this._faIconClass.set(t)}get faIconClass(){return this._faIconClass()}set markdownMessage2(t){this._markdownMessage2.set(t)}get markdownMessage2(){return this._markdownMessage2()}titleSignal=this._title.asReadonly();subtitleSignal=this._subtitle.asReadonly();messageSignal=this._message.asReadonly();message2Signal=this._message2.asReadonly();ctaButtonLabelSignal=this._ctaButtonLabel.asReadonly();ctaButtonLinkSignal=this._ctaButtonLink.asReadonly();faIconClassSignal=this._faIconClass.asReadonly();markdownMessage2Signal=this._markdownMessage2.asReadonly();dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(g){return new(g||n)};static \u0275cmp=y({type:n,selectors:[["ng-component"]],decls:19,vars:13,consts:[["role","dialog","aria-modal","true",1,"modal-content"],[1,"modal-header"],["id","information-modal-title",1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body","text-center"],[2,"font-size","75px",3,"class"],[1,"mb-3",3,"innerHTML"],[1,"mb-0",3,"innerHTML"],[1,"mb-0","mt-3",3,"innerHTML"],[1,"plugin-md",3,"data"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant"],[1,"text-center"],[1,"text-end"],["target","_blank","rel","noopener noreferrer",1,"btn","btn-primary","text-decoration-none",3,"href"],[2,"font-size","75px"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"fas","fa-external-link-alt"]],template:function(g,e){g&1&&(o(0,"div",0)(1,"div",1)(2,"h5",2),f(3),a(),o(4,"button",3),_(5,"translate"),M("click",function(){return e.dismissModal()}),a()(),o(6,"div",4),s(7,H,1,3,"i",5),s(8,E,1,1,"h5",6),m(9,"p",7),s(10,R,1,1,"p",8),s(11,z,1,1,"markdown",9),a(),o(12,"div",10)(13,"div",11),s(14,V,4,6,"button",12),a(),o(15,"div",13),s(16,j,4,6,"button",12),a(),o(17,"div",14),s(18,A,3,2,"a",15),a()()()),g&2&&(b("aria-labelledby","information-modal-title"),i(3),B(e.titleSignal()),i(),b("aria-label",u(5,11,"form.button_close")),i(3),r(e.faIconClassSignal()?7:-1),i(),r(e.subtitleSignal()?8:-1),i(),p("innerHTML",e.messageSignal(),C),i(),r(e.message2Signal()?10:-1),i(),r(e.markdownMessage2Signal()?11:-1),i(3),r(e.ctaButtonLinkSignal()?14:-1),i(2),r(e.ctaButtonLinkSignal()?-1:16),i(2),r(e.ctaButtonLinkSignal()?18:-1))},dependencies:[D,T,N,L],styles:["[_nghost-%COMP%] .plugin-md{display:block!important;background-color:#f6f8fa!important;border-radius:6px!important;padding:16px!important;margin:16px auto!important;width:100%!important;max-width:632px!important}[_nghost-%COMP%] .plugin-md table{width:100%;max-width:600px;margin:0 auto!important;border-collapse:collapse;border:1px solid #d0d7de!important;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif!important;font-size:14px!important;color:#24292e!important}[_nghost-%COMP%] .plugin-md th, [_nghost-%COMP%] .plugin-md td{padding:6px 13px!important;border:1px solid #d0d7de!important;text-align:left;color:#24292e!important}[_nghost-%COMP%] .plugin-md th{background-color:#f6f8fa!important;font-weight:600!important;text-align:center!important}[_nghost-%COMP%] .plugin-md td[align=center]{text-align:center!important}[_nghost-%COMP%] .plugin-md tr{color:#24292e!important}[_nghost-%COMP%] .plugin-md tr:nth-child(odd){background-color:#fff!important}[_nghost-%COMP%] .plugin-md tr:nth-child(2n){background-color:#f6f8fa!important}[_nghost-%COMP%] .plugin-md tr:hover{background-color:#f0f2f5!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%]{background-color:#2b2b2b!important;color:#fff!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] table[_ngcontent-%COMP%], [_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%], [_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] th[_ngcontent-%COMP%], [_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{color:#fff!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#3c3c3c!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(odd){background-color:#323232!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:nth-child(2n){background-color:#2b2b2b!important}[_nghost-%COMP%] body.dark-mode[_ngcontent-%COMP%] .plugin-md[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{background-color:#454545!important}"]})}return n})();export{X as a};
@@ -1 +1 @@
1
- import{a as Y}from"./chunk-TUN7H57E.js";import{a as ee}from"./chunk-PEOTW7KR.js";import{a as Z}from"./chunk-TPGJVI7J.js";import{a as re}from"./chunk-WX345PMX.js";import{a as Q}from"./chunk-QGLAR7UC.js";import{a as J}from"./chunk-6ZOSTYPR.js";import{a as G}from"./chunk-AM5CKSLZ.js";import{n as B}from"./chunk-MS4K4KAK.js";import{a as q,b as R,d as W,e as $,f as H,g as j}from"./chunk-TRDYZJYI.js";import{a as O}from"./chunk-BGCYR25X.js";import{b as I}from"./chunk-E35SHTFY.js";import"./chunk-UO7KCTHV.js";import{b as A}from"./chunk-T472BWYK.js";import{E as V,F as X,J as T,q as N}from"./chunk-2TQEV57U.js";import{Ab as S,Ec as d,Fb as g,Fc as l,Gb as i,Hb as a,Ib as p,Oc as K,Rb as k,Xb as u,Za as n,Zb as C,aa as c,ga as b,ha as x,hb as F,ic as P,kc as _,lc as v,ma as D,n as U,nb as E,sa as w,xc as f,yb as m,zb as y}from"./chunk-MKV5RAJQ.js";import{g as ne,h as L}from"./chunk-B4AJQJMI.js";var ie=ne(re(),1);var z=()=>["/"],ae=()=>({exact:!0}),se=()=>["/plugins"],de=()=>["/accessories"],le=()=>["/logs"],pe=()=>["/support"],ce=()=>["/platform-tools/terminal"],me=()=>["/config"],ue=()=>["/settings"],_e=()=>["/power-options"];function ge(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",20),d(2,"translate"),d(3,"translate"),u("click",function(){b(e);let t=C();return x(t.openUnderVoltageModal())})("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),i(4,"div",12),p(5,"i",21),a(),i(6,"div",14),_(7),d(8,"translate"),a()()()}s&2&&(n(),m("aria-label",l(2,2,"rpi.throttled.undervoltage_title")+" - "+l(3,4,"rpi.throttled.undervoltage_description")),n(6),v(l(8,6,"rpi.throttled.undervoltage_title")))}function he(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",15),d(2,"translate"),u("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",22),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),g("routerLink",f(8,ce))("routerLinkActive","active"),m("aria-label",l(2,4,"menu.linux.label_terminal")),n(5),v(l(7,6,"menu.linux.label_terminal")))}function ve(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",15),d(2,"translate"),u("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",23),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),g("routerLink",f(8,me))("routerLinkActive","active"),m("aria-label",l(2,4,"menu.config_json_editor")),n(5),v(l(7,6,"menu.config_json_editor")))}function fe(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",15),d(2,"translate"),u("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",24),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),g("routerLink",f(8,ue))("routerLinkActive","active"),m("aria-label",l(2,4,"menu.label_settings")),n(5),v(l(7,6,"menu.label_settings")))}function be(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",15),d(2,"translate"),u("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",25),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),g("routerLink",f(8,_e))("routerLinkActive","active"),m("aria-label",l(2,4,"menu.restart.title")),n(5),v(l(7,6,"menu.restart.title")))}function xe(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",20),d(2,"translate"),u("click",function(){b(e);let t=C();return x(t.reloadPage())})("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",26),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),m("aria-label",l(2,2,"menu.reload")),n(5),v(l(7,4,"menu.reload")))}function Ce(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",20),d(2,"translate"),u("click",function(){b(e);let t=C();return x(t.logout())})("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",27),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),m("aria-label",l(2,2,"menu.tooltip_logout")),n(5),v(l(7,4,"menu.tooltip_logout")))}var te=(()=>{class s{destroyRef=c(D);$auth=c(I);$authHelper=c(G);$settings=c(A);$modal=c(B);$notification=c(Z);$renderer=c(F);$router=c($);$translate=c(V);initialIsExpanded=K(!1,{});isExpanded=w(!1,{});formAuth=w(this.$settings.formAuth,{});isAdmin=this.$auth.user.admin;enableTerminalAccess=this.$settings.env.enableTerminalAccess;rPiCurrentlyUnderVoltage=w(!1,{});rPiWasUnderVoltage=w(!1,{});isMobile=!1;freezeMenu=w(!1,{});isPwa=Y();sidebarMouseEnterListener=()=>this.openSidebar();sidebarMouseLeaveListener=()=>this.closeSidebar();touchstartListener;clickListener;constructor(){this.isMobile=window.innerWidth<768;let e;window.addEventListener("resize",()=>{clearTimeout(e),e=setTimeout(()=>{this.updateListeners()},500)}),this.$router.events.pipe(O()).subscribe(o=>L(this,null,function*(){if(o instanceof q&&this.$settings.formAuth&&o.url!=="/login"&&!(yield this.$authHelper.isAuthenticated())){window.sessionStorage.setItem("target_route",o.url),yield this.$router.navigate(["/login"]);return}o instanceof R&&queueMicrotask(()=>{this.closeSidebar(),this.freezeMenu.set(!0),setTimeout(()=>{this.freezeMenu.set(!1)},750)})}))}ngOnInit(){this.isExpanded.set(this.initialIsExpanded()),this.$notification.raspberryPiThrottled.pipe(O(this.destroyRef)).subscribe(r=>{r["Under Voltage"]&&this.rPiCurrentlyUnderVoltage.set(!0),r["Under-voltage has occurred"]&&this.rPiWasUnderVoltage.set(!0)}),this.$notification.formAuthEnabled.pipe(O(this.destroyRef)).subscribe(r=>{this.formAuth.set(r)});let e=document.querySelector(".sidebar"),o=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?(this.touchstartListener=r=>{if(t.contains(r.target)&&this.isExpanded()){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!o.contains(r.target)&&this.isExpanded()&&(r.preventDefault(),this.closeSidebar())},document.addEventListener("touchstart",this.touchstartListener,{passive:!1})):(this.updateListeners(),o.addEventListener("mouseenter",this.sidebarMouseEnterListener,{passive:!1}),o.addEventListener("mouseleave",this.sidebarMouseLeaveListener,{passive:!1}),this.clickListener=r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},document.addEventListener("click",this.clickListener,{passive:!1}))}toggleSidebar(){this.freezeMenu()||(this.isExpanded.set(!this.isExpanded()),this.updateContentStyles())}openUnderVoltageModal(){let e=this.$modal.open(ee,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("rpi.throttled.undervoltage_title"),e.componentInstance.message=this.$translate.instant(this.rPiCurrentlyUnderVoltage()?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.faIconClass="fas fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let o=e.target;["menuitem","button"].includes(o.getAttribute("role"))&&o.click()}}reloadPage(){window.location.reload()}ngOnDestroy(){this.touchstartListener&&document.removeEventListener("touchstart",this.touchstartListener),this.clickListener&&document.removeEventListener("click",this.clickListener);let e=document.querySelector(".sidebar"),o=document.querySelector(".m-header");e&&(e.removeEventListener("mouseenter",this.sidebarMouseEnterListener),e.removeEventListener("mouseleave",this.sidebarMouseLeaveListener)),o&&(o.removeEventListener("mouseenter",this.sidebarMouseEnterListener),o.removeEventListener("mouseleave",this.sidebarMouseLeaveListener))}logout(){this.$auth.logout()}openSidebar(){this.freezeMenu()||(this.isExpanded.set(!0),this.updateContentStyles())}closeSidebar(){this.freezeMenu()||(this.isExpanded.set(!1),this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded()?(this.$renderer.setStyle(e,"opacity","20%"),this.$renderer.setStyle(e,"pointer-events","none"),this.$renderer.setStyle(e,"overflow","hidden")):(this.$renderer.removeStyle(e,"opacity"),this.$renderer.removeStyle(e,"pointer-events"),this.$renderer.removeStyle(e,"overflow"))}updateListeners(){this.isMobile=window.innerWidth<768;let e=document.querySelector(".sidebar");e.removeEventListener("mouseenter",this.sidebarMouseEnterListener),e.removeEventListener("mouseleave",this.sidebarMouseLeaveListener),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",this.sidebarMouseEnterListener,{passive:!1}),e.addEventListener("mouseleave",this.sidebarMouseLeaveListener,{passive:!1}))}static \u0275fac=function(o){return new(o||s)};static \u0275cmp=E({type:s,selectors:[["app-sidebar"]],inputs:{initialIsExpanded:[1,"initialIsExpanded"]},decls:68,vars:73,consts:[["tabindex","0","role","button",1,"m-header","text-end",3,"click","keydown"],[1,"me-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon"],["role","navigation","id","sidebar",1,"sidebar"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-plug"],[1,"fa","fa-lightbulb"],[1,"fa","fa-wave-square"],[1,"fa","fa-question-circle-o"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-terminal"],[1,"fa","fa-code"],[1,"fa","fa-cog"],[1,"fa","fa-power-off"],[1,"fa","fa-refresh"],[1,"fa","fa-right-from-bracket"]],template:function(o,t){o&1&&(i(0,"div",0),d(1,"translate"),u("click",function(){return t.toggleSidebar()})("keydown",function(h){return t.handleKeydown(h)}),p(2,"span",1),i(3,"a",2),d(4,"translate"),p(5,"img",3),i(6,"div",4),_(7,"Homebridge"),a()(),i(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),i(13,"div",6)(14,"div",7),u("click",function(){return t.toggleSidebar()})("keydown",function(h){return t.handleKeydown(h)}),i(15,"a",2),d(16,"translate"),p(17,"img",3),i(18,"div",8),_(19,"Homebridge"),a()()(),i(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),u("keydown",function(h){return t.handleKeydown(h)}),i(24,"div",12),p(25,"i",13),a(),i(26,"div",14),_(27),d(28,"translate"),a()()(),y(29,ge,9,8,"div",10),i(30,"div",10)(31,"div",15),d(32,"translate"),u("keydown",function(h){return t.handleKeydown(h)}),i(33,"div",12),p(34,"i",16),a(),i(35,"div",14),_(36),d(37,"translate"),a()()(),i(38,"div",10)(39,"div",15),d(40,"translate"),u("keydown",function(h){return t.handleKeydown(h)}),i(41,"div",12),p(42,"i",17),a(),i(43,"div",14),_(44),d(45,"translate"),a()()(),i(46,"div",10)(47,"div",15),d(48,"translate"),u("keydown",function(h){return t.handleKeydown(h)}),i(49,"div",12),p(50,"i",18),a(),i(51,"div",14),_(52),d(53,"translate"),a()()(),y(54,he,8,9,"div",10),y(55,ve,8,9,"div",10),y(56,fe,8,9,"div",10),i(57,"div",10)(58,"div",15),d(59,"translate"),u("keydown",function(h){return t.handleKeydown(h)}),i(60,"div",12),p(61,"i",19),a(),i(62,"div",14),_(63),d(64,"translate"),a()()(),y(65,be,8,9,"div",10),y(66,xe,8,6,"div",10),y(67,Ce,8,6,"div",10),a()()),o&2&&(m("aria-expanded",t.isExpanded()?"true":"false")("aria-controls","sidebar")("aria-label",l(1,39,"menu.sidebar.aria_menu")),n(3),g("routerLink",f(65,z)),m("aria-label",l(4,41,"menu.label_status")),n(5),P("hamburger-icon-cross",t.isExpanded()),n(5),P("expanded",t.isExpanded()),n(2),g("routerLink",f(66,z)),m("aria-label",l(16,43,"menu.label_status")),n(7),g("routerLink",f(67,z))("routerLinkActive","active")("routerLinkActiveOptions",f(68,ae)),m("aria-label",l(23,45,"menu.label_status")),n(5),v(l(28,47,"menu.label_status")),n(2),S(t.rPiWasUnderVoltage()||t.rPiCurrentlyUnderVoltage()?29:-1),n(2),g("routerLink",f(69,se))("routerLinkActive","active"),m("aria-label",l(32,49,"menu.label_plugins")),n(5),v(l(37,51,"menu.label_plugins")),n(3),g("routerLink",f(70,de))("routerLinkActive","active"),m("aria-label",l(40,53,"menu.label_accessories")),n(5),v(l(45,55,"menu.label_accessories")),n(3),g("routerLink",f(71,le))("routerLinkActive","active"),m("aria-label",l(48,57,"menu.linux.label_logs")),n(5),v(l(53,59,"menu.linux.label_logs")),n(2),S(t.enableTerminalAccess&&t.isAdmin?54:-1),n(),S(t.isAdmin?55:-1),n(),S(t.isAdmin?56:-1),n(2),g("routerLink",f(72,pe))("routerLinkActive","active"),m("aria-label",l(59,61,"support.title")),n(5),v(l(64,63,"support.title")),n(2),S(t.isAdmin?65:-1),n(),S(t.isPwa?66:-1),n(),S(t.formAuth()?67:-1))},dependencies:[H,N,j,X],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media(min-width:768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 80px)!important;scrollbar-width:thin}@media(max-width:767px){.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{padding-bottom:60px}}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media(max-width:767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media(max-width:767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media(min-width:768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media(max-width:767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;transform:rotate(0);transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;transform:rotate(0);transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return s})();var Ge=(()=>{class s{$auth=c(I);$modal=c(B);$router=c($);$settings=c(A);$translate=c(V);$ws=c(J);io;sidebarExpanded=w(!1,{});ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return L(this,null,function*(){if(this.$settings.settingsLoaded||(yield U(this.$settings.onSettingsLoaded)),!this.$router.url.endsWith("/restart")&&(0,ie.lt)(this.$settings.uiVersion,T.serverTarget)){console.log(`Server restart required. UI Version: ${T.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(Q,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("platform.version.service_restart_required"),e.componentInstance.message=this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:T.serverTarget}),e.componentInstance.confirmButtonLabel=this.$translate.instant("menu.tooltip_restart"),e.componentInstance.faIconClass="fas fa-power-off orange-text",e.result.then(()=>this.$router.navigate(["/restart"])).catch(()=>{})}})}static \u0275fac=function(o){return new(o||s)};static \u0275cmp=E({type:s,selectors:[["app-layout"]],decls:3,vars:3,consts:[[3,"initialIsExpanded"],[1,"content","px-3","p-md-4"]],template:function(o,t){o&1&&(p(0,"app-sidebar",0),i(1,"div",1),p(2,"router-outlet"),a()),o&2&&(g("initialIsExpanded",t.sidebarExpanded()),n(),P("sidebarExpanded",t.sidebarExpanded()))},dependencies:[te,W],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media(max-width:767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media(min-width:768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return s})();export{Ge as LayoutComponent};
1
+ import{a as Y}from"./chunk-TUN7H57E.js";import{a as ee}from"./chunk-G7V2J2JO.js";import{a as Z}from"./chunk-TPGJVI7J.js";import{a as re}from"./chunk-LQNKSANI.js";import{a as Q}from"./chunk-TRA6X3HB.js";import{a as J}from"./chunk-RMWS37MG.js";import{a as G}from"./chunk-746K2W65.js";import{n as B}from"./chunk-K3VXCKFJ.js";import{a as q,b as R,d as W,e as $,f as H,g as j}from"./chunk-P2U63MCR.js";import{a as O}from"./chunk-BGCYR25X.js";import{b as I}from"./chunk-D3NFARXL.js";import"./chunk-YAUW3QQV.js";import{b as A}from"./chunk-72SK6LN3.js";import{E as V,F as X,J as T,q as N}from"./chunk-B6EPFA4V.js";import{Ab as S,Ec as d,Fb as g,Fc as l,Gb as i,Hb as a,Ib as p,Oc as K,Rb as k,Xb as u,Za as n,Zb as C,aa as c,ga as b,ha as x,hb as F,ic as P,kc as _,lc as v,ma as D,n as U,nb as E,sa as w,xc as f,yb as m,zb as y}from"./chunk-MKV5RAJQ.js";import{g as ne,h as L}from"./chunk-B4AJQJMI.js";var ie=ne(re(),1);var z=()=>["/"],ae=()=>({exact:!0}),se=()=>["/plugins"],de=()=>["/accessories"],le=()=>["/logs"],pe=()=>["/support"],ce=()=>["/platform-tools/terminal"],me=()=>["/config"],ue=()=>["/settings"],_e=()=>["/power-options"];function ge(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",20),d(2,"translate"),d(3,"translate"),u("click",function(){b(e);let t=C();return x(t.openUnderVoltageModal())})("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),i(4,"div",12),p(5,"i",21),a(),i(6,"div",14),_(7),d(8,"translate"),a()()()}s&2&&(n(),m("aria-label",l(2,2,"rpi.throttled.undervoltage_title")+" - "+l(3,4,"rpi.throttled.undervoltage_description")),n(6),v(l(8,6,"rpi.throttled.undervoltage_title")))}function he(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",15),d(2,"translate"),u("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",22),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),g("routerLink",f(8,ce))("routerLinkActive","active"),m("aria-label",l(2,4,"menu.linux.label_terminal")),n(5),v(l(7,6,"menu.linux.label_terminal")))}function ve(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",15),d(2,"translate"),u("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",23),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),g("routerLink",f(8,me))("routerLinkActive","active"),m("aria-label",l(2,4,"menu.config_json_editor")),n(5),v(l(7,6,"menu.config_json_editor")))}function fe(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",15),d(2,"translate"),u("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",24),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),g("routerLink",f(8,ue))("routerLinkActive","active"),m("aria-label",l(2,4,"menu.label_settings")),n(5),v(l(7,6,"menu.label_settings")))}function be(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",15),d(2,"translate"),u("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",25),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),g("routerLink",f(8,_e))("routerLinkActive","active"),m("aria-label",l(2,4,"menu.restart.title")),n(5),v(l(7,6,"menu.restart.title")))}function xe(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",20),d(2,"translate"),u("click",function(){b(e);let t=C();return x(t.reloadPage())})("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",26),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),m("aria-label",l(2,2,"menu.reload")),n(5),v(l(7,4,"menu.reload")))}function Ce(s,M){if(s&1){let e=k();i(0,"div",10)(1,"div",20),d(2,"translate"),u("click",function(){b(e);let t=C();return x(t.logout())})("keydown",function(t){b(e);let r=C();return x(r.handleKeydown(t))}),i(3,"div",12),p(4,"i",27),a(),i(5,"div",14),_(6),d(7,"translate"),a()()()}s&2&&(n(),m("aria-label",l(2,2,"menu.tooltip_logout")),n(5),v(l(7,4,"menu.tooltip_logout")))}var te=(()=>{class s{destroyRef=c(D);$auth=c(I);$authHelper=c(G);$settings=c(A);$modal=c(B);$notification=c(Z);$renderer=c(F);$router=c($);$translate=c(V);initialIsExpanded=K(!1,{});isExpanded=w(!1,{});formAuth=w(this.$settings.formAuth,{});isAdmin=this.$auth.user.admin;enableTerminalAccess=this.$settings.env.enableTerminalAccess;rPiCurrentlyUnderVoltage=w(!1,{});rPiWasUnderVoltage=w(!1,{});isMobile=!1;freezeMenu=w(!1,{});isPwa=Y();sidebarMouseEnterListener=()=>this.openSidebar();sidebarMouseLeaveListener=()=>this.closeSidebar();touchstartListener;clickListener;constructor(){this.isMobile=window.innerWidth<768;let e;window.addEventListener("resize",()=>{clearTimeout(e),e=setTimeout(()=>{this.updateListeners()},500)}),this.$router.events.pipe(O()).subscribe(o=>L(this,null,function*(){if(o instanceof q&&this.$settings.formAuth&&o.url!=="/login"&&!(yield this.$authHelper.isAuthenticated())){window.sessionStorage.setItem("target_route",o.url),yield this.$router.navigate(["/login"]);return}o instanceof R&&queueMicrotask(()=>{this.closeSidebar(),this.freezeMenu.set(!0),setTimeout(()=>{this.freezeMenu.set(!1)},750)})}))}ngOnInit(){this.isExpanded.set(this.initialIsExpanded()),this.$notification.raspberryPiThrottled.pipe(O(this.destroyRef)).subscribe(r=>{r["Under Voltage"]&&this.rPiCurrentlyUnderVoltage.set(!0),r["Under-voltage has occurred"]&&this.rPiWasUnderVoltage.set(!0)}),this.$notification.formAuthEnabled.pipe(O(this.destroyRef)).subscribe(r=>{this.formAuth.set(r)});let e=document.querySelector(".sidebar"),o=document.querySelector(".m-header"),t=document.querySelector(".content");this.isMobile?(this.touchstartListener=r=>{if(t.contains(r.target)&&this.isExpanded()){r.preventDefault(),this.toggleSidebar();return}!e.contains(r.target)&&!o.contains(r.target)&&this.isExpanded()&&(r.preventDefault(),this.closeSidebar())},document.addEventListener("touchstart",this.touchstartListener,{passive:!1})):(this.updateListeners(),o.addEventListener("mouseenter",this.sidebarMouseEnterListener,{passive:!1}),o.addEventListener("mouseleave",this.sidebarMouseLeaveListener,{passive:!1}),this.clickListener=r=>{e.contains(r.target)&&r.clientX>60&&this.closeSidebar()},document.addEventListener("click",this.clickListener,{passive:!1}))}toggleSidebar(){this.freezeMenu()||(this.isExpanded.set(!this.isExpanded()),this.updateContentStyles())}openUnderVoltageModal(){let e=this.$modal.open(ee,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("rpi.throttled.undervoltage_title"),e.componentInstance.message=this.$translate.instant(this.rPiCurrentlyUnderVoltage()?"rpi.throttled.currently_message":"rpi.throttled.previously_message"),e.componentInstance.ctaButtonLabel=this.$translate.instant("form.button_more_info"),e.componentInstance.faIconClass="fas fa-bolt yellow-text",e.componentInstance.ctaButtonLink="https://pimylifeup.com/raspberry-pi-low-voltage-warning"}handleKeydown(e){if(e.key==="Enter"){let o=e.target;["menuitem","button"].includes(o.getAttribute("role"))&&o.click()}}reloadPage(){window.location.reload()}ngOnDestroy(){this.touchstartListener&&document.removeEventListener("touchstart",this.touchstartListener),this.clickListener&&document.removeEventListener("click",this.clickListener);let e=document.querySelector(".sidebar"),o=document.querySelector(".m-header");e&&(e.removeEventListener("mouseenter",this.sidebarMouseEnterListener),e.removeEventListener("mouseleave",this.sidebarMouseLeaveListener)),o&&(o.removeEventListener("mouseenter",this.sidebarMouseEnterListener),o.removeEventListener("mouseleave",this.sidebarMouseLeaveListener))}logout(){this.$auth.logout()}openSidebar(){this.freezeMenu()||(this.isExpanded.set(!0),this.updateContentStyles())}closeSidebar(){this.freezeMenu()||(this.isExpanded.set(!1),this.updateContentStyles())}updateContentStyles(){let e=document.querySelector(".content");this.isExpanded()?(this.$renderer.setStyle(e,"opacity","20%"),this.$renderer.setStyle(e,"pointer-events","none"),this.$renderer.setStyle(e,"overflow","hidden")):(this.$renderer.removeStyle(e,"opacity"),this.$renderer.removeStyle(e,"pointer-events"),this.$renderer.removeStyle(e,"overflow"))}updateListeners(){this.isMobile=window.innerWidth<768;let e=document.querySelector(".sidebar");e.removeEventListener("mouseenter",this.sidebarMouseEnterListener),e.removeEventListener("mouseleave",this.sidebarMouseLeaveListener),(this.isMobile||!this.isMobile&&this.$settings.menuMode!=="freeze")&&(e.addEventListener("mouseenter",this.sidebarMouseEnterListener,{passive:!1}),e.addEventListener("mouseleave",this.sidebarMouseLeaveListener,{passive:!1}))}static \u0275fac=function(o){return new(o||s)};static \u0275cmp=E({type:s,selectors:[["app-sidebar"]],inputs:{initialIsExpanded:[1,"initialIsExpanded"]},decls:68,vars:73,consts:[["tabindex","0","role","button",1,"m-header","text-end",3,"click","keydown"],[1,"me-2","d-block","d-lg-none",2,"font-size","0.9rem","color","#dddddd"],[3,"routerLink"],["ngSrc","assets/homebridge-logo.svg","alt","HB Logo","height","35","width","35",2,"height","35px","width","35px"],[1,"hb-logo-text-mobile"],[1,"hamburger-icon"],["role","navigation","id","sidebar",1,"sidebar"],["tabindex","0","role","button",1,"header",3,"click","keydown"],[1,"hb-logo-text"],[1,"link-wrapper"],[1,"link"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive","routerLinkActiveOptions"],[1,"icon"],[1,"fa","fa-house"],[1,"title"],["role","menuitem","tabindex","0",1,"link-row",3,"keydown","routerLink","routerLinkActive"],[1,"fa","fa-plug"],[1,"fa","fa-lightbulb"],[1,"fa","fa-wave-square"],[1,"fa","fa-question-circle-o"],["role","menuitem","tabindex","0",1,"link-row",3,"click","keydown"],[1,"fas","fa-bolt","fa-beat","yellow-text",2,"--fa-beat-scale","1.5"],[1,"fa","fa-terminal"],[1,"fa","fa-code"],[1,"fa","fa-cog"],[1,"fa","fa-power-off"],[1,"fa","fa-refresh"],[1,"fa","fa-right-from-bracket"]],template:function(o,t){o&1&&(i(0,"div",0),d(1,"translate"),u("click",function(){return t.toggleSidebar()})("keydown",function(h){return t.handleKeydown(h)}),p(2,"span",1),i(3,"a",2),d(4,"translate"),p(5,"img",3),i(6,"div",4),_(7,"Homebridge"),a()(),i(8,"div",5),p(9,"span")(10,"span")(11,"span")(12,"span"),a()(),i(13,"div",6)(14,"div",7),u("click",function(){return t.toggleSidebar()})("keydown",function(h){return t.handleKeydown(h)}),i(15,"a",2),d(16,"translate"),p(17,"img",3),i(18,"div",8),_(19,"Homebridge"),a()()(),i(20,"div",9)(21,"div",10)(22,"div",11),d(23,"translate"),u("keydown",function(h){return t.handleKeydown(h)}),i(24,"div",12),p(25,"i",13),a(),i(26,"div",14),_(27),d(28,"translate"),a()()(),y(29,ge,9,8,"div",10),i(30,"div",10)(31,"div",15),d(32,"translate"),u("keydown",function(h){return t.handleKeydown(h)}),i(33,"div",12),p(34,"i",16),a(),i(35,"div",14),_(36),d(37,"translate"),a()()(),i(38,"div",10)(39,"div",15),d(40,"translate"),u("keydown",function(h){return t.handleKeydown(h)}),i(41,"div",12),p(42,"i",17),a(),i(43,"div",14),_(44),d(45,"translate"),a()()(),i(46,"div",10)(47,"div",15),d(48,"translate"),u("keydown",function(h){return t.handleKeydown(h)}),i(49,"div",12),p(50,"i",18),a(),i(51,"div",14),_(52),d(53,"translate"),a()()(),y(54,he,8,9,"div",10),y(55,ve,8,9,"div",10),y(56,fe,8,9,"div",10),i(57,"div",10)(58,"div",15),d(59,"translate"),u("keydown",function(h){return t.handleKeydown(h)}),i(60,"div",12),p(61,"i",19),a(),i(62,"div",14),_(63),d(64,"translate"),a()()(),y(65,be,8,9,"div",10),y(66,xe,8,6,"div",10),y(67,Ce,8,6,"div",10),a()()),o&2&&(m("aria-expanded",t.isExpanded()?"true":"false")("aria-controls","sidebar")("aria-label",l(1,39,"menu.sidebar.aria_menu")),n(3),g("routerLink",f(65,z)),m("aria-label",l(4,41,"menu.label_status")),n(5),P("hamburger-icon-cross",t.isExpanded()),n(5),P("expanded",t.isExpanded()),n(2),g("routerLink",f(66,z)),m("aria-label",l(16,43,"menu.label_status")),n(7),g("routerLink",f(67,z))("routerLinkActive","active")("routerLinkActiveOptions",f(68,ae)),m("aria-label",l(23,45,"menu.label_status")),n(5),v(l(28,47,"menu.label_status")),n(2),S(t.rPiWasUnderVoltage()||t.rPiCurrentlyUnderVoltage()?29:-1),n(2),g("routerLink",f(69,se))("routerLinkActive","active"),m("aria-label",l(32,49,"menu.label_plugins")),n(5),v(l(37,51,"menu.label_plugins")),n(3),g("routerLink",f(70,de))("routerLinkActive","active"),m("aria-label",l(40,53,"menu.label_accessories")),n(5),v(l(45,55,"menu.label_accessories")),n(3),g("routerLink",f(71,le))("routerLinkActive","active"),m("aria-label",l(48,57,"menu.linux.label_logs")),n(5),v(l(53,59,"menu.linux.label_logs")),n(2),S(t.enableTerminalAccess&&t.isAdmin?54:-1),n(),S(t.isAdmin?55:-1),n(),S(t.isAdmin?56:-1),n(2),g("routerLink",f(72,pe))("routerLinkActive","active"),m("aria-label",l(59,61,"support.title")),n(5),v(l(64,63,"support.title")),n(2),S(t.isAdmin?65:-1),n(),S(t.isPwa?66:-1),n(),S(t.formAuth()?67:-1))},dependencies:[H,N,j,X],styles:[".m-header[_ngcontent-%COMP%]{position:fixed;top:0;left:0;width:100%;height:65px;z-index:510;display:flex;align-items:center;padding-left:3px;padding-right:3px}.m-header[_ngcontent-%COMP%]:hover{cursor:pointer}@media(min-width:768px){.m-header[_ngcontent-%COMP%]{display:none}}.sidebar[_ngcontent-%COMP%]{position:fixed;left:0;top:0;height:100vh;transition:.3s;width:60px;z-index:500}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;padding:15px 10px 15px 11px;font-size:.85rem}.sidebar[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]:hover{cursor:pointer}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 80px)!important;scrollbar-width:thin}@media(max-width:767px){.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{padding-bottom:60px}}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding:15px 10px;cursor:pointer;transition:.2s;font-size:17px}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{flex:0 0 38px;display:flex;align-items:center;justify-content:center}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{flex:1;transition:.3s;max-width:0;overflow:hidden;white-space:nowrap}@media(max-width:767px){.sidebar[_ngcontent-%COMP%]{width:0}.sidebar[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:none}}.sidebar.expanded[_ngcontent-%COMP%]{width:210px}@media(max-width:767px){.sidebar.expanded[_ngcontent-%COMP%]{width:210px}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%]{display:block}}.sidebar.expanded[_ngcontent-%COMP%] .link-wrapper[_ngcontent-%COMP%] .link[_ngcontent-%COMP%] .link-row[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{max-width:150px;padding-left:10px}.hamburger-icon[_ngcontent-%COMP%]{margin:-7px 0 0 25px}@media(min-width:768px){.hb-logo-text[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px}.sidebar.expanded[_ngcontent-%COMP%] .hb-logo-text[_ngcontent-%COMP%]{opacity:1;left:55px;transition:.3s}.sidebar[_ngcontent-%COMP%]:not(.expanded) .hb-logo-text[_ngcontent-%COMP%]{opacity:0;left:40px;transition:.3s}.hb-logo-text-mobile[_ngcontent-%COMP%], .hamburger-icon[_ngcontent-%COMP%]{display:none!important}}@media(max-width:767px){.hb-logo-text[_ngcontent-%COMP%]{display:none!important}.hb-logo-text-mobile[_ngcontent-%COMP%]{color:#fff;position:absolute;top:17px;font-size:22px;padding-left:3px;opacity:1;left:55px}.hamburger-icon[_ngcontent-%COMP%]{position:absolute;right:10px;top:28px;width:30px;transform:rotate(0);transition:.5s ease-in-out;cursor:pointer}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;position:absolute;height:2px;width:100%;background-color:#fff;border-radius:9px;opacity:1;left:0;transform:rotate(0);transition:.25s ease-in-out}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:0}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2), .hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){top:10px}.hamburger-icon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:20px}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(1){top:10px;width:0;left:50%}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(2){transform:rotate(45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(3){transform:rotate(-45deg)}.hamburger-icon-cross[_ngcontent-%COMP%] span[_ngcontent-%COMP%]:nth-child(4){top:10px;width:0;left:50%}}"]})}return s})();var Ge=(()=>{class s{$auth=c(I);$modal=c(B);$router=c($);$settings=c(A);$translate=c(V);$ws=c(J);io;sidebarExpanded=w(!1,{});ngOnInit(){this.io=this.$ws.connectToNamespace("app"),this.io.socket.on("reconnect",()=>{this.$auth.checkToken()}),this.compareServerUiVersion()}compareServerUiVersion(){return L(this,null,function*(){if(this.$settings.settingsLoaded||(yield U(this.$settings.onSettingsLoaded)),!this.$router.url.endsWith("/restart")&&(0,ie.lt)(this.$settings.uiVersion,T.serverTarget)){console.log(`Server restart required. UI Version: ${T.serverTarget} - Server Version: ${this.$settings.uiVersion} `);let e=this.$modal.open(Q,{size:"lg",backdrop:"static"});e.componentInstance.title=this.$translate.instant("platform.version.service_restart_required"),e.componentInstance.message=this.$translate.instant("platform.version.restart_required",{serverVersion:this.$settings.uiVersion,uiVersion:T.serverTarget}),e.componentInstance.confirmButtonLabel=this.$translate.instant("menu.tooltip_restart"),e.componentInstance.faIconClass="fas fa-power-off orange-text";try{yield e.result,this.$router.navigate(["/restart"])}catch{}}})}static \u0275fac=function(o){return new(o||s)};static \u0275cmp=E({type:s,selectors:[["app-layout"]],decls:3,vars:3,consts:[[3,"initialIsExpanded"],[1,"content","px-3","p-md-4"]],template:function(o,t){o&1&&(p(0,"app-sidebar",0),i(1,"div",1),p(2,"router-outlet"),a()),o&2&&(g("initialIsExpanded",t.sidebarExpanded()),n(),P("sidebarExpanded",t.sidebarExpanded()))},dependencies:[te,W],styles:[".content[_ngcontent-%COMP%]{margin-left:60px;transition:.3s;height:100%}@media(max-width:767px){.content[_ngcontent-%COMP%]{margin-left:0;padding-top:85px!important}}@media(min-width:768px){.content[_ngcontent-%COMP%]{height:100%}}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return s})();export{Ge as LayoutComponent};