@sync-in/server 1.3.0 → 1.3.1
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.
- package/CHANGELOG.md +9 -0
- package/environment/environment.dist.yaml +1 -1
- package/package.json +1 -1
- package/server/configuration/config.loader.js +1 -1
- package/server/configuration/config.loader.js.map +1 -1
- package/server/configuration/config.validation.js +2 -0
- package/server/configuration/config.validation.js.map +1 -1
- package/static/{chunk-UV4UIX6J.js → chunk-2CQOSX2Q.js} +1 -1
- package/static/{chunk-7WRQICEB.js → chunk-2QEYCCHN.js} +1 -1
- package/static/{chunk-QFRQQ4K3.js → chunk-2SX3MVH3.js} +1 -1
- package/static/{chunk-GWUCWOVK.js → chunk-2XXS272C.js} +1 -1
- package/static/{chunk-ZVPX26RB.js → chunk-3RLZPQMJ.js} +1 -1
- package/static/{chunk-3V7XYPSJ.js → chunk-5JDPARJT.js} +1 -1
- package/static/{chunk-2EBPSJJT.js → chunk-5OIPLRAE.js} +1 -1
- package/static/{chunk-7PCJMNDR.js → chunk-7U66TR6P.js} +1 -1
- package/static/{chunk-IFJD2ISM.js → chunk-AA6ZTGRW.js} +1 -1
- package/static/{chunk-WTPZUBNX.js → chunk-AXITQYVN.js} +1 -1
- package/static/{chunk-OWGR4BYT.js → chunk-AYEOHGUD.js} +1 -1
- package/static/{chunk-NPLV4M2H.js → chunk-CTWOQLAR.js} +1 -1
- package/static/{chunk-O4CXCITB.js → chunk-EWY4ALVF.js} +1 -1
- package/static/{chunk-5RFOYHL3.js → chunk-FBG4NUDE.js} +1 -1
- package/static/{chunk-ATFX6EIO.js → chunk-GI2LXVWQ.js} +1 -1
- package/static/{chunk-NU3TPXFY.js → chunk-HDDBV3QQ.js} +1 -1
- package/static/{chunk-I644MKAO.js → chunk-HQC3W7BS.js} +1 -1
- package/static/{chunk-4IYQWOGR.js → chunk-LHKO5Y4A.js} +1 -1
- package/static/{chunk-MQZEETHL.js → chunk-NCIAR3N4.js} +1 -1
- package/static/{chunk-VBD7QTEP.js → chunk-R4USKWW6.js} +1 -1
- package/static/{chunk-XI72YZ2M.js → chunk-RGONEEJE.js} +1 -1
- package/static/{chunk-AKM2LQUU.js → chunk-TFBTBTPR.js} +1 -1
- package/static/{chunk-RUNMEQOV.js → chunk-VIL6L67B.js} +1 -1
- package/static/{chunk-Z6IHRUVL.js → chunk-WA3LPP4G.js} +1 -1
- package/static/{chunk-MEKYVWV4.js → chunk-WQPVP63E.js} +1 -1
- package/static/{chunk-ATLT5DK5.js → chunk-Y6IYSEKU.js} +1 -1
- package/static/{chunk-IUUTIYHF.js → chunk-ZS5YIDNI.js} +1 -1
- package/static/{chunk-VQRN7HFP.js → chunk-ZSMTUPAP.js} +1 -1
- package/static/{chunk-RAVRSB6R.js → chunk-ZZGFGD5E.js} +1 -1
- package/static/index.html +1 -1
- package/static/{main-ILCPT3IK.js → main-7IVUWYWM.js} +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as O,$a as ve,Da as ye,Ea as Y,Ib as Ee,P as ue,Pa as _e,Qb as ft,R as le,S as Rt,Sb as pt,Ua as be,V as $,X as fe,Y as pe,Z as de,_ as Ct,aa as me,ba as ge,ca as L,f as ce,rb as P,sb as Se,tb as T}from"./chunk-NU3TPXFY.js";import{Eb as ct,G as zt,L as Zt,Lb as ne,Mc as ut,Nb as oe,Ob as ae,Od as he,W as te,Wa as re,Wc as lt,Xa as D,Xb as ht,ba as H,bb as nt,c as Xt,ca as st,cb as ot,da as rt,fa as ee,ha as _,kb as at,kc as Ot,nb as Tt,oa as ie,v as p,za as se}from"./chunk-FPEGN42P.js";import{a as it,b as jt,c as Qt,e as Jt}from"./chunk-GAL4ENT6.js";var ke={NAME_SPACE:"/",EVENTS:{NOTIFICATION:"notification"}};var G={NAME_SPACE:"/",EVENTS:{ONLINE_STATUS:"onlineStatus",ONLINE_USERS:"onlineUsers",ONLINE_USER:"onlineUser"}};var dt=class{constructor(e){this.parentGroup=e.parentGroup,this.members=e.members.map(t=>new T(t))}};var R=class{constructor(e){this.newly=0,this.currentAccessHover=!1,this.setManagers(e),Object.assign(this,e),this.avatarUrl=P(e.login),this.userIsActiveText=this.isActive?"active":"suspended",this.hTimeAgo=(0,ce.default)(this.currentAccess).fromNow(!0),this.newly=ve(this.currentAccess)}setManagers(e){e?.managers&&(e.managers=e.managers.map(t=>new T(t)))}};var W=class{constructor(e){this.setOnlineStatus(_e("status",e)),this.avatarUrl=P(e.login),Object.assign(this,e)}setOnlineStatus(e){this.onlineStatus=e,this.onlineTextStatus=ue[e]}};var Gt={};Jt(Gt,{Fetch:()=>z,Manager:()=>B,NodeWebSocket:()=>w,NodeXHR:()=>k,Socket:()=>x,WebSocket:()=>w,WebTransport:()=>C,XHR:()=>k,connect:()=>I,default:()=>I,io:()=>I,protocol:()=>$t});var y=Object.create(null);y.open="0";y.close="1";y.ping="2";y.pong="3";y.message="4";y.upgrade="5";y.noop="6";var K=Object.create(null);Object.keys(y).forEach(s=>{K[y[s]]=s});var j={type:"error",data:"parser error"};var Te=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Oe=typeof ArrayBuffer=="function",Re=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s&&s.buffer instanceof ArrayBuffer,Q=({type:s,data:e},t,i)=>Te&&e instanceof Blob?t?i(e):we(e,i):Oe&&(e instanceof ArrayBuffer||Re(e))?t?i(e):we(new Blob([e]),i):i(y[s]+(e||"")),we=(s,e)=>{let t=new FileReader;return t.onload=function(){let i=t.result.split(",")[1];e("b"+(i||""))},t.readAsDataURL(s)};function Ae(s){return s instanceof Uint8Array?s:s instanceof ArrayBuffer?new Uint8Array(s):new Uint8Array(s.buffer,s.byteOffset,s.byteLength)}var xt;function Ce(s,e){if(Te&&s.data instanceof Blob)return s.data.arrayBuffer().then(Ae).then(e);if(Oe&&(s.data instanceof ArrayBuffer||Re(s.data)))return e(Ae(s.data));Q(s,!1,t=>{xt||(xt=new TextEncoder),e(xt.encode(t))})}var xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",J=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let s=0;s<xe.length;s++)J[xe.charCodeAt(s)]=s;var Ne=s=>{let e=s.length*.75,t=s.length,i,r=0,n,o,a,c;s[s.length-1]==="="&&(e--,s[s.length-2]==="="&&e--);let b=new ArrayBuffer(e),m=new Uint8Array(b);for(i=0;i<t;i+=4)n=J[s.charCodeAt(i)],o=J[s.charCodeAt(i+1)],a=J[s.charCodeAt(i+2)],c=J[s.charCodeAt(i+3)],m[r++]=n<<2|o>>4,m[r++]=(o&15)<<4|a>>2,m[r++]=(a&3)<<6|c&63;return b};var ri=typeof ArrayBuffer=="function",X=(s,e)=>{if(typeof s!="string")return{type:"message",data:Be(s,e)};let t=s.charAt(0);return t==="b"?{type:"message",data:ni(s.substring(1),e)}:K[t]?s.length>1?{type:K[t],data:s.substring(1)}:{type:K[t]}:j},ni=(s,e)=>{if(ri){let t=Ne(s);return Be(t,e)}else return{base64:!0,data:s}},Be=(s,e)=>{switch(e){case"blob":return s instanceof Blob?s:new Blob([s]);case"arraybuffer":default:return s instanceof ArrayBuffer?s:s.buffer}};var Ie="",De=(s,e)=>{let t=s.length,i=new Array(t),r=0;s.forEach((n,o)=>{Q(n,!1,a=>{i[o]=a,++r===t&&e(i.join(Ie))})})},Le=(s,e)=>{let t=s.split(Ie),i=[];for(let r=0;r<t.length;r++){let n=X(t[r],e);if(i.push(n),n.type==="error")break}return i};function Pe(){return new TransformStream({transform(s,e){Ce(s,t=>{let i=t.length,r;if(i<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,i);else if(i<65536){r=new Uint8Array(3);let n=new DataView(r.buffer);n.setUint8(0,126),n.setUint16(1,i)}else{r=new Uint8Array(9);let n=new DataView(r.buffer);n.setUint8(0,127),n.setBigUint64(1,BigInt(i))}s.data&&typeof s.data!="string"&&(r[0]|=128),e.enqueue(r),e.enqueue(t)})}})}var Nt;function mt(s){return s.reduce((e,t)=>e+t.length,0)}function gt(s,e){if(s[0].length===e)return s.shift();let t=new Uint8Array(e),i=0;for(let r=0;r<e;r++)t[r]=s[0][i++],i===s[0].length&&(s.shift(),i=0);return s.length&&i<s[0].length&&(s[0]=s[0].slice(i)),t}function Ue(s,e){Nt||(Nt=new TextDecoder);let t=[],i=0,r=-1,n=!1;return new TransformStream({transform(o,a){for(t.push(o);;){if(i===0){if(mt(t)<1)break;let c=gt(t,1);n=(c[0]&128)===128,r=c[0]&127,r<126?i=3:r===126?i=1:i=2}else if(i===1){if(mt(t)<2)break;let c=gt(t,2);r=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),i=3}else if(i===2){if(mt(t)<8)break;let c=gt(t,8),b=new DataView(c.buffer,c.byteOffset,c.length),m=b.getUint32(0);if(m>Math.pow(2,21)-1){a.enqueue(j);break}r=m*Math.pow(2,32)+b.getUint32(4),i=3}else{if(mt(t)<r)break;let c=gt(t,r);a.enqueue(X(n?c:Nt.decode(c),e)),i=0}if(r===0||r>s){a.enqueue(j);break}}}})}var Bt=4;function u(s){if(s)return oi(s)}function oi(s){for(var e in u.prototype)s[e]=u.prototype[e];return s}u.prototype.on=u.prototype.addEventListener=function(s,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+s]=this._callbacks["$"+s]||[]).push(e),this};u.prototype.once=function(s,e){function t(){this.off(s,t),e.apply(this,arguments)}return t.fn=e,this.on(s,t),this};u.prototype.off=u.prototype.removeListener=u.prototype.removeAllListeners=u.prototype.removeEventListener=function(s,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+s];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+s],this;for(var i,r=0;r<t.length;r++)if(i=t[r],i===e||i.fn===e){t.splice(r,1);break}return t.length===0&&delete this._callbacks["$"+s],this};u.prototype.emit=function(s){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+s],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(t){t=t.slice(0);for(var i=0,r=t.length;i<r;++i)t[i].apply(this,e)}return this};u.prototype.emitReserved=u.prototype.emit;u.prototype.listeners=function(s){return this._callbacks=this._callbacks||{},this._callbacks["$"+s]||[]};u.prototype.hasListeners=function(s){return!!this.listeners(s).length};var v=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),l=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Fe="arraybuffer";function yt(s,...e){return e.reduce((t,i)=>(s.hasOwnProperty(i)&&(t[i]=s[i]),t),{})}var ai=l.setTimeout,ci=l.clearTimeout;function S(s,e){e.useNativeTimers?(s.setTimeoutFn=ai.bind(l),s.clearTimeoutFn=ci.bind(l)):(s.setTimeoutFn=l.setTimeout.bind(l),s.clearTimeoutFn=l.clearTimeout.bind(l))}var hi=1.33;function Me(s){return typeof s=="string"?ui(s):Math.ceil((s.byteLength||s.size)*hi)}function ui(s){let e=0,t=0;for(let i=0,r=s.length;i<r;i++)e=s.charCodeAt(i),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(i++,t+=4);return t}function _t(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Ve(s){let e="";for(let t in s)s.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(s[t]));return e}function qe(s){let e={},t=s.split("&");for(let i=0,r=t.length;i<r;i++){let n=t[i].split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e}var bt=class extends Error{constructor(e,t,i){super(e),this.description=t,this.context=i,this.type="TransportError"}},E=class extends u{constructor(e){super(),this.writable=!1,S(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,i){return super.emitReserved("error",new bt(e,t,i)),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=X(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=Ve(e);return t.length?"?"+t:""}};var U=class extends E{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 i=0;this._polling&&(i++,this.once("pollComplete",function(){--i||t()})),this.writable||(i++,this.once("drain",function(){--i||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let t=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};Le(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,De(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]=_t()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}};var He=!1;try{He=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var $e=He;function li(){}var It=class extends U{constructor(e){if(super(e),typeof location<"u"){let t=location.protocol==="https:",i=location.port;i||(i=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||i!==e.port}}doWrite(e,t){let i=this.request({method:"POST",data:e});i.on("success",t),i.on("error",(r,n)=>{this.onError("xhr post error",r,n)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,i)=>{this.onError("xhr poll error",t,i)}),this.pollXhr=e}},vt=(()=>{class s extends u{constructor(t,i,r){super(),this.createRequest=t,S(this,r),this._opts=r,this._method=r.method||"GET",this._uri=i,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;let i=yt(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(i);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&r.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var n;r.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=s.requestsCount++,s.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=li,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete s.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 s.requestsCount=0,s.requests={},s})();if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ye);else if(typeof addEventListener=="function"){let s="onpagehide"in l?"pagehide":"unload";addEventListener(s,Ye,!1)}}function Ye(){for(let s in vt.requests)vt.requests.hasOwnProperty(s)&&vt.requests[s].abort()}var fi=function(){let s=Ge({xdomain:!1});return s&&s.responseType!==null}(),k=class extends It{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=fi&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new vt(Ge,this.uri(),e)}};function Ge(s){let e=s.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||$e))return new XMLHttpRequest}catch{}if(!e)try{return new l[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var We=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",Lt=class extends E{get name(){return"websocket"}doOpen(){let e=this.uri(),t=this.opts.protocols,i=We?{}:yt(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,i)}catch(r){return this.emitReserved("error",r)}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 i=e[t],r=t===e.length-1;Q(i,this.supportsBinary,n=>{try{this.doWrite(i,n)}catch{}r&&v(()=>{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]=_t()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},Dt=l.WebSocket||l.MozWebSocket,w=class extends Lt{createSocket(e,t,i){return We?new Dt(e,t,i):t?new Dt(e,t):new Dt(e)}doWrite(e,t){this.ws.send(t)}};var C=class extends E{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=Ue(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=e.readable.pipeThrough(t).getReader(),r=Pe();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();let n=()=>{i.read().then(({done:a,value:c})=>{a||(this.onPacket(c),n())}).catch(a=>{})};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 i=e[t],r=t===e.length-1;this._writer.write(i).then(()=>{r&&v(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var Pt={websocket:w,webtransport:C,polling:k};var pi=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,di=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function F(s){if(s.length>8e3)throw"URI too long";let e=s,t=s.indexOf("["),i=s.indexOf("]");t!=-1&&i!=-1&&(s=s.substring(0,t)+s.substring(t,i).replace(/:/g,";")+s.substring(i,s.length));let r=pi.exec(s||""),n={},o=14;for(;o--;)n[di[o]]=r[o]||"";return t!=-1&&i!=-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=mi(n,n.path),n.queryKey=gi(n,n.query),n}function mi(s,e){let t=/\/{2,9}/g,i=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&i.splice(0,1),e.slice(-1)=="/"&&i.splice(i.length-1,1),i}function gi(s,e){let t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,r,n){r&&(t[r]=n)}),t}var Ut=typeof addEventListener=="function"&&typeof removeEventListener=="function",St=[];Ut&&addEventListener("offline",()=>{St.forEach(s=>s())},!1);var Et=(()=>{class s extends u{constructor(t,i){if(super(),this.binaryType=Fe,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(i=t,t=null),t){let r=F(t);i.hostname=r.host,i.secure=r.protocol==="https"||r.protocol==="wss",i.port=r.port,r.query&&(i.query=r.query)}else i.host&&(i.hostname=F(i.host).host);S(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},i.transports.forEach(r=>{let n=r.prototype.name;this.transports.push(n),this._transportsByName[n]=r}),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},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=qe(this.opts.query)),Ut&&(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"})},St.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let i=Object.assign({},this.opts.query);i.EIO=Bt,i.transport=t,this.id&&(i.sid=this.id);let r=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let t=this.opts.rememberUpgrade&&s.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let i=this.createTransport(t);i.open(),this.setTransport(i)}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",i=>this._onClose("transport close",i))}onOpen(){this.readyState="open",s.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 i=new Error("server error");i.code=t.data,this._onError(i);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 i=1;for(let r=0;r<this.writeBuffer.length;r++){let n=this.writeBuffer[r].data;if(n&&(i+=Me(n)),r>0&&i>this._maxPayload)return this.writeBuffer.slice(0,r);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,v(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,i,r){return this._sendPacket("message",t,i,r),this}send(t,i,r){return this._sendPacket("message",t,i,r),this}_sendPacket(t,i,r,n){if(typeof i=="function"&&(n=i,i=void 0),typeof r=="function"&&(n=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;let o={type:t,data:i,options:r};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()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),t()},r=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(s.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,i){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(),Ut&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let r=St.indexOf(this._offlineEventListener);r!==-1&&St.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,i),this.writeBuffer=[],this._prevBufferLen=0}}}return s.protocol=Bt,s})(),kt=class extends Et{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),i=!1;Et.priorWebsocketSuccess=!1;let r=()=>{i||(t.send([{type:"ping",data:"probe"}]),t.once("packet",A=>{if(!i)if(A.type==="pong"&&A.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Et.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(m(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{let q=new Error("probe error");q.transport=t.name,this.emitReserved("upgradeError",q)}}))};function n(){i||(i=!0,m(),t.close(),t=null)}let o=A=>{let q=new Error("probe error: "+A);q.transport=t.name,n(),this.emitReserved("upgradeError",q)};function a(){o("transport closed")}function c(){o("socket closed")}function b(A){t&&A.name!==t.name&&n()}let m=()=>{t.removeListener("open",r),t.removeListener("error",o),t.removeListener("close",a),this.off("close",c),this.off("upgrading",b)};t.once("open",r),t.once("error",o),t.once("close",a),this.once("close",c),this.once("upgrading",b),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{i||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let i=0;i<e.length;i++)~this.transports.indexOf(e[i])&&t.push(e[i]);return t}},M=class extends kt{constructor(e,t={}){let i=typeof e=="object"?e:t;(!i.transports||i.transports&&typeof i.transports[0]=="string")&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(r=>Pt[r]).filter(r=>!!r)),super(e,i)}};var z=class extends U{doPoll(){this._fetch().then(e=>{if(!e.ok)return this.onError("fetch read error",e.status,e);e.text().then(t=>this.onData(t))}).catch(e=>{this.onError("fetch read error",e)})}doWrite(e,t){this._fetch(e).then(i=>{if(!i.ok)return this.onError("fetch write error",i.status,i);t()}).catch(i=>{this.onError("fetch write error",i)})}_fetch(e){var t;let i=e!==void 0,r=new Headers(this.opts.extraHeaders);return i&&r.set("content-type","text/plain;charset=UTF-8"),(t=this.socket._cookieJar)===null||t===void 0||t.appendCookies(r),fetch(this.uri(),{method:i?"POST":"GET",body:i?e:null,headers:r,credentials:this.opts.withCredentials?"include":"omit"}).then(n=>{var o;return(o=this.socket._cookieJar)===null||o===void 0||o.parseCookies(n.headers.getSetCookie()),n})}};var Js=M.protocol;function Ke(s,e="",t){let i=s;t=t||typeof location<"u"&&location,s==null&&(s=t.protocol+"//"+t.host),typeof s=="string"&&(s.charAt(0)==="/"&&(s.charAt(1)==="/"?s=t.protocol+s:s=t.host+s),/^(https?|wss?):\/\//.test(s)||(typeof t<"u"?s=t.protocol+"//"+s:s="https://"+s),i=F(s)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";let n=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+n+":"+i.port+e,i.href=i.protocol+"://"+n+(t&&t.port===i.port?"":":"+i.port),i}var Yt={};Jt(Yt,{Decoder:()=>qt,Encoder:()=>Vt,PacketType:()=>h,protocol:()=>$t});var yi=typeof ArrayBuffer=="function",_i=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s.buffer instanceof ArrayBuffer,je=Object.prototype.toString,bi=typeof Blob=="function"||typeof Blob<"u"&&je.call(Blob)==="[object BlobConstructor]",vi=typeof File=="function"||typeof File<"u"&&je.call(File)==="[object FileConstructor]";function tt(s){return yi&&(s instanceof ArrayBuffer||_i(s))||bi&&s instanceof Blob||vi&&s instanceof File}function Z(s,e){if(!s||typeof s!="object")return!1;if(Array.isArray(s)){for(let t=0,i=s.length;t<i;t++)if(Z(s[t]))return!0;return!1}if(tt(s))return!0;if(s.toJSON&&typeof s.toJSON=="function"&&arguments.length===1)return Z(s.toJSON(),!0);for(let t in s)if(Object.prototype.hasOwnProperty.call(s,t)&&Z(s[t]))return!0;return!1}function Qe(s){let e=[],t=s.data,i=s;return i.data=Ft(t,e),i.attachments=e.length,{packet:i,buffers:e}}function Ft(s,e){if(!s)return s;if(tt(s)){let t={_placeholder:!0,num:e.length};return e.push(s),t}else if(Array.isArray(s)){let t=new Array(s.length);for(let i=0;i<s.length;i++)t[i]=Ft(s[i],e);return t}else if(typeof s=="object"&&!(s instanceof Date)){let t={};for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(t[i]=Ft(s[i],e));return t}return s}function Je(s,e){return s.data=Mt(s.data,e),delete s.attachments,s}function Mt(s,e){if(!s)return s;if(s&&s._placeholder===!0){if(typeof s.num=="number"&&s.num>=0&&s.num<e.length)return e[s.num];throw new Error("illegal attachments")}else if(Array.isArray(s))for(let t=0;t<s.length;t++)s[t]=Mt(s[t],e);else if(typeof s=="object")for(let t in s)Object.prototype.hasOwnProperty.call(s,t)&&(s[t]=Mt(s[t],e));return s}var Si=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],$t=5,h=function(s){return s[s.CONNECT=0]="CONNECT",s[s.DISCONNECT=1]="DISCONNECT",s[s.EVENT=2]="EVENT",s[s.ACK=3]="ACK",s[s.CONNECT_ERROR=4]="CONNECT_ERROR",s[s.BINARY_EVENT=5]="BINARY_EVENT",s[s.BINARY_ACK=6]="BINARY_ACK",s}(h||{}),Vt=class{constructor(e){this.replacer=e}encode(e){return(e.type===h.EVENT||e.type===h.ACK)&&Z(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=Qe(e),i=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(i),r}};function Xe(s){return Object.prototype.toString.call(s)==="[object Object]"}var qt=class s extends u{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 i=t.type===h.BINARY_EVENT;i||t.type===h.BINARY_ACK?(t.type=i?h.EVENT:h.ACK,this.reconstructor=new Ht(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(tt(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,i={type:Number(e.charAt(0))};if(h[i.type]===void 0)throw new Error("unknown packet type "+i.type);if(i.type===h.BINARY_EVENT||i.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");i.attachments=Number(o)}if(e.charAt(t+1)==="/"){let n=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););i.nsp=e.substring(n,t)}else i.nsp="/";let r=e.charAt(t+1);if(r!==""&&Number(r)==r){let n=t+1;for(;++t;){let o=e.charAt(t);if(o==null||Number(o)!=o){--t;break}if(t===e.length)break}i.id=Number(e.substring(n,t+1))}if(e.charAt(++t)){let n=this.tryParse(e.substr(t));if(s.isPayloadValid(i.type,n))i.data=n;else throw new Error("invalid payload")}return i}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case h.CONNECT:return Xe(t);case h.DISCONNECT:return t===void 0;case h.CONNECT_ERROR:return typeof t=="string"||Xe(t);case h.EVENT:case h.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&Si.indexOf(t[0])===-1);case h.ACK:case h.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},Ht=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=Je(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function d(s,e,t){return s.on(e,t),function(){s.off(e,t)}}var Ei=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),x=class extends u{constructor(e,t,i){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,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[d(e,"open",this.onopen.bind(this)),d(e,"packet",this.onpacket.bind(this)),d(e,"error",this.onerror.bind(this)),d(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 i,r,n;if(Ei.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 m=this.ids++,A=t.pop();this._registerAckCallback(m,A),o.id=m}let a=(r=(i=this.io.engine)===null||i===void 0?void 0:i.transport)===null||r===void 0?void 0:r.writable,c=this.connected&&!(!((n=this.io.engine)===null||n===void 0)&&n._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(e,t){var i;let r=(i=this.flags.timeout)!==null&&i!==void 0?i:this._opts.ackTimeout;if(r===void 0){this.acks[e]=t;return}let n=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);t.call(this,new Error("operation has timed out"))},r),o=(...a)=>{this.io.clearTimeoutFn(n),t.apply(this,a)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...t){return new Promise((i,r)=>{let n=(o,a)=>o?r(o):i(a);n.withError=!0,t.push(n),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());let i={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((r,...n)=>i!==this._queue[0]?void 0:(r!==null?i.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(r)):(this._queue.shift(),t&&t(null,...n)),i.pending=!1,this._drainQueue())),this._queue.push(i),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(i=>String(i.id)===e)){let i=this.acks[e];delete this.acks[e],i.withError&&i.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 i=new Error(e.data.message);i.data=e.data.data,this.emitReserved("connect_error",i);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 i of t)i.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,i=!1;return function(...r){i||(i=!0,t.packet({type:h.ACK,id:e,data:r}))}}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 i=0;i<t.length;i++)if(e===t[i])return t.splice(i,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 i=0;i<t.length;i++)if(e===t[i])return t.splice(i,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 i of t)i.apply(this,e.data)}}};function N(s){s=s||{},this.ms=s.min||100,this.max=s.max||1e4,this.factor=s.factor||2,this.jitter=s.jitter>0&&s.jitter<=1?s.jitter:0,this.attempts=0}N.prototype.duration=function(){var s=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*s);s=(Math.floor(e*10)&1)==0?s-t:s+t}return Math.min(s,this.max)|0};N.prototype.reset=function(){this.attempts=0};N.prototype.setMin=function(s){this.ms=s};N.prototype.setMax=function(s){this.max=s};N.prototype.setJitter=function(s){this.jitter=s};var B=class extends u{constructor(e,t){var i;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,S(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((i=t.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new N({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;let r=t.parser||Yt;this.encoder=new r.Encoder,this.decoder=new r.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 M(this.uri,this.opts);let t=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;let r=d(t,"open",function(){i.onopen(),e&&e()}),n=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},o=d(t,"error",n);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{r(),n(new Error("timeout")),t.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(r),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(d(e,"ping",this.onping.bind(this)),d(e,"data",this.ondata.bind(this)),d(e,"error",this.onerror.bind(this)),d(e,"close",this.onclose.bind(this)),d(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){v(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let i=this.nsps[e];return i?this._autoConnect&&!i.active&&i.connect():(i=new x(this,e,t),this.nsps[e]=i),i}_destroy(e){let t=Object.keys(this.nsps);for(let i of t)if(this.nsps[i].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let i=0;i<t.length;i++)this.engine.write(t[i],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 i;this.cleanup(),(i=this.engine)===null||i===void 0||i.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 i=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(r=>{r?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",r)):e.onreconnect()}))},t);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var et={};function I(s,e){typeof s=="object"&&(e=s,s=void 0),e=e||{};let t=Ke(s,e.path||"/socket.io"),i=t.source,r=t.id,n=t.path,o=et[r]&&n in et[r].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||o,c;return a?c=new B(i,e):(et[r]||(et[r]=new B(i,e)),c=et[r]),t.query&&!e.query&&(e.query=t.queryKey),c.socket(t.path,e)}Object.assign(I,{Manager:B,Socket:x,io:I,connect:I});var V=class s{config;subscribersCounter={};eventObservables$={};namespaces={};ioSocket;emptyConfig={url:"",options:{}};constructor(e){this.config=e,e===void 0&&(e=this.emptyConfig);let t=e.url,i=e.options,r=I?I:Gt;this.ioSocket=r(t,i)}get auth(){return this.ioSocket.auth}set auth(e){this.ioSocket.auth=e}get io(){return this.ioSocket.io}get open(){return this.connect}get close(){return this.disconnect}of(e){if(!e||e==="/")return this;let t=this.namespaces[e];if(t)return t;let a=this.config,{url:i}=a,r=Qt(a,["url"]),n=it({url:!i.endsWith("/")&&!e.startsWith("/")?`${i}/${e}`:`${i}${e}`},r),o=new s(n);return this.namespaces[e]=o,o}on(e,t){return this.ioSocket.on(e,t),this}once(e,t){return this.ioSocket.once(e,t),this}connect(){return this.ioSocket.connect(),this}disconnect(){return this.ioSocket.disconnect(),this}emit(e,...t){return this.ioSocket.emit.apply(this.ioSocket,arguments),this}send(...e){return this.ioSocket.send.apply(this.ioSocket,arguments),this}emitWithAck(e,...t){return this.ioSocket.emitWithAck.apply(this.ioSocket,arguments)}removeListener(e,t){return this.ioSocket.removeListener.apply(this.ioSocket,arguments),this}removeAllListeners(e){return this.ioSocket.removeAllListeners.apply(this.ioSocket,arguments),this}fromEvent(e){return this.subscribersCounter[e]||(this.subscribersCounter[e]=0),this.subscribersCounter[e]++,this.eventObservables$[e]||(this.eventObservables$[e]=new Xt(t=>{let i=r=>{t.next(r)};return this.ioSocket.on(e,i),()=>{this.subscribersCounter[e]--,this.subscribersCounter[e]===0&&(this.ioSocket.removeListener(e,i),delete this.eventObservables$[e])}}).pipe(te())),this.eventObservables$[e]}fromOneTimeEvent(e){return new Promise(t=>this.once(e,t))}listeners(e){return this.ioSocket.listeners(e)}hasListeners(e){return this.ioSocket.hasListeners(e)}listenersAny(){return this.ioSocket.listenersAny()}listenersAnyOutgoing(){return this.ioSocket.listenersAnyOutgoing()}off(e,t){return this.ioSocket.off(e,t),this}offAny(e){return this.ioSocket.offAny(e),this}offAnyOutgoing(e){return this.ioSocket.offAnyOutgoing(e),this}onAny(e){return this.ioSocket.onAny(e),this}onAnyOutgoing(e){return this.ioSocket.onAnyOutgoing(e),this}prependAny(e){return this.ioSocket.prependAny(e),this}prependAnyOutgoing(e){return this.ioSocket.prependAnyOutgoing(e),this}timeout(e){return this.ioSocket.timeout(e),this}get volatile(){let e=this.ioSocket.volatile;return this}get active(){return this.ioSocket.active}get connected(){return this.ioSocket.connected}get disconnected(){return this.ioSocket.disconnected}get recovered(){return this.ioSocket.recovered}get id(){return this.ioSocket.id}compress(e){return this.ioSocket.compress(e),this}};function ki(s){return new V(s)}var ze=new ee("__SOCKET_IO_CONFIG__"),Vr=(()=>{class s{static forRoot(t){return{ngModule:s,providers:[{provide:ze,useValue:t},{provide:V,useFactory:ki,deps:[ze]}]}}static \u0275fac=function(i){return new(i||s)};static \u0275mod=nt({type:s});static \u0275inj=rt({})}return s})();var Kt={BASE:`${le}/notifications`,UNREAD:"unread"},wt=Kt.BASE;var f=function(s){return s.ADD="add",s.UPDATE="update",s.DELETE="delete",s.DELETE_PERMANENTLY="deletePermanently",s}(f||{});var g=function(s){return s.COMMENTS="comments",s.SPACES="spaces",s.SPACE_ROOTS="spaces_roots",s.SHARES="shares",s.LINKS="links",s.SYNC="sync",s}(g||{}),Wr={COMMENTS:"commented",SPACES:{[f.ADD]:"You now have access to the space",[f.DELETE]:"You no longer have access to the space",[f.DELETE_PERMANENTLY]:"This space has been permanently deleted"},SPACE_ROOTS:{[f.ADD]:"anchored",[f.DELETE]:"unanchored"},SHARES:{[f.ADD]:"shared with you",[f.DELETE]:"no longer share with you"},SHARES_WITHOUT_OWNER:{[f.ADD]:"You now have access to the share",[f.DELETE]:"You no longer have access to the share",[f.DELETE_PERMANENTLY]:"You are no longer a member of the parent share, your child share has been deleted"},LINKS:{[f.ADD]:"shared with you",[f.UPDATE]:"You now have access to the space"},SYNC:{[f.DELETE]:"You are no longer synchronizing"}};var Ze=he;var ti={[g.COMMENTS]:Ze,[g.SPACES]:Y.SPACES,[g.SPACE_ROOTS]:Y.SPACES,[g.SHARES]:Y.SHARES,[g.LINKS]:Y.LINKS,[g.SYNC]:Ee.SYNC};var At=class{constructor(e){this.soonRead=!1,Object.assign(this,e),this.fromUser?this.fromUser.avatarUrl=P(this.fromUser.login):this.fromUser={id:-1,login:null,email:null,fullName:"Information",avatarUrl:null},this.appIcon=ti[this.content.app],this.setMainElement()}setMainElement(){if(this.content.app===g.COMMENTS||this.content.app===g.SHARES||this.content.app===g.SYNC)return;let e=this.content.url.split("/");e.length>1&&(this.mainElement=e[e.length-1])}};var ei=(()=>{class s{constructor(t,i,r){this.http=t,this.store=i,this.layout=r}getNotifications(t=!1){return this.http.get(`${wt}${t?`/${Kt.UNREAD}`:""}`).pipe(p(i=>i.map(r=>new At(r))))}wasReadNotification(t){return this.http.patch(`${wt}/${t}`,null)}deleteNotification(t){return this.http.delete(`${wt}${t?`/${t}`:""}`)}checkUnreadNotifications(t=!1){this.getNotifications().subscribe(i=>{let r;if(t&&i.length){let n=i[0];r=this.layout.sendNotification("warning",n.fromUser.fullName,this.layout.translateString(`${this.layout.translateString(n.content.event)}: <b>${n.content.element}</b>`),null,{enableHtml:!0})}else{let n=i.filter(o=>!o.wasRead).length;n&&(r=this.layout.sendNotification("warning","Notifications",this.layout.translateString(n===1?"one_notification":"nb_notifications",{nb:n})))}r&&r.onTap.pipe(Zt(1)).subscribe(()=>this.layout.showRSideBarTab(be.NOTIFICATIONS,!0)),this.store.notifications.set(i)})}static{this.\u0275fac=function(i){return new(i||s)(_(ut),_(ft),_(pt))}}static{this.\u0275prov=st({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var En=(()=>{class s{constructor(t,i,r,n,o){this.http=t,this.layout=i,this.store=r,this.webSocket=n,this.notifications=o,this.webSocket.fromEvent("connect").subscribe(()=>this.notifications.checkUnreadNotifications()),this.webSocket.fromEvent("disconnect").subscribe(()=>this.store.onlineUsers.set([])),this.webSocket.fromEvent(ke.EVENTS.NOTIFICATION).subscribe(()=>this.notifications.checkUnreadNotifications(!0)),this.webSocket.fromEvent(G.EVENTS.ONLINE_USER).pipe(p(a=>new W(a))).subscribe(a=>this.newOnlineUser(a)),this.webSocket.fromEvent(G.EVENTS.ONLINE_USERS).pipe(p(a=>a.map(c=>new W(c)))).subscribe(a=>this.setOnlineUsers(a)),this.webSocket.fromEvent(G.EVENTS.ONLINE_STATUS).subscribe(a=>this.receiveOnlineStatus(a))}get user(){return this.store.user.getValue()}initUser(t,i=!1){this.refreshAvatar(),this.layout.setLanguage(t.language),this.store.userImpersonate.set(i||t.impersonated),this.store.user.next(t),this.checkQuota(this.store.user.getValue()),i&&this.disconnectWebSocket(),this.connectWebSocket()}connectWebSocket(){this.webSocket.ioSocket.io.opts.query={onlineStatus:this.user.onlineStatus},this.webSocket.connect()}disconnectWebSocket(){this.webSocket.disconnect()}setOnlineUsers(t){this.store.onlineUsers.set(t)}newOnlineUser(t){this.store.onlineUsers().find(i=>i.id===t.id)?this.receiveOnlineStatus({userId:t.id,status:t.onlineStatus}):this.store.onlineUsers.update(i=>[t,...i])}userHavePermission(t){return this.user.isAdmin?!0:this.user?this.user.applications.indexOf(t)!==-1:!1}browseGroup(t){return this.http.get(`${me}${t?`/${t}`:""}`).pipe(p(i=>new dt(i)))}createPersonalGroup(t){return this.http.post(O,t).pipe(p(i=>new T(i)))}updatePersonalGroup(t,i){return this.http.put(`${O}/${t}`,i).pipe(p(r=>new T(r)))}leavePersonalGroup(t){return this.http.delete(`${ge}/${t}`)}addUsersToGroup(t,i){return this.http.patch(`${O}/${t}/${$.USERS}`,i)}deletePersonalGroup(t){return this.http.delete(`${O}/${t}`)}updateUserFromPersonalGroup(t,i,r){return this.http.patch(`${O}/${t}/${$.USERS}/${i}`,r)}removeUserFromGroup(t,i){return this.http.delete(`${O}/${t}/${$.USERS}/${i}`)}listGuests(){return this.http.get(L).pipe(p(t=>t.map(i=>new R(i))))}getGuest(t){return this.http.get(`${L}/${t}`).pipe(p(i=>new R(i)))}createGuest(t){return this.http.post(L,t).pipe(p(i=>new R(i)))}updateGuest(t,i){return this.http.put(`${L}/${t}`,i).pipe(p(r=>r?new R(r):null))}deleteGuest(t){return this.http.delete(`${L}/${t}`)}genAvatar(){this.http.patch(Ct,null).subscribe({next:()=>this.refreshAvatar(),error:t=>this.layout.sendNotification("error","Configuration","Avatar",t)})}uploadAvatar(t){let i=new FormData;i.append("file",t),this.http.put(Ct,i).subscribe({next:()=>this.refreshAvatar(),error:r=>this.layout.sendNotification("error","Configuration","Avatar",r)})}changePassword(t){return this.http.put(pe,t)}changeLanguage(t){return this.http.put(fe,t)}changeNotification(t){return this.http.put(de,t)}changeOnlineStatus(t,i=!0){this.webSocket.emit(G.EVENTS.ONLINE_STATUS,{status:t,store:i})}receiveOnlineStatus(t){this.user.id===t.userId?this.user.onlineStatus=t.status:this.store.onlineUsers().length&&this.store.onlineUsers.update(i=>i.map(r=>r.id===t.userId?jt(it({},r),{onlineStatus:t.status}):r))}searchMembers(t,i=[]){return this.http.request("search",$.BASE,{body:t}).pipe(p(r=>r.map(n=>new T(n,i))),zt(()=>[]))}setMenusVisibility(t){for(let i of t)if(!(i.id&&(i.hide=!this.userHavePermission(i.id),i.hide))&&(i.checks?.length&&(i.hide=!i.checks.map(r=>r.negate?!this[r.prop][r.value]:this[r.prop][r.value]).every(r=>!!r)),i.submenus?.length&&this.setMenusVisibility(i.submenus),i.title===ye.FILES)){for(let r of i.submenus)if(!r.hide){i.link=r.link;break}}}refreshAvatar(){this.store.userAvatarUrl.next(Se())}checkAppStoreAvailability(){this.http.get(`${Rt.BASE}/${Rt.APP_STORE}`).subscribe({next:t=>this.store.appStoreManifest.set(t),error:t=>console.error(t)})}checkQuota(t){if(!(t.isGuest||t.isLink)&&t.storageQuota){let i=Math.round(100/t.storageQuota*(t.storageQuota-t.storageUsage));i<=1?this.layout.sendNotification("error","Storage Quota","No more space available",null,{disableTimeOut:!0,closeButton:!0}):i<=5?this.layout.sendNotification("warning","Storage Quota",this.layout.translateString("available_space_is_low",{nb:i}),null,{disableTimeOut:!0,closeButton:!0}):i<=10&&this.layout.sendNotification("info","Storage Quota",this.layout.translateString("available_space_is_low",{nb:i}),null,{disableTimeOut:!0,closeButton:!0})}}static{this.\u0275fac=function(i){return new(i||s)(_(ut),_(pt),_(ft),_(V),_(ei))}}static{this.\u0275prov=st({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var Ci={provide:lt,useExisting:H(()=>xi),multi:!0},xi=(()=>{class s{constructor(){this.btnCheckboxTrue=!0,this.btnCheckboxFalse=!1,this.state=!1,this.isDisabled=!1,this.onChange=Function.prototype,this.onTouched=Function.prototype}onClick(){this.isDisabled||(this.toggle(!this.state),this.onChange(this.value))}ngOnInit(){this.toggle(this.trueValue===this.value)}get trueValue(){return typeof this.btnCheckboxTrue<"u"?this.btnCheckboxTrue:!0}get falseValue(){return typeof this.btnCheckboxFalse<"u"?this.btnCheckboxFalse:!1}toggle(t){this.state=t,this.value=this.state?this.trueValue:this.falseValue}writeValue(t){this.state=this.trueValue===t,this.value=t?this.trueValue:this.falseValue}setDisabledState(t){this.isDisabled=t}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}static{this.\u0275fac=function(i){return new(i||s)}}static{this.\u0275dir=ot({type:s,selectors:[["","btnCheckbox",""]],hostVars:3,hostBindings:function(i,r){i&1&&ct("click",function(){return r.onClick()}),i&2&&(at("aria-pressed",r.state),Tt("active",r.state))},inputs:{btnCheckboxTrue:"btnCheckboxTrue",btnCheckboxFalse:"btnCheckboxFalse"},features:[ht([Ci])]})}}return s})(),Ni={provide:lt,useExisting:H(()=>ii),multi:!0},ii=(()=>{class s{get value(){return this.group?this.group.value:this._value}set value(t){if(this.group){this.group.value=t;return}this._value=t,this._onChange(t)}get disabled(){return this._disabled}set disabled(t){this.setDisabledState(t)}get controlOrGroupDisabled(){return this.disabled||this.group&&this.group.disabled?!0:void 0}get hasDisabledClass(){return this.controlOrGroupDisabled&&!this.isActive}get isActive(){return this.btnRadio===this.value}get tabindex(){if(!this.controlOrGroupDisabled)return this.isActive||this.group==null?0:-1}get hasFocus(){return this._hasFocus}constructor(t,i,r,n){this.el=t,this.cdr=i,this.renderer=r,this.group=n,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.uncheckable=!1,this.role="radio",this._disabled=!1,this._hasFocus=!1}toggleIfAllowed(){this.canToggle()&&(this.uncheckable&&this.btnRadio===this.value?this.value=void 0:this.value=this.btnRadio)}onSpacePressed(t){this.toggleIfAllowed(),t.preventDefault()}focus(){this.el.nativeElement.focus()}onFocus(){this._hasFocus=!0}onBlur(){this._hasFocus=!1,this.onTouched()}canToggle(){return!this.controlOrGroupDisabled&&(this.uncheckable||this.btnRadio!==this.value)}ngOnChanges(t){"uncheckable"in t&&(this.uncheckable=this.uncheckable!==!1&&typeof this.uncheckable<"u")}_onChange(t){if(this.group){this.group.value=t;return}this.onTouched(),this.onChange(t)}writeValue(t){this.value=t,this.cdr.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){if(this._disabled=t,t){this.renderer.setAttribute(this.el.nativeElement,"disabled","disabled");return}this.renderer.removeAttribute(this.el.nativeElement,"disabled")}static{this.\u0275fac=function(i){return new(i||s)(D(se),D(Ot),D(re),D(H(()=>si),8))}}static{this.\u0275dir=ot({type:s,selectors:[["","btnRadio",""]],hostVars:8,hostBindings:function(i,r){i&1&&ct("click",function(){return r.toggleIfAllowed()})("keydown.space",function(o){return r.onSpacePressed(o)})("focus",function(){return r.onFocus()})("blur",function(){return r.onBlur()}),i&2&&(at("aria-disabled",r.controlOrGroupDisabled)("aria-checked",r.isActive)("role",r.role)("tabindex",r.tabindex),Tt("disabled",r.hasDisabledClass)("active",r.isActive))},inputs:{btnRadio:"btnRadio",uncheckable:"uncheckable",value:"value",disabled:"disabled"},features:[ht([Ni]),ie]})}}return s})(),Bi={provide:lt,useExisting:H(()=>si),multi:!0},si=(()=>{class s{constructor(t){this.cdr=t,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.role="radiogroup",this._disabled=!1}get value(){return this._value}set value(t){this._value=t,this.onChange(t)}get disabled(){return this._disabled}get tabindex(){return this._disabled?null:0}writeValue(t){this._value=t,this.cdr.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.radioButtons&&(this._disabled=t,this.radioButtons.forEach(i=>{i.setDisabledState(t)}),this.cdr.markForCheck())}onFocus(){if(this._disabled)return;let t=this.getActiveOrFocusedRadio();if(t){t.focus();return}if(this.radioButtons){let i=this.radioButtons.find(r=>!r.disabled);i&&i.focus()}}onBlur(){this.onTouched&&this.onTouched()}selectNext(t){this.selectInDirection("next"),t.preventDefault()}selectPrevious(t){this.selectInDirection("previous"),t.preventDefault()}selectInDirection(t){if(this._disabled)return;function i(n,o){let c=(n+(t==="next"?1:-1))%o.length;return c<0&&(c=o.length-1),c}let r=this.getActiveOrFocusedRadio();if(r&&this.radioButtons){let n=this.radioButtons.toArray(),o=n.indexOf(r);for(let a=i(o,n);a!==o;a=i(a,n))if(n[a].canToggle()){n[a].toggleIfAllowed(),n[a].focus();break}}}getActiveOrFocusedRadio(){if(this.radioButtons)return this.radioButtons.find(t=>t.isActive)||this.radioButtons.find(t=>t.hasFocus)}static{this.\u0275fac=function(i){return new(i||s)(D(Ot))}}static{this.\u0275dir=ot({type:s,selectors:[["","btnRadioGroup",""]],contentQueries:function(i,r,n){if(i&1&&ne(n,ii,4),i&2){let o;oe(o=ae())&&(r.radioButtons=o)}},hostVars:2,hostBindings:function(i,r){i&1&&ct("focus",function(){return r.onFocus()})("blur",function(){return r.onBlur()})("keydown.ArrowRight",function(o){return r.selectNext(o)})("keydown.ArrowDown",function(o){return r.selectNext(o)})("keydown.ArrowLeft",function(o){return r.selectPrevious(o)})("keydown.ArrowUp",function(o){return r.selectPrevious(o)}),i&2&&at("role",r.role)("tabindex",r.tabindex)},features:[ht([Bi])]})}}return s})(),Ln=(()=>{class s{static forRoot(){return{ngModule:s,providers:[]}}static{this.\u0275fac=function(i){return new(i||s)}}static{this.\u0275mod=nt({type:s})}static{this.\u0275inj=rt({})}}return s})();export{Vr as a,dt as b,R as c,g as d,ei as e,En as f,xi as g,Ln as h};
|
|
1
|
+
import{$ as O,$a as ve,Da as ye,Ea as Y,Ib as Ee,P as ue,Pa as _e,Qb as ft,R as le,S as Rt,Sb as pt,Ua as be,V as $,X as fe,Y as pe,Z as de,_ as Ct,aa as me,ba as ge,ca as L,f as ce,rb as P,sb as Se,tb as T}from"./chunk-HDDBV3QQ.js";import{Eb as ct,G as zt,L as Zt,Lb as ne,Mc as ut,Nb as oe,Ob as ae,Od as he,W as te,Wa as re,Wc as lt,Xa as D,Xb as ht,ba as H,bb as nt,c as Xt,ca as st,cb as ot,da as rt,fa as ee,ha as _,kb as at,kc as Ot,nb as Tt,oa as ie,v as p,za as se}from"./chunk-FPEGN42P.js";import{a as it,b as jt,c as Qt,e as Jt}from"./chunk-GAL4ENT6.js";var ke={NAME_SPACE:"/",EVENTS:{NOTIFICATION:"notification"}};var G={NAME_SPACE:"/",EVENTS:{ONLINE_STATUS:"onlineStatus",ONLINE_USERS:"onlineUsers",ONLINE_USER:"onlineUser"}};var dt=class{constructor(e){this.parentGroup=e.parentGroup,this.members=e.members.map(t=>new T(t))}};var R=class{constructor(e){this.newly=0,this.currentAccessHover=!1,this.setManagers(e),Object.assign(this,e),this.avatarUrl=P(e.login),this.userIsActiveText=this.isActive?"active":"suspended",this.hTimeAgo=(0,ce.default)(this.currentAccess).fromNow(!0),this.newly=ve(this.currentAccess)}setManagers(e){e?.managers&&(e.managers=e.managers.map(t=>new T(t)))}};var W=class{constructor(e){this.setOnlineStatus(_e("status",e)),this.avatarUrl=P(e.login),Object.assign(this,e)}setOnlineStatus(e){this.onlineStatus=e,this.onlineTextStatus=ue[e]}};var Gt={};Jt(Gt,{Fetch:()=>z,Manager:()=>B,NodeWebSocket:()=>w,NodeXHR:()=>k,Socket:()=>x,WebSocket:()=>w,WebTransport:()=>C,XHR:()=>k,connect:()=>I,default:()=>I,io:()=>I,protocol:()=>$t});var y=Object.create(null);y.open="0";y.close="1";y.ping="2";y.pong="3";y.message="4";y.upgrade="5";y.noop="6";var K=Object.create(null);Object.keys(y).forEach(s=>{K[y[s]]=s});var j={type:"error",data:"parser error"};var Te=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Oe=typeof ArrayBuffer=="function",Re=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s&&s.buffer instanceof ArrayBuffer,Q=({type:s,data:e},t,i)=>Te&&e instanceof Blob?t?i(e):we(e,i):Oe&&(e instanceof ArrayBuffer||Re(e))?t?i(e):we(new Blob([e]),i):i(y[s]+(e||"")),we=(s,e)=>{let t=new FileReader;return t.onload=function(){let i=t.result.split(",")[1];e("b"+(i||""))},t.readAsDataURL(s)};function Ae(s){return s instanceof Uint8Array?s:s instanceof ArrayBuffer?new Uint8Array(s):new Uint8Array(s.buffer,s.byteOffset,s.byteLength)}var xt;function Ce(s,e){if(Te&&s.data instanceof Blob)return s.data.arrayBuffer().then(Ae).then(e);if(Oe&&(s.data instanceof ArrayBuffer||Re(s.data)))return e(Ae(s.data));Q(s,!1,t=>{xt||(xt=new TextEncoder),e(xt.encode(t))})}var xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",J=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let s=0;s<xe.length;s++)J[xe.charCodeAt(s)]=s;var Ne=s=>{let e=s.length*.75,t=s.length,i,r=0,n,o,a,c;s[s.length-1]==="="&&(e--,s[s.length-2]==="="&&e--);let b=new ArrayBuffer(e),m=new Uint8Array(b);for(i=0;i<t;i+=4)n=J[s.charCodeAt(i)],o=J[s.charCodeAt(i+1)],a=J[s.charCodeAt(i+2)],c=J[s.charCodeAt(i+3)],m[r++]=n<<2|o>>4,m[r++]=(o&15)<<4|a>>2,m[r++]=(a&3)<<6|c&63;return b};var ri=typeof ArrayBuffer=="function",X=(s,e)=>{if(typeof s!="string")return{type:"message",data:Be(s,e)};let t=s.charAt(0);return t==="b"?{type:"message",data:ni(s.substring(1),e)}:K[t]?s.length>1?{type:K[t],data:s.substring(1)}:{type:K[t]}:j},ni=(s,e)=>{if(ri){let t=Ne(s);return Be(t,e)}else return{base64:!0,data:s}},Be=(s,e)=>{switch(e){case"blob":return s instanceof Blob?s:new Blob([s]);case"arraybuffer":default:return s instanceof ArrayBuffer?s:s.buffer}};var Ie="",De=(s,e)=>{let t=s.length,i=new Array(t),r=0;s.forEach((n,o)=>{Q(n,!1,a=>{i[o]=a,++r===t&&e(i.join(Ie))})})},Le=(s,e)=>{let t=s.split(Ie),i=[];for(let r=0;r<t.length;r++){let n=X(t[r],e);if(i.push(n),n.type==="error")break}return i};function Pe(){return new TransformStream({transform(s,e){Ce(s,t=>{let i=t.length,r;if(i<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,i);else if(i<65536){r=new Uint8Array(3);let n=new DataView(r.buffer);n.setUint8(0,126),n.setUint16(1,i)}else{r=new Uint8Array(9);let n=new DataView(r.buffer);n.setUint8(0,127),n.setBigUint64(1,BigInt(i))}s.data&&typeof s.data!="string"&&(r[0]|=128),e.enqueue(r),e.enqueue(t)})}})}var Nt;function mt(s){return s.reduce((e,t)=>e+t.length,0)}function gt(s,e){if(s[0].length===e)return s.shift();let t=new Uint8Array(e),i=0;for(let r=0;r<e;r++)t[r]=s[0][i++],i===s[0].length&&(s.shift(),i=0);return s.length&&i<s[0].length&&(s[0]=s[0].slice(i)),t}function Ue(s,e){Nt||(Nt=new TextDecoder);let t=[],i=0,r=-1,n=!1;return new TransformStream({transform(o,a){for(t.push(o);;){if(i===0){if(mt(t)<1)break;let c=gt(t,1);n=(c[0]&128)===128,r=c[0]&127,r<126?i=3:r===126?i=1:i=2}else if(i===1){if(mt(t)<2)break;let c=gt(t,2);r=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),i=3}else if(i===2){if(mt(t)<8)break;let c=gt(t,8),b=new DataView(c.buffer,c.byteOffset,c.length),m=b.getUint32(0);if(m>Math.pow(2,21)-1){a.enqueue(j);break}r=m*Math.pow(2,32)+b.getUint32(4),i=3}else{if(mt(t)<r)break;let c=gt(t,r);a.enqueue(X(n?c:Nt.decode(c),e)),i=0}if(r===0||r>s){a.enqueue(j);break}}}})}var Bt=4;function u(s){if(s)return oi(s)}function oi(s){for(var e in u.prototype)s[e]=u.prototype[e];return s}u.prototype.on=u.prototype.addEventListener=function(s,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+s]=this._callbacks["$"+s]||[]).push(e),this};u.prototype.once=function(s,e){function t(){this.off(s,t),e.apply(this,arguments)}return t.fn=e,this.on(s,t),this};u.prototype.off=u.prototype.removeListener=u.prototype.removeAllListeners=u.prototype.removeEventListener=function(s,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+s];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+s],this;for(var i,r=0;r<t.length;r++)if(i=t[r],i===e||i.fn===e){t.splice(r,1);break}return t.length===0&&delete this._callbacks["$"+s],this};u.prototype.emit=function(s){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),t=this._callbacks["$"+s],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(t){t=t.slice(0);for(var i=0,r=t.length;i<r;++i)t[i].apply(this,e)}return this};u.prototype.emitReserved=u.prototype.emit;u.prototype.listeners=function(s){return this._callbacks=this._callbacks||{},this._callbacks["$"+s]||[]};u.prototype.hasListeners=function(s){return!!this.listeners(s).length};var v=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,t)=>t(e,0),l=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Fe="arraybuffer";function yt(s,...e){return e.reduce((t,i)=>(s.hasOwnProperty(i)&&(t[i]=s[i]),t),{})}var ai=l.setTimeout,ci=l.clearTimeout;function S(s,e){e.useNativeTimers?(s.setTimeoutFn=ai.bind(l),s.clearTimeoutFn=ci.bind(l)):(s.setTimeoutFn=l.setTimeout.bind(l),s.clearTimeoutFn=l.clearTimeout.bind(l))}var hi=1.33;function Me(s){return typeof s=="string"?ui(s):Math.ceil((s.byteLength||s.size)*hi)}function ui(s){let e=0,t=0;for(let i=0,r=s.length;i<r;i++)e=s.charCodeAt(i),e<128?t+=1:e<2048?t+=2:e<55296||e>=57344?t+=3:(i++,t+=4);return t}function _t(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Ve(s){let e="";for(let t in s)s.hasOwnProperty(t)&&(e.length&&(e+="&"),e+=encodeURIComponent(t)+"="+encodeURIComponent(s[t]));return e}function qe(s){let e={},t=s.split("&");for(let i=0,r=t.length;i<r;i++){let n=t[i].split("=");e[decodeURIComponent(n[0])]=decodeURIComponent(n[1])}return e}var bt=class extends Error{constructor(e,t,i){super(e),this.description=t,this.context=i,this.type="TransportError"}},E=class extends u{constructor(e){super(),this.writable=!1,S(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,i){return super.emitReserved("error",new bt(e,t,i)),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=X(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=Ve(e);return t.length?"?"+t:""}};var U=class extends E{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 i=0;this._polling&&(i++,this.once("pollComplete",function(){--i||t()})),this.writable||(i++,this.once("drain",function(){--i||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let t=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};Le(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,De(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]=_t()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}};var He=!1;try{He=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var $e=He;function li(){}var It=class extends U{constructor(e){if(super(e),typeof location<"u"){let t=location.protocol==="https:",i=location.port;i||(i=t?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||i!==e.port}}doWrite(e,t){let i=this.request({method:"POST",data:e});i.on("success",t),i.on("error",(r,n)=>{this.onError("xhr post error",r,n)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(t,i)=>{this.onError("xhr poll error",t,i)}),this.pollXhr=e}},vt=(()=>{class s extends u{constructor(t,i,r){super(),this.createRequest=t,S(this,r),this._opts=r,this._method=r.method||"GET",this._uri=i,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;let i=yt(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");i.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(i);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&r.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var n;r.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=s.requestsCount++,s.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=li,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete s.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 s.requestsCount=0,s.requests={},s})();if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Ye);else if(typeof addEventListener=="function"){let s="onpagehide"in l?"pagehide":"unload";addEventListener(s,Ye,!1)}}function Ye(){for(let s in vt.requests)vt.requests.hasOwnProperty(s)&&vt.requests[s].abort()}var fi=function(){let s=Ge({xdomain:!1});return s&&s.responseType!==null}(),k=class extends It{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=fi&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new vt(Ge,this.uri(),e)}};function Ge(s){let e=s.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||$e))return new XMLHttpRequest}catch{}if(!e)try{return new l[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var We=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",Lt=class extends E{get name(){return"websocket"}doOpen(){let e=this.uri(),t=this.opts.protocols,i=We?{}:yt(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,i)}catch(r){return this.emitReserved("error",r)}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 i=e[t],r=t===e.length-1;Q(i,this.supportsBinary,n=>{try{this.doWrite(i,n)}catch{}r&&v(()=>{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]=_t()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},Dt=l.WebSocket||l.MozWebSocket,w=class extends Lt{createSocket(e,t,i){return We?new Dt(e,t,i):t?new Dt(e,t):new Dt(e)}doWrite(e,t){this.ws.send(t)}};var C=class extends E{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=Ue(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=e.readable.pipeThrough(t).getReader(),r=Pe();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();let n=()=>{i.read().then(({done:a,value:c})=>{a||(this.onPacket(c),n())}).catch(a=>{})};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 i=e[t],r=t===e.length-1;this._writer.write(i).then(()=>{r&&v(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}};var Pt={websocket:w,webtransport:C,polling:k};var pi=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,di=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function F(s){if(s.length>8e3)throw"URI too long";let e=s,t=s.indexOf("["),i=s.indexOf("]");t!=-1&&i!=-1&&(s=s.substring(0,t)+s.substring(t,i).replace(/:/g,";")+s.substring(i,s.length));let r=pi.exec(s||""),n={},o=14;for(;o--;)n[di[o]]=r[o]||"";return t!=-1&&i!=-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=mi(n,n.path),n.queryKey=gi(n,n.query),n}function mi(s,e){let t=/\/{2,9}/g,i=e.replace(t,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&i.splice(0,1),e.slice(-1)=="/"&&i.splice(i.length-1,1),i}function gi(s,e){let t={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,r,n){r&&(t[r]=n)}),t}var Ut=typeof addEventListener=="function"&&typeof removeEventListener=="function",St=[];Ut&&addEventListener("offline",()=>{St.forEach(s=>s())},!1);var Et=(()=>{class s extends u{constructor(t,i){if(super(),this.binaryType=Fe,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(i=t,t=null),t){let r=F(t);i.hostname=r.host,i.secure=r.protocol==="https"||r.protocol==="wss",i.port=r.port,r.query&&(i.query=r.query)}else i.host&&(i.hostname=F(i.host).host);S(this,i),this.secure=i.secure!=null?i.secure:typeof location<"u"&&location.protocol==="https:",i.hostname&&!i.port&&(i.port=this.secure?"443":"80"),this.hostname=i.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=i.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},i.transports.forEach(r=>{let n=r.prototype.name;this.transports.push(n),this._transportsByName[n]=r}),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},i),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=qe(this.opts.query)),Ut&&(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"})},St.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let i=Object.assign({},this.opts.query);i.EIO=Bt,i.transport=t,this.id&&(i.sid=this.id);let r=Object.assign({},this.opts,{query:i,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let t=this.opts.rememberUpgrade&&s.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let i=this.createTransport(t);i.open(),this.setTransport(i)}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",i=>this._onClose("transport close",i))}onOpen(){this.readyState="open",s.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 i=new Error("server error");i.code=t.data,this._onError(i);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 i=1;for(let r=0;r<this.writeBuffer.length;r++){let n=this.writeBuffer[r].data;if(n&&(i+=Me(n)),r>0&&i>this._maxPayload)return this.writeBuffer.slice(0,r);i+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,v(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,i,r){return this._sendPacket("message",t,i,r),this}send(t,i,r){return this._sendPacket("message",t,i,r),this}_sendPacket(t,i,r,n){if(typeof i=="function"&&(n=i,i=void 0),typeof r=="function"&&(n=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;let o={type:t,data:i,options:r};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()},i=()=>{this.off("upgrade",i),this.off("upgradeError",i),t()},r=()=>{this.once("upgrade",i),this.once("upgradeError",i)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(s.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,i){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(),Ut&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let r=St.indexOf(this._offlineEventListener);r!==-1&&St.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,i),this.writeBuffer=[],this._prevBufferLen=0}}}return s.protocol=Bt,s})(),kt=class extends Et{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),i=!1;Et.priorWebsocketSuccess=!1;let r=()=>{i||(t.send([{type:"ping",data:"probe"}]),t.once("packet",A=>{if(!i)if(A.type==="pong"&&A.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Et.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(m(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{let q=new Error("probe error");q.transport=t.name,this.emitReserved("upgradeError",q)}}))};function n(){i||(i=!0,m(),t.close(),t=null)}let o=A=>{let q=new Error("probe error: "+A);q.transport=t.name,n(),this.emitReserved("upgradeError",q)};function a(){o("transport closed")}function c(){o("socket closed")}function b(A){t&&A.name!==t.name&&n()}let m=()=>{t.removeListener("open",r),t.removeListener("error",o),t.removeListener("close",a),this.off("close",c),this.off("upgrading",b)};t.once("open",r),t.once("error",o),t.once("close",a),this.once("close",c),this.once("upgrading",b),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{i||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let i=0;i<e.length;i++)~this.transports.indexOf(e[i])&&t.push(e[i]);return t}},M=class extends kt{constructor(e,t={}){let i=typeof e=="object"?e:t;(!i.transports||i.transports&&typeof i.transports[0]=="string")&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(r=>Pt[r]).filter(r=>!!r)),super(e,i)}};var z=class extends U{doPoll(){this._fetch().then(e=>{if(!e.ok)return this.onError("fetch read error",e.status,e);e.text().then(t=>this.onData(t))}).catch(e=>{this.onError("fetch read error",e)})}doWrite(e,t){this._fetch(e).then(i=>{if(!i.ok)return this.onError("fetch write error",i.status,i);t()}).catch(i=>{this.onError("fetch write error",i)})}_fetch(e){var t;let i=e!==void 0,r=new Headers(this.opts.extraHeaders);return i&&r.set("content-type","text/plain;charset=UTF-8"),(t=this.socket._cookieJar)===null||t===void 0||t.appendCookies(r),fetch(this.uri(),{method:i?"POST":"GET",body:i?e:null,headers:r,credentials:this.opts.withCredentials?"include":"omit"}).then(n=>{var o;return(o=this.socket._cookieJar)===null||o===void 0||o.parseCookies(n.headers.getSetCookie()),n})}};var Js=M.protocol;function Ke(s,e="",t){let i=s;t=t||typeof location<"u"&&location,s==null&&(s=t.protocol+"//"+t.host),typeof s=="string"&&(s.charAt(0)==="/"&&(s.charAt(1)==="/"?s=t.protocol+s:s=t.host+s),/^(https?|wss?):\/\//.test(s)||(typeof t<"u"?s=t.protocol+"//"+s:s="https://"+s),i=F(s)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";let n=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+n+":"+i.port+e,i.href=i.protocol+"://"+n+(t&&t.port===i.port?"":":"+i.port),i}var Yt={};Jt(Yt,{Decoder:()=>qt,Encoder:()=>Vt,PacketType:()=>h,protocol:()=>$t});var yi=typeof ArrayBuffer=="function",_i=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s.buffer instanceof ArrayBuffer,je=Object.prototype.toString,bi=typeof Blob=="function"||typeof Blob<"u"&&je.call(Blob)==="[object BlobConstructor]",vi=typeof File=="function"||typeof File<"u"&&je.call(File)==="[object FileConstructor]";function tt(s){return yi&&(s instanceof ArrayBuffer||_i(s))||bi&&s instanceof Blob||vi&&s instanceof File}function Z(s,e){if(!s||typeof s!="object")return!1;if(Array.isArray(s)){for(let t=0,i=s.length;t<i;t++)if(Z(s[t]))return!0;return!1}if(tt(s))return!0;if(s.toJSON&&typeof s.toJSON=="function"&&arguments.length===1)return Z(s.toJSON(),!0);for(let t in s)if(Object.prototype.hasOwnProperty.call(s,t)&&Z(s[t]))return!0;return!1}function Qe(s){let e=[],t=s.data,i=s;return i.data=Ft(t,e),i.attachments=e.length,{packet:i,buffers:e}}function Ft(s,e){if(!s)return s;if(tt(s)){let t={_placeholder:!0,num:e.length};return e.push(s),t}else if(Array.isArray(s)){let t=new Array(s.length);for(let i=0;i<s.length;i++)t[i]=Ft(s[i],e);return t}else if(typeof s=="object"&&!(s instanceof Date)){let t={};for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&(t[i]=Ft(s[i],e));return t}return s}function Je(s,e){return s.data=Mt(s.data,e),delete s.attachments,s}function Mt(s,e){if(!s)return s;if(s&&s._placeholder===!0){if(typeof s.num=="number"&&s.num>=0&&s.num<e.length)return e[s.num];throw new Error("illegal attachments")}else if(Array.isArray(s))for(let t=0;t<s.length;t++)s[t]=Mt(s[t],e);else if(typeof s=="object")for(let t in s)Object.prototype.hasOwnProperty.call(s,t)&&(s[t]=Mt(s[t],e));return s}var Si=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],$t=5,h=function(s){return s[s.CONNECT=0]="CONNECT",s[s.DISCONNECT=1]="DISCONNECT",s[s.EVENT=2]="EVENT",s[s.ACK=3]="ACK",s[s.CONNECT_ERROR=4]="CONNECT_ERROR",s[s.BINARY_EVENT=5]="BINARY_EVENT",s[s.BINARY_ACK=6]="BINARY_ACK",s}(h||{}),Vt=class{constructor(e){this.replacer=e}encode(e){return(e.type===h.EVENT||e.type===h.ACK)&&Z(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=Qe(e),i=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(i),r}};function Xe(s){return Object.prototype.toString.call(s)==="[object Object]"}var qt=class s extends u{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 i=t.type===h.BINARY_EVENT;i||t.type===h.BINARY_ACK?(t.type=i?h.EVENT:h.ACK,this.reconstructor=new Ht(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(tt(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,i={type:Number(e.charAt(0))};if(h[i.type]===void 0)throw new Error("unknown packet type "+i.type);if(i.type===h.BINARY_EVENT||i.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");i.attachments=Number(o)}if(e.charAt(t+1)==="/"){let n=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););i.nsp=e.substring(n,t)}else i.nsp="/";let r=e.charAt(t+1);if(r!==""&&Number(r)==r){let n=t+1;for(;++t;){let o=e.charAt(t);if(o==null||Number(o)!=o){--t;break}if(t===e.length)break}i.id=Number(e.substring(n,t+1))}if(e.charAt(++t)){let n=this.tryParse(e.substr(t));if(s.isPayloadValid(i.type,n))i.data=n;else throw new Error("invalid payload")}return i}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case h.CONNECT:return Xe(t);case h.DISCONNECT:return t===void 0;case h.CONNECT_ERROR:return typeof t=="string"||Xe(t);case h.EVENT:case h.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&Si.indexOf(t[0])===-1);case h.ACK:case h.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},Ht=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=Je(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function d(s,e,t){return s.on(e,t),function(){s.off(e,t)}}var Ei=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),x=class extends u{constructor(e,t,i){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,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[d(e,"open",this.onopen.bind(this)),d(e,"packet",this.onpacket.bind(this)),d(e,"error",this.onerror.bind(this)),d(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 i,r,n;if(Ei.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 m=this.ids++,A=t.pop();this._registerAckCallback(m,A),o.id=m}let a=(r=(i=this.io.engine)===null||i===void 0?void 0:i.transport)===null||r===void 0?void 0:r.writable,c=this.connected&&!(!((n=this.io.engine)===null||n===void 0)&&n._hasPingExpired());return this.flags.volatile&&!a||(c?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(e,t){var i;let r=(i=this.flags.timeout)!==null&&i!==void 0?i:this._opts.ackTimeout;if(r===void 0){this.acks[e]=t;return}let n=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===e&&this.sendBuffer.splice(a,1);t.call(this,new Error("operation has timed out"))},r),o=(...a)=>{this.io.clearTimeoutFn(n),t.apply(this,a)};o.withError=!0,this.acks[e]=o}emitWithAck(e,...t){return new Promise((i,r)=>{let n=(o,a)=>o?r(o):i(a);n.withError=!0,t.push(n),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]=="function"&&(t=e.pop());let i={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((r,...n)=>i!==this._queue[0]?void 0:(r!==null?i.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(r)):(this._queue.shift(),t&&t(null,...n)),i.pending=!1,this._drainQueue())),this._queue.push(i),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(i=>String(i.id)===e)){let i=this.acks[e];delete this.acks[e],i.withError&&i.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 i=new Error(e.data.message);i.data=e.data.data,this.emitReserved("connect_error",i);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 i of t)i.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,i=!1;return function(...r){i||(i=!0,t.packet({type:h.ACK,id:e,data:r}))}}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 i=0;i<t.length;i++)if(e===t[i])return t.splice(i,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 i=0;i<t.length;i++)if(e===t[i])return t.splice(i,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 i of t)i.apply(this,e.data)}}};function N(s){s=s||{},this.ms=s.min||100,this.max=s.max||1e4,this.factor=s.factor||2,this.jitter=s.jitter>0&&s.jitter<=1?s.jitter:0,this.attempts=0}N.prototype.duration=function(){var s=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),t=Math.floor(e*this.jitter*s);s=(Math.floor(e*10)&1)==0?s-t:s+t}return Math.min(s,this.max)|0};N.prototype.reset=function(){this.attempts=0};N.prototype.setMin=function(s){this.ms=s};N.prototype.setMax=function(s){this.max=s};N.prototype.setJitter=function(s){this.jitter=s};var B=class extends u{constructor(e,t){var i;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,S(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((i=t.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new N({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=e;let r=t.parser||Yt;this.encoder=new r.Encoder,this.decoder=new r.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 M(this.uri,this.opts);let t=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;let r=d(t,"open",function(){i.onopen(),e&&e()}),n=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),e?e(a):this.maybeReconnectOnOpen()},o=d(t,"error",n);if(this._timeout!==!1){let a=this._timeout,c=this.setTimeoutFn(()=>{r(),n(new Error("timeout")),t.close()},a);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(r),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(d(e,"ping",this.onping.bind(this)),d(e,"data",this.ondata.bind(this)),d(e,"error",this.onerror.bind(this)),d(e,"close",this.onclose.bind(this)),d(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){v(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let i=this.nsps[e];return i?this._autoConnect&&!i.active&&i.connect():(i=new x(this,e,t),this.nsps[e]=i),i}_destroy(e){let t=Object.keys(this.nsps);for(let i of t)if(this.nsps[i].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let i=0;i<t.length;i++)this.engine.write(t[i],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 i;this.cleanup(),(i=this.engine)===null||i===void 0||i.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 i=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(r=>{r?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",r)):e.onreconnect()}))},t);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}};var et={};function I(s,e){typeof s=="object"&&(e=s,s=void 0),e=e||{};let t=Ke(s,e.path||"/socket.io"),i=t.source,r=t.id,n=t.path,o=et[r]&&n in et[r].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||o,c;return a?c=new B(i,e):(et[r]||(et[r]=new B(i,e)),c=et[r]),t.query&&!e.query&&(e.query=t.queryKey),c.socket(t.path,e)}Object.assign(I,{Manager:B,Socket:x,io:I,connect:I});var V=class s{config;subscribersCounter={};eventObservables$={};namespaces={};ioSocket;emptyConfig={url:"",options:{}};constructor(e){this.config=e,e===void 0&&(e=this.emptyConfig);let t=e.url,i=e.options,r=I?I:Gt;this.ioSocket=r(t,i)}get auth(){return this.ioSocket.auth}set auth(e){this.ioSocket.auth=e}get io(){return this.ioSocket.io}get open(){return this.connect}get close(){return this.disconnect}of(e){if(!e||e==="/")return this;let t=this.namespaces[e];if(t)return t;let a=this.config,{url:i}=a,r=Qt(a,["url"]),n=it({url:!i.endsWith("/")&&!e.startsWith("/")?`${i}/${e}`:`${i}${e}`},r),o=new s(n);return this.namespaces[e]=o,o}on(e,t){return this.ioSocket.on(e,t),this}once(e,t){return this.ioSocket.once(e,t),this}connect(){return this.ioSocket.connect(),this}disconnect(){return this.ioSocket.disconnect(),this}emit(e,...t){return this.ioSocket.emit.apply(this.ioSocket,arguments),this}send(...e){return this.ioSocket.send.apply(this.ioSocket,arguments),this}emitWithAck(e,...t){return this.ioSocket.emitWithAck.apply(this.ioSocket,arguments)}removeListener(e,t){return this.ioSocket.removeListener.apply(this.ioSocket,arguments),this}removeAllListeners(e){return this.ioSocket.removeAllListeners.apply(this.ioSocket,arguments),this}fromEvent(e){return this.subscribersCounter[e]||(this.subscribersCounter[e]=0),this.subscribersCounter[e]++,this.eventObservables$[e]||(this.eventObservables$[e]=new Xt(t=>{let i=r=>{t.next(r)};return this.ioSocket.on(e,i),()=>{this.subscribersCounter[e]--,this.subscribersCounter[e]===0&&(this.ioSocket.removeListener(e,i),delete this.eventObservables$[e])}}).pipe(te())),this.eventObservables$[e]}fromOneTimeEvent(e){return new Promise(t=>this.once(e,t))}listeners(e){return this.ioSocket.listeners(e)}hasListeners(e){return this.ioSocket.hasListeners(e)}listenersAny(){return this.ioSocket.listenersAny()}listenersAnyOutgoing(){return this.ioSocket.listenersAnyOutgoing()}off(e,t){return this.ioSocket.off(e,t),this}offAny(e){return this.ioSocket.offAny(e),this}offAnyOutgoing(e){return this.ioSocket.offAnyOutgoing(e),this}onAny(e){return this.ioSocket.onAny(e),this}onAnyOutgoing(e){return this.ioSocket.onAnyOutgoing(e),this}prependAny(e){return this.ioSocket.prependAny(e),this}prependAnyOutgoing(e){return this.ioSocket.prependAnyOutgoing(e),this}timeout(e){return this.ioSocket.timeout(e),this}get volatile(){let e=this.ioSocket.volatile;return this}get active(){return this.ioSocket.active}get connected(){return this.ioSocket.connected}get disconnected(){return this.ioSocket.disconnected}get recovered(){return this.ioSocket.recovered}get id(){return this.ioSocket.id}compress(e){return this.ioSocket.compress(e),this}};function ki(s){return new V(s)}var ze=new ee("__SOCKET_IO_CONFIG__"),Vr=(()=>{class s{static forRoot(t){return{ngModule:s,providers:[{provide:ze,useValue:t},{provide:V,useFactory:ki,deps:[ze]}]}}static \u0275fac=function(i){return new(i||s)};static \u0275mod=nt({type:s});static \u0275inj=rt({})}return s})();var Kt={BASE:`${le}/notifications`,UNREAD:"unread"},wt=Kt.BASE;var f=function(s){return s.ADD="add",s.UPDATE="update",s.DELETE="delete",s.DELETE_PERMANENTLY="deletePermanently",s}(f||{});var g=function(s){return s.COMMENTS="comments",s.SPACES="spaces",s.SPACE_ROOTS="spaces_roots",s.SHARES="shares",s.LINKS="links",s.SYNC="sync",s}(g||{}),Wr={COMMENTS:"commented",SPACES:{[f.ADD]:"You now have access to the space",[f.DELETE]:"You no longer have access to the space",[f.DELETE_PERMANENTLY]:"This space has been permanently deleted"},SPACE_ROOTS:{[f.ADD]:"anchored",[f.DELETE]:"unanchored"},SHARES:{[f.ADD]:"shared with you",[f.DELETE]:"no longer share with you"},SHARES_WITHOUT_OWNER:{[f.ADD]:"You now have access to the share",[f.DELETE]:"You no longer have access to the share",[f.DELETE_PERMANENTLY]:"You are no longer a member of the parent share, your child share has been deleted"},LINKS:{[f.ADD]:"shared with you",[f.UPDATE]:"You now have access to the space"},SYNC:{[f.DELETE]:"You are no longer synchronizing"}};var Ze=he;var ti={[g.COMMENTS]:Ze,[g.SPACES]:Y.SPACES,[g.SPACE_ROOTS]:Y.SPACES,[g.SHARES]:Y.SHARES,[g.LINKS]:Y.LINKS,[g.SYNC]:Ee.SYNC};var At=class{constructor(e){this.soonRead=!1,Object.assign(this,e),this.fromUser?this.fromUser.avatarUrl=P(this.fromUser.login):this.fromUser={id:-1,login:null,email:null,fullName:"Information",avatarUrl:null},this.appIcon=ti[this.content.app],this.setMainElement()}setMainElement(){if(this.content.app===g.COMMENTS||this.content.app===g.SHARES||this.content.app===g.SYNC)return;let e=this.content.url.split("/");e.length>1&&(this.mainElement=e[e.length-1])}};var ei=(()=>{class s{constructor(t,i,r){this.http=t,this.store=i,this.layout=r}getNotifications(t=!1){return this.http.get(`${wt}${t?`/${Kt.UNREAD}`:""}`).pipe(p(i=>i.map(r=>new At(r))))}wasReadNotification(t){return this.http.patch(`${wt}/${t}`,null)}deleteNotification(t){return this.http.delete(`${wt}${t?`/${t}`:""}`)}checkUnreadNotifications(t=!1){this.getNotifications().subscribe(i=>{let r;if(t&&i.length){let n=i[0];r=this.layout.sendNotification("warning",n.fromUser.fullName,this.layout.translateString(`${this.layout.translateString(n.content.event)}: <b>${n.content.element}</b>`),null,{enableHtml:!0})}else{let n=i.filter(o=>!o.wasRead).length;n&&(r=this.layout.sendNotification("warning","Notifications",this.layout.translateString(n===1?"one_notification":"nb_notifications",{nb:n})))}r&&r.onTap.pipe(Zt(1)).subscribe(()=>this.layout.showRSideBarTab(be.NOTIFICATIONS,!0)),this.store.notifications.set(i)})}static{this.\u0275fac=function(i){return new(i||s)(_(ut),_(ft),_(pt))}}static{this.\u0275prov=st({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var En=(()=>{class s{constructor(t,i,r,n,o){this.http=t,this.layout=i,this.store=r,this.webSocket=n,this.notifications=o,this.webSocket.fromEvent("connect").subscribe(()=>this.notifications.checkUnreadNotifications()),this.webSocket.fromEvent("disconnect").subscribe(()=>this.store.onlineUsers.set([])),this.webSocket.fromEvent(ke.EVENTS.NOTIFICATION).subscribe(()=>this.notifications.checkUnreadNotifications(!0)),this.webSocket.fromEvent(G.EVENTS.ONLINE_USER).pipe(p(a=>new W(a))).subscribe(a=>this.newOnlineUser(a)),this.webSocket.fromEvent(G.EVENTS.ONLINE_USERS).pipe(p(a=>a.map(c=>new W(c)))).subscribe(a=>this.setOnlineUsers(a)),this.webSocket.fromEvent(G.EVENTS.ONLINE_STATUS).subscribe(a=>this.receiveOnlineStatus(a))}get user(){return this.store.user.getValue()}initUser(t,i=!1){this.refreshAvatar(),this.layout.setLanguage(t.language),this.store.userImpersonate.set(i||t.impersonated),this.store.user.next(t),this.checkQuota(this.store.user.getValue()),i&&this.disconnectWebSocket(),this.connectWebSocket()}connectWebSocket(){this.webSocket.ioSocket.io.opts.query={onlineStatus:this.user.onlineStatus},this.webSocket.connect()}disconnectWebSocket(){this.webSocket.disconnect()}setOnlineUsers(t){this.store.onlineUsers.set(t)}newOnlineUser(t){this.store.onlineUsers().find(i=>i.id===t.id)?this.receiveOnlineStatus({userId:t.id,status:t.onlineStatus}):this.store.onlineUsers.update(i=>[t,...i])}userHavePermission(t){return this.user.isAdmin?!0:this.user?this.user.applications.indexOf(t)!==-1:!1}browseGroup(t){return this.http.get(`${me}${t?`/${t}`:""}`).pipe(p(i=>new dt(i)))}createPersonalGroup(t){return this.http.post(O,t).pipe(p(i=>new T(i)))}updatePersonalGroup(t,i){return this.http.put(`${O}/${t}`,i).pipe(p(r=>new T(r)))}leavePersonalGroup(t){return this.http.delete(`${ge}/${t}`)}addUsersToGroup(t,i){return this.http.patch(`${O}/${t}/${$.USERS}`,i)}deletePersonalGroup(t){return this.http.delete(`${O}/${t}`)}updateUserFromPersonalGroup(t,i,r){return this.http.patch(`${O}/${t}/${$.USERS}/${i}`,r)}removeUserFromGroup(t,i){return this.http.delete(`${O}/${t}/${$.USERS}/${i}`)}listGuests(){return this.http.get(L).pipe(p(t=>t.map(i=>new R(i))))}getGuest(t){return this.http.get(`${L}/${t}`).pipe(p(i=>new R(i)))}createGuest(t){return this.http.post(L,t).pipe(p(i=>new R(i)))}updateGuest(t,i){return this.http.put(`${L}/${t}`,i).pipe(p(r=>r?new R(r):null))}deleteGuest(t){return this.http.delete(`${L}/${t}`)}genAvatar(){this.http.patch(Ct,null).subscribe({next:()=>this.refreshAvatar(),error:t=>this.layout.sendNotification("error","Configuration","Avatar",t)})}uploadAvatar(t){let i=new FormData;i.append("file",t),this.http.put(Ct,i).subscribe({next:()=>this.refreshAvatar(),error:r=>this.layout.sendNotification("error","Configuration","Avatar",r)})}changePassword(t){return this.http.put(pe,t)}changeLanguage(t){return this.http.put(fe,t)}changeNotification(t){return this.http.put(de,t)}changeOnlineStatus(t,i=!0){this.webSocket.emit(G.EVENTS.ONLINE_STATUS,{status:t,store:i})}receiveOnlineStatus(t){this.user.id===t.userId?this.user.onlineStatus=t.status:this.store.onlineUsers().length&&this.store.onlineUsers.update(i=>i.map(r=>r.id===t.userId?jt(it({},r),{onlineStatus:t.status}):r))}searchMembers(t,i=[]){return this.http.request("search",$.BASE,{body:t}).pipe(p(r=>r.map(n=>new T(n,i))),zt(()=>[]))}setMenusVisibility(t){for(let i of t)if(!(i.id&&(i.hide=!this.userHavePermission(i.id),i.hide))&&(i.checks?.length&&(i.hide=!i.checks.map(r=>r.negate?!this[r.prop][r.value]:this[r.prop][r.value]).every(r=>!!r)),i.submenus?.length&&this.setMenusVisibility(i.submenus),i.title===ye.FILES)){for(let r of i.submenus)if(!r.hide){i.link=r.link;break}}}refreshAvatar(){this.store.userAvatarUrl.next(Se())}checkAppStoreAvailability(){this.http.get(`${Rt.BASE}/${Rt.APP_STORE}`).subscribe({next:t=>this.store.appStoreManifest.set(t),error:t=>console.error(t)})}checkQuota(t){if(!(t.isGuest||t.isLink)&&t.storageQuota){let i=Math.round(100/t.storageQuota*(t.storageQuota-t.storageUsage));i<=1?this.layout.sendNotification("error","Storage Quota","No more space available",null,{disableTimeOut:!0,closeButton:!0}):i<=5?this.layout.sendNotification("warning","Storage Quota",this.layout.translateString("available_space_is_low",{nb:i}),null,{disableTimeOut:!0,closeButton:!0}):i<=10&&this.layout.sendNotification("info","Storage Quota",this.layout.translateString("available_space_is_low",{nb:i}),null,{disableTimeOut:!0,closeButton:!0})}}static{this.\u0275fac=function(i){return new(i||s)(_(ut),_(pt),_(ft),_(V),_(ei))}}static{this.\u0275prov=st({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var Ci={provide:lt,useExisting:H(()=>xi),multi:!0},xi=(()=>{class s{constructor(){this.btnCheckboxTrue=!0,this.btnCheckboxFalse=!1,this.state=!1,this.isDisabled=!1,this.onChange=Function.prototype,this.onTouched=Function.prototype}onClick(){this.isDisabled||(this.toggle(!this.state),this.onChange(this.value))}ngOnInit(){this.toggle(this.trueValue===this.value)}get trueValue(){return typeof this.btnCheckboxTrue<"u"?this.btnCheckboxTrue:!0}get falseValue(){return typeof this.btnCheckboxFalse<"u"?this.btnCheckboxFalse:!1}toggle(t){this.state=t,this.value=this.state?this.trueValue:this.falseValue}writeValue(t){this.state=this.trueValue===t,this.value=t?this.trueValue:this.falseValue}setDisabledState(t){this.isDisabled=t}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}static{this.\u0275fac=function(i){return new(i||s)}}static{this.\u0275dir=ot({type:s,selectors:[["","btnCheckbox",""]],hostVars:3,hostBindings:function(i,r){i&1&&ct("click",function(){return r.onClick()}),i&2&&(at("aria-pressed",r.state),Tt("active",r.state))},inputs:{btnCheckboxTrue:"btnCheckboxTrue",btnCheckboxFalse:"btnCheckboxFalse"},features:[ht([Ci])]})}}return s})(),Ni={provide:lt,useExisting:H(()=>ii),multi:!0},ii=(()=>{class s{get value(){return this.group?this.group.value:this._value}set value(t){if(this.group){this.group.value=t;return}this._value=t,this._onChange(t)}get disabled(){return this._disabled}set disabled(t){this.setDisabledState(t)}get controlOrGroupDisabled(){return this.disabled||this.group&&this.group.disabled?!0:void 0}get hasDisabledClass(){return this.controlOrGroupDisabled&&!this.isActive}get isActive(){return this.btnRadio===this.value}get tabindex(){if(!this.controlOrGroupDisabled)return this.isActive||this.group==null?0:-1}get hasFocus(){return this._hasFocus}constructor(t,i,r,n){this.el=t,this.cdr=i,this.renderer=r,this.group=n,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.uncheckable=!1,this.role="radio",this._disabled=!1,this._hasFocus=!1}toggleIfAllowed(){this.canToggle()&&(this.uncheckable&&this.btnRadio===this.value?this.value=void 0:this.value=this.btnRadio)}onSpacePressed(t){this.toggleIfAllowed(),t.preventDefault()}focus(){this.el.nativeElement.focus()}onFocus(){this._hasFocus=!0}onBlur(){this._hasFocus=!1,this.onTouched()}canToggle(){return!this.controlOrGroupDisabled&&(this.uncheckable||this.btnRadio!==this.value)}ngOnChanges(t){"uncheckable"in t&&(this.uncheckable=this.uncheckable!==!1&&typeof this.uncheckable<"u")}_onChange(t){if(this.group){this.group.value=t;return}this.onTouched(),this.onChange(t)}writeValue(t){this.value=t,this.cdr.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){if(this._disabled=t,t){this.renderer.setAttribute(this.el.nativeElement,"disabled","disabled");return}this.renderer.removeAttribute(this.el.nativeElement,"disabled")}static{this.\u0275fac=function(i){return new(i||s)(D(se),D(Ot),D(re),D(H(()=>si),8))}}static{this.\u0275dir=ot({type:s,selectors:[["","btnRadio",""]],hostVars:8,hostBindings:function(i,r){i&1&&ct("click",function(){return r.toggleIfAllowed()})("keydown.space",function(o){return r.onSpacePressed(o)})("focus",function(){return r.onFocus()})("blur",function(){return r.onBlur()}),i&2&&(at("aria-disabled",r.controlOrGroupDisabled)("aria-checked",r.isActive)("role",r.role)("tabindex",r.tabindex),Tt("disabled",r.hasDisabledClass)("active",r.isActive))},inputs:{btnRadio:"btnRadio",uncheckable:"uncheckable",value:"value",disabled:"disabled"},features:[ht([Ni]),ie]})}}return s})(),Bi={provide:lt,useExisting:H(()=>si),multi:!0},si=(()=>{class s{constructor(t){this.cdr=t,this.onChange=Function.prototype,this.onTouched=Function.prototype,this.role="radiogroup",this._disabled=!1}get value(){return this._value}set value(t){this._value=t,this.onChange(t)}get disabled(){return this._disabled}get tabindex(){return this._disabled?null:0}writeValue(t){this._value=t,this.cdr.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.radioButtons&&(this._disabled=t,this.radioButtons.forEach(i=>{i.setDisabledState(t)}),this.cdr.markForCheck())}onFocus(){if(this._disabled)return;let t=this.getActiveOrFocusedRadio();if(t){t.focus();return}if(this.radioButtons){let i=this.radioButtons.find(r=>!r.disabled);i&&i.focus()}}onBlur(){this.onTouched&&this.onTouched()}selectNext(t){this.selectInDirection("next"),t.preventDefault()}selectPrevious(t){this.selectInDirection("previous"),t.preventDefault()}selectInDirection(t){if(this._disabled)return;function i(n,o){let c=(n+(t==="next"?1:-1))%o.length;return c<0&&(c=o.length-1),c}let r=this.getActiveOrFocusedRadio();if(r&&this.radioButtons){let n=this.radioButtons.toArray(),o=n.indexOf(r);for(let a=i(o,n);a!==o;a=i(a,n))if(n[a].canToggle()){n[a].toggleIfAllowed(),n[a].focus();break}}}getActiveOrFocusedRadio(){if(this.radioButtons)return this.radioButtons.find(t=>t.isActive)||this.radioButtons.find(t=>t.hasFocus)}static{this.\u0275fac=function(i){return new(i||s)(D(Ot))}}static{this.\u0275dir=ot({type:s,selectors:[["","btnRadioGroup",""]],contentQueries:function(i,r,n){if(i&1&&ne(n,ii,4),i&2){let o;oe(o=ae())&&(r.radioButtons=o)}},hostVars:2,hostBindings:function(i,r){i&1&&ct("focus",function(){return r.onFocus()})("blur",function(){return r.onBlur()})("keydown.ArrowRight",function(o){return r.selectNext(o)})("keydown.ArrowDown",function(o){return r.selectNext(o)})("keydown.ArrowLeft",function(o){return r.selectPrevious(o)})("keydown.ArrowUp",function(o){return r.selectPrevious(o)}),i&2&&at("role",r.role)("tabindex",r.tabindex)},features:[ht([Bi])]})}}return s})(),Ln=(()=>{class s{static forRoot(){return{ngModule:s,providers:[]}}static{this.\u0275fac=function(i){return new(i||s)}}static{this.\u0275mod=nt({type:s})}static{this.\u0275inj=rt({})}}return s})();export{Vr as a,dt as b,R as c,g as d,ei as e,En as f,xi as g,Ln as h};
|
package/static/index.html
CHANGED
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
<style>@-webkit-keyframes blink{50%{background-color:transparent}}:root{--bs-blue:#0576b9;--bs-indigo:#6610f2;--bs-purple:#9b59b6;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#ff7700;--bs-yellow:#ffc107;--bs-green:#06854b;--bs-teal:#39CCCC;--bs-cyan:#17a2b8;--bs-black:#111;--bs-white:#ffffff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#1c68b0;--bs-secondary:#c3cee0;--bs-success:#06854b;--bs-info:#0dcaf0;--bs-warning:#ff7700;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:28, 104, 176;--bs-secondary-rgb:195, 206, 224;--bs-success-rgb:6, 133, 75;--bs-info-rgb:13, 202, 240;--bs-warning-rgb:255, 119, 0;--bs-danger-rgb:220, 53, 69;--bs-light-rgb:248, 249, 250;--bs-dark-rgb:33, 37, 41;--bs-primary-text-emphasis:rgb(11.2, 41.6, 70.4);--bs-secondary-text-emphasis:rgb(78, 82.4, 89.6);--bs-success-text-emphasis:rgb(2.4, 53.2, 30);--bs-info-text-emphasis:rgb(5.2, 80.8, 96);--bs-warning-text-emphasis:rgb(102, 47.6, 0);--bs-danger-text-emphasis:rgb(88, 21.2, 27.6);--bs-light-text-emphasis:#495057;--bs-dark-text-emphasis:#495057;--bs-primary-bg-subtle:rgb(209.6, 224.8, 239.2);--bs-secondary-bg-subtle:rgb(243, 245.2, 248.8);--bs-success-bg-subtle:rgb(205.2, 230.6, 219);--bs-info-bg-subtle:rgb(206.6, 244.4, 252);--bs-warning-bg-subtle:rgb(255, 227.8, 204);--bs-danger-bg-subtle:rgb(248, 214.6, 217.8);--bs-light-bg-subtle:rgb(251.5, 252, 252.5);--bs-dark-bg-subtle:#ced4da;--bs-primary-border-subtle:rgb(164.2, 194.6, 223.4);--bs-secondary-border-subtle:rgb(231, 235.4, 242.6);--bs-success-border-subtle:rgb(155.4, 206.2, 183);--bs-info-border-subtle:rgb(158.2, 233.8, 249);--bs-warning-border-subtle:rgb(255, 200.6, 153);--bs-danger-border-subtle:rgb(241, 174.2, 180.6);--bs-light-border-subtle:#e9ecef;--bs-dark-border-subtle:#adb5bd;--bs-white-rgb:255, 255, 255;--bs-black-rgb:17, 17, 17;--bs-font-sans-serif:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--bs-font-monospace:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, .15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:.9rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#333;--bs-body-color-rgb:51, 51, 51;--bs-body-bg:#e1e6ef;--bs-body-bg-rgb:225, 230, 239;--bs-emphasis-color:#111;--bs-emphasis-color-rgb:17, 17, 17;--bs-secondary-color:rgba(51, 51, 51, .75);--bs-secondary-color-rgb:51, 51, 51;--bs-secondary-bg:#e9ecef;--bs-secondary-bg-rgb:233, 236, 239;--bs-tertiary-color:rgba(51, 51, 51, .5);--bs-tertiary-color-rgb:51, 51, 51;--bs-tertiary-bg:#f8f9fa;--bs-tertiary-bg-rgb:248, 249, 250;--bs-heading-color:inherit;--bs-link-color:#0576b9;--bs-link-color-rgb:5, 118, 185;--bs-link-decoration:none;--bs-link-hover-color:rgb(4.3289473684, 102.1631578947, 160.1710526316);--bs-link-hover-color-rgb:4, 102, 160;--bs-link-hover-decoration:none;--bs-code-color:#d63384;--bs-highlight-color:#333;--bs-highlight-bg:#37cb46;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#e1e6ef;--bs-border-color-translucent:rgba(17, 17, 17, .175);--bs-border-radius:.375rem;--bs-border-radius-sm:.25rem;--bs-border-radius-lg:.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-xxl:2rem;--bs-border-radius-2xl:var(--bs-border-radius-xxl);--bs-border-radius-pill:50rem;--bs-box-shadow:0 .5rem 1rem rgba(17, 17, 17, .15);--bs-box-shadow-sm:0 .125rem .25rem rgba(17, 17, 17, .075);--bs-box-shadow-lg:0 1rem 3rem rgba(17, 17, 17, .175);--bs-box-shadow-inset:inset 0 1px 2px rgba(17, 17, 17, .075);--bs-focus-ring-width:.25rem;--bs-focus-ring-opacity:.25;--bs-focus-ring-color:rgba(28, 104, 176, .25);--bs-form-valid-color:#06854b;--bs-form-valid-border-color:#06854b;--bs-form-invalid-color:#dc3545;--bs-form-invalid-border-color:#dc3545}*,*:before,*:after{box-sizing:border-box}@media (prefers-reduced-motion: no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:rgba(17,17,17,0)}:root{--bs-breakpoint-xs:0;--bs-breakpoint-sm:576px;--bs-breakpoint-md:768px;--bs-breakpoint-lg:992px;--bs-breakpoint-xl:1200px;--bs-breakpoint-xxl:1400px}:root{--bs-btn-close-filter: }:root{--bs-carousel-indicator-active-bg:#ffffff;--bs-carousel-caption-color:#ffffff;--bs-carousel-control-icon-filter: }html,body{background-color:#28353b;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;scrollbar-width:thin;scrollbar-color:rgba(155,155,155,.5) transparent;font-size:1rem;height:100%}body ::-webkit-scrollbar{width:8px}body ::-webkit-scrollbar-track{background:transparent}body ::-webkit-scrollbar-thumb{background-color:#9b9b9b80;border-radius:20px;border:transparent}.app-title{content:"Sync-in"}.app-title:before{content:"Sync-in"}.app-loading{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;background:linear-gradient(to bottom right,#020024,#1c68b0 35%,#985ca0);color:#fff}.app-loading:after{content:"Sync-in"}:root{--ngx-contextmenu-font-family:var(--bs-body-font-family) !important;--ngx-contextmenu-border:.5px solid rgba(0, 0, 0, .18) !important;--ngx-contextmenu-item-separator-width:100% !important;--ngx-contextmenu-outline:none !important}:root{--ngx-contextmenu-focusable-border-bottom:1px dotted #70757e;--ngx-contextmenu-font-family:sans-serif;--ngx-contextmenu-background-color:white;--ngx-contextmenu-border-radius:4px;--ngx-contextmenu-border:1px solid rgba(0, 0, 0, .18);--ngx-contextmenu-box-shadow:0 6px 12px rgba(0, 0, 0, .18);--ngx-contextmenu-font-size:14px;--ngx-contextmenu-margin:2px 0 0;--ngx-contextmenu-min-width:160px;--ngx-contextmenu-outline:1px solid #70757e;--ngx-contextmenu-padding:5px 0;--ngx-contextmenu-text-color:#70757e;--ngx-contextmenu-text-disabled-color:#b5bec8;--ngx-contextmenu-max-height:100vh;--ngx-contextmenu-item-arrow-left:"\25c0";--ngx-contextmenu-item-arrow-right:"\25b6";--ngx-contextmenu-item-background-hover-color:#f8f8f8;--ngx-contextmenu-item-separator-color:#b5bec8;--ngx-contextmenu-item-separator-padding:10px;--ngx-contextmenu-item-separator-width:96%;--ngx-contextmenu-item-padding:6px 20px;--ngx-contextmenu-item-text-hover-color:#5a6473}</style><link rel="stylesheet" href="styles-TJJDSCD4.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-TJJDSCD4.css"></noscript></head>
|
|
16
16
|
<body class="theme-light">
|
|
17
17
|
<app-root><span class="app-loading"></span></app-root>
|
|
18
|
-
<link rel="modulepreload" href="chunk-
|
|
18
|
+
<link rel="modulepreload" href="chunk-NCIAR3N4.js"><link rel="modulepreload" href="chunk-GI2LXVWQ.js"><link rel="modulepreload" href="chunk-FBG4NUDE.js"><link rel="modulepreload" href="chunk-AXITQYVN.js"><link rel="modulepreload" href="chunk-3RLZPQMJ.js"><link rel="modulepreload" href="chunk-AA6ZTGRW.js"><link rel="modulepreload" href="chunk-EWY4ALVF.js"><link rel="modulepreload" href="chunk-JXZCNFW7.js"><link rel="modulepreload" href="chunk-VIL6L67B.js"><link rel="modulepreload" href="chunk-VBWPPICY.js"><script src="polyfills-GNKGQMRJ.js" type="module"></script><script src="scripts-MQMRSPYD.js" defer></script><script src="main-7IVUWYWM.js" type="module"></script></body>
|
|
19
19
|
</html>
|