@mescius/activereportsjs
Version:
ActiveReportsJS
9 lines • 1.44 MB
JavaScript
/*!
* @mescius/activereportsjs 6.0.3
* Description: ActiveReportsJS
* https://www.npmjs.com/package/@mescius/activereportsjs
* Copyright ©️ MESCIUS inc. All rights reserved.
* Licensed under the Commercial license
*/
(function(er,Sr){typeof exports=="object"&&typeof module<"u"?Sr(exports,require("./ar-js-core.js")):typeof define=="function"&&define.amd?define(["exports","@mescius/ar-js-pagereport"],Sr):(er=typeof globalThis<"u"?globalThis:er||self,Sr((er.MESCIUS=er.MESCIUS||{},er.MESCIUS.ActiveReportsJS=er.MESCIUS.ActiveReportsJS||{},er.MESCIUS.ActiveReportsJS.XlsxExportAdv={}),er.MESCIUS.ActiveReportsJS.Core))})(this,(function(er,Sr){"use strict";function ud(N,L){for(var w=0;w<L.length;w++){const S=L[w];if(typeof S!="string"&&!Array.isArray(S)){for(const E in S)if(E!=="default"&&!(E in N)){const s=Object.getOwnPropertyDescriptor(S,E);s&&Object.defineProperty(N,E,s.get?s:{enumerable:!0,get:()=>S[E]})}}}return Object.freeze(Object.defineProperty(N,Symbol.toStringTag,{value:"Module"}))}function ld(N){return N&&N.__esModule&&Object.prototype.hasOwnProperty.call(N,"default")?N.default:N}var No={exports:{}},Ft=No.exports={},rr,ir;function Ci(){throw new Error("setTimeout has not been defined")}function Ri(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?rr=setTimeout:rr=Ci}catch{rr=Ci}try{typeof clearTimeout=="function"?ir=clearTimeout:ir=Ri}catch{ir=Ri}})();function Do(N){if(rr===setTimeout)return setTimeout(N,0);if((rr===Ci||!rr)&&setTimeout)return rr=setTimeout,setTimeout(N,0);try{return rr(N,0)}catch{try{return rr.call(null,N,0)}catch{return rr.call(this,N,0)}}}function cd(N){if(ir===clearTimeout)return clearTimeout(N);if((ir===Ri||!ir)&&clearTimeout)return ir=clearTimeout,clearTimeout(N);try{return ir(N)}catch{try{return ir.call(null,N)}catch{return ir.call(this,N)}}}var hr=[],Mr=!1,br,Zr=-1;function dd(){!Mr||!br||(Mr=!1,br.length?hr=br.concat(hr):Zr=-1,hr.length&&Lo())}function Lo(){if(!Mr){var N=Do(dd);Mr=!0;for(var L=hr.length;L;){for(br=hr,hr=[];++Zr<L;)br&&br[Zr].run();Zr=-1,L=hr.length}br=null,Mr=!1,cd(N)}}Ft.nextTick=function(N){var L=new Array(arguments.length-1);if(arguments.length>1)for(var w=1;w<arguments.length;w++)L[w-1]=arguments[w];hr.push(new jo(N,L)),hr.length===1&&!Mr&&Do(Lo)};function jo(N,L){this.fun=N,this.array=L}jo.prototype.run=function(){this.fun.apply(null,this.array)},Ft.title="browser",Ft.browser=!0,Ft.env={},Ft.argv=[],Ft.version="",Ft.versions={};function ur(){}Ft.on=ur,Ft.addListener=ur,Ft.once=ur,Ft.off=ur,Ft.removeListener=ur,Ft.removeAllListeners=ur,Ft.emit=ur,Ft.prependListener=ur,Ft.prependOnceListener=ur,Ft.listeners=function(N){return[]},Ft.binding=function(N){throw new Error("process.binding is not supported")},Ft.cwd=function(){return"/"},Ft.chdir=function(N){throw new Error("process.chdir is not supported")},Ft.umask=function(){return 0};var pd=No.exports;const wt=ld(pd);function Ti(N){return N&&N.__esModule&&Object.prototype.hasOwnProperty.call(N,"default")?N.default:N}function Fo(N){if(Object.prototype.hasOwnProperty.call(N,"__esModule"))return N;var L=N.default;if(typeof L=="function"){var w=function S(){return this instanceof S?Reflect.construct(L,arguments,this.constructor):L.apply(this,arguments)};w.prototype=L.prototype}else w={};return Object.defineProperty(w,"__esModule",{value:!0}),Object.keys(N).forEach(function(S){var E=Object.getOwnPropertyDescriptor(N,S);Object.defineProperty(w,S,E.get?E:{enumerable:!0,get:function(){return N[S]}})}),w}var Bi={exports:{}},qo;function md(){return qo||(qo=1,(function(N){var L=(function(w){var S=Object.prototype,E=S.hasOwnProperty,s=Object.defineProperty||function(y,x,A){y[x]=A.value},f,o=typeof Symbol=="function"?Symbol:{},i=o.iterator||"@@iterator",e=o.asyncIterator||"@@asyncIterator",t=o.toStringTag||"@@toStringTag";function a(y,x,A){return Object.defineProperty(y,x,{value:A,enumerable:!0,configurable:!0,writable:!0}),y[x]}try{a({},"")}catch{a=function(x,A,M){return x[A]=M}}function r(y,x,A,M){var O=x&&x.prototype instanceof k?x:k,V=Object.create(O.prototype),J=new d(M||[]);return s(V,"_invoke",{value:R(y,A,J)}),V}w.wrap=r;function n(y,x,A){try{return{type:"normal",arg:y.call(x,A)}}catch(M){return{type:"throw",arg:M}}}var h="suspendedStart",u="suspendedYield",c="executing",b="completed",v={};function k(){}function C(){}function B(){}var D={};a(D,i,function(){return this});var z=Object.getPrototypeOf,j=z&&z(z(m([])));j&&j!==S&&E.call(j,i)&&(D=j);var q=B.prototype=k.prototype=Object.create(D);C.prototype=B,s(q,"constructor",{value:B,configurable:!0}),s(B,"constructor",{value:C,configurable:!0}),C.displayName=a(B,t,"GeneratorFunction");function H(y){["next","throw","return"].forEach(function(x){a(y,x,function(A){return this._invoke(x,A)})})}w.isGeneratorFunction=function(y){var x=typeof y=="function"&&y.constructor;return x?x===C||(x.displayName||x.name)==="GeneratorFunction":!1},w.mark=function(y){return Object.setPrototypeOf?Object.setPrototypeOf(y,B):(y.__proto__=B,a(y,t,"GeneratorFunction")),y.prototype=Object.create(q),y},w.awrap=function(y){return{__await:y}};function U(y,x){function A(V,J,P,F){var T=n(y[V],y,J);if(T.type==="throw")F(T.arg);else{var I=T.arg,$=I.value;return $&&typeof $=="object"&&E.call($,"__await")?x.resolve($.__await).then(function(W){A("next",W,P,F)},function(W){A("throw",W,P,F)}):x.resolve($).then(function(W){I.value=W,P(I)},function(W){return A("throw",W,P,F)})}}var M;function O(V,J){function P(){return new x(function(F,T){A(V,J,F,T)})}return M=M?M.then(P,P):P()}s(this,"_invoke",{value:O})}H(U.prototype),a(U.prototype,e,function(){return this}),w.AsyncIterator=U,w.async=function(y,x,A,M,O){O===void 0&&(O=Promise);var V=new U(r(y,x,A,M),O);return w.isGeneratorFunction(x)?V:V.next().then(function(J){return J.done?J.value:V.next()})};function R(y,x,A){var M=h;return function(V,J){if(M===c)throw new Error("Generator is already running");if(M===b){if(V==="throw")throw J;return g()}for(A.method=V,A.arg=J;;){var P=A.delegate;if(P){var F=_(P,A);if(F){if(F===v)continue;return F}}if(A.method==="next")A.sent=A._sent=A.arg;else if(A.method==="throw"){if(M===h)throw M=b,A.arg;A.dispatchException(A.arg)}else A.method==="return"&&A.abrupt("return",A.arg);M=c;var T=n(y,x,A);if(T.type==="normal"){if(M=A.done?b:u,T.arg===v)continue;return{value:T.arg,done:A.done}}else T.type==="throw"&&(M=b,A.method="throw",A.arg=T.arg)}}}function _(y,x){var A=x.method,M=y.iterator[A];if(M===f)return x.delegate=null,A==="throw"&&y.iterator.return&&(x.method="return",x.arg=f,_(y,x),x.method==="throw")||A!=="return"&&(x.method="throw",x.arg=new TypeError("The iterator does not provide a '"+A+"' method")),v;var O=n(M,y.iterator,x.arg);if(O.type==="throw")return x.method="throw",x.arg=O.arg,x.delegate=null,v;var V=O.arg;if(!V)return x.method="throw",x.arg=new TypeError("iterator result is not an object"),x.delegate=null,v;if(V.done)x[y.resultName]=V.value,x.next=y.nextLoc,x.method!=="return"&&(x.method="next",x.arg=f);else return V;return x.delegate=null,v}H(q),a(q,t,"Generator"),a(q,i,function(){return this}),a(q,"toString",function(){return"[object Generator]"});function l(y){var x={tryLoc:y[0]};1 in y&&(x.catchLoc=y[1]),2 in y&&(x.finallyLoc=y[2],x.afterLoc=y[3]),this.tryEntries.push(x)}function p(y){var x=y.completion||{};x.type="normal",delete x.arg,y.completion=x}function d(y){this.tryEntries=[{tryLoc:"root"}],y.forEach(l,this),this.reset(!0)}w.keys=function(y){var x=Object(y),A=[];for(var M in x)A.push(M);return A.reverse(),function O(){for(;A.length;){var V=A.pop();if(V in x)return O.value=V,O.done=!1,O}return O.done=!0,O}};function m(y){if(y){var x=y[i];if(x)return x.call(y);if(typeof y.next=="function")return y;if(!isNaN(y.length)){var A=-1,M=function O(){for(;++A<y.length;)if(E.call(y,A))return O.value=y[A],O.done=!1,O;return O.value=f,O.done=!0,O};return M.next=M}}return{next:g}}w.values=m;function g(){return{value:f,done:!0}}return d.prototype={constructor:d,reset:function(y){if(this.prev=0,this.next=0,this.sent=this._sent=f,this.done=!1,this.delegate=null,this.method="next",this.arg=f,this.tryEntries.forEach(p),!y)for(var x in this)x.charAt(0)==="t"&&E.call(this,x)&&!isNaN(+x.slice(1))&&(this[x]=f)},stop:function(){this.done=!0;var y=this.tryEntries[0],x=y.completion;if(x.type==="throw")throw x.arg;return this.rval},dispatchException:function(y){if(this.done)throw y;var x=this;function A(F,T){return V.type="throw",V.arg=y,x.next=F,T&&(x.method="next",x.arg=f),!!T}for(var M=this.tryEntries.length-1;M>=0;--M){var O=this.tryEntries[M],V=O.completion;if(O.tryLoc==="root")return A("end");if(O.tryLoc<=this.prev){var J=E.call(O,"catchLoc"),P=E.call(O,"finallyLoc");if(J&&P){if(this.prev<O.catchLoc)return A(O.catchLoc,!0);if(this.prev<O.finallyLoc)return A(O.finallyLoc)}else if(J){if(this.prev<O.catchLoc)return A(O.catchLoc,!0)}else if(P){if(this.prev<O.finallyLoc)return A(O.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(y,x){for(var A=this.tryEntries.length-1;A>=0;--A){var M=this.tryEntries[A];if(M.tryLoc<=this.prev&&E.call(M,"finallyLoc")&&this.prev<M.finallyLoc){var O=M;break}}O&&(y==="break"||y==="continue")&&O.tryLoc<=x&&x<=O.finallyLoc&&(O=null);var V=O?O.completion:{};return V.type=y,V.arg=x,O?(this.method="next",this.next=O.finallyLoc,v):this.complete(V)},complete:function(y,x){if(y.type==="throw")throw y.arg;return y.type==="break"||y.type==="continue"?this.next=y.arg:y.type==="return"?(this.rval=this.arg=y.arg,this.method="return",this.next="end"):y.type==="normal"&&x&&(this.next=x),v},finish:function(y){for(var x=this.tryEntries.length-1;x>=0;--x){var A=this.tryEntries[x];if(A.finallyLoc===y)return this.complete(A.completion,A.afterLoc),p(A),v}},catch:function(y){for(var x=this.tryEntries.length-1;x>=0;--x){var A=this.tryEntries[x];if(A.tryLoc===y){var M=A.completion;if(M.type==="throw"){var O=M.arg;p(A)}return O}}throw new Error("illegal catch attempt")},delegateYield:function(y,x,A){return this.delegate={iterator:m(y),resultName:x,nextLoc:A},this.method==="next"&&(this.arg=f),v}},w})(N.exports);try{regeneratorRuntime=L}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=L:Function("r","regeneratorRuntime = r")(L)}})(Bi)),Bi.exports}var bd=md();const vd=Ti(bd);var kt={},Yr={exports:{}},Jr={exports:{}},Ii={},Uo;function Vt(){return Uo||(Uo=1,(function(N){Object.defineProperties(N,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var L={},w={};w.byteLength=t,w.toByteArray=r,w.fromByteArray=u;for(var S=[],E=[],s=typeof Uint8Array<"u"?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,i=f.length;o<i;++o)S[o]=f[o],E[f.charCodeAt(o)]=o;E[45]=62,E[95]=63;function e(v){var k=v.length;if(k%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var C=v.indexOf("=");C===-1&&(C=k);var B=C===k?0:4-C%4;return[C,B]}function t(v){var k=e(v),C=k[0],B=k[1];return(C+B)*3/4-B}function a(v,k,C){return(k+C)*3/4-C}function r(v){var k,C=e(v),B=C[0],D=C[1],z=new s(a(v,B,D)),j=0,q=D>0?B-4:B,H;for(H=0;H<q;H+=4)k=E[v.charCodeAt(H)]<<18|E[v.charCodeAt(H+1)]<<12|E[v.charCodeAt(H+2)]<<6|E[v.charCodeAt(H+3)],z[j++]=k>>16&255,z[j++]=k>>8&255,z[j++]=k&255;return D===2&&(k=E[v.charCodeAt(H)]<<2|E[v.charCodeAt(H+1)]>>4,z[j++]=k&255),D===1&&(k=E[v.charCodeAt(H)]<<10|E[v.charCodeAt(H+1)]<<4|E[v.charCodeAt(H+2)]>>2,z[j++]=k>>8&255,z[j++]=k&255),z}function n(v){return S[v>>18&63]+S[v>>12&63]+S[v>>6&63]+S[v&63]}function h(v,k,C){for(var B,D=[],z=k;z<C;z+=3)B=(v[z]<<16&16711680)+(v[z+1]<<8&65280)+(v[z+2]&255),D.push(n(B));return D.join("")}function u(v){for(var k,C=v.length,B=C%3,D=[],z=16383,j=0,q=C-B;j<q;j+=z)D.push(h(v,j,j+z>q?q:j+z));return B===1?(k=v[C-1],D.push(S[k>>2]+S[k<<4&63]+"==")):B===2&&(k=(v[C-2]<<8)+v[C-1],D.push(S[k>>10]+S[k>>4&63]+S[k<<2&63]+"=")),D.join("")}var c={};c.read=function(v,k,C,B,D){var z,j,q=D*8-B-1,H=(1<<q)-1,U=H>>1,R=-7,_=C?D-1:0,l=C?-1:1,p=v[k+_];for(_+=l,z=p&(1<<-R)-1,p>>=-R,R+=q;R>0;z=z*256+v[k+_],_+=l,R-=8);for(j=z&(1<<-R)-1,z>>=-R,R+=B;R>0;j=j*256+v[k+_],_+=l,R-=8);if(z===0)z=1-U;else{if(z===H)return j?NaN:(p?-1:1)*(1/0);j=j+Math.pow(2,B),z=z-U}return(p?-1:1)*j*Math.pow(2,z-B)},c.write=function(v,k,C,B,D,z){var j,q,H,U=z*8-D-1,R=(1<<U)-1,_=R>>1,l=D===23?Math.pow(2,-24)-Math.pow(2,-77):0,p=B?0:z-1,d=B?1:-1,m=k<0||k===0&&1/k<0?1:0;for(k=Math.abs(k),isNaN(k)||k===1/0?(q=isNaN(k)?1:0,j=R):(j=Math.floor(Math.log(k)/Math.LN2),k*(H=Math.pow(2,-j))<1&&(j--,H*=2),j+_>=1?k+=l/H:k+=l*Math.pow(2,1-_),k*H>=2&&(j++,H/=2),j+_>=R?(q=0,j=R):j+_>=1?(q=(k*H-1)*Math.pow(2,D),j=j+_):(q=k*Math.pow(2,_-1)*Math.pow(2,D),j=0));D>=8;v[C+p]=q&255,p+=d,q/=256,D-=8);for(j=j<<D|q,U+=D;U>0;v[C+p]=j&255,p+=d,j/=256,U-=8);v[C+p-d]|=m*128};(function(v){const k=w,C=c,B=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;v.Buffer=R,v.SlowBuffer=O,v.INSPECT_MAX_BYTES=50;const D=2147483647;v.kMaxLength=D;const{Uint8Array:z,ArrayBuffer:j,SharedArrayBuffer:q}=globalThis;R.TYPED_ARRAY_SUPPORT=H(),!R.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function H(){try{const ie=new z(1),G={foo:function(){return 42}};return Object.setPrototypeOf(G,z.prototype),Object.setPrototypeOf(ie,G),ie.foo()===42}catch{return!1}}Object.defineProperty(R.prototype,"parent",{enumerable:!0,get:function(){if(R.isBuffer(this))return this.buffer}}),Object.defineProperty(R.prototype,"offset",{enumerable:!0,get:function(){if(R.isBuffer(this))return this.byteOffset}});function U(ie){if(ie>D)throw new RangeError('The value "'+ie+'" is invalid for option "size"');const G=new z(ie);return Object.setPrototypeOf(G,R.prototype),G}function R(ie,G,Y){if(typeof ie=="number"){if(typeof G=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return d(ie)}return _(ie,G,Y)}R.poolSize=8192;function _(ie,G,Y){if(typeof ie=="string")return m(ie,G);if(j.isView(ie))return y(ie);if(ie==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ie);if(at(ie,j)||ie&&at(ie.buffer,j)||typeof q<"u"&&(at(ie,q)||ie&&at(ie.buffer,q)))return x(ie,G,Y);if(typeof ie=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const oe=ie.valueOf&&ie.valueOf();if(oe!=null&&oe!==ie)return R.from(oe,G,Y);const xe=A(ie);if(xe)return xe;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ie[Symbol.toPrimitive]=="function")return R.from(ie[Symbol.toPrimitive]("string"),G,Y);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ie)}R.from=function(ie,G,Y){return _(ie,G,Y)},Object.setPrototypeOf(R.prototype,z.prototype),Object.setPrototypeOf(R,z);function l(ie){if(typeof ie!="number")throw new TypeError('"size" argument must be of type number');if(ie<0)throw new RangeError('The value "'+ie+'" is invalid for option "size"')}function p(ie,G,Y){return l(ie),ie<=0?U(ie):G!==void 0?typeof Y=="string"?U(ie).fill(G,Y):U(ie).fill(G):U(ie)}R.alloc=function(ie,G,Y){return p(ie,G,Y)};function d(ie){return l(ie),U(ie<0?0:M(ie)|0)}R.allocUnsafe=function(ie){return d(ie)},R.allocUnsafeSlow=function(ie){return d(ie)};function m(ie,G){if((typeof G!="string"||G==="")&&(G="utf8"),!R.isEncoding(G))throw new TypeError("Unknown encoding: "+G);const Y=V(ie,G)|0;let oe=U(Y);const xe=oe.write(ie,G);return xe!==Y&&(oe=oe.slice(0,xe)),oe}function g(ie){const G=ie.length<0?0:M(ie.length)|0,Y=U(G);for(let oe=0;oe<G;oe+=1)Y[oe]=ie[oe]&255;return Y}function y(ie){if(at(ie,z)){const G=new z(ie);return x(G.buffer,G.byteOffset,G.byteLength)}return g(ie)}function x(ie,G,Y){if(G<0||ie.byteLength<G)throw new RangeError('"offset" is outside of buffer bounds');if(ie.byteLength<G+(Y||0))throw new RangeError('"length" is outside of buffer bounds');let oe;return G===void 0&&Y===void 0?oe=new z(ie):Y===void 0?oe=new z(ie,G):oe=new z(ie,G,Y),Object.setPrototypeOf(oe,R.prototype),oe}function A(ie){if(R.isBuffer(ie)){const G=M(ie.length)|0,Y=U(G);return Y.length===0||ie.copy(Y,0,0,G),Y}if(ie.length!==void 0)return typeof ie.length!="number"||lt(ie.length)?U(0):g(ie);if(ie.type==="Buffer"&&Array.isArray(ie.data))return g(ie.data)}function M(ie){if(ie>=D)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+D.toString(16)+" bytes");return ie|0}function O(ie){return+ie!=ie&&(ie=0),R.alloc(+ie)}R.isBuffer=function(G){return G!=null&&G._isBuffer===!0&&G!==R.prototype},R.compare=function(G,Y){if(at(G,z)&&(G=R.from(G,G.offset,G.byteLength)),at(Y,z)&&(Y=R.from(Y,Y.offset,Y.byteLength)),!R.isBuffer(G)||!R.isBuffer(Y))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(G===Y)return 0;let oe=G.length,xe=Y.length;for(let ne=0,fe=Math.min(oe,xe);ne<fe;++ne)if(G[ne]!==Y[ne]){oe=G[ne],xe=Y[ne];break}return oe<xe?-1:xe<oe?1:0},R.isEncoding=function(G){switch(String(G).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},R.concat=function(G,Y){if(!Array.isArray(G))throw new TypeError('"list" argument must be an Array of Buffers');if(G.length===0)return R.alloc(0);let oe;if(Y===void 0)for(Y=0,oe=0;oe<G.length;++oe)Y+=G[oe].length;const xe=R.allocUnsafe(Y);let ne=0;for(oe=0;oe<G.length;++oe){let fe=G[oe];if(at(fe,z))ne+fe.length>xe.length?(R.isBuffer(fe)||(fe=R.from(fe)),fe.copy(xe,ne)):z.prototype.set.call(xe,fe,ne);else if(R.isBuffer(fe))fe.copy(xe,ne);else throw new TypeError('"list" argument must be an Array of Buffers');ne+=fe.length}return xe};function V(ie,G){if(R.isBuffer(ie))return ie.length;if(j.isView(ie)||at(ie,j))return ie.byteLength;if(typeof ie!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ie);const Y=ie.length,oe=arguments.length>2&&arguments[2]===!0;if(!oe&&Y===0)return 0;let xe=!1;for(;;)switch(G){case"ascii":case"latin1":case"binary":return Y;case"utf8":case"utf-8":return Ye(ie).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y*2;case"hex":return Y>>>1;case"base64":return Ze(ie).length;default:if(xe)return oe?-1:Ye(ie).length;G=(""+G).toLowerCase(),xe=!0}}R.byteLength=V;function J(ie,G,Y){let oe=!1;if((G===void 0||G<0)&&(G=0),G>this.length||((Y===void 0||Y>this.length)&&(Y=this.length),Y<=0)||(Y>>>=0,G>>>=0,Y<=G))return"";for(ie||(ie="utf8");;)switch(ie){case"hex":return ye(this,G,Y);case"utf8":case"utf-8":return ue(this,G,Y);case"ascii":return he(this,G,Y);case"latin1":case"binary":return ke(this,G,Y);case"base64":return re(this,G,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return we(this,G,Y);default:if(oe)throw new TypeError("Unknown encoding: "+ie);ie=(ie+"").toLowerCase(),oe=!0}}R.prototype._isBuffer=!0;function P(ie,G,Y){const oe=ie[G];ie[G]=ie[Y],ie[Y]=oe}R.prototype.swap16=function(){const G=this.length;if(G%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let Y=0;Y<G;Y+=2)P(this,Y,Y+1);return this},R.prototype.swap32=function(){const G=this.length;if(G%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let Y=0;Y<G;Y+=4)P(this,Y,Y+3),P(this,Y+1,Y+2);return this},R.prototype.swap64=function(){const G=this.length;if(G%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let Y=0;Y<G;Y+=8)P(this,Y,Y+7),P(this,Y+1,Y+6),P(this,Y+2,Y+5),P(this,Y+3,Y+4);return this},R.prototype.toString=function(){const G=this.length;return G===0?"":arguments.length===0?ue(this,0,G):J.apply(this,arguments)},R.prototype.toLocaleString=R.prototype.toString,R.prototype.equals=function(G){if(!R.isBuffer(G))throw new TypeError("Argument must be a Buffer");return this===G?!0:R.compare(this,G)===0},R.prototype.inspect=function(){let G="";const Y=v.INSPECT_MAX_BYTES;return G=this.toString("hex",0,Y).replace(/(.{2})/g,"$1 ").trim(),this.length>Y&&(G+=" ... "),"<Buffer "+G+">"},B&&(R.prototype[B]=R.prototype.inspect),R.prototype.compare=function(G,Y,oe,xe,ne){if(at(G,z)&&(G=R.from(G,G.offset,G.byteLength)),!R.isBuffer(G))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof G);if(Y===void 0&&(Y=0),oe===void 0&&(oe=G?G.length:0),xe===void 0&&(xe=0),ne===void 0&&(ne=this.length),Y<0||oe>G.length||xe<0||ne>this.length)throw new RangeError("out of range index");if(xe>=ne&&Y>=oe)return 0;if(xe>=ne)return-1;if(Y>=oe)return 1;if(Y>>>=0,oe>>>=0,xe>>>=0,ne>>>=0,this===G)return 0;let fe=ne-xe,Ce=oe-Y;const Le=Math.min(fe,Ce),je=this.slice(xe,ne),Fe=G.slice(Y,oe);for(let $e=0;$e<Le;++$e)if(je[$e]!==Fe[$e]){fe=je[$e],Ce=Fe[$e];break}return fe<Ce?-1:Ce<fe?1:0};function F(ie,G,Y,oe,xe){if(ie.length===0)return-1;if(typeof Y=="string"?(oe=Y,Y=0):Y>2147483647?Y=2147483647:Y<-2147483648&&(Y=-2147483648),Y=+Y,lt(Y)&&(Y=xe?0:ie.length-1),Y<0&&(Y=ie.length+Y),Y>=ie.length){if(xe)return-1;Y=ie.length-1}else if(Y<0)if(xe)Y=0;else return-1;if(typeof G=="string"&&(G=R.from(G,oe)),R.isBuffer(G))return G.length===0?-1:T(ie,G,Y,oe,xe);if(typeof G=="number")return G=G&255,typeof z.prototype.indexOf=="function"?xe?z.prototype.indexOf.call(ie,G,Y):z.prototype.lastIndexOf.call(ie,G,Y):T(ie,[G],Y,oe,xe);throw new TypeError("val must be string, number or Buffer")}function T(ie,G,Y,oe,xe){let ne=1,fe=ie.length,Ce=G.length;if(oe!==void 0&&(oe=String(oe).toLowerCase(),oe==="ucs2"||oe==="ucs-2"||oe==="utf16le"||oe==="utf-16le")){if(ie.length<2||G.length<2)return-1;ne=2,fe/=2,Ce/=2,Y/=2}function Le(Fe,$e){return ne===1?Fe[$e]:Fe.readUInt16BE($e*ne)}let je;if(xe){let Fe=-1;for(je=Y;je<fe;je++)if(Le(ie,je)===Le(G,Fe===-1?0:je-Fe)){if(Fe===-1&&(Fe=je),je-Fe+1===Ce)return Fe*ne}else Fe!==-1&&(je-=je-Fe),Fe=-1}else for(Y+Ce>fe&&(Y=fe-Ce),je=Y;je>=0;je--){let Fe=!0;for(let $e=0;$e<Ce;$e++)if(Le(ie,je+$e)!==Le(G,$e)){Fe=!1;break}if(Fe)return je}return-1}R.prototype.includes=function(G,Y,oe){return this.indexOf(G,Y,oe)!==-1},R.prototype.indexOf=function(G,Y,oe){return F(this,G,Y,oe,!0)},R.prototype.lastIndexOf=function(G,Y,oe){return F(this,G,Y,oe,!1)};function I(ie,G,Y,oe){Y=Number(Y)||0;const xe=ie.length-Y;oe?(oe=Number(oe),oe>xe&&(oe=xe)):oe=xe;const ne=G.length;oe>ne/2&&(oe=ne/2);let fe;for(fe=0;fe<oe;++fe){const Ce=parseInt(G.substr(fe*2,2),16);if(lt(Ce))return fe;ie[Y+fe]=Ce}return fe}function $(ie,G,Y,oe){return Ve(Ye(G,ie.length-Y),ie,Y,oe)}function W(ie,G,Y,oe){return Ve(ze(G),ie,Y,oe)}function K(ie,G,Y,oe){return Ve(Ze(G),ie,Y,oe)}function Q(ie,G,Y,oe){return Ve(Ge(G,ie.length-Y),ie,Y,oe)}R.prototype.write=function(G,Y,oe,xe){if(Y===void 0)xe="utf8",oe=this.length,Y=0;else if(oe===void 0&&typeof Y=="string")xe=Y,oe=this.length,Y=0;else if(isFinite(Y))Y=Y>>>0,isFinite(oe)?(oe=oe>>>0,xe===void 0&&(xe="utf8")):(xe=oe,oe=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ne=this.length-Y;if((oe===void 0||oe>ne)&&(oe=ne),G.length>0&&(oe<0||Y<0)||Y>this.length)throw new RangeError("Attempt to write outside buffer bounds");xe||(xe="utf8");let fe=!1;for(;;)switch(xe){case"hex":return I(this,G,Y,oe);case"utf8":case"utf-8":return $(this,G,Y,oe);case"ascii":case"latin1":case"binary":return W(this,G,Y,oe);case"base64":return K(this,G,Y,oe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,G,Y,oe);default:if(fe)throw new TypeError("Unknown encoding: "+xe);xe=(""+xe).toLowerCase(),fe=!0}},R.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function re(ie,G,Y){return G===0&&Y===ie.length?k.fromByteArray(ie):k.fromByteArray(ie.slice(G,Y))}function ue(ie,G,Y){Y=Math.min(ie.length,Y);const oe=[];let xe=G;for(;xe<Y;){const ne=ie[xe];let fe=null,Ce=ne>239?4:ne>223?3:ne>191?2:1;if(xe+Ce<=Y){let Le,je,Fe,$e;switch(Ce){case 1:ne<128&&(fe=ne);break;case 2:Le=ie[xe+1],(Le&192)===128&&($e=(ne&31)<<6|Le&63,$e>127&&(fe=$e));break;case 3:Le=ie[xe+1],je=ie[xe+2],(Le&192)===128&&(je&192)===128&&($e=(ne&15)<<12|(Le&63)<<6|je&63,$e>2047&&($e<55296||$e>57343)&&(fe=$e));break;case 4:Le=ie[xe+1],je=ie[xe+2],Fe=ie[xe+3],(Le&192)===128&&(je&192)===128&&(Fe&192)===128&&($e=(ne&15)<<18|(Le&63)<<12|(je&63)<<6|Fe&63,$e>65535&&$e<1114112&&(fe=$e))}}fe===null?(fe=65533,Ce=1):fe>65535&&(fe-=65536,oe.push(fe>>>10&1023|55296),fe=56320|fe&1023),oe.push(fe),xe+=Ce}return te(oe)}const de=4096;function te(ie){const G=ie.length;if(G<=de)return String.fromCharCode.apply(String,ie);let Y="",oe=0;for(;oe<G;)Y+=String.fromCharCode.apply(String,ie.slice(oe,oe+=de));return Y}function he(ie,G,Y){let oe="";Y=Math.min(ie.length,Y);for(let xe=G;xe<Y;++xe)oe+=String.fromCharCode(ie[xe]&127);return oe}function ke(ie,G,Y){let oe="";Y=Math.min(ie.length,Y);for(let xe=G;xe<Y;++xe)oe+=String.fromCharCode(ie[xe]);return oe}function ye(ie,G,Y){const oe=ie.length;(!G||G<0)&&(G=0),(!Y||Y<0||Y>oe)&&(Y=oe);let xe="";for(let ne=G;ne<Y;++ne)xe+=et[ie[ne]];return xe}function we(ie,G,Y){const oe=ie.slice(G,Y);let xe="";for(let ne=0;ne<oe.length-1;ne+=2)xe+=String.fromCharCode(oe[ne]+oe[ne+1]*256);return xe}R.prototype.slice=function(G,Y){const oe=this.length;G=~~G,Y=Y===void 0?oe:~~Y,G<0?(G+=oe,G<0&&(G=0)):G>oe&&(G=oe),Y<0?(Y+=oe,Y<0&&(Y=0)):Y>oe&&(Y=oe),Y<G&&(Y=G);const xe=this.subarray(G,Y);return Object.setPrototypeOf(xe,R.prototype),xe};function be(ie,G,Y){if(ie%1!==0||ie<0)throw new RangeError("offset is not uint");if(ie+G>Y)throw new RangeError("Trying to access beyond buffer length")}R.prototype.readUintLE=R.prototype.readUIntLE=function(G,Y,oe){G=G>>>0,Y=Y>>>0,oe||be(G,Y,this.length);let xe=this[G],ne=1,fe=0;for(;++fe<Y&&(ne*=256);)xe+=this[G+fe]*ne;return xe},R.prototype.readUintBE=R.prototype.readUIntBE=function(G,Y,oe){G=G>>>0,Y=Y>>>0,oe||be(G,Y,this.length);let xe=this[G+--Y],ne=1;for(;Y>0&&(ne*=256);)xe+=this[G+--Y]*ne;return xe},R.prototype.readUint8=R.prototype.readUInt8=function(G,Y){return G=G>>>0,Y||be(G,1,this.length),this[G]},R.prototype.readUint16LE=R.prototype.readUInt16LE=function(G,Y){return G=G>>>0,Y||be(G,2,this.length),this[G]|this[G+1]<<8},R.prototype.readUint16BE=R.prototype.readUInt16BE=function(G,Y){return G=G>>>0,Y||be(G,2,this.length),this[G]<<8|this[G+1]},R.prototype.readUint32LE=R.prototype.readUInt32LE=function(G,Y){return G=G>>>0,Y||be(G,4,this.length),(this[G]|this[G+1]<<8|this[G+2]<<16)+this[G+3]*16777216},R.prototype.readUint32BE=R.prototype.readUInt32BE=function(G,Y){return G=G>>>0,Y||be(G,4,this.length),this[G]*16777216+(this[G+1]<<16|this[G+2]<<8|this[G+3])},R.prototype.readBigUInt64LE=ft(function(G){G=G>>>0,ve(G,"offset");const Y=this[G],oe=this[G+7];(Y===void 0||oe===void 0)&&Ee(G,this.length-8);const xe=Y+this[++G]*2**8+this[++G]*2**16+this[++G]*2**24,ne=this[++G]+this[++G]*2**8+this[++G]*2**16+oe*2**24;return BigInt(xe)+(BigInt(ne)<<BigInt(32))}),R.prototype.readBigUInt64BE=ft(function(G){G=G>>>0,ve(G,"offset");const Y=this[G],oe=this[G+7];(Y===void 0||oe===void 0)&&Ee(G,this.length-8);const xe=Y*2**24+this[++G]*2**16+this[++G]*2**8+this[++G],ne=this[++G]*2**24+this[++G]*2**16+this[++G]*2**8+oe;return(BigInt(xe)<<BigInt(32))+BigInt(ne)}),R.prototype.readIntLE=function(G,Y,oe){G=G>>>0,Y=Y>>>0,oe||be(G,Y,this.length);let xe=this[G],ne=1,fe=0;for(;++fe<Y&&(ne*=256);)xe+=this[G+fe]*ne;return ne*=128,xe>=ne&&(xe-=Math.pow(2,8*Y)),xe},R.prototype.readIntBE=function(G,Y,oe){G=G>>>0,Y=Y>>>0,oe||be(G,Y,this.length);let xe=Y,ne=1,fe=this[G+--xe];for(;xe>0&&(ne*=256);)fe+=this[G+--xe]*ne;return ne*=128,fe>=ne&&(fe-=Math.pow(2,8*Y)),fe},R.prototype.readInt8=function(G,Y){return G=G>>>0,Y||be(G,1,this.length),this[G]&128?(255-this[G]+1)*-1:this[G]},R.prototype.readInt16LE=function(G,Y){G=G>>>0,Y||be(G,2,this.length);const oe=this[G]|this[G+1]<<8;return oe&32768?oe|4294901760:oe},R.prototype.readInt16BE=function(G,Y){G=G>>>0,Y||be(G,2,this.length);const oe=this[G+1]|this[G]<<8;return oe&32768?oe|4294901760:oe},R.prototype.readInt32LE=function(G,Y){return G=G>>>0,Y||be(G,4,this.length),this[G]|this[G+1]<<8|this[G+2]<<16|this[G+3]<<24},R.prototype.readInt32BE=function(G,Y){return G=G>>>0,Y||be(G,4,this.length),this[G]<<24|this[G+1]<<16|this[G+2]<<8|this[G+3]},R.prototype.readBigInt64LE=ft(function(G){G=G>>>0,ve(G,"offset");const Y=this[G],oe=this[G+7];(Y===void 0||oe===void 0)&&Ee(G,this.length-8);const xe=this[G+4]+this[G+5]*2**8+this[G+6]*2**16+(oe<<24);return(BigInt(xe)<<BigInt(32))+BigInt(Y+this[++G]*2**8+this[++G]*2**16+this[++G]*2**24)}),R.prototype.readBigInt64BE=ft(function(G){G=G>>>0,ve(G,"offset");const Y=this[G],oe=this[G+7];(Y===void 0||oe===void 0)&&Ee(G,this.length-8);const xe=(Y<<24)+this[++G]*2**16+this[++G]*2**8+this[++G];return(BigInt(xe)<<BigInt(32))+BigInt(this[++G]*2**24+this[++G]*2**16+this[++G]*2**8+oe)}),R.prototype.readFloatLE=function(G,Y){return G=G>>>0,Y||be(G,4,this.length),C.read(this,G,!0,23,4)},R.prototype.readFloatBE=function(G,Y){return G=G>>>0,Y||be(G,4,this.length),C.read(this,G,!1,23,4)},R.prototype.readDoubleLE=function(G,Y){return G=G>>>0,Y||be(G,8,this.length),C.read(this,G,!0,52,8)},R.prototype.readDoubleBE=function(G,Y){return G=G>>>0,Y||be(G,8,this.length),C.read(this,G,!1,52,8)};function Me(ie,G,Y,oe,xe,ne){if(!R.isBuffer(ie))throw new TypeError('"buffer" argument must be a Buffer instance');if(G>xe||G<ne)throw new RangeError('"value" argument is out of bounds');if(Y+oe>ie.length)throw new RangeError("Index out of range")}R.prototype.writeUintLE=R.prototype.writeUIntLE=function(G,Y,oe,xe){if(G=+G,Y=Y>>>0,oe=oe>>>0,!xe){const Ce=Math.pow(2,8*oe)-1;Me(this,G,Y,oe,Ce,0)}let ne=1,fe=0;for(this[Y]=G&255;++fe<oe&&(ne*=256);)this[Y+fe]=G/ne&255;return Y+oe},R.prototype.writeUintBE=R.prototype.writeUIntBE=function(G,Y,oe,xe){if(G=+G,Y=Y>>>0,oe=oe>>>0,!xe){const Ce=Math.pow(2,8*oe)-1;Me(this,G,Y,oe,Ce,0)}let ne=oe-1,fe=1;for(this[Y+ne]=G&255;--ne>=0&&(fe*=256);)this[Y+ne]=G/fe&255;return Y+oe},R.prototype.writeUint8=R.prototype.writeUInt8=function(G,Y,oe){return G=+G,Y=Y>>>0,oe||Me(this,G,Y,1,255,0),this[Y]=G&255,Y+1},R.prototype.writeUint16LE=R.prototype.writeUInt16LE=function(G,Y,oe){return G=+G,Y=Y>>>0,oe||Me(this,G,Y,2,65535,0),this[Y]=G&255,this[Y+1]=G>>>8,Y+2},R.prototype.writeUint16BE=R.prototype.writeUInt16BE=function(G,Y,oe){return G=+G,Y=Y>>>0,oe||Me(this,G,Y,2,65535,0),this[Y]=G>>>8,this[Y+1]=G&255,Y+2},R.prototype.writeUint32LE=R.prototype.writeUInt32LE=function(G,Y,oe){return G=+G,Y=Y>>>0,oe||Me(this,G,Y,4,4294967295,0),this[Y+3]=G>>>24,this[Y+2]=G>>>16,this[Y+1]=G>>>8,this[Y]=G&255,Y+4},R.prototype.writeUint32BE=R.prototype.writeUInt32BE=function(G,Y,oe){return G=+G,Y=Y>>>0,oe||Me(this,G,Y,4,4294967295,0),this[Y]=G>>>24,this[Y+1]=G>>>16,this[Y+2]=G>>>8,this[Y+3]=G&255,Y+4};function Se(ie,G,Y,oe,xe){ae(G,oe,xe,ie,Y,7);let ne=Number(G&BigInt(4294967295));ie[Y++]=ne,ne=ne>>8,ie[Y++]=ne,ne=ne>>8,ie[Y++]=ne,ne=ne>>8,ie[Y++]=ne;let fe=Number(G>>BigInt(32)&BigInt(4294967295));return ie[Y++]=fe,fe=fe>>8,ie[Y++]=fe,fe=fe>>8,ie[Y++]=fe,fe=fe>>8,ie[Y++]=fe,Y}function Re(ie,G,Y,oe,xe){ae(G,oe,xe,ie,Y,7);let ne=Number(G&BigInt(4294967295));ie[Y+7]=ne,ne=ne>>8,ie[Y+6]=ne,ne=ne>>8,ie[Y+5]=ne,ne=ne>>8,ie[Y+4]=ne;let fe=Number(G>>BigInt(32)&BigInt(4294967295));return ie[Y+3]=fe,fe=fe>>8,ie[Y+2]=fe,fe=fe>>8,ie[Y+1]=fe,fe=fe>>8,ie[Y]=fe,Y+8}R.prototype.writeBigUInt64LE=ft(function(G,Y=0){return Se(this,G,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),R.prototype.writeBigUInt64BE=ft(function(G,Y=0){return Re(this,G,Y,BigInt(0),BigInt("0xffffffffffffffff"))}),R.prototype.writeIntLE=function(G,Y,oe,xe){if(G=+G,Y=Y>>>0,!xe){const Le=Math.pow(2,8*oe-1);Me(this,G,Y,oe,Le-1,-Le)}let ne=0,fe=1,Ce=0;for(this[Y]=G&255;++ne<oe&&(fe*=256);)G<0&&Ce===0&&this[Y+ne-1]!==0&&(Ce=1),this[Y+ne]=(G/fe>>0)-Ce&255;return Y+oe},R.prototype.writeIntBE=function(G,Y,oe,xe){if(G=+G,Y=Y>>>0,!xe){const Le=Math.pow(2,8*oe-1);Me(this,G,Y,oe,Le-1,-Le)}let ne=oe-1,fe=1,Ce=0;for(this[Y+ne]=G&255;--ne>=0&&(fe*=256);)G<0&&Ce===0&&this[Y+ne+1]!==0&&(Ce=1),this[Y+ne]=(G/fe>>0)-Ce&255;return Y+oe},R.prototype.writeInt8=function(G,Y,oe){return G=+G,Y=Y>>>0,oe||Me(this,G,Y,1,127,-128),G<0&&(G=255+G+1),this[Y]=G&255,Y+1},R.prototype.writeInt16LE=function(G,Y,oe){return G=+G,Y=Y>>>0,oe||Me(this,G,Y,2,32767,-32768),this[Y]=G&255,this[Y+1]=G>>>8,Y+2},R.prototype.writeInt16BE=function(G,Y,oe){return G=+G,Y=Y>>>0,oe||Me(this,G,Y,2,32767,-32768),this[Y]=G>>>8,this[Y+1]=G&255,Y+2},R.prototype.writeInt32LE=function(G,Y,oe){return G=+G,Y=Y>>>0,oe||Me(this,G,Y,4,2147483647,-2147483648),this[Y]=G&255,this[Y+1]=G>>>8,this[Y+2]=G>>>16,this[Y+3]=G>>>24,Y+4},R.prototype.writeInt32BE=function(G,Y,oe){return G=+G,Y=Y>>>0,oe||Me(this,G,Y,4,2147483647,-2147483648),G<0&&(G=4294967295+G+1),this[Y]=G>>>24,this[Y+1]=G>>>16,this[Y+2]=G>>>8,this[Y+3]=G&255,Y+4},R.prototype.writeBigInt64LE=ft(function(G,Y=0){return Se(this,G,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),R.prototype.writeBigInt64BE=ft(function(G,Y=0){return Re(this,G,Y,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ne(ie,G,Y,oe,xe,ne){if(Y+oe>ie.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("Index out of range")}function De(ie,G,Y,oe,xe){return G=+G,Y=Y>>>0,xe||Ne(ie,G,Y,4),C.write(ie,G,Y,oe,23,4),Y+4}R.prototype.writeFloatLE=function(G,Y,oe){return De(this,G,Y,!0,oe)},R.prototype.writeFloatBE=function(G,Y,oe){return De(this,G,Y,!1,oe)};function He(ie,G,Y,oe,xe){return G=+G,Y=Y>>>0,xe||Ne(ie,G,Y,8),C.write(ie,G,Y,oe,52,8),Y+8}R.prototype.writeDoubleLE=function(G,Y,oe){return He(this,G,Y,!0,oe)},R.prototype.writeDoubleBE=function(G,Y,oe){return He(this,G,Y,!1,oe)},R.prototype.copy=function(G,Y,oe,xe){if(!R.isBuffer(G))throw new TypeError("argument should be a Buffer");if(oe||(oe=0),!xe&&xe!==0&&(xe=this.length),Y>=G.length&&(Y=G.length),Y||(Y=0),xe>0&&xe<oe&&(xe=oe),xe===oe||G.length===0||this.length===0)return 0;if(Y<0)throw new RangeError("targetStart out of bounds");if(oe<0||oe>=this.length)throw new RangeError("Index out of range");if(xe<0)throw new RangeError("sourceEnd out of bounds");xe>this.length&&(xe=this.length),G.length-Y<xe-oe&&(xe=G.length-Y+oe);const ne=xe-oe;return this===G&&typeof z.prototype.copyWithin=="function"?this.copyWithin(Y,oe,xe):z.prototype.set.call(G,this.subarray(oe,xe),Y),ne},R.prototype.fill=function(G,Y,oe,xe){if(typeof G=="string"){if(typeof Y=="string"?(xe=Y,Y=0,oe=this.length):typeof oe=="string"&&(xe=oe,oe=this.length),xe!==void 0&&typeof xe!="string")throw new TypeError("encoding must be a string");if(typeof xe=="string"&&!R.isEncoding(xe))throw new TypeError("Unknown encoding: "+xe);if(G.length===1){const fe=G.charCodeAt(0);(xe==="utf8"&&fe<128||xe==="latin1")&&(G=fe)}}else typeof G=="number"?G=G&255:typeof G=="boolean"&&(G=Number(G));if(Y<0||this.length<Y||this.length<oe)throw new RangeError("Out of range index");if(oe<=Y)return this;Y=Y>>>0,oe=oe===void 0?this.length:oe>>>0,G||(G=0);let ne;if(typeof G=="number")for(ne=Y;ne<oe;++ne)this[ne]=G;else{const fe=R.isBuffer(G)?G:R.from(G,xe),Ce=fe.length;if(Ce===0)throw new TypeError('The value "'+G+'" is invalid for argument "value"');for(ne=0;ne<oe-Y;++ne)this[ne+Y]=fe[ne%Ce]}return this};const Je={};function ee(ie,G,Y){Je[ie]=class extends Y{constructor(){super(),Object.defineProperty(this,"message",{value:G.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${ie}]`,this.stack,delete this.name}get code(){return ie}set code(xe){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:xe,writable:!0})}toString(){return`${this.name} [${ie}]: ${this.message}`}}}ee("ERR_BUFFER_OUT_OF_BOUNDS",function(ie){return ie?`${ie} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),ee("ERR_INVALID_ARG_TYPE",function(ie,G){return`The "${ie}" argument must be of type number. Received type ${typeof G}`},TypeError),ee("ERR_OUT_OF_RANGE",function(ie,G,Y){let oe=`The value of "${ie}" is out of range.`,xe=Y;return Number.isInteger(Y)&&Math.abs(Y)>2**32?xe=X(String(Y)):typeof Y=="bigint"&&(xe=String(Y),(Y>BigInt(2)**BigInt(32)||Y<-(BigInt(2)**BigInt(32)))&&(xe=X(xe)),xe+="n"),oe+=` It must be ${G}. Received ${xe}`,oe},RangeError);function X(ie){let G="",Y=ie.length;const oe=ie[0]==="-"?1:0;for(;Y>=oe+4;Y-=3)G=`_${ie.slice(Y-3,Y)}${G}`;return`${ie.slice(0,Y)}${G}`}function Z(ie,G,Y){ve(G,"offset"),(ie[G]===void 0||ie[G+Y]===void 0)&&Ee(G,ie.length-(Y+1))}function ae(ie,G,Y,oe,xe,ne){if(ie>Y||ie<G){const fe=typeof G=="bigint"?"n":"";let Ce;throw G===0||G===BigInt(0)?Ce=`>= 0${fe} and < 2${fe} ** ${(ne+1)*8}${fe}`:Ce=`>= -(2${fe} ** ${(ne+1)*8-1}${fe}) and < 2 ** ${(ne+1)*8-1}${fe}`,new Je.ERR_OUT_OF_RANGE("value",Ce,ie)}Z(oe,xe,ne)}function ve(ie,G){if(typeof ie!="number")throw new Je.ERR_INVALID_ARG_TYPE(G,"number",ie)}function Ee(ie,G,Y){throw Math.floor(ie)!==ie?(ve(ie,Y),new Je.ERR_OUT_OF_RANGE("offset","an integer",ie)):G<0?new Je.ERR_BUFFER_OUT_OF_BOUNDS:new Je.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${G}`,ie)}const Ae=/[^+/0-9A-Za-z-_]/g;function We(ie){if(ie=ie.split("=")[0],ie=ie.trim().replace(Ae,""),ie.length<2)return"";for(;ie.length%4!==0;)ie=ie+"=";return ie}function Ye(ie,G){G=G||1/0;let Y;const oe=ie.length;let xe=null;const ne=[];for(let fe=0;fe<oe;++fe){if(Y=ie.charCodeAt(fe),Y>55295&&Y<57344){if(!xe){if(Y>56319){(G-=3)>-1&&ne.push(239,191,189);continue}else if(fe+1===oe){(G-=3)>-1&&ne.push(239,191,189);continue}xe=Y;continue}if(Y<56320){(G-=3)>-1&&ne.push(239,191,189),xe=Y;continue}Y=(xe-55296<<10|Y-56320)+65536}else xe&&(G-=3)>-1&&ne.push(239,191,189);if(xe=null,Y<128){if((G-=1)<0)break;ne.push(Y)}else if(Y<2048){if((G-=2)<0)break;ne.push(Y>>6|192,Y&63|128)}else if(Y<65536){if((G-=3)<0)break;ne.push(Y>>12|224,Y>>6&63|128,Y&63|128)}else if(Y<1114112){if((G-=4)<0)break;ne.push(Y>>18|240,Y>>12&63|128,Y>>6&63|128,Y&63|128)}else throw new Error("Invalid code point")}return ne}function ze(ie){const G=[];for(let Y=0;Y<ie.length;++Y)G.push(ie.charCodeAt(Y)&255);return G}function Ge(ie,G){let Y,oe,xe;const ne=[];for(let fe=0;fe<ie.length&&!((G-=2)<0);++fe)Y=ie.charCodeAt(fe),oe=Y>>8,xe=Y%256,ne.push(xe),ne.push(oe);return ne}function Ze(ie){return k.toByteArray(We(ie))}function Ve(ie,G,Y,oe){let xe;for(xe=0;xe<oe&&!(xe+Y>=G.length||xe>=ie.length);++xe)G[xe+Y]=ie[xe];return xe}function at(ie,G){return ie instanceof G||ie!=null&&ie.constructor!=null&&ie.constructor.name!=null&&ie.constructor.name===G.name}function lt(ie){return ie!==ie}const et=(function(){const ie="0123456789abcdef",G=new Array(256);for(let Y=0;Y<16;++Y){const oe=Y*16;for(let xe=0;xe<16;++xe)G[oe+xe]=ie[Y]+ie[xe]}return G})();function ft(ie){return typeof BigInt>"u"?ut:ie}function ut(){throw new Error("BigInt not supported")}})(L);const b=L.Buffer;N.Blob=L.Blob,N.BlobOptions=L.BlobOptions,N.Buffer=L.Buffer,N.File=L.File,N.FileOptions=L.FileOptions,N.INSPECT_MAX_BYTES=L.INSPECT_MAX_BYTES,N.SlowBuffer=L.SlowBuffer,N.TranscodeEncoding=L.TranscodeEncoding,N.atob=L.atob,N.btoa=L.btoa,N.constants=L.constants,N.default=b,N.isAscii=L.isAscii,N.isUtf8=L.isUtf8,N.kMaxLength=L.kMaxLength,N.kStringMaxLength=L.kStringMaxLength,N.resolveObjectURL=L.resolveObjectURL,N.transcode=L.transcode})(Ii)),Ii}var zo;function Mt(){return zo||(zo=1,(function(N,L){var w=Vt(),S=w.Buffer;function E(f,o){for(var i in f)o[i]=f[i]}S.from&&S.alloc&&S.allocUnsafe&&S.allocUnsafeSlow?N.exports=w:(E(w,L),L.Buffer=s);function s(f,o,i){return S(f,o,i)}s.prototype=Object.create(S.prototype),E(S,s),s.from=function(f,o,i){if(typeof f=="number")throw new TypeError("Argument must not be a number");return S(f,o,i)},s.alloc=function(f,o,i){if(typeof f!="number")throw new TypeError("Argument must be a number");var e=S(f);return o!==void 0?typeof i=="string"?e.fill(o,i):e.fill(o):e.fill(0),e},s.allocUnsafe=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return S(f)},s.allocUnsafeSlow=function(f){if(typeof f!="number")throw new TypeError("Argument must be a number");return w.SlowBuffer(f)}})(Jr,Jr.exports)),Jr.exports}var $o;function Er(){if($o)return Yr.exports;$o=1;var N=65536,L=4294967295;function w(){throw new Error(`Secure random number generation is not supported by this browser.
Use Chrome, Firefox or Internet Explorer 11`)}var S=Mt().Buffer,E=window.crypto||window.msCrypto;E&&E.getRandomValues?Yr.exports=s:Yr.exports=w;function s(f,o){if(f>L)throw new RangeError("requested too many random bytes");var i=S.allocUnsafe(f);if(f>0)if(f>N)for(var e=0;e<f;e+=N)E.getRandomValues(i.slice(e,e+N));else E.getRandomValues(i);return typeof o=="function"?wt.nextTick(function(){o(null,i)}):i}return Yr.exports}var Qr={exports:{}},Ho;function St(){return Ho||(Ho=1,typeof Object.create=="function"?Qr.exports=function(L,w){w&&(L.super_=w,L.prototype=Object.create(w.prototype,{constructor:{value:L,enumerable:!1,writable:!0,configurable:!0}}))}:Qr.exports=function(L,w){if(w){L.super_=w;var S=function(){};S.prototype=w.prototype,L.prototype=new S,L.prototype.constructor=L}}),Qr.exports}var ei={exports:{}},ti={exports:{}},Vo;function Or(){if(Vo)return ti.exports;Vo=1;var N=typeof Reflect=="object"?Reflect:null,L=N&&typeof N.apply=="function"?N.apply:function(B,D,z){return Function.prototype.apply.call(B,D,z)},w;N&&typeof N.ownKeys=="function"?w=N.ownKeys:Object.getOwnPropertySymbols?w=function(B){return Object.getOwnPropertyNames(B).concat(Object.getOwnPropertySymbols(B))}:w=function(B){return Object.getOwnPropertyNames(B)};function S(C){console&&console.warn&&console.warn(C)}var E=Number.isNaN||function(B){return B!==B};function s(){s.init.call(this)}ti.exports=s,ti.exports.once=b,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var f=10;function o(C){if(typeof C!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof C)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return f},set:function(C){if(typeof C!="number"||C<0||E(C))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+C+".");f=C}}),s.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(B){if(typeof B!="number"||B<0||E(B))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+B+".");return this._maxListeners=B,this};function i(C){return C._maxListeners===void 0?s.defaultMaxListeners:C._maxListeners}s.prototype.getMaxListeners=function(){return i(this)},s.prototype.emit=function(B){for(var D=[],z=1;z<arguments.length;z++)D.push(arguments[z]);var j=B==="error",q=this._events;if(q!==void 0)j=j&&q.error===void 0;else if(!j)return!1;if(j){var H;if(D.length>0&&(H=D[0]),H instanceof Error)throw H;var U=new Error("Unhandled error."+(H?" ("+H.message+")":""));throw U.context=H,U}var R=q[B];if(R===void 0)return!1;if(typeof R=="function")L(R,this,D);else for(var _=R.length,l=h(R,_),z=0;z<_;++z)L(l[z],this,D);return!0};function e(C,B,D,z){var j,q,H;if(o(D),q=C._events,q===void 0?(q=C._events=Object.create(null),C._eventsCount=0):(q.newListener!==void 0&&(C.emit("newListener",B,D.listener?D.listener:D),q=C._events),H=q[B]),H===void 0)H=q[B]=D,++C._eventsCount;else if(typeof H=="function"?H=q[B]=z?[D,H]:[H,D]:z?H.unshift(D):H.push(D),j=i(C),j>0&&H.length>j&&!H.warned){H.warned=!0;var U=new Error("Possible EventEmitter memory leak detected. "+H.length+" "+String(B)+" listeners added. Use emitter.setMaxListeners() to increase limit");U.name="MaxListenersExceededWarning",U.emitter=C,U.type=B,U.count=H.length,S(U)}return C}s.prototype.addListener=function(B,D){return e(this,B,D,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(B,D){return e(this,B,D,!0)};function t(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function a(C,B,D){var z={fired:!1,wrapFn:void 0,target:C,type:B,listener:D},j=t.bind(z);return j.listener=D,z.wrapFn=j,j}s.prototype.once=function(B,D){return o(D),this.on(B,a(this,B,D)),this},s.prototype.prependOnceListener=function(B,D){return o(D),this.prependListener(B,a(this,B,D)),this},s.prototype.removeListener=function(B,D){var z,j,q,H,U;if(o(D),j=this._events,j===void 0)return this;if(z=j[B],z===void 0)return this;if(z===D||z.listener===D)--this._eventsCount===0?this._events=Object.create(null):(delete j[B],j.removeListener&&this.emit("removeListener",B,z.listener||D));else if(typeof z!="function"){for(q=-1,H=z.length-1;H>=0;H--)if(z[H]===D||z[H].listener===D){U=z[H].listener,q=H;break}if(q<0)return this;q===0?z.shift():u(z,q),z.length===1&&(j[B]=z[0]),j.removeListener!==void 0&&this.emit("removeListener",B,U||D)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(B){var D,z,j;if(z=this._events,z===void 0)return this;if(z.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):z[B]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete z[B]),this;if(arguments.length===0){var q=Object.keys(z),H;for(j=0;j<q.length;++j)H=q[j],H!=="removeListener"&&this.removeAllListeners(H);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(D=z[B],typeof D=="function")this.removeListener(B,D);else if(D!==void 0)for(j=D.length-1;j>=0;j--)this.removeListener(B,D[j]);return this};function r(C,B,D){var z=C._events;if(z===void 0)return[];var j=z[B];return j===void 0?[]:typeof j=="function"?D?[j.listener||j]:[j]:D?c(j):h(j,j.length)}s.prototype.listeners=function(B){return r(this,B,!0)},s.prototype.rawListeners=function(B){return r(this,B,!1)},s.listenerCount=function(C,B){return typeof C.listenerCount=="function"?C.listenerCount(B):n.call(C,B)},s.prototype.listenerCount=n;function n(C){var B=this._events;if(B!==void 0){var D=B[C];if(typeof D=="function")return 1;if(D!==void 0)return D.length}return 0}s.prototype.eventNames=function(){return this._eventsCount>0?w(this._events):[]};function h(C,B){for(var D=new Array(B),z=0;z<B;++z)D[z]=C[z];return D}function u(C,B){for(;B+1<C.length;B++)C[B]=C[B+1];C.pop()}function c(C){for(var B=new Array(C.length),D=0;D<B.length;++D)B[D]=C[D].listener||C[D];return B}function b(C,B){return new Promise(function(D,z){function j(H){C.removeListener(B,q),z(H)}function q(){typeof C.removeListener=="function"&&C.removeListener("error",j),D([].slice.call(arguments))}k(C,B,q,{once:!0}),B!=="error"&&v(C,j,{once:!0})})}function v(C,B,D){typeof C.on=="function"&&k(C,"error",B,D)}function k(C,B,D,z){if(typeof C.on=="function")z.once?C.once(B,D):C.on(B,D);else if(typeof C.addEventListener=="function")C.addEventListener(B,function j(q){z.once&&C.removeEventListener(B,j),D(q)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof C)}return ti.exports}var Oi,Wo;function Ko(){return Wo||(Wo=1,Oi=Or().EventEmitter),Oi}const kr=Fo(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Pi,Xo;function gd(){if(Xo)return Pi;Xo=1;function N(h,u){var c=Object.keys(h);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(h);u&&(b=b.filter(function(v){return Object.getOwnPropertyDescriptor(h,v).enumerable})),c.push.apply(c,b)}return c}function L(h){for(var u=1;u<arguments.length;u++){var c=arguments[u]!=null?arguments[u]:{};u%2?N(Object(c),!0).forEach(function(b){w(h,b,c[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(c)):N(Object(c)).forEach(function(b){Object.defineProperty(h,b,Object.getOwnPropertyDescriptor(c,b))})}return h}function w(h,u,c){return u=f(u),u in h?Object.defineProperty(h,u,{value:c,enumerable:!0,configurable:!0,writable:!0}):h[u]=c,h}function S(h,u){if(!(h instanceof u))throw new TypeError("Cannot call a class as a function")}function E(h,u){for(var c=0;c<u.length;c++){var b=u[c];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(h,f(b.key),b)}}function s(h,u,c){return u&&E(h.prototype,u),Object.defineProperty(h,"prototype",{writable:!1}),h}function f(h){var u=o(h,"string");return typeof u=="symbol"?u:String(u)}function o(h,u){if(typeof h!="object"||h===null)return h;var c=h[Symbol.toPrimitive];if(c!==void 0){var b=c.call(h,u);if(typeof b!="object")return b;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(h)}var i=Vt(),e=i.Buffer,t=kr,a=t.inspect,r=a&&a.custom||"inspect";function n(h,u,c){e.prototype.copy.call(h,u,c)}return Pi=(function(){function h(){S(this,h),this.head=null,this.tail=null,this.length=0}return s(h,[{key:"push",value:function(c){var b={data:c,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length}},{key:"unshift",value:function(c){var b={data:c,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length}},{key:"shift",value:function(){if(this.length!==0){var c=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,c}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(c){if(this.length===0)return"";for(var b=this.head,v=""+b.data;b=b.next;)v+=c+b.data;return v}},{key:"concat",value:function(c){if(this.length===0)return e.alloc(0);for(var b=e.allocUnsafe(c>>>0),v=this.head,k=0;v;)n(v.data,b,k),k+=v.data.length,v=v.next;return b}},{key:"consume",value:function(c,b){var v;return c<this.head.data.length?(v=this.head.data.slice(0,c),this.head.data=this.head.data.slice(c)):c===this.head.data.length?v=