9remote 0.1.26 → 0.1.28
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/dist/cli.cjs +56 -56
- package/dist/ptyDaemon.cjs +5 -5
- package/dist/server.cjs +25 -25
- package/index.js +1 -1
- package/package.json +1 -1
- package/utils/cloudflared.js +76 -6
- package/utils/cloudflared.old.js +0 -273
package/dist/server.cjs
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
const __importMetaUrl = require('url').pathToFileURL(__filename).href;
|
|
2
|
-
var pd=Object.create;var _s=Object.defineProperty;var ud=Object.getOwnPropertyDescriptor;var dd=Object.getOwnPropertyNames;var fd=Object.getPrototypeOf,md=Object.prototype.hasOwnProperty;var $e=(s,e)=>()=>(s&&(e=s(s=0)),e);var v=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports),Ve=(s,e)=>{for(var t in e)_s(s,t,{get:e[t],enumerable:!0})},ma=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of dd(e))!md.call(s,n)&&n!==t&&_s(s,n,{get:()=>e[n],enumerable:!(i=ud(e,n))||i.enumerable});return s};var R=(s,e,t)=>(t=s!=null?pd(fd(s)):{},ma(e||!s||!s.__esModule?_s(t,"default",{value:s,enumerable:!0}):t,s)),hd=s=>ma(_s({},"__esModule",{value:!0}),s);var ga=v((ub,$i)=>{"use strict";$i.exports=xa;$i.exports.preferredCharsets=xa;var vd=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function xd(s){for(var e=s.split(","),t=0,i=0;t<e.length;t++){var n=gd(e[t].trim(),t);n&&(e[i++]=n)}return e.length=i,e}function gd(s,e){var t=vd.exec(s);if(!t)return null;var i=t[1],n=1;if(t[2])for(var r=t[2].split(";"),a=0;a<r.length;a++){var o=r[a].trim().split("=");if(o[0]==="q"){n=parseFloat(o[1]);break}}return{charset:i,q:n,i:e}}function bd(s,e,t){for(var i={o:-1,q:0,s:0},n=0;n<e.length;n++){var r=yd(s,e[n],t);r&&(i.s-r.s||i.q-r.q||i.o-r.o)<0&&(i=r)}return i}function yd(s,e,t){var i=0;if(e.charset.toLowerCase()===s.toLowerCase())i|=1;else if(e.charset!=="*")return null;return{i:t,o:e.i,q:e.q,s:i}}function xa(s,e){var t=xd(s===void 0?"*":s||"");if(!e)return t.filter(va).sort(ha).map(wd);var i=e.map(function(r,a){return bd(r,t,a)});return i.filter(va).sort(ha).map(function(r){return e[i.indexOf(r)]})}function ha(s,e){return e.q-s.q||e.s-s.s||s.o-e.o||s.i-e.i||0}function wd(s){return s.charset}function va(s){return s.q>0}});var Sa=v((db,Vi)=>{"use strict";Vi.exports=_a;Vi.exports.preferredEncodings=_a;var _d=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function Sd(s){for(var e=s.split(","),t=!1,i=1,n=0,r=0;n<e.length;n++){var a=Ed(e[n].trim(),n);a&&(e[r++]=a,t=t||wa("identity",a),i=Math.min(i,a.q||1))}return t||(e[r++]={encoding:"identity",q:i,i:n}),e.length=r,e}function Ed(s,e){var t=_d.exec(s);if(!t)return null;var i=t[1],n=1;if(t[2])for(var r=t[2].split(";"),a=0;a<r.length;a++){var o=r[a].trim().split("=");if(o[0]==="q"){n=parseFloat(o[1]);break}}return{encoding:i,q:n,i:e}}function kd(s,e,t){for(var i={o:-1,q:0,s:0},n=0;n<e.length;n++){var r=wa(s,e[n],t);r&&(i.s-r.s||i.q-r.q||i.o-r.o)<0&&(i=r)}return i}function wa(s,e,t){var i=0;if(e.encoding.toLowerCase()===s.toLowerCase())i|=1;else if(e.encoding!=="*")return null;return{i:t,o:e.i,q:e.q,s:i}}function _a(s,e){var t=Sd(s||"");if(!e)return t.filter(ya).sort(ba).map(Cd);var i=e.map(function(r,a){return kd(r,t,a)});return i.filter(ya).sort(ba).map(function(r){return e[i.indexOf(r)]})}function ba(s,e){return e.q-s.q||e.s-s.s||s.o-e.o||s.i-e.i||0}function Cd(s){return s.encoding}function ya(s){return s.q>0}});var Oa=v((fb,Gi)=>{"use strict";Gi.exports=Ta;Gi.exports.preferredLanguages=Ta;var Td=/^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/;function Od(s){for(var e=s.split(","),t=0,i=0;t<e.length;t++){var n=Ca(e[t].trim(),t);n&&(e[i++]=n)}return e.length=i,e}function Ca(s,e){var t=Td.exec(s);if(!t)return null;var i=t[1],n=t[2],r=i;n&&(r+="-"+n);var a=1;if(t[3])for(var o=t[3].split(";"),c=0;c<o.length;c++){var l=o[c].split("=");l[0]==="q"&&(a=parseFloat(l[1]))}return{prefix:i,suffix:n,q:a,i:e,full:r}}function Rd(s,e,t){for(var i={o:-1,q:0,s:0},n=0;n<e.length;n++){var r=Ad(s,e[n],t);r&&(i.s-r.s||i.q-r.q||i.o-r.o)<0&&(i=r)}return i}function Ad(s,e,t){var i=Ca(s);if(!i)return null;var n=0;if(e.full.toLowerCase()===i.full.toLowerCase())n|=4;else if(e.prefix.toLowerCase()===i.full.toLowerCase())n|=2;else if(e.full.toLowerCase()===i.prefix.toLowerCase())n|=1;else if(e.full!=="*")return null;return{i:t,o:e.i,q:e.q,s:n}}function Ta(s,e){var t=Od(s===void 0?"*":s||"");if(!e)return t.filter(ka).sort(Ea).map(Pd);var i=e.map(function(r,a){return Rd(r,t,a)});return i.filter(ka).sort(Ea).map(function(r){return e[i.indexOf(r)]})}function Ea(s,e){return e.q-s.q||e.s-s.s||s.o-e.o||s.i-e.i||0}function Pd(s){return s.full}function ka(s){return s.q>0}});var Da=v((mb,Ki)=>{"use strict";Ki.exports=ja;Ki.exports.preferredMediaTypes=ja;var jd=/^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;function Md(s){for(var e=Ld(s),t=0,i=0;t<e.length;t++){var n=Pa(e[t].trim(),t);n&&(e[i++]=n)}return e.length=i,e}function Pa(s,e){var t=jd.exec(s);if(!t)return null;var i=Object.create(null),n=1,r=t[2],a=t[1];if(t[3])for(var o=qd(t[3]).map(Nd),c=0;c<o.length;c++){var l=o[c],p=l[0].toLowerCase(),u=l[1],d=u&&u[0]==='"'&&u[u.length-1]==='"'?u.substr(1,u.length-2):u;if(p==="q"){n=parseFloat(d);break}i[p]=d}return{type:a,subtype:r,params:i,q:n,i:e}}function Dd(s,e,t){for(var i={o:-1,q:0,s:0},n=0;n<e.length;n++){var r=Bd(s,e[n],t);r&&(i.s-r.s||i.q-r.q||i.o-r.o)<0&&(i=r)}return i}function Bd(s,e,t){var i=Pa(s),n=0;if(!i)return null;if(e.type.toLowerCase()==i.type.toLowerCase())n|=4;else if(e.type!="*")return null;if(e.subtype.toLowerCase()==i.subtype.toLowerCase())n|=2;else if(e.subtype!="*")return null;var r=Object.keys(e.params);if(r.length>0)if(r.every(function(a){return e.params[a]=="*"||(e.params[a]||"").toLowerCase()==(i.params[a]||"").toLowerCase()}))n|=1;else return null;return{i:t,o:e.i,q:e.q,s:n}}function ja(s,e){var t=Md(s===void 0?"*/*":s||"");if(!e)return t.filter(Aa).sort(Ra).map(Id);var i=e.map(function(r,a){return Dd(r,t,a)});return i.filter(Aa).sort(Ra).map(function(r){return e[i.indexOf(r)]})}function Ra(s,e){return e.q-s.q||e.s-s.s||s.o-e.o||s.i-e.i||0}function Id(s){return s.type+"/"+s.subtype}function Aa(s){return s.q>0}function Ma(s){for(var e=0,t=0;(t=s.indexOf('"',t))!==-1;)e++,t++;return e}function Nd(s){var e=s.indexOf("="),t,i;return e===-1?t=s:(t=s.substr(0,e),i=s.substr(e+1)),[t,i]}function Ld(s){for(var e=s.split(","),t=1,i=0;t<e.length;t++)Ma(e[i])%2==0?e[++i]=e[t]:e[i]+=","+e[t];return e.length=i+1,e}function qd(s){for(var e=s.split(";"),t=1,i=0;t<e.length;t++)Ma(e[i])%2==0?e[++i]=e[t]:e[i]+=";"+e[t];e.length=i+1;for(var t=0;t<e.length;t++)e[t]=e[t].trim();return e}});var Ba=v((hb,Yi)=>{"use strict";var Fd=ga(),Ud=Sa(),Hd=Oa(),zd=Da();Yi.exports=E;Yi.exports.Negotiator=E;function E(s){if(!(this instanceof E))return new E(s);this.request=s}E.prototype.charset=function(e){var t=this.charsets(e);return t&&t[0]};E.prototype.charsets=function(e){return Fd(this.request.headers["accept-charset"],e)};E.prototype.encoding=function(e){var t=this.encodings(e);return t&&t[0]};E.prototype.encodings=function(e){return Ud(this.request.headers["accept-encoding"],e)};E.prototype.language=function(e){var t=this.languages(e);return t&&t[0]};E.prototype.languages=function(e){return Hd(this.request.headers["accept-language"],e)};E.prototype.mediaType=function(e){var t=this.mediaTypes(e);return t&&t[0]};E.prototype.mediaTypes=function(e){return zd(this.request.headers.accept,e)};E.prototype.preferredCharset=E.prototype.charset;E.prototype.preferredCharsets=E.prototype.charsets;E.prototype.preferredEncoding=E.prototype.encoding;E.prototype.preferredEncodings=E.prototype.encodings;E.prototype.preferredLanguage=E.prototype.language;E.prototype.preferredLanguages=E.prototype.languages;E.prototype.preferredMediaType=E.prototype.mediaType;E.prototype.preferredMediaTypes=E.prototype.mediaTypes});var Ia=v((vb,Wd)=>{Wd.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var La=v((xb,Na)=>{Na.exports=Ia()});var Ua=v(K=>{"use strict";var Ss=La(),$d=require("path").extname,qa=/^\s*([^;\s]*)(?:;|\s|$)/,Vd=/^text\//i;K.charset=Fa;K.charsets={lookup:Fa};K.contentType=Gd;K.extension=Kd;K.extensions=Object.create(null);K.lookup=Yd;K.types=Object.create(null);Xd(K.extensions,K.types);function Fa(s){if(!s||typeof s!="string")return!1;var e=qa.exec(s),t=e&&Ss[e[1].toLowerCase()];return t&&t.charset?t.charset:e&&Vd.test(e[1])?"UTF-8":!1}function Gd(s){if(!s||typeof s!="string")return!1;var e=s.indexOf("/")===-1?K.lookup(s):s;if(!e)return!1;if(e.indexOf("charset")===-1){var t=K.charset(e);t&&(e+="; charset="+t.toLowerCase())}return e}function Kd(s){if(!s||typeof s!="string")return!1;var e=qa.exec(s),t=e&&K.extensions[e[1].toLowerCase()];return!t||!t.length?!1:t[0]}function Yd(s){if(!s||typeof s!="string")return!1;var e=$d("x."+s).toLowerCase().substr(1);return e&&K.types[e]||!1}function Xd(s,e){var t=["nginx","apache",void 0,"iana"];Object.keys(Ss).forEach(function(n){var r=Ss[n],a=r.extensions;if(!(!a||!a.length)){s[n]=a;for(var o=0;o<a.length;o++){var c=a[o];if(e[c]){var l=t.indexOf(Ss[e[c]].source),p=t.indexOf(r.source);if(e[c]!=="application/octet-stream"&&(l>p||l===p&&e[c].substr(0,12)==="application/"))continue}e[c]=n}}})}});var Es=v((bb,Ha)=>{"use strict";var Jd=Ba(),Qd=Ua();Ha.exports=Z;function Z(s){if(!(this instanceof Z))return new Z(s);this.headers=s.headers,this.negotiator=new Jd(s)}Z.prototype.type=Z.prototype.types=function(s){var e=s;if(e&&!Array.isArray(e)){e=new Array(arguments.length);for(var t=0;t<e.length;t++)e[t]=arguments[t]}if(!e||e.length===0)return this.negotiator.mediaTypes();if(!this.headers.accept)return e[0];var i=e.map(Zd),n=this.negotiator.mediaTypes(i.filter(ef)),r=n[0];return r?e[i.indexOf(r)]:!1};Z.prototype.encoding=Z.prototype.encodings=function(s){var e=s;if(e&&!Array.isArray(e)){e=new Array(arguments.length);for(var t=0;t<e.length;t++)e[t]=arguments[t]}return!e||e.length===0?this.negotiator.encodings():this.negotiator.encodings(e)[0]||!1};Z.prototype.charset=Z.prototype.charsets=function(s){var e=s;if(e&&!Array.isArray(e)){e=new Array(arguments.length);for(var t=0;t<e.length;t++)e[t]=arguments[t]}return!e||e.length===0?this.negotiator.charsets():this.negotiator.charsets(e)[0]||!1};Z.prototype.lang=Z.prototype.langs=Z.prototype.language=Z.prototype.languages=function(s){var e=s;if(e&&!Array.isArray(e)){e=new Array(arguments.length);for(var t=0;t<e.length;t++)e[t]=arguments[t]}return!e||e.length===0?this.negotiator.languages():this.negotiator.languages(e)[0]||!1};function Zd(s){return s.indexOf("/")===-1?Qd.lookup(s):s}function ef(s){return typeof s=="string"}});var Ji=v((za,Wa)=>{var Kt=require("crypto"),Xi=function(){};Xi.prototype.getRandomBytes=function(s){var e=4096,t=this;if(s=s||12,s>e)return Kt.randomBytes(s);var i=parseInt(e/s),n=parseInt(i*.85);if(!n||(this.bytesBufferIndex==null&&(this.bytesBufferIndex=-1),this.bytesBufferIndex==i&&(this.bytesBuffer=null,this.bytesBufferIndex=-1),(this.bytesBufferIndex==-1||this.bytesBufferIndex>n)&&(this.isGeneratingBytes||(this.isGeneratingBytes=!0,Kt.randomBytes(e,function(a,o){t.bytesBuffer=o,t.bytesBufferIndex=0,t.isGeneratingBytes=!1})),this.bytesBufferIndex==-1)))return Kt.randomBytes(s);var r=this.bytesBuffer.slice(s*this.bytesBufferIndex,s*(this.bytesBufferIndex+1));return this.bytesBufferIndex++,r};Xi.prototype.generateId=function(){var s=Buffer.alloc(15);return s.writeInt32BE?(this.sequenceNumber=this.sequenceNumber+1|0,s.writeInt32BE(this.sequenceNumber,11),Kt.randomBytes?this.getRandomBytes(12).copy(s):[0,4,8].forEach(function(e){s.writeInt32BE(Math.random()*Math.pow(2,32)|0,e)}),s.toString("base64").replace(/\//g,"_").replace(/\+/g,"-")):Math.abs(Math.random()*Math.random()*Date.now()|0).toString()+Math.abs(Math.random()*Math.random()*Date.now()|0).toString()};za=Wa.exports=new Xi});var ks=v(Be=>{"use strict";Object.defineProperty(Be,"__esModule",{value:!0});Be.ERROR_PACKET=Be.PACKET_TYPES_REVERSE=Be.PACKET_TYPES=void 0;var xe=Object.create(null);Be.PACKET_TYPES=xe;xe.open="0";xe.close="1";xe.ping="2";xe.pong="3";xe.message="4";xe.upgrade="5";xe.noop="6";var $a=Object.create(null);Be.PACKET_TYPES_REVERSE=$a;Object.keys(xe).forEach(s=>{$a[xe[s]]=s});var tf={type:"error",data:"parser error"};Be.ERROR_PACKET=tf});var Ga=v(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.encodePacket=void 0;ct.encodePacketToBinary=rf;var sf=ks(),nf=({type:s,data:e},t,i)=>e instanceof ArrayBuffer||ArrayBuffer.isView(e)?i(t?e:"b"+Va(e,!0).toString("base64")):i(sf.PACKET_TYPES[s]+(e||""));ct.encodePacket=nf;var Va=(s,e)=>Buffer.isBuffer(s)||s instanceof Uint8Array&&!e?s:s instanceof ArrayBuffer?Buffer.from(s):Buffer.from(s.buffer,s.byteOffset,s.byteLength),Qi;function rf(s,e){if(s.data instanceof ArrayBuffer||ArrayBuffer.isView(s.data))return e(Va(s.data,!1));(0,ct.encodePacket)(s,!0,t=>{Qi||(Qi=new TextEncoder),e(Qi.encode(t))})}});var Ya=v(Ts=>{"use strict";Object.defineProperty(Ts,"__esModule",{value:!0});Ts.decodePacket=void 0;var Cs=ks(),af=(s,e)=>{if(typeof s!="string")return{type:"message",data:Ka(s,e)};let t=s.charAt(0);if(t==="b"){let i=Buffer.from(s.substring(1),"base64");return{type:"message",data:Ka(i,e)}}return Cs.PACKET_TYPES_REVERSE[t]?s.length>1?{type:Cs.PACKET_TYPES_REVERSE[t],data:s.substring(1)}:{type:Cs.PACKET_TYPES_REVERSE[t]}:Cs.ERROR_PACKET};Ts.decodePacket=af;var Ka=(s,e)=>e==="arraybuffer"?s instanceof ArrayBuffer?s:Buffer.isBuffer(s)?s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength):s.buffer:Buffer.isBuffer(s)?s:Buffer.from(s)});var Yt=v(Y=>{"use strict";Object.defineProperty(Y,"__esModule",{value:!0});Y.decodePayload=Y.decodePacket=Y.encodePayload=Y.encodePacket=Y.protocol=void 0;Y.createPacketEncoderStream=lf;Y.createPacketDecoderStream=pf;var en=Ga();Object.defineProperty(Y,"encodePacket",{enumerable:!0,get:function(){return en.encodePacket}});var tn=Ya();Object.defineProperty(Y,"decodePacket",{enumerable:!0,get:function(){return tn.decodePacket}});var Xa=ks(),Ja="",of=(s,e)=>{let t=s.length,i=new Array(t),n=0;s.forEach((r,a)=>{(0,en.encodePacket)(r,!1,o=>{i[a]=o,++n===t&&e(i.join(Ja))})})};Y.encodePayload=of;var cf=(s,e)=>{let t=s.split(Ja),i=[];for(let n=0;n<t.length;n++){let r=(0,tn.decodePacket)(t[n],e);if(i.push(r),r.type==="error")break}return i};Y.decodePayload=cf;function lf(){return new TransformStream({transform(s,e){(0,en.encodePacketToBinary)(s,t=>{let i=t.length,n;if(i<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,i);else if(i<65536){n=new Uint8Array(3);let r=new DataView(n.buffer);r.setUint8(0,126),r.setUint16(1,i)}else{n=new Uint8Array(9);let r=new DataView(n.buffer);r.setUint8(0,127),r.setBigUint64(1,BigInt(i))}s.data&&typeof s.data!="string"&&(n[0]|=128),e.enqueue(n),e.enqueue(t)})}})}var Zi;function Os(s){return s.reduce((e,t)=>e+t.length,0)}function Rs(s,e){if(s[0].length===e)return s.shift();let t=new Uint8Array(e),i=0;for(let n=0;n<e;n++)t[n]=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 pf(s,e){Zi||(Zi=new TextDecoder);let t=[],i=0,n=-1,r=!1;return new TransformStream({transform(a,o){for(t.push(a);;){if(i===0){if(Os(t)<1)break;let c=Rs(t,1);r=(c[0]&128)===128,n=c[0]&127,n<126?i=3:n===126?i=1:i=2}else if(i===1){if(Os(t)<2)break;let c=Rs(t,2);n=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),i=3}else if(i===2){if(Os(t)<8)break;let c=Rs(t,8),l=new DataView(c.buffer,c.byteOffset,c.length),p=l.getUint32(0);if(p>Math.pow(2,21)-1){o.enqueue(Xa.ERROR_PACKET);break}n=p*Math.pow(2,32)+l.getUint32(4),i=3}else{if(Os(t)<n)break;let c=Rs(t,n);o.enqueue((0,tn.decodePacket)(r?c:Zi.decode(c),e)),i=0}if(n===0||n>s){o.enqueue(Xa.ERROR_PACKET);break}}}})}Y.protocol=4});var to=v((Eb,eo)=>{var Ie=String.fromCharCode;function Qa(s){for(var e=[],t=0,i=s.length,n,r;t<i;)n=s.charCodeAt(t++),n>=55296&&n<=56319&&t<i?(r=s.charCodeAt(t++),(r&64512)==56320?e.push(((n&1023)<<10)+(r&1023)+65536):(e.push(n),t--)):e.push(n);return e}function uf(s){for(var e=s.length,t=-1,i,n="";++t<e;)i=s[t],i>65535&&(i-=65536,n+=Ie(i>>>10&1023|55296),i=56320|i&1023),n+=Ie(i);return n}function Za(s,e){if(s>=55296&&s<=57343){if(e)throw Error("Lone surrogate U+"+s.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function sn(s,e){return Ie(s>>e&63|128)}function df(s,e){if((s&4294967168)==0)return Ie(s);var t="";return(s&4294965248)==0?t=Ie(s>>6&31|192):(s&4294901760)==0?(Za(s,e)||(s=65533),t=Ie(s>>12&15|224),t+=sn(s,6)):(s&4292870144)==0&&(t=Ie(s>>18&7|240),t+=sn(s,12),t+=sn(s,6)),t+=Ie(s&63|128),t}function ff(s,e){e=e||{};for(var t=e.strict!==!1,i=Qa(s),n=i.length,r=-1,a,o="";++r<n;)a=i[r],o+=df(a,t);return o}function lt(){if(Ne>=Ps)throw Error("Invalid byte index");var s=As[Ne]&255;if(Ne++,(s&192)==128)return s&63;throw Error("Invalid continuation byte")}function mf(s){var e,t,i,n,r;if(Ne>Ps)throw Error("Invalid byte index");if(Ne==Ps)return!1;if(e=As[Ne]&255,Ne++,(e&128)==0)return e;if((e&224)==192){if(t=lt(),r=(e&31)<<6|t,r>=128)return r;throw Error("Invalid continuation byte")}if((e&240)==224){if(t=lt(),i=lt(),r=(e&15)<<12|t<<6|i,r>=2048)return Za(r,s)?r:65533;throw Error("Invalid continuation byte")}if((e&248)==240&&(t=lt(),i=lt(),n=lt(),r=(e&7)<<18|t<<12|i<<6|n,r>=65536&&r<=1114111))return r;throw Error("Invalid UTF-8 detected")}var As,Ps,Ne;function hf(s,e){e=e||{};var t=e.strict!==!1;As=Qa(s),Ps=As.length,Ne=0;for(var i=[],n;(n=mf(t))!==!1;)i.push(n);return uf(i)}eo.exports={version:"2.1.2",encode:ff,decode:hf}});var lo=v(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.packets=B.protocol=void 0;B.encodePacket=nn;B.encodeBase64Packet=no;B.decodePacket=rn;B.decodeBase64Packet=ro;B.encodePayload=bf;B.decodePayload=wf;B.encodePayloadAsBinary=oo;B.decodePayloadAsBinary=co;var io=to();B.protocol=3;var vf=s=>{for(let e of s)if(e.data instanceof ArrayBuffer||ArrayBuffer.isView(e.data))return!0;return!1};B.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6};var pt=Object.keys(B.packets),pe={type:"error",data:"parser error"},xf=Buffer.concat([]);function nn(s,e,t,i){if(typeof e=="function"&&(i=e,e=null),typeof t=="function"&&(i=t,t=null),Buffer.isBuffer(s.data))return so(s,e,i);if(s.data&&(s.data.buffer||s.data)instanceof ArrayBuffer)return so({type:s.type,data:an(s.data)},e,i);var n=B.packets[s.type];return s.data!==void 0&&(n+=t?io.encode(String(s.data),{strict:!1}):String(s.data)),i(""+n)}function so(s,e,t){if(!e)return no(s,t);var i=s.data,n=Buffer.allocUnsafe(1);return n[0]=B.packets[s.type],t(Buffer.concat([n,i]))}function no(s,e){var t=Buffer.isBuffer(s.data)?s.data:an(s.data),i="b"+B.packets[s.type];return i+=t.toString("base64"),e(i)}function rn(s,e,t){if(s===void 0)return pe;let i;if(typeof s=="string")return i=s.charAt(0),i==="b"?ro(s.slice(1),e):t&&(s=gf(s),s===!1)||Number(i)!=i||!pt[i]?pe:s.length>1?{type:pt[i],data:s.slice(1)}:{type:pt[i]};if(e==="arraybuffer"){var n=new Uint8Array(s);return i=n[0],{type:pt[i],data:n.buffer.slice(1)}}return s instanceof ArrayBuffer&&(s=an(s)),i=s[0],{type:pt[i],data:s.slice(1)}}function gf(s){try{s=io.decode(s,{strict:!1})}catch{return!1}return s}function ro(s,e){var t=pt[s.charAt(0)],i=Buffer.from(s.slice(1),"base64");if(e==="arraybuffer"){for(var n=new Uint8Array(i.length),r=0;r<n.length;r++)n[r]=i[r];i=n.buffer}return{type:t,data:i}}function bf(s,e,t){if(typeof e=="function"&&(t=e,e=null),e&&vf(s))return oo(s,t);if(!s.length)return t("0:");function i(n,r){nn(n,e,!1,function(a){r(null,yf(a))})}ao(s,i,function(n,r){return t(r.join(""))})}function yf(s){return s.length+":"+s}function ao(s,e,t){let i=new Array(s.length),n=0;for(let r=0;r<s.length;r++)e(s[r],(a,o)=>{i[r]=o,++n===s.length&&t(null,i)})}function wf(s,e,t){if(typeof s!="string")return co(s,e,t);if(typeof e=="function"&&(t=e,e=null),s==="")return t(pe,0,1);for(var i="",n,r,a,o=0,c=s.length;o<c;o++){var l=s.charAt(o);if(l!==":"){i+=l;continue}if(i===""||i!=(n=Number(i))||(r=s.slice(o+1,o+1+n),i!=r.length))return t(pe,0,1);if(r.length){if(a=rn(r,e,!1),pe.type===a.type&&pe.data===a.data)return t(pe,0,1);var p=t(a,o+n,c);if(p===!1)return}o+=n,i=""}if(i!=="")return t(pe,0,1)}function _f(s){for(var e="",t=0,i=s.length;t<i;t++)e+=String.fromCharCode(s[t]);return e}function Sf(s){for(var e=Buffer.allocUnsafe(s.length),t=0,i=s.length;t<i;t++)e.writeUInt8(s.charCodeAt(t),t);return e}function an(s){var e=s.byteLength||s.length,t=s.byteOffset||0;return Buffer.from(s.buffer||s,t,e)}function oo(s,e){if(!s.length)return e(xf);ao(s,Ef,function(t,i){return e(Buffer.concat(i))})}function Ef(s,e){function t(i){var n=""+i.length,r;if(typeof i=="string"){r=Buffer.allocUnsafe(n.length+2),r[0]=0;for(var a=0;a<n.length;a++)r[a+1]=parseInt(n[a],10);return r[r.length-1]=255,e(null,Buffer.concat([r,Sf(i)]))}r=Buffer.allocUnsafe(n.length+2),r[0]=1;for(var a=0;a<n.length;a++)r[a+1]=parseInt(n[a],10);r[r.length-1]=255,e(null,Buffer.concat([r,i]))}nn(s,!0,!0,t)}function co(s,e,t){typeof e=="function"&&(t=e,e=null);for(var i=s,n=[],r;i.length>0;){var a="",o=i[0]===0;for(r=1;i[r]!==255;r++){if(a.length>310)return t(pe,0,1);a+=""+i[r]}i=i.slice(a.length+1);var c=parseInt(a,10),l=i.slice(1,c+1);o&&(l=_f(l)),n.push(l),i=i.slice(c+1)}var p=n.length;for(r=0;r<p;r++){var u=n[r];t(rn(u,e,!0),r,p)}}});var uo=v((Cb,po)=>{var ut=1e3,dt=ut*60,ft=dt*60,Ge=ft*24,kf=Ge*7,Cf=Ge*365.25;po.exports=function(s,e){e=e||{};var t=typeof s;if(t==="string"&&s.length>0)return Tf(s);if(t==="number"&&isFinite(s))return e.long?Rf(s):Of(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))};function Tf(s){if(s=String(s),!(s.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(e){var t=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return t*Cf;case"weeks":case"week":case"w":return t*kf;case"days":case"day":case"d":return t*Ge;case"hours":case"hour":case"hrs":case"hr":case"h":return t*ft;case"minutes":case"minute":case"mins":case"min":case"m":return t*dt;case"seconds":case"second":case"secs":case"sec":case"s":return t*ut;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function Of(s){var e=Math.abs(s);return e>=Ge?Math.round(s/Ge)+"d":e>=ft?Math.round(s/ft)+"h":e>=dt?Math.round(s/dt)+"m":e>=ut?Math.round(s/ut)+"s":s+"ms"}function Rf(s){var e=Math.abs(s);return e>=Ge?js(s,e,Ge,"day"):e>=ft?js(s,e,ft,"hour"):e>=dt?js(s,e,dt,"minute"):e>=ut?js(s,e,ut,"second"):s+" ms"}function js(s,e,t,i){var n=e>=t*1.5;return Math.round(s/t)+" "+i+(n?"s":"")}});var on=v((Tb,fo)=>{function Af(s){t.debug=t,t.default=t,t.coerce=c,t.disable=a,t.enable=n,t.enabled=o,t.humanize=uo(),t.destroy=l,Object.keys(s).forEach(p=>{t[p]=s[p]}),t.names=[],t.skips=[],t.formatters={};function e(p){let u=0;for(let d=0;d<p.length;d++)u=(u<<5)-u+p.charCodeAt(d),u|=0;return t.colors[Math.abs(u)%t.colors.length]}t.selectColor=e;function t(p){let u,d=null,h,m;function f(...x){if(!f.enabled)return;let w=f,b=Number(new Date),F=b-(u||b);w.diff=F,w.prev=u,w.curr=b,u=b,x[0]=t.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let D=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(G,he)=>{if(G==="%%")return"%";D++;let _e=t.formatters[he];if(typeof _e=="function"){let ve=x[D];G=_e.call(w,ve),x.splice(D,1),D--}return G}),t.formatArgs.call(w,x),(w.log||t.log).apply(w,x)}return f.namespace=p,f.useColors=t.useColors(),f.color=t.selectColor(p),f.extend=i,f.destroy=t.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==t.namespaces&&(h=t.namespaces,m=t.enabled(p)),m),set:x=>{d=x}}),typeof t.init=="function"&&t.init(f),f}function i(p,u){let d=t(this.namespace+(typeof u>"u"?":":u)+p);return d.log=this.log,d}function n(p){t.save(p),t.namespaces=p,t.names=[],t.skips=[];let u=(typeof p=="string"?p:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of u)d[0]==="-"?t.skips.push(d.slice(1)):t.names.push(d)}function r(p,u){let d=0,h=0,m=-1,f=0;for(;d<p.length;)if(h<u.length&&(u[h]===p[d]||u[h]==="*"))u[h]==="*"?(m=h,f=d,h++):(d++,h++);else if(m!==-1)h=m+1,f++,d=f;else return!1;for(;h<u.length&&u[h]==="*";)h++;return h===u.length}function a(){let p=[...t.names,...t.skips.map(u=>"-"+u)].join(",");return t.enable(""),p}function o(p){for(let u of t.skips)if(r(p,u))return!1;for(let u of t.names)if(r(p,u))return!0;return!1}function c(p){return p instanceof Error?p.stack||p.message:p}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}fo.exports=Af});var mo=v((X,Ms)=>{X.formatArgs=jf;X.save=Mf;X.load=Df;X.useColors=Pf;X.storage=Bf();X.destroy=(()=>{let s=!1;return()=>{s||(s=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();X.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Pf(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let s;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(s=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(s[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function jf(s){if(s[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+s[0]+(this.useColors?"%c ":" ")+"+"+Ms.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;s.splice(1,0,e,"color: inherit");let t=0,i=0;s[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(t++,n==="%c"&&(i=t))}),s.splice(i,0,e)}X.log=console.debug||console.log||(()=>{});function Mf(s){try{s?X.storage.setItem("debug",s):X.storage.removeItem("debug")}catch{}}function Df(){let s;try{s=X.storage.getItem("debug")||X.storage.getItem("DEBUG")}catch{}return!s&&typeof process<"u"&&"env"in process&&(s=process.env.DEBUG),s}function Bf(){try{return localStorage}catch{}}Ms.exports=on()(X);var{formatters:If}=Ms.exports;If.j=function(s){try{return JSON.stringify(s)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var vo=v((Ob,ho)=>{"use strict";ho.exports=(s,e=process.argv)=>{let t=s.startsWith("-")?"":s.length===1?"-":"--",i=e.indexOf(t+s),n=e.indexOf("--");return i!==-1&&(n===-1||i<n)}});var pn=v((Rb,go)=>{"use strict";var Nf=require("os"),xo=require("tty"),ie=vo(),{env:I}=process,Le;ie("no-color")||ie("no-colors")||ie("color=false")||ie("color=never")?Le=0:(ie("color")||ie("colors")||ie("color=true")||ie("color=always"))&&(Le=1);"FORCE_COLOR"in I&&(I.FORCE_COLOR==="true"?Le=1:I.FORCE_COLOR==="false"?Le=0:Le=I.FORCE_COLOR.length===0?1:Math.min(parseInt(I.FORCE_COLOR,10),3));function cn(s){return s===0?!1:{level:s,hasBasic:!0,has256:s>=2,has16m:s>=3}}function ln(s,e){if(Le===0)return 0;if(ie("color=16m")||ie("color=full")||ie("color=truecolor"))return 3;if(ie("color=256"))return 2;if(s&&!e&&Le===void 0)return 0;let t=Le||0;if(I.TERM==="dumb")return t;if(process.platform==="win32"){let i=Nf.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in I)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(i=>i in I)||I.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in I)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(I.TEAMCITY_VERSION)?1:0;if(I.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in I){let i=parseInt((I.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(I.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(I.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(I.TERM)||"COLORTERM"in I?1:t}function Lf(s){let e=ln(s,s&&s.isTTY);return cn(e)}go.exports={supportsColor:Lf,stdout:cn(ln(!0,xo.isatty(1))),stderr:cn(ln(!0,xo.isatty(2)))}});var yo=v((N,Bs)=>{var qf=require("tty"),Ds=require("util");N.init=Vf;N.log=zf;N.formatArgs=Uf;N.save=Wf;N.load=$f;N.useColors=Ff;N.destroy=Ds.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");N.colors=[6,2,3,4,5,1];try{let s=pn();s&&(s.stderr||s).level>=2&&(N.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}N.inspectOpts=Object.keys(process.env).filter(s=>/^debug_/i.test(s)).reduce((s,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(n,r)=>r.toUpperCase()),i=process.env[e];return/^(yes|on|true|enabled)$/i.test(i)?i=!0:/^(no|off|false|disabled)$/i.test(i)?i=!1:i==="null"?i=null:i=Number(i),s[t]=i,s},{});function Ff(){return"colors"in N.inspectOpts?!!N.inspectOpts.colors:qf.isatty(process.stderr.fd)}function Uf(s){let{namespace:e,useColors:t}=this;if(t){let i=this.color,n="\x1B[3"+(i<8?i:"8;5;"+i),r=` ${n};1m${e} \x1B[0m`;s[0]=r+s[0].split(`
|
|
2
|
+
var dd=Object.create;var _s=Object.defineProperty;var fd=Object.getOwnPropertyDescriptor;var md=Object.getOwnPropertyNames;var hd=Object.getPrototypeOf,gd=Object.prototype.hasOwnProperty;var $e=(s,e)=>()=>(s&&(e=s(s=0)),e);var g=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports),Ve=(s,e)=>{for(var t in e)_s(s,t,{get:e[t],enumerable:!0})},ma=(s,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of md(e))!gd.call(s,n)&&n!==t&&_s(s,n,{get:()=>e[n],enumerable:!(i=fd(e,n))||i.enumerable});return s};var R=(s,e,t)=>(t=s!=null?dd(hd(s)):{},ma(e||!s||!s.__esModule?_s(t,"default",{value:s,enumerable:!0}):t,s)),xd=s=>ma(_s({},"__esModule",{value:!0}),s);var va=g((fb,$i)=>{"use strict";$i.exports=xa;$i.exports.preferredCharsets=xa;var vd=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function bd(s){for(var e=s.split(","),t=0,i=0;t<e.length;t++){var n=yd(e[t].trim(),t);n&&(e[i++]=n)}return e.length=i,e}function yd(s,e){var t=vd.exec(s);if(!t)return null;var i=t[1],n=1;if(t[2])for(var r=t[2].split(";"),a=0;a<r.length;a++){var o=r[a].trim().split("=");if(o[0]==="q"){n=parseFloat(o[1]);break}}return{charset:i,q:n,i:e}}function wd(s,e,t){for(var i={o:-1,q:0,s:0},n=0;n<e.length;n++){var r=_d(s,e[n],t);r&&(i.s-r.s||i.q-r.q||i.o-r.o)<0&&(i=r)}return i}function _d(s,e,t){var i=0;if(e.charset.toLowerCase()===s.toLowerCase())i|=1;else if(e.charset!=="*")return null;return{i:t,o:e.i,q:e.q,s:i}}function xa(s,e){var t=bd(s===void 0?"*":s||"");if(!e)return t.filter(ga).sort(ha).map(Sd);var i=e.map(function(r,a){return wd(r,t,a)});return i.filter(ga).sort(ha).map(function(r){return e[i.indexOf(r)]})}function ha(s,e){return e.q-s.q||e.s-s.s||s.o-e.o||s.i-e.i||0}function Sd(s){return s.charset}function ga(s){return s.q>0}});var Sa=g((mb,Vi)=>{"use strict";Vi.exports=_a;Vi.exports.preferredEncodings=_a;var Ed=/^\s*([^\s;]+)\s*(?:;(.*))?$/;function kd(s){for(var e=s.split(","),t=!1,i=1,n=0,r=0;n<e.length;n++){var a=Cd(e[n].trim(),n);a&&(e[r++]=a,t=t||wa("identity",a),i=Math.min(i,a.q||1))}return t||(e[r++]={encoding:"identity",q:i,i:n}),e.length=r,e}function Cd(s,e){var t=Ed.exec(s);if(!t)return null;var i=t[1],n=1;if(t[2])for(var r=t[2].split(";"),a=0;a<r.length;a++){var o=r[a].trim().split("=");if(o[0]==="q"){n=parseFloat(o[1]);break}}return{encoding:i,q:n,i:e}}function Td(s,e,t){for(var i={o:-1,q:0,s:0},n=0;n<e.length;n++){var r=wa(s,e[n],t);r&&(i.s-r.s||i.q-r.q||i.o-r.o)<0&&(i=r)}return i}function wa(s,e,t){var i=0;if(e.encoding.toLowerCase()===s.toLowerCase())i|=1;else if(e.encoding!=="*")return null;return{i:t,o:e.i,q:e.q,s:i}}function _a(s,e){var t=kd(s||"");if(!e)return t.filter(ya).sort(ba).map(Od);var i=e.map(function(r,a){return Td(r,t,a)});return i.filter(ya).sort(ba).map(function(r){return e[i.indexOf(r)]})}function ba(s,e){return e.q-s.q||e.s-s.s||s.o-e.o||s.i-e.i||0}function Od(s){return s.encoding}function ya(s){return s.q>0}});var Oa=g((hb,Gi)=>{"use strict";Gi.exports=Ta;Gi.exports.preferredLanguages=Ta;var Rd=/^\s*([^\s\-;]+)(?:-([^\s;]+))?\s*(?:;(.*))?$/;function Ad(s){for(var e=s.split(","),t=0,i=0;t<e.length;t++){var n=Ca(e[t].trim(),t);n&&(e[i++]=n)}return e.length=i,e}function Ca(s,e){var t=Rd.exec(s);if(!t)return null;var i=t[1],n=t[2],r=i;n&&(r+="-"+n);var a=1;if(t[3])for(var o=t[3].split(";"),c=0;c<o.length;c++){var l=o[c].split("=");l[0]==="q"&&(a=parseFloat(l[1]))}return{prefix:i,suffix:n,q:a,i:e,full:r}}function Pd(s,e,t){for(var i={o:-1,q:0,s:0},n=0;n<e.length;n++){var r=jd(s,e[n],t);r&&(i.s-r.s||i.q-r.q||i.o-r.o)<0&&(i=r)}return i}function jd(s,e,t){var i=Ca(s);if(!i)return null;var n=0;if(e.full.toLowerCase()===i.full.toLowerCase())n|=4;else if(e.prefix.toLowerCase()===i.full.toLowerCase())n|=2;else if(e.full.toLowerCase()===i.prefix.toLowerCase())n|=1;else if(e.full!=="*")return null;return{i:t,o:e.i,q:e.q,s:n}}function Ta(s,e){var t=Ad(s===void 0?"*":s||"");if(!e)return t.filter(ka).sort(Ea).map(Md);var i=e.map(function(r,a){return Pd(r,t,a)});return i.filter(ka).sort(Ea).map(function(r){return e[i.indexOf(r)]})}function Ea(s,e){return e.q-s.q||e.s-s.s||s.o-e.o||s.i-e.i||0}function Md(s){return s.full}function ka(s){return s.q>0}});var Ba=g((gb,Ki)=>{"use strict";Ki.exports=ja;Ki.exports.preferredMediaTypes=ja;var Bd=/^\s*([^\s\/;]+)\/([^;\s]+)\s*(?:;(.*))?$/;function Dd(s){for(var e=qd(s),t=0,i=0;t<e.length;t++){var n=Pa(e[t].trim(),t);n&&(e[i++]=n)}return e.length=i,e}function Pa(s,e){var t=Bd.exec(s);if(!t)return null;var i=Object.create(null),n=1,r=t[2],a=t[1];if(t[3])for(var o=Ud(t[3]).map(Fd),c=0;c<o.length;c++){var l=o[c],p=l[0].toLowerCase(),u=l[1],d=u&&u[0]==='"'&&u[u.length-1]==='"'?u.substr(1,u.length-2):u;if(p==="q"){n=parseFloat(d);break}i[p]=d}return{type:a,subtype:r,params:i,q:n,i:e}}function Nd(s,e,t){for(var i={o:-1,q:0,s:0},n=0;n<e.length;n++){var r=Id(s,e[n],t);r&&(i.s-r.s||i.q-r.q||i.o-r.o)<0&&(i=r)}return i}function Id(s,e,t){var i=Pa(s),n=0;if(!i)return null;if(e.type.toLowerCase()==i.type.toLowerCase())n|=4;else if(e.type!="*")return null;if(e.subtype.toLowerCase()==i.subtype.toLowerCase())n|=2;else if(e.subtype!="*")return null;var r=Object.keys(e.params);if(r.length>0)if(r.every(function(a){return e.params[a]=="*"||(e.params[a]||"").toLowerCase()==(i.params[a]||"").toLowerCase()}))n|=1;else return null;return{i:t,o:e.i,q:e.q,s:n}}function ja(s,e){var t=Dd(s===void 0?"*/*":s||"");if(!e)return t.filter(Aa).sort(Ra).map(Ld);var i=e.map(function(r,a){return Nd(r,t,a)});return i.filter(Aa).sort(Ra).map(function(r){return e[i.indexOf(r)]})}function Ra(s,e){return e.q-s.q||e.s-s.s||s.o-e.o||s.i-e.i||0}function Ld(s){return s.type+"/"+s.subtype}function Aa(s){return s.q>0}function Ma(s){for(var e=0,t=0;(t=s.indexOf('"',t))!==-1;)e++,t++;return e}function Fd(s){var e=s.indexOf("="),t,i;return e===-1?t=s:(t=s.substr(0,e),i=s.substr(e+1)),[t,i]}function qd(s){for(var e=s.split(","),t=1,i=0;t<e.length;t++)Ma(e[i])%2==0?e[++i]=e[t]:e[i]+=","+e[t];return e.length=i+1,e}function Ud(s){for(var e=s.split(";"),t=1,i=0;t<e.length;t++)Ma(e[i])%2==0?e[++i]=e[t]:e[i]+=";"+e[t];e.length=i+1;for(var t=0;t<e.length;t++)e[t]=e[t].trim();return e}});var Da=g((xb,Yi)=>{"use strict";var Hd=va(),zd=Sa(),Wd=Oa(),$d=Ba();Yi.exports=E;Yi.exports.Negotiator=E;function E(s){if(!(this instanceof E))return new E(s);this.request=s}E.prototype.charset=function(e){var t=this.charsets(e);return t&&t[0]};E.prototype.charsets=function(e){return Hd(this.request.headers["accept-charset"],e)};E.prototype.encoding=function(e){var t=this.encodings(e);return t&&t[0]};E.prototype.encodings=function(e){return zd(this.request.headers["accept-encoding"],e)};E.prototype.language=function(e){var t=this.languages(e);return t&&t[0]};E.prototype.languages=function(e){return Wd(this.request.headers["accept-language"],e)};E.prototype.mediaType=function(e){var t=this.mediaTypes(e);return t&&t[0]};E.prototype.mediaTypes=function(e){return $d(this.request.headers.accept,e)};E.prototype.preferredCharset=E.prototype.charset;E.prototype.preferredCharsets=E.prototype.charsets;E.prototype.preferredEncoding=E.prototype.encoding;E.prototype.preferredEncodings=E.prototype.encodings;E.prototype.preferredLanguage=E.prototype.language;E.prototype.preferredLanguages=E.prototype.languages;E.prototype.preferredMediaType=E.prototype.mediaType;E.prototype.preferredMediaTypes=E.prototype.mediaTypes});var Na=g((vb,Vd)=>{Vd.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var La=g((bb,Ia)=>{Ia.exports=Na()});var Ua=g(Y=>{"use strict";var Ss=La(),Gd=require("path").extname,Fa=/^\s*([^;\s]*)(?:;|\s|$)/,Kd=/^text\//i;Y.charset=qa;Y.charsets={lookup:qa};Y.contentType=Yd;Y.extension=Xd;Y.extensions=Object.create(null);Y.lookup=Jd;Y.types=Object.create(null);Qd(Y.extensions,Y.types);function qa(s){if(!s||typeof s!="string")return!1;var e=Fa.exec(s),t=e&&Ss[e[1].toLowerCase()];return t&&t.charset?t.charset:e&&Kd.test(e[1])?"UTF-8":!1}function Yd(s){if(!s||typeof s!="string")return!1;var e=s.indexOf("/")===-1?Y.lookup(s):s;if(!e)return!1;if(e.indexOf("charset")===-1){var t=Y.charset(e);t&&(e+="; charset="+t.toLowerCase())}return e}function Xd(s){if(!s||typeof s!="string")return!1;var e=Fa.exec(s),t=e&&Y.extensions[e[1].toLowerCase()];return!t||!t.length?!1:t[0]}function Jd(s){if(!s||typeof s!="string")return!1;var e=Gd("x."+s).toLowerCase().substr(1);return e&&Y.types[e]||!1}function Qd(s,e){var t=["nginx","apache",void 0,"iana"];Object.keys(Ss).forEach(function(n){var r=Ss[n],a=r.extensions;if(!(!a||!a.length)){s[n]=a;for(var o=0;o<a.length;o++){var c=a[o];if(e[c]){var l=t.indexOf(Ss[e[c]].source),p=t.indexOf(r.source);if(e[c]!=="application/octet-stream"&&(l>p||l===p&&e[c].substr(0,12)==="application/"))continue}e[c]=n}}})}});var Es=g((wb,Ha)=>{"use strict";var Zd=Da(),ef=Ua();Ha.exports=Z;function Z(s){if(!(this instanceof Z))return new Z(s);this.headers=s.headers,this.negotiator=new Zd(s)}Z.prototype.type=Z.prototype.types=function(s){var e=s;if(e&&!Array.isArray(e)){e=new Array(arguments.length);for(var t=0;t<e.length;t++)e[t]=arguments[t]}if(!e||e.length===0)return this.negotiator.mediaTypes();if(!this.headers.accept)return e[0];var i=e.map(tf),n=this.negotiator.mediaTypes(i.filter(sf)),r=n[0];return r?e[i.indexOf(r)]:!1};Z.prototype.encoding=Z.prototype.encodings=function(s){var e=s;if(e&&!Array.isArray(e)){e=new Array(arguments.length);for(var t=0;t<e.length;t++)e[t]=arguments[t]}return!e||e.length===0?this.negotiator.encodings():this.negotiator.encodings(e)[0]||!1};Z.prototype.charset=Z.prototype.charsets=function(s){var e=s;if(e&&!Array.isArray(e)){e=new Array(arguments.length);for(var t=0;t<e.length;t++)e[t]=arguments[t]}return!e||e.length===0?this.negotiator.charsets():this.negotiator.charsets(e)[0]||!1};Z.prototype.lang=Z.prototype.langs=Z.prototype.language=Z.prototype.languages=function(s){var e=s;if(e&&!Array.isArray(e)){e=new Array(arguments.length);for(var t=0;t<e.length;t++)e[t]=arguments[t]}return!e||e.length===0?this.negotiator.languages():this.negotiator.languages(e)[0]||!1};function tf(s){return s.indexOf("/")===-1?ef.lookup(s):s}function sf(s){return typeof s=="string"}});var Ji=g((za,Wa)=>{var Kt=require("crypto"),Xi=function(){};Xi.prototype.getRandomBytes=function(s){var e=4096,t=this;if(s=s||12,s>e)return Kt.randomBytes(s);var i=parseInt(e/s),n=parseInt(i*.85);if(!n||(this.bytesBufferIndex==null&&(this.bytesBufferIndex=-1),this.bytesBufferIndex==i&&(this.bytesBuffer=null,this.bytesBufferIndex=-1),(this.bytesBufferIndex==-1||this.bytesBufferIndex>n)&&(this.isGeneratingBytes||(this.isGeneratingBytes=!0,Kt.randomBytes(e,function(a,o){t.bytesBuffer=o,t.bytesBufferIndex=0,t.isGeneratingBytes=!1})),this.bytesBufferIndex==-1)))return Kt.randomBytes(s);var r=this.bytesBuffer.slice(s*this.bytesBufferIndex,s*(this.bytesBufferIndex+1));return this.bytesBufferIndex++,r};Xi.prototype.generateId=function(){var s=Buffer.alloc(15);return s.writeInt32BE?(this.sequenceNumber=this.sequenceNumber+1|0,s.writeInt32BE(this.sequenceNumber,11),Kt.randomBytes?this.getRandomBytes(12).copy(s):[0,4,8].forEach(function(e){s.writeInt32BE(Math.random()*Math.pow(2,32)|0,e)}),s.toString("base64").replace(/\//g,"_").replace(/\+/g,"-")):Math.abs(Math.random()*Math.random()*Date.now()|0).toString()+Math.abs(Math.random()*Math.random()*Date.now()|0).toString()};za=Wa.exports=new Xi});var ks=g(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});De.ERROR_PACKET=De.PACKET_TYPES_REVERSE=De.PACKET_TYPES=void 0;var xe=Object.create(null);De.PACKET_TYPES=xe;xe.open="0";xe.close="1";xe.ping="2";xe.pong="3";xe.message="4";xe.upgrade="5";xe.noop="6";var $a=Object.create(null);De.PACKET_TYPES_REVERSE=$a;Object.keys(xe).forEach(s=>{$a[xe[s]]=s});var nf={type:"error",data:"parser error"};De.ERROR_PACKET=nf});var Ga=g(ct=>{"use strict";Object.defineProperty(ct,"__esModule",{value:!0});ct.encodePacket=void 0;ct.encodePacketToBinary=of;var rf=ks(),af=({type:s,data:e},t,i)=>e instanceof ArrayBuffer||ArrayBuffer.isView(e)?i(t?e:"b"+Va(e,!0).toString("base64")):i(rf.PACKET_TYPES[s]+(e||""));ct.encodePacket=af;var Va=(s,e)=>Buffer.isBuffer(s)||s instanceof Uint8Array&&!e?s:s instanceof ArrayBuffer?Buffer.from(s):Buffer.from(s.buffer,s.byteOffset,s.byteLength),Qi;function of(s,e){if(s.data instanceof ArrayBuffer||ArrayBuffer.isView(s.data))return e(Va(s.data,!1));(0,ct.encodePacket)(s,!0,t=>{Qi||(Qi=new TextEncoder),e(Qi.encode(t))})}});var Ya=g(Ts=>{"use strict";Object.defineProperty(Ts,"__esModule",{value:!0});Ts.decodePacket=void 0;var Cs=ks(),cf=(s,e)=>{if(typeof s!="string")return{type:"message",data:Ka(s,e)};let t=s.charAt(0);if(t==="b"){let i=Buffer.from(s.substring(1),"base64");return{type:"message",data:Ka(i,e)}}return Cs.PACKET_TYPES_REVERSE[t]?s.length>1?{type:Cs.PACKET_TYPES_REVERSE[t],data:s.substring(1)}:{type:Cs.PACKET_TYPES_REVERSE[t]}:Cs.ERROR_PACKET};Ts.decodePacket=cf;var Ka=(s,e)=>e==="arraybuffer"?s instanceof ArrayBuffer?s:Buffer.isBuffer(s)?s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength):s.buffer:Buffer.isBuffer(s)?s:Buffer.from(s)});var Yt=g(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.decodePayload=X.decodePacket=X.encodePayload=X.encodePacket=X.protocol=void 0;X.createPacketEncoderStream=uf;X.createPacketDecoderStream=df;var en=Ga();Object.defineProperty(X,"encodePacket",{enumerable:!0,get:function(){return en.encodePacket}});var tn=Ya();Object.defineProperty(X,"decodePacket",{enumerable:!0,get:function(){return tn.decodePacket}});var Xa=ks(),Ja="",lf=(s,e)=>{let t=s.length,i=new Array(t),n=0;s.forEach((r,a)=>{(0,en.encodePacket)(r,!1,o=>{i[a]=o,++n===t&&e(i.join(Ja))})})};X.encodePayload=lf;var pf=(s,e)=>{let t=s.split(Ja),i=[];for(let n=0;n<t.length;n++){let r=(0,tn.decodePacket)(t[n],e);if(i.push(r),r.type==="error")break}return i};X.decodePayload=pf;function uf(){return new TransformStream({transform(s,e){(0,en.encodePacketToBinary)(s,t=>{let i=t.length,n;if(i<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,i);else if(i<65536){n=new Uint8Array(3);let r=new DataView(n.buffer);r.setUint8(0,126),r.setUint16(1,i)}else{n=new Uint8Array(9);let r=new DataView(n.buffer);r.setUint8(0,127),r.setBigUint64(1,BigInt(i))}s.data&&typeof s.data!="string"&&(n[0]|=128),e.enqueue(n),e.enqueue(t)})}})}var Zi;function Os(s){return s.reduce((e,t)=>e+t.length,0)}function Rs(s,e){if(s[0].length===e)return s.shift();let t=new Uint8Array(e),i=0;for(let n=0;n<e;n++)t[n]=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 df(s,e){Zi||(Zi=new TextDecoder);let t=[],i=0,n=-1,r=!1;return new TransformStream({transform(a,o){for(t.push(a);;){if(i===0){if(Os(t)<1)break;let c=Rs(t,1);r=(c[0]&128)===128,n=c[0]&127,n<126?i=3:n===126?i=1:i=2}else if(i===1){if(Os(t)<2)break;let c=Rs(t,2);n=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),i=3}else if(i===2){if(Os(t)<8)break;let c=Rs(t,8),l=new DataView(c.buffer,c.byteOffset,c.length),p=l.getUint32(0);if(p>Math.pow(2,21)-1){o.enqueue(Xa.ERROR_PACKET);break}n=p*Math.pow(2,32)+l.getUint32(4),i=3}else{if(Os(t)<n)break;let c=Rs(t,n);o.enqueue((0,tn.decodePacket)(r?c:Zi.decode(c),e)),i=0}if(n===0||n>s){o.enqueue(Xa.ERROR_PACKET);break}}}})}X.protocol=4});var to=g((Cb,eo)=>{var Ne=String.fromCharCode;function Qa(s){for(var e=[],t=0,i=s.length,n,r;t<i;)n=s.charCodeAt(t++),n>=55296&&n<=56319&&t<i?(r=s.charCodeAt(t++),(r&64512)==56320?e.push(((n&1023)<<10)+(r&1023)+65536):(e.push(n),t--)):e.push(n);return e}function ff(s){for(var e=s.length,t=-1,i,n="";++t<e;)i=s[t],i>65535&&(i-=65536,n+=Ne(i>>>10&1023|55296),i=56320|i&1023),n+=Ne(i);return n}function Za(s,e){if(s>=55296&&s<=57343){if(e)throw Error("Lone surrogate U+"+s.toString(16).toUpperCase()+" is not a scalar value");return!1}return!0}function sn(s,e){return Ne(s>>e&63|128)}function mf(s,e){if((s&4294967168)==0)return Ne(s);var t="";return(s&4294965248)==0?t=Ne(s>>6&31|192):(s&4294901760)==0?(Za(s,e)||(s=65533),t=Ne(s>>12&15|224),t+=sn(s,6)):(s&4292870144)==0&&(t=Ne(s>>18&7|240),t+=sn(s,12),t+=sn(s,6)),t+=Ne(s&63|128),t}function hf(s,e){e=e||{};for(var t=e.strict!==!1,i=Qa(s),n=i.length,r=-1,a,o="";++r<n;)a=i[r],o+=mf(a,t);return o}function lt(){if(Ie>=Ps)throw Error("Invalid byte index");var s=As[Ie]&255;if(Ie++,(s&192)==128)return s&63;throw Error("Invalid continuation byte")}function gf(s){var e,t,i,n,r;if(Ie>Ps)throw Error("Invalid byte index");if(Ie==Ps)return!1;if(e=As[Ie]&255,Ie++,(e&128)==0)return e;if((e&224)==192){if(t=lt(),r=(e&31)<<6|t,r>=128)return r;throw Error("Invalid continuation byte")}if((e&240)==224){if(t=lt(),i=lt(),r=(e&15)<<12|t<<6|i,r>=2048)return Za(r,s)?r:65533;throw Error("Invalid continuation byte")}if((e&248)==240&&(t=lt(),i=lt(),n=lt(),r=(e&7)<<18|t<<12|i<<6|n,r>=65536&&r<=1114111))return r;throw Error("Invalid UTF-8 detected")}var As,Ps,Ie;function xf(s,e){e=e||{};var t=e.strict!==!1;As=Qa(s),Ps=As.length,Ie=0;for(var i=[],n;(n=gf(t))!==!1;)i.push(n);return ff(i)}eo.exports={version:"2.1.2",encode:hf,decode:xf}});var lo=g(D=>{"use strict";Object.defineProperty(D,"__esModule",{value:!0});D.packets=D.protocol=void 0;D.encodePacket=nn;D.encodeBase64Packet=no;D.decodePacket=rn;D.decodeBase64Packet=ro;D.encodePayload=wf;D.decodePayload=Sf;D.encodePayloadAsBinary=oo;D.decodePayloadAsBinary=co;var io=to();D.protocol=3;var vf=s=>{for(let e of s)if(e.data instanceof ArrayBuffer||ArrayBuffer.isView(e.data))return!0;return!1};D.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6};var pt=Object.keys(D.packets),pe={type:"error",data:"parser error"},bf=Buffer.concat([]);function nn(s,e,t,i){if(typeof e=="function"&&(i=e,e=null),typeof t=="function"&&(i=t,t=null),Buffer.isBuffer(s.data))return so(s,e,i);if(s.data&&(s.data.buffer||s.data)instanceof ArrayBuffer)return so({type:s.type,data:an(s.data)},e,i);var n=D.packets[s.type];return s.data!==void 0&&(n+=t?io.encode(String(s.data),{strict:!1}):String(s.data)),i(""+n)}function so(s,e,t){if(!e)return no(s,t);var i=s.data,n=Buffer.allocUnsafe(1);return n[0]=D.packets[s.type],t(Buffer.concat([n,i]))}function no(s,e){var t=Buffer.isBuffer(s.data)?s.data:an(s.data),i="b"+D.packets[s.type];return i+=t.toString("base64"),e(i)}function rn(s,e,t){if(s===void 0)return pe;let i;if(typeof s=="string")return i=s.charAt(0),i==="b"?ro(s.slice(1),e):t&&(s=yf(s),s===!1)||Number(i)!=i||!pt[i]?pe:s.length>1?{type:pt[i],data:s.slice(1)}:{type:pt[i]};if(e==="arraybuffer"){var n=new Uint8Array(s);return i=n[0],{type:pt[i],data:n.buffer.slice(1)}}return s instanceof ArrayBuffer&&(s=an(s)),i=s[0],{type:pt[i],data:s.slice(1)}}function yf(s){try{s=io.decode(s,{strict:!1})}catch{return!1}return s}function ro(s,e){var t=pt[s.charAt(0)],i=Buffer.from(s.slice(1),"base64");if(e==="arraybuffer"){for(var n=new Uint8Array(i.length),r=0;r<n.length;r++)n[r]=i[r];i=n.buffer}return{type:t,data:i}}function wf(s,e,t){if(typeof e=="function"&&(t=e,e=null),e&&vf(s))return oo(s,t);if(!s.length)return t("0:");function i(n,r){nn(n,e,!1,function(a){r(null,_f(a))})}ao(s,i,function(n,r){return t(r.join(""))})}function _f(s){return s.length+":"+s}function ao(s,e,t){let i=new Array(s.length),n=0;for(let r=0;r<s.length;r++)e(s[r],(a,o)=>{i[r]=o,++n===s.length&&t(null,i)})}function Sf(s,e,t){if(typeof s!="string")return co(s,e,t);if(typeof e=="function"&&(t=e,e=null),s==="")return t(pe,0,1);for(var i="",n,r,a,o=0,c=s.length;o<c;o++){var l=s.charAt(o);if(l!==":"){i+=l;continue}if(i===""||i!=(n=Number(i))||(r=s.slice(o+1,o+1+n),i!=r.length))return t(pe,0,1);if(r.length){if(a=rn(r,e,!1),pe.type===a.type&&pe.data===a.data)return t(pe,0,1);var p=t(a,o+n,c);if(p===!1)return}o+=n,i=""}if(i!=="")return t(pe,0,1)}function Ef(s){for(var e="",t=0,i=s.length;t<i;t++)e+=String.fromCharCode(s[t]);return e}function kf(s){for(var e=Buffer.allocUnsafe(s.length),t=0,i=s.length;t<i;t++)e.writeUInt8(s.charCodeAt(t),t);return e}function an(s){var e=s.byteLength||s.length,t=s.byteOffset||0;return Buffer.from(s.buffer||s,t,e)}function oo(s,e){if(!s.length)return e(bf);ao(s,Cf,function(t,i){return e(Buffer.concat(i))})}function Cf(s,e){function t(i){var n=""+i.length,r;if(typeof i=="string"){r=Buffer.allocUnsafe(n.length+2),r[0]=0;for(var a=0;a<n.length;a++)r[a+1]=parseInt(n[a],10);return r[r.length-1]=255,e(null,Buffer.concat([r,kf(i)]))}r=Buffer.allocUnsafe(n.length+2),r[0]=1;for(var a=0;a<n.length;a++)r[a+1]=parseInt(n[a],10);r[r.length-1]=255,e(null,Buffer.concat([r,i]))}nn(s,!0,!0,t)}function co(s,e,t){typeof e=="function"&&(t=e,e=null);for(var i=s,n=[],r;i.length>0;){var a="",o=i[0]===0;for(r=1;i[r]!==255;r++){if(a.length>310)return t(pe,0,1);a+=""+i[r]}i=i.slice(a.length+1);var c=parseInt(a,10),l=i.slice(1,c+1);o&&(l=Ef(l)),n.push(l),i=i.slice(c+1)}var p=n.length;for(r=0;r<p;r++){var u=n[r];t(rn(u,e,!0),r,p)}}});var uo=g((Ob,po)=>{var ut=1e3,dt=ut*60,ft=dt*60,Ge=ft*24,Tf=Ge*7,Of=Ge*365.25;po.exports=function(s,e){e=e||{};var t=typeof s;if(t==="string"&&s.length>0)return Rf(s);if(t==="number"&&isFinite(s))return e.long?Pf(s):Af(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))};function Rf(s){if(s=String(s),!(s.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(e){var t=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return t*Of;case"weeks":case"week":case"w":return t*Tf;case"days":case"day":case"d":return t*Ge;case"hours":case"hour":case"hrs":case"hr":case"h":return t*ft;case"minutes":case"minute":case"mins":case"min":case"m":return t*dt;case"seconds":case"second":case"secs":case"sec":case"s":return t*ut;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}}function Af(s){var e=Math.abs(s);return e>=Ge?Math.round(s/Ge)+"d":e>=ft?Math.round(s/ft)+"h":e>=dt?Math.round(s/dt)+"m":e>=ut?Math.round(s/ut)+"s":s+"ms"}function Pf(s){var e=Math.abs(s);return e>=Ge?js(s,e,Ge,"day"):e>=ft?js(s,e,ft,"hour"):e>=dt?js(s,e,dt,"minute"):e>=ut?js(s,e,ut,"second"):s+" ms"}function js(s,e,t,i){var n=e>=t*1.5;return Math.round(s/t)+" "+i+(n?"s":"")}});var on=g((Rb,fo)=>{function jf(s){t.debug=t,t.default=t,t.coerce=c,t.disable=a,t.enable=n,t.enabled=o,t.humanize=uo(),t.destroy=l,Object.keys(s).forEach(p=>{t[p]=s[p]}),t.names=[],t.skips=[],t.formatters={};function e(p){let u=0;for(let d=0;d<p.length;d++)u=(u<<5)-u+p.charCodeAt(d),u|=0;return t.colors[Math.abs(u)%t.colors.length]}t.selectColor=e;function t(p){let u,d=null,h,m;function f(...x){if(!f.enabled)return;let y=f,b=Number(new Date),q=b-(u||b);y.diff=q,y.prev=u,y.curr=b,u=b,x[0]=t.coerce(x[0]),typeof x[0]!="string"&&x.unshift("%O");let B=0;x[0]=x[0].replace(/%([a-zA-Z%])/g,(K,he)=>{if(K==="%%")return"%";B++;let Ee=t.formatters[he];if(typeof Ee=="function"){let ge=x[B];K=Ee.call(y,ge),x.splice(B,1),B--}return K}),t.formatArgs.call(y,x),(y.log||t.log).apply(y,x)}return f.namespace=p,f.useColors=t.useColors(),f.color=t.selectColor(p),f.extend=i,f.destroy=t.destroy,Object.defineProperty(f,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==t.namespaces&&(h=t.namespaces,m=t.enabled(p)),m),set:x=>{d=x}}),typeof t.init=="function"&&t.init(f),f}function i(p,u){let d=t(this.namespace+(typeof u>"u"?":":u)+p);return d.log=this.log,d}function n(p){t.save(p),t.namespaces=p,t.names=[],t.skips=[];let u=(typeof p=="string"?p:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let d of u)d[0]==="-"?t.skips.push(d.slice(1)):t.names.push(d)}function r(p,u){let d=0,h=0,m=-1,f=0;for(;d<p.length;)if(h<u.length&&(u[h]===p[d]||u[h]==="*"))u[h]==="*"?(m=h,f=d,h++):(d++,h++);else if(m!==-1)h=m+1,f++,d=f;else return!1;for(;h<u.length&&u[h]==="*";)h++;return h===u.length}function a(){let p=[...t.names,...t.skips.map(u=>"-"+u)].join(",");return t.enable(""),p}function o(p){for(let u of t.skips)if(r(p,u))return!1;for(let u of t.names)if(r(p,u))return!0;return!1}function c(p){return p instanceof Error?p.stack||p.message:p}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return t.enable(t.load()),t}fo.exports=jf});var mo=g((J,Ms)=>{J.formatArgs=Bf;J.save=Df;J.load=Nf;J.useColors=Mf;J.storage=If();J.destroy=(()=>{let s=!1;return()=>{s||(s=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();J.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Mf(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let s;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(s=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(s[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Bf(s){if(s[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+s[0]+(this.useColors?"%c ":" ")+"+"+Ms.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;s.splice(1,0,e,"color: inherit");let t=0,i=0;s[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(t++,n==="%c"&&(i=t))}),s.splice(i,0,e)}J.log=console.debug||console.log||(()=>{});function Df(s){try{s?J.storage.setItem("debug",s):J.storage.removeItem("debug")}catch{}}function Nf(){let s;try{s=J.storage.getItem("debug")||J.storage.getItem("DEBUG")}catch{}return!s&&typeof process<"u"&&"env"in process&&(s=process.env.DEBUG),s}function If(){try{return localStorage}catch{}}Ms.exports=on()(J);var{formatters:Lf}=Ms.exports;Lf.j=function(s){try{return JSON.stringify(s)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var go=g((Ab,ho)=>{"use strict";ho.exports=(s,e=process.argv)=>{let t=s.startsWith("-")?"":s.length===1?"-":"--",i=e.indexOf(t+s),n=e.indexOf("--");return i!==-1&&(n===-1||i<n)}});var pn=g((Pb,vo)=>{"use strict";var Ff=require("os"),xo=require("tty"),ie=go(),{env:N}=process,Le;ie("no-color")||ie("no-colors")||ie("color=false")||ie("color=never")?Le=0:(ie("color")||ie("colors")||ie("color=true")||ie("color=always"))&&(Le=1);"FORCE_COLOR"in N&&(N.FORCE_COLOR==="true"?Le=1:N.FORCE_COLOR==="false"?Le=0:Le=N.FORCE_COLOR.length===0?1:Math.min(parseInt(N.FORCE_COLOR,10),3));function cn(s){return s===0?!1:{level:s,hasBasic:!0,has256:s>=2,has16m:s>=3}}function ln(s,e){if(Le===0)return 0;if(ie("color=16m")||ie("color=full")||ie("color=truecolor"))return 3;if(ie("color=256"))return 2;if(s&&!e&&Le===void 0)return 0;let t=Le||0;if(N.TERM==="dumb")return t;if(process.platform==="win32"){let i=Ff.release().split(".");return Number(i[0])>=10&&Number(i[2])>=10586?Number(i[2])>=14931?3:2:1}if("CI"in N)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(i=>i in N)||N.CI_NAME==="codeship"?1:t;if("TEAMCITY_VERSION"in N)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(N.TEAMCITY_VERSION)?1:0;if(N.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in N){let i=parseInt((N.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(N.TERM_PROGRAM){case"iTerm.app":return i>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(N.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(N.TERM)||"COLORTERM"in N?1:t}function qf(s){let e=ln(s,s&&s.isTTY);return cn(e)}vo.exports={supportsColor:qf,stdout:cn(ln(!0,xo.isatty(1))),stderr:cn(ln(!0,xo.isatty(2)))}});var yo=g((I,Ds)=>{var Uf=require("tty"),Bs=require("util");I.init=Kf;I.log=$f;I.formatArgs=zf;I.save=Vf;I.load=Gf;I.useColors=Hf;I.destroy=Bs.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");I.colors=[6,2,3,4,5,1];try{let s=pn();s&&(s.stderr||s).level>=2&&(I.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}I.inspectOpts=Object.keys(process.env).filter(s=>/^debug_/i.test(s)).reduce((s,e)=>{let t=e.substring(6).toLowerCase().replace(/_([a-z])/g,(n,r)=>r.toUpperCase()),i=process.env[e];return/^(yes|on|true|enabled)$/i.test(i)?i=!0:/^(no|off|false|disabled)$/i.test(i)?i=!1:i==="null"?i=null:i=Number(i),s[t]=i,s},{});function Hf(){return"colors"in I.inspectOpts?!!I.inspectOpts.colors:Uf.isatty(process.stderr.fd)}function zf(s){let{namespace:e,useColors:t}=this;if(t){let i=this.color,n="\x1B[3"+(i<8?i:"8;5;"+i),r=` ${n};1m${e} \x1B[0m`;s[0]=r+s[0].split(`
|
|
3
3
|
`).join(`
|
|
4
|
-
`+r),s.push(n+"m+"+
|
|
5
|
-
`)}function
|
|
6
|
-
`).map(e=>e.trim()).join(" ")};bo.O=function(s){return this.inspectOpts.colors=this.useColors,
|
|
7
|
-
`}),super.onData(e.replace(nm,"\\n")))}doWrite(e,t,i){let n=JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029");e=this.head+n+this.foot,super.doWrite(e,t,i)}};qs.JSONP=mn});var ko=v(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});Fs.WebSocket=void 0;var am=Ke(),om=M(),Eo=(0,om.default)("engine:ws"),hn=class extends am.Transport{constructor(e){super(e),this._doSend=t=>{this.socket.send(t,this._onSent)},this._doSendLast=t=>{this.socket.send(t,this._onSentLast)},this._onSent=t=>{t&&this.onError("write error",t.stack)},this._onSentLast=t=>{t?this.onError("write error",t.stack):(this.emit("drain"),this.writable=!0,this.emit("ready"))},this.socket=e.websocket,this.socket.on("message",(t,i)=>{let n=i?t:t.toString();Eo('received "%s"',n),super.onData(n)}),this.socket.once("close",this.onClose.bind(this)),this.socket.on("error",this.onError.bind(this)),this.writable=!0,this.perMessageDeflate=null}get name(){return"websocket"}get handlesUpgrades(){return!0}send(e){this.writable=!1;for(let t=0;t<e.length;t++){let i=e[t],n=t+1===e.length;this._canSendPreEncodedFrame(i)?this.socket._sender.sendFrame(i.options.wsPreEncodedFrame,n?this._onSentLast:this._onSent):this.parser.encodePacket(i,this.supportsBinary,n?this._doSendLast:this._doSend)}}_canSendPreEncodedFrame(e){var t,i,n;return!this.perMessageDeflate&&typeof((i=(t=this.socket)===null||t===void 0?void 0:t._sender)===null||i===void 0?void 0:i.sendFrame)=="function"&&((n=e.options)===null||n===void 0?void 0:n.wsPreEncodedFrame)!==void 0}doClose(e){Eo("closing"),this.socket.close(),e&&e()}};Fs.WebSocket=hn});var xn=v(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});Us.WebTransport=void 0;var cm=Ke(),lm=M(),pm=Yt(),mt=(0,lm.default)("engine:webtransport"),vn=class extends cm.Transport{constructor(e,t,i){super({_query:{EIO:"4"}}),this.session=e;let n=(0,pm.createPacketEncoderStream)();n.readable.pipeTo(t.writable).catch(()=>{mt("the stream was closed")}),this.writer=n.writable.getWriter(),(async()=>{try{for(;;){let{value:r,done:a}=await i.read();if(a){mt("session is closed");break}mt("received chunk: %o",r),this.onPacket(r)}}catch(r){mt("error while reading: %s",r.message)}})(),e.closed.then(()=>this.onClose()),this.writable=!0}get name(){return"webtransport"}async send(e){this.writable=!1;try{for(let t=0;t<e.length;t++){let i=e[t];await this.writer.write(i)}}catch(t){mt("error while writing: %s",t.message)}this.emit("drain"),this.writable=!0,this.emit("ready")}doClose(e){mt("closing WebTransport session"),this.session.close(),e&&e()}};Us.WebTransport=vn});var bn=v(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});var um=fn(),dm=So(),fm=ko(),mm=xn();gn.default={polling:Co,websocket:fm.WebSocket,webtransport:mm.WebTransport};function Co(s){return typeof s._query.j=="string"?new dm.JSONP(s):new um.Polling(s)}Co.upgradesTo=["websocket","webtransport"]});var wn=v(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});Hs.Socket=void 0;var hm=require("events"),vm=M(),Se=require("timers"),P=(0,vm.default)("engine:socket"),yn=class extends hm.EventEmitter{get readyState(){return this._readyState}set readyState(e){P("readyState updated from %s to %s",this._readyState,e),this._readyState=e}constructor(e,t,i,n,r){super(),this._readyState="opening",this.upgrading=!1,this.upgraded=!1,this.writeBuffer=[],this.packetsFn=[],this.sentCallbackFn=[],this.cleanupFn=[],this.id=e,this.server=t,this.request=n,this.protocol=r,n&&(n.websocket&&n.websocket._socket?this.remoteAddress=n.websocket._socket.remoteAddress:this.remoteAddress=n.connection.remoteAddress),this.pingTimeoutTimer=null,this.pingIntervalTimer=null,this.setTransport(i),this.onOpen()}onOpen(){this.readyState="open",this.transport.sid=this.id,this.sendPacket("open",JSON.stringify({sid:this.id,upgrades:this.getAvailableUpgrades(),pingInterval:this.server.opts.pingInterval,pingTimeout:this.server.opts.pingTimeout,maxPayload:this.server.opts.maxHttpBufferSize})),this.server.opts.initialPacket&&this.sendPacket("message",this.server.opts.initialPacket),this.emit("open"),this.protocol===3?this.resetPingTimeout():this.schedulePing()}onPacket(e){if(this.readyState!=="open")return P("packet received with closed socket");switch(P(`received packet ${e.type}`),this.emit("packet",e),e.type){case"ping":if(this.transport.protocol!==3){this.onError(new Error("invalid heartbeat direction"));return}P("got ping"),this.pingTimeoutTimer.refresh(),this.sendPacket("pong"),this.emit("heartbeat");break;case"pong":if(this.transport.protocol===3){this.onError(new Error("invalid heartbeat direction"));return}P("got pong"),(0,Se.clearTimeout)(this.pingTimeoutTimer),this.pingIntervalTimer.refresh(),this.emit("heartbeat");break;case"error":this.onClose("parse error");break;case"message":this.emit("data",e.data),this.emit("message",e.data);break}}onError(e){P("transport error"),this.onClose("transport error",e)}schedulePing(){this.pingIntervalTimer=(0,Se.setTimeout)(()=>{P("writing ping packet - expecting pong within %sms",this.server.opts.pingTimeout),this.sendPacket("ping"),this.resetPingTimeout()},this.server.opts.pingInterval)}resetPingTimeout(){(0,Se.clearTimeout)(this.pingTimeoutTimer),this.pingTimeoutTimer=(0,Se.setTimeout)(()=>{this.readyState!=="closed"&&this.onClose("ping timeout")},this.protocol===3?this.server.opts.pingInterval+this.server.opts.pingTimeout:this.server.opts.pingTimeout)}setTransport(e){let t=this.onError.bind(this),i=()=>this.flush(),n=this.onPacket.bind(this),r=this.onDrain.bind(this),a=this.onClose.bind(this,"transport close");this.transport=e,this.transport.once("error",t),this.transport.on("ready",i),this.transport.on("packet",n),this.transport.on("drain",r),this.transport.once("close",a),this.cleanupFn.push(function(){e.removeListener("error",t),e.removeListener("ready",i),e.removeListener("packet",n),e.removeListener("drain",r),e.removeListener("close",a)})}onDrain(){if(this.sentCallbackFn.length>0){P("executing batch send callback");let e=this.sentCallbackFn.shift();if(e)for(let t=0;t<e.length;t++)e[t](this.transport)}}_maybeUpgrade(e){P('might upgrade socket transport from "%s" to "%s"',this.transport.name,e.name),this.upgrading=!0;let t=(0,Se.setTimeout)(()=>{P("client did not complete upgrade - closing transport"),a(),e.readyState==="open"&&e.close()},this.server.opts.upgradeTimeout),i,n=p=>{p.type==="ping"&&p.data==="probe"?(P("got probe ping packet, sending pong"),e.send([{type:"pong",data:"probe"}]),this.emit("upgrading",e),clearInterval(i),i=setInterval(r,100)):p.type==="upgrade"&&this.readyState!=="closed"?(P("got upgrade packet - upgrading"),a(),this.transport.discard(),this.upgraded=!0,this.clearTransport(),this.setTransport(e),this.emit("upgrade",e),this.flush(),this.readyState==="closing"&&e.close(()=>{this.onClose("forced close")})):(a(),e.close())},r=()=>{this.transport.name==="polling"&&this.transport.writable&&(P("writing a noop packet to polling for fast upgrade"),this.transport.send([{type:"noop"}]))},a=()=>{this.upgrading=!1,clearInterval(i),(0,Se.clearTimeout)(t),e.removeListener("packet",n),e.removeListener("close",c),e.removeListener("error",o),this.removeListener("close",l)},o=p=>{P("client did not complete upgrade - %s",p),a(),e.close(),e=null},c=()=>{o("transport closed")},l=()=>{o("socket closed")};e.on("packet",n),e.once("close",c),e.once("error",o),this.once("close",l)}clearTransport(){let e,t=this.cleanupFn.length;for(let i=0;i<t;i++)e=this.cleanupFn.shift(),e();this.transport.on("error",function(){P("error triggered by discarded transport")}),this.transport.close(),(0,Se.clearTimeout)(this.pingTimeoutTimer)}onClose(e,t){this.readyState!=="closed"&&(this.readyState="closed",(0,Se.clearTimeout)(this.pingIntervalTimer),(0,Se.clearTimeout)(this.pingTimeoutTimer),process.nextTick(()=>{this.writeBuffer=[]}),this.packetsFn=[],this.sentCallbackFn=[],this.clearTransport(),this.emit("close",e,t))}send(e,t,i){return this.sendPacket("message",e,t,i),this}write(e,t,i){return this.sendPacket("message",e,t,i),this}sendPacket(e,t,i={},n){if(typeof i=="function"&&(n=i,i={}),this.readyState!=="closing"&&this.readyState!=="closed"){P('sending packet "%s" (%s)',e,t),i.compress=i.compress!==!1;let r={type:e,options:i};t&&(r.data=t),this.emit("packetCreate",r),this.writeBuffer.push(r),typeof n=="function"&&this.packetsFn.push(n),this.flush()}}flush(){if(this.readyState!=="closed"&&this.transport.writable&&this.writeBuffer.length){P("flushing buffer to transport"),this.emit("flush",this.writeBuffer),this.server.emit("flush",this,this.writeBuffer);let e=this.writeBuffer;this.writeBuffer=[],this.packetsFn.length?(this.sentCallbackFn.push(this.packetsFn),this.packetsFn=[]):this.sentCallbackFn.push(null),this.transport.send(e),this.emit("drain"),this.server.emit("drain",this)}}getAvailableUpgrades(){let e=[],t=this.server.upgrades(this.transport.name);for(let i=0;i<t.length;++i){let n=t[i];this.server.opts.transports.indexOf(n)!==-1&&e.push(n)}return e}close(e){if(e&&(this.readyState==="open"||this.readyState==="closing"))return this.closeTransport(e);if(this.readyState==="open"){if(this.readyState="closing",this.writeBuffer.length){P("there are %d remaining packets in the buffer, waiting for the 'drain' event",this.writeBuffer.length),this.once("drain",()=>{P("all packets have been sent, closing the transport"),this.closeTransport(e)});return}P("the buffer is empty, closing the transport right away"),this.closeTransport(e)}}closeTransport(e){P("closing the transport (discard? %s)",!!e),e&&this.transport.discard(),this.transport.close(this.onClose.bind(this,"forced close"))}};Hs.Socket=yn});var Ro=v(_n=>{"use strict";_n.parse=Sm;_n.serialize=Em;var xm=Object.prototype.toString,gm=Object.prototype.hasOwnProperty,bm=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,ym=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,wm=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,_m=/^[\u0020-\u003A\u003D-\u007E]*$/;function Sm(s,e){if(typeof s!="string")throw new TypeError("argument str must be a string");var t={},i=s.length;if(i<2)return t;var n=e&&e.decode||km,r=0,a=0,o=0;do{if(a=s.indexOf("=",r),a===-1)break;if(o=s.indexOf(";",r),o===-1)o=i;else if(a>o){r=s.lastIndexOf(";",a-1)+1;continue}var c=To(s,r,a),l=Oo(s,a,c),p=s.slice(c,l);if(!gm.call(t,p)){var u=To(s,a+1,o),d=Oo(s,o,u);s.charCodeAt(u)===34&&s.charCodeAt(d-1)===34&&(u++,d--);var h=s.slice(u,d);t[p]=Tm(h,n)}r=o+1}while(r<i);return t}function To(s,e,t){do{var i=s.charCodeAt(e);if(i!==32&&i!==9)return e}while(++e<t);return t}function Oo(s,e,t){for(;e>t;){var i=s.charCodeAt(--e);if(i!==32&&i!==9)return e+1}return t}function Em(s,e,t){var i=t&&t.encode||encodeURIComponent;if(typeof i!="function")throw new TypeError("option encode is invalid");if(!bm.test(s))throw new TypeError("argument name is invalid");var n=i(e);if(!ym.test(n))throw new TypeError("argument val is invalid");var r=s+"="+n;if(!t)return r;if(t.maxAge!=null){var a=Math.floor(t.maxAge);if(!isFinite(a))throw new TypeError("option maxAge is invalid");r+="; Max-Age="+a}if(t.domain){if(!wm.test(t.domain))throw new TypeError("option domain is invalid");r+="; Domain="+t.domain}if(t.path){if(!_m.test(t.path))throw new TypeError("option path is invalid");r+="; Path="+t.path}if(t.expires){var o=t.expires;if(!Cm(o)||isNaN(o.valueOf()))throw new TypeError("option expires is invalid");r+="; Expires="+o.toUTCString()}if(t.httpOnly&&(r+="; HttpOnly"),t.secure&&(r+="; Secure"),t.partitioned&&(r+="; Partitioned"),t.priority){var c=typeof t.priority=="string"?t.priority.toLowerCase():t.priority;switch(c){case"low":r+="; Priority=Low";break;case"medium":r+="; Priority=Medium";break;case"high":r+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(t.sameSite){var l=typeof t.sameSite=="string"?t.sameSite.toLowerCase():t.sameSite;switch(l){case!0:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return r}function km(s){return s.indexOf("%")!==-1?decodeURIComponent(s):s}function Cm(s){return xm.call(s)==="[object Date]"}function Tm(s,e){try{return e(s)}catch{return s}}});var Ee=v((qb,jo)=>{"use strict";var Ao=["nodebuffer","arraybuffer","fragments"],Po=typeof Blob<"u";Po&&Ao.push("blob");jo.exports={BINARY_TYPES:Ao,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Po,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var Xt=v((Fb,zs)=>{"use strict";var{EMPTY_BUFFER:Om}=Ee(),Sn=Buffer[Symbol.species];function Rm(s,e){if(s.length===0)return Om;if(s.length===1)return s[0];let t=Buffer.allocUnsafe(e),i=0;for(let n=0;n<s.length;n++){let r=s[n];t.set(r,i),i+=r.length}return i<e?new Sn(t.buffer,t.byteOffset,i):t}function Mo(s,e,t,i,n){for(let r=0;r<n;r++)t[i+r]=s[r]^e[r&3]}function Do(s,e){for(let t=0;t<s.length;t++)s[t]^=e[t&3]}function Am(s){return s.length===s.buffer.byteLength?s.buffer:s.buffer.slice(s.byteOffset,s.byteOffset+s.length)}function En(s){if(En.readOnly=!0,Buffer.isBuffer(s))return s;let e;return s instanceof ArrayBuffer?e=new Sn(s):ArrayBuffer.isView(s)?e=new Sn(s.buffer,s.byteOffset,s.byteLength):(e=Buffer.from(s),En.readOnly=!1),e}zs.exports={concat:Rm,mask:Mo,toArrayBuffer:Am,toBuffer:En,unmask:Do};if(!process.env.WS_NO_BUFFER_UTIL)try{let s=require("bufferutil");zs.exports.mask=function(e,t,i,n,r){r<48?Mo(e,t,i,n,r):s.mask(e,t,i,n,r)},zs.exports.unmask=function(e,t){e.length<32?Do(e,t):s.unmask(e,t)}}catch{}});var No=v((Ub,Io)=>{"use strict";var Bo=Symbol("kDone"),kn=Symbol("kRun"),Cn=class{constructor(e){this[Bo]=()=>{this.pending--,this[kn]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[kn]()}[kn](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Bo])}}};Io.exports=Cn});var Qt=v((Hb,Uo)=>{"use strict";var Jt=require("zlib"),Lo=Xt(),Pm=No(),{kStatusCode:qo}=Ee(),jm=Buffer[Symbol.species],Mm=Buffer.from([0,0,255,255]),$s=Symbol("permessage-deflate"),ke=Symbol("total-length"),ht=Symbol("callback"),qe=Symbol("buffers"),vt=Symbol("error"),Ws,Tn=class{constructor(e,t,i){if(this._maxPayload=i|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!Ws){let n=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Ws=new Pm(n)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[ht];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let t=this._options,i=e.find(n=>!(t.serverNoContextTakeover===!1&&n.server_no_context_takeover||n.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits=="number"&&t.serverMaxWindowBits>n.server_max_window_bits)||typeof t.clientMaxWindowBits=="number"&&!n.client_max_window_bits));if(!i)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(i.server_no_context_takeover=!0),t.clientNoContextTakeover&&(i.client_no_context_takeover=!0),typeof t.serverMaxWindowBits=="number"&&(i.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits=="number"?i.client_max_window_bits=t.clientMaxWindowBits:(i.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete i.client_max_window_bits,i}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return t}normalizeParams(e){return e.forEach(t=>{Object.keys(t).forEach(i=>{let n=t[i];if(n.length>1)throw new Error(`Parameter "${i}" must have only a single value`);if(n=n[0],i==="client_max_window_bits"){if(n!==!0){let r=+n;if(!Number.isInteger(r)||r<8||r>15)throw new TypeError(`Invalid value for parameter "${i}": ${n}`);n=r}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${i}": ${n}`)}else if(i==="server_max_window_bits"){let r=+n;if(!Number.isInteger(r)||r<8||r>15)throw new TypeError(`Invalid value for parameter "${i}": ${n}`);n=r}else if(i==="client_no_context_takeover"||i==="server_no_context_takeover"){if(n!==!0)throw new TypeError(`Invalid value for parameter "${i}": ${n}`)}else throw new Error(`Unknown parameter "${i}"`);t[i]=n})}),e}decompress(e,t,i){Ws.add(n=>{this._decompress(e,t,(r,a)=>{n(),i(r,a)})})}compress(e,t,i){Ws.add(n=>{this._compress(e,t,(r,a)=>{n(),i(r,a)})})}_decompress(e,t,i){let n=this._isServer?"client":"server";if(!this._inflate){let r=`${n}_max_window_bits`,a=typeof this.params[r]!="number"?Jt.Z_DEFAULT_WINDOWBITS:this.params[r];this._inflate=Jt.createInflateRaw({...this._options.zlibInflateOptions,windowBits:a}),this._inflate[$s]=this,this._inflate[ke]=0,this._inflate[qe]=[],this._inflate.on("error",Bm),this._inflate.on("data",Fo)}this._inflate[ht]=i,this._inflate.write(e),t&&this._inflate.write(Mm),this._inflate.flush(()=>{let r=this._inflate[vt];if(r){this._inflate.close(),this._inflate=null,i(r);return}let a=Lo.concat(this._inflate[qe],this._inflate[ke]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[ke]=0,this._inflate[qe]=[],t&&this.params[`${n}_no_context_takeover`]&&this._inflate.reset()),i(null,a)})}_compress(e,t,i){let n=this._isServer?"server":"client";if(!this._deflate){let r=`${n}_max_window_bits`,a=typeof this.params[r]!="number"?Jt.Z_DEFAULT_WINDOWBITS:this.params[r];this._deflate=Jt.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:a}),this._deflate[ke]=0,this._deflate[qe]=[],this._deflate.on("data",Dm)}this._deflate[ht]=i,this._deflate.write(e),this._deflate.flush(Jt.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let r=Lo.concat(this._deflate[qe],this._deflate[ke]);t&&(r=new jm(r.buffer,r.byteOffset,r.length-4)),this._deflate[ht]=null,this._deflate[ke]=0,this._deflate[qe]=[],t&&this.params[`${n}_no_context_takeover`]&&this._deflate.reset(),i(null,r)})}};Uo.exports=Tn;function Dm(s){this[qe].push(s),this[ke]+=s.length}function Fo(s){if(this[ke]+=s.length,this[$s]._maxPayload<1||this[ke]<=this[$s]._maxPayload){this[qe].push(s);return}this[vt]=new RangeError("Max payload size exceeded"),this[vt].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[vt][qo]=1009,this.removeListener("data",Fo),this.reset()}function Bm(s){if(this[$s]._inflate=null,this[vt]){this[ht](this[vt]);return}s[qo]=1007,this[ht](s)}});var xt=v((zb,Vs)=>{"use strict";var{isUtf8:Ho}=require("buffer"),{hasBlob:Im}=Ee(),Nm=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function Lm(s){return s>=1e3&&s<=1014&&s!==1004&&s!==1005&&s!==1006||s>=3e3&&s<=4999}function On(s){let e=s.length,t=0;for(;t<e;)if((s[t]&128)===0)t++;else if((s[t]&224)===192){if(t+1===e||(s[t+1]&192)!==128||(s[t]&254)===192)return!1;t+=2}else if((s[t]&240)===224){if(t+2>=e||(s[t+1]&192)!==128||(s[t+2]&192)!==128||s[t]===224&&(s[t+1]&224)===128||s[t]===237&&(s[t+1]&224)===160)return!1;t+=3}else if((s[t]&248)===240){if(t+3>=e||(s[t+1]&192)!==128||(s[t+2]&192)!==128||(s[t+3]&192)!==128||s[t]===240&&(s[t+1]&240)===128||s[t]===244&&s[t+1]>143||s[t]>244)return!1;t+=4}else return!1;return!0}function qm(s){return Im&&typeof s=="object"&&typeof s.arrayBuffer=="function"&&typeof s.type=="string"&&typeof s.stream=="function"&&(s[Symbol.toStringTag]==="Blob"||s[Symbol.toStringTag]==="File")}Vs.exports={isBlob:qm,isValidStatusCode:Lm,isValidUTF8:On,tokenChars:Nm};if(Ho)Vs.exports.isValidUTF8=function(s){return s.length<24?On(s):Ho(s)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let s=require("utf-8-validate");Vs.exports.isValidUTF8=function(e){return e.length<32?On(e):s(e)}}catch{}});var Mn=v((Wb,Yo)=>{"use strict";var{Writable:Fm}=require("stream"),zo=Qt(),{BINARY_TYPES:Um,EMPTY_BUFFER:Wo,kStatusCode:Hm,kWebSocket:zm}=Ee(),{concat:Rn,toArrayBuffer:Wm,unmask:$m}=Xt(),{isValidStatusCode:Vm,isValidUTF8:$o}=xt(),Gs=Buffer[Symbol.species],ne=0,Vo=1,Go=2,Ko=3,An=4,Pn=5,Ks=6,jn=class extends Fm{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||Um[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[zm]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=ne}_write(e,t,i){if(this._opcode===8&&this._state==ne)return i();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(i)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let i=this._buffers[0];return this._buffers[0]=new Gs(i.buffer,i.byteOffset+e,i.length-e),new Gs(i.buffer,i.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let i=this._buffers[0],n=t.length-e;e>=i.length?t.set(this._buffers.shift(),n):(t.set(new Uint8Array(i.buffer,i.byteOffset,e),n),this._buffers[0]=new Gs(i.buffer,i.byteOffset+e,i.length-e)),e-=i.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case ne:this.getInfo(e);break;case Vo:this.getPayloadLength16(e);break;case Go:this.getPayloadLength64(e);break;case Ko:this.getMask();break;case An:this.getData(e);break;case Pn:case Ks:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if((t[0]&48)!==0){let n=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(n);return}let i=(t[0]&64)===64;if(i&&!this._extensions[zo.extensionName]){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(this._fin=(t[0]&128)===128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(i){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(!this._fragmented){let n=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}this._compressed=i}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let n=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(n);return}if(i){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let n=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(n);return}}else{let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)===128,this._isServer){if(!this._masked){let n=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(n);return}}else if(this._masked){let n=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(n);return}this._payloadLength===126?this._state=Vo:this._payloadLength===127?this._state=Go:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),i=t.readUInt32BE(0);if(i>Math.pow(2,21)-1){let n=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(n);return}this._payloadLength=i*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let t=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(t);return}this._masked?this._state=Ko:this._state=An}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=An}getData(e){let t=Wo;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&$m(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=Pn,this.decompress(t,e);return}t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}decompress(e,t){this._extensions[zo.extensionName].decompress(e,this._fin,(n,r)=>{if(n)return t(n);if(r.length){if(this._messageLength+=r.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let a=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(a);return}this._fragments.push(r)}this.dataMessage(t),this._state===ne&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=ne;return}let t=this._messageLength,i=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let n;this._binaryType==="nodebuffer"?n=Rn(i,t):this._binaryType==="arraybuffer"?n=Wm(Rn(i,t)):this._binaryType==="blob"?n=new Blob(i):n=i,this._allowSynchronousEvents?(this.emit("message",n,!0),this._state=ne):(this._state=Ks,setImmediate(()=>{this.emit("message",n,!0),this._state=ne,this.startLoop(e)}))}else{let n=Rn(i,t);if(!this._skipUTF8Validation&&!$o(n)){let r=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(r);return}this._state===Pn||this._allowSynchronousEvents?(this.emit("message",n,!1),this._state=ne):(this._state=Ks,setImmediate(()=>{this.emit("message",n,!1),this._state=ne,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,Wo),this.end();else{let i=e.readUInt16BE(0);if(!Vm(i)){let r=this.createError(RangeError,`invalid status code ${i}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");t(r);return}let n=new Gs(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!$o(n)){let r=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(r);return}this._loop=!1,this.emit("conclude",i,n),this.end()}this._state=ne;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=ne):(this._state=Ks,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=ne,this.startLoop(t)}))}createError(e,t,i,n,r){this._loop=!1,this._errored=!0;let a=new e(i?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(a,this.createError),a.code=r,a[Hm]=n,a}};Yo.exports=jn});var In=v((Vb,Qo)=>{"use strict";var{Duplex:$b}=require("stream"),{randomFillSync:Gm}=require("crypto"),Xo=Qt(),{EMPTY_BUFFER:Km,kWebSocket:Ym,NOOP:Xm}=Ee(),{isBlob:gt,isValidStatusCode:Jm}=xt(),{mask:Jo,toBuffer:Ye}=Xt(),re=Symbol("kByteLength"),Qm=Buffer.alloc(4),Ys=8*1024,Xe,bt=Ys,ue=0,Zm=1,eh=2,Dn=class s{constructor(e,t,i){this._extensions=t||{},i&&(this._generateMask=i,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=ue,this.onerror=Xm,this[Ym]=void 0}static frame(e,t){let i,n=!1,r=2,a=!1;t.mask&&(i=t.maskBuffer||Qm,t.generateMask?t.generateMask(i):(bt===Ys&&(Xe===void 0&&(Xe=Buffer.alloc(Ys)),Gm(Xe,0,Ys),bt=0),i[0]=Xe[bt++],i[1]=Xe[bt++],i[2]=Xe[bt++],i[3]=Xe[bt++]),a=(i[0]|i[1]|i[2]|i[3])===0,r=6);let o;typeof e=="string"?(!t.mask||a)&&t[re]!==void 0?o=t[re]:(e=Buffer.from(e),o=e.length):(o=e.length,n=t.mask&&t.readOnly&&!a);let c=o;o>=65536?(r+=8,c=127):o>125&&(r+=2,c=126);let l=Buffer.allocUnsafe(n?o+r:r);return l[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(l[0]|=64),l[1]=c,c===126?l.writeUInt16BE(o,2):c===127&&(l[2]=l[3]=0,l.writeUIntBE(o,4,6)),t.mask?(l[1]|=128,l[r-4]=i[0],l[r-3]=i[1],l[r-2]=i[2],l[r-1]=i[3],a?[l,e]:n?(Jo(e,i,l,r,o),[l]):(Jo(e,i,e,0,o),[l,e])):[l,e]}close(e,t,i,n){let r;if(e===void 0)r=Km;else{if(typeof e!="number"||!Jm(e))throw new TypeError("First argument must be a valid error code number");if(t===void 0||!t.length)r=Buffer.allocUnsafe(2),r.writeUInt16BE(e,0);else{let o=Buffer.byteLength(t);if(o>123)throw new RangeError("The message must not be greater than 123 bytes");r=Buffer.allocUnsafe(2+o),r.writeUInt16BE(e,0),typeof t=="string"?r.write(t,2):r.set(t,2)}}let a={[re]:r.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==ue?this.enqueue([this.dispatch,r,!1,a,n]):this.sendFrame(s.frame(r,a),n)}ping(e,t,i){let n,r;if(typeof e=="string"?(n=Buffer.byteLength(e),r=!1):gt(e)?(n=e.size,r=!1):(e=Ye(e),n=e.length,r=Ye.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let a={[re]:n,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:r,rsv1:!1};gt(e)?this._state!==ue?this.enqueue([this.getBlobData,e,!1,a,i]):this.getBlobData(e,!1,a,i):this._state!==ue?this.enqueue([this.dispatch,e,!1,a,i]):this.sendFrame(s.frame(e,a),i)}pong(e,t,i){let n,r;if(typeof e=="string"?(n=Buffer.byteLength(e),r=!1):gt(e)?(n=e.size,r=!1):(e=Ye(e),n=e.length,r=Ye.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let a={[re]:n,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:r,rsv1:!1};gt(e)?this._state!==ue?this.enqueue([this.getBlobData,e,!1,a,i]):this.getBlobData(e,!1,a,i):this._state!==ue?this.enqueue([this.dispatch,e,!1,a,i]):this.sendFrame(s.frame(e,a),i)}send(e,t,i){let n=this._extensions[Xo.extensionName],r=t.binary?2:1,a=t.compress,o,c;typeof e=="string"?(o=Buffer.byteLength(e),c=!1):gt(e)?(o=e.size,c=!1):(e=Ye(e),o=e.length,c=Ye.readOnly),this._firstFragment?(this._firstFragment=!1,a&&n&&n.params[n._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(a=o>=n._threshold),this._compress=a):(a=!1,r=0),t.fin&&(this._firstFragment=!0);let l={[re]:o,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:r,readOnly:c,rsv1:a};gt(e)?this._state!==ue?this.enqueue([this.getBlobData,e,this._compress,l,i]):this.getBlobData(e,this._compress,l,i):this._state!==ue?this.enqueue([this.dispatch,e,this._compress,l,i]):this.dispatch(e,this._compress,l,i)}getBlobData(e,t,i,n){this._bufferedBytes+=i[re],this._state=eh,e.arrayBuffer().then(r=>{if(this._socket.destroyed){let o=new Error("The socket was closed while the blob was being read");process.nextTick(Bn,this,o,n);return}this._bufferedBytes-=i[re];let a=Ye(r);t?this.dispatch(a,t,i,n):(this._state=ue,this.sendFrame(s.frame(a,i),n),this.dequeue())}).catch(r=>{process.nextTick(th,this,r,n)})}dispatch(e,t,i,n){if(!t){this.sendFrame(s.frame(e,i),n);return}let r=this._extensions[Xo.extensionName];this._bufferedBytes+=i[re],this._state=Zm,r.compress(e,i.fin,(a,o)=>{if(this._socket.destroyed){let c=new Error("The socket was closed while data was being compressed");Bn(this,c,n);return}this._bufferedBytes-=i[re],this._state=ue,i.readOnly=!1,this.sendFrame(s.frame(o,i),n),this.dequeue()})}dequeue(){for(;this._state===ue&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][re],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][re],this._queue.push(e)}sendFrame(e,t){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};Qo.exports=Dn;function Bn(s,e,t){typeof t=="function"&&t(e);for(let i=0;i<s._queue.length;i++){let n=s._queue[i],r=n[n.length-1];typeof r=="function"&&r(e)}}function th(s,e,t){Bn(s,e,t),s.onerror(e)}});var oc=v((Gb,ac)=>{"use strict";var{kForOnEventAttribute:Zt,kListener:Nn}=Ee(),Zo=Symbol("kCode"),ec=Symbol("kData"),tc=Symbol("kError"),sc=Symbol("kMessage"),ic=Symbol("kReason"),yt=Symbol("kTarget"),nc=Symbol("kType"),rc=Symbol("kWasClean"),Ce=class{constructor(e){this[yt]=null,this[nc]=e}get target(){return this[yt]}get type(){return this[nc]}};Object.defineProperty(Ce.prototype,"target",{enumerable:!0});Object.defineProperty(Ce.prototype,"type",{enumerable:!0});var Je=class extends Ce{constructor(e,t={}){super(e),this[Zo]=t.code===void 0?0:t.code,this[ic]=t.reason===void 0?"":t.reason,this[rc]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[Zo]}get reason(){return this[ic]}get wasClean(){return this[rc]}};Object.defineProperty(Je.prototype,"code",{enumerable:!0});Object.defineProperty(Je.prototype,"reason",{enumerable:!0});Object.defineProperty(Je.prototype,"wasClean",{enumerable:!0});var wt=class extends Ce{constructor(e,t={}){super(e),this[tc]=t.error===void 0?null:t.error,this[sc]=t.message===void 0?"":t.message}get error(){return this[tc]}get message(){return this[sc]}};Object.defineProperty(wt.prototype,"error",{enumerable:!0});Object.defineProperty(wt.prototype,"message",{enumerable:!0});var es=class extends Ce{constructor(e,t={}){super(e),this[ec]=t.data===void 0?null:t.data}get data(){return this[ec]}};Object.defineProperty(es.prototype,"data",{enumerable:!0});var sh={addEventListener(s,e,t={}){for(let n of this.listeners(s))if(!t[Zt]&&n[Nn]===e&&!n[Zt])return;let i;if(s==="message")i=function(r,a){let o=new es("message",{data:a?r:r.toString()});o[yt]=this,Xs(e,this,o)};else if(s==="close")i=function(r,a){let o=new Je("close",{code:r,reason:a.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});o[yt]=this,Xs(e,this,o)};else if(s==="error")i=function(r){let a=new wt("error",{error:r,message:r.message});a[yt]=this,Xs(e,this,a)};else if(s==="open")i=function(){let r=new Ce("open");r[yt]=this,Xs(e,this,r)};else return;i[Zt]=!!t[Zt],i[Nn]=e,t.once?this.once(s,i):this.on(s,i)},removeEventListener(s,e){for(let t of this.listeners(s))if(t[Nn]===e&&!t[Zt]){this.removeListener(s,t);break}}};ac.exports={CloseEvent:Je,ErrorEvent:wt,Event:Ce,EventTarget:sh,MessageEvent:es};function Xs(s,e,t){typeof s=="object"&&s.handleEvent?s.handleEvent.call(s,t):s.call(e,t)}});var Ln=v((Kb,cc)=>{"use strict";var{tokenChars:ts}=xt();function ge(s,e,t){s[e]===void 0?s[e]=[t]:s[e].push(t)}function ih(s){let e=Object.create(null),t=Object.create(null),i=!1,n=!1,r=!1,a,o,c=-1,l=-1,p=-1,u=0;for(;u<s.length;u++)if(l=s.charCodeAt(u),a===void 0)if(p===-1&&ts[l]===1)c===-1&&(c=u);else if(u!==0&&(l===32||l===9))p===-1&&c!==-1&&(p=u);else if(l===59||l===44){if(c===-1)throw new SyntaxError(`Unexpected character at index ${u}`);p===-1&&(p=u);let h=s.slice(c,p);l===44?(ge(e,h,t),t=Object.create(null)):a=h,c=p=-1}else throw new SyntaxError(`Unexpected character at index ${u}`);else if(o===void 0)if(p===-1&&ts[l]===1)c===-1&&(c=u);else if(l===32||l===9)p===-1&&c!==-1&&(p=u);else if(l===59||l===44){if(c===-1)throw new SyntaxError(`Unexpected character at index ${u}`);p===-1&&(p=u),ge(t,s.slice(c,p),!0),l===44&&(ge(e,a,t),t=Object.create(null),a=void 0),c=p=-1}else if(l===61&&c!==-1&&p===-1)o=s.slice(c,u),c=p=-1;else throw new SyntaxError(`Unexpected character at index ${u}`);else if(n){if(ts[l]!==1)throw new SyntaxError(`Unexpected character at index ${u}`);c===-1?c=u:i||(i=!0),n=!1}else if(r)if(ts[l]===1)c===-1&&(c=u);else if(l===34&&c!==-1)r=!1,p=u;else if(l===92)n=!0;else throw new SyntaxError(`Unexpected character at index ${u}`);else if(l===34&&s.charCodeAt(u-1)===61)r=!0;else if(p===-1&&ts[l]===1)c===-1&&(c=u);else if(c!==-1&&(l===32||l===9))p===-1&&(p=u);else if(l===59||l===44){if(c===-1)throw new SyntaxError(`Unexpected character at index ${u}`);p===-1&&(p=u);let h=s.slice(c,p);i&&(h=h.replace(/\\/g,""),i=!1),ge(t,o,h),l===44&&(ge(e,a,t),t=Object.create(null),a=void 0),o=void 0,c=p=-1}else throw new SyntaxError(`Unexpected character at index ${u}`);if(c===-1||r||l===32||l===9)throw new SyntaxError("Unexpected end of input");p===-1&&(p=u);let d=s.slice(c,p);return a===void 0?ge(e,d,t):(o===void 0?ge(t,d,!0):i?ge(t,o,d.replace(/\\/g,"")):ge(t,o,d),ge(e,a,t)),e}function nh(s){return Object.keys(s).map(e=>{let t=s[e];return Array.isArray(t)||(t=[t]),t.map(i=>[e].concat(Object.keys(i).map(n=>{let r=i[n];return Array.isArray(r)||(r=[r]),r.map(a=>a===!0?n:`${n}=${a}`).join("; ")})).join("; ")).join(", ")}).join(", ")}cc.exports={format:nh,parse:ih}});var ei=v((Jb,yc)=>{"use strict";var rh=require("events"),ah=require("https"),oh=require("http"),uc=require("net"),ch=require("tls"),{randomBytes:lh,createHash:ph}=require("crypto"),{Duplex:Yb,Readable:Xb}=require("stream"),{URL:qn}=require("url"),Fe=Qt(),uh=Mn(),dh=In(),{isBlob:fh}=xt(),{BINARY_TYPES:lc,EMPTY_BUFFER:Js,GUID:mh,kForOnEventAttribute:Fn,kListener:hh,kStatusCode:vh,kWebSocket:L,NOOP:dc}=Ee(),{EventTarget:{addEventListener:xh,removeEventListener:gh}}=oc(),{format:bh,parse:yh}=Ln(),{toBuffer:wh}=Xt(),_h=30*1e3,fc=Symbol("kAborted"),Un=[8,13],Te=["CONNECTING","OPEN","CLOSING","CLOSED"],Sh=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,T=class s extends rh{constructor(e,t,i){super(),this._binaryType=lc[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Js,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=s.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,t===void 0?t=[]:Array.isArray(t)||(typeof t=="object"&&t!==null?(i=t,t=[]):t=[t]),mc(this,e,t,i)):(this._autoPong=i.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){lc.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,i){let n=new uh({allowSynchronousEvents:i.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation}),r=new dh(e,this._extensions,i.generateMask);this._receiver=n,this._sender=r,this._socket=e,n[L]=this,r[L]=this,e[L]=this,n.on("conclude",Ch),n.on("drain",Th),n.on("error",Oh),n.on("message",Rh),n.on("ping",Ah),n.on("pong",Ph),r.onerror=jh,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",xc),e.on("data",Zs),e.on("end",gc),e.on("error",bc),this._readyState=s.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=s.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[Fe.extensionName]&&this._extensions[Fe.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=s.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==s.CLOSED){if(this.readyState===s.CONNECTING){te(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===s.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=s.CLOSING,this._sender.close(e,t,!this._isServer,i=>{i||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),vc(this)}}pause(){this.readyState===s.CONNECTING||this.readyState===s.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,t,i){if(this.readyState===s.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=t=void 0):typeof t=="function"&&(i=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==s.OPEN){Hn(this,e,i);return}t===void 0&&(t=!this._isServer),this._sender.ping(e||Js,t,i)}pong(e,t,i){if(this.readyState===s.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=t=void 0):typeof t=="function"&&(i=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==s.OPEN){Hn(this,e,i);return}t===void 0&&(t=!this._isServer),this._sender.pong(e||Js,t,i)}resume(){this.readyState===s.CONNECTING||this.readyState===s.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,i){if(this.readyState===s.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"&&(i=t,t={}),typeof e=="number"&&(e=e.toString()),this.readyState!==s.OPEN){Hn(this,e,i);return}let n={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[Fe.extensionName]||(n.compress=!1),this._sender.send(e||Js,n,i)}terminate(){if(this.readyState!==s.CLOSED){if(this.readyState===s.CONNECTING){te(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=s.CLOSING,this._socket.destroy())}}};Object.defineProperty(T,"CONNECTING",{enumerable:!0,value:Te.indexOf("CONNECTING")});Object.defineProperty(T.prototype,"CONNECTING",{enumerable:!0,value:Te.indexOf("CONNECTING")});Object.defineProperty(T,"OPEN",{enumerable:!0,value:Te.indexOf("OPEN")});Object.defineProperty(T.prototype,"OPEN",{enumerable:!0,value:Te.indexOf("OPEN")});Object.defineProperty(T,"CLOSING",{enumerable:!0,value:Te.indexOf("CLOSING")});Object.defineProperty(T.prototype,"CLOSING",{enumerable:!0,value:Te.indexOf("CLOSING")});Object.defineProperty(T,"CLOSED",{enumerable:!0,value:Te.indexOf("CLOSED")});Object.defineProperty(T.prototype,"CLOSED",{enumerable:!0,value:Te.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(s=>{Object.defineProperty(T.prototype,s,{enumerable:!0})});["open","error","close","message"].forEach(s=>{Object.defineProperty(T.prototype,`on${s}`,{enumerable:!0,get(){for(let e of this.listeners(s))if(e[Fn])return e[hh];return null},set(e){for(let t of this.listeners(s))if(t[Fn]){this.removeListener(s,t);break}typeof e=="function"&&this.addEventListener(s,e,{[Fn]:!0})}})});T.prototype.addEventListener=xh;T.prototype.removeEventListener=gh;yc.exports=T;function mc(s,e,t,i){let n={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Un[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...i,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(s._autoPong=n.autoPong,!Un.includes(n.protocolVersion))throw new RangeError(`Unsupported protocol version: ${n.protocolVersion} (supported versions: ${Un.join(", ")})`);let r;if(e instanceof qn)r=e;else try{r=new qn(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}r.protocol==="http:"?r.protocol="ws:":r.protocol==="https:"&&(r.protocol="wss:"),s._url=r.href;let a=r.protocol==="wss:",o=r.protocol==="ws+unix:",c;if(r.protocol!=="ws:"&&!a&&!o?c=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:o&&!r.pathname?c="The URL's pathname is empty":r.hash&&(c="The URL contains a fragment identifier"),c){let f=new SyntaxError(c);if(s._redirects===0)throw f;Qs(s,f);return}let l=a?443:80,p=lh(16).toString("base64"),u=a?ah.request:oh.request,d=new Set,h;if(n.createConnection=n.createConnection||(a?kh:Eh),n.defaultPort=n.defaultPort||l,n.port=r.port||l,n.host=r.hostname.startsWith("[")?r.hostname.slice(1,-1):r.hostname,n.headers={...n.headers,"Sec-WebSocket-Version":n.protocolVersion,"Sec-WebSocket-Key":p,Connection:"Upgrade",Upgrade:"websocket"},n.path=r.pathname+r.search,n.timeout=n.handshakeTimeout,n.perMessageDeflate&&(h=new Fe(n.perMessageDeflate!==!0?n.perMessageDeflate:{},!1,n.maxPayload),n.headers["Sec-WebSocket-Extensions"]=bh({[Fe.extensionName]:h.offer()})),t.length){for(let f of t){if(typeof f!="string"||!Sh.test(f)||d.has(f))throw new SyntaxError("An invalid or duplicated subprotocol was specified");d.add(f)}n.headers["Sec-WebSocket-Protocol"]=t.join(",")}if(n.origin&&(n.protocolVersion<13?n.headers["Sec-WebSocket-Origin"]=n.origin:n.headers.Origin=n.origin),(r.username||r.password)&&(n.auth=`${r.username}:${r.password}`),o){let f=n.path.split(":");n.socketPath=f[0],n.path=f[1]}let m;if(n.followRedirects){if(s._redirects===0){s._originalIpc=o,s._originalSecure=a,s._originalHostOrSocketPath=o?n.socketPath:r.host;let f=i&&i.headers;if(i={...i,headers:{}},f)for(let[x,w]of Object.entries(f))i.headers[x.toLowerCase()]=w}else if(s.listenerCount("redirect")===0){let f=o?s._originalIpc?n.socketPath===s._originalHostOrSocketPath:!1:s._originalIpc?!1:r.host===s._originalHostOrSocketPath;(!f||s._originalSecure&&!a)&&(delete n.headers.authorization,delete n.headers.cookie,f||delete n.headers.host,n.auth=void 0)}n.auth&&!i.headers.authorization&&(i.headers.authorization="Basic "+Buffer.from(n.auth).toString("base64")),m=s._req=u(n),s._redirects&&s.emit("redirect",s.url,m)}else m=s._req=u(n);n.timeout&&m.on("timeout",()=>{te(s,m,"Opening handshake has timed out")}),m.on("error",f=>{m===null||m[fc]||(m=s._req=null,Qs(s,f))}),m.on("response",f=>{let x=f.headers.location,w=f.statusCode;if(x&&n.followRedirects&&w>=300&&w<400){if(++s._redirects>n.maxRedirects){te(s,m,"Maximum redirects exceeded");return}m.abort();let b;try{b=new qn(x,e)}catch{let D=new SyntaxError(`Invalid URL: ${x}`);Qs(s,D);return}mc(s,b,t,i)}else s.emit("unexpected-response",m,f)||te(s,m,`Unexpected server response: ${f.statusCode}`)}),m.on("upgrade",(f,x,w)=>{if(s.emit("upgrade",f),s.readyState!==T.CONNECTING)return;m=s._req=null;let b=f.headers.upgrade;if(b===void 0||b.toLowerCase()!=="websocket"){te(s,x,"Invalid Upgrade header");return}let F=ph("sha1").update(p+mh).digest("base64");if(f.headers["sec-websocket-accept"]!==F){te(s,x,"Invalid Sec-WebSocket-Accept header");return}let D=f.headers["sec-websocket-protocol"],me;if(D!==void 0?d.size?d.has(D)||(me="Server sent an invalid subprotocol"):me="Server sent a subprotocol but none was requested":d.size&&(me="Server sent no subprotocol"),me){te(s,x,me);return}D&&(s._protocol=D);let G=f.headers["sec-websocket-extensions"];if(G!==void 0){if(!h){te(s,x,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let he;try{he=yh(G)}catch{te(s,x,"Invalid Sec-WebSocket-Extensions header");return}let _e=Object.keys(he);if(_e.length!==1||_e[0]!==Fe.extensionName){te(s,x,"Server indicated an extension that was not requested");return}try{h.accept(he[Fe.extensionName])}catch{te(s,x,"Invalid Sec-WebSocket-Extensions header");return}s._extensions[Fe.extensionName]=h}s.setSocket(x,w,{allowSynchronousEvents:n.allowSynchronousEvents,generateMask:n.generateMask,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation})}),n.finishRequest?n.finishRequest(m,s):m.end()}function Qs(s,e){s._readyState=T.CLOSING,s._errorEmitted=!0,s.emit("error",e),s.emitClose()}function Eh(s){return s.path=s.socketPath,uc.connect(s)}function kh(s){return s.path=void 0,!s.servername&&s.servername!==""&&(s.servername=uc.isIP(s.host)?"":s.host),ch.connect(s)}function te(s,e,t){s._readyState=T.CLOSING;let i=new Error(t);Error.captureStackTrace(i,te),e.setHeader?(e[fc]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(Qs,s,i)):(e.destroy(i),e.once("error",s.emit.bind(s,"error")),e.once("close",s.emitClose.bind(s)))}function Hn(s,e,t){if(e){let i=fh(e)?e.size:wh(e).length;s._socket?s._sender._bufferedBytes+=i:s._bufferedAmount+=i}if(t){let i=new Error(`WebSocket is not open: readyState ${s.readyState} (${Te[s.readyState]})`);process.nextTick(t,i)}}function Ch(s,e){let t=this[L];t._closeFrameReceived=!0,t._closeMessage=e,t._closeCode=s,t._socket[L]!==void 0&&(t._socket.removeListener("data",Zs),process.nextTick(hc,t._socket),s===1005?t.close():t.close(s,e))}function Th(){let s=this[L];s.isPaused||s._socket.resume()}function Oh(s){let e=this[L];e._socket[L]!==void 0&&(e._socket.removeListener("data",Zs),process.nextTick(hc,e._socket),e.close(s[vh])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",s))}function pc(){this[L].emitClose()}function Rh(s,e){this[L].emit("message",s,e)}function Ah(s){let e=this[L];e._autoPong&&e.pong(s,!this._isServer,dc),e.emit("ping",s)}function Ph(s){this[L].emit("pong",s)}function hc(s){s.resume()}function jh(s){let e=this[L];e.readyState!==T.CLOSED&&(e.readyState===T.OPEN&&(e._readyState=T.CLOSING,vc(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",s)))}function vc(s){s._closeTimer=setTimeout(s._socket.destroy.bind(s._socket),_h)}function xc(){let s=this[L];this.removeListener("close",xc),this.removeListener("data",Zs),this.removeListener("end",gc),s._readyState=T.CLOSING;let e;!this._readableState.endEmitted&&!s._closeFrameReceived&&!s._receiver._writableState.errorEmitted&&(e=s._socket.read())!==null&&s._receiver.write(e),s._receiver.end(),this[L]=void 0,clearTimeout(s._closeTimer),s._receiver._writableState.finished||s._receiver._writableState.errorEmitted?s.emitClose():(s._receiver.on("error",pc),s._receiver.on("finish",pc))}function Zs(s){this[L]._receiver.write(s)||this.pause()}function gc(){let s=this[L];s._readyState=T.CLOSING,s._receiver.end(),this.end()}function bc(){let s=this[L];this.removeListener("error",bc),this.on("error",dc),s&&(s._readyState=T.CLOSING,this.destroy())}});var Ec=v((Zb,Sc)=>{"use strict";var Qb=ei(),{Duplex:Mh}=require("stream");function wc(s){s.emit("close")}function Dh(){!this.destroyed&&this._writableState.finished&&this.destroy()}function _c(s){this.removeListener("error",_c),this.destroy(),this.listenerCount("error")===0&&this.emit("error",s)}function Bh(s,e){let t=!0,i=new Mh({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return s.on("message",function(r,a){let o=!a&&i._readableState.objectMode?r.toString():r;i.push(o)||s.pause()}),s.once("error",function(r){i.destroyed||(t=!1,i.destroy(r))}),s.once("close",function(){i.destroyed||i.push(null)}),i._destroy=function(n,r){if(s.readyState===s.CLOSED){r(n),process.nextTick(wc,i);return}let a=!1;s.once("error",function(c){a=!0,r(c)}),s.once("close",function(){a||r(n),process.nextTick(wc,i)}),t&&s.terminate()},i._final=function(n){if(s.readyState===s.CONNECTING){s.once("open",function(){i._final(n)});return}s._socket!==null&&(s._socket._writableState.finished?(n(),i._readableState.endEmitted&&i.destroy()):(s._socket.once("finish",function(){n()}),s.close()))},i._read=function(){s.isPaused&&s.resume()},i._write=function(n,r,a){if(s.readyState===s.CONNECTING){s.once("open",function(){i._write(n,r,a)});return}s.send(n,a)},i.on("end",Dh),i.on("error",_c),i}Sc.exports=Bh});var Cc=v((ey,kc)=>{"use strict";var{tokenChars:Ih}=xt();function Nh(s){let e=new Set,t=-1,i=-1,n=0;for(n;n<s.length;n++){let a=s.charCodeAt(n);if(i===-1&&Ih[a]===1)t===-1&&(t=n);else if(n!==0&&(a===32||a===9))i===-1&&t!==-1&&(i=n);else if(a===44){if(t===-1)throw new SyntaxError(`Unexpected character at index ${n}`);i===-1&&(i=n);let o=s.slice(t,i);if(e.has(o))throw new SyntaxError(`The "${o}" subprotocol is duplicated`);e.add(o),t=i=-1}else throw new SyntaxError(`Unexpected character at index ${n}`)}if(t===-1||i!==-1)throw new SyntaxError("Unexpected end of input");let r=s.slice(t,n);if(e.has(r))throw new SyntaxError(`The "${r}" subprotocol is duplicated`);return e.add(r),e}kc.exports={parse:Nh}});var Mc=v((sy,jc)=>{"use strict";var Lh=require("events"),ti=require("http"),{Duplex:ty}=require("stream"),{createHash:qh}=require("crypto"),Tc=Ln(),Qe=Qt(),Fh=Cc(),Uh=ei(),{GUID:Hh,kWebSocket:zh}=Ee(),Wh=/^[+/0-9A-Za-z]{22}==$/,Oc=0,Rc=1,Pc=2,zn=class extends Lh{constructor(e,t){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:Uh,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=ti.createServer((i,n)=>{let r=ti.STATUS_CODES[426];n.writeHead(426,{"Content-Length":r.length,"Content-Type":"text/plain"}),n.end(r)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){let i=this.emit.bind(this,"connection");this._removeListeners=$h(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(n,r,a)=>{this.handleUpgrade(n,r,a,i)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=Oc}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===Pc){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(ss,this);return}if(e&&this.once("close",e),this._state!==Rc)if(this._state=Rc,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(ss,this):process.nextTick(ss,this);else{let t=this._server;this._removeListeners(),this._removeListeners=this._server=null,t.close(()=>{ss(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf("?");if((t!==-1?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,i,n){t.on("error",Ac);let r=e.headers["sec-websocket-key"],a=e.headers.upgrade,o=+e.headers["sec-websocket-version"];if(e.method!=="GET"){Ze(this,e,t,405,"Invalid HTTP method");return}if(a===void 0||a.toLowerCase()!=="websocket"){Ze(this,e,t,400,"Invalid Upgrade header");return}if(r===void 0||!Wh.test(r)){Ze(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");return}if(o!==13&&o!==8){Ze(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(e)){is(t,400);return}let c=e.headers["sec-websocket-protocol"],l=new Set;if(c!==void 0)try{l=Fh.parse(c)}catch{Ze(this,e,t,400,"Invalid Sec-WebSocket-Protocol header");return}let p=e.headers["sec-websocket-extensions"],u={};if(this.options.perMessageDeflate&&p!==void 0){let d=new Qe(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let h=Tc.parse(p);h[Qe.extensionName]&&(d.accept(h[Qe.extensionName]),u[Qe.extensionName]=d)}catch{Ze(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let d={origin:e.headers[`${o===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(d,(h,m,f,x)=>{if(!h)return is(t,m||401,f,x);this.completeUpgrade(u,r,l,e,t,i,n)});return}if(!this.options.verifyClient(d))return is(t,401)}this.completeUpgrade(u,r,l,e,t,i,n)}completeUpgrade(e,t,i,n,r,a,o){if(!r.readable||!r.writable)return r.destroy();if(r[zh])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>Oc)return is(r,503);let l=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${qh("sha1").update(t+Hh).digest("base64")}`],p=new this.options.WebSocket(null,void 0,this.options);if(i.size){let u=this.options.handleProtocols?this.options.handleProtocols(i,n):i.values().next().value;u&&(l.push(`Sec-WebSocket-Protocol: ${u}`),p._protocol=u)}if(e[Qe.extensionName]){let u=e[Qe.extensionName].params,d=Tc.format({[Qe.extensionName]:[u]});l.push(`Sec-WebSocket-Extensions: ${d}`),p._extensions=e}this.emit("headers",l,n),r.write(l.concat(`\r
|
|
4
|
+
`+r),s.push(n+"m+"+Ds.exports.humanize(this.diff)+"\x1B[0m")}else s[0]=Wf()+e+" "+s[0]}function Wf(){return I.inspectOpts.hideDate?"":new Date().toISOString()+" "}function $f(...s){return process.stderr.write(Bs.formatWithOptions(I.inspectOpts,...s)+`
|
|
5
|
+
`)}function Vf(s){s?process.env.DEBUG=s:delete process.env.DEBUG}function Gf(){return process.env.DEBUG}function Kf(s){s.inspectOpts={};let e=Object.keys(I.inspectOpts);for(let t=0;t<e.length;t++)s.inspectOpts[e[t]]=I.inspectOpts[e[t]]}Ds.exports=on()(I);var{formatters:bo}=Ds.exports;bo.o=function(s){return this.inspectOpts.colors=this.useColors,Bs.inspect(s,this.inspectOpts).split(`
|
|
6
|
+
`).map(e=>e.trim()).join(" ")};bo.O=function(s){return this.inspectOpts.colors=this.useColors,Bs.inspect(s,this.inspectOpts)}});var M=g((jb,un)=>{typeof process>"u"||process.type==="renderer"||process.browser===!0||process.__nwjs?un.exports=mo():un.exports=yo()});var Ke=g(Is=>{"use strict";Object.defineProperty(Is,"__esModule",{value:!0});Is.Transport=void 0;var Yf=require("events"),Xf=Yt(),Jf=lo(),Qf=M(),wo=(0,Qf.default)("engine:transport");function Zf(){}var Ns=class extends Yf.EventEmitter{get readyState(){return this._readyState}set readyState(e){wo("readyState updated from %s to %s (%s)",this._readyState,e,this.name),this._readyState=e}constructor(e){super(),this.writable=!1,this._readyState="open",this.discarded=!1,this.protocol=e._query.EIO==="4"?4:3,this.parser=this.protocol===4?Xf:Jf,this.supportsBinary=!(e._query&&e._query.b64)}discard(){this.discarded=!0}onRequest(e){}close(e){this.readyState==="closed"||this.readyState==="closing"||(this.readyState="closing",this.doClose(e||Zf))}onError(e,t){if(this.listeners("error").length){let i=new Error(e);i.type="TransportError",i.description=t,this.emit("error",i)}else wo("ignored transport error %s (%s)",e,t)}onPacket(e){this.emit("packet",e)}onData(e){this.onPacket(this.parser.decodePacket(e))}onClose(){this.readyState="closed",this.emit("close")}};Is.Transport=Ns;Ns.upgradesTo=[]});var fn=g(Ls=>{"use strict";Object.defineProperty(Ls,"__esModule",{value:!0});Ls.Polling=void 0;var em=Ke(),_o=require("zlib"),tm=Es(),sm=M(),ee=(0,sm.default)("engine:polling"),im={gzip:_o.createGzip,deflate:_o.createDeflate},dn=class extends em.Transport{constructor(e){super(e),this.closeTimeout=30*1e3}get name(){return"polling"}onRequest(e){let t=e.res;e.res=null,e.method==="GET"?this.onPollRequest(e,t):e.method==="POST"?this.onDataRequest(e,t):(t.writeHead(500),t.end())}onPollRequest(e,t){if(this.req){ee("request overlap"),this.onError("overlap from client"),t.writeHead(400),t.end();return}ee("setting request"),this.req=e,this.res=t;let i=()=>{this.onError("poll connection closed prematurely")},n=()=>{e.removeListener("close",i),this.req=this.res=null};e.cleanup=n,e.on("close",i),this.writable=!0,this.emit("ready"),this.writable&&this.shouldClose&&(ee("triggering empty send to append close packet"),this.send([{type:"noop"}]))}onDataRequest(e,t){if(this.dataReq){this.onError("data request overlap from client"),t.writeHead(400),t.end();return}let i=e.headers["content-type"]==="application/octet-stream";if(i&&this.protocol===4)return this.onError("invalid content");this.dataReq=e,this.dataRes=t;let n=i?Buffer.concat([]):"",r=()=>{e.removeListener("data",o),e.removeListener("end",c),e.removeListener("close",a),this.dataReq=this.dataRes=n=null},a=()=>{r(),this.onError("data request connection closed prematurely")},o=l=>{let p;i?(n=Buffer.concat([n,l]),p=n.length):(n+=l,p=Buffer.byteLength(n)),p>this.maxHttpBufferSize&&(t.writeHead(413).end(),r())},c=()=>{this.onData(n);let l={"Content-Type":"text/html","Content-Length":"2"};t.writeHead(200,this.headers(e,l)),t.end("ok"),r()};e.on("close",a),i||e.setEncoding("utf8"),e.on("data",o),e.on("end",c)}onData(e){ee('received "%s"',e);let t=i=>{if(i.type==="close")return ee("got xhr close packet"),this.onClose(),!1;this.onPacket(i)};this.protocol===3?this.parser.decodePayload(e,t):this.parser.decodePayload(e).forEach(t)}onClose(){this.writable&&this.send([{type:"noop"}]),super.onClose()}send(e){this.writable=!1,this.shouldClose&&(ee("appending close packet to payload"),e.push({type:"close"}),this.shouldClose(),this.shouldClose=null);let t=i=>{let n=e.some(r=>r.options&&r.options.compress);this.write(i,{compress:n})};this.protocol===3?this.parser.encodePayload(e,this.supportsBinary,t):this.parser.encodePayload(e,t)}write(e,t){ee('writing "%s"',e),this.doWrite(e,t,()=>{this.req.cleanup(),this.emit("drain")})}doWrite(e,t,i){let n=typeof e=="string",a={"Content-Type":n?"text/plain; charset=UTF-8":"application/octet-stream"},o=p=>{a["Content-Length"]=typeof p=="string"?Buffer.byteLength(p):p.length,this.res.writeHead(200,this.headers(this.req,a)),this.res.end(p),i()};if(!this.httpCompression||!t.compress){o(e);return}if((n?Buffer.byteLength(e):e.length)<this.httpCompression.threshold){o(e);return}let l=tm(this.req).encodings(["gzip","deflate"]);if(!l){o(e);return}this.compress(e,l,(p,u)=>{if(p){this.res.writeHead(500),this.res.end(),i(p);return}a["Content-Encoding"]=l,o(u)})}compress(e,t,i){ee("compressing");let n=[],r=0;im[t](this.httpCompression).on("error",i).on("data",function(a){n.push(a),r+=a.length}).on("end",function(){i(null,Buffer.concat(n,r))}).end(e)}doClose(e){ee("closing");let t;this.dataReq&&(ee("aborting ongoing data request"),this.dataReq.destroy());let i=()=>{clearTimeout(t),e(),this.onClose()};this.writable?(ee("transport writable - closing right away"),this.send([{type:"close"}]),i()):this.discarded?(ee("transport discarded - closing right away"),i()):(ee("transport not writable - buffering orderly close"),this.shouldClose=i,t=setTimeout(i,this.closeTimeout))}headers(e,t={}){let i=e.headers["user-agent"];return i&&(~i.indexOf(";MSIE")||~i.indexOf("Trident/"))&&(t["X-XSS-Protection"]="0"),t["cache-control"]="no-store",this.emit("headers",t,e),t}};Ls.Polling=dn});var So=g(Fs=>{"use strict";Object.defineProperty(Fs,"__esModule",{value:!0});Fs.JSONP=void 0;var nm=fn(),rm=require("querystring"),am=/\\\\n/g,om=/(\\)?\\n/g,mn=class extends nm.Polling{constructor(e){super(e),this.head="___eio["+(e._query.j||"").replace(/[^0-9]/g,"")+"](",this.foot=");"}onData(e){e=rm.parse(e).d,typeof e=="string"&&(e=e.replace(om,function(t,i){return i?t:`
|
|
7
|
+
`}),super.onData(e.replace(am,"\\n")))}doWrite(e,t,i){let n=JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029");e=this.head+n+this.foot,super.doWrite(e,t,i)}};Fs.JSONP=mn});var ko=g(qs=>{"use strict";Object.defineProperty(qs,"__esModule",{value:!0});qs.WebSocket=void 0;var cm=Ke(),lm=M(),Eo=(0,lm.default)("engine:ws"),hn=class extends cm.Transport{constructor(e){super(e),this._doSend=t=>{this.socket.send(t,this._onSent)},this._doSendLast=t=>{this.socket.send(t,this._onSentLast)},this._onSent=t=>{t&&this.onError("write error",t.stack)},this._onSentLast=t=>{t?this.onError("write error",t.stack):(this.emit("drain"),this.writable=!0,this.emit("ready"))},this.socket=e.websocket,this.socket.on("message",(t,i)=>{let n=i?t:t.toString();Eo('received "%s"',n),super.onData(n)}),this.socket.once("close",this.onClose.bind(this)),this.socket.on("error",this.onError.bind(this)),this.writable=!0,this.perMessageDeflate=null}get name(){return"websocket"}get handlesUpgrades(){return!0}send(e){this.writable=!1;for(let t=0;t<e.length;t++){let i=e[t],n=t+1===e.length;this._canSendPreEncodedFrame(i)?this.socket._sender.sendFrame(i.options.wsPreEncodedFrame,n?this._onSentLast:this._onSent):this.parser.encodePacket(i,this.supportsBinary,n?this._doSendLast:this._doSend)}}_canSendPreEncodedFrame(e){var t,i,n;return!this.perMessageDeflate&&typeof((i=(t=this.socket)===null||t===void 0?void 0:t._sender)===null||i===void 0?void 0:i.sendFrame)=="function"&&((n=e.options)===null||n===void 0?void 0:n.wsPreEncodedFrame)!==void 0}doClose(e){Eo("closing"),this.socket.close(),e&&e()}};qs.WebSocket=hn});var xn=g(Us=>{"use strict";Object.defineProperty(Us,"__esModule",{value:!0});Us.WebTransport=void 0;var pm=Ke(),um=M(),dm=Yt(),mt=(0,um.default)("engine:webtransport"),gn=class extends pm.Transport{constructor(e,t,i){super({_query:{EIO:"4"}}),this.session=e;let n=(0,dm.createPacketEncoderStream)();n.readable.pipeTo(t.writable).catch(()=>{mt("the stream was closed")}),this.writer=n.writable.getWriter(),(async()=>{try{for(;;){let{value:r,done:a}=await i.read();if(a){mt("session is closed");break}mt("received chunk: %o",r),this.onPacket(r)}}catch(r){mt("error while reading: %s",r.message)}})(),e.closed.then(()=>this.onClose()),this.writable=!0}get name(){return"webtransport"}async send(e){this.writable=!1;try{for(let t=0;t<e.length;t++){let i=e[t];await this.writer.write(i)}}catch(t){mt("error while writing: %s",t.message)}this.emit("drain"),this.writable=!0,this.emit("ready")}doClose(e){mt("closing WebTransport session"),this.session.close(),e&&e()}};Us.WebTransport=gn});var bn=g(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});var fm=fn(),mm=So(),hm=ko(),gm=xn();vn.default={polling:Co,websocket:hm.WebSocket,webtransport:gm.WebTransport};function Co(s){return typeof s._query.j=="string"?new mm.JSONP(s):new fm.Polling(s)}Co.upgradesTo=["websocket","webtransport"]});var wn=g(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});Hs.Socket=void 0;var xm=require("events"),vm=M(),ke=require("timers"),P=(0,vm.default)("engine:socket"),yn=class extends xm.EventEmitter{get readyState(){return this._readyState}set readyState(e){P("readyState updated from %s to %s",this._readyState,e),this._readyState=e}constructor(e,t,i,n,r){super(),this._readyState="opening",this.upgrading=!1,this.upgraded=!1,this.writeBuffer=[],this.packetsFn=[],this.sentCallbackFn=[],this.cleanupFn=[],this.id=e,this.server=t,this.request=n,this.protocol=r,n&&(n.websocket&&n.websocket._socket?this.remoteAddress=n.websocket._socket.remoteAddress:this.remoteAddress=n.connection.remoteAddress),this.pingTimeoutTimer=null,this.pingIntervalTimer=null,this.setTransport(i),this.onOpen()}onOpen(){this.readyState="open",this.transport.sid=this.id,this.sendPacket("open",JSON.stringify({sid:this.id,upgrades:this.getAvailableUpgrades(),pingInterval:this.server.opts.pingInterval,pingTimeout:this.server.opts.pingTimeout,maxPayload:this.server.opts.maxHttpBufferSize})),this.server.opts.initialPacket&&this.sendPacket("message",this.server.opts.initialPacket),this.emit("open"),this.protocol===3?this.resetPingTimeout():this.schedulePing()}onPacket(e){if(this.readyState!=="open")return P("packet received with closed socket");switch(P(`received packet ${e.type}`),this.emit("packet",e),e.type){case"ping":if(this.transport.protocol!==3){this.onError(new Error("invalid heartbeat direction"));return}P("got ping"),this.pingTimeoutTimer.refresh(),this.sendPacket("pong"),this.emit("heartbeat");break;case"pong":if(this.transport.protocol===3){this.onError(new Error("invalid heartbeat direction"));return}P("got pong"),(0,ke.clearTimeout)(this.pingTimeoutTimer),this.pingIntervalTimer.refresh(),this.emit("heartbeat");break;case"error":this.onClose("parse error");break;case"message":this.emit("data",e.data),this.emit("message",e.data);break}}onError(e){P("transport error"),this.onClose("transport error",e)}schedulePing(){this.pingIntervalTimer=(0,ke.setTimeout)(()=>{P("writing ping packet - expecting pong within %sms",this.server.opts.pingTimeout),this.sendPacket("ping"),this.resetPingTimeout()},this.server.opts.pingInterval)}resetPingTimeout(){(0,ke.clearTimeout)(this.pingTimeoutTimer),this.pingTimeoutTimer=(0,ke.setTimeout)(()=>{this.readyState!=="closed"&&this.onClose("ping timeout")},this.protocol===3?this.server.opts.pingInterval+this.server.opts.pingTimeout:this.server.opts.pingTimeout)}setTransport(e){let t=this.onError.bind(this),i=()=>this.flush(),n=this.onPacket.bind(this),r=this.onDrain.bind(this),a=this.onClose.bind(this,"transport close");this.transport=e,this.transport.once("error",t),this.transport.on("ready",i),this.transport.on("packet",n),this.transport.on("drain",r),this.transport.once("close",a),this.cleanupFn.push(function(){e.removeListener("error",t),e.removeListener("ready",i),e.removeListener("packet",n),e.removeListener("drain",r),e.removeListener("close",a)})}onDrain(){if(this.sentCallbackFn.length>0){P("executing batch send callback");let e=this.sentCallbackFn.shift();if(e)for(let t=0;t<e.length;t++)e[t](this.transport)}}_maybeUpgrade(e){P('might upgrade socket transport from "%s" to "%s"',this.transport.name,e.name),this.upgrading=!0;let t=(0,ke.setTimeout)(()=>{P("client did not complete upgrade - closing transport"),a(),e.readyState==="open"&&e.close()},this.server.opts.upgradeTimeout),i,n=p=>{p.type==="ping"&&p.data==="probe"?(P("got probe ping packet, sending pong"),e.send([{type:"pong",data:"probe"}]),this.emit("upgrading",e),clearInterval(i),i=setInterval(r,100)):p.type==="upgrade"&&this.readyState!=="closed"?(P("got upgrade packet - upgrading"),a(),this.transport.discard(),this.upgraded=!0,this.clearTransport(),this.setTransport(e),this.emit("upgrade",e),this.flush(),this.readyState==="closing"&&e.close(()=>{this.onClose("forced close")})):(a(),e.close())},r=()=>{this.transport.name==="polling"&&this.transport.writable&&(P("writing a noop packet to polling for fast upgrade"),this.transport.send([{type:"noop"}]))},a=()=>{this.upgrading=!1,clearInterval(i),(0,ke.clearTimeout)(t),e.removeListener("packet",n),e.removeListener("close",c),e.removeListener("error",o),this.removeListener("close",l)},o=p=>{P("client did not complete upgrade - %s",p),a(),e.close(),e=null},c=()=>{o("transport closed")},l=()=>{o("socket closed")};e.on("packet",n),e.once("close",c),e.once("error",o),this.once("close",l)}clearTransport(){let e,t=this.cleanupFn.length;for(let i=0;i<t;i++)e=this.cleanupFn.shift(),e();this.transport.on("error",function(){P("error triggered by discarded transport")}),this.transport.close(),(0,ke.clearTimeout)(this.pingTimeoutTimer)}onClose(e,t){this.readyState!=="closed"&&(this.readyState="closed",(0,ke.clearTimeout)(this.pingIntervalTimer),(0,ke.clearTimeout)(this.pingTimeoutTimer),process.nextTick(()=>{this.writeBuffer=[]}),this.packetsFn=[],this.sentCallbackFn=[],this.clearTransport(),this.emit("close",e,t))}send(e,t,i){return this.sendPacket("message",e,t,i),this}write(e,t,i){return this.sendPacket("message",e,t,i),this}sendPacket(e,t,i={},n){if(typeof i=="function"&&(n=i,i={}),this.readyState!=="closing"&&this.readyState!=="closed"){P('sending packet "%s" (%s)',e,t),i.compress=i.compress!==!1;let r={type:e,options:i};t&&(r.data=t),this.emit("packetCreate",r),this.writeBuffer.push(r),typeof n=="function"&&this.packetsFn.push(n),this.flush()}}flush(){if(this.readyState!=="closed"&&this.transport.writable&&this.writeBuffer.length){P("flushing buffer to transport"),this.emit("flush",this.writeBuffer),this.server.emit("flush",this,this.writeBuffer);let e=this.writeBuffer;this.writeBuffer=[],this.packetsFn.length?(this.sentCallbackFn.push(this.packetsFn),this.packetsFn=[]):this.sentCallbackFn.push(null),this.transport.send(e),this.emit("drain"),this.server.emit("drain",this)}}getAvailableUpgrades(){let e=[],t=this.server.upgrades(this.transport.name);for(let i=0;i<t.length;++i){let n=t[i];this.server.opts.transports.indexOf(n)!==-1&&e.push(n)}return e}close(e){if(e&&(this.readyState==="open"||this.readyState==="closing"))return this.closeTransport(e);if(this.readyState==="open"){if(this.readyState="closing",this.writeBuffer.length){P("there are %d remaining packets in the buffer, waiting for the 'drain' event",this.writeBuffer.length),this.once("drain",()=>{P("all packets have been sent, closing the transport"),this.closeTransport(e)});return}P("the buffer is empty, closing the transport right away"),this.closeTransport(e)}}closeTransport(e){P("closing the transport (discard? %s)",!!e),e&&this.transport.discard(),this.transport.close(this.onClose.bind(this,"forced close"))}};Hs.Socket=yn});var Ro=g(_n=>{"use strict";_n.parse=km;_n.serialize=Cm;var bm=Object.prototype.toString,ym=Object.prototype.hasOwnProperty,wm=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,_m=/^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/,Sm=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,Em=/^[\u0020-\u003A\u003D-\u007E]*$/;function km(s,e){if(typeof s!="string")throw new TypeError("argument str must be a string");var t={},i=s.length;if(i<2)return t;var n=e&&e.decode||Tm,r=0,a=0,o=0;do{if(a=s.indexOf("=",r),a===-1)break;if(o=s.indexOf(";",r),o===-1)o=i;else if(a>o){r=s.lastIndexOf(";",a-1)+1;continue}var c=To(s,r,a),l=Oo(s,a,c),p=s.slice(c,l);if(!ym.call(t,p)){var u=To(s,a+1,o),d=Oo(s,o,u);s.charCodeAt(u)===34&&s.charCodeAt(d-1)===34&&(u++,d--);var h=s.slice(u,d);t[p]=Rm(h,n)}r=o+1}while(r<i);return t}function To(s,e,t){do{var i=s.charCodeAt(e);if(i!==32&&i!==9)return e}while(++e<t);return t}function Oo(s,e,t){for(;e>t;){var i=s.charCodeAt(--e);if(i!==32&&i!==9)return e+1}return t}function Cm(s,e,t){var i=t&&t.encode||encodeURIComponent;if(typeof i!="function")throw new TypeError("option encode is invalid");if(!wm.test(s))throw new TypeError("argument name is invalid");var n=i(e);if(!_m.test(n))throw new TypeError("argument val is invalid");var r=s+"="+n;if(!t)return r;if(t.maxAge!=null){var a=Math.floor(t.maxAge);if(!isFinite(a))throw new TypeError("option maxAge is invalid");r+="; Max-Age="+a}if(t.domain){if(!Sm.test(t.domain))throw new TypeError("option domain is invalid");r+="; Domain="+t.domain}if(t.path){if(!Em.test(t.path))throw new TypeError("option path is invalid");r+="; Path="+t.path}if(t.expires){var o=t.expires;if(!Om(o)||isNaN(o.valueOf()))throw new TypeError("option expires is invalid");r+="; Expires="+o.toUTCString()}if(t.httpOnly&&(r+="; HttpOnly"),t.secure&&(r+="; Secure"),t.partitioned&&(r+="; Partitioned"),t.priority){var c=typeof t.priority=="string"?t.priority.toLowerCase():t.priority;switch(c){case"low":r+="; Priority=Low";break;case"medium":r+="; Priority=Medium";break;case"high":r+="; Priority=High";break;default:throw new TypeError("option priority is invalid")}}if(t.sameSite){var l=typeof t.sameSite=="string"?t.sameSite.toLowerCase():t.sameSite;switch(l){case!0:r+="; SameSite=Strict";break;case"lax":r+="; SameSite=Lax";break;case"strict":r+="; SameSite=Strict";break;case"none":r+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return r}function Tm(s){return s.indexOf("%")!==-1?decodeURIComponent(s):s}function Om(s){return bm.call(s)==="[object Date]"}function Rm(s,e){try{return e(s)}catch{return s}}});var Ce=g((Ub,jo)=>{"use strict";var Ao=["nodebuffer","arraybuffer","fragments"],Po=typeof Blob<"u";Po&&Ao.push("blob");jo.exports={BINARY_TYPES:Ao,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:Po,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}});var Xt=g((Hb,zs)=>{"use strict";var{EMPTY_BUFFER:Am}=Ce(),Sn=Buffer[Symbol.species];function Pm(s,e){if(s.length===0)return Am;if(s.length===1)return s[0];let t=Buffer.allocUnsafe(e),i=0;for(let n=0;n<s.length;n++){let r=s[n];t.set(r,i),i+=r.length}return i<e?new Sn(t.buffer,t.byteOffset,i):t}function Mo(s,e,t,i,n){for(let r=0;r<n;r++)t[i+r]=s[r]^e[r&3]}function Bo(s,e){for(let t=0;t<s.length;t++)s[t]^=e[t&3]}function jm(s){return s.length===s.buffer.byteLength?s.buffer:s.buffer.slice(s.byteOffset,s.byteOffset+s.length)}function En(s){if(En.readOnly=!0,Buffer.isBuffer(s))return s;let e;return s instanceof ArrayBuffer?e=new Sn(s):ArrayBuffer.isView(s)?e=new Sn(s.buffer,s.byteOffset,s.byteLength):(e=Buffer.from(s),En.readOnly=!1),e}zs.exports={concat:Pm,mask:Mo,toArrayBuffer:jm,toBuffer:En,unmask:Bo};if(!process.env.WS_NO_BUFFER_UTIL)try{let s=require("bufferutil");zs.exports.mask=function(e,t,i,n,r){r<48?Mo(e,t,i,n,r):s.mask(e,t,i,n,r)},zs.exports.unmask=function(e,t){e.length<32?Bo(e,t):s.unmask(e,t)}}catch{}});var Io=g((zb,No)=>{"use strict";var Do=Symbol("kDone"),kn=Symbol("kRun"),Cn=class{constructor(e){this[Do]=()=>{this.pending--,this[kn]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[kn]()}[kn](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[Do])}}};No.exports=Cn});var Qt=g((Wb,Uo)=>{"use strict";var Jt=require("zlib"),Lo=Xt(),Mm=Io(),{kStatusCode:Fo}=Ce(),Bm=Buffer[Symbol.species],Dm=Buffer.from([0,0,255,255]),$s=Symbol("permessage-deflate"),Te=Symbol("total-length"),ht=Symbol("callback"),Fe=Symbol("buffers"),gt=Symbol("error"),Ws,Tn=class{constructor(e,t,i){if(this._maxPayload=i|0,this._options=e||{},this._threshold=this._options.threshold!==void 0?this._options.threshold:1024,this._isServer=!!t,this._deflate=null,this._inflate=null,this.params=null,!Ws){let n=this._options.concurrencyLimit!==void 0?this._options.concurrencyLimit:10;Ws=new Mm(n)}}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:this._options.clientMaxWindowBits==null&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[ht];this._deflate.close(),this._deflate=null,e&&e(new Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let t=this._options,i=e.find(n=>!(t.serverNoContextTakeover===!1&&n.server_no_context_takeover||n.server_max_window_bits&&(t.serverMaxWindowBits===!1||typeof t.serverMaxWindowBits=="number"&&t.serverMaxWindowBits>n.server_max_window_bits)||typeof t.clientMaxWindowBits=="number"&&!n.client_max_window_bits));if(!i)throw new Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(i.server_no_context_takeover=!0),t.clientNoContextTakeover&&(i.client_no_context_takeover=!0),typeof t.serverMaxWindowBits=="number"&&(i.server_max_window_bits=t.serverMaxWindowBits),typeof t.clientMaxWindowBits=="number"?i.client_max_window_bits=t.clientMaxWindowBits:(i.client_max_window_bits===!0||t.clientMaxWindowBits===!1)&&delete i.client_max_window_bits,i}acceptAsClient(e){let t=e[0];if(this._options.clientNoContextTakeover===!1&&t.client_no_context_takeover)throw new Error('Unexpected parameter "client_no_context_takeover"');if(!t.client_max_window_bits)typeof this._options.clientMaxWindowBits=="number"&&(t.client_max_window_bits=this._options.clientMaxWindowBits);else if(this._options.clientMaxWindowBits===!1||typeof this._options.clientMaxWindowBits=="number"&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw new Error('Unexpected or invalid parameter "client_max_window_bits"');return t}normalizeParams(e){return e.forEach(t=>{Object.keys(t).forEach(i=>{let n=t[i];if(n.length>1)throw new Error(`Parameter "${i}" must have only a single value`);if(n=n[0],i==="client_max_window_bits"){if(n!==!0){let r=+n;if(!Number.isInteger(r)||r<8||r>15)throw new TypeError(`Invalid value for parameter "${i}": ${n}`);n=r}else if(!this._isServer)throw new TypeError(`Invalid value for parameter "${i}": ${n}`)}else if(i==="server_max_window_bits"){let r=+n;if(!Number.isInteger(r)||r<8||r>15)throw new TypeError(`Invalid value for parameter "${i}": ${n}`);n=r}else if(i==="client_no_context_takeover"||i==="server_no_context_takeover"){if(n!==!0)throw new TypeError(`Invalid value for parameter "${i}": ${n}`)}else throw new Error(`Unknown parameter "${i}"`);t[i]=n})}),e}decompress(e,t,i){Ws.add(n=>{this._decompress(e,t,(r,a)=>{n(),i(r,a)})})}compress(e,t,i){Ws.add(n=>{this._compress(e,t,(r,a)=>{n(),i(r,a)})})}_decompress(e,t,i){let n=this._isServer?"client":"server";if(!this._inflate){let r=`${n}_max_window_bits`,a=typeof this.params[r]!="number"?Jt.Z_DEFAULT_WINDOWBITS:this.params[r];this._inflate=Jt.createInflateRaw({...this._options.zlibInflateOptions,windowBits:a}),this._inflate[$s]=this,this._inflate[Te]=0,this._inflate[Fe]=[],this._inflate.on("error",Im),this._inflate.on("data",qo)}this._inflate[ht]=i,this._inflate.write(e),t&&this._inflate.write(Dm),this._inflate.flush(()=>{let r=this._inflate[gt];if(r){this._inflate.close(),this._inflate=null,i(r);return}let a=Lo.concat(this._inflate[Fe],this._inflate[Te]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[Te]=0,this._inflate[Fe]=[],t&&this.params[`${n}_no_context_takeover`]&&this._inflate.reset()),i(null,a)})}_compress(e,t,i){let n=this._isServer?"server":"client";if(!this._deflate){let r=`${n}_max_window_bits`,a=typeof this.params[r]!="number"?Jt.Z_DEFAULT_WINDOWBITS:this.params[r];this._deflate=Jt.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:a}),this._deflate[Te]=0,this._deflate[Fe]=[],this._deflate.on("data",Nm)}this._deflate[ht]=i,this._deflate.write(e),this._deflate.flush(Jt.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let r=Lo.concat(this._deflate[Fe],this._deflate[Te]);t&&(r=new Bm(r.buffer,r.byteOffset,r.length-4)),this._deflate[ht]=null,this._deflate[Te]=0,this._deflate[Fe]=[],t&&this.params[`${n}_no_context_takeover`]&&this._deflate.reset(),i(null,r)})}};Uo.exports=Tn;function Nm(s){this[Fe].push(s),this[Te]+=s.length}function qo(s){if(this[Te]+=s.length,this[$s]._maxPayload<1||this[Te]<=this[$s]._maxPayload){this[Fe].push(s);return}this[gt]=new RangeError("Max payload size exceeded"),this[gt].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[gt][Fo]=1009,this.removeListener("data",qo),this.reset()}function Im(s){if(this[$s]._inflate=null,this[gt]){this[ht](this[gt]);return}s[Fo]=1007,this[ht](s)}});var xt=g(($b,Vs)=>{"use strict";var{isUtf8:Ho}=require("buffer"),{hasBlob:Lm}=Ce(),Fm=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0];function qm(s){return s>=1e3&&s<=1014&&s!==1004&&s!==1005&&s!==1006||s>=3e3&&s<=4999}function On(s){let e=s.length,t=0;for(;t<e;)if((s[t]&128)===0)t++;else if((s[t]&224)===192){if(t+1===e||(s[t+1]&192)!==128||(s[t]&254)===192)return!1;t+=2}else if((s[t]&240)===224){if(t+2>=e||(s[t+1]&192)!==128||(s[t+2]&192)!==128||s[t]===224&&(s[t+1]&224)===128||s[t]===237&&(s[t+1]&224)===160)return!1;t+=3}else if((s[t]&248)===240){if(t+3>=e||(s[t+1]&192)!==128||(s[t+2]&192)!==128||(s[t+3]&192)!==128||s[t]===240&&(s[t+1]&240)===128||s[t]===244&&s[t+1]>143||s[t]>244)return!1;t+=4}else return!1;return!0}function Um(s){return Lm&&typeof s=="object"&&typeof s.arrayBuffer=="function"&&typeof s.type=="string"&&typeof s.stream=="function"&&(s[Symbol.toStringTag]==="Blob"||s[Symbol.toStringTag]==="File")}Vs.exports={isBlob:Um,isValidStatusCode:qm,isValidUTF8:On,tokenChars:Fm};if(Ho)Vs.exports.isValidUTF8=function(s){return s.length<24?On(s):Ho(s)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let s=require("utf-8-validate");Vs.exports.isValidUTF8=function(e){return e.length<32?On(e):s(e)}}catch{}});var Mn=g((Vb,Yo)=>{"use strict";var{Writable:Hm}=require("stream"),zo=Qt(),{BINARY_TYPES:zm,EMPTY_BUFFER:Wo,kStatusCode:Wm,kWebSocket:$m}=Ce(),{concat:Rn,toArrayBuffer:Vm,unmask:Gm}=Xt(),{isValidStatusCode:Km,isValidUTF8:$o}=xt(),Gs=Buffer[Symbol.species],ne=0,Vo=1,Go=2,Ko=3,An=4,Pn=5,Ks=6,jn=class extends Hm{constructor(e={}){super(),this._allowSynchronousEvents=e.allowSynchronousEvents!==void 0?e.allowSynchronousEvents:!0,this._binaryType=e.binaryType||zm[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=e.maxPayload|0,this._skipUTF8Validation=!!e.skipUTF8Validation,this[$m]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=ne}_write(e,t,i){if(this._opcode===8&&this._state==ne)return i();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(i)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let i=this._buffers[0];return this._buffers[0]=new Gs(i.buffer,i.byteOffset+e,i.length-e),new Gs(i.buffer,i.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let i=this._buffers[0],n=t.length-e;e>=i.length?t.set(this._buffers.shift(),n):(t.set(new Uint8Array(i.buffer,i.byteOffset,e),n),this._buffers[0]=new Gs(i.buffer,i.byteOffset+e,i.length-e)),e-=i.length}while(e>0);return t}startLoop(e){this._loop=!0;do switch(this._state){case ne:this.getInfo(e);break;case Vo:this.getPayloadLength16(e);break;case Go:this.getPayloadLength64(e);break;case Ko:this.getMask();break;case An:this.getData(e);break;case Pn:case Ks:this._loop=!1;return}while(this._loop);this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if((t[0]&48)!==0){let n=this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3");e(n);return}let i=(t[0]&64)===64;if(i&&!this._extensions[zo.extensionName]){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(this._fin=(t[0]&128)===128,this._opcode=t[0]&15,this._payloadLength=t[1]&127,this._opcode===0){if(i){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(!this._fragmented){let n=this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}this._opcode=this._fragmented}else if(this._opcode===1||this._opcode===2){if(this._fragmented){let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}this._compressed=i}else if(this._opcode>7&&this._opcode<11){if(!this._fin){let n=this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN");e(n);return}if(i){let n=this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1");e(n);return}if(this._payloadLength>125||this._opcode===8&&this._payloadLength===1){let n=this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH");e(n);return}}else{let n=this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE");e(n);return}if(!this._fin&&!this._fragmented&&(this._fragmented=this._opcode),this._masked=(t[1]&128)===128,this._isServer){if(!this._masked){let n=this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK");e(n);return}}else if(this._masked){let n=this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK");e(n);return}this._payloadLength===126?this._state=Vo:this._payloadLength===127?this._state=Go:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),i=t.readUInt32BE(0);if(i>Math.pow(2,21)-1){let n=this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH");e(n);return}this._payloadLength=i*Math.pow(2,32)+t.readUInt32BE(4),this.haveLength(e)}haveLength(e){if(this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)){let t=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");e(t);return}this._masked?this._state=Ko:this._state=An}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=An}getData(e){let t=Wo;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!==0&&Gm(t,this._mask)}if(this._opcode>7){this.controlMessage(t,e);return}if(this._compressed){this._state=Pn,this.decompress(t,e);return}t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}decompress(e,t){this._extensions[zo.extensionName].decompress(e,this._fin,(n,r)=>{if(n)return t(n);if(r.length){if(this._messageLength+=r.length,this._messageLength>this._maxPayload&&this._maxPayload>0){let a=this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH");t(a);return}this._fragments.push(r)}this.dataMessage(t),this._state===ne&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=ne;return}let t=this._messageLength,i=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],this._opcode===2){let n;this._binaryType==="nodebuffer"?n=Rn(i,t):this._binaryType==="arraybuffer"?n=Vm(Rn(i,t)):this._binaryType==="blob"?n=new Blob(i):n=i,this._allowSynchronousEvents?(this.emit("message",n,!0),this._state=ne):(this._state=Ks,setImmediate(()=>{this.emit("message",n,!0),this._state=ne,this.startLoop(e)}))}else{let n=Rn(i,t);if(!this._skipUTF8Validation&&!$o(n)){let r=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");e(r);return}this._state===Pn||this._allowSynchronousEvents?(this.emit("message",n,!1),this._state=ne):(this._state=Ks,setImmediate(()=>{this.emit("message",n,!1),this._state=ne,this.startLoop(e)}))}}controlMessage(e,t){if(this._opcode===8){if(e.length===0)this._loop=!1,this.emit("conclude",1005,Wo),this.end();else{let i=e.readUInt16BE(0);if(!Km(i)){let r=this.createError(RangeError,`invalid status code ${i}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE");t(r);return}let n=new Gs(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!$o(n)){let r=this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8");t(r);return}this._loop=!1,this.emit("conclude",i,n),this.end()}this._state=ne;return}this._allowSynchronousEvents?(this.emit(this._opcode===9?"ping":"pong",e),this._state=ne):(this._state=Ks,setImmediate(()=>{this.emit(this._opcode===9?"ping":"pong",e),this._state=ne,this.startLoop(t)}))}createError(e,t,i,n,r){this._loop=!1,this._errored=!0;let a=new e(i?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(a,this.createError),a.code=r,a[Wm]=n,a}};Yo.exports=jn});var Nn=g((Kb,Qo)=>{"use strict";var{Duplex:Gb}=require("stream"),{randomFillSync:Ym}=require("crypto"),Xo=Qt(),{EMPTY_BUFFER:Xm,kWebSocket:Jm,NOOP:Qm}=Ce(),{isBlob:vt,isValidStatusCode:Zm}=xt(),{mask:Jo,toBuffer:Ye}=Xt(),re=Symbol("kByteLength"),eh=Buffer.alloc(4),Ys=8*1024,Xe,bt=Ys,ue=0,th=1,sh=2,Bn=class s{constructor(e,t,i){this._extensions=t||{},i&&(this._generateMask=i,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=ue,this.onerror=Qm,this[Jm]=void 0}static frame(e,t){let i,n=!1,r=2,a=!1;t.mask&&(i=t.maskBuffer||eh,t.generateMask?t.generateMask(i):(bt===Ys&&(Xe===void 0&&(Xe=Buffer.alloc(Ys)),Ym(Xe,0,Ys),bt=0),i[0]=Xe[bt++],i[1]=Xe[bt++],i[2]=Xe[bt++],i[3]=Xe[bt++]),a=(i[0]|i[1]|i[2]|i[3])===0,r=6);let o;typeof e=="string"?(!t.mask||a)&&t[re]!==void 0?o=t[re]:(e=Buffer.from(e),o=e.length):(o=e.length,n=t.mask&&t.readOnly&&!a);let c=o;o>=65536?(r+=8,c=127):o>125&&(r+=2,c=126);let l=Buffer.allocUnsafe(n?o+r:r);return l[0]=t.fin?t.opcode|128:t.opcode,t.rsv1&&(l[0]|=64),l[1]=c,c===126?l.writeUInt16BE(o,2):c===127&&(l[2]=l[3]=0,l.writeUIntBE(o,4,6)),t.mask?(l[1]|=128,l[r-4]=i[0],l[r-3]=i[1],l[r-2]=i[2],l[r-1]=i[3],a?[l,e]:n?(Jo(e,i,l,r,o),[l]):(Jo(e,i,e,0,o),[l,e])):[l,e]}close(e,t,i,n){let r;if(e===void 0)r=Xm;else{if(typeof e!="number"||!Zm(e))throw new TypeError("First argument must be a valid error code number");if(t===void 0||!t.length)r=Buffer.allocUnsafe(2),r.writeUInt16BE(e,0);else{let o=Buffer.byteLength(t);if(o>123)throw new RangeError("The message must not be greater than 123 bytes");r=Buffer.allocUnsafe(2+o),r.writeUInt16BE(e,0),typeof t=="string"?r.write(t,2):r.set(t,2)}}let a={[re]:r.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==ue?this.enqueue([this.dispatch,r,!1,a,n]):this.sendFrame(s.frame(r,a),n)}ping(e,t,i){let n,r;if(typeof e=="string"?(n=Buffer.byteLength(e),r=!1):vt(e)?(n=e.size,r=!1):(e=Ye(e),n=e.length,r=Ye.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let a={[re]:n,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:r,rsv1:!1};vt(e)?this._state!==ue?this.enqueue([this.getBlobData,e,!1,a,i]):this.getBlobData(e,!1,a,i):this._state!==ue?this.enqueue([this.dispatch,e,!1,a,i]):this.sendFrame(s.frame(e,a),i)}pong(e,t,i){let n,r;if(typeof e=="string"?(n=Buffer.byteLength(e),r=!1):vt(e)?(n=e.size,r=!1):(e=Ye(e),n=e.length,r=Ye.readOnly),n>125)throw new RangeError("The data size must not be greater than 125 bytes");let a={[re]:n,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:r,rsv1:!1};vt(e)?this._state!==ue?this.enqueue([this.getBlobData,e,!1,a,i]):this.getBlobData(e,!1,a,i):this._state!==ue?this.enqueue([this.dispatch,e,!1,a,i]):this.sendFrame(s.frame(e,a),i)}send(e,t,i){let n=this._extensions[Xo.extensionName],r=t.binary?2:1,a=t.compress,o,c;typeof e=="string"?(o=Buffer.byteLength(e),c=!1):vt(e)?(o=e.size,c=!1):(e=Ye(e),o=e.length,c=Ye.readOnly),this._firstFragment?(this._firstFragment=!1,a&&n&&n.params[n._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(a=o>=n._threshold),this._compress=a):(a=!1,r=0),t.fin&&(this._firstFragment=!0);let l={[re]:o,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:r,readOnly:c,rsv1:a};vt(e)?this._state!==ue?this.enqueue([this.getBlobData,e,this._compress,l,i]):this.getBlobData(e,this._compress,l,i):this._state!==ue?this.enqueue([this.dispatch,e,this._compress,l,i]):this.dispatch(e,this._compress,l,i)}getBlobData(e,t,i,n){this._bufferedBytes+=i[re],this._state=sh,e.arrayBuffer().then(r=>{if(this._socket.destroyed){let o=new Error("The socket was closed while the blob was being read");process.nextTick(Dn,this,o,n);return}this._bufferedBytes-=i[re];let a=Ye(r);t?this.dispatch(a,t,i,n):(this._state=ue,this.sendFrame(s.frame(a,i),n),this.dequeue())}).catch(r=>{process.nextTick(ih,this,r,n)})}dispatch(e,t,i,n){if(!t){this.sendFrame(s.frame(e,i),n);return}let r=this._extensions[Xo.extensionName];this._bufferedBytes+=i[re],this._state=th,r.compress(e,i.fin,(a,o)=>{if(this._socket.destroyed){let c=new Error("The socket was closed while data was being compressed");Dn(this,c,n);return}this._bufferedBytes-=i[re],this._state=ue,i.readOnly=!1,this.sendFrame(s.frame(o,i),n),this.dequeue()})}dequeue(){for(;this._state===ue&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][re],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][re],this._queue.push(e)}sendFrame(e,t){e.length===2?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}};Qo.exports=Bn;function Dn(s,e,t){typeof t=="function"&&t(e);for(let i=0;i<s._queue.length;i++){let n=s._queue[i],r=n[n.length-1];typeof r=="function"&&r(e)}}function ih(s,e,t){Dn(s,e,t),s.onerror(e)}});var oc=g((Yb,ac)=>{"use strict";var{kForOnEventAttribute:Zt,kListener:In}=Ce(),Zo=Symbol("kCode"),ec=Symbol("kData"),tc=Symbol("kError"),sc=Symbol("kMessage"),ic=Symbol("kReason"),yt=Symbol("kTarget"),nc=Symbol("kType"),rc=Symbol("kWasClean"),Oe=class{constructor(e){this[yt]=null,this[nc]=e}get target(){return this[yt]}get type(){return this[nc]}};Object.defineProperty(Oe.prototype,"target",{enumerable:!0});Object.defineProperty(Oe.prototype,"type",{enumerable:!0});var Je=class extends Oe{constructor(e,t={}){super(e),this[Zo]=t.code===void 0?0:t.code,this[ic]=t.reason===void 0?"":t.reason,this[rc]=t.wasClean===void 0?!1:t.wasClean}get code(){return this[Zo]}get reason(){return this[ic]}get wasClean(){return this[rc]}};Object.defineProperty(Je.prototype,"code",{enumerable:!0});Object.defineProperty(Je.prototype,"reason",{enumerable:!0});Object.defineProperty(Je.prototype,"wasClean",{enumerable:!0});var wt=class extends Oe{constructor(e,t={}){super(e),this[tc]=t.error===void 0?null:t.error,this[sc]=t.message===void 0?"":t.message}get error(){return this[tc]}get message(){return this[sc]}};Object.defineProperty(wt.prototype,"error",{enumerable:!0});Object.defineProperty(wt.prototype,"message",{enumerable:!0});var es=class extends Oe{constructor(e,t={}){super(e),this[ec]=t.data===void 0?null:t.data}get data(){return this[ec]}};Object.defineProperty(es.prototype,"data",{enumerable:!0});var nh={addEventListener(s,e,t={}){for(let n of this.listeners(s))if(!t[Zt]&&n[In]===e&&!n[Zt])return;let i;if(s==="message")i=function(r,a){let o=new es("message",{data:a?r:r.toString()});o[yt]=this,Xs(e,this,o)};else if(s==="close")i=function(r,a){let o=new Je("close",{code:r,reason:a.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});o[yt]=this,Xs(e,this,o)};else if(s==="error")i=function(r){let a=new wt("error",{error:r,message:r.message});a[yt]=this,Xs(e,this,a)};else if(s==="open")i=function(){let r=new Oe("open");r[yt]=this,Xs(e,this,r)};else return;i[Zt]=!!t[Zt],i[In]=e,t.once?this.once(s,i):this.on(s,i)},removeEventListener(s,e){for(let t of this.listeners(s))if(t[In]===e&&!t[Zt]){this.removeListener(s,t);break}}};ac.exports={CloseEvent:Je,ErrorEvent:wt,Event:Oe,EventTarget:nh,MessageEvent:es};function Xs(s,e,t){typeof s=="object"&&s.handleEvent?s.handleEvent.call(s,t):s.call(e,t)}});var Ln=g((Xb,cc)=>{"use strict";var{tokenChars:ts}=xt();function ve(s,e,t){s[e]===void 0?s[e]=[t]:s[e].push(t)}function rh(s){let e=Object.create(null),t=Object.create(null),i=!1,n=!1,r=!1,a,o,c=-1,l=-1,p=-1,u=0;for(;u<s.length;u++)if(l=s.charCodeAt(u),a===void 0)if(p===-1&&ts[l]===1)c===-1&&(c=u);else if(u!==0&&(l===32||l===9))p===-1&&c!==-1&&(p=u);else if(l===59||l===44){if(c===-1)throw new SyntaxError(`Unexpected character at index ${u}`);p===-1&&(p=u);let h=s.slice(c,p);l===44?(ve(e,h,t),t=Object.create(null)):a=h,c=p=-1}else throw new SyntaxError(`Unexpected character at index ${u}`);else if(o===void 0)if(p===-1&&ts[l]===1)c===-1&&(c=u);else if(l===32||l===9)p===-1&&c!==-1&&(p=u);else if(l===59||l===44){if(c===-1)throw new SyntaxError(`Unexpected character at index ${u}`);p===-1&&(p=u),ve(t,s.slice(c,p),!0),l===44&&(ve(e,a,t),t=Object.create(null),a=void 0),c=p=-1}else if(l===61&&c!==-1&&p===-1)o=s.slice(c,u),c=p=-1;else throw new SyntaxError(`Unexpected character at index ${u}`);else if(n){if(ts[l]!==1)throw new SyntaxError(`Unexpected character at index ${u}`);c===-1?c=u:i||(i=!0),n=!1}else if(r)if(ts[l]===1)c===-1&&(c=u);else if(l===34&&c!==-1)r=!1,p=u;else if(l===92)n=!0;else throw new SyntaxError(`Unexpected character at index ${u}`);else if(l===34&&s.charCodeAt(u-1)===61)r=!0;else if(p===-1&&ts[l]===1)c===-1&&(c=u);else if(c!==-1&&(l===32||l===9))p===-1&&(p=u);else if(l===59||l===44){if(c===-1)throw new SyntaxError(`Unexpected character at index ${u}`);p===-1&&(p=u);let h=s.slice(c,p);i&&(h=h.replace(/\\/g,""),i=!1),ve(t,o,h),l===44&&(ve(e,a,t),t=Object.create(null),a=void 0),o=void 0,c=p=-1}else throw new SyntaxError(`Unexpected character at index ${u}`);if(c===-1||r||l===32||l===9)throw new SyntaxError("Unexpected end of input");p===-1&&(p=u);let d=s.slice(c,p);return a===void 0?ve(e,d,t):(o===void 0?ve(t,d,!0):i?ve(t,o,d.replace(/\\/g,"")):ve(t,o,d),ve(e,a,t)),e}function ah(s){return Object.keys(s).map(e=>{let t=s[e];return Array.isArray(t)||(t=[t]),t.map(i=>[e].concat(Object.keys(i).map(n=>{let r=i[n];return Array.isArray(r)||(r=[r]),r.map(a=>a===!0?n:`${n}=${a}`).join("; ")})).join("; ")).join(", ")}).join(", ")}cc.exports={format:ah,parse:rh}});var ei=g((Zb,yc)=>{"use strict";var oh=require("events"),ch=require("https"),lh=require("http"),uc=require("net"),ph=require("tls"),{randomBytes:uh,createHash:dh}=require("crypto"),{Duplex:Jb,Readable:Qb}=require("stream"),{URL:Fn}=require("url"),qe=Qt(),fh=Mn(),mh=Nn(),{isBlob:hh}=xt(),{BINARY_TYPES:lc,EMPTY_BUFFER:Js,GUID:gh,kForOnEventAttribute:qn,kListener:xh,kStatusCode:vh,kWebSocket:L,NOOP:dc}=Ce(),{EventTarget:{addEventListener:bh,removeEventListener:yh}}=oc(),{format:wh,parse:_h}=Ln(),{toBuffer:Sh}=Xt(),Eh=30*1e3,fc=Symbol("kAborted"),Un=[8,13],Re=["CONNECTING","OPEN","CLOSING","CLOSED"],kh=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/,T=class s extends oh{constructor(e,t,i){super(),this._binaryType=lc[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=Js,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=s.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,e!==null?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,t===void 0?t=[]:Array.isArray(t)||(typeof t=="object"&&t!==null?(i=t,t=[]):t=[t]),mc(this,e,t,i)):(this._autoPong=i.autoPong,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){lc.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,i){let n=new fh({allowSynchronousEvents:i.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation}),r=new mh(e,this._extensions,i.generateMask);this._receiver=n,this._sender=r,this._socket=e,n[L]=this,r[L]=this,e[L]=this,n.on("conclude",Oh),n.on("drain",Rh),n.on("error",Ah),n.on("message",Ph),n.on("ping",jh),n.on("pong",Mh),r.onerror=Bh,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",xc),e.on("data",Zs),e.on("end",vc),e.on("error",bc),this._readyState=s.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=s.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[qe.extensionName]&&this._extensions[qe.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=s.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==s.CLOSED){if(this.readyState===s.CONNECTING){te(this,this._req,"WebSocket was closed before the connection was established");return}if(this.readyState===s.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=s.CLOSING,this._sender.close(e,t,!this._isServer,i=>{i||(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),gc(this)}}pause(){this.readyState===s.CONNECTING||this.readyState===s.CLOSED||(this._paused=!0,this._socket.pause())}ping(e,t,i){if(this.readyState===s.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=t=void 0):typeof t=="function"&&(i=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==s.OPEN){Hn(this,e,i);return}t===void 0&&(t=!this._isServer),this._sender.ping(e||Js,t,i)}pong(e,t,i){if(this.readyState===s.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof e=="function"?(i=e,e=t=void 0):typeof t=="function"&&(i=t,t=void 0),typeof e=="number"&&(e=e.toString()),this.readyState!==s.OPEN){Hn(this,e,i);return}t===void 0&&(t=!this._isServer),this._sender.pong(e||Js,t,i)}resume(){this.readyState===s.CONNECTING||this.readyState===s.CLOSED||(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,i){if(this.readyState===s.CONNECTING)throw new Error("WebSocket is not open: readyState 0 (CONNECTING)");if(typeof t=="function"&&(i=t,t={}),typeof e=="number"&&(e=e.toString()),this.readyState!==s.OPEN){Hn(this,e,i);return}let n={binary:typeof e!="string",mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[qe.extensionName]||(n.compress=!1),this._sender.send(e||Js,n,i)}terminate(){if(this.readyState!==s.CLOSED){if(this.readyState===s.CONNECTING){te(this,this._req,"WebSocket was closed before the connection was established");return}this._socket&&(this._readyState=s.CLOSING,this._socket.destroy())}}};Object.defineProperty(T,"CONNECTING",{enumerable:!0,value:Re.indexOf("CONNECTING")});Object.defineProperty(T.prototype,"CONNECTING",{enumerable:!0,value:Re.indexOf("CONNECTING")});Object.defineProperty(T,"OPEN",{enumerable:!0,value:Re.indexOf("OPEN")});Object.defineProperty(T.prototype,"OPEN",{enumerable:!0,value:Re.indexOf("OPEN")});Object.defineProperty(T,"CLOSING",{enumerable:!0,value:Re.indexOf("CLOSING")});Object.defineProperty(T.prototype,"CLOSING",{enumerable:!0,value:Re.indexOf("CLOSING")});Object.defineProperty(T,"CLOSED",{enumerable:!0,value:Re.indexOf("CLOSED")});Object.defineProperty(T.prototype,"CLOSED",{enumerable:!0,value:Re.indexOf("CLOSED")});["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(s=>{Object.defineProperty(T.prototype,s,{enumerable:!0})});["open","error","close","message"].forEach(s=>{Object.defineProperty(T.prototype,`on${s}`,{enumerable:!0,get(){for(let e of this.listeners(s))if(e[qn])return e[xh];return null},set(e){for(let t of this.listeners(s))if(t[qn]){this.removeListener(s,t);break}typeof e=="function"&&this.addEventListener(s,e,{[qn]:!0})}})});T.prototype.addEventListener=bh;T.prototype.removeEventListener=yh;yc.exports=T;function mc(s,e,t,i){let n={allowSynchronousEvents:!0,autoPong:!0,protocolVersion:Un[1],maxPayload:104857600,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...i,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(s._autoPong=n.autoPong,!Un.includes(n.protocolVersion))throw new RangeError(`Unsupported protocol version: ${n.protocolVersion} (supported versions: ${Un.join(", ")})`);let r;if(e instanceof Fn)r=e;else try{r=new Fn(e)}catch{throw new SyntaxError(`Invalid URL: ${e}`)}r.protocol==="http:"?r.protocol="ws:":r.protocol==="https:"&&(r.protocol="wss:"),s._url=r.href;let a=r.protocol==="wss:",o=r.protocol==="ws+unix:",c;if(r.protocol!=="ws:"&&!a&&!o?c=`The URL's protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"`:o&&!r.pathname?c="The URL's pathname is empty":r.hash&&(c="The URL contains a fragment identifier"),c){let f=new SyntaxError(c);if(s._redirects===0)throw f;Qs(s,f);return}let l=a?443:80,p=uh(16).toString("base64"),u=a?ch.request:lh.request,d=new Set,h;if(n.createConnection=n.createConnection||(a?Th:Ch),n.defaultPort=n.defaultPort||l,n.port=r.port||l,n.host=r.hostname.startsWith("[")?r.hostname.slice(1,-1):r.hostname,n.headers={...n.headers,"Sec-WebSocket-Version":n.protocolVersion,"Sec-WebSocket-Key":p,Connection:"Upgrade",Upgrade:"websocket"},n.path=r.pathname+r.search,n.timeout=n.handshakeTimeout,n.perMessageDeflate&&(h=new qe(n.perMessageDeflate!==!0?n.perMessageDeflate:{},!1,n.maxPayload),n.headers["Sec-WebSocket-Extensions"]=wh({[qe.extensionName]:h.offer()})),t.length){for(let f of t){if(typeof f!="string"||!kh.test(f)||d.has(f))throw new SyntaxError("An invalid or duplicated subprotocol was specified");d.add(f)}n.headers["Sec-WebSocket-Protocol"]=t.join(",")}if(n.origin&&(n.protocolVersion<13?n.headers["Sec-WebSocket-Origin"]=n.origin:n.headers.Origin=n.origin),(r.username||r.password)&&(n.auth=`${r.username}:${r.password}`),o){let f=n.path.split(":");n.socketPath=f[0],n.path=f[1]}let m;if(n.followRedirects){if(s._redirects===0){s._originalIpc=o,s._originalSecure=a,s._originalHostOrSocketPath=o?n.socketPath:r.host;let f=i&&i.headers;if(i={...i,headers:{}},f)for(let[x,y]of Object.entries(f))i.headers[x.toLowerCase()]=y}else if(s.listenerCount("redirect")===0){let f=o?s._originalIpc?n.socketPath===s._originalHostOrSocketPath:!1:s._originalIpc?!1:r.host===s._originalHostOrSocketPath;(!f||s._originalSecure&&!a)&&(delete n.headers.authorization,delete n.headers.cookie,f||delete n.headers.host,n.auth=void 0)}n.auth&&!i.headers.authorization&&(i.headers.authorization="Basic "+Buffer.from(n.auth).toString("base64")),m=s._req=u(n),s._redirects&&s.emit("redirect",s.url,m)}else m=s._req=u(n);n.timeout&&m.on("timeout",()=>{te(s,m,"Opening handshake has timed out")}),m.on("error",f=>{m===null||m[fc]||(m=s._req=null,Qs(s,f))}),m.on("response",f=>{let x=f.headers.location,y=f.statusCode;if(x&&n.followRedirects&&y>=300&&y<400){if(++s._redirects>n.maxRedirects){te(s,m,"Maximum redirects exceeded");return}m.abort();let b;try{b=new Fn(x,e)}catch{let B=new SyntaxError(`Invalid URL: ${x}`);Qs(s,B);return}mc(s,b,t,i)}else s.emit("unexpected-response",m,f)||te(s,m,`Unexpected server response: ${f.statusCode}`)}),m.on("upgrade",(f,x,y)=>{if(s.emit("upgrade",f),s.readyState!==T.CONNECTING)return;m=s._req=null;let b=f.headers.upgrade;if(b===void 0||b.toLowerCase()!=="websocket"){te(s,x,"Invalid Upgrade header");return}let q=dh("sha1").update(p+gh).digest("base64");if(f.headers["sec-websocket-accept"]!==q){te(s,x,"Invalid Sec-WebSocket-Accept header");return}let B=f.headers["sec-websocket-protocol"],me;if(B!==void 0?d.size?d.has(B)||(me="Server sent an invalid subprotocol"):me="Server sent a subprotocol but none was requested":d.size&&(me="Server sent no subprotocol"),me){te(s,x,me);return}B&&(s._protocol=B);let K=f.headers["sec-websocket-extensions"];if(K!==void 0){if(!h){te(s,x,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");return}let he;try{he=_h(K)}catch{te(s,x,"Invalid Sec-WebSocket-Extensions header");return}let Ee=Object.keys(he);if(Ee.length!==1||Ee[0]!==qe.extensionName){te(s,x,"Server indicated an extension that was not requested");return}try{h.accept(he[qe.extensionName])}catch{te(s,x,"Invalid Sec-WebSocket-Extensions header");return}s._extensions[qe.extensionName]=h}s.setSocket(x,y,{allowSynchronousEvents:n.allowSynchronousEvents,generateMask:n.generateMask,maxPayload:n.maxPayload,skipUTF8Validation:n.skipUTF8Validation})}),n.finishRequest?n.finishRequest(m,s):m.end()}function Qs(s,e){s._readyState=T.CLOSING,s._errorEmitted=!0,s.emit("error",e),s.emitClose()}function Ch(s){return s.path=s.socketPath,uc.connect(s)}function Th(s){return s.path=void 0,!s.servername&&s.servername!==""&&(s.servername=uc.isIP(s.host)?"":s.host),ph.connect(s)}function te(s,e,t){s._readyState=T.CLOSING;let i=new Error(t);Error.captureStackTrace(i,te),e.setHeader?(e[fc]=!0,e.abort(),e.socket&&!e.socket.destroyed&&e.socket.destroy(),process.nextTick(Qs,s,i)):(e.destroy(i),e.once("error",s.emit.bind(s,"error")),e.once("close",s.emitClose.bind(s)))}function Hn(s,e,t){if(e){let i=hh(e)?e.size:Sh(e).length;s._socket?s._sender._bufferedBytes+=i:s._bufferedAmount+=i}if(t){let i=new Error(`WebSocket is not open: readyState ${s.readyState} (${Re[s.readyState]})`);process.nextTick(t,i)}}function Oh(s,e){let t=this[L];t._closeFrameReceived=!0,t._closeMessage=e,t._closeCode=s,t._socket[L]!==void 0&&(t._socket.removeListener("data",Zs),process.nextTick(hc,t._socket),s===1005?t.close():t.close(s,e))}function Rh(){let s=this[L];s.isPaused||s._socket.resume()}function Ah(s){let e=this[L];e._socket[L]!==void 0&&(e._socket.removeListener("data",Zs),process.nextTick(hc,e._socket),e.close(s[vh])),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",s))}function pc(){this[L].emitClose()}function Ph(s,e){this[L].emit("message",s,e)}function jh(s){let e=this[L];e._autoPong&&e.pong(s,!this._isServer,dc),e.emit("ping",s)}function Mh(s){this[L].emit("pong",s)}function hc(s){s.resume()}function Bh(s){let e=this[L];e.readyState!==T.CLOSED&&(e.readyState===T.OPEN&&(e._readyState=T.CLOSING,gc(e)),this._socket.end(),e._errorEmitted||(e._errorEmitted=!0,e.emit("error",s)))}function gc(s){s._closeTimer=setTimeout(s._socket.destroy.bind(s._socket),Eh)}function xc(){let s=this[L];this.removeListener("close",xc),this.removeListener("data",Zs),this.removeListener("end",vc),s._readyState=T.CLOSING;let e;!this._readableState.endEmitted&&!s._closeFrameReceived&&!s._receiver._writableState.errorEmitted&&(e=s._socket.read())!==null&&s._receiver.write(e),s._receiver.end(),this[L]=void 0,clearTimeout(s._closeTimer),s._receiver._writableState.finished||s._receiver._writableState.errorEmitted?s.emitClose():(s._receiver.on("error",pc),s._receiver.on("finish",pc))}function Zs(s){this[L]._receiver.write(s)||this.pause()}function vc(){let s=this[L];s._readyState=T.CLOSING,s._receiver.end(),this.end()}function bc(){let s=this[L];this.removeListener("error",bc),this.on("error",dc),s&&(s._readyState=T.CLOSING,this.destroy())}});var Ec=g((t0,Sc)=>{"use strict";var e0=ei(),{Duplex:Dh}=require("stream");function wc(s){s.emit("close")}function Nh(){!this.destroyed&&this._writableState.finished&&this.destroy()}function _c(s){this.removeListener("error",_c),this.destroy(),this.listenerCount("error")===0&&this.emit("error",s)}function Ih(s,e){let t=!0,i=new Dh({...e,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return s.on("message",function(r,a){let o=!a&&i._readableState.objectMode?r.toString():r;i.push(o)||s.pause()}),s.once("error",function(r){i.destroyed||(t=!1,i.destroy(r))}),s.once("close",function(){i.destroyed||i.push(null)}),i._destroy=function(n,r){if(s.readyState===s.CLOSED){r(n),process.nextTick(wc,i);return}let a=!1;s.once("error",function(c){a=!0,r(c)}),s.once("close",function(){a||r(n),process.nextTick(wc,i)}),t&&s.terminate()},i._final=function(n){if(s.readyState===s.CONNECTING){s.once("open",function(){i._final(n)});return}s._socket!==null&&(s._socket._writableState.finished?(n(),i._readableState.endEmitted&&i.destroy()):(s._socket.once("finish",function(){n()}),s.close()))},i._read=function(){s.isPaused&&s.resume()},i._write=function(n,r,a){if(s.readyState===s.CONNECTING){s.once("open",function(){i._write(n,r,a)});return}s.send(n,a)},i.on("end",Nh),i.on("error",_c),i}Sc.exports=Ih});var Cc=g((s0,kc)=>{"use strict";var{tokenChars:Lh}=xt();function Fh(s){let e=new Set,t=-1,i=-1,n=0;for(n;n<s.length;n++){let a=s.charCodeAt(n);if(i===-1&&Lh[a]===1)t===-1&&(t=n);else if(n!==0&&(a===32||a===9))i===-1&&t!==-1&&(i=n);else if(a===44){if(t===-1)throw new SyntaxError(`Unexpected character at index ${n}`);i===-1&&(i=n);let o=s.slice(t,i);if(e.has(o))throw new SyntaxError(`The "${o}" subprotocol is duplicated`);e.add(o),t=i=-1}else throw new SyntaxError(`Unexpected character at index ${n}`)}if(t===-1||i!==-1)throw new SyntaxError("Unexpected end of input");let r=s.slice(t,n);if(e.has(r))throw new SyntaxError(`The "${r}" subprotocol is duplicated`);return e.add(r),e}kc.exports={parse:Fh}});var Mc=g((n0,jc)=>{"use strict";var qh=require("events"),ti=require("http"),{Duplex:i0}=require("stream"),{createHash:Uh}=require("crypto"),Tc=Ln(),Qe=Qt(),Hh=Cc(),zh=ei(),{GUID:Wh,kWebSocket:$h}=Ce(),Vh=/^[+/0-9A-Za-z]{22}==$/,Oc=0,Rc=1,Pc=2,zn=class extends qh{constructor(e,t){if(super(),e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:100*1024*1024,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:zh,...e},e.port==null&&!e.server&&!e.noServer||e.port!=null&&(e.server||e.noServer)||e.server&&e.noServer)throw new TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(e.port!=null?(this._server=ti.createServer((i,n)=>{let r=ti.STATUS_CODES[426];n.writeHead(426,{"Content-Length":r.length,"Content-Type":"text/plain"}),n.end(r)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){let i=this.emit.bind(this,"connection");this._removeListeners=Gh(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(n,r,a)=>{this.handleUpgrade(n,r,a,i)}})}e.perMessageDeflate===!0&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=Oc}address(){if(this.options.noServer)throw new Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===Pc){e&&this.once("close",()=>{e(new Error("The server is not running"))}),process.nextTick(ss,this);return}if(e&&this.once("close",e),this._state!==Rc)if(this._state=Rc,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients?this.clients.size?this._shouldEmitClose=!0:process.nextTick(ss,this):process.nextTick(ss,this);else{let t=this._server;this._removeListeners(),this._removeListeners=this._server=null,t.close(()=>{ss(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf("?");if((t!==-1?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,i,n){t.on("error",Ac);let r=e.headers["sec-websocket-key"],a=e.headers.upgrade,o=+e.headers["sec-websocket-version"];if(e.method!=="GET"){Ze(this,e,t,405,"Invalid HTTP method");return}if(a===void 0||a.toLowerCase()!=="websocket"){Ze(this,e,t,400,"Invalid Upgrade header");return}if(r===void 0||!Vh.test(r)){Ze(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");return}if(o!==13&&o!==8){Ze(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});return}if(!this.shouldHandle(e)){is(t,400);return}let c=e.headers["sec-websocket-protocol"],l=new Set;if(c!==void 0)try{l=Hh.parse(c)}catch{Ze(this,e,t,400,"Invalid Sec-WebSocket-Protocol header");return}let p=e.headers["sec-websocket-extensions"],u={};if(this.options.perMessageDeflate&&p!==void 0){let d=new Qe(this.options.perMessageDeflate,!0,this.options.maxPayload);try{let h=Tc.parse(p);h[Qe.extensionName]&&(d.accept(h[Qe.extensionName]),u[Qe.extensionName]=d)}catch{Ze(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let d={origin:e.headers[`${o===8?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(this.options.verifyClient.length===2){this.options.verifyClient(d,(h,m,f,x)=>{if(!h)return is(t,m||401,f,x);this.completeUpgrade(u,r,l,e,t,i,n)});return}if(!this.options.verifyClient(d))return is(t,401)}this.completeUpgrade(u,r,l,e,t,i,n)}completeUpgrade(e,t,i,n,r,a,o){if(!r.readable||!r.writable)return r.destroy();if(r[$h])throw new Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>Oc)return is(r,503);let l=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${Uh("sha1").update(t+Wh).digest("base64")}`],p=new this.options.WebSocket(null,void 0,this.options);if(i.size){let u=this.options.handleProtocols?this.options.handleProtocols(i,n):i.values().next().value;u&&(l.push(`Sec-WebSocket-Protocol: ${u}`),p._protocol=u)}if(e[Qe.extensionName]){let u=e[Qe.extensionName].params,d=Tc.format({[Qe.extensionName]:[u]});l.push(`Sec-WebSocket-Extensions: ${d}`),p._extensions=e}this.emit("headers",l,n),r.write(l.concat(`\r
|
|
8
8
|
`).join(`\r
|
|
9
|
-
`)),r.removeListener("error",Ac),p.setSocket(r,a,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(p),p.on("close",()=>{this.clients.delete(p),this._shouldEmitClose&&!this.clients.size&&process.nextTick(ss,this)})),o(p,n)}};jc.exports=zn;function
|
|
9
|
+
`)),r.removeListener("error",Ac),p.setSocket(r,a,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(p),p.on("close",()=>{this.clients.delete(p),this._shouldEmitClose&&!this.clients.size&&process.nextTick(ss,this)})),o(p,n)}};jc.exports=zn;function Gh(s,e){for(let t of Object.keys(e))s.on(t,e[t]);return function(){for(let i of Object.keys(e))s.removeListener(i,e[i])}}function ss(s){s._state=Pc,s.emit("close")}function Ac(){this.destroy()}function is(s,e,t,i){t=t||ti.STATUS_CODES[e],i={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(t),...i},s.once("finish",s.destroy),s.end(`HTTP/1.1 ${e} ${ti.STATUS_CODES[e]}\r
|
|
10
10
|
`+Object.keys(i).map(n=>`${n}: ${i[n]}`).join(`\r
|
|
11
11
|
`)+`\r
|
|
12
12
|
\r
|
|
13
|
-
`+t)}function Ze(s,e,t,i,n,r){if(s.listenerCount("wsClientError")){let a=new Error(n);Error.captureStackTrace(a,Ze),s.emit("wsClientError",a,t,e)}else is(t,i,n,r)}});var Wn=v((iy,Dc)=>{"use strict";var Oe=ei();Oe.createWebSocketStream=Ec();Oe.Server=Mc();Oe.Receiver=Mn();Oe.Sender=In();Oe.WebSocket=Oe;Oe.WebSocketServer=Oe.Server;Dc.exports=Oe});var Nc=v((ny,Ic)=>{"use strict";var Bc=Object.getOwnPropertySymbols,Vh=Object.prototype.hasOwnProperty,Gh=Object.prototype.propertyIsEnumerable;function Kh(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function Yh(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var e={},t=0;t<10;t++)e["_"+String.fromCharCode(t)]=t;var i=Object.getOwnPropertyNames(e).map(function(r){return e[r]});if(i.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(r){n[r]=r}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}Ic.exports=Yh()?Object.assign:function(s,e){for(var t,i=Kh(s),n,r=1;r<arguments.length;r++){t=Object(arguments[r]);for(var a in t)Vh.call(t,a)&&(i[a]=t[a]);if(Bc){n=Bc(t);for(var o=0;o<n.length;o++)Gh.call(t,n[o])&&(i[n[o]]=t[n[o]])}}return i}});var Fc=v((ry,$n)=>{"use strict";$n.exports=Jh;$n.exports.append=qc;var Xh=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function qc(s,e){if(typeof s!="string")throw new TypeError("header argument is required");if(!e)throw new TypeError("field argument is required");for(var t=Array.isArray(e)?e:Lc(String(e)),i=0;i<t.length;i++)if(!Xh.test(t[i]))throw new TypeError("field argument contains an invalid header name");if(s==="*")return s;var n=s,r=Lc(s.toLowerCase());if(t.indexOf("*")!==-1||r.indexOf("*")!==-1)return"*";for(var a=0;a<t.length;a++){var o=t[a].toLowerCase();r.indexOf(o)===-1&&(r.push(o),n=n?n+", "+t[a]:t[a])}return n}function Lc(s){for(var e=0,t=[],i=0,n=0,r=s.length;n<r;n++)switch(s.charCodeAt(n)){case 32:i===e&&(i=e=n+1);break;case 44:t.push(s.substring(i,e)),i=e=n+1;break;default:e=n+1;break}return t.push(s.substring(i,e)),t}function Jh(s,e){if(!s||!s.getHeader||!s.setHeader)throw new TypeError("res argument is required");var t=s.getHeader("Vary")||"",i=Array.isArray(t)?t.join(", "):String(t);(t=qc(i,e))&&s.setHeader("Vary",t)}});var Vn=v((ay,Uc)=>{(function(){"use strict";var s=Nc(),e=Fc(),t={origin:"*",methods:"GET,HEAD,PUT,PATCH,POST,DELETE",preflightContinue:!1,optionsSuccessStatus:204};function i(m){return typeof m=="string"||m instanceof String}function n(m,f){if(Array.isArray(f)){for(var x=0;x<f.length;++x)if(n(m,f[x]))return!0;return!1}else return i(f)?m===f:f instanceof RegExp?f.test(m):!!f}function r(m,f){var x=f.headers.origin,w=[],b;return!m.origin||m.origin==="*"?w.push([{key:"Access-Control-Allow-Origin",value:"*"}]):i(m.origin)?(w.push([{key:"Access-Control-Allow-Origin",value:m.origin}]),w.push([{key:"Vary",value:"Origin"}])):(b=n(x,m.origin),w.push([{key:"Access-Control-Allow-Origin",value:b?x:!1}]),w.push([{key:"Vary",value:"Origin"}])),w}function a(m){var f=m.methods;return f.join&&(f=m.methods.join(",")),{key:"Access-Control-Allow-Methods",value:f}}function o(m){return m.credentials===!0?{key:"Access-Control-Allow-Credentials",value:"true"}:null}function c(m,f){var x=m.allowedHeaders||m.headers,w=[];return x?x.join&&(x=x.join(",")):(x=f.headers["access-control-request-headers"],w.push([{key:"Vary",value:"Access-Control-Request-Headers"}])),x&&x.length&&w.push([{key:"Access-Control-Allow-Headers",value:x}]),w}function l(m){var f=m.exposedHeaders;if(f)f.join&&(f=f.join(","));else return null;return f&&f.length?{key:"Access-Control-Expose-Headers",value:f}:null}function p(m){var f=(typeof m.maxAge=="number"||m.maxAge)&&m.maxAge.toString();return f&&f.length?{key:"Access-Control-Max-Age",value:f}:null}function u(m,f){for(var x=0,w=m.length;x<w;x++){var b=m[x];b&&(Array.isArray(b)?u(b,f):b.key==="Vary"&&b.value?e(f,b.value):b.value&&f.setHeader(b.key,b.value))}}function d(m,f,x,w){var b=[],F=f.method&&f.method.toUpperCase&&f.method.toUpperCase();F==="OPTIONS"?(b.push(r(m,f)),b.push(o(m)),b.push(a(m)),b.push(c(m,f)),b.push(p(m)),b.push(l(m)),u(b,x),m.preflightContinue?w():(x.statusCode=m.optionsSuccessStatus,x.setHeader("Content-Length","0"),x.end())):(b.push(r(m,f)),b.push(o(m)),b.push(l(m)),u(b,x),w())}function h(m){var f=null;return typeof m=="function"?f=m:f=function(x,w){w(null,m)},function(w,b,F){f(w,function(D,me){if(D)F(D);else{var G=s({},t,me),he=null;G.origin&&typeof G.origin=="function"?he=G.origin:G.origin&&(he=function(_e,ve){ve(null,G.origin)}),he?he(w.headers.origin,function(_e,ve){_e||!ve?F(_e):(G.origin=ve,d(G,w,b,F))}):F()}})}}Uc.exports=h})()});var Kn=v(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.Server=Et.BaseServer=void 0;var Hc=Ji(),si=bn(),Qh=require("events"),zc=wn(),Zh=M(),ev=Ro(),tv=Wn(),Wc=xn(),sv=Yt(),_=(0,Zh.default)("engine"),_t=Symbol("responseHeaders");function iv(s){try{let e=JSON.parse(s);if(typeof e.sid=="string")return e.sid}catch{}}var St=class extends Qh.EventEmitter{constructor(e={}){super(),this.middlewares=[],this.clients={},this.clientsCount=0,this.opts=Object.assign({wsEngine:tv.Server,pingTimeout:2e4,pingInterval:25e3,upgradeTimeout:1e4,maxHttpBufferSize:1e6,transports:["polling","websocket"],allowUpgrades:!0,httpCompression:{threshold:1024},cors:!1,allowEIO3:!1},e),e.cookie&&(this.opts.cookie=Object.assign({name:"io",path:"/",httpOnly:e.cookie.path!==!1,sameSite:"lax"},e.cookie)),this.opts.cors&&this.use(Vn()(this.opts.cors)),e.perMessageDeflate&&(this.opts.perMessageDeflate=Object.assign({threshold:1024},e.perMessageDeflate)),this.init()}_computePath(e){let t=(e.path||"/engine.io").replace(/\/$/,"");return e.addTrailingSlash!==!1&&(t+="/"),t}upgrades(e){return this.opts.allowUpgrades?si.default[e].upgradesTo||[]:[]}verify(e,t,i){let n=e._query.transport;if(!~this.opts.transports.indexOf(n)||n==="webtransport")return _('unknown transport "%s"',n),i(C.errors.UNKNOWN_TRANSPORT,{transport:n});if(nv(e.headers.origin)){let o=e.headers.origin;return e.headers.origin=null,_("origin header invalid"),i(C.errors.BAD_REQUEST,{name:"INVALID_ORIGIN",origin:o})}let a=e._query.sid;if(a){if(!this.clients.hasOwnProperty(a))return _('unknown sid "%s"',a),i(C.errors.UNKNOWN_SID,{sid:a});let o=this.clients[a].transport.name;if(!t&&o!==n)return _("bad request: unexpected transport without upgrade"),i(C.errors.BAD_REQUEST,{name:"TRANSPORT_MISMATCH",transport:n,previousTransport:o})}else return e.method!=="GET"?i(C.errors.BAD_HANDSHAKE_METHOD,{method:e.method}):n==="websocket"&&!t?(_("invalid transport upgrade"),i(C.errors.BAD_REQUEST,{name:"TRANSPORT_HANDSHAKE_ERROR"})):this.opts.allowRequest?this.opts.allowRequest(e,(o,c)=>{if(!c)return i(C.errors.FORBIDDEN,{message:o});i()}):i();i()}use(e){this.middlewares.push(e)}_applyMiddlewares(e,t,i){if(this.middlewares.length===0)return _("no middleware to apply, skipping"),i();let n=r=>{_("applying middleware n\xB0%d",r+1),this.middlewares[r](e,t,a=>{if(a)return i(a);r+1<this.middlewares.length?n(r+1):i()})};n(0)}close(){_("closing all open clients");for(let e in this.clients)this.clients.hasOwnProperty(e)&&this.clients[e].close(!0);return this.cleanup(),this}generateId(e){return Hc.generateId()}async handshake(e,t,i){let n=t._query.EIO==="4"?4:3;if(n===3&&!this.opts.allowEIO3){_("unsupported protocol version"),this.emit("connection_error",{req:t,code:C.errors.UNSUPPORTED_PROTOCOL_VERSION,message:C.errorMessages[C.errors.UNSUPPORTED_PROTOCOL_VERSION],context:{protocol:n}}),i(C.errors.UNSUPPORTED_PROTOCOL_VERSION);return}let r;try{r=await this.generateId(t)}catch(c){_("error while generating an id"),this.emit("connection_error",{req:t,code:C.errors.BAD_REQUEST,message:C.errorMessages[C.errors.BAD_REQUEST],context:{name:"ID_GENERATION_ERROR",error:c}}),i(C.errors.BAD_REQUEST);return}_('handshaking client "%s"',r);try{var a=this.createTransport(e,t);e==="polling"?(a.maxHttpBufferSize=this.opts.maxHttpBufferSize,a.httpCompression=this.opts.httpCompression):e==="websocket"&&(a.perMessageDeflate=this.opts.perMessageDeflate)}catch(c){_('error handshaking to transport "%s"',e),this.emit("connection_error",{req:t,code:C.errors.BAD_REQUEST,message:C.errorMessages[C.errors.BAD_REQUEST],context:{name:"TRANSPORT_HANDSHAKE_ERROR",error:c}}),i(C.errors.BAD_REQUEST);return}let o=new zc.Socket(r,this,a,t,n);return a.on("headers",(c,l)=>{!l._query.sid&&(this.opts.cookie&&(c["Set-Cookie"]=[(0,ev.serialize)(this.opts.cookie.name,r,this.opts.cookie)]),this.emit("initial_headers",c,l)),this.emit("headers",c,l)}),a.onRequest(t),this.clients[r]=o,this.clientsCount++,o.once("close",()=>{delete this.clients[r],this.clientsCount--}),this.emit("connection",o),a}async onWebTransportSession(e){let t=setTimeout(()=>{_("the client failed to establish a bidirectional stream in the given period"),e.close()},this.opts.upgradeTimeout),n=await e.incomingBidirectionalStreams.getReader().read();if(n.done){_("session is closed");return}let r=n.value,a=(0,sv.createPacketDecoderStream)(this.opts.maxHttpBufferSize,"nodebuffer"),o=r.readable.pipeThrough(a).getReader(),{value:c,done:l}=await o.read();if(l){_("stream is closed");return}if(clearTimeout(t),c.type!=="open")return _("invalid WebTransport handshake"),e.close();if(c.data===void 0){let d=new Wc.WebTransport(e,r,o),h=Hc.generateId();_('handshaking client "%s" (WebTransport)',h);let m=new zc.Socket(h,this,d,null,4);this.clients[h]=m,this.clientsCount++,m.once("close",()=>{delete this.clients[h],this.clientsCount--}),this.emit("connection",m);return}let p=iv(c.data);if(!p)return _("invalid WebTransport handshake"),e.close();let u=this.clients[p];if(!u)_("upgrade attempt for closed client"),e.close();else if(u.upgrading)_("transport has already been trying to upgrade"),e.close();else if(u.upgraded)_("transport had already been upgraded"),e.close();else{_("upgrading existing transport");let d=new Wc.WebTransport(e,r,o);u._maybeUpgrade(d)}}};Et.BaseServer=St;St.errors={UNKNOWN_TRANSPORT:0,UNKNOWN_SID:1,BAD_HANDSHAKE_METHOD:2,BAD_REQUEST:3,FORBIDDEN:4,UNSUPPORTED_PROTOCOL_VERSION:5};St.errorMessages={0:"Transport unknown",1:"Session ID unknown",2:"Bad handshake method",3:"Bad request",4:"Forbidden",5:"Unsupported protocol version"};var Gn=class{constructor(e,t){this.req=e,this.socket=t,e[_t]={}}setHeader(e,t){this.req[_t][e]=t}getHeader(e){return this.req[_t][e]}removeHeader(e){delete this.req[_t][e]}write(){}writeHead(){}end(){this.socket.destroy()}},C=class s extends St{init(){~this.opts.transports.indexOf("websocket")&&(this.ws&&this.ws.close(),this.ws=new this.opts.wsEngine({noServer:!0,clientTracking:!1,perMessageDeflate:this.opts.perMessageDeflate,maxPayload:this.opts.maxHttpBufferSize}),typeof this.ws.on=="function"&&this.ws.on("headers",(e,t)=>{let i=t[_t]||{};delete t[_t],!t._query.sid&&this.emit("initial_headers",i,t),this.emit("headers",i,t),_("writing headers: %j",i),Object.keys(i).forEach(r=>{e.push(`${r}: ${i[r]}`)})}))}cleanup(){this.ws&&(_("closing webSocketServer"),this.ws.close())}prepare(e){if(!e._query){let t=new URL(e.url,"https://socket.io");e._query=Object.fromEntries(t.searchParams.entries())}}createTransport(e,t){return new si.default[e](t)}handleRequest(e,t){_('handling "%s" http request "%s"',e.method,e.url),this.prepare(e),e.res=t;let i=(n,r)=>{if(n!==void 0){this.emit("connection_error",{req:e,code:n,message:s.errorMessages[n],context:r}),$c(t,n,r);return}if(e._query.sid)_("setting new request for existing client"),this.clients[e._query.sid].transport.onRequest(e);else{let a=(o,c)=>$c(t,o,c);this.handshake(e._query.transport,e,a)}};this._applyMiddlewares(e,t,n=>{n?i(s.errors.BAD_REQUEST,{name:"MIDDLEWARE_FAILURE"}):this.verify(e,!1,i)})}handleUpgrade(e,t,i){this.prepare(e);let n=new Gn(e,t),r=(a,o)=>{if(a!==void 0){this.emit("connection_error",{req:e,code:a,message:s.errorMessages[a],context:o}),Vc(t,a,o);return}let c=Buffer.from(i);i=null,n.writeHead(),this.ws.handleUpgrade(e,t,c,l=>{this.onWebSocket(e,t,l)})};this._applyMiddlewares(e,n,a=>{a?r(s.errors.BAD_REQUEST,{name:"MIDDLEWARE_FAILURE"}):this.verify(e,!0,r)})}onWebSocket(e,t,i){if(i.on("error",r),si.default[e._query.transport]!==void 0&&!si.default[e._query.transport].prototype.handlesUpgrades){_("transport doesnt handle upgraded requests"),i.close();return}let n=e._query.sid;if(e.websocket=i,n){let a=this.clients[n];if(!a)_("upgrade attempt for closed client"),i.close();else if(a.upgrading)_("transport has already been trying to upgrade"),i.close();else if(a.upgraded)_("transport had already been upgraded"),i.close();else{_("upgrading existing transport"),i.removeListener("error",r);let o=this.createTransport(e._query.transport,e);o.perMessageDeflate=this.opts.perMessageDeflate,a._maybeUpgrade(o)}}else{let a=(o,c)=>Vc(t,o,c);this.handshake(e._query.transport,e,a)}function r(){_("websocket error before upgrade")}}attach(e,t={}){let i=this._computePath(t),n=t.destroyUpgradeTimeout||1e3;function r(o){return i===o.url.slice(0,i.length)}let a=e.listeners("request").slice(0);e.removeAllListeners("request"),e.on("close",this.close.bind(this)),e.on("listening",this.init.bind(this)),e.on("request",(o,c)=>{if(r(o))_('intercepting request for path "%s"',i),this.handleRequest(o,c);else{let l=0,p=a.length;for(;l<p;l++)a[l].call(e,o,c)}}),~this.opts.transports.indexOf("websocket")&&e.on("upgrade",(o,c,l)=>{r(o)?this.handleUpgrade(o,c,l):t.destroyUpgrade!==!1&&setTimeout(function(){if(c.writable&&c.bytesWritten<=0)return c.on("error",p=>{_("error while destroying upgrade: %s",p.message)}),c.end()},n)})}};Et.Server=C;function $c(s,e,t){let i=e===C.errors.FORBIDDEN?403:400,n=t&&t.message?t.message:C.errorMessages[e];s.writeHead(i,{"Content-Type":"application/json"}),s.end(JSON.stringify({code:e,message:n}))}function Vc(s,e,t={}){if(s.on("error",()=>{_("ignoring error from closed connection")}),s.writable){let i=t.message||C.errorMessages[e],n=Buffer.byteLength(i);s.write(`HTTP/1.1 400 Bad Request\r
|
|
13
|
+
`+t)}function Ze(s,e,t,i,n,r){if(s.listenerCount("wsClientError")){let a=new Error(n);Error.captureStackTrace(a,Ze),s.emit("wsClientError",a,t,e)}else is(t,i,n,r)}});var Wn=g((r0,Bc)=>{"use strict";var Ae=ei();Ae.createWebSocketStream=Ec();Ae.Server=Mc();Ae.Receiver=Mn();Ae.Sender=Nn();Ae.WebSocket=Ae;Ae.WebSocketServer=Ae.Server;Bc.exports=Ae});var Ic=g((a0,Nc)=>{"use strict";var Dc=Object.getOwnPropertySymbols,Kh=Object.prototype.hasOwnProperty,Yh=Object.prototype.propertyIsEnumerable;function Xh(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function Jh(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var e={},t=0;t<10;t++)e["_"+String.fromCharCode(t)]=t;var i=Object.getOwnPropertyNames(e).map(function(r){return e[r]});if(i.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(r){n[r]=r}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}Nc.exports=Jh()?Object.assign:function(s,e){for(var t,i=Xh(s),n,r=1;r<arguments.length;r++){t=Object(arguments[r]);for(var a in t)Kh.call(t,a)&&(i[a]=t[a]);if(Dc){n=Dc(t);for(var o=0;o<n.length;o++)Yh.call(t,n[o])&&(i[n[o]]=t[n[o]])}}return i}});var qc=g((o0,$n)=>{"use strict";$n.exports=Zh;$n.exports.append=Fc;var Qh=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Fc(s,e){if(typeof s!="string")throw new TypeError("header argument is required");if(!e)throw new TypeError("field argument is required");for(var t=Array.isArray(e)?e:Lc(String(e)),i=0;i<t.length;i++)if(!Qh.test(t[i]))throw new TypeError("field argument contains an invalid header name");if(s==="*")return s;var n=s,r=Lc(s.toLowerCase());if(t.indexOf("*")!==-1||r.indexOf("*")!==-1)return"*";for(var a=0;a<t.length;a++){var o=t[a].toLowerCase();r.indexOf(o)===-1&&(r.push(o),n=n?n+", "+t[a]:t[a])}return n}function Lc(s){for(var e=0,t=[],i=0,n=0,r=s.length;n<r;n++)switch(s.charCodeAt(n)){case 32:i===e&&(i=e=n+1);break;case 44:t.push(s.substring(i,e)),i=e=n+1;break;default:e=n+1;break}return t.push(s.substring(i,e)),t}function Zh(s,e){if(!s||!s.getHeader||!s.setHeader)throw new TypeError("res argument is required");var t=s.getHeader("Vary")||"",i=Array.isArray(t)?t.join(", "):String(t);(t=Fc(i,e))&&s.setHeader("Vary",t)}});var Vn=g((c0,Uc)=>{(function(){"use strict";var s=Ic(),e=qc(),t={origin:"*",methods:"GET,HEAD,PUT,PATCH,POST,DELETE",preflightContinue:!1,optionsSuccessStatus:204};function i(m){return typeof m=="string"||m instanceof String}function n(m,f){if(Array.isArray(f)){for(var x=0;x<f.length;++x)if(n(m,f[x]))return!0;return!1}else return i(f)?m===f:f instanceof RegExp?f.test(m):!!f}function r(m,f){var x=f.headers.origin,y=[],b;return!m.origin||m.origin==="*"?y.push([{key:"Access-Control-Allow-Origin",value:"*"}]):i(m.origin)?(y.push([{key:"Access-Control-Allow-Origin",value:m.origin}]),y.push([{key:"Vary",value:"Origin"}])):(b=n(x,m.origin),y.push([{key:"Access-Control-Allow-Origin",value:b?x:!1}]),y.push([{key:"Vary",value:"Origin"}])),y}function a(m){var f=m.methods;return f.join&&(f=m.methods.join(",")),{key:"Access-Control-Allow-Methods",value:f}}function o(m){return m.credentials===!0?{key:"Access-Control-Allow-Credentials",value:"true"}:null}function c(m,f){var x=m.allowedHeaders||m.headers,y=[];return x?x.join&&(x=x.join(",")):(x=f.headers["access-control-request-headers"],y.push([{key:"Vary",value:"Access-Control-Request-Headers"}])),x&&x.length&&y.push([{key:"Access-Control-Allow-Headers",value:x}]),y}function l(m){var f=m.exposedHeaders;if(f)f.join&&(f=f.join(","));else return null;return f&&f.length?{key:"Access-Control-Expose-Headers",value:f}:null}function p(m){var f=(typeof m.maxAge=="number"||m.maxAge)&&m.maxAge.toString();return f&&f.length?{key:"Access-Control-Max-Age",value:f}:null}function u(m,f){for(var x=0,y=m.length;x<y;x++){var b=m[x];b&&(Array.isArray(b)?u(b,f):b.key==="Vary"&&b.value?e(f,b.value):b.value&&f.setHeader(b.key,b.value))}}function d(m,f,x,y){var b=[],q=f.method&&f.method.toUpperCase&&f.method.toUpperCase();q==="OPTIONS"?(b.push(r(m,f)),b.push(o(m)),b.push(a(m)),b.push(c(m,f)),b.push(p(m)),b.push(l(m)),u(b,x),m.preflightContinue?y():(x.statusCode=m.optionsSuccessStatus,x.setHeader("Content-Length","0"),x.end())):(b.push(r(m,f)),b.push(o(m)),b.push(l(m)),u(b,x),y())}function h(m){var f=null;return typeof m=="function"?f=m:f=function(x,y){y(null,m)},function(y,b,q){f(y,function(B,me){if(B)q(B);else{var K=s({},t,me),he=null;K.origin&&typeof K.origin=="function"?he=K.origin:K.origin&&(he=function(Ee,ge){ge(null,K.origin)}),he?he(y.headers.origin,function(Ee,ge){Ee||!ge?q(Ee):(K.origin=ge,d(K,y,b,q))}):q()}})}}Uc.exports=h})()});var Kn=g(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.Server=Et.BaseServer=void 0;var Hc=Ji(),si=bn(),eg=require("events"),zc=wn(),tg=M(),sg=Ro(),ig=Wn(),Wc=xn(),ng=Yt(),_=(0,tg.default)("engine"),_t=Symbol("responseHeaders");function rg(s){try{let e=JSON.parse(s);if(typeof e.sid=="string")return e.sid}catch{}}var St=class extends eg.EventEmitter{constructor(e={}){super(),this.middlewares=[],this.clients={},this.clientsCount=0,this.opts=Object.assign({wsEngine:ig.Server,pingTimeout:2e4,pingInterval:25e3,upgradeTimeout:1e4,maxHttpBufferSize:1e6,transports:["polling","websocket"],allowUpgrades:!0,httpCompression:{threshold:1024},cors:!1,allowEIO3:!1},e),e.cookie&&(this.opts.cookie=Object.assign({name:"io",path:"/",httpOnly:e.cookie.path!==!1,sameSite:"lax"},e.cookie)),this.opts.cors&&this.use(Vn()(this.opts.cors)),e.perMessageDeflate&&(this.opts.perMessageDeflate=Object.assign({threshold:1024},e.perMessageDeflate)),this.init()}_computePath(e){let t=(e.path||"/engine.io").replace(/\/$/,"");return e.addTrailingSlash!==!1&&(t+="/"),t}upgrades(e){return this.opts.allowUpgrades?si.default[e].upgradesTo||[]:[]}verify(e,t,i){let n=e._query.transport;if(!~this.opts.transports.indexOf(n)||n==="webtransport")return _('unknown transport "%s"',n),i(C.errors.UNKNOWN_TRANSPORT,{transport:n});if(ag(e.headers.origin)){let o=e.headers.origin;return e.headers.origin=null,_("origin header invalid"),i(C.errors.BAD_REQUEST,{name:"INVALID_ORIGIN",origin:o})}let a=e._query.sid;if(a){if(!this.clients.hasOwnProperty(a))return _('unknown sid "%s"',a),i(C.errors.UNKNOWN_SID,{sid:a});let o=this.clients[a].transport.name;if(!t&&o!==n)return _("bad request: unexpected transport without upgrade"),i(C.errors.BAD_REQUEST,{name:"TRANSPORT_MISMATCH",transport:n,previousTransport:o})}else return e.method!=="GET"?i(C.errors.BAD_HANDSHAKE_METHOD,{method:e.method}):n==="websocket"&&!t?(_("invalid transport upgrade"),i(C.errors.BAD_REQUEST,{name:"TRANSPORT_HANDSHAKE_ERROR"})):this.opts.allowRequest?this.opts.allowRequest(e,(o,c)=>{if(!c)return i(C.errors.FORBIDDEN,{message:o});i()}):i();i()}use(e){this.middlewares.push(e)}_applyMiddlewares(e,t,i){if(this.middlewares.length===0)return _("no middleware to apply, skipping"),i();let n=r=>{_("applying middleware n\xB0%d",r+1),this.middlewares[r](e,t,a=>{if(a)return i(a);r+1<this.middlewares.length?n(r+1):i()})};n(0)}close(){_("closing all open clients");for(let e in this.clients)this.clients.hasOwnProperty(e)&&this.clients[e].close(!0);return this.cleanup(),this}generateId(e){return Hc.generateId()}async handshake(e,t,i){let n=t._query.EIO==="4"?4:3;if(n===3&&!this.opts.allowEIO3){_("unsupported protocol version"),this.emit("connection_error",{req:t,code:C.errors.UNSUPPORTED_PROTOCOL_VERSION,message:C.errorMessages[C.errors.UNSUPPORTED_PROTOCOL_VERSION],context:{protocol:n}}),i(C.errors.UNSUPPORTED_PROTOCOL_VERSION);return}let r;try{r=await this.generateId(t)}catch(c){_("error while generating an id"),this.emit("connection_error",{req:t,code:C.errors.BAD_REQUEST,message:C.errorMessages[C.errors.BAD_REQUEST],context:{name:"ID_GENERATION_ERROR",error:c}}),i(C.errors.BAD_REQUEST);return}_('handshaking client "%s"',r);try{var a=this.createTransport(e,t);e==="polling"?(a.maxHttpBufferSize=this.opts.maxHttpBufferSize,a.httpCompression=this.opts.httpCompression):e==="websocket"&&(a.perMessageDeflate=this.opts.perMessageDeflate)}catch(c){_('error handshaking to transport "%s"',e),this.emit("connection_error",{req:t,code:C.errors.BAD_REQUEST,message:C.errorMessages[C.errors.BAD_REQUEST],context:{name:"TRANSPORT_HANDSHAKE_ERROR",error:c}}),i(C.errors.BAD_REQUEST);return}let o=new zc.Socket(r,this,a,t,n);return a.on("headers",(c,l)=>{!l._query.sid&&(this.opts.cookie&&(c["Set-Cookie"]=[(0,sg.serialize)(this.opts.cookie.name,r,this.opts.cookie)]),this.emit("initial_headers",c,l)),this.emit("headers",c,l)}),a.onRequest(t),this.clients[r]=o,this.clientsCount++,o.once("close",()=>{delete this.clients[r],this.clientsCount--}),this.emit("connection",o),a}async onWebTransportSession(e){let t=setTimeout(()=>{_("the client failed to establish a bidirectional stream in the given period"),e.close()},this.opts.upgradeTimeout),n=await e.incomingBidirectionalStreams.getReader().read();if(n.done){_("session is closed");return}let r=n.value,a=(0,ng.createPacketDecoderStream)(this.opts.maxHttpBufferSize,"nodebuffer"),o=r.readable.pipeThrough(a).getReader(),{value:c,done:l}=await o.read();if(l){_("stream is closed");return}if(clearTimeout(t),c.type!=="open")return _("invalid WebTransport handshake"),e.close();if(c.data===void 0){let d=new Wc.WebTransport(e,r,o),h=Hc.generateId();_('handshaking client "%s" (WebTransport)',h);let m=new zc.Socket(h,this,d,null,4);this.clients[h]=m,this.clientsCount++,m.once("close",()=>{delete this.clients[h],this.clientsCount--}),this.emit("connection",m);return}let p=rg(c.data);if(!p)return _("invalid WebTransport handshake"),e.close();let u=this.clients[p];if(!u)_("upgrade attempt for closed client"),e.close();else if(u.upgrading)_("transport has already been trying to upgrade"),e.close();else if(u.upgraded)_("transport had already been upgraded"),e.close();else{_("upgrading existing transport");let d=new Wc.WebTransport(e,r,o);u._maybeUpgrade(d)}}};Et.BaseServer=St;St.errors={UNKNOWN_TRANSPORT:0,UNKNOWN_SID:1,BAD_HANDSHAKE_METHOD:2,BAD_REQUEST:3,FORBIDDEN:4,UNSUPPORTED_PROTOCOL_VERSION:5};St.errorMessages={0:"Transport unknown",1:"Session ID unknown",2:"Bad handshake method",3:"Bad request",4:"Forbidden",5:"Unsupported protocol version"};var Gn=class{constructor(e,t){this.req=e,this.socket=t,e[_t]={}}setHeader(e,t){this.req[_t][e]=t}getHeader(e){return this.req[_t][e]}removeHeader(e){delete this.req[_t][e]}write(){}writeHead(){}end(){this.socket.destroy()}},C=class s extends St{init(){~this.opts.transports.indexOf("websocket")&&(this.ws&&this.ws.close(),this.ws=new this.opts.wsEngine({noServer:!0,clientTracking:!1,perMessageDeflate:this.opts.perMessageDeflate,maxPayload:this.opts.maxHttpBufferSize}),typeof this.ws.on=="function"&&this.ws.on("headers",(e,t)=>{let i=t[_t]||{};delete t[_t],!t._query.sid&&this.emit("initial_headers",i,t),this.emit("headers",i,t),_("writing headers: %j",i),Object.keys(i).forEach(r=>{e.push(`${r}: ${i[r]}`)})}))}cleanup(){this.ws&&(_("closing webSocketServer"),this.ws.close())}prepare(e){if(!e._query){let t=new URL(e.url,"https://socket.io");e._query=Object.fromEntries(t.searchParams.entries())}}createTransport(e,t){return new si.default[e](t)}handleRequest(e,t){_('handling "%s" http request "%s"',e.method,e.url),this.prepare(e),e.res=t;let i=(n,r)=>{if(n!==void 0){this.emit("connection_error",{req:e,code:n,message:s.errorMessages[n],context:r}),$c(t,n,r);return}if(e._query.sid)_("setting new request for existing client"),this.clients[e._query.sid].transport.onRequest(e);else{let a=(o,c)=>$c(t,o,c);this.handshake(e._query.transport,e,a)}};this._applyMiddlewares(e,t,n=>{n?i(s.errors.BAD_REQUEST,{name:"MIDDLEWARE_FAILURE"}):this.verify(e,!1,i)})}handleUpgrade(e,t,i){this.prepare(e);let n=new Gn(e,t),r=(a,o)=>{if(a!==void 0){this.emit("connection_error",{req:e,code:a,message:s.errorMessages[a],context:o}),Vc(t,a,o);return}let c=Buffer.from(i);i=null,n.writeHead(),this.ws.handleUpgrade(e,t,c,l=>{this.onWebSocket(e,t,l)})};this._applyMiddlewares(e,n,a=>{a?r(s.errors.BAD_REQUEST,{name:"MIDDLEWARE_FAILURE"}):this.verify(e,!0,r)})}onWebSocket(e,t,i){if(i.on("error",r),si.default[e._query.transport]!==void 0&&!si.default[e._query.transport].prototype.handlesUpgrades){_("transport doesnt handle upgraded requests"),i.close();return}let n=e._query.sid;if(e.websocket=i,n){let a=this.clients[n];if(!a)_("upgrade attempt for closed client"),i.close();else if(a.upgrading)_("transport has already been trying to upgrade"),i.close();else if(a.upgraded)_("transport had already been upgraded"),i.close();else{_("upgrading existing transport"),i.removeListener("error",r);let o=this.createTransport(e._query.transport,e);o.perMessageDeflate=this.opts.perMessageDeflate,a._maybeUpgrade(o)}}else{let a=(o,c)=>Vc(t,o,c);this.handshake(e._query.transport,e,a)}function r(){_("websocket error before upgrade")}}attach(e,t={}){let i=this._computePath(t),n=t.destroyUpgradeTimeout||1e3;function r(o){return i===o.url.slice(0,i.length)}let a=e.listeners("request").slice(0);e.removeAllListeners("request"),e.on("close",this.close.bind(this)),e.on("listening",this.init.bind(this)),e.on("request",(o,c)=>{if(r(o))_('intercepting request for path "%s"',i),this.handleRequest(o,c);else{let l=0,p=a.length;for(;l<p;l++)a[l].call(e,o,c)}}),~this.opts.transports.indexOf("websocket")&&e.on("upgrade",(o,c,l)=>{r(o)?this.handleUpgrade(o,c,l):t.destroyUpgrade!==!1&&setTimeout(function(){if(c.writable&&c.bytesWritten<=0)return c.on("error",p=>{_("error while destroying upgrade: %s",p.message)}),c.end()},n)})}};Et.Server=C;function $c(s,e,t){let i=e===C.errors.FORBIDDEN?403:400,n=t&&t.message?t.message:C.errorMessages[e];s.writeHead(i,{"Content-Type":"application/json"}),s.end(JSON.stringify({code:e,message:n}))}function Vc(s,e,t={}){if(s.on("error",()=>{_("ignoring error from closed connection")}),s.writable){let i=t.message||C.errorMessages[e],n=Buffer.byteLength(i);s.write(`HTTP/1.1 400 Bad Request\r
|
|
14
14
|
Connection: close\r
|
|
15
15
|
Content-type: text/html\r
|
|
16
16
|
Content-Length: `+n+`\r
|
|
17
17
|
\r
|
|
18
|
-
`+i)}s.destroy()}var ns=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];function nv(s){if(s+="",s.length<1)return!1;if(!ns[s.charCodeAt(0)])return _('invalid header, index 0, char "%s"',s.charCodeAt(0)),!0;if(s.length<2)return!1;if(!ns[s.charCodeAt(1)])return _('invalid header, index 1, char "%s"',s.charCodeAt(1)),!0;if(s.length<3)return!1;if(!ns[s.charCodeAt(2)])return _('invalid header, index 2, char "%s"',s.charCodeAt(2)),!0;if(s.length<4)return!1;if(!ns[s.charCodeAt(3)])return _('invalid header, index 3, char "%s"',s.charCodeAt(3)),!0;for(let e=4;e<s.length;++e)if(!ns[s.charCodeAt(e)])return _('invalid header, index "%i", char "%s"',e,s.charCodeAt(e)),!0;return!1}});var Kc=v(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.Polling=void 0;var rv=Ke(),Gc=require("zlib"),av=Es(),ov=M(),ae=(0,ov.default)("engine:polling"),cv={gzip:Gc.createGzip,deflate:Gc.createDeflate},Yn=class extends rv.Transport{constructor(e){super(e),this.closeTimeout=30*1e3}get name(){return"polling"}onRequest(e){let t=e.res;e.res=null,e.getMethod()==="get"?this.onPollRequest(e,t):e.getMethod()==="post"?this.onDataRequest(e,t):(t.writeStatus("500 Internal Server Error"),t.end())}onPollRequest(e,t){if(this.req){ae("request overlap"),this.onError("overlap from client"),t.writeStatus("500 Internal Server Error"),t.end();return}ae("setting request"),this.req=e,this.res=t;let i=()=>{this.writable=!1,this.onError("poll connection closed prematurely")},n=()=>{this.req=this.res=null};e.cleanup=n,t.onAborted(i),this.writable=!0,this.emit("ready"),this.writable&&this.shouldClose&&(ae("triggering empty send to append close packet"),this.send([{type:"noop"}]))}onDataRequest(e,t){if(this.dataReq){this.onError("data request overlap from client"),t.writeStatus("500 Internal Server Error"),t.end();return}let i=Number(e.headers["content-length"]);if(!i){this.onError("content-length header required"),t.writeStatus("411 Length Required").end();return}if(i>this.maxHttpBufferSize){this.onError("payload too large"),t.writeStatus("413 Payload Too Large").end();return}if(e.headers["content-type"]==="application/octet-stream"&&this.protocol===4)return this.onError("invalid content");this.dataReq=e,this.dataRes=t;let r,a=0,o={"Content-Type":"text/html"};this.headers(e,o);for(let l in o)t.writeHeader(l,String(o[l]));let c=l=>{this.onData(l.toString()),this.onDataRequestCleanup(),t.cork(()=>{t.end("ok")})};t.onAborted(()=>{this.onDataRequestCleanup(),this.onError("data request connection closed prematurely")}),t.onData((l,p)=>{let u=a+l.byteLength;if(u>i){this.onError("content-length mismatch"),t.close();return}if(!r){if(p){c(Buffer.from(l));return}r=Buffer.allocUnsafe(i)}if(Buffer.from(l).copy(r,a),p){if(u!=i){this.onError("content-length mismatch"),t.writeStatus("400 Content-Length Mismatch").end(),this.onDataRequestCleanup();return}c(r);return}a=u})}onDataRequestCleanup(){this.dataReq=this.dataRes=null}onData(e){ae('received "%s"',e);let t=i=>{if(i.type==="close")return ae("got xhr close packet"),this.onClose(),!1;this.onPacket(i)};this.protocol===3?this.parser.decodePayload(e,t):this.parser.decodePayload(e).forEach(t)}onClose(){this.writable&&this.send([{type:"noop"}]),super.onClose()}send(e){this.writable=!1,this.shouldClose&&(ae("appending close packet to payload"),e.push({type:"close"}),this.shouldClose(),this.shouldClose=null);let t=i=>{let n=e.some(r=>r.options&&r.options.compress);this.write(i,{compress:n})};this.protocol===3?this.parser.encodePayload(e,this.supportsBinary,t):this.parser.encodePayload(e,t)}write(e,t){ae('writing "%s"',e),this.doWrite(e,t,()=>{this.req.cleanup(),this.emit("drain")})}doWrite(e,t,i){let n=typeof e=="string",a={"Content-Type":n?"text/plain; charset=UTF-8":"application/octet-stream"},o=p=>{this.headers(this.req,a),this.res.cork(()=>{Object.keys(a).forEach(u=>{this.res.writeHeader(u,String(a[u]))}),this.res.end(p)}),i()};if(!this.httpCompression||!t.compress){o(e);return}if((n?Buffer.byteLength(e):e.length)<this.httpCompression.threshold){o(e);return}let l=av(this.req).encodings(["gzip","deflate"]);if(!l){o(e);return}this.compress(e,l,(p,u)=>{if(p){this.res.writeStatus("500 Internal Server Error"),this.res.end(),i(p);return}a["Content-Encoding"]=l,o(u)})}compress(e,t,i){ae("compressing");let n=[],r=0;cv[t](this.httpCompression).on("error",i).on("data",function(a){n.push(a),r+=a.length}).on("end",function(){i(null,Buffer.concat(n,r))}).end(e)}doClose(e){ae("closing");let t,i=()=>{clearTimeout(t),e(),this.onClose()};this.writable?(ae("transport writable - closing right away"),this.send([{type:"close"}]),i()):this.discarded?(ae("transport discarded - closing right away"),i()):(ae("transport not writable - buffering orderly close"),this.shouldClose=i,t=setTimeout(i,this.closeTimeout))}headers(e,t){t=t||{};let i=e.headers["user-agent"];return i&&(~i.indexOf(";MSIE")||~i.indexOf("Trident/"))&&(t["X-XSS-Protection"]="0"),t["cache-control"]="no-store",this.emit("headers",t,e),t}};ii.Polling=Yn});var Xc=v(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.WebSocket=void 0;var lv=Ke(),pv=M(),Yc=(0,pv.default)("engine:ws"),Xn=class extends lv.Transport{constructor(e){super(e),this.writable=!1,this.perMessageDeflate=null}get name(){return"websocket"}get handlesUpgrades(){return!0}send(e){this.writable=!1;for(let t=0;t<e.length;t++){let i=e[t],n=t+1===e.length,r=a=>{let o=typeof a!="string",c=this.perMessageDeflate&&Buffer.byteLength(a)>this.perMessageDeflate.threshold;Yc('writing "%s"',a),this.socket.send(a,o,c),n&&(this.emit("drain"),this.writable=!0,this.emit("ready"))};i.options&&typeof i.options.wsPreEncoded=="string"?r(i.options.wsPreEncoded):this.parser.encodePacket(i,this.supportsBinary,r)}}doClose(e){Yc("closing"),e&&e(),this.socket.end()}};ni.WebSocket=Xn});var Jc=v(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});var uv=Kc(),dv=Xc();Jn.default={polling:uv.Polling,websocket:dv.WebSocket}});var Qc=v(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.uServer=void 0;var fv=M(),et=Kn(),mv=Jc(),Ue=(0,fv.default)("engine:uws"),Qn=class extends et.BaseServer{init(){}cleanup(){}prepare(e,t){e.method=e.getMethod().toUpperCase(),e.url=e.getUrl();let i=new URLSearchParams(e.getQuery());e._query=Object.fromEntries(i.entries()),e.headers={},e.forEach((n,r)=>{e.headers[n]=r}),e.connection={remoteAddress:Buffer.from(t.getRemoteAddressAsText()).toString()},t.onAborted(()=>{Ue("response has been aborted")})}createTransport(e,t){return new mv.default[e](t)}attach(e,t={}){let i=this._computePath(t);e.any(i,this.handleRequest.bind(this)).ws(i,{compression:t.compression,idleTimeout:t.idleTimeout,maxBackpressure:t.maxBackpressure,maxPayloadLength:this.opts.maxHttpBufferSize,upgrade:this.handleUpgrade.bind(this),open:n=>{let r=n.getUserData().transport;r.socket=n,r.writable=!0,r.emit("ready")},message:(n,r,a)=>{n.getUserData().transport.onData(a?r:Buffer.from(r).toString())},close:(n,r,a)=>{n.getUserData().transport.onClose(r,a)}})}_applyMiddlewares(e,t,i){if(this.middlewares.length===0)return i();e.res=new Zn(t),super._applyMiddlewares(e,e.res,n=>{e.res.writeHead(),i(n)})}handleRequest(e,t){Ue('handling "%s" http request "%s"',t.getMethod(),t.getUrl()),this.prepare(t,e),t.res=e;let i=(n,r)=>{if(n!==void 0){this.emit("connection_error",{req:t,code:n,message:et.Server.errorMessages[n],context:r}),this.abortRequest(t.res,n,r);return}if(t._query.sid)Ue("setting new request for existing client"),this.clients[t._query.sid].transport.onRequest(t);else{let a=(o,c)=>this.abortRequest(e,o,c);this.handshake(t._query.transport,t,a)}};this._applyMiddlewares(t,e,n=>{n?i(et.Server.errors.BAD_REQUEST,{name:"MIDDLEWARE_FAILURE"}):this.verify(t,!1,i)})}handleUpgrade(e,t,i){Ue("on upgrade"),this.prepare(t,e),t.res=e;let n=async(r,a)=>{if(r!==void 0){this.emit("connection_error",{req:t,code:r,message:et.Server.errorMessages[r],context:a}),this.abortRequest(e,r,a);return}let o=t._query.sid,c;if(o){let l=this.clients[o];if(l){if(l.upgrading)return Ue("transport has already been trying to upgrade"),e.close();if(l.upgraded)return Ue("transport had already been upgraded"),e.close();Ue("upgrading existing transport"),c=this.createTransport(t._query.transport,t),l._maybeUpgrade(c)}else return Ue("upgrade attempt for closed client"),e.close()}else if(c=await this.handshake(t._query.transport,t,(l,p)=>this.abortRequest(e,l,p)),!c)return;t.res.writeStatus("101 Switching Protocols"),e.upgrade({transport:c},t.getHeader("sec-websocket-key"),t.getHeader("sec-websocket-protocol"),t.getHeader("sec-websocket-extensions"),i)};this._applyMiddlewares(t,e,r=>{r?n(et.Server.errors.BAD_REQUEST,{name:"MIDDLEWARE_FAILURE"}):this.verify(t,!0,n)})}abortRequest(e,t,i){let n=t===et.Server.errors.FORBIDDEN?"403 Forbidden":"400 Bad Request",r=i&&i.message?i.message:et.Server.errorMessages[t];e.writeStatus(n),e.writeHeader("Content-Type","application/json"),e.end(JSON.stringify({code:t,message:r}))}};ri.uServer=Qn;var Zn=class{constructor(e){this.res=e,this.statusWritten=!1,this.headers=[],this.isAborted=!1}set statusCode(e){e&&this.writeStatus(e===200?"200 OK":"204 No Content")}writeHead(e){this.statusCode=e}setHeader(e,t){Array.isArray(t)?t.forEach(i=>{this.writeHeader(e,i)}):this.writeHeader(e,t)}removeHeader(){}getHeader(){}writeStatus(e){if(!this.isAborted)return this.res.writeStatus(e),this.statusWritten=!0,this.writeBufferedHeaders(),this}writeHeader(e,t){this.isAborted||e!=="Content-Length"&&(this.statusWritten?this.res.writeHeader(e,t):this.headers.push([e,t]))}writeBufferedHeaders(){this.headers.forEach(([e,t])=>{this.res.writeHeader(e,t)})}end(e){this.isAborted||this.res.cork(()=>{this.statusWritten||this.writeBufferedHeaders(),this.res.end(e)})}onData(e){this.isAborted||this.res.onData(e)}onAborted(e){this.isAborted||this.res.onAborted(()=>{this.isAborted=!0,e()})}cork(e){this.isAborted||this.res.cork(e)}}});var sl=v(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.protocol=q.Transport=q.Socket=q.uServer=q.parser=q.transports=q.Server=void 0;q.listen=yv;q.attach=tl;var hv=require("http"),Zc=Kn();Object.defineProperty(q,"Server",{enumerable:!0,get:function(){return Zc.Server}});var vv=bn();q.transports=vv.default;var el=Yt();q.parser=el;var xv=Qc();Object.defineProperty(q,"uServer",{enumerable:!0,get:function(){return xv.uServer}});var gv=wn();Object.defineProperty(q,"Socket",{enumerable:!0,get:function(){return gv.Socket}});var bv=Ke();Object.defineProperty(q,"Transport",{enumerable:!0,get:function(){return bv.Transport}});q.protocol=el.protocol;function yv(s,e,t){typeof e=="function"&&(t=e,e={});let i=(0,hv.createServer)(function(r,a){a.writeHead(501),a.end("Not Implemented")}),n=tl(i,e);return n.httpServer=i,i.listen(s,t),n}function tl(s,e){let t=new Zc.Server(e);return t.attach(s,e),t}});var nl=v(il=>{il.Emitter=W;function W(s){if(s)return wv(s)}function wv(s){for(var e in W.prototype)s[e]=W.prototype[e];return s}W.prototype.on=W.prototype.addEventListener=function(s,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+s]=this._callbacks["$"+s]||[]).push(e),this};W.prototype.once=function(s,e){function t(){this.off(s,t),e.apply(this,arguments)}return t.fn=e,this.on(s,t),this};W.prototype.off=W.prototype.removeListener=W.prototype.removeAllListeners=W.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,n=0;n<t.length;n++)if(i=t[n],i===e||i.fn===e){t.splice(n,1);break}return t.length===0&&delete this._callbacks["$"+s],this};W.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,n=t.length;i<n;++i)t[i].apply(this,e)}return this};W.prototype.emitReserved=W.prototype.emit;W.prototype.listeners=function(s){return this._callbacks=this._callbacks||{},this._callbacks["$"+s]||[]};W.prototype.hasListeners=function(s){return!!this.listeners(s).length}});var er=v(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.isBinary=al;oi.hasBinary=ai;var _v=typeof ArrayBuffer=="function",Sv=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s.buffer instanceof ArrayBuffer,rl=Object.prototype.toString,Ev=typeof Blob=="function"||typeof Blob<"u"&&rl.call(Blob)==="[object BlobConstructor]",kv=typeof File=="function"||typeof File<"u"&&rl.call(File)==="[object FileConstructor]";function al(s){return _v&&(s instanceof ArrayBuffer||Sv(s))||Ev&&s instanceof Blob||kv&&s instanceof File}function ai(s,e){if(!s||typeof s!="object")return!1;if(Array.isArray(s)){for(let t=0,i=s.length;t<i;t++)if(ai(s[t]))return!0;return!1}if(al(s))return!0;if(s.toJSON&&typeof s.toJSON=="function"&&arguments.length===1)return ai(s.toJSON(),!0);for(let t in s)if(Object.prototype.hasOwnProperty.call(s,t)&&ai(s[t]))return!0;return!1}});var ol=v(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.deconstructPacket=Tv;ci.reconstructPacket=Ov;var Cv=er();function Tv(s){let e=[],t=s.data,i=s;return i.data=tr(t,e),i.attachments=e.length,{packet:i,buffers:e}}function tr(s,e){if(!s)return s;if((0,Cv.isBinary)(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]=tr(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]=tr(s[i],e));return t}return s}function Ov(s,e){return s.data=sr(s.data,e),delete s.attachments,s}function sr(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]=sr(s[t],e);else if(typeof s=="object")for(let t in s)Object.prototype.hasOwnProperty.call(s,t)&&(s[t]=sr(s[t],e));return s}});var rs=v(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.Decoder=de.Encoder=de.PacketType=de.protocol=void 0;de.isPacketValid=Bv;var Rv=nl(),cl=ol(),ll=er(),Av=M(),ir=(0,Av.default)("socket.io-parser"),pl=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];de.protocol=5;var k;(function(s){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"})(k||(de.PacketType=k={}));var nr=class{constructor(e){this.replacer=e}encode(e){return ir("encoding packet %j",e),(e.type===k.EVENT||e.type===k.ACK)&&(0,ll.hasBinary)(e)?this.encodeAsBinary({type:e.type===k.EVENT?k.BINARY_EVENT:k.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===k.BINARY_EVENT||e.type===k.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)),ir("encoded %j as %s",e,t),t}encodeAsBinary(e){let t=(0,cl.deconstructPacket)(e),i=this.encodeAsString(t.packet),n=t.buffers;return n.unshift(i),n}};de.Encoder=nr;var rr=class s extends Rv.Emitter{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===k.BINARY_EVENT;i||t.type===k.BINARY_ACK?(t.type=i?k.EVENT:k.ACK,this.reconstructor=new ar(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if((0,ll.isBinary)(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(k[i.type]===void 0)throw new Error("unknown packet type "+i.type);if(i.type===k.BINARY_EVENT||i.type===k.BINARY_ACK){let r=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);let a=e.substring(r,t);if(a!=Number(a)||e.charAt(t)!=="-")throw new Error("Illegal attachments");i.attachments=Number(a)}if(e.charAt(t+1)==="/"){let r=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););i.nsp=e.substring(r,t)}else i.nsp="/";let n=e.charAt(t+1);if(n!==""&&Number(n)==n){let r=t+1;for(;++t;){let a=e.charAt(t);if(a==null||Number(a)!=a){--t;break}if(t===e.length)break}i.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){let r=this.tryParse(e.substr(t));if(s.isPayloadValid(i.type,r))i.data=r;else throw new Error("invalid payload")}return ir("decoded %s as %j",e,i),i}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case k.CONNECT:return li(t);case k.DISCONNECT:return t===void 0;case k.CONNECT_ERROR:return typeof t=="string"||li(t);case k.EVENT:case k.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&pl.indexOf(t[0])===-1);case k.ACK:case k.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}};de.Decoder=rr;var ar=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=(0,cl.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function Pv(s){return typeof s=="string"}var jv=Number.isInteger||function(s){return typeof s=="number"&&isFinite(s)&&Math.floor(s)===s};function Mv(s){return s===void 0||jv(s)}function li(s){return Object.prototype.toString.call(s)==="[object Object]"}function Dv(s,e){switch(s){case k.CONNECT:return e===void 0||li(e);case k.DISCONNECT:return e===void 0;case k.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&pl.indexOf(e[0])===-1);case k.ACK:return Array.isArray(e);case k.CONNECT_ERROR:return typeof e=="string"||li(e);default:return!1}}function Bv(s){return Pv(s.nsp)&&Mv(s.id)&&Dv(s.type,s.data)}});var ul=v(kt=>{"use strict";var Iv=kt&&kt.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(kt,"__esModule",{value:!0});kt.Client=void 0;var pi=rs(),Nv=Iv(M()),fe=(0,Nv.default)("socket.io:client"),or=class{constructor(e,t){this.sockets=new Map,this.nsps=new Map,this.server=e,this.conn=t,this.encoder=e.encoder,this.decoder=new e._parser.Decoder,this.id=t.id,this.setup()}get request(){return this.conn.request}setup(){this.onclose=this.onclose.bind(this),this.ondata=this.ondata.bind(this),this.onerror=this.onerror.bind(this),this.ondecoded=this.ondecoded.bind(this),this.decoder.on("decoded",this.ondecoded),this.conn.on("data",this.ondata),this.conn.on("error",this.onerror),this.conn.on("close",this.onclose),this.connectTimeout=setTimeout(()=>{this.nsps.size===0?(fe("no namespace joined yet, close the client"),this.close()):fe("the client has already joined a namespace, nothing to do")},this.server._connectTimeout)}connect(e,t={}){if(this.server._nsps.has(e))return fe("connecting to namespace %s",e),this.doConnect(e,t);this.server._checkNamespace(e,t,i=>{i?this.doConnect(e,t):(fe("creation of namespace %s was denied",e),this._packet({type:pi.PacketType.CONNECT_ERROR,nsp:e,data:{message:"Invalid namespace"}}))})}doConnect(e,t){let i=this.server.of(e);i._add(this,t,n=>{this.sockets.set(n.id,n),this.nsps.set(i.name,n),this.connectTimeout&&(clearTimeout(this.connectTimeout),this.connectTimeout=void 0)})}_disconnect(){for(let e of this.sockets.values())e.disconnect();this.sockets.clear(),this.close()}_remove(e){if(this.sockets.has(e.id)){let t=this.sockets.get(e.id).nsp.name;this.sockets.delete(e.id),this.nsps.delete(t)}else fe("ignoring remove for %s",e.id)}close(){this.conn.readyState==="open"&&(fe("forcing transport close"),this.conn.close(),this.onclose("forced server close"))}_packet(e,t={}){if(this.conn.readyState!=="open"){fe("ignoring packet write %j",e);return}let i=t.preEncoded?e:this.encoder.encode(e);this.writeToEngine(i,t)}writeToEngine(e,t){if(t.volatile&&!this.conn.transport.writable){fe("volatile packet is discarded since the transport is not currently writable");return}let i=Array.isArray(e)?e:[e];for(let n of i)this.conn.write(n,t)}ondata(e){try{this.decoder.add(e)}catch(t){fe("invalid packet format"),this.onerror(t)}}ondecoded(e){let{namespace:t,authPayload:i}=this._parseNamespace(e),n=this.nsps.get(t);!n&&e.type===pi.PacketType.CONNECT?this.connect(t,i):n&&e.type!==pi.PacketType.CONNECT&&e.type!==pi.PacketType.CONNECT_ERROR?process.nextTick(function(){n._onpacket(e)}):(fe("invalid state (packet type: %s)",e.type),this.close())}_parseNamespace(e){if(this.conn.protocol!==3)return{namespace:e.nsp,authPayload:e.data};let t=new URL(e.nsp,"https://socket.io");return{namespace:t.pathname,authPayload:Object.fromEntries(t.searchParams.entries())}}onerror(e){for(let t of this.sockets.values())t._onerror(e);this.conn.close()}onclose(e,t){fe("client close with reason %s",e),this.destroy();for(let i of this.sockets.values())i._onclose(e,t);this.sockets.clear(),this.decoder.destroy()}destroy(){this.conn.removeListener("data",this.ondata),this.conn.removeListener("error",this.onerror),this.conn.removeListener("close",this.onclose),this.decoder.removeListener("decoded",this.ondecoded),this.connectTimeout&&(clearTimeout(this.connectTimeout),this.connectTimeout=void 0)}};kt.Client=or});var di=v(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.StrictEventEmitter=void 0;var Lv=require("events"),cr=class extends Lv.EventEmitter{on(e,t){return super.on(e,t)}once(e,t){return super.once(e,t)}emit(e,...t){return super.emit(e,...t)}emitReserved(e,...t){return super.emit(e,...t)}emitUntyped(e,...t){return super.emit(e,...t)}listeners(e){return super.listeners(e)}};ui.StrictEventEmitter=cr});var lr=v(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.RESERVED_EVENTS=void 0;fi.RESERVED_EVENTS=new Set(["connect","connect_error","disconnect","disconnecting","newListener","removeListener"])});var pr=v(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.RemoteSocket=Ct.BroadcastOperator=void 0;var qv=lr(),Fv=rs(),mi=class s{constructor(e,t=new Set,i=new Set,n={}){this.adapter=e,this.rooms=t,this.exceptRooms=i,this.flags=n}to(e){let t=new Set(this.rooms);return Array.isArray(e)?e.forEach(i=>t.add(i)):t.add(e),new s(this.adapter,t,this.exceptRooms,this.flags)}in(e){return this.to(e)}except(e){let t=new Set(this.exceptRooms);return Array.isArray(e)?e.forEach(i=>t.add(i)):t.add(e),new s(this.adapter,this.rooms,t,this.flags)}compress(e){let t=Object.assign({},this.flags,{compress:e});return new s(this.adapter,this.rooms,this.exceptRooms,t)}get volatile(){let e=Object.assign({},this.flags,{volatile:!0});return new s(this.adapter,this.rooms,this.exceptRooms,e)}get local(){let e=Object.assign({},this.flags,{local:!0});return new s(this.adapter,this.rooms,this.exceptRooms,e)}timeout(e){let t=Object.assign({},this.flags,{timeout:e});return new s(this.adapter,this.rooms,this.exceptRooms,t)}emit(e,...t){if(qv.RESERVED_EVENTS.has(e))throw new Error(`"${String(e)}" is a reserved event name`);let i=[e,...t],n={type:Fv.PacketType.EVENT,data:i};if(!(typeof i[i.length-1]=="function"))return this.adapter.broadcast(n,{rooms:this.rooms,except:this.exceptRooms,flags:this.flags}),!0;let a=i.pop(),o=!1,c=[],l=setTimeout(()=>{o=!0,a.apply(this,[new Error("operation has timed out"),this.flags.expectSingleResponse?null:c])},this.flags.timeout),p=-1,u=0,d=0,h=()=>{!o&&p===u&&c.length===d&&(clearTimeout(l),a.apply(this,[null,this.flags.expectSingleResponse?c[0]:c]))};return this.adapter.broadcastWithAck(n,{rooms:this.rooms,except:this.exceptRooms,flags:this.flags},m=>{d+=m,u++,h()},m=>{c.push(m),h()}),this.adapter.serverCount().then(m=>{p=m,h()}),!0}emitWithAck(e,...t){return new Promise((i,n)=>{t.push((r,a)=>r?(r.responses=a,n(r)):i(a)),this.emit(e,...t)})}allSockets(){if(!this.adapter)throw new Error("No adapter for this namespace, are you trying to get the list of clients of a dynamic namespace?");return this.adapter.sockets(this.rooms)}fetchSockets(){return this.adapter.fetchSockets({rooms:this.rooms,except:this.exceptRooms,flags:this.flags}).then(e=>e.map(t=>t.server?t:new hi(this.adapter,t)))}socketsJoin(e){this.adapter.addSockets({rooms:this.rooms,except:this.exceptRooms,flags:this.flags},Array.isArray(e)?e:[e])}socketsLeave(e){this.adapter.delSockets({rooms:this.rooms,except:this.exceptRooms,flags:this.flags},Array.isArray(e)?e:[e])}disconnectSockets(e=!1){this.adapter.disconnectSockets({rooms:this.rooms,except:this.exceptRooms,flags:this.flags},e)}};Ct.BroadcastOperator=mi;var hi=class{constructor(e,t){this.id=t.id,this.handshake=t.handshake,this.rooms=new Set(t.rooms),this.data=t.data,this.operator=new mi(e,new Set([this.id]),new Set,{expectSingleResponse:!0})}timeout(e){return this.operator.timeout(e)}emit(e,...t){return this.operator.emit(e,...t)}join(e){return this.operator.socketsJoin(e)}leave(e){return this.operator.socketsLeave(e)}disconnect(e=!1){return this.operator.disconnectSockets(e),this}};Ct.RemoteSocket=hi});var dr=v(Tt=>{"use strict";var ml=Tt&&Tt.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Tt,"__esModule",{value:!0});Tt.Socket=void 0;var oe=rs(),Uv=ml(M()),Hv=di(),dl=ml(Ji()),zv=pr(),Wv=lr(),U=(0,Uv.default)("socket.io:socket"),$v=new Set(["transport error","transport close","forced close","ping timeout","server shutting down","forced server close"]);function fl(){}var ur=class extends Hv.StrictEventEmitter{constructor(e,t,i,n){super(),this.nsp=e,this.client=t,this.recovered=!1,this.data={},this.connected=!1,this.acks=new Map,this.fns=[],this.flags={},this.server=e.server,this.adapter=e.adapter,n?(this.id=n.sid,this.pid=n.pid,n.rooms.forEach(r=>this.join(r)),this.data=n.data,n.missedPackets.forEach(r=>{this.packet({type:oe.PacketType.EVENT,data:r})}),this.recovered=!0):(t.conn.protocol===3?this.id=e.name!=="/"?e.name+"#"+t.id:t.id:this.id=dl.default.generateId(),this.server._opts.connectionStateRecovery&&(this.pid=dl.default.generateId())),this.handshake=this.buildHandshake(i),this.on("error",fl)}buildHandshake(e){var t,i,n,r;return{headers:((t=this.request)===null||t===void 0?void 0:t.headers)||{},time:new Date+"",address:this.conn.remoteAddress,xdomain:!!(!((i=this.request)===null||i===void 0)&&i.headers.origin),secure:!this.request||!!this.request.connection.encrypted,issued:+new Date,url:(n=this.request)===null||n===void 0?void 0:n.url,query:((r=this.request)===null||r===void 0?void 0:r._query)||{},auth:e}}emit(e,...t){if(Wv.RESERVED_EVENTS.has(e))throw new Error(`"${String(e)}" is a reserved event name`);let i=[e,...t],n={type:oe.PacketType.EVENT,data:i};if(typeof i[i.length-1]=="function"){let a=this.nsp._ids++;U("emitting packet with ack id %d",a),this.registerAckCallback(a,i.pop()),n.id=a}let r=Object.assign({},this.flags);return this.flags={},this.nsp.server.opts.connectionStateRecovery?this.adapter.broadcast(n,{rooms:new Set([this.id]),except:new Set,flags:r}):(this.notifyOutgoingListeners(n),this.packet(n,r)),!0}emitWithAck(e,...t){let i=this.flags.timeout!==void 0;return new Promise((n,r)=>{t.push((a,o)=>i?a?r(a):n(o):n(a)),this.emit(e,...t)})}registerAckCallback(e,t){let i=this.flags.timeout;if(i===void 0){this.acks.set(e,t);return}let n=setTimeout(()=>{U("event with ack id %d has timed out after %d ms",e,i),this.acks.delete(e),t.call(this,new Error("operation has timed out"))},i);this.acks.set(e,(...r)=>{clearTimeout(n),t.apply(this,[null,...r])})}to(e){return this.newBroadcastOperator().to(e)}in(e){return this.newBroadcastOperator().in(e)}except(e){return this.newBroadcastOperator().except(e)}send(...e){return this.emit("message",...e),this}write(...e){return this.emit("message",...e),this}packet(e,t={}){e.nsp=this.nsp.name,t.compress=t.compress!==!1,this.client._packet(e,t)}join(e){return U("join room %s",e),this.adapter.addAll(this.id,new Set(Array.isArray(e)?e:[e]))}leave(e){return U("leave room %s",e),this.adapter.del(this.id,e)}leaveAll(){this.adapter.delAll(this.id)}_onconnect(){U("socket connected - writing packet"),this.connected=!0,this.join(this.id),this.conn.protocol===3?this.packet({type:oe.PacketType.CONNECT}):this.packet({type:oe.PacketType.CONNECT,data:{sid:this.id,pid:this.pid}})}_onpacket(e){switch(U("got packet %j",e),e.type){case oe.PacketType.EVENT:this.onevent(e);break;case oe.PacketType.BINARY_EVENT:this.onevent(e);break;case oe.PacketType.ACK:this.onack(e);break;case oe.PacketType.BINARY_ACK:this.onack(e);break;case oe.PacketType.DISCONNECT:this.ondisconnect();break}}onevent(e){let t=e.data||[];if(U("emitting event %j",t),e.id!=null&&(U("attaching ack callback to event"),t.push(this.ack(e.id))),this._anyListeners&&this._anyListeners.length){let i=this._anyListeners.slice();for(let n of i)n.apply(this,t)}this.dispatch(t)}ack(e){let t=this,i=!1;return function(){if(i)return;let n=Array.prototype.slice.call(arguments);U("sending ack %j",n),t.packet({id:e,type:oe.PacketType.ACK,data:n}),i=!0}}onack(e){let t=this.acks.get(e.id);typeof t=="function"?(U("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),this.acks.delete(e.id)):U("bad ack %s",e.id)}ondisconnect(){U("got disconnect packet"),this._onclose("client namespace disconnect")}_onerror(e){this.emitReserved("error",e)}_onclose(e,t){if(!this.connected)return this;U("closing socket - reason %s",e),this.emitReserved("disconnecting",e,t),this.server._opts.connectionStateRecovery&&$v.has(e)&&(U("connection state recovery is enabled for sid %s",this.id),this.adapter.persistSession({sid:this.id,pid:this.pid,rooms:[...this.rooms],data:this.data})),this._cleanup(),this.client._remove(this),this.connected=!1,this.emitReserved("disconnect",e,t)}_cleanup(){this.leaveAll(),this.nsp._remove(this),this.join=fl}_error(e){this.packet({type:oe.PacketType.CONNECT_ERROR,data:e})}disconnect(e=!1){return this.connected?(e?this.client._disconnect():(this.packet({type:oe.PacketType.DISCONNECT}),this._onclose("server namespace disconnect")),this):this}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}get broadcast(){return this.newBroadcastOperator()}get local(){return this.newBroadcastOperator().local}timeout(e){return this.flags.timeout=e,this}dispatch(e){U("dispatching an event %j",e),this.run(e,t=>{process.nextTick(()=>{if(t)return this._onerror(t);this.connected?super.emitUntyped.apply(this,e):U("ignore packet received after disconnection")})})}use(e){return this.fns.push(e),this}run(e,t){if(!this.fns.length)return t();let i=this.fns.slice(0);function n(r){i[r](e,a=>{if(a)return t(a);if(!i[r+1])return t();n(r+1)})}n(0)}get disconnected(){return!this.connected}get request(){return this.client.request}get conn(){return this.client.conn}get rooms(){return this.adapter.socketRooms(this.id)||new Set}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)}}newBroadcastOperator(){let e=Object.assign({},this.flags);return this.flags={},new zv.BroadcastOperator(this.adapter,new Set,new Set([this.id]),e)}};Tt.Socket=ur});var mr=v(Re=>{"use strict";var Vv=Re&&Re.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Re,"__esModule",{value:!0});Re.Namespace=Re.RESERVED_EVENTS=void 0;var hl=dr(),Gv=di(),Kv=Vv(M()),se=pr(),Ot=(0,Kv.default)("socket.io:namespace");Re.RESERVED_EVENTS=new Set(["connect","connection","new_namespace"]);var fr=class extends Gv.StrictEventEmitter{constructor(e,t){super(),this.sockets=new Map,this._preConnectSockets=new Map,this._fns=[],this._ids=0,this.server=e,this.name=t,this._initAdapter()}_initAdapter(){this.adapter=new(this.server.adapter())(this),Promise.resolve(this.adapter.init()).catch(e=>{Ot("error while initializing adapter: %s",e)})}use(e){return this._fns.push(e),this}run(e,t){if(!this._fns.length)return t();let i=this._fns.slice(0);function n(r){i[r](e,a=>{if(a)return t(a);if(!i[r+1])return t();n(r+1)})}n(0)}to(e){return new se.BroadcastOperator(this.adapter).to(e)}in(e){return new se.BroadcastOperator(this.adapter).in(e)}except(e){return new se.BroadcastOperator(this.adapter).except(e)}async _add(e,t,i){var n;Ot("adding socket to nsp %s",this.name);let r=await this._createSocket(e,t);if(this._preConnectSockets.set(r.id,r),!((n=this.server.opts.connectionStateRecovery)===null||n===void 0)&&n.skipMiddlewares&&r.recovered&&e.conn.readyState==="open")return this._doConnect(r,i);this.run(r,a=>{process.nextTick(()=>{if(e.conn.readyState!=="open"){Ot("next called after client was closed - ignoring socket"),r._cleanup();return}if(a)return Ot("middleware error, sending CONNECT_ERROR packet to the client"),r._cleanup(),e.conn.protocol===3?r._error(a.data||a.message):r._error({message:a.message,data:a.data});this._doConnect(r,i)})})}async _createSocket(e,t){let i=t.pid,n=t.offset;if(this.server.opts.connectionStateRecovery&&typeof i=="string"&&typeof n=="string"){let r;try{r=await this.adapter.restoreSession(i,n)}catch(a){Ot("error while restoring session: %s",a)}if(r)return Ot("connection state recovered for sid %s",r.sid),new hl.Socket(this,e,t,r)}return new hl.Socket(this,e,t)}_doConnect(e,t){this._preConnectSockets.delete(e.id),this.sockets.set(e.id,e),e._onconnect(),t&&t(e),this.emitReserved("connect",e),this.emitReserved("connection",e)}_remove(e){this.sockets.delete(e.id)||this._preConnectSockets.delete(e.id)}emit(e,...t){return new se.BroadcastOperator(this.adapter).emit(e,...t)}send(...e){return this.emit("message",...e),this}write(...e){return this.emit("message",...e),this}serverSideEmit(e,...t){if(Re.RESERVED_EVENTS.has(e))throw new Error(`"${String(e)}" is a reserved event name`);return t.unshift(e),this.adapter.serverSideEmit(t),!0}serverSideEmitWithAck(e,...t){return new Promise((i,n)=>{t.push((r,a)=>r?(r.responses=a,n(r)):i(a)),this.serverSideEmit(e,...t)})}_onServerSideEmit(e){super.emitUntyped.apply(this,e)}allSockets(){return new se.BroadcastOperator(this.adapter).allSockets()}compress(e){return new se.BroadcastOperator(this.adapter).compress(e)}get volatile(){return new se.BroadcastOperator(this.adapter).volatile}get local(){return new se.BroadcastOperator(this.adapter).local}timeout(e){return new se.BroadcastOperator(this.adapter).timeout(e)}fetchSockets(){return new se.BroadcastOperator(this.adapter).fetchSockets()}socketsJoin(e){return new se.BroadcastOperator(this.adapter).socketsJoin(e)}socketsLeave(e){return new se.BroadcastOperator(this.adapter).socketsLeave(e)}disconnectSockets(e=!1){return new se.BroadcastOperator(this.adapter).disconnectSockets(e)}};Re.Namespace=fr});var yl=v(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});as.encode=hr;as.decode=Yv;as.yeast=Xv;var gl="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),vi=64,bl={},vl=0,He=0,xl;function hr(s){let e="";do e=gl[s%vi]+e,s=Math.floor(s/vi);while(s>0);return e}function Yv(s){let e=0;for(He=0;He<s.length;He++)e=e*vi+bl[s.charAt(He)];return e}function Xv(){let s=hr(+new Date);return s!==xl?(vl=0,xl=s):s+"."+hr(vl++)}for(;He<vi;He++)bl[gl[He]]=He});var gr=v(Rt=>{"use strict";var vr;Object.defineProperty(Rt,"__esModule",{value:!0});Rt.SessionAwareAdapter=Rt.Adapter=void 0;var Jv=require("events"),Qv=yl(),xi=Wn(),Zv=typeof((vr=xi?.Sender)===null||vr===void 0?void 0:vr.frame)=="function",gi=class extends Jv.EventEmitter{constructor(e){super(),this.nsp=e,this.rooms=new Map,this.sids=new Map,this.encoder=e.server.encoder}init(){}close(){}serverCount(){return Promise.resolve(1)}addAll(e,t){this.sids.has(e)||this.sids.set(e,new Set);for(let i of t)this.sids.get(e).add(i),this.rooms.has(i)||(this.rooms.set(i,new Set),this.emit("create-room",i)),this.rooms.get(i).has(e)||(this.rooms.get(i).add(e),this.emit("join-room",i,e))}del(e,t){this.sids.has(e)&&this.sids.get(e).delete(t),this._del(t,e)}_del(e,t){let i=this.rooms.get(e);i!=null&&(i.delete(t)&&this.emit("leave-room",e,t),i.size===0&&this.rooms.delete(e)&&this.emit("delete-room",e))}delAll(e){if(this.sids.has(e)){for(let t of this.sids.get(e))this._del(t,e);this.sids.delete(e)}}broadcast(e,t){let i=t.flags||{},n={preEncoded:!0,volatile:i.volatile,compress:i.compress};e.nsp=this.nsp.name;let r=this._encode(e,n);this.apply(t,a=>{typeof a.notifyOutgoingListeners=="function"&&a.notifyOutgoingListeners(e),a.client.writeToEngine(r,n)})}broadcastWithAck(e,t,i,n){let r=t.flags||{},a={preEncoded:!0,volatile:r.volatile,compress:r.compress};e.nsp=this.nsp.name,e.id=this.nsp._ids++;let o=this._encode(e,a),c=0;this.apply(t,l=>{c++,l.acks.set(e.id,n),typeof l.notifyOutgoingListeners=="function"&&l.notifyOutgoingListeners(e),l.client.writeToEngine(o,a)}),i(c)}_encode(e,t){let i=this.encoder.encode(e);if(Zv&&i.length===1&&typeof i[0]=="string"){let n=Buffer.from("4"+i[0]);t.wsPreEncodedFrame=xi.Sender.frame(n,{readOnly:!1,mask:!1,rsv1:!1,opcode:1,fin:!0})}return i}sockets(e){let t=new Set;return this.apply({rooms:e},i=>{t.add(i.id)}),Promise.resolve(t)}socketRooms(e){return this.sids.get(e)}fetchSockets(e){let t=[];return this.apply(e,i=>{t.push(i)}),Promise.resolve(t)}addSockets(e,t){this.apply(e,i=>{i.join(t)})}delSockets(e,t){this.apply(e,i=>{t.forEach(n=>i.leave(n))})}disconnectSockets(e,t){this.apply(e,i=>{i.disconnect(t)})}apply(e,t){let i=e.rooms,n=this.computeExceptSids(e.except);if(i.size){let r=new Set;for(let a of i)if(this.rooms.has(a))for(let o of this.rooms.get(a)){if(r.has(o)||n.has(o))continue;let c=this.nsp.sockets.get(o);c&&(t(c),r.add(o))}}else for(let[r]of this.sids){if(n.has(r))continue;let a=this.nsp.sockets.get(r);a&&t(a)}}computeExceptSids(e){let t=new Set;if(e&&e.size>0)for(let i of e)this.rooms.has(i)&&this.rooms.get(i).forEach(n=>t.add(n));return t}serverSideEmit(e){console.warn("this adapter does not support the serverSideEmit() functionality")}persistSession(e){}restoreSession(e,t){return null}};Rt.Adapter=gi;var xr=class extends gi{constructor(e){super(e),this.nsp=e,this.sessions=new Map,this.packets=[],this.maxDisconnectionDuration=e.server.opts.connectionStateRecovery.maxDisconnectionDuration,setInterval(()=>{let i=Date.now()-this.maxDisconnectionDuration;this.sessions.forEach((n,r)=>{n.disconnectedAt<i&&this.sessions.delete(r)});for(let n=this.packets.length-1;n>=0;n--)if(this.packets[n].emittedAt<i){this.packets.splice(0,n+1);break}},60*1e3).unref()}persistSession(e){e.disconnectedAt=Date.now(),this.sessions.set(e.pid,e)}restoreSession(e,t){let i=this.sessions.get(e);if(!i)return null;if(i.disconnectedAt+this.maxDisconnectionDuration<Date.now())return this.sessions.delete(e),null;let r=this.packets.findIndex(o=>o.id===t);if(r===-1)return null;let a=[];for(let o=r+1;o<this.packets.length;o++){let c=this.packets[o];ex(i.rooms,c.opts)&&a.push(c.data)}return Promise.resolve(Object.assign(Object.assign({},i),{missedPackets:a}))}broadcast(e,t){var i;let n=e.type===2,r=e.id===void 0,a=((i=t.flags)===null||i===void 0?void 0:i.volatile)===void 0;if(n&&r&&a){let o=(0,Qv.yeast)();e.data.push(o),this.packets.push({id:o,opts:t,data:e.data,emittedAt:Date.now()})}super.broadcast(e,t)}};Rt.SessionAwareAdapter=xr;function ex(s,e){let t=e.rooms.size===0||s.some(n=>e.rooms.has(n)),i=s.every(n=>!e.except.has(n));return t&&i}});var wl=v(be=>{"use strict";var tx=be&&be.__rest||function(s,e){var t={};for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&e.indexOf(i)<0&&(t[i]=s[i]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(s);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(s,i[n])&&(t[i[n]]=s[i[n]]);return t};Object.defineProperty(be,"__esModule",{value:!0});be.ClusterAdapterWithHeartbeat=be.ClusterAdapter=be.MessageType=void 0;var sx=gr(),ix=M(),nx=require("crypto"),A=(0,ix.debug)("socket.io-adapter"),rx="emitter",bi=5e3;function Pt(){return(0,nx.randomBytes)(8).toString("hex")}var y;(function(s){s[s.INITIAL_HEARTBEAT=1]="INITIAL_HEARTBEAT",s[s.HEARTBEAT=2]="HEARTBEAT",s[s.BROADCAST=3]="BROADCAST",s[s.SOCKETS_JOIN=4]="SOCKETS_JOIN",s[s.SOCKETS_LEAVE=5]="SOCKETS_LEAVE",s[s.DISCONNECT_SOCKETS=6]="DISCONNECT_SOCKETS",s[s.FETCH_SOCKETS=7]="FETCH_SOCKETS",s[s.FETCH_SOCKETS_RESPONSE=8]="FETCH_SOCKETS_RESPONSE",s[s.SERVER_SIDE_EMIT=9]="SERVER_SIDE_EMIT",s[s.SERVER_SIDE_EMIT_RESPONSE=10]="SERVER_SIDE_EMIT_RESPONSE",s[s.BROADCAST_CLIENT_COUNT=11]="BROADCAST_CLIENT_COUNT",s[s.BROADCAST_ACK=12]="BROADCAST_ACK",s[s.ADAPTER_CLOSE=13]="ADAPTER_CLOSE"})(y||(be.MessageType=y={}));function tt(s){return{rooms:[...s.rooms],except:[...s.except],flags:s.flags}}function At(s){return{rooms:new Set(s.rooms),except:new Set(s.except),flags:s.flags}}var yi=class extends sx.Adapter{constructor(e){super(e),this.requests=new Map,this.ackRequests=new Map,this.uid=Pt()}onMessage(e,t){if(e.uid===this.uid)return A("[%s] ignore message from self",this.uid);if(e.nsp!==this.nsp.name)return A("[%s] ignore message from another namespace (%s)",this.uid,e.nsp);switch(A("[%s] new event of type %d from %s",this.uid,e.type,e.uid),e.type){case y.BROADCAST:{if(e.data.requestId!==void 0)super.broadcastWithAck(e.data.packet,At(e.data.opts),n=>{A("[%s] waiting for %d client acknowledgements",this.uid,n),this.publishResponse(e.uid,{type:y.BROADCAST_CLIENT_COUNT,data:{requestId:e.data.requestId,clientCount:n}})},n=>{A("[%s] received acknowledgement with value %j",this.uid,n),this.publishResponse(e.uid,{type:y.BROADCAST_ACK,data:{requestId:e.data.requestId,packet:n}})});else{let n=e.data.packet,r=At(e.data.opts);this.addOffsetIfNecessary(n,r,t),super.broadcast(n,r)}break}case y.SOCKETS_JOIN:super.addSockets(At(e.data.opts),e.data.rooms);break;case y.SOCKETS_LEAVE:super.delSockets(At(e.data.opts),e.data.rooms);break;case y.DISCONNECT_SOCKETS:super.disconnectSockets(At(e.data.opts),e.data.close);break;case y.FETCH_SOCKETS:{A("[%s] calling fetchSockets with opts %j",this.uid,e.data.opts),super.fetchSockets(At(e.data.opts)).then(i=>{this.publishResponse(e.uid,{type:y.FETCH_SOCKETS_RESPONSE,data:{requestId:e.data.requestId,sockets:i.map(n=>{let r=n.handshake,{sessionStore:a}=r,o=tx(r,["sessionStore"]);return{id:n.id,handshake:o,rooms:[...n.rooms],data:n.data}})}})});break}case y.SERVER_SIDE_EMIT:{let i=e.data.packet;if(!(e.data.requestId!==void 0)){this.nsp._onServerSideEmit(i);return}let r=!1,a=o=>{r||(r=!0,A("[%s] calling acknowledgement with %j",this.uid,o),this.publishResponse(e.uid,{type:y.SERVER_SIDE_EMIT_RESPONSE,data:{requestId:e.data.requestId,packet:o}}))};this.nsp._onServerSideEmit([...i,a]);break}case y.BROADCAST_CLIENT_COUNT:case y.BROADCAST_ACK:case y.FETCH_SOCKETS_RESPONSE:case y.SERVER_SIDE_EMIT_RESPONSE:this.onResponse(e);break;default:A("[%s] unknown message type: %s",this.uid,e.type)}}onResponse(e){var t,i;let n=e.data.requestId;switch(A("[%s] received response %s to request %s",this.uid,e.type,n),e.type){case y.BROADCAST_CLIENT_COUNT:{(t=this.ackRequests.get(n))===null||t===void 0||t.clientCountCallback(e.data.clientCount);break}case y.BROADCAST_ACK:{(i=this.ackRequests.get(n))===null||i===void 0||i.ack(e.data.packet);break}case y.FETCH_SOCKETS_RESPONSE:{let r=this.requests.get(n);if(!r)return;r.current++,e.data.sockets.forEach(a=>r.responses.push(a)),r.current===r.expected&&(clearTimeout(r.timeout),r.resolve(r.responses),this.requests.delete(n));break}case y.SERVER_SIDE_EMIT_RESPONSE:{let r=this.requests.get(n);if(!r)return;r.current++,r.responses.push(e.data.packet),r.current===r.expected&&(clearTimeout(r.timeout),r.resolve(null,r.responses),this.requests.delete(n));break}default:A("[%s] unknown response type: %s",this.uid,e.type)}}async broadcast(e,t){var i;if(!((i=t.flags)===null||i===void 0?void 0:i.local))try{let r=await this.publishAndReturnOffset({type:y.BROADCAST,data:{packet:e,opts:tt(t)}});this.addOffsetIfNecessary(e,t,r)}catch(r){return A("[%s] error while broadcasting message: %s",this.uid,r.message)}super.broadcast(e,t)}addOffsetIfNecessary(e,t,i){var n;if(!this.nsp.server.opts.connectionStateRecovery)return;let r=e.type===2,a=e.id===void 0,o=((n=t.flags)===null||n===void 0?void 0:n.volatile)===void 0;r&&a&&o&&e.data.push(i)}broadcastWithAck(e,t,i,n){var r;if(!((r=t?.flags)===null||r===void 0?void 0:r.local)){let o=Pt();this.ackRequests.set(o,{clientCountCallback:i,ack:n}),this.publish({type:y.BROADCAST,data:{packet:e,requestId:o,opts:tt(t)}}),setTimeout(()=>{this.ackRequests.delete(o)},t.flags.timeout)}super.broadcastWithAck(e,t,i,n)}async addSockets(e,t){var i;if(!((i=e.flags)===null||i===void 0?void 0:i.local))try{await this.publishAndReturnOffset({type:y.SOCKETS_JOIN,data:{opts:tt(e),rooms:t}})}catch(r){A("[%s] error while publishing message: %s",this.uid,r.message)}super.addSockets(e,t)}async delSockets(e,t){var i;if(!((i=e.flags)===null||i===void 0?void 0:i.local))try{await this.publishAndReturnOffset({type:y.SOCKETS_LEAVE,data:{opts:tt(e),rooms:t}})}catch(r){A("[%s] error while publishing message: %s",this.uid,r.message)}super.delSockets(e,t)}async disconnectSockets(e,t){var i;if(!((i=e.flags)===null||i===void 0?void 0:i.local))try{await this.publishAndReturnOffset({type:y.DISCONNECT_SOCKETS,data:{opts:tt(e),close:t}})}catch(r){A("[%s] error while publishing message: %s",this.uid,r.message)}super.disconnectSockets(e,t)}async fetchSockets(e){var t;let[i,n]=await Promise.all([super.fetchSockets(e),this.serverCount()]),r=n-1;if(!((t=e.flags)===null||t===void 0)&&t.local||r<=0)return i;let a=Pt();return new Promise((o,c)=>{let l=setTimeout(()=>{let u=this.requests.get(a);u&&(c(new Error(`timeout reached: only ${u.current} responses received out of ${u.expected}`)),this.requests.delete(a))},e.flags.timeout||bi),p={type:y.FETCH_SOCKETS,resolve:o,timeout:l,current:0,expected:r,responses:i};this.requests.set(a,p),this.publish({type:y.FETCH_SOCKETS,data:{opts:tt(e),requestId:a}})})}async serverSideEmit(e){if(!(typeof e[e.length-1]=="function"))return this.publish({type:y.SERVER_SIDE_EMIT,data:{packet:e}});let i=e.pop(),n=await this.serverCount()-1;if(A('[%s] waiting for %d responses to "serverSideEmit" request',this.uid,n),n<=0)return i(null,[]);let r=Pt(),a=setTimeout(()=>{let c=this.requests.get(r);c&&(i(new Error(`timeout reached: only ${c.current} responses received out of ${c.expected}`),c.responses),this.requests.delete(r))},bi),o={type:y.SERVER_SIDE_EMIT,resolve:i,timeout:a,current:0,expected:n,responses:[]};this.requests.set(r,o),this.publish({type:y.SERVER_SIDE_EMIT,data:{requestId:r,packet:e}})}publish(e){A("[%s] sending message %s",this.uid,e.type),this.publishAndReturnOffset(e).catch(t=>{A("[%s] error while publishing message: %s",this.uid,t)})}publishAndReturnOffset(e){return e.uid=this.uid,e.nsp=this.nsp.name,this.doPublish(e)}publishResponse(e,t){t.uid=this.uid,t.nsp=this.nsp.name,A("[%s] sending response %s to %s",this.uid,t.type,e),this.doPublishResponse(e,t).catch(i=>{A("[%s] error while publishing response: %s",this.uid,i)})}};be.ClusterAdapter=yi;var br=class extends yi{constructor(e,t){super(e),this.nodesMap=new Map,this.customRequests=new Map,this._opts=Object.assign({heartbeatInterval:5e3,heartbeatTimeout:1e4},t),this.cleanupTimer=setInterval(()=>{let i=Date.now();this.nodesMap.forEach((n,r)=>{i-n>this._opts.heartbeatTimeout&&(A("[%s] node %s seems down",this.uid,r),this.removeNode(r))})},1e3)}init(){this.publish({type:y.INITIAL_HEARTBEAT})}scheduleHeartbeat(){this.heartbeatTimer?this.heartbeatTimer.refresh():this.heartbeatTimer=setTimeout(()=>{this.publish({type:y.HEARTBEAT})},this._opts.heartbeatInterval)}close(){this.publish({type:y.ADAPTER_CLOSE}),clearTimeout(this.heartbeatTimer),this.cleanupTimer&&clearInterval(this.cleanupTimer)}onMessage(e,t){if(e.uid===this.uid)return A("[%s] ignore message from self",this.uid);switch(e.uid&&e.uid!==rx&&this.nodesMap.set(e.uid,Date.now()),e.type){case y.INITIAL_HEARTBEAT:this.publish({type:y.HEARTBEAT});break;case y.HEARTBEAT:break;case y.ADAPTER_CLOSE:this.removeNode(e.uid);break;default:super.onMessage(e,t)}}serverCount(){return Promise.resolve(1+this.nodesMap.size)}publish(e){return this.scheduleHeartbeat(),super.publish(e)}async serverSideEmit(e){if(!(typeof e[e.length-1]=="function"))return this.publish({type:y.SERVER_SIDE_EMIT,data:{packet:e}});let i=e.pop(),n=this.nodesMap.size;if(A('[%s] waiting for %d responses to "serverSideEmit" request',this.uid,n),n<=0)return i(null,[]);let r=Pt(),a=setTimeout(()=>{let c=this.customRequests.get(r);c&&(i(new Error(`timeout reached: missing ${c.missingUids.size} responses`),c.responses),this.customRequests.delete(r))},bi),o={type:y.SERVER_SIDE_EMIT,resolve:i,timeout:a,missingUids:new Set([...this.nodesMap.keys()]),responses:[]};this.customRequests.set(r,o),this.publish({type:y.SERVER_SIDE_EMIT,data:{requestId:r,packet:e}})}async fetchSockets(e){var t;let[i,n]=await Promise.all([super.fetchSockets({rooms:e.rooms,except:e.except,flags:{local:!0}}),this.serverCount()]),r=n-1;if(!((t=e.flags)===null||t===void 0)&&t.local||r<=0)return i;let a=Pt();return new Promise((o,c)=>{let l=setTimeout(()=>{let u=this.customRequests.get(a);u&&(c(new Error(`timeout reached: missing ${u.missingUids.size} responses`)),this.customRequests.delete(a))},e.flags.timeout||bi),p={type:y.FETCH_SOCKETS,resolve:o,timeout:l,missingUids:new Set([...this.nodesMap.keys()]),responses:i};this.customRequests.set(a,p),this.publish({type:y.FETCH_SOCKETS,data:{opts:tt(e),requestId:a}})})}onResponse(e){let t=e.data.requestId;switch(A("[%s] received response %s to request %s",this.uid,e.type,t),e.type){case y.FETCH_SOCKETS_RESPONSE:{let i=this.customRequests.get(t);if(!i)return;e.data.sockets.forEach(n=>i.responses.push(n)),i.missingUids.delete(e.uid),i.missingUids.size===0&&(clearTimeout(i.timeout),i.resolve(i.responses),this.customRequests.delete(t));break}case y.SERVER_SIDE_EMIT_RESPONSE:{let i=this.customRequests.get(t);if(!i)return;i.responses.push(e.data.packet),i.missingUids.delete(e.uid),i.missingUids.size===0&&(clearTimeout(i.timeout),i.resolve(null,i.responses),this.customRequests.delete(t));break}default:super.onResponse(e)}}removeNode(e){this.customRequests.forEach((t,i)=>{t.missingUids.delete(e),t.missingUids.size===0&&(clearTimeout(t.timeout),t.type===y.FETCH_SOCKETS?t.resolve(t.responses):t.type===y.SERVER_SIDE_EMIT&&t.resolve(null,t.responses),this.customRequests.delete(i))}),this.nodesMap.delete(e)}};be.ClusterAdapterWithHeartbeat=br});var wi=v(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.MessageType=ce.ClusterAdapterWithHeartbeat=ce.ClusterAdapter=ce.SessionAwareAdapter=ce.Adapter=void 0;var _l=gr();Object.defineProperty(ce,"Adapter",{enumerable:!0,get:function(){return _l.Adapter}});Object.defineProperty(ce,"SessionAwareAdapter",{enumerable:!0,get:function(){return _l.SessionAwareAdapter}});var yr=wl();Object.defineProperty(ce,"ClusterAdapter",{enumerable:!0,get:function(){return yr.ClusterAdapter}});Object.defineProperty(ce,"ClusterAdapterWithHeartbeat",{enumerable:!0,get:function(){return yr.ClusterAdapterWithHeartbeat}});Object.defineProperty(ce,"MessageType",{enumerable:!0,get:function(){return yr.MessageType}})});var kl=v(jt=>{"use strict";var ax=jt&&jt.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(jt,"__esModule",{value:!0});jt.ParentNamespace=void 0;var Sl=mr(),ox=wi(),cx=ax(M()),El=(0,cx.default)("socket.io:parent-namespace"),_i=class s extends Sl.Namespace{constructor(e){super(e,"/_"+s.count++),this.children=new Set}_initAdapter(){this.adapter=new wr(this)}emit(e,...t){return this.children.forEach(i=>{i.emit(e,...t)}),!0}createChild(e){El("creating child namespace %s",e);let t=new Sl.Namespace(this.server,e);if(this._fns.forEach(i=>t.use(i)),this.listeners("connect").forEach(i=>t.on("connect",i)),this.listeners("connection").forEach(i=>t.on("connection",i)),this.children.add(t),this.server._opts.cleanupEmptyChildNamespaces){let i=t._remove;t._remove=n=>{i.call(t,n),t.sockets.size===0&&(El("closing child namespace %s",e),t.adapter.close(),this.server._nsps.delete(t.name),this.children.delete(t))}}return this.server._nsps.set(e,t),this.server.sockets.emitReserved("new_namespace",t),t}fetchSockets(){throw new Error("fetchSockets() is not supported on parent namespaces")}};jt.ParentNamespace=_i;_i.count=0;var wr=class extends ox.Adapter{broadcast(e,t){this.nsp.children.forEach(i=>{i.adapter.broadcast(e,t)})}}});var Pl=v(it=>{"use strict";var lx=it&&it.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(it,"__esModule",{value:!0});it.patchAdapter=ux;it.restoreAdapter=dx;it.serveFile=mx;var st=wi(),Cl=require("fs"),px=lx(M()),Si=(0,px.default)("socket.io:adapter-uws"),_r="",{addAll:Ol,del:Rl,broadcast:Al}=st.Adapter.prototype;function ux(s){st.Adapter.prototype.addAll=function(e,t){let i=!this.sids.has(e);Ol.call(this,e,t);let n=this.nsp.sockets.get(e)||this.nsp._preConnectSockets.get(e);if(n){if(n.conn.transport.name==="websocket"){Tl(this.nsp.name,n,i,t);return}i&&n.conn.on("upgrade",()=>{let r=this.sids.get(e);r&&Tl(this.nsp.name,n,i,r)})}},st.Adapter.prototype.del=function(e,t){Rl.call(this,e,t);let i=this.nsp.sockets.get(e)||this.nsp._preConnectSockets.get(e);if(i&&i.conn.transport.name==="websocket"){let n=i.conn.id,r=i.conn.transport.socket,a=`${this.nsp.name}${_r}${t}`;Si("unsubscribe connection %s from topic %s",n,a),r.unsubscribe(a)}},st.Adapter.prototype.broadcast=function(e,t){if(!(t.rooms.size<=1&&t.except.size===0)){Al.call(this,e,t);return}let n=t.flags||{},r={preEncoded:!0,volatile:n.volatile,compress:n.compress};e.nsp=this.nsp.name;let a=this.encoder.encode(e),o=t.rooms.size===0?this.nsp.name:`${this.nsp.name}${_r}${t.rooms.keys().next().value}`;Si("fast publish to %s",o),a.forEach(c=>{let l=typeof c!="string";s.publish(o,l?c:"4"+c,l)}),this.apply(t,c=>{c.conn.transport.name!=="websocket"&&c.client.writeToEngine(a,r)})}}function Tl(s,e,t,i){let n=e.conn.id,r=e.conn.transport.socket;t&&(Si("subscribe connection %s to topic %s",n,s),r.subscribe(s)),i.forEach(a=>{let o=`${s}${_r}${a}`;Si("subscribe connection %s to topic %s",n,o),r.subscribe(o)})}function dx(){st.Adapter.prototype.addAll=Ol,st.Adapter.prototype.del=Rl,st.Adapter.prototype.broadcast=Al}var fx=s=>{let{buffer:e,byteOffset:t,byteLength:i}=s;return e.slice(t,t+i)};function mx(s,e){let{size:t}=(0,Cl.statSync)(e),i=(0,Cl.createReadStream)(e),n=()=>!i.destroyed&&i.destroy(),r=o=>{throw n(),o},a=o=>{let c=fx(o);s.cork(()=>{let l=s.getWriteOffset(),[p,u]=s.tryEnd(c,t);!u&&!p&&(i.pause(),s.onWritable(d=>{let[h,m]=s.tryEnd(c.slice(d-l),t);return!m&&h&&i.resume(),h}))})};s.onAborted(n),i.on("data",a).on("error",r).on("end",n)}});var jl=v((Ry,hx)=>{hx.exports={name:"socket.io",version:"4.8.3",description:"node.js realtime framework server",keywords:["realtime","framework","websocket","tcp","events","socket","io"],files:["dist/","client-dist/","wrapper.mjs","!**/*.tsbuildinfo"],directories:{doc:"docs/",example:"example/",lib:"lib/",test:"test/"},type:"commonjs",main:"./dist/index.js",exports:{".":{types:"./dist/index.d.ts",import:"./wrapper.mjs",require:"./dist/index.js"},"./package.json":"./package.json"},types:"./dist/index.d.ts",license:"MIT",homepage:"https://github.com/socketio/socket.io/tree/main/packages/socket.io#readme",repository:{type:"git",url:"git+https://github.com/socketio/socket.io.git"},bugs:{url:"https://github.com/socketio/socket.io/issues"},scripts:{compile:"rimraf ./dist && tsc",test:"npm run format:check && npm run compile && npm run test:types && npm run test:unit","test:types":"tsd","test:unit":"nyc mocha --import=tsx --reporter spec --slow 200 --bail --timeout 10000 test/index.ts","format:check":'prettier --check "lib/**/*.ts" "test/**/*.ts"',"format:fix":'prettier --write "lib/**/*.ts" "test/**/*.ts"',prepack:"npm run compile"},dependencies:{accepts:"~1.3.4",base64id:"~2.0.0",cors:"~2.8.5",debug:"~4.4.1","engine.io":"~6.6.0","socket.io-adapter":"~2.5.2","socket.io-parser":"~4.2.4"},contributors:[{name:"Guillermo Rauch",email:"rauchg@gmail.com"},{name:"Arnout Kazemier",email:"info@3rd-eden.com"},{name:"Vladimir Dronnikov",email:"dronnikov@gmail.com"},{name:"Einar Otto Stangvik",email:"einaros@gmail.com"}],engines:{node:">=10.2.0"},tsd:{directory:"test"}}});var Fl=v((H,os)=>{"use strict";var vx=H&&H.__createBinding||(Object.create?(function(s,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,i,n)}):(function(s,e,t,i){i===void 0&&(i=t),s[i]=e[t]})),xx=H&&H.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),gx=H&&H.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&vx(e,s,t);return xx(e,s),e},kr=H&&H.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(H,"__esModule",{value:!0});H.Namespace=H.Socket=H.Server=void 0;var bx=kr(require("http")),yx=require("fs"),Sr=require("zlib"),wx=Es(),Ei=require("stream"),Ml=require("path"),Dl=sl(),_x=ul(),Bl=require("events"),Cr=mr();Object.defineProperty(H,"Namespace",{enumerable:!0,get:function(){return Cr.Namespace}});var Sx=kl(),Il=wi(),Ex=gx(rs()),kx=kr(M()),ql=dr();Object.defineProperty(H,"Socket",{enumerable:!0,get:function(){return ql.Socket}});var Cx=di(),Er=Pl(),Tx=kr(Vn()),$=(0,kx.default)("socket.io:server"),Nl=jl().version,Ll=/\.map/,Mt=class s extends Cx.StrictEventEmitter{constructor(e,t={}){super(),this._nsps=new Map,this.parentNsps=new Map,this.parentNamespacesFromRegExp=new Map,typeof e=="object"&&e instanceof Object&&!e.listen&&(t=e,e=void 0),this.path(t.path||"/socket.io"),this.connectTimeout(t.connectTimeout||45e3),this.serveClient(t.serveClient!==!1),this._parser=t.parser||Ex,this.encoder=new this._parser.Encoder,this.opts=t,t.connectionStateRecovery?(t.connectionStateRecovery=Object.assign({maxDisconnectionDuration:120*1e3,skipMiddlewares:!0},t.connectionStateRecovery),this.adapter(t.adapter||Il.SessionAwareAdapter)):this.adapter(t.adapter||Il.Adapter),t.cleanupEmptyChildNamespaces=!!t.cleanupEmptyChildNamespaces,this.sockets=this.of("/"),(e||typeof e=="number")&&this.attach(e),this.opts.cors&&(this._corsMiddleware=(0,Tx.default)(this.opts.cors))}get _opts(){return this.opts}serveClient(e){return arguments.length?(this._serveClient=e,this):this._serveClient}_checkNamespace(e,t,i){if(this.parentNsps.size===0)return i(!1);let n=this.parentNsps.keys(),r=()=>{let a=n.next();if(a.done)return i(!1);a.value(e,t,(o,c)=>{if(o||!c)return r();if(this._nsps.has(e))return $("dynamic namespace %s already exists",e),i(this._nsps.get(e));let l=this.parentNsps.get(a.value).createChild(e);$("dynamic namespace %s was created",e),i(l)})};r()}path(e){if(!arguments.length)return this._path;this._path=e.replace(/\/$/,"");let t=this._path.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");return this.clientPathRegex=new RegExp("^"+t+"/socket\\.io(\\.msgpack|\\.esm)?(\\.min)?\\.js(\\.map)?(?:\\?|$)"),this}connectTimeout(e){return e===void 0?this._connectTimeout:(this._connectTimeout=e,this)}adapter(e){if(!arguments.length)return this._adapter;this._adapter=e;for(let t of this._nsps.values())t._initAdapter();return this}listen(e,t={}){return this.attach(e,t)}attach(e,t={}){if(typeof e=="function"){let i="You are trying to attach socket.io to an express request handler function. Please pass a http.Server instance.";throw new Error(i)}if(Number(e)==e&&(e=Number(e)),typeof e=="number"){$("creating http server and binding to %d",e);let i=e;e=bx.default.createServer((n,r)=>{r.writeHead(404),r.end()}),e.listen(i)}return Object.assign(t,this.opts),t.path=t.path||this._path,this.initEngine(e,t),this}attachApp(e,t={}){Object.assign(t,this.opts),t.path=t.path||this._path,$("creating uWebSockets.js-based engine with opts %j",t);let i=new Dl.uServer(t);i.attach(e,t),this.bind(i),this._serveClient&&e.get(`${this._path}/*`,(n,r)=>{if(!this.clientPathRegex.test(r.getUrl())){r.setYield(!0);return}let a=r.getUrl().replace(this._path,"").replace(/\?.*$/,"").replace(/^\//,""),o=Ll.test(a),c=o?"map":"source",l='"'+Nl+'"',p="W/"+l,u=r.getHeader("if-none-match");if(u&&(l===u||p===u)){$("serve client %s 304",c),n.writeStatus("304 Not Modified"),n.end();return}$("serve client %s",c),n.writeHeader("cache-control","public, max-age=0"),n.writeHeader("content-type","application/"+(o?"json":"javascript")+"; charset=utf-8"),n.writeHeader("etag",l);let d=Ml.join(__dirname,"../client-dist/",a);(0,Er.serveFile)(n,d)}),(0,Er.patchAdapter)(e)}initEngine(e,t){$("creating engine.io instance with opts %j",t),this.eio=(0,Dl.attach)(e,t),this._serveClient&&this.attachServe(e),this.httpServer=e,this.bind(this.eio)}attachServe(e){$("attaching client serving req handler");let t=e.listeners("request").slice(0);e.removeAllListeners("request"),e.on("request",(i,n)=>{if(this.clientPathRegex.test(i.url))this._corsMiddleware?this._corsMiddleware(i,n,()=>{this.serve(i,n)}):this.serve(i,n);else for(let r=0;r<t.length;r++)t[r].call(e,i,n)})}serve(e,t){let i=e.url.replace(this._path,"").replace(/\?.*$/,""),n=Ll.test(i),r=n?"map":"source",a='"'+Nl+'"',o="W/"+a,c=e.headers["if-none-match"];if(c&&(a===c||o===c)){$("serve client %s 304",r),t.writeHead(304),t.end();return}$("serve client %s",r),t.setHeader("Cache-Control","public, max-age=0"),t.setHeader("Content-Type","application/"+(n?"json":"javascript")+"; charset=utf-8"),t.setHeader("ETag",a),s.sendFile(i,e,t)}static sendFile(e,t,i){let n=(0,yx.createReadStream)(Ml.join(__dirname,"../client-dist/",e)),r=wx(t).encodings(["br","gzip","deflate"]),a=o=>{o&&i.end()};switch(r){case"br":i.writeHead(200,{"content-encoding":"br"}),(0,Ei.pipeline)(n,(0,Sr.createBrotliCompress)(),i,a);break;case"gzip":i.writeHead(200,{"content-encoding":"gzip"}),(0,Ei.pipeline)(n,(0,Sr.createGzip)(),i,a);break;case"deflate":i.writeHead(200,{"content-encoding":"deflate"}),(0,Ei.pipeline)(n,(0,Sr.createDeflate)(),i,a);break;default:i.writeHead(200),(0,Ei.pipeline)(n,i,a)}}bind(e){return this.engine=e,this.engine.on("connection",this.onconnection.bind(this)),this}onconnection(e){$("incoming connection with id %s",e.id);let t=new _x.Client(this,e);return e.protocol===3&&t.connect("/"),this}of(e,t){if(typeof e=="function"||e instanceof RegExp){let n=new Sx.ParentNamespace(this);return $("initializing parent namespace %s",n.name),typeof e=="function"?this.parentNsps.set(e,n):(this.parentNsps.set((r,a,o)=>o(null,e.test(r)),n),this.parentNamespacesFromRegExp.set(e,n)),t&&n.on("connect",t),n}String(e)[0]!=="/"&&(e="/"+e);let i=this._nsps.get(e);if(!i){for(let[n,r]of this.parentNamespacesFromRegExp)if(n.test(e))return $("attaching namespace %s to parent namespace %s",e,n),r.createChild(e);$("initializing namespace %s",e),i=new Cr.Namespace(this,e),this._nsps.set(e,i),e!=="/"&&this.sockets.emitReserved("new_namespace",i)}return t&&i.on("connect",t),i}async close(e){if(await Promise.allSettled([...this._nsps.values()].map(async t=>{t.sockets.forEach(i=>{i._onclose("server shutting down")}),await t.adapter.close()})),this.engine.close(),(0,Er.restoreAdapter)(),this.httpServer)return new Promise(t=>{this.httpServer.close(i=>{e&&e(i),i&&$("server was not running"),t()})});e&&e()}use(e){return this.sockets.use(e),this}to(e){return this.sockets.to(e)}in(e){return this.sockets.in(e)}except(e){return this.sockets.except(e)}send(...e){return this.sockets.emit("message",...e),this}write(...e){return this.sockets.emit("message",...e),this}serverSideEmit(e,...t){return this.sockets.serverSideEmit(e,...t)}serverSideEmitWithAck(e,...t){return this.sockets.serverSideEmitWithAck(e,...t)}allSockets(){return this.sockets.allSockets()}compress(e){return this.sockets.compress(e)}get volatile(){return this.sockets.volatile}get local(){return this.sockets.local}timeout(e){return this.sockets.timeout(e)}fetchSockets(){return this.sockets.fetchSockets()}socketsJoin(e){return this.sockets.socketsJoin(e)}socketsLeave(e){return this.sockets.socketsLeave(e)}disconnectSockets(e=!1){return this.sockets.disconnectSockets(e)}};H.Server=Mt;var Ox=Object.keys(Bl.EventEmitter.prototype).filter(function(s){return typeof Bl.EventEmitter.prototype[s]=="function"});Ox.forEach(function(s){Mt.prototype[s]=function(){return this.sockets[s].apply(this.sockets,arguments)}});os.exports=(s,e)=>new Mt(s,e);os.exports.Server=Mt;os.exports.Namespace=Cr.Namespace;os.exports.Socket=ql.Socket});var Wl={};Ve(Wl,{TileManager:()=>Tr});var ki,Dt,Ci,zl,Rx,Ax,Tr,$l=$e(()=>{ki=R(require("sharp"),1),Dt=R(require("fs"),1),Ci=R(require("path"),1),zl=require("url"),Rx=(0,zl.fileURLToPath)(__importMetaUrl),Ax=Ci.default.dirname(Rx),Tr=class{constructor(e){this.robot=e,this.tileSize=100,this.lastTileChecksums=new Map,this.screenWidth=0,this.screenHeight=0,this.tilesPerRow=0,this.tilesPerColumn=0,this.totalTiles=0,this.frameCount=0,this.tempDir=Ci.default.join(Ax,"../../temp"),this.compressionQuality=1,this.changeThreshold=1,this.scaleFactor=.99,this.scaledWidth=0,this.scaledHeight=0,this.isProcessing=!1,this.sharedScreenCache=null,this.lastCaptureTime=0,this.CACHE_TTL=100,this.dpiScale=1,this.captureWidth=0,this.captureHeight=0,Dt.default.existsSync(this.tempDir)||Dt.default.mkdirSync(this.tempDir,{recursive:!0}),this.initializeScreenDimensions()}initializeScreenDimensions(){try{let{width:e,height:t}=this.robot.getScreenSize();this.screenWidth=e,this.screenHeight=t,this.detectDpiScale(),this.scaledWidth=Math.floor(e*this.scaleFactor),this.scaledHeight=Math.floor(t*this.scaleFactor),this.tilesPerRow=Math.ceil(this.scaledWidth/this.tileSize),this.tilesPerColumn=Math.ceil(this.scaledHeight/this.tileSize),this.totalTiles=this.tilesPerRow*this.tilesPerColumn;let i=100;if(this.totalTiles>i){let n=Math.ceil(Math.sqrt(this.scaledWidth*this.scaledHeight/i));this.tileSize=Math.max(n,120),this.tilesPerRow=Math.ceil(this.scaledWidth/this.tileSize),this.tilesPerColumn=Math.ceil(this.scaledHeight/this.tileSize),this.totalTiles=this.tilesPerRow*this.tilesPerColumn}console.log(`\u{1F5A5}\uFE0F TileManager: ${e}x${t} (DPI ${this.dpiScale}x) -> ${this.totalTiles} tiles`)}catch(e){console.error("Screen dimensions error:",e),this.screenWidth=1920,this.screenHeight=1080,this.dpiScale=1,this.captureWidth=1920,this.captureHeight=1080,this.scaledWidth=1728,this.scaledHeight=972,this.tileSize=120,this.tilesPerRow=Math.ceil(this.scaledWidth/this.tileSize),this.tilesPerColumn=Math.ceil(this.scaledHeight/this.tileSize),this.totalTiles=this.tilesPerRow*this.tilesPerColumn}}detectDpiScale(){if(process.platform==="darwin"){let e=this.robot.screen.capture(0,0,1,1);this.dpiScale=e.byteWidth/e.bytesPerPixel}else{let e=Math.min(this.screenWidth*2,4096),t=Math.min(this.screenHeight*2,4096),i=this.robot.screen.capture(0,0,e,t),n=i.byteWidth/i.bytesPerPixel;n>this.screenWidth?this.dpiScale=n/this.screenWidth:this.dpiScale=1}this.captureWidth=Math.floor(this.screenWidth*this.dpiScale),this.captureHeight=Math.floor(this.screenHeight*this.dpiScale)}async captureFullScreen(){let e=this.robot.screen.capture(0,0,this.captureWidth,this.captureHeight),t=Buffer.from(e.image);for(let c=0;c<t.length;c+=4){let l=t[c],p=t[c+2];t[c]=p,t[c+2]=l}let i=e.byteWidth/e.bytesPerPixel,n=e.height,r=t,a=i,o=n;if(this.dpiScale>1||this.scaleFactor<1){let c=Math.floor(this.screenWidth*this.scaleFactor),l=Math.floor(this.screenHeight*this.scaleFactor);r=await(0,ki.default)(t,{raw:{width:i,height:n,channels:e.bytesPerPixel}}).resize(c,l,{kernel:ki.default.kernel.nearest,fit:"fill"}).raw().toBuffer(),a=c,o=l}return{buffer:r,width:a,height:o,channels:e.bytesPerPixel}}async getSharedScreenCapture(){let e=Date.now();return this.sharedScreenCache&&e-this.lastCaptureTime<this.CACHE_TTL?this.sharedScreenCache:(this.sharedScreenCache=await this.captureFullScreen(),this.lastCaptureTime=e,this.sharedScreenCache)}clearScreenCache(){}async detectChangedTiles(){if(this.isProcessing)return[];this.isProcessing=!0;try{let e=await this.getSharedScreenCapture(),t=[],i=[];this.frameCount++;let n=[];for(let a=0;a<this.totalTiles;a++)n[a]=this.extractTile(e,a);if(this.lastTileChecksums.size===0){let a=n.map((c,l)=>this.processTileAsync(e,l,c)),o=await Promise.all(a);return t.push(...o),t}for(let a=0;a<this.totalTiles;a++){let o=this.calculateTileChecksum(n[a].buffer),c=this.lastTileChecksums.get(a);o!==c&&(i.push(a),this.lastTileChecksums.set(a,o))}if(i.length/this.totalTiles>this.changeThreshold){let a=n.map((c,l)=>this.processTileAsync(e,l,c)),o=await Promise.all(a);t.push(...o.map(c=>({...c,fullRefresh:!0})))}else if(i.length>0){let a=i.map(c=>this.processTileAsync(e,c,n[c])),o=await Promise.all(a);t.push(...o)}return t}finally{this.isProcessing=!1}}async processTileAsync(e,t,i=null){let n=i||this.extractTile(e,t),r=this.calculateTileChecksum(n.buffer);this.lastTileChecksums.set(t,r);let a=await this.compressTileImage(n.buffer,n.width,n.height),{row:o,col:c}=this.getTilePosition(t);return{type:"tile-update",tileIndex:t,x:c*this.tileSize,y:o*this.tileSize,width:n.width,height:n.height,imageBase64:a,size:Math.round(a.length*.75/1024),timestamp:Date.now(),frameCount:this.frameCount}}calculateTileChecksum(e){let t=0;for(let i=0;i<e.length;i+=64)t+=e[i]||0,t^=e[i+1]||0,t+=(e[i+2]||0)<<1,t^=(e[i+3]||0)<<2;return t>>>0}getTilePosition(e){return{row:Math.floor(e/this.tilesPerRow),col:e%this.tilesPerRow}}extractTile(e,t){let{row:i,col:n}=this.getTilePosition(t),r=n*this.tileSize,a=i*this.tileSize,o=Math.min(r+this.tileSize,e.width),c=Math.min(a+this.tileSize,e.height),l=o-r,p=c-a,u=e.channels,d=l*u,h=Buffer.alloc(l*p*u);for(let m=0;m<p;m++){let f=((a+m)*e.width+r)*u,x=m*d;e.buffer.copy(h,x,f,f+d)}return{buffer:h,width:l,height:p,channels:u,tileIndex:t,x:r,y:a}}async compressTileImage(e,t,i){return`data:image/webp;base64,${(await(0,ki.default)(e,{raw:{width:t,height:i,channels:4}}).webp({quality:85,effort:2,smartSubsample:!0}).toBuffer()).toString("base64")}`}async getScreenDimensions(){try{let e=await this.captureFullScreen();this.scaledWidth=e.width,this.scaledHeight=e.height,this.tilesPerRow=Math.ceil(e.width/this.tileSize),this.tilesPerColumn=Math.ceil(e.height/this.tileSize),this.totalTiles=this.tilesPerRow*this.tilesPerColumn}catch(e){console.error("Error getting dimensions:",e)}return{width:this.scaledWidth,height:this.scaledHeight,tileWidth:this.tileSize,tileHeight:this.tileSize,tileCount:this.totalTiles,scaleFactor:this.scaleFactor,originalWidth:this.screenWidth,originalHeight:this.screenHeight}}async compareClientTileHashes(e){if(this.isProcessing)return{tiles:[],currentHashes:[],changedIndices:[]};this.isProcessing=!0;try{let t=await this.getSharedScreenCapture(),i=[],n=[];this.frameCount++;let r=[],a=new Map;for(let c=0;c<this.totalTiles;c++){r[c]=this.extractTile(t,c);let l=this.calculateTileChecksum(r[c].buffer);a.set(c,l),this.lastTileChecksums.set(c,l)}if(!e||e.length===0){let c=r.map((p,u)=>this.processTileAsync(t,u,p)),l=await Promise.all(c);return i.push(...l),{tiles:i,currentHashes:Array.from(a.values())}}for(let c=0;c<this.totalTiles;c++)e[c]!==a.get(c)&&n.push(c);if(n.length/this.totalTiles>this.changeThreshold){let c=r.map((p,u)=>this.processTileAsync(t,u,p)),l=await Promise.all(c);i.push(...l.map(p=>({...p,fullRefresh:!0})))}else if(n.length>0){let c=n.map(p=>this.processTileAsync(t,p,r[p])),l=await Promise.all(c);i.push(...l)}return{tiles:i,currentHashes:Array.from(a.values()),changedIndices:n}}finally{this.isProcessing=!1}}reset(){this.lastTileChecksums.clear(),this.frameCount=0}cleanup(){try{Dt.default.existsSync(this.tempDir)&&Dt.default.readdirSync(this.tempDir).forEach(t=>Dt.default.unlinkSync(Ci.default.join(this.tempDir,t)))}catch(e){console.warn("Cleanup error:",e)}}}});var J,cs=$e(()=>{J={robotSettings:{mouseDelay:2,keyboardDelay:2},throttling:{mouseThrottle:8,keyThrottle:25,typeTextThrottle:100,maxTextLength:1e3},resourceManagement:{inactiveTimeout:12e4,memoryCheckInterval:6e4,memoryWarningThreshold:1e3,maxTimersPerClient:100,maxChunkTimersPerClient:50},streaming:{autoStreamingInterval:100,chunkSize:32,chunkDelay:5,updateDelayAfterAction:200}}});var Vl={};Ve(Vl,{ResourceManager:()=>Or});var Or,Gl=$e(()=>{cs();Or=class{constructor(){this.activeClients=new Map,this.activeTimers=new Map,this.chunkTimers=new Map,this.memoryCheckInterval=null}startResourceMonitoring(){this.memoryCheckInterval=setInterval(()=>{let e=process.memoryUsage(),t=Math.round(e.heapUsed/1024/1024);t>J.resourceManagement.memoryWarningThreshold&&(console.warn(`\u26A0\uFE0F High memory: ${t}MB`),this.cleanupInactiveClients())},J.resourceManagement.memoryCheckInterval)}stopResourceMonitoring(){this.memoryCheckInterval&&(clearInterval(this.memoryCheckInterval),this.memoryCheckInterval=null)}addClient(e,t){this.activeClients.set(e,{...t,lastActivity:Date.now()})}getClient(e){return this.activeClients.get(e)}updateClientActivity(e){let t=this.activeClients.get(e);t&&(t.lastActivity=Date.now())}cleanupInactiveClients(){let e=Date.now(),t=J.resourceManagement.inactiveTimeout;for(let[i,n]of this.activeClients.entries())e-n.lastActivity>t&&(console.log(`\u{1F9F9} Cleaning inactive client: ${i}`),this.cleanupClientResources(i,n),this.activeClients.delete(i))}cleanupClientResources(e,t){try{t?.screenInterval&&(clearInterval(t.screenInterval),t.screenInterval=null);let i=this.activeTimers.get(e);i&&(i.forEach(r=>clearTimeout(r)),this.activeTimers.delete(e));let n=this.chunkTimers.get(e);n&&(n.forEach(r=>clearTimeout(r)),this.chunkTimers.delete(e)),t?.tileManager&&(t.tileManager.cleanup(),t.tileManager.reset())}catch(i){console.error(`Error cleaning up ${e}:`,i.message)}}removeClient(e){let t=this.activeClients.get(e);t&&(this.cleanupClientResources(e,t),this.activeClients.delete(e))}getChunkTimers(e){return this.chunkTimers.has(e)||this.chunkTimers.set(e,new Set),this.chunkTimers.get(e)}cleanupAll(){this.stopResourceMonitoring();for(let[e,t]of this.activeClients.entries())this.cleanupClientResources(e,t);this.activeClients.clear(),this.activeTimers.clear(),this.chunkTimers.clear()}}});var Kl={};Ve(Kl,{ScreenUpdateHelper:()=>Rr});var Rr,Yl=$e(()=>{cs();Rr=class{constructor(e){this.resourceManager=e}async sendTilesInChunks(e,t,i,n=!1){if(!t||t.length===0)return;let r=J.streaming.chunkSize,a=[];for(let c=0;c<t.length;c+=r)a.push(t.slice(c,c+r));let o=this.resourceManager.getChunkTimers(e.id);for(let c=0;c<a.length;c++){let l=a[c],p=c===a.length-1,u=setTimeout(()=>{o.delete(u),e.connected&&e.emit("tiles-data",{tiles:l,timestamp:i,forceRefresh:!1,userAction:n,chunkInfo:{chunkIndex:c,totalChunks:a.length,isLastChunk:p}})},c*J.streaming.chunkDelay);o.add(u)}}}});var Xl={};Ve(Xl,{MouseHandler:()=>Ar});var Ar,Jl=$e(()=>{cs();Ar=class{constructor(e,t){this.robot=e,this.resourceManager=t,this.lastMouseMove=0}setupMouseHandlers(e,t){let i=this.robot;e.on("mouse-move",t(n=>{let r=Date.now();if(!(r-this.lastMouseMove<J.throttling.mouseThrottle)){this.lastMouseMove=r;try{i.moveMouse(n.x,n.y),this.resourceManager.updateClientActivity(e.id)}catch(a){console.error("Mouse move error:",a.message)}}})),e.on("mouse-click",t(async n=>{try{if(!this.resourceManager.getClient(e.id))return;let a=i.getScreenSize(),o=Math.round(n.x/100*a.width),c=Math.round(n.y/100*a.height),l=Math.max(0,Math.min(a.width-1,o)),p=Math.max(0,Math.min(a.height-1,c));i.moveMouse(l,p),i.mouseClick(n.button||"left",n.double||!1),this.resourceManager.updateClientActivity(e.id)}catch(r){console.error("Mouse click error:",r.message)}})),e.on("mouse-press",t(async n=>{try{if(!this.resourceManager.getClient(e.id))return;let a=i.getScreenSize(),o=Math.round(n.x/100*a.width),c=Math.round(n.y/100*a.height),l=Math.max(0,Math.min(a.width-1,o)),p=Math.max(0,Math.min(a.height-1,c));i.moveMouse(l,p),i.mouseToggle("down",n.button||"left"),this.resourceManager.updateClientActivity(e.id)}catch(r){console.error("Mouse press error:",r.message)}})),e.on("mouse-release",t(async n=>{try{if(!this.resourceManager.getClient(e.id))return;let a=i.getScreenSize(),o=Math.round(n.x/100*a.width),c=Math.round(n.y/100*a.height),l=Math.max(0,Math.min(a.width-1,o)),p=Math.max(0,Math.min(a.height-1,c));i.moveMouse(l,p),i.mouseToggle("up",n.button||"left"),this.resourceManager.updateClientActivity(e.id)}catch(r){console.error("Mouse release error:",r.message)}})),e.on("scroll",t(async n=>{try{let{direction:r,amount:a=60,horizontal:o=!1}=n;if(!this.resourceManager.getClient(e.id))return;let l=0,p=0;o||r==="left"||r==="right"?l=r==="right"?a:-a:p=r==="down"?-a:a,i.scrollMouse(l,p),this.resourceManager.updateClientActivity(e.id)}catch(r){console.error("Scroll error:",r.message)}})),e.on("mouse-drag-select",t(n=>{try{let{startX:r,startY:a,endX:o,endY:c}=n,l=i.getScreenSize(),p=Math.round(r/100*l.width),u=Math.round(a/100*l.height),d=Math.round(o/100*l.width),h=Math.round(c/100*l.height),m=Math.max(0,Math.min(l.width-1,p)),f=Math.max(0,Math.min(l.height-1,u)),x=Math.max(0,Math.min(l.width-1,d)),w=Math.max(0,Math.min(l.height-1,h));i.moveMouse(m,f),i.mouseToggle("down","left"),i.dragMouse(x,w),i.mouseToggle("up","left"),this.resourceManager.updateClientActivity(e.id)}catch(r){console.error("Drag selection error:",r.message)}}))}}});var Ql={};Ve(Ql,{KeyboardHandler:()=>Pr});var Pr,Zl=$e(()=>{cs();Pr=class{constructor(e,t){this.robot=e,this.resourceManager=t,this.lastKeyPress=0,this.lastTypeText=0}setupKeyboardHandlers(e,t){let i=this.robot;e.on("key-press",t(n=>{let r=Date.now();if(!(r-this.lastKeyPress<J.throttling.keyThrottle)){this.lastKeyPress=r;try{if(!n.key||typeof n.key!="string")return;let a=n.key;if(a.length===1){i.keyTap(a,n.modifier||[]);for(let o of n.modifier||[])i.keyToggle(o,"up")}else switch(a.toLowerCase()){case"enter":case"return":i.keyTap("enter");break;case"space":i.keyTap(" ");break;case"backspace":i.keyTap("backspace");break;case"tab":i.keyTap("tab");break;case"escape":i.keyTap("escape");break;default:i.keyTap(a,n.modifier||[])}this.resourceManager.updateClientActivity(e.id)}catch(a){console.error("Key press error:",a.message)}}})),e.on("type-text",t(n=>{let r=Date.now();if(!(r-this.lastTypeText<J.throttling.typeTextThrottle)){this.lastTypeText=r;try{if(!n.text||typeof n.text!="string")return;let a=n.text;a.length>J.throttling.maxTextLength&&(a=a.substring(0,J.throttling.maxTextLength));let o=a.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g,"");setTimeout(()=>{try{i.typeString(o),this.resourceManager.updateClientActivity(e.id);let c=this.resourceManager.getClient(e.id);c?.tileManager&&c.tileManager.clearScreenCache()}catch(c){console.error("Robot typeString error:",c.message)}},10)}catch(a){console.error("Type text error:",a.message)}}}))}}});var ep={};Ve(ep,{ScreenHandler:()=>jr});var jr,tp=$e(()=>{jr=class{constructor(e,t){this.resourceManager=e,this.screenUpdateHelper=t}setupScreenHandlers(e,t){e.on("request-screen",t(async()=>{let i=this.resourceManager.getClient(e.id);if(i)try{let n=await i.tileManager.detectChangedTiles();n.length>0&&e.emit("tiles-data",{tiles:n,timestamp:Date.now()}),this.resourceManager.updateClientActivity(e.id)}catch(n){console.error("Tile capture error:",n),e.emit("screen-error",{error:n.message})}})),e.on("request-screen-with-hashes",t(async i=>{let n=this.resourceManager.getClient(e.id);if(n)try{let r=i.tileHashes||[],a=await n.tileManager.compareClientTileHashes(r);a?.tiles?.length>0?e.emit("tiles-data",{tiles:a.tiles,timestamp:Date.now(),currentHashes:a.currentHashes,changedIndices:a.changedIndices}):e.emit("tiles-data",{tiles:[],timestamp:Date.now(),currentHashes:a.currentHashes,changedIndices:[]}),this.resourceManager.updateClientActivity(e.id)}catch(r){console.error("Tile capture with hashes error:",r),e.emit("screen-error",{error:r.message})}})),e.on("start-streaming",t(()=>{let i=this.resourceManager.getClient(e.id);i&&(i.screenInterval&&(clearInterval(i.screenInterval),i.screenInterval=null),console.log("\u{1F680} Remote streaming started"),i.screenInterval=setInterval(async()=>{try{let n=await i.tileManager.detectChangedTiles();if(n.length>0){let r=Date.now();await this.screenUpdateHelper.sendTilesInChunks(e,n,r,!1)}}catch(n){console.error("Auto streaming error:",n)}},400))})),e.on("stop-streaming",()=>{let i=this.resourceManager.getClient(e.id);i&&(i.screenInterval&&(clearInterval(i.screenInterval),i.screenInterval=null),console.log("\u23F9\uFE0F Remote streaming stopped"))}),e.on("get-screen-dimensions",t(async()=>{let i=this.resourceManager.getClient(e.id);if(i)try{let n=await i.tileManager.getScreenDimensions();e.emit("screen-dimensions",n)}catch(n){console.error("Get dimensions error:",n),e.emit("screen-error",{error:n.message})}}))}}});var yp=v((qy,bp)=>{"use strict";bp.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Nr=v((Fy,_p)=>{var us=yp(),wp={};for(let s of Object.keys(us))wp[us[s]]=s;var g={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};_p.exports=g;for(let s of Object.keys(g)){if(!("channels"in g[s]))throw new Error("missing channels property: "+s);if(!("labels"in g[s]))throw new Error("missing channel labels property: "+s);if(g[s].labels.length!==g[s].channels)throw new Error("channel and label counts mismatch: "+s);let{channels:e,labels:t}=g[s];delete g[s].channels,delete g[s].labels,Object.defineProperty(g[s],"channels",{value:e}),Object.defineProperty(g[s],"labels",{value:t})}g.rgb.hsl=function(s){let e=s[0]/255,t=s[1]/255,i=s[2]/255,n=Math.min(e,t,i),r=Math.max(e,t,i),a=r-n,o,c;r===n?o=0:e===r?o=(t-i)/a:t===r?o=2+(i-e)/a:i===r&&(o=4+(e-t)/a),o=Math.min(o*60,360),o<0&&(o+=360);let l=(n+r)/2;return r===n?c=0:l<=.5?c=a/(r+n):c=a/(2-r-n),[o,c*100,l*100]};g.rgb.hsv=function(s){let e,t,i,n,r,a=s[0]/255,o=s[1]/255,c=s[2]/255,l=Math.max(a,o,c),p=l-Math.min(a,o,c),u=function(d){return(l-d)/6/p+1/2};return p===0?(n=0,r=0):(r=p/l,e=u(a),t=u(o),i=u(c),a===l?n=i-t:o===l?n=1/3+e-i:c===l&&(n=2/3+t-e),n<0?n+=1:n>1&&(n-=1)),[n*360,r*100,l*100]};g.rgb.hwb=function(s){let e=s[0],t=s[1],i=s[2],n=g.rgb.hsl(s)[0],r=1/255*Math.min(e,Math.min(t,i));return i=1-1/255*Math.max(e,Math.max(t,i)),[n,r*100,i*100]};g.rgb.cmyk=function(s){let e=s[0]/255,t=s[1]/255,i=s[2]/255,n=Math.min(1-e,1-t,1-i),r=(1-e-n)/(1-n)||0,a=(1-t-n)/(1-n)||0,o=(1-i-n)/(1-n)||0;return[r*100,a*100,o*100,n*100]};function Lx(s,e){return(s[0]-e[0])**2+(s[1]-e[1])**2+(s[2]-e[2])**2}g.rgb.keyword=function(s){let e=wp[s];if(e)return e;let t=1/0,i;for(let n of Object.keys(us)){let r=us[n],a=Lx(s,r);a<t&&(t=a,i=n)}return i};g.keyword.rgb=function(s){return us[s]};g.rgb.xyz=function(s){let e=s[0]/255,t=s[1]/255,i=s[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92;let n=e*.4124+t*.3576+i*.1805,r=e*.2126+t*.7152+i*.0722,a=e*.0193+t*.1192+i*.9505;return[n*100,r*100,a*100]};g.rgb.lab=function(s){let e=g.rgb.xyz(s),t=e[0],i=e[1],n=e[2];t/=95.047,i/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let r=116*i-16,a=500*(t-i),o=200*(i-n);return[r,a,o]};g.hsl.rgb=function(s){let e=s[0]/360,t=s[1]/100,i=s[2]/100,n,r,a;if(t===0)return a=i*255,[a,a,a];i<.5?n=i*(1+t):n=i+t-i*t;let o=2*i-n,c=[0,0,0];for(let l=0;l<3;l++)r=e+1/3*-(l-1),r<0&&r++,r>1&&r--,6*r<1?a=o+(n-o)*6*r:2*r<1?a=n:3*r<2?a=o+(n-o)*(2/3-r)*6:a=o,c[l]=a*255;return c};g.hsl.hsv=function(s){let e=s[0],t=s[1]/100,i=s[2]/100,n=t,r=Math.max(i,.01);i*=2,t*=i<=1?i:2-i,n*=r<=1?r:2-r;let a=(i+t)/2,o=i===0?2*n/(r+n):2*t/(i+t);return[e,o*100,a*100]};g.hsv.rgb=function(s){let e=s[0]/60,t=s[1]/100,i=s[2]/100,n=Math.floor(e)%6,r=e-Math.floor(e),a=255*i*(1-t),o=255*i*(1-t*r),c=255*i*(1-t*(1-r));switch(i*=255,n){case 0:return[i,c,a];case 1:return[o,i,a];case 2:return[a,i,c];case 3:return[a,o,i];case 4:return[c,a,i];case 5:return[i,a,o]}};g.hsv.hsl=function(s){let e=s[0],t=s[1]/100,i=s[2]/100,n=Math.max(i,.01),r,a;a=(2-t)*i;let o=(2-t)*n;return r=t*n,r/=o<=1?o:2-o,r=r||0,a/=2,[e,r*100,a*100]};g.hwb.rgb=function(s){let e=s[0]/360,t=s[1]/100,i=s[2]/100,n=t+i,r;n>1&&(t/=n,i/=n);let a=Math.floor(6*e),o=1-i;r=6*e-a,(a&1)!==0&&(r=1-r);let c=t+r*(o-t),l,p,u;switch(a){default:case 6:case 0:l=o,p=c,u=t;break;case 1:l=c,p=o,u=t;break;case 2:l=t,p=o,u=c;break;case 3:l=t,p=c,u=o;break;case 4:l=c,p=t,u=o;break;case 5:l=o,p=t,u=c;break}return[l*255,p*255,u*255]};g.cmyk.rgb=function(s){let e=s[0]/100,t=s[1]/100,i=s[2]/100,n=s[3]/100,r=1-Math.min(1,e*(1-n)+n),a=1-Math.min(1,t*(1-n)+n),o=1-Math.min(1,i*(1-n)+n);return[r*255,a*255,o*255]};g.xyz.rgb=function(s){let e=s[0]/100,t=s[1]/100,i=s[2]/100,n,r,a;return n=e*3.2406+t*-1.5372+i*-.4986,r=e*-.9689+t*1.8758+i*.0415,a=e*.0557+t*-.204+i*1.057,n=n>.0031308?1.055*n**(1/2.4)-.055:n*12.92,r=r>.0031308?1.055*r**(1/2.4)-.055:r*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,n=Math.min(Math.max(0,n),1),r=Math.min(Math.max(0,r),1),a=Math.min(Math.max(0,a),1),[n*255,r*255,a*255]};g.xyz.lab=function(s){let e=s[0],t=s[1],i=s[2];e/=95.047,t/=100,i/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,t=t>.008856?t**(1/3):7.787*t+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;let n=116*t-16,r=500*(e-t),a=200*(t-i);return[n,r,a]};g.lab.xyz=function(s){let e=s[0],t=s[1],i=s[2],n,r,a;r=(e+16)/116,n=t/500+r,a=r-i/200;let o=r**3,c=n**3,l=a**3;return r=o>.008856?o:(r-16/116)/7.787,n=c>.008856?c:(n-16/116)/7.787,a=l>.008856?l:(a-16/116)/7.787,n*=95.047,r*=100,a*=108.883,[n,r,a]};g.lab.lch=function(s){let e=s[0],t=s[1],i=s[2],n;n=Math.atan2(i,t)*360/2/Math.PI,n<0&&(n+=360);let a=Math.sqrt(t*t+i*i);return[e,a,n]};g.lch.lab=function(s){let e=s[0],t=s[1],n=s[2]/360*2*Math.PI,r=t*Math.cos(n),a=t*Math.sin(n);return[e,r,a]};g.rgb.ansi16=function(s,e=null){let[t,i,n]=s,r=e===null?g.rgb.hsv(s)[2]:e;if(r=Math.round(r/50),r===0)return 30;let a=30+(Math.round(n/255)<<2|Math.round(i/255)<<1|Math.round(t/255));return r===2&&(a+=60),a};g.hsv.ansi16=function(s){return g.rgb.ansi16(g.hsv.rgb(s),s[2])};g.rgb.ansi256=function(s){let e=s[0],t=s[1],i=s[2];return e===t&&t===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(i/255*5)};g.ansi16.rgb=function(s){let e=s%10;if(e===0||e===7)return s>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let t=(~~(s>50)+1)*.5,i=(e&1)*t*255,n=(e>>1&1)*t*255,r=(e>>2&1)*t*255;return[i,n,r]};g.ansi256.rgb=function(s){if(s>=232){let r=(s-232)*10+8;return[r,r,r]}s-=16;let e,t=Math.floor(s/36)/5*255,i=Math.floor((e=s%36)/6)/5*255,n=e%6/5*255;return[t,i,n]};g.rgb.hex=function(s){let t=(((Math.round(s[0])&255)<<16)+((Math.round(s[1])&255)<<8)+(Math.round(s[2])&255)).toString(16).toUpperCase();return"000000".substring(t.length)+t};g.hex.rgb=function(s){let e=s.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let t=e[0];e[0].length===3&&(t=t.split("").map(o=>o+o).join(""));let i=parseInt(t,16),n=i>>16&255,r=i>>8&255,a=i&255;return[n,r,a]};g.rgb.hcg=function(s){let e=s[0]/255,t=s[1]/255,i=s[2]/255,n=Math.max(Math.max(e,t),i),r=Math.min(Math.min(e,t),i),a=n-r,o,c;return a<1?o=r/(1-a):o=0,a<=0?c=0:n===e?c=(t-i)/a%6:n===t?c=2+(i-e)/a:c=4+(e-t)/a,c/=6,c%=1,[c*360,a*100,o*100]};g.hsl.hcg=function(s){let e=s[1]/100,t=s[2]/100,i=t<.5?2*e*t:2*e*(1-t),n=0;return i<1&&(n=(t-.5*i)/(1-i)),[s[0],i*100,n*100]};g.hsv.hcg=function(s){let e=s[1]/100,t=s[2]/100,i=e*t,n=0;return i<1&&(n=(t-i)/(1-i)),[s[0],i*100,n*100]};g.hcg.rgb=function(s){let e=s[0]/360,t=s[1]/100,i=s[2]/100;if(t===0)return[i*255,i*255,i*255];let n=[0,0,0],r=e%1*6,a=r%1,o=1-a,c=0;switch(Math.floor(r)){case 0:n[0]=1,n[1]=a,n[2]=0;break;case 1:n[0]=o,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=a;break;case 3:n[0]=0,n[1]=o,n[2]=1;break;case 4:n[0]=a,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=o}return c=(1-t)*i,[(t*n[0]+c)*255,(t*n[1]+c)*255,(t*n[2]+c)*255]};g.hcg.hsv=function(s){let e=s[1]/100,t=s[2]/100,i=e+t*(1-e),n=0;return i>0&&(n=e/i),[s[0],n*100,i*100]};g.hcg.hsl=function(s){let e=s[1]/100,i=s[2]/100*(1-e)+.5*e,n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[s[0],n*100,i*100]};g.hcg.hwb=function(s){let e=s[1]/100,t=s[2]/100,i=e+t*(1-e);return[s[0],(i-e)*100,(1-i)*100]};g.hwb.hcg=function(s){let e=s[1]/100,i=1-s[2]/100,n=i-e,r=0;return n<1&&(r=(i-n)/(1-n)),[s[0],n*100,r*100]};g.apple.rgb=function(s){return[s[0]/65535*255,s[1]/65535*255,s[2]/65535*255]};g.rgb.apple=function(s){return[s[0]/255*65535,s[1]/255*65535,s[2]/255*65535]};g.gray.rgb=function(s){return[s[0]/100*255,s[0]/100*255,s[0]/100*255]};g.gray.hsl=function(s){return[0,0,s[0]]};g.gray.hsv=g.gray.hsl;g.gray.hwb=function(s){return[0,100,s[0]]};g.gray.cmyk=function(s){return[0,0,0,s[0]]};g.gray.lab=function(s){return[s[0],0,0]};g.gray.hex=function(s){let e=Math.round(s[0]/100*255)&255,i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(i.length)+i};g.rgb.gray=function(s){return[(s[0]+s[1]+s[2])/3/255*100]}});var Ep=v((Uy,Sp)=>{var Pi=Nr();function qx(){let s={},e=Object.keys(Pi);for(let t=e.length,i=0;i<t;i++)s[e[i]]={distance:-1,parent:null};return s}function Fx(s){let e=qx(),t=[s];for(e[s].distance=0;t.length;){let i=t.pop(),n=Object.keys(Pi[i]);for(let r=n.length,a=0;a<r;a++){let o=n[a],c=e[o];c.distance===-1&&(c.distance=e[i].distance+1,c.parent=i,t.unshift(o))}}return e}function Ux(s,e){return function(t){return e(s(t))}}function Hx(s,e){let t=[e[s].parent,s],i=Pi[e[s].parent][s],n=e[s].parent;for(;e[n].parent;)t.unshift(e[n].parent),i=Ux(Pi[e[n].parent][n],i),n=e[n].parent;return i.conversion=t,i}Sp.exports=function(s){let e=Fx(s),t={},i=Object.keys(e);for(let n=i.length,r=0;r<n;r++){let a=i[r];e[a].parent!==null&&(t[a]=Hx(a,e))}return t}});var Cp=v((Hy,kp)=>{var Lr=Nr(),zx=Ep(),Lt={},Wx=Object.keys(Lr);function $x(s){let e=function(...t){let i=t[0];return i==null?i:(i.length>1&&(t=i),s(t))};return"conversion"in s&&(e.conversion=s.conversion),e}function Vx(s){let e=function(...t){let i=t[0];if(i==null)return i;i.length>1&&(t=i);let n=s(t);if(typeof n=="object")for(let r=n.length,a=0;a<r;a++)n[a]=Math.round(n[a]);return n};return"conversion"in s&&(e.conversion=s.conversion),e}Wx.forEach(s=>{Lt[s]={},Object.defineProperty(Lt[s],"channels",{value:Lr[s].channels}),Object.defineProperty(Lt[s],"labels",{value:Lr[s].labels});let e=zx(s);Object.keys(e).forEach(i=>{let n=e[i];Lt[s][i]=Vx(n),Lt[s][i].raw=$x(n)})});kp.exports=Lt});var jp=v((zy,Pp)=>{"use strict";var Tp=(s,e)=>(...t)=>`\x1B[${s(...t)+e}m`,Op=(s,e)=>(...t)=>{let i=s(...t);return`\x1B[${38+e};5;${i}m`},Rp=(s,e)=>(...t)=>{let i=s(...t);return`\x1B[${38+e};2;${i[0]};${i[1]};${i[2]}m`},ji=s=>s,Ap=(s,e,t)=>[s,e,t],qt=(s,e,t)=>{Object.defineProperty(s,e,{get:()=>{let i=t();return Object.defineProperty(s,e,{value:i,enumerable:!0,configurable:!0}),i},enumerable:!0,configurable:!0})},qr,Ft=(s,e,t,i)=>{qr===void 0&&(qr=Cp());let n=i?10:0,r={};for(let[a,o]of Object.entries(qr)){let c=a==="ansi16"?"ansi":a;a===e?r[c]=s(t,n):typeof o=="object"&&(r[c]=s(o[e],n))}return r};function Gx(){let s=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[t,i]of Object.entries(e)){for(let[n,r]of Object.entries(i))e[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},i[n]=e[n],s.set(r[0],r[1]);Object.defineProperty(e,t,{value:i,enumerable:!1})}return Object.defineProperty(e,"codes",{value:s,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",qt(e.color,"ansi",()=>Ft(Tp,"ansi16",ji,!1)),qt(e.color,"ansi256",()=>Ft(Op,"ansi256",ji,!1)),qt(e.color,"ansi16m",()=>Ft(Rp,"rgb",Ap,!1)),qt(e.bgColor,"ansi",()=>Ft(Tp,"ansi16",ji,!0)),qt(e.bgColor,"ansi256",()=>Ft(Op,"ansi256",ji,!0)),qt(e.bgColor,"ansi16m",()=>Ft(Rp,"rgb",Ap,!0)),e}Object.defineProperty(Pp,"exports",{enumerable:!0,get:Gx})});var Dp=v((Wy,Mp)=>{"use strict";var Kx=(s,e,t)=>{let i=s.indexOf(e);if(i===-1)return s;let n=e.length,r=0,a="";do a+=s.substr(r,i-r)+e+t,r=i+n,i=s.indexOf(e,r);while(i!==-1);return a+=s.substr(r),a},Yx=(s,e,t,i)=>{let n=0,r="";do{let a=s[i-1]==="\r";r+=s.substr(n,(a?i-1:i)-n)+e+(a?`\r
|
|
18
|
+
`+i)}s.destroy()}var ns=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];function ag(s){if(s+="",s.length<1)return!1;if(!ns[s.charCodeAt(0)])return _('invalid header, index 0, char "%s"',s.charCodeAt(0)),!0;if(s.length<2)return!1;if(!ns[s.charCodeAt(1)])return _('invalid header, index 1, char "%s"',s.charCodeAt(1)),!0;if(s.length<3)return!1;if(!ns[s.charCodeAt(2)])return _('invalid header, index 2, char "%s"',s.charCodeAt(2)),!0;if(s.length<4)return!1;if(!ns[s.charCodeAt(3)])return _('invalid header, index 3, char "%s"',s.charCodeAt(3)),!0;for(let e=4;e<s.length;++e)if(!ns[s.charCodeAt(e)])return _('invalid header, index "%i", char "%s"',e,s.charCodeAt(e)),!0;return!1}});var Kc=g(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.Polling=void 0;var og=Ke(),Gc=require("zlib"),cg=Es(),lg=M(),ae=(0,lg.default)("engine:polling"),pg={gzip:Gc.createGzip,deflate:Gc.createDeflate},Yn=class extends og.Transport{constructor(e){super(e),this.closeTimeout=30*1e3}get name(){return"polling"}onRequest(e){let t=e.res;e.res=null,e.getMethod()==="get"?this.onPollRequest(e,t):e.getMethod()==="post"?this.onDataRequest(e,t):(t.writeStatus("500 Internal Server Error"),t.end())}onPollRequest(e,t){if(this.req){ae("request overlap"),this.onError("overlap from client"),t.writeStatus("500 Internal Server Error"),t.end();return}ae("setting request"),this.req=e,this.res=t;let i=()=>{this.writable=!1,this.onError("poll connection closed prematurely")},n=()=>{this.req=this.res=null};e.cleanup=n,t.onAborted(i),this.writable=!0,this.emit("ready"),this.writable&&this.shouldClose&&(ae("triggering empty send to append close packet"),this.send([{type:"noop"}]))}onDataRequest(e,t){if(this.dataReq){this.onError("data request overlap from client"),t.writeStatus("500 Internal Server Error"),t.end();return}let i=Number(e.headers["content-length"]);if(!i){this.onError("content-length header required"),t.writeStatus("411 Length Required").end();return}if(i>this.maxHttpBufferSize){this.onError("payload too large"),t.writeStatus("413 Payload Too Large").end();return}if(e.headers["content-type"]==="application/octet-stream"&&this.protocol===4)return this.onError("invalid content");this.dataReq=e,this.dataRes=t;let r,a=0,o={"Content-Type":"text/html"};this.headers(e,o);for(let l in o)t.writeHeader(l,String(o[l]));let c=l=>{this.onData(l.toString()),this.onDataRequestCleanup(),t.cork(()=>{t.end("ok")})};t.onAborted(()=>{this.onDataRequestCleanup(),this.onError("data request connection closed prematurely")}),t.onData((l,p)=>{let u=a+l.byteLength;if(u>i){this.onError("content-length mismatch"),t.close();return}if(!r){if(p){c(Buffer.from(l));return}r=Buffer.allocUnsafe(i)}if(Buffer.from(l).copy(r,a),p){if(u!=i){this.onError("content-length mismatch"),t.writeStatus("400 Content-Length Mismatch").end(),this.onDataRequestCleanup();return}c(r);return}a=u})}onDataRequestCleanup(){this.dataReq=this.dataRes=null}onData(e){ae('received "%s"',e);let t=i=>{if(i.type==="close")return ae("got xhr close packet"),this.onClose(),!1;this.onPacket(i)};this.protocol===3?this.parser.decodePayload(e,t):this.parser.decodePayload(e).forEach(t)}onClose(){this.writable&&this.send([{type:"noop"}]),super.onClose()}send(e){this.writable=!1,this.shouldClose&&(ae("appending close packet to payload"),e.push({type:"close"}),this.shouldClose(),this.shouldClose=null);let t=i=>{let n=e.some(r=>r.options&&r.options.compress);this.write(i,{compress:n})};this.protocol===3?this.parser.encodePayload(e,this.supportsBinary,t):this.parser.encodePayload(e,t)}write(e,t){ae('writing "%s"',e),this.doWrite(e,t,()=>{this.req.cleanup(),this.emit("drain")})}doWrite(e,t,i){let n=typeof e=="string",a={"Content-Type":n?"text/plain; charset=UTF-8":"application/octet-stream"},o=p=>{this.headers(this.req,a),this.res.cork(()=>{Object.keys(a).forEach(u=>{this.res.writeHeader(u,String(a[u]))}),this.res.end(p)}),i()};if(!this.httpCompression||!t.compress){o(e);return}if((n?Buffer.byteLength(e):e.length)<this.httpCompression.threshold){o(e);return}let l=cg(this.req).encodings(["gzip","deflate"]);if(!l){o(e);return}this.compress(e,l,(p,u)=>{if(p){this.res.writeStatus("500 Internal Server Error"),this.res.end(),i(p);return}a["Content-Encoding"]=l,o(u)})}compress(e,t,i){ae("compressing");let n=[],r=0;pg[t](this.httpCompression).on("error",i).on("data",function(a){n.push(a),r+=a.length}).on("end",function(){i(null,Buffer.concat(n,r))}).end(e)}doClose(e){ae("closing");let t,i=()=>{clearTimeout(t),e(),this.onClose()};this.writable?(ae("transport writable - closing right away"),this.send([{type:"close"}]),i()):this.discarded?(ae("transport discarded - closing right away"),i()):(ae("transport not writable - buffering orderly close"),this.shouldClose=i,t=setTimeout(i,this.closeTimeout))}headers(e,t){t=t||{};let i=e.headers["user-agent"];return i&&(~i.indexOf(";MSIE")||~i.indexOf("Trident/"))&&(t["X-XSS-Protection"]="0"),t["cache-control"]="no-store",this.emit("headers",t,e),t}};ii.Polling=Yn});var Xc=g(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.WebSocket=void 0;var ug=Ke(),dg=M(),Yc=(0,dg.default)("engine:ws"),Xn=class extends ug.Transport{constructor(e){super(e),this.writable=!1,this.perMessageDeflate=null}get name(){return"websocket"}get handlesUpgrades(){return!0}send(e){this.writable=!1;for(let t=0;t<e.length;t++){let i=e[t],n=t+1===e.length,r=a=>{let o=typeof a!="string",c=this.perMessageDeflate&&Buffer.byteLength(a)>this.perMessageDeflate.threshold;Yc('writing "%s"',a),this.socket.send(a,o,c),n&&(this.emit("drain"),this.writable=!0,this.emit("ready"))};i.options&&typeof i.options.wsPreEncoded=="string"?r(i.options.wsPreEncoded):this.parser.encodePacket(i,this.supportsBinary,r)}}doClose(e){Yc("closing"),e&&e(),this.socket.end()}};ni.WebSocket=Xn});var Jc=g(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});var fg=Kc(),mg=Xc();Jn.default={polling:fg.Polling,websocket:mg.WebSocket}});var Qc=g(ri=>{"use strict";Object.defineProperty(ri,"__esModule",{value:!0});ri.uServer=void 0;var hg=M(),et=Kn(),gg=Jc(),Ue=(0,hg.default)("engine:uws"),Qn=class extends et.BaseServer{init(){}cleanup(){}prepare(e,t){e.method=e.getMethod().toUpperCase(),e.url=e.getUrl();let i=new URLSearchParams(e.getQuery());e._query=Object.fromEntries(i.entries()),e.headers={},e.forEach((n,r)=>{e.headers[n]=r}),e.connection={remoteAddress:Buffer.from(t.getRemoteAddressAsText()).toString()},t.onAborted(()=>{Ue("response has been aborted")})}createTransport(e,t){return new gg.default[e](t)}attach(e,t={}){let i=this._computePath(t);e.any(i,this.handleRequest.bind(this)).ws(i,{compression:t.compression,idleTimeout:t.idleTimeout,maxBackpressure:t.maxBackpressure,maxPayloadLength:this.opts.maxHttpBufferSize,upgrade:this.handleUpgrade.bind(this),open:n=>{let r=n.getUserData().transport;r.socket=n,r.writable=!0,r.emit("ready")},message:(n,r,a)=>{n.getUserData().transport.onData(a?r:Buffer.from(r).toString())},close:(n,r,a)=>{n.getUserData().transport.onClose(r,a)}})}_applyMiddlewares(e,t,i){if(this.middlewares.length===0)return i();e.res=new Zn(t),super._applyMiddlewares(e,e.res,n=>{e.res.writeHead(),i(n)})}handleRequest(e,t){Ue('handling "%s" http request "%s"',t.getMethod(),t.getUrl()),this.prepare(t,e),t.res=e;let i=(n,r)=>{if(n!==void 0){this.emit("connection_error",{req:t,code:n,message:et.Server.errorMessages[n],context:r}),this.abortRequest(t.res,n,r);return}if(t._query.sid)Ue("setting new request for existing client"),this.clients[t._query.sid].transport.onRequest(t);else{let a=(o,c)=>this.abortRequest(e,o,c);this.handshake(t._query.transport,t,a)}};this._applyMiddlewares(t,e,n=>{n?i(et.Server.errors.BAD_REQUEST,{name:"MIDDLEWARE_FAILURE"}):this.verify(t,!1,i)})}handleUpgrade(e,t,i){Ue("on upgrade"),this.prepare(t,e),t.res=e;let n=async(r,a)=>{if(r!==void 0){this.emit("connection_error",{req:t,code:r,message:et.Server.errorMessages[r],context:a}),this.abortRequest(e,r,a);return}let o=t._query.sid,c;if(o){let l=this.clients[o];if(l){if(l.upgrading)return Ue("transport has already been trying to upgrade"),e.close();if(l.upgraded)return Ue("transport had already been upgraded"),e.close();Ue("upgrading existing transport"),c=this.createTransport(t._query.transport,t),l._maybeUpgrade(c)}else return Ue("upgrade attempt for closed client"),e.close()}else if(c=await this.handshake(t._query.transport,t,(l,p)=>this.abortRequest(e,l,p)),!c)return;t.res.writeStatus("101 Switching Protocols"),e.upgrade({transport:c},t.getHeader("sec-websocket-key"),t.getHeader("sec-websocket-protocol"),t.getHeader("sec-websocket-extensions"),i)};this._applyMiddlewares(t,e,r=>{r?n(et.Server.errors.BAD_REQUEST,{name:"MIDDLEWARE_FAILURE"}):this.verify(t,!0,n)})}abortRequest(e,t,i){let n=t===et.Server.errors.FORBIDDEN?"403 Forbidden":"400 Bad Request",r=i&&i.message?i.message:et.Server.errorMessages[t];e.writeStatus(n),e.writeHeader("Content-Type","application/json"),e.end(JSON.stringify({code:t,message:r}))}};ri.uServer=Qn;var Zn=class{constructor(e){this.res=e,this.statusWritten=!1,this.headers=[],this.isAborted=!1}set statusCode(e){e&&this.writeStatus(e===200?"200 OK":"204 No Content")}writeHead(e){this.statusCode=e}setHeader(e,t){Array.isArray(t)?t.forEach(i=>{this.writeHeader(e,i)}):this.writeHeader(e,t)}removeHeader(){}getHeader(){}writeStatus(e){if(!this.isAborted)return this.res.writeStatus(e),this.statusWritten=!0,this.writeBufferedHeaders(),this}writeHeader(e,t){this.isAborted||e!=="Content-Length"&&(this.statusWritten?this.res.writeHeader(e,t):this.headers.push([e,t]))}writeBufferedHeaders(){this.headers.forEach(([e,t])=>{this.res.writeHeader(e,t)})}end(e){this.isAborted||this.res.cork(()=>{this.statusWritten||this.writeBufferedHeaders(),this.res.end(e)})}onData(e){this.isAborted||this.res.onData(e)}onAborted(e){this.isAborted||this.res.onAborted(()=>{this.isAborted=!0,e()})}cork(e){this.isAborted||this.res.cork(e)}}});var sl=g(F=>{"use strict";Object.defineProperty(F,"__esModule",{value:!0});F.protocol=F.Transport=F.Socket=F.uServer=F.parser=F.transports=F.Server=void 0;F.listen=_g;F.attach=tl;var xg=require("http"),Zc=Kn();Object.defineProperty(F,"Server",{enumerable:!0,get:function(){return Zc.Server}});var vg=bn();F.transports=vg.default;var el=Yt();F.parser=el;var bg=Qc();Object.defineProperty(F,"uServer",{enumerable:!0,get:function(){return bg.uServer}});var yg=wn();Object.defineProperty(F,"Socket",{enumerable:!0,get:function(){return yg.Socket}});var wg=Ke();Object.defineProperty(F,"Transport",{enumerable:!0,get:function(){return wg.Transport}});F.protocol=el.protocol;function _g(s,e,t){typeof e=="function"&&(t=e,e={});let i=(0,xg.createServer)(function(r,a){a.writeHead(501),a.end("Not Implemented")}),n=tl(i,e);return n.httpServer=i,i.listen(s,t),n}function tl(s,e){let t=new Zc.Server(e);return t.attach(s,e),t}});var nl=g(il=>{il.Emitter=W;function W(s){if(s)return Sg(s)}function Sg(s){for(var e in W.prototype)s[e]=W.prototype[e];return s}W.prototype.on=W.prototype.addEventListener=function(s,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+s]=this._callbacks["$"+s]||[]).push(e),this};W.prototype.once=function(s,e){function t(){this.off(s,t),e.apply(this,arguments)}return t.fn=e,this.on(s,t),this};W.prototype.off=W.prototype.removeListener=W.prototype.removeAllListeners=W.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,n=0;n<t.length;n++)if(i=t[n],i===e||i.fn===e){t.splice(n,1);break}return t.length===0&&delete this._callbacks["$"+s],this};W.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,n=t.length;i<n;++i)t[i].apply(this,e)}return this};W.prototype.emitReserved=W.prototype.emit;W.prototype.listeners=function(s){return this._callbacks=this._callbacks||{},this._callbacks["$"+s]||[]};W.prototype.hasListeners=function(s){return!!this.listeners(s).length}});var er=g(oi=>{"use strict";Object.defineProperty(oi,"__esModule",{value:!0});oi.isBinary=al;oi.hasBinary=ai;var Eg=typeof ArrayBuffer=="function",kg=s=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(s):s.buffer instanceof ArrayBuffer,rl=Object.prototype.toString,Cg=typeof Blob=="function"||typeof Blob<"u"&&rl.call(Blob)==="[object BlobConstructor]",Tg=typeof File=="function"||typeof File<"u"&&rl.call(File)==="[object FileConstructor]";function al(s){return Eg&&(s instanceof ArrayBuffer||kg(s))||Cg&&s instanceof Blob||Tg&&s instanceof File}function ai(s,e){if(!s||typeof s!="object")return!1;if(Array.isArray(s)){for(let t=0,i=s.length;t<i;t++)if(ai(s[t]))return!0;return!1}if(al(s))return!0;if(s.toJSON&&typeof s.toJSON=="function"&&arguments.length===1)return ai(s.toJSON(),!0);for(let t in s)if(Object.prototype.hasOwnProperty.call(s,t)&&ai(s[t]))return!0;return!1}});var ol=g(ci=>{"use strict";Object.defineProperty(ci,"__esModule",{value:!0});ci.deconstructPacket=Rg;ci.reconstructPacket=Ag;var Og=er();function Rg(s){let e=[],t=s.data,i=s;return i.data=tr(t,e),i.attachments=e.length,{packet:i,buffers:e}}function tr(s,e){if(!s)return s;if((0,Og.isBinary)(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]=tr(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]=tr(s[i],e));return t}return s}function Ag(s,e){return s.data=sr(s.data,e),delete s.attachments,s}function sr(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]=sr(s[t],e);else if(typeof s=="object")for(let t in s)Object.prototype.hasOwnProperty.call(s,t)&&(s[t]=sr(s[t],e));return s}});var rs=g(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.Decoder=de.Encoder=de.PacketType=de.protocol=void 0;de.isPacketValid=Ig;var Pg=nl(),cl=ol(),ll=er(),jg=M(),ir=(0,jg.default)("socket.io-parser"),pl=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];de.protocol=5;var k;(function(s){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"})(k||(de.PacketType=k={}));var nr=class{constructor(e){this.replacer=e}encode(e){return ir("encoding packet %j",e),(e.type===k.EVENT||e.type===k.ACK)&&(0,ll.hasBinary)(e)?this.encodeAsBinary({type:e.type===k.EVENT?k.BINARY_EVENT:k.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=""+e.type;return(e.type===k.BINARY_EVENT||e.type===k.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)),ir("encoded %j as %s",e,t),t}encodeAsBinary(e){let t=(0,cl.deconstructPacket)(e),i=this.encodeAsString(t.packet),n=t.buffers;return n.unshift(i),n}};de.Encoder=nr;var rr=class s extends Pg.Emitter{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===k.BINARY_EVENT;i||t.type===k.BINARY_ACK?(t.type=i?k.EVENT:k.ACK,this.reconstructor=new ar(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if((0,ll.isBinary)(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(k[i.type]===void 0)throw new Error("unknown packet type "+i.type);if(i.type===k.BINARY_EVENT||i.type===k.BINARY_ACK){let r=t+1;for(;e.charAt(++t)!=="-"&&t!=e.length;);let a=e.substring(r,t);if(a!=Number(a)||e.charAt(t)!=="-")throw new Error("Illegal attachments");i.attachments=Number(a)}if(e.charAt(t+1)==="/"){let r=t+1;for(;++t&&!(e.charAt(t)===","||t===e.length););i.nsp=e.substring(r,t)}else i.nsp="/";let n=e.charAt(t+1);if(n!==""&&Number(n)==n){let r=t+1;for(;++t;){let a=e.charAt(t);if(a==null||Number(a)!=a){--t;break}if(t===e.length)break}i.id=Number(e.substring(r,t+1))}if(e.charAt(++t)){let r=this.tryParse(e.substr(t));if(s.isPayloadValid(i.type,r))i.data=r;else throw new Error("invalid payload")}return ir("decoded %s as %j",e,i),i}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case k.CONNECT:return li(t);case k.DISCONNECT:return t===void 0;case k.CONNECT_ERROR:return typeof t=="string"||li(t);case k.EVENT:case k.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&pl.indexOf(t[0])===-1);case k.ACK:case k.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}};de.Decoder=rr;var ar=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=(0,cl.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function Mg(s){return typeof s=="string"}var Bg=Number.isInteger||function(s){return typeof s=="number"&&isFinite(s)&&Math.floor(s)===s};function Dg(s){return s===void 0||Bg(s)}function li(s){return Object.prototype.toString.call(s)==="[object Object]"}function Ng(s,e){switch(s){case k.CONNECT:return e===void 0||li(e);case k.DISCONNECT:return e===void 0;case k.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&pl.indexOf(e[0])===-1);case k.ACK:return Array.isArray(e);case k.CONNECT_ERROR:return typeof e=="string"||li(e);default:return!1}}function Ig(s){return Mg(s.nsp)&&Dg(s.id)&&Ng(s.type,s.data)}});var ul=g(kt=>{"use strict";var Lg=kt&&kt.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(kt,"__esModule",{value:!0});kt.Client=void 0;var pi=rs(),Fg=Lg(M()),fe=(0,Fg.default)("socket.io:client"),or=class{constructor(e,t){this.sockets=new Map,this.nsps=new Map,this.server=e,this.conn=t,this.encoder=e.encoder,this.decoder=new e._parser.Decoder,this.id=t.id,this.setup()}get request(){return this.conn.request}setup(){this.onclose=this.onclose.bind(this),this.ondata=this.ondata.bind(this),this.onerror=this.onerror.bind(this),this.ondecoded=this.ondecoded.bind(this),this.decoder.on("decoded",this.ondecoded),this.conn.on("data",this.ondata),this.conn.on("error",this.onerror),this.conn.on("close",this.onclose),this.connectTimeout=setTimeout(()=>{this.nsps.size===0?(fe("no namespace joined yet, close the client"),this.close()):fe("the client has already joined a namespace, nothing to do")},this.server._connectTimeout)}connect(e,t={}){if(this.server._nsps.has(e))return fe("connecting to namespace %s",e),this.doConnect(e,t);this.server._checkNamespace(e,t,i=>{i?this.doConnect(e,t):(fe("creation of namespace %s was denied",e),this._packet({type:pi.PacketType.CONNECT_ERROR,nsp:e,data:{message:"Invalid namespace"}}))})}doConnect(e,t){let i=this.server.of(e);i._add(this,t,n=>{this.sockets.set(n.id,n),this.nsps.set(i.name,n),this.connectTimeout&&(clearTimeout(this.connectTimeout),this.connectTimeout=void 0)})}_disconnect(){for(let e of this.sockets.values())e.disconnect();this.sockets.clear(),this.close()}_remove(e){if(this.sockets.has(e.id)){let t=this.sockets.get(e.id).nsp.name;this.sockets.delete(e.id),this.nsps.delete(t)}else fe("ignoring remove for %s",e.id)}close(){this.conn.readyState==="open"&&(fe("forcing transport close"),this.conn.close(),this.onclose("forced server close"))}_packet(e,t={}){if(this.conn.readyState!=="open"){fe("ignoring packet write %j",e);return}let i=t.preEncoded?e:this.encoder.encode(e);this.writeToEngine(i,t)}writeToEngine(e,t){if(t.volatile&&!this.conn.transport.writable){fe("volatile packet is discarded since the transport is not currently writable");return}let i=Array.isArray(e)?e:[e];for(let n of i)this.conn.write(n,t)}ondata(e){try{this.decoder.add(e)}catch(t){fe("invalid packet format"),this.onerror(t)}}ondecoded(e){let{namespace:t,authPayload:i}=this._parseNamespace(e),n=this.nsps.get(t);!n&&e.type===pi.PacketType.CONNECT?this.connect(t,i):n&&e.type!==pi.PacketType.CONNECT&&e.type!==pi.PacketType.CONNECT_ERROR?process.nextTick(function(){n._onpacket(e)}):(fe("invalid state (packet type: %s)",e.type),this.close())}_parseNamespace(e){if(this.conn.protocol!==3)return{namespace:e.nsp,authPayload:e.data};let t=new URL(e.nsp,"https://socket.io");return{namespace:t.pathname,authPayload:Object.fromEntries(t.searchParams.entries())}}onerror(e){for(let t of this.sockets.values())t._onerror(e);this.conn.close()}onclose(e,t){fe("client close with reason %s",e),this.destroy();for(let i of this.sockets.values())i._onclose(e,t);this.sockets.clear(),this.decoder.destroy()}destroy(){this.conn.removeListener("data",this.ondata),this.conn.removeListener("error",this.onerror),this.conn.removeListener("close",this.onclose),this.decoder.removeListener("decoded",this.ondecoded),this.connectTimeout&&(clearTimeout(this.connectTimeout),this.connectTimeout=void 0)}};kt.Client=or});var di=g(ui=>{"use strict";Object.defineProperty(ui,"__esModule",{value:!0});ui.StrictEventEmitter=void 0;var qg=require("events"),cr=class extends qg.EventEmitter{on(e,t){return super.on(e,t)}once(e,t){return super.once(e,t)}emit(e,...t){return super.emit(e,...t)}emitReserved(e,...t){return super.emit(e,...t)}emitUntyped(e,...t){return super.emit(e,...t)}listeners(e){return super.listeners(e)}};ui.StrictEventEmitter=cr});var lr=g(fi=>{"use strict";Object.defineProperty(fi,"__esModule",{value:!0});fi.RESERVED_EVENTS=void 0;fi.RESERVED_EVENTS=new Set(["connect","connect_error","disconnect","disconnecting","newListener","removeListener"])});var pr=g(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.RemoteSocket=Ct.BroadcastOperator=void 0;var Ug=lr(),Hg=rs(),mi=class s{constructor(e,t=new Set,i=new Set,n={}){this.adapter=e,this.rooms=t,this.exceptRooms=i,this.flags=n}to(e){let t=new Set(this.rooms);return Array.isArray(e)?e.forEach(i=>t.add(i)):t.add(e),new s(this.adapter,t,this.exceptRooms,this.flags)}in(e){return this.to(e)}except(e){let t=new Set(this.exceptRooms);return Array.isArray(e)?e.forEach(i=>t.add(i)):t.add(e),new s(this.adapter,this.rooms,t,this.flags)}compress(e){let t=Object.assign({},this.flags,{compress:e});return new s(this.adapter,this.rooms,this.exceptRooms,t)}get volatile(){let e=Object.assign({},this.flags,{volatile:!0});return new s(this.adapter,this.rooms,this.exceptRooms,e)}get local(){let e=Object.assign({},this.flags,{local:!0});return new s(this.adapter,this.rooms,this.exceptRooms,e)}timeout(e){let t=Object.assign({},this.flags,{timeout:e});return new s(this.adapter,this.rooms,this.exceptRooms,t)}emit(e,...t){if(Ug.RESERVED_EVENTS.has(e))throw new Error(`"${String(e)}" is a reserved event name`);let i=[e,...t],n={type:Hg.PacketType.EVENT,data:i};if(!(typeof i[i.length-1]=="function"))return this.adapter.broadcast(n,{rooms:this.rooms,except:this.exceptRooms,flags:this.flags}),!0;let a=i.pop(),o=!1,c=[],l=setTimeout(()=>{o=!0,a.apply(this,[new Error("operation has timed out"),this.flags.expectSingleResponse?null:c])},this.flags.timeout),p=-1,u=0,d=0,h=()=>{!o&&p===u&&c.length===d&&(clearTimeout(l),a.apply(this,[null,this.flags.expectSingleResponse?c[0]:c]))};return this.adapter.broadcastWithAck(n,{rooms:this.rooms,except:this.exceptRooms,flags:this.flags},m=>{d+=m,u++,h()},m=>{c.push(m),h()}),this.adapter.serverCount().then(m=>{p=m,h()}),!0}emitWithAck(e,...t){return new Promise((i,n)=>{t.push((r,a)=>r?(r.responses=a,n(r)):i(a)),this.emit(e,...t)})}allSockets(){if(!this.adapter)throw new Error("No adapter for this namespace, are you trying to get the list of clients of a dynamic namespace?");return this.adapter.sockets(this.rooms)}fetchSockets(){return this.adapter.fetchSockets({rooms:this.rooms,except:this.exceptRooms,flags:this.flags}).then(e=>e.map(t=>t.server?t:new hi(this.adapter,t)))}socketsJoin(e){this.adapter.addSockets({rooms:this.rooms,except:this.exceptRooms,flags:this.flags},Array.isArray(e)?e:[e])}socketsLeave(e){this.adapter.delSockets({rooms:this.rooms,except:this.exceptRooms,flags:this.flags},Array.isArray(e)?e:[e])}disconnectSockets(e=!1){this.adapter.disconnectSockets({rooms:this.rooms,except:this.exceptRooms,flags:this.flags},e)}};Ct.BroadcastOperator=mi;var hi=class{constructor(e,t){this.id=t.id,this.handshake=t.handshake,this.rooms=new Set(t.rooms),this.data=t.data,this.operator=new mi(e,new Set([this.id]),new Set,{expectSingleResponse:!0})}timeout(e){return this.operator.timeout(e)}emit(e,...t){return this.operator.emit(e,...t)}join(e){return this.operator.socketsJoin(e)}leave(e){return this.operator.socketsLeave(e)}disconnect(e=!1){return this.operator.disconnectSockets(e),this}};Ct.RemoteSocket=hi});var dr=g(Tt=>{"use strict";var ml=Tt&&Tt.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Tt,"__esModule",{value:!0});Tt.Socket=void 0;var oe=rs(),zg=ml(M()),Wg=di(),dl=ml(Ji()),$g=pr(),Vg=lr(),U=(0,zg.default)("socket.io:socket"),Gg=new Set(["transport error","transport close","forced close","ping timeout","server shutting down","forced server close"]);function fl(){}var ur=class extends Wg.StrictEventEmitter{constructor(e,t,i,n){super(),this.nsp=e,this.client=t,this.recovered=!1,this.data={},this.connected=!1,this.acks=new Map,this.fns=[],this.flags={},this.server=e.server,this.adapter=e.adapter,n?(this.id=n.sid,this.pid=n.pid,n.rooms.forEach(r=>this.join(r)),this.data=n.data,n.missedPackets.forEach(r=>{this.packet({type:oe.PacketType.EVENT,data:r})}),this.recovered=!0):(t.conn.protocol===3?this.id=e.name!=="/"?e.name+"#"+t.id:t.id:this.id=dl.default.generateId(),this.server._opts.connectionStateRecovery&&(this.pid=dl.default.generateId())),this.handshake=this.buildHandshake(i),this.on("error",fl)}buildHandshake(e){var t,i,n,r;return{headers:((t=this.request)===null||t===void 0?void 0:t.headers)||{},time:new Date+"",address:this.conn.remoteAddress,xdomain:!!(!((i=this.request)===null||i===void 0)&&i.headers.origin),secure:!this.request||!!this.request.connection.encrypted,issued:+new Date,url:(n=this.request)===null||n===void 0?void 0:n.url,query:((r=this.request)===null||r===void 0?void 0:r._query)||{},auth:e}}emit(e,...t){if(Vg.RESERVED_EVENTS.has(e))throw new Error(`"${String(e)}" is a reserved event name`);let i=[e,...t],n={type:oe.PacketType.EVENT,data:i};if(typeof i[i.length-1]=="function"){let a=this.nsp._ids++;U("emitting packet with ack id %d",a),this.registerAckCallback(a,i.pop()),n.id=a}let r=Object.assign({},this.flags);return this.flags={},this.nsp.server.opts.connectionStateRecovery?this.adapter.broadcast(n,{rooms:new Set([this.id]),except:new Set,flags:r}):(this.notifyOutgoingListeners(n),this.packet(n,r)),!0}emitWithAck(e,...t){let i=this.flags.timeout!==void 0;return new Promise((n,r)=>{t.push((a,o)=>i?a?r(a):n(o):n(a)),this.emit(e,...t)})}registerAckCallback(e,t){let i=this.flags.timeout;if(i===void 0){this.acks.set(e,t);return}let n=setTimeout(()=>{U("event with ack id %d has timed out after %d ms",e,i),this.acks.delete(e),t.call(this,new Error("operation has timed out"))},i);this.acks.set(e,(...r)=>{clearTimeout(n),t.apply(this,[null,...r])})}to(e){return this.newBroadcastOperator().to(e)}in(e){return this.newBroadcastOperator().in(e)}except(e){return this.newBroadcastOperator().except(e)}send(...e){return this.emit("message",...e),this}write(...e){return this.emit("message",...e),this}packet(e,t={}){e.nsp=this.nsp.name,t.compress=t.compress!==!1,this.client._packet(e,t)}join(e){return U("join room %s",e),this.adapter.addAll(this.id,new Set(Array.isArray(e)?e:[e]))}leave(e){return U("leave room %s",e),this.adapter.del(this.id,e)}leaveAll(){this.adapter.delAll(this.id)}_onconnect(){U("socket connected - writing packet"),this.connected=!0,this.join(this.id),this.conn.protocol===3?this.packet({type:oe.PacketType.CONNECT}):this.packet({type:oe.PacketType.CONNECT,data:{sid:this.id,pid:this.pid}})}_onpacket(e){switch(U("got packet %j",e),e.type){case oe.PacketType.EVENT:this.onevent(e);break;case oe.PacketType.BINARY_EVENT:this.onevent(e);break;case oe.PacketType.ACK:this.onack(e);break;case oe.PacketType.BINARY_ACK:this.onack(e);break;case oe.PacketType.DISCONNECT:this.ondisconnect();break}}onevent(e){let t=e.data||[];if(U("emitting event %j",t),e.id!=null&&(U("attaching ack callback to event"),t.push(this.ack(e.id))),this._anyListeners&&this._anyListeners.length){let i=this._anyListeners.slice();for(let n of i)n.apply(this,t)}this.dispatch(t)}ack(e){let t=this,i=!1;return function(){if(i)return;let n=Array.prototype.slice.call(arguments);U("sending ack %j",n),t.packet({id:e,type:oe.PacketType.ACK,data:n}),i=!0}}onack(e){let t=this.acks.get(e.id);typeof t=="function"?(U("calling ack %s with %j",e.id,e.data),t.apply(this,e.data),this.acks.delete(e.id)):U("bad ack %s",e.id)}ondisconnect(){U("got disconnect packet"),this._onclose("client namespace disconnect")}_onerror(e){this.emitReserved("error",e)}_onclose(e,t){if(!this.connected)return this;U("closing socket - reason %s",e),this.emitReserved("disconnecting",e,t),this.server._opts.connectionStateRecovery&&Gg.has(e)&&(U("connection state recovery is enabled for sid %s",this.id),this.adapter.persistSession({sid:this.id,pid:this.pid,rooms:[...this.rooms],data:this.data})),this._cleanup(),this.client._remove(this),this.connected=!1,this.emitReserved("disconnect",e,t)}_cleanup(){this.leaveAll(),this.nsp._remove(this),this.join=fl}_error(e){this.packet({type:oe.PacketType.CONNECT_ERROR,data:e})}disconnect(e=!1){return this.connected?(e?this.client._disconnect():(this.packet({type:oe.PacketType.DISCONNECT}),this._onclose("server namespace disconnect")),this):this}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}get broadcast(){return this.newBroadcastOperator()}get local(){return this.newBroadcastOperator().local}timeout(e){return this.flags.timeout=e,this}dispatch(e){U("dispatching an event %j",e),this.run(e,t=>{process.nextTick(()=>{if(t)return this._onerror(t);this.connected?super.emitUntyped.apply(this,e):U("ignore packet received after disconnection")})})}use(e){return this.fns.push(e),this}run(e,t){if(!this.fns.length)return t();let i=this.fns.slice(0);function n(r){i[r](e,a=>{if(a)return t(a);if(!i[r+1])return t();n(r+1)})}n(0)}get disconnected(){return!this.connected}get request(){return this.client.request}get conn(){return this.client.conn}get rooms(){return this.adapter.socketRooms(this.id)||new Set}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)}}newBroadcastOperator(){let e=Object.assign({},this.flags);return this.flags={},new $g.BroadcastOperator(this.adapter,new Set,new Set([this.id]),e)}};Tt.Socket=ur});var mr=g(Pe=>{"use strict";var Kg=Pe&&Pe.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(Pe,"__esModule",{value:!0});Pe.Namespace=Pe.RESERVED_EVENTS=void 0;var hl=dr(),Yg=di(),Xg=Kg(M()),se=pr(),Ot=(0,Xg.default)("socket.io:namespace");Pe.RESERVED_EVENTS=new Set(["connect","connection","new_namespace"]);var fr=class extends Yg.StrictEventEmitter{constructor(e,t){super(),this.sockets=new Map,this._preConnectSockets=new Map,this._fns=[],this._ids=0,this.server=e,this.name=t,this._initAdapter()}_initAdapter(){this.adapter=new(this.server.adapter())(this),Promise.resolve(this.adapter.init()).catch(e=>{Ot("error while initializing adapter: %s",e)})}use(e){return this._fns.push(e),this}run(e,t){if(!this._fns.length)return t();let i=this._fns.slice(0);function n(r){i[r](e,a=>{if(a)return t(a);if(!i[r+1])return t();n(r+1)})}n(0)}to(e){return new se.BroadcastOperator(this.adapter).to(e)}in(e){return new se.BroadcastOperator(this.adapter).in(e)}except(e){return new se.BroadcastOperator(this.adapter).except(e)}async _add(e,t,i){var n;Ot("adding socket to nsp %s",this.name);let r=await this._createSocket(e,t);if(this._preConnectSockets.set(r.id,r),!((n=this.server.opts.connectionStateRecovery)===null||n===void 0)&&n.skipMiddlewares&&r.recovered&&e.conn.readyState==="open")return this._doConnect(r,i);this.run(r,a=>{process.nextTick(()=>{if(e.conn.readyState!=="open"){Ot("next called after client was closed - ignoring socket"),r._cleanup();return}if(a)return Ot("middleware error, sending CONNECT_ERROR packet to the client"),r._cleanup(),e.conn.protocol===3?r._error(a.data||a.message):r._error({message:a.message,data:a.data});this._doConnect(r,i)})})}async _createSocket(e,t){let i=t.pid,n=t.offset;if(this.server.opts.connectionStateRecovery&&typeof i=="string"&&typeof n=="string"){let r;try{r=await this.adapter.restoreSession(i,n)}catch(a){Ot("error while restoring session: %s",a)}if(r)return Ot("connection state recovered for sid %s",r.sid),new hl.Socket(this,e,t,r)}return new hl.Socket(this,e,t)}_doConnect(e,t){this._preConnectSockets.delete(e.id),this.sockets.set(e.id,e),e._onconnect(),t&&t(e),this.emitReserved("connect",e),this.emitReserved("connection",e)}_remove(e){this.sockets.delete(e.id)||this._preConnectSockets.delete(e.id)}emit(e,...t){return new se.BroadcastOperator(this.adapter).emit(e,...t)}send(...e){return this.emit("message",...e),this}write(...e){return this.emit("message",...e),this}serverSideEmit(e,...t){if(Pe.RESERVED_EVENTS.has(e))throw new Error(`"${String(e)}" is a reserved event name`);return t.unshift(e),this.adapter.serverSideEmit(t),!0}serverSideEmitWithAck(e,...t){return new Promise((i,n)=>{t.push((r,a)=>r?(r.responses=a,n(r)):i(a)),this.serverSideEmit(e,...t)})}_onServerSideEmit(e){super.emitUntyped.apply(this,e)}allSockets(){return new se.BroadcastOperator(this.adapter).allSockets()}compress(e){return new se.BroadcastOperator(this.adapter).compress(e)}get volatile(){return new se.BroadcastOperator(this.adapter).volatile}get local(){return new se.BroadcastOperator(this.adapter).local}timeout(e){return new se.BroadcastOperator(this.adapter).timeout(e)}fetchSockets(){return new se.BroadcastOperator(this.adapter).fetchSockets()}socketsJoin(e){return new se.BroadcastOperator(this.adapter).socketsJoin(e)}socketsLeave(e){return new se.BroadcastOperator(this.adapter).socketsLeave(e)}disconnectSockets(e=!1){return new se.BroadcastOperator(this.adapter).disconnectSockets(e)}};Pe.Namespace=fr});var yl=g(as=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});as.encode=hr;as.decode=Jg;as.yeast=Qg;var vl="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),gi=64,bl={},gl=0,He=0,xl;function hr(s){let e="";do e=vl[s%gi]+e,s=Math.floor(s/gi);while(s>0);return e}function Jg(s){let e=0;for(He=0;He<s.length;He++)e=e*gi+bl[s.charAt(He)];return e}function Qg(){let s=hr(+new Date);return s!==xl?(gl=0,xl=s):s+"."+hr(gl++)}for(;He<gi;He++)bl[vl[He]]=He});var vr=g(Rt=>{"use strict";var gr;Object.defineProperty(Rt,"__esModule",{value:!0});Rt.SessionAwareAdapter=Rt.Adapter=void 0;var Zg=require("events"),ex=yl(),xi=Wn(),tx=typeof((gr=xi?.Sender)===null||gr===void 0?void 0:gr.frame)=="function",vi=class extends Zg.EventEmitter{constructor(e){super(),this.nsp=e,this.rooms=new Map,this.sids=new Map,this.encoder=e.server.encoder}init(){}close(){}serverCount(){return Promise.resolve(1)}addAll(e,t){this.sids.has(e)||this.sids.set(e,new Set);for(let i of t)this.sids.get(e).add(i),this.rooms.has(i)||(this.rooms.set(i,new Set),this.emit("create-room",i)),this.rooms.get(i).has(e)||(this.rooms.get(i).add(e),this.emit("join-room",i,e))}del(e,t){this.sids.has(e)&&this.sids.get(e).delete(t),this._del(t,e)}_del(e,t){let i=this.rooms.get(e);i!=null&&(i.delete(t)&&this.emit("leave-room",e,t),i.size===0&&this.rooms.delete(e)&&this.emit("delete-room",e))}delAll(e){if(this.sids.has(e)){for(let t of this.sids.get(e))this._del(t,e);this.sids.delete(e)}}broadcast(e,t){let i=t.flags||{},n={preEncoded:!0,volatile:i.volatile,compress:i.compress};e.nsp=this.nsp.name;let r=this._encode(e,n);this.apply(t,a=>{typeof a.notifyOutgoingListeners=="function"&&a.notifyOutgoingListeners(e),a.client.writeToEngine(r,n)})}broadcastWithAck(e,t,i,n){let r=t.flags||{},a={preEncoded:!0,volatile:r.volatile,compress:r.compress};e.nsp=this.nsp.name,e.id=this.nsp._ids++;let o=this._encode(e,a),c=0;this.apply(t,l=>{c++,l.acks.set(e.id,n),typeof l.notifyOutgoingListeners=="function"&&l.notifyOutgoingListeners(e),l.client.writeToEngine(o,a)}),i(c)}_encode(e,t){let i=this.encoder.encode(e);if(tx&&i.length===1&&typeof i[0]=="string"){let n=Buffer.from("4"+i[0]);t.wsPreEncodedFrame=xi.Sender.frame(n,{readOnly:!1,mask:!1,rsv1:!1,opcode:1,fin:!0})}return i}sockets(e){let t=new Set;return this.apply({rooms:e},i=>{t.add(i.id)}),Promise.resolve(t)}socketRooms(e){return this.sids.get(e)}fetchSockets(e){let t=[];return this.apply(e,i=>{t.push(i)}),Promise.resolve(t)}addSockets(e,t){this.apply(e,i=>{i.join(t)})}delSockets(e,t){this.apply(e,i=>{t.forEach(n=>i.leave(n))})}disconnectSockets(e,t){this.apply(e,i=>{i.disconnect(t)})}apply(e,t){let i=e.rooms,n=this.computeExceptSids(e.except);if(i.size){let r=new Set;for(let a of i)if(this.rooms.has(a))for(let o of this.rooms.get(a)){if(r.has(o)||n.has(o))continue;let c=this.nsp.sockets.get(o);c&&(t(c),r.add(o))}}else for(let[r]of this.sids){if(n.has(r))continue;let a=this.nsp.sockets.get(r);a&&t(a)}}computeExceptSids(e){let t=new Set;if(e&&e.size>0)for(let i of e)this.rooms.has(i)&&this.rooms.get(i).forEach(n=>t.add(n));return t}serverSideEmit(e){console.warn("this adapter does not support the serverSideEmit() functionality")}persistSession(e){}restoreSession(e,t){return null}};Rt.Adapter=vi;var xr=class extends vi{constructor(e){super(e),this.nsp=e,this.sessions=new Map,this.packets=[],this.maxDisconnectionDuration=e.server.opts.connectionStateRecovery.maxDisconnectionDuration,setInterval(()=>{let i=Date.now()-this.maxDisconnectionDuration;this.sessions.forEach((n,r)=>{n.disconnectedAt<i&&this.sessions.delete(r)});for(let n=this.packets.length-1;n>=0;n--)if(this.packets[n].emittedAt<i){this.packets.splice(0,n+1);break}},60*1e3).unref()}persistSession(e){e.disconnectedAt=Date.now(),this.sessions.set(e.pid,e)}restoreSession(e,t){let i=this.sessions.get(e);if(!i)return null;if(i.disconnectedAt+this.maxDisconnectionDuration<Date.now())return this.sessions.delete(e),null;let r=this.packets.findIndex(o=>o.id===t);if(r===-1)return null;let a=[];for(let o=r+1;o<this.packets.length;o++){let c=this.packets[o];sx(i.rooms,c.opts)&&a.push(c.data)}return Promise.resolve(Object.assign(Object.assign({},i),{missedPackets:a}))}broadcast(e,t){var i;let n=e.type===2,r=e.id===void 0,a=((i=t.flags)===null||i===void 0?void 0:i.volatile)===void 0;if(n&&r&&a){let o=(0,ex.yeast)();e.data.push(o),this.packets.push({id:o,opts:t,data:e.data,emittedAt:Date.now()})}super.broadcast(e,t)}};Rt.SessionAwareAdapter=xr;function sx(s,e){let t=e.rooms.size===0||s.some(n=>e.rooms.has(n)),i=s.every(n=>!e.except.has(n));return t&&i}});var wl=g(be=>{"use strict";var ix=be&&be.__rest||function(s,e){var t={};for(var i in s)Object.prototype.hasOwnProperty.call(s,i)&&e.indexOf(i)<0&&(t[i]=s[i]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(s);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(s,i[n])&&(t[i[n]]=s[i[n]]);return t};Object.defineProperty(be,"__esModule",{value:!0});be.ClusterAdapterWithHeartbeat=be.ClusterAdapter=be.MessageType=void 0;var nx=vr(),rx=M(),ax=require("crypto"),A=(0,rx.debug)("socket.io-adapter"),ox="emitter",bi=5e3;function Pt(){return(0,ax.randomBytes)(8).toString("hex")}var w;(function(s){s[s.INITIAL_HEARTBEAT=1]="INITIAL_HEARTBEAT",s[s.HEARTBEAT=2]="HEARTBEAT",s[s.BROADCAST=3]="BROADCAST",s[s.SOCKETS_JOIN=4]="SOCKETS_JOIN",s[s.SOCKETS_LEAVE=5]="SOCKETS_LEAVE",s[s.DISCONNECT_SOCKETS=6]="DISCONNECT_SOCKETS",s[s.FETCH_SOCKETS=7]="FETCH_SOCKETS",s[s.FETCH_SOCKETS_RESPONSE=8]="FETCH_SOCKETS_RESPONSE",s[s.SERVER_SIDE_EMIT=9]="SERVER_SIDE_EMIT",s[s.SERVER_SIDE_EMIT_RESPONSE=10]="SERVER_SIDE_EMIT_RESPONSE",s[s.BROADCAST_CLIENT_COUNT=11]="BROADCAST_CLIENT_COUNT",s[s.BROADCAST_ACK=12]="BROADCAST_ACK",s[s.ADAPTER_CLOSE=13]="ADAPTER_CLOSE"})(w||(be.MessageType=w={}));function tt(s){return{rooms:[...s.rooms],except:[...s.except],flags:s.flags}}function At(s){return{rooms:new Set(s.rooms),except:new Set(s.except),flags:s.flags}}var yi=class extends nx.Adapter{constructor(e){super(e),this.requests=new Map,this.ackRequests=new Map,this.uid=Pt()}onMessage(e,t){if(e.uid===this.uid)return A("[%s] ignore message from self",this.uid);if(e.nsp!==this.nsp.name)return A("[%s] ignore message from another namespace (%s)",this.uid,e.nsp);switch(A("[%s] new event of type %d from %s",this.uid,e.type,e.uid),e.type){case w.BROADCAST:{if(e.data.requestId!==void 0)super.broadcastWithAck(e.data.packet,At(e.data.opts),n=>{A("[%s] waiting for %d client acknowledgements",this.uid,n),this.publishResponse(e.uid,{type:w.BROADCAST_CLIENT_COUNT,data:{requestId:e.data.requestId,clientCount:n}})},n=>{A("[%s] received acknowledgement with value %j",this.uid,n),this.publishResponse(e.uid,{type:w.BROADCAST_ACK,data:{requestId:e.data.requestId,packet:n}})});else{let n=e.data.packet,r=At(e.data.opts);this.addOffsetIfNecessary(n,r,t),super.broadcast(n,r)}break}case w.SOCKETS_JOIN:super.addSockets(At(e.data.opts),e.data.rooms);break;case w.SOCKETS_LEAVE:super.delSockets(At(e.data.opts),e.data.rooms);break;case w.DISCONNECT_SOCKETS:super.disconnectSockets(At(e.data.opts),e.data.close);break;case w.FETCH_SOCKETS:{A("[%s] calling fetchSockets with opts %j",this.uid,e.data.opts),super.fetchSockets(At(e.data.opts)).then(i=>{this.publishResponse(e.uid,{type:w.FETCH_SOCKETS_RESPONSE,data:{requestId:e.data.requestId,sockets:i.map(n=>{let r=n.handshake,{sessionStore:a}=r,o=ix(r,["sessionStore"]);return{id:n.id,handshake:o,rooms:[...n.rooms],data:n.data}})}})});break}case w.SERVER_SIDE_EMIT:{let i=e.data.packet;if(!(e.data.requestId!==void 0)){this.nsp._onServerSideEmit(i);return}let r=!1,a=o=>{r||(r=!0,A("[%s] calling acknowledgement with %j",this.uid,o),this.publishResponse(e.uid,{type:w.SERVER_SIDE_EMIT_RESPONSE,data:{requestId:e.data.requestId,packet:o}}))};this.nsp._onServerSideEmit([...i,a]);break}case w.BROADCAST_CLIENT_COUNT:case w.BROADCAST_ACK:case w.FETCH_SOCKETS_RESPONSE:case w.SERVER_SIDE_EMIT_RESPONSE:this.onResponse(e);break;default:A("[%s] unknown message type: %s",this.uid,e.type)}}onResponse(e){var t,i;let n=e.data.requestId;switch(A("[%s] received response %s to request %s",this.uid,e.type,n),e.type){case w.BROADCAST_CLIENT_COUNT:{(t=this.ackRequests.get(n))===null||t===void 0||t.clientCountCallback(e.data.clientCount);break}case w.BROADCAST_ACK:{(i=this.ackRequests.get(n))===null||i===void 0||i.ack(e.data.packet);break}case w.FETCH_SOCKETS_RESPONSE:{let r=this.requests.get(n);if(!r)return;r.current++,e.data.sockets.forEach(a=>r.responses.push(a)),r.current===r.expected&&(clearTimeout(r.timeout),r.resolve(r.responses),this.requests.delete(n));break}case w.SERVER_SIDE_EMIT_RESPONSE:{let r=this.requests.get(n);if(!r)return;r.current++,r.responses.push(e.data.packet),r.current===r.expected&&(clearTimeout(r.timeout),r.resolve(null,r.responses),this.requests.delete(n));break}default:A("[%s] unknown response type: %s",this.uid,e.type)}}async broadcast(e,t){var i;if(!((i=t.flags)===null||i===void 0?void 0:i.local))try{let r=await this.publishAndReturnOffset({type:w.BROADCAST,data:{packet:e,opts:tt(t)}});this.addOffsetIfNecessary(e,t,r)}catch(r){return A("[%s] error while broadcasting message: %s",this.uid,r.message)}super.broadcast(e,t)}addOffsetIfNecessary(e,t,i){var n;if(!this.nsp.server.opts.connectionStateRecovery)return;let r=e.type===2,a=e.id===void 0,o=((n=t.flags)===null||n===void 0?void 0:n.volatile)===void 0;r&&a&&o&&e.data.push(i)}broadcastWithAck(e,t,i,n){var r;if(!((r=t?.flags)===null||r===void 0?void 0:r.local)){let o=Pt();this.ackRequests.set(o,{clientCountCallback:i,ack:n}),this.publish({type:w.BROADCAST,data:{packet:e,requestId:o,opts:tt(t)}}),setTimeout(()=>{this.ackRequests.delete(o)},t.flags.timeout)}super.broadcastWithAck(e,t,i,n)}async addSockets(e,t){var i;if(!((i=e.flags)===null||i===void 0?void 0:i.local))try{await this.publishAndReturnOffset({type:w.SOCKETS_JOIN,data:{opts:tt(e),rooms:t}})}catch(r){A("[%s] error while publishing message: %s",this.uid,r.message)}super.addSockets(e,t)}async delSockets(e,t){var i;if(!((i=e.flags)===null||i===void 0?void 0:i.local))try{await this.publishAndReturnOffset({type:w.SOCKETS_LEAVE,data:{opts:tt(e),rooms:t}})}catch(r){A("[%s] error while publishing message: %s",this.uid,r.message)}super.delSockets(e,t)}async disconnectSockets(e,t){var i;if(!((i=e.flags)===null||i===void 0?void 0:i.local))try{await this.publishAndReturnOffset({type:w.DISCONNECT_SOCKETS,data:{opts:tt(e),close:t}})}catch(r){A("[%s] error while publishing message: %s",this.uid,r.message)}super.disconnectSockets(e,t)}async fetchSockets(e){var t;let[i,n]=await Promise.all([super.fetchSockets(e),this.serverCount()]),r=n-1;if(!((t=e.flags)===null||t===void 0)&&t.local||r<=0)return i;let a=Pt();return new Promise((o,c)=>{let l=setTimeout(()=>{let u=this.requests.get(a);u&&(c(new Error(`timeout reached: only ${u.current} responses received out of ${u.expected}`)),this.requests.delete(a))},e.flags.timeout||bi),p={type:w.FETCH_SOCKETS,resolve:o,timeout:l,current:0,expected:r,responses:i};this.requests.set(a,p),this.publish({type:w.FETCH_SOCKETS,data:{opts:tt(e),requestId:a}})})}async serverSideEmit(e){if(!(typeof e[e.length-1]=="function"))return this.publish({type:w.SERVER_SIDE_EMIT,data:{packet:e}});let i=e.pop(),n=await this.serverCount()-1;if(A('[%s] waiting for %d responses to "serverSideEmit" request',this.uid,n),n<=0)return i(null,[]);let r=Pt(),a=setTimeout(()=>{let c=this.requests.get(r);c&&(i(new Error(`timeout reached: only ${c.current} responses received out of ${c.expected}`),c.responses),this.requests.delete(r))},bi),o={type:w.SERVER_SIDE_EMIT,resolve:i,timeout:a,current:0,expected:n,responses:[]};this.requests.set(r,o),this.publish({type:w.SERVER_SIDE_EMIT,data:{requestId:r,packet:e}})}publish(e){A("[%s] sending message %s",this.uid,e.type),this.publishAndReturnOffset(e).catch(t=>{A("[%s] error while publishing message: %s",this.uid,t)})}publishAndReturnOffset(e){return e.uid=this.uid,e.nsp=this.nsp.name,this.doPublish(e)}publishResponse(e,t){t.uid=this.uid,t.nsp=this.nsp.name,A("[%s] sending response %s to %s",this.uid,t.type,e),this.doPublishResponse(e,t).catch(i=>{A("[%s] error while publishing response: %s",this.uid,i)})}};be.ClusterAdapter=yi;var br=class extends yi{constructor(e,t){super(e),this.nodesMap=new Map,this.customRequests=new Map,this._opts=Object.assign({heartbeatInterval:5e3,heartbeatTimeout:1e4},t),this.cleanupTimer=setInterval(()=>{let i=Date.now();this.nodesMap.forEach((n,r)=>{i-n>this._opts.heartbeatTimeout&&(A("[%s] node %s seems down",this.uid,r),this.removeNode(r))})},1e3)}init(){this.publish({type:w.INITIAL_HEARTBEAT})}scheduleHeartbeat(){this.heartbeatTimer?this.heartbeatTimer.refresh():this.heartbeatTimer=setTimeout(()=>{this.publish({type:w.HEARTBEAT})},this._opts.heartbeatInterval)}close(){this.publish({type:w.ADAPTER_CLOSE}),clearTimeout(this.heartbeatTimer),this.cleanupTimer&&clearInterval(this.cleanupTimer)}onMessage(e,t){if(e.uid===this.uid)return A("[%s] ignore message from self",this.uid);switch(e.uid&&e.uid!==ox&&this.nodesMap.set(e.uid,Date.now()),e.type){case w.INITIAL_HEARTBEAT:this.publish({type:w.HEARTBEAT});break;case w.HEARTBEAT:break;case w.ADAPTER_CLOSE:this.removeNode(e.uid);break;default:super.onMessage(e,t)}}serverCount(){return Promise.resolve(1+this.nodesMap.size)}publish(e){return this.scheduleHeartbeat(),super.publish(e)}async serverSideEmit(e){if(!(typeof e[e.length-1]=="function"))return this.publish({type:w.SERVER_SIDE_EMIT,data:{packet:e}});let i=e.pop(),n=this.nodesMap.size;if(A('[%s] waiting for %d responses to "serverSideEmit" request',this.uid,n),n<=0)return i(null,[]);let r=Pt(),a=setTimeout(()=>{let c=this.customRequests.get(r);c&&(i(new Error(`timeout reached: missing ${c.missingUids.size} responses`),c.responses),this.customRequests.delete(r))},bi),o={type:w.SERVER_SIDE_EMIT,resolve:i,timeout:a,missingUids:new Set([...this.nodesMap.keys()]),responses:[]};this.customRequests.set(r,o),this.publish({type:w.SERVER_SIDE_EMIT,data:{requestId:r,packet:e}})}async fetchSockets(e){var t;let[i,n]=await Promise.all([super.fetchSockets({rooms:e.rooms,except:e.except,flags:{local:!0}}),this.serverCount()]),r=n-1;if(!((t=e.flags)===null||t===void 0)&&t.local||r<=0)return i;let a=Pt();return new Promise((o,c)=>{let l=setTimeout(()=>{let u=this.customRequests.get(a);u&&(c(new Error(`timeout reached: missing ${u.missingUids.size} responses`)),this.customRequests.delete(a))},e.flags.timeout||bi),p={type:w.FETCH_SOCKETS,resolve:o,timeout:l,missingUids:new Set([...this.nodesMap.keys()]),responses:i};this.customRequests.set(a,p),this.publish({type:w.FETCH_SOCKETS,data:{opts:tt(e),requestId:a}})})}onResponse(e){let t=e.data.requestId;switch(A("[%s] received response %s to request %s",this.uid,e.type,t),e.type){case w.FETCH_SOCKETS_RESPONSE:{let i=this.customRequests.get(t);if(!i)return;e.data.sockets.forEach(n=>i.responses.push(n)),i.missingUids.delete(e.uid),i.missingUids.size===0&&(clearTimeout(i.timeout),i.resolve(i.responses),this.customRequests.delete(t));break}case w.SERVER_SIDE_EMIT_RESPONSE:{let i=this.customRequests.get(t);if(!i)return;i.responses.push(e.data.packet),i.missingUids.delete(e.uid),i.missingUids.size===0&&(clearTimeout(i.timeout),i.resolve(null,i.responses),this.customRequests.delete(t));break}default:super.onResponse(e)}}removeNode(e){this.customRequests.forEach((t,i)=>{t.missingUids.delete(e),t.missingUids.size===0&&(clearTimeout(t.timeout),t.type===w.FETCH_SOCKETS?t.resolve(t.responses):t.type===w.SERVER_SIDE_EMIT&&t.resolve(null,t.responses),this.customRequests.delete(i))}),this.nodesMap.delete(e)}};be.ClusterAdapterWithHeartbeat=br});var wi=g(ce=>{"use strict";Object.defineProperty(ce,"__esModule",{value:!0});ce.MessageType=ce.ClusterAdapterWithHeartbeat=ce.ClusterAdapter=ce.SessionAwareAdapter=ce.Adapter=void 0;var _l=vr();Object.defineProperty(ce,"Adapter",{enumerable:!0,get:function(){return _l.Adapter}});Object.defineProperty(ce,"SessionAwareAdapter",{enumerable:!0,get:function(){return _l.SessionAwareAdapter}});var yr=wl();Object.defineProperty(ce,"ClusterAdapter",{enumerable:!0,get:function(){return yr.ClusterAdapter}});Object.defineProperty(ce,"ClusterAdapterWithHeartbeat",{enumerable:!0,get:function(){return yr.ClusterAdapterWithHeartbeat}});Object.defineProperty(ce,"MessageType",{enumerable:!0,get:function(){return yr.MessageType}})});var kl=g(jt=>{"use strict";var cx=jt&&jt.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(jt,"__esModule",{value:!0});jt.ParentNamespace=void 0;var Sl=mr(),lx=wi(),px=cx(M()),El=(0,px.default)("socket.io:parent-namespace"),_i=class s extends Sl.Namespace{constructor(e){super(e,"/_"+s.count++),this.children=new Set}_initAdapter(){this.adapter=new wr(this)}emit(e,...t){return this.children.forEach(i=>{i.emit(e,...t)}),!0}createChild(e){El("creating child namespace %s",e);let t=new Sl.Namespace(this.server,e);if(this._fns.forEach(i=>t.use(i)),this.listeners("connect").forEach(i=>t.on("connect",i)),this.listeners("connection").forEach(i=>t.on("connection",i)),this.children.add(t),this.server._opts.cleanupEmptyChildNamespaces){let i=t._remove;t._remove=n=>{i.call(t,n),t.sockets.size===0&&(El("closing child namespace %s",e),t.adapter.close(),this.server._nsps.delete(t.name),this.children.delete(t))}}return this.server._nsps.set(e,t),this.server.sockets.emitReserved("new_namespace",t),t}fetchSockets(){throw new Error("fetchSockets() is not supported on parent namespaces")}};jt.ParentNamespace=_i;_i.count=0;var wr=class extends lx.Adapter{broadcast(e,t){this.nsp.children.forEach(i=>{i.adapter.broadcast(e,t)})}}});var Pl=g(it=>{"use strict";var ux=it&&it.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(it,"__esModule",{value:!0});it.patchAdapter=fx;it.restoreAdapter=mx;it.serveFile=gx;var st=wi(),Cl=require("fs"),dx=ux(M()),Si=(0,dx.default)("socket.io:adapter-uws"),_r="",{addAll:Ol,del:Rl,broadcast:Al}=st.Adapter.prototype;function fx(s){st.Adapter.prototype.addAll=function(e,t){let i=!this.sids.has(e);Ol.call(this,e,t);let n=this.nsp.sockets.get(e)||this.nsp._preConnectSockets.get(e);if(n){if(n.conn.transport.name==="websocket"){Tl(this.nsp.name,n,i,t);return}i&&n.conn.on("upgrade",()=>{let r=this.sids.get(e);r&&Tl(this.nsp.name,n,i,r)})}},st.Adapter.prototype.del=function(e,t){Rl.call(this,e,t);let i=this.nsp.sockets.get(e)||this.nsp._preConnectSockets.get(e);if(i&&i.conn.transport.name==="websocket"){let n=i.conn.id,r=i.conn.transport.socket,a=`${this.nsp.name}${_r}${t}`;Si("unsubscribe connection %s from topic %s",n,a),r.unsubscribe(a)}},st.Adapter.prototype.broadcast=function(e,t){if(!(t.rooms.size<=1&&t.except.size===0)){Al.call(this,e,t);return}let n=t.flags||{},r={preEncoded:!0,volatile:n.volatile,compress:n.compress};e.nsp=this.nsp.name;let a=this.encoder.encode(e),o=t.rooms.size===0?this.nsp.name:`${this.nsp.name}${_r}${t.rooms.keys().next().value}`;Si("fast publish to %s",o),a.forEach(c=>{let l=typeof c!="string";s.publish(o,l?c:"4"+c,l)}),this.apply(t,c=>{c.conn.transport.name!=="websocket"&&c.client.writeToEngine(a,r)})}}function Tl(s,e,t,i){let n=e.conn.id,r=e.conn.transport.socket;t&&(Si("subscribe connection %s to topic %s",n,s),r.subscribe(s)),i.forEach(a=>{let o=`${s}${_r}${a}`;Si("subscribe connection %s to topic %s",n,o),r.subscribe(o)})}function mx(){st.Adapter.prototype.addAll=Ol,st.Adapter.prototype.del=Rl,st.Adapter.prototype.broadcast=Al}var hx=s=>{let{buffer:e,byteOffset:t,byteLength:i}=s;return e.slice(t,t+i)};function gx(s,e){let{size:t}=(0,Cl.statSync)(e),i=(0,Cl.createReadStream)(e),n=()=>!i.destroyed&&i.destroy(),r=o=>{throw n(),o},a=o=>{let c=hx(o);s.cork(()=>{let l=s.getWriteOffset(),[p,u]=s.tryEnd(c,t);!u&&!p&&(i.pause(),s.onWritable(d=>{let[h,m]=s.tryEnd(c.slice(d-l),t);return!m&&h&&i.resume(),h}))})};s.onAborted(n),i.on("data",a).on("error",r).on("end",n)}});var jl=g((P0,xx)=>{xx.exports={name:"socket.io",version:"4.8.3",description:"node.js realtime framework server",keywords:["realtime","framework","websocket","tcp","events","socket","io"],files:["dist/","client-dist/","wrapper.mjs","!**/*.tsbuildinfo"],directories:{doc:"docs/",example:"example/",lib:"lib/",test:"test/"},type:"commonjs",main:"./dist/index.js",exports:{".":{types:"./dist/index.d.ts",import:"./wrapper.mjs",require:"./dist/index.js"},"./package.json":"./package.json"},types:"./dist/index.d.ts",license:"MIT",homepage:"https://github.com/socketio/socket.io/tree/main/packages/socket.io#readme",repository:{type:"git",url:"git+https://github.com/socketio/socket.io.git"},bugs:{url:"https://github.com/socketio/socket.io/issues"},scripts:{compile:"rimraf ./dist && tsc",test:"npm run format:check && npm run compile && npm run test:types && npm run test:unit","test:types":"tsd","test:unit":"nyc mocha --import=tsx --reporter spec --slow 200 --bail --timeout 10000 test/index.ts","format:check":'prettier --check "lib/**/*.ts" "test/**/*.ts"',"format:fix":'prettier --write "lib/**/*.ts" "test/**/*.ts"',prepack:"npm run compile"},dependencies:{accepts:"~1.3.4",base64id:"~2.0.0",cors:"~2.8.5",debug:"~4.4.1","engine.io":"~6.6.0","socket.io-adapter":"~2.5.2","socket.io-parser":"~4.2.4"},contributors:[{name:"Guillermo Rauch",email:"rauchg@gmail.com"},{name:"Arnout Kazemier",email:"info@3rd-eden.com"},{name:"Vladimir Dronnikov",email:"dronnikov@gmail.com"},{name:"Einar Otto Stangvik",email:"einaros@gmail.com"}],engines:{node:">=10.2.0"},tsd:{directory:"test"}}});var ql=g((H,os)=>{"use strict";var vx=H&&H.__createBinding||(Object.create?(function(s,e,t,i){i===void 0&&(i=t);var n=Object.getOwnPropertyDescriptor(e,t);(!n||("get"in n?!e.__esModule:n.writable||n.configurable))&&(n={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(s,i,n)}):(function(s,e,t,i){i===void 0&&(i=t),s[i]=e[t]})),bx=H&&H.__setModuleDefault||(Object.create?(function(s,e){Object.defineProperty(s,"default",{enumerable:!0,value:e})}):function(s,e){s.default=e}),yx=H&&H.__importStar||function(s){if(s&&s.__esModule)return s;var e={};if(s!=null)for(var t in s)t!=="default"&&Object.prototype.hasOwnProperty.call(s,t)&&vx(e,s,t);return bx(e,s),e},kr=H&&H.__importDefault||function(s){return s&&s.__esModule?s:{default:s}};Object.defineProperty(H,"__esModule",{value:!0});H.Namespace=H.Socket=H.Server=void 0;var wx=kr(require("http")),_x=require("fs"),Sr=require("zlib"),Sx=Es(),Ei=require("stream"),Ml=require("path"),Bl=sl(),Ex=ul(),Dl=require("events"),Cr=mr();Object.defineProperty(H,"Namespace",{enumerable:!0,get:function(){return Cr.Namespace}});var kx=kl(),Nl=wi(),Cx=yx(rs()),Tx=kr(M()),Fl=dr();Object.defineProperty(H,"Socket",{enumerable:!0,get:function(){return Fl.Socket}});var Ox=di(),Er=Pl(),Rx=kr(Vn()),$=(0,Tx.default)("socket.io:server"),Il=jl().version,Ll=/\.map/,Mt=class s extends Ox.StrictEventEmitter{constructor(e,t={}){super(),this._nsps=new Map,this.parentNsps=new Map,this.parentNamespacesFromRegExp=new Map,typeof e=="object"&&e instanceof Object&&!e.listen&&(t=e,e=void 0),this.path(t.path||"/socket.io"),this.connectTimeout(t.connectTimeout||45e3),this.serveClient(t.serveClient!==!1),this._parser=t.parser||Cx,this.encoder=new this._parser.Encoder,this.opts=t,t.connectionStateRecovery?(t.connectionStateRecovery=Object.assign({maxDisconnectionDuration:120*1e3,skipMiddlewares:!0},t.connectionStateRecovery),this.adapter(t.adapter||Nl.SessionAwareAdapter)):this.adapter(t.adapter||Nl.Adapter),t.cleanupEmptyChildNamespaces=!!t.cleanupEmptyChildNamespaces,this.sockets=this.of("/"),(e||typeof e=="number")&&this.attach(e),this.opts.cors&&(this._corsMiddleware=(0,Rx.default)(this.opts.cors))}get _opts(){return this.opts}serveClient(e){return arguments.length?(this._serveClient=e,this):this._serveClient}_checkNamespace(e,t,i){if(this.parentNsps.size===0)return i(!1);let n=this.parentNsps.keys(),r=()=>{let a=n.next();if(a.done)return i(!1);a.value(e,t,(o,c)=>{if(o||!c)return r();if(this._nsps.has(e))return $("dynamic namespace %s already exists",e),i(this._nsps.get(e));let l=this.parentNsps.get(a.value).createChild(e);$("dynamic namespace %s was created",e),i(l)})};r()}path(e){if(!arguments.length)return this._path;this._path=e.replace(/\/$/,"");let t=this._path.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");return this.clientPathRegex=new RegExp("^"+t+"/socket\\.io(\\.msgpack|\\.esm)?(\\.min)?\\.js(\\.map)?(?:\\?|$)"),this}connectTimeout(e){return e===void 0?this._connectTimeout:(this._connectTimeout=e,this)}adapter(e){if(!arguments.length)return this._adapter;this._adapter=e;for(let t of this._nsps.values())t._initAdapter();return this}listen(e,t={}){return this.attach(e,t)}attach(e,t={}){if(typeof e=="function"){let i="You are trying to attach socket.io to an express request handler function. Please pass a http.Server instance.";throw new Error(i)}if(Number(e)==e&&(e=Number(e)),typeof e=="number"){$("creating http server and binding to %d",e);let i=e;e=wx.default.createServer((n,r)=>{r.writeHead(404),r.end()}),e.listen(i)}return Object.assign(t,this.opts),t.path=t.path||this._path,this.initEngine(e,t),this}attachApp(e,t={}){Object.assign(t,this.opts),t.path=t.path||this._path,$("creating uWebSockets.js-based engine with opts %j",t);let i=new Bl.uServer(t);i.attach(e,t),this.bind(i),this._serveClient&&e.get(`${this._path}/*`,(n,r)=>{if(!this.clientPathRegex.test(r.getUrl())){r.setYield(!0);return}let a=r.getUrl().replace(this._path,"").replace(/\?.*$/,"").replace(/^\//,""),o=Ll.test(a),c=o?"map":"source",l='"'+Il+'"',p="W/"+l,u=r.getHeader("if-none-match");if(u&&(l===u||p===u)){$("serve client %s 304",c),n.writeStatus("304 Not Modified"),n.end();return}$("serve client %s",c),n.writeHeader("cache-control","public, max-age=0"),n.writeHeader("content-type","application/"+(o?"json":"javascript")+"; charset=utf-8"),n.writeHeader("etag",l);let d=Ml.join(__dirname,"../client-dist/",a);(0,Er.serveFile)(n,d)}),(0,Er.patchAdapter)(e)}initEngine(e,t){$("creating engine.io instance with opts %j",t),this.eio=(0,Bl.attach)(e,t),this._serveClient&&this.attachServe(e),this.httpServer=e,this.bind(this.eio)}attachServe(e){$("attaching client serving req handler");let t=e.listeners("request").slice(0);e.removeAllListeners("request"),e.on("request",(i,n)=>{if(this.clientPathRegex.test(i.url))this._corsMiddleware?this._corsMiddleware(i,n,()=>{this.serve(i,n)}):this.serve(i,n);else for(let r=0;r<t.length;r++)t[r].call(e,i,n)})}serve(e,t){let i=e.url.replace(this._path,"").replace(/\?.*$/,""),n=Ll.test(i),r=n?"map":"source",a='"'+Il+'"',o="W/"+a,c=e.headers["if-none-match"];if(c&&(a===c||o===c)){$("serve client %s 304",r),t.writeHead(304),t.end();return}$("serve client %s",r),t.setHeader("Cache-Control","public, max-age=0"),t.setHeader("Content-Type","application/"+(n?"json":"javascript")+"; charset=utf-8"),t.setHeader("ETag",a),s.sendFile(i,e,t)}static sendFile(e,t,i){let n=(0,_x.createReadStream)(Ml.join(__dirname,"../client-dist/",e)),r=Sx(t).encodings(["br","gzip","deflate"]),a=o=>{o&&i.end()};switch(r){case"br":i.writeHead(200,{"content-encoding":"br"}),(0,Ei.pipeline)(n,(0,Sr.createBrotliCompress)(),i,a);break;case"gzip":i.writeHead(200,{"content-encoding":"gzip"}),(0,Ei.pipeline)(n,(0,Sr.createGzip)(),i,a);break;case"deflate":i.writeHead(200,{"content-encoding":"deflate"}),(0,Ei.pipeline)(n,(0,Sr.createDeflate)(),i,a);break;default:i.writeHead(200),(0,Ei.pipeline)(n,i,a)}}bind(e){return this.engine=e,this.engine.on("connection",this.onconnection.bind(this)),this}onconnection(e){$("incoming connection with id %s",e.id);let t=new Ex.Client(this,e);return e.protocol===3&&t.connect("/"),this}of(e,t){if(typeof e=="function"||e instanceof RegExp){let n=new kx.ParentNamespace(this);return $("initializing parent namespace %s",n.name),typeof e=="function"?this.parentNsps.set(e,n):(this.parentNsps.set((r,a,o)=>o(null,e.test(r)),n),this.parentNamespacesFromRegExp.set(e,n)),t&&n.on("connect",t),n}String(e)[0]!=="/"&&(e="/"+e);let i=this._nsps.get(e);if(!i){for(let[n,r]of this.parentNamespacesFromRegExp)if(n.test(e))return $("attaching namespace %s to parent namespace %s",e,n),r.createChild(e);$("initializing namespace %s",e),i=new Cr.Namespace(this,e),this._nsps.set(e,i),e!=="/"&&this.sockets.emitReserved("new_namespace",i)}return t&&i.on("connect",t),i}async close(e){if(await Promise.allSettled([...this._nsps.values()].map(async t=>{t.sockets.forEach(i=>{i._onclose("server shutting down")}),await t.adapter.close()})),this.engine.close(),(0,Er.restoreAdapter)(),this.httpServer)return new Promise(t=>{this.httpServer.close(i=>{e&&e(i),i&&$("server was not running"),t()})});e&&e()}use(e){return this.sockets.use(e),this}to(e){return this.sockets.to(e)}in(e){return this.sockets.in(e)}except(e){return this.sockets.except(e)}send(...e){return this.sockets.emit("message",...e),this}write(...e){return this.sockets.emit("message",...e),this}serverSideEmit(e,...t){return this.sockets.serverSideEmit(e,...t)}serverSideEmitWithAck(e,...t){return this.sockets.serverSideEmitWithAck(e,...t)}allSockets(){return this.sockets.allSockets()}compress(e){return this.sockets.compress(e)}get volatile(){return this.sockets.volatile}get local(){return this.sockets.local}timeout(e){return this.sockets.timeout(e)}fetchSockets(){return this.sockets.fetchSockets()}socketsJoin(e){return this.sockets.socketsJoin(e)}socketsLeave(e){return this.sockets.socketsLeave(e)}disconnectSockets(e=!1){return this.sockets.disconnectSockets(e)}};H.Server=Mt;var Ax=Object.keys(Dl.EventEmitter.prototype).filter(function(s){return typeof Dl.EventEmitter.prototype[s]=="function"});Ax.forEach(function(s){Mt.prototype[s]=function(){return this.sockets[s].apply(this.sockets,arguments)}});os.exports=(s,e)=>new Mt(s,e);os.exports.Server=Mt;os.exports.Namespace=Cr.Namespace;os.exports.Socket=Fl.Socket});var Wl={};Ve(Wl,{TileManager:()=>Tr});var ki,Bt,Ci,zl,Px,jx,Tr,$l=$e(()=>{ki=R(require("sharp"),1),Bt=R(require("fs"),1),Ci=R(require("path"),1),zl=require("url"),Px=(0,zl.fileURLToPath)(__importMetaUrl),jx=Ci.default.dirname(Px),Tr=class{constructor(e){this.robot=e,this.tileSize=100,this.lastTileChecksums=new Map,this.screenWidth=0,this.screenHeight=0,this.tilesPerRow=0,this.tilesPerColumn=0,this.totalTiles=0,this.frameCount=0,this.tempDir=Ci.default.join(jx,"../../temp"),this.compressionQuality=1,this.changeThreshold=1,this.scaleFactor=.99,this.scaledWidth=0,this.scaledHeight=0,this.isProcessing=!1,this.sharedScreenCache=null,this.lastCaptureTime=0,this.CACHE_TTL=100,this.dpiScale=1,this.captureWidth=0,this.captureHeight=0,Bt.default.existsSync(this.tempDir)||Bt.default.mkdirSync(this.tempDir,{recursive:!0}),this.initializeScreenDimensions()}initializeScreenDimensions(){try{let{width:e,height:t}=this.robot.getScreenSize();this.screenWidth=e,this.screenHeight=t,this.detectDpiScale(),this.scaledWidth=Math.floor(e*this.scaleFactor),this.scaledHeight=Math.floor(t*this.scaleFactor),this.tilesPerRow=Math.ceil(this.scaledWidth/this.tileSize),this.tilesPerColumn=Math.ceil(this.scaledHeight/this.tileSize),this.totalTiles=this.tilesPerRow*this.tilesPerColumn;let i=100;if(this.totalTiles>i){let n=Math.ceil(Math.sqrt(this.scaledWidth*this.scaledHeight/i));this.tileSize=Math.max(n,120),this.tilesPerRow=Math.ceil(this.scaledWidth/this.tileSize),this.tilesPerColumn=Math.ceil(this.scaledHeight/this.tileSize),this.totalTiles=this.tilesPerRow*this.tilesPerColumn}console.log(`\u{1F5A5}\uFE0F TileManager: ${e}x${t} (DPI ${this.dpiScale}x) -> ${this.totalTiles} tiles`)}catch(e){console.error("Screen dimensions error:",e),this.screenWidth=1920,this.screenHeight=1080,this.dpiScale=1,this.captureWidth=1920,this.captureHeight=1080,this.scaledWidth=1728,this.scaledHeight=972,this.tileSize=120,this.tilesPerRow=Math.ceil(this.scaledWidth/this.tileSize),this.tilesPerColumn=Math.ceil(this.scaledHeight/this.tileSize),this.totalTiles=this.tilesPerRow*this.tilesPerColumn}}detectDpiScale(){if(process.platform==="darwin"){let e=this.robot.screen.capture(0,0,1,1);this.dpiScale=e.byteWidth/e.bytesPerPixel}else{let e=Math.min(this.screenWidth*2,4096),t=Math.min(this.screenHeight*2,4096),i=this.robot.screen.capture(0,0,e,t),n=i.byteWidth/i.bytesPerPixel;n>this.screenWidth?this.dpiScale=n/this.screenWidth:this.dpiScale=1}this.captureWidth=Math.floor(this.screenWidth*this.dpiScale),this.captureHeight=Math.floor(this.screenHeight*this.dpiScale)}async captureFullScreen(){let e=this.robot.screen.capture(0,0,this.captureWidth,this.captureHeight),t=Buffer.from(e.image),i=new Uint32Array(t.buffer,t.byteOffset,t.length>>2);for(let l=0;l<i.length;l++){let p=i[l];i[l]=p&4278255360|(p&16711680)>>16|(p&255)<<16}let n=e.byteWidth/e.bytesPerPixel,r=e.height,a=t,o=n,c=r;if(this.dpiScale>1||this.scaleFactor<1){let l=Math.floor(this.screenWidth*this.scaleFactor),p=Math.floor(this.screenHeight*this.scaleFactor);a=await(0,ki.default)(t,{raw:{width:n,height:r,channels:e.bytesPerPixel}}).resize(l,p,{kernel:ki.default.kernel.nearest,fit:"fill"}).raw().toBuffer(),o=l,c=p}return{buffer:a,width:o,height:c,channels:e.bytesPerPixel}}async getSharedScreenCapture(){let e=Date.now();return this.sharedScreenCache&&e-this.lastCaptureTime<this.CACHE_TTL?this.sharedScreenCache:(this.sharedScreenCache=await this.captureFullScreen(),this.lastCaptureTime=e,this.sharedScreenCache)}clearScreenCache(){}async detectChangedTiles(){return(await this.detectChangedTilesWithHashes()).tiles}async detectChangedTilesWithHashes(){if(this.isProcessing)return{tiles:[],currentHashes:Array.from(this.lastTileChecksums.values())};this.isProcessing=!0;try{let e=await this.getSharedScreenCapture(),t=[],i=[],n=new Map;this.frameCount++;for(let o=0;o<this.totalTiles;o++){let c=this.calculateTileChecksumDirect(e,o);n.set(o,c)}let r=Array.from(n.values());if(this.lastTileChecksums.size===0){let o=[];for(let l=0;l<this.totalTiles;l++)this.lastTileChecksums.set(l,n.get(l)),o.push(this.processTileAsync(e,l));let c=await Promise.all(o);return t.push(...c),{tiles:t,currentHashes:r}}for(let o=0;o<this.totalTiles;o++){let c=n.get(o),l=this.lastTileChecksums.get(o);c!==l&&(i.push(o),this.lastTileChecksums.set(o,c))}if(i.length/this.totalTiles>this.changeThreshold){let o=[];for(let l=0;l<this.totalTiles;l++)o.push(this.processTileAsync(e,l));let c=await Promise.all(o);t.push(...c.map(l=>({...l,fullRefresh:!0})))}else if(i.length>0){let o=i.map(l=>this.processTileAsync(e,l)),c=await Promise.all(o);t.push(...c)}return{tiles:t,currentHashes:r}}finally{this.isProcessing=!1}}async processTileAsync(e,t,i=null){let n=i||this.extractTile(e,t),r=this.calculateTileChecksum(n.buffer);this.lastTileChecksums.set(t,r);let a=await this.compressTileImage(n.buffer,n.width,n.height),{row:o,col:c}=this.getTilePosition(t);return{type:"tile-update",tileIndex:t,x:c*this.tileSize,y:o*this.tileSize,width:n.width,height:n.height,imageBuffer:a,timestamp:Date.now(),frameCount:this.frameCount}}calculateTileChecksum(e){let t=0;for(let i=0;i<e.length;i+=64)t+=e[i]||0,t^=e[i+1]||0,t+=(e[i+2]||0)<<1,t^=(e[i+3]||0)<<2;return t>>>0}calculateTileChecksumDirect(e,t){let{row:i,col:n}=this.getTilePosition(t),r=n*this.tileSize,a=i*this.tileSize,o=Math.min(r+this.tileSize,e.width),c=Math.min(a+this.tileSize,e.height),l=o-r,p=c-a,u=e.channels,d=e.width*u,h=0,m=16;for(let f=0;f<p;f+=4){let x=(a+f)*d+r*u;for(let y=0;y<l;y+=m){let b=x+y*u;h+=e.buffer[b]||0,h^=e.buffer[b+1]||0,h+=(e.buffer[b+2]||0)<<1,h^=(e.buffer[b+3]||0)<<2}}return h>>>0}getTilePosition(e){return{row:Math.floor(e/this.tilesPerRow),col:e%this.tilesPerRow}}extractTile(e,t){let{row:i,col:n}=this.getTilePosition(t),r=n*this.tileSize,a=i*this.tileSize,o=Math.min(r+this.tileSize,e.width),c=Math.min(a+this.tileSize,e.height),l=o-r,p=c-a,u=e.channels,d=l*u,h=Buffer.alloc(l*p*u);for(let m=0;m<p;m++){let f=((a+m)*e.width+r)*u,x=m*d;e.buffer.copy(h,x,f,f+d)}return{buffer:h,width:l,height:p,channels:u,tileIndex:t,x:r,y:a}}async compressTileImage(e,t,i){return await(0,ki.default)(e,{raw:{width:t,height:i,channels:4}}).webp({quality:85,effort:2,smartSubsample:!0}).toBuffer()}async getScreenDimensions(){try{let e=await this.captureFullScreen();this.scaledWidth=e.width,this.scaledHeight=e.height,this.tilesPerRow=Math.ceil(e.width/this.tileSize),this.tilesPerColumn=Math.ceil(e.height/this.tileSize),this.totalTiles=this.tilesPerRow*this.tilesPerColumn}catch(e){console.error("Error getting dimensions:",e)}return{width:this.scaledWidth,height:this.scaledHeight,tileWidth:this.tileSize,tileHeight:this.tileSize,tileCount:this.totalTiles,scaleFactor:this.scaleFactor,originalWidth:this.screenWidth,originalHeight:this.screenHeight}}async compareClientTileHashes(e){if(this.isProcessing)return{tiles:[],currentHashes:[],changedIndices:[]};this.isProcessing=!0;try{let t=await this.getSharedScreenCapture(),i=[],n=[];this.frameCount++;let r=new Map;for(let o=0;o<this.totalTiles;o++){let c=this.calculateTileChecksumDirect(t,o);r.set(o,c),this.lastTileChecksums.set(o,c)}if(!e||e.length===0){let o=[];for(let l=0;l<this.totalTiles;l++)o.push(this.processTileAsync(t,l));let c=await Promise.all(o);return i.push(...c),{tiles:i,currentHashes:Array.from(r.values())}}for(let o=0;o<this.totalTiles;o++)e[o]!==r.get(o)&&n.push(o);if(n.length/this.totalTiles>this.changeThreshold){let o=[];for(let l=0;l<this.totalTiles;l++)o.push(this.processTileAsync(t,l));let c=await Promise.all(o);i.push(...c.map(l=>({...l,fullRefresh:!0})))}else if(n.length>0){let o=n.map(l=>this.processTileAsync(t,l)),c=await Promise.all(o);i.push(...c)}return{tiles:i,currentHashes:Array.from(r.values()),changedIndices:n}}finally{this.isProcessing=!1}}clearMemory(){this.sharedScreenCache=null,this.lastCaptureTime=0,this.lastTileChecksums.clear()}reset(){this.lastTileChecksums.clear(),this.frameCount=0}cleanup(){try{Bt.default.existsSync(this.tempDir)&&Bt.default.readdirSync(this.tempDir).forEach(t=>Bt.default.unlinkSync(Ci.default.join(this.tempDir,t)))}catch(e){console.warn("Cleanup error:",e)}}}});var V,cs=$e(()=>{V={robotSettings:{mouseDelay:2,keyboardDelay:2},throttling:{mouseThrottle:8,keyThrottle:25,typeTextThrottle:100,maxTextLength:1e3},resourceManagement:{inactiveTimeout:12e4,memoryCheckInterval:6e4,memoryWarningThreshold:1e3,maxTimersPerClient:100,maxChunkTimersPerClient:50},streaming:{activeInterval:100,idleInterval:400,idleThreshold:3,actionCaptureDelay:50,chunkSize:32,chunkDelay:5}}});var Vl={};Ve(Vl,{ResourceManager:()=>Or});var Or,Gl=$e(()=>{cs();Or=class{constructor(){this.activeClients=new Map,this.activeTimers=new Map,this.chunkTimers=new Map,this.memoryCheckInterval=null}startResourceMonitoring(){this.memoryCheckInterval=setInterval(()=>{let e=process.memoryUsage(),t=Math.round(e.heapUsed/1024/1024);t>V.resourceManagement.memoryWarningThreshold&&(console.warn(`\u26A0\uFE0F High memory: ${t}MB`),this.cleanupInactiveClients())},V.resourceManagement.memoryCheckInterval)}stopResourceMonitoring(){this.memoryCheckInterval&&(clearInterval(this.memoryCheckInterval),this.memoryCheckInterval=null)}addClient(e,t){this.activeClients.set(e,{...t,lastActivity:Date.now()})}getClient(e){return this.activeClients.get(e)}updateClientActivity(e){let t=this.activeClients.get(e);t&&(t.lastActivity=Date.now())}cleanupInactiveClients(){let e=Date.now(),t=V.resourceManagement.inactiveTimeout;for(let[i,n]of this.activeClients.entries())e-n.lastActivity>t&&(console.log(`\u{1F9F9} Cleaning inactive client: ${i}`),this.cleanupClientResources(i,n),this.activeClients.delete(i))}cleanupClientResources(e,t){try{t.isStreaming=!1,t?.streamingTimeout&&(clearTimeout(t.streamingTimeout),t.streamingTimeout=null),t?.screenInterval&&(clearInterval(t.screenInterval),t.screenInterval=null);let i=this.activeTimers.get(e);i&&(i.forEach(r=>clearTimeout(r)),this.activeTimers.delete(e));let n=this.chunkTimers.get(e);n&&(n.forEach(r=>clearTimeout(r)),this.chunkTimers.delete(e)),t?.tileManager&&(t.tileManager.clearMemory(),t.tileManager.cleanup(),t.tileManager.reset())}catch(i){console.error(`Error cleaning up ${e}:`,i.message)}}getStreamingConfig(){return V.streaming}removeClient(e){let t=this.activeClients.get(e);t&&(this.cleanupClientResources(e,t),this.activeClients.delete(e))}getChunkTimers(e){return this.chunkTimers.has(e)||this.chunkTimers.set(e,new Set),this.chunkTimers.get(e)}cleanupAll(){this.stopResourceMonitoring();for(let[e,t]of this.activeClients.entries())this.cleanupClientResources(e,t);this.activeClients.clear(),this.activeTimers.clear(),this.chunkTimers.clear()}}});var Kl={};Ve(Kl,{ScreenUpdateHelper:()=>Rr});var Rr,Yl=$e(()=>{cs();Rr=class{constructor(e){this.resourceManager=e}async sendTilesInChunks(e,t,i,n=!1){if(!t||t.length===0)return;let r=V.streaming.chunkSize,a=[];for(let c=0;c<t.length;c+=r)a.push(t.slice(c,c+r));let o=this.resourceManager.getChunkTimers(e.id);for(let c=0;c<a.length;c++){let l=a[c],p=c===a.length-1,u=setTimeout(()=>{o.delete(u),e.connected&&e.emit("tiles-data",{tiles:l,timestamp:i,forceRefresh:!1,userAction:n,chunkInfo:{chunkIndex:c,totalChunks:a.length,isLastChunk:p}})},c*V.streaming.chunkDelay);o.add(u)}}}});var Xl={};Ve(Xl,{MouseHandler:()=>Ar});var Ar,Jl=$e(()=>{cs();Ar=class{constructor(e,t){this.robot=e,this.resourceManager=t,this.lastMouseMove=0}setupMouseHandlers(e,t){let i=this.robot;e.on("mouse-move",t(n=>{let r=Date.now();if(!(r-this.lastMouseMove<V.throttling.mouseThrottle)){this.lastMouseMove=r;try{let a=i.getScreenSize(),o=Math.round(n.x/100*a.width),c=Math.round(n.y/100*a.height),l=Math.max(0,Math.min(a.width-1,o)),p=Math.max(0,Math.min(a.height-1,c));i.moveMouse(l,p),this.resourceManager.updateClientActivity(e.id)}catch(a){console.error("Mouse move error:",a.message)}}})),e.on("mouse-click",t(async n=>{try{let r=this.resourceManager.getClient(e.id);if(!r)return;let a=i.getScreenSize(),o=Math.round(n.x/100*a.width),c=Math.round(n.y/100*a.height),l=Math.max(0,Math.min(a.width-1,o)),p=Math.max(0,Math.min(a.height-1,c));i.moveMouse(l,p),i.mouseClick(n.button||"left",n.double||!1),r.idleFrameCount=0,this.resourceManager.updateClientActivity(e.id)}catch(r){console.error("Mouse click error:",r.message)}})),e.on("mouse-press",t(async n=>{try{if(!this.resourceManager.getClient(e.id))return;let a=i.getScreenSize(),o=Math.round(n.x/100*a.width),c=Math.round(n.y/100*a.height),l=Math.max(0,Math.min(a.width-1,o)),p=Math.max(0,Math.min(a.height-1,c));i.moveMouse(l,p),i.mouseToggle("down",n.button||"left"),this.resourceManager.updateClientActivity(e.id)}catch(r){console.error("Mouse press error:",r.message)}})),e.on("mouse-release",t(async n=>{try{if(!this.resourceManager.getClient(e.id))return;let a=i.getScreenSize(),o=Math.round(n.x/100*a.width),c=Math.round(n.y/100*a.height),l=Math.max(0,Math.min(a.width-1,o)),p=Math.max(0,Math.min(a.height-1,c));i.moveMouse(l,p),i.mouseToggle("up",n.button||"left"),this.resourceManager.updateClientActivity(e.id)}catch(r){console.error("Mouse release error:",r.message)}})),e.on("scroll",t(async n=>{try{let{direction:r,amount:a=60,horizontal:o=!1}=n,c=this.resourceManager.getClient(e.id);if(!c)return;let l=0,p=0;o||r==="left"||r==="right"?l=r==="right"?a:-a:p=r==="down"?-a:a,i.scrollMouse(l,p),c.idleFrameCount=0,this.resourceManager.updateClientActivity(e.id)}catch(r){console.error("Scroll error:",r.message)}})),e.on("mouse-drag-select",t(n=>{try{let{startX:r,startY:a,endX:o,endY:c}=n,l=i.getScreenSize(),p=Math.round(r/100*l.width),u=Math.round(a/100*l.height),d=Math.round(o/100*l.width),h=Math.round(c/100*l.height),m=Math.max(0,Math.min(l.width-1,p)),f=Math.max(0,Math.min(l.height-1,u)),x=Math.max(0,Math.min(l.width-1,d)),y=Math.max(0,Math.min(l.height-1,h));i.moveMouse(m,f),i.mouseToggle("down","left"),i.dragMouse(x,y),i.mouseToggle("up","left"),this.resourceManager.updateClientActivity(e.id)}catch(r){console.error("Drag selection error:",r.message)}}))}}});var Ql={};Ve(Ql,{KeyboardHandler:()=>Pr});var Pr,Zl=$e(()=>{cs();Pr=class{constructor(e,t){this.robot=e,this.resourceManager=t,this.lastKeyPress=0,this.lastTypeText=0}setupKeyboardHandlers(e,t){let i=this.robot;e.on("key-press",t(n=>{let r=Date.now();if(!(r-this.lastKeyPress<V.throttling.keyThrottle)){this.lastKeyPress=r;try{if(!n.key||typeof n.key!="string")return;let a=this.resourceManager.getClient(e.id),o=n.key;if(o.length===1){i.keyTap(o,n.modifier||[]);for(let c of n.modifier||[])i.keyToggle(c,"up")}else switch(o.toLowerCase()){case"enter":case"return":i.keyTap("enter");break;case"space":i.keyTap(" ");break;case"backspace":i.keyTap("backspace");break;case"tab":i.keyTap("tab");break;case"escape":i.keyTap("escape");break;default:i.keyTap(o,n.modifier||[])}a&&(a.idleFrameCount=0),this.resourceManager.updateClientActivity(e.id)}catch(a){console.error("Key press error:",a.message)}}})),e.on("type-text",t(n=>{let r=Date.now();if(!(r-this.lastTypeText<V.throttling.typeTextThrottle)){this.lastTypeText=r;try{if(!n.text||typeof n.text!="string")return;let a=n.text;a.length>V.throttling.maxTextLength&&(a=a.substring(0,V.throttling.maxTextLength));let o=a.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g,""),c=this.resourceManager.getClient(e.id);setTimeout(()=>{try{i.typeString(o),this.resourceManager.updateClientActivity(e.id),c&&(c.idleFrameCount=0,c.tileManager&&c.tileManager.clearScreenCache())}catch(l){console.error("Robot typeString error:",l.message)}},10)}catch(a){console.error("Type text error:",a.message)}}}))}}});var ep={};Ve(ep,{ScreenHandler:()=>jr});var jr,tp=$e(()=>{jr=class{constructor(e,t){this.resourceManager=e,this.screenUpdateHelper=t}setupScreenHandlers(e,t){e.on("request-screen",t(async()=>{let i=this.resourceManager.getClient(e.id);if(i)try{let n=await i.tileManager.detectChangedTiles();n.length>0&&e.emit("tiles-data",{tiles:n,timestamp:Date.now()}),this.resourceManager.updateClientActivity(e.id)}catch(n){console.error("Tile capture error:",n),e.emit("screen-error",{error:n.message})}})),e.on("request-screen-with-hashes",t(async i=>{let n=this.resourceManager.getClient(e.id);if(n)try{let r=i.tileHashes||[],a=await n.tileManager.compareClientTileHashes(r);a?.tiles?.length>0?e.emit("tiles-data",{tiles:a.tiles,timestamp:Date.now(),currentHashes:a.currentHashes,changedIndices:a.changedIndices}):e.emit("tiles-data",{tiles:[],timestamp:Date.now(),currentHashes:a.currentHashes,changedIndices:[]}),this.resourceManager.updateClientActivity(e.id)}catch(r){console.error("Tile capture with hashes error:",r),e.emit("screen-error",{error:r.message})}})),e.on("start-streaming",t(()=>{let i=this.resourceManager.getClient(e.id);if(!i)return;i.streamingTimeout&&(clearTimeout(i.streamingTimeout),i.streamingTimeout=null),console.log("\u{1F680} Remote streaming started"),i.idleFrameCount=0,i.isStreaming=!0;let n=async()=>{if(!e.connected||!i.isStreaming){i.streamingTimeout=null;return}try{let r=await i.tileManager.detectChangedTilesWithHashes();r.tiles.length>0&&e.connected?(e.emit("tiles-data",{tiles:r.tiles,timestamp:Date.now(),currentHashes:r.currentHashes}),i.idleFrameCount=0):i.idleFrameCount++;let{activeInterval:o,idleInterval:c,idleThreshold:l}=this.resourceManager.getStreamingConfig(),p=i.idleFrameCount>=l?c:o;i.streamingTimeout=setTimeout(n,p)}catch(r){console.error("Auto streaming error:",r),i.streamingTimeout=setTimeout(n,200)}};n()})),e.on("stop-streaming",()=>{let i=this.resourceManager.getClient(e.id);i&&(i.isStreaming=!1,i.streamingTimeout&&(clearTimeout(i.streamingTimeout),i.streamingTimeout=null),console.log("\u23F9\uFE0F Remote streaming stopped"))}),e.on("get-screen-dimensions",t(async()=>{let i=this.resourceManager.getClient(e.id);if(i)try{let n=await i.tileManager.getScreenDimensions();e.emit("screen-dimensions",n)}catch(n){console.error("Get dimensions error:",n),e.emit("screen-error",{error:n.message})}})),e.on("boost-stream",t(()=>{let i=this.resourceManager.getClient(e.id);i&&(i.idleFrameCount=0)}))}}});var yp=g((U0,bp)=>{"use strict";bp.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var Ir=g((H0,_p)=>{var us=yp(),wp={};for(let s of Object.keys(us))wp[us[s]]=s;var v={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};_p.exports=v;for(let s of Object.keys(v)){if(!("channels"in v[s]))throw new Error("missing channels property: "+s);if(!("labels"in v[s]))throw new Error("missing channel labels property: "+s);if(v[s].labels.length!==v[s].channels)throw new Error("channel and label counts mismatch: "+s);let{channels:e,labels:t}=v[s];delete v[s].channels,delete v[s].labels,Object.defineProperty(v[s],"channels",{value:e}),Object.defineProperty(v[s],"labels",{value:t})}v.rgb.hsl=function(s){let e=s[0]/255,t=s[1]/255,i=s[2]/255,n=Math.min(e,t,i),r=Math.max(e,t,i),a=r-n,o,c;r===n?o=0:e===r?o=(t-i)/a:t===r?o=2+(i-e)/a:i===r&&(o=4+(e-t)/a),o=Math.min(o*60,360),o<0&&(o+=360);let l=(n+r)/2;return r===n?c=0:l<=.5?c=a/(r+n):c=a/(2-r-n),[o,c*100,l*100]};v.rgb.hsv=function(s){let e,t,i,n,r,a=s[0]/255,o=s[1]/255,c=s[2]/255,l=Math.max(a,o,c),p=l-Math.min(a,o,c),u=function(d){return(l-d)/6/p+1/2};return p===0?(n=0,r=0):(r=p/l,e=u(a),t=u(o),i=u(c),a===l?n=i-t:o===l?n=1/3+e-i:c===l&&(n=2/3+t-e),n<0?n+=1:n>1&&(n-=1)),[n*360,r*100,l*100]};v.rgb.hwb=function(s){let e=s[0],t=s[1],i=s[2],n=v.rgb.hsl(s)[0],r=1/255*Math.min(e,Math.min(t,i));return i=1-1/255*Math.max(e,Math.max(t,i)),[n,r*100,i*100]};v.rgb.cmyk=function(s){let e=s[0]/255,t=s[1]/255,i=s[2]/255,n=Math.min(1-e,1-t,1-i),r=(1-e-n)/(1-n)||0,a=(1-t-n)/(1-n)||0,o=(1-i-n)/(1-n)||0;return[r*100,a*100,o*100,n*100]};function qx(s,e){return(s[0]-e[0])**2+(s[1]-e[1])**2+(s[2]-e[2])**2}v.rgb.keyword=function(s){let e=wp[s];if(e)return e;let t=1/0,i;for(let n of Object.keys(us)){let r=us[n],a=qx(s,r);a<t&&(t=a,i=n)}return i};v.keyword.rgb=function(s){return us[s]};v.rgb.xyz=function(s){let e=s[0]/255,t=s[1]/255,i=s[2]/255;e=e>.04045?((e+.055)/1.055)**2.4:e/12.92,t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,i=i>.04045?((i+.055)/1.055)**2.4:i/12.92;let n=e*.4124+t*.3576+i*.1805,r=e*.2126+t*.7152+i*.0722,a=e*.0193+t*.1192+i*.9505;return[n*100,r*100,a*100]};v.rgb.lab=function(s){let e=v.rgb.xyz(s),t=e[0],i=e[1],n=e[2];t/=95.047,i/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,i=i>.008856?i**(1/3):7.787*i+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;let r=116*i-16,a=500*(t-i),o=200*(i-n);return[r,a,o]};v.hsl.rgb=function(s){let e=s[0]/360,t=s[1]/100,i=s[2]/100,n,r,a;if(t===0)return a=i*255,[a,a,a];i<.5?n=i*(1+t):n=i+t-i*t;let o=2*i-n,c=[0,0,0];for(let l=0;l<3;l++)r=e+1/3*-(l-1),r<0&&r++,r>1&&r--,6*r<1?a=o+(n-o)*6*r:2*r<1?a=n:3*r<2?a=o+(n-o)*(2/3-r)*6:a=o,c[l]=a*255;return c};v.hsl.hsv=function(s){let e=s[0],t=s[1]/100,i=s[2]/100,n=t,r=Math.max(i,.01);i*=2,t*=i<=1?i:2-i,n*=r<=1?r:2-r;let a=(i+t)/2,o=i===0?2*n/(r+n):2*t/(i+t);return[e,o*100,a*100]};v.hsv.rgb=function(s){let e=s[0]/60,t=s[1]/100,i=s[2]/100,n=Math.floor(e)%6,r=e-Math.floor(e),a=255*i*(1-t),o=255*i*(1-t*r),c=255*i*(1-t*(1-r));switch(i*=255,n){case 0:return[i,c,a];case 1:return[o,i,a];case 2:return[a,i,c];case 3:return[a,o,i];case 4:return[c,a,i];case 5:return[i,a,o]}};v.hsv.hsl=function(s){let e=s[0],t=s[1]/100,i=s[2]/100,n=Math.max(i,.01),r,a;a=(2-t)*i;let o=(2-t)*n;return r=t*n,r/=o<=1?o:2-o,r=r||0,a/=2,[e,r*100,a*100]};v.hwb.rgb=function(s){let e=s[0]/360,t=s[1]/100,i=s[2]/100,n=t+i,r;n>1&&(t/=n,i/=n);let a=Math.floor(6*e),o=1-i;r=6*e-a,(a&1)!==0&&(r=1-r);let c=t+r*(o-t),l,p,u;switch(a){default:case 6:case 0:l=o,p=c,u=t;break;case 1:l=c,p=o,u=t;break;case 2:l=t,p=o,u=c;break;case 3:l=t,p=c,u=o;break;case 4:l=c,p=t,u=o;break;case 5:l=o,p=t,u=c;break}return[l*255,p*255,u*255]};v.cmyk.rgb=function(s){let e=s[0]/100,t=s[1]/100,i=s[2]/100,n=s[3]/100,r=1-Math.min(1,e*(1-n)+n),a=1-Math.min(1,t*(1-n)+n),o=1-Math.min(1,i*(1-n)+n);return[r*255,a*255,o*255]};v.xyz.rgb=function(s){let e=s[0]/100,t=s[1]/100,i=s[2]/100,n,r,a;return n=e*3.2406+t*-1.5372+i*-.4986,r=e*-.9689+t*1.8758+i*.0415,a=e*.0557+t*-.204+i*1.057,n=n>.0031308?1.055*n**(1/2.4)-.055:n*12.92,r=r>.0031308?1.055*r**(1/2.4)-.055:r*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,n=Math.min(Math.max(0,n),1),r=Math.min(Math.max(0,r),1),a=Math.min(Math.max(0,a),1),[n*255,r*255,a*255]};v.xyz.lab=function(s){let e=s[0],t=s[1],i=s[2];e/=95.047,t/=100,i/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,t=t>.008856?t**(1/3):7.787*t+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;let n=116*t-16,r=500*(e-t),a=200*(t-i);return[n,r,a]};v.lab.xyz=function(s){let e=s[0],t=s[1],i=s[2],n,r,a;r=(e+16)/116,n=t/500+r,a=r-i/200;let o=r**3,c=n**3,l=a**3;return r=o>.008856?o:(r-16/116)/7.787,n=c>.008856?c:(n-16/116)/7.787,a=l>.008856?l:(a-16/116)/7.787,n*=95.047,r*=100,a*=108.883,[n,r,a]};v.lab.lch=function(s){let e=s[0],t=s[1],i=s[2],n;n=Math.atan2(i,t)*360/2/Math.PI,n<0&&(n+=360);let a=Math.sqrt(t*t+i*i);return[e,a,n]};v.lch.lab=function(s){let e=s[0],t=s[1],n=s[2]/360*2*Math.PI,r=t*Math.cos(n),a=t*Math.sin(n);return[e,r,a]};v.rgb.ansi16=function(s,e=null){let[t,i,n]=s,r=e===null?v.rgb.hsv(s)[2]:e;if(r=Math.round(r/50),r===0)return 30;let a=30+(Math.round(n/255)<<2|Math.round(i/255)<<1|Math.round(t/255));return r===2&&(a+=60),a};v.hsv.ansi16=function(s){return v.rgb.ansi16(v.hsv.rgb(s),s[2])};v.rgb.ansi256=function(s){let e=s[0],t=s[1],i=s[2];return e===t&&t===i?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(t/255*5)+Math.round(i/255*5)};v.ansi16.rgb=function(s){let e=s%10;if(e===0||e===7)return s>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let t=(~~(s>50)+1)*.5,i=(e&1)*t*255,n=(e>>1&1)*t*255,r=(e>>2&1)*t*255;return[i,n,r]};v.ansi256.rgb=function(s){if(s>=232){let r=(s-232)*10+8;return[r,r,r]}s-=16;let e,t=Math.floor(s/36)/5*255,i=Math.floor((e=s%36)/6)/5*255,n=e%6/5*255;return[t,i,n]};v.rgb.hex=function(s){let t=(((Math.round(s[0])&255)<<16)+((Math.round(s[1])&255)<<8)+(Math.round(s[2])&255)).toString(16).toUpperCase();return"000000".substring(t.length)+t};v.hex.rgb=function(s){let e=s.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let t=e[0];e[0].length===3&&(t=t.split("").map(o=>o+o).join(""));let i=parseInt(t,16),n=i>>16&255,r=i>>8&255,a=i&255;return[n,r,a]};v.rgb.hcg=function(s){let e=s[0]/255,t=s[1]/255,i=s[2]/255,n=Math.max(Math.max(e,t),i),r=Math.min(Math.min(e,t),i),a=n-r,o,c;return a<1?o=r/(1-a):o=0,a<=0?c=0:n===e?c=(t-i)/a%6:n===t?c=2+(i-e)/a:c=4+(e-t)/a,c/=6,c%=1,[c*360,a*100,o*100]};v.hsl.hcg=function(s){let e=s[1]/100,t=s[2]/100,i=t<.5?2*e*t:2*e*(1-t),n=0;return i<1&&(n=(t-.5*i)/(1-i)),[s[0],i*100,n*100]};v.hsv.hcg=function(s){let e=s[1]/100,t=s[2]/100,i=e*t,n=0;return i<1&&(n=(t-i)/(1-i)),[s[0],i*100,n*100]};v.hcg.rgb=function(s){let e=s[0]/360,t=s[1]/100,i=s[2]/100;if(t===0)return[i*255,i*255,i*255];let n=[0,0,0],r=e%1*6,a=r%1,o=1-a,c=0;switch(Math.floor(r)){case 0:n[0]=1,n[1]=a,n[2]=0;break;case 1:n[0]=o,n[1]=1,n[2]=0;break;case 2:n[0]=0,n[1]=1,n[2]=a;break;case 3:n[0]=0,n[1]=o,n[2]=1;break;case 4:n[0]=a,n[1]=0,n[2]=1;break;default:n[0]=1,n[1]=0,n[2]=o}return c=(1-t)*i,[(t*n[0]+c)*255,(t*n[1]+c)*255,(t*n[2]+c)*255]};v.hcg.hsv=function(s){let e=s[1]/100,t=s[2]/100,i=e+t*(1-e),n=0;return i>0&&(n=e/i),[s[0],n*100,i*100]};v.hcg.hsl=function(s){let e=s[1]/100,i=s[2]/100*(1-e)+.5*e,n=0;return i>0&&i<.5?n=e/(2*i):i>=.5&&i<1&&(n=e/(2*(1-i))),[s[0],n*100,i*100]};v.hcg.hwb=function(s){let e=s[1]/100,t=s[2]/100,i=e+t*(1-e);return[s[0],(i-e)*100,(1-i)*100]};v.hwb.hcg=function(s){let e=s[1]/100,i=1-s[2]/100,n=i-e,r=0;return n<1&&(r=(i-n)/(1-n)),[s[0],n*100,r*100]};v.apple.rgb=function(s){return[s[0]/65535*255,s[1]/65535*255,s[2]/65535*255]};v.rgb.apple=function(s){return[s[0]/255*65535,s[1]/255*65535,s[2]/255*65535]};v.gray.rgb=function(s){return[s[0]/100*255,s[0]/100*255,s[0]/100*255]};v.gray.hsl=function(s){return[0,0,s[0]]};v.gray.hsv=v.gray.hsl;v.gray.hwb=function(s){return[0,100,s[0]]};v.gray.cmyk=function(s){return[0,0,0,s[0]]};v.gray.lab=function(s){return[s[0],0,0]};v.gray.hex=function(s){let e=Math.round(s[0]/100*255)&255,i=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(i.length)+i};v.rgb.gray=function(s){return[(s[0]+s[1]+s[2])/3/255*100]}});var Ep=g((z0,Sp)=>{var Pi=Ir();function Ux(){let s={},e=Object.keys(Pi);for(let t=e.length,i=0;i<t;i++)s[e[i]]={distance:-1,parent:null};return s}function Hx(s){let e=Ux(),t=[s];for(e[s].distance=0;t.length;){let i=t.pop(),n=Object.keys(Pi[i]);for(let r=n.length,a=0;a<r;a++){let o=n[a],c=e[o];c.distance===-1&&(c.distance=e[i].distance+1,c.parent=i,t.unshift(o))}}return e}function zx(s,e){return function(t){return e(s(t))}}function Wx(s,e){let t=[e[s].parent,s],i=Pi[e[s].parent][s],n=e[s].parent;for(;e[n].parent;)t.unshift(e[n].parent),i=zx(Pi[e[n].parent][n],i),n=e[n].parent;return i.conversion=t,i}Sp.exports=function(s){let e=Hx(s),t={},i=Object.keys(e);for(let n=i.length,r=0;r<n;r++){let a=i[r];e[a].parent!==null&&(t[a]=Wx(a,e))}return t}});var Cp=g((W0,kp)=>{var Lr=Ir(),$x=Ep(),Lt={},Vx=Object.keys(Lr);function Gx(s){let e=function(...t){let i=t[0];return i==null?i:(i.length>1&&(t=i),s(t))};return"conversion"in s&&(e.conversion=s.conversion),e}function Kx(s){let e=function(...t){let i=t[0];if(i==null)return i;i.length>1&&(t=i);let n=s(t);if(typeof n=="object")for(let r=n.length,a=0;a<r;a++)n[a]=Math.round(n[a]);return n};return"conversion"in s&&(e.conversion=s.conversion),e}Vx.forEach(s=>{Lt[s]={},Object.defineProperty(Lt[s],"channels",{value:Lr[s].channels}),Object.defineProperty(Lt[s],"labels",{value:Lr[s].labels});let e=$x(s);Object.keys(e).forEach(i=>{let n=e[i];Lt[s][i]=Kx(n),Lt[s][i].raw=Gx(n)})});kp.exports=Lt});var jp=g(($0,Pp)=>{"use strict";var Tp=(s,e)=>(...t)=>`\x1B[${s(...t)+e}m`,Op=(s,e)=>(...t)=>{let i=s(...t);return`\x1B[${38+e};5;${i}m`},Rp=(s,e)=>(...t)=>{let i=s(...t);return`\x1B[${38+e};2;${i[0]};${i[1]};${i[2]}m`},ji=s=>s,Ap=(s,e,t)=>[s,e,t],Ft=(s,e,t)=>{Object.defineProperty(s,e,{get:()=>{let i=t();return Object.defineProperty(s,e,{value:i,enumerable:!0,configurable:!0}),i},enumerable:!0,configurable:!0})},Fr,qt=(s,e,t,i)=>{Fr===void 0&&(Fr=Cp());let n=i?10:0,r={};for(let[a,o]of Object.entries(Fr)){let c=a==="ansi16"?"ansi":a;a===e?r[c]=s(t,n):typeof o=="object"&&(r[c]=s(o[e],n))}return r};function Yx(){let s=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[t,i]of Object.entries(e)){for(let[n,r]of Object.entries(i))e[n]={open:`\x1B[${r[0]}m`,close:`\x1B[${r[1]}m`},i[n]=e[n],s.set(r[0],r[1]);Object.defineProperty(e,t,{value:i,enumerable:!1})}return Object.defineProperty(e,"codes",{value:s,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",Ft(e.color,"ansi",()=>qt(Tp,"ansi16",ji,!1)),Ft(e.color,"ansi256",()=>qt(Op,"ansi256",ji,!1)),Ft(e.color,"ansi16m",()=>qt(Rp,"rgb",Ap,!1)),Ft(e.bgColor,"ansi",()=>qt(Tp,"ansi16",ji,!0)),Ft(e.bgColor,"ansi256",()=>qt(Op,"ansi256",ji,!0)),Ft(e.bgColor,"ansi16m",()=>qt(Rp,"rgb",Ap,!0)),e}Object.defineProperty(Pp,"exports",{enumerable:!0,get:Yx})});var Bp=g((V0,Mp)=>{"use strict";var Xx=(s,e,t)=>{let i=s.indexOf(e);if(i===-1)return s;let n=e.length,r=0,a="";do a+=s.substr(r,i-r)+e+t,r=i+n,i=s.indexOf(e,r);while(i!==-1);return a+=s.substr(r),a},Jx=(s,e,t,i)=>{let n=0,r="";do{let a=s[i-1]==="\r";r+=s.substr(n,(a?i-1:i)-n)+e+(a?`\r
|
|
19
19
|
`:`
|
|
20
20
|
`)+t,n=i+1,i=s.indexOf(`
|
|
21
|
-
`,n)}while(i!==-1);return r+=s.substr(n),r};Mp.exports={stringReplaceAll:
|
|
22
|
-
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function
|
|
23
|
-
`);return r!==-1&&(e=ig(e,n,i,r)),i+e+n},Fr,Wp=(s,...e)=>{let[t]=e;if(!Mi(t)||!Mi(t.raw))return e.join(" ");let i=e.slice(1),n=[t.raw[0]];for(let r=1;r<t.length;r++)n.push(String(i[r-1]).replace(/[{}\\]/g,"\\$&"),String(t.raw[r]));return Fr===void 0&&(Fr=qp()),Fr(s,n.join(""))};Object.defineProperties(Di.prototype,Ut);var Ii=Di();Ii.supportsColor=Ur;Ii.stderr=Di({level:Hr?Hr.level:0});Ii.stderr.supportsColor=Hr;$p.exports=Ii});var gu=v((l0,Jr)=>{"use strict";var Tg=Object.prototype.hasOwnProperty,V="~";function hs(){}Object.create&&(hs.prototype=Object.create(null),new hs().__proto__||(V=!1));function Og(s,e,t){this.fn=s,this.context=e,this.once=t||!1}function xu(s,e,t,i,n){if(typeof t!="function")throw new TypeError("The listener must be a function");var r=new Og(t,i||s,n),a=V?V+e:e;return s._events[a]?s._events[a].fn?s._events[a]=[s._events[a],r]:s._events[a].push(r):(s._events[a]=r,s._eventsCount++),s}function Ui(s,e){--s._eventsCount===0?s._events=new hs:delete s._events[e]}function z(){this._events=new hs,this._eventsCount=0}z.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)Tg.call(t,i)&&e.push(V?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e};z.prototype.listeners=function(e){var t=V?V+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,r=i.length,a=new Array(r);n<r;n++)a[n]=i[n].fn;return a};z.prototype.listenerCount=function(e){var t=V?V+e:e,i=this._events[t];return i?i.fn?1:i.length:0};z.prototype.emit=function(e,t,i,n,r,a){var o=V?V+e:e;if(!this._events[o])return!1;var c=this._events[o],l=arguments.length,p,u;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,i),!0;case 4:return c.fn.call(c.context,t,i,n),!0;case 5:return c.fn.call(c.context,t,i,n,r),!0;case 6:return c.fn.call(c.context,t,i,n,r,a),!0}for(u=1,p=new Array(l-1);u<l;u++)p[u-1]=arguments[u];c.fn.apply(c.context,p)}else{var d=c.length,h;for(u=0;u<d;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),l){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,i);break;case 4:c[u].fn.call(c[u].context,t,i,n);break;default:if(!p)for(h=1,p=new Array(l-1);h<l;h++)p[h-1]=arguments[h];c[u].fn.apply(c[u].context,p)}}return!0};z.prototype.on=function(e,t,i){return xu(this,e,t,i,!1)};z.prototype.once=function(e,t,i){return xu(this,e,t,i,!0)};z.prototype.removeListener=function(e,t,i,n){var r=V?V+e:e;if(!this._events[r])return this;if(!t)return Ui(this,r),this;var a=this._events[r];if(a.fn)a.fn===t&&(!n||a.once)&&(!i||a.context===i)&&Ui(this,r);else{for(var o=0,c=[],l=a.length;o<l;o++)(a[o].fn!==t||n&&!a[o].once||i&&a[o].context!==i)&&c.push(a[o]);c.length?this._events[r]=c.length===1?c[0]:c:Ui(this,r)}return this};z.prototype.removeAllListeners=function(e){var t;return e?(t=V?V+e:e,this._events[t]&&Ui(this,t)):(this._events=new hs,this._eventsCount=0),this};z.prototype.off=z.prototype.removeListener;z.prototype.addListener=z.prototype.on;z.prefixed=V;z.EventEmitter=z;typeof Jr<"u"&&(Jr.exports=z)});var yu=v((p0,bu)=>{"use strict";bu.exports=function(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443;case"ftp":return e!==21;case"gopher":return e!==70;case"file":return!1}return e!==0}});var Hi=v(_u=>{var De=_u,Rg=require("url"),wu=require("util")._extend,Ag=yu(),Pg=/(^|,)\s*upgrade\s*($|,)/i,Qr=/^https|wss/;De.isSSL=Qr;De.setupOutgoing=function(s,e,t,i){s.port=e[i||"target"].port||(Qr.test(e[i||"target"].protocol)?443:80),["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"].forEach(function(o){s[o]=e[i||"target"][o]}),s.method=e.method||t.method,s.headers=wu({},t.headers),e.headers&&wu(s.headers,e.headers),e.auth&&(s.auth=e.auth),e.ca&&(s.ca=e.ca),Qr.test(e[i||"target"].protocol)&&(s.rejectUnauthorized=typeof e.secure>"u"?!0:e.secure),s.agent=e.agent||!1,s.localAddress=e.localAddress,s.agent||(s.headers=s.headers||{},(typeof s.headers.connection!="string"||!Pg.test(s.headers.connection))&&(s.headers.connection="close"));var n=e[i||"target"],r=n&&e.prependPath!==!1&&n.path||"",a=e.toProxy?t.url:Rg.parse(t.url).path||"";return a=e.ignorePath?"":a,s.path=De.urlJoin(r,a),e.changeOrigin&&(s.headers.host=Ag(s.port,e[i||"target"].protocol)&&!jg(s.host)?s.host+":"+s.port:s.host),s};De.setupSocket=function(s){return s.setTimeout(0),s.setNoDelay(!0),s.setKeepAlive(!0,0),s};De.getPort=function(s){var e=s.headers.host?s.headers.host.match(/:(\d+)/):"";return e?e[1]:De.hasEncryptedConnection(s)?"443":"80"};De.hasEncryptedConnection=function(s){return!!(s.connection.encrypted||s.connection.pair)};De.urlJoin=function(){var s=Array.prototype.slice.call(arguments),e=s.length-1,t=s[e],i=t.split("?"),n;return s[e]=i.shift(),n=[s.filter(Boolean).join("/").replace(/\/+/g,"/").replace("http:/","http://").replace("https:/","https://")],n.push.apply(n,i),n.join("?")};De.rewriteCookieProperty=function s(e,t,i){return Array.isArray(e)?e.map(function(n){return s(n,t,i)}):e.replace(new RegExp("(;\\s*"+i+"=)([^;]+)","i"),function(n,r,a){var o;if(a in t)o=t[a];else if("*"in t)o=t["*"];else return n;return o?r+o:""})};function jg(s){return!!~s.indexOf(":")}});var Cu=v((d0,ku)=>{var Su=require("url"),Eu=Hi(),Mg=/^201|30(1|2|7|8)$/;ku.exports={removeChunked:function(e,t,i){e.httpVersion==="1.0"&&delete i.headers["transfer-encoding"]},setConnection:function(e,t,i){e.httpVersion==="1.0"?i.headers.connection=e.headers.connection||"close":e.httpVersion!=="2.0"&&!i.headers.connection&&(i.headers.connection=e.headers.connection||"keep-alive")},setRedirectHostRewrite:function(e,t,i,n){if((n.hostRewrite||n.autoRewrite||n.protocolRewrite)&&i.headers.location&&Mg.test(i.statusCode)){var r=Su.parse(n.target),a=Su.parse(i.headers.location);if(r.host!=a.host)return;n.hostRewrite?a.host=n.hostRewrite:n.autoRewrite&&(a.host=e.headers.host),n.protocolRewrite&&(a.protocol=n.protocolRewrite),i.headers.location=a.format()}},writeHeaders:function(e,t,i,n){var r=n.cookieDomainRewrite,a=n.cookiePathRewrite,o=n.preserveHeaderKeyCase,c,l=function(d,h){h!=null&&(r&&d.toLowerCase()==="set-cookie"&&(h=Eu.rewriteCookieProperty(h,r,"domain")),a&&d.toLowerCase()==="set-cookie"&&(h=Eu.rewriteCookieProperty(h,a,"path")),t.setHeader(String(d).trim(),h))};if(typeof r=="string"&&(r={"*":r}),typeof a=="string"&&(a={"*":a}),o&&i.rawHeaders!=null){c={};for(var p=0;p<i.rawHeaders.length;p+=2){var u=i.rawHeaders[p];c[u.toLowerCase()]=u}}Object.keys(i.headers).forEach(function(d){var h=i.headers[d];o&&c&&(d=c[d]||d),l(d,h)})},writeStatusCode:function(e,t,i){i.statusMessage?(t.statusCode=i.statusCode,t.statusMessage=i.statusMessage):t.statusCode=i.statusCode}}});var Ou=v((f0,Tu)=>{var vs;Tu.exports=function(){if(!vs){try{vs=M()("follow-redirects")}catch{}typeof vs!="function"&&(vs=function(){})}vs.apply(null,arguments)}});var Mu=v((m0,pa)=>{var gs=require("url"),xs=gs.URL,Dg=require("http"),Bg=require("https"),ia=require("stream").Writable,na=require("assert"),Ru=Ou();(function(){var e=typeof process<"u",t=typeof window<"u"&&typeof document<"u",i=at(Error.captureStackTrace);!e&&(t||!i)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var ra=!1;try{na(new xs(""))}catch(s){ra=s.code==="ERR_INVALID_URL"}var Ig=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],aa=["abort","aborted","connect","error","socket","timeout"],oa=Object.create(null);aa.forEach(function(s){oa[s]=function(e,t,i){this._redirectable.emit(s,e,t,i)}});var ea=bs("ERR_INVALID_URL","Invalid URL",TypeError),ta=bs("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Ng=bs("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",ta),Lg=bs("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),qg=bs("ERR_STREAM_WRITE_AFTER_END","write after end"),Fg=ia.prototype.destroy||Pu;function Q(s,e){ia.call(this),this._sanitizeOptions(s),this._options=s,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var t=this;this._onNativeResponse=function(i){try{t._processResponse(i)}catch(n){t.emit("error",n instanceof ta?n:new ta({cause:n}))}},this._performRequest()}Q.prototype=Object.create(ia.prototype);Q.prototype.abort=function(){la(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Q.prototype.destroy=function(s){return la(this._currentRequest,s),Fg.call(this,s),this};Q.prototype.write=function(s,e,t){if(this._ending)throw new qg;if(!rt(s)&&!zg(s))throw new TypeError("data should be a string, Buffer or Uint8Array");if(at(e)&&(t=e,e=null),s.length===0){t&&t();return}this._requestBodyLength+s.length<=this._options.maxBodyLength?(this._requestBodyLength+=s.length,this._requestBodyBuffers.push({data:s,encoding:e}),this._currentRequest.write(s,e,t)):(this.emit("error",new Lg),this.abort())};Q.prototype.end=function(s,e,t){if(at(s)?(t=s,s=e=null):at(e)&&(t=e,e=null),!s)this._ended=this._ending=!0,this._currentRequest.end(null,null,t);else{var i=this,n=this._currentRequest;this.write(s,e,function(){i._ended=!0,n.end(null,null,t)}),this._ending=!0}};Q.prototype.setHeader=function(s,e){this._options.headers[s]=e,this._currentRequest.setHeader(s,e)};Q.prototype.removeHeader=function(s){delete this._options.headers[s],this._currentRequest.removeHeader(s)};Q.prototype.setTimeout=function(s,e){var t=this;function i(a){a.setTimeout(s),a.removeListener("timeout",a.destroy),a.addListener("timeout",a.destroy)}function n(a){t._timeout&&clearTimeout(t._timeout),t._timeout=setTimeout(function(){t.emit("timeout"),r()},s),i(a)}function r(){t._timeout&&(clearTimeout(t._timeout),t._timeout=null),t.removeListener("abort",r),t.removeListener("error",r),t.removeListener("response",r),t.removeListener("close",r),e&&t.removeListener("timeout",e),t.socket||t._currentRequest.removeListener("socket",n)}return e&&this.on("timeout",e),this.socket?n(this.socket):this._currentRequest.once("socket",n),this.on("socket",i),this.on("abort",r),this.on("error",r),this.on("response",r),this.on("close",r),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(s){Q.prototype[s]=function(e,t){return this._currentRequest[s](e,t)}});["aborted","connection","socket"].forEach(function(s){Object.defineProperty(Q.prototype,s,{get:function(){return this._currentRequest[s]}})});Q.prototype._sanitizeOptions=function(s){if(s.headers||(s.headers={}),s.host&&(s.hostname||(s.hostname=s.host),delete s.host),!s.pathname&&s.path){var e=s.path.indexOf("?");e<0?s.pathname=s.path:(s.pathname=s.path.substring(0,e),s.search=s.path.substring(e))}};Q.prototype._performRequest=function(){var s=this._options.protocol,e=this._options.nativeProtocols[s];if(!e)throw new TypeError("Unsupported protocol "+s);if(this._options.agents){var t=s.slice(0,-1);this._options.agent=this._options.agents[t]}var i=this._currentRequest=e.request(this._options,this._onNativeResponse);i._redirectable=this;for(var n of aa)i.on(n,oa[n]);if(this._currentUrl=/^\//.test(this._options.path)?gs.format(this._options):this._options.path,this._isRedirect){var r=0,a=this,o=this._requestBodyBuffers;(function c(l){if(i===a._currentRequest)if(l)a.emit("error",l);else if(r<o.length){var p=o[r++];i.finished||i.write(p.data,p.encoding,c)}else a._ended&&i.end()})()}};Q.prototype._processResponse=function(s){var e=s.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:s.headers,statusCode:e});var t=s.headers.location;if(!t||this._options.followRedirects===!1||e<300||e>=400){s.responseUrl=this._currentUrl,s.redirects=this._redirects,this.emit("response",s),this._requestBodyBuffers=[];return}if(la(this._currentRequest),s.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Ng;var i,n=this._options.beforeRedirect;n&&(i=Object.assign({Host:s.req.getHeader("host")},this._options.headers));var r=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Zr(/^content-/i,this._options.headers));var a=Zr(/^host$/i,this._options.headers),o=ca(this._currentUrl),c=a||o.host,l=/^\w+:/.test(t)?this._currentUrl:gs.format(Object.assign(o,{host:c})),p=Ug(t,l);if(Ru("redirecting to",p.href),this._isRedirect=!0,sa(p,this._options),(p.protocol!==o.protocol&&p.protocol!=="https:"||p.host!==c&&!Hg(p.host,c))&&Zr(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),at(n)){var u={headers:s.headers,statusCode:e},d={url:l,method:r,headers:i};n(this._options,u,d),this._sanitizeOptions(this._options)}this._performRequest()};function Au(s){var e={maxRedirects:21,maxBodyLength:10485760},t={};return Object.keys(s).forEach(function(i){var n=i+":",r=t[n]=s[i],a=e[i]=Object.create(r);function o(l,p,u){return Wg(l)?l=sa(l):rt(l)?l=sa(ca(l)):(u=p,p=ju(l),l={protocol:n}),at(p)&&(u=p,p=null),p=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},l,p),p.nativeProtocols=t,!rt(p.host)&&!rt(p.hostname)&&(p.hostname="::1"),na.equal(p.protocol,n,"protocol mismatch"),Ru("options",p),new Q(p,u)}function c(l,p,u){var d=a.request(l,p,u);return d.end(),d}Object.defineProperties(a,{request:{value:o,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function Pu(){}function ca(s){var e;if(ra)e=new xs(s);else if(e=ju(gs.parse(s)),!rt(e.protocol))throw new ea({input:s});return e}function Ug(s,e){return ra?new xs(s,e):ca(gs.resolve(e,s))}function ju(s){if(/^\[/.test(s.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(s.hostname))throw new ea({input:s.href||s});if(/^\[/.test(s.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(s.host))throw new ea({input:s.href||s});return s}function sa(s,e){var t=e||{};for(var i of Ig)t[i]=s[i];return t.hostname.startsWith("[")&&(t.hostname=t.hostname.slice(1,-1)),t.port!==""&&(t.port=Number(t.port)),t.path=t.search?t.pathname+t.search:t.pathname,t}function Zr(s,e){var t;for(var i in e)s.test(i)&&(t=e[i],delete e[i]);return t===null||typeof t>"u"?void 0:String(t).trim()}function bs(s,e,t){function i(n){at(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=s,this.message=this.cause?e+": "+this.cause.message:e}return i.prototype=new(t||Error),Object.defineProperties(i.prototype,{constructor:{value:i,enumerable:!1},name:{value:"Error ["+s+"]",enumerable:!1}}),i}function la(s,e){for(var t of aa)s.removeListener(t,oa[t]);s.on("error",Pu),s.destroy(e)}function Hg(s,e){na(rt(s)&&rt(e));var t=s.length-e.length-1;return t>0&&s[t]==="."&&s.endsWith(e)}function rt(s){return typeof s=="string"||s instanceof String}function at(s){return typeof s=="function"}function zg(s){return typeof s=="object"&&"length"in s}function Wg(s){return xs&&s instanceof xs}pa.exports=Au({http:Dg,https:Bg});pa.exports.wrap=Au});var Bu=v((h0,Du)=>{var $g=require("http"),Vg=require("https"),ys=Cu(),zi=Hi(),Gg=Mu();ys=Object.keys(ys).map(function(s){return ys[s]});var Kg={http:$g,https:Vg};Du.exports={deleteLength:function(e,t,i){(e.method==="DELETE"||e.method==="OPTIONS")&&!e.headers["content-length"]&&(e.headers["content-length"]="0",delete e.headers["transfer-encoding"])},timeout:function(e,t,i){i.timeout&&e.socket.setTimeout(i.timeout)},XHeaders:function(e,t,i){if(i.xfwd){var n=e.isSpdy||zi.hasEncryptedConnection(e),r={for:e.connection.remoteAddress||e.socket.remoteAddress,port:zi.getPort(e),proto:n?"https":"http"};["for","port","proto"].forEach(function(a){e.headers["x-forwarded-"+a]=(e.headers["x-forwarded-"+a]||"")+(e.headers["x-forwarded-"+a]?",":"")+r[a]}),e.headers["x-forwarded-host"]=e.headers["x-forwarded-host"]||e.headers.host||""}},stream:function(e,t,i,n,r,a){r.emit("start",e,t,i.target||i.forward);var o=i.followRedirects?Gg:Kg,c=o.http,l=o.https;if(i.forward){var p=(i.forward.protocol==="https:"?l:c).request(zi.setupOutgoing(i.ssl||{},i,e,"forward")),u=m(p,i.forward);if(e.on("error",u),p.on("error",u),(i.buffer||e).pipe(p),!i.target)return t.end()}var d=(i.target.protocol==="https:"?l:c).request(zi.setupOutgoing(i.ssl||{},i,e));d.on("socket",function(f){r&&!d.getHeader("expect")&&r.emit("proxyReq",d,e,t,i)}),i.proxyTimeout&&d.setTimeout(i.proxyTimeout,function(){d.abort()}),e.on("aborted",function(){d.abort()});var h=m(d,i.target);e.on("error",h),d.on("error",h);function m(f,x){return function(b){if(e.socket.destroyed&&b.code==="ECONNRESET")return r.emit("econnreset",b,e,t,x),f.abort();a?a(b,e,t,x):r.emit("error",b,e,t,x)}}(i.buffer||e).pipe(d),d.on("response",function(f){if(r&&r.emit("proxyRes",f,e,t),!t.headersSent&&!i.selfHandleResponse)for(var x=0;x<ys.length&&!ys[x](e,t,f,i);x++);t.finished?r&&r.emit("end",e,t,f):(f.on("end",function(){r&&r.emit("end",e,t,f)}),i.selfHandleResponse||f.pipe(t))})}}});var Nu=v((v0,Iu)=>{var Yg=require("http"),Xg=require("https"),Vt=Hi();Iu.exports={checkMethodAndHeader:function(e,t){if(e.method!=="GET"||!e.headers.upgrade||e.headers.upgrade.toLowerCase()!=="websocket")return t.destroy(),!0},XHeaders:function(e,t,i){if(i.xfwd){var n={for:e.connection.remoteAddress||e.socket.remoteAddress,port:Vt.getPort(e),proto:Vt.hasEncryptedConnection(e)?"wss":"ws"};["for","port","proto"].forEach(function(r){e.headers["x-forwarded-"+r]=(e.headers["x-forwarded-"+r]||"")+(e.headers["x-forwarded-"+r]?",":"")+n[r]})}},stream:function(e,t,i,n,r,a){var o=function(p,u){return Object.keys(u).reduce(function(d,h){var m=u[h];if(!Array.isArray(m))return d.push(h+": "+m),d;for(var f=0;f<m.length;f++)d.push(h+": "+m[f]);return d},[p]).join(`\r
|
|
21
|
+
`,n)}while(i!==-1);return r+=s.substr(n),r};Mp.exports={stringReplaceAll:Xx,stringEncaseCRLFWithFirstIndex:Jx}});var Fp=g((G0,Lp)=>{"use strict";var Qx=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,Dp=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,Zx=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,ev=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,tv=new Map([["n",`
|
|
22
|
+
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function Ip(s){let e=s[0]==="u",t=s[1]==="{";return e&&!t&&s.length===5||s[0]==="x"&&s.length===3?String.fromCharCode(parseInt(s.slice(1),16)):e&&t?String.fromCodePoint(parseInt(s.slice(2,-1),16)):tv.get(s)||s}function sv(s,e){let t=[],i=e.trim().split(/\s*,\s*/g),n;for(let r of i){let a=Number(r);if(!Number.isNaN(a))t.push(a);else if(n=r.match(Zx))t.push(n[2].replace(ev,(o,c,l)=>c?Ip(c):l));else throw new Error(`Invalid Chalk template style argument: ${r} (in style '${s}')`)}return t}function iv(s){Dp.lastIndex=0;let e=[],t;for(;(t=Dp.exec(s))!==null;){let i=t[1];if(t[2]){let n=sv(i,t[2]);e.push([i].concat(n))}else e.push([i])}return e}function Np(s,e){let t={};for(let n of e)for(let r of n.styles)t[r[0]]=n.inverse?null:r.slice(1);let i=s;for(let[n,r]of Object.entries(t))if(Array.isArray(r)){if(!(n in i))throw new Error(`Unknown Chalk style: ${n}`);i=r.length>0?i[n](...r):i[n]}return i}Lp.exports=(s,e)=>{let t=[],i=[],n=[];if(e.replace(Qx,(r,a,o,c,l,p)=>{if(a)n.push(Ip(a));else if(c){let u=n.join("");n=[],i.push(t.length===0?u:Np(s,t)(u)),t.push({inverse:o,styles:iv(c)})}else if(l){if(t.length===0)throw new Error("Found extraneous } in Chalk template literal");i.push(Np(s,t)(n.join(""))),n=[],t.pop()}else n.push(p)}),i.push(n.join("")),t.length>0){let r=`Chalk template literal is missing ${t.length} closing bracket${t.length===1?"":"s"} (\`}\`)`;throw new Error(r)}return i.join("")}});var $r=g((K0,$p)=>{"use strict";var ds=jp(),{stdout:Ur,stderr:Hr}=pn(),{stringReplaceAll:nv,stringEncaseCRLFWithFirstIndex:rv}=Bp(),{isArray:Mi}=Array,Up=["ansi","ansi","ansi256","ansi16m"],Ut=Object.create(null),av=(s,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let t=Ur?Ur.level:0;s.level=e.level===void 0?t:e.level},zr=class{constructor(e){return Hp(e)}},Hp=s=>{let e={};return av(e,s),e.template=(...t)=>Wp(e.template,...t),Object.setPrototypeOf(e,Bi.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=zr,e.template};function Bi(s){return Hp(s)}for(let[s,e]of Object.entries(ds))Ut[s]={get(){let t=Di(this,Wr(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,s,{value:t}),t}};Ut.visible={get(){let s=Di(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:s}),s}};var zp=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let s of zp)Ut[s]={get(){let{level:e}=this;return function(...t){let i=Wr(ds.color[Up[e]][s](...t),ds.color.close,this._styler);return Di(this,i,this._isEmpty)}}};for(let s of zp){let e="bg"+s[0].toUpperCase()+s.slice(1);Ut[e]={get(){let{level:t}=this;return function(...i){let n=Wr(ds.bgColor[Up[t]][s](...i),ds.bgColor.close,this._styler);return Di(this,n,this._isEmpty)}}}}var ov=Object.defineProperties(()=>{},{...Ut,level:{enumerable:!0,get(){return this._generator.level},set(s){this._generator.level=s}}}),Wr=(s,e,t)=>{let i,n;return t===void 0?(i=s,n=e):(i=t.openAll+s,n=e+t.closeAll),{open:s,close:e,openAll:i,closeAll:n,parent:t}},Di=(s,e,t)=>{let i=(...n)=>Mi(n[0])&&Mi(n[0].raw)?qp(i,Wp(i,...n)):qp(i,n.length===1?""+n[0]:n.join(" "));return Object.setPrototypeOf(i,ov),i._generator=s,i._styler=e,i._isEmpty=t,i},qp=(s,e)=>{if(s.level<=0||!e)return s._isEmpty?"":e;let t=s._styler;if(t===void 0)return e;let{openAll:i,closeAll:n}=t;if(e.indexOf("\x1B")!==-1)for(;t!==void 0;)e=nv(e,t.close,t.open),t=t.parent;let r=e.indexOf(`
|
|
23
|
+
`);return r!==-1&&(e=rv(e,n,i,r)),i+e+n},qr,Wp=(s,...e)=>{let[t]=e;if(!Mi(t)||!Mi(t.raw))return e.join(" ");let i=e.slice(1),n=[t.raw[0]];for(let r=1;r<t.length;r++)n.push(String(i[r-1]).replace(/[{}\\]/g,"\\$&"),String(t.raw[r]));return qr===void 0&&(qr=Fp()),qr(s,n.join(""))};Object.defineProperties(Bi.prototype,Ut);var Ni=Bi();Ni.supportsColor=Ur;Ni.stderr=Bi({level:Hr?Hr.level:0});Ni.stderr.supportsColor=Hr;$p.exports=Ni});var yu=g((uy,Jr)=>{"use strict";var Rv=Object.prototype.hasOwnProperty,G="~";function hs(){}Object.create&&(hs.prototype=Object.create(null),new hs().__proto__||(G=!1));function Av(s,e,t){this.fn=s,this.context=e,this.once=t||!1}function bu(s,e,t,i,n){if(typeof t!="function")throw new TypeError("The listener must be a function");var r=new Av(t,i||s,n),a=G?G+e:e;return s._events[a]?s._events[a].fn?s._events[a]=[s._events[a],r]:s._events[a].push(r):(s._events[a]=r,s._eventsCount++),s}function Ui(s,e){--s._eventsCount===0?s._events=new hs:delete s._events[e]}function z(){this._events=new hs,this._eventsCount=0}z.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)Rv.call(t,i)&&e.push(G?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e};z.prototype.listeners=function(e){var t=G?G+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,r=i.length,a=new Array(r);n<r;n++)a[n]=i[n].fn;return a};z.prototype.listenerCount=function(e){var t=G?G+e:e,i=this._events[t];return i?i.fn?1:i.length:0};z.prototype.emit=function(e,t,i,n,r,a){var o=G?G+e:e;if(!this._events[o])return!1;var c=this._events[o],l=arguments.length,p,u;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,i),!0;case 4:return c.fn.call(c.context,t,i,n),!0;case 5:return c.fn.call(c.context,t,i,n,r),!0;case 6:return c.fn.call(c.context,t,i,n,r,a),!0}for(u=1,p=new Array(l-1);u<l;u++)p[u-1]=arguments[u];c.fn.apply(c.context,p)}else{var d=c.length,h;for(u=0;u<d;u++)switch(c[u].once&&this.removeListener(e,c[u].fn,void 0,!0),l){case 1:c[u].fn.call(c[u].context);break;case 2:c[u].fn.call(c[u].context,t);break;case 3:c[u].fn.call(c[u].context,t,i);break;case 4:c[u].fn.call(c[u].context,t,i,n);break;default:if(!p)for(h=1,p=new Array(l-1);h<l;h++)p[h-1]=arguments[h];c[u].fn.apply(c[u].context,p)}}return!0};z.prototype.on=function(e,t,i){return bu(this,e,t,i,!1)};z.prototype.once=function(e,t,i){return bu(this,e,t,i,!0)};z.prototype.removeListener=function(e,t,i,n){var r=G?G+e:e;if(!this._events[r])return this;if(!t)return Ui(this,r),this;var a=this._events[r];if(a.fn)a.fn===t&&(!n||a.once)&&(!i||a.context===i)&&Ui(this,r);else{for(var o=0,c=[],l=a.length;o<l;o++)(a[o].fn!==t||n&&!a[o].once||i&&a[o].context!==i)&&c.push(a[o]);c.length?this._events[r]=c.length===1?c[0]:c:Ui(this,r)}return this};z.prototype.removeAllListeners=function(e){var t;return e?(t=G?G+e:e,this._events[t]&&Ui(this,t)):(this._events=new hs,this._eventsCount=0),this};z.prototype.off=z.prototype.removeListener;z.prototype.addListener=z.prototype.on;z.prefixed=G;z.EventEmitter=z;typeof Jr<"u"&&(Jr.exports=z)});var _u=g((dy,wu)=>{"use strict";wu.exports=function(e,t){if(t=t.split(":")[0],e=+e,!e)return!1;switch(t){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443;case"ftp":return e!==21;case"gopher":return e!==70;case"file":return!1}return e!==0}});var Hi=g(Eu=>{var Be=Eu,Pv=require("url"),Su=require("util")._extend,jv=_u(),Mv=/(^|,)\s*upgrade\s*($|,)/i,Qr=/^https|wss/;Be.isSSL=Qr;Be.setupOutgoing=function(s,e,t,i){s.port=e[i||"target"].port||(Qr.test(e[i||"target"].protocol)?443:80),["host","hostname","socketPath","pfx","key","passphrase","cert","ca","ciphers","secureProtocol"].forEach(function(o){s[o]=e[i||"target"][o]}),s.method=e.method||t.method,s.headers=Su({},t.headers),e.headers&&Su(s.headers,e.headers),e.auth&&(s.auth=e.auth),e.ca&&(s.ca=e.ca),Qr.test(e[i||"target"].protocol)&&(s.rejectUnauthorized=typeof e.secure>"u"?!0:e.secure),s.agent=e.agent||!1,s.localAddress=e.localAddress,s.agent||(s.headers=s.headers||{},(typeof s.headers.connection!="string"||!Mv.test(s.headers.connection))&&(s.headers.connection="close"));var n=e[i||"target"],r=n&&e.prependPath!==!1&&n.path||"",a=e.toProxy?t.url:Pv.parse(t.url).path||"";return a=e.ignorePath?"":a,s.path=Be.urlJoin(r,a),e.changeOrigin&&(s.headers.host=jv(s.port,e[i||"target"].protocol)&&!Bv(s.host)?s.host+":"+s.port:s.host),s};Be.setupSocket=function(s){return s.setTimeout(0),s.setNoDelay(!0),s.setKeepAlive(!0,0),s};Be.getPort=function(s){var e=s.headers.host?s.headers.host.match(/:(\d+)/):"";return e?e[1]:Be.hasEncryptedConnection(s)?"443":"80"};Be.hasEncryptedConnection=function(s){return!!(s.connection.encrypted||s.connection.pair)};Be.urlJoin=function(){var s=Array.prototype.slice.call(arguments),e=s.length-1,t=s[e],i=t.split("?"),n;return s[e]=i.shift(),n=[s.filter(Boolean).join("/").replace(/\/+/g,"/").replace("http:/","http://").replace("https:/","https://")],n.push.apply(n,i),n.join("?")};Be.rewriteCookieProperty=function s(e,t,i){return Array.isArray(e)?e.map(function(n){return s(n,t,i)}):e.replace(new RegExp("(;\\s*"+i+"=)([^;]+)","i"),function(n,r,a){var o;if(a in t)o=t[a];else if("*"in t)o=t["*"];else return n;return o?r+o:""})};function Bv(s){return!!~s.indexOf(":")}});var Ou=g((my,Tu)=>{var ku=require("url"),Cu=Hi(),Dv=/^201|30(1|2|7|8)$/;Tu.exports={removeChunked:function(e,t,i){e.httpVersion==="1.0"&&delete i.headers["transfer-encoding"]},setConnection:function(e,t,i){e.httpVersion==="1.0"?i.headers.connection=e.headers.connection||"close":e.httpVersion!=="2.0"&&!i.headers.connection&&(i.headers.connection=e.headers.connection||"keep-alive")},setRedirectHostRewrite:function(e,t,i,n){if((n.hostRewrite||n.autoRewrite||n.protocolRewrite)&&i.headers.location&&Dv.test(i.statusCode)){var r=ku.parse(n.target),a=ku.parse(i.headers.location);if(r.host!=a.host)return;n.hostRewrite?a.host=n.hostRewrite:n.autoRewrite&&(a.host=e.headers.host),n.protocolRewrite&&(a.protocol=n.protocolRewrite),i.headers.location=a.format()}},writeHeaders:function(e,t,i,n){var r=n.cookieDomainRewrite,a=n.cookiePathRewrite,o=n.preserveHeaderKeyCase,c,l=function(d,h){h!=null&&(r&&d.toLowerCase()==="set-cookie"&&(h=Cu.rewriteCookieProperty(h,r,"domain")),a&&d.toLowerCase()==="set-cookie"&&(h=Cu.rewriteCookieProperty(h,a,"path")),t.setHeader(String(d).trim(),h))};if(typeof r=="string"&&(r={"*":r}),typeof a=="string"&&(a={"*":a}),o&&i.rawHeaders!=null){c={};for(var p=0;p<i.rawHeaders.length;p+=2){var u=i.rawHeaders[p];c[u.toLowerCase()]=u}}Object.keys(i.headers).forEach(function(d){var h=i.headers[d];o&&c&&(d=c[d]||d),l(d,h)})},writeStatusCode:function(e,t,i){i.statusMessage?(t.statusCode=i.statusCode,t.statusMessage=i.statusMessage):t.statusCode=i.statusCode}}});var Au=g((hy,Ru)=>{var gs;Ru.exports=function(){if(!gs){try{gs=M()("follow-redirects")}catch{}typeof gs!="function"&&(gs=function(){})}gs.apply(null,arguments)}});var Du=g((gy,pa)=>{var vs=require("url"),xs=vs.URL,Nv=require("http"),Iv=require("https"),ia=require("stream").Writable,na=require("assert"),Pu=Au();(function(){var e=typeof process<"u",t=typeof window<"u"&&typeof document<"u",i=at(Error.captureStackTrace);!e&&(t||!i)&&console.warn("The follow-redirects package should be excluded from browser builds.")})();var ra=!1;try{na(new xs(""))}catch(s){ra=s.code==="ERR_INVALID_URL"}var Lv=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],aa=["abort","aborted","connect","error","socket","timeout"],oa=Object.create(null);aa.forEach(function(s){oa[s]=function(e,t,i){this._redirectable.emit(s,e,t,i)}});var ea=bs("ERR_INVALID_URL","Invalid URL",TypeError),ta=bs("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),Fv=bs("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",ta),qv=bs("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),Uv=bs("ERR_STREAM_WRITE_AFTER_END","write after end"),Hv=ia.prototype.destroy||Mu;function Q(s,e){ia.call(this),this._sanitizeOptions(s),this._options=s,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],e&&this.on("response",e);var t=this;this._onNativeResponse=function(i){try{t._processResponse(i)}catch(n){t.emit("error",n instanceof ta?n:new ta({cause:n}))}},this._performRequest()}Q.prototype=Object.create(ia.prototype);Q.prototype.abort=function(){la(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Q.prototype.destroy=function(s){return la(this._currentRequest,s),Hv.call(this,s),this};Q.prototype.write=function(s,e,t){if(this._ending)throw new Uv;if(!rt(s)&&!$v(s))throw new TypeError("data should be a string, Buffer or Uint8Array");if(at(e)&&(t=e,e=null),s.length===0){t&&t();return}this._requestBodyLength+s.length<=this._options.maxBodyLength?(this._requestBodyLength+=s.length,this._requestBodyBuffers.push({data:s,encoding:e}),this._currentRequest.write(s,e,t)):(this.emit("error",new qv),this.abort())};Q.prototype.end=function(s,e,t){if(at(s)?(t=s,s=e=null):at(e)&&(t=e,e=null),!s)this._ended=this._ending=!0,this._currentRequest.end(null,null,t);else{var i=this,n=this._currentRequest;this.write(s,e,function(){i._ended=!0,n.end(null,null,t)}),this._ending=!0}};Q.prototype.setHeader=function(s,e){this._options.headers[s]=e,this._currentRequest.setHeader(s,e)};Q.prototype.removeHeader=function(s){delete this._options.headers[s],this._currentRequest.removeHeader(s)};Q.prototype.setTimeout=function(s,e){var t=this;function i(a){a.setTimeout(s),a.removeListener("timeout",a.destroy),a.addListener("timeout",a.destroy)}function n(a){t._timeout&&clearTimeout(t._timeout),t._timeout=setTimeout(function(){t.emit("timeout"),r()},s),i(a)}function r(){t._timeout&&(clearTimeout(t._timeout),t._timeout=null),t.removeListener("abort",r),t.removeListener("error",r),t.removeListener("response",r),t.removeListener("close",r),e&&t.removeListener("timeout",e),t.socket||t._currentRequest.removeListener("socket",n)}return e&&this.on("timeout",e),this.socket?n(this.socket):this._currentRequest.once("socket",n),this.on("socket",i),this.on("abort",r),this.on("error",r),this.on("response",r),this.on("close",r),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(s){Q.prototype[s]=function(e,t){return this._currentRequest[s](e,t)}});["aborted","connection","socket"].forEach(function(s){Object.defineProperty(Q.prototype,s,{get:function(){return this._currentRequest[s]}})});Q.prototype._sanitizeOptions=function(s){if(s.headers||(s.headers={}),s.host&&(s.hostname||(s.hostname=s.host),delete s.host),!s.pathname&&s.path){var e=s.path.indexOf("?");e<0?s.pathname=s.path:(s.pathname=s.path.substring(0,e),s.search=s.path.substring(e))}};Q.prototype._performRequest=function(){var s=this._options.protocol,e=this._options.nativeProtocols[s];if(!e)throw new TypeError("Unsupported protocol "+s);if(this._options.agents){var t=s.slice(0,-1);this._options.agent=this._options.agents[t]}var i=this._currentRequest=e.request(this._options,this._onNativeResponse);i._redirectable=this;for(var n of aa)i.on(n,oa[n]);if(this._currentUrl=/^\//.test(this._options.path)?vs.format(this._options):this._options.path,this._isRedirect){var r=0,a=this,o=this._requestBodyBuffers;(function c(l){if(i===a._currentRequest)if(l)a.emit("error",l);else if(r<o.length){var p=o[r++];i.finished||i.write(p.data,p.encoding,c)}else a._ended&&i.end()})()}};Q.prototype._processResponse=function(s){var e=s.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:s.headers,statusCode:e});var t=s.headers.location;if(!t||this._options.followRedirects===!1||e<300||e>=400){s.responseUrl=this._currentUrl,s.redirects=this._redirects,this.emit("response",s),this._requestBodyBuffers=[];return}if(la(this._currentRequest),s.destroy(),++this._redirectCount>this._options.maxRedirects)throw new Fv;var i,n=this._options.beforeRedirect;n&&(i=Object.assign({Host:s.req.getHeader("host")},this._options.headers));var r=this._options.method;((e===301||e===302)&&this._options.method==="POST"||e===303&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Zr(/^content-/i,this._options.headers));var a=Zr(/^host$/i,this._options.headers),o=ca(this._currentUrl),c=a||o.host,l=/^\w+:/.test(t)?this._currentUrl:vs.format(Object.assign(o,{host:c})),p=zv(t,l);if(Pu("redirecting to",p.href),this._isRedirect=!0,sa(p,this._options),(p.protocol!==o.protocol&&p.protocol!=="https:"||p.host!==c&&!Wv(p.host,c))&&Zr(/^(?:(?:proxy-)?authorization|cookie)$/i,this._options.headers),at(n)){var u={headers:s.headers,statusCode:e},d={url:l,method:r,headers:i};n(this._options,u,d),this._sanitizeOptions(this._options)}this._performRequest()};function ju(s){var e={maxRedirects:21,maxBodyLength:10485760},t={};return Object.keys(s).forEach(function(i){var n=i+":",r=t[n]=s[i],a=e[i]=Object.create(r);function o(l,p,u){return Vv(l)?l=sa(l):rt(l)?l=sa(ca(l)):(u=p,p=Bu(l),l={protocol:n}),at(p)&&(u=p,p=null),p=Object.assign({maxRedirects:e.maxRedirects,maxBodyLength:e.maxBodyLength},l,p),p.nativeProtocols=t,!rt(p.host)&&!rt(p.hostname)&&(p.hostname="::1"),na.equal(p.protocol,n,"protocol mismatch"),Pu("options",p),new Q(p,u)}function c(l,p,u){var d=a.request(l,p,u);return d.end(),d}Object.defineProperties(a,{request:{value:o,configurable:!0,enumerable:!0,writable:!0},get:{value:c,configurable:!0,enumerable:!0,writable:!0}})}),e}function Mu(){}function ca(s){var e;if(ra)e=new xs(s);else if(e=Bu(vs.parse(s)),!rt(e.protocol))throw new ea({input:s});return e}function zv(s,e){return ra?new xs(s,e):ca(vs.resolve(e,s))}function Bu(s){if(/^\[/.test(s.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(s.hostname))throw new ea({input:s.href||s});if(/^\[/.test(s.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(s.host))throw new ea({input:s.href||s});return s}function sa(s,e){var t=e||{};for(var i of Lv)t[i]=s[i];return t.hostname.startsWith("[")&&(t.hostname=t.hostname.slice(1,-1)),t.port!==""&&(t.port=Number(t.port)),t.path=t.search?t.pathname+t.search:t.pathname,t}function Zr(s,e){var t;for(var i in e)s.test(i)&&(t=e[i],delete e[i]);return t===null||typeof t>"u"?void 0:String(t).trim()}function bs(s,e,t){function i(n){at(Error.captureStackTrace)&&Error.captureStackTrace(this,this.constructor),Object.assign(this,n||{}),this.code=s,this.message=this.cause?e+": "+this.cause.message:e}return i.prototype=new(t||Error),Object.defineProperties(i.prototype,{constructor:{value:i,enumerable:!1},name:{value:"Error ["+s+"]",enumerable:!1}}),i}function la(s,e){for(var t of aa)s.removeListener(t,oa[t]);s.on("error",Mu),s.destroy(e)}function Wv(s,e){na(rt(s)&&rt(e));var t=s.length-e.length-1;return t>0&&s[t]==="."&&s.endsWith(e)}function rt(s){return typeof s=="string"||s instanceof String}function at(s){return typeof s=="function"}function $v(s){return typeof s=="object"&&"length"in s}function Vv(s){return xs&&s instanceof xs}pa.exports=ju({http:Nv,https:Iv});pa.exports.wrap=ju});var Iu=g((xy,Nu)=>{var Gv=require("http"),Kv=require("https"),ys=Ou(),zi=Hi(),Yv=Du();ys=Object.keys(ys).map(function(s){return ys[s]});var Xv={http:Gv,https:Kv};Nu.exports={deleteLength:function(e,t,i){(e.method==="DELETE"||e.method==="OPTIONS")&&!e.headers["content-length"]&&(e.headers["content-length"]="0",delete e.headers["transfer-encoding"])},timeout:function(e,t,i){i.timeout&&e.socket.setTimeout(i.timeout)},XHeaders:function(e,t,i){if(i.xfwd){var n=e.isSpdy||zi.hasEncryptedConnection(e),r={for:e.connection.remoteAddress||e.socket.remoteAddress,port:zi.getPort(e),proto:n?"https":"http"};["for","port","proto"].forEach(function(a){e.headers["x-forwarded-"+a]=(e.headers["x-forwarded-"+a]||"")+(e.headers["x-forwarded-"+a]?",":"")+r[a]}),e.headers["x-forwarded-host"]=e.headers["x-forwarded-host"]||e.headers.host||""}},stream:function(e,t,i,n,r,a){r.emit("start",e,t,i.target||i.forward);var o=i.followRedirects?Yv:Xv,c=o.http,l=o.https;if(i.forward){var p=(i.forward.protocol==="https:"?l:c).request(zi.setupOutgoing(i.ssl||{},i,e,"forward")),u=m(p,i.forward);if(e.on("error",u),p.on("error",u),(i.buffer||e).pipe(p),!i.target)return t.end()}var d=(i.target.protocol==="https:"?l:c).request(zi.setupOutgoing(i.ssl||{},i,e));d.on("socket",function(f){r&&!d.getHeader("expect")&&r.emit("proxyReq",d,e,t,i)}),i.proxyTimeout&&d.setTimeout(i.proxyTimeout,function(){d.abort()}),e.on("aborted",function(){d.abort()});var h=m(d,i.target);e.on("error",h),d.on("error",h);function m(f,x){return function(b){if(e.socket.destroyed&&b.code==="ECONNRESET")return r.emit("econnreset",b,e,t,x),f.abort();a?a(b,e,t,x):r.emit("error",b,e,t,x)}}(i.buffer||e).pipe(d),d.on("response",function(f){if(r&&r.emit("proxyRes",f,e,t),!t.headersSent&&!i.selfHandleResponse)for(var x=0;x<ys.length&&!ys[x](e,t,f,i);x++);t.finished?r&&r.emit("end",e,t,f):(f.on("end",function(){r&&r.emit("end",e,t,f)}),i.selfHandleResponse||f.pipe(t))})}}});var Fu=g((vy,Lu)=>{var Jv=require("http"),Qv=require("https"),Vt=Hi();Lu.exports={checkMethodAndHeader:function(e,t){if(e.method!=="GET"||!e.headers.upgrade||e.headers.upgrade.toLowerCase()!=="websocket")return t.destroy(),!0},XHeaders:function(e,t,i){if(i.xfwd){var n={for:e.connection.remoteAddress||e.socket.remoteAddress,port:Vt.getPort(e),proto:Vt.hasEncryptedConnection(e)?"wss":"ws"};["for","port","proto"].forEach(function(r){e.headers["x-forwarded-"+r]=(e.headers["x-forwarded-"+r]||"")+(e.headers["x-forwarded-"+r]?",":"")+n[r]})}},stream:function(e,t,i,n,r,a){var o=function(p,u){return Object.keys(u).reduce(function(d,h){var m=u[h];if(!Array.isArray(m))return d.push(h+": "+m),d;for(var f=0;f<m.length;f++)d.push(h+": "+m[f]);return d},[p]).join(`\r
|
|
24
24
|
`)+`\r
|
|
25
25
|
\r
|
|
26
|
-
`};Vt.setupSocket(t),n&&n.length&&t.unshift(n);var c=(Vt.isSSL.test(i.target.protocol)?
|
|
27
|
-
`),!0}catch(e){return console.error("[DaemonClient] Send error:",e),!1}}function ps(s,e=5e3){return new Promise((t,i)=>{let n=
|
|
28
|
-
`);Mr=i.pop()||"";for(let n of i)if(n.trim())try{
|
|
26
|
+
`};Vt.setupSocket(t),n&&n.length&&t.unshift(n);var c=(Vt.isSSL.test(i.target.protocol)?Qv:Jv).request(Vt.setupOutgoing(i.ssl||{},i,e));return r&&r.emit("proxyReqWs",c,e,t,i,n),c.on("error",l),c.on("response",function(p){p.upgrade||(t.write(o("HTTP/"+p.httpVersion+" "+p.statusCode+" "+p.statusMessage,p.headers)),p.pipe(t))}),c.on("upgrade",function(p,u,d){u.on("error",l),u.on("end",function(){r.emit("close",p,u,d)}),t.on("error",function(){u.end()}),Vt.setupSocket(u),d&&d.length&&u.unshift(d),t.write(o("HTTP/1.1 101 Switching Protocols",p.headers)),u.pipe(t).pipe(u),r.emit("open",u),r.emit("proxySocket",u)}),c.end();function l(p){a?a(p,e,t):r.emit("error",p,e,t),t.end()}}}});var Vu=g((by,$u)=>{var zu=$u.exports,qu=require("util")._extend,Zv=require("url").parse,Wu=yu(),eb=require("http"),tb=require("https"),Uu=Iu(),Hu=Fu();zu.Server=ot;function ua(s){return function(e){return function(t,i){var n=s==="ws"?this.wsPasses:this.webPasses,r=[].slice.call(arguments),a=r.length-1,o,c;typeof r[a]=="function"&&(c=r[a],a--);var l=e;if(!(r[a]instanceof Buffer)&&r[a]!==i&&(l=qu({},e),qu(l,r[a]),a--),r[a]instanceof Buffer&&(o=r[a]),["target","forward"].forEach(function(u){typeof l[u]=="string"&&(l[u]=Zv(l[u]))}),!l.target&&!l.forward)return this.emit("error",new Error("Must provide a proper URL as target"));for(var p=0;p<n.length&&!n[p](t,i,l,o,this,c);p++);}}}zu.createRightProxy=ua;function ot(s){Wu.call(this),s=s||{},s.prependPath=s.prependPath!==!1,this.web=this.proxyRequest=ua("web")(s),this.ws=this.proxyWebsocketRequest=ua("ws")(s),this.options=s,this.webPasses=Object.keys(Uu).map(function(e){return Uu[e]}),this.wsPasses=Object.keys(Hu).map(function(e){return Hu[e]}),this.on("error",this.onError,this)}require("util").inherits(ot,Wu);ot.prototype.onError=function(s){if(this.listeners("error").length===1)throw s};ot.prototype.listen=function(s,e){var t=this,i=function(n,r){t.web(n,r)};return this._server=this.options.ssl?tb.createServer(this.options.ssl,i):eb.createServer(i),this.options.ws&&this._server.on("upgrade",function(n,r,a){t.ws(n,r,a)}),this._server.listen(s,e),this};ot.prototype.close=function(s){var e=this;this._server&&this._server.close(t);function t(){e._server=null,s&&s.apply(null,arguments)}};ot.prototype.before=function(s,e,t){if(s!=="ws"&&s!=="web")throw new Error("type must be `web` or `ws`");var i=s==="ws"?this.wsPasses:this.webPasses,n=!1;if(i.forEach(function(r,a){r.name===e&&(n=a)}),n===!1)throw new Error("No such pass");i.splice(n,0,t)};ot.prototype.after=function(s,e,t){if(s!=="ws"&&s!=="web")throw new Error("type must be `web` or `ws`");var i=s==="ws"?this.wsPasses:this.webPasses,n=!1;if(i.forEach(function(r,a){r.name===e&&(n=a)}),n===!1)throw new Error("No such pass");i.splice(n++,0,t)}});var Ku=g((yy,Gu)=>{var ws=Vu().Server;function da(s){return new ws(s)}ws.createProxyServer=da;ws.createServer=da;ws.createProxy=da;Gu.exports=ws});var Xu=g((wy,Yu)=>{Yu.exports=Ku()});var ub={};Ve(ub,{startServer:()=>pd});module.exports=xd(ub);var ad=require("http"),od=require("url"),cd=require("child_process");var Ul=R(ql(),1),{Server:Hl,Namespace:j0,Socket:M0}=Ul.default;var Gr=R(require("node-pty"),1),zt=R(require("os"),1),O=R(require("fs"),1),we=R(require("path"),1);var ze=null;function Mx(){return process.env.CODESPACES==="true"||process.env.GITPOD_WORKSPACE_ID||process.platform==="linux"&&!process.env.DISPLAY}async function sp(){if(ze!==null)return ze;if(Mx())return ze=!1,console.log("\u2705 Remote desktop not available (headless environment)"),ze;try{let s=await import("@hurdlegroup/robotjs");(s.default||s).getScreenSize(),ze=!0}catch{ze=!1,console.log("\u2705 Remote desktop not available (no display or robotjs not installed)")}return ze}function ip(){return ze===!0}async function np(s){let e=null,t=null,i=null,n=null,r=null,a=null,o=null,c=async()=>{if(e)return!0;try{let f=await import("@hurdlegroup/robotjs");e=f.default||f;let{TileManager:x}=await Promise.resolve().then(()=>($l(),Wl)),{ResourceManager:y}=await Promise.resolve().then(()=>(Gl(),Vl)),{ScreenUpdateHelper:b}=await Promise.resolve().then(()=>(Yl(),Kl)),{MouseHandler:q}=await Promise.resolve().then(()=>(Jl(),Xl)),{KeyboardHandler:B}=await Promise.resolve().then(()=>(Zl(),Ql)),{ScreenHandler:me}=await Promise.resolve().then(()=>(tp(),ep));return t=x,i=y,n=b,r=q,a=B,o=me,e.setMouseDelay(2),e.setKeyboardDelay(2),!0}catch(f){return console.error("\u274C Failed to load remote modules:",f.message),!1}},l=s.of("/remote"),p=null,u=null,d=null,h=null,m=null;l.on("connection",async f=>{let x=f.handshake.auth?.apiKey;if(!x){console.log("\u274C Remote connection rejected: no apiKey"),f.disconnect();return}if(console.log("\u{1F5A5}\uFE0F Remote client connected:",f.id),!await c()){f.emit("error",{message:"Remote desktop not available"}),f.disconnect();return}p||(p=new i,u=new n(p),d=new r(e,p),h=new a(e,p),m=new o(p,u),p.startResourceMonitoring()),f.isAuthenticated=!0;let b=new t(e);p.addClient(f.id,{tileManager:b,screenInterval:null,authenticated:!0,apiKey:x});let q=B=>B;d.setupMouseHandlers(f,q),h.setupKeyboardHandlers(f,q),m.setupScreenHandlers(f,q),f.on("disconnect",()=>{console.log("\u{1F5A5}\uFE0F Remote client disconnected:",f.id),p.removeClient(f.id)})})}var Br=R(require("net"),1),le=R(require("fs"),1),nt=R(require("path"),1),op=R(require("os"),1),cp=require("child_process"),lp=require("url"),Ri=nt.default.dirname((0,lp.fileURLToPath)(__importMetaUrl)),Nt=nt.default.join(op.default.homedir(),".9remote"),Ti=process.platform==="win32"?"\\\\.\\pipe\\9remote-pty":nt.default.join(Nt,"pty-daemon.sock"),rp=nt.default.join(Ri,"ptyDaemon.js"),ap=nt.default.join(Ri,"ptyDaemon.cjs"),ye=null,Dt=!1,We=!1,Mr="",Bx=0,It=new Map,Oi=new Map;function Dx(){return++Bx}function Ai(s,e){Oi.has(s)||Oi.set(s,[]),Oi.get(s).push(e)}function ls(s,e){let t=Oi.get(s);if(t)for(let i of t)try{i(e)}catch(n){console.error(`[DaemonClient] Error in ${s} handler:`,n)}}function Dr(s){if(!ye||!Dt)return!1;try{return ye.write(JSON.stringify(s)+`
|
|
27
|
+
`),!0}catch(e){return console.error("[DaemonClient] Send error:",e),!1}}function ps(s,e=5e3){return new Promise((t,i)=>{let n=Dx();s.requestId=n;let r=setTimeout(()=>{It.delete(n),i(new Error("Request timeout"))},e);It.set(n,{resolve:t,reject:i,timer:r}),Dr(s)||(clearTimeout(r),It.delete(n),i(new Error("Not connected to daemon")))})}function Nx(s){let{type:e,requestId:t,...i}=s;if(t&&It.has(t)){let{resolve:n,timer:r}=It.get(t);clearTimeout(r),It.delete(t),n({type:e,...i});return}switch(e){case"output":ls("output",{sessionId:i.sessionId,data:Buffer.from(i.data,"base64")});break;case"sessionClosed":ls("sessionClosed",i.sessionId);break;case"sessionRenamed":ls("sessionRenamed",{sessionId:i.sessionId,name:i.name});break;case"pong":break;default:console.log("[DaemonClient] Unknown message:",e)}}function pp(){return new Promise(s=>{let e=Br.default.connect(Ti),t=setTimeout(()=>{e.destroy(),s(!1)},1e3);e.on("connect",()=>{clearTimeout(t),e.destroy(),s(!0)}),e.on("error",()=>{if(clearTimeout(t),process.platform!=="win32"&&le.default.existsSync(Ti))try{le.default.unlinkSync(Ti)}catch{}s(!1)})})}function Ix(){return le.default.existsSync(Nt)||le.default.mkdirSync(Nt,{recursive:!0}),le.default.existsSync(rp)?{script:rp,cwd:Ri}:le.default.existsSync(ap)?{script:ap,cwd:Ri}:(console.error("[DaemonClient] \u274C Daemon script not found"),null)}async function Lx(){if(!le.default.existsSync(Nt))try{le.default.mkdirSync(Nt,{recursive:!0})}catch(a){return console.error("[DaemonClient] Failed to create socket directory:",a.message),!1}let s=Ix();if(!s)return!1;let{script:e,cwd:t}=s,i=nt.default.join(Nt,"daemon.log"),n;try{n=le.default.openSync(i,"w")}catch(a){console.error("[DaemonClient] Failed to open log file:",a.message),n="ignore"}if((0,cp.spawn)("node",[e],{detached:!0,stdio:["ignore",n,n],cwd:t}).unref(),typeof n=="number")try{le.default.closeSync(n)}catch{}for(let a=0;a<20;a++)if(await new Promise(o=>setTimeout(o,100)),await pp())return!0;console.error("[DaemonClient] \u274C Failed to start daemon");try{let a=le.default.readFileSync(i,"utf8");a.trim()&&(console.error("[DaemonClient] Daemon log:"),console.error(a))}catch{}return!1}async function up(){if(!(Dt||We)){We=!0;try{return!await pp()&&!await Lx()?(console.error("[DaemonClient] \u274C Failed to start daemon"),We=!1,!1):new Promise(s=>{let e=setTimeout(()=>{console.error("[DaemonClient] \u274C Connection timeout after 5s"),ye&&ye.destroy(),We=!1,s(!1)},5e3);ye=Br.default.connect(Ti),ye.on("connect",()=>{clearTimeout(e),Dt=!0,We=!1,ls("connected"),s(!0)}),ye.on("data",t=>{Mr+=t.toString();let i=Mr.split(`
|
|
28
|
+
`);Mr=i.pop()||"";for(let n of i)if(n.trim())try{Nx(JSON.parse(n))}catch{console.error("[DaemonClient] Invalid message:",n)}}),ye.on("close",()=>{Dt=!1,ye=null,ls("disconnected"),setTimeout(()=>{!Dt&&!We&&up()},2e3)}),ye.on("error",t=>{clearTimeout(e),console.error("[DaemonClient] \u274C Connection error:",t.message),console.error("[DaemonClient] Error code:",t.code),We=!1,s(!1)})})}catch(s){return console.error("[DaemonClient] \u274C Connect error:",s),We=!1,!1}}}async function dp(){return up()}function je(){return Dt}async function fp(){return(await ps({type:"listSessions"})).sessions||[]}async function mp(s,e=80,t=24){let i=`session-${Date.now()}`;return await ps({type:"createSession",sessionId:i,name:s,cols:e,rows:t})}async function hp(s){return await ps({type:"joinSession",sessionId:s})}function Nr(s,e){return Dr({type:"input",sessionId:s,data:e})}function gp(s,e,t){return Dr({type:"resize",sessionId:s,cols:e,rows:t})}async function xp(s){return await ps({type:"deleteSession",sessionId:s})}async function vp(s,e){return await ps({type:"renameSession",sessionId:s,name:e})}var Xp=R($r(),1),Vp=Xp.default.rgb(230,138,110),j=new Map,Me="daemon",Fi=we.default.join(zt.default.homedir(),".9remote","sessions.json"),Kr="/tmp/9remote-uploads";function cv(){try{if(O.default.existsSync(Fi))return JSON.parse(O.default.readFileSync(Fi,"utf8"))}catch(s){console.log("\u26A0\uFE0F Failed to load session metadata:",s.message)}return{}}function Gp(){try{let s={};for(let[t,i]of j)s[t]={name:i.name,createdAt:i.createdAt};let e=we.default.dirname(Fi);O.default.existsSync(e)||O.default.mkdirSync(e,{recursive:!0}),O.default.writeFileSync(Fi,JSON.stringify(s,null,2),"utf8")}catch(s){console.log("\u26A0\uFE0F Failed to save session metadata:",s.message)}}O.default.existsSync(Kr)||O.default.mkdirSync(Kr,{recursive:!0});var Ii=0,fs=null,lv=6e4;function Ht(){return process.env.CODESPACES==="true"}function pv(){return Ht()?{isCodespaces:!0,codespaceName:process.env.CODESPACE_NAME||"unknown",workspacePath:process.env.CODESPACE_VSCODE_FOLDER||process.cwd()}:null}var uv={name:"9Remote",postCreateCommand:"npm install -g 9remote@latest",postAttachCommand:"9remote start",forwardPorts:[2208],portsAttributes:{2208:{label:"9Remote Server",onAutoForward:"notify"}}};function Jp(s){return we.default.join(s,".devcontainer","devcontainer.json")}function dv(s){try{let e=Jp(s);if(!O.default.existsSync(e))return{enabled:!1,exists:!1};let t=O.default.readFileSync(e,"utf8"),i=JSON.parse(t);return{enabled:i.postAttachCommand==="9remote start"||i.postAttachCommand==="9remote",exists:!0}}catch{return{enabled:!1,exists:!1,error:"Failed to read config"}}}function fv(s,e){try{let t=we.default.join(s,".devcontainer"),i=Jp(s);O.default.existsSync(t)||O.default.mkdirSync(t,{recursive:!0});let n={...uv};if(O.default.existsSync(i))try{n={...JSON.parse(O.default.readFileSync(i,"utf8"))}}catch{}return e?(n.postAttachCommand="9remote start",n.postCreateCommand||(n.postCreateCommand="npm install -g 9remote@latest")):delete n.postAttachCommand,O.default.writeFileSync(i,JSON.stringify(n,null,2)),{success:!0,enabled:e}}catch(t){return{success:!1,error:t.message}}}function mv(){fs||(fs=setInterval(()=>{process.memoryUsage()},lv))}function hv(){fs&&(console.log("\u23F8\uFE0F Stopping Codespaces heartbeat"),clearInterval(fs),fs=null)}function Yr(){return process.platform==="win32"?process.env.COMSPEC||"powershell.exe":process.env.SHELL||"/bin/zsh"}function Kp(){return Ht()?"/workspaces":zt.default.homedir()}function Yp(){let s=zt.default.homedir(),e=zt.default.userInfo().username,t=Yr(),i={...process.env};return Object.assign(i,{HOME:s,USER:e,LOGNAME:e,SHELL:t,TERM:"xterm-256color",COLORTERM:"truecolor",LANG:"en_US.UTF-8",LC_ALL:"en_US.UTF-8",LC_CTYPE:"en_US.UTF-8",PWD:s,OLDPWD:s,TMPDIR:i.TMPDIR||(process.platform==="win32"?i.TEMP||i.TMP:"/tmp"),__CF_USER_TEXT_ENCODING:i.__CF_USER_TEXT_ENCODING,XPC_FLAGS:i.XPC_FLAGS,XPC_SERVICE_NAME:i.XPC_SERVICE_NAME,SSH_AUTH_SOCK:i.SSH_AUTH_SOCK,TERM_PROGRAM:"9Remote",TERM_PROGRAM_VERSION:"1.0.0",ITERM_SESSION_ID:`9remote-${Date.now()}`,SHLVL:"1"}),i}var Wt=we.default.join(zt.default.homedir(),".9remote","buffers");function Qp(){O.default.existsSync(Wt)||O.default.mkdirSync(Wt,{recursive:!0})}function Li(s,e){if(Me!=="buffer")return;Qp();let t=we.default.join(Wt,`${s}.buf`);try{let i=e.join("");O.default.writeFileSync(t,i,"utf8")}catch(i){console.log(`\u26A0\uFE0F Failed to save buffer for ${s}:`,i.message)}}function gv(s){if(Me!=="buffer")return null;let e=we.default.join(Wt,`${s}.buf`);try{if(O.default.existsSync(e))return O.default.readFileSync(e,"utf8")}catch(t){console.log(`\u26A0\uFE0F Failed to load buffer for ${s}:`,t.message)}return null}function Vr(s){let e=we.default.join(Wt,`${s}.buf`);try{O.default.existsSync(e)&&O.default.unlinkSync(e)}catch{}}function xv(){Qp();try{return O.default.readdirSync(Wt).filter(e=>e.endsWith(".buf")).map(e=>e.replace(".buf",""))}catch{return[]}}var vv=null;async function Zp(){if(Me==="daemon")if(!await dp())console.error("\u274C Failed to connect to PTY daemon, falling back to buffer mode");else{let i=await fp();for(let n of i)j.set(n.id,{daemon:!0,name:n.name,createdAt:n.createdAt});i.length>0?console.log(Vp(`\u2705 Connected to daemon with ${i.length} session(s)`)):console.log(Vp("\u2705 Connected to PTY daemon"));return}console.log("\u{1F4E6} Buffer persistence mode - scrollback enabled");let s=xv(),e=cv();for(let t of s){let i=e[t]||{};j.set(t,{pty:null,name:i.name||`Terminal ${j.size+1}`,createdAt:i.createdAt||Date.now(),buffer:[],needsRestore:!0}),console.log(`\u{1F504} Found saved session: ${t}`)}s.length>0&&console.log(`\u2705 Found ${s.length} saved session(s)`)}function eu(s){vv=s,Me==="daemon"&&(Ai("output",({sessionId:e,data:t})=>{s.emit("output",{sessionId:e,data:t})}),Ai("sessionClosed",e=>{j.delete(e),s.emit("sessionClosed",e)}),Ai("sessionRenamed",({sessionId:e,name:t})=>{let i=j.get(e);i&&(i.name=t),s.emit("session-renamed",{sessionId:e,name:t})})),s.on("connection",e=>{console.log(`\u{1F4DF} Terminal client connected: ${e.id}`),Ii++,Ht()&&Ii===1&&mv(),e.emit("serverInfo",{remoteAvailable:ip(),daemonMode:Me==="daemon"&&je(),platform:process.platform,...pv()}),e.on("getSessions",t=>{let i=[];for(let[n,r]of j)i.push({id:n,name:r.name,createdAt:r.createdAt,restored:r.restored||!1});t(i)}),e.on("createSession",async({name:t},i)=>{let n=`session-${Date.now()}`,r=Yr(),a=Yp(),o=Kp();try{if(Me==="daemon"&&je()){let d=await mp(t,80,24);d.success?(j.set(d.sessionId,{daemon:!0,name:t||`Terminal ${j.size+1}`,createdAt:Date.now()}),i({success:!0,sessionId:d.sessionId})):i({success:!1,error:d.error});return}let c=process.platform==="win32"?[]:["-l"],l=Gr.default.spawn(r,c,{name:"xterm-256color",cols:80,rows:24,cwd:o,env:a,useConpty:!1});sessionData={pty:l,name:t||`Terminal ${j.size+1}`,createdAt:Date.now(),buffer:[]};let p=50*1024,u=null;l.onData(d=>{sessionData.buffer.push(d);let h=sessionData.buffer.reduce((m,f)=>m+f.length,0);for(;h>p&&sessionData.buffer.length>1;){let m=sessionData.buffer.shift();h-=m.length}s.emit("output",{sessionId:n,data:Buffer.from(d,"utf-8")}),Me==="buffer"&&(u&&clearTimeout(u),u=setTimeout(()=>{Li(n,sessionData.buffer)},2e3))}),l.onExit(({exitCode:d})=>{console.log(`PTY exited: sessionId=${n}, code=${d}`),Me==="buffer"&&sessionData.buffer.length>0&&Li(n,sessionData.buffer),j.delete(n),Vr(n),s.emit("sessionClosed",n)}),console.log(`PTY created: sessionId=${n}, name=${t}`),j.set(n,sessionData),i({success:!0,sessionId:n})}catch(c){console.error("Failed to create session:",c),i({success:!1,error:c.message})}}),e.on("joinSession",async(t,i)=>{let n=j.get(t);if(!n){i({success:!1,error:"Session not found"});return}if(n.daemon&&je()){try{let r=await hp(t);i({success:r.success,name:r.name,error:r.error})}catch(r){i({success:!1,error:r.message})}return}if(n.needsRestore&&Me==="buffer")try{let r=Yr(),a=Yp(),o=Kp(),c=process.platform==="win32"?[]:["-l"],l=Gr.default.spawn(r,c,{name:"xterm-256color",cols:80,rows:24,cwd:o,env:a,useConpty:!1});n.pty=l,n.needsRestore=!1;let p=gv(t);p&&(n.buffer=[p]);let u=50*1024,d=null;l.onData(h=>{n.buffer.push(h);let m=n.buffer.reduce((f,x)=>f+x.length,0);for(;m>u&&n.buffer.length>1;){let f=n.buffer.shift();m-=f.length}s.emit("output",{sessionId:t,data:Buffer.from(h,"utf-8")}),d&&clearTimeout(d),d=setTimeout(()=>{Li(t,n.buffer)},2e3)}),l.onExit(({exitCode:h})=>{console.log(`PTY exited: sessionId=${t}, code=${h}`),n.buffer.length>0&&Li(t,n.buffer),j.delete(t),Vr(t),s.emit("sessionClosed",t)}),console.log(`\u2705 Restored PTY session: ${t}`)}catch(r){console.error("Failed to restore session:",r),i({success:!1,error:"Failed to restore session"});return}if(n.buffer&&n.buffer.length>0){let r=n.buffer.join("");e.emit("output",{sessionId:t,data:Buffer.from(r,"utf-8")})}i({success:!0,name:n.name})}),e.on("input",({sessionId:t,data:i})=>{if(!t)return;let n=j.get(t);if(n){if(n.daemon&&je()){Nr(t,i);return}let r=Buffer.isBuffer(i)?i.toString("utf-8"):i;n.pty&&n.pty.write(r)}}),e.on("upload-file",({sessionId:t,filename:i,size:n,type:r,content:a})=>{if(!t)return;let o=j.get(t);if(o)try{let c=Date.now(),l=i.replace(/[^a-zA-Z0-9._-]/g,"_"),p=`${c}_${l}`,u=we.default.join(Kr,p),d=Buffer.from(a,"base64");O.default.writeFileSync(u,d),console.log(`\u{1F4CE} File uploaded: ${u} (${n} bytes)`),o.daemon&&je()?Nr(t,u):o.pty&&o.pty.write(u)}catch(c){console.error("File upload error:",c),e.emit("output",{sessionId:t,data:Buffer.from(`\r
|
|
29
29
|
Error uploading file: ${c.message}\r
|
|
30
|
-
`,"utf-8")})}}),e.on("resize",({sessionId:t,cols:i,rows:n})=>{if(!t)return;let r=j.get(t);if(r){if(r.daemon&&
|
|
31
|
-
`).filter(Boolean),a=[],o={};try{(0,
|
|
32
|
-
`).filter(Boolean).forEach(l=>{let p=l.split(" ");if(p.length>=3){let u=p[0]==="-"?0:parseInt(p[0],10)||0,d=p[1]==="-"?0:parseInt(p[1],10)||0;o[p[2]]={added:u,deleted:d}}})}catch{}for(let c of r){let l=c.match(/^([MADRCU?! ]{1,2})\s+(.+)$/);if(!l)continue;let p=l[1],u=l[2];if(!u)continue;let d;p.includes("?")?d="?":p.includes("A")?d="A":p.includes("D")?d="D":p.includes("M")?d="M":p.includes("R")?d="R":d=p.trim()[0]||"?";let h=o[u]||{added:0,deleted:0};if(d==="?")try{let m=
|
|
33
|
-
`).length,h.deleted=0}}catch{}a.push({status:d,path:u,added:h.added,deleted:h.deleted})}i({success:!0,files:a})}catch{i({success:!1,error:"Not a git repository or git not available"})}}),e.on("gitDiff",({repoPath:t,file:i,status:n},r)=>{try{let a="";if(i&&n==="?"){let o=
|
|
30
|
+
`,"utf-8")})}}),e.on("resize",({sessionId:t,cols:i,rows:n})=>{if(!t)return;let r=j.get(t);if(r){if(r.daemon&&je()){gp(t,i,n);return}if(r.pty)try{r.pty.resize(i,n)}catch(a){console.log(`Resize failed for ${t}: ${a.message}`)}}}),e.on("deleteSession",async(t,i)=>{let n=j.get(t);if(n){if(n.daemon&&je()){try{await xp(t),j.delete(t),i({success:!0})}catch(r){i({success:!1,error:r.message})}return}n.pty&&n.pty.kill(),j.delete(t),Vr(t),s.emit("sessionClosed",t),Gp(),i({success:!0})}else i({success:!1,error:"Session not found"})}),e.on("renameSession",async({sessionId:t,name:i},n)=>{let r=j.get(t);if(r){if(r.daemon&&je()){try{await vp(t,i),r.name=i,n({success:!0})}catch(a){n({success:!1,error:a.message})}return}r.name=i,s.emit("session-renamed",{sessionId:t,name:i}),Gp(),n({success:!0})}else n({success:!1,error:"Session not found"})}),e.on("getAutoStartStatus",t=>{if(!Ht()){t({success:!1,error:"Not in Codespaces"});return}let i=process.env.CODESPACE_VSCODE_FOLDER||process.cwd(),n=dv(i);t({success:!0,...n})}),e.on("setAutoStart",({enabled:t},i)=>{if(!Ht()){i({success:!1,error:"Not in Codespaces"});return}let n=process.env.CODESPACE_VSCODE_FOLDER||process.cwd(),r=fv(n,t);i(r)}),e.on("disconnect",()=>{console.log(`\u{1F4DF} Terminal client disconnected: ${e.id}`),Ii--,Ht()&&Ii===0&&hv()})})}var S=R(require("fs"),1),Se=R(require("path"),1),$t=R(require("os"),1),_e=require("child_process");var tu=["node_modules",".git"],su=[".png",".jpg",".jpeg",".gif",".webp",".ico",".svg",".bmp",".pdf",".zip",".tar",".gz",".rar",".7z",".exe",".dll",".so",".dylib",".mp3",".mp4",".wav",".avi",".mov",".webm",".woff",".woff2",".ttf",".eot",".otf",".sqlite",".db"];function iu(s){return tu.includes(s)}function ms(s){let e=Se.default.extname(s).toLowerCase();return su.includes(e)}function bv(s,e){return s.isDirectory()?"folder":ms(e)?"binary":"file"}function qi(s){return s<1024?`${s}B`:s<1024*1024?`${(s/1024).toFixed(1)}KB`:`${(s/(1024*1024)).toFixed(1)}MB`}function nu(s,e,t,i=50){if(!(t.length>=i))try{let n=S.default.readdirSync(s);for(let r of n){if(t.length>=i)return;if(r.startsWith(".")||iu(r))continue;let a=Se.default.join(s,r);try{let o=S.default.statSync(a);o.isDirectory()?nu(a,e,t,i):r.toLowerCase().includes(e.toLowerCase())&&t.push({name:r,path:a,type:ms(r)?"binary":"file",size:o.size,sizeFormatted:qi(o.size)})}catch{}}}catch{}}function yv(){if(process.platform!=="win32")return[];try{return(0,_e.execSync)("wmic logicaldisk get name",{encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).split(/\r?\n/).map(t=>t.trim()).filter(t=>/^[A-Z]:$/.test(t)).map(t=>({letter:t[0],path:t+"\\"}))}catch{let s=[];for(let e of"CDEFGHIJ"){let t=`${e}:\\`;S.default.existsSync(t)&&s.push({letter:e,path:t})}return s}}function ru(s){s.on("connection",e=>{e.on("getSystemInfo",t=>{let i=process.platform,n=i==="win32";t({success:!0,platform:i,isWindows:n,drives:n?yv():[],homedir:$t.default.homedir()})}),e.on("getFiles",({dirPath:t},i)=>{try{let n=t||$t.default.homedir(),r=t?.startsWith("~")?t.replace("~",$t.default.homedir()):n;if(!S.default.existsSync(r)){i({success:!1,error:"Directory not found"});return}let a=S.default.readdirSync(r),o=[];for(let c of a)if(!(c.startsWith(".")&&c!==".env"&&c!==".env.example")&&!iu(c))try{let l=Se.default.join(r,c),p=S.default.statSync(l);o.push({name:c,path:l,type:bv(p,c),size:p.isFile()?p.size:null,sizeFormatted:p.isFile()?qi(p.size):null,modified:p.mtime.getTime()})}catch{}o.sort((c,l)=>c.type==="folder"&&l.type!=="folder"?-1:c.type!=="folder"&&l.type==="folder"?1:c.name.localeCompare(l.name)),i({success:!0,files:o,currentPath:r,parentPath:Se.default.dirname(r)})}catch(n){i({success:!1,error:n.message})}}),e.on("searchFiles",({workspace:t,query:i},n)=>{try{if(!i||i.length<2){n({success:!0,files:[]});return}let r=t?.startsWith("~")?t.replace("~",$t.default.homedir()):t||$t.default.homedir();if(!S.default.existsSync(r)){n({success:!1,error:"Workspace not found"});return}let a=[];nu(r,i,a,50),a.sort((o,c)=>{let l=o.name.toLowerCase()===i.toLowerCase(),p=c.name.toLowerCase()===i.toLowerCase();return l&&!p?-1:!l&&p?1:o.path.length-c.path.length}),n({success:!0,files:a})}catch(r){n({success:!1,error:r.message})}}),e.on("readFile",({filePath:t},i)=>{try{if(!S.default.existsSync(t)){i({success:!1,error:"File not found"});return}let n=S.default.statSync(t);if(n.size>512e3){i({success:!1,error:`File too large (${qi(n.size)}). Max ${qi(512e3)}`});return}if(ms(t)){i({success:!1,error:"Cannot open binary file"});return}let r=S.default.readFileSync(t,"utf-8");i({success:!0,content:r})}catch(n){i({success:!1,error:n.message})}}),e.on("writeFile",({filePath:t,content:i},n)=>{try{S.default.writeFileSync(t,i,"utf-8"),n({success:!0})}catch(r){n({success:!1,error:r.message})}}),e.on("createItem",({itemPath:t,type:i},n)=>{try{if(S.default.existsSync(t)){n({success:!1,error:"Item already exists"});return}i==="folder"?S.default.mkdirSync(t,{recursive:!0}):S.default.writeFileSync(t,"","utf-8"),n({success:!0})}catch(r){n({success:!1,error:r.message})}}),e.on("deleteItem",({itemPath:t},i)=>{try{if(!S.default.existsSync(t)){i({success:!1,error:"Item not found"});return}S.default.statSync(t).isDirectory()?S.default.rmSync(t,{recursive:!0}):S.default.unlinkSync(t),i({success:!0})}catch(n){i({success:!1,error:n.message})}}),e.on("renameItem",({oldPath:t,newPath:i},n)=>{try{if(!S.default.existsSync(t)){n({success:!1,error:"Item not found"});return}if(S.default.existsSync(i)){n({success:!1,error:"Target already exists"});return}S.default.renameSync(t,i),n({success:!0})}catch(r){n({success:!1,error:r.message})}}),e.on("gitStatus",({repoPath:t},i)=>{try{let r=(0,_e.execSync)("git status --porcelain",{cwd:t,encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim().split(`
|
|
31
|
+
`).filter(Boolean),a=[],o={};try{(0,_e.execSync)("git diff HEAD --numstat",{cwd:t,encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim().split(`
|
|
32
|
+
`).filter(Boolean).forEach(l=>{let p=l.split(" ");if(p.length>=3){let u=p[0]==="-"?0:parseInt(p[0],10)||0,d=p[1]==="-"?0:parseInt(p[1],10)||0;o[p[2]]={added:u,deleted:d}}})}catch{}for(let c of r){let l=c.match(/^([MADRCU?! ]{1,2})\s+(.+)$/);if(!l)continue;let p=l[1],u=l[2];if(!u)continue;let d;p.includes("?")?d="?":p.includes("A")?d="A":p.includes("D")?d="D":p.includes("M")?d="M":p.includes("R")?d="R":d=p.trim()[0]||"?";let h=o[u]||{added:0,deleted:0};if(d==="?")try{let m=Se.default.join(t,u);if(S.default.existsSync(m)&&!ms(u)){let f=S.default.readFileSync(m,"utf-8");h.added=f.split(`
|
|
33
|
+
`).length,h.deleted=0}}catch{}a.push({status:d,path:u,added:h.added,deleted:h.deleted})}i({success:!0,files:a})}catch{i({success:!1,error:"Not a git repository or git not available"})}}),e.on("gitFileStatus",({repoPath:t,filePath:i},n)=>{try{let r=Se.default.relative(t,i),o=(0,_e.execSync)(`git status --porcelain -- "${r}"`,{cwd:t,encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim();if(!o){n({success:!0,status:null});return}let c=o.match(/^([MADRCU?! ]{1,2})\s+(.+)$/);if(!c){n({success:!0,status:null});return}let l=c[1],p;l.includes("?")?p="?":l.includes("A")?p="A":l.includes("D")?p="D":l.includes("M")?p="M":l.includes("R")?p="R":p=l.trim()[0]||"?",n({success:!0,status:p,file:r})}catch{n({success:!0,status:null})}}),e.on("gitDiff",({repoPath:t,file:i,status:n},r)=>{try{let a="";if(i&&n==="?"){let o=Se.default.join(t,i);if(S.default.existsSync(o)){let l=S.default.readFileSync(o,"utf-8").split(`
|
|
34
34
|
`);a=`diff --git a/${i} b/${i}
|
|
35
35
|
new file mode 100644
|
|
36
36
|
--- /dev/null
|
|
37
37
|
+++ b/${i}
|
|
38
38
|
@@ -0,0 +1,${l.length} @@
|
|
39
39
|
${l.map(p=>`+${p}`).join(`
|
|
40
|
-
`)}`}}else if(i){let o=`git diff HEAD -- "${i}"`;a=(0,
|
|
41
|
-
`).filter(l=>l.startsWith("??")).map(l=>l.substring(3));for(let l of c){let p=
|
|
40
|
+
`)}`}}else if(i){let o=`git diff HEAD -- "${i}"`;a=(0,_e.execSync)(o,{cwd:t,encoding:"utf-8",stdio:["pipe","pipe","pipe"]})}else{a=(0,_e.execSync)("git diff HEAD",{cwd:t,encoding:"utf-8",stdio:["pipe","pipe","pipe"]});let c=(0,_e.execSync)("git status --porcelain",{cwd:t,encoding:"utf-8",stdio:["pipe","pipe","pipe"]}).trim().split(`
|
|
41
|
+
`).filter(l=>l.startsWith("??")).map(l=>l.substring(3));for(let l of c){let p=Se.default.join(t,l);if(S.default.existsSync(p)&&!ms(l))try{if(S.default.statSync(p).size<=512e3){let h=S.default.readFileSync(p,"utf-8").split(`
|
|
42
42
|
`);a+=`
|
|
43
43
|
diff --git a/${l} b/${l}
|
|
44
44
|
new file mode 100644
|
|
@@ -46,8 +46,8 @@ new file mode 100644
|
|
|
46
46
|
+++ b/${l}
|
|
47
47
|
@@ -0,0 +1,${h.length} @@
|
|
48
48
|
${h.map(m=>`+${m}`).join(`
|
|
49
|
-
`)}`}}catch{}}}r({success:!0,diff:a})}catch(a){r({success:!1,error:a.message})}}),e.on("gitDiscard",({repoPath:t,file:i,status:n},r)=>{try{if(!i){r({success:!1,error:"No file specified"});return}let a=
|
|
50
|
-
`);for(let r of n){let a=r.match(/[:\*\]](\d{2,5})(?:\s|$)/g);if(a)for(let o of a){let c=parseInt(o.replace(/[:\*\]\s]/g,""),10);c>0&&c<=65535&&(c===80||c===443||c>=1024)&&e.add(c)}}return Array.from(e)}catch(t){return console.error("Failed to get listening ports:",t.message),[80,443,3e3,3001,4200,5e3,5173,8e3,8080,9e3]}}function
|
|
49
|
+
`)}`}}catch{}}}r({success:!0,diff:a})}catch(a){r({success:!1,error:a.message})}}),e.on("gitDiscard",({repoPath:t,file:i,status:n},r)=>{try{if(!i){r({success:!1,error:"No file specified"});return}let a=Se.default.join(t,i);n==="?"?S.default.existsSync(a)&&(S.default.statSync(a).isDirectory()?S.default.rmSync(a,{recursive:!0}):S.default.unlinkSync(a)):n==="A"?((0,_e.execSync)(`git reset HEAD -- "${i}"`,{cwd:t,encoding:"utf-8",stdio:["pipe","pipe","pipe"]}),S.default.existsSync(a)&&S.default.unlinkSync(a)):(0,_e.execSync)(`git checkout HEAD -- "${i}"`,{cwd:t,encoding:"utf-8",stdio:["pipe","pipe","pipe"]}),r({success:!0})}catch(a){r({success:!1,error:a.message})}})})}var au=null;function ou(){return au}async function cu(s){let e=new Hl(s,{cors:{origin:"*",methods:["GET","POST"],credentials:!0,allowedHeaders:["*"]},transports:["websocket","polling"],allowEIO3:!0,allowUpgrades:!0,pingTimeout:6e4,pingInterval:25e3});return await sp(),eu(e),np(e),ru(e),au=e,e}var lu=R(require("http"),1),pu=R(require("https"),1),uu=require("child_process"),du=require("util"),wv=(0,du.promisify)(uu.exec);async function _v(){let s=process.platform,e=new Set([80,443]);try{let t;if(s==="win32")t="netstat -ano | findstr LISTENING";else{let r="/dev/null";t=`lsof -iTCP -sTCP:LISTEN -P -n 2>${r} || netstat -tlnp 2>${r}`}let{stdout:i}=await wv(t),n=i.split(`
|
|
50
|
+
`);for(let r of n){let a=r.match(/[:\*\]](\d{2,5})(?:\s|$)/g);if(a)for(let o of a){let c=parseInt(o.replace(/[:\*\]\s]/g,""),10);c>0&&c<=65535&&(c===80||c===443||c>=1024)&&e.add(c)}}return Array.from(e)}catch(t){return console.error("Failed to get listening ports:",t.message),[80,443,3e3,3001,4200,5e3,5173,8e3,8080,9e3]}}function Sv(s,e=2e3){return new Promise(t=>{let i=lu.default.request({host:"localhost",port:s,method:"GET",path:"/",timeout:e},n=>{n.on("data",()=>{}),n.on("end",()=>{}),t({active:!0,protocol:"http",status:n.statusCode})});i.on("error",n=>{t({active:!1,error:n.message})}),i.on("timeout",()=>{i.destroy(),t({active:!1,error:"timeout"})}),i.end()})}function Ev(s,e=2e3){return new Promise(t=>{let i=pu.default.request({host:"localhost",port:s,method:"GET",path:"/",timeout:e,rejectUnauthorized:!1},n=>{n.on("data",()=>{}),n.on("end",()=>{}),t({active:!0,protocol:"https",status:n.statusCode})});i.on("error",n=>{t({active:!1,error:n.message})}),i.on("timeout",()=>{i.destroy(),t({active:!1,error:"timeout"})}),i.end()})}async function kv(s){let[e,t]=await Promise.all([Sv(s),Ev(s)]);return t.active?{port:s,...t}:e.active?{port:s,...e}:{port:s,active:!1}}async function fu(){let s=await _v();return(await Promise.all(s.map(t=>kv(t)))).filter(t=>t.active).map(t=>({port:t.port,protocol:t.protocol,url:`${t.protocol}://localhost:${t.port}`,name:`localhost:${t.port}`,status:t.status})).sort((t,i)=>t.port-i.port)}var mu=R(require("crypto"),1),Cv=process.env.API_KEY_SECRET||"9remote-api-key-secret";function Tv(s,e){return mu.default.createHmac("sha256",Cv).update(s+e).digest("hex").slice(0,8)}function Ov(s){if(!s||!s.startsWith("sk-"))return null;let e=s.split("-");if(e.length===4){let[,t,i,n]=e,r=Tv(t,i);return n!==r?null:{machineId:t,keyId:i}}return null}function hu(s){return Ov(s)!==null}async function gu(s,e){let t=s.headers.authorization;if(!t||!t.startsWith("Bearer ")){e.setHeader("Content-Type","application/json"),e.writeHead(401),e.end(JSON.stringify({error:"Unauthorized: Missing API key"}));return}let i=t.slice(7);if(!hu(i)){e.setHeader("Content-Type","application/json"),e.writeHead(401),e.end(JSON.stringify({error:"Unauthorized: Invalid API key"}));return}let n=await fu();e.setHeader("Content-Type","application/json"),e.writeHead(200),e.end(JSON.stringify(n))}function xu(s){s.setHeader("Access-Control-Allow-Origin","*"),s.setHeader("Access-Control-Allow-Methods","GET, POST, PUT, DELETE, OPTIONS"),s.setHeader("Access-Control-Allow-Headers","*"),s.setHeader("Access-Control-Allow-Credentials","true")}function vu(s,e){return s.method==="OPTIONS"?(e.writeHead(200),e.end(),!0):!1}var Gt=require("zlib"),ed=R(Xu(),1);var sb=["data:","javascript:","#","mailto:","blob:"],ib=["href","src","action","srcset","poster","data","formaction","data-src","data-href","data-url","data-background"];function Wi(s,e){return!s||sb.some(t=>s.startsWith(t))||s.startsWith("/proxy/")?s:s.startsWith(`http://localhost:${e}`)?s.replace(`http://localhost:${e}`,`/proxy/${e}`):s.startsWith("/")&&!s.startsWith("//")?`/proxy/${e}${s}`:s}function Ju(s,e){let t=`/proxy/${e}`,i=new RegExp(`(${ib.join("|")})=(["'])([^"']*?)\\2`,"gi");return s=s.replace(i,(n,r,a,o)=>{if(r.toLowerCase()==="srcset"){let c=o.split(",").map(l=>{let[p,...u]=l.trim().split(/\s+/),d=Wi(p,e);return u.length?`${d} ${u.join(" ")}`:d}).join(", ");return`${r}=${a}${c}${a}`}return`${r}=${a}${Wi(o,e)}${a}`}),s=s.replace(/url\(\s*(["']?)(\/_next\/[^)"']+)\1\s*\)/gi,(n,r,a)=>`url(${r}${t}${a}${r})`),s=s.replace(/"(\/_next\/[^"]+)"/g,(n,r)=>`"${t}${r}"`),s}function Qu(s){let e=`/proxy/${s}`;return`
|
|
51
51
|
// Service Worker for 9Remote Proxy - Port ${s}
|
|
52
52
|
const PROXY_BASE = '${e}';
|
|
53
53
|
const TARGET_PORT = ${s};
|
|
@@ -102,7 +102,7 @@ self.addEventListener('fetch', (event) => {
|
|
|
102
102
|
|
|
103
103
|
event.respondWith(fetch(new Request(newUrl, requestInit)));
|
|
104
104
|
});
|
|
105
|
-
`}function
|
|
105
|
+
`}function Zu(s){return`
|
|
106
106
|
<script data-proxy-injected="true">
|
|
107
107
|
(function() {
|
|
108
108
|
if (window.__proxySwRegistered) return;
|
|
@@ -144,7 +144,7 @@ self.addEventListener('fetch', (event) => {
|
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
146
|
})();
|
|
147
|
-
</script>`}var fa=new Set;function
|
|
147
|
+
</script>`}var fa=new Set;function td(s){fa.add(String(s))}function sd(s){fa.delete(String(s))}function nb(s){return fa.has(String(s))}function rb(s){switch(s){case"gzip":return(0,Gt.createGunzip)();case"deflate":return(0,Gt.createInflate)();case"br":return(0,Gt.createBrotliDecompress)();default:return null}}function ab(s,e){if(s.includes("<head>"))return s.replace("<head>","<head>"+e);if(s.includes("<HEAD>"))return s.replace("<HEAD>","<HEAD>"+e);let t=s.match(/<head[^>]*>/i);return t?s.replace(t[0],t[0]+e):e+s}function id(){let s=ed.default.createProxyServer({selfHandleResponse:!0});return s.on("proxyRes",(e,t,i)=>{let n=t._proxyTargetPort,r=e.headers["content-type"]||"",a=e.headers["content-encoding"]||"",o=r.includes("text/html"),c={...e.headers};if(c.location&&(c.location=Wi(c.location,n)),r.includes("application/json")||r.includes("text/x-component")){i.writeHead(e.statusCode,c),e.pipe(i);return}if(r.includes("javascript")||r.includes("text/javascript")){i.writeHead(e.statusCode,c),e.pipe(i);return}if(!o){i.writeHead(e.statusCode,c),e.pipe(i);return}delete c["content-length"],delete c["content-encoding"];let u=rb(a),d=u?e.pipe(u):e,h=[];d.on("data",m=>h.push(m)),d.on("error",m=>{console.error("[Proxy] Decompress error:",m.message),i.writeHead(502),i.end("Bad Gateway: Decompression failed")}),d.on("end",()=>{let m=Buffer.concat(h).toString("utf8");m=Ju(m,n);let f=Zu(n);m=ab(m,f),i.writeHead(e.statusCode,c),i.end(m)})}),s}function nd(s,e,t,i,n,r){if(n==="/sw.js"){let a=Qu(i);t.writeHead(200,{"Content-Type":"application/javascript; charset=utf-8","Service-Worker-Allowed":"/","Cache-Control":"no-store, no-cache, must-revalidate"}),t.end(a);return}if(!nb(i)){t.writeHead(401,{"Content-Type":"text/html"}),t.end(`
|
|
148
148
|
<!DOCTYPE html>
|
|
149
149
|
<html>
|
|
150
150
|
<head><title>Unauthorized</title></head>
|
|
@@ -155,7 +155,7 @@ self.addEventListener('fetch', (event) => {
|
|
|
155
155
|
</div>
|
|
156
156
|
</body>
|
|
157
157
|
</html>
|
|
158
|
-
`);return}e._proxyTargetPort=i,e.url=n+(r||""),s.web(e,t,{target:`http://localhost:${i}`,changeOrigin:!0},a=>{t.writeHead(502),t.end(`Bad Gateway: ${a.message}`)})}var
|
|
158
|
+
`);return}e._proxyTargetPort=i,e.url=n+(r||""),s.web(e,t,{target:`http://localhost:${i}`,changeOrigin:!0},a=>{t.writeHead(502),t.end(`Bad Gateway: ${a.message}`)})}var ld=R($r(),1),ob=ld.default.rgb(230,138,110);function cb(){return process.env.CODESPACES==="true"}async function lb(s,e){if(s.method!=="POST"){e.writeHead(405),e.end(JSON.stringify({error:"Method not allowed"}));return}if(!cb()){e.writeHead(400),e.end(JSON.stringify({error:"Not running on Codespaces"}));return}let t=process.env.CODESPACE_NAME;if(!t){e.writeHead(400),e.end(JSON.stringify({error:"Codespace name not found"}));return}let i=ou();i&&i.emit("codespace:stopping"),e.setHeader("Content-Type","application/json"),e.writeHead(200),e.end(JSON.stringify({success:!0,message:"Stopping codespace..."})),setTimeout(()=>{(0,cd.exec)(`gh codespace stop -c ${t}`,n=>{n&&console.error("Failed to stop codespace:",n)})},500)}var pb="localhost",rd=parseInt(process.env.PORT||"2208",10);async function pd(){await Zp();let s=id(),e=(0,ad.createServer)(async(t,i)=>{if(xu(i),!vu(t,i))try{let n=(0,od.parse)(t.url,!0),{pathname:r,search:a}=n;if(r==="/api/health"){i.setHeader("Content-Type","application/json"),i.writeHead(200),i.end(JSON.stringify({status:"ok",timestamp:Date.now()}));return}if(r==="/api/local-sites"){await gu(t,i);return}if(r==="/api/codespace/stop"){await lb(t,i);return}if(r==="/api/proxy/start"&&t.method==="POST"){let o="";t.on("data",c=>o+=c),t.on("end",()=>{let{port:c}=JSON.parse(o||"{}");c?(td(c),i.setHeader("Content-Type","application/json"),i.writeHead(200),i.end(JSON.stringify({success:!0}))):(i.writeHead(400),i.end(JSON.stringify({error:"Port required"})))});return}if(r==="/api/proxy/end"&&t.method==="POST"){let o="";t.on("data",c=>o+=c),t.on("end",()=>{let{port:c}=JSON.parse(o||"{}");c?(sd(c),i.setHeader("Content-Type","application/json"),i.writeHead(200),i.end(JSON.stringify({success:!0}))):(i.writeHead(400),i.end(JSON.stringify({error:"Port required"})))});return}if(r.startsWith("/proxy/")){let o=r.match(/^\/proxy\/(\d+)(\/.*)?$/);if(o){nd(s,t,i,o[1],o[2]||"/",a);return}}i.writeHead(404),i.end(JSON.stringify({error:"Not found"}))}catch(n){console.error("Error:",t.url,n),i.statusCode=500,i.end("Internal server error")}});await cu(e),e.listen(rd,t=>{if(t)throw t;console.log(ob(`\u2705 Server ready on http://${pb}:${rd}`))})}pd();0&&(module.exports={startServer});
|
|
159
159
|
/*! Bundled license information:
|
|
160
160
|
|
|
161
161
|
negotiator/index.js:
|