@loaders.gl/tile-converter 4.2.0-alpha.5 → 4.2.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/3d-tiles-converter/3d-tiles-converter.d.ts +1 -1
  2. package/dist/3d-tiles-converter/3d-tiles-converter.d.ts.map +1 -1
  3. package/dist/3d-tiles-converter/3d-tiles-converter.js +42 -22
  4. package/dist/3d-tiles-converter/helpers/b3dm-converter.d.ts.map +1 -1
  5. package/dist/3d-tiles-converter/helpers/b3dm-converter.js +4 -0
  6. package/dist/3d-tiles-converter/helpers/load-i3s.d.ts.map +1 -1
  7. package/dist/3d-tiles-converter/helpers/load-i3s.js +3 -28
  8. package/dist/converter-cli.js +4 -2
  9. package/dist/converter.min.cjs +95 -95
  10. package/dist/deps-installer/deps-installer.d.ts.map +1 -1
  11. package/dist/deps-installer/deps-installer.js +6 -1
  12. package/dist/i3s-converter/helpers/attribute-metadata-info.js +4 -1
  13. package/dist/i3s-converter/helpers/batch-ids-extensions.d.ts.map +1 -1
  14. package/dist/i3s-converter/helpers/batch-ids-extensions.js +2 -1
  15. package/dist/i3s-converter/helpers/coordinate-converter.js +2 -2
  16. package/dist/i3s-converter/helpers/feature-attributes.d.ts.map +1 -1
  17. package/dist/i3s-converter/helpers/feature-attributes.js +4 -2
  18. package/dist/i3s-converter/helpers/geometry-attributes.js +6 -5
  19. package/dist/i3s-converter/helpers/geometry-converter.d.ts +15 -1
  20. package/dist/i3s-converter/helpers/geometry-converter.d.ts.map +1 -1
  21. package/dist/i3s-converter/helpers/geometry-converter.js +52 -12
  22. package/dist/i3s-converter/helpers/gltf-attributes.d.ts.map +1 -1
  23. package/dist/i3s-converter/helpers/gltf-attributes.js +12 -14
  24. package/dist/i3s-converter/helpers/node-index-document.d.ts +8 -1
  25. package/dist/i3s-converter/helpers/node-index-document.d.ts.map +1 -1
  26. package/dist/i3s-converter/helpers/node-index-document.js +18 -11
  27. package/dist/i3s-converter/helpers/node-pages.d.ts.map +1 -1
  28. package/dist/i3s-converter/helpers/node-pages.js +27 -26
  29. package/dist/i3s-converter/helpers/preprocess-3d-tiles.d.ts.map +1 -1
  30. package/dist/i3s-converter/helpers/progress.d.ts.map +1 -1
  31. package/dist/i3s-converter/helpers/progress.js +23 -18
  32. package/dist/i3s-converter/helpers/tileset-traversal.d.ts +8 -1
  33. package/dist/i3s-converter/helpers/tileset-traversal.d.ts.map +1 -1
  34. package/dist/i3s-converter/helpers/tileset-traversal.js +12 -3
  35. package/dist/i3s-converter/i3s-converter.d.ts.map +1 -1
  36. package/dist/i3s-converter/i3s-converter.js +190 -66
  37. package/dist/i3s-converter/json-templates/node.js +1 -1
  38. package/dist/i3s-server/bin/i3s-server.min.cjs +69 -69
  39. package/dist/i3s-server/bin/www.js +6 -4
  40. package/dist/i3s-server/controllers/slpk-controller.d.ts.map +1 -1
  41. package/dist/i3s-server/controllers/slpk-controller.js +3 -1
  42. package/dist/i3s-server/routes/index.js +11 -8
  43. package/dist/i3s-server/routes/slpk-router.d.ts.map +1 -1
  44. package/dist/i3s-server/routes/slpk-router.js +24 -18
  45. package/dist/i3s-server/utils/server-utils.d.ts.map +1 -1
  46. package/dist/i3s-server/utils/server-utils.js +8 -5
  47. package/dist/index.cjs +419 -211
  48. package/dist/index.cjs.map +3 -3
  49. package/dist/lib/utils/cli-utils.d.ts.map +1 -1
  50. package/dist/lib/utils/cli-utils.js +2 -0
  51. package/dist/lib/utils/conversion-dump.d.ts +9 -1
  52. package/dist/lib/utils/conversion-dump.d.ts.map +1 -1
  53. package/dist/lib/utils/conversion-dump.js +44 -21
  54. package/dist/lib/utils/file-utils.d.ts +1 -1
  55. package/dist/lib/utils/file-utils.d.ts.map +1 -1
  56. package/dist/lib/utils/file-utils.js +10 -12
  57. package/dist/lib/utils/statistic-utills.d.ts.map +1 -1
  58. package/dist/lib/utils/statistic-utills.js +5 -7
  59. package/dist/lib/utils/write-queue.d.ts.map +1 -1
  60. package/dist/lib/utils/write-queue.js +7 -3
  61. package/dist/pgm-loader.js +1 -1
  62. package/dist/slpk-extractor/slpk-extractor.d.ts.map +1 -1
  63. package/dist/slpk-extractor/slpk-extractor.js +2 -1
  64. package/dist/slpk-extractor-cli.d.ts.map +1 -1
  65. package/dist/slpk-extractor-cli.js +16 -8
  66. package/dist/slpk-extractor.min.cjs +1 -1
  67. package/package.json +23 -22
  68. package/src/3d-tiles-converter/3d-tiles-converter.ts +21 -10
  69. package/src/3d-tiles-converter/helpers/b3dm-converter.ts +1 -0
  70. package/src/3d-tiles-converter/helpers/load-i3s.ts +3 -27
  71. package/src/converter-cli.ts +4 -2
  72. package/src/deps-installer/deps-installer.ts +7 -0
  73. package/src/i3s-converter/helpers/attribute-metadata-info.ts +1 -1
  74. package/src/i3s-converter/helpers/batch-ids-extensions.ts +3 -1
  75. package/src/i3s-converter/helpers/coordinate-converter.ts +2 -2
  76. package/src/i3s-converter/helpers/feature-attributes.ts +5 -2
  77. package/src/i3s-converter/helpers/geometry-attributes.ts +6 -5
  78. package/src/i3s-converter/helpers/geometry-converter.ts +118 -72
  79. package/src/i3s-converter/helpers/gltf-attributes.ts +12 -13
  80. package/src/i3s-converter/helpers/node-index-document.ts +18 -10
  81. package/src/i3s-converter/helpers/node-pages.ts +27 -29
  82. package/src/i3s-converter/helpers/preprocess-3d-tiles.ts +1 -0
  83. package/src/i3s-converter/helpers/progress.ts +1 -0
  84. package/src/i3s-converter/helpers/tileset-traversal.ts +22 -13
  85. package/src/i3s-converter/i3s-converter.ts +173 -114
  86. package/src/i3s-converter/json-templates/node.ts +1 -1
  87. package/src/i3s-server/bin/www.ts +6 -4
  88. package/src/i3s-server/controllers/slpk-controller.ts +4 -2
  89. package/src/i3s-server/routes/index.ts +10 -7
  90. package/src/i3s-server/routes/slpk-router.ts +22 -16
  91. package/src/i3s-server/utils/server-utils.ts +6 -4
  92. package/src/lib/utils/cli-utils.ts +2 -0
  93. package/src/lib/utils/conversion-dump.ts +35 -20
  94. package/src/lib/utils/file-utils.ts +11 -11
  95. package/src/lib/utils/statistic-utills.ts +5 -6
  96. package/src/lib/utils/write-queue.ts +2 -2
  97. package/src/slpk-extractor/slpk-extractor.ts +2 -1
  98. package/src/slpk-extractor-cli.ts +16 -8
  99. package/src/lib/utils/statistic-utills.d.ts +0 -25
@@ -91,7 +91,7 @@ caused by: `+Vr.fullStack(r):e.stack};Vr.errorFromList=function(e){return Na.arr
91
91
  `,t(o),t(n.body),t(`\r
92
92
  `)}),t("--"+a.boundary+"--"),a.request.postambleCRLF&&t(`\r
93
93
  `),i};_c.prototype.onRequest=function(e){var r=this,a=r.isChunked(e),i=e.data||e;r.setHeaders(a),r.chunked=a,r.body=r.build(i,a)};J8.Multipart=_c});var t5=O(a5=>{"use strict";var r5=require("url"),VL=/^https?:/;function fp(e){this.request=e,this.followRedirect=!0,this.followRedirects=!0,this.followAllRedirects=!1,this.followOriginalHttpMethod=!1,this.allowRedirect=function(){return!0},this.maxRedirects=10,this.redirects=[],this.redirectsFollowed=0,this.removeRefererHeader=!1}fp.prototype.onRequest=function(e){var r=this;e.maxRedirects!==void 0&&(r.maxRedirects=e.maxRedirects),typeof e.followRedirect=="function"&&(r.allowRedirect=e.followRedirect),e.followRedirect!==void 0&&(r.followRedirects=!!e.followRedirect),e.followAllRedirects!==void 0&&(r.followAllRedirects=e.followAllRedirects),(r.followRedirects||r.followAllRedirects)&&(r.redirects=r.redirects||[]),e.removeRefererHeader!==void 0&&(r.removeRefererHeader=e.removeRefererHeader),e.followOriginalHttpMethod!==void 0&&(r.followOriginalHttpMethod=e.followOriginalHttpMethod)};fp.prototype.redirectTo=function(e){var r=this,a=r.request,i=null;if(e.statusCode>=300&&e.statusCode<400&&e.caseless.has("location")){var t=e.caseless.get("location");if(a.debug("redirect",t),r.followAllRedirects)i=t;else if(r.followRedirects)switch(a.method){case"PATCH":case"PUT":case"POST":case"DELETE":break;default:i=t;break}}else if(e.statusCode===401){var n=a._auth.onResponse(e);n&&(a.setHeader("authorization",n),i=a.uri)}return i};fp.prototype.onResponse=function(e){var r=this,a=r.request,i=r.redirectTo(e);if(!i||!r.allowRedirect.call(a,e))return!1;if(a.debug("redirect to",i),e.resume&&e.resume(),r.redirectsFollowed>=r.maxRedirects)return a.emit("error",new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+a.uri.href)),!1;r.redirectsFollowed+=1,VL.test(i)||(i=r5.resolve(a.uri.href,i));var t=a.uri;return a.uri=r5.parse(i),a.uri.protocol!==t.protocol&&delete a.agent,r.redirects.push({statusCode:e.statusCode,redirectUri:i}),r.followAllRedirects&&a.method!=="HEAD"&&e.statusCode!==401&&e.statusCode!==307&&(a.method=r.followOriginalHttpMethod?a.method:"GET"),delete a.src,delete a.req,delete a._started,e.statusCode!==401&&e.statusCode!==307&&(delete a.body,delete a._form,a.headers&&(a.removeHeader("host"),a.removeHeader("content-type"),a.removeHeader("content-length"),a.uri.hostname!==a.originalHost.split(":")[0]&&a.removeHeader("authorization"))),r.removeRefererHeader||a.setHeader("referer",t.href),a.emit("redirect"),a.init(),!0};a5.Redirect=fp});var s5=O(au=>{"use strict";var xY=require("net"),$L=require("tls"),h0=require("http"),i5=require("https"),WL=require("events"),KL=require("assert"),GL=require("util"),YL=Es().Buffer;au.httpOverHttp=ZL;au.httpsOverHttp=QL;au.httpOverHttps=XL;au.httpsOverHttps=JL;function ZL(e){var r=new on(e);return r.request=h0.request,r}function QL(e){var r=new on(e);return r.request=h0.request,r.createSocket=n5,r.defaultPort=443,r}function XL(e){var r=new on(e);return r.request=i5.request,r}function JL(e){var r=new on(e);return r.request=i5.request,r.createSocket=n5,r.defaultPort=443,r}function on(e){var r=this;r.options=e||{},r.proxyOptions=r.options.proxy||{},r.maxSockets=r.options.maxSockets||h0.Agent.defaultMaxSockets,r.requests=[],r.sockets=[],r.on("free",function(i,t,n){for(var o=0,s=r.requests.length;o<s;++o){var c=r.requests[o];if(c.host===t&&c.port===n){r.requests.splice(o,1),c.request.onSocket(i);return}}i.destroy(),r.removeSocket(i)})}GL.inherits(on,WL.EventEmitter);on.prototype.addRequest=function(r,a){var i=this;if(typeof a=="string"&&(a={host:a,port:arguments[2],path:arguments[3]}),i.sockets.length>=this.maxSockets){i.requests.push({host:a.host,port:a.port,request:r});return}i.createConnection({host:a.host,port:a.port,request:r})};on.prototype.createConnection=function(r){var a=this;a.createSocket(r,function(i){i.on("free",t),i.on("close",n),i.on("agentRemove",n),r.request.onSocket(i);function t(){a.emit("free",i,r.host,r.port)}function n(o){a.removeSocket(i),i.removeListener("free",t),i.removeListener("close",n),i.removeListener("agentRemove",n)}})};on.prototype.createSocket=function(r,a){var i=this,t={};i.sockets.push(t);var n=o5({},i.proxyOptions,{method:"CONNECT",path:r.host+":"+r.port,agent:!1});n.proxyAuth&&(n.headers=n.headers||{},n.headers["Proxy-Authorization"]="Basic "+YL.from(n.proxyAuth).toString("base64")),Yo("making CONNECT request");var o=i.request(n);o.useChunkedEncodingByDefault=!1,o.once("response",s),o.once("upgrade",c),o.once("connect",l),o.once("error",f),o.end();function s(v){v.upgrade=!0}function c(v,h,d){process.nextTick(function(){l(v,h,d)})}function l(v,h,d){if(o.removeAllListeners(),h.removeAllListeners(),v.statusCode===200)KL.equal(d.length,0),Yo("tunneling connection has established"),i.sockets[i.sockets.indexOf(t)]=h,a(h);else{Yo("tunneling socket could not be established, statusCode=%d",v.statusCode);var y=new Error("tunneling socket could not be established, statusCode="+v.statusCode);y.code="ECONNRESET",r.request.emit("error",y),i.removeSocket(t)}}function f(v){o.removeAllListeners(),Yo(`tunneling socket could not be established, cause=%s
94
- `,v.message,v.stack);var h=new Error("tunneling socket could not be established, cause="+v.message);h.code="ECONNRESET",r.request.emit("error",h),i.removeSocket(t)}};on.prototype.removeSocket=function(r){var a=this.sockets.indexOf(r);if(a!==-1){this.sockets.splice(a,1);var i=this.requests.shift();i&&this.createConnection(i)}};function n5(e,r){var a=this;on.prototype.createSocket.call(a,e,function(i){var t=$L.connect(0,o5({},a.options,{servername:e.host,socket:i}));a.sockets[a.sockets.indexOf(i)]=t,r(t)})}function o5(e){for(var r=1,a=arguments.length;r<a;++r){var i=arguments[r];if(typeof i=="object")for(var t=Object.keys(i),n=0,o=t.length;n<o;++n){var s=t[n];i[s]!==void 0&&(e[s]=i[s])}}return e}var Yo;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Yo=function(){var e=Array.prototype.slice.call(arguments);typeof e[0]=="string"?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:Yo=function(){};au.debug=Yo});var f5=O(l5=>{"use strict";var eN=require("url"),rN=s5(),u5=["accept","accept-charset","accept-encoding","accept-language","accept-ranges","cache-control","content-encoding","content-language","content-location","content-md5","content-range","content-type","connection","date","expect","max-forwards","pragma","referer","te","user-agent","via"],c5=["proxy-authorization"];function aN(e){var r=e.port,a=e.protocol,i=e.hostname+":";return r?i+=r:a==="https:"?i+="443":i+="80",i}function tN(e,r){var a=r.reduce(function(i,t){return i[t.toLowerCase()]=!0,i},{});return Object.keys(e).filter(function(i){return a[i.toLowerCase()]}).reduce(function(i,t){return i[t]=e[t],i},{})}function iN(e,r){var a=e.proxy,i={proxy:{host:a.hostname,port:+a.port,proxyAuth:a.auth,headers:r},headers:e.headers,ca:e.ca,cert:e.cert,key:e.key,passphrase:e.passphrase,pfx:e.pfx,ciphers:e.ciphers,rejectUnauthorized:e.rejectUnauthorized,secureOptions:e.secureOptions,secureProtocol:e.secureProtocol};return i}function nN(e,r){var a=e.protocol==="https:"?"https":"http",i=r.protocol==="https:"?"Https":"Http";return[a,i].join("Over")}function oN(e){var r=e.uri,a=e.proxy,i=nN(r,a);return rN[i]}function jc(e){this.request=e,this.proxyHeaderWhiteList=u5,this.proxyHeaderExclusiveList=[],typeof e.tunnel<"u"&&(this.tunnelOverride=e.tunnel)}jc.prototype.isEnabled=function(){var e=this,r=e.request;return typeof e.tunnelOverride<"u"?e.tunnelOverride:r.uri.protocol==="https:"};jc.prototype.setup=function(e){var r=this,a=r.request;if(e=e||{},typeof a.proxy=="string"&&(a.proxy=eN.parse(a.proxy)),!a.proxy||!a.tunnel)return!1;e.proxyHeaderWhiteList&&(r.proxyHeaderWhiteList=e.proxyHeaderWhiteList),e.proxyHeaderExclusiveList&&(r.proxyHeaderExclusiveList=e.proxyHeaderExclusiveList);var i=r.proxyHeaderExclusiveList.concat(c5),t=r.proxyHeaderWhiteList.concat(i),n=tN(a.headers,t);n.host=aN(a.uri),i.forEach(a.removeHeader,a);var o=oN(a),s=iN(a,n);return a.agent=o(s),!0};jc.defaultProxyHeaderWhiteList=u5;jc.defaultProxyHeaderExclusiveList=c5;l5.Tunnel=jc});var h5=O((p5,Sc)=>{(function(){var e,r,a,i,t,n;typeof performance<"u"&&performance!==null&&performance.now?Sc.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Sc.exports=function(){return(e()-t)/1e6},r=process.hrtime,e=function(){var o;return o=r(),o[0]*1e9+o[1]},i=e(),n=process.uptime()*1e9,t=i-n):Date.now?(Sc.exports=function(){return Date.now()-a},a=Date.now()):(Sc.exports=function(){return new Date().getTime()-a},a=new Date().getTime())}).call(p5)});var j5=O((_Y,_5)=>{"use strict";var sN=require("http"),g5=require("https"),Ec=require("url"),m0=require("util"),hp=require("stream"),pp=require("zlib"),d0=Jw(),uN=c2(),cN=J_(),lN=Df(),b5=Lf(),d5=u3(),fN=O3(),pN=Ol(),m5=Cv(),hN=M3().strict,iu=Ul(),dN=Md(),mN=$3(),vN=tj().Querystring,gN=C8().Har,bN=N8().Auth,yN=Q8().OAuth,xN=X8(),wN=e5().Multipart,kN=t5().Redirect,v0=f5().Tunnel,tu=h5(),Ac=Es().Buffer,v5=iu.safeStringify,_N=iu.isReadStream,jN=iu.toBase64,SN=iu.defer,y5=iu.copy,EN=iu.version,x5=dN.jar(),w5={};function AN(e,r){var a={};for(var i in r){var t=e.indexOf(i)===-1;t&&(a[i]=r[i])}return a}function PN(e,r){var a={};for(var i in r){var t=e.indexOf(i)!==-1,n=typeof r[i]=="function";t&&n||(a[i]=r[i])}return a}function k5(){var e=this;return{uri:e.uri,method:e.method,headers:e.headers}}function TN(){var e=this;return{statusCode:e.statusCode,body:e.body,headers:e.headers,request:k5.call(e.request)}}function Rr(e){var r=this;e.har&&(r._har=new gN(r),e=r._har.options(e)),hp.Stream.call(r);var a=Object.keys(Rr.prototype),i=AN(a,e);pN(r,i),e=PN(a,e),r.readable=!0,r.writable=!0,e.method&&(r.explicitMethod=!0),r._qs=new vN(r),r._auth=new bN(r),r._oauth=new yN(r),r._multipart=new wN(r),r._redirect=new kN(r),r._tunnel=new v0(r),r.init(e)}m0.inherits(Rr,hp.Stream);Rr.debug=process.env.NODE_DEBUG&&/\brequest\b/.test(process.env.NODE_DEBUG);function ot(){Rr.debug&&console.error("REQUEST %s",m0.format.apply(m0,arguments))}Rr.prototype.debug=ot;Rr.prototype.init=function(e){var r=this;e||(e={}),r.headers=r.headers?y5(r.headers):{};for(var a in r.headers)typeof r.headers[a]>"u"&&delete r.headers[a];if(b5.httpify(r,r.headers),r.method||(r.method=e.method||"GET"),r.localAddress||(r.localAddress=e.localAddress),r._qs.init(e),ot(e),!r.pool&&r.pool!==!1&&(r.pool=w5),r.dests=r.dests||[],r.__isRequestRequest=!0,!r._callback&&r.callback&&(r._callback=r.callback,r.callback=function(){r._callbackCalled||(r._callbackCalled=!0,r._callback.apply(r,arguments))},r.on("error",r.callback.bind()),r.on("complete",r.callback.bind(r,null))),!r.uri&&r.url&&(r.uri=r.url,delete r.url),r.baseUrl){if(typeof r.baseUrl!="string")return r.emit("error",new Error("options.baseUrl must be a string"));if(typeof r.uri!="string")return r.emit("error",new Error("options.uri must be a string when using options.baseUrl"));if(r.uri.indexOf("//")===0||r.uri.indexOf("://")!==-1)return r.emit("error",new Error("options.uri must be a path when using options.baseUrl"));var i=r.baseUrl.lastIndexOf("/")===r.baseUrl.length-1,t=r.uri.indexOf("/")===0;i&&t?r.uri=r.baseUrl+r.uri.slice(1):i||t?r.uri=r.baseUrl+r.uri:r.uri===""?r.uri=r.baseUrl:r.uri=r.baseUrl+"/"+r.uri,delete r.baseUrl}if(!r.uri)return r.emit("error",new Error("options.uri is a required argument"));if(typeof r.uri=="string"&&(r.uri=Ec.parse(r.uri)),r.uri.href||(r.uri.href=Ec.format(r.uri)),r.uri.protocol==="unix:")return r.emit("error",new Error("`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`"));if(r.uri.host==="unix"&&r.enableUnixSocket(),r.strictSSL===!1&&(r.rejectUnauthorized=!1),r.uri.pathname||(r.uri.pathname="/"),!(r.uri.host||r.uri.hostname&&r.uri.port)&&!r.uri.isUnix){var n=Ec.format(r.uri),o='Invalid URI "'+n+'"';return Object.keys(e).length===0&&(o+=". This can be caused by a crappy redirection."),r.abort(),r.emit("error",new Error(o))}if(r.hasOwnProperty("proxy")||(r.proxy=mN(r.uri)),r.tunnel=r._tunnel.isEnabled(),r.proxy&&r._tunnel.setup(e),r._redirect.onRequest(e),r.setHost=!1,!r.hasHeader("host")){var s=r.originalHostHeaderName||"host";r.setHeader(s,r.uri.host),r.uri.port&&(r.uri.port==="80"&&r.uri.protocol==="http:"||r.uri.port==="443"&&r.uri.protocol==="https:")&&r.setHeader(s,r.uri.hostname),r.setHost=!0}if(r.jar(r._jar||e.jar),r.uri.port||(r.uri.protocol==="http:"?r.uri.port=80:r.uri.protocol==="https:"&&(r.uri.port=443)),r.proxy&&!r.tunnel?(r.port=r.proxy.port,r.host=r.proxy.hostname):(r.port=r.uri.port,r.host=r.uri.hostname),e.form&&r.form(e.form),e.formData){var c=e.formData,l=r.form(),f=function(I,z){z&&z.hasOwnProperty("value")&&z.hasOwnProperty("options")?l.append(I,z.value,z.options):l.append(I,z)};for(var v in c)if(c.hasOwnProperty(v)){var h=c[v];if(h instanceof Array)for(var d=0;d<h.length;d++)f(v,h[d]);else f(v,h)}}if(e.qs&&r.qs(e.qs),r.uri.path?r.path=r.uri.path:r.path=r.uri.pathname+(r.uri.search||""),r.path.length===0&&(r.path="/"),e.aws&&r.aws(e.aws),e.hawk&&r.hawk(e.hawk),e.httpSignature&&r.httpSignature(e.httpSignature),e.auth&&(Object.prototype.hasOwnProperty.call(e.auth,"username")&&(e.auth.user=e.auth.username),Object.prototype.hasOwnProperty.call(e.auth,"password")&&(e.auth.pass=e.auth.password),r.auth(e.auth.user,e.auth.pass,e.auth.sendImmediately,e.auth.bearer)),r.gzip&&!r.hasHeader("accept-encoding")&&r.setHeader("accept-encoding","gzip, deflate"),r.uri.auth&&!r.hasHeader("authorization")){var y=r.uri.auth.split(":").map(function(I){return r._qs.unescape(I)});r.auth(y[0],y.slice(1).join(":"),!0)}if(!r.tunnel&&r.proxy&&r.proxy.auth&&!r.hasHeader("proxy-authorization")){var _=r.proxy.auth.split(":").map(function(I){return r._qs.unescape(I)}),w="Basic "+jN(_.join(":"));r.setHeader("proxy-authorization",w)}r.proxy&&!r.tunnel&&(r.path=r.uri.protocol+"//"+r.uri.host+r.path),e.json&&r.json(e.json),e.multipart&&r.multipart(e.multipart),e.time&&(r.timing=!0,r.elapsedTime=r.elapsedTime||0);function A(){if(hN(r.body)&&(r.body=Ac.from(r.body)),!r.hasHeader("content-length")){var I;typeof r.body=="string"?I=Ac.byteLength(r.body):Array.isArray(r.body)?I=r.body.reduce(function(z,N){return z+N.length},0):I=r.body.length,I?r.setHeader("content-length",I):r.emit("error",new Error("Argument error, options.body."))}}r.body&&!m5(r.body)&&A(),e.oauth?r.oauth(e.oauth):r._oauth.params&&r.hasHeader("authorization")&&r.oauth(r._oauth.params);var T=r.proxy&&!r.tunnel?r.proxy.protocol:r.uri.protocol,P={"http:":sN,"https:":g5},R=r.httpModules||{};if(r.httpModule=R[T]||P[T],!r.httpModule)return r.emit("error",new Error("Invalid protocol: "+T));if(e.ca&&(r.ca=e.ca),!r.agent)if(e.agentOptions&&(r.agentOptions=e.agentOptions),e.agentClass)r.agentClass=e.agentClass;else if(e.forever){var F=EN();F.major===0&&F.minor<=10?r.agentClass=T==="http:"?d5:d5.SSL:(r.agentClass=r.httpModule.Agent,r.agentOptions=r.agentOptions||{},r.agentOptions.keepAlive=!0)}else r.agentClass=r.httpModule.Agent;r.pool===!1?r.agent=!1:r.agent=r.agent||r.getNewAgent(),r.on("pipe",function(I){if(r.ntick&&r._started&&r.emit("error",new Error("You cannot pipe to this stream after the outbound request has started.")),r.src=I,_N(I))r.hasHeader("content-type")||r.setHeader("content-type",lN.lookup(I.path));else{if(I.headers)for(var z in I.headers)r.hasHeader(z)||r.setHeader(z,I.headers[z]);r._json&&!r.hasHeader("content-type")&&r.setHeader("content-type","application/json"),I.method&&!r.explicitMethod&&(r.method=I.method)}}),SN(function(){if(!r._aborted){var I=function(){if(r._form&&(r._auth.hasAuth?r._auth.hasAuth&&r._auth.sentAuth&&r._form.pipe(r):r._form.pipe(r)),r._multipart&&r._multipart.chunked&&r._multipart.body.pipe(r),r.body)m5(r.body)?r.body.pipe(r):(A(),Array.isArray(r.body)?r.body.forEach(function(z){r.write(z)}):r.write(r.body),r.end());else if(r.requestBodyStream)console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe."),r.requestBodyStream.pipe(r);else if(!r.src){if(r._auth.hasAuth&&!r._auth.sentAuth){r.end();return}r.method!=="GET"&&typeof r.method<"u"&&r.setHeader("content-length",0),r.end()}};r._form&&!r.hasHeader("content-length")?(r.setHeader(r._form.getHeaders(),!0),r._form.getLength(function(z,N){!z&&!isNaN(N)&&r.setHeader("content-length",N),I()})):I(),r.ntick=!0}})};Rr.prototype.getNewAgent=function(){var e=this,r=e.agentClass,a={};if(e.agentOptions)for(var i in e.agentOptions)a[i]=e.agentOptions[i];e.ca&&(a.ca=e.ca),e.ciphers&&(a.ciphers=e.ciphers),e.secureProtocol&&(a.secureProtocol=e.secureProtocol),e.secureOptions&&(a.secureOptions=e.secureOptions),typeof e.rejectUnauthorized<"u"&&(a.rejectUnauthorized=e.rejectUnauthorized),e.cert&&e.key&&(a.key=e.key,a.cert=e.cert),e.pfx&&(a.pfx=e.pfx),e.passphrase&&(a.passphrase=e.passphrase);var t="";r!==e.httpModule.Agent&&(t+=r.name);var n=e.proxy;typeof n=="string"&&(n=Ec.parse(n));var o=n&&n.protocol==="https:"||this.uri.protocol==="https:";return o&&(a.ca&&(t&&(t+=":"),t+=a.ca),typeof a.rejectUnauthorized<"u"&&(t&&(t+=":"),t+=a.rejectUnauthorized),a.cert&&(t&&(t+=":"),t+=a.cert.toString("ascii")+a.key.toString("ascii")),a.pfx&&(t&&(t+=":"),t+=a.pfx.toString("ascii")),a.ciphers&&(t&&(t+=":"),t+=a.ciphers),a.secureProtocol&&(t&&(t+=":"),t+=a.secureProtocol),a.secureOptions&&(t&&(t+=":"),t+=a.secureOptions)),e.pool===w5&&!t&&Object.keys(a).length===0&&e.httpModule.globalAgent?e.httpModule.globalAgent:(t=e.uri.protocol+t,e.pool[t]||(e.pool[t]=new r(a),e.pool.maxSockets&&(e.pool[t].maxSockets=e.pool.maxSockets)),e.pool[t])};Rr.prototype.start=function(){var e=this;if(e.timing)var r=new Date().getTime(),a=tu();if(!e._aborted){e._started=!0,e.method=e.method||"GET",e.href=e.uri.href,e.src&&e.src.stat&&e.src.stat.size&&!e.hasHeader("content-length")&&e.setHeader("content-length",e.src.stat.size),e._aws&&e.aws(e._aws,!0);var i=y5(e);delete i.auth,ot("make request",e.uri.href),delete i.timeout;try{e.req=e.httpModule.request(i)}catch(n){e.emit("error",n);return}e.timing&&(e.startTime=r,e.startTimeNow=a,e.timings={});var t;e.timeout&&!e.timeoutTimer&&(e.timeout<0?t=0:typeof e.timeout=="number"&&isFinite(e.timeout)&&(t=e.timeout)),e.req.on("response",e.onRequestResponse.bind(e)),e.req.on("error",e.onRequestError.bind(e)),e.req.on("drain",function(){e.emit("drain")}),e.req.on("socket",function(n){var o=n._connecting||n.connecting;if(e.timing&&(e.timings.socket=tu()-e.startTimeNow,o)){var s=function(){e.timings.lookup=tu()-e.startTimeNow},c=function(){e.timings.connect=tu()-e.startTimeNow};n.once("lookup",s),n.once("connect",c),e.req.once("error",function(){n.removeListener("lookup",s),n.removeListener("connect",c)})}var l=function(){e.req.setTimeout(t,function(){if(e.req){e.abort();var v=new Error("ESOCKETTIMEDOUT");v.code="ESOCKETTIMEDOUT",v.connect=!1,e.emit("error",v)}})};if(t!==void 0)if(o){var f=function(){n.removeListener("connect",f),e.clearTimeout(),l()};n.on("connect",f),e.req.on("error",function(v){n.removeListener("connect",f)}),e.timeoutTimer=setTimeout(function(){n.removeListener("connect",f),e.abort();var v=new Error("ETIMEDOUT");v.code="ETIMEDOUT",v.connect=!0,e.emit("error",v)},t)}else l();e.emit("socket",n)}),e.emit("request",e.req)}};Rr.prototype.onRequestError=function(e){var r=this;if(!r._aborted){if(r.req&&r.req._reusedSocket&&e.code==="ECONNRESET"&&r.agent.addRequestNoreuse){r.agent={addRequest:r.agent.addRequestNoreuse.bind(r.agent)},r.start(),r.req.end();return}r.clearTimeout(),r.emit("error",e)}};Rr.prototype.onRequestResponse=function(e){var r=this;if(r.timing&&(r.timings.response=tu()-r.startTimeNow),ot("onRequestResponse",r.uri.href,e.statusCode,e.headers),e.on("end",function(){r.timing&&(r.timings.end=tu()-r.startTimeNow,e.timingStart=r.startTime,r.timings.socket||(r.timings.socket=0),r.timings.lookup||(r.timings.lookup=r.timings.socket),r.timings.connect||(r.timings.connect=r.timings.lookup),r.timings.response||(r.timings.response=r.timings.connect),ot("elapsed time",r.timings.end),r.elapsedTime+=Math.round(r.timings.end),e.elapsedTime=r.elapsedTime,e.timings=r.timings,e.timingPhases={wait:r.timings.socket,dns:r.timings.lookup-r.timings.socket,tcp:r.timings.connect-r.timings.lookup,firstByte:r.timings.response-r.timings.connect,download:r.timings.end-r.timings.response,total:r.timings.end}),ot("response end",r.uri.href,e.statusCode,e.headers)}),r._aborted){ot("aborted",r.uri.href),e.resume();return}if(r.response=e,e.request=r,e.toJSON=TN,r.httpModule===g5&&r.strictSSL&&(!e.hasOwnProperty("socket")||!e.socket.authorized)){ot("strict ssl error",r.uri.href);var a=e.hasOwnProperty("socket")?e.socket.authorizationError:r.uri.href+" does not support SSL";r.emit("error",new Error("SSL Error: "+a));return}r.originalHost=r.getHeader("host"),r.originalHostHeaderName||(r.originalHostHeaderName=r.hasHeader("host")),r.setHost&&r.removeHeader("host"),r.clearTimeout();var i=r._jar&&r._jar.setCookie?r._jar:x5,t=function(f){try{i.setCookie(f,r.uri.href,{ignoreError:!0})}catch(v){r.emit("error",v)}};if(e.caseless=b5(e.headers),e.caseless.has("set-cookie")&&!r._disableCookies){var n=e.caseless.has("set-cookie");Array.isArray(e.headers[n])?e.headers[n].forEach(t):t(e.headers[n])}if(!r._redirect.onResponse(e)){{e.on("close",function(){r._ended||r.response.emit("end")}),e.once("end",function(){r._ended=!0});var o=function(f){return r.method==="HEAD"||f>=100&&f<200||f===204||f===304},s;if(r.gzip&&!o(e.statusCode)){var c=e.headers["content-encoding"]||"identity";c=c.trim().toLowerCase();var l={flush:pp.Z_SYNC_FLUSH,finishFlush:pp.Z_SYNC_FLUSH};c==="gzip"?(s=pp.createGunzip(l),e.pipe(s)):c==="deflate"?(s=pp.createInflate(l),e.pipe(s)):(c!=="identity"&&ot("ignoring unrecognized Content-Encoding "+c),s=e)}else s=e;r.encoding&&(r.dests.length!==0?console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid."):s.setEncoding(r.encoding)),r._paused&&s.pause(),r.responseContent=s,r.emit("response",e),r.dests.forEach(function(f){r.pipeDest(f)}),s.on("data",function(f){r.timing&&!r.responseStarted&&(r.responseStartTime=new Date().getTime(),e.responseStartTime=r.responseStartTime),r._destdata=!0,r.emit("data",f)}),s.once("end",function(f){r.emit("end",f)}),s.on("error",function(f){r.emit("error",f)}),s.on("close",function(){r.emit("close")}),r.callback?r.readResponseBody(e):r.on("end",function(){if(r._aborted){ot("aborted",r.uri.href);return}r.emit("complete",e)})}ot("finish init function",r.uri.href)}};Rr.prototype.readResponseBody=function(e){var r=this;ot("reading response's body");var a=[],i=0,t=[];r.on("data",function(n){Ac.isBuffer(n)?n.length&&(i+=n.length,a.push(n)):t.push(n)}),r.on("end",function(){if(ot("end event",r.uri.href),r._aborted){ot("aborted",r.uri.href),a=[],i=0;return}if(i?(ot("has body",r.uri.href,i),e.body=Ac.concat(a,i),r.encoding!==null&&(e.body=e.body.toString(r.encoding)),a=[],i=0):t.length&&(r.encoding==="utf8"&&t[0].length>0&&t[0][0]==="\uFEFF"&&(t[0]=t[0].substring(1)),e.body=t.join("")),r._json)try{e.body=JSON.parse(e.body,r._jsonReviver)}catch{ot("invalid JSON received",r.uri.href)}ot("emitting complete",r.uri.href),typeof e.body>"u"&&!r._json&&(e.body=r.encoding===null?Ac.alloc(0):""),r.emit("complete",e,e.body)})};Rr.prototype.abort=function(){var e=this;e._aborted=!0,e.req?e.req.abort():e.response&&e.response.destroy(),e.clearTimeout(),e.emit("abort")};Rr.prototype.pipeDest=function(e){var r=this,a=r.response;if(e.headers&&!e.headersSent){if(a.caseless.has("content-type")){var i=a.caseless.has("content-type");e.setHeader?e.setHeader(i,a.headers[i]):e.headers[i]=a.headers[i]}if(a.caseless.has("content-length")){var t=a.caseless.has("content-length");e.setHeader?e.setHeader(t,a.headers[t]):e.headers[t]=a.headers[t]}}if(e.setHeader&&!e.headersSent){for(var n in a.headers)(!r.gzip||n!=="content-encoding")&&e.setHeader(n,a.headers[n]);e.statusCode=a.statusCode}r.pipefilter&&r.pipefilter(a,e)};Rr.prototype.qs=function(e,r){var a=this,i;!r&&a.uri.query?i=a._qs.parse(a.uri.query):i={};for(var t in e)i[t]=e[t];var n=a._qs.stringify(i);return n===""||(a.uri=Ec.parse(a.uri.href.split("?")[0]+"?"+n),a.url=a.uri,a.path=a.uri.path,a.uri.host==="unix"&&a.enableUnixSocket()),a};Rr.prototype.form=function(e){var r=this;return e?(/^application\/x-www-form-urlencoded\b/.test(r.getHeader("content-type"))||r.setHeader("content-type","application/x-www-form-urlencoded"),r.body=typeof e=="string"?r._qs.rfc3986(e.toString("utf8")):r._qs.stringify(e).toString("utf8"),r):(r._form=new fN,r._form.on("error",function(a){a.message="form-data: "+a.message,r.emit("error",a),r.abort()}),r._form)};Rr.prototype.multipart=function(e){var r=this;return r._multipart.onRequest(e),r._multipart.chunked||(r.body=r._multipart.body),r};Rr.prototype.json=function(e){var r=this;return r.hasHeader("accept")||r.setHeader("accept","application/json"),typeof r.jsonReplacer=="function"&&(r._jsonReplacer=r.jsonReplacer),r._json=!0,typeof e=="boolean"?r.body!==void 0&&(/^application\/x-www-form-urlencoded\b/.test(r.getHeader("content-type"))?r.body=r._qs.rfc3986(r.body):r.body=v5(r.body,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")):(r.body=v5(e,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")),typeof r.jsonReviver=="function"&&(r._jsonReviver=r.jsonReviver),r};Rr.prototype.getHeader=function(e,r){var a=this,i,t,n;return r||(r=a.headers),Object.keys(r).forEach(function(o){o.length===e.length&&(t=new RegExp(e,"i"),n=o.match(t),n&&(i=r[o]))}),i};Rr.prototype.enableUnixSocket=function(){var e=this.uri.path.split(":"),r=e[0],a=e[1];this.socketPath=r,this.uri.pathname=a,this.uri.path=a,this.uri.host=r,this.uri.hostname=r,this.uri.isUnix=!0};Rr.prototype.auth=function(e,r,a,i){var t=this;return t._auth.onRequest(e,r,a,i),t};Rr.prototype.aws=function(e,r){var a=this;if(!r)return a._aws=e,a;if(e.sign_version===4||e.sign_version==="4"){var i={host:a.uri.host,path:a.uri.path,method:a.method,headers:a.headers,body:a.body};e.service&&(i.service=e.service);var t=uN.sign(i,{accessKeyId:e.key,secretAccessKey:e.secret,sessionToken:e.session});a.setHeader("authorization",t.headers.Authorization),a.setHeader("x-amz-date",t.headers["X-Amz-Date"]),t.headers["X-Amz-Security-Token"]&&a.setHeader("x-amz-security-token",t.headers["X-Amz-Security-Token"])}else{var n=new Date;a.setHeader("date",n.toUTCString());var o={key:e.key,secret:e.secret,verb:a.method.toUpperCase(),date:n,contentType:a.getHeader("content-type")||"",md5:a.getHeader("content-md5")||"",amazonHeaders:d0.canonicalizeHeaders(a.headers)},s=a.uri.path;e.bucket&&s?o.resource="/"+e.bucket+s:e.bucket&&!s?o.resource="/"+e.bucket:!e.bucket&&s?o.resource=s:!e.bucket&&!s&&(o.resource="/"),o.resource=d0.canonicalizeResource(o.resource),a.setHeader("authorization",d0.authorization(o))}return a};Rr.prototype.httpSignature=function(e){var r=this;return cN.signRequest({getHeader:function(a){return r.getHeader(a,r.headers)},setHeader:function(a,i){r.setHeader(a,i)},method:r.method,path:r.path},e),ot("httpSignature authorization",r.getHeader("authorization")),r};Rr.prototype.hawk=function(e){var r=this;r.setHeader("Authorization",xN.header(r.uri,r.method,e))};Rr.prototype.oauth=function(e){var r=this;return r._oauth.onRequest(e),r};Rr.prototype.jar=function(e){var r=this,a;if(r._redirect.redirectsFollowed===0&&(r.originalCookieHeader=r.getHeader("cookie")),!e)a=!1,r._disableCookies=!0;else{var i=e.getCookieString?e:x5,t=r.uri.href;i&&(a=i.getCookieString(t))}return a&&a.length&&(r.originalCookieHeader?r.setHeader("cookie",r.originalCookieHeader+"; "+a):r.setHeader("cookie",a)),r._jar=e,r};Rr.prototype.pipe=function(e,r){var a=this;if(a.response)if(a._destdata)a.emit("error",new Error("You cannot pipe after data has been emitted from the response."));else if(a._ended)a.emit("error",new Error("You cannot pipe after the response has been ended."));else return hp.Stream.prototype.pipe.call(a,e,r),a.pipeDest(e),e;else return a.dests.push(e),hp.Stream.prototype.pipe.call(a,e,r),e};Rr.prototype.write=function(){var e=this;if(!e._aborted&&(e._started||e.start(),e.req))return e.req.write.apply(e.req,arguments)};Rr.prototype.end=function(e){var r=this;r._aborted||(e&&r.write(e),r._started||r.start(),r.req&&r.req.end())};Rr.prototype.pause=function(){var e=this;e.responseContent?e.responseContent.pause.apply(e.responseContent,arguments):e._paused=!0};Rr.prototype.resume=function(){var e=this;e.responseContent?e.responseContent.resume.apply(e.responseContent,arguments):e._paused=!1};Rr.prototype.destroy=function(){var e=this;this.clearTimeout(),e._ended?e.response&&e.response.destroy():e.end()};Rr.prototype.clearTimeout=function(){this.timeoutTimer&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)};Rr.defaultProxyHeaderWhiteList=v0.defaultProxyHeaderWhiteList.slice();Rr.defaultProxyHeaderExclusiveList=v0.defaultProxyHeaderExclusiveList.slice();Rr.prototype.toJSON=k5;_5.exports=Rr});var A5=O((jY,E5)=>{"use strict";var Pc=Ol(),S5=Md(),FN=Ul(),CN=FN.paramsHaveRequestBody;function dp(e,r,a){typeof r=="function"&&(a=r);var i={};return r!==null&&typeof r=="object"?Pc(i,r,{uri:e}):typeof e=="string"?Pc(i,{uri:e}):Pc(i,e),i.callback=a||i.callback,i}function Ba(e,r,a){if(typeof e>"u")throw new Error("undefined is not a valid uri or options object.");var i=dp(e,r,a);if(i.method==="HEAD"&&CN(i))throw new Error("HTTP HEAD requests MUST NOT include a request body.");return new Ba.Request(i)}function bo(e){var r=e.toUpperCase();return function(a,i,t){var n=dp(a,i,t);return n.method=r,Ba(n,n.callback)}}Ba.get=bo("get");Ba.head=bo("head");Ba.options=bo("options");Ba.post=bo("post");Ba.put=bo("put");Ba.patch=bo("patch");Ba.del=bo("delete");Ba.delete=bo("delete");Ba.jar=function(e){return S5.jar(e)};Ba.cookie=function(e){return S5.parse(e)};function g0(e,r,a,i){return function(t,n,o){var s=dp(t,n,o),c={};return Pc(!0,c,r,s),c.pool=s.pool||r.pool,i&&(c.method=i.toUpperCase()),typeof a=="function"&&(e=a),e(c,c.callback)}}Ba.defaults=function(e,r){var a=this;e=e||{},typeof e=="function"&&(r=e,e={});var i=g0(a,e,r),t=["get","head","post","put","patch","del","delete"];return t.forEach(function(n){i[n]=g0(a[n],e,r,n)}),i.cookie=g0(a.cookie,e,r),i.jar=a.jar,i.defaults=a.defaults,i};Ba.forever=function(e,r){var a={};return r&&Pc(a,r),e&&(a.agentOptions=e),a.forever=!0,Ba.defaults(a)};E5.exports=Ba;Ba.Request=j5();Ba.initParams=dp;Object.defineProperty(Ba,"debug",{enumerable:!0,get:function(){return Ba.Request.debug},set:function(e){Ba.Request.debug=e}})});var T5=O((SY,P5)=>{P5.exports=BN;function BN(e){if(!/^data\:/i.test(e))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');e=e.replace(/\r?\n/g,"");var r=e.indexOf(",");if(r===-1||r<=4)throw new TypeError("malformed data: URI");for(var a=e.substring(5,r).split(";"),i=!1,t="US-ASCII",n=0;n<a.length;n++)a[n]=="base64"?i=!0:a[n].indexOf("charset=")==0&&(t=a[n].substring(8));var o=unescape(e.substring(r+1)),s=i?"base64":"ascii",c=new Buffer(o,s);return c.type=a[0]||"text/plain",c.charset=t,c}});var B5=O((EY,C5)=>{var qN=T5();function IN(e){return{mimeType:ON(RN(e)),data:qN(e)}}function RN(e){return e.substring(5,e.indexOf(";"))}var F5=/^(\w+\/)+/;function ON(e){e=e.toLowerCase();var r=e.match(F5);return!r||!(r=r[1])?e:e.replace(F5,r)}C5.exports=IN});var I5=O((PY,q5)=>{"use strict";var Tc=Iu(),AY=require("path"),zN=Qx().PNG,DN=Yh(),LN=aw(),NN=iw().GifReader,UN=cw(),MN=require("fs"),HN=A5(),VN=Df(),$N=B5();function WN(e,r){var a=new zN;a.parse(e,function(i,t){if(i){r(i);return}r(null,Tc(new Uint8Array(t.data),[t.width|0,t.height|0,4],[4,4*t.width|0,1],0))})}function KN(e,r){var a;try{a=DN.decode(e)}catch(n){r(n);return}if(!a){r(new Error("Error decoding jpeg"));return}var i=[a.height,a.width,4],t=Tc(a.data,i);r(null,t.transpose(1,0))}function GN(e,r){var a;try{a=new NN(e)}catch(s){r(s);return}if(a.numFrames()>0){var i=[a.numFrames(),a.height,a.width,4];try{var t=new Uint8Array(i[0]*i[1]*i[2]*i[3])}catch(s){r(s);return}var n=Tc(t,i);try{for(var o=0;o<a.numFrames();++o)a.decodeAndBlitFrameRGBA(o,t.subarray(n.index(o,0,0,0),n.index(o+1,0,0,0)))}catch(s){r(s);return}r(null,n.transpose(0,2,1))}else{var i=[a.height,a.width,4],t=new Uint8Array(i[0]*i[1]*i[2]),n=Tc(t,i);try{a.decodeAndBlitFrameRGBA(0,t)}catch(f){r(f);return}r(null,n.transpose(1,0))}}function YN(e,r){var a=new UN(e);try{a.init()}catch(s){r(s);return}var i=a.getData(),t=[i.getHeight(),i.getWidth(),4],n=new Uint8Array(t[0]*t[1]*t[2]),o=Tc(n,t);LN(i,o),r(null,o.transpose(1,0))}function mp(e,r,a){switch(e){case"image/png":WN(r,a);break;case"image/jpg":case"image/jpeg":KN(r,a);break;case"image/gif":GN(r,a);break;case"image/bmp":YN(r,a);break;default:a(new Error("Unsupported file type: "+e))}}q5.exports=function(r,a,i){if(i||(i=a,a=""),Buffer.isBuffer(r)){if(!a){i(new Error("Invalid file type"));return}mp(a,r,i)}else if(r.indexOf("data:")===0)try{var t=$N(r);t?process.nextTick(function(){mp(a||t.mimeType,t.data,i)}):process.nextTick(function(){i(new Error("Error parsing data URI"))})}catch(n){process.nextTick(function(){i(n)})}else r.indexOf("http://")===0||r.indexOf("https://")===0?HN({url:r,encoding:null},function(n,o,s){if(n){i(n);return}if(a=a,a||(o.getHeader!==void 0?a=o.getHeader("content-type"):o.headers!==void 0&&(a=o.headers["content-type"])),!a){i(new Error("Invalid content-type"));return}mp(a,s,i)}):MN.readFile(r,function(n,o){if(n){i(n);return}if(a=a||VN.lookup(r),!a){i(new Error("Invalid file type"));return}mp(a,o,i)})}});var Z5=O((jp,Y5)=>{(function(e,r){typeof jp=="object"&&typeof Y5<"u"?r(jp):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis<"u"?globalThis:e||self,r(e.WebStreamsPolyfill={}))})(jp,function(e){"use strict";var r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:function(u){return"Symbol("+u+")"};function a(){}function i(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}var t=i();function n(u){return typeof u=="object"&&u!==null||typeof u=="function"}var o=a,s=Promise,c=Promise.prototype.then,l=Promise.resolve.bind(s),f=Promise.reject.bind(s);function v(u){return new s(u)}function h(u){return l(u)}function d(u){return f(u)}function y(u,m,S){return c.call(u,m,S)}function _(u,m,S){y(y(u,m,S),void 0,o)}function w(u,m){_(u,m)}function A(u,m){_(u,void 0,m)}function T(u,m,S){return y(u,m,S)}function P(u){y(u,void 0,o)}var R=function(){var u=t&&t.queueMicrotask;if(typeof u=="function")return u;var m=h(void 0);return function(S){return y(m,S)}}();function F(u,m,S){if(typeof u!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(u,m,S)}function I(u,m,S){try{return h(F(u,m,S))}catch(D){return d(D)}}var z=16384,N=function(){function u(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}return Object.defineProperty(u.prototype,"length",{get:function(){return this._size},enumerable:!1,configurable:!0}),u.prototype.push=function(m){var S=this._back,D=S;S._elements.length===z-1&&(D={_elements:[],_next:void 0}),S._elements.push(m),D!==S&&(this._back=D,S._next=D),++this._size},u.prototype.shift=function(){var m=this._front,S=m,D=this._cursor,G=D+1,se=m._elements,ge=se[D];return G===z&&(S=m._next,G=0),--this._size,this._cursor=G,m!==S&&(this._front=S),se[D]=void 0,ge},u.prototype.forEach=function(m){for(var S=this._cursor,D=this._front,G=D._elements;(S!==G.length||D._next!==void 0)&&!(S===G.length&&(D=D._next,G=D._elements,S=0,G.length===0));)m(G[S]),++S},u.prototype.peek=function(){var m=this._front,S=this._cursor;return m._elements[S]},u}();function M(u,m){u._ownerReadableStream=m,m._reader=u,m._state==="readable"?$(u):m._state==="closed"?re(u):Q(u,m._storedError)}function K(u,m){var S=u._ownerReadableStream;return mi(S,m)}function V(u){u._ownerReadableStream._state==="readable"?xe(u,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):me(u,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),u._ownerReadableStream._reader=void 0,u._ownerReadableStream=void 0}function Z(u){return new TypeError("Cannot "+u+" a stream using a released reader")}function $(u){u._closedPromise=v(function(m,S){u._closedPromise_resolve=m,u._closedPromise_reject=S})}function Q(u,m){$(u),xe(u,m)}function re(u){$(u),ce(u)}function xe(u,m){u._closedPromise_reject!==void 0&&(P(u._closedPromise),u._closedPromise_reject(m),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0)}function me(u,m){Q(u,m)}function ce(u){u._closedPromise_resolve!==void 0&&(u._closedPromise_resolve(void 0),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0)}var je=r("[[AbortSteps]]"),be=r("[[ErrorSteps]]"),Le=r("[[CancelSteps]]"),Me=r("[[PullSteps]]"),Oe=Number.isFinite||function(u){return typeof u=="number"&&isFinite(u)},W=Math.trunc||function(u){return u<0?Math.ceil(u):Math.floor(u)};function we(u){return typeof u=="object"||typeof u=="function"}function Ze(u,m){if(u!==void 0&&!we(u))throw new TypeError(m+" is not an object.")}function We(u,m){if(typeof u!="function")throw new TypeError(m+" is not a function.")}function $e(u){return typeof u=="object"&&u!==null||typeof u=="function"}function rr(u,m){if(!$e(u))throw new TypeError(m+" is not an object.")}function Be(u,m,S){if(u===void 0)throw new TypeError("Parameter "+m+" is required in '"+S+"'.")}function fe(u,m,S){if(u===void 0)throw new TypeError(m+" is required in '"+S+"'.")}function ke(u){return Number(u)}function ir(u){return u===0?0:u}function Pe(u){return ir(W(u))}function ur(u,m){var S=0,D=Number.MAX_SAFE_INTEGER,G=Number(u);if(G=ir(G),!Oe(G))throw new TypeError(m+" is not a finite number");if(G=Pe(G),G<S||G>D)throw new TypeError(m+" is outside the accepted range of "+S+" to "+D+", inclusive");return!Oe(G)||G===0?0:G}function Or(u,m){if(!Mn(u))throw new TypeError(m+" is not a ReadableStream.")}function Gr(u){return new Ye(u)}function J(u,m){u._reader._readRequests.push(m)}function qe(u,m,S){var D=u._reader,G=D._readRequests.shift();S?G._closeSteps():G._chunkSteps(m)}function Ke(u){return u._reader._readRequests.length}function He(u){var m=u._reader;return!(m===void 0||!Je(m))}var Ye=function(){function u(m){if(Be(m,1,"ReadableStreamDefaultReader"),Or(m,"First parameter"),Hn(m))throw new TypeError("This stream has already been locked for exclusive reading by another reader");M(this,m),this._readRequests=new N}return Object.defineProperty(u.prototype,"closed",{get:function(){return Je(this)?this._closedPromise:d(mr("closed"))},enumerable:!1,configurable:!0}),u.prototype.cancel=function(m){return m===void 0&&(m=void 0),Je(this)?this._ownerReadableStream===void 0?d(Z("cancel")):K(this,m):d(mr("cancel"))},u.prototype.read=function(){if(!Je(this))return d(mr("read"));if(this._ownerReadableStream===void 0)return d(Z("read from"));var m,S,D=v(function(se,ge){m=se,S=ge}),G={_chunkSteps:function(se){return m({value:se,done:!1})},_closeSteps:function(){return m({value:void 0,done:!0})},_errorSteps:function(se){return S(se)}};return nr(this,G),D},u.prototype.releaseLock=function(){if(!Je(this))throw mr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");V(this)}},u}();Object.defineProperties(Ye.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ye.prototype,r.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Je(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readRequests")?!1:u instanceof Ye}function nr(u,m){var S=u._ownerReadableStream;S._disturbed=!0,S._state==="closed"?m._closeSteps():S._state==="errored"?m._errorSteps(S._storedError):S._readableStreamController[Me](m)}function mr(u){return new TypeError("ReadableStreamDefaultReader.prototype."+u+" can only be used on a ReadableStreamDefaultReader")}var Ir,vr;typeof r.asyncIterator=="symbol"&&(vr=(Ir={},Ir[r.asyncIterator]=function(){return this},Ir),Object.defineProperty(vr,r.asyncIterator,{enumerable:!1}));var ve=function(){function u(m,S){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=m,this._preventCancel=S}return u.prototype.next=function(){var m=this,S=function(){return m._nextSteps()};return this._ongoingPromise=this._ongoingPromise?T(this._ongoingPromise,S,S):S(),this._ongoingPromise},u.prototype.return=function(m){var S=this,D=function(){return S._returnSteps(m)};return this._ongoingPromise?T(this._ongoingPromise,D,D):D()},u.prototype._nextSteps=function(){var m=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var S=this._reader;if(S._ownerReadableStream===void 0)return d(Z("iterate"));var D,G,se=v(function(Xe,Er){D=Xe,G=Er}),ge={_chunkSteps:function(Xe){m._ongoingPromise=void 0,R(function(){return D({value:Xe,done:!1})})},_closeSteps:function(){m._ongoingPromise=void 0,m._isFinished=!0,V(S),D({value:void 0,done:!0})},_errorSteps:function(Xe){m._ongoingPromise=void 0,m._isFinished=!0,V(S),G(Xe)}};return nr(S,ge),se},u.prototype._returnSteps=function(m){if(this._isFinished)return Promise.resolve({value:m,done:!0});this._isFinished=!0;var S=this._reader;if(S._ownerReadableStream===void 0)return d(Z("finish iterating"));if(!this._preventCancel){var D=K(S,m);return V(S),T(D,function(){return{value:m,done:!0}})}return V(S),h({value:m,done:!0})},u}(),Ge={next:function(){return Pr(this)?this._asyncIteratorImpl.next():d(cr("next"))},return:function(u){return Pr(this)?this._asyncIteratorImpl.return(u):d(cr("return"))}};vr!==void 0&&Object.setPrototypeOf(Ge,vr);function fr(u,m){var S=Gr(u),D=new ve(S,m),G=Object.create(Ge);return G._asyncIteratorImpl=D,G}function Pr(u){if(!n(u)||!Object.prototype.hasOwnProperty.call(u,"_asyncIteratorImpl"))return!1;try{return u._asyncIteratorImpl instanceof ve}catch{return!1}}function cr(u){return new TypeError("ReadableStreamAsyncIterator."+u+" can only be used on a ReadableSteamAsyncIterator")}var gr=Number.isNaN||function(u){return u!==u};function wr(u){return u.slice()}function or(u,m,S,D,G){new Uint8Array(u).set(new Uint8Array(S,D,G),m)}function hr(u){return u}function $r(u){return!1}function Fr(u,m,S){if(u.slice)return u.slice(m,S);var D=S-m,G=new ArrayBuffer(D);return or(G,0,u,m,D),G}function Sa(u){return!(typeof u!="number"||gr(u)||u<0)}function Ia(u){var m=Fr(u.buffer,u.byteOffset,u.byteOffset+u.byteLength);return new Uint8Array(m)}function st(u){var m=u._queue.shift();return u._queueTotalSize-=m.size,u._queueTotalSize<0&&(u._queueTotalSize=0),m.value}function vt(u,m,S){if(!Sa(S)||S===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");u._queue.push({value:m,size:S}),u._queueTotalSize+=S}function ra(u){var m=u._queue.peek();return m.value}function ua(u){u._queue=new N,u._queueTotalSize=0}var da=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"view",{get:function(){if(!ut(this))throw De("view");return this._view},enumerable:!1,configurable:!0}),u.prototype.respond=function(m){if(!ut(this))throw De("respond");if(Be(m,1,"respond"),m=ur(m,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");$r(this._view.buffer),Qe(this._associatedReadableByteStreamController,m)},u.prototype.respondWithNewView=function(m){if(!ut(this))throw De("respondWithNewView");if(Be(m,1,"respondWithNewView"),!ArrayBuffer.isView(m))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");$r(m.buffer),Te(this._associatedReadableByteStreamController,m)},u}();Object.defineProperties(da.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(da.prototype,r.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var Ra=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"byobRequest",{get:function(){if(!va(this))throw de("byobRequest");return Ce(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!va(this))throw de("desiredSize");return ar(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!va(this))throw de("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var m=this._controlledReadableByteStream._state;if(m!=="readable")throw new TypeError("The stream (in "+m+" state) is not in the readable state and cannot be closed");Ie(this)},u.prototype.enqueue=function(m){if(!va(this))throw de("enqueue");if(Be(m,1,"enqueue"),!ArrayBuffer.isView(m))throw new TypeError("chunk must be an array buffer view");if(m.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(m.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");var S=this._controlledReadableByteStream._state;if(S!=="readable")throw new TypeError("The stream (in "+S+" state) is not in the readable state and cannot be enqueued to");Se(this,m)},u.prototype.error=function(m){if(m===void 0&&(m=void 0),!va(this))throw de("error");Fe(this,m)},u.prototype[Le]=function(m){aa(this),ua(this);var S=this._cancelAlgorithm(m);return Ue(this),S},u.prototype[Me]=function(m){var S=this._controlledReadableByteStream;if(this._queueTotalSize>0){var D=this._queue.shift();this._queueTotalSize-=D.byteLength,k(this);var G=new Uint8Array(D.buffer,D.byteOffset,D.byteLength);m._chunkSteps(G);return}var se=this._autoAllocateChunkSize;if(se!==void 0){var ge=void 0;try{ge=new ArrayBuffer(se)}catch(Er){m._errorSteps(Er);return}var Xe={buffer:ge,bufferByteLength:se,byteOffset:0,byteLength:se,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(Xe)}J(S,m),Ua(this)},u}();Object.defineProperties(Ra.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ra.prototype,r.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function va(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableByteStream")?!1:u instanceof Ra}function ut(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_associatedReadableByteStreamController")?!1:u instanceof da}function Ua(u){var m=ye(u);if(m){if(u._pulling){u._pullAgain=!0;return}u._pulling=!0;var S=u._pullAlgorithm();_(S,function(){u._pulling=!1,u._pullAgain&&(u._pullAgain=!1,Ua(u))},function(D){Fe(u,D)})}}function aa(u){B(u),u._pendingPullIntos=new N}function Vt(u,m){var S=!1;u._state==="closed"&&(S=!0);var D=x(m);m.readerType==="default"?qe(u,D,S):le(u,D,S)}function x(u){var m=u.bytesFilled,S=u.elementSize;return new u.viewConstructor(u.buffer,u.byteOffset,m/S)}function b(u,m,S,D){u._queue.push({buffer:m,byteOffset:S,byteLength:D}),u._queueTotalSize+=D}function g(u,m){var S=m.elementSize,D=m.bytesFilled-m.bytesFilled%S,G=Math.min(u._queueTotalSize,m.byteLength-m.bytesFilled),se=m.bytesFilled+G,ge=se-se%S,Xe=G,Er=!1;ge>D&&(Xe=ge-m.bytesFilled,Er=!0);for(var Br=u._queue;Xe>0;){var zr=Br.peek(),Wr=Math.min(Xe,zr.byteLength),Oa=m.byteOffset+m.bytesFilled;or(m.buffer,Oa,zr.buffer,zr.byteOffset,Wr),zr.byteLength===Wr?Br.shift():(zr.byteOffset+=Wr,zr.byteLength-=Wr),u._queueTotalSize-=Wr,p(u,Wr,m),Xe-=Wr}return Er}function p(u,m,S){S.bytesFilled+=m}function k(u){u._queueTotalSize===0&&u._closeRequested?(Ue(u),xu(u._controlledReadableByteStream)):Ua(u)}function B(u){u._byobRequest!==null&&(u._byobRequest._associatedReadableByteStreamController=void 0,u._byobRequest._view=null,u._byobRequest=null)}function U(u){for(;u._pendingPullIntos.length>0;){if(u._queueTotalSize===0)return;var m=u._pendingPullIntos.peek();g(u,m)&&(Ne(u),Vt(u._controlledReadableByteStream,m))}}function Y(u,m,S){var D=u._controlledReadableByteStream,G=1;m.constructor!==DataView&&(G=m.constructor.BYTES_PER_ELEMENT);var se=m.constructor,ge=m.buffer,Xe={buffer:ge,bufferByteLength:ge.byteLength,byteOffset:m.byteOffset,byteLength:m.byteLength,bytesFilled:0,elementSize:G,viewConstructor:se,readerType:"byob"};if(u._pendingPullIntos.length>0){u._pendingPullIntos.push(Xe),ee(D,S);return}if(D._state==="closed"){var Er=new se(Xe.buffer,Xe.byteOffset,0);S._closeSteps(Er);return}if(u._queueTotalSize>0){if(g(u,Xe)){var Br=x(Xe);k(u),S._chunkSteps(Br);return}if(u._closeRequested){var zr=new TypeError("Insufficient bytes to fill elements in the given buffer");Fe(u,zr),S._errorSteps(zr);return}}u._pendingPullIntos.push(Xe),ee(D,S),Ua(u)}function te(u,m){var S=u._controlledReadableByteStream;if(ae(S))for(;oe(S)>0;){var D=Ne(u);Vt(S,D)}}function pe(u,m,S){if(p(u,m,S),!(S.bytesFilled<S.elementSize)){Ne(u);var D=S.bytesFilled%S.elementSize;if(D>0){var G=S.byteOffset+S.bytesFilled,se=Fr(S.buffer,G-D,G);b(u,se,0,se.byteLength)}S.bytesFilled-=D,Vt(u._controlledReadableByteStream,S),U(u)}}function he(u,m){var S=u._pendingPullIntos.peek();B(u);var D=u._controlledReadableByteStream._state;D==="closed"?te(u):pe(u,m,S),Ua(u)}function Ne(u){var m=u._pendingPullIntos.shift();return m}function ye(u){var m=u._controlledReadableByteStream;if(m._state!=="readable"||u._closeRequested||!u._started)return!1;if(He(m)&&Ke(m)>0||ae(m)&&oe(m)>0)return!0;var S=ar(u);return S>0}function Ue(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0}function Ie(u){var m=u._controlledReadableByteStream;if(!(u._closeRequested||m._state!=="readable")){if(u._queueTotalSize>0){u._closeRequested=!0;return}if(u._pendingPullIntos.length>0){var S=u._pendingPullIntos.peek();if(S.bytesFilled>0){var D=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Fe(u,D),D}}Ue(u),xu(m)}}function Se(u,m){var S=u._controlledReadableByteStream;if(!(u._closeRequested||S._state!=="readable")){var D=m.buffer,G=m.byteOffset,se=m.byteLength,ge=D;if(u._pendingPullIntos.length>0){var Xe=u._pendingPullIntos.peek();$r(Xe.buffer),Xe.buffer=Xe.buffer}if(B(u),He(S))if(Ke(S)===0)b(u,ge,G,se);else{u._pendingPullIntos.length>0&&Ne(u);var Er=new Uint8Array(ge,G,se);qe(S,Er,!1)}else ae(S)?(b(u,ge,G,se),U(u)):b(u,ge,G,se);Ua(u)}}function Fe(u,m){var S=u._controlledReadableByteStream;S._state==="readable"&&(aa(u),ua(u),Ue(u),Og(S,m))}function Ce(u){if(u._byobRequest===null&&u._pendingPullIntos.length>0){var m=u._pendingPullIntos.peek(),S=new Uint8Array(m.buffer,m.byteOffset+m.bytesFilled,m.byteLength-m.bytesFilled),D=Object.create(da.prototype);ze(D,u,S),u._byobRequest=D}return u._byobRequest}function ar(u){var m=u._controlledReadableByteStream._state;return m==="errored"?null:m==="closed"?0:u._strategyHWM-u._queueTotalSize}function Qe(u,m){var S=u._pendingPullIntos.peek(),D=u._controlledReadableByteStream._state;if(D==="closed"){if(m!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(m===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(S.bytesFilled+m>S.byteLength)throw new RangeError("bytesWritten out of range")}S.buffer=S.buffer,he(u,m)}function Te(u,m){var S=u._pendingPullIntos.peek(),D=u._controlledReadableByteStream._state;if(D==="closed"){if(m.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(m.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(S.byteOffset+S.bytesFilled!==m.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(S.bufferByteLength!==m.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(S.bytesFilled+m.byteLength>S.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");var G=m.byteLength;S.buffer=m.buffer,he(u,G)}function Ee(u,m,S,D,G,se,ge){m._controlledReadableByteStream=u,m._pullAgain=!1,m._pulling=!1,m._byobRequest=null,m._queue=m._queueTotalSize=void 0,ua(m),m._closeRequested=!1,m._started=!1,m._strategyHWM=se,m._pullAlgorithm=D,m._cancelAlgorithm=G,m._autoAllocateChunkSize=ge,m._pendingPullIntos=new N,u._readableStreamController=m;var Xe=S();_(h(Xe),function(){m._started=!0,Ua(m)},function(Er){Fe(m,Er)})}function Ae(u,m,S){var D=Object.create(Ra.prototype),G=function(){},se=function(){return h(void 0)},ge=function(){return h(void 0)};m.start!==void 0&&(G=function(){return m.start(D)}),m.pull!==void 0&&(se=function(){return m.pull(D)}),m.cancel!==void 0&&(ge=function(Er){return m.cancel(Er)});var Xe=m.autoAllocateChunkSize;if(Xe===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Ee(u,D,G,se,ge,S,Xe)}function ze(u,m,S){u._associatedReadableByteStreamController=m,u._view=S}function De(u){return new TypeError("ReadableStreamBYOBRequest.prototype."+u+" can only be used on a ReadableStreamBYOBRequest")}function de(u){return new TypeError("ReadableByteStreamController.prototype."+u+" can only be used on a ReadableByteStreamController")}function X(u){return new ne(u)}function ee(u,m){u._reader._readIntoRequests.push(m)}function le(u,m,S){var D=u._reader,G=D._readIntoRequests.shift();S?G._closeSteps(m):G._chunkSteps(m)}function oe(u){return u._reader._readIntoRequests.length}function ae(u){var m=u._reader;return!(m===void 0||!Ve(m))}var ne=function(){function u(m){if(Be(m,1,"ReadableStreamBYOBReader"),Or(m,"First parameter"),Hn(m))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!va(m._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");M(this,m),this._readIntoRequests=new N}return Object.defineProperty(u.prototype,"closed",{get:function(){return Ve(this)?this._closedPromise:d(tr("closed"))},enumerable:!1,configurable:!0}),u.prototype.cancel=function(m){return m===void 0&&(m=void 0),Ve(this)?this._ownerReadableStream===void 0?d(Z("cancel")):K(this,m):d(tr("cancel"))},u.prototype.read=function(m){if(!Ve(this))return d(tr("read"));if(!ArrayBuffer.isView(m))return d(new TypeError("view must be an array buffer view"));if(m.byteLength===0)return d(new TypeError("view must have non-zero byteLength"));if(m.buffer.byteLength===0)return d(new TypeError("view's buffer must have non-zero byteLength"));if($r(m.buffer),this._ownerReadableStream===void 0)return d(Z("read from"));var S,D,G=v(function(ge,Xe){S=ge,D=Xe}),se={_chunkSteps:function(ge){return S({value:ge,done:!1})},_closeSteps:function(ge){return S({value:ge,done:!0})},_errorSteps:function(ge){return D(ge)}};return lr(this,m,se),G},u.prototype.releaseLock=function(){if(!Ve(this))throw tr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");V(this)}},u}();Object.defineProperties(ne.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ne.prototype,r.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function Ve(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readIntoRequests")?!1:u instanceof ne}function lr(u,m,S){var D=u._ownerReadableStream;D._disturbed=!0,D._state==="errored"?S._errorSteps(D._storedError):Y(D._readableStreamController,m,S)}function tr(u){return new TypeError("ReadableStreamBYOBReader.prototype."+u+" can only be used on a ReadableStreamBYOBReader")}function sr(u,m){var S=u.highWaterMark;if(S===void 0)return m;if(gr(S)||S<0)throw new RangeError("Invalid highWaterMark");return S}function L(u){var m=u.size;return m||function(){return 1}}function yr(u,m){Ze(u,m);var S=u==null?void 0:u.highWaterMark,D=u==null?void 0:u.size;return{highWaterMark:S===void 0?void 0:ke(S),size:D===void 0?void 0:Ar(D,m+" has member 'size' that")}}function Ar(u,m){return We(u,m),function(S){return ke(u(S))}}function kr(u,m){Ze(u,m);var S=u==null?void 0:u.abort,D=u==null?void 0:u.close,G=u==null?void 0:u.start,se=u==null?void 0:u.type,ge=u==null?void 0:u.write;return{abort:S===void 0?void 0:pr(S,u,m+" has member 'abort' that"),close:D===void 0?void 0:Sr(D,u,m+" has member 'close' that"),start:G===void 0?void 0:_r(G,u,m+" has member 'start' that"),write:ge===void 0?void 0:ta(ge,u,m+" has member 'write' that"),type:se}}function pr(u,m,S){return We(u,S),function(D){return I(u,m,[D])}}function Sr(u,m,S){return We(u,S),function(){return I(u,m,[])}}function _r(u,m,S){return We(u,S),function(D){return F(u,m,[D])}}function ta(u,m,S){return We(u,S),function(D,G){return I(u,m,[D,G])}}function Tr(u,m){if(!Re(u))throw new TypeError(m+" is not a WritableStream.")}function j(u){if(typeof u!="object"||u===null)return!1;try{return typeof u.aborted=="boolean"}catch{return!1}}var E=typeof AbortController=="function";function C(){if(E)return new AbortController}var H=function(){function u(m,S){m===void 0&&(m={}),S===void 0&&(S={}),m===void 0?m=null:rr(m,"First parameter");var D=yr(S,"Second parameter"),G=kr(m,"First parameter");_e(this);var se=G.type;if(se!==void 0)throw new RangeError("Invalid type is specified");var ge=L(D),Xe=sr(D,1);oE(this,G,Xe,ge)}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Re(this))throw ol("locked");return Cr(this)},enumerable:!1,configurable:!0}),u.prototype.abort=function(m){return m===void 0&&(m=void 0),Re(this)?Cr(this)?d(new TypeError("Cannot abort a stream that already has a writer")):ca(this,m):d(ol("abort"))},u.prototype.close=function(){return Re(this)?Cr(this)?d(new TypeError("Cannot close a stream that already has a writer")):di(this)?d(new TypeError("Cannot close an already-closing stream")):ct(this):d(ol("close"))},u.prototype.getWriter=function(){if(!Re(this))throw ol("getWriter");return ie(this)},u}();Object.defineProperties(H.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(H.prototype,r.toStringTag,{value:"WritableStream",configurable:!0});function ie(u){return new us(u)}function ue(u,m,S,D,G,se){G===void 0&&(G=1),se===void 0&&(se=function(){return 1});var ge=Object.create(H.prototype);_e(ge);var Xe=Object.create(Ao.prototype);return _g(ge,Xe,u,m,S,D,G,se),ge}function _e(u){u._state="writable",u._storedError=void 0,u._writer=void 0,u._writableStreamController=void 0,u._writeRequests=new N,u._inFlightWriteRequest=void 0,u._closeRequest=void 0,u._inFlightCloseRequest=void 0,u._pendingAbortRequest=void 0,u._backpressure=!1}function Re(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_writableStreamController")?!1:u instanceof H}function Cr(u){return u._writer!==void 0}function ca(u,m){var S;if(u._state==="closed"||u._state==="errored")return h(void 0);u._writableStreamController._abortReason=m,(S=u._writableStreamController._abortController)===null||S===void 0||S.abort();var D=u._state;if(D==="closed"||D==="errored")return h(void 0);if(u._pendingAbortRequest!==void 0)return u._pendingAbortRequest._promise;var G=!1;D==="erroring"&&(G=!0,m=void 0);var se=v(function(ge,Xe){u._pendingAbortRequest={_promise:void 0,_resolve:ge,_reject:Xe,_reason:m,_wasAlreadyErroring:G}});return u._pendingAbortRequest._promise=se,G||dn(u,m),se}function ct(u){var m=u._state;if(m==="closed"||m==="errored")return d(new TypeError("The stream (in "+m+" state) is not in the writable state and cannot be closed"));var S=v(function(G,se){var ge={_resolve:G,_reject:se};u._closeRequest=ge}),D=u._writer;return D!==void 0&&u._backpressure&&m==="writable"&&nh(D),sE(u._writableStreamController),S}function lt(u){var m=v(function(S,D){var G={_resolve:S,_reject:D};u._writeRequests.push(G)});return m}function Et(u,m){var S=u._state;if(S==="writable"){dn(u,m);return}gt(u)}function dn(u,m){var S=u._writableStreamController;u._state="erroring",u._storedError=m;var D=u._writer;D!==void 0&&yg(D,m),!JS(u)&&S._started&&gt(u)}function gt(u){u._state="errored",u._writableStreamController[be]();var m=u._storedError;if(u._writeRequests.forEach(function(G){G._reject(m)}),u._writeRequests=new N,u._pendingAbortRequest===void 0){tl(u);return}var S=u._pendingAbortRequest;if(u._pendingAbortRequest=void 0,S._wasAlreadyErroring){S._reject(m),tl(u);return}var D=u._writableStreamController[je](S._reason);_(D,function(){S._resolve(),tl(u)},function(G){S._reject(G),tl(u)})}function Rt(u){u._inFlightWriteRequest._resolve(void 0),u._inFlightWriteRequest=void 0}function So(u,m){u._inFlightWriteRequest._reject(m),u._inFlightWriteRequest=void 0,Et(u,m)}function hi(u){u._inFlightCloseRequest._resolve(void 0),u._inFlightCloseRequest=void 0;var m=u._state;m==="erroring"&&(u._storedError=void 0,u._pendingAbortRequest!==void 0&&(u._pendingAbortRequest._resolve(),u._pendingAbortRequest=void 0)),u._state="closed";var S=u._writer;S!==void 0&&Ag(S)}function ss(u,m){u._inFlightCloseRequest._reject(m),u._inFlightCloseRequest=void 0,u._pendingAbortRequest!==void 0&&(u._pendingAbortRequest._reject(m),u._pendingAbortRequest=void 0),Et(u,m)}function di(u){return!(u._closeRequest===void 0&&u._inFlightCloseRequest===void 0)}function JS(u){return!(u._inFlightWriteRequest===void 0&&u._inFlightCloseRequest===void 0)}function eE(u){u._inFlightCloseRequest=u._closeRequest,u._closeRequest=void 0}function rE(u){u._inFlightWriteRequest=u._writeRequests.shift()}function tl(u){u._closeRequest!==void 0&&(u._closeRequest._reject(u._storedError),u._closeRequest=void 0);var m=u._writer;m!==void 0&&th(m,u._storedError)}function Xp(u,m){var S=u._writer;S!==void 0&&m!==u._backpressure&&(m?dE(S):nh(S)),u._backpressure=m}var us=function(){function u(m){if(Be(m,1,"WritableStreamDefaultWriter"),Tr(m,"First parameter"),Cr(m))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=m,m._writer=this;var S=m._state;if(S==="writable")!di(m)&&m._backpressure?ul(this):Pg(this),sl(this);else if(S==="erroring")ih(this,m._storedError),sl(this);else if(S==="closed")Pg(this),pE(this);else{var D=m._storedError;ih(this,D),Eg(this,D)}}return Object.defineProperty(u.prototype,"closed",{get:function(){return Eo(this)?this._closedPromise:d(Po("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!Eo(this))throw Po("desiredSize");if(this._ownerWritableStream===void 0)throw gu("desiredSize");return nE(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"ready",{get:function(){return Eo(this)?this._readyPromise:d(Po("ready"))},enumerable:!1,configurable:!0}),u.prototype.abort=function(m){return m===void 0&&(m=void 0),Eo(this)?this._ownerWritableStream===void 0?d(gu("abort")):aE(this,m):d(Po("abort"))},u.prototype.close=function(){if(!Eo(this))return d(Po("close"));var m=this._ownerWritableStream;return m===void 0?d(gu("close")):di(m)?d(new TypeError("Cannot close an already-closing stream")):bg(this)},u.prototype.releaseLock=function(){if(!Eo(this))throw Po("releaseLock");var m=this._ownerWritableStream;m!==void 0&&xg(this)},u.prototype.write=function(m){return m===void 0&&(m=void 0),Eo(this)?this._ownerWritableStream===void 0?d(gu("write to")):wg(this,m):d(Po("write"))},u}();Object.defineProperties(us.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(us.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Eo(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_ownerWritableStream")?!1:u instanceof us}function aE(u,m){var S=u._ownerWritableStream;return ca(S,m)}function bg(u){var m=u._ownerWritableStream;return ct(m)}function tE(u){var m=u._ownerWritableStream,S=m._state;return di(m)||S==="closed"?h(void 0):S==="errored"?d(m._storedError):bg(u)}function iE(u,m){u._closedPromiseState==="pending"?th(u,m):hE(u,m)}function yg(u,m){u._readyPromiseState==="pending"?Tg(u,m):mE(u,m)}function nE(u){var m=u._ownerWritableStream,S=m._state;return S==="errored"||S==="erroring"?null:S==="closed"?0:jg(m._writableStreamController)}function xg(u){var m=u._ownerWritableStream,S=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");yg(u,S),iE(u,S),m._writer=void 0,u._ownerWritableStream=void 0}function wg(u,m){var S=u._ownerWritableStream,D=S._writableStreamController,G=uE(D,m);if(S!==u._ownerWritableStream)return d(gu("write to"));var se=S._state;if(se==="errored")return d(S._storedError);if(di(S)||se==="closed")return d(new TypeError("The stream is closing or closed and cannot be written to"));if(se==="erroring")return d(S._storedError);var ge=lt(S);return cE(D,m,G),ge}var kg={},Ao=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"abortReason",{get:function(){if(!Jp(this))throw ah("abortReason");return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"signal",{get:function(){if(!Jp(this))throw ah("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal},enumerable:!1,configurable:!0}),u.prototype.error=function(m){if(m===void 0&&(m=void 0),!Jp(this))throw ah("error");var S=this._controlledWritableStream._state;S==="writable"&&Sg(this,m)},u.prototype[je]=function(m){var S=this._abortAlgorithm(m);return il(this),S},u.prototype[be]=function(){ua(this)},u}();Object.defineProperties(Ao.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ao.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Jp(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledWritableStream")?!1:u instanceof Ao}function _g(u,m,S,D,G,se,ge,Xe){m._controlledWritableStream=u,u._writableStreamController=m,m._queue=void 0,m._queueTotalSize=void 0,ua(m),m._abortReason=void 0,m._abortController=C(),m._started=!1,m._strategySizeAlgorithm=Xe,m._strategyHWM=ge,m._writeAlgorithm=D,m._closeAlgorithm=G,m._abortAlgorithm=se;var Er=rh(m);Xp(u,Er);var Br=S(),zr=h(Br);_(zr,function(){m._started=!0,nl(m)},function(Wr){m._started=!0,Et(u,Wr)})}function oE(u,m,S,D){var G=Object.create(Ao.prototype),se=function(){},ge=function(){return h(void 0)},Xe=function(){return h(void 0)},Er=function(){return h(void 0)};m.start!==void 0&&(se=function(){return m.start(G)}),m.write!==void 0&&(ge=function(Br){return m.write(Br,G)}),m.close!==void 0&&(Xe=function(){return m.close()}),m.abort!==void 0&&(Er=function(Br){return m.abort(Br)}),_g(u,G,se,ge,Xe,Er,S,D)}function il(u){u._writeAlgorithm=void 0,u._closeAlgorithm=void 0,u._abortAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function sE(u){vt(u,kg,0),nl(u)}function uE(u,m){try{return u._strategySizeAlgorithm(m)}catch(S){return eh(u,S),1}}function jg(u){return u._strategyHWM-u._queueTotalSize}function cE(u,m,S){try{vt(u,m,S)}catch(se){eh(u,se);return}var D=u._controlledWritableStream;if(!di(D)&&D._state==="writable"){var G=rh(u);Xp(D,G)}nl(u)}function nl(u){var m=u._controlledWritableStream;if(u._started&&m._inFlightWriteRequest===void 0){var S=m._state;if(S==="erroring"){gt(m);return}if(u._queue.length!==0){var D=ra(u);D===kg?lE(u):fE(u,D)}}}function eh(u,m){u._controlledWritableStream._state==="writable"&&Sg(u,m)}function lE(u){var m=u._controlledWritableStream;eE(m),st(u);var S=u._closeAlgorithm();il(u),_(S,function(){hi(m)},function(D){ss(m,D)})}function fE(u,m){var S=u._controlledWritableStream;rE(S);var D=u._writeAlgorithm(m);_(D,function(){Rt(S);var G=S._state;if(st(u),!di(S)&&G==="writable"){var se=rh(u);Xp(S,se)}nl(u)},function(G){S._state==="writable"&&il(u),So(S,G)})}function rh(u){var m=jg(u);return m<=0}function Sg(u,m){var S=u._controlledWritableStream;il(u),dn(S,m)}function ol(u){return new TypeError("WritableStream.prototype."+u+" can only be used on a WritableStream")}function ah(u){return new TypeError("WritableStreamDefaultController.prototype."+u+" can only be used on a WritableStreamDefaultController")}function Po(u){return new TypeError("WritableStreamDefaultWriter.prototype."+u+" can only be used on a WritableStreamDefaultWriter")}function gu(u){return new TypeError("Cannot "+u+" a stream using a released writer")}function sl(u){u._closedPromise=v(function(m,S){u._closedPromise_resolve=m,u._closedPromise_reject=S,u._closedPromiseState="pending"})}function Eg(u,m){sl(u),th(u,m)}function pE(u){sl(u),Ag(u)}function th(u,m){u._closedPromise_reject!==void 0&&(P(u._closedPromise),u._closedPromise_reject(m),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0,u._closedPromiseState="rejected")}function hE(u,m){Eg(u,m)}function Ag(u){u._closedPromise_resolve!==void 0&&(u._closedPromise_resolve(void 0),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0,u._closedPromiseState="resolved")}function ul(u){u._readyPromise=v(function(m,S){u._readyPromise_resolve=m,u._readyPromise_reject=S}),u._readyPromiseState="pending"}function ih(u,m){ul(u),Tg(u,m)}function Pg(u){ul(u),nh(u)}function Tg(u,m){u._readyPromise_reject!==void 0&&(P(u._readyPromise),u._readyPromise_reject(m),u._readyPromise_resolve=void 0,u._readyPromise_reject=void 0,u._readyPromiseState="rejected")}function dE(u){ul(u)}function mE(u,m){ih(u,m)}function nh(u){u._readyPromise_resolve!==void 0&&(u._readyPromise_resolve(void 0),u._readyPromise_resolve=void 0,u._readyPromise_reject=void 0,u._readyPromiseState="fulfilled")}var Fg=typeof DOMException<"u"?DOMException:void 0;function vE(u){if(!(typeof u=="function"||typeof u=="object"))return!1;try{return new u,!0}catch{return!1}}function gE(){var u=function(S,D){this.message=S||"",this.name=D||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return u.prototype=Object.create(Error.prototype),Object.defineProperty(u.prototype,"constructor",{value:u,writable:!0,configurable:!0}),u}var bE=vE(Fg)?Fg:gE();function Cg(u,m,S,D,G,se){var ge=Gr(u),Xe=ie(m);u._disturbed=!0;var Er=!1,Br=h(void 0);return v(function(zr,Wr){var Oa;if(se!==void 0){if(Oa=function(){var xr=new bE("Aborted","AbortError"),Yr=[];D||Yr.push(function(){return m._state==="writable"?ca(m,xr):h(void 0)}),G||Yr.push(function(){return u._state==="readable"?mi(u,xr):h(void 0)}),$t(function(){return Promise.all(Yr.map(function(ba){return ba()}))},!0,xr)},se.aborted){Oa();return}se.addEventListener("abort",Oa)}function vi(){return v(function(xr,Yr){function ba(Ni){Ni?xr():y(fs(),ba,Yr)}ba(!1)})}function fs(){return Er?h(!0):y(Xe._readyPromise,function(){return v(function(xr,Yr){nr(ge,{_chunkSteps:function(ba){Br=y(wg(Xe,ba),void 0,a),xr(!1)},_closeSteps:function(){return xr(!0)},_errorSteps:Yr})})})}if(ft(u,ge._closedPromise,function(xr){D?vn(!0,xr):$t(function(){return ca(m,xr)},!0,xr)}),ft(m,Xe._closedPromise,function(xr){G?vn(!0,xr):$t(function(){return mi(u,xr)},!0,xr)}),Li(u,ge._closedPromise,function(){S?vn():$t(function(){return tE(Xe)})}),di(m)||m._state==="closed"){var Vn=new TypeError("the destination writable stream closed before all data could be piped to it");G?vn(!0,Vn):$t(function(){return mi(u,Vn)},!0,Vn)}P(vi());function Di(){var xr=Br;return y(Br,function(){return xr!==Br?Di():void 0})}function ft(xr,Yr,ba){xr._state==="errored"?ba(xr._storedError):A(Yr,ba)}function Li(xr,Yr,ba){xr._state==="closed"?ba():w(Yr,ba)}function $t(xr,Yr,ba){if(Er)return;Er=!0,m._state==="writable"&&!di(m)?w(Di(),Ni):Ni();function Ni(){_(xr(),function(){return ga(Yr,ba)},function($n){return ga(!0,$n)})}}function vn(xr,Yr){Er||(Er=!0,m._state==="writable"&&!di(m)?w(Di(),function(){return ga(xr,Yr)}):ga(xr,Yr))}function ga(xr,Yr){xg(Xe),V(ge),se!==void 0&&se.removeEventListener("abort",Oa),xr?Wr(Yr):zr(void 0)}})}var To=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!cl(this))throw pl("desiredSize");return oh(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!cl(this))throw pl("close");if(!cs(this))throw new TypeError("The stream is not in a state that permits close");yu(this)},u.prototype.enqueue=function(m){if(m===void 0&&(m=void 0),!cl(this))throw pl("enqueue");if(!cs(this))throw new TypeError("The stream is not in a state that permits enqueue");return fl(this,m)},u.prototype.error=function(m){if(m===void 0&&(m=void 0),!cl(this))throw pl("error");Un(this,m)},u.prototype[Le]=function(m){ua(this);var S=this._cancelAlgorithm(m);return ll(this),S},u.prototype[Me]=function(m){var S=this._controlledReadableStream;if(this._queue.length>0){var D=st(this);this._closeRequested&&this._queue.length===0?(ll(this),xu(S)):bu(this),m._chunkSteps(D)}else J(S,m),bu(this)},u}();Object.defineProperties(To.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(To.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function cl(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableStream")?!1:u instanceof To}function bu(u){var m=Bg(u);if(m){if(u._pulling){u._pullAgain=!0;return}u._pulling=!0;var S=u._pullAlgorithm();_(S,function(){u._pulling=!1,u._pullAgain&&(u._pullAgain=!1,bu(u))},function(D){Un(u,D)})}}function Bg(u){var m=u._controlledReadableStream;if(!cs(u)||!u._started)return!1;if(Hn(m)&&Ke(m)>0)return!0;var S=oh(u);return S>0}function ll(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function yu(u){if(cs(u)){var m=u._controlledReadableStream;u._closeRequested=!0,u._queue.length===0&&(ll(u),xu(m))}}function fl(u,m){if(cs(u)){var S=u._controlledReadableStream;if(Hn(S)&&Ke(S)>0)qe(S,m,!1);else{var D=void 0;try{D=u._strategySizeAlgorithm(m)}catch(G){throw Un(u,G),G}try{vt(u,m,D)}catch(G){throw Un(u,G),G}}bu(u)}}function Un(u,m){var S=u._controlledReadableStream;S._state==="readable"&&(ua(u),ll(u),Og(S,m))}function oh(u){var m=u._controlledReadableStream._state;return m==="errored"?null:m==="closed"?0:u._strategyHWM-u._queueTotalSize}function yE(u){return!Bg(u)}function cs(u){var m=u._controlledReadableStream._state;return!u._closeRequested&&m==="readable"}function qg(u,m,S,D,G,se,ge){m._controlledReadableStream=u,m._queue=void 0,m._queueTotalSize=void 0,ua(m),m._started=!1,m._closeRequested=!1,m._pullAgain=!1,m._pulling=!1,m._strategySizeAlgorithm=ge,m._strategyHWM=se,m._pullAlgorithm=D,m._cancelAlgorithm=G,u._readableStreamController=m;var Xe=S();_(h(Xe),function(){m._started=!0,bu(m)},function(Er){Un(m,Er)})}function xE(u,m,S,D){var G=Object.create(To.prototype),se=function(){},ge=function(){return h(void 0)},Xe=function(){return h(void 0)};m.start!==void 0&&(se=function(){return m.start(G)}),m.pull!==void 0&&(ge=function(){return m.pull(G)}),m.cancel!==void 0&&(Xe=function(Er){return m.cancel(Er)}),qg(u,G,se,ge,Xe,S,D)}function pl(u){return new TypeError("ReadableStreamDefaultController.prototype."+u+" can only be used on a ReadableStreamDefaultController")}function wE(u,m){return va(u._readableStreamController)?_E(u):kE(u)}function kE(u,m){var S=Gr(u),D=!1,G=!1,se=!1,ge=!1,Xe,Er,Br,zr,Wr,Oa=v(function(ft){Wr=ft});function vi(){if(D)return G=!0,h(void 0);D=!0;var ft={_chunkSteps:function(Li){R(function(){G=!1;var $t=Li,vn=Li;se||fl(Br._readableStreamController,$t),ge||fl(zr._readableStreamController,vn),D=!1,G&&vi()})},_closeSteps:function(){D=!1,se||yu(Br._readableStreamController),ge||yu(zr._readableStreamController),(!se||!ge)&&Wr(void 0)},_errorSteps:function(){D=!1}};return nr(S,ft),h(void 0)}function fs(ft){if(se=!0,Xe=ft,ge){var Li=wr([Xe,Er]),$t=mi(u,Li);Wr($t)}return Oa}function Vn(ft){if(ge=!0,Er=ft,se){var Li=wr([Xe,Er]),$t=mi(u,Li);Wr($t)}return Oa}function Di(){}return Br=sh(Di,vi,fs),zr=sh(Di,vi,Vn),A(S._closedPromise,function(ft){Un(Br._readableStreamController,ft),Un(zr._readableStreamController,ft),(!se||!ge)&&Wr(void 0)}),[Br,zr]}function _E(u){var m=Gr(u),S=!1,D=!1,G=!1,se=!1,ge=!1,Xe,Er,Br,zr,Wr,Oa=v(function(ga){Wr=ga});function vi(ga){A(ga._closedPromise,function(xr){ga===m&&(Fe(Br._readableStreamController,xr),Fe(zr._readableStreamController,xr),(!se||!ge)&&Wr(void 0))})}function fs(){Ve(m)&&(V(m),m=Gr(u),vi(m));var ga={_chunkSteps:function(xr){R(function(){D=!1,G=!1;var Yr=xr,ba=xr;if(!se&&!ge)try{ba=Ia(xr)}catch(Ni){Fe(Br._readableStreamController,Ni),Fe(zr._readableStreamController,Ni),Wr(mi(u,Ni));return}se||Se(Br._readableStreamController,Yr),ge||Se(zr._readableStreamController,ba),S=!1,D?Di():G&&ft()})},_closeSteps:function(){S=!1,se||Ie(Br._readableStreamController),ge||Ie(zr._readableStreamController),Br._readableStreamController._pendingPullIntos.length>0&&Qe(Br._readableStreamController,0),zr._readableStreamController._pendingPullIntos.length>0&&Qe(zr._readableStreamController,0),(!se||!ge)&&Wr(void 0)},_errorSteps:function(){S=!1}};nr(m,ga)}function Vn(ga,xr){Je(m)&&(V(m),m=X(u),vi(m));var Yr=xr?zr:Br,ba=xr?Br:zr,Ni={_chunkSteps:function($n){R(function(){D=!1,G=!1;var ps=xr?ge:se,ju=xr?se:ge;if(ju)ps||Te(Yr._readableStreamController,$n);else{var Yg=void 0;try{Yg=Ia($n)}catch(fh){Fe(Yr._readableStreamController,fh),Fe(ba._readableStreamController,fh),Wr(mi(u,fh));return}ps||Te(Yr._readableStreamController,$n),Se(ba._readableStreamController,Yg)}S=!1,D?Di():G&&ft()})},_closeSteps:function($n){S=!1;var ps=xr?ge:se,ju=xr?se:ge;ps||Ie(Yr._readableStreamController),ju||Ie(ba._readableStreamController),$n!==void 0&&(ps||Te(Yr._readableStreamController,$n),!ju&&ba._readableStreamController._pendingPullIntos.length>0&&Qe(ba._readableStreamController,0)),(!ps||!ju)&&Wr(void 0)},_errorSteps:function(){S=!1}};lr(m,ga,Ni)}function Di(){if(S)return D=!0,h(void 0);S=!0;var ga=Ce(Br._readableStreamController);return ga===null?fs():Vn(ga._view,!1),h(void 0)}function ft(){if(S)return G=!0,h(void 0);S=!0;var ga=Ce(zr._readableStreamController);return ga===null?fs():Vn(ga._view,!0),h(void 0)}function Li(ga){if(se=!0,Xe=ga,ge){var xr=wr([Xe,Er]),Yr=mi(u,xr);Wr(Yr)}return Oa}function $t(ga){if(ge=!0,Er=ga,se){var xr=wr([Xe,Er]),Yr=mi(u,xr);Wr(Yr)}return Oa}function vn(){}return Br=Rg(vn,Di,Li),zr=Rg(vn,ft,$t),vi(m),[Br,zr]}function jE(u,m){Ze(u,m);var S=u,D=S==null?void 0:S.autoAllocateChunkSize,G=S==null?void 0:S.cancel,se=S==null?void 0:S.pull,ge=S==null?void 0:S.start,Xe=S==null?void 0:S.type;return{autoAllocateChunkSize:D===void 0?void 0:ur(D,m+" has member 'autoAllocateChunkSize' that"),cancel:G===void 0?void 0:SE(G,S,m+" has member 'cancel' that"),pull:se===void 0?void 0:EE(se,S,m+" has member 'pull' that"),start:ge===void 0?void 0:AE(ge,S,m+" has member 'start' that"),type:Xe===void 0?void 0:PE(Xe,m+" has member 'type' that")}}function SE(u,m,S){return We(u,S),function(D){return I(u,m,[D])}}function EE(u,m,S){return We(u,S),function(D){return I(u,m,[D])}}function AE(u,m,S){return We(u,S),function(D){return F(u,m,[D])}}function PE(u,m){if(u=""+u,u!=="bytes")throw new TypeError(m+" '"+u+"' is not a valid enumeration value for ReadableStreamType");return u}function TE(u,m){Ze(u,m);var S=u==null?void 0:u.mode;return{mode:S===void 0?void 0:FE(S,m+" has member 'mode' that")}}function FE(u,m){if(u=""+u,u!=="byob")throw new TypeError(m+" '"+u+"' is not a valid enumeration value for ReadableStreamReaderMode");return u}function CE(u,m){Ze(u,m);var S=u==null?void 0:u.preventCancel;return{preventCancel:Boolean(S)}}function Ig(u,m){Ze(u,m);var S=u==null?void 0:u.preventAbort,D=u==null?void 0:u.preventCancel,G=u==null?void 0:u.preventClose,se=u==null?void 0:u.signal;return se!==void 0&&BE(se,m+" has member 'signal' that"),{preventAbort:Boolean(S),preventCancel:Boolean(D),preventClose:Boolean(G),signal:se}}function BE(u,m){if(!j(u))throw new TypeError(m+" is not an AbortSignal.")}function qE(u,m){Ze(u,m);var S=u==null?void 0:u.readable;fe(S,"readable","ReadableWritablePair"),Or(S,m+" has member 'readable' that");var D=u==null?void 0:u.writable;return fe(D,"writable","ReadableWritablePair"),Tr(D,m+" has member 'writable' that"),{readable:S,writable:D}}var mn=function(){function u(m,S){m===void 0&&(m={}),S===void 0&&(S={}),m===void 0?m=null:rr(m,"First parameter");var D=yr(S,"Second parameter"),G=jE(m,"First parameter");if(uh(this),G.type==="bytes"){if(D.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");var se=sr(D,0);Ae(this,G,se)}else{var ge=L(D),se=sr(D,1);xE(this,G,se,ge)}}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Mn(this))throw Fo("locked");return Hn(this)},enumerable:!1,configurable:!0}),u.prototype.cancel=function(m){return m===void 0&&(m=void 0),Mn(this)?Hn(this)?d(new TypeError("Cannot cancel a stream that already has a reader")):mi(this,m):d(Fo("cancel"))},u.prototype.getReader=function(m){if(m===void 0&&(m=void 0),!Mn(this))throw Fo("getReader");var S=TE(m,"First parameter");return S.mode===void 0?Gr(this):X(this)},u.prototype.pipeThrough=function(m,S){if(S===void 0&&(S={}),!Mn(this))throw Fo("pipeThrough");Be(m,1,"pipeThrough");var D=qE(m,"First parameter"),G=Ig(S,"Second parameter");if(Hn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Cr(D.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");var se=Cg(this,D.writable,G.preventClose,G.preventAbort,G.preventCancel,G.signal);return P(se),D.readable},u.prototype.pipeTo=function(m,S){if(S===void 0&&(S={}),!Mn(this))return d(Fo("pipeTo"));if(m===void 0)return d("Parameter 1 is required in 'pipeTo'.");if(!Re(m))return d(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var D;try{D=Ig(S,"Second parameter")}catch(G){return d(G)}return Hn(this)?d(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Cr(m)?d(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Cg(this,m,D.preventClose,D.preventAbort,D.preventCancel,D.signal)},u.prototype.tee=function(){if(!Mn(this))throw Fo("tee");var m=wE(this);return wr(m)},u.prototype.values=function(m){if(m===void 0&&(m=void 0),!Mn(this))throw Fo("values");var S=CE(m,"First parameter");return fr(this,S.preventCancel)},u}();Object.defineProperties(mn.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(mn.prototype,r.toStringTag,{value:"ReadableStream",configurable:!0}),typeof r.asyncIterator=="symbol"&&Object.defineProperty(mn.prototype,r.asyncIterator,{value:mn.prototype.values,writable:!0,configurable:!0});function sh(u,m,S,D,G){D===void 0&&(D=1),G===void 0&&(G=function(){return 1});var se=Object.create(mn.prototype);uh(se);var ge=Object.create(To.prototype);return qg(se,ge,u,m,S,D,G),se}function Rg(u,m,S){var D=Object.create(mn.prototype);uh(D);var G=Object.create(Ra.prototype);return Ee(D,G,u,m,S,0,void 0),D}function uh(u){u._state="readable",u._reader=void 0,u._storedError=void 0,u._disturbed=!1}function Mn(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readableStreamController")?!1:u instanceof mn}function Hn(u){return u._reader!==void 0}function mi(u,m){if(u._disturbed=!0,u._state==="closed")return h(void 0);if(u._state==="errored")return d(u._storedError);xu(u);var S=u._reader;S!==void 0&&Ve(S)&&(S._readIntoRequests.forEach(function(G){G._closeSteps(void 0)}),S._readIntoRequests=new N);var D=u._readableStreamController[Le](m);return T(D,a)}function xu(u){u._state="closed";var m=u._reader;m!==void 0&&(ce(m),Je(m)&&(m._readRequests.forEach(function(S){S._closeSteps()}),m._readRequests=new N))}function Og(u,m){u._state="errored",u._storedError=m;var S=u._reader;S!==void 0&&(xe(S,m),Je(S)?(S._readRequests.forEach(function(D){D._errorSteps(m)}),S._readRequests=new N):(S._readIntoRequests.forEach(function(D){D._errorSteps(m)}),S._readIntoRequests=new N))}function Fo(u){return new TypeError("ReadableStream.prototype."+u+" can only be used on a ReadableStream")}function zg(u,m){Ze(u,m);var S=u==null?void 0:u.highWaterMark;return fe(S,"highWaterMark","QueuingStrategyInit"),{highWaterMark:ke(S)}}var Dg=function(u){return u.byteLength};try{Object.defineProperty(Dg,"name",{value:"size",configurable:!0})}catch{}var wu=function(){function u(m){Be(m,1,"ByteLengthQueuingStrategy"),m=zg(m,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=m.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!Ng(this))throw Lg("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!Ng(this))throw Lg("size");return Dg},enumerable:!1,configurable:!0}),u}();Object.defineProperties(wu.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(wu.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Lg(u){return new TypeError("ByteLengthQueuingStrategy.prototype."+u+" can only be used on a ByteLengthQueuingStrategy")}function Ng(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_byteLengthQueuingStrategyHighWaterMark")?!1:u instanceof wu}var Ug=function(){return 1};try{Object.defineProperty(Ug,"name",{value:"size",configurable:!0})}catch{}var ku=function(){function u(m){Be(m,1,"CountQueuingStrategy"),m=zg(m,"First parameter"),this._countQueuingStrategyHighWaterMark=m.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!Hg(this))throw Mg("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!Hg(this))throw Mg("size");return Ug},enumerable:!1,configurable:!0}),u}();Object.defineProperties(ku.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ku.prototype,r.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Mg(u){return new TypeError("CountQueuingStrategy.prototype."+u+" can only be used on a CountQueuingStrategy")}function Hg(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_countQueuingStrategyHighWaterMark")?!1:u instanceof ku}function IE(u,m){Ze(u,m);var S=u==null?void 0:u.flush,D=u==null?void 0:u.readableType,G=u==null?void 0:u.start,se=u==null?void 0:u.transform,ge=u==null?void 0:u.writableType;return{flush:S===void 0?void 0:RE(S,u,m+" has member 'flush' that"),readableType:D,start:G===void 0?void 0:OE(G,u,m+" has member 'start' that"),transform:se===void 0?void 0:zE(se,u,m+" has member 'transform' that"),writableType:ge}}function RE(u,m,S){return We(u,S),function(D){return I(u,m,[D])}}function OE(u,m,S){return We(u,S),function(D){return F(u,m,[D])}}function zE(u,m,S){return We(u,S),function(D,G){return I(u,m,[D,G])}}var _u=function(){function u(m,S,D){m===void 0&&(m={}),S===void 0&&(S={}),D===void 0&&(D={}),m===void 0&&(m=null);var G=yr(S,"Second parameter"),se=yr(D,"Third parameter"),ge=IE(m,"First parameter");if(ge.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(ge.writableType!==void 0)throw new RangeError("Invalid writableType specified");var Xe=sr(se,0),Er=L(se),Br=sr(G,1),zr=L(G),Wr,Oa=v(function(vi){Wr=vi});DE(this,Oa,Br,zr,Xe,Er),NE(this,ge),ge.start!==void 0?Wr(ge.start(this._transformStreamController)):Wr(void 0)}return Object.defineProperty(u.prototype,"readable",{get:function(){if(!Vg(this))throw Gg("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"writable",{get:function(){if(!Vg(this))throw Gg("writable");return this._writable},enumerable:!1,configurable:!0}),u}();Object.defineProperties(_u.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(_u.prototype,r.toStringTag,{value:"TransformStream",configurable:!0});function DE(u,m,S,D,G,se){function ge(){return m}function Xe(Oa){return HE(u,Oa)}function Er(Oa){return VE(u,Oa)}function Br(){return $E(u)}u._writable=ue(ge,Xe,Br,Er,S,D);function zr(){return WE(u)}function Wr(Oa){return dl(u,Oa),h(void 0)}u._readable=sh(ge,zr,Wr,G,se),u._backpressure=void 0,u._backpressureChangePromise=void 0,u._backpressureChangePromise_resolve=void 0,ml(u,!0),u._transformStreamController=void 0}function Vg(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_transformStreamController")?!1:u instanceof _u}function hl(u,m){Un(u._readable._readableStreamController,m),dl(u,m)}function dl(u,m){$g(u._transformStreamController),eh(u._writable._writableStreamController,m),u._backpressure&&ml(u,!1)}function ml(u,m){u._backpressureChangePromise!==void 0&&u._backpressureChangePromise_resolve(),u._backpressureChangePromise=v(function(S){u._backpressureChangePromise_resolve=S}),u._backpressure=m}var ls=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!vl(this))throw gl("desiredSize");var m=this._controlledTransformStream._readable._readableStreamController;return oh(m)},enumerable:!1,configurable:!0}),u.prototype.enqueue=function(m){if(m===void 0&&(m=void 0),!vl(this))throw gl("enqueue");Wg(this,m)},u.prototype.error=function(m){if(m===void 0&&(m=void 0),!vl(this))throw gl("error");UE(this,m)},u.prototype.terminate=function(){if(!vl(this))throw gl("terminate");ME(this)},u}();Object.defineProperties(ls.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ls.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function vl(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledTransformStream")?!1:u instanceof ls}function LE(u,m,S,D){m._controlledTransformStream=u,u._transformStreamController=m,m._transformAlgorithm=S,m._flushAlgorithm=D}function NE(u,m){var S=Object.create(ls.prototype),D=function(se){try{return Wg(S,se),h(void 0)}catch(ge){return d(ge)}},G=function(){return h(void 0)};m.transform!==void 0&&(D=function(se){return m.transform(se,S)}),m.flush!==void 0&&(G=function(){return m.flush(S)}),LE(u,S,D,G)}function $g(u){u._transformAlgorithm=void 0,u._flushAlgorithm=void 0}function Wg(u,m){var S=u._controlledTransformStream,D=S._readable._readableStreamController;if(!cs(D))throw new TypeError("Readable side is not in a state that permits enqueue");try{fl(D,m)}catch(se){throw dl(S,se),S._readable._storedError}var G=yE(D);G!==S._backpressure&&ml(S,!0)}function UE(u,m){hl(u._controlledTransformStream,m)}function Kg(u,m){var S=u._transformAlgorithm(m);return T(S,void 0,function(D){throw hl(u._controlledTransformStream,D),D})}function ME(u){var m=u._controlledTransformStream,S=m._readable._readableStreamController;yu(S);var D=new TypeError("TransformStream terminated");dl(m,D)}function HE(u,m){var S=u._transformStreamController;if(u._backpressure){var D=u._backpressureChangePromise;return T(D,function(){var G=u._writable,se=G._state;if(se==="erroring")throw G._storedError;return Kg(S,m)})}return Kg(S,m)}function VE(u,m){return hl(u,m),h(void 0)}function $E(u){var m=u._readable,S=u._transformStreamController,D=S._flushAlgorithm();return $g(S),T(D,function(){if(m._state==="errored")throw m._storedError;yu(m._readableStreamController)},function(G){throw hl(u,G),m._storedError})}function WE(u){return ml(u,!1),u._backpressureChangePromise}function gl(u){return new TypeError("TransformStreamDefaultController.prototype."+u+" can only be used on a TransformStreamDefaultController")}function Gg(u){return new TypeError("TransformStream.prototype."+u+" can only be used on a TransformStream")}var ch={ReadableStream:mn,ReadableStreamDefaultController:To,ReadableByteStreamController:Ra,ReadableStreamBYOBRequest:da,ReadableStreamDefaultReader:Ye,ReadableStreamBYOBReader:ne,WritableStream:H,WritableStreamDefaultController:Ao,WritableStreamDefaultWriter:us,ByteLengthQueuingStrategy:wu,CountQueuingStrategy:ku,TransformStream:_u,TransformStreamDefaultController:ls};if(typeof t<"u")for(var lh in ch)Object.prototype.hasOwnProperty.call(ch,lh)&&Object.defineProperty(t,lh,{value:ch[lh],writable:!0,configurable:!0});e.ByteLengthQueuingStrategy=wu,e.CountQueuingStrategy=ku,e.ReadableByteStreamController=Ra,e.ReadableStream=mn,e.ReadableStreamBYOBReader=ne,e.ReadableStreamBYOBRequest=da,e.ReadableStreamDefaultController=To,e.ReadableStreamDefaultReader=Ye,e.TransformStream=_u,e.TransformStreamDefaultController=ls,e.WritableStream=H,e.WritableStreamDefaultController=Ao,e.WritableStreamDefaultWriter=us,Object.defineProperty(e,"__esModule",{value:!0})})});var On=O(qt=>{"use strict";var DU=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function LU(e,r){return Object.prototype.hasOwnProperty.call(e,r)}qt.assign=function(e){for(var r=Array.prototype.slice.call(arguments,1);r.length;){var a=r.shift();if(a){if(typeof a!="object")throw new TypeError(a+"must be non-object");for(var i in a)LU(a,i)&&(e[i]=a[i])}}return e};qt.shrinkBuf=function(e,r){return e.length===r?e:e.subarray?e.subarray(0,r):(e.length=r,e)};var NU={arraySet:function(e,r,a,i,t){if(r.subarray&&e.subarray){e.set(r.subarray(a,a+i),t);return}for(var n=0;n<i;n++)e[t+n]=r[a+n]},flattenChunks:function(e){var r,a,i,t,n,o;for(i=0,r=0,a=e.length;r<a;r++)i+=e[r].length;for(o=new Uint8Array(i),t=0,r=0,a=e.length;r<a;r++)n=e[r],o.set(n,t),t+=n.length;return o}},UU={arraySet:function(e,r,a,i,t){for(var n=0;n<i;n++)e[t+n]=r[a+n]},flattenChunks:function(e){return[].concat.apply([],e)}};qt.setTyped=function(e){e?(qt.Buf8=Uint8Array,qt.Buf16=Uint16Array,qt.Buf32=Int32Array,qt.assign(qt,NU)):(qt.Buf8=Array,qt.Buf16=Array,qt.Buf32=Array,qt.assign(qt,UU))};qt.setTyped(DU)});var C4=O(cu=>{"use strict";var MU=On(),HU=4,c4=0,l4=1,VU=2;function uu(e){for(var r=e.length;--r>=0;)e[r]=0}var $U=0,v4=1,WU=2,KU=3,GU=258,U0=29,Vc=256,Nc=Vc+1+U0,su=30,M0=19,g4=2*Nc+1,Xo=15,R0=16,YU=7,H0=256,b4=16,y4=17,x4=18,L0=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Rp=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ZU=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],w4=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],QU=512,zn=new Array((Nc+2)*2);uu(zn);var Lc=new Array(su*2);uu(Lc);var Uc=new Array(QU);uu(Uc);var Mc=new Array(GU-KU+1);uu(Mc);var V0=new Array(U0);uu(V0);var Op=new Array(su);uu(Op);function O0(e,r,a,i,t){this.static_tree=e,this.extra_bits=r,this.extra_base=a,this.elems=i,this.max_length=t,this.has_stree=e&&e.length}var k4,_4,j4;function z0(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}function S4(e){return e<256?Uc[e]:Uc[256+(e>>>7)]}function Hc(e,r){e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255}function Ht(e,r,a){e.bi_valid>R0-a?(e.bi_buf|=r<<e.bi_valid&65535,Hc(e,e.bi_buf),e.bi_buf=r>>R0-e.bi_valid,e.bi_valid+=a-R0):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=a)}function cn(e,r,a){Ht(e,a[r*2],a[r*2+1])}function E4(e,r){var a=0;do a|=e&1,e>>>=1,a<<=1;while(--r>0);return a>>>1}function XU(e){e.bi_valid===16?(Hc(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function JU(e,r){var a=r.dyn_tree,i=r.max_code,t=r.stat_desc.static_tree,n=r.stat_desc.has_stree,o=r.stat_desc.extra_bits,s=r.stat_desc.extra_base,c=r.stat_desc.max_length,l,f,v,h,d,y,_=0;for(h=0;h<=Xo;h++)e.bl_count[h]=0;for(a[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<g4;l++)f=e.heap[l],h=a[a[f*2+1]*2+1]+1,h>c&&(h=c,_++),a[f*2+1]=h,!(f>i)&&(e.bl_count[h]++,d=0,f>=s&&(d=o[f-s]),y=a[f*2],e.opt_len+=y*(h+d),n&&(e.static_len+=y*(t[f*2+1]+d)));if(_!==0){do{for(h=c-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[c]--,_-=2}while(_>0);for(h=c;h!==0;h--)for(f=e.bl_count[h];f!==0;)v=e.heap[--l],!(v>i)&&(a[v*2+1]!==h&&(e.opt_len+=(h-a[v*2+1])*a[v*2],a[v*2+1]=h),f--)}}function A4(e,r,a){var i=new Array(Xo+1),t=0,n,o;for(n=1;n<=Xo;n++)i[n]=t=t+a[n-1]<<1;for(o=0;o<=r;o++){var s=e[o*2+1];s!==0&&(e[o*2]=E4(i[s]++,s))}}function eM(){var e,r,a,i,t,n=new Array(Xo+1);for(a=0,i=0;i<U0-1;i++)for(V0[i]=a,e=0;e<1<<L0[i];e++)Mc[a++]=i;for(Mc[a-1]=i,t=0,i=0;i<16;i++)for(Op[i]=t,e=0;e<1<<Rp[i];e++)Uc[t++]=i;for(t>>=7;i<su;i++)for(Op[i]=t<<7,e=0;e<1<<Rp[i]-7;e++)Uc[256+t++]=i;for(r=0;r<=Xo;r++)n[r]=0;for(e=0;e<=143;)zn[e*2+1]=8,e++,n[8]++;for(;e<=255;)zn[e*2+1]=9,e++,n[9]++;for(;e<=279;)zn[e*2+1]=7,e++,n[7]++;for(;e<=287;)zn[e*2+1]=8,e++,n[8]++;for(A4(zn,Nc+1,n),e=0;e<su;e++)Lc[e*2+1]=5,Lc[e*2]=E4(e,5);k4=new O0(zn,L0,Vc+1,Nc,Xo),_4=new O0(Lc,Rp,0,su,Xo),j4=new O0(new Array(0),ZU,0,M0,YU)}function P4(e){var r;for(r=0;r<Nc;r++)e.dyn_ltree[r*2]=0;for(r=0;r<su;r++)e.dyn_dtree[r*2]=0;for(r=0;r<M0;r++)e.bl_tree[r*2]=0;e.dyn_ltree[H0*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function T4(e){e.bi_valid>8?Hc(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function rM(e,r,a,i){T4(e),i&&(Hc(e,a),Hc(e,~a)),MU.arraySet(e.pending_buf,e.window,r,a,e.pending),e.pending+=a}function f4(e,r,a,i){var t=r*2,n=a*2;return e[t]<e[n]||e[t]===e[n]&&i[r]<=i[a]}function D0(e,r,a){for(var i=e.heap[a],t=a<<1;t<=e.heap_len&&(t<e.heap_len&&f4(r,e.heap[t+1],e.heap[t],e.depth)&&t++,!f4(r,i,e.heap[t],e.depth));)e.heap[a]=e.heap[t],a=t,t<<=1;e.heap[a]=i}function p4(e,r,a){var i,t,n=0,o,s;if(e.last_lit!==0)do i=e.pending_buf[e.d_buf+n*2]<<8|e.pending_buf[e.d_buf+n*2+1],t=e.pending_buf[e.l_buf+n],n++,i===0?cn(e,t,r):(o=Mc[t],cn(e,o+Vc+1,r),s=L0[o],s!==0&&(t-=V0[o],Ht(e,t,s)),i--,o=S4(i),cn(e,o,a),s=Rp[o],s!==0&&(i-=Op[o],Ht(e,i,s)));while(n<e.last_lit);cn(e,H0,r)}function N0(e,r){var a=r.dyn_tree,i=r.stat_desc.static_tree,t=r.stat_desc.has_stree,n=r.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=g4,o=0;o<n;o++)a[o*2]!==0?(e.heap[++e.heap_len]=c=o,e.depth[o]=0):a[o*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,a[l*2]=1,e.depth[l]=0,e.opt_len--,t&&(e.static_len-=i[l*2+1]);for(r.max_code=c,o=e.heap_len>>1;o>=1;o--)D0(e,a,o);l=n;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],D0(e,a,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,a[l*2]=a[o*2]+a[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,a[o*2+1]=a[s*2+1]=l,e.heap[1]=l++,D0(e,a,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],JU(e,r),A4(a,c,e.bl_count)}function h4(e,r,a){var i,t=-1,n,o=r[0*2+1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r[(a+1)*2+1]=65535,i=0;i<=a;i++)n=o,o=r[(i+1)*2+1],!(++s<c&&n===o)&&(s<l?e.bl_tree[n*2]+=s:n!==0?(n!==t&&e.bl_tree[n*2]++,e.bl_tree[b4*2]++):s<=10?e.bl_tree[y4*2]++:e.bl_tree[x4*2]++,s=0,t=n,o===0?(c=138,l=3):n===o?(c=6,l=3):(c=7,l=4))}function d4(e,r,a){var i,t=-1,n,o=r[0*2+1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),i=0;i<=a;i++)if(n=o,o=r[(i+1)*2+1],!(++s<c&&n===o)){if(s<l)do cn(e,n,e.bl_tree);while(--s!==0);else n!==0?(n!==t&&(cn(e,n,e.bl_tree),s--),cn(e,b4,e.bl_tree),Ht(e,s-3,2)):s<=10?(cn(e,y4,e.bl_tree),Ht(e,s-3,3)):(cn(e,x4,e.bl_tree),Ht(e,s-11,7));s=0,t=n,o===0?(c=138,l=3):n===o?(c=6,l=3):(c=7,l=4)}}function aM(e){var r;for(h4(e,e.dyn_ltree,e.l_desc.max_code),h4(e,e.dyn_dtree,e.d_desc.max_code),N0(e,e.bl_desc),r=M0-1;r>=3&&e.bl_tree[w4[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r}function tM(e,r,a,i){var t;for(Ht(e,r-257,5),Ht(e,a-1,5),Ht(e,i-4,4),t=0;t<i;t++)Ht(e,e.bl_tree[w4[t]*2+1],3);d4(e,e.dyn_ltree,r-1),d4(e,e.dyn_dtree,a-1)}function iM(e){var r=4093624447,a;for(a=0;a<=31;a++,r>>>=1)if(r&1&&e.dyn_ltree[a*2]!==0)return c4;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return l4;for(a=32;a<Vc;a++)if(e.dyn_ltree[a*2]!==0)return l4;return c4}var m4=!1;function nM(e){m4||(eM(),m4=!0),e.l_desc=new z0(e.dyn_ltree,k4),e.d_desc=new z0(e.dyn_dtree,_4),e.bl_desc=new z0(e.bl_tree,j4),e.bi_buf=0,e.bi_valid=0,P4(e)}function F4(e,r,a,i){Ht(e,($U<<1)+(i?1:0),3),rM(e,r,a,!0)}function oM(e){Ht(e,v4<<1,3),cn(e,H0,zn),XU(e)}function sM(e,r,a,i){var t,n,o=0;e.level>0?(e.strm.data_type===VU&&(e.strm.data_type=iM(e)),N0(e,e.l_desc),N0(e,e.d_desc),o=aM(e),t=e.opt_len+3+7>>>3,n=e.static_len+3+7>>>3,n<=t&&(t=n)):t=n=a+5,a+4<=t&&r!==-1?F4(e,r,a,i):e.strategy===HU||n===t?(Ht(e,(v4<<1)+(i?1:0),3),p4(e,zn,Lc)):(Ht(e,(WU<<1)+(i?1:0),3),tM(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),p4(e,e.dyn_ltree,e.dyn_dtree)),P4(e),i&&T4(e)}function uM(e,r,a){return e.pending_buf[e.d_buf+e.last_lit*2]=r>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=r&255,e.pending_buf[e.l_buf+e.last_lit]=a&255,e.last_lit++,r===0?e.dyn_ltree[a*2]++:(e.matches++,r--,e.dyn_ltree[(Mc[a]+Vc+1)*2]++,e.dyn_dtree[S4(r)*2]++),e.last_lit===e.lit_bufsize-1}cu._tr_init=nM;cu._tr_stored_block=F4;cu._tr_flush_block=sM;cu._tr_tally=uM;cu._tr_align=oM});var $0=O((jQ,B4)=>{"use strict";function cM(e,r,a,i){for(var t=e&65535|0,n=e>>>16&65535|0,o=0;a!==0;){o=a>2e3?2e3:a,a-=o;do t=t+r[i++]|0,n=n+t|0;while(--o);t%=65521,n%=65521}return t|n<<16|0}B4.exports=cM});var W0=O((SQ,q4)=>{"use strict";function lM(){for(var e,r=[],a=0;a<256;a++){e=a;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;r[a]=e}return r}var fM=lM();function pM(e,r,a,i){var t=fM,n=i+a;e^=-1;for(var o=i;o<n;o++)e=e>>>8^t[(e^r[o])&255];return e^-1}q4.exports=pM});var zp=O((EQ,I4)=>{"use strict";I4.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var H4=O(pn=>{"use strict";var It=On(),li=C4(),D4=$0(),yo=W0(),hM=zp(),as=0,dM=1,mM=3,jo=4,R4=5,fn=0,O4=1,fi=-2,vM=-3,K0=-5,gM=-1,bM=1,Dp=2,yM=3,xM=4,wM=0,kM=2,Mp=8,_M=9,jM=15,SM=8,EM=29,AM=256,Y0=AM+1+EM,PM=30,TM=19,FM=2*Y0+1,CM=15,Ur=3,ko=258,Oi=ko+Ur+1,BM=32,Hp=42,Z0=69,Lp=73,Np=91,Up=103,Jo=113,Wc=666,Xa=1,Kc=2,es=3,pu=4,qM=3;function _o(e,r){return e.msg=hM[r],r}function z4(e){return(e<<1)-(e>4?9:0)}function wo(e){for(var r=e.length;--r>=0;)e[r]=0}function xo(e){var r=e.state,a=r.pending;a>e.avail_out&&(a=e.avail_out),a!==0&&(It.arraySet(e.output,r.pending_buf,r.pending_out,a,e.next_out),e.next_out+=a,r.pending_out+=a,e.total_out+=a,e.avail_out-=a,r.pending-=a,r.pending===0&&(r.pending_out=0))}function mt(e,r){li._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,xo(e.strm)}function Kr(e,r){e.pending_buf[e.pending++]=r}function $c(e,r){e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255}function IM(e,r,a,i){var t=e.avail_in;return t>i&&(t=i),t===0?0:(e.avail_in-=t,It.arraySet(r,e.input,e.next_in,t,a),e.state.wrap===1?e.adler=D4(e.adler,r,t,a):e.state.wrap===2&&(e.adler=yo(e.adler,r,t,a)),e.next_in+=t,e.total_in+=t,t)}function L4(e,r){var a=e.max_chain_length,i=e.strstart,t,n,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-Oi?e.strstart-(e.w_size-Oi):0,l=e.window,f=e.w_mask,v=e.prev,h=e.strstart+ko,d=l[i+o-1],y=l[i+o];e.prev_length>=e.good_match&&(a>>=2),s>e.lookahead&&(s=e.lookahead);do if(t=r,!(l[t+o]!==y||l[t+o-1]!==d||l[t]!==l[i]||l[++t]!==l[i+1])){i+=2,t++;do;while(l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&i<h);if(n=ko-(h-i),i=h-ko,n>o){if(e.match_start=r,o=n,n>=s)break;d=l[i+o-1],y=l[i+o]}}while((r=v[r&f])>c&&--a!==0);return o<=e.lookahead?o:e.lookahead}function rs(e){var r=e.w_size,a,i,t,n,o;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-Oi)){It.arraySet(e.window,e.window,r,r,0),e.match_start-=r,e.strstart-=r,e.block_start-=r,i=e.hash_size,a=i;do t=e.head[--a],e.head[a]=t>=r?t-r:0;while(--i);i=r,a=i;do t=e.prev[--a],e.prev[a]=t>=r?t-r:0;while(--i);n+=r}if(e.strm.avail_in===0)break;if(i=IM(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=i,e.lookahead+e.insert>=Ur)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+Ur-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<Ur)););}while(e.lookahead<Oi&&e.strm.avail_in!==0)}function RM(e,r){var a=65535;for(a>e.pending_buf_size-5&&(a=e.pending_buf_size-5);;){if(e.lookahead<=1){if(rs(e),e.lookahead===0&&r===as)return Xa;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+a;if((e.strstart===0||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,mt(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Oi&&(mt(e,!1),e.strm.avail_out===0))return Xa}return e.insert=0,r===jo?(mt(e,!0),e.strm.avail_out===0?es:pu):(e.strstart>e.block_start&&(mt(e,!1),e.strm.avail_out===0),Xa)}function G0(e,r){for(var a,i;;){if(e.lookahead<Oi){if(rs(e),e.lookahead<Oi&&r===as)return Xa;if(e.lookahead===0)break}if(a=0,e.lookahead>=Ur&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Ur-1])&e.hash_mask,a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),a!==0&&e.strstart-a<=e.w_size-Oi&&(e.match_length=L4(e,a)),e.match_length>=Ur)if(i=li._tr_tally(e,e.strstart-e.match_start,e.match_length-Ur),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Ur){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Ur-1])&e.hash_mask,a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=li._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(mt(e,!1),e.strm.avail_out===0))return Xa}return e.insert=e.strstart<Ur-1?e.strstart:Ur-1,r===jo?(mt(e,!0),e.strm.avail_out===0?es:pu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Xa:Kc}function lu(e,r){for(var a,i,t;;){if(e.lookahead<Oi){if(rs(e),e.lookahead<Oi&&r===as)return Xa;if(e.lookahead===0)break}if(a=0,e.lookahead>=Ur&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Ur-1])&e.hash_mask,a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=Ur-1,a!==0&&e.prev_length<e.max_lazy_match&&e.strstart-a<=e.w_size-Oi&&(e.match_length=L4(e,a),e.match_length<=5&&(e.strategy===bM||e.match_length===Ur&&e.strstart-e.match_start>4096)&&(e.match_length=Ur-1)),e.prev_length>=Ur&&e.match_length<=e.prev_length){t=e.strstart+e.lookahead-Ur,i=li._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-Ur),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=t&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Ur-1])&e.hash_mask,a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=Ur-1,e.strstart++,i&&(mt(e,!1),e.strm.avail_out===0))return Xa}else if(e.match_available){if(i=li._tr_tally(e,0,e.window[e.strstart-1]),i&&mt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Xa}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=li._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Ur-1?e.strstart:Ur-1,r===jo?(mt(e,!0),e.strm.avail_out===0?es:pu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Xa:Kc}function OM(e,r){for(var a,i,t,n,o=e.window;;){if(e.lookahead<=ko){if(rs(e),e.lookahead<=ko&&r===as)return Xa;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=Ur&&e.strstart>0&&(t=e.strstart-1,i=o[t],i===o[++t]&&i===o[++t]&&i===o[++t])){n=e.strstart+ko;do;while(i===o[++t]&&i===o[++t]&&i===o[++t]&&i===o[++t]&&i===o[++t]&&i===o[++t]&&i===o[++t]&&i===o[++t]&&t<n);e.match_length=ko-(n-t),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Ur?(a=li._tr_tally(e,1,e.match_length-Ur),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(a=li._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),a&&(mt(e,!1),e.strm.avail_out===0))return Xa}return e.insert=0,r===jo?(mt(e,!0),e.strm.avail_out===0?es:pu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Xa:Kc}function zM(e,r){for(var a;;){if(e.lookahead===0&&(rs(e),e.lookahead===0)){if(r===as)return Xa;break}if(e.match_length=0,a=li._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,a&&(mt(e,!1),e.strm.avail_out===0))return Xa}return e.insert=0,r===jo?(mt(e,!0),e.strm.avail_out===0?es:pu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Xa:Kc}function ln(e,r,a,i,t){this.good_length=e,this.max_lazy=r,this.nice_length=a,this.max_chain=i,this.func=t}var fu;fu=[new ln(0,0,0,0,RM),new ln(4,4,8,4,G0),new ln(4,5,16,8,G0),new ln(4,6,32,32,G0),new ln(4,4,16,16,lu),new ln(8,16,32,32,lu),new ln(8,16,128,128,lu),new ln(8,32,128,256,lu),new ln(32,128,258,1024,lu),new ln(32,258,258,4096,lu)];function DM(e){e.window_size=2*e.w_size,wo(e.head),e.max_lazy_match=fu[e.level].max_lazy,e.good_match=fu[e.level].good_length,e.nice_match=fu[e.level].nice_length,e.max_chain_length=fu[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=Ur-1,e.match_available=0,e.ins_h=0}function LM(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Mp,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new It.Buf16(FM*2),this.dyn_dtree=new It.Buf16((2*PM+1)*2),this.bl_tree=new It.Buf16((2*TM+1)*2),wo(this.dyn_ltree),wo(this.dyn_dtree),wo(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new It.Buf16(CM+1),this.heap=new It.Buf16(2*Y0+1),wo(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new It.Buf16(2*Y0+1),wo(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function N4(e){var r;return!e||!e.state?_o(e,fi):(e.total_in=e.total_out=0,e.data_type=kM,r=e.state,r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?Hp:Jo,e.adler=r.wrap===2?0:1,r.last_flush=as,li._tr_init(r),fn)}function U4(e){var r=N4(e);return r===fn&&DM(e.state),r}function NM(e,r){return!e||!e.state||e.state.wrap!==2?fi:(e.state.gzhead=r,fn)}function M4(e,r,a,i,t,n){if(!e)return fi;var o=1;if(r===gM&&(r=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),t<1||t>_M||a!==Mp||i<8||i>15||r<0||r>9||n<0||n>xM)return _o(e,fi);i===8&&(i=9);var s=new LM;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=i,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=t+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+Ur-1)/Ur),s.window=new It.Buf8(s.w_size*2),s.head=new It.Buf16(s.hash_size),s.prev=new It.Buf16(s.w_size),s.lit_bufsize=1<<t+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new It.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=(1+2)*s.lit_bufsize,s.level=r,s.strategy=n,s.method=a,U4(e)}function UM(e,r){return M4(e,r,Mp,jM,SM,wM)}function MM(e,r){var a,i,t,n;if(!e||!e.state||r>R4||r<0)return e?_o(e,fi):fi;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===Wc&&r!==jo)return _o(e,e.avail_out===0?K0:fi);if(i.strm=e,a=i.last_flush,i.last_flush=r,i.status===Hp)if(i.wrap===2)e.adler=0,Kr(i,31),Kr(i,139),Kr(i,8),i.gzhead?(Kr(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),Kr(i,i.gzhead.time&255),Kr(i,i.gzhead.time>>8&255),Kr(i,i.gzhead.time>>16&255),Kr(i,i.gzhead.time>>24&255),Kr(i,i.level===9?2:i.strategy>=Dp||i.level<2?4:0),Kr(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(Kr(i,i.gzhead.extra.length&255),Kr(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=yo(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=Z0):(Kr(i,0),Kr(i,0),Kr(i,0),Kr(i,0),Kr(i,0),Kr(i,i.level===9?2:i.strategy>=Dp||i.level<2?4:0),Kr(i,qM),i.status=Jo);else{var o=Mp+(i.w_bits-8<<4)<<8,s=-1;i.strategy>=Dp||i.level<2?s=0:i.level<6?s=1:i.level===6?s=2:s=3,o|=s<<6,i.strstart!==0&&(o|=BM),o+=31-o%31,i.status=Jo,$c(i,o),i.strstart!==0&&($c(i,e.adler>>>16),$c(i,e.adler&65535)),e.adler=1}if(i.status===Z0)if(i.gzhead.extra){for(t=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>t&&(e.adler=yo(e.adler,i.pending_buf,i.pending-t,t)),xo(e),t=i.pending,i.pending===i.pending_buf_size));)Kr(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>t&&(e.adler=yo(e.adler,i.pending_buf,i.pending-t,t)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=Lp)}else i.status=Lp;if(i.status===Lp)if(i.gzhead.name){t=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>t&&(e.adler=yo(e.adler,i.pending_buf,i.pending-t,t)),xo(e),t=i.pending,i.pending===i.pending_buf_size)){n=1;break}i.gzindex<i.gzhead.name.length?n=i.gzhead.name.charCodeAt(i.gzindex++)&255:n=0,Kr(i,n)}while(n!==0);i.gzhead.hcrc&&i.pending>t&&(e.adler=yo(e.adler,i.pending_buf,i.pending-t,t)),n===0&&(i.gzindex=0,i.status=Np)}else i.status=Np;if(i.status===Np)if(i.gzhead.comment){t=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>t&&(e.adler=yo(e.adler,i.pending_buf,i.pending-t,t)),xo(e),t=i.pending,i.pending===i.pending_buf_size)){n=1;break}i.gzindex<i.gzhead.comment.length?n=i.gzhead.comment.charCodeAt(i.gzindex++)&255:n=0,Kr(i,n)}while(n!==0);i.gzhead.hcrc&&i.pending>t&&(e.adler=yo(e.adler,i.pending_buf,i.pending-t,t)),n===0&&(i.status=Up)}else i.status=Up;if(i.status===Up&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&xo(e),i.pending+2<=i.pending_buf_size&&(Kr(i,e.adler&255),Kr(i,e.adler>>8&255),e.adler=0,i.status=Jo)):i.status=Jo),i.pending!==0){if(xo(e),e.avail_out===0)return i.last_flush=-1,fn}else if(e.avail_in===0&&z4(r)<=z4(a)&&r!==jo)return _o(e,K0);if(i.status===Wc&&e.avail_in!==0)return _o(e,K0);if(e.avail_in!==0||i.lookahead!==0||r!==as&&i.status!==Wc){var c=i.strategy===Dp?zM(i,r):i.strategy===yM?OM(i,r):fu[i.level].func(i,r);if((c===es||c===pu)&&(i.status=Wc),c===Xa||c===es)return e.avail_out===0&&(i.last_flush=-1),fn;if(c===Kc&&(r===dM?li._tr_align(i):r!==R4&&(li._tr_stored_block(i,0,0,!1),r===mM&&(wo(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),xo(e),e.avail_out===0))return i.last_flush=-1,fn}return r!==jo?fn:i.wrap<=0?O4:(i.wrap===2?(Kr(i,e.adler&255),Kr(i,e.adler>>8&255),Kr(i,e.adler>>16&255),Kr(i,e.adler>>24&255),Kr(i,e.total_in&255),Kr(i,e.total_in>>8&255),Kr(i,e.total_in>>16&255),Kr(i,e.total_in>>24&255)):($c(i,e.adler>>>16),$c(i,e.adler&65535)),xo(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?fn:O4)}function HM(e){var r;return!e||!e.state?fi:(r=e.state.status,r!==Hp&&r!==Z0&&r!==Lp&&r!==Np&&r!==Up&&r!==Jo&&r!==Wc?_o(e,fi):(e.state=null,r===Jo?_o(e,vM):fn))}function VM(e,r){var a=r.length,i,t,n,o,s,c,l,f;if(!e||!e.state||(i=e.state,o=i.wrap,o===2||o===1&&i.status!==Hp||i.lookahead))return fi;for(o===1&&(e.adler=D4(e.adler,r,a,0)),i.wrap=0,a>=i.w_size&&(o===0&&(wo(i.head),i.strstart=0,i.block_start=0,i.insert=0),f=new It.Buf8(i.w_size),It.arraySet(f,r,a-i.w_size,i.w_size,0),r=f,a=i.w_size),s=e.avail_in,c=e.next_in,l=e.input,e.avail_in=a,e.next_in=0,e.input=r,rs(i);i.lookahead>=Ur;){t=i.strstart,n=i.lookahead-(Ur-1);do i.ins_h=(i.ins_h<<i.hash_shift^i.window[t+Ur-1])&i.hash_mask,i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++;while(--n);i.strstart=t,i.lookahead=Ur-1,rs(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=Ur-1,i.match_available=0,e.next_in=c,e.input=l,e.avail_in=s,i.wrap=o,fn}pn.deflateInit=UM;pn.deflateInit2=M4;pn.deflateReset=U4;pn.deflateResetKeep=N4;pn.deflateSetHeader=NM;pn.deflate=MM;pn.deflateEnd=HM;pn.deflateSetDictionary=VM;pn.deflateInfo="pako deflate (from Nodeca project)"});var Q0=O(hu=>{"use strict";var Vp=On(),V4=!0,$4=!0;try{String.fromCharCode.apply(null,[0])}catch{V4=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{$4=!1}var Gc=new Vp.Buf8(256);for(Dn=0;Dn<256;Dn++)Gc[Dn]=Dn>=252?6:Dn>=248?5:Dn>=240?4:Dn>=224?3:Dn>=192?2:1;var Dn;Gc[254]=Gc[254]=1;hu.string2buf=function(e){var r,a,i,t,n,o=e.length,s=0;for(t=0;t<o;t++)a=e.charCodeAt(t),(a&64512)===55296&&t+1<o&&(i=e.charCodeAt(t+1),(i&64512)===56320&&(a=65536+(a-55296<<10)+(i-56320),t++)),s+=a<128?1:a<2048?2:a<65536?3:4;for(r=new Vp.Buf8(s),n=0,t=0;n<s;t++)a=e.charCodeAt(t),(a&64512)===55296&&t+1<o&&(i=e.charCodeAt(t+1),(i&64512)===56320&&(a=65536+(a-55296<<10)+(i-56320),t++)),a<128?r[n++]=a:a<2048?(r[n++]=192|a>>>6,r[n++]=128|a&63):a<65536?(r[n++]=224|a>>>12,r[n++]=128|a>>>6&63,r[n++]=128|a&63):(r[n++]=240|a>>>18,r[n++]=128|a>>>12&63,r[n++]=128|a>>>6&63,r[n++]=128|a&63);return r};function W4(e,r){if(r<65534&&(e.subarray&&$4||!e.subarray&&V4))return String.fromCharCode.apply(null,Vp.shrinkBuf(e,r));for(var a="",i=0;i<r;i++)a+=String.fromCharCode(e[i]);return a}hu.buf2binstring=function(e){return W4(e,e.length)};hu.binstring2buf=function(e){for(var r=new Vp.Buf8(e.length),a=0,i=r.length;a<i;a++)r[a]=e.charCodeAt(a);return r};hu.buf2string=function(e,r){var a,i,t,n,o=r||e.length,s=new Array(o*2);for(i=0,a=0;a<o;){if(t=e[a++],t<128){s[i++]=t;continue}if(n=Gc[t],n>4){s[i++]=65533,a+=n-1;continue}for(t&=n===2?31:n===3?15:7;n>1&&a<o;)t=t<<6|e[a++]&63,n--;if(n>1){s[i++]=65533;continue}t<65536?s[i++]=t:(t-=65536,s[i++]=55296|t>>10&1023,s[i++]=56320|t&1023)}return W4(s,i)};hu.utf8border=function(e,r){var a;for(r=r||e.length,r>e.length&&(r=e.length),a=r-1;a>=0&&(e[a]&192)===128;)a--;return a<0||a===0?r:a+Gc[e[a]]>r?a:r}});var X0=O((TQ,K4)=>{"use strict";function $M(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}K4.exports=$M});var Q4=O(Qc=>{"use strict";var Yc=H4(),Zc=On(),eg=Q0(),rg=zp(),WM=X0(),Z4=Object.prototype.toString,KM=0,J0=4,du=0,G4=1,Y4=2,GM=-1,YM=0,ZM=8;function ts(e){if(!(this instanceof ts))return new ts(e);this.options=Zc.assign({level:GM,method:ZM,chunkSize:16384,windowBits:15,memLevel:8,strategy:YM,to:""},e||{});var r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new WM,this.strm.avail_out=0;var a=Yc.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(a!==du)throw new Error(rg[a]);if(r.header&&Yc.deflateSetHeader(this.strm,r.header),r.dictionary){var i;if(typeof r.dictionary=="string"?i=eg.string2buf(r.dictionary):Z4.call(r.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(r.dictionary):i=r.dictionary,a=Yc.deflateSetDictionary(this.strm,i),a!==du)throw new Error(rg[a]);this._dict_set=!0}}ts.prototype.push=function(e,r){var a=this.strm,i=this.options.chunkSize,t,n;if(this.ended)return!1;n=r===~~r?r:r===!0?J0:KM,typeof e=="string"?a.input=eg.string2buf(e):Z4.call(e)==="[object ArrayBuffer]"?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(a.avail_out===0&&(a.output=new Zc.Buf8(i),a.next_out=0,a.avail_out=i),t=Yc.deflate(a,n),t!==G4&&t!==du)return this.onEnd(t),this.ended=!0,!1;(a.avail_out===0||a.avail_in===0&&(n===J0||n===Y4))&&(this.options.to==="string"?this.onData(eg.buf2binstring(Zc.shrinkBuf(a.output,a.next_out))):this.onData(Zc.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||a.avail_out===0)&&t!==G4);return n===J0?(t=Yc.deflateEnd(this.strm),this.onEnd(t),this.ended=!0,t===du):(n===Y4&&(this.onEnd(du),a.avail_out=0),!0)};ts.prototype.onData=function(e){this.chunks.push(e)};ts.prototype.onEnd=function(e){e===du&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Zc.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function ag(e,r){var a=new ts(r);if(a.push(e,!0),a.err)throw a.msg||rg[a.err];return a.result}function QM(e,r){return r=r||{},r.raw=!0,ag(e,r)}function XM(e,r){return r=r||{},r.gzip=!0,ag(e,r)}Qc.Deflate=ts;Qc.deflate=ag;Qc.deflateRaw=QM;Qc.gzip=XM});var J4=O((CQ,X4)=>{"use strict";var $p=30,JM=12;X4.exports=function(r,a){var i,t,n,o,s,c,l,f,v,h,d,y,_,w,A,T,P,R,F,I,z,N,M,K,V;i=r.state,t=r.next_in,K=r.input,n=t+(r.avail_in-5),o=r.next_out,V=r.output,s=o-(a-r.avail_out),c=o+(r.avail_out-257),l=i.dmax,f=i.wsize,v=i.whave,h=i.wnext,d=i.window,y=i.hold,_=i.bits,w=i.lencode,A=i.distcode,T=(1<<i.lenbits)-1,P=(1<<i.distbits)-1;e:do{_<15&&(y+=K[t++]<<_,_+=8,y+=K[t++]<<_,_+=8),R=w[y&T];r:for(;;){if(F=R>>>24,y>>>=F,_-=F,F=R>>>16&255,F===0)V[o++]=R&65535;else if(F&16){I=R&65535,F&=15,F&&(_<F&&(y+=K[t++]<<_,_+=8),I+=y&(1<<F)-1,y>>>=F,_-=F),_<15&&(y+=K[t++]<<_,_+=8,y+=K[t++]<<_,_+=8),R=A[y&P];a:for(;;){if(F=R>>>24,y>>>=F,_-=F,F=R>>>16&255,F&16){if(z=R&65535,F&=15,_<F&&(y+=K[t++]<<_,_+=8,_<F&&(y+=K[t++]<<_,_+=8)),z+=y&(1<<F)-1,z>l){r.msg="invalid distance too far back",i.mode=$p;break e}if(y>>>=F,_-=F,F=o-s,z>F){if(F=z-F,F>v&&i.sane){r.msg="invalid distance too far back",i.mode=$p;break e}if(N=0,M=d,h===0){if(N+=f-F,F<I){I-=F;do V[o++]=d[N++];while(--F);N=o-z,M=V}}else if(h<F){if(N+=f+h-F,F-=h,F<I){I-=F;do V[o++]=d[N++];while(--F);if(N=0,h<I){F=h,I-=F;do V[o++]=d[N++];while(--F);N=o-z,M=V}}}else if(N+=h-F,F<I){I-=F;do V[o++]=d[N++];while(--F);N=o-z,M=V}for(;I>2;)V[o++]=M[N++],V[o++]=M[N++],V[o++]=M[N++],I-=3;I&&(V[o++]=M[N++],I>1&&(V[o++]=M[N++]))}else{N=o-z;do V[o++]=V[N++],V[o++]=V[N++],V[o++]=V[N++],I-=3;while(I>2);I&&(V[o++]=V[N++],I>1&&(V[o++]=V[N++]))}}else if(F&64){r.msg="invalid distance code",i.mode=$p;break e}else{R=A[(R&65535)+(y&(1<<F)-1)];continue a}break}}else if(F&64)if(F&32){i.mode=JM;break e}else{r.msg="invalid literal/length code",i.mode=$p;break e}else{R=w[(R&65535)+(y&(1<<F)-1)];continue r}break}}while(t<n&&o<c);I=_>>3,t-=I,_-=I<<3,y&=(1<<_)-1,r.next_in=t,r.next_out=o,r.avail_in=t<n?5+(n-t):5-(t-n),r.avail_out=o<c?257+(c-o):257-(o-c),i.hold=y,i.bits=_}});var oS=O((BQ,nS)=>{"use strict";var eS=On(),mu=15,rS=852,aS=592,tS=0,tg=1,iS=2,eH=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],rH=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],aH=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],tH=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];nS.exports=function(r,a,i,t,n,o,s,c){var l=c.bits,f=0,v=0,h=0,d=0,y=0,_=0,w=0,A=0,T=0,P=0,R,F,I,z,N,M=null,K=0,V,Z=new eS.Buf16(mu+1),$=new eS.Buf16(mu+1),Q=null,re=0,xe,me,ce;for(f=0;f<=mu;f++)Z[f]=0;for(v=0;v<t;v++)Z[a[i+v]]++;for(y=l,d=mu;d>=1&&Z[d]===0;d--);if(y>d&&(y=d),d===0)return n[o++]=1<<24|64<<16|0,n[o++]=1<<24|64<<16|0,c.bits=1,0;for(h=1;h<d&&Z[h]===0;h++);for(y<h&&(y=h),A=1,f=1;f<=mu;f++)if(A<<=1,A-=Z[f],A<0)return-1;if(A>0&&(r===tS||d!==1))return-1;for($[1]=0,f=1;f<mu;f++)$[f+1]=$[f]+Z[f];for(v=0;v<t;v++)a[i+v]!==0&&(s[$[a[i+v]]++]=v);if(r===tS?(M=Q=s,V=19):r===tg?(M=eH,K-=257,Q=rH,re-=257,V=256):(M=aH,Q=tH,V=-1),P=0,v=0,f=h,N=o,_=y,w=0,I=-1,T=1<<y,z=T-1,r===tg&&T>rS||r===iS&&T>aS)return 1;for(;;){xe=f-w,s[v]<V?(me=0,ce=s[v]):s[v]>V?(me=Q[re+s[v]],ce=M[K+s[v]]):(me=32+64,ce=0),R=1<<f-w,F=1<<_,h=F;do F-=R,n[N+(P>>w)+F]=xe<<24|me<<16|ce|0;while(F!==0);for(R=1<<f-1;P&R;)R>>=1;if(R!==0?(P&=R-1,P+=R):P=0,v++,--Z[f]===0){if(f===d)break;f=a[i+s[v]]}if(f>y&&(P&z)!==I){for(w===0&&(w=y),N+=h,_=f-w,A=1<<_;_+w<d&&(A-=Z[_+w],!(A<=0));)_++,A<<=1;if(T+=1<<_,r===tg&&T>rS||r===iS&&T>aS)return 1;I=P&z,n[I]=y<<24|_<<16|N-o|0}}return P!==0&&(n[N+P]=f-w<<24|64<<16|0),c.bits=y,0}});var US=O(zi=>{"use strict";var Qt=On(),cg=$0(),hn=W0(),iH=J4(),Xc=oS(),nH=0,BS=1,qS=2,sS=4,oH=5,Wp=6,is=0,sH=1,uH=2,pi=-2,IS=-3,lg=-4,cH=-5,uS=8,RS=1,cS=2,lS=3,fS=4,pS=5,hS=6,dS=7,mS=8,vS=9,gS=10,Yp=11,Ln=12,ig=13,bS=14,ng=15,yS=16,xS=17,wS=18,kS=19,Kp=20,Gp=21,_S=22,jS=23,SS=24,ES=25,AS=26,og=27,PS=28,TS=29,ma=30,fg=31,lH=32,fH=852,pH=592,hH=15,dH=hH;function FS(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function mH(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Qt.Buf16(320),this.work=new Qt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function OS(e){var r;return!e||!e.state?pi:(r=e.state,e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=RS,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new Qt.Buf32(fH),r.distcode=r.distdyn=new Qt.Buf32(pH),r.sane=1,r.back=-1,is)}function zS(e){var r;return!e||!e.state?pi:(r=e.state,r.wsize=0,r.whave=0,r.wnext=0,OS(e))}function DS(e,r){var a,i;return!e||!e.state||(i=e.state,r<0?(a=0,r=-r):(a=(r>>4)+1,r<48&&(r&=15)),r&&(r<8||r>15))?pi:(i.window!==null&&i.wbits!==r&&(i.window=null),i.wrap=a,i.wbits=r,zS(e))}function LS(e,r){var a,i;return e?(i=new mH,e.state=i,i.window=null,a=DS(e,r),a!==is&&(e.state=null),a):pi}function vH(e){return LS(e,dH)}var CS=!0,sg,ug;function gH(e){if(CS){var r;for(sg=new Qt.Buf32(512),ug=new Qt.Buf32(32),r=0;r<144;)e.lens[r++]=8;for(;r<256;)e.lens[r++]=9;for(;r<280;)e.lens[r++]=7;for(;r<288;)e.lens[r++]=8;for(Xc(BS,e.lens,0,288,sg,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;Xc(qS,e.lens,0,32,ug,0,e.work,{bits:5}),CS=!1}e.lencode=sg,e.lenbits=9,e.distcode=ug,e.distbits=5}function NS(e,r,a,i){var t,n=e.state;return n.window===null&&(n.wsize=1<<n.wbits,n.wnext=0,n.whave=0,n.window=new Qt.Buf8(n.wsize)),i>=n.wsize?(Qt.arraySet(n.window,r,a-n.wsize,n.wsize,0),n.wnext=0,n.whave=n.wsize):(t=n.wsize-n.wnext,t>i&&(t=i),Qt.arraySet(n.window,r,a-i,t,n.wnext),i-=t,i?(Qt.arraySet(n.window,r,a-i,i,0),n.wnext=i,n.whave=n.wsize):(n.wnext+=t,n.wnext===n.wsize&&(n.wnext=0),n.whave<n.wsize&&(n.whave+=t))),0}function bH(e,r){var a,i,t,n,o,s,c,l,f,v,h,d,y,_,w=0,A,T,P,R,F,I,z,N,M=new Qt.Buf8(4),K,V,Z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return pi;a=e.state,a.mode===Ln&&(a.mode=ig),o=e.next_out,t=e.output,c=e.avail_out,n=e.next_in,i=e.input,s=e.avail_in,l=a.hold,f=a.bits,v=s,h=c,N=is;e:for(;;)switch(a.mode){case RS:if(a.wrap===0){a.mode=ig;break}for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(a.wrap&2&&l===35615){a.check=0,M[0]=l&255,M[1]=l>>>8&255,a.check=hn(a.check,M,2,0),l=0,f=0,a.mode=cS;break}if(a.flags=0,a.head&&(a.head.done=!1),!(a.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",a.mode=ma;break}if((l&15)!==uS){e.msg="unknown compression method",a.mode=ma;break}if(l>>>=4,f-=4,z=(l&15)+8,a.wbits===0)a.wbits=z;else if(z>a.wbits){e.msg="invalid window size",a.mode=ma;break}a.dmax=1<<z,e.adler=a.check=1,a.mode=l&512?gS:Ln,l=0,f=0;break;case cS:for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(a.flags=l,(a.flags&255)!==uS){e.msg="unknown compression method",a.mode=ma;break}if(a.flags&57344){e.msg="unknown header flags set",a.mode=ma;break}a.head&&(a.head.text=l>>8&1),a.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,a.check=hn(a.check,M,2,0)),l=0,f=0,a.mode=lS;case lS:for(;f<32;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.head&&(a.head.time=l),a.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,M[2]=l>>>16&255,M[3]=l>>>24&255,a.check=hn(a.check,M,4,0)),l=0,f=0,a.mode=fS;case fS:for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.head&&(a.head.xflags=l&255,a.head.os=l>>8),a.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,a.check=hn(a.check,M,2,0)),l=0,f=0,a.mode=pS;case pS:if(a.flags&1024){for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.length=l,a.head&&(a.head.extra_len=l),a.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,a.check=hn(a.check,M,2,0)),l=0,f=0}else a.head&&(a.head.extra=null);a.mode=hS;case hS:if(a.flags&1024&&(d=a.length,d>s&&(d=s),d&&(a.head&&(z=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),Qt.arraySet(a.head.extra,i,n,d,z)),a.flags&512&&(a.check=hn(a.check,i,d,n)),s-=d,n+=d,a.length-=d),a.length))break e;a.length=0,a.mode=dS;case dS:if(a.flags&2048){if(s===0)break e;d=0;do z=i[n+d++],a.head&&z&&a.length<65536&&(a.head.name+=String.fromCharCode(z));while(z&&d<s);if(a.flags&512&&(a.check=hn(a.check,i,d,n)),s-=d,n+=d,z)break e}else a.head&&(a.head.name=null);a.length=0,a.mode=mS;case mS:if(a.flags&4096){if(s===0)break e;d=0;do z=i[n+d++],a.head&&z&&a.length<65536&&(a.head.comment+=String.fromCharCode(z));while(z&&d<s);if(a.flags&512&&(a.check=hn(a.check,i,d,n)),s-=d,n+=d,z)break e}else a.head&&(a.head.comment=null);a.mode=vS;case vS:if(a.flags&512){for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(l!==(a.check&65535)){e.msg="header crc mismatch",a.mode=ma;break}l=0,f=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),e.adler=a.check=0,a.mode=Ln;break;case gS:for(;f<32;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}e.adler=a.check=FS(l),l=0,f=0,a.mode=Yp;case Yp:if(a.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=n,e.avail_in=s,a.hold=l,a.bits=f,uH;e.adler=a.check=1,a.mode=Ln;case Ln:if(r===oH||r===Wp)break e;case ig:if(a.last){l>>>=f&7,f-=f&7,a.mode=og;break}for(;f<3;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}switch(a.last=l&1,l>>>=1,f-=1,l&3){case 0:a.mode=bS;break;case 1:if(gH(a),a.mode=Kp,r===Wp){l>>>=2,f-=2;break e}break;case 2:a.mode=xS;break;case 3:e.msg="invalid block type",a.mode=ma}l>>>=2,f-=2;break;case bS:for(l>>>=f&7,f-=f&7;f<32;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",a.mode=ma;break}if(a.length=l&65535,l=0,f=0,a.mode=ng,r===Wp)break e;case ng:a.mode=yS;case yS:if(d=a.length,d){if(d>s&&(d=s),d>c&&(d=c),d===0)break e;Qt.arraySet(t,i,n,d,o),s-=d,n+=d,c-=d,o+=d,a.length-=d;break}a.mode=Ln;break;case xS:for(;f<14;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(a.nlen=(l&31)+257,l>>>=5,f-=5,a.ndist=(l&31)+1,l>>>=5,f-=5,a.ncode=(l&15)+4,l>>>=4,f-=4,a.nlen>286||a.ndist>30){e.msg="too many length or distance symbols",a.mode=ma;break}a.have=0,a.mode=wS;case wS:for(;a.have<a.ncode;){for(;f<3;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.lens[Z[a.have++]]=l&7,l>>>=3,f-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,K={bits:a.lenbits},N=Xc(nH,a.lens,0,19,a.lencode,0,a.work,K),a.lenbits=K.bits,N){e.msg="invalid code lengths set",a.mode=ma;break}a.have=0,a.mode=kS;case kS:for(;a.have<a.nlen+a.ndist;){for(;w=a.lencode[l&(1<<a.lenbits)-1],A=w>>>24,T=w>>>16&255,P=w&65535,!(A<=f);){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(P<16)l>>>=A,f-=A,a.lens[a.have++]=P;else{if(P===16){for(V=A+2;f<V;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(l>>>=A,f-=A,a.have===0){e.msg="invalid bit length repeat",a.mode=ma;break}z=a.lens[a.have-1],d=3+(l&3),l>>>=2,f-=2}else if(P===17){for(V=A+3;f<V;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}l>>>=A,f-=A,z=0,d=3+(l&7),l>>>=3,f-=3}else{for(V=A+7;f<V;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}l>>>=A,f-=A,z=0,d=11+(l&127),l>>>=7,f-=7}if(a.have+d>a.nlen+a.ndist){e.msg="invalid bit length repeat",a.mode=ma;break}for(;d--;)a.lens[a.have++]=z}}if(a.mode===ma)break;if(a.lens[256]===0){e.msg="invalid code -- missing end-of-block",a.mode=ma;break}if(a.lenbits=9,K={bits:a.lenbits},N=Xc(BS,a.lens,0,a.nlen,a.lencode,0,a.work,K),a.lenbits=K.bits,N){e.msg="invalid literal/lengths set",a.mode=ma;break}if(a.distbits=6,a.distcode=a.distdyn,K={bits:a.distbits},N=Xc(qS,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,K),a.distbits=K.bits,N){e.msg="invalid distances set",a.mode=ma;break}if(a.mode=Kp,r===Wp)break e;case Kp:a.mode=Gp;case Gp:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=n,e.avail_in=s,a.hold=l,a.bits=f,iH(e,h),o=e.next_out,t=e.output,c=e.avail_out,n=e.next_in,i=e.input,s=e.avail_in,l=a.hold,f=a.bits,a.mode===Ln&&(a.back=-1);break}for(a.back=0;w=a.lencode[l&(1<<a.lenbits)-1],A=w>>>24,T=w>>>16&255,P=w&65535,!(A<=f);){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(T&&!(T&240)){for(R=A,F=T,I=P;w=a.lencode[I+((l&(1<<R+F)-1)>>R)],A=w>>>24,T=w>>>16&255,P=w&65535,!(R+A<=f);){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}l>>>=R,f-=R,a.back+=R}if(l>>>=A,f-=A,a.back+=A,a.length=P,T===0){a.mode=AS;break}if(T&32){a.back=-1,a.mode=Ln;break}if(T&64){e.msg="invalid literal/length code",a.mode=ma;break}a.extra=T&15,a.mode=_S;case _S:if(a.extra){for(V=a.extra;f<V;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.length+=l&(1<<a.extra)-1,l>>>=a.extra,f-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=jS;case jS:for(;w=a.distcode[l&(1<<a.distbits)-1],A=w>>>24,T=w>>>16&255,P=w&65535,!(A<=f);){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(!(T&240)){for(R=A,F=T,I=P;w=a.distcode[I+((l&(1<<R+F)-1)>>R)],A=w>>>24,T=w>>>16&255,P=w&65535,!(R+A<=f);){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}l>>>=R,f-=R,a.back+=R}if(l>>>=A,f-=A,a.back+=A,T&64){e.msg="invalid distance code",a.mode=ma;break}a.offset=P,a.extra=T&15,a.mode=SS;case SS:if(a.extra){for(V=a.extra;f<V;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.offset+=l&(1<<a.extra)-1,l>>>=a.extra,f-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){e.msg="invalid distance too far back",a.mode=ma;break}a.mode=ES;case ES:if(c===0)break e;if(d=h-c,a.offset>d){if(d=a.offset-d,d>a.whave&&a.sane){e.msg="invalid distance too far back",a.mode=ma;break}d>a.wnext?(d-=a.wnext,y=a.wsize-d):y=a.wnext-d,d>a.length&&(d=a.length),_=a.window}else _=t,y=o-a.offset,d=a.length;d>c&&(d=c),c-=d,a.length-=d;do t[o++]=_[y++];while(--d);a.length===0&&(a.mode=Gp);break;case AS:if(c===0)break e;t[o++]=a.length,c--,a.mode=Gp;break;case og:if(a.wrap){for(;f<32;){if(s===0)break e;s--,l|=i[n++]<<f,f+=8}if(h-=c,e.total_out+=h,a.total+=h,h&&(e.adler=a.check=a.flags?hn(a.check,t,h,o-h):cg(a.check,t,h,o-h)),h=c,(a.flags?l:FS(l))!==a.check){e.msg="incorrect data check",a.mode=ma;break}l=0,f=0}a.mode=PS;case PS:if(a.wrap&&a.flags){for(;f<32;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(l!==(a.total&4294967295)){e.msg="incorrect length check",a.mode=ma;break}l=0,f=0}a.mode=TS;case TS:N=sH;break e;case ma:N=IS;break e;case fg:return lg;case lH:default:return pi}return e.next_out=o,e.avail_out=c,e.next_in=n,e.avail_in=s,a.hold=l,a.bits=f,(a.wsize||h!==e.avail_out&&a.mode<ma&&(a.mode<og||r!==sS))&&NS(e,e.output,e.next_out,h-e.avail_out)?(a.mode=fg,lg):(v-=e.avail_in,h-=e.avail_out,e.total_in+=v,e.total_out+=h,a.total+=h,a.wrap&&h&&(e.adler=a.check=a.flags?hn(a.check,t,h,e.next_out-h):cg(a.check,t,h,e.next_out-h)),e.data_type=a.bits+(a.last?64:0)+(a.mode===Ln?128:0)+(a.mode===Kp||a.mode===ng?256:0),(v===0&&h===0||r===sS)&&N===is&&(N=cH),N)}function yH(e){if(!e||!e.state)return pi;var r=e.state;return r.window&&(r.window=null),e.state=null,is}function xH(e,r){var a;return!e||!e.state||(a=e.state,!(a.wrap&2))?pi:(a.head=r,r.done=!1,is)}function wH(e,r){var a=r.length,i,t,n;return!e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==Yp)?pi:i.mode===Yp&&(t=1,t=cg(t,r,a,0),t!==i.check)?IS:(n=NS(e,r,a,a),n?(i.mode=fg,lg):(i.havedict=1,is))}zi.inflateReset=zS;zi.inflateReset2=DS;zi.inflateResetKeep=OS;zi.inflateInit=vH;zi.inflateInit2=LS;zi.inflate=bH;zi.inflateEnd=yH;zi.inflateGetHeader=xH;zi.inflateSetDictionary=wH;zi.inflateInfo="pako inflate (from Nodeca project)"});var pg=O((IQ,MS)=>{"use strict";MS.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var VS=O((RQ,HS)=>{"use strict";function kH(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}HS.exports=kH});var WS=O(el=>{"use strict";var vu=US(),Jc=On(),Zp=Q0(),qa=pg(),hg=zp(),_H=X0(),jH=VS(),$S=Object.prototype.toString;function ns(e){if(!(this instanceof ns))return new ns(e);this.options=Jc.assign({chunkSize:16384,windowBits:0,to:""},e||{});var r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(e&&e.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15||(r.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new _H,this.strm.avail_out=0;var a=vu.inflateInit2(this.strm,r.windowBits);if(a!==qa.Z_OK)throw new Error(hg[a]);if(this.header=new jH,vu.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=Zp.string2buf(r.dictionary):$S.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(a=vu.inflateSetDictionary(this.strm,r.dictionary),a!==qa.Z_OK)))throw new Error(hg[a])}ns.prototype.push=function(e,r){var a=this.strm,i=this.options.chunkSize,t=this.options.dictionary,n,o,s,c,l,f=!1;if(this.ended)return!1;o=r===~~r?r:r===!0?qa.Z_FINISH:qa.Z_NO_FLUSH,typeof e=="string"?a.input=Zp.binstring2buf(e):$S.call(e)==="[object ArrayBuffer]"?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(a.avail_out===0&&(a.output=new Jc.Buf8(i),a.next_out=0,a.avail_out=i),n=vu.inflate(a,qa.Z_NO_FLUSH),n===qa.Z_NEED_DICT&&t&&(n=vu.inflateSetDictionary(this.strm,t)),n===qa.Z_BUF_ERROR&&f===!0&&(n=qa.Z_OK,f=!1),n!==qa.Z_STREAM_END&&n!==qa.Z_OK)return this.onEnd(n),this.ended=!0,!1;a.next_out&&(a.avail_out===0||n===qa.Z_STREAM_END||a.avail_in===0&&(o===qa.Z_FINISH||o===qa.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=Zp.utf8border(a.output,a.next_out),c=a.next_out-s,l=Zp.buf2string(a.output,s),a.next_out=c,a.avail_out=i-c,c&&Jc.arraySet(a.output,a.output,s,c,0),this.onData(l)):this.onData(Jc.shrinkBuf(a.output,a.next_out))),a.avail_in===0&&a.avail_out===0&&(f=!0)}while((a.avail_in>0||a.avail_out===0)&&n!==qa.Z_STREAM_END);return n===qa.Z_STREAM_END&&(o=qa.Z_FINISH),o===qa.Z_FINISH?(n=vu.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===qa.Z_OK):(o===qa.Z_SYNC_FLUSH&&(this.onEnd(qa.Z_OK),a.avail_out=0),!0)};ns.prototype.onData=function(e){this.chunks.push(e)};ns.prototype.onEnd=function(e){e===qa.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Jc.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function dg(e,r){var a=new ns(r);if(a.push(e,!0),a.err)throw a.msg||hg[a.err];return a.result}function SH(e,r){return r=r||{},r.raw=!0,dg(e,r)}el.Inflate=ns;el.inflate=dg;el.inflateRaw=SH;el.ungzip=dg});var YS=O((zQ,GS)=>{"use strict";var EH=On().assign,AH=Q4(),PH=WS(),TH=pg(),KS={};EH(KS,AH,PH,TH);GS.exports=KS});var OH={};module.exports=JE(OH);var Qg=typeof process!="object"||String(process)!=="[object process]"||process.browser;var Xg={ibm866:[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,9617,9618,9619,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9561,9560,9554,9555,9579,9578,9496,9484,9608,9604,9612,9616,9600,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1025,1105,1028,1108,1031,1111,1038,1118,176,8729,183,8730,8470,164,9632,160],"iso-8859-2":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,728,321,164,317,346,167,168,352,350,356,377,173,381,379,176,261,731,322,180,318,347,711,184,353,351,357,378,733,382,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],"iso-8859-3":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,294,728,163,164,null,292,167,168,304,350,286,308,173,null,379,176,295,178,179,180,181,293,183,184,305,351,287,309,189,null,380,192,193,194,null,196,266,264,199,200,201,202,203,204,205,206,207,null,209,210,211,212,288,214,215,284,217,218,219,220,364,348,223,224,225,226,null,228,267,265,231,232,233,234,235,236,237,238,239,null,241,242,243,244,289,246,247,285,249,250,251,252,365,349,729],"iso-8859-4":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,312,342,164,296,315,167,168,352,274,290,358,173,381,175,176,261,731,343,180,297,316,711,184,353,275,291,359,330,382,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,298,272,325,332,310,212,213,214,215,216,370,218,219,220,360,362,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,299,273,326,333,311,244,245,246,247,248,371,250,251,252,361,363,729],"iso-8859-5":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,173,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,8470,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,167,1118,1119],"iso-8859-6":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,null,null,164,null,null,null,null,null,null,null,1548,173,null,null,null,null,null,null,null,null,null,null,null,null,null,1563,null,null,null,1567,null,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,null,null,null,null,null,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,null,null,null,null,null,null,null,null,null,null,null,null,null],"iso-8859-7":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8216,8217,163,8364,8367,166,167,168,169,890,171,172,173,null,8213,176,177,178,179,900,901,902,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],"iso-8859-8":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,162,163,164,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,8215,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],"iso-8859-10":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,274,290,298,296,310,167,315,272,352,358,381,173,362,330,176,261,275,291,299,297,311,183,316,273,353,359,382,8213,363,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,207,208,325,332,211,212,213,214,360,216,370,218,219,220,221,222,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,239,240,326,333,243,244,245,246,361,248,371,250,251,252,253,254,312],"iso-8859-13":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8221,162,163,164,8222,166,167,216,169,342,171,172,173,174,198,176,177,178,179,8220,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,8217],"iso-8859-14":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,7682,7683,163,266,267,7690,167,7808,169,7810,7691,7922,173,174,376,7710,7711,288,289,7744,7745,182,7766,7809,7767,7811,7776,7923,7812,7813,7777,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,372,209,210,211,212,213,214,7786,216,217,218,219,220,221,374,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,373,241,242,243,244,245,246,7787,248,249,250,251,252,253,375,255],"iso-8859-15":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,8364,165,352,167,353,169,170,171,172,173,174,175,176,177,178,179,381,181,182,183,382,185,186,187,338,339,376,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],"iso-8859-16":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,261,321,8364,8222,352,167,353,169,536,171,377,173,378,379,176,177,268,322,381,8221,182,183,382,269,537,187,338,339,376,380,192,193,194,258,196,262,198,199,200,201,202,203,204,205,206,207,272,323,210,211,212,336,214,346,368,217,218,219,220,280,538,223,224,225,226,259,228,263,230,231,232,233,234,235,236,237,238,239,273,324,242,243,244,337,246,347,369,249,250,251,252,281,539,255],"koi8-r":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,1025,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],"koi8-u":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,1108,9556,1110,1111,9559,9560,9561,9562,9563,1169,1118,9566,9567,9568,9569,1025,1028,9571,1030,1031,9574,9575,9576,9577,9578,1168,1038,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],macintosh:[196,197,199,201,209,214,220,225,224,226,228,227,229,231,233,232,234,235,237,236,238,239,241,243,242,244,246,245,250,249,251,252,8224,176,162,163,167,8226,182,223,174,169,8482,180,168,8800,198,216,8734,177,8804,8805,165,181,8706,8721,8719,960,8747,170,186,937,230,248,191,161,172,8730,402,8776,8710,171,187,8230,160,192,195,213,338,339,8211,8212,8220,8221,8216,8217,247,9674,255,376,8260,8364,8249,8250,64257,64258,8225,183,8218,8222,8240,194,202,193,203,200,205,206,207,204,211,212,63743,210,218,219,217,305,710,732,175,728,729,730,184,733,731,711],"windows-874":[8364,129,130,131,132,8230,134,135,136,137,138,139,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,153,154,155,156,157,158,159,160,3585,3586,3587,3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,3632,3633,3634,3635,3636,3637,3638,3639,3640,3641,3642,null,null,null,null,3647,3648,3649,3650,3651,3652,3653,3654,3655,3656,3657,3658,3659,3660,3661,3662,3663,3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,null,null,null,null],"windows-1250":[8364,129,8218,131,8222,8230,8224,8225,136,8240,352,8249,346,356,381,377,144,8216,8217,8220,8221,8226,8211,8212,152,8482,353,8250,347,357,382,378,160,711,728,321,164,260,166,167,168,169,350,171,172,173,174,379,176,177,731,322,180,181,182,183,184,261,351,187,317,733,318,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],"windows-1251":[1026,1027,8218,1107,8222,8230,8224,8225,8364,8240,1033,8249,1034,1036,1035,1039,1106,8216,8217,8220,8221,8226,8211,8212,152,8482,1113,8250,1114,1116,1115,1119,160,1038,1118,1032,164,1168,166,167,1025,169,1028,171,172,173,174,1031,176,177,1030,1110,1169,181,182,183,1105,8470,1108,187,1112,1029,1109,1111,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103],"windows-1252":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],"windows-1253":[8364,129,8218,402,8222,8230,8224,8225,136,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,157,158,159,160,901,902,163,164,165,166,167,168,169,null,171,172,173,174,8213,176,177,178,179,900,181,182,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],"windows-1254":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,286,209,210,211,212,213,214,215,216,217,218,219,220,304,350,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,287,241,242,243,244,245,246,247,248,249,250,251,252,305,351,255],"windows-1255":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,156,157,158,159,160,161,162,163,8362,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,191,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1520,1521,1522,1523,1524,null,null,null,null,null,null,null,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],"windows-1256":[8364,1662,8218,402,8222,8230,8224,8225,710,8240,1657,8249,338,1670,1688,1672,1711,8216,8217,8220,8221,8226,8211,8212,1705,8482,1681,8250,339,8204,8205,1722,160,1548,162,163,164,165,166,167,168,169,1726,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,1563,187,188,189,190,1567,1729,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,215,1591,1592,1593,1594,1600,1601,1602,1603,224,1604,226,1605,1606,1607,1608,231,232,233,234,235,1609,1610,238,239,1611,1612,1613,1614,244,1615,1616,247,1617,249,1618,251,252,8206,8207,1746],"windows-1257":[8364,129,8218,131,8222,8230,8224,8225,136,8240,138,8249,140,168,711,184,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,175,731,159,160,null,162,163,164,null,166,167,216,169,342,171,172,173,174,198,176,177,178,179,180,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,729],"windows-1258":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,258,196,197,198,199,200,201,202,203,768,205,206,207,272,209,777,211,212,416,214,215,216,217,218,219,220,431,771,223,224,225,226,259,228,229,230,231,232,233,234,235,769,237,238,239,273,241,803,243,244,417,246,247,248,249,250,251,252,432,8363,255],"x-mac-cyrillic":[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,8224,176,1168,163,167,8226,182,1030,174,169,8482,1026,1106,8800,1027,1107,8734,177,8804,8805,1110,181,1169,1032,1028,1108,1031,1111,1033,1113,1034,1114,1112,1029,172,8730,402,8776,8710,171,187,8230,160,1035,1115,1036,1116,1109,8211,8212,8220,8221,8216,8217,247,8222,1038,1118,1039,1119,8470,1025,1105,1103,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,8364]};globalThis["encoding-indexes"]=Xg||{};function jr(e,r,a){return r<=e&&e<=a}function e9(e,r){return e.indexOf(r)!==-1}var gn=Math.floor;function xl(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function r9(e){for(var r=String(e),a=r.length,i=0,t=[];i<a;){var n=r.charCodeAt(i);if(n<55296||n>57343)t.push(n);else if(56320<=n&&n<=57343)t.push(65533);else if(55296<=n&&n<=56319)if(i===a-1)t.push(65533);else{var o=r.charCodeAt(i+1);if(56320<=o&&o<=57343){var s=n&1023,c=o&1023;t.push(65536+(s<<10)+c),i+=1}else t.push(65533)}i+=1}return t}function a9(e){for(var r="",a=0;a<e.length;++a){var i=e[a];i<=65535?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode((i>>10)+55296,(i&1023)+56320))}return r}function Jt(e){return 0<=e&&e<=127}var Xt=Jt,Lr=-1;function vh(e){this.tokens=[].slice.call(e),this.tokens.reverse()}vh.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.pop():Lr},prepend:function(e){if(Array.isArray(e))for(var r=e;r.length;)this.tokens.push(r.pop());else this.tokens.push(e)},push:function(e){if(Array.isArray(e))for(var r=e;r.length;)this.tokens.unshift(r.shift());else this.tokens.unshift(e)}};var ia=-1;function Dr(e,r){if(e)throw TypeError("Decoder error");return r||65533}function gi(e){throw TypeError("The code point "+e+" could not be encoded.")}function t9(){}t9.prototype={handler:function(e,r){}};function i9(){}i9.prototype={handler:function(e,r){}};function dh(e){return e=String(e).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(mh,e)?mh[e]:null}var Jg=[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"UTF-8"}],heading:"The Encoding"},{encodings:[{labels:["866","cp866","csibm866","ibm866"],name:"IBM866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso88592","iso_8859-2","iso_8859-2:1987","l2","latin2"],name:"ISO-8859-2"},{labels:["csisolatin3","iso-8859-3","iso-ir-109","iso8859-3","iso88593","iso_8859-3","iso_8859-3:1988","l3","latin3"],name:"ISO-8859-3"},{labels:["csisolatin4","iso-8859-4","iso-ir-110","iso8859-4","iso88594","iso_8859-4","iso_8859-4:1988","l4","latin4"],name:"ISO-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso-ir-144","iso8859-5","iso88595","iso_8859-5","iso_8859-5:1988"],name:"ISO-8859-5"},{labels:["arabic","asmo-708","csiso88596e","csiso88596i","csisolatinarabic","ecma-114","iso-8859-6","iso-8859-6-e","iso-8859-6-i","iso-ir-127","iso8859-6","iso88596","iso_8859-6","iso_8859-6:1987"],name:"ISO-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso-ir-126","iso8859-7","iso88597","iso_8859-7","iso_8859-7:1987","sun_eu_greek"],name:"ISO-8859-7"},{labels:["csiso88598e","csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-e","iso-ir-138","iso8859-8","iso88598","iso_8859-8","iso_8859-8:1988","visual"],name:"ISO-8859-8"},{labels:["csiso88598i","iso-8859-8-i","logical"],name:"ISO-8859-8-I"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","iso885910","l6","latin6"],name:"ISO-8859-10"},{labels:["iso-8859-13","iso8859-13","iso885913"],name:"ISO-8859-13"},{labels:["iso-8859-14","iso8859-14","iso885914"],name:"ISO-8859-14"},{labels:["csisolatin9","iso-8859-15","iso8859-15","iso885915","iso_8859-15","l9"],name:"ISO-8859-15"},{labels:["iso-8859-16"],name:"ISO-8859-16"},{labels:["cskoi8r","koi","koi8","koi8-r","koi8_r"],name:"KOI8-R"},{labels:["koi8-ru","koi8-u"],name:"KOI8-U"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["dos-874","iso-8859-11","iso8859-11","iso885911","tis-620","windows-874"],name:"windows-874"},{labels:["cp1250","windows-1250","x-cp1250"],name:"windows-1250"},{labels:["cp1251","windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"],name:"windows-1252"},{labels:["cp1253","windows-1253","x-cp1253"],name:"windows-1253"},{labels:["cp1254","csisolatin5","iso-8859-9","iso-ir-148","iso8859-9","iso88599","iso_8859-9","iso_8859-9:1989","l5","latin5","windows-1254","x-cp1254"],name:"windows-1254"},{labels:["cp1255","windows-1255","x-cp1255"],name:"windows-1255"},{labels:["cp1256","windows-1256","x-cp1256"],name:"windows-1256"},{labels:["cp1257","windows-1257","x-cp1257"],name:"windows-1257"},{labels:["cp1258","windows-1258","x-cp1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gb_2312","gb_2312-80","gbk","iso-ir-58","x-gbk"],name:"GBK"},{labels:["gb18030"],name:"gb18030"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"Big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"EUC-JP"},{labels:["csiso2022jp","iso-2022-jp"],name:"ISO-2022-JP"},{labels:["csshiftjis","ms932","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"Shift_JIS"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"EUC-KR"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["csiso2022kr","hz-gb-2312","iso-2022-cn","iso-2022-cn-ext","iso-2022-kr"],name:"replacement"},{labels:["utf-16be"],name:"UTF-16BE"},{labels:["utf-16","utf-16le"],name:"UTF-16LE"},{labels:["x-user-defined"],name:"x-user-defined"}],heading:"Legacy miscellaneous encodings"}],mh={};Jg.forEach(function(e){e.encodings.forEach(function(r){r.labels.forEach(function(a){mh[a]=r})})});var Ot={},zt={};function hs(e,r){return r&&r[e]||null}function ds(e,r){var a=r.indexOf(e);return a===-1?null:a}function At(e){if(!("encoding-indexes"in globalThis))throw Error("Indexes missing. Did you forget to include encoding-indexes.js first?");return globalThis["encoding-indexes"][e]}function n9(e){if(e>39419&&e<189e3||e>1237575)return null;if(e===7457)return 59335;var r=0,a=0,i=At("gb18030-ranges"),t;for(t=0;t<i.length;++t){var n=i[t];if(n[0]<=e)r=n[0],a=n[1];else break}return a+e-r}function o9(e){if(e===59335)return 7457;var r=0,a=0,i=At("gb18030-ranges"),t;for(t=0;t<i.length;++t){var n=i[t];if(n[1]<=e)r=n[1],a=n[0];else break}return a+e-r}function s9(e){ph=ph||At("jis0208").map(function(a,i){return jr(i,8272,8835)?null:a});var r=ph;return r.indexOf(e)}var ph;function u9(e){hh=hh||At("big5").map(function(a,i){return i<(161-129)*157?null:a});var r=hh;return e===9552||e===9566||e===9569||e===9578||e===21313||e===21317?r.lastIndexOf(e):ds(e,r)}var hh,eb="utf-8";function Co(e,r){if(!(this instanceof Co))throw TypeError("Called as a function. Did you forget 'new'?");e=e!==void 0?String(e):eb,r=xl(r),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var a=dh(e);if(a===null||a.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!zt[a.name])throw Error("Decoder not present. Did you forget to include encoding-indexes.js first?");var i=this;return i._encoding=a,Boolean(r.fatal)&&(i._error_mode="fatal"),Boolean(r.ignoreBOM)&&(i._ignoreBOM=!0),Object.defineProperty||(this.encoding=i._encoding.name.toLowerCase(),this.fatal=i._error_mode==="fatal",this.ignoreBOM=i._ignoreBOM),i}Object.defineProperty&&(Object.defineProperty(Co.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(Co.prototype,"fatal",{get:function(){return this._error_mode==="fatal"}}),Object.defineProperty(Co.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}}));Co.prototype.decode=function(r,a){var i;typeof r=="object"&&r instanceof ArrayBuffer?i=new Uint8Array(r):typeof r=="object"&&"buffer"in r&&r.buffer instanceof ArrayBuffer?i=new Uint8Array(r.buffer,r.byteOffset,r.byteLength):i=new Uint8Array(0),a=xl(a),this._do_not_flush||(this._decoder=zt[this._encoding.name]({fatal:this._error_mode==="fatal"}),this._BOMseen=!1),this._do_not_flush=Boolean(a.stream);for(var t=new vh(i),n=[],o;;){var s=t.read();if(s===Lr||(o=this._decoder.handler(t,s),o===ia))break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}if(!this._do_not_flush){do{if(o=this._decoder.handler(t,t.read()),o===ia)break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}while(!t.endOfStream());this._decoder=null}function c(l){return e9(["UTF-8","UTF-16LE","UTF-16BE"],this._encoding.name)&&!this._ignoreBOM&&!this._BOMseen&&(l.length>0&&l[0]===65279?(this._BOMseen=!0,l.shift()):l.length>0&&(this._BOMseen=!0)),a9(l)}return c.call(this,n)};function Su(e,r){if(!(this instanceof Su))throw TypeError("Called as a function. Did you forget 'new'?");r=xl(r),this._encoding=null,this._encoder=null,this._do_not_flush=!1,this._fatal=Boolean(r.fatal)?"fatal":"replacement";var a=this;if(Boolean(r.NONSTANDARD_allowLegacyEncoding)){e=e!==void 0?String(e):eb;var i=dh(e);if(i===null||i.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!Ot[i.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");a._encoding=i}else a._encoding=dh("utf-8"),e!==void 0&&"console"in globalThis&&console.warn("TextEncoder constructor called with encoding label, which is ignored.");return Object.defineProperty||(this.encoding=a._encoding.name.toLowerCase()),a}Object.defineProperty&&Object.defineProperty(Su.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}});Su.prototype.encode=function(r,a){r=r===void 0?"":String(r),a=xl(a),this._do_not_flush||(this._encoder=Ot[this._encoding.name]({fatal:this._fatal==="fatal"})),this._do_not_flush=Boolean(a.stream);for(var i=new vh(r9(r)),t=[],n;;){var o=i.read();if(o===Lr||(n=this._encoder.handler(i,o),n===ia))break;Array.isArray(n)?t.push.apply(t,n):t.push(n)}if(!this._do_not_flush){for(;n=this._encoder.handler(i,i.read()),n!==ia;)Array.isArray(n)?t.push.apply(t,n):t.push(n);this._encoder=null}return new Uint8Array(t)};function c9(e){var r=e.fatal,a=0,i=0,t=0,n=128,o=191;this.handler=function(s,c){if(c===Lr&&t!==0)return t=0,Dr(r);if(c===Lr)return ia;if(t===0){if(jr(c,0,127))return c;if(jr(c,194,223))t=1,a=c&31;else if(jr(c,224,239))c===224&&(n=160),c===237&&(o=159),t=2,a=c&15;else if(jr(c,240,244))c===240&&(n=144),c===244&&(o=143),t=3,a=c&7;else return Dr(r);return null}if(!jr(c,n,o))return a=t=i=0,n=128,o=191,s.prepend(c),Dr(r);if(n=128,o=191,a=a<<6|c&63,i+=1,i!==t)return null;var l=a;return a=t=i=0,l}}function l9(e){var r=e.fatal;this.handler=function(a,i){if(i===Lr)return ia;if(Xt(i))return i;var t,n;jr(i,128,2047)?(t=1,n=192):jr(i,2048,65535)?(t=2,n=224):jr(i,65536,1114111)&&(t=3,n=240);for(var o=[(i>>6*t)+n];t>0;){var s=i>>6*(t-1);o.push(128|s&63),t-=1}return o}}Ot["UTF-8"]=function(e){return new l9(e)};zt["UTF-8"]=function(e){return new c9(e)};function f9(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Lr)return ia;if(Jt(t))return t;var n=e[t-128];return n===null?Dr(a):n}}function p9(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Lr)return ia;if(Xt(t))return t;var n=ds(t,e);return n===null&&gi(t),n+128}}(function(){"encoding-indexes"in globalThis&&Jg.forEach(function(e){e.heading==="Legacy single-byte encodings"&&e.encodings.forEach(function(r){var a=r.name,i=At(a.toLowerCase());zt[a]=function(t){return new f9(i,t)},Ot[a]=function(t){return new p9(i,t)}})})})();zt.GBK=function(e){return new rb(e)};Ot.GBK=function(e){return new ab(e,!0)};function rb(e){var r=e.fatal,a=0,i=0,t=0;this.handler=function(n,o){if(o===Lr&&a===0&&i===0&&t===0)return ia;o===Lr&&(a!==0||i!==0||t!==0)&&(a=0,i=0,t=0,Dr(r));var s;if(t!==0){s=null,jr(o,48,57)&&(s=n9((((a-129)*10+i-48)*126+t-129)*10+o-48));var c=[i,t,o];return a=0,i=0,t=0,s===null?(n.prepend(c),Dr(r)):s}if(i!==0)return jr(o,129,254)?(t=o,null):(n.prepend([i,o]),a=0,i=0,Dr(r));if(a!==0){if(jr(o,48,57))return i=o,null;var l=a,f=null;a=0;var v=o<127?64:65;return(jr(o,64,126)||jr(o,128,254))&&(f=(l-129)*190+(o-v)),s=f===null?null:hs(f,At("gb18030")),s===null&&Jt(o)&&n.prepend(o),s===null?Dr(r):s}return Jt(o)?o:o===128?8364:jr(o,129,254)?(a=o,null):Dr(r)}}function ab(e,r){var a=e.fatal;this.handler=function(i,t){if(t===Lr)return ia;if(Xt(t))return t;if(t===58853)return gi(t);if(r&&t===8364)return 128;var n=ds(t,At("gb18030"));if(n!==null){var o=gn(n/190)+129,s=n%190,c=s<63?64:65;return[o,s+c]}if(r)return gi(t);n=o9(t);var l=gn(n/10/126/10);n=n-l*10*126*10;var f=gn(n/10/126);n=n-f*10*126;var v=gn(n/10),h=n-v*10;return[l+129,f+48,v+129,h+48]}}Ot.gb18030=function(e){return new ab(e)};zt.gb18030=function(e){return new rb(e)};function h9(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Lr&&a!==0)return a=0,Dr(r);if(t===Lr&&a===0)return ia;if(a!==0){var n=a,o=null;a=0;var s=t<127?64:98;switch((jr(t,64,126)||jr(t,161,254))&&(o=(n-129)*157+(t-s)),o){case 1133:return[202,772];case 1135:return[202,780];case 1164:return[234,772];case 1166:return[234,780]}var c=o===null?null:hs(o,At("big5"));return c===null&&Jt(t)&&i.prepend(t),c===null?Dr(r):c}return Jt(t)?t:jr(t,129,254)?(a=t,null):Dr(r)}}function d9(e){var r=e.fatal;this.handler=function(a,i){if(i===Lr)return ia;if(Xt(i))return i;var t=u9(i);if(t===null)return gi(i);var n=gn(t/157)+129;if(n<161)return gi(i);var o=t%157,s=o<63?64:98;return[n,o+s]}}Ot.Big5=function(e){return new d9(e)};zt.Big5=function(e){return new h9(e)};function m9(e){var r=e.fatal,a=!1,i=0;this.handler=function(t,n){if(n===Lr&&i!==0)return i=0,Dr(r);if(n===Lr&&i===0)return ia;if(i===142&&jr(n,161,223))return i=0,65377-161+n;if(i===143&&jr(n,161,254))return a=!0,i=n,null;if(i!==0){var o=i;i=0;var s=null;return jr(o,161,254)&&jr(n,161,254)&&(s=hs((o-161)*94+(n-161),At(a?"jis0212":"jis0208"))),a=!1,jr(n,161,254)||t.prepend(n),s===null?Dr(r):s}return Jt(n)?n:n===142||n===143||jr(n,161,254)?(i=n,null):Dr(r)}}function v9(e){var r=e.fatal;this.handler=function(a,i){if(i===Lr)return ia;if(Xt(i))return i;if(i===165)return 92;if(i===8254)return 126;if(jr(i,65377,65439))return[142,i-65377+161];i===8722&&(i=65293);var t=ds(i,At("jis0208"));if(t===null)return gi(i);var n=gn(t/94)+161,o=t%94+161;return[n,o]}}Ot["EUC-JP"]=function(e){return new v9(e)};zt["EUC-JP"]=function(e){return new m9(e)};function g9(e){var r=e.fatal,a={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},i=a.ASCII,t=a.ASCII,n=0,o=!1;this.handler=function(s,c){switch(i){default:case a.ASCII:return c===27?(i=a.EscapeStart,null):jr(c,0,127)&&c!==14&&c!==15&&c!==27?(o=!1,c):c===Lr?ia:(o=!1,Dr(r));case a.Roman:return c===27?(i=a.EscapeStart,null):c===92?(o=!1,165):c===126?(o=!1,8254):jr(c,0,127)&&c!==14&&c!==15&&c!==27&&c!==92&&c!==126?(o=!1,c):c===Lr?ia:(o=!1,Dr(r));case a.Katakana:return c===27?(i=a.EscapeStart,null):jr(c,33,95)?(o=!1,65377-33+c):c===Lr?ia:(o=!1,Dr(r));case a.LeadByte:return c===27?(i=a.EscapeStart,null):jr(c,33,126)?(o=!1,n=c,i=a.TrailByte,null):c===Lr?ia:(o=!1,Dr(r));case a.TrailByte:if(c===27)return i=a.EscapeStart,Dr(r);if(jr(c,33,126)){i=a.LeadByte;var l=(n-33)*94+c-33,f=hs(l,At("jis0208"));return f===null?Dr(r):f}return c===Lr?(i=a.LeadByte,s.prepend(c),Dr(r)):(i=a.LeadByte,Dr(r));case a.EscapeStart:return c===36||c===40?(n=c,i=a.Escape,null):(s.prepend(c),o=!1,i=t,Dr(r));case a.Escape:var v=n;n=0;var h=null;if(v===40&&c===66&&(h=a.ASCII),v===40&&c===74&&(h=a.Roman),v===40&&c===73&&(h=a.Katakana),v===36&&(c===64||c===66)&&(h=a.LeadByte),h!==null){i=i=h;var d=o;return o=!0,d?Dr(r):null}return s.prepend([v,c]),o=!1,i=t,Dr(r)}}}function b9(e){var r=e.fatal,a={ASCII:0,Roman:1,jis0208:2},i=a.ASCII;this.handler=function(t,n){if(n===Lr&&i!==a.ASCII)return t.prepend(n),i=a.ASCII,[27,40,66];if(n===Lr&&i===a.ASCII)return ia;if((i===a.ASCII||i===a.Roman)&&(n===14||n===15||n===27))return gi(65533);if(i===a.ASCII&&Xt(n))return n;if(i===a.Roman&&(Xt(n)&&n!==92&&n!==126||n==165||n==8254)){if(Xt(n))return n;if(n===165)return 92;if(n===8254)return 126}if(Xt(n)&&i!==a.ASCII)return t.prepend(n),i=a.ASCII,[27,40,66];if((n===165||n===8254)&&i!==a.Roman)return t.prepend(n),i=a.Roman,[27,40,74];n===8722&&(n=65293);var o=ds(n,At("jis0208"));if(o===null)return gi(n);if(i!==a.jis0208)return t.prepend(n),i=a.jis0208,[27,36,66];var s=gn(o/94)+33,c=o%94+33;return[s,c]}}Ot["ISO-2022-JP"]=function(e){return new b9(e)};zt["ISO-2022-JP"]=function(e){return new g9(e)};function y9(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Lr&&a!==0)return a=0,Dr(r);if(t===Lr&&a===0)return ia;if(a!==0){var n=a,o=null;a=0;var s=t<127?64:65,c=n<160?129:193;if((jr(t,64,126)||jr(t,128,252))&&(o=(n-c)*188+t-s),jr(o,8836,10715))return 57344-8836+o;var l=o===null?null:hs(o,At("jis0208"));return l===null&&Jt(t)&&i.prepend(t),l===null?Dr(r):l}return Jt(t)||t===128?t:jr(t,161,223)?65377-161+t:jr(t,129,159)||jr(t,224,252)?(a=t,null):Dr(r)}}function x9(e){var r=e.fatal;this.handler=function(a,i){if(i===Lr)return ia;if(Xt(i)||i===128)return i;if(i===165)return 92;if(i===8254)return 126;if(jr(i,65377,65439))return i-65377+161;i===8722&&(i=65293);var t=s9(i);if(t===null)return gi(i);var n=gn(t/188),o=n<31?129:193,s=t%188,c=s<63?64:65;return[n+o,s+c]}}Ot.Shift_JIS=function(e){return new x9(e)};zt.Shift_JIS=function(e){return new y9(e)};function w9(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Lr&&a!==0)return a=0,Dr(r);if(t===Lr&&a===0)return ia;if(a!==0){var n=a,o=null;a=0,jr(t,65,254)&&(o=(n-129)*190+(t-65));var s=o===null?null:hs(o,At("euc-kr"));return o===null&&Jt(t)&&i.prepend(t),s===null?Dr(r):s}return Jt(t)?t:jr(t,129,254)?(a=t,null):Dr(r)}}function k9(e){var r=e.fatal;this.handler=function(a,i){if(i===Lr)return ia;if(Xt(i))return i;var t=ds(i,At("euc-kr"));if(t===null)return gi(i);var n=gn(t/190)+129,o=t%190+65;return[n,o]}}Ot["EUC-KR"]=function(e){return new k9(e)};zt["EUC-KR"]=function(e){return new w9(e)};function yl(e,r){var a=e>>8,i=e&255;return r?[a,i]:[i,a]}function tb(e,r){var a=r.fatal,i=null,t=null;this.handler=function(n,o){if(o===Lr&&(i!==null||t!==null))return Dr(a);if(o===Lr&&i===null&&t===null)return ia;if(i===null)return i=o,null;var s;if(e?s=(i<<8)+o:s=(o<<8)+i,i=null,t!==null){var c=t;return t=null,jr(s,56320,57343)?65536+(c-55296)*1024+(s-56320):(n.prepend(yl(s,e)),Dr(a))}return jr(s,55296,56319)?(t=s,null):jr(s,56320,57343)?Dr(a):s}}function ib(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Lr)return ia;if(jr(t,0,65535))return yl(t,e);var n=yl((t-65536>>10)+55296,e),o=yl((t-65536&1023)+56320,e);return n.concat(o)}}Ot["UTF-16BE"]=function(e){return new ib(!0,e)};zt["UTF-16BE"]=function(e){return new tb(!0,e)};Ot["UTF-16LE"]=function(e){return new ib(!1,e)};zt["UTF-16LE"]=function(e){return new tb(!1,e)};function _9(e){var r=e.fatal;this.handler=function(a,i){return i===Lr?ia:Jt(i)?i:63360+i-128}}function j9(e){var r=e.fatal;this.handler=function(a,i){return i===Lr?ia:Xt(i)?i:jr(i,63360,63487)?i-63360+128:gi(i)}}Ot["x-user-defined"]=function(e){return new j9(e)};zt["x-user-defined"]=function(e){return new _9(e)};function Eu(e){return Buffer.from(e).toString("base64")}function gh(e){return Buffer.from(e,"base64").toString("ascii")}var ex=Ja(Xy(),1),rx=Ja(Iu(),1);function Jy(e){return Buffer.isBuffer(e)?new Uint8Array(e).buffer:e}function D7(e,r){let a=r.type?r.type.replace("image/",""):"jpeg",i=(0,rx.default)(e.data,[e.width,e.height,4],[4,e.width*4,1],0);return(0,ex.default)(i,a,r)}function ax(e,r){let a=D7(e,r);return new Promise(i=>{let t=[];a.on("data",n=>t.push(n)),a.on("end",()=>{let n=Buffer.concat(t);i(Jy(n))})})}var R5=Ja(I5(),1),b0=["image/png","image/jpeg","image/gif"];async function y0(e,r){if(!r)throw new Error("MIMEType is required to parse image under Node.js");let a=e instanceof Buffer?e:Buffer.from(e);return await ZN(a,r)}function ZN(e,r){return new Promise(a=>(0,R5.default)(e,r,(i,t)=>{if(i)throw i;let n=[...t.shape],o=t.shape.length===4?t.shape.shift():1,s=t.data instanceof Buffer?new Uint8Array(t.data):t.data;a({shape:n,data:s,width:t.shape[0],height:t.shape[1],components:t.shape[2],layers:o?[o]:[]})}))}var sn={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document},z5=sn.self||sn.window||sn.global||{},D5=sn.window||sn.self||sn.global||{},L5=sn.global||sn.self||sn.window||{},N5=sn.document||{};var Ii=Boolean(typeof process!="object"||String(process)!=="[object process]"||process.browser);var O5=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version),QN=O5&&parseFloat(O5[1])||0;function x0(e,r,a){if(a=a||e.byteLength,e.byteLength<a||r.byteLength<a)return!1;let i=new Uint8Array(e),t=new Uint8Array(r);for(let n=0;n<i.length;++n)if(i[n]!==t[n])return!1;return!0}function vp(...e){return U5(e)}function U5(e){let r=e.map(n=>n instanceof ArrayBuffer?new Uint8Array(n):n),a=r.reduce((n,o)=>n+o.byteLength,0),i=new Uint8Array(a),t=0;for(let n of r)i.set(n,t),t+=n.byteLength;return i.buffer}async function Fc(e){let r=[];for await(let a of e)r.push(a);return vp(...r)}var XN="",M5={};function Cc(e){for(let r in M5)if(e.startsWith(r)){let a=M5[r];e=e.replace(r,a)}return!e.startsWith("http://")&&!e.startsWith("https://")&&(e=`${XN}${e}`),e}function H5(e){return Buffer.isBuffer(e)?new Uint8Array(e.buffer,e.byteOffset,e.length).slice().buffer:e}function V5(e){return e&&typeof e=="object"&&e.isBuffer}function nu(e){if(V5(e))return H5(e);if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);if(typeof e=="string"){let r=e;return new TextEncoder().encode(r).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}function ou(e){return r=>new Promise((a,i)=>e(r,(t,n)=>t?i(t):a(n)))}var un={};XE(un,{dirname:()=>rU,filename:()=>eU,join:()=>aU,resolve:()=>tU});function $5(){var r;if(typeof process<"u"&&typeof process.cwd<"u")return process.cwd();let e=(r=window.location)==null?void 0:r.pathname;return(e==null?void 0:e.slice(0,e.lastIndexOf("/")+1))||""}function eU(e){let r=e?e.lastIndexOf("/"):-1;return r>=0?e.substr(r+1):""}function rU(e){let r=e?e.lastIndexOf("/"):-1;return r>=0?e.substr(0,r):""}function aU(...e){let r="/";return e=e.map((a,i)=>(i&&(a=a.replace(new RegExp(`^${r}`),"")),i!==e.length-1&&(a=a.replace(new RegExp(`${r}$`),"")),a)),e.join(r)}function tU(...e){let r=[];for(let n=0;n<e.length;n++)r[n]=e[n];let a="",i=!1,t;for(let n=r.length-1;n>=-1&&!i;n--){let o;n>=0?o=r[n]:(t===void 0&&(t=$5()),o=t),o.length!==0&&(a=`${o}/${a}`,i=o.charCodeAt(0)===Bc)}return a=iU(a,!i),i?`/${a}`:a.length>0?a:"."}var Bc=47,w0=46;function iU(e,r){let a="",i=-1,t=0,n,o=!1;for(let s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===Bc)break;n=Bc}if(n===Bc){if(!(i===s-1||t===1))if(i!==s-1&&t===2){if(a.length<2||!o||a.charCodeAt(a.length-1)!==w0||a.charCodeAt(a.length-2)!==w0){if(a.length>2){let c=a.length-1,l=c;for(;l>=0&&a.charCodeAt(l)!==Bc;--l);if(l!==c){a=l===-1?"":a.slice(0,l),i=s,t=0,o=!1;continue}}else if(a.length===2||a.length===1){a="",i=s,t=0,o=!1;continue}}r&&(a.length>0?a+="/..":a="..",o=!0)}else{let c=e.slice(i+1,s);a.length>0?a+=`/${c}`:a=c,o=!1}i=s,t=0}else n===w0&&t!==-1?++t:t=-1}return a}var qc=new Error("Not implemented"),gp=class{handle;size=0;bigsize=0n;url="";constructor(r,a,i){var t;if((t=globalThis.loaders)!=null&&t.NodeFile)return new globalThis.loaders.NodeFile(r,a,i);throw Ii?new Error("Can't instantiate NodeFile in browser."):new Error("Can't instantiate NodeFile. Make sure to import @loaders.gl/polyfills first.")}async read(r,a){throw qc}async write(r,a,i){throw qc}async stat(){throw qc}async truncate(r){throw qc}async append(r){throw qc}async close(){}};var Ic=class{file;constructor(r,a=!1){this.file=new gp(r,a?"a+":"r")}async truncate(r){await this.file.truncate(r)}async append(r){await this.file.append(r)}async destroy(){await this.file.close()}async getUint8(r){let a=await this.file.read(r,1),i=new Uint8Array(a).at(0);if(i===void 0)throw new Error("something went wrong");return i}async getUint16(r){let a=await this.file.read(r,2),i=new Uint16Array(a).at(0);if(i===void 0)throw new Error("something went wrong");return i}async getUint32(r){let a=await this.file.read(r,4),i=new Uint32Array(a).at(0);if(i===void 0)throw new Error("something went wrong");return i}async getBigUint64(r){let a=await this.file.read(r,8),i=new BigInt64Array(a).at(0);if(i===void 0)throw new Error("something went wrong");return i}async slice(r,a){let i=a-r;if(i>Number.MAX_SAFE_INTEGER)throw new Error("too big slice");let t=Number(i);return await this.file.read(r,t)}get length(){return this.file.bigsize}};var In=Ja(require("fs"),1),Zo=class{handle;size;bigsize;url;constructor(r,a,i){r=Cc(r),this.handle=In.default.openSync(r,a,i);let t=In.default.fstatSync(this.handle,{bigint:!0});this.size=Number(t.size),this.bigsize=t.size,this.url=r}async close(){return new Promise((r,a)=>{In.default.close(this.handle,i=>i?a(i):r())})}async truncate(r){return new Promise((a,i)=>{In.default.ftruncate(this.handle,r,t=>{t?i(t):(this.bigsize=BigInt(r),this.size=Number(this.bigsize),a())})})}async append(r){return new Promise((a,i)=>{In.default.appendFile(this.handle,r,t=>{t?i(t):(this.bigsize=this.bigsize+BigInt(r.length),this.size=Number(this.bigsize),a())})})}async stat(){return await new Promise((r,a)=>In.default.fstat(this.handle,{bigint:!0},(i,t)=>{let n={size:Number(t.size),bigsize:t.size,isDirectory:t.isDirectory()};i?a(i):r(n)}))}async read(r,a){let i=new ArrayBuffer(a),t=BigInt(r),n=0,o=new Uint8Array(i),s;for(;a>0;){let c=await oU(this.handle,o,0,a,t);if(c===0)break;n+=c,t+=BigInt(c),a-=c,s!==void 0&&(s+=c)}return n<a?i.slice(0,n):i}async write(r,a=0,i=r.byteLength){return new Promise((t,n)=>{let o=Number(a),s=new Uint8Array(r,Number(a),i);In.default.write(this.handle,s,0,i,o,(c,l)=>c?n(c):t(l))})}};async function oU(e,r,a,i,t){return await new Promise((n,o)=>In.default.read(e,r,a,i,t,(s,c)=>s?o(s):n(c)))}var wp=Ja(require("fs/promises"),1);var _0=Ja(require("fs"),1),k0=require("stream");var bp=Ja(require("zlib"),1),sU=e=>e&&e instanceof ArrayBuffer,uU=e=>e&&e instanceof Buffer;function yp(e,r){switch(r==null?void 0:r.get("content-encoding")){case"br":return e.pipe(bp.default.createBrotliDecompress());case"gzip":return e.pipe(bp.default.createGunzip());case"deflate":return e.pipe(bp.default.createDeflate());default:return e}}async function W5(e){let r=[];return await new Promise((a,i)=>{e.on("error",t=>i(t)),e.on("readable",()=>e.read()),e.on("data",t=>{typeof t=="string"&&i(new Error("Read stream not binary")),r.push(lU(t))}),e.on("end",()=>{let t=cU(r);a(t)})})}function cU(e){let r=e.map(n=>n instanceof ArrayBuffer?new Uint8Array(n):n),a=r.reduce((n,o)=>n+o.byteLength,0),i=new Uint8Array(a),t=0;for(let n of r)i.set(n,t),t+=n.byteLength;return i.buffer}function lU(e){if(sU(e))return e;if(uU(e))return new Uint8Array(e).buffer;if(ArrayBuffer.isView(e))return e.buffer;if(typeof e=="string"){let r=e;return new TextEncoder().encode(r).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error(`toArrayBuffer(${JSON.stringify(e,null,2).slice(10)})`)}var fU=e=>typeof e=="boolean",K5=e=>typeof e=="function",pU=e=>e!==null&&typeof e=="object",hU=e=>pU(e)&&K5(e.read)&&K5(e.pipe)&&fU(e.readable);async function xp(e,r){let a=/^file:\/\//;e.replace(a,"/");let i=e.split("?")[0];i=Cc(i);let t=new Headers;e.endsWith(".gz")&&(t["content-encoding"]="gzip"),e.endsWith(".br")&&(t["content-encoding"]="br");try{let n=await new Promise((v,h)=>{let d=_0.default.createReadStream(i,{encoding:null});d.once("readable",()=>v(d)),d.on("error",y=>h(y))}),o=n;hU(n)?o=yp(n,t):typeof n=="string"?o=k0.Readable.from([new TextEncoder().encode(n)]):o=k0.Readable.from([n||new ArrayBuffer(0)]);let s=200,c="OK",l=dU(i),f=new Response(o,{headers:l,status:s,statusText:c});return Object.defineProperty(f,"url",{value:e}),f}catch(n){let o=n.message,s=400,c=o,l={},f=new Response(o,{headers:l,status:s,statusText:c});return Object.defineProperty(f,"url",{value:e}),f}}function dU(e){let r={};if(!r["content-length"]){let a=_0.default.statSync(e);r["content-length"]=a.size}return e.endsWith(".gz")&&(e=e.slice(0,-3),r["content-encoding"]="gzip"),new Headers(r)}var kp=class{readable=!0;writable=!0;constructor(){}async readdir(r=".",a){return await wp.default.readdir(r,a)}async stat(r){let a=await wp.default.stat(r,{bigint:!0});return{size:Number(a.size),bigsize:a.size,isDirectory:a.isDirectory()}}async unlink(r){return await wp.default.unlink(r)}async fetch(r,a){return await xp(r,a)}async openReadableFile(r,a="r"){return new Zo(r,a)}async openWritableFile(r,a="w",i){return new Zo(r,a,i)}};var Rc=class{constructor(r={}){this.hashBatches=this.hashBatches.bind(this)}async preload(){}async*hashBatches(r,a="base64"){var o,s;let i=[];for await(let c of r)i.push(c),yield c;let t=await this.concatenate(i),n=await this.hash(t,a);(s=(o=this.options.crypto)==null?void 0:o.onEnd)==null||s.call(o,{hash:n})}async concatenate(r){return await Fc(r)}};var Oc=Ja(require("crypto"),1),_p=class extends Rc{name="crypto-node";options;_algorithm;_hash;constructor(r){var a,i;if(super(),this.options=r,!((i=(a=this.options)==null?void 0:a.crypto)!=null&&i.algorithm))throw new Error(this.name)}async hash(r,a){var t,n,o,s;let i=(o=(n=(t=this.options)==null?void 0:t.crypto)==null?void 0:n.algorithm)==null?void 0:o.toLowerCase();try{if(!Oc.createHash)throw new Error("crypto.createHash not available");let c=(s=Oc.createHash)==null?void 0:s(i),l=new Uint8Array(r);return c.update(l).digest("base64")}catch(c){throw Error(`${i} hash not available. ${c}`)}}async*hashBatches(r,a="base64"){var n,o,s,c,l,f,v;if(!Oc.createHash)throw new Error("crypto.createHash not available");let i=(c=Oc.createHash)==null?void 0:c((s=(o=(n=this.options)==null?void 0:n.crypto)==null?void 0:o.algorithm)==null?void 0:s.toLowerCase());for await(let h of r){let d=new Uint8Array(h);i.update(d),yield h}let t=i.digest(a);(v=(f=(l=this.options)==null?void 0:l.crypto)==null?void 0:f.onEnd)==null||v.call(f,{hash:t})}};var u4=require("process");var G5=Ja(require("stream"),1),j0=class{},mU=G5.Readable||j0;function E0(e,r){let a=e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]();return new S0(a,r)}var S0=class extends mU{_pulling;_bytesMode;_iterator;constructor(r,a){super(a),this._iterator=r,this._pulling=!1,this._bytesMode=!a||!a.objectMode}async _read(r){this._pulling||(this._pulling=!0,this._pulling=await this._pull(r,this._iterator))}async _destroy(r,a){var i,t,n,o;this._iterator&&(r?await((t=(i=this._iterator)==null?void 0:i.throw)==null?void 0:t.call(i,r)):await((o=(n=this._iterator)==null?void 0:n.return)==null?void 0:o.call(n,r)),a==null||a(null))}async _pull(r,a){var n;let i=this._bytesMode,t=null;for(;this.readable&&!(t=await a.next()).done&&(r!==null&&(r-=i&&ArrayBuffer.isView(t.value)?t.value.byteLength:1),!(!this.push(new Uint8Array(t.value))||r<=0)););return(t!=null&&t.done||!this.readable)&&(this.push(null)||!0)&&((n=a==null?void 0:a.return)==null||n.call(a)),!this.readable}};var Q5=Ja(Z5(),1);delete globalThis.ReadableStream;var Sp=class extends Q5.ReadableStream{};var Ep=class{chunks;isWorking=!1;isCancelled=!1;constructor(r){this.chunks=r}start(r){this.work(r)}async work(r){let{chunks:a}=this;for(this.isWorking=!0;!this.isCancelled&&(r.desiredSize||0)>0;){let i;try{i=a.next()}catch(t){r.error(t);break}i&&(!i.done&&!this.isCancelled?r.enqueue(i.value):r.close())}this.isWorking=!1}pull(r){this.isWorking||this.work(r)}cancel(){this.isCancelled=!0}};var Ap=class extends Sp{_chunks;constructor(r){super(new Ep(r.values()),{type:"bytes"}),this._chunks=r}async*[Symbol.asyncIterator](r){let a=this.getReader();yield*this._chunks,a.releaseLock()}};var Qo=class{type;size;parts;constructor(r=[],a={}){this.parts=[],this.size=0;for(let i of r)if(typeof i=="string"){let t=new TextEncoder().encode(i);this.parts.push(t),this.size+=t.byteLength}else if(i instanceof Qo)this.size+=i.size,this.parts.push(...i.parts);else if(i instanceof ArrayBuffer)this.parts.push(new Uint8Array(i)),this.size+=i.byteLength;else if(i instanceof Uint8Array)this.parts.push(i),this.size+=i.byteLength;else if(ArrayBuffer.isView(i)){let{buffer:t,byteOffset:n,byteLength:o}=i;this.parts.push(new Uint8Array(t,n,o)),this.size+=o}else{let t=new TextEncoder().encode(String(i));this.parts.push(t),this.size+=t.byteLength}this.type=vU(a.type)}slice(r=0,a=this.size,i=""){let{size:t,parts:n}=this,o=r<0?Math.max(t+r,0):Math.min(r,t),s=a<0?Math.max(t+a,0):Math.min(a,t),c=Math.max(s-o,0),l=new Qo([],{type:i});if(c===0)return l;let f=0,v=[];for(let h of n){let{byteLength:d}=h;if(o>0&&d<=o)o-=d,s-=d;else{let y=h.subarray(o,Math.min(d,s));if(v.push(y),f+=y.byteLength,o=0,f>=c)break}}return l.parts=v,l.size=f,l}async arrayBuffer(){return this._toArrayBuffer()}async text(){let r=new TextDecoder,a="";for(let i of this.parts)a+=r.decode(i);return a}stream(){return new Ap(this.parts)}toString(){return"[object Blob]"}get[Symbol.toStringTag](){return"Blob"}_toArrayBuffer(){let r=new ArrayBuffer(this.size),a=new Uint8Array(r),i=0;for(let t of this.parts)a.set(t,i),i+=t.byteLength;return r}};function vU(e=""){let r=String(e).toLowerCase();return/[^\u0020-\u007E]/.test(r)?"":r}function gU(){return typeof Blob>"u"&&!globalThis.Blob&&(globalThis.Blob=Qo),globalThis.Blob}var bU=gU();var Pp=class{onload;onabort;onerror;error;onloadstart;onloadend;onprogress;readyState;result;DONE;EMPTY;LOADING;addEventListener;removeEventListener;dispatchEvent;constructor(){this.onload=null}abort(){}async readAsArrayBuffer(r){let a=await r.arrayBuffer();this.onload&&this.onload({target:{result:a}})}async readAsBinaryString(r){throw Error("Not implemented")}async readAsDataURL(r){let a=await r.text(),i=`data://;base64,${Eu(a)}`;this.onload&&this.onload({target:{result:i}})}async readAsText(r){let a=await r.text();this.onload&&this.onload({target:{result:a}})}};var Tp=class extends globalThis.Blob{name="";webkitRelativePath="";lastModified;constructor(r,a,i={}){super(r,i),this.name=String(a).replace(/\//g,":"),this.lastModified=(i==null?void 0:i.lastModified)||Date.now()}get[Symbol.toStringTag](){return"File"}};function X5(){return typeof FileReader>"u"&&!globalThis.FileReader&&(globalThis.FileReader=Pp),typeof File>"u"&&!globalThis.File&&(globalThis.File=Tp),global}var yU=X5();var A0=Ja(require("module"),1),J5=Ja(require("path"),1),Cp=Ja(require("fs"),1);async function e4(e){return e.startsWith("http")?await(await fetch(e)).arrayBuffer():Cp.default.readFileSync(e).buffer}async function r4(e){return e.startsWith("http")?await(await fetch(e)).text():Cp.default.readFileSync(e,"utf8")}async function a4(e){if(e.startsWith("http")){let i=await(await fetch(e)).text();return Fp(i)}e.startsWith("/")||(e=`${process.cwd()}/${e}`);let r=await Cp.default.readFileSync(e,"utf8");return Fp(r)}function Fp(e,r="",a){if(typeof r=="object"&&(a=r,r=""),r=r.replace("file://",""),typeof e!="string")throw new Error(`code must be a string, not ${typeof e}`);let i=A0.default._nodeModulePaths(J5.default.dirname(r)),t=typeof module<"u"&&(module==null?void 0:module.parent),n=new A0.default(r,t);return n.filename=r,n.paths=[].concat((a==null?void 0:a.prependPaths)||[]).concat(i).concat((a==null?void 0:a.appendPaths)||[]),n._compile(e,r),t&&t.children&&t.children.splice(t.children.indexOf(n),1),n.exports}var Ri=class{map;constructor(r){this.map={},r instanceof Ri?r.forEach((a,i)=>this.append(i,a)):Array.isArray(r)?r.forEach(a=>this.append(a[0],a[1])):r&&Object.getOwnPropertyNames(r).forEach(a=>this.append(a,r[a]))}append(r,a){r=zc(r),a=t4(a);let i=this.map[r];this.map[r]=i?`${i}, ${a}`:a}delete(r){delete this.map[zc(r)]}get(r){return r=zc(r),this.has(r)?this.map[r]:null}has(r){return this.map.hasOwnProperty(zc(r))}set(r,a){this.map[zc(r)]=t4(a)}forEach(r,a=null){for(let i in this.map)this.map.hasOwnProperty(i)&&(a?r.call(a,this.map[i],i,this):r(this.map[i],i,this))}keys(){let r=[];return this.forEach(function(a,i){r.push(i)}),P0(r)}values(){let r=[];return this.forEach(function(a){r.push(a)}),P0(r)}entries(){let r=[];return this.forEach(function(a,i){r.push([i,a])}),P0(r)}*[Symbol.iterator](){yield*this.entries()}};function zc(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e)||e==="")throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function t4(e){return typeof e!="string"&&(e=String(e)),e}function P0(e){let r={next(){let a=e.shift();return{done:a===void 0,value:a}}};return r[Symbol.iterator]=function(){return r},r}function T0(e,r){if(!e)throw new Error(`@loaders.gl/polyfills assertion ${r}`)}var C0=Ja(require("stream"),1),xU=e=>typeof e=="boolean",i4=e=>typeof e=="function",wU=e=>e!==null&&typeof e=="object",F0=e=>wU(e)&&i4(e.read)&&i4(e.pipe)&&xU(e.readable),Rn=class{ok;status;statusText;headers;url;bodyUsed=!1;_body;constructor(r,a){let{headers:i,status:t=200,statusText:n="OK",url:o}=a||{};this.url=o,this.ok=t===200,this.status=t,this.statusText=n,this.headers=new Ri((a==null?void 0:a.headers)||{}),F0(r)?this._body=yp(r,i):typeof r=="string"?this._body=C0.Readable.from([new TextEncoder().encode(r)]):this._body=C0.Readable.from([r||new ArrayBuffer(0)])}get body(){return T0(!this.bodyUsed),T0(F0(this._body)),this.bodyUsed=!0,this._body}async arrayBuffer(){return F0(this._body)?await W5(this._body):this._body||new ArrayBuffer(0)}async text(){let r=await this.arrayBuffer();return new TextDecoder().decode(r)}async json(){let r=await this.text();return JSON.parse(r)}async blob(){if(typeof Blob>"u")throw new Error("Blob polyfill not installed");return new Blob([await this.arrayBuffer()])}};var o4=Ja(require("http"),1),s4=Ja(require("https"),1);var kU=e=>e&&e instanceof ArrayBuffer,_U=e=>e&&e instanceof Buffer;function n4(e){let r=e.indexOf(","),a,i;return e.slice(r-7,r)===";base64"?(a=Buffer.from(e.slice(r+1),"base64"),i=e.slice(5,r-7).trim()):(a=Buffer.from(decodeURIComponent(e.slice(r+1))),i=e.slice(5,r).trim()),i?i.startsWith(";")&&(i=`text/plain${i}`):i="text/plain;charset=US-ASCII",{arrayBuffer:jU(a),mimeType:i}}function jU(e){if(kU(e))return e;if(_U(e))return new Uint8Array(e).buffer;if(ArrayBuffer.isView(e))return e.buffer;if(typeof e=="string"){let r=e;return new TextEncoder().encode(r).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error(`toArrayBuffer(${JSON.stringify(e,null,2).slice(10)})`)}var B0=e=>e.startsWith("data:"),SU=e=>e.startsWith("http:")||e.startsWith("https:");async function Dc(e,r){try{if(globalThis.fetch!==Dc&&(SU(e)||B0(e)))return await fetch(e,r);if(B0(e)){let{arrayBuffer:l,mimeType:f}=n4(e);return new Rn(l,{headers:{"content-type":f},url:e})}let a={},i=e;e.endsWith(".gz")&&(e=e.slice(0,-3),a["content-encoding"]="gzip");let t=await EU(i,r),n=FU(e,t,a),{status:o,statusText:s}=TU(t),c=!r||r.followRedirect||r.followRedirect===void 0;if(o>=300&&o<400&&n.has("location")&&c){let l=AU(e,n.get("location"));return await Dc(l,r)}return new Rn(t,{headers:n,status:o,statusText:s,url:e})}catch(a){return new Rn(null,{status:400,statusText:String(a),url:e})}}async function EU(e,r){return await new Promise((a,i)=>{let t=PU(e,r),n=e.startsWith("https:")?s4.default.request(t,o=>a(o)):o4.default.request(t,o=>a(o));n.on("error",o=>i(o)),n.end()})}function AU(e,r){if(r.startsWith("http"))return r;let a=new URL(e);return a.pathname=r,a.href}function PU(e,r){let a=(r==null?void 0:r.headers)||{},i={};for(let n of Object.keys(a))i[n.toLowerCase()]=a[n];i["accept-encoding"]=i["accept-encoding"]||"gzip,br,deflate";let t=new URL(e);return{hostname:t.hostname,path:t.pathname,method:"GET",...r,...r==null?void 0:r.fetch,headers:i,port:t.port}}function TU(e){return e.statusCode?{status:e.statusCode,statusText:e.statusMessage||"NA"}:{status:200,statusText:"OK"}}function FU(e,r,a={}){let i={};if(r&&r.headers){let t=r.headers;for(let n in t){let o=t[n];i[n.toLowerCase()]=String(o)}}if(!i["content-length"]){let t=CU(e);Number.isFinite(t)&&(i["content-length"]=t)}return Object.assign(i,a),new Ri(i)}function CU(e){return B0(e)?e.length-5:null}var BU=parseInt(u4.versions.node.split(".")[0]);Qg&&console.error("loaders.gl: The @loaders.gl/polyfills should only be used in Node.js environments");globalThis.loaders=globalThis.loaders||{};globalThis.loaders.makeNodeStream=E0;globalThis.loaders.NodeFile=Zo;globalThis.loaders.NodeFileSystem=kp;globalThis.loaders.fetchNode=xp;globalThis.loaders.NodeHash=_p;globalThis.TextEncoder||(globalThis.TextEncoder=Su);globalThis.TextDecoder||(globalThis.TextDecoder=Co);!("atob"in globalThis)&&Eu&&(globalThis.atob=Eu);!("btoa"in globalThis)&&gh&&(globalThis.btoa=gh);globalThis.loaders.encodeImageNode=ax;globalThis.loaders.parseImageNode=y0;globalThis.loaders.imageFormatsNode=b0;globalThis._parseImageNode=y0;globalThis._imageFormatsNode=b0;globalThis.loaders.readFileAsArrayBuffer=e4;globalThis.loaders.readFileAsText=r4;globalThis.loaders.requireFromFile=a4;globalThis.loaders.requireFromString=Fp;BU<18&&(!("Headers"in globalThis)&&Ri&&(globalThis.Headers=Ri),!("Response"in globalThis)&&Rn&&(globalThis.Response=Rn),!("fetch"in globalThis)&&Dc&&(globalThis.fetch=Dc));var q0="Tile converter does not work in browser, only in node js environment";var qU=8n,IU=18n,RU=22n,OU=26n,zU=28n,Bp=30n,I0=new Uint8Array([80,75,3,4]),qp=async(e,r)=>{let a=await r.slice(e,e+4n);if(!x0(a,I0))return null;let i=await r.getUint16(e+OU),t=new TextDecoder().decode(await r.slice(e+Bp,e+Bp+BigInt(i))).split("\\").join("/"),n=await r.getUint16(e+zU),o=e+Bp+BigInt(i+n),s=await r.getUint16(e+qU),c=BigInt(await r.getUint32(e+IU)),l=BigInt(await r.getUint32(e+RU)),f=e+Bp+BigInt(i),v=4n;return l===BigInt(4294967295)&&(l=await r.getBigUint64(f+v),v+=8n),c===BigInt(4294967295)&&(c=await r.getBigUint64(f+v),v+=8n),o===BigInt(4294967295)&&(o=await r.getBigUint64(f+v)),{fileNameLength:i,fileName:t,extraFieldLength:n,fileDataOffset:o,compressedSize:c,compressionMethod:s}};var bQ=[{offset:0,size:4,default:new DataView(I0.buffer).getUint32(0,!0)},{offset:4,size:2,default:45},{offset:6,size:2,default:0},{offset:8,size:2,default:0},{offset:10,size:2,default:0},{offset:12,size:2,default:0},{offset:14,size:4,name:"crc32"},{offset:18,size:4,name:"length"},{offset:22,size:4,name:"length"},{offset:26,size:2,name:"fnlength"},{offset:28,size:2,default:0,name:"extraLength"}];var Ip=class{constructor(r){this.compressBatches=this.compressBatches.bind(this),this.decompressBatches=this.decompressBatches.bind(this)}async preload(){}async compress(r){return await this.preload(),this.compressSync(r)}async decompress(r,a){return await this.preload(),this.decompressSync(r,a)}compressSync(r){throw new Error(`${this.name}: sync compression not supported`)}decompressSync(r,a){throw new Error(`${this.name}: sync decompression not supported`)}async*compressBatches(r){let a=await this.concatenate(r);yield this.compress(a)}async*decompressBatches(r){let a=await this.concatenate(r);yield this.decompress(a)}concatenate(r){return Fc(r)}improveError(r){return r.message.includes(this.name)||(r.message=`${this.name} ${r.message}`),r}};var os=Ja(YS(),1),Nn=Ja(require("zlib"),1);var Qp=class extends Ip{name="deflate";extensions=[];contentEncodings=["deflate"];isSupported=!0;options;_chunks=[];constructor(r={}){super(r),this.options=r}async compress(r){var a,i;if(!Ii&&((a=this.options.deflate)!=null&&a.useZlib)){let t=(i=this.options.deflate)!=null&&i.gzip?await ou(Nn.default.gzip)(r):await ou(Nn.default.deflate)(r);return nu(t)}return this.compressSync(r)}async decompress(r){var a,i;if(!Ii&&((a=this.options.deflate)!=null&&a.useZlib)){let t=(i=this.options.deflate)!=null&&i.gzip?await ou(Nn.default.gunzip)(r):await ou(Nn.default.inflate)(r);return nu(t)}return this.decompressSync(r)}compressSync(r){var n,o,s,c;if(!Ii&&((n=this.options.deflate)!=null&&n.useZlib)){let l=(o=this.options.deflate)!=null&&o.gzip?Nn.default.gzipSync(r):Nn.default.deflateSync(r);return nu(l)}let a=((s=this.options)==null?void 0:s.deflate)||{},i=new Uint8Array(r);return((c=this.options)!=null&&c.raw?os.default.deflateRaw:os.default.deflate)(i,a).buffer}decompressSync(r){var n,o,s,c;if(!Ii&&((n=this.options.deflate)!=null&&n.useZlib)){let l=(o=this.options.deflate)!=null&&o.gzip?Nn.default.gunzipSync(r):Nn.default.inflateSync(r);return nu(l)}let a=((s=this.options)==null?void 0:s.deflate)||{},i=new Uint8Array(r);return((c=this.options)!=null&&c.raw?os.default.inflateRaw:os.default.inflate)(i,a).buffer}async*compressBatches(r){var t;let a=((t=this.options)==null?void 0:t.deflate)||{},i=new os.default.Deflate(a);yield*this.transformBatches(i,r)}async*decompressBatches(r){var t;let a=((t=this.options)==null?void 0:t.deflate)||{},i=new os.default.Inflate(a);yield*this.transformBatches(i,r)}async*transformBatches(r,a){r.onData=this._onData.bind(this),r.onEnd=this._onEnd.bind(this);for await(let o of a){let s=new Uint8Array(o);if(!r.push(s,!1))throw new Error(`${this._getError()}write`);yield*this._getChunks()}let i=new Uint8Array(0),t=r.push(i,!0);yield*this._getChunks()}_onData(r){this._chunks.push(r)}_onEnd(r){if(r!==0)throw new Error(this._getError(r)+this._chunks.length)}_getChunks(){let r=this._chunks;return this._chunks=[],r}_getError(r=0){let a={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};return`${this.name}: ${a[r]}`}};var rl=class extends Qp{name="gzip";extensions=["gz","gzip"];contentEncodings=["gzip","x-gzip"];isSupported=!0;constructor(r){super({...r,deflate:{...r==null?void 0:r.gzip,gzip:!0}})}};var mg=require("fs"),vg=require("path");async function ZS(e,r,a="index.json"){let i;r instanceof Promise?i=new Uint8Array(await r):r instanceof ArrayBuffer?i=new Uint8Array(r):i=r,await mg.promises.mkdir(e,{recursive:!0});let t=(0,vg.join)(e,a);try{await mg.promises.writeFile(t,i)}catch(n){throw n}return console.log(`${t} saved.`),t}var FH=["3dSceneLayer.json.gz","3dNodeIndexDocument.json.gz","sharedResource.json.gz"],al=class{async extract(r){if(Ii)return console.log(q0),q0;let{inputUrl:a}=r,i=new Ic(a),t=await qp(0n,i);for(;t;)await this.writeFile(await this.unGzip({name:this.correctIndexNames(t.fileName),data:await i.slice(t.fileDataOffset,t.fileDataOffset+t.compressedSize)}),r.outputPath),t=await qp(t.fileDataOffset+(t==null?void 0:t.compressedSize),i);return"success"}correctIndexNames(r){if(FH.includes(un.filename(un.join("/",r))))return un.join(un.dirname(r),"index.json.gz");let a=/^(.*\/[^\/\.]*)(\..+)$/.exec(r);return a?`${a==null?void 0:a.at(1)}/index${a==null?void 0:a.at(2)}`:null}async unGzip(r){return/\.gz$/.test(r.name??"")?{data:await new rl().decompress(r.data),name:(r.name??"").slice(0,-3)}:Promise.resolve(r)}async writeFile(r,a){if(!r.name)return;let i=un.join(a,r.name),t=un.dirname(i),n=un.filename(i);await ZS(t,r.data,n)}};function CH(e,r){if(e+1>=r.length)return"";let a=r[e+1];return a.indexOf("--")===0?"":a}function gg(e,r){let a=CH(e,r);return console.log(`Input tileset value: ${a}`),console.log(`Modified tileset value: ${a.replace(/\\/g,"/")}`),a.replace(/\\/g,"/")}function QS(e){return e.reduce((r,a)=>{let i=a.indexOf("="),t=a.slice(0,i),n=a.slice(i+1,a.length);return a.includes("=")&&a.startsWith("--")&&n?r.concat(t,n):r.concat(a)},[])}async function BH(){let[,,...e]=process.argv;e.length===0&&XS();let r=QS(e),a=RH(r),i=IH(a);await qH(i)}BH().catch(e=>{console.log(e),process.exit(1)});function XS(){console.log("cli: converter slpk to I3S..."),console.log('--output [Output folder, default: "data" folder]'),console.log("--tileset [SLPK file]"),process.exit(0)}async function qH(e){console.log("------------------------------------------------"),console.log("Starting conversion of SLPK"),console.log("------------------------------------------------"),new al().extract({inputUrl:e.tileset,outputPath:e.output})}function IH(e){let r={output:()=>console.log("Missed: --output [Output path name]"),tileset:()=>console.log("Missed: --tileset [SLPK file]")},a=[];for(let i in r)e[i]||a.push(r[i]);return a.length&&(a.forEach(i=>i()),process.exit(1)),e}function RH(e){let r={};return e.forEach((a,i)=>{if(a.indexOf("--")===0)switch(a){case"--tileset":r.tileset=gg(i,e);break;case"--output":r.output=gg(i,e);break;case"--help":XS();break;default:console.warn(`Unknown option ${a}`),process.exit(0)}}),r}
94
+ `,v.message,v.stack);var h=new Error("tunneling socket could not be established, cause="+v.message);h.code="ECONNRESET",r.request.emit("error",h),i.removeSocket(t)}};on.prototype.removeSocket=function(r){var a=this.sockets.indexOf(r);if(a!==-1){this.sockets.splice(a,1);var i=this.requests.shift();i&&this.createConnection(i)}};function n5(e,r){var a=this;on.prototype.createSocket.call(a,e,function(i){var t=$L.connect(0,o5({},a.options,{servername:e.host,socket:i}));a.sockets[a.sockets.indexOf(i)]=t,r(t)})}function o5(e){for(var r=1,a=arguments.length;r<a;++r){var i=arguments[r];if(typeof i=="object")for(var t=Object.keys(i),n=0,o=t.length;n<o;++n){var s=t[n];i[s]!==void 0&&(e[s]=i[s])}}return e}var Yo;process.env.NODE_DEBUG&&/\btunnel\b/.test(process.env.NODE_DEBUG)?Yo=function(){var e=Array.prototype.slice.call(arguments);typeof e[0]=="string"?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:Yo=function(){};au.debug=Yo});var f5=O(l5=>{"use strict";var eN=require("url"),rN=s5(),u5=["accept","accept-charset","accept-encoding","accept-language","accept-ranges","cache-control","content-encoding","content-language","content-location","content-md5","content-range","content-type","connection","date","expect","max-forwards","pragma","referer","te","user-agent","via"],c5=["proxy-authorization"];function aN(e){var r=e.port,a=e.protocol,i=e.hostname+":";return r?i+=r:a==="https:"?i+="443":i+="80",i}function tN(e,r){var a=r.reduce(function(i,t){return i[t.toLowerCase()]=!0,i},{});return Object.keys(e).filter(function(i){return a[i.toLowerCase()]}).reduce(function(i,t){return i[t]=e[t],i},{})}function iN(e,r){var a=e.proxy,i={proxy:{host:a.hostname,port:+a.port,proxyAuth:a.auth,headers:r},headers:e.headers,ca:e.ca,cert:e.cert,key:e.key,passphrase:e.passphrase,pfx:e.pfx,ciphers:e.ciphers,rejectUnauthorized:e.rejectUnauthorized,secureOptions:e.secureOptions,secureProtocol:e.secureProtocol};return i}function nN(e,r){var a=e.protocol==="https:"?"https":"http",i=r.protocol==="https:"?"Https":"Http";return[a,i].join("Over")}function oN(e){var r=e.uri,a=e.proxy,i=nN(r,a);return rN[i]}function jc(e){this.request=e,this.proxyHeaderWhiteList=u5,this.proxyHeaderExclusiveList=[],typeof e.tunnel<"u"&&(this.tunnelOverride=e.tunnel)}jc.prototype.isEnabled=function(){var e=this,r=e.request;return typeof e.tunnelOverride<"u"?e.tunnelOverride:r.uri.protocol==="https:"};jc.prototype.setup=function(e){var r=this,a=r.request;if(e=e||{},typeof a.proxy=="string"&&(a.proxy=eN.parse(a.proxy)),!a.proxy||!a.tunnel)return!1;e.proxyHeaderWhiteList&&(r.proxyHeaderWhiteList=e.proxyHeaderWhiteList),e.proxyHeaderExclusiveList&&(r.proxyHeaderExclusiveList=e.proxyHeaderExclusiveList);var i=r.proxyHeaderExclusiveList.concat(c5),t=r.proxyHeaderWhiteList.concat(i),n=tN(a.headers,t);n.host=aN(a.uri),i.forEach(a.removeHeader,a);var o=oN(a),s=iN(a,n);return a.agent=o(s),!0};jc.defaultProxyHeaderWhiteList=u5;jc.defaultProxyHeaderExclusiveList=c5;l5.Tunnel=jc});var h5=O((p5,Sc)=>{(function(){var e,r,a,i,t,n;typeof performance<"u"&&performance!==null&&performance.now?Sc.exports=function(){return performance.now()}:typeof process<"u"&&process!==null&&process.hrtime?(Sc.exports=function(){return(e()-t)/1e6},r=process.hrtime,e=function(){var o;return o=r(),o[0]*1e9+o[1]},i=e(),n=process.uptime()*1e9,t=i-n):Date.now?(Sc.exports=function(){return Date.now()-a},a=Date.now()):(Sc.exports=function(){return new Date().getTime()-a},a=new Date().getTime())}).call(p5)});var j5=O((_Y,_5)=>{"use strict";var sN=require("http"),g5=require("https"),Ec=require("url"),m0=require("util"),hp=require("stream"),pp=require("zlib"),d0=Jw(),uN=c2(),cN=J_(),lN=Df(),b5=Lf(),d5=u3(),fN=O3(),pN=Ol(),m5=Cv(),hN=M3().strict,iu=Ul(),dN=Md(),mN=$3(),vN=tj().Querystring,gN=C8().Har,bN=N8().Auth,yN=Q8().OAuth,xN=X8(),wN=e5().Multipart,kN=t5().Redirect,v0=f5().Tunnel,tu=h5(),Ac=Es().Buffer,v5=iu.safeStringify,_N=iu.isReadStream,jN=iu.toBase64,SN=iu.defer,y5=iu.copy,EN=iu.version,x5=dN.jar(),w5={};function AN(e,r){var a={};for(var i in r){var t=e.indexOf(i)===-1;t&&(a[i]=r[i])}return a}function PN(e,r){var a={};for(var i in r){var t=e.indexOf(i)!==-1,n=typeof r[i]=="function";t&&n||(a[i]=r[i])}return a}function k5(){var e=this;return{uri:e.uri,method:e.method,headers:e.headers}}function TN(){var e=this;return{statusCode:e.statusCode,body:e.body,headers:e.headers,request:k5.call(e.request)}}function Rr(e){var r=this;e.har&&(r._har=new gN(r),e=r._har.options(e)),hp.Stream.call(r);var a=Object.keys(Rr.prototype),i=AN(a,e);pN(r,i),e=PN(a,e),r.readable=!0,r.writable=!0,e.method&&(r.explicitMethod=!0),r._qs=new vN(r),r._auth=new bN(r),r._oauth=new yN(r),r._multipart=new wN(r),r._redirect=new kN(r),r._tunnel=new v0(r),r.init(e)}m0.inherits(Rr,hp.Stream);Rr.debug=process.env.NODE_DEBUG&&/\brequest\b/.test(process.env.NODE_DEBUG);function ot(){Rr.debug&&console.error("REQUEST %s",m0.format.apply(m0,arguments))}Rr.prototype.debug=ot;Rr.prototype.init=function(e){var r=this;e||(e={}),r.headers=r.headers?y5(r.headers):{};for(var a in r.headers)typeof r.headers[a]>"u"&&delete r.headers[a];if(b5.httpify(r,r.headers),r.method||(r.method=e.method||"GET"),r.localAddress||(r.localAddress=e.localAddress),r._qs.init(e),ot(e),!r.pool&&r.pool!==!1&&(r.pool=w5),r.dests=r.dests||[],r.__isRequestRequest=!0,!r._callback&&r.callback&&(r._callback=r.callback,r.callback=function(){r._callbackCalled||(r._callbackCalled=!0,r._callback.apply(r,arguments))},r.on("error",r.callback.bind()),r.on("complete",r.callback.bind(r,null))),!r.uri&&r.url&&(r.uri=r.url,delete r.url),r.baseUrl){if(typeof r.baseUrl!="string")return r.emit("error",new Error("options.baseUrl must be a string"));if(typeof r.uri!="string")return r.emit("error",new Error("options.uri must be a string when using options.baseUrl"));if(r.uri.indexOf("//")===0||r.uri.indexOf("://")!==-1)return r.emit("error",new Error("options.uri must be a path when using options.baseUrl"));var i=r.baseUrl.lastIndexOf("/")===r.baseUrl.length-1,t=r.uri.indexOf("/")===0;i&&t?r.uri=r.baseUrl+r.uri.slice(1):i||t?r.uri=r.baseUrl+r.uri:r.uri===""?r.uri=r.baseUrl:r.uri=r.baseUrl+"/"+r.uri,delete r.baseUrl}if(!r.uri)return r.emit("error",new Error("options.uri is a required argument"));if(typeof r.uri=="string"&&(r.uri=Ec.parse(r.uri)),r.uri.href||(r.uri.href=Ec.format(r.uri)),r.uri.protocol==="unix:")return r.emit("error",new Error("`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`"));if(r.uri.host==="unix"&&r.enableUnixSocket(),r.strictSSL===!1&&(r.rejectUnauthorized=!1),r.uri.pathname||(r.uri.pathname="/"),!(r.uri.host||r.uri.hostname&&r.uri.port)&&!r.uri.isUnix){var n=Ec.format(r.uri),o='Invalid URI "'+n+'"';return Object.keys(e).length===0&&(o+=". This can be caused by a crappy redirection."),r.abort(),r.emit("error",new Error(o))}if(r.hasOwnProperty("proxy")||(r.proxy=mN(r.uri)),r.tunnel=r._tunnel.isEnabled(),r.proxy&&r._tunnel.setup(e),r._redirect.onRequest(e),r.setHost=!1,!r.hasHeader("host")){var s=r.originalHostHeaderName||"host";r.setHeader(s,r.uri.host),r.uri.port&&(r.uri.port==="80"&&r.uri.protocol==="http:"||r.uri.port==="443"&&r.uri.protocol==="https:")&&r.setHeader(s,r.uri.hostname),r.setHost=!0}if(r.jar(r._jar||e.jar),r.uri.port||(r.uri.protocol==="http:"?r.uri.port=80:r.uri.protocol==="https:"&&(r.uri.port=443)),r.proxy&&!r.tunnel?(r.port=r.proxy.port,r.host=r.proxy.hostname):(r.port=r.uri.port,r.host=r.uri.hostname),e.form&&r.form(e.form),e.formData){var c=e.formData,l=r.form(),f=function(I,z){z&&z.hasOwnProperty("value")&&z.hasOwnProperty("options")?l.append(I,z.value,z.options):l.append(I,z)};for(var v in c)if(c.hasOwnProperty(v)){var h=c[v];if(h instanceof Array)for(var d=0;d<h.length;d++)f(v,h[d]);else f(v,h)}}if(e.qs&&r.qs(e.qs),r.uri.path?r.path=r.uri.path:r.path=r.uri.pathname+(r.uri.search||""),r.path.length===0&&(r.path="/"),e.aws&&r.aws(e.aws),e.hawk&&r.hawk(e.hawk),e.httpSignature&&r.httpSignature(e.httpSignature),e.auth&&(Object.prototype.hasOwnProperty.call(e.auth,"username")&&(e.auth.user=e.auth.username),Object.prototype.hasOwnProperty.call(e.auth,"password")&&(e.auth.pass=e.auth.password),r.auth(e.auth.user,e.auth.pass,e.auth.sendImmediately,e.auth.bearer)),r.gzip&&!r.hasHeader("accept-encoding")&&r.setHeader("accept-encoding","gzip, deflate"),r.uri.auth&&!r.hasHeader("authorization")){var y=r.uri.auth.split(":").map(function(I){return r._qs.unescape(I)});r.auth(y[0],y.slice(1).join(":"),!0)}if(!r.tunnel&&r.proxy&&r.proxy.auth&&!r.hasHeader("proxy-authorization")){var _=r.proxy.auth.split(":").map(function(I){return r._qs.unescape(I)}),w="Basic "+jN(_.join(":"));r.setHeader("proxy-authorization",w)}r.proxy&&!r.tunnel&&(r.path=r.uri.protocol+"//"+r.uri.host+r.path),e.json&&r.json(e.json),e.multipart&&r.multipart(e.multipart),e.time&&(r.timing=!0,r.elapsedTime=r.elapsedTime||0);function A(){if(hN(r.body)&&(r.body=Ac.from(r.body)),!r.hasHeader("content-length")){var I;typeof r.body=="string"?I=Ac.byteLength(r.body):Array.isArray(r.body)?I=r.body.reduce(function(z,N){return z+N.length},0):I=r.body.length,I?r.setHeader("content-length",I):r.emit("error",new Error("Argument error, options.body."))}}r.body&&!m5(r.body)&&A(),e.oauth?r.oauth(e.oauth):r._oauth.params&&r.hasHeader("authorization")&&r.oauth(r._oauth.params);var T=r.proxy&&!r.tunnel?r.proxy.protocol:r.uri.protocol,P={"http:":sN,"https:":g5},R=r.httpModules||{};if(r.httpModule=R[T]||P[T],!r.httpModule)return r.emit("error",new Error("Invalid protocol: "+T));if(e.ca&&(r.ca=e.ca),!r.agent)if(e.agentOptions&&(r.agentOptions=e.agentOptions),e.agentClass)r.agentClass=e.agentClass;else if(e.forever){var F=EN();F.major===0&&F.minor<=10?r.agentClass=T==="http:"?d5:d5.SSL:(r.agentClass=r.httpModule.Agent,r.agentOptions=r.agentOptions||{},r.agentOptions.keepAlive=!0)}else r.agentClass=r.httpModule.Agent;r.pool===!1?r.agent=!1:r.agent=r.agent||r.getNewAgent(),r.on("pipe",function(I){if(r.ntick&&r._started&&r.emit("error",new Error("You cannot pipe to this stream after the outbound request has started.")),r.src=I,_N(I))r.hasHeader("content-type")||r.setHeader("content-type",lN.lookup(I.path));else{if(I.headers)for(var z in I.headers)r.hasHeader(z)||r.setHeader(z,I.headers[z]);r._json&&!r.hasHeader("content-type")&&r.setHeader("content-type","application/json"),I.method&&!r.explicitMethod&&(r.method=I.method)}}),SN(function(){if(!r._aborted){var I=function(){if(r._form&&(r._auth.hasAuth?r._auth.hasAuth&&r._auth.sentAuth&&r._form.pipe(r):r._form.pipe(r)),r._multipart&&r._multipart.chunked&&r._multipart.body.pipe(r),r.body)m5(r.body)?r.body.pipe(r):(A(),Array.isArray(r.body)?r.body.forEach(function(z){r.write(z)}):r.write(r.body),r.end());else if(r.requestBodyStream)console.warn("options.requestBodyStream is deprecated, please pass the request object to stream.pipe."),r.requestBodyStream.pipe(r);else if(!r.src){if(r._auth.hasAuth&&!r._auth.sentAuth){r.end();return}r.method!=="GET"&&typeof r.method<"u"&&r.setHeader("content-length",0),r.end()}};r._form&&!r.hasHeader("content-length")?(r.setHeader(r._form.getHeaders(),!0),r._form.getLength(function(z,N){!z&&!isNaN(N)&&r.setHeader("content-length",N),I()})):I(),r.ntick=!0}})};Rr.prototype.getNewAgent=function(){var e=this,r=e.agentClass,a={};if(e.agentOptions)for(var i in e.agentOptions)a[i]=e.agentOptions[i];e.ca&&(a.ca=e.ca),e.ciphers&&(a.ciphers=e.ciphers),e.secureProtocol&&(a.secureProtocol=e.secureProtocol),e.secureOptions&&(a.secureOptions=e.secureOptions),typeof e.rejectUnauthorized<"u"&&(a.rejectUnauthorized=e.rejectUnauthorized),e.cert&&e.key&&(a.key=e.key,a.cert=e.cert),e.pfx&&(a.pfx=e.pfx),e.passphrase&&(a.passphrase=e.passphrase);var t="";r!==e.httpModule.Agent&&(t+=r.name);var n=e.proxy;typeof n=="string"&&(n=Ec.parse(n));var o=n&&n.protocol==="https:"||this.uri.protocol==="https:";return o&&(a.ca&&(t&&(t+=":"),t+=a.ca),typeof a.rejectUnauthorized<"u"&&(t&&(t+=":"),t+=a.rejectUnauthorized),a.cert&&(t&&(t+=":"),t+=a.cert.toString("ascii")+a.key.toString("ascii")),a.pfx&&(t&&(t+=":"),t+=a.pfx.toString("ascii")),a.ciphers&&(t&&(t+=":"),t+=a.ciphers),a.secureProtocol&&(t&&(t+=":"),t+=a.secureProtocol),a.secureOptions&&(t&&(t+=":"),t+=a.secureOptions)),e.pool===w5&&!t&&Object.keys(a).length===0&&e.httpModule.globalAgent?e.httpModule.globalAgent:(t=e.uri.protocol+t,e.pool[t]||(e.pool[t]=new r(a),e.pool.maxSockets&&(e.pool[t].maxSockets=e.pool.maxSockets)),e.pool[t])};Rr.prototype.start=function(){var e=this;if(e.timing)var r=new Date().getTime(),a=tu();if(!e._aborted){e._started=!0,e.method=e.method||"GET",e.href=e.uri.href,e.src&&e.src.stat&&e.src.stat.size&&!e.hasHeader("content-length")&&e.setHeader("content-length",e.src.stat.size),e._aws&&e.aws(e._aws,!0);var i=y5(e);delete i.auth,ot("make request",e.uri.href),delete i.timeout;try{e.req=e.httpModule.request(i)}catch(n){e.emit("error",n);return}e.timing&&(e.startTime=r,e.startTimeNow=a,e.timings={});var t;e.timeout&&!e.timeoutTimer&&(e.timeout<0?t=0:typeof e.timeout=="number"&&isFinite(e.timeout)&&(t=e.timeout)),e.req.on("response",e.onRequestResponse.bind(e)),e.req.on("error",e.onRequestError.bind(e)),e.req.on("drain",function(){e.emit("drain")}),e.req.on("socket",function(n){var o=n._connecting||n.connecting;if(e.timing&&(e.timings.socket=tu()-e.startTimeNow,o)){var s=function(){e.timings.lookup=tu()-e.startTimeNow},c=function(){e.timings.connect=tu()-e.startTimeNow};n.once("lookup",s),n.once("connect",c),e.req.once("error",function(){n.removeListener("lookup",s),n.removeListener("connect",c)})}var l=function(){e.req.setTimeout(t,function(){if(e.req){e.abort();var v=new Error("ESOCKETTIMEDOUT");v.code="ESOCKETTIMEDOUT",v.connect=!1,e.emit("error",v)}})};if(t!==void 0)if(o){var f=function(){n.removeListener("connect",f),e.clearTimeout(),l()};n.on("connect",f),e.req.on("error",function(v){n.removeListener("connect",f)}),e.timeoutTimer=setTimeout(function(){n.removeListener("connect",f),e.abort();var v=new Error("ETIMEDOUT");v.code="ETIMEDOUT",v.connect=!0,e.emit("error",v)},t)}else l();e.emit("socket",n)}),e.emit("request",e.req)}};Rr.prototype.onRequestError=function(e){var r=this;if(!r._aborted){if(r.req&&r.req._reusedSocket&&e.code==="ECONNRESET"&&r.agent.addRequestNoreuse){r.agent={addRequest:r.agent.addRequestNoreuse.bind(r.agent)},r.start(),r.req.end();return}r.clearTimeout(),r.emit("error",e)}};Rr.prototype.onRequestResponse=function(e){var r=this;if(r.timing&&(r.timings.response=tu()-r.startTimeNow),ot("onRequestResponse",r.uri.href,e.statusCode,e.headers),e.on("end",function(){r.timing&&(r.timings.end=tu()-r.startTimeNow,e.timingStart=r.startTime,r.timings.socket||(r.timings.socket=0),r.timings.lookup||(r.timings.lookup=r.timings.socket),r.timings.connect||(r.timings.connect=r.timings.lookup),r.timings.response||(r.timings.response=r.timings.connect),ot("elapsed time",r.timings.end),r.elapsedTime+=Math.round(r.timings.end),e.elapsedTime=r.elapsedTime,e.timings=r.timings,e.timingPhases={wait:r.timings.socket,dns:r.timings.lookup-r.timings.socket,tcp:r.timings.connect-r.timings.lookup,firstByte:r.timings.response-r.timings.connect,download:r.timings.end-r.timings.response,total:r.timings.end}),ot("response end",r.uri.href,e.statusCode,e.headers)}),r._aborted){ot("aborted",r.uri.href),e.resume();return}if(r.response=e,e.request=r,e.toJSON=TN,r.httpModule===g5&&r.strictSSL&&(!e.hasOwnProperty("socket")||!e.socket.authorized)){ot("strict ssl error",r.uri.href);var a=e.hasOwnProperty("socket")?e.socket.authorizationError:r.uri.href+" does not support SSL";r.emit("error",new Error("SSL Error: "+a));return}r.originalHost=r.getHeader("host"),r.originalHostHeaderName||(r.originalHostHeaderName=r.hasHeader("host")),r.setHost&&r.removeHeader("host"),r.clearTimeout();var i=r._jar&&r._jar.setCookie?r._jar:x5,t=function(f){try{i.setCookie(f,r.uri.href,{ignoreError:!0})}catch(v){r.emit("error",v)}};if(e.caseless=b5(e.headers),e.caseless.has("set-cookie")&&!r._disableCookies){var n=e.caseless.has("set-cookie");Array.isArray(e.headers[n])?e.headers[n].forEach(t):t(e.headers[n])}if(!r._redirect.onResponse(e)){{e.on("close",function(){r._ended||r.response.emit("end")}),e.once("end",function(){r._ended=!0});var o=function(f){return r.method==="HEAD"||f>=100&&f<200||f===204||f===304},s;if(r.gzip&&!o(e.statusCode)){var c=e.headers["content-encoding"]||"identity";c=c.trim().toLowerCase();var l={flush:pp.Z_SYNC_FLUSH,finishFlush:pp.Z_SYNC_FLUSH};c==="gzip"?(s=pp.createGunzip(l),e.pipe(s)):c==="deflate"?(s=pp.createInflate(l),e.pipe(s)):(c!=="identity"&&ot("ignoring unrecognized Content-Encoding "+c),s=e)}else s=e;r.encoding&&(r.dests.length!==0?console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid."):s.setEncoding(r.encoding)),r._paused&&s.pause(),r.responseContent=s,r.emit("response",e),r.dests.forEach(function(f){r.pipeDest(f)}),s.on("data",function(f){r.timing&&!r.responseStarted&&(r.responseStartTime=new Date().getTime(),e.responseStartTime=r.responseStartTime),r._destdata=!0,r.emit("data",f)}),s.once("end",function(f){r.emit("end",f)}),s.on("error",function(f){r.emit("error",f)}),s.on("close",function(){r.emit("close")}),r.callback?r.readResponseBody(e):r.on("end",function(){if(r._aborted){ot("aborted",r.uri.href);return}r.emit("complete",e)})}ot("finish init function",r.uri.href)}};Rr.prototype.readResponseBody=function(e){var r=this;ot("reading response's body");var a=[],i=0,t=[];r.on("data",function(n){Ac.isBuffer(n)?n.length&&(i+=n.length,a.push(n)):t.push(n)}),r.on("end",function(){if(ot("end event",r.uri.href),r._aborted){ot("aborted",r.uri.href),a=[],i=0;return}if(i?(ot("has body",r.uri.href,i),e.body=Ac.concat(a,i),r.encoding!==null&&(e.body=e.body.toString(r.encoding)),a=[],i=0):t.length&&(r.encoding==="utf8"&&t[0].length>0&&t[0][0]==="\uFEFF"&&(t[0]=t[0].substring(1)),e.body=t.join("")),r._json)try{e.body=JSON.parse(e.body,r._jsonReviver)}catch{ot("invalid JSON received",r.uri.href)}ot("emitting complete",r.uri.href),typeof e.body>"u"&&!r._json&&(e.body=r.encoding===null?Ac.alloc(0):""),r.emit("complete",e,e.body)})};Rr.prototype.abort=function(){var e=this;e._aborted=!0,e.req?e.req.abort():e.response&&e.response.destroy(),e.clearTimeout(),e.emit("abort")};Rr.prototype.pipeDest=function(e){var r=this,a=r.response;if(e.headers&&!e.headersSent){if(a.caseless.has("content-type")){var i=a.caseless.has("content-type");e.setHeader?e.setHeader(i,a.headers[i]):e.headers[i]=a.headers[i]}if(a.caseless.has("content-length")){var t=a.caseless.has("content-length");e.setHeader?e.setHeader(t,a.headers[t]):e.headers[t]=a.headers[t]}}if(e.setHeader&&!e.headersSent){for(var n in a.headers)(!r.gzip||n!=="content-encoding")&&e.setHeader(n,a.headers[n]);e.statusCode=a.statusCode}r.pipefilter&&r.pipefilter(a,e)};Rr.prototype.qs=function(e,r){var a=this,i;!r&&a.uri.query?i=a._qs.parse(a.uri.query):i={};for(var t in e)i[t]=e[t];var n=a._qs.stringify(i);return n===""||(a.uri=Ec.parse(a.uri.href.split("?")[0]+"?"+n),a.url=a.uri,a.path=a.uri.path,a.uri.host==="unix"&&a.enableUnixSocket()),a};Rr.prototype.form=function(e){var r=this;return e?(/^application\/x-www-form-urlencoded\b/.test(r.getHeader("content-type"))||r.setHeader("content-type","application/x-www-form-urlencoded"),r.body=typeof e=="string"?r._qs.rfc3986(e.toString("utf8")):r._qs.stringify(e).toString("utf8"),r):(r._form=new fN,r._form.on("error",function(a){a.message="form-data: "+a.message,r.emit("error",a),r.abort()}),r._form)};Rr.prototype.multipart=function(e){var r=this;return r._multipart.onRequest(e),r._multipart.chunked||(r.body=r._multipart.body),r};Rr.prototype.json=function(e){var r=this;return r.hasHeader("accept")||r.setHeader("accept","application/json"),typeof r.jsonReplacer=="function"&&(r._jsonReplacer=r.jsonReplacer),r._json=!0,typeof e=="boolean"?r.body!==void 0&&(/^application\/x-www-form-urlencoded\b/.test(r.getHeader("content-type"))?r.body=r._qs.rfc3986(r.body):r.body=v5(r.body,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")):(r.body=v5(e,r._jsonReplacer),r.hasHeader("content-type")||r.setHeader("content-type","application/json")),typeof r.jsonReviver=="function"&&(r._jsonReviver=r.jsonReviver),r};Rr.prototype.getHeader=function(e,r){var a=this,i,t,n;return r||(r=a.headers),Object.keys(r).forEach(function(o){o.length===e.length&&(t=new RegExp(e,"i"),n=o.match(t),n&&(i=r[o]))}),i};Rr.prototype.enableUnixSocket=function(){var e=this.uri.path.split(":"),r=e[0],a=e[1];this.socketPath=r,this.uri.pathname=a,this.uri.path=a,this.uri.host=r,this.uri.hostname=r,this.uri.isUnix=!0};Rr.prototype.auth=function(e,r,a,i){var t=this;return t._auth.onRequest(e,r,a,i),t};Rr.prototype.aws=function(e,r){var a=this;if(!r)return a._aws=e,a;if(e.sign_version===4||e.sign_version==="4"){var i={host:a.uri.host,path:a.uri.path,method:a.method,headers:a.headers,body:a.body};e.service&&(i.service=e.service);var t=uN.sign(i,{accessKeyId:e.key,secretAccessKey:e.secret,sessionToken:e.session});a.setHeader("authorization",t.headers.Authorization),a.setHeader("x-amz-date",t.headers["X-Amz-Date"]),t.headers["X-Amz-Security-Token"]&&a.setHeader("x-amz-security-token",t.headers["X-Amz-Security-Token"])}else{var n=new Date;a.setHeader("date",n.toUTCString());var o={key:e.key,secret:e.secret,verb:a.method.toUpperCase(),date:n,contentType:a.getHeader("content-type")||"",md5:a.getHeader("content-md5")||"",amazonHeaders:d0.canonicalizeHeaders(a.headers)},s=a.uri.path;e.bucket&&s?o.resource="/"+e.bucket+s:e.bucket&&!s?o.resource="/"+e.bucket:!e.bucket&&s?o.resource=s:!e.bucket&&!s&&(o.resource="/"),o.resource=d0.canonicalizeResource(o.resource),a.setHeader("authorization",d0.authorization(o))}return a};Rr.prototype.httpSignature=function(e){var r=this;return cN.signRequest({getHeader:function(a){return r.getHeader(a,r.headers)},setHeader:function(a,i){r.setHeader(a,i)},method:r.method,path:r.path},e),ot("httpSignature authorization",r.getHeader("authorization")),r};Rr.prototype.hawk=function(e){var r=this;r.setHeader("Authorization",xN.header(r.uri,r.method,e))};Rr.prototype.oauth=function(e){var r=this;return r._oauth.onRequest(e),r};Rr.prototype.jar=function(e){var r=this,a;if(r._redirect.redirectsFollowed===0&&(r.originalCookieHeader=r.getHeader("cookie")),!e)a=!1,r._disableCookies=!0;else{var i=e.getCookieString?e:x5,t=r.uri.href;i&&(a=i.getCookieString(t))}return a&&a.length&&(r.originalCookieHeader?r.setHeader("cookie",r.originalCookieHeader+"; "+a):r.setHeader("cookie",a)),r._jar=e,r};Rr.prototype.pipe=function(e,r){var a=this;if(a.response)if(a._destdata)a.emit("error",new Error("You cannot pipe after data has been emitted from the response."));else if(a._ended)a.emit("error",new Error("You cannot pipe after the response has been ended."));else return hp.Stream.prototype.pipe.call(a,e,r),a.pipeDest(e),e;else return a.dests.push(e),hp.Stream.prototype.pipe.call(a,e,r),e};Rr.prototype.write=function(){var e=this;if(!e._aborted&&(e._started||e.start(),e.req))return e.req.write.apply(e.req,arguments)};Rr.prototype.end=function(e){var r=this;r._aborted||(e&&r.write(e),r._started||r.start(),r.req&&r.req.end())};Rr.prototype.pause=function(){var e=this;e.responseContent?e.responseContent.pause.apply(e.responseContent,arguments):e._paused=!0};Rr.prototype.resume=function(){var e=this;e.responseContent?e.responseContent.resume.apply(e.responseContent,arguments):e._paused=!1};Rr.prototype.destroy=function(){var e=this;this.clearTimeout(),e._ended?e.response&&e.response.destroy():e.end()};Rr.prototype.clearTimeout=function(){this.timeoutTimer&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)};Rr.defaultProxyHeaderWhiteList=v0.defaultProxyHeaderWhiteList.slice();Rr.defaultProxyHeaderExclusiveList=v0.defaultProxyHeaderExclusiveList.slice();Rr.prototype.toJSON=k5;_5.exports=Rr});var A5=O((jY,E5)=>{"use strict";var Pc=Ol(),S5=Md(),FN=Ul(),CN=FN.paramsHaveRequestBody;function dp(e,r,a){typeof r=="function"&&(a=r);var i={};return r!==null&&typeof r=="object"?Pc(i,r,{uri:e}):typeof e=="string"?Pc(i,{uri:e}):Pc(i,e),i.callback=a||i.callback,i}function Ba(e,r,a){if(typeof e>"u")throw new Error("undefined is not a valid uri or options object.");var i=dp(e,r,a);if(i.method==="HEAD"&&CN(i))throw new Error("HTTP HEAD requests MUST NOT include a request body.");return new Ba.Request(i)}function bo(e){var r=e.toUpperCase();return function(a,i,t){var n=dp(a,i,t);return n.method=r,Ba(n,n.callback)}}Ba.get=bo("get");Ba.head=bo("head");Ba.options=bo("options");Ba.post=bo("post");Ba.put=bo("put");Ba.patch=bo("patch");Ba.del=bo("delete");Ba.delete=bo("delete");Ba.jar=function(e){return S5.jar(e)};Ba.cookie=function(e){return S5.parse(e)};function g0(e,r,a,i){return function(t,n,o){var s=dp(t,n,o),c={};return Pc(!0,c,r,s),c.pool=s.pool||r.pool,i&&(c.method=i.toUpperCase()),typeof a=="function"&&(e=a),e(c,c.callback)}}Ba.defaults=function(e,r){var a=this;e=e||{},typeof e=="function"&&(r=e,e={});var i=g0(a,e,r),t=["get","head","post","put","patch","del","delete"];return t.forEach(function(n){i[n]=g0(a[n],e,r,n)}),i.cookie=g0(a.cookie,e,r),i.jar=a.jar,i.defaults=a.defaults,i};Ba.forever=function(e,r){var a={};return r&&Pc(a,r),e&&(a.agentOptions=e),a.forever=!0,Ba.defaults(a)};E5.exports=Ba;Ba.Request=j5();Ba.initParams=dp;Object.defineProperty(Ba,"debug",{enumerable:!0,get:function(){return Ba.Request.debug},set:function(e){Ba.Request.debug=e}})});var T5=O((SY,P5)=>{P5.exports=BN;function BN(e){if(!/^data\:/i.test(e))throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")');e=e.replace(/\r?\n/g,"");var r=e.indexOf(",");if(r===-1||r<=4)throw new TypeError("malformed data: URI");for(var a=e.substring(5,r).split(";"),i=!1,t="US-ASCII",n=0;n<a.length;n++)a[n]=="base64"?i=!0:a[n].indexOf("charset=")==0&&(t=a[n].substring(8));var o=unescape(e.substring(r+1)),s=i?"base64":"ascii",c=new Buffer(o,s);return c.type=a[0]||"text/plain",c.charset=t,c}});var B5=O((EY,C5)=>{var qN=T5();function IN(e){return{mimeType:ON(RN(e)),data:qN(e)}}function RN(e){return e.substring(5,e.indexOf(";"))}var F5=/^(\w+\/)+/;function ON(e){e=e.toLowerCase();var r=e.match(F5);return!r||!(r=r[1])?e:e.replace(F5,r)}C5.exports=IN});var I5=O((PY,q5)=>{"use strict";var Tc=Iu(),AY=require("path"),zN=Qx().PNG,DN=Yh(),LN=aw(),NN=iw().GifReader,UN=cw(),MN=require("fs"),HN=A5(),VN=Df(),$N=B5();function WN(e,r){var a=new zN;a.parse(e,function(i,t){if(i){r(i);return}r(null,Tc(new Uint8Array(t.data),[t.width|0,t.height|0,4],[4,4*t.width|0,1],0))})}function KN(e,r){var a;try{a=DN.decode(e)}catch(n){r(n);return}if(!a){r(new Error("Error decoding jpeg"));return}var i=[a.height,a.width,4],t=Tc(a.data,i);r(null,t.transpose(1,0))}function GN(e,r){var a;try{a=new NN(e)}catch(s){r(s);return}if(a.numFrames()>0){var i=[a.numFrames(),a.height,a.width,4];try{var t=new Uint8Array(i[0]*i[1]*i[2]*i[3])}catch(s){r(s);return}var n=Tc(t,i);try{for(var o=0;o<a.numFrames();++o)a.decodeAndBlitFrameRGBA(o,t.subarray(n.index(o,0,0,0),n.index(o+1,0,0,0)))}catch(s){r(s);return}r(null,n.transpose(0,2,1))}else{var i=[a.height,a.width,4],t=new Uint8Array(i[0]*i[1]*i[2]),n=Tc(t,i);try{a.decodeAndBlitFrameRGBA(0,t)}catch(f){r(f);return}r(null,n.transpose(1,0))}}function YN(e,r){var a=new UN(e);try{a.init()}catch(s){r(s);return}var i=a.getData(),t=[i.getHeight(),i.getWidth(),4],n=new Uint8Array(t[0]*t[1]*t[2]),o=Tc(n,t);LN(i,o),r(null,o.transpose(1,0))}function mp(e,r,a){switch(e){case"image/png":WN(r,a);break;case"image/jpg":case"image/jpeg":KN(r,a);break;case"image/gif":GN(r,a);break;case"image/bmp":YN(r,a);break;default:a(new Error("Unsupported file type: "+e))}}q5.exports=function(r,a,i){if(i||(i=a,a=""),Buffer.isBuffer(r)){if(!a){i(new Error("Invalid file type"));return}mp(a,r,i)}else if(r.indexOf("data:")===0)try{var t=$N(r);t?process.nextTick(function(){mp(a||t.mimeType,t.data,i)}):process.nextTick(function(){i(new Error("Error parsing data URI"))})}catch(n){process.nextTick(function(){i(n)})}else r.indexOf("http://")===0||r.indexOf("https://")===0?HN({url:r,encoding:null},function(n,o,s){if(n){i(n);return}if(a=a,a||(o.getHeader!==void 0?a=o.getHeader("content-type"):o.headers!==void 0&&(a=o.headers["content-type"])),!a){i(new Error("Invalid content-type"));return}mp(a,s,i)}):MN.readFile(r,function(n,o){if(n){i(n);return}if(a=a||VN.lookup(r),!a){i(new Error("Invalid file type"));return}mp(a,o,i)})}});var Z5=O((jp,Y5)=>{(function(e,r){typeof jp=="object"&&typeof Y5<"u"?r(jp):typeof define=="function"&&define.amd?define(["exports"],r):(e=typeof globalThis<"u"?globalThis:e||self,r(e.WebStreamsPolyfill={}))})(jp,function(e){"use strict";var r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol:function(u){return"Symbol("+u+")"};function a(){}function i(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global}var t=i();function n(u){return typeof u=="object"&&u!==null||typeof u=="function"}var o=a,s=Promise,c=Promise.prototype.then,l=Promise.resolve.bind(s),f=Promise.reject.bind(s);function v(u){return new s(u)}function h(u){return l(u)}function d(u){return f(u)}function y(u,m,S){return c.call(u,m,S)}function _(u,m,S){y(y(u,m,S),void 0,o)}function w(u,m){_(u,m)}function A(u,m){_(u,void 0,m)}function T(u,m,S){return y(u,m,S)}function P(u){y(u,void 0,o)}var R=function(){var u=t&&t.queueMicrotask;if(typeof u=="function")return u;var m=h(void 0);return function(S){return y(m,S)}}();function F(u,m,S){if(typeof u!="function")throw new TypeError("Argument is not a function");return Function.prototype.apply.call(u,m,S)}function I(u,m,S){try{return h(F(u,m,S))}catch(D){return d(D)}}var z=16384,N=function(){function u(){this._cursor=0,this._size=0,this._front={_elements:[],_next:void 0},this._back=this._front,this._cursor=0,this._size=0}return Object.defineProperty(u.prototype,"length",{get:function(){return this._size},enumerable:!1,configurable:!0}),u.prototype.push=function(m){var S=this._back,D=S;S._elements.length===z-1&&(D={_elements:[],_next:void 0}),S._elements.push(m),D!==S&&(this._back=D,S._next=D),++this._size},u.prototype.shift=function(){var m=this._front,S=m,D=this._cursor,G=D+1,se=m._elements,ge=se[D];return G===z&&(S=m._next,G=0),--this._size,this._cursor=G,m!==S&&(this._front=S),se[D]=void 0,ge},u.prototype.forEach=function(m){for(var S=this._cursor,D=this._front,G=D._elements;(S!==G.length||D._next!==void 0)&&!(S===G.length&&(D=D._next,G=D._elements,S=0,G.length===0));)m(G[S]),++S},u.prototype.peek=function(){var m=this._front,S=this._cursor;return m._elements[S]},u}();function M(u,m){u._ownerReadableStream=m,m._reader=u,m._state==="readable"?$(u):m._state==="closed"?re(u):Q(u,m._storedError)}function K(u,m){var S=u._ownerReadableStream;return mi(S,m)}function V(u){u._ownerReadableStream._state==="readable"?xe(u,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):me(u,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),u._ownerReadableStream._reader=void 0,u._ownerReadableStream=void 0}function Z(u){return new TypeError("Cannot "+u+" a stream using a released reader")}function $(u){u._closedPromise=v(function(m,S){u._closedPromise_resolve=m,u._closedPromise_reject=S})}function Q(u,m){$(u),xe(u,m)}function re(u){$(u),ce(u)}function xe(u,m){u._closedPromise_reject!==void 0&&(P(u._closedPromise),u._closedPromise_reject(m),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0)}function me(u,m){Q(u,m)}function ce(u){u._closedPromise_resolve!==void 0&&(u._closedPromise_resolve(void 0),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0)}var je=r("[[AbortSteps]]"),be=r("[[ErrorSteps]]"),Le=r("[[CancelSteps]]"),Me=r("[[PullSteps]]"),Oe=Number.isFinite||function(u){return typeof u=="number"&&isFinite(u)},W=Math.trunc||function(u){return u<0?Math.ceil(u):Math.floor(u)};function we(u){return typeof u=="object"||typeof u=="function"}function Ze(u,m){if(u!==void 0&&!we(u))throw new TypeError(m+" is not an object.")}function We(u,m){if(typeof u!="function")throw new TypeError(m+" is not a function.")}function $e(u){return typeof u=="object"&&u!==null||typeof u=="function"}function rr(u,m){if(!$e(u))throw new TypeError(m+" is not an object.")}function Be(u,m,S){if(u===void 0)throw new TypeError("Parameter "+m+" is required in '"+S+"'.")}function fe(u,m,S){if(u===void 0)throw new TypeError(m+" is required in '"+S+"'.")}function ke(u){return Number(u)}function ir(u){return u===0?0:u}function Pe(u){return ir(W(u))}function ur(u,m){var S=0,D=Number.MAX_SAFE_INTEGER,G=Number(u);if(G=ir(G),!Oe(G))throw new TypeError(m+" is not a finite number");if(G=Pe(G),G<S||G>D)throw new TypeError(m+" is outside the accepted range of "+S+" to "+D+", inclusive");return!Oe(G)||G===0?0:G}function Or(u,m){if(!Mn(u))throw new TypeError(m+" is not a ReadableStream.")}function Gr(u){return new Ye(u)}function J(u,m){u._reader._readRequests.push(m)}function qe(u,m,S){var D=u._reader,G=D._readRequests.shift();S?G._closeSteps():G._chunkSteps(m)}function Ke(u){return u._reader._readRequests.length}function He(u){var m=u._reader;return!(m===void 0||!Je(m))}var Ye=function(){function u(m){if(Be(m,1,"ReadableStreamDefaultReader"),Or(m,"First parameter"),Hn(m))throw new TypeError("This stream has already been locked for exclusive reading by another reader");M(this,m),this._readRequests=new N}return Object.defineProperty(u.prototype,"closed",{get:function(){return Je(this)?this._closedPromise:d(mr("closed"))},enumerable:!1,configurable:!0}),u.prototype.cancel=function(m){return m===void 0&&(m=void 0),Je(this)?this._ownerReadableStream===void 0?d(Z("cancel")):K(this,m):d(mr("cancel"))},u.prototype.read=function(){if(!Je(this))return d(mr("read"));if(this._ownerReadableStream===void 0)return d(Z("read from"));var m,S,D=v(function(se,ge){m=se,S=ge}),G={_chunkSteps:function(se){return m({value:se,done:!1})},_closeSteps:function(){return m({value:void 0,done:!0})},_errorSteps:function(se){return S(se)}};return nr(this,G),D},u.prototype.releaseLock=function(){if(!Je(this))throw mr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");V(this)}},u}();Object.defineProperties(Ye.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ye.prototype,r.toStringTag,{value:"ReadableStreamDefaultReader",configurable:!0});function Je(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readRequests")?!1:u instanceof Ye}function nr(u,m){var S=u._ownerReadableStream;S._disturbed=!0,S._state==="closed"?m._closeSteps():S._state==="errored"?m._errorSteps(S._storedError):S._readableStreamController[Me](m)}function mr(u){return new TypeError("ReadableStreamDefaultReader.prototype."+u+" can only be used on a ReadableStreamDefaultReader")}var Ir,vr;typeof r.asyncIterator=="symbol"&&(vr=(Ir={},Ir[r.asyncIterator]=function(){return this},Ir),Object.defineProperty(vr,r.asyncIterator,{enumerable:!1}));var ve=function(){function u(m,S){this._ongoingPromise=void 0,this._isFinished=!1,this._reader=m,this._preventCancel=S}return u.prototype.next=function(){var m=this,S=function(){return m._nextSteps()};return this._ongoingPromise=this._ongoingPromise?T(this._ongoingPromise,S,S):S(),this._ongoingPromise},u.prototype.return=function(m){var S=this,D=function(){return S._returnSteps(m)};return this._ongoingPromise?T(this._ongoingPromise,D,D):D()},u.prototype._nextSteps=function(){var m=this;if(this._isFinished)return Promise.resolve({value:void 0,done:!0});var S=this._reader;if(S._ownerReadableStream===void 0)return d(Z("iterate"));var D,G,se=v(function(Xe,Er){D=Xe,G=Er}),ge={_chunkSteps:function(Xe){m._ongoingPromise=void 0,R(function(){return D({value:Xe,done:!1})})},_closeSteps:function(){m._ongoingPromise=void 0,m._isFinished=!0,V(S),D({value:void 0,done:!0})},_errorSteps:function(Xe){m._ongoingPromise=void 0,m._isFinished=!0,V(S),G(Xe)}};return nr(S,ge),se},u.prototype._returnSteps=function(m){if(this._isFinished)return Promise.resolve({value:m,done:!0});this._isFinished=!0;var S=this._reader;if(S._ownerReadableStream===void 0)return d(Z("finish iterating"));if(!this._preventCancel){var D=K(S,m);return V(S),T(D,function(){return{value:m,done:!0}})}return V(S),h({value:m,done:!0})},u}(),Ge={next:function(){return Pr(this)?this._asyncIteratorImpl.next():d(cr("next"))},return:function(u){return Pr(this)?this._asyncIteratorImpl.return(u):d(cr("return"))}};vr!==void 0&&Object.setPrototypeOf(Ge,vr);function fr(u,m){var S=Gr(u),D=new ve(S,m),G=Object.create(Ge);return G._asyncIteratorImpl=D,G}function Pr(u){if(!n(u)||!Object.prototype.hasOwnProperty.call(u,"_asyncIteratorImpl"))return!1;try{return u._asyncIteratorImpl instanceof ve}catch{return!1}}function cr(u){return new TypeError("ReadableStreamAsyncIterator."+u+" can only be used on a ReadableSteamAsyncIterator")}var gr=Number.isNaN||function(u){return u!==u};function wr(u){return u.slice()}function or(u,m,S,D,G){new Uint8Array(u).set(new Uint8Array(S,D,G),m)}function hr(u){return u}function $r(u){return!1}function Fr(u,m,S){if(u.slice)return u.slice(m,S);var D=S-m,G=new ArrayBuffer(D);return or(G,0,u,m,D),G}function Sa(u){return!(typeof u!="number"||gr(u)||u<0)}function Ia(u){var m=Fr(u.buffer,u.byteOffset,u.byteOffset+u.byteLength);return new Uint8Array(m)}function st(u){var m=u._queue.shift();return u._queueTotalSize-=m.size,u._queueTotalSize<0&&(u._queueTotalSize=0),m.value}function vt(u,m,S){if(!Sa(S)||S===1/0)throw new RangeError("Size must be a finite, non-NaN, non-negative number.");u._queue.push({value:m,size:S}),u._queueTotalSize+=S}function ra(u){var m=u._queue.peek();return m.value}function ua(u){u._queue=new N,u._queueTotalSize=0}var da=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"view",{get:function(){if(!ut(this))throw De("view");return this._view},enumerable:!1,configurable:!0}),u.prototype.respond=function(m){if(!ut(this))throw De("respond");if(Be(m,1,"respond"),m=ur(m,"First parameter"),this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");$r(this._view.buffer),Qe(this._associatedReadableByteStreamController,m)},u.prototype.respondWithNewView=function(m){if(!ut(this))throw De("respondWithNewView");if(Be(m,1,"respondWithNewView"),!ArrayBuffer.isView(m))throw new TypeError("You can only respond with array buffer views");if(this._associatedReadableByteStreamController===void 0)throw new TypeError("This BYOB request has been invalidated");$r(m.buffer),Te(this._associatedReadableByteStreamController,m)},u}();Object.defineProperties(da.prototype,{respond:{enumerable:!0},respondWithNewView:{enumerable:!0},view:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(da.prototype,r.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:!0});var Ra=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"byobRequest",{get:function(){if(!va(this))throw de("byobRequest");return Ce(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!va(this))throw de("desiredSize");return ar(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!va(this))throw de("close");if(this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var m=this._controlledReadableByteStream._state;if(m!=="readable")throw new TypeError("The stream (in "+m+" state) is not in the readable state and cannot be closed");Ie(this)},u.prototype.enqueue=function(m){if(!va(this))throw de("enqueue");if(Be(m,1,"enqueue"),!ArrayBuffer.isView(m))throw new TypeError("chunk must be an array buffer view");if(m.byteLength===0)throw new TypeError("chunk must have non-zero byteLength");if(m.buffer.byteLength===0)throw new TypeError("chunk's buffer must have non-zero byteLength");if(this._closeRequested)throw new TypeError("stream is closed or draining");var S=this._controlledReadableByteStream._state;if(S!=="readable")throw new TypeError("The stream (in "+S+" state) is not in the readable state and cannot be enqueued to");Se(this,m)},u.prototype.error=function(m){if(m===void 0&&(m=void 0),!va(this))throw de("error");Fe(this,m)},u.prototype[Le]=function(m){aa(this),ua(this);var S=this._cancelAlgorithm(m);return Ue(this),S},u.prototype[Me]=function(m){var S=this._controlledReadableByteStream;if(this._queueTotalSize>0){var D=this._queue.shift();this._queueTotalSize-=D.byteLength,k(this);var G=new Uint8Array(D.buffer,D.byteOffset,D.byteLength);m._chunkSteps(G);return}var se=this._autoAllocateChunkSize;if(se!==void 0){var ge=void 0;try{ge=new ArrayBuffer(se)}catch(Er){m._errorSteps(Er);return}var Xe={buffer:ge,bufferByteLength:se,byteOffset:0,byteLength:se,bytesFilled:0,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(Xe)}J(S,m),Ua(this)},u}();Object.defineProperties(Ra.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},byobRequest:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ra.prototype,r.toStringTag,{value:"ReadableByteStreamController",configurable:!0});function va(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableByteStream")?!1:u instanceof Ra}function ut(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_associatedReadableByteStreamController")?!1:u instanceof da}function Ua(u){var m=ye(u);if(m){if(u._pulling){u._pullAgain=!0;return}u._pulling=!0;var S=u._pullAlgorithm();_(S,function(){u._pulling=!1,u._pullAgain&&(u._pullAgain=!1,Ua(u))},function(D){Fe(u,D)})}}function aa(u){B(u),u._pendingPullIntos=new N}function Vt(u,m){var S=!1;u._state==="closed"&&(S=!0);var D=x(m);m.readerType==="default"?qe(u,D,S):le(u,D,S)}function x(u){var m=u.bytesFilled,S=u.elementSize;return new u.viewConstructor(u.buffer,u.byteOffset,m/S)}function b(u,m,S,D){u._queue.push({buffer:m,byteOffset:S,byteLength:D}),u._queueTotalSize+=D}function g(u,m){var S=m.elementSize,D=m.bytesFilled-m.bytesFilled%S,G=Math.min(u._queueTotalSize,m.byteLength-m.bytesFilled),se=m.bytesFilled+G,ge=se-se%S,Xe=G,Er=!1;ge>D&&(Xe=ge-m.bytesFilled,Er=!0);for(var Br=u._queue;Xe>0;){var zr=Br.peek(),Wr=Math.min(Xe,zr.byteLength),Oa=m.byteOffset+m.bytesFilled;or(m.buffer,Oa,zr.buffer,zr.byteOffset,Wr),zr.byteLength===Wr?Br.shift():(zr.byteOffset+=Wr,zr.byteLength-=Wr),u._queueTotalSize-=Wr,p(u,Wr,m),Xe-=Wr}return Er}function p(u,m,S){S.bytesFilled+=m}function k(u){u._queueTotalSize===0&&u._closeRequested?(Ue(u),xu(u._controlledReadableByteStream)):Ua(u)}function B(u){u._byobRequest!==null&&(u._byobRequest._associatedReadableByteStreamController=void 0,u._byobRequest._view=null,u._byobRequest=null)}function U(u){for(;u._pendingPullIntos.length>0;){if(u._queueTotalSize===0)return;var m=u._pendingPullIntos.peek();g(u,m)&&(Ne(u),Vt(u._controlledReadableByteStream,m))}}function Y(u,m,S){var D=u._controlledReadableByteStream,G=1;m.constructor!==DataView&&(G=m.constructor.BYTES_PER_ELEMENT);var se=m.constructor,ge=m.buffer,Xe={buffer:ge,bufferByteLength:ge.byteLength,byteOffset:m.byteOffset,byteLength:m.byteLength,bytesFilled:0,elementSize:G,viewConstructor:se,readerType:"byob"};if(u._pendingPullIntos.length>0){u._pendingPullIntos.push(Xe),ee(D,S);return}if(D._state==="closed"){var Er=new se(Xe.buffer,Xe.byteOffset,0);S._closeSteps(Er);return}if(u._queueTotalSize>0){if(g(u,Xe)){var Br=x(Xe);k(u),S._chunkSteps(Br);return}if(u._closeRequested){var zr=new TypeError("Insufficient bytes to fill elements in the given buffer");Fe(u,zr),S._errorSteps(zr);return}}u._pendingPullIntos.push(Xe),ee(D,S),Ua(u)}function te(u,m){var S=u._controlledReadableByteStream;if(ae(S))for(;oe(S)>0;){var D=Ne(u);Vt(S,D)}}function pe(u,m,S){if(p(u,m,S),!(S.bytesFilled<S.elementSize)){Ne(u);var D=S.bytesFilled%S.elementSize;if(D>0){var G=S.byteOffset+S.bytesFilled,se=Fr(S.buffer,G-D,G);b(u,se,0,se.byteLength)}S.bytesFilled-=D,Vt(u._controlledReadableByteStream,S),U(u)}}function he(u,m){var S=u._pendingPullIntos.peek();B(u);var D=u._controlledReadableByteStream._state;D==="closed"?te(u):pe(u,m,S),Ua(u)}function Ne(u){var m=u._pendingPullIntos.shift();return m}function ye(u){var m=u._controlledReadableByteStream;if(m._state!=="readable"||u._closeRequested||!u._started)return!1;if(He(m)&&Ke(m)>0||ae(m)&&oe(m)>0)return!0;var S=ar(u);return S>0}function Ue(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0}function Ie(u){var m=u._controlledReadableByteStream;if(!(u._closeRequested||m._state!=="readable")){if(u._queueTotalSize>0){u._closeRequested=!0;return}if(u._pendingPullIntos.length>0){var S=u._pendingPullIntos.peek();if(S.bytesFilled>0){var D=new TypeError("Insufficient bytes to fill elements in the given buffer");throw Fe(u,D),D}}Ue(u),xu(m)}}function Se(u,m){var S=u._controlledReadableByteStream;if(!(u._closeRequested||S._state!=="readable")){var D=m.buffer,G=m.byteOffset,se=m.byteLength,ge=D;if(u._pendingPullIntos.length>0){var Xe=u._pendingPullIntos.peek();$r(Xe.buffer),Xe.buffer=Xe.buffer}if(B(u),He(S))if(Ke(S)===0)b(u,ge,G,se);else{u._pendingPullIntos.length>0&&Ne(u);var Er=new Uint8Array(ge,G,se);qe(S,Er,!1)}else ae(S)?(b(u,ge,G,se),U(u)):b(u,ge,G,se);Ua(u)}}function Fe(u,m){var S=u._controlledReadableByteStream;S._state==="readable"&&(aa(u),ua(u),Ue(u),Og(S,m))}function Ce(u){if(u._byobRequest===null&&u._pendingPullIntos.length>0){var m=u._pendingPullIntos.peek(),S=new Uint8Array(m.buffer,m.byteOffset+m.bytesFilled,m.byteLength-m.bytesFilled),D=Object.create(da.prototype);ze(D,u,S),u._byobRequest=D}return u._byobRequest}function ar(u){var m=u._controlledReadableByteStream._state;return m==="errored"?null:m==="closed"?0:u._strategyHWM-u._queueTotalSize}function Qe(u,m){var S=u._pendingPullIntos.peek(),D=u._controlledReadableByteStream._state;if(D==="closed"){if(m!==0)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}else{if(m===0)throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream");if(S.bytesFilled+m>S.byteLength)throw new RangeError("bytesWritten out of range")}S.buffer=S.buffer,he(u,m)}function Te(u,m){var S=u._pendingPullIntos.peek(),D=u._controlledReadableByteStream._state;if(D==="closed"){if(m.byteLength!==0)throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}else if(m.byteLength===0)throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream");if(S.byteOffset+S.bytesFilled!==m.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(S.bufferByteLength!==m.buffer.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");if(S.bytesFilled+m.byteLength>S.byteLength)throw new RangeError("The region specified by view is larger than byobRequest");var G=m.byteLength;S.buffer=m.buffer,he(u,G)}function Ee(u,m,S,D,G,se,ge){m._controlledReadableByteStream=u,m._pullAgain=!1,m._pulling=!1,m._byobRequest=null,m._queue=m._queueTotalSize=void 0,ua(m),m._closeRequested=!1,m._started=!1,m._strategyHWM=se,m._pullAlgorithm=D,m._cancelAlgorithm=G,m._autoAllocateChunkSize=ge,m._pendingPullIntos=new N,u._readableStreamController=m;var Xe=S();_(h(Xe),function(){m._started=!0,Ua(m)},function(Er){Fe(m,Er)})}function Ae(u,m,S){var D=Object.create(Ra.prototype),G=function(){},se=function(){return h(void 0)},ge=function(){return h(void 0)};m.start!==void 0&&(G=function(){return m.start(D)}),m.pull!==void 0&&(se=function(){return m.pull(D)}),m.cancel!==void 0&&(ge=function(Er){return m.cancel(Er)});var Xe=m.autoAllocateChunkSize;if(Xe===0)throw new TypeError("autoAllocateChunkSize must be greater than 0");Ee(u,D,G,se,ge,S,Xe)}function ze(u,m,S){u._associatedReadableByteStreamController=m,u._view=S}function De(u){return new TypeError("ReadableStreamBYOBRequest.prototype."+u+" can only be used on a ReadableStreamBYOBRequest")}function de(u){return new TypeError("ReadableByteStreamController.prototype."+u+" can only be used on a ReadableByteStreamController")}function X(u){return new ne(u)}function ee(u,m){u._reader._readIntoRequests.push(m)}function le(u,m,S){var D=u._reader,G=D._readIntoRequests.shift();S?G._closeSteps(m):G._chunkSteps(m)}function oe(u){return u._reader._readIntoRequests.length}function ae(u){var m=u._reader;return!(m===void 0||!Ve(m))}var ne=function(){function u(m){if(Be(m,1,"ReadableStreamBYOBReader"),Or(m,"First parameter"),Hn(m))throw new TypeError("This stream has already been locked for exclusive reading by another reader");if(!va(m._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");M(this,m),this._readIntoRequests=new N}return Object.defineProperty(u.prototype,"closed",{get:function(){return Ve(this)?this._closedPromise:d(tr("closed"))},enumerable:!1,configurable:!0}),u.prototype.cancel=function(m){return m===void 0&&(m=void 0),Ve(this)?this._ownerReadableStream===void 0?d(Z("cancel")):K(this,m):d(tr("cancel"))},u.prototype.read=function(m){if(!Ve(this))return d(tr("read"));if(!ArrayBuffer.isView(m))return d(new TypeError("view must be an array buffer view"));if(m.byteLength===0)return d(new TypeError("view must have non-zero byteLength"));if(m.buffer.byteLength===0)return d(new TypeError("view's buffer must have non-zero byteLength"));if($r(m.buffer),this._ownerReadableStream===void 0)return d(Z("read from"));var S,D,G=v(function(ge,Xe){S=ge,D=Xe}),se={_chunkSteps:function(ge){return S({value:ge,done:!1})},_closeSteps:function(ge){return S({value:ge,done:!0})},_errorSteps:function(ge){return D(ge)}};return lr(this,m,se),G},u.prototype.releaseLock=function(){if(!Ve(this))throw tr("releaseLock");if(this._ownerReadableStream!==void 0){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");V(this)}},u}();Object.defineProperties(ne.prototype,{cancel:{enumerable:!0},read:{enumerable:!0},releaseLock:{enumerable:!0},closed:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ne.prototype,r.toStringTag,{value:"ReadableStreamBYOBReader",configurable:!0});function Ve(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readIntoRequests")?!1:u instanceof ne}function lr(u,m,S){var D=u._ownerReadableStream;D._disturbed=!0,D._state==="errored"?S._errorSteps(D._storedError):Y(D._readableStreamController,m,S)}function tr(u){return new TypeError("ReadableStreamBYOBReader.prototype."+u+" can only be used on a ReadableStreamBYOBReader")}function sr(u,m){var S=u.highWaterMark;if(S===void 0)return m;if(gr(S)||S<0)throw new RangeError("Invalid highWaterMark");return S}function L(u){var m=u.size;return m||function(){return 1}}function yr(u,m){Ze(u,m);var S=u==null?void 0:u.highWaterMark,D=u==null?void 0:u.size;return{highWaterMark:S===void 0?void 0:ke(S),size:D===void 0?void 0:Ar(D,m+" has member 'size' that")}}function Ar(u,m){return We(u,m),function(S){return ke(u(S))}}function kr(u,m){Ze(u,m);var S=u==null?void 0:u.abort,D=u==null?void 0:u.close,G=u==null?void 0:u.start,se=u==null?void 0:u.type,ge=u==null?void 0:u.write;return{abort:S===void 0?void 0:pr(S,u,m+" has member 'abort' that"),close:D===void 0?void 0:Sr(D,u,m+" has member 'close' that"),start:G===void 0?void 0:_r(G,u,m+" has member 'start' that"),write:ge===void 0?void 0:ta(ge,u,m+" has member 'write' that"),type:se}}function pr(u,m,S){return We(u,S),function(D){return I(u,m,[D])}}function Sr(u,m,S){return We(u,S),function(){return I(u,m,[])}}function _r(u,m,S){return We(u,S),function(D){return F(u,m,[D])}}function ta(u,m,S){return We(u,S),function(D,G){return I(u,m,[D,G])}}function Tr(u,m){if(!Re(u))throw new TypeError(m+" is not a WritableStream.")}function j(u){if(typeof u!="object"||u===null)return!1;try{return typeof u.aborted=="boolean"}catch{return!1}}var E=typeof AbortController=="function";function C(){if(E)return new AbortController}var H=function(){function u(m,S){m===void 0&&(m={}),S===void 0&&(S={}),m===void 0?m=null:rr(m,"First parameter");var D=yr(S,"Second parameter"),G=kr(m,"First parameter");_e(this);var se=G.type;if(se!==void 0)throw new RangeError("Invalid type is specified");var ge=L(D),Xe=sr(D,1);oE(this,G,Xe,ge)}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Re(this))throw ol("locked");return Cr(this)},enumerable:!1,configurable:!0}),u.prototype.abort=function(m){return m===void 0&&(m=void 0),Re(this)?Cr(this)?d(new TypeError("Cannot abort a stream that already has a writer")):ca(this,m):d(ol("abort"))},u.prototype.close=function(){return Re(this)?Cr(this)?d(new TypeError("Cannot close a stream that already has a writer")):di(this)?d(new TypeError("Cannot close an already-closing stream")):ct(this):d(ol("close"))},u.prototype.getWriter=function(){if(!Re(this))throw ol("getWriter");return ie(this)},u}();Object.defineProperties(H.prototype,{abort:{enumerable:!0},close:{enumerable:!0},getWriter:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(H.prototype,r.toStringTag,{value:"WritableStream",configurable:!0});function ie(u){return new us(u)}function ue(u,m,S,D,G,se){G===void 0&&(G=1),se===void 0&&(se=function(){return 1});var ge=Object.create(H.prototype);_e(ge);var Xe=Object.create(Ao.prototype);return _g(ge,Xe,u,m,S,D,G,se),ge}function _e(u){u._state="writable",u._storedError=void 0,u._writer=void 0,u._writableStreamController=void 0,u._writeRequests=new N,u._inFlightWriteRequest=void 0,u._closeRequest=void 0,u._inFlightCloseRequest=void 0,u._pendingAbortRequest=void 0,u._backpressure=!1}function Re(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_writableStreamController")?!1:u instanceof H}function Cr(u){return u._writer!==void 0}function ca(u,m){var S;if(u._state==="closed"||u._state==="errored")return h(void 0);u._writableStreamController._abortReason=m,(S=u._writableStreamController._abortController)===null||S===void 0||S.abort();var D=u._state;if(D==="closed"||D==="errored")return h(void 0);if(u._pendingAbortRequest!==void 0)return u._pendingAbortRequest._promise;var G=!1;D==="erroring"&&(G=!0,m=void 0);var se=v(function(ge,Xe){u._pendingAbortRequest={_promise:void 0,_resolve:ge,_reject:Xe,_reason:m,_wasAlreadyErroring:G}});return u._pendingAbortRequest._promise=se,G||dn(u,m),se}function ct(u){var m=u._state;if(m==="closed"||m==="errored")return d(new TypeError("The stream (in "+m+" state) is not in the writable state and cannot be closed"));var S=v(function(G,se){var ge={_resolve:G,_reject:se};u._closeRequest=ge}),D=u._writer;return D!==void 0&&u._backpressure&&m==="writable"&&nh(D),sE(u._writableStreamController),S}function lt(u){var m=v(function(S,D){var G={_resolve:S,_reject:D};u._writeRequests.push(G)});return m}function Et(u,m){var S=u._state;if(S==="writable"){dn(u,m);return}gt(u)}function dn(u,m){var S=u._writableStreamController;u._state="erroring",u._storedError=m;var D=u._writer;D!==void 0&&yg(D,m),!JS(u)&&S._started&&gt(u)}function gt(u){u._state="errored",u._writableStreamController[be]();var m=u._storedError;if(u._writeRequests.forEach(function(G){G._reject(m)}),u._writeRequests=new N,u._pendingAbortRequest===void 0){tl(u);return}var S=u._pendingAbortRequest;if(u._pendingAbortRequest=void 0,S._wasAlreadyErroring){S._reject(m),tl(u);return}var D=u._writableStreamController[je](S._reason);_(D,function(){S._resolve(),tl(u)},function(G){S._reject(G),tl(u)})}function Rt(u){u._inFlightWriteRequest._resolve(void 0),u._inFlightWriteRequest=void 0}function So(u,m){u._inFlightWriteRequest._reject(m),u._inFlightWriteRequest=void 0,Et(u,m)}function hi(u){u._inFlightCloseRequest._resolve(void 0),u._inFlightCloseRequest=void 0;var m=u._state;m==="erroring"&&(u._storedError=void 0,u._pendingAbortRequest!==void 0&&(u._pendingAbortRequest._resolve(),u._pendingAbortRequest=void 0)),u._state="closed";var S=u._writer;S!==void 0&&Ag(S)}function ss(u,m){u._inFlightCloseRequest._reject(m),u._inFlightCloseRequest=void 0,u._pendingAbortRequest!==void 0&&(u._pendingAbortRequest._reject(m),u._pendingAbortRequest=void 0),Et(u,m)}function di(u){return!(u._closeRequest===void 0&&u._inFlightCloseRequest===void 0)}function JS(u){return!(u._inFlightWriteRequest===void 0&&u._inFlightCloseRequest===void 0)}function eE(u){u._inFlightCloseRequest=u._closeRequest,u._closeRequest=void 0}function rE(u){u._inFlightWriteRequest=u._writeRequests.shift()}function tl(u){u._closeRequest!==void 0&&(u._closeRequest._reject(u._storedError),u._closeRequest=void 0);var m=u._writer;m!==void 0&&th(m,u._storedError)}function Xp(u,m){var S=u._writer;S!==void 0&&m!==u._backpressure&&(m?dE(S):nh(S)),u._backpressure=m}var us=function(){function u(m){if(Be(m,1,"WritableStreamDefaultWriter"),Tr(m,"First parameter"),Cr(m))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=m,m._writer=this;var S=m._state;if(S==="writable")!di(m)&&m._backpressure?ul(this):Pg(this),sl(this);else if(S==="erroring")ih(this,m._storedError),sl(this);else if(S==="closed")Pg(this),pE(this);else{var D=m._storedError;ih(this,D),Eg(this,D)}}return Object.defineProperty(u.prototype,"closed",{get:function(){return Eo(this)?this._closedPromise:d(Po("closed"))},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!Eo(this))throw Po("desiredSize");if(this._ownerWritableStream===void 0)throw gu("desiredSize");return nE(this)},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"ready",{get:function(){return Eo(this)?this._readyPromise:d(Po("ready"))},enumerable:!1,configurable:!0}),u.prototype.abort=function(m){return m===void 0&&(m=void 0),Eo(this)?this._ownerWritableStream===void 0?d(gu("abort")):aE(this,m):d(Po("abort"))},u.prototype.close=function(){if(!Eo(this))return d(Po("close"));var m=this._ownerWritableStream;return m===void 0?d(gu("close")):di(m)?d(new TypeError("Cannot close an already-closing stream")):bg(this)},u.prototype.releaseLock=function(){if(!Eo(this))throw Po("releaseLock");var m=this._ownerWritableStream;m!==void 0&&xg(this)},u.prototype.write=function(m){return m===void 0&&(m=void 0),Eo(this)?this._ownerWritableStream===void 0?d(gu("write to")):wg(this,m):d(Po("write"))},u}();Object.defineProperties(us.prototype,{abort:{enumerable:!0},close:{enumerable:!0},releaseLock:{enumerable:!0},write:{enumerable:!0},closed:{enumerable:!0},desiredSize:{enumerable:!0},ready:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(us.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:!0});function Eo(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_ownerWritableStream")?!1:u instanceof us}function aE(u,m){var S=u._ownerWritableStream;return ca(S,m)}function bg(u){var m=u._ownerWritableStream;return ct(m)}function tE(u){var m=u._ownerWritableStream,S=m._state;return di(m)||S==="closed"?h(void 0):S==="errored"?d(m._storedError):bg(u)}function iE(u,m){u._closedPromiseState==="pending"?th(u,m):hE(u,m)}function yg(u,m){u._readyPromiseState==="pending"?Tg(u,m):mE(u,m)}function nE(u){var m=u._ownerWritableStream,S=m._state;return S==="errored"||S==="erroring"?null:S==="closed"?0:jg(m._writableStreamController)}function xg(u){var m=u._ownerWritableStream,S=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");yg(u,S),iE(u,S),m._writer=void 0,u._ownerWritableStream=void 0}function wg(u,m){var S=u._ownerWritableStream,D=S._writableStreamController,G=uE(D,m);if(S!==u._ownerWritableStream)return d(gu("write to"));var se=S._state;if(se==="errored")return d(S._storedError);if(di(S)||se==="closed")return d(new TypeError("The stream is closing or closed and cannot be written to"));if(se==="erroring")return d(S._storedError);var ge=lt(S);return cE(D,m,G),ge}var kg={},Ao=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"abortReason",{get:function(){if(!Jp(this))throw ah("abortReason");return this._abortReason},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"signal",{get:function(){if(!Jp(this))throw ah("signal");if(this._abortController===void 0)throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported");return this._abortController.signal},enumerable:!1,configurable:!0}),u.prototype.error=function(m){if(m===void 0&&(m=void 0),!Jp(this))throw ah("error");var S=this._controlledWritableStream._state;S==="writable"&&Sg(this,m)},u.prototype[je]=function(m){var S=this._abortAlgorithm(m);return il(this),S},u.prototype[be]=function(){ua(this)},u}();Object.defineProperties(Ao.prototype,{abortReason:{enumerable:!0},signal:{enumerable:!0},error:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(Ao.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:!0});function Jp(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledWritableStream")?!1:u instanceof Ao}function _g(u,m,S,D,G,se,ge,Xe){m._controlledWritableStream=u,u._writableStreamController=m,m._queue=void 0,m._queueTotalSize=void 0,ua(m),m._abortReason=void 0,m._abortController=C(),m._started=!1,m._strategySizeAlgorithm=Xe,m._strategyHWM=ge,m._writeAlgorithm=D,m._closeAlgorithm=G,m._abortAlgorithm=se;var Er=rh(m);Xp(u,Er);var Br=S(),zr=h(Br);_(zr,function(){m._started=!0,nl(m)},function(Wr){m._started=!0,Et(u,Wr)})}function oE(u,m,S,D){var G=Object.create(Ao.prototype),se=function(){},ge=function(){return h(void 0)},Xe=function(){return h(void 0)},Er=function(){return h(void 0)};m.start!==void 0&&(se=function(){return m.start(G)}),m.write!==void 0&&(ge=function(Br){return m.write(Br,G)}),m.close!==void 0&&(Xe=function(){return m.close()}),m.abort!==void 0&&(Er=function(Br){return m.abort(Br)}),_g(u,G,se,ge,Xe,Er,S,D)}function il(u){u._writeAlgorithm=void 0,u._closeAlgorithm=void 0,u._abortAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function sE(u){vt(u,kg,0),nl(u)}function uE(u,m){try{return u._strategySizeAlgorithm(m)}catch(S){return eh(u,S),1}}function jg(u){return u._strategyHWM-u._queueTotalSize}function cE(u,m,S){try{vt(u,m,S)}catch(se){eh(u,se);return}var D=u._controlledWritableStream;if(!di(D)&&D._state==="writable"){var G=rh(u);Xp(D,G)}nl(u)}function nl(u){var m=u._controlledWritableStream;if(u._started&&m._inFlightWriteRequest===void 0){var S=m._state;if(S==="erroring"){gt(m);return}if(u._queue.length!==0){var D=ra(u);D===kg?lE(u):fE(u,D)}}}function eh(u,m){u._controlledWritableStream._state==="writable"&&Sg(u,m)}function lE(u){var m=u._controlledWritableStream;eE(m),st(u);var S=u._closeAlgorithm();il(u),_(S,function(){hi(m)},function(D){ss(m,D)})}function fE(u,m){var S=u._controlledWritableStream;rE(S);var D=u._writeAlgorithm(m);_(D,function(){Rt(S);var G=S._state;if(st(u),!di(S)&&G==="writable"){var se=rh(u);Xp(S,se)}nl(u)},function(G){S._state==="writable"&&il(u),So(S,G)})}function rh(u){var m=jg(u);return m<=0}function Sg(u,m){var S=u._controlledWritableStream;il(u),dn(S,m)}function ol(u){return new TypeError("WritableStream.prototype."+u+" can only be used on a WritableStream")}function ah(u){return new TypeError("WritableStreamDefaultController.prototype."+u+" can only be used on a WritableStreamDefaultController")}function Po(u){return new TypeError("WritableStreamDefaultWriter.prototype."+u+" can only be used on a WritableStreamDefaultWriter")}function gu(u){return new TypeError("Cannot "+u+" a stream using a released writer")}function sl(u){u._closedPromise=v(function(m,S){u._closedPromise_resolve=m,u._closedPromise_reject=S,u._closedPromiseState="pending"})}function Eg(u,m){sl(u),th(u,m)}function pE(u){sl(u),Ag(u)}function th(u,m){u._closedPromise_reject!==void 0&&(P(u._closedPromise),u._closedPromise_reject(m),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0,u._closedPromiseState="rejected")}function hE(u,m){Eg(u,m)}function Ag(u){u._closedPromise_resolve!==void 0&&(u._closedPromise_resolve(void 0),u._closedPromise_resolve=void 0,u._closedPromise_reject=void 0,u._closedPromiseState="resolved")}function ul(u){u._readyPromise=v(function(m,S){u._readyPromise_resolve=m,u._readyPromise_reject=S}),u._readyPromiseState="pending"}function ih(u,m){ul(u),Tg(u,m)}function Pg(u){ul(u),nh(u)}function Tg(u,m){u._readyPromise_reject!==void 0&&(P(u._readyPromise),u._readyPromise_reject(m),u._readyPromise_resolve=void 0,u._readyPromise_reject=void 0,u._readyPromiseState="rejected")}function dE(u){ul(u)}function mE(u,m){ih(u,m)}function nh(u){u._readyPromise_resolve!==void 0&&(u._readyPromise_resolve(void 0),u._readyPromise_resolve=void 0,u._readyPromise_reject=void 0,u._readyPromiseState="fulfilled")}var Fg=typeof DOMException<"u"?DOMException:void 0;function vE(u){if(!(typeof u=="function"||typeof u=="object"))return!1;try{return new u,!0}catch{return!1}}function gE(){var u=function(S,D){this.message=S||"",this.name=D||"Error",Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)};return u.prototype=Object.create(Error.prototype),Object.defineProperty(u.prototype,"constructor",{value:u,writable:!0,configurable:!0}),u}var bE=vE(Fg)?Fg:gE();function Cg(u,m,S,D,G,se){var ge=Gr(u),Xe=ie(m);u._disturbed=!0;var Er=!1,Br=h(void 0);return v(function(zr,Wr){var Oa;if(se!==void 0){if(Oa=function(){var xr=new bE("Aborted","AbortError"),Yr=[];D||Yr.push(function(){return m._state==="writable"?ca(m,xr):h(void 0)}),G||Yr.push(function(){return u._state==="readable"?mi(u,xr):h(void 0)}),$t(function(){return Promise.all(Yr.map(function(ba){return ba()}))},!0,xr)},se.aborted){Oa();return}se.addEventListener("abort",Oa)}function vi(){return v(function(xr,Yr){function ba(Ni){Ni?xr():y(fs(),ba,Yr)}ba(!1)})}function fs(){return Er?h(!0):y(Xe._readyPromise,function(){return v(function(xr,Yr){nr(ge,{_chunkSteps:function(ba){Br=y(wg(Xe,ba),void 0,a),xr(!1)},_closeSteps:function(){return xr(!0)},_errorSteps:Yr})})})}if(ft(u,ge._closedPromise,function(xr){D?vn(!0,xr):$t(function(){return ca(m,xr)},!0,xr)}),ft(m,Xe._closedPromise,function(xr){G?vn(!0,xr):$t(function(){return mi(u,xr)},!0,xr)}),Li(u,ge._closedPromise,function(){S?vn():$t(function(){return tE(Xe)})}),di(m)||m._state==="closed"){var Vn=new TypeError("the destination writable stream closed before all data could be piped to it");G?vn(!0,Vn):$t(function(){return mi(u,Vn)},!0,Vn)}P(vi());function Di(){var xr=Br;return y(Br,function(){return xr!==Br?Di():void 0})}function ft(xr,Yr,ba){xr._state==="errored"?ba(xr._storedError):A(Yr,ba)}function Li(xr,Yr,ba){xr._state==="closed"?ba():w(Yr,ba)}function $t(xr,Yr,ba){if(Er)return;Er=!0,m._state==="writable"&&!di(m)?w(Di(),Ni):Ni();function Ni(){_(xr(),function(){return ga(Yr,ba)},function($n){return ga(!0,$n)})}}function vn(xr,Yr){Er||(Er=!0,m._state==="writable"&&!di(m)?w(Di(),function(){return ga(xr,Yr)}):ga(xr,Yr))}function ga(xr,Yr){xg(Xe),V(ge),se!==void 0&&se.removeEventListener("abort",Oa),xr?Wr(Yr):zr(void 0)}})}var To=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!cl(this))throw pl("desiredSize");return oh(this)},enumerable:!1,configurable:!0}),u.prototype.close=function(){if(!cl(this))throw pl("close");if(!cs(this))throw new TypeError("The stream is not in a state that permits close");yu(this)},u.prototype.enqueue=function(m){if(m===void 0&&(m=void 0),!cl(this))throw pl("enqueue");if(!cs(this))throw new TypeError("The stream is not in a state that permits enqueue");return fl(this,m)},u.prototype.error=function(m){if(m===void 0&&(m=void 0),!cl(this))throw pl("error");Un(this,m)},u.prototype[Le]=function(m){ua(this);var S=this._cancelAlgorithm(m);return ll(this),S},u.prototype[Me]=function(m){var S=this._controlledReadableStream;if(this._queue.length>0){var D=st(this);this._closeRequested&&this._queue.length===0?(ll(this),xu(S)):bu(this),m._chunkSteps(D)}else J(S,m),bu(this)},u}();Object.defineProperties(To.prototype,{close:{enumerable:!0},enqueue:{enumerable:!0},error:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(To.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:!0});function cl(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledReadableStream")?!1:u instanceof To}function bu(u){var m=Bg(u);if(m){if(u._pulling){u._pullAgain=!0;return}u._pulling=!0;var S=u._pullAlgorithm();_(S,function(){u._pulling=!1,u._pullAgain&&(u._pullAgain=!1,bu(u))},function(D){Un(u,D)})}}function Bg(u){var m=u._controlledReadableStream;if(!cs(u)||!u._started)return!1;if(Hn(m)&&Ke(m)>0)return!0;var S=oh(u);return S>0}function ll(u){u._pullAlgorithm=void 0,u._cancelAlgorithm=void 0,u._strategySizeAlgorithm=void 0}function yu(u){if(cs(u)){var m=u._controlledReadableStream;u._closeRequested=!0,u._queue.length===0&&(ll(u),xu(m))}}function fl(u,m){if(cs(u)){var S=u._controlledReadableStream;if(Hn(S)&&Ke(S)>0)qe(S,m,!1);else{var D=void 0;try{D=u._strategySizeAlgorithm(m)}catch(G){throw Un(u,G),G}try{vt(u,m,D)}catch(G){throw Un(u,G),G}}bu(u)}}function Un(u,m){var S=u._controlledReadableStream;S._state==="readable"&&(ua(u),ll(u),Og(S,m))}function oh(u){var m=u._controlledReadableStream._state;return m==="errored"?null:m==="closed"?0:u._strategyHWM-u._queueTotalSize}function yE(u){return!Bg(u)}function cs(u){var m=u._controlledReadableStream._state;return!u._closeRequested&&m==="readable"}function qg(u,m,S,D,G,se,ge){m._controlledReadableStream=u,m._queue=void 0,m._queueTotalSize=void 0,ua(m),m._started=!1,m._closeRequested=!1,m._pullAgain=!1,m._pulling=!1,m._strategySizeAlgorithm=ge,m._strategyHWM=se,m._pullAlgorithm=D,m._cancelAlgorithm=G,u._readableStreamController=m;var Xe=S();_(h(Xe),function(){m._started=!0,bu(m)},function(Er){Un(m,Er)})}function xE(u,m,S,D){var G=Object.create(To.prototype),se=function(){},ge=function(){return h(void 0)},Xe=function(){return h(void 0)};m.start!==void 0&&(se=function(){return m.start(G)}),m.pull!==void 0&&(ge=function(){return m.pull(G)}),m.cancel!==void 0&&(Xe=function(Er){return m.cancel(Er)}),qg(u,G,se,ge,Xe,S,D)}function pl(u){return new TypeError("ReadableStreamDefaultController.prototype."+u+" can only be used on a ReadableStreamDefaultController")}function wE(u,m){return va(u._readableStreamController)?_E(u):kE(u)}function kE(u,m){var S=Gr(u),D=!1,G=!1,se=!1,ge=!1,Xe,Er,Br,zr,Wr,Oa=v(function(ft){Wr=ft});function vi(){if(D)return G=!0,h(void 0);D=!0;var ft={_chunkSteps:function(Li){R(function(){G=!1;var $t=Li,vn=Li;se||fl(Br._readableStreamController,$t),ge||fl(zr._readableStreamController,vn),D=!1,G&&vi()})},_closeSteps:function(){D=!1,se||yu(Br._readableStreamController),ge||yu(zr._readableStreamController),(!se||!ge)&&Wr(void 0)},_errorSteps:function(){D=!1}};return nr(S,ft),h(void 0)}function fs(ft){if(se=!0,Xe=ft,ge){var Li=wr([Xe,Er]),$t=mi(u,Li);Wr($t)}return Oa}function Vn(ft){if(ge=!0,Er=ft,se){var Li=wr([Xe,Er]),$t=mi(u,Li);Wr($t)}return Oa}function Di(){}return Br=sh(Di,vi,fs),zr=sh(Di,vi,Vn),A(S._closedPromise,function(ft){Un(Br._readableStreamController,ft),Un(zr._readableStreamController,ft),(!se||!ge)&&Wr(void 0)}),[Br,zr]}function _E(u){var m=Gr(u),S=!1,D=!1,G=!1,se=!1,ge=!1,Xe,Er,Br,zr,Wr,Oa=v(function(ga){Wr=ga});function vi(ga){A(ga._closedPromise,function(xr){ga===m&&(Fe(Br._readableStreamController,xr),Fe(zr._readableStreamController,xr),(!se||!ge)&&Wr(void 0))})}function fs(){Ve(m)&&(V(m),m=Gr(u),vi(m));var ga={_chunkSteps:function(xr){R(function(){D=!1,G=!1;var Yr=xr,ba=xr;if(!se&&!ge)try{ba=Ia(xr)}catch(Ni){Fe(Br._readableStreamController,Ni),Fe(zr._readableStreamController,Ni),Wr(mi(u,Ni));return}se||Se(Br._readableStreamController,Yr),ge||Se(zr._readableStreamController,ba),S=!1,D?Di():G&&ft()})},_closeSteps:function(){S=!1,se||Ie(Br._readableStreamController),ge||Ie(zr._readableStreamController),Br._readableStreamController._pendingPullIntos.length>0&&Qe(Br._readableStreamController,0),zr._readableStreamController._pendingPullIntos.length>0&&Qe(zr._readableStreamController,0),(!se||!ge)&&Wr(void 0)},_errorSteps:function(){S=!1}};nr(m,ga)}function Vn(ga,xr){Je(m)&&(V(m),m=X(u),vi(m));var Yr=xr?zr:Br,ba=xr?Br:zr,Ni={_chunkSteps:function($n){R(function(){D=!1,G=!1;var ps=xr?ge:se,ju=xr?se:ge;if(ju)ps||Te(Yr._readableStreamController,$n);else{var Yg=void 0;try{Yg=Ia($n)}catch(fh){Fe(Yr._readableStreamController,fh),Fe(ba._readableStreamController,fh),Wr(mi(u,fh));return}ps||Te(Yr._readableStreamController,$n),Se(ba._readableStreamController,Yg)}S=!1,D?Di():G&&ft()})},_closeSteps:function($n){S=!1;var ps=xr?ge:se,ju=xr?se:ge;ps||Ie(Yr._readableStreamController),ju||Ie(ba._readableStreamController),$n!==void 0&&(ps||Te(Yr._readableStreamController,$n),!ju&&ba._readableStreamController._pendingPullIntos.length>0&&Qe(ba._readableStreamController,0)),(!ps||!ju)&&Wr(void 0)},_errorSteps:function(){S=!1}};lr(m,ga,Ni)}function Di(){if(S)return D=!0,h(void 0);S=!0;var ga=Ce(Br._readableStreamController);return ga===null?fs():Vn(ga._view,!1),h(void 0)}function ft(){if(S)return G=!0,h(void 0);S=!0;var ga=Ce(zr._readableStreamController);return ga===null?fs():Vn(ga._view,!0),h(void 0)}function Li(ga){if(se=!0,Xe=ga,ge){var xr=wr([Xe,Er]),Yr=mi(u,xr);Wr(Yr)}return Oa}function $t(ga){if(ge=!0,Er=ga,se){var xr=wr([Xe,Er]),Yr=mi(u,xr);Wr(Yr)}return Oa}function vn(){}return Br=Rg(vn,Di,Li),zr=Rg(vn,ft,$t),vi(m),[Br,zr]}function jE(u,m){Ze(u,m);var S=u,D=S==null?void 0:S.autoAllocateChunkSize,G=S==null?void 0:S.cancel,se=S==null?void 0:S.pull,ge=S==null?void 0:S.start,Xe=S==null?void 0:S.type;return{autoAllocateChunkSize:D===void 0?void 0:ur(D,m+" has member 'autoAllocateChunkSize' that"),cancel:G===void 0?void 0:SE(G,S,m+" has member 'cancel' that"),pull:se===void 0?void 0:EE(se,S,m+" has member 'pull' that"),start:ge===void 0?void 0:AE(ge,S,m+" has member 'start' that"),type:Xe===void 0?void 0:PE(Xe,m+" has member 'type' that")}}function SE(u,m,S){return We(u,S),function(D){return I(u,m,[D])}}function EE(u,m,S){return We(u,S),function(D){return I(u,m,[D])}}function AE(u,m,S){return We(u,S),function(D){return F(u,m,[D])}}function PE(u,m){if(u=""+u,u!=="bytes")throw new TypeError(m+" '"+u+"' is not a valid enumeration value for ReadableStreamType");return u}function TE(u,m){Ze(u,m);var S=u==null?void 0:u.mode;return{mode:S===void 0?void 0:FE(S,m+" has member 'mode' that")}}function FE(u,m){if(u=""+u,u!=="byob")throw new TypeError(m+" '"+u+"' is not a valid enumeration value for ReadableStreamReaderMode");return u}function CE(u,m){Ze(u,m);var S=u==null?void 0:u.preventCancel;return{preventCancel:Boolean(S)}}function Ig(u,m){Ze(u,m);var S=u==null?void 0:u.preventAbort,D=u==null?void 0:u.preventCancel,G=u==null?void 0:u.preventClose,se=u==null?void 0:u.signal;return se!==void 0&&BE(se,m+" has member 'signal' that"),{preventAbort:Boolean(S),preventCancel:Boolean(D),preventClose:Boolean(G),signal:se}}function BE(u,m){if(!j(u))throw new TypeError(m+" is not an AbortSignal.")}function qE(u,m){Ze(u,m);var S=u==null?void 0:u.readable;fe(S,"readable","ReadableWritablePair"),Or(S,m+" has member 'readable' that");var D=u==null?void 0:u.writable;return fe(D,"writable","ReadableWritablePair"),Tr(D,m+" has member 'writable' that"),{readable:S,writable:D}}var mn=function(){function u(m,S){m===void 0&&(m={}),S===void 0&&(S={}),m===void 0?m=null:rr(m,"First parameter");var D=yr(S,"Second parameter"),G=jE(m,"First parameter");if(uh(this),G.type==="bytes"){if(D.size!==void 0)throw new RangeError("The strategy for a byte stream cannot have a size function");var se=sr(D,0);Ae(this,G,se)}else{var ge=L(D),se=sr(D,1);xE(this,G,se,ge)}}return Object.defineProperty(u.prototype,"locked",{get:function(){if(!Mn(this))throw Fo("locked");return Hn(this)},enumerable:!1,configurable:!0}),u.prototype.cancel=function(m){return m===void 0&&(m=void 0),Mn(this)?Hn(this)?d(new TypeError("Cannot cancel a stream that already has a reader")):mi(this,m):d(Fo("cancel"))},u.prototype.getReader=function(m){if(m===void 0&&(m=void 0),!Mn(this))throw Fo("getReader");var S=TE(m,"First parameter");return S.mode===void 0?Gr(this):X(this)},u.prototype.pipeThrough=function(m,S){if(S===void 0&&(S={}),!Mn(this))throw Fo("pipeThrough");Be(m,1,"pipeThrough");var D=qE(m,"First parameter"),G=Ig(S,"Second parameter");if(Hn(this))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream");if(Cr(D.writable))throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream");var se=Cg(this,D.writable,G.preventClose,G.preventAbort,G.preventCancel,G.signal);return P(se),D.readable},u.prototype.pipeTo=function(m,S){if(S===void 0&&(S={}),!Mn(this))return d(Fo("pipeTo"));if(m===void 0)return d("Parameter 1 is required in 'pipeTo'.");if(!Re(m))return d(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));var D;try{D=Ig(S,"Second parameter")}catch(G){return d(G)}return Hn(this)?d(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream")):Cr(m)?d(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream")):Cg(this,m,D.preventClose,D.preventAbort,D.preventCancel,D.signal)},u.prototype.tee=function(){if(!Mn(this))throw Fo("tee");var m=wE(this);return wr(m)},u.prototype.values=function(m){if(m===void 0&&(m=void 0),!Mn(this))throw Fo("values");var S=CE(m,"First parameter");return fr(this,S.preventCancel)},u}();Object.defineProperties(mn.prototype,{cancel:{enumerable:!0},getReader:{enumerable:!0},pipeThrough:{enumerable:!0},pipeTo:{enumerable:!0},tee:{enumerable:!0},values:{enumerable:!0},locked:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(mn.prototype,r.toStringTag,{value:"ReadableStream",configurable:!0}),typeof r.asyncIterator=="symbol"&&Object.defineProperty(mn.prototype,r.asyncIterator,{value:mn.prototype.values,writable:!0,configurable:!0});function sh(u,m,S,D,G){D===void 0&&(D=1),G===void 0&&(G=function(){return 1});var se=Object.create(mn.prototype);uh(se);var ge=Object.create(To.prototype);return qg(se,ge,u,m,S,D,G),se}function Rg(u,m,S){var D=Object.create(mn.prototype);uh(D);var G=Object.create(Ra.prototype);return Ee(D,G,u,m,S,0,void 0),D}function uh(u){u._state="readable",u._reader=void 0,u._storedError=void 0,u._disturbed=!1}function Mn(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_readableStreamController")?!1:u instanceof mn}function Hn(u){return u._reader!==void 0}function mi(u,m){if(u._disturbed=!0,u._state==="closed")return h(void 0);if(u._state==="errored")return d(u._storedError);xu(u);var S=u._reader;S!==void 0&&Ve(S)&&(S._readIntoRequests.forEach(function(G){G._closeSteps(void 0)}),S._readIntoRequests=new N);var D=u._readableStreamController[Le](m);return T(D,a)}function xu(u){u._state="closed";var m=u._reader;m!==void 0&&(ce(m),Je(m)&&(m._readRequests.forEach(function(S){S._closeSteps()}),m._readRequests=new N))}function Og(u,m){u._state="errored",u._storedError=m;var S=u._reader;S!==void 0&&(xe(S,m),Je(S)?(S._readRequests.forEach(function(D){D._errorSteps(m)}),S._readRequests=new N):(S._readIntoRequests.forEach(function(D){D._errorSteps(m)}),S._readIntoRequests=new N))}function Fo(u){return new TypeError("ReadableStream.prototype."+u+" can only be used on a ReadableStream")}function zg(u,m){Ze(u,m);var S=u==null?void 0:u.highWaterMark;return fe(S,"highWaterMark","QueuingStrategyInit"),{highWaterMark:ke(S)}}var Dg=function(u){return u.byteLength};try{Object.defineProperty(Dg,"name",{value:"size",configurable:!0})}catch{}var wu=function(){function u(m){Be(m,1,"ByteLengthQueuingStrategy"),m=zg(m,"First parameter"),this._byteLengthQueuingStrategyHighWaterMark=m.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!Ng(this))throw Lg("highWaterMark");return this._byteLengthQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!Ng(this))throw Lg("size");return Dg},enumerable:!1,configurable:!0}),u}();Object.defineProperties(wu.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(wu.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:!0});function Lg(u){return new TypeError("ByteLengthQueuingStrategy.prototype."+u+" can only be used on a ByteLengthQueuingStrategy")}function Ng(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_byteLengthQueuingStrategyHighWaterMark")?!1:u instanceof wu}var Ug=function(){return 1};try{Object.defineProperty(Ug,"name",{value:"size",configurable:!0})}catch{}var ku=function(){function u(m){Be(m,1,"CountQueuingStrategy"),m=zg(m,"First parameter"),this._countQueuingStrategyHighWaterMark=m.highWaterMark}return Object.defineProperty(u.prototype,"highWaterMark",{get:function(){if(!Hg(this))throw Mg("highWaterMark");return this._countQueuingStrategyHighWaterMark},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"size",{get:function(){if(!Hg(this))throw Mg("size");return Ug},enumerable:!1,configurable:!0}),u}();Object.defineProperties(ku.prototype,{highWaterMark:{enumerable:!0},size:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ku.prototype,r.toStringTag,{value:"CountQueuingStrategy",configurable:!0});function Mg(u){return new TypeError("CountQueuingStrategy.prototype."+u+" can only be used on a CountQueuingStrategy")}function Hg(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_countQueuingStrategyHighWaterMark")?!1:u instanceof ku}function IE(u,m){Ze(u,m);var S=u==null?void 0:u.flush,D=u==null?void 0:u.readableType,G=u==null?void 0:u.start,se=u==null?void 0:u.transform,ge=u==null?void 0:u.writableType;return{flush:S===void 0?void 0:RE(S,u,m+" has member 'flush' that"),readableType:D,start:G===void 0?void 0:OE(G,u,m+" has member 'start' that"),transform:se===void 0?void 0:zE(se,u,m+" has member 'transform' that"),writableType:ge}}function RE(u,m,S){return We(u,S),function(D){return I(u,m,[D])}}function OE(u,m,S){return We(u,S),function(D){return F(u,m,[D])}}function zE(u,m,S){return We(u,S),function(D,G){return I(u,m,[D,G])}}var _u=function(){function u(m,S,D){m===void 0&&(m={}),S===void 0&&(S={}),D===void 0&&(D={}),m===void 0&&(m=null);var G=yr(S,"Second parameter"),se=yr(D,"Third parameter"),ge=IE(m,"First parameter");if(ge.readableType!==void 0)throw new RangeError("Invalid readableType specified");if(ge.writableType!==void 0)throw new RangeError("Invalid writableType specified");var Xe=sr(se,0),Er=L(se),Br=sr(G,1),zr=L(G),Wr,Oa=v(function(vi){Wr=vi});DE(this,Oa,Br,zr,Xe,Er),NE(this,ge),ge.start!==void 0?Wr(ge.start(this._transformStreamController)):Wr(void 0)}return Object.defineProperty(u.prototype,"readable",{get:function(){if(!Vg(this))throw Gg("readable");return this._readable},enumerable:!1,configurable:!0}),Object.defineProperty(u.prototype,"writable",{get:function(){if(!Vg(this))throw Gg("writable");return this._writable},enumerable:!1,configurable:!0}),u}();Object.defineProperties(_u.prototype,{readable:{enumerable:!0},writable:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(_u.prototype,r.toStringTag,{value:"TransformStream",configurable:!0});function DE(u,m,S,D,G,se){function ge(){return m}function Xe(Oa){return HE(u,Oa)}function Er(Oa){return VE(u,Oa)}function Br(){return $E(u)}u._writable=ue(ge,Xe,Br,Er,S,D);function zr(){return WE(u)}function Wr(Oa){return dl(u,Oa),h(void 0)}u._readable=sh(ge,zr,Wr,G,se),u._backpressure=void 0,u._backpressureChangePromise=void 0,u._backpressureChangePromise_resolve=void 0,ml(u,!0),u._transformStreamController=void 0}function Vg(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_transformStreamController")?!1:u instanceof _u}function hl(u,m){Un(u._readable._readableStreamController,m),dl(u,m)}function dl(u,m){$g(u._transformStreamController),eh(u._writable._writableStreamController,m),u._backpressure&&ml(u,!1)}function ml(u,m){u._backpressureChangePromise!==void 0&&u._backpressureChangePromise_resolve(),u._backpressureChangePromise=v(function(S){u._backpressureChangePromise_resolve=S}),u._backpressure=m}var ls=function(){function u(){throw new TypeError("Illegal constructor")}return Object.defineProperty(u.prototype,"desiredSize",{get:function(){if(!vl(this))throw gl("desiredSize");var m=this._controlledTransformStream._readable._readableStreamController;return oh(m)},enumerable:!1,configurable:!0}),u.prototype.enqueue=function(m){if(m===void 0&&(m=void 0),!vl(this))throw gl("enqueue");Wg(this,m)},u.prototype.error=function(m){if(m===void 0&&(m=void 0),!vl(this))throw gl("error");UE(this,m)},u.prototype.terminate=function(){if(!vl(this))throw gl("terminate");ME(this)},u}();Object.defineProperties(ls.prototype,{enqueue:{enumerable:!0},error:{enumerable:!0},terminate:{enumerable:!0},desiredSize:{enumerable:!0}}),typeof r.toStringTag=="symbol"&&Object.defineProperty(ls.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:!0});function vl(u){return!n(u)||!Object.prototype.hasOwnProperty.call(u,"_controlledTransformStream")?!1:u instanceof ls}function LE(u,m,S,D){m._controlledTransformStream=u,u._transformStreamController=m,m._transformAlgorithm=S,m._flushAlgorithm=D}function NE(u,m){var S=Object.create(ls.prototype),D=function(se){try{return Wg(S,se),h(void 0)}catch(ge){return d(ge)}},G=function(){return h(void 0)};m.transform!==void 0&&(D=function(se){return m.transform(se,S)}),m.flush!==void 0&&(G=function(){return m.flush(S)}),LE(u,S,D,G)}function $g(u){u._transformAlgorithm=void 0,u._flushAlgorithm=void 0}function Wg(u,m){var S=u._controlledTransformStream,D=S._readable._readableStreamController;if(!cs(D))throw new TypeError("Readable side is not in a state that permits enqueue");try{fl(D,m)}catch(se){throw dl(S,se),S._readable._storedError}var G=yE(D);G!==S._backpressure&&ml(S,!0)}function UE(u,m){hl(u._controlledTransformStream,m)}function Kg(u,m){var S=u._transformAlgorithm(m);return T(S,void 0,function(D){throw hl(u._controlledTransformStream,D),D})}function ME(u){var m=u._controlledTransformStream,S=m._readable._readableStreamController;yu(S);var D=new TypeError("TransformStream terminated");dl(m,D)}function HE(u,m){var S=u._transformStreamController;if(u._backpressure){var D=u._backpressureChangePromise;return T(D,function(){var G=u._writable,se=G._state;if(se==="erroring")throw G._storedError;return Kg(S,m)})}return Kg(S,m)}function VE(u,m){return hl(u,m),h(void 0)}function $E(u){var m=u._readable,S=u._transformStreamController,D=S._flushAlgorithm();return $g(S),T(D,function(){if(m._state==="errored")throw m._storedError;yu(m._readableStreamController)},function(G){throw hl(u,G),m._storedError})}function WE(u){return ml(u,!1),u._backpressureChangePromise}function gl(u){return new TypeError("TransformStreamDefaultController.prototype."+u+" can only be used on a TransformStreamDefaultController")}function Gg(u){return new TypeError("TransformStream.prototype."+u+" can only be used on a TransformStream")}var ch={ReadableStream:mn,ReadableStreamDefaultController:To,ReadableByteStreamController:Ra,ReadableStreamBYOBRequest:da,ReadableStreamDefaultReader:Ye,ReadableStreamBYOBReader:ne,WritableStream:H,WritableStreamDefaultController:Ao,WritableStreamDefaultWriter:us,ByteLengthQueuingStrategy:wu,CountQueuingStrategy:ku,TransformStream:_u,TransformStreamDefaultController:ls};if(typeof t<"u")for(var lh in ch)Object.prototype.hasOwnProperty.call(ch,lh)&&Object.defineProperty(t,lh,{value:ch[lh],writable:!0,configurable:!0});e.ByteLengthQueuingStrategy=wu,e.CountQueuingStrategy=ku,e.ReadableByteStreamController=Ra,e.ReadableStream=mn,e.ReadableStreamBYOBReader=ne,e.ReadableStreamBYOBRequest=da,e.ReadableStreamDefaultController=To,e.ReadableStreamDefaultReader=Ye,e.TransformStream=_u,e.TransformStreamDefaultController=ls,e.WritableStream=H,e.WritableStreamDefaultController=Ao,e.WritableStreamDefaultWriter=us,Object.defineProperty(e,"__esModule",{value:!0})})});var On=O(qt=>{"use strict";var DU=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";function LU(e,r){return Object.prototype.hasOwnProperty.call(e,r)}qt.assign=function(e){for(var r=Array.prototype.slice.call(arguments,1);r.length;){var a=r.shift();if(a){if(typeof a!="object")throw new TypeError(a+"must be non-object");for(var i in a)LU(a,i)&&(e[i]=a[i])}}return e};qt.shrinkBuf=function(e,r){return e.length===r?e:e.subarray?e.subarray(0,r):(e.length=r,e)};var NU={arraySet:function(e,r,a,i,t){if(r.subarray&&e.subarray){e.set(r.subarray(a,a+i),t);return}for(var n=0;n<i;n++)e[t+n]=r[a+n]},flattenChunks:function(e){var r,a,i,t,n,o;for(i=0,r=0,a=e.length;r<a;r++)i+=e[r].length;for(o=new Uint8Array(i),t=0,r=0,a=e.length;r<a;r++)n=e[r],o.set(n,t),t+=n.length;return o}},UU={arraySet:function(e,r,a,i,t){for(var n=0;n<i;n++)e[t+n]=r[a+n]},flattenChunks:function(e){return[].concat.apply([],e)}};qt.setTyped=function(e){e?(qt.Buf8=Uint8Array,qt.Buf16=Uint16Array,qt.Buf32=Int32Array,qt.assign(qt,NU)):(qt.Buf8=Array,qt.Buf16=Array,qt.Buf32=Array,qt.assign(qt,UU))};qt.setTyped(DU)});var C4=O(cu=>{"use strict";var MU=On(),HU=4,c4=0,l4=1,VU=2;function uu(e){for(var r=e.length;--r>=0;)e[r]=0}var $U=0,v4=1,WU=2,KU=3,GU=258,U0=29,Vc=256,Nc=Vc+1+U0,su=30,M0=19,g4=2*Nc+1,Xo=15,R0=16,YU=7,H0=256,b4=16,y4=17,x4=18,L0=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],Rp=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ZU=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],w4=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],QU=512,zn=new Array((Nc+2)*2);uu(zn);var Lc=new Array(su*2);uu(Lc);var Uc=new Array(QU);uu(Uc);var Mc=new Array(GU-KU+1);uu(Mc);var V0=new Array(U0);uu(V0);var Op=new Array(su);uu(Op);function O0(e,r,a,i,t){this.static_tree=e,this.extra_bits=r,this.extra_base=a,this.elems=i,this.max_length=t,this.has_stree=e&&e.length}var k4,_4,j4;function z0(e,r){this.dyn_tree=e,this.max_code=0,this.stat_desc=r}function S4(e){return e<256?Uc[e]:Uc[256+(e>>>7)]}function Hc(e,r){e.pending_buf[e.pending++]=r&255,e.pending_buf[e.pending++]=r>>>8&255}function Ht(e,r,a){e.bi_valid>R0-a?(e.bi_buf|=r<<e.bi_valid&65535,Hc(e,e.bi_buf),e.bi_buf=r>>R0-e.bi_valid,e.bi_valid+=a-R0):(e.bi_buf|=r<<e.bi_valid&65535,e.bi_valid+=a)}function cn(e,r,a){Ht(e,a[r*2],a[r*2+1])}function E4(e,r){var a=0;do a|=e&1,e>>>=1,a<<=1;while(--r>0);return a>>>1}function XU(e){e.bi_valid===16?(Hc(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function JU(e,r){var a=r.dyn_tree,i=r.max_code,t=r.stat_desc.static_tree,n=r.stat_desc.has_stree,o=r.stat_desc.extra_bits,s=r.stat_desc.extra_base,c=r.stat_desc.max_length,l,f,v,h,d,y,_=0;for(h=0;h<=Xo;h++)e.bl_count[h]=0;for(a[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<g4;l++)f=e.heap[l],h=a[a[f*2+1]*2+1]+1,h>c&&(h=c,_++),a[f*2+1]=h,!(f>i)&&(e.bl_count[h]++,d=0,f>=s&&(d=o[f-s]),y=a[f*2],e.opt_len+=y*(h+d),n&&(e.static_len+=y*(t[f*2+1]+d)));if(_!==0){do{for(h=c-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[c]--,_-=2}while(_>0);for(h=c;h!==0;h--)for(f=e.bl_count[h];f!==0;)v=e.heap[--l],!(v>i)&&(a[v*2+1]!==h&&(e.opt_len+=(h-a[v*2+1])*a[v*2],a[v*2+1]=h),f--)}}function A4(e,r,a){var i=new Array(Xo+1),t=0,n,o;for(n=1;n<=Xo;n++)i[n]=t=t+a[n-1]<<1;for(o=0;o<=r;o++){var s=e[o*2+1];s!==0&&(e[o*2]=E4(i[s]++,s))}}function eM(){var e,r,a,i,t,n=new Array(Xo+1);for(a=0,i=0;i<U0-1;i++)for(V0[i]=a,e=0;e<1<<L0[i];e++)Mc[a++]=i;for(Mc[a-1]=i,t=0,i=0;i<16;i++)for(Op[i]=t,e=0;e<1<<Rp[i];e++)Uc[t++]=i;for(t>>=7;i<su;i++)for(Op[i]=t<<7,e=0;e<1<<Rp[i]-7;e++)Uc[256+t++]=i;for(r=0;r<=Xo;r++)n[r]=0;for(e=0;e<=143;)zn[e*2+1]=8,e++,n[8]++;for(;e<=255;)zn[e*2+1]=9,e++,n[9]++;for(;e<=279;)zn[e*2+1]=7,e++,n[7]++;for(;e<=287;)zn[e*2+1]=8,e++,n[8]++;for(A4(zn,Nc+1,n),e=0;e<su;e++)Lc[e*2+1]=5,Lc[e*2]=E4(e,5);k4=new O0(zn,L0,Vc+1,Nc,Xo),_4=new O0(Lc,Rp,0,su,Xo),j4=new O0(new Array(0),ZU,0,M0,YU)}function P4(e){var r;for(r=0;r<Nc;r++)e.dyn_ltree[r*2]=0;for(r=0;r<su;r++)e.dyn_dtree[r*2]=0;for(r=0;r<M0;r++)e.bl_tree[r*2]=0;e.dyn_ltree[H0*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function T4(e){e.bi_valid>8?Hc(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function rM(e,r,a,i){T4(e),i&&(Hc(e,a),Hc(e,~a)),MU.arraySet(e.pending_buf,e.window,r,a,e.pending),e.pending+=a}function f4(e,r,a,i){var t=r*2,n=a*2;return e[t]<e[n]||e[t]===e[n]&&i[r]<=i[a]}function D0(e,r,a){for(var i=e.heap[a],t=a<<1;t<=e.heap_len&&(t<e.heap_len&&f4(r,e.heap[t+1],e.heap[t],e.depth)&&t++,!f4(r,i,e.heap[t],e.depth));)e.heap[a]=e.heap[t],a=t,t<<=1;e.heap[a]=i}function p4(e,r,a){var i,t,n=0,o,s;if(e.last_lit!==0)do i=e.pending_buf[e.d_buf+n*2]<<8|e.pending_buf[e.d_buf+n*2+1],t=e.pending_buf[e.l_buf+n],n++,i===0?cn(e,t,r):(o=Mc[t],cn(e,o+Vc+1,r),s=L0[o],s!==0&&(t-=V0[o],Ht(e,t,s)),i--,o=S4(i),cn(e,o,a),s=Rp[o],s!==0&&(i-=Op[o],Ht(e,i,s)));while(n<e.last_lit);cn(e,H0,r)}function N0(e,r){var a=r.dyn_tree,i=r.stat_desc.static_tree,t=r.stat_desc.has_stree,n=r.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=g4,o=0;o<n;o++)a[o*2]!==0?(e.heap[++e.heap_len]=c=o,e.depth[o]=0):a[o*2+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,a[l*2]=1,e.depth[l]=0,e.opt_len--,t&&(e.static_len-=i[l*2+1]);for(r.max_code=c,o=e.heap_len>>1;o>=1;o--)D0(e,a,o);l=n;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],D0(e,a,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,a[l*2]=a[o*2]+a[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,a[o*2+1]=a[s*2+1]=l,e.heap[1]=l++,D0(e,a,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],JU(e,r),A4(a,c,e.bl_count)}function h4(e,r,a){var i,t=-1,n,o=r[0*2+1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r[(a+1)*2+1]=65535,i=0;i<=a;i++)n=o,o=r[(i+1)*2+1],!(++s<c&&n===o)&&(s<l?e.bl_tree[n*2]+=s:n!==0?(n!==t&&e.bl_tree[n*2]++,e.bl_tree[b4*2]++):s<=10?e.bl_tree[y4*2]++:e.bl_tree[x4*2]++,s=0,t=n,o===0?(c=138,l=3):n===o?(c=6,l=3):(c=7,l=4))}function d4(e,r,a){var i,t=-1,n,o=r[0*2+1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),i=0;i<=a;i++)if(n=o,o=r[(i+1)*2+1],!(++s<c&&n===o)){if(s<l)do cn(e,n,e.bl_tree);while(--s!==0);else n!==0?(n!==t&&(cn(e,n,e.bl_tree),s--),cn(e,b4,e.bl_tree),Ht(e,s-3,2)):s<=10?(cn(e,y4,e.bl_tree),Ht(e,s-3,3)):(cn(e,x4,e.bl_tree),Ht(e,s-11,7));s=0,t=n,o===0?(c=138,l=3):n===o?(c=6,l=3):(c=7,l=4)}}function aM(e){var r;for(h4(e,e.dyn_ltree,e.l_desc.max_code),h4(e,e.dyn_dtree,e.d_desc.max_code),N0(e,e.bl_desc),r=M0-1;r>=3&&e.bl_tree[w4[r]*2+1]===0;r--);return e.opt_len+=3*(r+1)+5+5+4,r}function tM(e,r,a,i){var t;for(Ht(e,r-257,5),Ht(e,a-1,5),Ht(e,i-4,4),t=0;t<i;t++)Ht(e,e.bl_tree[w4[t]*2+1],3);d4(e,e.dyn_ltree,r-1),d4(e,e.dyn_dtree,a-1)}function iM(e){var r=4093624447,a;for(a=0;a<=31;a++,r>>>=1)if(r&1&&e.dyn_ltree[a*2]!==0)return c4;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return l4;for(a=32;a<Vc;a++)if(e.dyn_ltree[a*2]!==0)return l4;return c4}var m4=!1;function nM(e){m4||(eM(),m4=!0),e.l_desc=new z0(e.dyn_ltree,k4),e.d_desc=new z0(e.dyn_dtree,_4),e.bl_desc=new z0(e.bl_tree,j4),e.bi_buf=0,e.bi_valid=0,P4(e)}function F4(e,r,a,i){Ht(e,($U<<1)+(i?1:0),3),rM(e,r,a,!0)}function oM(e){Ht(e,v4<<1,3),cn(e,H0,zn),XU(e)}function sM(e,r,a,i){var t,n,o=0;e.level>0?(e.strm.data_type===VU&&(e.strm.data_type=iM(e)),N0(e,e.l_desc),N0(e,e.d_desc),o=aM(e),t=e.opt_len+3+7>>>3,n=e.static_len+3+7>>>3,n<=t&&(t=n)):t=n=a+5,a+4<=t&&r!==-1?F4(e,r,a,i):e.strategy===HU||n===t?(Ht(e,(v4<<1)+(i?1:0),3),p4(e,zn,Lc)):(Ht(e,(WU<<1)+(i?1:0),3),tM(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),p4(e,e.dyn_ltree,e.dyn_dtree)),P4(e),i&&T4(e)}function uM(e,r,a){return e.pending_buf[e.d_buf+e.last_lit*2]=r>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=r&255,e.pending_buf[e.l_buf+e.last_lit]=a&255,e.last_lit++,r===0?e.dyn_ltree[a*2]++:(e.matches++,r--,e.dyn_ltree[(Mc[a]+Vc+1)*2]++,e.dyn_dtree[S4(r)*2]++),e.last_lit===e.lit_bufsize-1}cu._tr_init=nM;cu._tr_stored_block=F4;cu._tr_flush_block=sM;cu._tr_tally=uM;cu._tr_align=oM});var $0=O((jQ,B4)=>{"use strict";function cM(e,r,a,i){for(var t=e&65535|0,n=e>>>16&65535|0,o=0;a!==0;){o=a>2e3?2e3:a,a-=o;do t=t+r[i++]|0,n=n+t|0;while(--o);t%=65521,n%=65521}return t|n<<16|0}B4.exports=cM});var W0=O((SQ,q4)=>{"use strict";function lM(){for(var e,r=[],a=0;a<256;a++){e=a;for(var i=0;i<8;i++)e=e&1?3988292384^e>>>1:e>>>1;r[a]=e}return r}var fM=lM();function pM(e,r,a,i){var t=fM,n=i+a;e^=-1;for(var o=i;o<n;o++)e=e>>>8^t[(e^r[o])&255];return e^-1}q4.exports=pM});var zp=O((EQ,I4)=>{"use strict";I4.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}});var H4=O(pn=>{"use strict";var It=On(),li=C4(),D4=$0(),yo=W0(),hM=zp(),as=0,dM=1,mM=3,jo=4,R4=5,fn=0,O4=1,fi=-2,vM=-3,K0=-5,gM=-1,bM=1,Dp=2,yM=3,xM=4,wM=0,kM=2,Mp=8,_M=9,jM=15,SM=8,EM=29,AM=256,Y0=AM+1+EM,PM=30,TM=19,FM=2*Y0+1,CM=15,Ur=3,ko=258,Oi=ko+Ur+1,BM=32,Hp=42,Z0=69,Lp=73,Np=91,Up=103,Jo=113,Wc=666,Xa=1,Kc=2,es=3,pu=4,qM=3;function _o(e,r){return e.msg=hM[r],r}function z4(e){return(e<<1)-(e>4?9:0)}function wo(e){for(var r=e.length;--r>=0;)e[r]=0}function xo(e){var r=e.state,a=r.pending;a>e.avail_out&&(a=e.avail_out),a!==0&&(It.arraySet(e.output,r.pending_buf,r.pending_out,a,e.next_out),e.next_out+=a,r.pending_out+=a,e.total_out+=a,e.avail_out-=a,r.pending-=a,r.pending===0&&(r.pending_out=0))}function mt(e,r){li._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,r),e.block_start=e.strstart,xo(e.strm)}function Kr(e,r){e.pending_buf[e.pending++]=r}function $c(e,r){e.pending_buf[e.pending++]=r>>>8&255,e.pending_buf[e.pending++]=r&255}function IM(e,r,a,i){var t=e.avail_in;return t>i&&(t=i),t===0?0:(e.avail_in-=t,It.arraySet(r,e.input,e.next_in,t,a),e.state.wrap===1?e.adler=D4(e.adler,r,t,a):e.state.wrap===2&&(e.adler=yo(e.adler,r,t,a)),e.next_in+=t,e.total_in+=t,t)}function L4(e,r){var a=e.max_chain_length,i=e.strstart,t,n,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-Oi?e.strstart-(e.w_size-Oi):0,l=e.window,f=e.w_mask,v=e.prev,h=e.strstart+ko,d=l[i+o-1],y=l[i+o];e.prev_length>=e.good_match&&(a>>=2),s>e.lookahead&&(s=e.lookahead);do if(t=r,!(l[t+o]!==y||l[t+o-1]!==d||l[t]!==l[i]||l[++t]!==l[i+1])){i+=2,t++;do;while(l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&l[++i]===l[++t]&&i<h);if(n=ko-(h-i),i=h-ko,n>o){if(e.match_start=r,o=n,n>=s)break;d=l[i+o-1],y=l[i+o]}}while((r=v[r&f])>c&&--a!==0);return o<=e.lookahead?o:e.lookahead}function rs(e){var r=e.w_size,a,i,t,n,o;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=r+(r-Oi)){It.arraySet(e.window,e.window,r,r,0),e.match_start-=r,e.strstart-=r,e.block_start-=r,i=e.hash_size,a=i;do t=e.head[--a],e.head[a]=t>=r?t-r:0;while(--i);i=r,a=i;do t=e.prev[--a],e.prev[a]=t>=r?t-r:0;while(--i);n+=r}if(e.strm.avail_in===0)break;if(i=IM(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=i,e.lookahead+e.insert>=Ur)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+Ur-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<Ur)););}while(e.lookahead<Oi&&e.strm.avail_in!==0)}function RM(e,r){var a=65535;for(a>e.pending_buf_size-5&&(a=e.pending_buf_size-5);;){if(e.lookahead<=1){if(rs(e),e.lookahead===0&&r===as)return Xa;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+a;if((e.strstart===0||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,mt(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-Oi&&(mt(e,!1),e.strm.avail_out===0))return Xa}return e.insert=0,r===jo?(mt(e,!0),e.strm.avail_out===0?es:pu):(e.strstart>e.block_start&&(mt(e,!1),e.strm.avail_out===0),Xa)}function G0(e,r){for(var a,i;;){if(e.lookahead<Oi){if(rs(e),e.lookahead<Oi&&r===as)return Xa;if(e.lookahead===0)break}if(a=0,e.lookahead>=Ur&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Ur-1])&e.hash_mask,a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),a!==0&&e.strstart-a<=e.w_size-Oi&&(e.match_length=L4(e,a)),e.match_length>=Ur)if(i=li._tr_tally(e,e.strstart-e.match_start,e.match_length-Ur),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Ur){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Ur-1])&e.hash_mask,a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=li._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(mt(e,!1),e.strm.avail_out===0))return Xa}return e.insert=e.strstart<Ur-1?e.strstart:Ur-1,r===jo?(mt(e,!0),e.strm.avail_out===0?es:pu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Xa:Kc}function lu(e,r){for(var a,i,t;;){if(e.lookahead<Oi){if(rs(e),e.lookahead<Oi&&r===as)return Xa;if(e.lookahead===0)break}if(a=0,e.lookahead>=Ur&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Ur-1])&e.hash_mask,a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=Ur-1,a!==0&&e.prev_length<e.max_lazy_match&&e.strstart-a<=e.w_size-Oi&&(e.match_length=L4(e,a),e.match_length<=5&&(e.strategy===bM||e.match_length===Ur&&e.strstart-e.match_start>4096)&&(e.match_length=Ur-1)),e.prev_length>=Ur&&e.match_length<=e.prev_length){t=e.strstart+e.lookahead-Ur,i=li._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-Ur),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=t&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+Ur-1])&e.hash_mask,a=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=Ur-1,e.strstart++,i&&(mt(e,!1),e.strm.avail_out===0))return Xa}else if(e.match_available){if(i=li._tr_tally(e,0,e.window[e.strstart-1]),i&&mt(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Xa}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=li._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<Ur-1?e.strstart:Ur-1,r===jo?(mt(e,!0),e.strm.avail_out===0?es:pu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Xa:Kc}function OM(e,r){for(var a,i,t,n,o=e.window;;){if(e.lookahead<=ko){if(rs(e),e.lookahead<=ko&&r===as)return Xa;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=Ur&&e.strstart>0&&(t=e.strstart-1,i=o[t],i===o[++t]&&i===o[++t]&&i===o[++t])){n=e.strstart+ko;do;while(i===o[++t]&&i===o[++t]&&i===o[++t]&&i===o[++t]&&i===o[++t]&&i===o[++t]&&i===o[++t]&&i===o[++t]&&t<n);e.match_length=ko-(n-t),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=Ur?(a=li._tr_tally(e,1,e.match_length-Ur),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(a=li._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),a&&(mt(e,!1),e.strm.avail_out===0))return Xa}return e.insert=0,r===jo?(mt(e,!0),e.strm.avail_out===0?es:pu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Xa:Kc}function zM(e,r){for(var a;;){if(e.lookahead===0&&(rs(e),e.lookahead===0)){if(r===as)return Xa;break}if(e.match_length=0,a=li._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,a&&(mt(e,!1),e.strm.avail_out===0))return Xa}return e.insert=0,r===jo?(mt(e,!0),e.strm.avail_out===0?es:pu):e.last_lit&&(mt(e,!1),e.strm.avail_out===0)?Xa:Kc}function ln(e,r,a,i,t){this.good_length=e,this.max_lazy=r,this.nice_length=a,this.max_chain=i,this.func=t}var fu;fu=[new ln(0,0,0,0,RM),new ln(4,4,8,4,G0),new ln(4,5,16,8,G0),new ln(4,6,32,32,G0),new ln(4,4,16,16,lu),new ln(8,16,32,32,lu),new ln(8,16,128,128,lu),new ln(8,32,128,256,lu),new ln(32,128,258,1024,lu),new ln(32,258,258,4096,lu)];function DM(e){e.window_size=2*e.w_size,wo(e.head),e.max_lazy_match=fu[e.level].max_lazy,e.good_match=fu[e.level].good_length,e.nice_match=fu[e.level].nice_length,e.max_chain_length=fu[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=Ur-1,e.match_available=0,e.ins_h=0}function LM(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Mp,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new It.Buf16(FM*2),this.dyn_dtree=new It.Buf16((2*PM+1)*2),this.bl_tree=new It.Buf16((2*TM+1)*2),wo(this.dyn_ltree),wo(this.dyn_dtree),wo(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new It.Buf16(CM+1),this.heap=new It.Buf16(2*Y0+1),wo(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new It.Buf16(2*Y0+1),wo(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function N4(e){var r;return!e||!e.state?_o(e,fi):(e.total_in=e.total_out=0,e.data_type=kM,r=e.state,r.pending=0,r.pending_out=0,r.wrap<0&&(r.wrap=-r.wrap),r.status=r.wrap?Hp:Jo,e.adler=r.wrap===2?0:1,r.last_flush=as,li._tr_init(r),fn)}function U4(e){var r=N4(e);return r===fn&&DM(e.state),r}function NM(e,r){return!e||!e.state||e.state.wrap!==2?fi:(e.state.gzhead=r,fn)}function M4(e,r,a,i,t,n){if(!e)return fi;var o=1;if(r===gM&&(r=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),t<1||t>_M||a!==Mp||i<8||i>15||r<0||r>9||n<0||n>xM)return _o(e,fi);i===8&&(i=9);var s=new LM;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=i,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=t+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+Ur-1)/Ur),s.window=new It.Buf8(s.w_size*2),s.head=new It.Buf16(s.hash_size),s.prev=new It.Buf16(s.w_size),s.lit_bufsize=1<<t+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new It.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=(1+2)*s.lit_bufsize,s.level=r,s.strategy=n,s.method=a,U4(e)}function UM(e,r){return M4(e,r,Mp,jM,SM,wM)}function MM(e,r){var a,i,t,n;if(!e||!e.state||r>R4||r<0)return e?_o(e,fi):fi;if(i=e.state,!e.output||!e.input&&e.avail_in!==0||i.status===Wc&&r!==jo)return _o(e,e.avail_out===0?K0:fi);if(i.strm=e,a=i.last_flush,i.last_flush=r,i.status===Hp)if(i.wrap===2)e.adler=0,Kr(i,31),Kr(i,139),Kr(i,8),i.gzhead?(Kr(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),Kr(i,i.gzhead.time&255),Kr(i,i.gzhead.time>>8&255),Kr(i,i.gzhead.time>>16&255),Kr(i,i.gzhead.time>>24&255),Kr(i,i.level===9?2:i.strategy>=Dp||i.level<2?4:0),Kr(i,i.gzhead.os&255),i.gzhead.extra&&i.gzhead.extra.length&&(Kr(i,i.gzhead.extra.length&255),Kr(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=yo(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=Z0):(Kr(i,0),Kr(i,0),Kr(i,0),Kr(i,0),Kr(i,0),Kr(i,i.level===9?2:i.strategy>=Dp||i.level<2?4:0),Kr(i,qM),i.status=Jo);else{var o=Mp+(i.w_bits-8<<4)<<8,s=-1;i.strategy>=Dp||i.level<2?s=0:i.level<6?s=1:i.level===6?s=2:s=3,o|=s<<6,i.strstart!==0&&(o|=BM),o+=31-o%31,i.status=Jo,$c(i,o),i.strstart!==0&&($c(i,e.adler>>>16),$c(i,e.adler&65535)),e.adler=1}if(i.status===Z0)if(i.gzhead.extra){for(t=i.pending;i.gzindex<(i.gzhead.extra.length&65535)&&!(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>t&&(e.adler=yo(e.adler,i.pending_buf,i.pending-t,t)),xo(e),t=i.pending,i.pending===i.pending_buf_size));)Kr(i,i.gzhead.extra[i.gzindex]&255),i.gzindex++;i.gzhead.hcrc&&i.pending>t&&(e.adler=yo(e.adler,i.pending_buf,i.pending-t,t)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=Lp)}else i.status=Lp;if(i.status===Lp)if(i.gzhead.name){t=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>t&&(e.adler=yo(e.adler,i.pending_buf,i.pending-t,t)),xo(e),t=i.pending,i.pending===i.pending_buf_size)){n=1;break}i.gzindex<i.gzhead.name.length?n=i.gzhead.name.charCodeAt(i.gzindex++)&255:n=0,Kr(i,n)}while(n!==0);i.gzhead.hcrc&&i.pending>t&&(e.adler=yo(e.adler,i.pending_buf,i.pending-t,t)),n===0&&(i.gzindex=0,i.status=Np)}else i.status=Np;if(i.status===Np)if(i.gzhead.comment){t=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>t&&(e.adler=yo(e.adler,i.pending_buf,i.pending-t,t)),xo(e),t=i.pending,i.pending===i.pending_buf_size)){n=1;break}i.gzindex<i.gzhead.comment.length?n=i.gzhead.comment.charCodeAt(i.gzindex++)&255:n=0,Kr(i,n)}while(n!==0);i.gzhead.hcrc&&i.pending>t&&(e.adler=yo(e.adler,i.pending_buf,i.pending-t,t)),n===0&&(i.status=Up)}else i.status=Up;if(i.status===Up&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&xo(e),i.pending+2<=i.pending_buf_size&&(Kr(i,e.adler&255),Kr(i,e.adler>>8&255),e.adler=0,i.status=Jo)):i.status=Jo),i.pending!==0){if(xo(e),e.avail_out===0)return i.last_flush=-1,fn}else if(e.avail_in===0&&z4(r)<=z4(a)&&r!==jo)return _o(e,K0);if(i.status===Wc&&e.avail_in!==0)return _o(e,K0);if(e.avail_in!==0||i.lookahead!==0||r!==as&&i.status!==Wc){var c=i.strategy===Dp?zM(i,r):i.strategy===yM?OM(i,r):fu[i.level].func(i,r);if((c===es||c===pu)&&(i.status=Wc),c===Xa||c===es)return e.avail_out===0&&(i.last_flush=-1),fn;if(c===Kc&&(r===dM?li._tr_align(i):r!==R4&&(li._tr_stored_block(i,0,0,!1),r===mM&&(wo(i.head),i.lookahead===0&&(i.strstart=0,i.block_start=0,i.insert=0))),xo(e),e.avail_out===0))return i.last_flush=-1,fn}return r!==jo?fn:i.wrap<=0?O4:(i.wrap===2?(Kr(i,e.adler&255),Kr(i,e.adler>>8&255),Kr(i,e.adler>>16&255),Kr(i,e.adler>>24&255),Kr(i,e.total_in&255),Kr(i,e.total_in>>8&255),Kr(i,e.total_in>>16&255),Kr(i,e.total_in>>24&255)):($c(i,e.adler>>>16),$c(i,e.adler&65535)),xo(e),i.wrap>0&&(i.wrap=-i.wrap),i.pending!==0?fn:O4)}function HM(e){var r;return!e||!e.state?fi:(r=e.state.status,r!==Hp&&r!==Z0&&r!==Lp&&r!==Np&&r!==Up&&r!==Jo&&r!==Wc?_o(e,fi):(e.state=null,r===Jo?_o(e,vM):fn))}function VM(e,r){var a=r.length,i,t,n,o,s,c,l,f;if(!e||!e.state||(i=e.state,o=i.wrap,o===2||o===1&&i.status!==Hp||i.lookahead))return fi;for(o===1&&(e.adler=D4(e.adler,r,a,0)),i.wrap=0,a>=i.w_size&&(o===0&&(wo(i.head),i.strstart=0,i.block_start=0,i.insert=0),f=new It.Buf8(i.w_size),It.arraySet(f,r,a-i.w_size,i.w_size,0),r=f,a=i.w_size),s=e.avail_in,c=e.next_in,l=e.input,e.avail_in=a,e.next_in=0,e.input=r,rs(i);i.lookahead>=Ur;){t=i.strstart,n=i.lookahead-(Ur-1);do i.ins_h=(i.ins_h<<i.hash_shift^i.window[t+Ur-1])&i.hash_mask,i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++;while(--n);i.strstart=t,i.lookahead=Ur-1,rs(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=Ur-1,i.match_available=0,e.next_in=c,e.input=l,e.avail_in=s,i.wrap=o,fn}pn.deflateInit=UM;pn.deflateInit2=M4;pn.deflateReset=U4;pn.deflateResetKeep=N4;pn.deflateSetHeader=NM;pn.deflate=MM;pn.deflateEnd=HM;pn.deflateSetDictionary=VM;pn.deflateInfo="pako deflate (from Nodeca project)"});var Q0=O(hu=>{"use strict";var Vp=On(),V4=!0,$4=!0;try{String.fromCharCode.apply(null,[0])}catch{V4=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{$4=!1}var Gc=new Vp.Buf8(256);for(Dn=0;Dn<256;Dn++)Gc[Dn]=Dn>=252?6:Dn>=248?5:Dn>=240?4:Dn>=224?3:Dn>=192?2:1;var Dn;Gc[254]=Gc[254]=1;hu.string2buf=function(e){var r,a,i,t,n,o=e.length,s=0;for(t=0;t<o;t++)a=e.charCodeAt(t),(a&64512)===55296&&t+1<o&&(i=e.charCodeAt(t+1),(i&64512)===56320&&(a=65536+(a-55296<<10)+(i-56320),t++)),s+=a<128?1:a<2048?2:a<65536?3:4;for(r=new Vp.Buf8(s),n=0,t=0;n<s;t++)a=e.charCodeAt(t),(a&64512)===55296&&t+1<o&&(i=e.charCodeAt(t+1),(i&64512)===56320&&(a=65536+(a-55296<<10)+(i-56320),t++)),a<128?r[n++]=a:a<2048?(r[n++]=192|a>>>6,r[n++]=128|a&63):a<65536?(r[n++]=224|a>>>12,r[n++]=128|a>>>6&63,r[n++]=128|a&63):(r[n++]=240|a>>>18,r[n++]=128|a>>>12&63,r[n++]=128|a>>>6&63,r[n++]=128|a&63);return r};function W4(e,r){if(r<65534&&(e.subarray&&$4||!e.subarray&&V4))return String.fromCharCode.apply(null,Vp.shrinkBuf(e,r));for(var a="",i=0;i<r;i++)a+=String.fromCharCode(e[i]);return a}hu.buf2binstring=function(e){return W4(e,e.length)};hu.binstring2buf=function(e){for(var r=new Vp.Buf8(e.length),a=0,i=r.length;a<i;a++)r[a]=e.charCodeAt(a);return r};hu.buf2string=function(e,r){var a,i,t,n,o=r||e.length,s=new Array(o*2);for(i=0,a=0;a<o;){if(t=e[a++],t<128){s[i++]=t;continue}if(n=Gc[t],n>4){s[i++]=65533,a+=n-1;continue}for(t&=n===2?31:n===3?15:7;n>1&&a<o;)t=t<<6|e[a++]&63,n--;if(n>1){s[i++]=65533;continue}t<65536?s[i++]=t:(t-=65536,s[i++]=55296|t>>10&1023,s[i++]=56320|t&1023)}return W4(s,i)};hu.utf8border=function(e,r){var a;for(r=r||e.length,r>e.length&&(r=e.length),a=r-1;a>=0&&(e[a]&192)===128;)a--;return a<0||a===0?r:a+Gc[e[a]]>r?a:r}});var X0=O((TQ,K4)=>{"use strict";function $M(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}K4.exports=$M});var Q4=O(Qc=>{"use strict";var Yc=H4(),Zc=On(),eg=Q0(),rg=zp(),WM=X0(),Z4=Object.prototype.toString,KM=0,J0=4,du=0,G4=1,Y4=2,GM=-1,YM=0,ZM=8;function ts(e){if(!(this instanceof ts))return new ts(e);this.options=Zc.assign({level:GM,method:ZM,chunkSize:16384,windowBits:15,memLevel:8,strategy:YM,to:""},e||{});var r=this.options;r.raw&&r.windowBits>0?r.windowBits=-r.windowBits:r.gzip&&r.windowBits>0&&r.windowBits<16&&(r.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new WM,this.strm.avail_out=0;var a=Yc.deflateInit2(this.strm,r.level,r.method,r.windowBits,r.memLevel,r.strategy);if(a!==du)throw new Error(rg[a]);if(r.header&&Yc.deflateSetHeader(this.strm,r.header),r.dictionary){var i;if(typeof r.dictionary=="string"?i=eg.string2buf(r.dictionary):Z4.call(r.dictionary)==="[object ArrayBuffer]"?i=new Uint8Array(r.dictionary):i=r.dictionary,a=Yc.deflateSetDictionary(this.strm,i),a!==du)throw new Error(rg[a]);this._dict_set=!0}}ts.prototype.push=function(e,r){var a=this.strm,i=this.options.chunkSize,t,n;if(this.ended)return!1;n=r===~~r?r:r===!0?J0:KM,typeof e=="string"?a.input=eg.string2buf(e):Z4.call(e)==="[object ArrayBuffer]"?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(a.avail_out===0&&(a.output=new Zc.Buf8(i),a.next_out=0,a.avail_out=i),t=Yc.deflate(a,n),t!==G4&&t!==du)return this.onEnd(t),this.ended=!0,!1;(a.avail_out===0||a.avail_in===0&&(n===J0||n===Y4))&&(this.options.to==="string"?this.onData(eg.buf2binstring(Zc.shrinkBuf(a.output,a.next_out))):this.onData(Zc.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||a.avail_out===0)&&t!==G4);return n===J0?(t=Yc.deflateEnd(this.strm),this.onEnd(t),this.ended=!0,t===du):(n===Y4&&(this.onEnd(du),a.avail_out=0),!0)};ts.prototype.onData=function(e){this.chunks.push(e)};ts.prototype.onEnd=function(e){e===du&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Zc.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function ag(e,r){var a=new ts(r);if(a.push(e,!0),a.err)throw a.msg||rg[a.err];return a.result}function QM(e,r){return r=r||{},r.raw=!0,ag(e,r)}function XM(e,r){return r=r||{},r.gzip=!0,ag(e,r)}Qc.Deflate=ts;Qc.deflate=ag;Qc.deflateRaw=QM;Qc.gzip=XM});var J4=O((CQ,X4)=>{"use strict";var $p=30,JM=12;X4.exports=function(r,a){var i,t,n,o,s,c,l,f,v,h,d,y,_,w,A,T,P,R,F,I,z,N,M,K,V;i=r.state,t=r.next_in,K=r.input,n=t+(r.avail_in-5),o=r.next_out,V=r.output,s=o-(a-r.avail_out),c=o+(r.avail_out-257),l=i.dmax,f=i.wsize,v=i.whave,h=i.wnext,d=i.window,y=i.hold,_=i.bits,w=i.lencode,A=i.distcode,T=(1<<i.lenbits)-1,P=(1<<i.distbits)-1;e:do{_<15&&(y+=K[t++]<<_,_+=8,y+=K[t++]<<_,_+=8),R=w[y&T];r:for(;;){if(F=R>>>24,y>>>=F,_-=F,F=R>>>16&255,F===0)V[o++]=R&65535;else if(F&16){I=R&65535,F&=15,F&&(_<F&&(y+=K[t++]<<_,_+=8),I+=y&(1<<F)-1,y>>>=F,_-=F),_<15&&(y+=K[t++]<<_,_+=8,y+=K[t++]<<_,_+=8),R=A[y&P];a:for(;;){if(F=R>>>24,y>>>=F,_-=F,F=R>>>16&255,F&16){if(z=R&65535,F&=15,_<F&&(y+=K[t++]<<_,_+=8,_<F&&(y+=K[t++]<<_,_+=8)),z+=y&(1<<F)-1,z>l){r.msg="invalid distance too far back",i.mode=$p;break e}if(y>>>=F,_-=F,F=o-s,z>F){if(F=z-F,F>v&&i.sane){r.msg="invalid distance too far back",i.mode=$p;break e}if(N=0,M=d,h===0){if(N+=f-F,F<I){I-=F;do V[o++]=d[N++];while(--F);N=o-z,M=V}}else if(h<F){if(N+=f+h-F,F-=h,F<I){I-=F;do V[o++]=d[N++];while(--F);if(N=0,h<I){F=h,I-=F;do V[o++]=d[N++];while(--F);N=o-z,M=V}}}else if(N+=h-F,F<I){I-=F;do V[o++]=d[N++];while(--F);N=o-z,M=V}for(;I>2;)V[o++]=M[N++],V[o++]=M[N++],V[o++]=M[N++],I-=3;I&&(V[o++]=M[N++],I>1&&(V[o++]=M[N++]))}else{N=o-z;do V[o++]=V[N++],V[o++]=V[N++],V[o++]=V[N++],I-=3;while(I>2);I&&(V[o++]=V[N++],I>1&&(V[o++]=V[N++]))}}else if(F&64){r.msg="invalid distance code",i.mode=$p;break e}else{R=A[(R&65535)+(y&(1<<F)-1)];continue a}break}}else if(F&64)if(F&32){i.mode=JM;break e}else{r.msg="invalid literal/length code",i.mode=$p;break e}else{R=w[(R&65535)+(y&(1<<F)-1)];continue r}break}}while(t<n&&o<c);I=_>>3,t-=I,_-=I<<3,y&=(1<<_)-1,r.next_in=t,r.next_out=o,r.avail_in=t<n?5+(n-t):5-(t-n),r.avail_out=o<c?257+(c-o):257-(o-c),i.hold=y,i.bits=_}});var oS=O((BQ,nS)=>{"use strict";var eS=On(),mu=15,rS=852,aS=592,tS=0,tg=1,iS=2,eH=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],rH=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],aH=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],tH=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];nS.exports=function(r,a,i,t,n,o,s,c){var l=c.bits,f=0,v=0,h=0,d=0,y=0,_=0,w=0,A=0,T=0,P=0,R,F,I,z,N,M=null,K=0,V,Z=new eS.Buf16(mu+1),$=new eS.Buf16(mu+1),Q=null,re=0,xe,me,ce;for(f=0;f<=mu;f++)Z[f]=0;for(v=0;v<t;v++)Z[a[i+v]]++;for(y=l,d=mu;d>=1&&Z[d]===0;d--);if(y>d&&(y=d),d===0)return n[o++]=1<<24|64<<16|0,n[o++]=1<<24|64<<16|0,c.bits=1,0;for(h=1;h<d&&Z[h]===0;h++);for(y<h&&(y=h),A=1,f=1;f<=mu;f++)if(A<<=1,A-=Z[f],A<0)return-1;if(A>0&&(r===tS||d!==1))return-1;for($[1]=0,f=1;f<mu;f++)$[f+1]=$[f]+Z[f];for(v=0;v<t;v++)a[i+v]!==0&&(s[$[a[i+v]]++]=v);if(r===tS?(M=Q=s,V=19):r===tg?(M=eH,K-=257,Q=rH,re-=257,V=256):(M=aH,Q=tH,V=-1),P=0,v=0,f=h,N=o,_=y,w=0,I=-1,T=1<<y,z=T-1,r===tg&&T>rS||r===iS&&T>aS)return 1;for(;;){xe=f-w,s[v]<V?(me=0,ce=s[v]):s[v]>V?(me=Q[re+s[v]],ce=M[K+s[v]]):(me=32+64,ce=0),R=1<<f-w,F=1<<_,h=F;do F-=R,n[N+(P>>w)+F]=xe<<24|me<<16|ce|0;while(F!==0);for(R=1<<f-1;P&R;)R>>=1;if(R!==0?(P&=R-1,P+=R):P=0,v++,--Z[f]===0){if(f===d)break;f=a[i+s[v]]}if(f>y&&(P&z)!==I){for(w===0&&(w=y),N+=h,_=f-w,A=1<<_;_+w<d&&(A-=Z[_+w],!(A<=0));)_++,A<<=1;if(T+=1<<_,r===tg&&T>rS||r===iS&&T>aS)return 1;I=P&z,n[I]=y<<24|_<<16|N-o|0}}return P!==0&&(n[N+P]=f-w<<24|64<<16|0),c.bits=y,0}});var US=O(zi=>{"use strict";var Qt=On(),cg=$0(),hn=W0(),iH=J4(),Xc=oS(),nH=0,BS=1,qS=2,sS=4,oH=5,Wp=6,is=0,sH=1,uH=2,pi=-2,IS=-3,lg=-4,cH=-5,uS=8,RS=1,cS=2,lS=3,fS=4,pS=5,hS=6,dS=7,mS=8,vS=9,gS=10,Yp=11,Ln=12,ig=13,bS=14,ng=15,yS=16,xS=17,wS=18,kS=19,Kp=20,Gp=21,_S=22,jS=23,SS=24,ES=25,AS=26,og=27,PS=28,TS=29,ma=30,fg=31,lH=32,fH=852,pH=592,hH=15,dH=hH;function FS(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function mH(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Qt.Buf16(320),this.work=new Qt.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function OS(e){var r;return!e||!e.state?pi:(r=e.state,e.total_in=e.total_out=r.total=0,e.msg="",r.wrap&&(e.adler=r.wrap&1),r.mode=RS,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new Qt.Buf32(fH),r.distcode=r.distdyn=new Qt.Buf32(pH),r.sane=1,r.back=-1,is)}function zS(e){var r;return!e||!e.state?pi:(r=e.state,r.wsize=0,r.whave=0,r.wnext=0,OS(e))}function DS(e,r){var a,i;return!e||!e.state||(i=e.state,r<0?(a=0,r=-r):(a=(r>>4)+1,r<48&&(r&=15)),r&&(r<8||r>15))?pi:(i.window!==null&&i.wbits!==r&&(i.window=null),i.wrap=a,i.wbits=r,zS(e))}function LS(e,r){var a,i;return e?(i=new mH,e.state=i,i.window=null,a=DS(e,r),a!==is&&(e.state=null),a):pi}function vH(e){return LS(e,dH)}var CS=!0,sg,ug;function gH(e){if(CS){var r;for(sg=new Qt.Buf32(512),ug=new Qt.Buf32(32),r=0;r<144;)e.lens[r++]=8;for(;r<256;)e.lens[r++]=9;for(;r<280;)e.lens[r++]=7;for(;r<288;)e.lens[r++]=8;for(Xc(BS,e.lens,0,288,sg,0,e.work,{bits:9}),r=0;r<32;)e.lens[r++]=5;Xc(qS,e.lens,0,32,ug,0,e.work,{bits:5}),CS=!1}e.lencode=sg,e.lenbits=9,e.distcode=ug,e.distbits=5}function NS(e,r,a,i){var t,n=e.state;return n.window===null&&(n.wsize=1<<n.wbits,n.wnext=0,n.whave=0,n.window=new Qt.Buf8(n.wsize)),i>=n.wsize?(Qt.arraySet(n.window,r,a-n.wsize,n.wsize,0),n.wnext=0,n.whave=n.wsize):(t=n.wsize-n.wnext,t>i&&(t=i),Qt.arraySet(n.window,r,a-i,t,n.wnext),i-=t,i?(Qt.arraySet(n.window,r,a-i,i,0),n.wnext=i,n.whave=n.wsize):(n.wnext+=t,n.wnext===n.wsize&&(n.wnext=0),n.whave<n.wsize&&(n.whave+=t))),0}function bH(e,r){var a,i,t,n,o,s,c,l,f,v,h,d,y,_,w=0,A,T,P,R,F,I,z,N,M=new Qt.Buf8(4),K,V,Z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return pi;a=e.state,a.mode===Ln&&(a.mode=ig),o=e.next_out,t=e.output,c=e.avail_out,n=e.next_in,i=e.input,s=e.avail_in,l=a.hold,f=a.bits,v=s,h=c,N=is;e:for(;;)switch(a.mode){case RS:if(a.wrap===0){a.mode=ig;break}for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(a.wrap&2&&l===35615){a.check=0,M[0]=l&255,M[1]=l>>>8&255,a.check=hn(a.check,M,2,0),l=0,f=0,a.mode=cS;break}if(a.flags=0,a.head&&(a.head.done=!1),!(a.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg="incorrect header check",a.mode=ma;break}if((l&15)!==uS){e.msg="unknown compression method",a.mode=ma;break}if(l>>>=4,f-=4,z=(l&15)+8,a.wbits===0)a.wbits=z;else if(z>a.wbits){e.msg="invalid window size",a.mode=ma;break}a.dmax=1<<z,e.adler=a.check=1,a.mode=l&512?gS:Ln,l=0,f=0;break;case cS:for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(a.flags=l,(a.flags&255)!==uS){e.msg="unknown compression method",a.mode=ma;break}if(a.flags&57344){e.msg="unknown header flags set",a.mode=ma;break}a.head&&(a.head.text=l>>8&1),a.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,a.check=hn(a.check,M,2,0)),l=0,f=0,a.mode=lS;case lS:for(;f<32;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.head&&(a.head.time=l),a.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,M[2]=l>>>16&255,M[3]=l>>>24&255,a.check=hn(a.check,M,4,0)),l=0,f=0,a.mode=fS;case fS:for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.head&&(a.head.xflags=l&255,a.head.os=l>>8),a.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,a.check=hn(a.check,M,2,0)),l=0,f=0,a.mode=pS;case pS:if(a.flags&1024){for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.length=l,a.head&&(a.head.extra_len=l),a.flags&512&&(M[0]=l&255,M[1]=l>>>8&255,a.check=hn(a.check,M,2,0)),l=0,f=0}else a.head&&(a.head.extra=null);a.mode=hS;case hS:if(a.flags&1024&&(d=a.length,d>s&&(d=s),d&&(a.head&&(z=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Array(a.head.extra_len)),Qt.arraySet(a.head.extra,i,n,d,z)),a.flags&512&&(a.check=hn(a.check,i,d,n)),s-=d,n+=d,a.length-=d),a.length))break e;a.length=0,a.mode=dS;case dS:if(a.flags&2048){if(s===0)break e;d=0;do z=i[n+d++],a.head&&z&&a.length<65536&&(a.head.name+=String.fromCharCode(z));while(z&&d<s);if(a.flags&512&&(a.check=hn(a.check,i,d,n)),s-=d,n+=d,z)break e}else a.head&&(a.head.name=null);a.length=0,a.mode=mS;case mS:if(a.flags&4096){if(s===0)break e;d=0;do z=i[n+d++],a.head&&z&&a.length<65536&&(a.head.comment+=String.fromCharCode(z));while(z&&d<s);if(a.flags&512&&(a.check=hn(a.check,i,d,n)),s-=d,n+=d,z)break e}else a.head&&(a.head.comment=null);a.mode=vS;case vS:if(a.flags&512){for(;f<16;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(l!==(a.check&65535)){e.msg="header crc mismatch",a.mode=ma;break}l=0,f=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),e.adler=a.check=0,a.mode=Ln;break;case gS:for(;f<32;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}e.adler=a.check=FS(l),l=0,f=0,a.mode=Yp;case Yp:if(a.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=n,e.avail_in=s,a.hold=l,a.bits=f,uH;e.adler=a.check=1,a.mode=Ln;case Ln:if(r===oH||r===Wp)break e;case ig:if(a.last){l>>>=f&7,f-=f&7,a.mode=og;break}for(;f<3;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}switch(a.last=l&1,l>>>=1,f-=1,l&3){case 0:a.mode=bS;break;case 1:if(gH(a),a.mode=Kp,r===Wp){l>>>=2,f-=2;break e}break;case 2:a.mode=xS;break;case 3:e.msg="invalid block type",a.mode=ma}l>>>=2,f-=2;break;case bS:for(l>>>=f&7,f-=f&7;f<32;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if((l&65535)!==(l>>>16^65535)){e.msg="invalid stored block lengths",a.mode=ma;break}if(a.length=l&65535,l=0,f=0,a.mode=ng,r===Wp)break e;case ng:a.mode=yS;case yS:if(d=a.length,d){if(d>s&&(d=s),d>c&&(d=c),d===0)break e;Qt.arraySet(t,i,n,d,o),s-=d,n+=d,c-=d,o+=d,a.length-=d;break}a.mode=Ln;break;case xS:for(;f<14;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(a.nlen=(l&31)+257,l>>>=5,f-=5,a.ndist=(l&31)+1,l>>>=5,f-=5,a.ncode=(l&15)+4,l>>>=4,f-=4,a.nlen>286||a.ndist>30){e.msg="too many length or distance symbols",a.mode=ma;break}a.have=0,a.mode=wS;case wS:for(;a.have<a.ncode;){for(;f<3;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.lens[Z[a.have++]]=l&7,l>>>=3,f-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,K={bits:a.lenbits},N=Xc(nH,a.lens,0,19,a.lencode,0,a.work,K),a.lenbits=K.bits,N){e.msg="invalid code lengths set",a.mode=ma;break}a.have=0,a.mode=kS;case kS:for(;a.have<a.nlen+a.ndist;){for(;w=a.lencode[l&(1<<a.lenbits)-1],A=w>>>24,T=w>>>16&255,P=w&65535,!(A<=f);){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(P<16)l>>>=A,f-=A,a.lens[a.have++]=P;else{if(P===16){for(V=A+2;f<V;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(l>>>=A,f-=A,a.have===0){e.msg="invalid bit length repeat",a.mode=ma;break}z=a.lens[a.have-1],d=3+(l&3),l>>>=2,f-=2}else if(P===17){for(V=A+3;f<V;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}l>>>=A,f-=A,z=0,d=3+(l&7),l>>>=3,f-=3}else{for(V=A+7;f<V;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}l>>>=A,f-=A,z=0,d=11+(l&127),l>>>=7,f-=7}if(a.have+d>a.nlen+a.ndist){e.msg="invalid bit length repeat",a.mode=ma;break}for(;d--;)a.lens[a.have++]=z}}if(a.mode===ma)break;if(a.lens[256]===0){e.msg="invalid code -- missing end-of-block",a.mode=ma;break}if(a.lenbits=9,K={bits:a.lenbits},N=Xc(BS,a.lens,0,a.nlen,a.lencode,0,a.work,K),a.lenbits=K.bits,N){e.msg="invalid literal/lengths set",a.mode=ma;break}if(a.distbits=6,a.distcode=a.distdyn,K={bits:a.distbits},N=Xc(qS,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,K),a.distbits=K.bits,N){e.msg="invalid distances set",a.mode=ma;break}if(a.mode=Kp,r===Wp)break e;case Kp:a.mode=Gp;case Gp:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=n,e.avail_in=s,a.hold=l,a.bits=f,iH(e,h),o=e.next_out,t=e.output,c=e.avail_out,n=e.next_in,i=e.input,s=e.avail_in,l=a.hold,f=a.bits,a.mode===Ln&&(a.back=-1);break}for(a.back=0;w=a.lencode[l&(1<<a.lenbits)-1],A=w>>>24,T=w>>>16&255,P=w&65535,!(A<=f);){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(T&&!(T&240)){for(R=A,F=T,I=P;w=a.lencode[I+((l&(1<<R+F)-1)>>R)],A=w>>>24,T=w>>>16&255,P=w&65535,!(R+A<=f);){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}l>>>=R,f-=R,a.back+=R}if(l>>>=A,f-=A,a.back+=A,a.length=P,T===0){a.mode=AS;break}if(T&32){a.back=-1,a.mode=Ln;break}if(T&64){e.msg="invalid literal/length code",a.mode=ma;break}a.extra=T&15,a.mode=_S;case _S:if(a.extra){for(V=a.extra;f<V;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.length+=l&(1<<a.extra)-1,l>>>=a.extra,f-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=jS;case jS:for(;w=a.distcode[l&(1<<a.distbits)-1],A=w>>>24,T=w>>>16&255,P=w&65535,!(A<=f);){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(!(T&240)){for(R=A,F=T,I=P;w=a.distcode[I+((l&(1<<R+F)-1)>>R)],A=w>>>24,T=w>>>16&255,P=w&65535,!(R+A<=f);){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}l>>>=R,f-=R,a.back+=R}if(l>>>=A,f-=A,a.back+=A,T&64){e.msg="invalid distance code",a.mode=ma;break}a.offset=P,a.extra=T&15,a.mode=SS;case SS:if(a.extra){for(V=a.extra;f<V;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}a.offset+=l&(1<<a.extra)-1,l>>>=a.extra,f-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){e.msg="invalid distance too far back",a.mode=ma;break}a.mode=ES;case ES:if(c===0)break e;if(d=h-c,a.offset>d){if(d=a.offset-d,d>a.whave&&a.sane){e.msg="invalid distance too far back",a.mode=ma;break}d>a.wnext?(d-=a.wnext,y=a.wsize-d):y=a.wnext-d,d>a.length&&(d=a.length),_=a.window}else _=t,y=o-a.offset,d=a.length;d>c&&(d=c),c-=d,a.length-=d;do t[o++]=_[y++];while(--d);a.length===0&&(a.mode=Gp);break;case AS:if(c===0)break e;t[o++]=a.length,c--,a.mode=Gp;break;case og:if(a.wrap){for(;f<32;){if(s===0)break e;s--,l|=i[n++]<<f,f+=8}if(h-=c,e.total_out+=h,a.total+=h,h&&(e.adler=a.check=a.flags?hn(a.check,t,h,o-h):cg(a.check,t,h,o-h)),h=c,(a.flags?l:FS(l))!==a.check){e.msg="incorrect data check",a.mode=ma;break}l=0,f=0}a.mode=PS;case PS:if(a.wrap&&a.flags){for(;f<32;){if(s===0)break e;s--,l+=i[n++]<<f,f+=8}if(l!==(a.total&4294967295)){e.msg="incorrect length check",a.mode=ma;break}l=0,f=0}a.mode=TS;case TS:N=sH;break e;case ma:N=IS;break e;case fg:return lg;case lH:default:return pi}return e.next_out=o,e.avail_out=c,e.next_in=n,e.avail_in=s,a.hold=l,a.bits=f,(a.wsize||h!==e.avail_out&&a.mode<ma&&(a.mode<og||r!==sS))&&NS(e,e.output,e.next_out,h-e.avail_out)?(a.mode=fg,lg):(v-=e.avail_in,h-=e.avail_out,e.total_in+=v,e.total_out+=h,a.total+=h,a.wrap&&h&&(e.adler=a.check=a.flags?hn(a.check,t,h,e.next_out-h):cg(a.check,t,h,e.next_out-h)),e.data_type=a.bits+(a.last?64:0)+(a.mode===Ln?128:0)+(a.mode===Kp||a.mode===ng?256:0),(v===0&&h===0||r===sS)&&N===is&&(N=cH),N)}function yH(e){if(!e||!e.state)return pi;var r=e.state;return r.window&&(r.window=null),e.state=null,is}function xH(e,r){var a;return!e||!e.state||(a=e.state,!(a.wrap&2))?pi:(a.head=r,r.done=!1,is)}function wH(e,r){var a=r.length,i,t,n;return!e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==Yp)?pi:i.mode===Yp&&(t=1,t=cg(t,r,a,0),t!==i.check)?IS:(n=NS(e,r,a,a),n?(i.mode=fg,lg):(i.havedict=1,is))}zi.inflateReset=zS;zi.inflateReset2=DS;zi.inflateResetKeep=OS;zi.inflateInit=vH;zi.inflateInit2=LS;zi.inflate=bH;zi.inflateEnd=yH;zi.inflateGetHeader=xH;zi.inflateSetDictionary=wH;zi.inflateInfo="pako inflate (from Nodeca project)"});var pg=O((IQ,MS)=>{"use strict";MS.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}});var VS=O((RQ,HS)=>{"use strict";function kH(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}HS.exports=kH});var WS=O(el=>{"use strict";var vu=US(),Jc=On(),Zp=Q0(),qa=pg(),hg=zp(),_H=X0(),jH=VS(),$S=Object.prototype.toString;function ns(e){if(!(this instanceof ns))return new ns(e);this.options=Jc.assign({chunkSize:16384,windowBits:0,to:""},e||{});var r=this.options;r.raw&&r.windowBits>=0&&r.windowBits<16&&(r.windowBits=-r.windowBits,r.windowBits===0&&(r.windowBits=-15)),r.windowBits>=0&&r.windowBits<16&&!(e&&e.windowBits)&&(r.windowBits+=32),r.windowBits>15&&r.windowBits<48&&(r.windowBits&15||(r.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new _H,this.strm.avail_out=0;var a=vu.inflateInit2(this.strm,r.windowBits);if(a!==qa.Z_OK)throw new Error(hg[a]);if(this.header=new jH,vu.inflateGetHeader(this.strm,this.header),r.dictionary&&(typeof r.dictionary=="string"?r.dictionary=Zp.string2buf(r.dictionary):$S.call(r.dictionary)==="[object ArrayBuffer]"&&(r.dictionary=new Uint8Array(r.dictionary)),r.raw&&(a=vu.inflateSetDictionary(this.strm,r.dictionary),a!==qa.Z_OK)))throw new Error(hg[a])}ns.prototype.push=function(e,r){var a=this.strm,i=this.options.chunkSize,t=this.options.dictionary,n,o,s,c,l,f=!1;if(this.ended)return!1;o=r===~~r?r:r===!0?qa.Z_FINISH:qa.Z_NO_FLUSH,typeof e=="string"?a.input=Zp.binstring2buf(e):$S.call(e)==="[object ArrayBuffer]"?a.input=new Uint8Array(e):a.input=e,a.next_in=0,a.avail_in=a.input.length;do{if(a.avail_out===0&&(a.output=new Jc.Buf8(i),a.next_out=0,a.avail_out=i),n=vu.inflate(a,qa.Z_NO_FLUSH),n===qa.Z_NEED_DICT&&t&&(n=vu.inflateSetDictionary(this.strm,t)),n===qa.Z_BUF_ERROR&&f===!0&&(n=qa.Z_OK,f=!1),n!==qa.Z_STREAM_END&&n!==qa.Z_OK)return this.onEnd(n),this.ended=!0,!1;a.next_out&&(a.avail_out===0||n===qa.Z_STREAM_END||a.avail_in===0&&(o===qa.Z_FINISH||o===qa.Z_SYNC_FLUSH))&&(this.options.to==="string"?(s=Zp.utf8border(a.output,a.next_out),c=a.next_out-s,l=Zp.buf2string(a.output,s),a.next_out=c,a.avail_out=i-c,c&&Jc.arraySet(a.output,a.output,s,c,0),this.onData(l)):this.onData(Jc.shrinkBuf(a.output,a.next_out))),a.avail_in===0&&a.avail_out===0&&(f=!0)}while((a.avail_in>0||a.avail_out===0)&&n!==qa.Z_STREAM_END);return n===qa.Z_STREAM_END&&(o=qa.Z_FINISH),o===qa.Z_FINISH?(n=vu.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===qa.Z_OK):(o===qa.Z_SYNC_FLUSH&&(this.onEnd(qa.Z_OK),a.avail_out=0),!0)};ns.prototype.onData=function(e){this.chunks.push(e)};ns.prototype.onEnd=function(e){e===qa.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Jc.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function dg(e,r){var a=new ns(r);if(a.push(e,!0),a.err)throw a.msg||hg[a.err];return a.result}function SH(e,r){return r=r||{},r.raw=!0,dg(e,r)}el.Inflate=ns;el.inflate=dg;el.inflateRaw=SH;el.ungzip=dg});var YS=O((zQ,GS)=>{"use strict";var EH=On().assign,AH=Q4(),PH=WS(),TH=pg(),KS={};EH(KS,AH,PH,TH);GS.exports=KS});var OH={};module.exports=JE(OH);var Qg=typeof process!="object"||String(process)!=="[object process]"||process.browser;var Xg={ibm866:[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,9617,9618,9619,9474,9508,9569,9570,9558,9557,9571,9553,9559,9565,9564,9563,9488,9492,9524,9516,9500,9472,9532,9566,9567,9562,9556,9577,9574,9568,9552,9580,9575,9576,9572,9573,9561,9560,9554,9555,9579,9578,9496,9484,9608,9604,9612,9616,9600,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1025,1105,1028,1108,1031,1111,1038,1118,176,8729,183,8730,8470,164,9632,160],"iso-8859-2":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,728,321,164,317,346,167,168,352,350,356,377,173,381,379,176,261,731,322,180,318,347,711,184,353,351,357,378,733,382,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],"iso-8859-3":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,294,728,163,164,null,292,167,168,304,350,286,308,173,null,379,176,295,178,179,180,181,293,183,184,305,351,287,309,189,null,380,192,193,194,null,196,266,264,199,200,201,202,203,204,205,206,207,null,209,210,211,212,288,214,215,284,217,218,219,220,364,348,223,224,225,226,null,228,267,265,231,232,233,234,235,236,237,238,239,null,241,242,243,244,289,246,247,285,249,250,251,252,365,349,729],"iso-8859-4":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,312,342,164,296,315,167,168,352,274,290,358,173,381,175,176,261,731,343,180,297,316,711,184,353,275,291,359,330,382,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,298,272,325,332,310,212,213,214,215,216,370,218,219,220,360,362,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,299,273,326,333,311,244,245,246,247,248,371,250,251,252,361,363,729],"iso-8859-5":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,173,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,8470,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,167,1118,1119],"iso-8859-6":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,null,null,164,null,null,null,null,null,null,null,1548,173,null,null,null,null,null,null,null,null,null,null,null,null,null,1563,null,null,null,1567,null,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,1591,1592,1593,1594,null,null,null,null,null,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,1615,1616,1617,1618,null,null,null,null,null,null,null,null,null,null,null,null,null],"iso-8859-7":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8216,8217,163,8364,8367,166,167,168,169,890,171,172,173,null,8213,176,177,178,179,900,901,902,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],"iso-8859-8":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,null,162,163,164,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,8215,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],"iso-8859-10":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,274,290,298,296,310,167,315,272,352,358,381,173,362,330,176,261,275,291,299,297,311,183,316,273,353,359,382,8213,363,331,256,193,194,195,196,197,198,302,268,201,280,203,278,205,206,207,208,325,332,211,212,213,214,360,216,370,218,219,220,221,222,223,257,225,226,227,228,229,230,303,269,233,281,235,279,237,238,239,240,326,333,243,244,245,246,361,248,371,250,251,252,253,254,312],"iso-8859-13":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,8221,162,163,164,8222,166,167,216,169,342,171,172,173,174,198,176,177,178,179,8220,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,8217],"iso-8859-14":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,7682,7683,163,266,267,7690,167,7808,169,7810,7691,7922,173,174,376,7710,7711,288,289,7744,7745,182,7766,7809,7767,7811,7776,7923,7812,7813,7777,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,372,209,210,211,212,213,214,7786,216,217,218,219,220,221,374,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,373,241,242,243,244,245,246,7787,248,249,250,251,252,253,375,255],"iso-8859-15":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,8364,165,352,167,353,169,170,171,172,173,174,175,176,177,178,179,381,181,182,183,382,185,186,187,338,339,376,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],"iso-8859-16":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,260,261,321,8364,8222,352,167,353,169,536,171,377,173,378,379,176,177,268,322,381,8221,182,183,382,269,537,187,338,339,376,380,192,193,194,258,196,262,198,199,200,201,202,203,204,205,206,207,272,323,210,211,212,336,214,346,368,217,218,219,220,280,538,223,224,225,226,259,228,263,230,231,232,233,234,235,236,237,238,239,273,324,242,243,244,337,246,347,369,249,250,251,252,281,539,255],"koi8-r":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,1025,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],"koi8-u":[9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9600,9604,9608,9612,9616,9617,9618,9619,8992,9632,8729,8730,8776,8804,8805,160,8993,176,178,183,247,9552,9553,9554,1105,1108,9556,1110,1111,9559,9560,9561,9562,9563,1169,1118,9566,9567,9568,9569,1025,1028,9571,1030,1031,9574,9575,9576,9577,9578,1168,1038,169,1102,1072,1073,1094,1076,1077,1092,1075,1093,1080,1081,1082,1083,1084,1085,1086,1087,1103,1088,1089,1090,1091,1078,1074,1100,1099,1079,1096,1101,1097,1095,1098,1070,1040,1041,1062,1044,1045,1060,1043,1061,1048,1049,1050,1051,1052,1053,1054,1055,1071,1056,1057,1058,1059,1046,1042,1068,1067,1047,1064,1069,1065,1063,1066],macintosh:[196,197,199,201,209,214,220,225,224,226,228,227,229,231,233,232,234,235,237,236,238,239,241,243,242,244,246,245,250,249,251,252,8224,176,162,163,167,8226,182,223,174,169,8482,180,168,8800,198,216,8734,177,8804,8805,165,181,8706,8721,8719,960,8747,170,186,937,230,248,191,161,172,8730,402,8776,8710,171,187,8230,160,192,195,213,338,339,8211,8212,8220,8221,8216,8217,247,9674,255,376,8260,8364,8249,8250,64257,64258,8225,183,8218,8222,8240,194,202,193,203,200,205,206,207,204,211,212,63743,210,218,219,217,305,710,732,175,728,729,730,184,733,731,711],"windows-874":[8364,129,130,131,132,8230,134,135,136,137,138,139,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,153,154,155,156,157,158,159,160,3585,3586,3587,3588,3589,3590,3591,3592,3593,3594,3595,3596,3597,3598,3599,3600,3601,3602,3603,3604,3605,3606,3607,3608,3609,3610,3611,3612,3613,3614,3615,3616,3617,3618,3619,3620,3621,3622,3623,3624,3625,3626,3627,3628,3629,3630,3631,3632,3633,3634,3635,3636,3637,3638,3639,3640,3641,3642,null,null,null,null,3647,3648,3649,3650,3651,3652,3653,3654,3655,3656,3657,3658,3659,3660,3661,3662,3663,3664,3665,3666,3667,3668,3669,3670,3671,3672,3673,3674,3675,null,null,null,null],"windows-1250":[8364,129,8218,131,8222,8230,8224,8225,136,8240,352,8249,346,356,381,377,144,8216,8217,8220,8221,8226,8211,8212,152,8482,353,8250,347,357,382,378,160,711,728,321,164,260,166,167,168,169,350,171,172,173,174,379,176,177,731,322,180,181,182,183,184,261,351,187,317,733,318,380,340,193,194,258,196,313,262,199,268,201,280,203,282,205,206,270,272,323,327,211,212,336,214,215,344,366,218,368,220,221,354,223,341,225,226,259,228,314,263,231,269,233,281,235,283,237,238,271,273,324,328,243,244,337,246,247,345,367,250,369,252,253,355,729],"windows-1251":[1026,1027,8218,1107,8222,8230,8224,8225,8364,8240,1033,8249,1034,1036,1035,1039,1106,8216,8217,8220,8221,8226,8211,8212,152,8482,1113,8250,1114,1116,1115,1119,160,1038,1118,1032,164,1168,166,167,1025,169,1028,171,172,173,174,1031,176,177,1030,1110,1169,181,182,183,1105,8470,1108,187,1112,1029,1109,1111,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103],"windows-1252":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255],"windows-1253":[8364,129,8218,402,8222,8230,8224,8225,136,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,157,158,159,160,901,902,163,164,165,166,167,168,169,null,171,172,173,174,8213,176,177,178,179,900,181,182,183,904,905,906,187,908,189,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,null,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,null],"windows-1254":[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,286,209,210,211,212,213,214,215,216,217,218,219,220,304,350,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,287,241,242,243,244,245,246,247,248,249,250,251,252,305,351,255],"windows-1255":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,140,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,156,157,158,159,160,161,162,163,8362,165,166,167,168,169,215,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,247,187,188,189,190,191,1456,1457,1458,1459,1460,1461,1462,1463,1464,1465,1466,1467,1468,1469,1470,1471,1472,1473,1474,1475,1520,1521,1522,1523,1524,null,null,null,null,null,null,null,1488,1489,1490,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1510,1511,1512,1513,1514,null,null,8206,8207,null],"windows-1256":[8364,1662,8218,402,8222,8230,8224,8225,710,8240,1657,8249,338,1670,1688,1672,1711,8216,8217,8220,8221,8226,8211,8212,1705,8482,1681,8250,339,8204,8205,1722,160,1548,162,163,164,165,166,167,168,169,1726,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,1563,187,188,189,190,1567,1729,1569,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580,1581,1582,1583,1584,1585,1586,1587,1588,1589,1590,215,1591,1592,1593,1594,1600,1601,1602,1603,224,1604,226,1605,1606,1607,1608,231,232,233,234,235,1609,1610,238,239,1611,1612,1613,1614,244,1615,1616,247,1617,249,1618,251,252,8206,8207,1746],"windows-1257":[8364,129,8218,131,8222,8230,8224,8225,136,8240,138,8249,140,168,711,184,144,8216,8217,8220,8221,8226,8211,8212,152,8482,154,8250,156,175,731,159,160,null,162,163,164,null,166,167,216,169,342,171,172,173,174,198,176,177,178,179,180,181,182,183,248,185,343,187,188,189,190,230,260,302,256,262,196,197,280,274,268,201,377,278,290,310,298,315,352,323,325,211,332,213,214,215,370,321,346,362,220,379,381,223,261,303,257,263,228,229,281,275,269,233,378,279,291,311,299,316,353,324,326,243,333,245,246,247,371,322,347,363,252,380,382,729],"windows-1258":[8364,129,8218,402,8222,8230,8224,8225,710,8240,138,8249,338,141,142,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,154,8250,339,157,158,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,258,196,197,198,199,200,201,202,203,768,205,206,207,272,209,777,211,212,416,214,215,216,217,218,219,220,431,771,223,224,225,226,259,228,229,230,231,232,233,234,235,769,237,238,239,273,241,803,243,244,417,246,247,248,249,250,251,252,432,8363,255],"x-mac-cyrillic":[1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,8224,176,1168,163,167,8226,182,1030,174,169,8482,1026,1106,8800,1027,1107,8734,177,8804,8805,1110,181,1169,1032,1028,1108,1031,1111,1033,1113,1034,1114,1112,1029,172,8730,402,8776,8710,171,187,8230,160,1035,1115,1036,1116,1109,8211,8212,8220,8221,8216,8217,247,8222,1038,1118,1039,1119,8470,1025,1105,1103,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,8364]};globalThis["encoding-indexes"]=Xg||{};function jr(e,r,a){return r<=e&&e<=a}function e9(e,r){return e.indexOf(r)!==-1}var gn=Math.floor;function xl(e){if(e===void 0)return{};if(e===Object(e))return e;throw TypeError("Could not convert argument to dictionary")}function r9(e){for(var r=String(e),a=r.length,i=0,t=[];i<a;){var n=r.charCodeAt(i);if(n<55296||n>57343)t.push(n);else if(56320<=n&&n<=57343)t.push(65533);else if(55296<=n&&n<=56319)if(i===a-1)t.push(65533);else{var o=r.charCodeAt(i+1);if(56320<=o&&o<=57343){var s=n&1023,c=o&1023;t.push(65536+(s<<10)+c),i+=1}else t.push(65533)}i+=1}return t}function a9(e){for(var r="",a=0;a<e.length;++a){var i=e[a];i<=65535?r+=String.fromCharCode(i):(i-=65536,r+=String.fromCharCode((i>>10)+55296,(i&1023)+56320))}return r}function Jt(e){return 0<=e&&e<=127}var Xt=Jt,Lr=-1;function vh(e){this.tokens=[].slice.call(e),this.tokens.reverse()}vh.prototype={endOfStream:function(){return!this.tokens.length},read:function(){return this.tokens.length?this.tokens.pop():Lr},prepend:function(e){if(Array.isArray(e))for(var r=e;r.length;)this.tokens.push(r.pop());else this.tokens.push(e)},push:function(e){if(Array.isArray(e))for(var r=e;r.length;)this.tokens.unshift(r.shift());else this.tokens.unshift(e)}};var ia=-1;function Dr(e,r){if(e)throw TypeError("Decoder error");return r||65533}function gi(e){throw TypeError("The code point "+e+" could not be encoded.")}function t9(){}t9.prototype={handler:function(e,r){}};function i9(){}i9.prototype={handler:function(e,r){}};function dh(e){return e=String(e).trim().toLowerCase(),Object.prototype.hasOwnProperty.call(mh,e)?mh[e]:null}var Jg=[{encodings:[{labels:["unicode-1-1-utf-8","utf-8","utf8"],name:"UTF-8"}],heading:"The Encoding"},{encodings:[{labels:["866","cp866","csibm866","ibm866"],name:"IBM866"},{labels:["csisolatin2","iso-8859-2","iso-ir-101","iso8859-2","iso88592","iso_8859-2","iso_8859-2:1987","l2","latin2"],name:"ISO-8859-2"},{labels:["csisolatin3","iso-8859-3","iso-ir-109","iso8859-3","iso88593","iso_8859-3","iso_8859-3:1988","l3","latin3"],name:"ISO-8859-3"},{labels:["csisolatin4","iso-8859-4","iso-ir-110","iso8859-4","iso88594","iso_8859-4","iso_8859-4:1988","l4","latin4"],name:"ISO-8859-4"},{labels:["csisolatincyrillic","cyrillic","iso-8859-5","iso-ir-144","iso8859-5","iso88595","iso_8859-5","iso_8859-5:1988"],name:"ISO-8859-5"},{labels:["arabic","asmo-708","csiso88596e","csiso88596i","csisolatinarabic","ecma-114","iso-8859-6","iso-8859-6-e","iso-8859-6-i","iso-ir-127","iso8859-6","iso88596","iso_8859-6","iso_8859-6:1987"],name:"ISO-8859-6"},{labels:["csisolatingreek","ecma-118","elot_928","greek","greek8","iso-8859-7","iso-ir-126","iso8859-7","iso88597","iso_8859-7","iso_8859-7:1987","sun_eu_greek"],name:"ISO-8859-7"},{labels:["csiso88598e","csisolatinhebrew","hebrew","iso-8859-8","iso-8859-8-e","iso-ir-138","iso8859-8","iso88598","iso_8859-8","iso_8859-8:1988","visual"],name:"ISO-8859-8"},{labels:["csiso88598i","iso-8859-8-i","logical"],name:"ISO-8859-8-I"},{labels:["csisolatin6","iso-8859-10","iso-ir-157","iso8859-10","iso885910","l6","latin6"],name:"ISO-8859-10"},{labels:["iso-8859-13","iso8859-13","iso885913"],name:"ISO-8859-13"},{labels:["iso-8859-14","iso8859-14","iso885914"],name:"ISO-8859-14"},{labels:["csisolatin9","iso-8859-15","iso8859-15","iso885915","iso_8859-15","l9"],name:"ISO-8859-15"},{labels:["iso-8859-16"],name:"ISO-8859-16"},{labels:["cskoi8r","koi","koi8","koi8-r","koi8_r"],name:"KOI8-R"},{labels:["koi8-ru","koi8-u"],name:"KOI8-U"},{labels:["csmacintosh","mac","macintosh","x-mac-roman"],name:"macintosh"},{labels:["dos-874","iso-8859-11","iso8859-11","iso885911","tis-620","windows-874"],name:"windows-874"},{labels:["cp1250","windows-1250","x-cp1250"],name:"windows-1250"},{labels:["cp1251","windows-1251","x-cp1251"],name:"windows-1251"},{labels:["ansi_x3.4-1968","ascii","cp1252","cp819","csisolatin1","ibm819","iso-8859-1","iso-ir-100","iso8859-1","iso88591","iso_8859-1","iso_8859-1:1987","l1","latin1","us-ascii","windows-1252","x-cp1252"],name:"windows-1252"},{labels:["cp1253","windows-1253","x-cp1253"],name:"windows-1253"},{labels:["cp1254","csisolatin5","iso-8859-9","iso-ir-148","iso8859-9","iso88599","iso_8859-9","iso_8859-9:1989","l5","latin5","windows-1254","x-cp1254"],name:"windows-1254"},{labels:["cp1255","windows-1255","x-cp1255"],name:"windows-1255"},{labels:["cp1256","windows-1256","x-cp1256"],name:"windows-1256"},{labels:["cp1257","windows-1257","x-cp1257"],name:"windows-1257"},{labels:["cp1258","windows-1258","x-cp1258"],name:"windows-1258"},{labels:["x-mac-cyrillic","x-mac-ukrainian"],name:"x-mac-cyrillic"}],heading:"Legacy single-byte encodings"},{encodings:[{labels:["chinese","csgb2312","csiso58gb231280","gb2312","gb_2312","gb_2312-80","gbk","iso-ir-58","x-gbk"],name:"GBK"},{labels:["gb18030"],name:"gb18030"}],heading:"Legacy multi-byte Chinese (simplified) encodings"},{encodings:[{labels:["big5","big5-hkscs","cn-big5","csbig5","x-x-big5"],name:"Big5"}],heading:"Legacy multi-byte Chinese (traditional) encodings"},{encodings:[{labels:["cseucpkdfmtjapanese","euc-jp","x-euc-jp"],name:"EUC-JP"},{labels:["csiso2022jp","iso-2022-jp"],name:"ISO-2022-JP"},{labels:["csshiftjis","ms932","ms_kanji","shift-jis","shift_jis","sjis","windows-31j","x-sjis"],name:"Shift_JIS"}],heading:"Legacy multi-byte Japanese encodings"},{encodings:[{labels:["cseuckr","csksc56011987","euc-kr","iso-ir-149","korean","ks_c_5601-1987","ks_c_5601-1989","ksc5601","ksc_5601","windows-949"],name:"EUC-KR"}],heading:"Legacy multi-byte Korean encodings"},{encodings:[{labels:["csiso2022kr","hz-gb-2312","iso-2022-cn","iso-2022-cn-ext","iso-2022-kr"],name:"replacement"},{labels:["utf-16be"],name:"UTF-16BE"},{labels:["utf-16","utf-16le"],name:"UTF-16LE"},{labels:["x-user-defined"],name:"x-user-defined"}],heading:"Legacy miscellaneous encodings"}],mh={};Jg.forEach(function(e){e.encodings.forEach(function(r){r.labels.forEach(function(a){mh[a]=r})})});var Ot={},zt={};function hs(e,r){return r&&r[e]||null}function ds(e,r){var a=r.indexOf(e);return a===-1?null:a}function At(e){if(!("encoding-indexes"in globalThis))throw Error("Indexes missing. Did you forget to include encoding-indexes.js first?");return globalThis["encoding-indexes"][e]}function n9(e){if(e>39419&&e<189e3||e>1237575)return null;if(e===7457)return 59335;var r=0,a=0,i=At("gb18030-ranges"),t;for(t=0;t<i.length;++t){var n=i[t];if(n[0]<=e)r=n[0],a=n[1];else break}return a+e-r}function o9(e){if(e===59335)return 7457;var r=0,a=0,i=At("gb18030-ranges"),t;for(t=0;t<i.length;++t){var n=i[t];if(n[1]<=e)r=n[1],a=n[0];else break}return a+e-r}function s9(e){ph=ph||At("jis0208").map(function(a,i){return jr(i,8272,8835)?null:a});var r=ph;return r.indexOf(e)}var ph;function u9(e){hh=hh||At("big5").map(function(a,i){return i<(161-129)*157?null:a});var r=hh;return e===9552||e===9566||e===9569||e===9578||e===21313||e===21317?r.lastIndexOf(e):ds(e,r)}var hh,eb="utf-8";function Co(e,r){if(!(this instanceof Co))throw TypeError("Called as a function. Did you forget 'new'?");e=e!==void 0?String(e):eb,r=xl(r),this._encoding=null,this._decoder=null,this._ignoreBOM=!1,this._BOMseen=!1,this._error_mode="replacement",this._do_not_flush=!1;var a=dh(e);if(a===null||a.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!zt[a.name])throw Error("Decoder not present. Did you forget to include encoding-indexes.js first?");var i=this;return i._encoding=a,Boolean(r.fatal)&&(i._error_mode="fatal"),Boolean(r.ignoreBOM)&&(i._ignoreBOM=!0),Object.defineProperty||(this.encoding=i._encoding.name.toLowerCase(),this.fatal=i._error_mode==="fatal",this.ignoreBOM=i._ignoreBOM),i}Object.defineProperty&&(Object.defineProperty(Co.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}}),Object.defineProperty(Co.prototype,"fatal",{get:function(){return this._error_mode==="fatal"}}),Object.defineProperty(Co.prototype,"ignoreBOM",{get:function(){return this._ignoreBOM}}));Co.prototype.decode=function(r,a){var i;typeof r=="object"&&r instanceof ArrayBuffer?i=new Uint8Array(r):typeof r=="object"&&"buffer"in r&&r.buffer instanceof ArrayBuffer?i=new Uint8Array(r.buffer,r.byteOffset,r.byteLength):i=new Uint8Array(0),a=xl(a),this._do_not_flush||(this._decoder=zt[this._encoding.name]({fatal:this._error_mode==="fatal"}),this._BOMseen=!1),this._do_not_flush=Boolean(a.stream);for(var t=new vh(i),n=[],o;;){var s=t.read();if(s===Lr||(o=this._decoder.handler(t,s),o===ia))break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}if(!this._do_not_flush){do{if(o=this._decoder.handler(t,t.read()),o===ia)break;o!==null&&(Array.isArray(o)?n.push.apply(n,o):n.push(o))}while(!t.endOfStream());this._decoder=null}function c(l){return e9(["UTF-8","UTF-16LE","UTF-16BE"],this._encoding.name)&&!this._ignoreBOM&&!this._BOMseen&&(l.length>0&&l[0]===65279?(this._BOMseen=!0,l.shift()):l.length>0&&(this._BOMseen=!0)),a9(l)}return c.call(this,n)};function Su(e,r){if(!(this instanceof Su))throw TypeError("Called as a function. Did you forget 'new'?");r=xl(r),this._encoding=null,this._encoder=null,this._do_not_flush=!1,this._fatal=Boolean(r.fatal)?"fatal":"replacement";var a=this;if(Boolean(r.NONSTANDARD_allowLegacyEncoding)){e=e!==void 0?String(e):eb;var i=dh(e);if(i===null||i.name==="replacement")throw RangeError("Unknown encoding: "+e);if(!Ot[i.name])throw Error("Encoder not present. Did you forget to include encoding-indexes.js first?");a._encoding=i}else a._encoding=dh("utf-8"),e!==void 0&&"console"in globalThis&&console.warn("TextEncoder constructor called with encoding label, which is ignored.");return Object.defineProperty||(this.encoding=a._encoding.name.toLowerCase()),a}Object.defineProperty&&Object.defineProperty(Su.prototype,"encoding",{get:function(){return this._encoding.name.toLowerCase()}});Su.prototype.encode=function(r,a){r=r===void 0?"":String(r),a=xl(a),this._do_not_flush||(this._encoder=Ot[this._encoding.name]({fatal:this._fatal==="fatal"})),this._do_not_flush=Boolean(a.stream);for(var i=new vh(r9(r)),t=[],n;;){var o=i.read();if(o===Lr||(n=this._encoder.handler(i,o),n===ia))break;Array.isArray(n)?t.push.apply(t,n):t.push(n)}if(!this._do_not_flush){for(;n=this._encoder.handler(i,i.read()),n!==ia;)Array.isArray(n)?t.push.apply(t,n):t.push(n);this._encoder=null}return new Uint8Array(t)};function c9(e){var r=e.fatal,a=0,i=0,t=0,n=128,o=191;this.handler=function(s,c){if(c===Lr&&t!==0)return t=0,Dr(r);if(c===Lr)return ia;if(t===0){if(jr(c,0,127))return c;if(jr(c,194,223))t=1,a=c&31;else if(jr(c,224,239))c===224&&(n=160),c===237&&(o=159),t=2,a=c&15;else if(jr(c,240,244))c===240&&(n=144),c===244&&(o=143),t=3,a=c&7;else return Dr(r);return null}if(!jr(c,n,o))return a=t=i=0,n=128,o=191,s.prepend(c),Dr(r);if(n=128,o=191,a=a<<6|c&63,i+=1,i!==t)return null;var l=a;return a=t=i=0,l}}function l9(e){var r=e.fatal;this.handler=function(a,i){if(i===Lr)return ia;if(Xt(i))return i;var t,n;jr(i,128,2047)?(t=1,n=192):jr(i,2048,65535)?(t=2,n=224):jr(i,65536,1114111)&&(t=3,n=240);for(var o=[(i>>6*t)+n];t>0;){var s=i>>6*(t-1);o.push(128|s&63),t-=1}return o}}Ot["UTF-8"]=function(e){return new l9(e)};zt["UTF-8"]=function(e){return new c9(e)};function f9(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Lr)return ia;if(Jt(t))return t;var n=e[t-128];return n===null?Dr(a):n}}function p9(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Lr)return ia;if(Xt(t))return t;var n=ds(t,e);return n===null&&gi(t),n+128}}(function(){"encoding-indexes"in globalThis&&Jg.forEach(function(e){e.heading==="Legacy single-byte encodings"&&e.encodings.forEach(function(r){var a=r.name,i=At(a.toLowerCase());zt[a]=function(t){return new f9(i,t)},Ot[a]=function(t){return new p9(i,t)}})})})();zt.GBK=function(e){return new rb(e)};Ot.GBK=function(e){return new ab(e,!0)};function rb(e){var r=e.fatal,a=0,i=0,t=0;this.handler=function(n,o){if(o===Lr&&a===0&&i===0&&t===0)return ia;o===Lr&&(a!==0||i!==0||t!==0)&&(a=0,i=0,t=0,Dr(r));var s;if(t!==0){s=null,jr(o,48,57)&&(s=n9((((a-129)*10+i-48)*126+t-129)*10+o-48));var c=[i,t,o];return a=0,i=0,t=0,s===null?(n.prepend(c),Dr(r)):s}if(i!==0)return jr(o,129,254)?(t=o,null):(n.prepend([i,o]),a=0,i=0,Dr(r));if(a!==0){if(jr(o,48,57))return i=o,null;var l=a,f=null;a=0;var v=o<127?64:65;return(jr(o,64,126)||jr(o,128,254))&&(f=(l-129)*190+(o-v)),s=f===null?null:hs(f,At("gb18030")),s===null&&Jt(o)&&n.prepend(o),s===null?Dr(r):s}return Jt(o)?o:o===128?8364:jr(o,129,254)?(a=o,null):Dr(r)}}function ab(e,r){var a=e.fatal;this.handler=function(i,t){if(t===Lr)return ia;if(Xt(t))return t;if(t===58853)return gi(t);if(r&&t===8364)return 128;var n=ds(t,At("gb18030"));if(n!==null){var o=gn(n/190)+129,s=n%190,c=s<63?64:65;return[o,s+c]}if(r)return gi(t);n=o9(t);var l=gn(n/10/126/10);n=n-l*10*126*10;var f=gn(n/10/126);n=n-f*10*126;var v=gn(n/10),h=n-v*10;return[l+129,f+48,v+129,h+48]}}Ot.gb18030=function(e){return new ab(e)};zt.gb18030=function(e){return new rb(e)};function h9(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Lr&&a!==0)return a=0,Dr(r);if(t===Lr&&a===0)return ia;if(a!==0){var n=a,o=null;a=0;var s=t<127?64:98;switch((jr(t,64,126)||jr(t,161,254))&&(o=(n-129)*157+(t-s)),o){case 1133:return[202,772];case 1135:return[202,780];case 1164:return[234,772];case 1166:return[234,780]}var c=o===null?null:hs(o,At("big5"));return c===null&&Jt(t)&&i.prepend(t),c===null?Dr(r):c}return Jt(t)?t:jr(t,129,254)?(a=t,null):Dr(r)}}function d9(e){var r=e.fatal;this.handler=function(a,i){if(i===Lr)return ia;if(Xt(i))return i;var t=u9(i);if(t===null)return gi(i);var n=gn(t/157)+129;if(n<161)return gi(i);var o=t%157,s=o<63?64:98;return[n,o+s]}}Ot.Big5=function(e){return new d9(e)};zt.Big5=function(e){return new h9(e)};function m9(e){var r=e.fatal,a=!1,i=0;this.handler=function(t,n){if(n===Lr&&i!==0)return i=0,Dr(r);if(n===Lr&&i===0)return ia;if(i===142&&jr(n,161,223))return i=0,65377-161+n;if(i===143&&jr(n,161,254))return a=!0,i=n,null;if(i!==0){var o=i;i=0;var s=null;return jr(o,161,254)&&jr(n,161,254)&&(s=hs((o-161)*94+(n-161),At(a?"jis0212":"jis0208"))),a=!1,jr(n,161,254)||t.prepend(n),s===null?Dr(r):s}return Jt(n)?n:n===142||n===143||jr(n,161,254)?(i=n,null):Dr(r)}}function v9(e){var r=e.fatal;this.handler=function(a,i){if(i===Lr)return ia;if(Xt(i))return i;if(i===165)return 92;if(i===8254)return 126;if(jr(i,65377,65439))return[142,i-65377+161];i===8722&&(i=65293);var t=ds(i,At("jis0208"));if(t===null)return gi(i);var n=gn(t/94)+161,o=t%94+161;return[n,o]}}Ot["EUC-JP"]=function(e){return new v9(e)};zt["EUC-JP"]=function(e){return new m9(e)};function g9(e){var r=e.fatal,a={ASCII:0,Roman:1,Katakana:2,LeadByte:3,TrailByte:4,EscapeStart:5,Escape:6},i=a.ASCII,t=a.ASCII,n=0,o=!1;this.handler=function(s,c){switch(i){default:case a.ASCII:return c===27?(i=a.EscapeStart,null):jr(c,0,127)&&c!==14&&c!==15&&c!==27?(o=!1,c):c===Lr?ia:(o=!1,Dr(r));case a.Roman:return c===27?(i=a.EscapeStart,null):c===92?(o=!1,165):c===126?(o=!1,8254):jr(c,0,127)&&c!==14&&c!==15&&c!==27&&c!==92&&c!==126?(o=!1,c):c===Lr?ia:(o=!1,Dr(r));case a.Katakana:return c===27?(i=a.EscapeStart,null):jr(c,33,95)?(o=!1,65377-33+c):c===Lr?ia:(o=!1,Dr(r));case a.LeadByte:return c===27?(i=a.EscapeStart,null):jr(c,33,126)?(o=!1,n=c,i=a.TrailByte,null):c===Lr?ia:(o=!1,Dr(r));case a.TrailByte:if(c===27)return i=a.EscapeStart,Dr(r);if(jr(c,33,126)){i=a.LeadByte;var l=(n-33)*94+c-33,f=hs(l,At("jis0208"));return f===null?Dr(r):f}return c===Lr?(i=a.LeadByte,s.prepend(c),Dr(r)):(i=a.LeadByte,Dr(r));case a.EscapeStart:return c===36||c===40?(n=c,i=a.Escape,null):(s.prepend(c),o=!1,i=t,Dr(r));case a.Escape:var v=n;n=0;var h=null;if(v===40&&c===66&&(h=a.ASCII),v===40&&c===74&&(h=a.Roman),v===40&&c===73&&(h=a.Katakana),v===36&&(c===64||c===66)&&(h=a.LeadByte),h!==null){i=i=h;var d=o;return o=!0,d?Dr(r):null}return s.prepend([v,c]),o=!1,i=t,Dr(r)}}}function b9(e){var r=e.fatal,a={ASCII:0,Roman:1,jis0208:2},i=a.ASCII;this.handler=function(t,n){if(n===Lr&&i!==a.ASCII)return t.prepend(n),i=a.ASCII,[27,40,66];if(n===Lr&&i===a.ASCII)return ia;if((i===a.ASCII||i===a.Roman)&&(n===14||n===15||n===27))return gi(65533);if(i===a.ASCII&&Xt(n))return n;if(i===a.Roman&&(Xt(n)&&n!==92&&n!==126||n==165||n==8254)){if(Xt(n))return n;if(n===165)return 92;if(n===8254)return 126}if(Xt(n)&&i!==a.ASCII)return t.prepend(n),i=a.ASCII,[27,40,66];if((n===165||n===8254)&&i!==a.Roman)return t.prepend(n),i=a.Roman,[27,40,74];n===8722&&(n=65293);var o=ds(n,At("jis0208"));if(o===null)return gi(n);if(i!==a.jis0208)return t.prepend(n),i=a.jis0208,[27,36,66];var s=gn(o/94)+33,c=o%94+33;return[s,c]}}Ot["ISO-2022-JP"]=function(e){return new b9(e)};zt["ISO-2022-JP"]=function(e){return new g9(e)};function y9(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Lr&&a!==0)return a=0,Dr(r);if(t===Lr&&a===0)return ia;if(a!==0){var n=a,o=null;a=0;var s=t<127?64:65,c=n<160?129:193;if((jr(t,64,126)||jr(t,128,252))&&(o=(n-c)*188+t-s),jr(o,8836,10715))return 57344-8836+o;var l=o===null?null:hs(o,At("jis0208"));return l===null&&Jt(t)&&i.prepend(t),l===null?Dr(r):l}return Jt(t)||t===128?t:jr(t,161,223)?65377-161+t:jr(t,129,159)||jr(t,224,252)?(a=t,null):Dr(r)}}function x9(e){var r=e.fatal;this.handler=function(a,i){if(i===Lr)return ia;if(Xt(i)||i===128)return i;if(i===165)return 92;if(i===8254)return 126;if(jr(i,65377,65439))return i-65377+161;i===8722&&(i=65293);var t=s9(i);if(t===null)return gi(i);var n=gn(t/188),o=n<31?129:193,s=t%188,c=s<63?64:65;return[n+o,s+c]}}Ot.Shift_JIS=function(e){return new x9(e)};zt.Shift_JIS=function(e){return new y9(e)};function w9(e){var r=e.fatal,a=0;this.handler=function(i,t){if(t===Lr&&a!==0)return a=0,Dr(r);if(t===Lr&&a===0)return ia;if(a!==0){var n=a,o=null;a=0,jr(t,65,254)&&(o=(n-129)*190+(t-65));var s=o===null?null:hs(o,At("euc-kr"));return o===null&&Jt(t)&&i.prepend(t),s===null?Dr(r):s}return Jt(t)?t:jr(t,129,254)?(a=t,null):Dr(r)}}function k9(e){var r=e.fatal;this.handler=function(a,i){if(i===Lr)return ia;if(Xt(i))return i;var t=ds(i,At("euc-kr"));if(t===null)return gi(i);var n=gn(t/190)+129,o=t%190+65;return[n,o]}}Ot["EUC-KR"]=function(e){return new k9(e)};zt["EUC-KR"]=function(e){return new w9(e)};function yl(e,r){var a=e>>8,i=e&255;return r?[a,i]:[i,a]}function tb(e,r){var a=r.fatal,i=null,t=null;this.handler=function(n,o){if(o===Lr&&(i!==null||t!==null))return Dr(a);if(o===Lr&&i===null&&t===null)return ia;if(i===null)return i=o,null;var s;if(e?s=(i<<8)+o:s=(o<<8)+i,i=null,t!==null){var c=t;return t=null,jr(s,56320,57343)?65536+(c-55296)*1024+(s-56320):(n.prepend(yl(s,e)),Dr(a))}return jr(s,55296,56319)?(t=s,null):jr(s,56320,57343)?Dr(a):s}}function ib(e,r){var a=r.fatal;this.handler=function(i,t){if(t===Lr)return ia;if(jr(t,0,65535))return yl(t,e);var n=yl((t-65536>>10)+55296,e),o=yl((t-65536&1023)+56320,e);return n.concat(o)}}Ot["UTF-16BE"]=function(e){return new ib(!0,e)};zt["UTF-16BE"]=function(e){return new tb(!0,e)};Ot["UTF-16LE"]=function(e){return new ib(!1,e)};zt["UTF-16LE"]=function(e){return new tb(!1,e)};function _9(e){var r=e.fatal;this.handler=function(a,i){return i===Lr?ia:Jt(i)?i:63360+i-128}}function j9(e){var r=e.fatal;this.handler=function(a,i){return i===Lr?ia:Xt(i)?i:jr(i,63360,63487)?i-63360+128:gi(i)}}Ot["x-user-defined"]=function(e){return new j9(e)};zt["x-user-defined"]=function(e){return new _9(e)};function Eu(e){return Buffer.from(e).toString("base64")}function gh(e){return Buffer.from(e,"base64").toString("ascii")}var ex=Ja(Xy(),1),rx=Ja(Iu(),1);function Jy(e){return Buffer.isBuffer(e)?new Uint8Array(e).buffer:e}function D7(e,r){let a=r.type?r.type.replace("image/",""):"jpeg",i=(0,rx.default)(e.data,[e.width,e.height,4],[4,e.width*4,1],0);return(0,ex.default)(i,a,r)}function ax(e,r){let a=D7(e,r);return new Promise(i=>{let t=[];a.on("data",n=>t.push(n)),a.on("end",()=>{let n=Buffer.concat(t);i(Jy(n))})})}var R5=Ja(I5(),1),b0=["image/png","image/jpeg","image/gif"];async function y0(e,r){if(!r)throw new Error("MIMEType is required to parse image under Node.js");let a=e instanceof Buffer?e:Buffer.from(e);return await ZN(a,r)}function ZN(e,r){return new Promise(a=>(0,R5.default)(e,r,(i,t)=>{if(i)throw i;let n=[...t.shape],o=t.shape.length===4?t.shape.shift():1,s=t.data instanceof Buffer?new Uint8Array(t.data):t.data;a({shape:n,data:s,width:t.shape[0],height:t.shape[1],components:t.shape[2],layers:o?[o]:[]})}))}var sn={self:typeof self<"u"&&self,window:typeof window<"u"&&window,global:typeof global<"u"&&global,document:typeof document<"u"&&document},z5=sn.self||sn.window||sn.global||{},D5=sn.window||sn.self||sn.global||{},L5=sn.global||sn.self||sn.window||{},N5=sn.document||{};var Ii=Boolean(typeof process!="object"||String(process)!=="[object process]"||process.browser);var O5=typeof process<"u"&&process.version&&/v([0-9]*)/.exec(process.version),QN=O5&&parseFloat(O5[1])||0;function x0(e,r,a){if(a=a||e.byteLength,e.byteLength<a||r.byteLength<a)return!1;let i=new Uint8Array(e),t=new Uint8Array(r);for(let n=0;n<i.length;++n)if(i[n]!==t[n])return!1;return!0}function vp(...e){return U5(e)}function U5(e){let r=e.map(n=>n instanceof ArrayBuffer?new Uint8Array(n):n),a=r.reduce((n,o)=>n+o.byteLength,0),i=new Uint8Array(a),t=0;for(let n of r)i.set(n,t),t+=n.byteLength;return i.buffer}async function Fc(e){let r=[];for await(let a of e)r.push(a);return vp(...r)}var XN="",M5={};function Cc(e){for(let r in M5)if(e.startsWith(r)){let a=M5[r];e=e.replace(r,a)}return!e.startsWith("http://")&&!e.startsWith("https://")&&(e=`${XN}${e}`),e}function H5(e){return Buffer.isBuffer(e)?new Uint8Array(e.buffer,e.byteOffset,e.length).slice().buffer:e}function V5(e){return e&&typeof e=="object"&&e.isBuffer}function nu(e){if(V5(e))return H5(e);if(e instanceof ArrayBuffer)return e;if(ArrayBuffer.isView(e))return e.byteOffset===0&&e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);if(typeof e=="string"){let r=e;return new TextEncoder().encode(r).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error("toArrayBuffer")}function ou(e){return r=>new Promise((a,i)=>e(r,(t,n)=>t?i(t):a(n)))}var un={};XE(un,{dirname:()=>rU,filename:()=>eU,join:()=>aU,resolve:()=>tU});function $5(){var r;if(typeof process<"u"&&typeof process.cwd<"u")return process.cwd();let e=(r=window.location)==null?void 0:r.pathname;return(e==null?void 0:e.slice(0,e.lastIndexOf("/")+1))||""}function eU(e){let r=e?e.lastIndexOf("/"):-1;return r>=0?e.substr(r+1):""}function rU(e){let r=e?e.lastIndexOf("/"):-1;return r>=0?e.substr(0,r):""}function aU(...e){let r="/";return e=e.map((a,i)=>(i&&(a=a.replace(new RegExp(`^${r}`),"")),i!==e.length-1&&(a=a.replace(new RegExp(`${r}$`),"")),a)),e.join(r)}function tU(...e){let r=[];for(let n=0;n<e.length;n++)r[n]=e[n];let a="",i=!1,t;for(let n=r.length-1;n>=-1&&!i;n--){let o;n>=0?o=r[n]:(t===void 0&&(t=$5()),o=t),o.length!==0&&(a=`${o}/${a}`,i=o.charCodeAt(0)===Bc)}return a=iU(a,!i),i?`/${a}`:a.length>0?a:"."}var Bc=47,w0=46;function iU(e,r){let a="",i=-1,t=0,n,o=!1;for(let s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===Bc)break;n=Bc}if(n===Bc){if(!(i===s-1||t===1))if(i!==s-1&&t===2){if(a.length<2||!o||a.charCodeAt(a.length-1)!==w0||a.charCodeAt(a.length-2)!==w0){if(a.length>2){let c=a.length-1,l=c;for(;l>=0&&a.charCodeAt(l)!==Bc;--l);if(l!==c){a=l===-1?"":a.slice(0,l),i=s,t=0,o=!1;continue}}else if(a.length===2||a.length===1){a="",i=s,t=0,o=!1;continue}}r&&(a.length>0?a+="/..":a="..",o=!0)}else{let c=e.slice(i+1,s);a.length>0?a+=`/${c}`:a=c,o=!1}i=s,t=0}else n===w0&&t!==-1?++t:t=-1}return a}var qc=new Error("Not implemented"),gp=class{handle;size=0;bigsize=0n;url="";constructor(r,a,i){var t;if((t=globalThis.loaders)!=null&&t.NodeFile)return new globalThis.loaders.NodeFile(r,a,i);throw Ii?new Error("Can't instantiate NodeFile in browser."):new Error("Can't instantiate NodeFile. Make sure to import @loaders.gl/polyfills first.")}async read(r,a){throw qc}async write(r,a,i){throw qc}async stat(){throw qc}async truncate(r){throw qc}async append(r){throw qc}async close(){}};var Ic=class{file;constructor(r,a=!1){this.file=new gp(r,a?"a+":"r")}async truncate(r){await this.file.truncate(r)}async append(r){await this.file.append(r)}async destroy(){await this.file.close()}async getUint8(r){let a=await this.file.read(r,1),i=new Uint8Array(a).at(0);if(i===void 0)throw new Error("something went wrong");return i}async getUint16(r){let a=await this.file.read(r,2),i=new Uint16Array(a).at(0);if(i===void 0)throw new Error("something went wrong");return i}async getUint32(r){let a=await this.file.read(r,4),i=new Uint32Array(a).at(0);if(i===void 0)throw new Error("something went wrong");return i}async getBigUint64(r){let a=await this.file.read(r,8),i=new BigInt64Array(a).at(0);if(i===void 0)throw new Error("something went wrong");return i}async slice(r,a){let i=a-r;if(i>Number.MAX_SAFE_INTEGER)throw new Error("too big slice");let t=Number(i);return await this.file.read(r,t)}get length(){return this.file.bigsize}};var In=Ja(require("fs"),1),Zo=class{handle;size;bigsize;url;constructor(r,a,i){r=Cc(r),this.handle=In.default.openSync(r,a,i);let t=In.default.fstatSync(this.handle,{bigint:!0});this.size=Number(t.size),this.bigsize=t.size,this.url=r}async close(){return new Promise((r,a)=>{In.default.close(this.handle,i=>i?a(i):r())})}async truncate(r){return new Promise((a,i)=>{In.default.ftruncate(this.handle,r,t=>{t?i(t):(this.bigsize=BigInt(r),this.size=Number(this.bigsize),a())})})}async append(r){return new Promise((a,i)=>{In.default.appendFile(this.handle,r,t=>{t?i(t):(this.bigsize=this.bigsize+BigInt(r.length),this.size=Number(this.bigsize),a())})})}async stat(){return await new Promise((r,a)=>In.default.fstat(this.handle,{bigint:!0},(i,t)=>{let n={size:Number(t.size),bigsize:t.size,isDirectory:t.isDirectory()};i?a(i):r(n)}))}async read(r,a){let i=new ArrayBuffer(a),t=BigInt(r),n=0,o=new Uint8Array(i),s;for(;a>0;){let c=await oU(this.handle,o,0,a,t);if(c===0)break;n+=c,t+=BigInt(c),a-=c,s!==void 0&&(s+=c)}return n<a?i.slice(0,n):i}async write(r,a=0,i=r.byteLength){return new Promise((t,n)=>{let o=Number(a),s=new Uint8Array(r,Number(a),i);In.default.write(this.handle,s,0,i,o,(c,l)=>c?n(c):t(l))})}};async function oU(e,r,a,i,t){return await new Promise((n,o)=>In.default.read(e,r,a,i,t,(s,c)=>s?o(s):n(c)))}var wp=Ja(require("fs/promises"),1);var _0=Ja(require("fs"),1),k0=require("stream");var bp=Ja(require("zlib"),1),sU=e=>e&&e instanceof ArrayBuffer,uU=e=>e&&e instanceof Buffer;function yp(e,r){switch(r==null?void 0:r.get("content-encoding")){case"br":return e.pipe(bp.default.createBrotliDecompress());case"gzip":return e.pipe(bp.default.createGunzip());case"deflate":return e.pipe(bp.default.createDeflate());default:return e}}async function W5(e){let r=[];return await new Promise((a,i)=>{e.on("error",t=>i(t)),e.on("readable",()=>e.read()),e.on("data",t=>{typeof t=="string"&&i(new Error("Read stream not binary")),r.push(lU(t))}),e.on("end",()=>{let t=cU(r);a(t)})})}function cU(e){let r=e.map(n=>n instanceof ArrayBuffer?new Uint8Array(n):n),a=r.reduce((n,o)=>n+o.byteLength,0),i=new Uint8Array(a),t=0;for(let n of r)i.set(n,t),t+=n.byteLength;return i.buffer}function lU(e){if(sU(e))return e;if(uU(e))return new Uint8Array(e).buffer;if(ArrayBuffer.isView(e))return e.buffer;if(typeof e=="string"){let r=e;return new TextEncoder().encode(r).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error(`toArrayBuffer(${JSON.stringify(e,null,2).slice(10)})`)}var fU=e=>typeof e=="boolean",K5=e=>typeof e=="function",pU=e=>e!==null&&typeof e=="object",hU=e=>pU(e)&&K5(e.read)&&K5(e.pipe)&&fU(e.readable);async function xp(e,r){let a=/^file:\/\//;e.replace(a,"/");let i=e.split("?")[0];i=Cc(i);let t=new Headers;e.endsWith(".gz")&&(t["content-encoding"]="gzip"),e.endsWith(".br")&&(t["content-encoding"]="br");try{let n=await new Promise((v,h)=>{let d=_0.default.createReadStream(i,{encoding:null});d.once("readable",()=>v(d)),d.on("error",y=>h(y))}),o=n;hU(n)?o=yp(n,t):typeof n=="string"?o=k0.Readable.from([new TextEncoder().encode(n)]):o=k0.Readable.from([n||new ArrayBuffer(0)]);let s=200,c="OK",l=dU(i),f=new Response(o,{headers:l,status:s,statusText:c});return Object.defineProperty(f,"url",{value:e}),f}catch(n){let o=n.message,s=400,c=o,l={},f=new Response(o,{headers:l,status:s,statusText:c});return Object.defineProperty(f,"url",{value:e}),f}}function dU(e){let r={};if(!r["content-length"]){let a=_0.default.statSync(e);r["content-length"]=a.size}return e.endsWith(".gz")&&(e=e.slice(0,-3),r["content-encoding"]="gzip"),new Headers(r)}var kp=class{readable=!0;writable=!0;constructor(){}async readdir(r=".",a){return await wp.default.readdir(r,a)}async stat(r){let a=await wp.default.stat(r,{bigint:!0});return{size:Number(a.size),bigsize:a.size,isDirectory:a.isDirectory()}}async unlink(r){return await wp.default.unlink(r)}async fetch(r,a){return await xp(r,a)}async openReadableFile(r,a="r"){return new Zo(r,a)}async openWritableFile(r,a="w",i){return new Zo(r,a,i)}};var Rc=class{constructor(r={}){this.hashBatches=this.hashBatches.bind(this)}async preload(){}async*hashBatches(r,a="base64"){var o,s;let i=[];for await(let c of r)i.push(c),yield c;let t=await this.concatenate(i),n=await this.hash(t,a);(s=(o=this.options.crypto)==null?void 0:o.onEnd)==null||s.call(o,{hash:n})}async concatenate(r){return await Fc(r)}};var Oc=Ja(require("crypto"),1),_p=class extends Rc{name="crypto-node";options;_algorithm;_hash;constructor(r){var a,i;if(super(),this.options=r,!((i=(a=this.options)==null?void 0:a.crypto)!=null&&i.algorithm))throw new Error(this.name)}async hash(r,a){var t,n,o,s;let i=(o=(n=(t=this.options)==null?void 0:t.crypto)==null?void 0:n.algorithm)==null?void 0:o.toLowerCase();try{if(!Oc.createHash)throw new Error("crypto.createHash not available");let c=(s=Oc.createHash)==null?void 0:s(i),l=new Uint8Array(r);return c.update(l).digest("base64")}catch(c){throw Error(`${i} hash not available. ${c}`)}}async*hashBatches(r,a="base64"){var n,o,s,c,l,f,v;if(!Oc.createHash)throw new Error("crypto.createHash not available");let i=(c=Oc.createHash)==null?void 0:c((s=(o=(n=this.options)==null?void 0:n.crypto)==null?void 0:o.algorithm)==null?void 0:s.toLowerCase());for await(let h of r){let d=new Uint8Array(h);i.update(d),yield h}let t=i.digest(a);(v=(f=(l=this.options)==null?void 0:l.crypto)==null?void 0:f.onEnd)==null||v.call(f,{hash:t})}};var u4=require("process");var G5=Ja(require("stream"),1),j0=class{},mU=G5.Readable||j0;function E0(e,r){let a=e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]();return new S0(a,r)}var S0=class extends mU{_pulling;_bytesMode;_iterator;constructor(r,a){super(a),this._iterator=r,this._pulling=!1,this._bytesMode=!a||!a.objectMode}async _read(r){this._pulling||(this._pulling=!0,this._pulling=await this._pull(r,this._iterator))}async _destroy(r,a){var i,t,n,o;this._iterator&&(r?await((t=(i=this._iterator)==null?void 0:i.throw)==null?void 0:t.call(i,r)):await((o=(n=this._iterator)==null?void 0:n.return)==null?void 0:o.call(n,r)),a==null||a(null))}async _pull(r,a){var n;let i=this._bytesMode,t=null;for(;this.readable&&!(t=await a.next()).done&&(r!==null&&(r-=i&&ArrayBuffer.isView(t.value)?t.value.byteLength:1),!(!this.push(new Uint8Array(t.value))||r<=0)););return(t!=null&&t.done||!this.readable)&&(this.push(null)||!0)&&((n=a==null?void 0:a.return)==null||n.call(a)),!this.readable}};var Q5=Ja(Z5(),1);delete globalThis.ReadableStream;var Sp=class extends Q5.ReadableStream{};var Ep=class{chunks;isWorking=!1;isCancelled=!1;constructor(r){this.chunks=r}start(r){this.work(r)}async work(r){let{chunks:a}=this;for(this.isWorking=!0;!this.isCancelled&&(r.desiredSize||0)>0;){let i;try{i=a.next()}catch(t){r.error(t);break}i&&(!i.done&&!this.isCancelled?r.enqueue(i.value):r.close())}this.isWorking=!1}pull(r){this.isWorking||this.work(r)}cancel(){this.isCancelled=!0}};var Ap=class extends Sp{_chunks;constructor(r){super(new Ep(r.values()),{type:"bytes"}),this._chunks=r}async*[Symbol.asyncIterator](r){let a=this.getReader();yield*this._chunks,a.releaseLock()}};var Qo=class{type;size;parts;constructor(r=[],a={}){this.parts=[],this.size=0;for(let i of r)if(typeof i=="string"){let t=new TextEncoder().encode(i);this.parts.push(t),this.size+=t.byteLength}else if(i instanceof Qo)this.size+=i.size,this.parts.push(...i.parts);else if(i instanceof ArrayBuffer)this.parts.push(new Uint8Array(i)),this.size+=i.byteLength;else if(i instanceof Uint8Array)this.parts.push(i),this.size+=i.byteLength;else if(ArrayBuffer.isView(i)){let{buffer:t,byteOffset:n,byteLength:o}=i;this.parts.push(new Uint8Array(t,n,o)),this.size+=o}else{let t=new TextEncoder().encode(String(i));this.parts.push(t),this.size+=t.byteLength}this.type=vU(a.type)}slice(r=0,a=this.size,i=""){let{size:t,parts:n}=this,o=r<0?Math.max(t+r,0):Math.min(r,t),s=a<0?Math.max(t+a,0):Math.min(a,t),c=Math.max(s-o,0),l=new Qo([],{type:i});if(c===0)return l;let f=0,v=[];for(let h of n){let{byteLength:d}=h;if(o>0&&d<=o)o-=d,s-=d;else{let y=h.subarray(o,Math.min(d,s));if(v.push(y),f+=y.byteLength,o=0,f>=c)break}}return l.parts=v,l.size=f,l}async arrayBuffer(){return this._toArrayBuffer()}async text(){let r=new TextDecoder,a="";for(let i of this.parts)a+=r.decode(i);return a}stream(){return new Ap(this.parts)}toString(){return"[object Blob]"}get[Symbol.toStringTag](){return"Blob"}_toArrayBuffer(){let r=new ArrayBuffer(this.size),a=new Uint8Array(r),i=0;for(let t of this.parts)a.set(t,i),i+=t.byteLength;return r}};function vU(e=""){let r=String(e).toLowerCase();return/[^\u0020-\u007E]/.test(r)?"":r}function gU(){return typeof Blob>"u"&&!globalThis.Blob&&(globalThis.Blob=Qo),globalThis.Blob}var bU=gU();var Pp=class{onload;onabort;onerror;error;onloadstart;onloadend;onprogress;readyState;result;DONE;EMPTY;LOADING;addEventListener;removeEventListener;dispatchEvent;constructor(){this.onload=null}abort(){}async readAsArrayBuffer(r){let a=await r.arrayBuffer();this.onload&&this.onload({target:{result:a}})}async readAsBinaryString(r){throw Error("Not implemented")}async readAsDataURL(r){let a=await r.text(),i=`data://;base64,${Eu(a)}`;this.onload&&this.onload({target:{result:i}})}async readAsText(r){let a=await r.text();this.onload&&this.onload({target:{result:a}})}};var Tp=class extends globalThis.Blob{name="";webkitRelativePath="";lastModified;constructor(r,a,i={}){super(r,i),this.name=String(a).replace(/\//g,":"),this.lastModified=(i==null?void 0:i.lastModified)||Date.now()}get[Symbol.toStringTag](){return"File"}};function X5(){return typeof FileReader>"u"&&!globalThis.FileReader&&(globalThis.FileReader=Pp),typeof File>"u"&&!globalThis.File&&(globalThis.File=Tp),global}var yU=X5();var A0=Ja(require("module"),1),J5=Ja(require("path"),1),Cp=Ja(require("fs"),1);async function e4(e){return e.startsWith("http")?await(await fetch(e)).arrayBuffer():Cp.default.readFileSync(e).buffer}async function r4(e){return e.startsWith("http")?await(await fetch(e)).text():Cp.default.readFileSync(e,"utf8")}async function a4(e){if(e.startsWith("http")){let i=await(await fetch(e)).text();return Fp(i)}e.startsWith("/")||(e=`${process.cwd()}/${e}`);let r=Cp.default.readFileSync(e,"utf8");return Fp(r)}function Fp(e,r="",a){if(typeof r=="object"&&(a=r,r=""),r=r.replace("file://",""),typeof e!="string")throw new Error(`code must be a string, not ${typeof e}`);let i=A0.default._nodeModulePaths(J5.default.dirname(r)),t=typeof module<"u"&&(module==null?void 0:module.parent),n=new A0.default(r,t);return n.filename=r,n.paths=[].concat((a==null?void 0:a.prependPaths)||[]).concat(i).concat((a==null?void 0:a.appendPaths)||[]),n._compile(e,r),t&&t.children&&t.children.splice(t.children.indexOf(n),1),n.exports}var Ri=class{map;constructor(r){this.map={},r instanceof Ri?r.forEach((a,i)=>this.append(i,a)):Array.isArray(r)?r.forEach(a=>this.append(a[0],a[1])):r&&Object.getOwnPropertyNames(r).forEach(a=>this.append(a,r[a]))}append(r,a){r=zc(r),a=t4(a);let i=this.map[r];this.map[r]=i?`${i}, ${a}`:a}delete(r){delete this.map[zc(r)]}get(r){return r=zc(r),this.has(r)?this.map[r]:null}has(r){return this.map.hasOwnProperty(zc(r))}set(r,a){this.map[zc(r)]=t4(a)}forEach(r,a=null){for(let i in this.map)this.map.hasOwnProperty(i)&&(a?r.call(a,this.map[i],i,this):r(this.map[i],i,this))}keys(){let r=[];return this.forEach(function(a,i){r.push(i)}),P0(r)}values(){let r=[];return this.forEach(function(a){r.push(a)}),P0(r)}entries(){let r=[];return this.forEach(function(a,i){r.push([i,a])}),P0(r)}*[Symbol.iterator](){yield*this.entries()}};function zc(e){if(typeof e!="string"&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e)||e==="")throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function t4(e){return typeof e!="string"&&(e=String(e)),e}function P0(e){let r={next(){let a=e.shift();return{done:a===void 0,value:a}}};return r[Symbol.iterator]=function(){return r},r}function T0(e,r){if(!e)throw new Error(`@loaders.gl/polyfills assertion ${r}`)}var C0=Ja(require("stream"),1),xU=e=>typeof e=="boolean",i4=e=>typeof e=="function",wU=e=>e!==null&&typeof e=="object",F0=e=>wU(e)&&i4(e.read)&&i4(e.pipe)&&xU(e.readable),Rn=class{ok;status;statusText;headers;url;bodyUsed=!1;_body;constructor(r,a){let{headers:i,status:t=200,statusText:n="OK",url:o}=a||{};this.url=o,this.ok=t===200,this.status=t,this.statusText=n,this.headers=new Ri((a==null?void 0:a.headers)||{}),F0(r)?this._body=yp(r,i):typeof r=="string"?this._body=C0.Readable.from([new TextEncoder().encode(r)]):this._body=C0.Readable.from([r||new ArrayBuffer(0)])}get body(){return T0(!this.bodyUsed),T0(F0(this._body)),this.bodyUsed=!0,this._body}async arrayBuffer(){return F0(this._body)?await W5(this._body):this._body||new ArrayBuffer(0)}async text(){let r=await this.arrayBuffer();return new TextDecoder().decode(r)}async json(){let r=await this.text();return JSON.parse(r)}async blob(){if(typeof Blob>"u")throw new Error("Blob polyfill not installed");return new Blob([await this.arrayBuffer()])}};var o4=Ja(require("http"),1),s4=Ja(require("https"),1);var kU=e=>e&&e instanceof ArrayBuffer,_U=e=>e&&e instanceof Buffer;function n4(e){let r=e.indexOf(","),a,i;return e.slice(r-7,r)===";base64"?(a=Buffer.from(e.slice(r+1),"base64"),i=e.slice(5,r-7).trim()):(a=Buffer.from(decodeURIComponent(e.slice(r+1))),i=e.slice(5,r).trim()),i?i.startsWith(";")&&(i=`text/plain${i}`):i="text/plain;charset=US-ASCII",{arrayBuffer:jU(a),mimeType:i}}function jU(e){if(kU(e))return e;if(_U(e))return new Uint8Array(e).buffer;if(ArrayBuffer.isView(e))return e.buffer;if(typeof e=="string"){let r=e;return new TextEncoder().encode(r).buffer}if(e&&typeof e=="object"&&e._toArrayBuffer)return e._toArrayBuffer();throw new Error(`toArrayBuffer(${JSON.stringify(e,null,2).slice(10)})`)}var B0=e=>e.startsWith("data:"),SU=e=>e.startsWith("http:")||e.startsWith("https:");async function Dc(e,r){try{if(globalThis.fetch!==Dc&&(SU(e)||B0(e)))return await fetch(e,r);if(B0(e)){let{arrayBuffer:l,mimeType:f}=n4(e);return new Rn(l,{headers:{"content-type":f},url:e})}let a={},i=e;e.endsWith(".gz")&&(e=e.slice(0,-3),a["content-encoding"]="gzip");let t=await EU(i,r),n=FU(e,t,a),{status:o,statusText:s}=TU(t),c=!r||r.followRedirect||r.followRedirect===void 0;if(o>=300&&o<400&&n.has("location")&&c){let l=AU(e,n.get("location"));return await Dc(l,r)}return new Rn(t,{headers:n,status:o,statusText:s,url:e})}catch(a){return new Rn(null,{status:400,statusText:String(a),url:e})}}async function EU(e,r){return await new Promise((a,i)=>{let t=PU(e,r),n=e.startsWith("https:")?s4.default.request(t,o=>a(o)):o4.default.request(t,o=>a(o));n.on("error",o=>i(o)),n.end()})}function AU(e,r){if(r.startsWith("http"))return r;let a=new URL(e);return a.pathname=r,a.href}function PU(e,r){let a=(r==null?void 0:r.headers)||{},i={};for(let n of Object.keys(a))i[n.toLowerCase()]=a[n];i["accept-encoding"]=i["accept-encoding"]||"gzip,br,deflate";let t=new URL(e);return{hostname:t.hostname,path:t.pathname,method:"GET",...r,...r==null?void 0:r.fetch,headers:i,port:t.port}}function TU(e){return e.statusCode?{status:e.statusCode,statusText:e.statusMessage||"NA"}:{status:200,statusText:"OK"}}function FU(e,r,a={}){let i={};if(r&&r.headers){let t=r.headers;for(let n in t){let o=t[n];i[n.toLowerCase()]=String(o)}}if(!i["content-length"]){let t=CU(e);Number.isFinite(t)&&(i["content-length"]=t)}return Object.assign(i,a),new Ri(i)}function CU(e){return B0(e)?e.length-5:null}var BU=parseInt(u4.versions.node.split(".")[0]);Qg&&console.error("loaders.gl: The @loaders.gl/polyfills should only be used in Node.js environments");globalThis.loaders=globalThis.loaders||{};globalThis.loaders.makeNodeStream=E0;globalThis.loaders.NodeFile=Zo;globalThis.loaders.NodeFileSystem=kp;globalThis.loaders.fetchNode=xp;globalThis.loaders.NodeHash=_p;globalThis.TextEncoder||(globalThis.TextEncoder=Su);globalThis.TextDecoder||(globalThis.TextDecoder=Co);!("atob"in globalThis)&&Eu&&(globalThis.atob=Eu);!("btoa"in globalThis)&&gh&&(globalThis.btoa=gh);globalThis.loaders.encodeImageNode=ax;globalThis.loaders.parseImageNode=y0;globalThis.loaders.imageFormatsNode=b0;globalThis._parseImageNode=y0;globalThis._imageFormatsNode=b0;globalThis.loaders.readFileAsArrayBuffer=e4;globalThis.loaders.readFileAsText=r4;globalThis.loaders.requireFromFile=a4;globalThis.loaders.requireFromString=Fp;BU<18&&(!("Headers"in globalThis)&&Ri&&(globalThis.Headers=Ri),!("Response"in globalThis)&&Rn&&(globalThis.Response=Rn),!("fetch"in globalThis)&&Dc&&(globalThis.fetch=Dc));var q0="Tile converter does not work in browser, only in node js environment";var qU=8n,IU=18n,RU=22n,OU=26n,zU=28n,Bp=30n,I0=new Uint8Array([80,75,3,4]),qp=async(e,r)=>{let a=await r.slice(e,e+4n);if(!x0(a,I0))return null;let i=await r.getUint16(e+OU),t=new TextDecoder().decode(await r.slice(e+Bp,e+Bp+BigInt(i))).split("\\").join("/"),n=await r.getUint16(e+zU),o=e+Bp+BigInt(i+n),s=await r.getUint16(e+qU),c=BigInt(await r.getUint32(e+IU)),l=BigInt(await r.getUint32(e+RU)),f=e+Bp+BigInt(i),v=4n;return l===BigInt(4294967295)&&(l=await r.getBigUint64(f+v),v+=8n),c===BigInt(4294967295)&&(c=await r.getBigUint64(f+v),v+=8n),o===BigInt(4294967295)&&(o=await r.getBigUint64(f+v)),{fileNameLength:i,fileName:t,extraFieldLength:n,fileDataOffset:o,compressedSize:c,compressionMethod:s}};var bQ=[{offset:0,size:4,default:new DataView(I0.buffer).getUint32(0,!0)},{offset:4,size:2,default:45},{offset:6,size:2,default:0},{offset:8,size:2,default:0},{offset:10,size:2,default:0},{offset:12,size:2,default:0},{offset:14,size:4,name:"crc32"},{offset:18,size:4,name:"length"},{offset:22,size:4,name:"length"},{offset:26,size:2,name:"fnlength"},{offset:28,size:2,default:0,name:"extraLength"}];var Ip=class{constructor(r){this.compressBatches=this.compressBatches.bind(this),this.decompressBatches=this.decompressBatches.bind(this)}async preload(){}async compress(r){return await this.preload(),this.compressSync(r)}async decompress(r,a){return await this.preload(),this.decompressSync(r,a)}compressSync(r){throw new Error(`${this.name}: sync compression not supported`)}decompressSync(r,a){throw new Error(`${this.name}: sync decompression not supported`)}async*compressBatches(r){let a=await this.concatenate(r);yield this.compress(a)}async*decompressBatches(r){let a=await this.concatenate(r);yield this.decompress(a)}concatenate(r){return Fc(r)}improveError(r){return r.message.includes(this.name)||(r.message=`${this.name} ${r.message}`),r}};var os=Ja(YS(),1),Nn=Ja(require("zlib"),1);var Qp=class extends Ip{name="deflate";extensions=[];contentEncodings=["deflate"];isSupported=!0;options;_chunks=[];constructor(r={}){super(r),this.options=r}async compress(r){var a,i;if(!Ii&&((a=this.options.deflate)!=null&&a.useZlib)){let t=(i=this.options.deflate)!=null&&i.gzip?await ou(Nn.default.gzip)(r):await ou(Nn.default.deflate)(r);return nu(t)}return this.compressSync(r)}async decompress(r){var a,i;if(!Ii&&((a=this.options.deflate)!=null&&a.useZlib)){let t=(i=this.options.deflate)!=null&&i.gzip?await ou(Nn.default.gunzip)(r):await ou(Nn.default.inflate)(r);return nu(t)}return this.decompressSync(r)}compressSync(r){var n,o,s,c;if(!Ii&&((n=this.options.deflate)!=null&&n.useZlib)){let l=(o=this.options.deflate)!=null&&o.gzip?Nn.default.gzipSync(r):Nn.default.deflateSync(r);return nu(l)}let a=((s=this.options)==null?void 0:s.deflate)||{},i=new Uint8Array(r);return((c=this.options)!=null&&c.raw?os.default.deflateRaw:os.default.deflate)(i,a).buffer}decompressSync(r){var n,o,s,c;if(!Ii&&((n=this.options.deflate)!=null&&n.useZlib)){let l=(o=this.options.deflate)!=null&&o.gzip?Nn.default.gunzipSync(r):Nn.default.inflateSync(r);return nu(l)}let a=((s=this.options)==null?void 0:s.deflate)||{},i=new Uint8Array(r);return((c=this.options)!=null&&c.raw?os.default.inflateRaw:os.default.inflate)(i,a).buffer}async*compressBatches(r){var t;let a=((t=this.options)==null?void 0:t.deflate)||{},i=new os.default.Deflate(a);yield*this.transformBatches(i,r)}async*decompressBatches(r){var t;let a=((t=this.options)==null?void 0:t.deflate)||{},i=new os.default.Inflate(a);yield*this.transformBatches(i,r)}async*transformBatches(r,a){r.onData=this._onData.bind(this),r.onEnd=this._onEnd.bind(this);for await(let o of a){let s=new Uint8Array(o);if(!r.push(s,!1))throw new Error(`${this._getError()}write`);yield*this._getChunks()}let i=new Uint8Array(0),t=r.push(i,!0);yield*this._getChunks()}_onData(r){this._chunks.push(r)}_onEnd(r){if(r!==0)throw new Error(this._getError(r)+this._chunks.length)}_getChunks(){let r=this._chunks;return this._chunks=[],r}_getError(r=0){let a={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"};return`${this.name}: ${a[r]}`}};var rl=class extends Qp{name="gzip";extensions=["gz","gzip"];contentEncodings=["gzip","x-gzip"];isSupported=!0;constructor(r){super({...r,deflate:{...r==null?void 0:r.gzip,gzip:!0}})}};var mg=require("fs"),vg=require("path");async function ZS(e,r,a="index.json"){let i;r instanceof Promise?i=new Uint8Array(await r):r instanceof ArrayBuffer?i=new Uint8Array(r):i=r,await mg.promises.mkdir(e,{recursive:!0});let t=(0,vg.join)(e,a);try{await mg.promises.writeFile(t,i)}catch(n){throw n}return console.log(`${t} saved.`),t}var FH=["3dSceneLayer.json.gz","3dNodeIndexDocument.json.gz","sharedResource.json.gz"],al=class{async extract(r){if(Ii)return console.log(q0),q0;let{inputUrl:a}=r,i=new Ic(a),t=await qp(0n,i);for(;t;)await this.writeFile(await this.unGzip({name:this.correctIndexNames(t.fileName),data:await i.slice(t.fileDataOffset,t.fileDataOffset+t.compressedSize)}),r.outputPath),t=await qp(t.fileDataOffset+(t==null?void 0:t.compressedSize),i);return"success"}correctIndexNames(r){if(FH.includes(un.filename(un.join("/",r))))return un.join(un.dirname(r),"index.json.gz");let a=/^(.*\/[^\/\.]*)(\..+)$/.exec(r);return a?`${a==null?void 0:a.at(1)}/index${a==null?void 0:a.at(2)}`:null}async unGzip(r){return/\.gz$/.test(r.name??"")?{data:await new rl().decompress(r.data),name:(r.name??"").slice(0,-3)}:Promise.resolve(r)}async writeFile(r,a){if(!r.name)return;let i=un.join(a,r.name),t=un.dirname(i),n=un.filename(i);await ZS(t,r.data,n)}};function CH(e,r){if(e+1>=r.length)return"";let a=r[e+1];return a.indexOf("--")===0?"":a}function gg(e,r){let a=CH(e,r);return console.log(`Input tileset value: ${a}`),console.log(`Modified tileset value: ${a.replace(/\\/g,"/")}`),a.replace(/\\/g,"/")}function QS(e){return e.reduce((r,a)=>{let i=a.indexOf("="),t=a.slice(0,i),n=a.slice(i+1,a.length);return a.includes("=")&&a.startsWith("--")&&n?r.concat(t,n):r.concat(a)},[])}async function BH(){let[,,...e]=process.argv;e.length===0&&XS();let r=QS(e),a=RH(r),i=IH(a);await qH(i)}BH().catch(e=>{console.log(e),process.exit(1)});function XS(){console.log("cli: converter slpk to I3S..."),console.log('--output [Output folder, default: "data" folder]'),console.log("--tileset [SLPK file]"),process.exit(0)}async function qH(e){console.log("------------------------------------------------"),console.log("Starting conversion of SLPK"),console.log("------------------------------------------------"),new al().extract({inputUrl:e.tileset,outputPath:e.output})}function IH(e){let r={output:()=>console.log("Missed: --output [Output path name]"),tileset:()=>console.log("Missed: --tileset [SLPK file]")},a=[];for(let i in r)e[i]||a.push(r[i]);return a.length&&(a.forEach(i=>i()),process.exit(1)),e}function RH(e){let r={};return e.forEach((a,i)=>{if(a.indexOf("--")===0)switch(a){case"--tileset":r.tileset=gg(i,e);break;case"--output":r.output=gg(i,e);break;case"--help":XS();break;default:console.warn(`Unknown option ${a}`),process.exit(0)}}),r}
95
95
  /*! Bundled license information:
96
96
 
97
97
  is-buffer/index.js: