homebridge-config-ui-x 5.11.3-beta.5 → 5.12.0

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 (58) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/package.json +1 -1
  3. package/public/{chunk-TB6TK5G6.js → chunk-3MO7ICHF.js} +1 -1
  4. package/public/{chunk-G7VCQ3TG.js → chunk-3SKLXSFI.js} +1 -1
  5. package/public/{chunk-DCNSUIW7.js → chunk-56HOZZW6.js} +1 -1
  6. package/public/{chunk-772YVX5Y.js → chunk-6SUIFFAZ.js} +1 -1
  7. package/public/{chunk-FG374IPB.js → chunk-7DOT7I4R.js} +1 -1
  8. package/public/{chunk-UO2ZMGZV.js → chunk-7O4JAXGA.js} +1 -1
  9. package/public/{chunk-GQ3WUBAR.js → chunk-A5EOSR6S.js} +1 -1
  10. package/public/{chunk-GTPTOO5P.js → chunk-AIGU7Y6G.js} +1 -1
  11. package/public/{chunk-2VZ2GCND.js → chunk-AK4UTJX2.js} +1 -1
  12. package/public/{chunk-KCN76FJO.js → chunk-BAHYSQO5.js} +1 -1
  13. package/public/{chunk-5ZBV6GIQ.js → chunk-BJKMZCEQ.js} +1 -1
  14. package/public/{chunk-LGMU4LKT.js → chunk-BNHW6YHK.js} +1 -1
  15. package/public/{chunk-VH5H27H2.js → chunk-BNQ6BOCY.js} +1 -1
  16. package/public/{chunk-3E6N6AE4.js → chunk-BPQAV2XG.js} +1 -1
  17. package/public/{chunk-PANOIW5Y.js → chunk-CCKAIEVL.js} +1 -1
  18. package/public/{chunk-2QOONNBG.js → chunk-CJJAQM22.js} +1 -1
  19. package/public/{chunk-3PXXHWW2.js → chunk-D5Z6KR3J.js} +1 -1
  20. package/public/{chunk-AAXZUUFU.js → chunk-DRKO4DTB.js} +1 -1
  21. package/public/{chunk-STIDVYXA.js → chunk-EBANXPKG.js} +1 -1
  22. package/public/{chunk-QXZIEJ3B.js → chunk-GOLMQCNJ.js} +1 -1
  23. package/public/{chunk-2FPSO764.js → chunk-GPTVUF5H.js} +1 -1
  24. package/public/{chunk-FVHWD4KR.js → chunk-HRAMBCZG.js} +1 -1
  25. package/public/{chunk-R6YWI4B6.js → chunk-IQUWZEQX.js} +1 -1
  26. package/public/{chunk-SR7QWPJS.js → chunk-JE6FI7IW.js} +1 -1
  27. package/public/{chunk-RFXZLRVC.js → chunk-JI6C4NXH.js} +1 -1
  28. package/public/{chunk-NGL4ECSY.js → chunk-JJZ232C2.js} +1 -1
  29. package/public/{chunk-J46ZH4OW.js → chunk-KCF7ILFR.js} +1 -1
  30. package/public/{chunk-XYLLF34N.js → chunk-KEKO5EFZ.js} +1 -1
  31. package/public/{chunk-72WIF6RO.js → chunk-KK7LTOA5.js} +1 -1
  32. package/public/{chunk-GEMLIK55.js → chunk-L2Y7HWNA.js} +1 -1
  33. package/public/{chunk-FP47CYMN.js → chunk-LVPMGB27.js} +1 -1
  34. package/public/{chunk-3PRJ4YYI.js → chunk-ML7UNHWF.js} +1 -1
  35. package/public/{chunk-MEE3HK5H.js → chunk-MY5KM2NY.js} +1 -1
  36. package/public/{chunk-SJXDE2KC.js → chunk-N2EK3VS7.js} +1 -1
  37. package/public/{chunk-FJL4CXCM.js → chunk-NBTW66C4.js} +1 -1
  38. package/public/{chunk-2RWTYJFR.js → chunk-NLWU3URB.js} +1 -1
  39. package/public/{chunk-7AW3ETZH.js → chunk-NVN7DYND.js} +1 -1
  40. package/public/{chunk-U24C4LXA.js → chunk-OL7NNVJO.js} +1 -1
  41. package/public/{chunk-IXGFA465.js → chunk-PHO7WRKK.js} +1 -1
  42. package/public/{chunk-BHA6JXFI.js → chunk-PHWW4YF2.js} +1 -1
  43. package/public/{chunk-KDIN2UDH.js → chunk-QPGFU6MO.js} +1 -1
  44. package/public/{chunk-IFPZQ4UP.js → chunk-QTIB6YCV.js} +1 -1
  45. package/public/{chunk-P4T4JEXJ.js → chunk-RZVF77KW.js} +1 -1
  46. package/public/{chunk-RW3NXMBU.js → chunk-SNO4VAGT.js} +1 -1
  47. package/public/{chunk-NLP756ZB.js → chunk-UIZYHRTQ.js} +1 -1
  48. package/public/{chunk-N4GFR6FU.js → chunk-UO2L3YPH.js} +1 -1
  49. package/public/{chunk-HAS2I23V.js → chunk-XCOJYJKE.js} +1 -1
  50. package/public/{chunk-7U6LZHTZ.js → chunk-XKFVEK25.js} +1 -1
  51. package/public/{chunk-KW5SZ373.js → chunk-XPGD2BHY.js} +1 -1
  52. package/public/{chunk-DTQDCIY6.js → chunk-YBNR45V5.js} +1 -1
  53. package/public/chunk-YK5NYQW5.js +1 -0
  54. package/public/{chunk-JIAA6LDZ.js → chunk-ZDEL6332.js} +1 -1
  55. package/public/{chunk-7Y3AGCYD.js → chunk-ZYETXD5U.js} +1 -1
  56. package/public/index.html +1 -1
  57. package/public/{main-EDICWCO2.js → main-YYHATWMC.js} +1 -1
  58. package/public/chunk-6H7DHQM2.js +0 -1
package/CHANGELOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  All notable changes to `homebridge-config-ui-x` will be documented in this file. This project tries to adhere to [Semantic Versioning](http://semver.org/).
4
4
 
5
- ## v5.11.3 (Unreleased)
5
+ ## v5.12.0 (2025-12-15)
6
6
 
7
7
  ### UI Changes
8
8
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "homebridge-config-ui-x",
3
3
  "displayName": "Homebridge UI",
4
4
  "type": "module",
5
- "version": "5.11.3-beta.5",
5
+ "version": "5.12.0",
6
6
  "description": "A web based management, configuration and control platform for Homebridge.",
7
7
  "author": "oznu <dev@oz.nu>",
8
8
  "license": "MIT",
@@ -1 +1 @@
1
- import{h as i}from"./chunk-5ZHDYUXA.js";import{eb as r,ja as o}from"./chunk-ZRDN4L2J.js";var m=[{path:"",loadComponent:()=>import("./chunk-FP47CYMN.js").then(t=>t.SupportComponent)}],n=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[i.forChild(m),i]})}return t})();var s=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[n]})}return t})();export{s as SupportModule};
1
+ import{h as i}from"./chunk-5ZHDYUXA.js";import{eb as r,ja as o}from"./chunk-ZRDN4L2J.js";var m=[{path:"",loadComponent:()=>import("./chunk-LVPMGB27.js").then(t=>t.SupportComponent)}],n=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[i.forChild(m),i]})}return t})();var s=(()=>{class t{static \u0275fac=function(e){return new(e||t)};static \u0275mod=r({type:t});static \u0275inj=o({imports:[n]})}return t})();export{s as SupportModule};
@@ -1 +1 @@
1
- import{b as pe}from"./chunk-GEMLIK55.js";import{p as le}from"./chunk-6H7DHQM2.js";import{f as We,ia as fe,k as he,n as X,na as ue}from"./chunk-ZRDN4L2J.js";var d=Object.create(null);d.open="0";d.close="1";d.ping="2";d.pong="3";d.message="4";d.upgrade="5";d.noop="6";var S=Object.create(null);Object.keys(d).forEach(r=>{S[d[r]]=r});var O={type:"error",data:"parser error"};var ye=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ge=typeof ArrayBuffer=="function",_e=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,B=({type:r,data:e},t,s)=>ye&&e instanceof Blob?t?s(e):de(e,s):ge&&(e instanceof ArrayBuffer||_e(e))?t?s(e):de(new Blob([e]),s):s(d[r]+(e||"")),de=(r,e)=>{let t=new FileReader;return t.onload=function(){let s=t.result.split(",")[1];e("b"+(s||""))},t.readAsDataURL(r)};function me(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}var $;function be(r,e){if(ye&&r.data instanceof Blob)return r.data.arrayBuffer().then(me).then(e);if(ge&&(r.data instanceof ArrayBuffer||_e(r.data)))return e(me(r.data));B(r,!1,t=>{$||($=new TextEncoder),e($.encode(t))})}var we="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r<we.length;r++)N[we.charCodeAt(r)]=r;var ke=r=>{let e=r.length*.75,t=r.length,s,i=0,n,o,c,a;r[r.length-1]==="="&&(e--,r[r.length-2]==="="&&e--);let m=new ArrayBuffer(e),p=new Uint8Array(m);for(s=0;s<t;s+=4)n=N[r.charCodeAt(s)],o=N[r.charCodeAt(s+1)],c=N[r.charCodeAt(s+2)],a=N[r.charCodeAt(s+3)],p[i++]=n<<2|o>>4,p[i++]=(o&15)<<4|c>>2,p[i++]=(c&3)<<6|a&63;return m};var Ke=typeof ArrayBuffer=="function",L=(r,e)=>{if(typeof r!="string")return{type:"message",data:Ee(r,e)};let t=r.charAt(0);return t==="b"?{type:"message",data:Ye(r.substring(1),e)}:S[t]?r.length>1?{type:S[t],data:r.substring(1)}:{type:S[t]}:O},Ye=(r,e)=>{if(Ke){let t=ke(r);return Ee(t,e)}else return{base64:!0,data:r}},Ee=(r,e)=>{switch(e){case"blob":return r instanceof Blob?r:new Blob([r]);case"arraybuffer":default:return r instanceof ArrayBuffer?r:r.buffer}};var ve="",xe=(r,e)=>{let t=r.length,s=new Array(t),i=0;r.forEach((n,o)=>{B(n,!1,c=>{s[o]=c,++i===t&&e(s.join(ve))})})},Te=(r,e)=>{let t=r.split(ve),s=[];for(let i=0;i<t.length;i++){let n=L(t[i],e);if(s.push(n),n.type==="error")break}return s};function Ae(){return new TransformStream({transform(r,e){be(r,t=>{let s=t.length,i;if(s<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,s);else if(s<65536){i=new Uint8Array(3);let n=new DataView(i.buffer);n.setUint8(0,126),n.setUint16(1,s)}else{i=new Uint8Array(9);let n=new DataView(i.buffer);n.setUint8(0,127),n.setBigUint64(1,BigInt(s))}r.data&&typeof r.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(t)})}})}var Q;function U(r){return r.reduce((e,t)=>e+t.length,0)}function V(r,e){if(r[0].length===e)return r.shift();let t=new Uint8Array(e),s=0;for(let i=0;i<e;i++)t[i]=r[0][s++],s===r[0].length&&(r.shift(),s=0);return r.length&&s<r[0].length&&(r[0]=r[0].slice(s)),t}function Re(r,e){Q||(Q=new TextDecoder);let t=[],s=0,i=-1,n=!1;return new TransformStream({transform(o,c){for(t.push(o);;){if(s===0){if(U(t)<1)break;let a=V(t,1);n=(a[0]&128)===128,i=a[0]&127,i<126?s=3:i===126?s=1:s=2}else if(s===1){if(U(t)<2)break;let a=V(t,2);i=new DataView(a.buffer,a.byteOffset,a.length).getUint16(0),s=3}else if(s===2){if(U(t)<8)break;let a=V(t,8),m=new DataView(a.buffer,a.byteOffset,a.length),p=m.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(O);break}i=p*Math.pow(2,32)+m.getUint32(4),s=3}else{if(U(t)<i)break;let a=V(t,i);c.enqueue(L(n?a:Q.decode(a),e)),s=0}if(i===0||i>r){c.enqueue(O);break}}}})}var j=4;function f(r){if(r)return Je(r)}function Je(r){for(var e in f.prototype)r[e]=f.prototype[e];return r}f.prototype.on=f.prototype.addEventListener=function(r,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(e),this};f.prototype.once=function(r,e){function t(){this.off(r,t),e.apply(this,arguments)}return t.fn=e,this.on(r,t),this};f.prototype.off=f.prototype.removeListener=f.prototype.removeAllListeners=f.prototype.removeEventListener=function(r,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+r];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var s,i=0;i<t.length;i++)if(s=t[i],s===e||s.fn===e){t.splice(i,1);break}return t.length===0&&delete this._callbacks["$"+r],this};f.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+r],s=1;s<arguments.length;s++)e[s-1]=arguments[s];if(t){t=t.slice(0);for(var s=0,i=t.length;s<i;++s)t[s].apply(this,e)}return this};f.prototype.emitReserved=f.prototype.emit;f.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]};f.prototype.hasListeners=function(r){return!!this.listeners(r).length};var y=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),u=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Ce="arraybuffer";function M(r,...e){return e.reduce((t,s)=>(r.hasOwnProperty(s)&&(t[s]=r[s]),t),{})}var ze=u.setTimeout,Xe=u.clearTimeout;function g(r,e){e.useNativeTimers?(r.setTimeoutFn=ze.bind(u),r.clearTimeoutFn=Xe.bind(u)):(r.setTimeoutFn=u.setTimeout.bind(u),r.clearTimeoutFn=u.clearTimeout.bind(u))}var $e=1.33;function Se(r){return typeof r=="string"?Qe(r):Math.ceil((r.byteLength||r.size)*$e)}function Qe(r){let e=0,t=0;for(let s=0,i=r.length;s<i;s++)e=r.charCodeAt(s),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(s++,t+=4);return t}function H(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Oe(r){let e="";for(let t in r)r.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(r[t]));return e}function Be(r){let e={},t=r.split("&");for(let s=0,i=t.length;s<i;s++){let n=t[s].split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e}var W=class extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}},_=class extends f{constructor(e){super(),this.writable=!1,g(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new W(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let t=L(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){let t=Oe(e);return t.length?"?"+t:""}};var P=class extends _{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||t()})),this.writable||(s++,this.once("drain",function(){--s||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let t=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};Te(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,xe(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=H()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}};var Ne=!1;try{Ne=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var Le=Ne;function je(){}var G=class extends P{constructor(e){if(super(e),typeof location<"u"){let t=location.protocol==="https:",s=location.port;s||(s=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,t){let s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(i,n)=>{this.onError("xhr post error",i,n)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,s)=>{this.onError("xhr poll error",t,s)}),this.pollXhr=e}},K=(()=>{class r extends f{constructor(t,s,i){super(),this.createRequest=t,g(this,i),this._opts=i,this._method=i.method||"GET",this._uri=s,this._data=i.data!==void 0?i.data:null,this._create()}_create(){var t;let s=M(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;let i=this._xhr=this.createRequest(s);try{i.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&i.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{i.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(i.timeout=this._opts.requestTimeout),i.onreadystatechange=()=>{var n;i.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(i.getResponseHeader("set-cookie"))),i.readyState===4&&(i.status===200||i.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof i.status=="number"?i.status:0)},0))},i.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=r.requestsCount++,r.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=je,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete r.requests[this._index],this._xhr=null}}_onLoad(){let t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}return r.requestsCount=0,r.requests={},r})();if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Pe);else if(typeof addEventListener=="function"){let r="onpagehide"in u?"pagehide":"unload";addEventListener(r,Pe,!1)}}function Pe(){for(let r in K.requests)K.requests.hasOwnProperty(r)&&K.requests[r].abort()}var Ge=(function(){let r=qe({xdomain:!1});return r&&r.responseType!==null})(),w=class extends G{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=Ge&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new K(qe,this.uri(),e)}};function qe(r){let e=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Le))return new XMLHttpRequest}catch{}if(!e)try{return new u[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var De=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",ee=class extends _{get name(){return"websocket"}doOpen(){let e=this.uri(),t=this.opts.protocols,s=De?{}:M(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,s)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let s=e[t],i=t===e.length-1;B(s,this.supportsBinary,n=>{try{this.doWrite(s,n)}catch{}i&&y(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=H()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},Z=u.WebSocket||u.MozWebSocket,k=class extends ee{createSocket(e,t,s){return De?new Z(e,t,s):t?new Z(e,t):new Z(e)}doWrite(e,t){this.ws.send(t)}};var v=class extends _{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=Re(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),i=Ae();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();let n=()=>{s.read().then(({done:c,value:a})=>{c||(this.onPacket(a),n())}).catch(c=>{})};n();let o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let s=e[t],i=t===e.length-1;this._writer.write(s).then(()=>{i&&y(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var te={websocket:k,webtransport:v,polling:w};var Ze=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,et=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function x(r){if(r.length>8e3)throw"URI too long";let e=r,t=r.indexOf("["),s=r.indexOf("]");t!=-1&&s!=-1&&(r=r.substring(0,t)+r.substring(t,s).replace(/:/g,";")+r.substring(s,r.length));let i=Ze.exec(r||""),n={},o=14;for(;o--;)n[et[o]]=i[o]||"";return t!=-1&&s!=-1&&(n.source=e,n.host=n.host.substring(1,n.host.length-1).replace(/;/g,":"),n.authority=n.authority.replace("[","").replace("]","").replace(/;/g,":"),n.ipv6uri=!0),n.pathNames=tt(n,n.path),n.queryKey=st(n,n.query),n}function tt(r,e){let t=/\/{2,9}/g,s=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function st(r,e){let t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,i,n){i&&(t[i]=n)}),t}var se=typeof addEventListener=="function"&&typeof removeEventListener=="function",Y=[];se&&addEventListener("offline",()=>{Y.forEach(r=>r())},!1);var J=(()=>{class r extends f{constructor(t,s){if(super(),this.binaryType=Ce,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){let i=x(t);s.hostname=i.host,s.secure=i.protocol==="https"||i.protocol==="wss",s.port=i.port,i.query&&(s.query=i.query)}else s.host&&(s.hostname=x(s.host).host);g(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(i=>{let n=i.prototype.name;this.transports.push(n),this._transportsByName[n]=i}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Be(this.opts.query)),se&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Y.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let s=Object.assign({},this.opts.query);s.EIO=j,s.transport=t,this.id&&(s.sid=this.id);let i=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](i)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let t=this.opts.rememberUpgrade&&r.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",r.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let i=0;i<this.writeBuffer.length;i++){let n=this.writeBuffer[i].data;if(n&&(s+=Se(n)),i>0&&s>this._maxPayload)return this.writeBuffer.slice(0,i);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,y(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,i){return this._sendPacket("message",t,s,i),this}send(t,s,i){return this._sendPacket("message",t,s,i),this}_sendPacket(t,s,i,n){if(typeof s=="function"&&(n=s,s=void 0),typeof i=="function"&&(n=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;let o={type:t,data:s,options:i};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}close(){let t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},i=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}_onError(t){if(r.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),se&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let i=Y.indexOf(this._offlineEventListener);i!==-1&&Y.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}return r.protocol=j,r})(),z=class extends J{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),s=!1;J.priorWebsocketSuccess=!1;let i=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",b=>{if(!s)if(b.type==="pong"&&b.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;J.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(p(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{let C=new Error("probe error");C.transport=t.name,this.emitReserved("upgradeError",C)}}))};function n(){s||(s=!0,p(),t.close(),t=null)}let o=b=>{let C=new Error("probe error: "+b);C.transport=t.name,n(),this.emitReserved("upgradeError",C)};function c(){o("transport closed")}function a(){o("socket closed")}function m(b){t&&b.name!==t.name&&n()}let p=()=>{t.removeListener("open",i),t.removeListener("error",o),t.removeListener("close",c),this.off("close",a),this.off("upgrading",m)};t.once("open",i),t.once("error",o),t.once("close",c),this.once("close",a),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let s=0;s<e.length;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}},T=class extends z{constructor(e,t={}){let s=typeof e=="object"?e:t;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(i=>te[i]).filter(i=>!!i)),super(e,s)}};var ds=T.protocol;function Fe(r,e="",t){let s=r;t=t||typeof location<"u"&&location,r==null&&(r=t.protocol+"//"+t.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=t.protocol+r:r=t.host+r),/^(https?|wss?):\/\//.test(r)||(typeof t<"u"?r=t.protocol+"//"+r:r="https://"+r),s=x(r)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";let n=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+n+":"+s.port+e,s.href=s.protocol+"://"+n+(t&&t.port===s.port?"":":"+s.port),s}var ae={};We(ae,{Decoder:()=>oe,Encoder:()=>ne,PacketType:()=>h,protocol:()=>He});var it=typeof ArrayBuffer=="function",nt=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,Ie=Object.prototype.toString,ot=typeof Blob=="function"||typeof Blob<"u"&&Ie.call(Blob)==="[object BlobConstructor]",ct=typeof File=="function"||typeof File<"u"&&Ie.call(File)==="[object FileConstructor]";function D(r){return it&&(r instanceof ArrayBuffer||nt(r))||ot&&r instanceof Blob||ct&&r instanceof File}function q(r,e){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let t=0,s=r.length;t<s;t++)if(q(r[t]))return!0;return!1}if(D(r))return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return q(r.toJSON(),!0);for(let t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&q(r[t]))return!0;return!1}function Ue(r){let e=[],t=r.data,s=r;return s.data=re(t,e),s.attachments=e.length,{packet:s,buffers:e}}function re(r,e){if(!r)return r;if(D(r)){let t={_placeholder:!0,num:e.length};return e.push(r),t}else if(Array.isArray(r)){let t=new Array(r.length);for(let s=0;s<r.length;s++)t[s]=re(r[s],e);return t}else if(typeof r=="object"&&!(r instanceof Date)){let t={};for(let s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=re(r[s],e));return t}return r}function Ve(r,e){return r.data=ie(r.data,e),delete r.attachments,r}function ie(r,e){if(!r)return r;if(r&&r._placeholder===!0){if(typeof r.num=="number"&&r.num>=0&&r.num<e.length)return e[r.num];throw new Error("illegal attachments")}else if(Array.isArray(r))for(let t=0;t<r.length;t++)r[t]=ie(r[t],e);else if(typeof r=="object")for(let t in r)Object.prototype.hasOwnProperty.call(r,t)&&(r[t]=ie(r[t],e));return r}var at=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],He=5,h=(function(r){return r[r.CONNECT=0]="CONNECT",r[r.DISCONNECT=1]="DISCONNECT",r[r.EVENT=2]="EVENT",r[r.ACK=3]="ACK",r[r.CONNECT_ERROR=4]="CONNECT_ERROR",r[r.BINARY_EVENT=5]="BINARY_EVENT",r[r.BINARY_ACK=6]="BINARY_ACK",r})(h||{}),ne=class{constructor(e){this.replacer=e}encode(e){return(e.type===h.EVENT||e.type===h.ACK)&&q(e)?this.encodeAsBinary({type:e.type===h.EVENT?h.BINARY_EVENT:h.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===h.BINARY_EVENT||e.type===h.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=Ue(e),s=this.encodeAsString(t.packet),i=t.buffers;return i.unshift(s),i}};function Me(r){return Object.prototype.toString.call(r)==="[object Object]"}var oe=class r extends f{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);let s=t.type===h.BINARY_EVENT;s||t.type===h.BINARY_ACK?(t.type=s?h.EVENT:h.ACK,this.reconstructor=new ce(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(D(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0,s={type:Number(e.charAt(0))};if(h[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===h.BINARY_EVENT||s.type===h.BINARY_ACK){let n=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);let o=e.substring(n,t);if(o!=Number(o)||e.charAt(t)!=="-")throw new Error("Illegal attachments");s.attachments=Number(o)}if(e.charAt(t+1)==="/"){let n=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););s.nsp=e.substring(n,t)}else s.nsp="/";let i=e.charAt(t+1);if(i!==""&&Number(i)==i){let n=t+1;for(;++t;){let o=e.charAt(t);if(o==null||Number(o)!=o){--t;break}if(t===e.length)break}s.id=Number(e.substring(n,t+1))}if(e.charAt(++t)){let n=this.tryParse(e.substr(t));if(r.isPayloadValid(s.type,n))s.data=n;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case h.CONNECT:return Me(t);case h.DISCONNECT:return t===void 0;case h.CONNECT_ERROR:return typeof t=="string"||Me(t);case h.EVENT:case h.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&at.indexOf(t[0])===-1);case h.ACK:case h.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},ce=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let t=Ve(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function l(r,e,t){return r.on(e,t),function(){r.off(e,t)}}var ht=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),A=class extends f{constructor(e,t,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[l(e,"open",this.onopen.bind(this)),l(e,"packet",this.onpacket.bind(this)),l(e,"error",this.onerror.bind(this)),l(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var s,i,n;if(ht.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let o={type:h.EVENT,data:t};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){let p=this.ids++,b=t.pop();this._registerAckCallback(p,b),o.id=p}let c=(i=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||i===void 0?void 0:i.writable,a=this.connected&&!(!((n=this.io.engine)===null||n===void 0)&&n._hasPingExpired());return this.flags.volatile&&!c||(a?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(e,t){var s;let i=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(i===void 0){this.acks[e]=t;return}let n=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===e&&this.sendBuffer.splice(c,1);t.call(this,new Error("operation has timed out"))},i),o=(...c)=>{this.io.clearTimeoutFn(n),t.apply(this,c)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...t){return new Promise((s,i)=>{let n=(o,c)=>o?i(o):s(c);n.withError=!0,t.push(n),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());let s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...n)=>s!==this._queue[0]?void 0:(i!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(i)):(this._queue.shift(),t&&t(null,...n)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:h.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(s=>String(s.id)===e)){let s=this.acks[e];delete this.acks[e],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case h.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case h.EVENT:case h.BINARY_EVENT:this.onevent(e);break;case h.ACK:case h.BINARY_ACK:this.onack(e);break;case h.DISCONNECT:this.ondisconnect();break;case h.CONNECT_ERROR:this.destroy();let s=new Error(e.data.message);s.data=e.data.data,this.emitReserved("connect_error",s);break}}onevent(e){let t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let s of t)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,s=!1;return function(...i){s||(s=!0,t.packet({type:h.ACK,id:e,data:i}))}}onack(e){let t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:h.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let s of t)s.apply(this,e.data)}}};function E(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}E.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*r);r=(Math.floor(e*10)&1)==0?r-t:r+t}return Math.min(r,this.max)|0};E.prototype.reset=function(){this.attempts=0};E.prototype.setMin=function(r){this.ms=r};E.prototype.setMax=function(r){this.max=r};E.prototype.setJitter=function(r){this.jitter=r};var R=class extends f{constructor(e,t){var s;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,g(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((s=t.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new E({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;let i=t.parser||ae;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new T(this.uri,this.opts);let t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;let i=l(t,"open",function(){s.onopen(),e&&e()}),n=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),e?e(c):this.maybeReconnectOnOpen()},o=l(t,"error",n);if(this._timeout!==!1){let c=this._timeout,a=this.setTimeoutFn(()=>{i(),n(new Error("timeout")),t.close()},c);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}return this.subs.push(i),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(l(e,"ping",this.onping.bind(this)),l(e,"data",this.ondata.bind(this)),l(e,"error",this.onerror.bind(this)),l(e,"close",this.onclose.bind(this)),l(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){y(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new A(this,e,t),this.nsps[e]=s),s}_destroy(e){let t=Object.keys(this.nsps);for(let s of t)if(this.nsps[s].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var F={};function I(r,e){typeof r=="object"&&(e=r,r=void 0),e=e||{};let t=Fe(r,e.path||"/socket.io"),s=t.source,i=t.id,n=t.path,o=F[i]&&n in F[i].nsps,c=e.forceNew||e["force new connection"]||e.multiplex===!1||o,a;return c?a=new R(s,e):(F[i]||(F[i]=new R(s,e)),a=F[i]),t.query&&!e.query&&(e.query=t.queryKey),a.socket(t.path,e)}Object.assign(I,{Manager:R,Socket:A,io:I,connect:I});var cr=(()=>{class r{$auth=ue(pe);namespaceConnectionCache={};connectToNamespace(t){if(this.namespaceConnectionCache[t]){let s=this.namespaceConnectionCache[t];return s.connected=new X,setTimeout(()=>{s.socket.connected&&s.connected.next(void 0)}),s.socket.on("connect",()=>{s.connected.next(void 0)}),s.end=()=>{s.socket.emit("end"),s.socket.removeAllListeners(),s.connected.complete()},this.namespaceConnectionCache[t]}else{let s=this.establishConnectionToNamespace(t);return s.connected=new X,s.socket.on("connect",()=>{s.connected.next(void 0)}),s.end=()=>{s.socket.emit("end"),s.socket.removeAllListeners(),s.connected.complete()},this.namespaceConnectionCache[t]=s,s}}getExistingNamespace(t){return this.namespaceConnectionCache[t]}establishConnectionToNamespace(t){let s=I(`${le.api.socket}/${t}`,{query:{token:this.$auth.token}});return{socket:s,request:(n,o)=>new he(c=>{s.emit(n,o,a=>{typeof a=="object"&&a.error?c.error(a):c.next(a),c.complete()})})}}static \u0275fac=function(s){return new(s||r)};static \u0275prov=fe({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{cr as a};
1
+ import{b as pe}from"./chunk-L2Y7HWNA.js";import{p as le}from"./chunk-YK5NYQW5.js";import{f as We,ia as fe,k as he,n as X,na as ue}from"./chunk-ZRDN4L2J.js";var d=Object.create(null);d.open="0";d.close="1";d.ping="2";d.pong="3";d.message="4";d.upgrade="5";d.noop="6";var S=Object.create(null);Object.keys(d).forEach(r=>{S[d[r]]=r});var O={type:"error",data:"parser error"};var ye=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ge=typeof ArrayBuffer=="function",_e=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r&&r.buffer instanceof ArrayBuffer,B=({type:r,data:e},t,s)=>ye&&e instanceof Blob?t?s(e):de(e,s):ge&&(e instanceof ArrayBuffer||_e(e))?t?s(e):de(new Blob([e]),s):s(d[r]+(e||"")),de=(r,e)=>{let t=new FileReader;return t.onload=function(){let s=t.result.split(",")[1];e("b"+(s||""))},t.readAsDataURL(r)};function me(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):new Uint8Array(r.buffer,r.byteOffset,r.byteLength)}var $;function be(r,e){if(ye&&r.data instanceof Blob)return r.data.arrayBuffer().then(me).then(e);if(ge&&(r.data instanceof ArrayBuffer||_e(r.data)))return e(me(r.data));B(r,!1,t=>{$||($=new TextEncoder),e($.encode(t))})}var we="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",N=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let r=0;r<we.length;r++)N[we.charCodeAt(r)]=r;var ke=r=>{let e=r.length*.75,t=r.length,s,i=0,n,o,c,a;r[r.length-1]==="="&&(e--,r[r.length-2]==="="&&e--);let m=new ArrayBuffer(e),p=new Uint8Array(m);for(s=0;s<t;s+=4)n=N[r.charCodeAt(s)],o=N[r.charCodeAt(s+1)],c=N[r.charCodeAt(s+2)],a=N[r.charCodeAt(s+3)],p[i++]=n<<2|o>>4,p[i++]=(o&15)<<4|c>>2,p[i++]=(c&3)<<6|a&63;return m};var Ke=typeof ArrayBuffer=="function",L=(r,e)=>{if(typeof r!="string")return{type:"message",data:Ee(r,e)};let t=r.charAt(0);return t==="b"?{type:"message",data:Ye(r.substring(1),e)}:S[t]?r.length>1?{type:S[t],data:r.substring(1)}:{type:S[t]}:O},Ye=(r,e)=>{if(Ke){let t=ke(r);return Ee(t,e)}else return{base64:!0,data:r}},Ee=(r,e)=>{switch(e){case"blob":return r instanceof Blob?r:new Blob([r]);case"arraybuffer":default:return r instanceof ArrayBuffer?r:r.buffer}};var ve="",xe=(r,e)=>{let t=r.length,s=new Array(t),i=0;r.forEach((n,o)=>{B(n,!1,c=>{s[o]=c,++i===t&&e(s.join(ve))})})},Te=(r,e)=>{let t=r.split(ve),s=[];for(let i=0;i<t.length;i++){let n=L(t[i],e);if(s.push(n),n.type==="error")break}return s};function Ae(){return new TransformStream({transform(r,e){be(r,t=>{let s=t.length,i;if(s<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,s);else if(s<65536){i=new Uint8Array(3);let n=new DataView(i.buffer);n.setUint8(0,126),n.setUint16(1,s)}else{i=new Uint8Array(9);let n=new DataView(i.buffer);n.setUint8(0,127),n.setBigUint64(1,BigInt(s))}r.data&&typeof r.data!="string"&&(i[0]|=128),e.enqueue(i),e.enqueue(t)})}})}var Q;function U(r){return r.reduce((e,t)=>e+t.length,0)}function V(r,e){if(r[0].length===e)return r.shift();let t=new Uint8Array(e),s=0;for(let i=0;i<e;i++)t[i]=r[0][s++],s===r[0].length&&(r.shift(),s=0);return r.length&&s<r[0].length&&(r[0]=r[0].slice(s)),t}function Re(r,e){Q||(Q=new TextDecoder);let t=[],s=0,i=-1,n=!1;return new TransformStream({transform(o,c){for(t.push(o);;){if(s===0){if(U(t)<1)break;let a=V(t,1);n=(a[0]&128)===128,i=a[0]&127,i<126?s=3:i===126?s=1:s=2}else if(s===1){if(U(t)<2)break;let a=V(t,2);i=new DataView(a.buffer,a.byteOffset,a.length).getUint16(0),s=3}else if(s===2){if(U(t)<8)break;let a=V(t,8),m=new DataView(a.buffer,a.byteOffset,a.length),p=m.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(O);break}i=p*Math.pow(2,32)+m.getUint32(4),s=3}else{if(U(t)<i)break;let a=V(t,i);c.enqueue(L(n?a:Q.decode(a),e)),s=0}if(i===0||i>r){c.enqueue(O);break}}}})}var j=4;function f(r){if(r)return Je(r)}function Je(r){for(var e in f.prototype)r[e]=f.prototype[e];return r}f.prototype.on=f.prototype.addEventListener=function(r,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+r]=this._callbacks["$"+r]||[]).push(e),this};f.prototype.once=function(r,e){function t(){this.off(r,t),e.apply(this,arguments)}return t.fn=e,this.on(r,t),this};f.prototype.off=f.prototype.removeListener=f.prototype.removeAllListeners=f.prototype.removeEventListener=function(r,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+r];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+r],this;for(var s,i=0;i<t.length;i++)if(s=t[i],s===e||s.fn===e){t.splice(i,1);break}return t.length===0&&delete this._callbacks["$"+r],this};f.prototype.emit=function(r){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+r],s=1;s<arguments.length;s++)e[s-1]=arguments[s];if(t){t=t.slice(0);for(var s=0,i=t.length;s<i;++s)t[s].apply(this,e)}return this};f.prototype.emitReserved=f.prototype.emit;f.prototype.listeners=function(r){return this._callbacks=this._callbacks||{},this._callbacks["$"+r]||[]};f.prototype.hasListeners=function(r){return!!this.listeners(r).length};var y=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),u=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Ce="arraybuffer";function M(r,...e){return e.reduce((t,s)=>(r.hasOwnProperty(s)&&(t[s]=r[s]),t),{})}var ze=u.setTimeout,Xe=u.clearTimeout;function g(r,e){e.useNativeTimers?(r.setTimeoutFn=ze.bind(u),r.clearTimeoutFn=Xe.bind(u)):(r.setTimeoutFn=u.setTimeout.bind(u),r.clearTimeoutFn=u.clearTimeout.bind(u))}var $e=1.33;function Se(r){return typeof r=="string"?Qe(r):Math.ceil((r.byteLength||r.size)*$e)}function Qe(r){let e=0,t=0;for(let s=0,i=r.length;s<i;s++)e=r.charCodeAt(s),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(s++,t+=4);return t}function H(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Oe(r){let e="";for(let t in r)r.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(r[t]));return e}function Be(r){let e={},t=r.split("&");for(let s=0,i=t.length;s<i;s++){let n=t[s].split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e}var W=class extends Error{constructor(e,t,s){super(e),this.description=t,this.context=s,this.type="TransportError"}},_=class extends f{constructor(e){super(),this.writable=!1,g(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,s){return super.emitReserved("error",new W(e,t,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let t=L(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){let t=Oe(e);return t.length?"?"+t:""}};var P=class extends _{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let t=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||t()})),this.writable||(s++,this.once("drain",function(){--s||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let t=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};Te(e,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,xe(e,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=H()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}};var Ne=!1;try{Ne=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var Le=Ne;function je(){}var G=class extends P{constructor(e){if(super(e),typeof location<"u"){let t=location.protocol==="https:",s=location.port;s||(s=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||s!==e.port}}doWrite(e,t){let s=this.request({method:"POST",data:e});s.on("success",t),s.on("error",(i,n)=>{this.onError("xhr post error",i,n)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,s)=>{this.onError("xhr poll error",t,s)}),this.pollXhr=e}},K=(()=>{class r extends f{constructor(t,s,i){super(),this.createRequest=t,g(this,i),this._opts=i,this._method=i.method||"GET",this._uri=s,this._data=i.data!==void 0?i.data:null,this._create()}_create(){var t;let s=M(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");s.xdomain=!!this._opts.xd;let i=this._xhr=this.createRequest(s);try{i.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&i.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{i.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(i.timeout=this._opts.requestTimeout),i.onreadystatechange=()=>{var n;i.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(i.getResponseHeader("set-cookie"))),i.readyState===4&&(i.status===200||i.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof i.status=="number"?i.status:0)},0))},i.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=r.requestsCount++,r.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=je,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete r.requests[this._index],this._xhr=null}}_onLoad(){let t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}return r.requestsCount=0,r.requests={},r})();if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Pe);else if(typeof addEventListener=="function"){let r="onpagehide"in u?"pagehide":"unload";addEventListener(r,Pe,!1)}}function Pe(){for(let r in K.requests)K.requests.hasOwnProperty(r)&&K.requests[r].abort()}var Ge=(function(){let r=qe({xdomain:!1});return r&&r.responseType!==null})(),w=class extends G{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=Ge&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new K(qe,this.uri(),e)}};function qe(r){let e=r.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Le))return new XMLHttpRequest}catch{}if(!e)try{return new u[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var De=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",ee=class extends _{get name(){return"websocket"}doOpen(){let e=this.uri(),t=this.opts.protocols,s=De?{}:M(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,s)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let s=e[t],i=t===e.length-1;B(s,this.supportsBinary,n=>{try{this.doWrite(s,n)}catch{}i&&y(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=H()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},Z=u.WebSocket||u.MozWebSocket,k=class extends ee{createSocket(e,t,s){return De?new Z(e,t,s):t?new Z(e,t):new Z(e)}doWrite(e,t){this.ws.send(t)}};var v=class extends _{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=Re(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=e.readable.pipeThrough(t).getReader(),i=Ae();i.readable.pipeTo(e.writable),this._writer=i.writable.getWriter();let n=()=>{s.read().then(({done:c,value:a})=>{c||(this.onPacket(a),n())}).catch(c=>{})};n();let o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let s=e[t],i=t===e.length-1;this._writer.write(s).then(()=>{i&&y(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var te={websocket:k,webtransport:v,polling:w};var Ze=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,et=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function x(r){if(r.length>8e3)throw"URI too long";let e=r,t=r.indexOf("["),s=r.indexOf("]");t!=-1&&s!=-1&&(r=r.substring(0,t)+r.substring(t,s).replace(/:/g,";")+r.substring(s,r.length));let i=Ze.exec(r||""),n={},o=14;for(;o--;)n[et[o]]=i[o]||"";return t!=-1&&s!=-1&&(n.source=e,n.host=n.host.substring(1,n.host.length-1).replace(/;/g,":"),n.authority=n.authority.replace("[","").replace("]","").replace(/;/g,":"),n.ipv6uri=!0),n.pathNames=tt(n,n.path),n.queryKey=st(n,n.query),n}function tt(r,e){let t=/\/{2,9}/g,s=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&s.splice(0,1),e.slice(-1)=="/"&&s.splice(s.length-1,1),s}function st(r,e){let t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,i,n){i&&(t[i]=n)}),t}var se=typeof addEventListener=="function"&&typeof removeEventListener=="function",Y=[];se&&addEventListener("offline",()=>{Y.forEach(r=>r())},!1);var J=(()=>{class r extends f{constructor(t,s){if(super(),this.binaryType=Ce,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(s=t,t=null),t){let i=x(t);s.hostname=i.host,s.secure=i.protocol==="https"||i.protocol==="wss",s.port=i.port,i.query&&(s.query=i.query)}else s.host&&(s.hostname=x(s.host).host);g(this,s),this.secure=s.secure!=null?s.secure:typeof location<"u"&&location.protocol==="https:",s.hostname&&!s.port&&(s.port=this.secure?"443":"80"),this.hostname=s.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=s.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},s.transports.forEach(i=>{let n=i.prototype.name;this.transports.push(n),this._transportsByName[n]=i}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},s),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Be(this.opts.query)),se&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Y.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let s=Object.assign({},this.opts.query);s.EIO=j,s.transport=t,this.id&&(s.sid=this.id);let i=Object.assign({},this.opts,{query:s,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](i)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let t=this.opts.rememberUpgrade&&r.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let s=this.createTransport(t);s.open(),this.setTransport(s)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",s=>this._onClose("transport close",s))}onOpen(){this.readyState="open",r.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let s=new Error("server error");s.code=t.data,this._onError(s);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let s=1;for(let i=0;i<this.writeBuffer.length;i++){let n=this.writeBuffer[i].data;if(n&&(s+=Se(n)),i>0&&s>this._maxPayload)return this.writeBuffer.slice(0,i);s+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,y(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,s,i){return this._sendPacket("message",t,s,i),this}send(t,s,i){return this._sendPacket("message",t,s,i),this}_sendPacket(t,s,i,n){if(typeof s=="function"&&(n=s,s=void 0),typeof i=="function"&&(n=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;let o={type:t,data:s,options:i};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}close(){let t=()=>{this._onClose("forced close"),this.transport.close()},s=()=>{this.off("upgrade",s),this.off("upgradeError",s),t()},i=()=>{this.once("upgrade",s),this.once("upgradeError",s)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}_onError(t){if(r.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,s){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),se&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let i=Y.indexOf(this._offlineEventListener);i!==-1&&Y.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,s),this.writeBuffer=[],this._prevBufferLen=0}}}return r.protocol=j,r})(),z=class extends J{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),s=!1;J.priorWebsocketSuccess=!1;let i=()=>{s||(t.send([{type:"ping",data:"probe"}]),t.once("packet",b=>{if(!s)if(b.type==="pong"&&b.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;J.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(p(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{let C=new Error("probe error");C.transport=t.name,this.emitReserved("upgradeError",C)}}))};function n(){s||(s=!0,p(),t.close(),t=null)}let o=b=>{let C=new Error("probe error: "+b);C.transport=t.name,n(),this.emitReserved("upgradeError",C)};function c(){o("transport closed")}function a(){o("socket closed")}function m(b){t&&b.name!==t.name&&n()}let p=()=>{t.removeListener("open",i),t.removeListener("error",o),t.removeListener("close",c),this.off("close",a),this.off("upgrading",m)};t.once("open",i),t.once("error",o),t.once("close",c),this.once("close",a),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{s||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let s=0;s<e.length;s++)~this.transports.indexOf(e[s])&&t.push(e[s]);return t}},T=class extends z{constructor(e,t={}){let s=typeof e=="object"?e:t;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(i=>te[i]).filter(i=>!!i)),super(e,s)}};var ds=T.protocol;function Fe(r,e="",t){let s=r;t=t||typeof location<"u"&&location,r==null&&(r=t.protocol+"//"+t.host),typeof r=="string"&&(r.charAt(0)==="/"&&(r.charAt(1)==="/"?r=t.protocol+r:r=t.host+r),/^(https?|wss?):\/\//.test(r)||(typeof t<"u"?r=t.protocol+"//"+r:r="https://"+r),s=x(r)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";let n=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+n+":"+s.port+e,s.href=s.protocol+"://"+n+(t&&t.port===s.port?"":":"+s.port),s}var ae={};We(ae,{Decoder:()=>oe,Encoder:()=>ne,PacketType:()=>h,protocol:()=>He});var it=typeof ArrayBuffer=="function",nt=r=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(r):r.buffer instanceof ArrayBuffer,Ie=Object.prototype.toString,ot=typeof Blob=="function"||typeof Blob<"u"&&Ie.call(Blob)==="[object BlobConstructor]",ct=typeof File=="function"||typeof File<"u"&&Ie.call(File)==="[object FileConstructor]";function D(r){return it&&(r instanceof ArrayBuffer||nt(r))||ot&&r instanceof Blob||ct&&r instanceof File}function q(r,e){if(!r||typeof r!="object")return!1;if(Array.isArray(r)){for(let t=0,s=r.length;t<s;t++)if(q(r[t]))return!0;return!1}if(D(r))return!0;if(r.toJSON&&typeof r.toJSON=="function"&&arguments.length===1)return q(r.toJSON(),!0);for(let t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&q(r[t]))return!0;return!1}function Ue(r){let e=[],t=r.data,s=r;return s.data=re(t,e),s.attachments=e.length,{packet:s,buffers:e}}function re(r,e){if(!r)return r;if(D(r)){let t={_placeholder:!0,num:e.length};return e.push(r),t}else if(Array.isArray(r)){let t=new Array(r.length);for(let s=0;s<r.length;s++)t[s]=re(r[s],e);return t}else if(typeof r=="object"&&!(r instanceof Date)){let t={};for(let s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=re(r[s],e));return t}return r}function Ve(r,e){return r.data=ie(r.data,e),delete r.attachments,r}function ie(r,e){if(!r)return r;if(r&&r._placeholder===!0){if(typeof r.num=="number"&&r.num>=0&&r.num<e.length)return e[r.num];throw new Error("illegal attachments")}else if(Array.isArray(r))for(let t=0;t<r.length;t++)r[t]=ie(r[t],e);else if(typeof r=="object")for(let t in r)Object.prototype.hasOwnProperty.call(r,t)&&(r[t]=ie(r[t],e));return r}var at=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],He=5,h=(function(r){return r[r.CONNECT=0]="CONNECT",r[r.DISCONNECT=1]="DISCONNECT",r[r.EVENT=2]="EVENT",r[r.ACK=3]="ACK",r[r.CONNECT_ERROR=4]="CONNECT_ERROR",r[r.BINARY_EVENT=5]="BINARY_EVENT",r[r.BINARY_ACK=6]="BINARY_ACK",r})(h||{}),ne=class{constructor(e){this.replacer=e}encode(e){return(e.type===h.EVENT||e.type===h.ACK)&&q(e)?this.encodeAsBinary({type:e.type===h.EVENT?h.BINARY_EVENT:h.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===h.BINARY_EVENT||e.type===h.BINARY_ACK)&&(t+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(t+=e.nsp+","),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=Ue(e),s=this.encodeAsString(t.packet),i=t.buffers;return i.unshift(s),i}};function Me(r){return Object.prototype.toString.call(r)==="[object Object]"}var oe=class r extends f{constructor(e){super(),this.reviver=e}add(e){let t;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(e);let s=t.type===h.BINARY_EVENT;s||t.type===h.BINARY_ACK?(t.type=s?h.EVENT:h.ACK,this.reconstructor=new ce(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(D(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let t=0,s={type:Number(e.charAt(0))};if(h[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===h.BINARY_EVENT||s.type===h.BINARY_ACK){let n=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);let o=e.substring(n,t);if(o!=Number(o)||e.charAt(t)!=="-")throw new Error("Illegal attachments");s.attachments=Number(o)}if(e.charAt(t+1)==="/"){let n=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););s.nsp=e.substring(n,t)}else s.nsp="/";let i=e.charAt(t+1);if(i!==""&&Number(i)==i){let n=t+1;for(;++t;){let o=e.charAt(t);if(o==null||Number(o)!=o){--t;break}if(t===e.length)break}s.id=Number(e.substring(n,t+1))}if(e.charAt(++t)){let n=this.tryParse(e.substr(t));if(r.isPayloadValid(s.type,n))s.data=n;else throw new Error("invalid payload")}return s}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case h.CONNECT:return Me(t);case h.DISCONNECT:return t===void 0;case h.CONNECT_ERROR:return typeof t=="string"||Me(t);case h.EVENT:case h.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&at.indexOf(t[0])===-1);case h.ACK:case h.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},ce=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let t=Ve(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function l(r,e,t){return r.on(e,t),function(){r.off(e,t)}}var ht=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),A=class extends f{constructor(e,t,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[l(e,"open",this.onopen.bind(this)),l(e,"packet",this.onpacket.bind(this)),l(e,"error",this.onerror.bind(this)),l(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...t){var s,i,n;if(ht.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let o={type:h.EVENT,data:t};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){let p=this.ids++,b=t.pop();this._registerAckCallback(p,b),o.id=p}let c=(i=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||i===void 0?void 0:i.writable,a=this.connected&&!(!((n=this.io.engine)===null||n===void 0)&&n._hasPingExpired());return this.flags.volatile&&!c||(a?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(e,t){var s;let i=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(i===void 0){this.acks[e]=t;return}let n=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===e&&this.sendBuffer.splice(c,1);t.call(this,new Error("operation has timed out"))},i),o=(...c)=>{this.io.clearTimeoutFn(n),t.apply(this,c)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...t){return new Promise((s,i)=>{let n=(o,c)=>o?i(o):s(c);n.withError=!0,t.push(n),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());let s={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((i,...n)=>s!==this._queue[0]?void 0:(i!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(i)):(this._queue.shift(),t&&t(null,...n)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:h.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(s=>String(s.id)===e)){let s=this.acks[e];delete this.acks[e],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case h.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case h.EVENT:case h.BINARY_EVENT:this.onevent(e);break;case h.ACK:case h.BINARY_ACK:this.onack(e);break;case h.DISCONNECT:this.ondisconnect();break;case h.CONNECT_ERROR:this.destroy();let s=new Error(e.data.message);s.data=e.data.data,this.emitReserved("connect_error",s);break}}onevent(e){let t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let s of t)s.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,s=!1;return function(...i){s||(s=!0,t.packet({type:h.ACK,id:e,data:i}))}}onack(e){let t=this.acks[e.id];typeof t=="function"&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:h.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let s=0;s<t.length;s++)if(e===t[s])return t.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let s of t)s.apply(this,e.data)}}};function E(r){r=r||{},this.ms=r.min||100,this.max=r.max||1e4,this.factor=r.factor||2,this.jitter=r.jitter>0&&r.jitter<=1?r.jitter:0,this.attempts=0}E.prototype.duration=function(){var r=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*r);r=(Math.floor(e*10)&1)==0?r-t:r+t}return Math.min(r,this.max)|0};E.prototype.reset=function(){this.attempts=0};E.prototype.setMin=function(r){this.ms=r};E.prototype.setMax=function(r){this.max=r};E.prototype.setJitter=function(r){this.jitter=r};var R=class extends f{constructor(e,t){var s;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,g(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((s=t.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new E({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;let i=t.parser||ae;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)===null||t===void 0||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)===null||t===void 0||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)===null||t===void 0||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new T(this.uri,this.opts);let t=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;let i=l(t,"open",function(){s.onopen(),e&&e()}),n=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),e?e(c):this.maybeReconnectOnOpen()},o=l(t,"error",n);if(this._timeout!==!1){let c=this._timeout,a=this.setTimeoutFn(()=>{i(),n(new Error("timeout")),t.close()},c);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}return this.subs.push(i),this.subs.push(o),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(l(e,"ping",this.onping.bind(this)),l(e,"data",this.ondata.bind(this)),l(e,"error",this.onerror.bind(this)),l(e,"close",this.onclose.bind(this)),l(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(t){this.onclose("parse error",t)}}ondecoded(e){y(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let s=this.nsps[e];return s?this._autoConnect&&!s.active&&s.connect():(s=new A(this,e,t),this.nsps[e]=s),s}_destroy(e){let t=Object.keys(this.nsps);for(let s of t)if(this.nsps[s].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let s=0;s<t.length;s++)this.engine.write(t[s],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,t){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let s=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(i=>{i?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",i)):e.onreconnect()}))},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var F={};function I(r,e){typeof r=="object"&&(e=r,r=void 0),e=e||{};let t=Fe(r,e.path||"/socket.io"),s=t.source,i=t.id,n=t.path,o=F[i]&&n in F[i].nsps,c=e.forceNew||e["force new connection"]||e.multiplex===!1||o,a;return c?a=new R(s,e):(F[i]||(F[i]=new R(s,e)),a=F[i]),t.query&&!e.query&&(e.query=t.queryKey),a.socket(t.path,e)}Object.assign(I,{Manager:R,Socket:A,io:I,connect:I});var cr=(()=>{class r{$auth=ue(pe);namespaceConnectionCache={};connectToNamespace(t){if(this.namespaceConnectionCache[t]){let s=this.namespaceConnectionCache[t];return s.connected=new X,setTimeout(()=>{s.socket.connected&&s.connected.next(void 0)}),s.socket.on("connect",()=>{s.connected.next(void 0)}),s.end=()=>{s.socket.emit("end"),s.socket.removeAllListeners(),s.connected.complete()},this.namespaceConnectionCache[t]}else{let s=this.establishConnectionToNamespace(t);return s.connected=new X,s.socket.on("connect",()=>{s.connected.next(void 0)}),s.end=()=>{s.socket.emit("end"),s.socket.removeAllListeners(),s.connected.complete()},this.namespaceConnectionCache[t]=s,s}}getExistingNamespace(t){return this.namespaceConnectionCache[t]}establishConnectionToNamespace(t){let s=I(`${le.api.socket}/${t}`,{query:{token:this.$auth.token}});return{socket:s,request:(n,o)=>new he(c=>{s.emit(n,o,a=>{typeof a=="object"&&a.error?c.error(a):c.next(a),c.complete()})})}}static \u0275fac=function(s){return new(s||r)};static \u0275prov=fe({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();export{cr as a};
@@ -1 +1 @@
1
- import{a as b}from"./chunk-G7VCQ3TG.js";import"./chunk-GEMLIK55.js";import{e as T}from"./chunk-5ZHDYUXA.js";import{b as w}from"./chunk-3PXXHWW2.js";import{k as C,l as $,n as k,q as S}from"./chunk-6H7DHQM2.js";import{$b as s,Ab as r,Bb as i,Cb as l,Jb as E,La as x,Nb as f,Qa as n,_b as a,db as _,lc as g,na as o,qb as d,rb as h,rc as m,sc as c,tc as y}from"./chunk-ZRDN4L2J.js";var I=t=>({command:t});function D(t,u){if(t&1&&(r(0,"div",7),a(1),i()),t&2){let e=f();n(),s(e.error)}}function R(t,u){t&1&&(r(0,"p",9),a(1),m(2,"translate"),i(),r(3,"div",10)(4,"div",11),l(5,"i",12),i()()),t&2&&(n(),s(c(2,1,"restart.please_wait_while_server_restarts")))}function B(t,u){if(t&1&&(r(0,"div",8)(1,"p"),a(2),m(3,"translate"),i(),l(4,"p",13),m(5,"translate"),i()),t&2){let e=f();n(2),s(c(3,2,"platform.docker.server_long_time")),n(2),E("innerHTML",y(5,4,"platform.docker.run_with_restart",g(7,I,e.command)),x)}}var U=(()=>{class t{$api=o(S);$router=o(T);$settings=o(w);$toastr=o(k);$translate=o(C);$ws=o(b);checkTimeout;checkDelay;io;resp={};timeout=!1;error=!1;command='<span class="font-monospace">--restart=always</span>';ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$api.put("/platform-tools/docker/restart-container",{}).subscribe({next:e=>{this.resp=e,this.checkIfServerUp()},error:e=>{this.error=this.$translate.instant("restart.toast_server_restart_error"),console.error(e),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="ok"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("platform.docker.container_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},1e4),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("restart.toast_server_restart_timeout"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},6e4)}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=_({type:t,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fab","fa-docker",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[1,"fas","fa-circle-notch","fa-spin"],[1,"grey-text","mb-0",3,"innerHTML"]],template:function(p,v){p&1&&(r(0,"div",0)(1,"h3",1),a(2),m(3,"translate"),i()(),r(4,"div",2)(5,"div",3),l(6,"i",4),i(),r(7,"div",5)(8,"h4",6),a(9),m(10,"translate"),i(),d(11,D,2,1,"div",7)(12,R,6,3),d(13,B,6,9,"div",8),i()()),p&2&&(n(2),s(c(3,4,"menu.restart.title")),n(7),s(c(10,6,"platform.docker.title_restarting")),n(2),h(v.error?11:12),n(2),h(v.timeout?13:-1))},dependencies:[$],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{U as ContainerRestartComponent};
1
+ import{a as b}from"./chunk-3SKLXSFI.js";import"./chunk-L2Y7HWNA.js";import{e as T}from"./chunk-5ZHDYUXA.js";import{b as w}from"./chunk-D5Z6KR3J.js";import{k as C,l as $,n as k,q as S}from"./chunk-YK5NYQW5.js";import{$b as s,Ab as r,Bb as i,Cb as l,Jb as E,La as x,Nb as f,Qa as n,_b as a,db as _,lc as g,na as o,qb as d,rb as h,rc as m,sc as c,tc as y}from"./chunk-ZRDN4L2J.js";var I=t=>({command:t});function D(t,u){if(t&1&&(r(0,"div",7),a(1),i()),t&2){let e=f();n(),s(e.error)}}function R(t,u){t&1&&(r(0,"p",9),a(1),m(2,"translate"),i(),r(3,"div",10)(4,"div",11),l(5,"i",12),i()()),t&2&&(n(),s(c(2,1,"restart.please_wait_while_server_restarts")))}function B(t,u){if(t&1&&(r(0,"div",8)(1,"p"),a(2),m(3,"translate"),i(),l(4,"p",13),m(5,"translate"),i()),t&2){let e=f();n(2),s(c(3,2,"platform.docker.server_long_time")),n(2),E("innerHTML",y(5,4,"platform.docker.run_with_restart",g(7,I,e.command)),x)}}var U=(()=>{class t{$api=o(S);$router=o(T);$settings=o(w);$toastr=o(k);$translate=o(C);$ws=o(b);checkTimeout;checkDelay;io;resp={};timeout=!1;error=!1;command='<span class="font-monospace">--restart=always</span>';ngOnInit(){this.io=this.$ws.connectToNamespace("status"),this.io.connected.subscribe(()=>{this.io.socket.emit("monitor-server-status"),this.$settings.getAppSettings().catch(()=>{})}),this.$api.put("/platform-tools/docker/restart-container",{}).subscribe({next:e=>{this.resp=e,this.checkIfServerUp()},error:e=>{this.error=this.$translate.instant("restart.toast_server_restart_error"),console.error(e),this.$toastr.error(this.$translate.instant("restart.toast_server_restart_error"),this.$translate.instant("toast.title_error"))}})}ngOnDestroy(){this.io.end(),clearTimeout(this.checkDelay),clearTimeout(this.checkTimeout)}checkIfServerUp(){this.checkDelay=setTimeout(()=>{this.io.socket.on("homebridge-status",e=>{(e.status==="ok"||e.status==="pending")&&(this.$toastr.success(this.$translate.instant("platform.docker.container_restarted"),this.$translate.instant("toast.title_success")),this.$router.navigate(["/"]))})},1e4),this.checkTimeout=setTimeout(()=>{this.$toastr.warning(this.$translate.instant("restart.toast_server_restart_timeout"),this.$translate.instant("toast.title_warning"),{timeOut:1e4}),this.timeout=!0},6e4)}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=_({type:t,selectors:[["ng-component"]],decls:14,vars:8,consts:[[1,"d-flex","justify-content-between"],[1,"primary-text","m-0"],[1,"my-4","align-items-center",2,"max-width","1000px","margin","auto"],[1,"w-100","text-center","primary-text","mb-5"],[1,"fab","fa-docker",2,"font-size","75px"],[1,"text-center"],[1,"primary-text","mb-4"],[1,"alert","alert-error","my-4"],[1,"alert","alert-warning","my-4"],[1,"grey-text"],[1,"justify-content-center","my-4"],[1,"restart-progress-box","primary-text"],[1,"fas","fa-circle-notch","fa-spin"],[1,"grey-text","mb-0",3,"innerHTML"]],template:function(p,v){p&1&&(r(0,"div",0)(1,"h3",1),a(2),m(3,"translate"),i()(),r(4,"div",2)(5,"div",3),l(6,"i",4),i(),r(7,"div",5)(8,"h4",6),a(9),m(10,"translate"),i(),d(11,D,2,1,"div",7)(12,R,6,3),d(13,B,6,9,"div",8),i()()),p&2&&(n(2),s(c(3,4,"menu.restart.title")),n(7),s(c(10,6,"platform.docker.title_restarting")),n(2),h(v.error?11:12),n(2),h(v.timeout?13:-1))},dependencies:[$],styles:[".restart-progress-box[_ngcontent-%COMP%]{font-size:22px;font-weight:300;margin-top:15px}"]})}return t})();export{U as ContainerRestartComponent};
@@ -1 +1 @@
1
- import{h as i}from"./chunk-5ZHDYUXA.js";import{eb as e,ja as t}from"./chunk-ZRDN4L2J.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-U24C4LXA.js").then(o=>o.DockerModule)},{path:"linux",loadChildren:()=>import("./chunk-FG374IPB.js").then(o=>o.LinuxModule)},{path:"terminal",loadChildren:()=>import("./chunk-7Y3AGCYD.js").then(o=>o.TerminalModule)}],l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[i.forChild(d),i]})}return o})();var p=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[l]})}return o})();export{p as PlatformToolsModule};
1
+ import{h as i}from"./chunk-5ZHDYUXA.js";import{eb as e,ja as t}from"./chunk-ZRDN4L2J.js";var d=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"docker",loadChildren:()=>import("./chunk-OL7NNVJO.js").then(o=>o.DockerModule)},{path:"linux",loadChildren:()=>import("./chunk-7DOT7I4R.js").then(o=>o.LinuxModule)},{path:"terminal",loadChildren:()=>import("./chunk-ZYETXD5U.js").then(o=>o.TerminalModule)}],l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[i.forChild(d),i]})}return o})();var p=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=e({type:o});static \u0275inj=t({imports:[l]})}return o})();export{p as PlatformToolsModule};
@@ -1 +1 @@
1
- import{h as i}from"./chunk-5ZHDYUXA.js";import{eb as e,ja as o}from"./chunk-ZRDN4L2J.js";var m=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"restart-server",loadComponent:()=>import("./chunk-MEE3HK5H.js").then(t=>t.RestartLinuxComponent)},{path:"shutdown-server",loadComponent:()=>import("./chunk-LGMU4LKT.js").then(t=>t.ShutdownLinuxComponent)}],n=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[i.forChild(m),i]})}return t})();var c=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[n]})}return t})();export{c as LinuxModule};
1
+ import{h as i}from"./chunk-5ZHDYUXA.js";import{eb as e,ja as o}from"./chunk-ZRDN4L2J.js";var m=[{path:"",redirectTo:"/",pathMatch:"full"},{path:"restart-server",loadComponent:()=>import("./chunk-MY5KM2NY.js").then(t=>t.RestartLinuxComponent)},{path:"shutdown-server",loadComponent:()=>import("./chunk-BNHW6YHK.js").then(t=>t.ShutdownLinuxComponent)}],n=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[i.forChild(m),i]})}return t})();var c=(()=>{class t{static \u0275fac=function(r){return new(r||t)};static \u0275mod=e({type:t});static \u0275inj=o({imports:[n]})}return t})();export{c as LinuxModule};
@@ -1,4 +1,4 @@
1
- import{a as jv}from"./chunk-R6YWI4B6.js";import{a as ep,c as Iv,d as Pv,e as Ys,f as Av,g as rU,h as tp}from"./chunk-SR7QWPJS.js";import{a as wv}from"./chunk-JHD5MRCG.js";import{a as xv}from"./chunk-STRTFJ4I.js";import{a as zv}from"./chunk-NGL4ECSY.js";import{a as Hv,b as Sv,c as Cv}from"./chunk-SIVN6M76.js";import{a as pa}from"./chunk-V4JCOKHQ.js";import{a as Tv}from"./chunk-TMGK6CPZ.js";import{a as Gc,b as Ko}from"./chunk-NXNTFMYU.js";import{a as qo,b as Lo}from"./chunk-TGQIPKOK.js";import{a as kv}from"./chunk-IFPZQ4UP.js";import{a as Fc,b as Vc,c as qc,d as Lc,e as Kc,f as $c,g as Vo,m as Ct,n as ki,o as hv,p as fv,q as bv,r as yv,s as vv,t as Pr}from"./chunk-54X33YUH.js";import{B as _v,C as gs,D as ga,a as rv,b as Sr,c as ro,e as Zt,f as ov,h as nv,i as av,j as lv,k as cv,l as Ji,m as dv,n as uv,o as gv,p as Cr,s as Fo,t as xr,u as Xg,v as Ir,w as pv,x as mv}from"./chunk-3PGUQRQW.js";import{a as zr}from"./chunk-G7VCQ3TG.js";import{e as Ts}from"./chunk-5ZHDYUXA.js";import{b as It}from"./chunk-3PXXHWW2.js";import{k as it,l as xt,n as st,p as Tr,q as Ze}from"./chunk-6H7DHQM2.js";import{$ as Wg,$b as re,Aa as Cs,Ab as na,Ac as ui,Bb as aa,Bc as ne,Ca as xs,Cb as la,Cc as kr,Da as Ky,Db as ca,E as My,Eb as da,Ec as us,Fa as Is,Fc as so,Ga as $y,Gc as Xy,H as Uy,Ha as Gy,Hc as ev,I as Ac,Ib as ie,J as Oy,La as Ue,Lb as Q,M as Gg,Ma as Wy,Mb as Nc,Nb as H,P as Bo,Pa as Yy,Pc as wi,Qa as m,Qc as Hr,R as Fy,Rb as Rc,Rc as Jt,Sa as Ri,Sb as Ec,Ta as fr,Tb as Bc,Ub as yr,Va as Zg,Vb as vr,Wb as Mc,Xb as vi,Ya as Mo,Yb as Ei,Yc as Oc,Za as Dc,Zb as _e,_a as oa,_b as j,_c as tv,a as fe,aa as jc,ab as Ps,ac as oe,ad as iv,b as Ge,ba as Yg,bc as wr,c as Ny,ca as ds,cc as Uc,da as Vy,db as ve,e as w,eb as br,ed as sv,fb as Ws,fc as nt,g as ot,gb as Jy,gc as at,h as ge,ha as Jg,hc as lt,i as eo,ia as gt,ic as Zy,ja as hr,jb as Ie,jc as Uo,k as to,kc as tt,la as Gs,lc as ci,ma as qy,mc as ua,n as Ee,na as A,nc as di,o as Tc,ob as Qg,oc as Oo,p as $g,pb as pe,pc as Qy,qa as Ly,qb as O,r as Ry,rb as F,rc as N,s as Ey,sa as J,sc as M,ta as Z,tb as ni,tc as St,ub as ai,vb as li,w as By,wa as ra,wb as x,x as je,xa as io,xb as b,y as zc,yb as f,zb as B}from"./chunk-ZRDN4L2J.js";var Ov=w(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});As.formatNames=As.fastFormats=As.fullFormats=void 0;function zs(e,i){return{validate:e,compare:i}}As.fullFormats={date:zs(Ev,op),time:zs(sp(!0),np),"date-time":zs(Dv(!0),Mv),"iso-time":zs(sp(),Bv),"iso-date-time":zs(Dv(),Uv),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:dU,"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:fU,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:uU,int32:{type:"number",validate:mU},int64:{type:"number",validate:_U},float:{type:"number",validate:Rv},double:{type:"number",validate:Rv},password:!0,binary:!0};As.fastFormats=Ge(fe({},As.fullFormats),{date:zs(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,op),time:zs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,np),"date-time":zs(/^\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,Mv),"iso-time":zs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Bv),"iso-date-time":zs(/^\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,Uv),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});As.formatNames=Object.keys(As.fullFormats);function oU(e){return e%4===0&&(e%100!==0||e%400===0)}var nU=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,aU=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Ev(e){let i=nU.exec(e);if(!i)return!1;let t=+i[1],s=+i[2],r=+i[3];return s>=1&&s<=12&&r>=1&&r<=(s===2&&oU(t)?29:aU[s])}function op(e,i){if(e&&i)return e>i?1:e<i?-1:0}var ip=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function sp(e){return function(t){let s=ip.exec(t);if(!s)return!1;let r=+s[1],n=+s[2],l=+s[3],c=s[4],u=s[5]==="-"?-1:1,p=+(s[6]||0),_=+(s[7]||0);if(p>23||_>59||e&&!c)return!1;if(r<=23&&n<=59&&l<60)return!0;let v=n-_*u,S=r-p*u-(v<0?1:0);return(S===23||S===-1)&&(v===59||v===-1)&&l<61}}function np(e,i){if(!(e&&i))return;let t=new Date("2020-01-01T"+e).valueOf(),s=new Date("2020-01-01T"+i).valueOf();if(t&&s)return t-s}function Bv(e,i){if(!(e&&i))return;let t=ip.exec(e),s=ip.exec(i);if(t&&s)return e=t[1]+t[2]+t[3],i=s[1]+s[2]+s[3],e>i?1:e<i?-1:0}var rp=/t|\s/i;function Dv(e){let i=sp(e);return function(s){let r=s.split(rp);return r.length===2&&Ev(r[0])&&i(r[1])}}function Mv(e,i){if(!(e&&i))return;let t=new Date(e).valueOf(),s=new Date(i).valueOf();if(t&&s)return t-s}function Uv(e,i){if(!(e&&i))return;let[t,s]=e.split(rp),[r,n]=i.split(rp),l=op(t,r);if(l!==void 0)return l||np(s,n)}var lU=/\/|:/,cU=/^(?:[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 dU(e){return lU.test(e)&&cU.test(e)}var Nv=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function uU(e){return Nv.lastIndex=0,Nv.test(e)}var gU=-(2**31),pU=2**31-1;function mU(e){return Number.isInteger(e)&&e<=pU&&e>=gU}function _U(e){return Number.isInteger(e)}function Rv(){return!0}var hU=/[^\\]\\Z/;function fU(e){if(hU.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var ha=w(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.regexpCode=Ye.getEsmExportName=Ye.getProperty=Ye.safeStringify=Ye.stringify=Ye.strConcat=Ye.addCodeArg=Ye.str=Ye._=Ye.nil=Ye._Code=Ye.Name=Ye.IDENTIFIER=Ye._CodeOrName=void 0;var ma=class{};Ye._CodeOrName=ma;Ye.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var oo=class extends ma{constructor(i){if(super(),!Ye.IDENTIFIER.test(i))throw new Error("CodeGen: name must be a valid identifier");this.str=i}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Ye.Name=oo;var Zi=class extends ma{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,s)=>`${t}${s}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,s)=>(s instanceof oo&&(t[s.str]=(t[s.str]||0)+1),t),{})}};Ye._Code=Zi;Ye.nil=new Zi("");function Fv(e,...i){let t=[e[0]],s=0;for(;s<i.length;)lp(t,i[s]),t.push(e[++s]);return new Zi(t)}Ye._=Fv;var ap=new Zi("+");function Vv(e,...i){let t=[_a(e[0])],s=0;for(;s<i.length;)t.push(ap),lp(t,i[s]),t.push(ap,_a(e[++s]));return bU(t),new Zi(t)}Ye.str=Vv;function lp(e,i){i instanceof Zi?e.push(...i._items):i instanceof oo?e.push(i):e.push(wU(i))}Ye.addCodeArg=lp;function bU(e){let i=1;for(;i<e.length-1;){if(e[i]===ap){let t=yU(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function yU(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof oo||e[e.length-1]!=='"'?void 0:typeof i!="string"?`${e.slice(0,-1)}${i}"`:i[0]==='"'?e.slice(0,-1)+i.slice(1):void 0;if(typeof i=="string"&&i[0]==='"'&&!(e instanceof oo))return`"${e}${i.slice(1)}`}function vU(e,i){return i.emptyStr()?e:e.emptyStr()?i:Vv`${e}${i}`}Ye.strConcat=vU;function wU(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:_a(Array.isArray(e)?e.join(","):e)}function kU(e){return new Zi(_a(e))}Ye.stringify=kU;function _a(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Ye.safeStringify=_a;function HU(e){return typeof e=="string"&&Ye.IDENTIFIER.test(e)?new Zi(`.${e}`):Fv`[${e}]`}Ye.getProperty=HU;function SU(e){if(typeof e=="string"&&Ye.IDENTIFIER.test(e))return new Zi(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Ye.getEsmExportName=SU;function CU(e){return new Zi(e.toString())}Ye.regexpCode=CU});var up=w(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.ValueScope=Si.ValueScopeName=Si.Scope=Si.varKinds=Si.UsedValueState=void 0;var Hi=ha(),cp=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},Wc=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e})(Wc||(Si.UsedValueState=Wc={}));Si.varKinds={const:new Hi.Name("const"),let:new Hi.Name("let"),var:new Hi.Name("var")};var Yc=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof Hi.Name?i:this.name(i)}name(i){return new Hi.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};Si.Scope=Yc;var Jc=class extends Hi.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,Hi._)`.${new Hi.Name(t)}[${s}]`}};Si.ValueScopeName=Jc;var xU=(0,Hi._)`\n`,dp=class extends Yc{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=Ge(fe({},i),{_n:i.lines?xU:Hi.nil})}get(){return this._scope}name(i){return new Jc(i,this._newName(i))}value(i,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(i),{prefix:n}=r,l=(s=t.key)!==null&&s!==void 0?s:t.ref,c=this._values[n];if(c){let _=c.get(l);if(_)return _}else c=this._values[n]=new Map;c.set(l,r);let u=this._scope[n]||(this._scope[n]=[]),p=u.length;return u[p]=t.ref,r.setValue(t,{property:n,itemIndex:p}),r}getValue(i,t){let s=this._values[i];if(s)return s.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,Hi._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,s)}_reduceValues(i,t,s={},r){let n=Hi.nil;for(let l in i){let c=i[l];if(!c)continue;let u=s[l]=s[l]||new Map;c.forEach(p=>{if(u.has(p))return;u.set(p,Wc.Started);let _=t(p);if(_){let v=this.opts.es5?Si.varKinds.var:Si.varKinds.const;n=(0,Hi._)`${n}${v} ${p} = ${_};${this.opts._n}`}else if(_=r?.(p))n=(0,Hi._)`${n}${_}${this.opts._n}`;else throw new cp(p);u.set(p,Wc.Completed)})}return n}};Si.ValueScope=dp});var we=w(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.or=Oe.and=Oe.not=Oe.CodeGen=Oe.operators=Oe.varKinds=Oe.ValueScopeName=Oe.ValueScope=Oe.Scope=Oe.Name=Oe.regexpCode=Oe.stringify=Oe.getProperty=Oe.nil=Oe.strConcat=Oe.str=Oe._=void 0;var $e=ha(),ps=up(),Ar=ha();Object.defineProperty(Oe,"_",{enumerable:!0,get:function(){return Ar._}});Object.defineProperty(Oe,"str",{enumerable:!0,get:function(){return Ar.str}});Object.defineProperty(Oe,"strConcat",{enumerable:!0,get:function(){return Ar.strConcat}});Object.defineProperty(Oe,"nil",{enumerable:!0,get:function(){return Ar.nil}});Object.defineProperty(Oe,"getProperty",{enumerable:!0,get:function(){return Ar.getProperty}});Object.defineProperty(Oe,"stringify",{enumerable:!0,get:function(){return Ar.stringify}});Object.defineProperty(Oe,"regexpCode",{enumerable:!0,get:function(){return Ar.regexpCode}});Object.defineProperty(Oe,"Name",{enumerable:!0,get:function(){return Ar.Name}});var td=up();Object.defineProperty(Oe,"Scope",{enumerable:!0,get:function(){return td.Scope}});Object.defineProperty(Oe,"ValueScope",{enumerable:!0,get:function(){return td.ValueScope}});Object.defineProperty(Oe,"ValueScopeName",{enumerable:!0,get:function(){return td.ValueScopeName}});Object.defineProperty(Oe,"varKinds",{enumerable:!0,get:function(){return td.varKinds}});Oe.operators={GT:new $e._Code(">"),GTE:new $e._Code(">="),LT:new $e._Code("<"),LTE:new $e._Code("<="),EQ:new $e._Code("==="),NEQ:new $e._Code("!=="),NOT:new $e._Code("!"),OR:new $e._Code("||"),AND:new $e._Code("&&"),ADD:new $e._Code("+")};var Js=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},gp=class extends Js{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?ps.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${r};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=Go(this.rhs,i,t)),this}get names(){return this.rhs instanceof $e._CodeOrName?this.rhs.names:{}}},Qc=class extends Js{constructor(i,t,s){super(),this.lhs=i,this.rhs=t,this.sideEffects=s}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof $e.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=Go(this.rhs,i,t),this}get names(){let i=this.lhs instanceof $e.Name?{}:fe({},this.lhs.names);return ed(i,this.rhs)}},pp=class extends Qc{constructor(i,t,s,r){super(i,s,r),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},mp=class extends Js{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},_p=class extends Js{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},hp=class extends Js{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},fp=class extends Js{constructor(i){super(),this.code=i}render({_n:i}){return`${this.code};`+i}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(i,t){return this.code=Go(this.code,i,t),this}get names(){return this.code instanceof $e._CodeOrName?this.code.names:{}}},fa=class extends Js{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,s)=>t+s.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let s=i[t].optimizeNodes();Array.isArray(s)?i.splice(t,1,...s):s?i[t]=s:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:s}=this,r=s.length;for(;r--;){let n=s[r];n.optimizeNames(i,t)||(IU(i,n.names),s.splice(r,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>no(i,t.names),{})}},Zs=class extends fa{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},bp=class extends fa{},yp=(()=>{class e extends Zs{}return e.kind="else",e})(),Zc=(()=>{class e extends Zs{constructor(t,s){super(s),this.condition=t}render(t){let s=`if(${this.condition})`+super.render(t);return this.else&&(s+="else "+this.else.render(t)),s}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let s=this.else;if(s){let r=s.optimizeNodes();s=this.else=Array.isArray(r)?new yp(r):r}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e(Gv(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=Go(this.condition,t,s),this}get names(){let t=super.names;return ed(t,this.condition),this.else&&no(t,this.else.names),t}}return e.kind="if",e})(),id=(()=>{class e extends Zs{}return e.kind="for",e})(),vp=class extends id{constructor(i){super(),this.iteration=i}render(i){return`for(${this.iteration})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iteration=Go(this.iteration,i,t),this}get names(){return no(super.names,this.iteration.names)}},wp=class extends id{constructor(i,t,s,r){super(),this.varKind=i,this.name=t,this.from=s,this.to=r}render(i){let t=i.es5?ps.varKinds.var:this.varKind,{name:s,from:r,to:n}=this;return`for(${t} ${s}=${r}; ${s}<${n}; ${s}++)`+super.render(i)}get names(){let i=ed(super.names,this.from);return ed(i,this.to)}},Xc=class extends id{constructor(i,t,s,r){super(),this.loop=i,this.varKind=t,this.name=s,this.iterable=r}render(i){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iterable=Go(this.iterable,i,t),this}get names(){return no(super.names,this.iterable.names)}},qv=(()=>{class e extends Zs{constructor(t,s,r){super(),this.name=t,this.args=s,this.async=r}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),Lv=(()=>{class e extends fa{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),kp=class extends Zs{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var s,r;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(r=this.finally)===null||r===void 0||r.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&no(i,this.catch.names),this.finally&&no(i,this.finally.names),i}},Kv=(()=>{class e extends Zs{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),$v=(()=>{class e extends Zs{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Hp=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Ge(fe({},t),{_n:t.lines?`
1
+ import{a as jv}from"./chunk-IQUWZEQX.js";import{a as ep,c as Iv,d as Pv,e as Ys,f as Av,g as rU,h as tp}from"./chunk-JE6FI7IW.js";import{a as wv}from"./chunk-JHD5MRCG.js";import{a as xv}from"./chunk-STRTFJ4I.js";import{a as zv}from"./chunk-JJZ232C2.js";import{a as Hv,b as Sv,c as Cv}from"./chunk-SIVN6M76.js";import{a as pa}from"./chunk-V4JCOKHQ.js";import{a as Tv}from"./chunk-TMGK6CPZ.js";import{a as Gc,b as Ko}from"./chunk-NXNTFMYU.js";import{a as qo,b as Lo}from"./chunk-TGQIPKOK.js";import{a as kv}from"./chunk-QTIB6YCV.js";import{a as Fc,b as Vc,c as qc,d as Lc,e as Kc,f as $c,g as Vo,m as Ct,n as ki,o as hv,p as fv,q as bv,r as yv,s as vv,t as Pr}from"./chunk-54X33YUH.js";import{B as _v,C as gs,D as ga,a as rv,b as Sr,c as ro,e as Zt,f as ov,h as nv,i as av,j as lv,k as cv,l as Ji,m as dv,n as uv,o as gv,p as Cr,s as Fo,t as xr,u as Xg,v as Ir,w as pv,x as mv}from"./chunk-3PGUQRQW.js";import{a as zr}from"./chunk-3SKLXSFI.js";import{e as Ts}from"./chunk-5ZHDYUXA.js";import{b as It}from"./chunk-D5Z6KR3J.js";import{k as it,l as xt,n as st,p as Tr,q as Ze}from"./chunk-YK5NYQW5.js";import{$ as Wg,$b as re,Aa as Cs,Ab as na,Ac as ui,Bb as aa,Bc as ne,Ca as xs,Cb as la,Cc as kr,Da as Ky,Db as ca,E as My,Eb as da,Ec as us,Fa as Is,Fc as so,Ga as $y,Gc as Xy,H as Uy,Ha as Gy,Hc as ev,I as Ac,Ib as ie,J as Oy,La as Ue,Lb as Q,M as Gg,Ma as Wy,Mb as Nc,Nb as H,P as Bo,Pa as Yy,Pc as wi,Qa as m,Qc as Hr,R as Fy,Rb as Rc,Rc as Jt,Sa as Ri,Sb as Ec,Ta as fr,Tb as Bc,Ub as yr,Va as Zg,Vb as vr,Wb as Mc,Xb as vi,Ya as Mo,Yb as Ei,Yc as Oc,Za as Dc,Zb as _e,_a as oa,_b as j,_c as tv,a as fe,aa as jc,ab as Ps,ac as oe,ad as iv,b as Ge,ba as Yg,bc as wr,c as Ny,ca as ds,cc as Uc,da as Vy,db as ve,e as w,eb as br,ed as sv,fb as Ws,fc as nt,g as ot,gb as Jy,gc as at,h as ge,ha as Jg,hc as lt,i as eo,ia as gt,ic as Zy,ja as hr,jb as Ie,jc as Uo,k as to,kc as tt,la as Gs,lc as ci,ma as qy,mc as ua,n as Ee,na as A,nc as di,o as Tc,ob as Qg,oc as Oo,p as $g,pb as pe,pc as Qy,qa as Ly,qb as O,r as Ry,rb as F,rc as N,s as Ey,sa as J,sc as M,ta as Z,tb as ni,tc as St,ub as ai,vb as li,w as By,wa as ra,wb as x,x as je,xa as io,xb as b,y as zc,yb as f,zb as B}from"./chunk-ZRDN4L2J.js";var Ov=w(As=>{"use strict";Object.defineProperty(As,"__esModule",{value:!0});As.formatNames=As.fastFormats=As.fullFormats=void 0;function zs(e,i){return{validate:e,compare:i}}As.fullFormats={date:zs(Ev,op),time:zs(sp(!0),np),"date-time":zs(Dv(!0),Mv),"iso-time":zs(sp(),Bv),"iso-date-time":zs(Dv(),Uv),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:dU,"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:fU,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:uU,int32:{type:"number",validate:mU},int64:{type:"number",validate:_U},float:{type:"number",validate:Rv},double:{type:"number",validate:Rv},password:!0,binary:!0};As.fastFormats=Ge(fe({},As.fullFormats),{date:zs(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,op),time:zs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,np),"date-time":zs(/^\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,Mv),"iso-time":zs(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,Bv),"iso-date-time":zs(/^\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,Uv),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});As.formatNames=Object.keys(As.fullFormats);function oU(e){return e%4===0&&(e%100!==0||e%400===0)}var nU=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,aU=[0,31,28,31,30,31,30,31,31,30,31,30,31];function Ev(e){let i=nU.exec(e);if(!i)return!1;let t=+i[1],s=+i[2],r=+i[3];return s>=1&&s<=12&&r>=1&&r<=(s===2&&oU(t)?29:aU[s])}function op(e,i){if(e&&i)return e>i?1:e<i?-1:0}var ip=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function sp(e){return function(t){let s=ip.exec(t);if(!s)return!1;let r=+s[1],n=+s[2],l=+s[3],c=s[4],u=s[5]==="-"?-1:1,p=+(s[6]||0),_=+(s[7]||0);if(p>23||_>59||e&&!c)return!1;if(r<=23&&n<=59&&l<60)return!0;let v=n-_*u,S=r-p*u-(v<0?1:0);return(S===23||S===-1)&&(v===59||v===-1)&&l<61}}function np(e,i){if(!(e&&i))return;let t=new Date("2020-01-01T"+e).valueOf(),s=new Date("2020-01-01T"+i).valueOf();if(t&&s)return t-s}function Bv(e,i){if(!(e&&i))return;let t=ip.exec(e),s=ip.exec(i);if(t&&s)return e=t[1]+t[2]+t[3],i=s[1]+s[2]+s[3],e>i?1:e<i?-1:0}var rp=/t|\s/i;function Dv(e){let i=sp(e);return function(s){let r=s.split(rp);return r.length===2&&Ev(r[0])&&i(r[1])}}function Mv(e,i){if(!(e&&i))return;let t=new Date(e).valueOf(),s=new Date(i).valueOf();if(t&&s)return t-s}function Uv(e,i){if(!(e&&i))return;let[t,s]=e.split(rp),[r,n]=i.split(rp),l=op(t,r);if(l!==void 0)return l||np(s,n)}var lU=/\/|:/,cU=/^(?:[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 dU(e){return lU.test(e)&&cU.test(e)}var Nv=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function uU(e){return Nv.lastIndex=0,Nv.test(e)}var gU=-(2**31),pU=2**31-1;function mU(e){return Number.isInteger(e)&&e<=pU&&e>=gU}function _U(e){return Number.isInteger(e)}function Rv(){return!0}var hU=/[^\\]\\Z/;function fU(e){if(hU.test(e))return!1;try{return new RegExp(e),!0}catch{return!1}}});var ha=w(Ye=>{"use strict";Object.defineProperty(Ye,"__esModule",{value:!0});Ye.regexpCode=Ye.getEsmExportName=Ye.getProperty=Ye.safeStringify=Ye.stringify=Ye.strConcat=Ye.addCodeArg=Ye.str=Ye._=Ye.nil=Ye._Code=Ye.Name=Ye.IDENTIFIER=Ye._CodeOrName=void 0;var ma=class{};Ye._CodeOrName=ma;Ye.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var oo=class extends ma{constructor(i){if(super(),!Ye.IDENTIFIER.test(i))throw new Error("CodeGen: name must be a valid identifier");this.str=i}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};Ye.Name=oo;var Zi=class extends ma{constructor(i){super(),this._items=typeof i=="string"?[i]:i}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let i=this._items[0];return i===""||i==='""'}get str(){var i;return(i=this._str)!==null&&i!==void 0?i:this._str=this._items.reduce((t,s)=>`${t}${s}`,"")}get names(){var i;return(i=this._names)!==null&&i!==void 0?i:this._names=this._items.reduce((t,s)=>(s instanceof oo&&(t[s.str]=(t[s.str]||0)+1),t),{})}};Ye._Code=Zi;Ye.nil=new Zi("");function Fv(e,...i){let t=[e[0]],s=0;for(;s<i.length;)lp(t,i[s]),t.push(e[++s]);return new Zi(t)}Ye._=Fv;var ap=new Zi("+");function Vv(e,...i){let t=[_a(e[0])],s=0;for(;s<i.length;)t.push(ap),lp(t,i[s]),t.push(ap,_a(e[++s]));return bU(t),new Zi(t)}Ye.str=Vv;function lp(e,i){i instanceof Zi?e.push(...i._items):i instanceof oo?e.push(i):e.push(wU(i))}Ye.addCodeArg=lp;function bU(e){let i=1;for(;i<e.length-1;){if(e[i]===ap){let t=yU(e[i-1],e[i+1]);if(t!==void 0){e.splice(i-1,3,t);continue}e[i++]="+"}i++}}function yU(e,i){if(i==='""')return e;if(e==='""')return i;if(typeof e=="string")return i instanceof oo||e[e.length-1]!=='"'?void 0:typeof i!="string"?`${e.slice(0,-1)}${i}"`:i[0]==='"'?e.slice(0,-1)+i.slice(1):void 0;if(typeof i=="string"&&i[0]==='"'&&!(e instanceof oo))return`"${e}${i.slice(1)}`}function vU(e,i){return i.emptyStr()?e:e.emptyStr()?i:Vv`${e}${i}`}Ye.strConcat=vU;function wU(e){return typeof e=="number"||typeof e=="boolean"||e===null?e:_a(Array.isArray(e)?e.join(","):e)}function kU(e){return new Zi(_a(e))}Ye.stringify=kU;function _a(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}Ye.safeStringify=_a;function HU(e){return typeof e=="string"&&Ye.IDENTIFIER.test(e)?new Zi(`.${e}`):Fv`[${e}]`}Ye.getProperty=HU;function SU(e){if(typeof e=="string"&&Ye.IDENTIFIER.test(e))return new Zi(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}Ye.getEsmExportName=SU;function CU(e){return new Zi(e.toString())}Ye.regexpCode=CU});var up=w(Si=>{"use strict";Object.defineProperty(Si,"__esModule",{value:!0});Si.ValueScope=Si.ValueScopeName=Si.Scope=Si.varKinds=Si.UsedValueState=void 0;var Hi=ha(),cp=class extends Error{constructor(i){super(`CodeGen: "code" for ${i} not defined`),this.value=i.value}},Wc=(function(e){return e[e.Started=0]="Started",e[e.Completed=1]="Completed",e})(Wc||(Si.UsedValueState=Wc={}));Si.varKinds={const:new Hi.Name("const"),let:new Hi.Name("let"),var:new Hi.Name("var")};var Yc=class{constructor({prefixes:i,parent:t}={}){this._names={},this._prefixes=i,this._parent=t}toName(i){return i instanceof Hi.Name?i:this.name(i)}name(i){return new Hi.Name(this._newName(i))}_newName(i){let t=this._names[i]||this._nameGroup(i);return`${i}${t.index++}`}_nameGroup(i){var t,s;if(!((s=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||s===void 0)&&s.has(i)||this._prefixes&&!this._prefixes.has(i))throw new Error(`CodeGen: prefix "${i}" is not allowed in this scope`);return this._names[i]={prefix:i,index:0}}};Si.Scope=Yc;var Jc=class extends Hi.Name{constructor(i,t){super(t),this.prefix=i}setValue(i,{property:t,itemIndex:s}){this.value=i,this.scopePath=(0,Hi._)`.${new Hi.Name(t)}[${s}]`}};Si.ValueScopeName=Jc;var xU=(0,Hi._)`\n`,dp=class extends Yc{constructor(i){super(i),this._values={},this._scope=i.scope,this.opts=Ge(fe({},i),{_n:i.lines?xU:Hi.nil})}get(){return this._scope}name(i){return new Jc(i,this._newName(i))}value(i,t){var s;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let r=this.toName(i),{prefix:n}=r,l=(s=t.key)!==null&&s!==void 0?s:t.ref,c=this._values[n];if(c){let _=c.get(l);if(_)return _}else c=this._values[n]=new Map;c.set(l,r);let u=this._scope[n]||(this._scope[n]=[]),p=u.length;return u[p]=t.ref,r.setValue(t,{property:n,itemIndex:p}),r}getValue(i,t){let s=this._values[i];if(s)return s.get(t)}scopeRefs(i,t=this._values){return this._reduceValues(t,s=>{if(s.scopePath===void 0)throw new Error(`CodeGen: name "${s}" has no value`);return(0,Hi._)`${i}${s.scopePath}`})}scopeCode(i=this._values,t,s){return this._reduceValues(i,r=>{if(r.value===void 0)throw new Error(`CodeGen: name "${r}" has no value`);return r.value.code},t,s)}_reduceValues(i,t,s={},r){let n=Hi.nil;for(let l in i){let c=i[l];if(!c)continue;let u=s[l]=s[l]||new Map;c.forEach(p=>{if(u.has(p))return;u.set(p,Wc.Started);let _=t(p);if(_){let v=this.opts.es5?Si.varKinds.var:Si.varKinds.const;n=(0,Hi._)`${n}${v} ${p} = ${_};${this.opts._n}`}else if(_=r?.(p))n=(0,Hi._)`${n}${_}${this.opts._n}`;else throw new cp(p);u.set(p,Wc.Completed)})}return n}};Si.ValueScope=dp});var we=w(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.or=Oe.and=Oe.not=Oe.CodeGen=Oe.operators=Oe.varKinds=Oe.ValueScopeName=Oe.ValueScope=Oe.Scope=Oe.Name=Oe.regexpCode=Oe.stringify=Oe.getProperty=Oe.nil=Oe.strConcat=Oe.str=Oe._=void 0;var $e=ha(),ps=up(),Ar=ha();Object.defineProperty(Oe,"_",{enumerable:!0,get:function(){return Ar._}});Object.defineProperty(Oe,"str",{enumerable:!0,get:function(){return Ar.str}});Object.defineProperty(Oe,"strConcat",{enumerable:!0,get:function(){return Ar.strConcat}});Object.defineProperty(Oe,"nil",{enumerable:!0,get:function(){return Ar.nil}});Object.defineProperty(Oe,"getProperty",{enumerable:!0,get:function(){return Ar.getProperty}});Object.defineProperty(Oe,"stringify",{enumerable:!0,get:function(){return Ar.stringify}});Object.defineProperty(Oe,"regexpCode",{enumerable:!0,get:function(){return Ar.regexpCode}});Object.defineProperty(Oe,"Name",{enumerable:!0,get:function(){return Ar.Name}});var td=up();Object.defineProperty(Oe,"Scope",{enumerable:!0,get:function(){return td.Scope}});Object.defineProperty(Oe,"ValueScope",{enumerable:!0,get:function(){return td.ValueScope}});Object.defineProperty(Oe,"ValueScopeName",{enumerable:!0,get:function(){return td.ValueScopeName}});Object.defineProperty(Oe,"varKinds",{enumerable:!0,get:function(){return td.varKinds}});Oe.operators={GT:new $e._Code(">"),GTE:new $e._Code(">="),LT:new $e._Code("<"),LTE:new $e._Code("<="),EQ:new $e._Code("==="),NEQ:new $e._Code("!=="),NOT:new $e._Code("!"),OR:new $e._Code("||"),AND:new $e._Code("&&"),ADD:new $e._Code("+")};var Js=class{optimizeNodes(){return this}optimizeNames(i,t){return this}},gp=class extends Js{constructor(i,t,s){super(),this.varKind=i,this.name=t,this.rhs=s}render({es5:i,_n:t}){let s=i?ps.varKinds.var:this.varKind,r=this.rhs===void 0?"":` = ${this.rhs}`;return`${s} ${this.name}${r};`+t}optimizeNames(i,t){if(i[this.name.str])return this.rhs&&(this.rhs=Go(this.rhs,i,t)),this}get names(){return this.rhs instanceof $e._CodeOrName?this.rhs.names:{}}},Qc=class extends Js{constructor(i,t,s){super(),this.lhs=i,this.rhs=t,this.sideEffects=s}render({_n:i}){return`${this.lhs} = ${this.rhs};`+i}optimizeNames(i,t){if(!(this.lhs instanceof $e.Name&&!i[this.lhs.str]&&!this.sideEffects))return this.rhs=Go(this.rhs,i,t),this}get names(){let i=this.lhs instanceof $e.Name?{}:fe({},this.lhs.names);return ed(i,this.rhs)}},pp=class extends Qc{constructor(i,t,s,r){super(i,s,r),this.op=t}render({_n:i}){return`${this.lhs} ${this.op}= ${this.rhs};`+i}},mp=class extends Js{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`${this.label}:`+i}},_p=class extends Js{constructor(i){super(),this.label=i,this.names={}}render({_n:i}){return`break${this.label?` ${this.label}`:""};`+i}},hp=class extends Js{constructor(i){super(),this.error=i}render({_n:i}){return`throw ${this.error};`+i}get names(){return this.error.names}},fp=class extends Js{constructor(i){super(),this.code=i}render({_n:i}){return`${this.code};`+i}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(i,t){return this.code=Go(this.code,i,t),this}get names(){return this.code instanceof $e._CodeOrName?this.code.names:{}}},fa=class extends Js{constructor(i=[]){super(),this.nodes=i}render(i){return this.nodes.reduce((t,s)=>t+s.render(i),"")}optimizeNodes(){let{nodes:i}=this,t=i.length;for(;t--;){let s=i[t].optimizeNodes();Array.isArray(s)?i.splice(t,1,...s):s?i[t]=s:i.splice(t,1)}return i.length>0?this:void 0}optimizeNames(i,t){let{nodes:s}=this,r=s.length;for(;r--;){let n=s[r];n.optimizeNames(i,t)||(IU(i,n.names),s.splice(r,1))}return s.length>0?this:void 0}get names(){return this.nodes.reduce((i,t)=>no(i,t.names),{})}},Zs=class extends fa{render(i){return"{"+i._n+super.render(i)+"}"+i._n}},bp=class extends fa{},yp=(()=>{class e extends Zs{}return e.kind="else",e})(),Zc=(()=>{class e extends Zs{constructor(t,s){super(s),this.condition=t}render(t){let s=`if(${this.condition})`+super.render(t);return this.else&&(s+="else "+this.else.render(t)),s}optimizeNodes(){super.optimizeNodes();let t=this.condition;if(t===!0)return this.nodes;let s=this.else;if(s){let r=s.optimizeNodes();s=this.else=Array.isArray(r)?new yp(r):r}if(s)return t===!1?s instanceof e?s:s.nodes:this.nodes.length?this:new e(Gv(t),s instanceof e?[s]:s.nodes);if(!(t===!1||!this.nodes.length))return this}optimizeNames(t,s){var r;if(this.else=(r=this.else)===null||r===void 0?void 0:r.optimizeNames(t,s),!!(super.optimizeNames(t,s)||this.else))return this.condition=Go(this.condition,t,s),this}get names(){let t=super.names;return ed(t,this.condition),this.else&&no(t,this.else.names),t}}return e.kind="if",e})(),id=(()=>{class e extends Zs{}return e.kind="for",e})(),vp=class extends id{constructor(i){super(),this.iteration=i}render(i){return`for(${this.iteration})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iteration=Go(this.iteration,i,t),this}get names(){return no(super.names,this.iteration.names)}},wp=class extends id{constructor(i,t,s,r){super(),this.varKind=i,this.name=t,this.from=s,this.to=r}render(i){let t=i.es5?ps.varKinds.var:this.varKind,{name:s,from:r,to:n}=this;return`for(${t} ${s}=${r}; ${s}<${n}; ${s}++)`+super.render(i)}get names(){let i=ed(super.names,this.from);return ed(i,this.to)}},Xc=class extends id{constructor(i,t,s,r){super(),this.loop=i,this.varKind=t,this.name=s,this.iterable=r}render(i){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(i)}optimizeNames(i,t){if(super.optimizeNames(i,t))return this.iterable=Go(this.iterable,i,t),this}get names(){return no(super.names,this.iterable.names)}},qv=(()=>{class e extends Zs{constructor(t,s,r){super(),this.name=t,this.args=s,this.async=r}render(t){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(t)}}return e.kind="func",e})(),Lv=(()=>{class e extends fa{render(t){return"return "+super.render(t)}}return e.kind="return",e})(),kp=class extends Zs{render(i){let t="try"+super.render(i);return this.catch&&(t+=this.catch.render(i)),this.finally&&(t+=this.finally.render(i)),t}optimizeNodes(){var i,t;return super.optimizeNodes(),(i=this.catch)===null||i===void 0||i.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(i,t){var s,r;return super.optimizeNames(i,t),(s=this.catch)===null||s===void 0||s.optimizeNames(i,t),(r=this.finally)===null||r===void 0||r.optimizeNames(i,t),this}get names(){let i=super.names;return this.catch&&no(i,this.catch.names),this.finally&&no(i,this.finally.names),i}},Kv=(()=>{class e extends Zs{constructor(t){super(),this.error=t}render(t){return`catch(${this.error})`+super.render(t)}}return e.kind="catch",e})(),$v=(()=>{class e extends Zs{render(t){return"finally"+super.render(t)}}return e.kind="finally",e})(),Hp=class{constructor(i,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Ge(fe({},t),{_n:t.lines?`
2
2
  `:""}),this._extScope=i,this._scope=new ps.Scope({parent:i}),this._nodes=[new bp]}toString(){return this._root.render(this.opts)}name(i){return this._scope.name(i)}scopeName(i){return this._extScope.name(i)}scopeValue(i,t){let s=this._extScope.value(i,t);return(this._values[s.prefix]||(this._values[s.prefix]=new Set)).add(s),s}getScopeValue(i,t){return this._extScope.getValue(i,t)}scopeRefs(i){return this._extScope.scopeRefs(i,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(i,t,s,r){let n=this._scope.toName(t);return s!==void 0&&r&&(this._constants[n.str]=s),this._leafNode(new gp(i,n,s)),n}const(i,t,s){return this._def(ps.varKinds.const,i,t,s)}let(i,t,s){return this._def(ps.varKinds.let,i,t,s)}var(i,t,s){return this._def(ps.varKinds.var,i,t,s)}assign(i,t,s){return this._leafNode(new Qc(i,t,s))}add(i,t){return this._leafNode(new pp(i,Oe.operators.ADD,t))}code(i){return typeof i=="function"?i():i!==$e.nil&&this._leafNode(new fp(i)),this}object(...i){let t=["{"];for(let[s,r]of i)t.length>1&&t.push(","),t.push(s),(s!==r||this.opts.es5)&&(t.push(":"),(0,$e.addCodeArg)(t,r));return t.push("}"),new $e._Code(t)}if(i,t,s){if(this._blockNode(new Zc(i)),t&&s)this.code(t).else().code(s).endIf();else if(t)this.code(t).endIf();else if(s)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(i){return this._elseNode(new Zc(i))}else(){return this._elseNode(new yp)}endIf(){return this._endBlockNode(Zc,yp)}_for(i,t){return this._blockNode(i),t&&this.code(t).endFor(),this}for(i,t){return this._for(new vp(i),t)}forRange(i,t,s,r,n=this.opts.es5?ps.varKinds.var:ps.varKinds.let){let l=this._scope.toName(i);return this._for(new wp(n,l,t,s),()=>r(l))}forOf(i,t,s,r=ps.varKinds.const){let n=this._scope.toName(i);if(this.opts.es5){let l=t instanceof $e.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,$e._)`${l}.length`,c=>{this.var(n,(0,$e._)`${l}[${c}]`),s(n)})}return this._for(new Xc("of",r,n,t),()=>s(n))}forIn(i,t,s,r=this.opts.es5?ps.varKinds.var:ps.varKinds.const){if(this.opts.ownProperties)return this.forOf(i,(0,$e._)`Object.keys(${t})`,s);let n=this._scope.toName(i);return this._for(new Xc("in",r,n,t),()=>s(n))}endFor(){return this._endBlockNode(id)}label(i){return this._leafNode(new mp(i))}break(i){return this._leafNode(new _p(i))}return(i){let t=new Lv;if(this._blockNode(t),this.code(i),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Lv)}try(i,t,s){if(!t&&!s)throw new Error('CodeGen: "try" without "catch" and "finally"');let r=new kp;if(this._blockNode(r),this.code(i),t){let n=this.name("e");this._currNode=r.catch=new Kv(n),t(n)}return s&&(this._currNode=r.finally=new $v,this.code(s)),this._endBlockNode(Kv,$v)}throw(i){return this._leafNode(new hp(i))}block(i,t){return this._blockStarts.push(this._nodes.length),i&&this.code(i).endBlock(t),this}endBlock(i){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let s=this._nodes.length-t;if(s<0||i!==void 0&&s!==i)throw new Error(`CodeGen: wrong number of nodes: ${s} vs ${i} expected`);return this._nodes.length=t,this}func(i,t=$e.nil,s,r){return this._blockNode(new qv(i,t,s)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(qv)}optimize(i=1){for(;i-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(i){return this._currNode.nodes.push(i),this}_blockNode(i){this._currNode.nodes.push(i),this._nodes.push(i)}_endBlockNode(i,t){let s=this._currNode;if(s instanceof i||t&&s instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${i.kind}/${t.kind}`:i.kind}"`)}_elseNode(i){let t=this._currNode;if(!(t instanceof Zc))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=i,this}get _root(){return this._nodes[0]}get _currNode(){let i=this._nodes;return i[i.length-1]}set _currNode(i){let t=this._nodes;t[t.length-1]=i}};Oe.CodeGen=Hp;function no(e,i){for(let t in i)e[t]=(e[t]||0)+(i[t]||0);return e}function ed(e,i){return i instanceof $e._CodeOrName?no(e,i.names):e}function Go(e,i,t){if(e instanceof $e.Name)return s(e);if(!r(e))return e;return new $e._Code(e._items.reduce((n,l)=>(l instanceof $e.Name&&(l=s(l)),l instanceof $e._Code?n.push(...l._items):n.push(l),n),[]));function s(n){let l=t[n.str];return l===void 0||i[n.str]!==1?n:(delete i[n.str],l)}function r(n){return n instanceof $e._Code&&n._items.some(l=>l instanceof $e.Name&&i[l.str]===1&&t[l.str]!==void 0)}}function IU(e,i){for(let t in i)e[t]=(e[t]||0)-(i[t]||0)}function Gv(e){return typeof e=="boolean"||typeof e=="number"||e===null?!e:(0,$e._)`!${Sp(e)}`}Oe.not=Gv;var PU=Wv(Oe.operators.AND);function TU(...e){return e.reduce(PU)}Oe.and=TU;var zU=Wv(Oe.operators.OR);function AU(...e){return e.reduce(zU)}Oe.or=AU;function Wv(e){return(i,t)=>i===$e.nil?t:t===$e.nil?i:(0,$e._)`${Sp(i)} ${e} ${Sp(t)}`}function Sp(e){return e instanceof $e.Name?e:(0,$e._)`(${e})`}});var qe=w(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.checkStrictMode=Fe.getErrorPath=Fe.Type=Fe.useFunc=Fe.setEvaluated=Fe.evaluatedPropsToName=Fe.mergeEvaluated=Fe.eachItem=Fe.unescapeJsonPointer=Fe.escapeJsonPointer=Fe.escapeFragment=Fe.unescapeFragment=Fe.schemaRefOrVal=Fe.schemaHasRulesButRef=Fe.schemaHasRules=Fe.checkUnknownRules=Fe.alwaysValidSchema=Fe.toHash=void 0;var pt=we(),jU=ha();function DU(e){let i={};for(let t of e)i[t]=!0;return i}Fe.toHash=DU;function NU(e,i){return typeof i=="boolean"?i:Object.keys(i).length===0?!0:(Zv(e,i),!Qv(i,e.self.RULES.all))}Fe.alwaysValidSchema=NU;function Zv(e,i=e.schema){let{opts:t,self:s}=e;if(!t.strictSchema||typeof i=="boolean")return;let r=s.RULES.keywords;for(let n in i)r[n]||tw(e,`unknown keyword: "${n}"`)}Fe.checkUnknownRules=Zv;function Qv(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(i[t])return!0;return!1}Fe.schemaHasRules=Qv;function RU(e,i){if(typeof e=="boolean")return!e;for(let t in e)if(t!=="$ref"&&i.all[t])return!0;return!1}Fe.schemaHasRulesButRef=RU;function EU({topSchemaRef:e,schemaPath:i},t,s,r){if(!r){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,pt._)`${t}`}return(0,pt._)`${e}${i}${(0,pt.getProperty)(s)}`}Fe.schemaRefOrVal=EU;function BU(e){return Xv(decodeURIComponent(e))}Fe.unescapeFragment=BU;function MU(e){return encodeURIComponent(xp(e))}Fe.escapeFragment=MU;function xp(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Fe.escapeJsonPointer=xp;function Xv(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Fe.unescapeJsonPointer=Xv;function UU(e,i){if(Array.isArray(e))for(let t of e)i(t);else i(e)}Fe.eachItem=UU;function Yv({mergeNames:e,mergeToName:i,mergeValues:t,resultToName:s}){return(r,n,l,c)=>{let u=l===void 0?n:l instanceof pt.Name?(n instanceof pt.Name?e(r,n,l):i(r,n,l),l):n instanceof pt.Name?(i(r,l,n),n):t(n,l);return c===pt.Name&&!(u instanceof pt.Name)?s(r,u):u}}Fe.mergeEvaluated={props:Yv({mergeNames:(e,i,t)=>e.if((0,pt._)`${t} !== true && ${i} !== undefined`,()=>{e.if((0,pt._)`${i} === true`,()=>e.assign(t,!0),()=>e.assign(t,(0,pt._)`${t} || {}`).code((0,pt._)`Object.assign(${t}, ${i})`))}),mergeToName:(e,i,t)=>e.if((0,pt._)`${t} !== true`,()=>{i===!0?e.assign(t,!0):(e.assign(t,(0,pt._)`${t} || {}`),Ip(e,t,i))}),mergeValues:(e,i)=>e===!0?!0:fe(fe({},e),i),resultToName:ew}),items:Yv({mergeNames:(e,i,t)=>e.if((0,pt._)`${t} !== true && ${i} !== undefined`,()=>e.assign(t,(0,pt._)`${i} === true ? true : ${t} > ${i} ? ${t} : ${i}`)),mergeToName:(e,i,t)=>e.if((0,pt._)`${t} !== true`,()=>e.assign(t,i===!0?!0:(0,pt._)`${t} > ${i} ? ${t} : ${i}`)),mergeValues:(e,i)=>e===!0?!0:Math.max(e,i),resultToName:(e,i)=>e.var("items",i)})};function ew(e,i){if(i===!0)return e.var("props",!0);let t=e.var("props",(0,pt._)`{}`);return i!==void 0&&Ip(e,t,i),t}Fe.evaluatedPropsToName=ew;function Ip(e,i,t){Object.keys(t).forEach(s=>e.assign((0,pt._)`${i}${(0,pt.getProperty)(s)}`,!0))}Fe.setEvaluated=Ip;var Jv={};function OU(e,i){return e.scopeValue("func",{ref:i,code:Jv[i.code]||(Jv[i.code]=new jU._Code(i.code))})}Fe.useFunc=OU;var Cp=(function(e){return e[e.Num=0]="Num",e[e.Str=1]="Str",e})(Cp||(Fe.Type=Cp={}));function FU(e,i,t){if(e instanceof pt.Name){let s=i===Cp.Num;return t?s?(0,pt._)`"[" + ${e} + "]"`:(0,pt._)`"['" + ${e} + "']"`:s?(0,pt._)`"/" + ${e}`:(0,pt._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,pt.getProperty)(e).toString():"/"+xp(e)}Fe.getErrorPath=FU;function tw(e,i,t=e.opts.strictSchema){if(t){if(i=`strict mode: ${i}`,t===!0)throw new Error(i);e.self.logger.warn(i)}}Fe.checkStrictMode=tw});var Qi=w(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});var Qt=we(),VU={data:new Qt.Name("data"),valCxt:new Qt.Name("valCxt"),instancePath:new Qt.Name("instancePath"),parentData:new Qt.Name("parentData"),parentDataProperty:new Qt.Name("parentDataProperty"),rootData:new Qt.Name("rootData"),dynamicAnchors:new Qt.Name("dynamicAnchors"),vErrors:new Qt.Name("vErrors"),errors:new Qt.Name("errors"),this:new Qt.Name("this"),self:new Qt.Name("self"),scope:new Qt.Name("scope"),json:new Qt.Name("json"),jsonPos:new Qt.Name("jsonPos"),jsonLen:new Qt.Name("jsonLen"),jsonPart:new Qt.Name("jsonPart")};Pp.default=VU});var ba=w(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.extendErrors=Xt.resetErrorsCount=Xt.reportExtraError=Xt.reportError=Xt.keyword$DataError=Xt.keywordError=void 0;var We=we(),sd=qe(),gi=Qi();Xt.keywordError={message:({keyword:e})=>(0,We.str)`must pass "${e}" keyword validation`};Xt.keyword$DataError={message:({keyword:e,schemaType:i})=>i?(0,We.str)`"${e}" keyword must be ${i} ($data)`:(0,We.str)`"${e}" keyword is invalid ($data)`};function qU(e,i=Xt.keywordError,t,s){let{it:r}=e,{gen:n,compositeRule:l,allErrors:c}=r,u=rw(e,i,t);s??(l||c)?iw(n,u):sw(r,(0,We._)`[${u}]`)}Xt.reportError=qU;function LU(e,i=Xt.keywordError,t){let{it:s}=e,{gen:r,compositeRule:n,allErrors:l}=s,c=rw(e,i,t);iw(r,c),n||l||sw(s,gi.default.vErrors)}Xt.reportExtraError=LU;function KU(e,i){e.assign(gi.default.errors,i),e.if((0,We._)`${gi.default.vErrors} !== null`,()=>e.if(i,()=>e.assign((0,We._)`${gi.default.vErrors}.length`,i),()=>e.assign(gi.default.vErrors,null)))}Xt.resetErrorsCount=KU;function $U({gen:e,keyword:i,schemaValue:t,data:s,errsCount:r,it:n}){if(r===void 0)throw new Error("ajv implementation error");let l=e.name("err");e.forRange("i",r,gi.default.errors,c=>{e.const(l,(0,We._)`${gi.default.vErrors}[${c}]`),e.if((0,We._)`${l}.instancePath === undefined`,()=>e.assign((0,We._)`${l}.instancePath`,(0,We.strConcat)(gi.default.instancePath,n.errorPath))),e.assign((0,We._)`${l}.schemaPath`,(0,We.str)`${n.errSchemaPath}/${i}`),n.opts.verbose&&(e.assign((0,We._)`${l}.schema`,t),e.assign((0,We._)`${l}.data`,s))})}Xt.extendErrors=$U;function iw(e,i){let t=e.const("err",i);e.if((0,We._)`${gi.default.vErrors} === null`,()=>e.assign(gi.default.vErrors,(0,We._)`[${t}]`),(0,We._)`${gi.default.vErrors}.push(${t})`),e.code((0,We._)`${gi.default.errors}++`)}function sw(e,i){let{gen:t,validateName:s,schemaEnv:r}=e;r.$async?t.throw((0,We._)`new ${e.ValidationError}(${i})`):(t.assign((0,We._)`${s}.errors`,i),t.return(!1))}var ao={keyword:new We.Name("keyword"),schemaPath:new We.Name("schemaPath"),params:new We.Name("params"),propertyName:new We.Name("propertyName"),message:new We.Name("message"),schema:new We.Name("schema"),parentSchema:new We.Name("parentSchema")};function rw(e,i,t){let{createErrors:s}=e.it;return s===!1?(0,We._)`{}`:GU(e,i,t)}function GU(e,i,t={}){let{gen:s,it:r}=e,n=[WU(r,t),YU(e,t)];return JU(e,i,n),s.object(...n)}function WU({errorPath:e},{instancePath:i}){let t=i?(0,We.str)`${e}${(0,sd.getErrorPath)(i,sd.Type.Str)}`:e;return[gi.default.instancePath,(0,We.strConcat)(gi.default.instancePath,t)]}function YU({keyword:e,it:{errSchemaPath:i}},{schemaPath:t,parentSchema:s}){let r=s?i:(0,We.str)`${i}/${e}`;return t&&(r=(0,We.str)`${r}${(0,sd.getErrorPath)(t,sd.Type.Str)}`),[ao.schemaPath,r]}function JU(e,{params:i,message:t},s){let{keyword:r,data:n,schemaValue:l,it:c}=e,{opts:u,propertyName:p,topSchemaRef:_,schemaPath:v}=c;s.push([ao.keyword,r],[ao.params,typeof i=="function"?i(e):i||(0,We._)`{}`]),u.messages&&s.push([ao.message,typeof t=="function"?t(e):t]),u.verbose&&s.push([ao.schema,l],[ao.parentSchema,(0,We._)`${_}${v}`],[gi.default.data,n]),p&&s.push([ao.propertyName,p])}});var nw=w(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.boolOrEmptySchema=Wo.topBoolOrEmptySchema=void 0;var ZU=ba(),QU=we(),XU=Qi(),eO={message:"boolean schema is false"};function tO(e){let{gen:i,schema:t,validateName:s}=e;t===!1?ow(e,!1):typeof t=="object"&&t.$async===!0?i.return(XU.default.data):(i.assign((0,QU._)`${s}.errors`,null),i.return(!0))}Wo.topBoolOrEmptySchema=tO;function iO(e,i){let{gen:t,schema:s}=e;s===!1?(t.var(i,!1),ow(e)):t.var(i,!0)}Wo.boolOrEmptySchema=iO;function ow(e,i){let{gen:t,data:s}=e,r={gen:t,keyword:"false schema",data:s,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,ZU.reportError)(r,eO,void 0,i)}});var Tp=w(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});Yo.getRules=Yo.isJSONType=void 0;var sO=["string","number","integer","boolean","null","object","array"],rO=new Set(sO);function oO(e){return typeof e=="string"&&rO.has(e)}Yo.isJSONType=oO;function nO(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Ge(fe({},e),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Yo.getRules=nO});var zp=w(jr=>{"use strict";Object.defineProperty(jr,"__esModule",{value:!0});jr.shouldUseRule=jr.shouldUseGroup=jr.schemaHasRulesForType=void 0;function aO({schema:e,self:i},t){let s=i.RULES.types[t];return s&&s!==!0&&aw(e,s)}jr.schemaHasRulesForType=aO;function aw(e,i){return i.rules.some(t=>lw(e,t))}jr.shouldUseGroup=aw;function lw(e,i){var t;return e[i.keyword]!==void 0||((t=i.definition.implements)===null||t===void 0?void 0:t.some(s=>e[s]!==void 0))}jr.shouldUseRule=lw});var ya=w(ei=>{"use strict";Object.defineProperty(ei,"__esModule",{value:!0});ei.reportTypeError=ei.checkDataTypes=ei.checkDataType=ei.coerceAndCheckDataType=ei.getJSONTypes=ei.getSchemaTypes=ei.DataType=void 0;var lO=Tp(),cO=zp(),dO=ba(),Ne=we(),cw=qe(),Jo=(function(e){return e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong",e})(Jo||(ei.DataType=Jo={}));function uO(e){let i=dw(e.type);if(i.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!i.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&i.push("null")}return i}ei.getSchemaTypes=uO;function dw(e){let i=Array.isArray(e)?e:e?[e]:[];if(i.every(lO.isJSONType))return i;throw new Error("type must be JSONType or JSONType[]: "+i.join(","))}ei.getJSONTypes=dw;function gO(e,i){let{gen:t,data:s,opts:r}=e,n=pO(i,r.coerceTypes),l=i.length>0&&!(n.length===0&&i.length===1&&(0,cO.schemaHasRulesForType)(e,i[0]));if(l){let c=jp(i,s,r.strictNumbers,Jo.Wrong);t.if(c,()=>{n.length?mO(e,i,n):Dp(e)})}return l}ei.coerceAndCheckDataType=gO;var uw=new Set(["string","number","integer","boolean","null"]);function pO(e,i){return i?e.filter(t=>uw.has(t)||i==="array"&&t==="array"):[]}function mO(e,i,t){let{gen:s,data:r,opts:n}=e,l=s.let("dataType",(0,Ne._)`typeof ${r}`),c=s.let("coerced",(0,Ne._)`undefined`);n.coerceTypes==="array"&&s.if((0,Ne._)`${l} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>s.assign(r,(0,Ne._)`${r}[0]`).assign(l,(0,Ne._)`typeof ${r}`).if(jp(i,r,n.strictNumbers),()=>s.assign(c,r))),s.if((0,Ne._)`${c} !== undefined`);for(let p of t)(uw.has(p)||p==="array"&&n.coerceTypes==="array")&&u(p);s.else(),Dp(e),s.endIf(),s.if((0,Ne._)`${c} !== undefined`,()=>{s.assign(r,c),_O(e,c)});function u(p){switch(p){case"string":s.elseIf((0,Ne._)`${l} == "number" || ${l} == "boolean"`).assign(c,(0,Ne._)`"" + ${r}`).elseIf((0,Ne._)`${r} === null`).assign(c,(0,Ne._)`""`);return;case"number":s.elseIf((0,Ne._)`${l} == "boolean" || ${r} === null
3
3
  || (${l} == "string" && ${r} && ${r} == +${r})`).assign(c,(0,Ne._)`+${r}`);return;case"integer":s.elseIf((0,Ne._)`${l} === "boolean" || ${r} === null
4
4
  || (${l} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(c,(0,Ne._)`+${r}`);return;case"boolean":s.elseIf((0,Ne._)`${r} === "false" || ${r} === 0 || ${r} === null`).assign(c,!1).elseIf((0,Ne._)`${r} === "true" || ${r} === 1`).assign(c,!0);return;case"null":s.elseIf((0,Ne._)`${r} === "" || ${r} === 0 || ${r} === false`),s.assign(c,null);return;case"array":s.elseIf((0,Ne._)`${l} === "string" || ${l} === "number"
@@ -1 +1 @@
1
- import{a as s}from"./chunk-N4GFR6FU.js";import"./chunk-STIDVYXA.js";import"./chunk-AAXZUUFU.js";import"./chunk-TGQIPKOK.js";import"./chunk-54X33YUH.js";import"./chunk-3PGUQRQW.js";import"./chunk-G7VCQ3TG.js";import"./chunk-GEMLIK55.js";import{h as i}from"./chunk-5ZHDYUXA.js";import"./chunk-3PXXHWW2.js";import"./chunk-6H7DHQM2.js";import{eb as t,ja as e}from"./chunk-ZRDN4L2J.js";var u=[{path:"",loadComponent:()=>import("./chunk-2VZ2GCND.js").then(o=>o.AccessoriesComponent)}],c=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[i.forChild(u),i]})}return o})();var l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[s,c]})}return o})();export{l as AccessoriesModule};
1
+ import{a as s}from"./chunk-UO2L3YPH.js";import"./chunk-EBANXPKG.js";import"./chunk-DRKO4DTB.js";import"./chunk-TGQIPKOK.js";import"./chunk-54X33YUH.js";import"./chunk-3PGUQRQW.js";import"./chunk-3SKLXSFI.js";import"./chunk-L2Y7HWNA.js";import{h as i}from"./chunk-5ZHDYUXA.js";import"./chunk-D5Z6KR3J.js";import"./chunk-YK5NYQW5.js";import{eb as t,ja as e}from"./chunk-ZRDN4L2J.js";var u=[{path:"",loadComponent:()=>import("./chunk-AK4UTJX2.js").then(o=>o.AccessoriesComponent)}],c=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[i.forChild(u),i]})}return o})();var l=(()=>{class o{static \u0275fac=function(r){return new(r||o)};static \u0275mod=t({type:o});static \u0275inj=e({imports:[s,c]})}return o})();export{l as AccessoriesModule};
@@ -1 +1 @@
1
- import{b as c}from"./chunk-GEMLIK55.js";import{p as r}from"./chunk-6H7DHQM2.js";import{h as i,ia as a,na as o}from"./chunk-ZRDN4L2J.js";var h=(()=>{class t{cache=null;CACHE_DURATION_MS=6e4;getToken(){let n=Date.now();if(this.cache&&n-this.cache.timestamp<this.CACHE_DURATION_MS)return this.cache.token;let e=window.localStorage.getItem(r.jwt.tokenKey);return this.cache={token:e,timestamp:n},e}invalidateCache(){this.cache=null}static \u0275fac=function(e){return new(e||t)};static \u0275prov=a({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var p=(()=>{class t{$auth=o(c);$tokenCache=o(h);isAuthenticated(){return i(this,null,function*(){if(!this.$tokenCache.getToken())return this.$auth.token=null,this.$auth.user={},this.$tokenCache.invalidateCache(),!1;try{let e=this.$auth.isLoggedIn();return e||(this.$auth.token=null,this.$auth.user={},this.$tokenCache.invalidateCache()),e}catch{return console.warn("Token validation error, clearing auth state"),this.$auth.logout(),this.$tokenCache.invalidateCache(),!1}})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=a({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{h as a,p as b};
1
+ import{b as c}from"./chunk-L2Y7HWNA.js";import{p as r}from"./chunk-YK5NYQW5.js";import{h as i,ia as a,na as o}from"./chunk-ZRDN4L2J.js";var h=(()=>{class t{cache=null;CACHE_DURATION_MS=6e4;getToken(){let n=Date.now();if(this.cache&&n-this.cache.timestamp<this.CACHE_DURATION_MS)return this.cache.token;let e=window.localStorage.getItem(r.jwt.tokenKey);return this.cache={token:e,timestamp:n},e}invalidateCache(){this.cache=null}static \u0275fac=function(e){return new(e||t)};static \u0275prov=a({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var p=(()=>{class t{$auth=o(c);$tokenCache=o(h);isAuthenticated(){return i(this,null,function*(){if(!this.$tokenCache.getToken())return this.$auth.token=null,this.$auth.user={},this.$tokenCache.invalidateCache(),!1;try{let e=this.$auth.isLoggedIn();return e||(this.$auth.token=null,this.$auth.user={},this.$tokenCache.invalidateCache()),e}catch{return console.warn("Token validation error, clearing auth state"),this.$auth.logout(),this.$tokenCache.invalidateCache(),!1}})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=a({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{h as a,p as b};
@@ -1 +1 @@
1
- import{a as pe}from"./chunk-KW5SZ373.js";import{a as ne,b as oe,c as ae}from"./chunk-EQHGBDO3.js";import{c as de}from"./chunk-STIDVYXA.js";import"./chunk-AAXZUUFU.js";import{a as _e}from"./chunk-SJXDE2KC.js";import{a as ce}from"./chunk-FANHX5JR.js";import{a as me}from"./chunk-STRTFJ4I.js";import{m as I,n as ee,t as te}from"./chunk-54X33YUH.js";import{C as Z,c as J,e as K,f as Q,i as U,l as X,m as Y}from"./chunk-3PGUQRQW.js";import"./chunk-G7VCQ3TG.js";import{b as le}from"./chunk-GEMLIK55.js";import"./chunk-5ZHDYUXA.js";import{b as se}from"./chunk-3PXXHWW2.js";import{k as ie,l as S,q as re}from"./chunk-6H7DHQM2.js";import{$b as m,Ab as F,Bb as O,Cb as R,Ib as k,La as W,Lb as b,Nb as d,Pc as G,Qa as i,_b as c,ac as w,db as M,fc as A,gc as T,h as L,hc as E,kc as z,lc as B,mc as j,na as f,pb as C,qb as h,rb as y,rc as s,sa as v,sc as l,ta as x,tb as D,tc as q,ub as P,vb as V,wb as g,x as H,xb as a,yb as r,zb as p}from"./chunk-ZRDN4L2J.js";var ue=(()=>{class t{$activeModal=f(I);dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=M({type:t,selectors:[["ng-component"]],decls:42,vars:30,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fa","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"ms-2"],[1,"mb-0"],[1,"ms-2","mt-2"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"]],template:function(n,o){n&1&&(a(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),c(4),s(5,"translate"),r(),a(6,"button",3),s(7,"translate"),b("click",function(){return o.dismissModal()}),r()(),a(8,"div",4)(9,"div",5),p(10,"i",6),r(),a(11,"h5",7),c(12),s(13,"translate"),r(),a(14,"ul",8)(15,"li"),c(16),s(17,"translate"),r(),a(18,"li"),c(19),s(20,"translate"),r()(),a(21,"h5",9),c(22),s(23,"translate"),r(),a(24,"ul",8)(25,"li"),c(26),s(27,"translate"),r(),a(28,"li"),c(29),s(30,"translate"),r(),a(31,"li"),c(32),s(33,"translate"),r()(),p(34,"app-support-banner"),r(),a(35,"div",10),p(36,"div",11),a(37,"div",12)(38,"button",13),b("click",function(){return o.dismissModal()}),c(39),s(40,"translate"),r()(),p(41,"div",14),r()()()),n&2&&(i(4),m(l(5,10,"support.title")),i(2),C("aria-label",l(7,12,"form.button_close")),i(6),m(l(13,14,"menu.label_accessories")),i(4),m(l(17,16,"accessories.support.acc_1")),i(3),m(l(20,18,"accessories.support.acc_2")),i(3),m(l(23,20,"accessories.title_rooms")),i(4),m(l(27,22,"accessories.support.rooms_1")),i(3),m(l(30,24,"accessories.support.rooms_2")),i(3),m(l(33,26,"accessories.support.rooms_3")),i(7),w(" ",l(40,28,"form.button_close")," "))},dependencies:[_e,S],encapsulation:2})}return t})();var fe=()=>({standalone:!0}),ge=(()=>{class t{$activeModal=f(I);roomName;dismissModal(){this.$activeModal.dismiss("Dismiss")}closeModal(e){this.$activeModal.close(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=M({type:t,selectors:[["ng-component"]],inputs:{roomName:"roomName"},decls:28,vars:19,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-folder-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["autocomplete","off","type","text","id","form-name","autofocus","",1,"form-control","custom-input",3,"ngModelChange","keyup.enter","ngModel","ngModelOptions"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(n,o){n&1&&(a(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),c(4),s(5,"translate"),r(),a(6,"button",3),s(7,"translate"),b("click",function(){return o.dismissModal()}),r()(),a(8,"div",4)(9,"div",5),p(10,"i",6),r(),a(11,"ul",7)(12,"li",8)(13,"label",9),c(14),s(15,"translate"),r(),a(16,"div",10)(17,"input",11),E("ngModelChange",function($){return T(o.roomName,$)||(o.roomName=$),$}),b("keyup.enter",function(){return o.closeModal(o.roomName)}),r()()()()(),a(18,"div",12)(19,"div",13)(20,"button",14),b("click",function(){return o.dismissModal()}),c(21),s(22,"translate"),r()(),p(23,"div",15),a(24,"div",16)(25,"button",17),b("click",function(){return o.closeModal(o.roomName)}),c(26),s(27,"translate"),r()()()()()),n&2&&(i(4),m(l(5,8,"accessories.button_add_room")),i(2),C("aria-label",l(7,10,"form.button_close")),i(8),m(l(15,12,"accessories.room_name")),i(3),A("ngModel",o.roomName),g("ngModelOptions",z(18,fe)),i(4),w(" ",l(22,14,"form.button_close")," "),i(4),g("disabled",!o.roomName),i(),w(" ",l(27,16,"form.button_save")," "))},dependencies:[Z,Y,J,K,Q,X,U,S],encapsulation:2})}return t})();var be=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=M({type:t,selectors:[["app-drag-here-placeholder"]],decls:5,vars:3,consts:[[1,"accessory-box"],[1,"fas","fa-arrow-alt-circle-down","accessory-icon"],[1,"accessory-label"]],template:function(n,o){n&1&&(F(0,"div",0),R(1,"i",1),F(2,"div",2),c(3),s(4,"translate"),O()()),n&2&&(i(3),m(l(4,1,"accessories.control.drag_here")))},dependencies:[S],styles:[".accessory-box[_ngcontent-%COMP%]{opacity:.2}"]})}return t})();var Ce=(t,u)=>({"fa-eye":t,"fa-eye-slash":u}),ve=t=>({"cursor-move":t}),xe=t=>({"justify-content-between":t}),he=t=>({link:t});function ye(t,u){if(t&1){let e=k();a(0,"button",8),s(1,"translate"),s(2,"translate"),b("click",function(){v(e);let o=d(2);return x(o.addRoom())}),p(3,"i",9),r(),a(4,"button",8),s(5,"translate"),s(6,"translate"),s(7,"translate"),s(8,"translate"),b("click",function(){v(e);let o=d(2);return x(o.hideHidden=!o.hideHidden)}),p(9,"i",10),r(),a(10,"div",11)(11,"button",12),s(12,"translate"),s(13,"translate"),b("click",function(){v(e);let o=d(2);return x(o.toggleLayoutLock())}),p(14,"i",13),r(),a(15,"button",12),s(16,"translate"),s(17,"translate"),b("click",function(){v(e);let o=d(2);return x(o.toggleLayoutLock())}),p(18,"i",14),r()()}if(t&2){let e=d(2);g("hidden",e.isMobile)("openDelay",150)("ngbTooltip",l(1,17,"accessories.button_add_room")),C("aria-label",l(2,19,"accessories.button_add_room")),i(4),g("hidden",e.isMobile)("openDelay",150)("ngbTooltip",e.hideHidden?l(5,21,"accessories.button_hidden_show"):l(6,23,"accessories.button_hidden_hide")),C("aria-label",e.hideHidden?l(7,25,"accessories.button_hidden_show"):l(8,27,"accessories.button_hidden_hide")),i(5),g("ngClass",j(37,Ce,!e.hideHidden,e.hideHidden)),i(2),g("disabled",!e.isMobile)("openDelay",150)("ngbTooltip",l(12,29,"form.button_unlock")),C("aria-label",l(13,31,"form.button_unlock")),i(4),g("disabled",e.isMobile)("openDelay",150)("ngbTooltip",l(16,33,"form.button_lock")),C("aria-label",l(17,35,"form.button_lock"))}}function Me(t,u){t&1&&p(0,"app-spinner")}function Se(t,u){if(t&1&&(a(0,"div",0)(1,"div",21)(2,"h5",22),c(3),s(4,"translate"),r()()()),t&2){let e=d().$implicit,n=d(4);i(2),g("ngClass",B(4,ve,!n.isMobile)),i(),w(" ",e.name==="Default Room"?l(4,2,"accessories.control.default_room"):e.name," ")}}function we(t,u){if(t&1&&(a(0,"div",25),p(1,"app-accessory-tile",26),r()),t&2){let e=d().$implicit;i(),g("service",e)}}function ke(t,u){if(t&1&&h(0,we,2,1,"div",25),t&2){let e=u.$implicit,n=d(6);y(!n.hideHidden||!e.hidden?0:-1)}}function Ae(t,u){if(t&1){let e=k();a(0,"div",23),E("dragulaModelChange",function(o){v(e);let _=d().$implicit;return T(_.services,o)||(_.services=o),x(o)}),P(1,ke,1,1,null,null,D),p(3,"div",24)(4,"div",24)(5,"div",24)(6,"div",24)(7,"div",24)(8,"div",24)(9,"div",24)(10,"div",24)(11,"div",24)(12,"div",24),r()}if(t&2){let e=d().$implicit,n=d(4);g("ngClass",B(3,xe,n.isMobile))("dragula","services-bag"),A("dragulaModel",e.services),i(),V(e.services)}}function Te(t,u){if(t&1){let e=k();a(0,"div",27),E("dragulaModelChange",function(o){v(e);let _=d().$implicit;return T(_.services,o)||(_.services=o),x(o)}),p(1,"app-drag-here-placeholder",28),r()}if(t&2){let e=d().$implicit;g("dragula","services-bag"),A("dragulaModel",e.services)}}function Ee(t,u){if(t&1&&(a(0,"div"),h(1,Se,5,6,"div",0),a(2,"div",18),h(3,Ae,13,5,"div",19),h(4,Te,2,2,"div",20),r()()),t&2){let e=u.$implicit,n=d(4);i(),y(!n.isMobile||e.services.length?1:-1),i(2),y(e.services.length?3:-1),i(),y(!e.services.length&&!n.isMobile?4:-1)}}function Be(t,u){if(t&1){let e=k();a(0,"div",17),E("dragulaModelChange",function(o){v(e);let _=d(3);return T(_.$accessories.rooms,o)||(_.$accessories.rooms=o),x(o)}),P(1,Ee,5,3,"div",null,D),r()}if(t&2){let e=d(3);g("dragula","rooms-bag"),A("dragulaModel",e.$accessories.rooms),i(),V(e.$accessories.rooms)}}function Ie(t,u){t&1&&(a(0,"div",16)(1,"div",29)(2,"div",30),p(3,"i",31),r(),a(4,"h5",32),c(5),s(6,"translate"),r(),a(7,"p",33),c(8),s(9,"translate"),r(),a(10,"p",34),c(11),s(12,"translate"),r()()()),t&2&&(i(5),m(l(6,3,"accessories.no_plugins.title")),i(3),m(l(9,5,"accessories.no_plugins.message_1")),i(3),m(l(12,7,"accessories.no_plugins.message_2")))}function $e(t,u){if(t&1&&h(0,Be,3,2,"div",15)(1,Ie,13,9,"div",16),t&2){let e=d(2);y(e.hasPlugins?0:1)}}function De(t,u){if(t&1){let e=k();a(0,"div",1)(1,"div",2)(2,"h3",3),c(3),s(4,"translate"),r()(),a(5,"div",4)(6,"button",5),s(7,"translate"),b("click",function(){v(e);let o=d();return x(o.openSupport())}),p(8,"i",6),r()(),a(9,"div",7),h(10,ye,19,40),a(11,"button",5),s(12,"translate"),b("click",function(){v(e);let o=d();return x(o.openSupport())}),p(13,"i",6),r()()(),h(14,Me,1,0,"app-spinner")(15,$e,2,1)}if(t&2){let e=d();i(3),m(l(4,5,"menu.label_accessories")),i(3),C("aria-label",l(7,7,"support.title")),i(4),y(e.hasPlugins?10:-1),i(),C("aria-label",l(12,9,"support.title")),i(3),y(e.loading?14:15)}}function Pe(t,u){t&1&&(a(0,"p",40),c(1),s(2,"translate"),r()),t&2&&(i(),m(l(2,1,"accessories.settings_link")))}function Ve(t,u){if(t&1&&(a(0,"div",0)(1,"div",35)(2,"h3",36),c(3),s(4,"translate"),r()(),a(5,"div",16)(6,"div",37)(7,"div",30),p(8,"i",38),r(),a(9,"h5",32),c(10),s(11,"translate"),r(),p(12,"p",39),s(13,"translate"),h(14,Pe,3,3,"p",40),r()()()),t&2){let e=d();i(3),m(l(4,4,"menu.label_accessories")),i(7),m(l(11,6,"accessories.control_disabled")),i(2),g("innerHTML",q(13,8,"accessories.message_must_use_insecure_mode",B(11,he,e.linkInsecure)),W),i(2),y(e.isAdmin?14:-1)}}var bt=(()=>{class t{$accessories=f(de);$api=f(re);$auth=f(le);dragulaService=f(ne);$modal=f(ee);$settings=f(se);$md=f(me);$translate=f(ie);orderSubscription;isAdmin=this.$auth.user.admin;enableAccessories=this.$settings.env.enableAccessories;isMobile=!1;hideHidden=!0;linkInsecure='<a href="https://github.com/homebridge/homebridge-config-ui-x/wiki/Enabling-Accessory-Control" target="_blank"><i class="fa fa-external-link-alt primary-text"></i></a>';hasPlugins=!1;loading=!0;constructor(){let e=this.dragulaService;this.isMobile=this.$md.detect.mobile(),e.createGroup("rooms-bag",{moves:(n,o,_)=>!this.isMobile&&_.classList.contains("drag-handle")}),e.createGroup("services-bag",{moves:n=>!this.isMobile&&!n.classList.contains("no-drag")}),this.orderSubscription=e.drop().subscribe(()=>{setTimeout(()=>{this.$accessories.saveLayout()})}),this.isMobile=!0}ngOnInit(){let e=this.$translate.instant("menu.label_accessories");this.$settings.setPageTitle(e),this.$accessories.start(),this.checkForPlugins()}addRoom(){this.$modal.open(ge,{size:"lg",backdrop:"static"}).result.then(e=>{!e||!e.length||this.$accessories.rooms.find(n=>n.name===e)||(this.$accessories.rooms.push({name:e,services:[]}),this.isMobile&&this.toggleLayoutLock())}).catch(()=>{})}toggleLayoutLock(){this.isMobile=!this.isMobile,this.isMobile?document.querySelectorAll(".services-bag").forEach(n=>{for(let o=0;o<10;o+=1){let _=document.createElement("div");_.className="accessory-box invisible py-0 my-0",_.style.height="0",n.appendChild(_)}}):document.querySelectorAll(".invisible").forEach(n=>n.remove())}openSupport(){this.$modal.open(ue,{size:"lg",backdrop:"static"})}ngOnDestroy(){this.$accessories.stop(),this.orderSubscription.unsubscribe(),this.dragulaService.destroy("rooms-bag"),this.dragulaService.destroy("services-bag")}checkForPlugins(){return L(this,null,function*(){try{let e=yield H(this.$api.get("/plugins"));this.hasPlugins=e.length>1}catch(e){console.error(e),this.hasPlugins=!0}finally{this.loading=!1}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=M({type:t,selectors:[["app-accessories"]],decls:2,vars:1,consts:[[1,"row"],[1,"row","mb-3"],[1,"col-9","col-sm-6"],[1,"primary-text","m-0"],[1,"col-3","col-sm-6","text-end","d-inline-block","d-sm-none"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-question-circle-o"],[1,"col-3","col-sm-6","text-end","d-none","d-sm-inline-block"],["type","button","container","body","placement","bottom","triggers","hover",1,"btn","btn-elegant","my-0","me-2",3,"click","hidden","openDelay","ngbTooltip"],[1,"fas","fa-folder-plus"],[1,"fas",3,"ngClass"],["role","group",1,"btn-group","me-2"],["type","button","container","body","placement","bottom","triggers","hover",1,"btn","btn-elegant","my-0",3,"click","disabled","openDelay","ngbTooltip"],[1,"fas","fa-unlock"],[1,"fas","fa-lock"],[3,"dragula","dragulaModel"],[1,"col-12","text-center"],[3,"dragulaModelChange","dragula","dragulaModel"],[1,"row","mb-4"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"ngClass","dragula","dragulaModel"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragula","dragulaModel"],[1,"col-md-12"],[1,"primary-text","drag-handle","room-title","m-0","mb-1","mb-sm-0",3,"ngClass"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"dragulaModelChange","ngClass","dragula","dragulaModel"],[1,"accessory-box","invisible","py-0","my-0",2,"height","0"],[1,"accessory-item","accessory-tab"],[3,"service"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragulaModelChange","dragula","dragulaModel"],[1,"no-drag"],["role","alert",1,"alert","alert-warning","p-5"],[1,"text-center","mb-3"],[1,"fas","fa-plug","primary-text",2,"font-size","75px"],[1,"mb-3","mt-0"],[1,"mb-0","small"],[1,"mb-0","small","mt-2"],[1,"col-12"],[1,"primary-text","m-0","mb-3"],["role","alert",1,"alert","alert-warning","p-4"],[1,"fas","fa-lightbulb","primary-text",2,"font-size","75px"],[1,"mb-0","small",3,"innerHTML"],[1,"mt-2","mb-0","small"]],template:function(n,o){n&1&&h(0,De,16,11)(1,Ve,15,13,"div",0),n&2&&y(o.enableAccessories?0:1)},dependencies:[te,G,ae,oe,pe,be,ce,S],styles:[".room-title[_ngcontent-%COMP%]{margin-left:10px}@media (max-width: 575px){.room-title[_ngcontent-%COMP%]{margin-left:7px}}.services-bag[_ngcontent-%COMP%]{min-height:170px}@media (max-width: 575px){.services-bag[_ngcontent-%COMP%]{min-height:initial}}.cursor-move[_ngcontent-%COMP%]{cursor:move}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return t})();export{bt as AccessoriesComponent};
1
+ import{a as pe}from"./chunk-XPGD2BHY.js";import{a as ne,b as oe,c as ae}from"./chunk-EQHGBDO3.js";import{c as de}from"./chunk-EBANXPKG.js";import"./chunk-DRKO4DTB.js";import{a as _e}from"./chunk-N2EK3VS7.js";import{a as ce}from"./chunk-FANHX5JR.js";import{a as me}from"./chunk-STRTFJ4I.js";import{m as I,n as ee,t as te}from"./chunk-54X33YUH.js";import{C as Z,c as J,e as K,f as Q,i as U,l as X,m as Y}from"./chunk-3PGUQRQW.js";import"./chunk-3SKLXSFI.js";import{b as le}from"./chunk-L2Y7HWNA.js";import"./chunk-5ZHDYUXA.js";import{b as se}from"./chunk-D5Z6KR3J.js";import{k as ie,l as S,q as re}from"./chunk-YK5NYQW5.js";import{$b as m,Ab as F,Bb as O,Cb as R,Ib as k,La as W,Lb as b,Nb as d,Pc as G,Qa as i,_b as c,ac as w,db as M,fc as A,gc as T,h as L,hc as E,kc as z,lc as B,mc as j,na as f,pb as C,qb as h,rb as y,rc as s,sa as v,sc as l,ta as x,tb as D,tc as q,ub as P,vb as V,wb as g,x as H,xb as a,yb as r,zb as p}from"./chunk-ZRDN4L2J.js";var ue=(()=>{class t{$activeModal=f(I);dismissModal(){this.$activeModal.dismiss("Dismiss")}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=M({type:t,selectors:[["ng-component"]],decls:42,vars:30,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fa","fa-question-circle-o","primary-text",2,"font-size","75px"],[1,"ms-2"],[1,"mb-0"],[1,"ms-2","mt-2"],[1,"modal-footer","justify-content-between"],[1,"text-start"],[1,"text-center"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-end"]],template:function(n,o){n&1&&(a(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),c(4),s(5,"translate"),r(),a(6,"button",3),s(7,"translate"),b("click",function(){return o.dismissModal()}),r()(),a(8,"div",4)(9,"div",5),p(10,"i",6),r(),a(11,"h5",7),c(12),s(13,"translate"),r(),a(14,"ul",8)(15,"li"),c(16),s(17,"translate"),r(),a(18,"li"),c(19),s(20,"translate"),r()(),a(21,"h5",9),c(22),s(23,"translate"),r(),a(24,"ul",8)(25,"li"),c(26),s(27,"translate"),r(),a(28,"li"),c(29),s(30,"translate"),r(),a(31,"li"),c(32),s(33,"translate"),r()(),p(34,"app-support-banner"),r(),a(35,"div",10),p(36,"div",11),a(37,"div",12)(38,"button",13),b("click",function(){return o.dismissModal()}),c(39),s(40,"translate"),r()(),p(41,"div",14),r()()()),n&2&&(i(4),m(l(5,10,"support.title")),i(2),C("aria-label",l(7,12,"form.button_close")),i(6),m(l(13,14,"menu.label_accessories")),i(4),m(l(17,16,"accessories.support.acc_1")),i(3),m(l(20,18,"accessories.support.acc_2")),i(3),m(l(23,20,"accessories.title_rooms")),i(4),m(l(27,22,"accessories.support.rooms_1")),i(3),m(l(30,24,"accessories.support.rooms_2")),i(3),m(l(33,26,"accessories.support.rooms_3")),i(7),w(" ",l(40,28,"form.button_close")," "))},dependencies:[_e,S],encapsulation:2})}return t})();var fe=()=>({standalone:!0}),ge=(()=>{class t{$activeModal=f(I);roomName;dismissModal(){this.$activeModal.dismiss("Dismiss")}closeModal(e){this.$activeModal.close(e)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=M({type:t,selectors:[["ng-component"]],inputs:{roomName:"roomName"},decls:28,vars:19,consts:[[1,"modal-content"],[1,"modal-header"],[1,"modal-title"],["type","button","data-bs-dismiss","modal",1,"btn-close",3,"click"],[1,"modal-body"],[1,"text-center","mb-3"],[1,"fas","fa-folder-plus","primary-text",2,"font-size","75px"],[1,"list-group","list-group-box","mb-0"],[1,"list-group-item","d-flex","flex-column","flex-md-row","align-items-center"],["for","form-name",1,"mb-2","mb-md-0","w-100","w-md-50"],[1,"text-start","text-md-end","w-100","w-md-50"],["autocomplete","off","type","text","id","form-name","autofocus","",1,"form-control","custom-input",3,"ngModelChange","keyup.enter","ngModel","ngModelOptions"],[1,"modal-footer","justify-content-between"],[1,"text-start"],["type","button","data-bs-dismiss","modal",1,"btn","btn-elegant",3,"click"],[1,"text-center"],[1,"text-end"],["type","button","data-bs-dismiss","modal",1,"btn","btn-primary",3,"click","disabled"]],template:function(n,o){n&1&&(a(0,"div",0)(1,"form")(2,"div",1)(3,"h5",2),c(4),s(5,"translate"),r(),a(6,"button",3),s(7,"translate"),b("click",function(){return o.dismissModal()}),r()(),a(8,"div",4)(9,"div",5),p(10,"i",6),r(),a(11,"ul",7)(12,"li",8)(13,"label",9),c(14),s(15,"translate"),r(),a(16,"div",10)(17,"input",11),E("ngModelChange",function($){return T(o.roomName,$)||(o.roomName=$),$}),b("keyup.enter",function(){return o.closeModal(o.roomName)}),r()()()()(),a(18,"div",12)(19,"div",13)(20,"button",14),b("click",function(){return o.dismissModal()}),c(21),s(22,"translate"),r()(),p(23,"div",15),a(24,"div",16)(25,"button",17),b("click",function(){return o.closeModal(o.roomName)}),c(26),s(27,"translate"),r()()()()()),n&2&&(i(4),m(l(5,8,"accessories.button_add_room")),i(2),C("aria-label",l(7,10,"form.button_close")),i(8),m(l(15,12,"accessories.room_name")),i(3),A("ngModel",o.roomName),g("ngModelOptions",z(18,fe)),i(4),w(" ",l(22,14,"form.button_close")," "),i(4),g("disabled",!o.roomName),i(),w(" ",l(27,16,"form.button_save")," "))},dependencies:[Z,Y,J,K,Q,X,U,S],encapsulation:2})}return t})();var be=(()=>{class t{static \u0275fac=function(n){return new(n||t)};static \u0275cmp=M({type:t,selectors:[["app-drag-here-placeholder"]],decls:5,vars:3,consts:[[1,"accessory-box"],[1,"fas","fa-arrow-alt-circle-down","accessory-icon"],[1,"accessory-label"]],template:function(n,o){n&1&&(F(0,"div",0),R(1,"i",1),F(2,"div",2),c(3),s(4,"translate"),O()()),n&2&&(i(3),m(l(4,1,"accessories.control.drag_here")))},dependencies:[S],styles:[".accessory-box[_ngcontent-%COMP%]{opacity:.2}"]})}return t})();var Ce=(t,u)=>({"fa-eye":t,"fa-eye-slash":u}),ve=t=>({"cursor-move":t}),xe=t=>({"justify-content-between":t}),he=t=>({link:t});function ye(t,u){if(t&1){let e=k();a(0,"button",8),s(1,"translate"),s(2,"translate"),b("click",function(){v(e);let o=d(2);return x(o.addRoom())}),p(3,"i",9),r(),a(4,"button",8),s(5,"translate"),s(6,"translate"),s(7,"translate"),s(8,"translate"),b("click",function(){v(e);let o=d(2);return x(o.hideHidden=!o.hideHidden)}),p(9,"i",10),r(),a(10,"div",11)(11,"button",12),s(12,"translate"),s(13,"translate"),b("click",function(){v(e);let o=d(2);return x(o.toggleLayoutLock())}),p(14,"i",13),r(),a(15,"button",12),s(16,"translate"),s(17,"translate"),b("click",function(){v(e);let o=d(2);return x(o.toggleLayoutLock())}),p(18,"i",14),r()()}if(t&2){let e=d(2);g("hidden",e.isMobile)("openDelay",150)("ngbTooltip",l(1,17,"accessories.button_add_room")),C("aria-label",l(2,19,"accessories.button_add_room")),i(4),g("hidden",e.isMobile)("openDelay",150)("ngbTooltip",e.hideHidden?l(5,21,"accessories.button_hidden_show"):l(6,23,"accessories.button_hidden_hide")),C("aria-label",e.hideHidden?l(7,25,"accessories.button_hidden_show"):l(8,27,"accessories.button_hidden_hide")),i(5),g("ngClass",j(37,Ce,!e.hideHidden,e.hideHidden)),i(2),g("disabled",!e.isMobile)("openDelay",150)("ngbTooltip",l(12,29,"form.button_unlock")),C("aria-label",l(13,31,"form.button_unlock")),i(4),g("disabled",e.isMobile)("openDelay",150)("ngbTooltip",l(16,33,"form.button_lock")),C("aria-label",l(17,35,"form.button_lock"))}}function Me(t,u){t&1&&p(0,"app-spinner")}function Se(t,u){if(t&1&&(a(0,"div",0)(1,"div",21)(2,"h5",22),c(3),s(4,"translate"),r()()()),t&2){let e=d().$implicit,n=d(4);i(2),g("ngClass",B(4,ve,!n.isMobile)),i(),w(" ",e.name==="Default Room"?l(4,2,"accessories.control.default_room"):e.name," ")}}function we(t,u){if(t&1&&(a(0,"div",25),p(1,"app-accessory-tile",26),r()),t&2){let e=d().$implicit;i(),g("service",e)}}function ke(t,u){if(t&1&&h(0,we,2,1,"div",25),t&2){let e=u.$implicit,n=d(6);y(!n.hideHidden||!e.hidden?0:-1)}}function Ae(t,u){if(t&1){let e=k();a(0,"div",23),E("dragulaModelChange",function(o){v(e);let _=d().$implicit;return T(_.services,o)||(_.services=o),x(o)}),P(1,ke,1,1,null,null,D),p(3,"div",24)(4,"div",24)(5,"div",24)(6,"div",24)(7,"div",24)(8,"div",24)(9,"div",24)(10,"div",24)(11,"div",24)(12,"div",24),r()}if(t&2){let e=d().$implicit,n=d(4);g("ngClass",B(3,xe,n.isMobile))("dragula","services-bag"),A("dragulaModel",e.services),i(),V(e.services)}}function Te(t,u){if(t&1){let e=k();a(0,"div",27),E("dragulaModelChange",function(o){v(e);let _=d().$implicit;return T(_.services,o)||(_.services=o),x(o)}),p(1,"app-drag-here-placeholder",28),r()}if(t&2){let e=d().$implicit;g("dragula","services-bag"),A("dragulaModel",e.services)}}function Ee(t,u){if(t&1&&(a(0,"div"),h(1,Se,5,6,"div",0),a(2,"div",18),h(3,Ae,13,5,"div",19),h(4,Te,2,2,"div",20),r()()),t&2){let e=u.$implicit,n=d(4);i(),y(!n.isMobile||e.services.length?1:-1),i(2),y(e.services.length?3:-1),i(),y(!e.services.length&&!n.isMobile?4:-1)}}function Be(t,u){if(t&1){let e=k();a(0,"div",17),E("dragulaModelChange",function(o){v(e);let _=d(3);return T(_.$accessories.rooms,o)||(_.$accessories.rooms=o),x(o)}),P(1,Ee,5,3,"div",null,D),r()}if(t&2){let e=d(3);g("dragula","rooms-bag"),A("dragulaModel",e.$accessories.rooms),i(),V(e.$accessories.rooms)}}function Ie(t,u){t&1&&(a(0,"div",16)(1,"div",29)(2,"div",30),p(3,"i",31),r(),a(4,"h5",32),c(5),s(6,"translate"),r(),a(7,"p",33),c(8),s(9,"translate"),r(),a(10,"p",34),c(11),s(12,"translate"),r()()()),t&2&&(i(5),m(l(6,3,"accessories.no_plugins.title")),i(3),m(l(9,5,"accessories.no_plugins.message_1")),i(3),m(l(12,7,"accessories.no_plugins.message_2")))}function $e(t,u){if(t&1&&h(0,Be,3,2,"div",15)(1,Ie,13,9,"div",16),t&2){let e=d(2);y(e.hasPlugins?0:1)}}function De(t,u){if(t&1){let e=k();a(0,"div",1)(1,"div",2)(2,"h3",3),c(3),s(4,"translate"),r()(),a(5,"div",4)(6,"button",5),s(7,"translate"),b("click",function(){v(e);let o=d();return x(o.openSupport())}),p(8,"i",6),r()(),a(9,"div",7),h(10,ye,19,40),a(11,"button",5),s(12,"translate"),b("click",function(){v(e);let o=d();return x(o.openSupport())}),p(13,"i",6),r()()(),h(14,Me,1,0,"app-spinner")(15,$e,2,1)}if(t&2){let e=d();i(3),m(l(4,5,"menu.label_accessories")),i(3),C("aria-label",l(7,7,"support.title")),i(4),y(e.hasPlugins?10:-1),i(),C("aria-label",l(12,9,"support.title")),i(3),y(e.loading?14:15)}}function Pe(t,u){t&1&&(a(0,"p",40),c(1),s(2,"translate"),r()),t&2&&(i(),m(l(2,1,"accessories.settings_link")))}function Ve(t,u){if(t&1&&(a(0,"div",0)(1,"div",35)(2,"h3",36),c(3),s(4,"translate"),r()(),a(5,"div",16)(6,"div",37)(7,"div",30),p(8,"i",38),r(),a(9,"h5",32),c(10),s(11,"translate"),r(),p(12,"p",39),s(13,"translate"),h(14,Pe,3,3,"p",40),r()()()),t&2){let e=d();i(3),m(l(4,4,"menu.label_accessories")),i(7),m(l(11,6,"accessories.control_disabled")),i(2),g("innerHTML",q(13,8,"accessories.message_must_use_insecure_mode",B(11,he,e.linkInsecure)),W),i(2),y(e.isAdmin?14:-1)}}var bt=(()=>{class t{$accessories=f(de);$api=f(re);$auth=f(le);dragulaService=f(ne);$modal=f(ee);$settings=f(se);$md=f(me);$translate=f(ie);orderSubscription;isAdmin=this.$auth.user.admin;enableAccessories=this.$settings.env.enableAccessories;isMobile=!1;hideHidden=!0;linkInsecure='<a href="https://github.com/homebridge/homebridge-config-ui-x/wiki/Enabling-Accessory-Control" target="_blank"><i class="fa fa-external-link-alt primary-text"></i></a>';hasPlugins=!1;loading=!0;constructor(){let e=this.dragulaService;this.isMobile=this.$md.detect.mobile(),e.createGroup("rooms-bag",{moves:(n,o,_)=>!this.isMobile&&_.classList.contains("drag-handle")}),e.createGroup("services-bag",{moves:n=>!this.isMobile&&!n.classList.contains("no-drag")}),this.orderSubscription=e.drop().subscribe(()=>{setTimeout(()=>{this.$accessories.saveLayout()})}),this.isMobile=!0}ngOnInit(){let e=this.$translate.instant("menu.label_accessories");this.$settings.setPageTitle(e),this.$accessories.start(),this.checkForPlugins()}addRoom(){this.$modal.open(ge,{size:"lg",backdrop:"static"}).result.then(e=>{!e||!e.length||this.$accessories.rooms.find(n=>n.name===e)||(this.$accessories.rooms.push({name:e,services:[]}),this.isMobile&&this.toggleLayoutLock())}).catch(()=>{})}toggleLayoutLock(){this.isMobile=!this.isMobile,this.isMobile?document.querySelectorAll(".services-bag").forEach(n=>{for(let o=0;o<10;o+=1){let _=document.createElement("div");_.className="accessory-box invisible py-0 my-0",_.style.height="0",n.appendChild(_)}}):document.querySelectorAll(".invisible").forEach(n=>n.remove())}openSupport(){this.$modal.open(ue,{size:"lg",backdrop:"static"})}ngOnDestroy(){this.$accessories.stop(),this.orderSubscription.unsubscribe(),this.dragulaService.destroy("rooms-bag"),this.dragulaService.destroy("services-bag")}checkForPlugins(){return L(this,null,function*(){try{let e=yield H(this.$api.get("/plugins"));this.hasPlugins=e.length>1}catch(e){console.error(e),this.hasPlugins=!0}finally{this.loading=!1}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=M({type:t,selectors:[["app-accessories"]],decls:2,vars:1,consts:[[1,"row"],[1,"row","mb-3"],[1,"col-9","col-sm-6"],[1,"primary-text","m-0"],[1,"col-3","col-sm-6","text-end","d-inline-block","d-sm-none"],["type","button",1,"btn","btn-elegant","my-0","me-0",3,"click"],[1,"fa","fa-question-circle-o"],[1,"col-3","col-sm-6","text-end","d-none","d-sm-inline-block"],["type","button","container","body","placement","bottom","triggers","hover",1,"btn","btn-elegant","my-0","me-2",3,"click","hidden","openDelay","ngbTooltip"],[1,"fas","fa-folder-plus"],[1,"fas",3,"ngClass"],["role","group",1,"btn-group","me-2"],["type","button","container","body","placement","bottom","triggers","hover",1,"btn","btn-elegant","my-0",3,"click","disabled","openDelay","ngbTooltip"],[1,"fas","fa-unlock"],[1,"fas","fa-lock"],[3,"dragula","dragulaModel"],[1,"col-12","text-center"],[3,"dragulaModelChange","dragula","dragulaModel"],[1,"row","mb-4"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"ngClass","dragula","dragulaModel"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragula","dragulaModel"],[1,"col-md-12"],[1,"primary-text","drag-handle","room-title","m-0","mb-1","mb-sm-0",3,"ngClass"],[1,"col-md-12","d-flex","flex-wrap","noselect","services-bag",3,"dragulaModelChange","ngClass","dragula","dragulaModel"],[1,"accessory-box","invisible","py-0","my-0",2,"height","0"],[1,"accessory-item","accessory-tab"],[3,"service"],[1,"col-md-12","d-flex","flex-wrap","noselect",3,"dragulaModelChange","dragula","dragulaModel"],[1,"no-drag"],["role","alert",1,"alert","alert-warning","p-5"],[1,"text-center","mb-3"],[1,"fas","fa-plug","primary-text",2,"font-size","75px"],[1,"mb-3","mt-0"],[1,"mb-0","small"],[1,"mb-0","small","mt-2"],[1,"col-12"],[1,"primary-text","m-0","mb-3"],["role","alert",1,"alert","alert-warning","p-4"],[1,"fas","fa-lightbulb","primary-text",2,"font-size","75px"],[1,"mb-0","small",3,"innerHTML"],[1,"mt-2","mb-0","small"]],template:function(n,o){n&1&&h(0,De,16,11)(1,Ve,15,13,"div",0),n&2&&y(o.enableAccessories?0:1)},dependencies:[te,G,ae,oe,pe,be,ce,S],styles:[".room-title[_ngcontent-%COMP%]{margin-left:10px}@media (max-width: 575px){.room-title[_ngcontent-%COMP%]{margin-left:7px}}.services-bag[_ngcontent-%COMP%]{min-height:170px}@media (max-width: 575px){.services-bag[_ngcontent-%COMP%]{min-height:initial}}.cursor-move[_ngcontent-%COMP%]{cursor:move}a[_ngcontent-%COMP%]:hover{text-decoration:none!important}"]})}return t})();export{bt as AccessoriesComponent};