/*! For license information please see index.umd.min.js.LICENSE.txt */ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.git=e():t.git=e()}(self,()=>(()=>{var t={41:(t,e,r)=>{"use strict";var n=r(655),i=r(8068),o=r(9675),s=r(5795);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new o("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,f=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],l=!!s&&s(t,e);if(n)n(t,e,{configurable:null===u&&l?l.configurable:!u,enumerable:null===a&&l?l.enumerable:!a,value:r,writable:null===f&&l?l.writable:!f});else{if(!c&&(a||f||u))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},76:t=>{"use strict";t.exports=Function.prototype.call},251:(t,e)=>{e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,f=(1<>1,c=-7,l=r?i-1:0,h=r?-1:1,d=t[e+l];for(l+=h,o=d&(1<<-c)-1,d>>=-c,c+=a;c>0;o=256*o+t[e+l],l+=h,c-=8);for(s=o&(1<<-c)-1,o>>=-c,c+=n;c>0;s=256*s+t[e+l],l+=h,c-=8);if(0===o)o=1-u;else{if(o===f)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=u}return(d?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,f,u=8*o-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=c):(s=Math.floor(Math.log(e)/Math.LN2),e*(f=Math.pow(2,-s))<1&&(s--,f*=2),(e+=s+l>=1?h/f:h*Math.pow(2,1-l))*f>=2&&(s++,f/=2),s+l>=c?(a=0,s=c):s+l>=1?(a=(e*f-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<0;t[r+d]=255&s,d+=p,s/=256,u-=8);t[r+d-p]|=128*g}},392:(t,e,r)=>{"use strict";var n=r(8188).Buffer,i=r(5377);function o(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}o.prototype.update=function(t,e){t=i(t,e||"utf8");for(var r=this._block,n=this._blockSize,o=t.length,s=this._len,a=0;a=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=o},414:t=>{"use strict";t.exports=Math.round},453:(t,e,r)=>{"use strict";var n,i=r(9612),o=r(9383),s=r(1237),a=r(9290),f=r(9538),u=r(8068),c=r(9675),l=r(5345),h=r(1514),d=r(8968),p=r(6188),g=r(8002),y=r(5880),m=r(414),w=r(3093),_=Function,b=function(t){try{return _('"use strict"; return ('+t+").constructor;")()}catch(t){}},v=r(5795),x=r(655),E=function(){throw new c},k=v?function(){try{return E}catch(t){try{return v(arguments,"callee").get}catch(t){return E}}}():E,A=r(4039)(),B=r(3628),S=r(1064),I=r(8648),U=r(1002),O=r(76),P={},R="undefined"!=typeof Uint8Array&&B?B(Uint8Array):n,$={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":A&&B?B([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":P,"%AsyncGenerator%":P,"%AsyncGeneratorFunction%":P,"%AsyncIteratorPrototype%":P,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":s,"%Float16Array%":"undefined"==typeof Float16Array?n:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":_,"%GeneratorFunction%":P,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":A&&B?B(B([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&A&&B?B((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":v,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":f,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&A&&B?B((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":A&&B?B(""[Symbol.iterator]()):n,"%Symbol%":A?Symbol:n,"%SyntaxError%":u,"%ThrowTypeError%":k,"%TypedArray%":R,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet,"%Function.prototype.call%":O,"%Function.prototype.apply%":U,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":S,"%Math.abs%":h,"%Math.floor%":d,"%Math.max%":p,"%Math.min%":g,"%Math.pow%":y,"%Math.round%":m,"%Math.sign%":w,"%Reflect.getPrototypeOf%":I};if(B)try{null.error}catch(t){var T=B(B(t));$["%Error.prototype%"]=T}var j=function t(e){var r;if("%AsyncFunction%"===e)r=b("async function () {}");else if("%GeneratorFunction%"===e)r=b("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=b("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&B&&(r=B(i.prototype))}return $[e]=r,r},z={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=r(6743),M=r(9957),N=C.call(O,Array.prototype.concat),F=C.call(U,Array.prototype.splice),L=C.call(O,String.prototype.replace),D=C.call(O,String.prototype.slice),G=C.call(O,RegExp.prototype.exec),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,q=function(t,e){var r,n=t;if(M(z,n)&&(n="%"+(r=z[n])[0]+"%"),M($,n)){var i=$[n];if(i===P&&(i=j(n)),void 0===i&&!e)throw new c("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new u("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new c('"allowMissing" argument must be a boolean');if(null===G(/^%?[^%]*%?$/,t))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=D(t,0,1),r=D(t,-1);if("%"===e&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new u("invalid intrinsic syntax, expected opening `%`");var n=[];return L(t,Z,function(t,e,r,i){n[n.length]=r?L(i,H,"$1"):e||t}),n}(t),n=r.length>0?r[0]:"",i=q("%"+n+"%",e),o=i.name,s=i.value,a=!1,f=i.alias;f&&(n=f[0],F(r,N([0,1],f)));for(var l=1,h=!0;l=r.length){var y=v(s,d);s=(h=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:s[d]}else h=M(s,d),s=s[d];h&&!a&&($[o]=s)}}return s}},487:(t,e,r)=>{"use strict";var n=r(6897),i=r(655),o=r(3126),s=r(2205);t.exports=function(t){var e=o(arguments),r=t.length-(arguments.length-1);return n(e,1+(r>0?r:0),!0)},i?i(t.exports,"apply",{value:s}):t.exports.apply=s},592:(t,e,r)=>{"use strict";var n=r(655),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=i},655:t=>{"use strict";var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}t.exports=e},809:t=>{"use strict";var e=function(t){if(t=t||{},this.Promise=t.Promise||Promise,this.queues=Object.create(null),this.domainReentrant=t.domainReentrant||!1,this.domainReentrant){if("undefined"==typeof process||void 0===process.domain)throw new Error("Domain-reentrant locks require `process.domain` to exist. Please flip `opts.domainReentrant = false`, use a NodeJS version that still implements Domain, or install a browser polyfill.");this.domains=Object.create(null)}this.timeout=t.timeout||e.DEFAULT_TIMEOUT,this.maxOccupationTime=t.maxOccupationTime||e.DEFAULT_MAX_OCCUPATION_TIME,this.maxExecutionTime=t.maxExecutionTime||e.DEFAULT_MAX_EXECUTION_TIME,t.maxPending===1/0||Number.isInteger(t.maxPending)&&t.maxPending>=0?this.maxPending=t.maxPending:this.maxPending=e.DEFAULT_MAX_PENDING};e.DEFAULT_TIMEOUT=0,e.DEFAULT_MAX_OCCUPATION_TIME=0,e.DEFAULT_MAX_EXECUTION_TIME=0,e.DEFAULT_MAX_PENDING=1e3,e.prototype.acquire=function(t,e,r,n){if(Array.isArray(t))return this._acquireBatch(t,e,r,n);if("function"!=typeof e)throw new Error("You must pass a function to execute");var i=null,o=null,s=null;"function"!=typeof r&&(n=r,r=null,s=new this.Promise(function(t,e){i=t,o=e})),n=n||{};var a=!1,f=null,u=null,c=null,l=this,h=function(e,n,f){u&&(clearTimeout(u),u=null),c&&(clearTimeout(c),c=null),e&&(l.queues[t]&&0===l.queues[t].length&&delete l.queues[t],l.domainReentrant&&delete l.domains[t]),a||(s?n?o(n):i(f):"function"==typeof r&&r(n,f),a=!0),e&&l.queues[t]&&l.queues[t].length>0&&l.queues[t].shift()()},d=function(r){if(a)return h(r);f&&(clearTimeout(f),f=null),l.domainReentrant&&r&&(l.domains[t]=process.domain);var i=n.maxExecutionTime||l.maxExecutionTime;if(i&&(c=setTimeout(function(){l.queues[t]&&h(r,new Error("Maximum execution time is exceeded "+t))},i)),1===e.length){var o=!1;try{e(function(t,e){o||(o=!0,h(r,t,e))})}catch(t){o||(o=!0,h(r,t))}}else l._promiseTry(function(){return e()}).then(function(t){h(r,void 0,t)},function(t){h(r,t)})};l.domainReentrant&&process.domain&&(d=process.domain.bind(d));var p=n.maxPending||l.maxPending;if(l.queues[t])if(l.domainReentrant&&process.domain&&process.domain===l.domains[t])d(!1);else if(l.queues[t].length>=p)h(!1,new Error("Too many pending tasks in queue "+t));else{var g=function(){d(!0)};n.skipQueue?l.queues[t].unshift(g):l.queues[t].push(g);var y=n.timeout||l.timeout;y&&(f=setTimeout(function(){f=null,h(!1,new Error("async-lock timed out in queue "+t))},y))}else l.queues[t]=[],d(!0);var m=n.maxOccupationTime||l.maxOccupationTime;return m&&(u=setTimeout(function(){l.queues[t]&&h(!1,new Error("Maximum occupation time is exceeded in queue "+t))},m)),s||void 0},e.prototype._acquireBatch=function(t,e,r,n){"function"!=typeof r&&(n=r,r=null);var i=this,o=t.reduceRight(function(t,e){return function(t,e){return function(r){i.acquire(t,e,r,n)}}(e,t)},e);if("function"!=typeof r)return new this.Promise(function(t,e){1===o.length?o(function(r,n){r?e(r):t(n)}):t(o())});o(r)},e.prototype.isBusy=function(t){return t?!!this.queues[t]:Object.keys(this.queues).length>0},e.prototype._promiseTry=function(t){try{return this.Promise.resolve(t())}catch(t){return this.Promise.reject(t)}},t.exports=e},945:(t,e,r)=>{var n=r(8287),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},1002:t=>{"use strict";t.exports=Function.prototype.apply},1064:(t,e,r)=>{"use strict";var n=r(9612);t.exports=n.getPrototypeOf||null},1237:t=>{"use strict";t.exports=EvalError},1333:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var i=Object.getOwnPropertySymbols(t);if(1!==i.length||i[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},1447:(t,e,r)=>{"use strict";var n=r(9805),i=r(3269),o=r(4823),s=r(7293),a=r(1998),f=-2,u=12,c=30;function l(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function h(){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 n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function d(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):f}function p(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,d(t)):f}function g(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?f:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,p(t))):f}function y(t,e){var r,n;return t?(n=new h,t.state=n,n.window=null,0!==(r=g(t,e))&&(t.state=null),r):f}var m,w,_=!0;function b(t){if(_){var e;for(m=new n.Buf32(512),w=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(1,t.lens,0,288,m,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(2,t.lens,0,32,w,0,t.work,{bits:5}),_=!1}t.lencode=m,t.lenbits=9,t.distcode=w,t.distbits=5}function v(t,e,r,i){var o,s=t.state;return null===s.window&&(s.wsize=1<=s.wsize?(n.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((o=s.wsize-s.wnext)>i&&(o=i),n.arraySet(s.window,e,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,e,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,r.check=o(r.check,M,2,0),w=0,_=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&w)<<8)+(w>>8))%31){t.msg="incorrect header check",r.mode=c;break}if(8!=(15&w)){t.msg="unknown compression method",r.mode=c;break}if(_-=4,$=8+(15&(w>>>=4)),0===r.wbits)r.wbits=$;else if($>r.wbits){t.msg="invalid window size",r.mode=c;break}r.dmax=1<<$,t.adler=r.check=1,r.mode=512&w?10:u,w=0,_=0;break;case 2:for(;_<16;){if(0===y)break t;y--,w+=h[p++]<<_,_+=8}if(r.flags=w,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=c;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=c;break}r.head&&(r.head.text=w>>8&1),512&r.flags&&(M[0]=255&w,M[1]=w>>>8&255,r.check=o(r.check,M,2,0)),w=0,_=0,r.mode=3;case 3:for(;_<32;){if(0===y)break t;y--,w+=h[p++]<<_,_+=8}r.head&&(r.head.time=w),512&r.flags&&(M[0]=255&w,M[1]=w>>>8&255,M[2]=w>>>16&255,M[3]=w>>>24&255,r.check=o(r.check,M,4,0)),w=0,_=0,r.mode=4;case 4:for(;_<16;){if(0===y)break t;y--,w+=h[p++]<<_,_+=8}r.head&&(r.head.xflags=255&w,r.head.os=w>>8),512&r.flags&&(M[0]=255&w,M[1]=w>>>8&255,r.check=o(r.check,M,2,0)),w=0,_=0,r.mode=5;case 5:if(1024&r.flags){for(;_<16;){if(0===y)break t;y--,w+=h[p++]<<_,_+=8}r.length=w,r.head&&(r.head.extra_len=w),512&r.flags&&(M[0]=255&w,M[1]=w>>>8&255,r.check=o(r.check,M,2,0)),w=0,_=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((k=r.length)>y&&(k=y),k&&(r.head&&($=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,h,p,k,$)),512&r.flags&&(r.check=o(r.check,h,k,p)),y-=k,p+=k,r.length-=k),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===y)break t;k=0;do{$=h[p+k++],r.head&&$&&r.length<65536&&(r.head.name+=String.fromCharCode($))}while($&&k>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=u;break;case 10:for(;_<32;){if(0===y)break t;y--,w+=h[p++]<<_,_+=8}t.adler=r.check=l(w),w=0,_=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=g,t.avail_out=m,t.next_in=p,t.avail_in=y,r.hold=w,r.bits=_,2;t.adler=r.check=1,r.mode=u;case u:if(5===e||6===e)break t;case 13:if(r.last){w>>>=7&_,_-=7&_,r.mode=27;break}for(;_<3;){if(0===y)break t;y--,w+=h[p++]<<_,_+=8}switch(r.last=1&w,_-=1,3&(w>>>=1)){case 0:r.mode=14;break;case 1:if(b(r),r.mode=20,6===e){w>>>=2,_-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=c}w>>>=2,_-=2;break;case 14:for(w>>>=7&_,_-=7&_;_<32;){if(0===y)break t;y--,w+=h[p++]<<_,_+=8}if((65535&w)!=(w>>>16^65535)){t.msg="invalid stored block lengths",r.mode=c;break}if(r.length=65535&w,w=0,_=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(k=r.length){if(k>y&&(k=y),k>m&&(k=m),0===k)break t;n.arraySet(d,h,p,k,g),y-=k,p+=k,m-=k,g+=k,r.length-=k;break}r.mode=u;break;case 17:for(;_<14;){if(0===y)break t;y--,w+=h[p++]<<_,_+=8}if(r.nlen=257+(31&w),w>>>=5,_-=5,r.ndist=1+(31&w),w>>>=5,_-=5,r.ncode=4+(15&w),w>>>=4,_-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=c;break}r.have=0,r.mode=18;case 18:for(;r.have>>=3,_-=3}for(;r.have<19;)r.lens[N[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,j={bits:r.lenbits},T=a(0,r.lens,0,19,r.lencode,0,r.work,j),r.lenbits=j.bits,T){t.msg="invalid code lengths set",r.mode=c;break}r.have=0,r.mode=19;case 19:for(;r.have>>16&255,U=65535&C,!((S=C>>>24)<=_);){if(0===y)break t;y--,w+=h[p++]<<_,_+=8}if(U<16)w>>>=S,_-=S,r.lens[r.have++]=U;else{if(16===U){for(z=S+2;_>>=S,_-=S,0===r.have){t.msg="invalid bit length repeat",r.mode=c;break}$=r.lens[r.have-1],k=3+(3&w),w>>>=2,_-=2}else if(17===U){for(z=S+3;_>>=S)),w>>>=3,_-=3}else{for(z=S+7;_>>=S)),w>>>=7,_-=7}if(r.have+k>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=c;break}for(;k--;)r.lens[r.have++]=$}}if(r.mode===c)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=c;break}if(r.lenbits=9,j={bits:r.lenbits},T=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,j),r.lenbits=j.bits,T){t.msg="invalid literal/lengths set",r.mode=c;break}if(r.distbits=6,r.distcode=r.distdyn,j={bits:r.distbits},T=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,j),r.distbits=j.bits,T){t.msg="invalid distances set",r.mode=c;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(y>=6&&m>=258){t.next_out=g,t.avail_out=m,t.next_in=p,t.avail_in=y,r.hold=w,r.bits=_,s(t,E),g=t.next_out,d=t.output,m=t.avail_out,p=t.next_in,h=t.input,y=t.avail_in,w=r.hold,_=r.bits,r.mode===u&&(r.back=-1);break}for(r.back=0;I=(C=r.lencode[w&(1<>>16&255,U=65535&C,!((S=C>>>24)<=_);){if(0===y)break t;y--,w+=h[p++]<<_,_+=8}if(I&&!(240&I)){for(O=S,P=I,R=U;I=(C=r.lencode[R+((w&(1<>O)])>>>16&255,U=65535&C,!(O+(S=C>>>24)<=_);){if(0===y)break t;y--,w+=h[p++]<<_,_+=8}w>>>=O,_-=O,r.back+=O}if(w>>>=S,_-=S,r.back+=S,r.length=U,0===I){r.mode=26;break}if(32&I){r.back=-1,r.mode=u;break}if(64&I){t.msg="invalid literal/length code",r.mode=c;break}r.extra=15&I,r.mode=22;case 22:if(r.extra){for(z=r.extra;_>>=r.extra,_-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;I=(C=r.distcode[w&(1<>>16&255,U=65535&C,!((S=C>>>24)<=_);){if(0===y)break t;y--,w+=h[p++]<<_,_+=8}if(!(240&I)){for(O=S,P=I,R=U;I=(C=r.distcode[R+((w&(1<>O)])>>>16&255,U=65535&C,!(O+(S=C>>>24)<=_);){if(0===y)break t;y--,w+=h[p++]<<_,_+=8}w>>>=O,_-=O,r.back+=O}if(w>>>=S,_-=S,r.back+=S,64&I){t.msg="invalid distance code",r.mode=c;break}r.offset=U,r.extra=15&I,r.mode=24;case 24:if(r.extra){for(z=r.extra;_>>=r.extra,_-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=c;break}r.mode=25;case 25:if(0===m)break t;if(k=E-m,r.offset>k){if((k=r.offset-k)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=c;break}k>r.wnext?(k-=r.wnext,A=r.wsize-k):A=r.wnext-k,k>r.length&&(k=r.length),B=r.window}else B=d,A=g-r.offset,k=r.length;k>m&&(k=m),m-=k,r.length-=k;do{d[g++]=B[A++]}while(--k);0===r.length&&(r.mode=21);break;case 26:if(0===m)break t;d[g++]=r.length,m--,r.mode=21;break;case 27:if(r.wrap){for(;_<32;){if(0===y)break t;y--,w|=h[p++]<<_,_+=8}if(E-=m,t.total_out+=E,r.total+=E,E&&(t.adler=r.check=r.flags?o(r.check,d,E,g-E):i(r.check,d,E,g-E)),E=m,(r.flags?w:l(w))!==r.check){t.msg="incorrect data check",r.mode=c;break}w=0,_=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;_<32;){if(0===y)break t;y--,w+=h[p++]<<_,_+=8}if(w!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=c;break}w=0,_=0}r.mode=29;case 29:T=1;break t;case c:T=-3;break t;case 31:return-4;default:return f}return t.next_out=g,t.avail_out=m,t.next_in=p,t.avail_in=y,r.hold=w,r.bits=_,(r.wsize||E!==t.avail_out&&r.mode{"use strict";t.exports=Math.abs},1668:(t,e,r)=>{"use strict";var n={};(0,r(9805).assign)(n,r(3303),r(7083),r(9681)),t.exports=n},1996:(t,e,r)=>{"use strict";var n=r(9805),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(t){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){o=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;function f(t,e){if(e<65534&&(t.subarray&&o||!t.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var r="",s=0;s>>6,e[s++]=128|63&r):r<65536?(e[s++]=224|r>>>12,e[s++]=128|r>>>6&63,e[s++]=128|63&r):(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63,e[s++]=128|r>>>6&63,e[s++]=128|63&r);return e},e.buf2binstring=function(t){return f(t,t.length)},e.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r4)u[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;o>1&&r1?u[n++]=65533:i<65536?u[n++]=i:(i-=65536,u[n++]=55296|i>>10&1023,u[n++]=56320|1023&i)}return f(u,n)},e.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;r>=0&&128==(192&t[r]);)r--;return r<0||0===r?e:r+s[t[r]]>e?r:e}},1998:(t,e,r)=>{"use strict";var n=r(9805),i=[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],o=[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],s=[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],a=[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];t.exports=function(t,e,r,f,u,c,l,h){var d,p,g,y,m,w,_,b,v,x=h.bits,E=0,k=0,A=0,B=0,S=0,I=0,U=0,O=0,P=0,R=0,$=null,T=0,j=new n.Buf16(16),z=new n.Buf16(16),C=null,M=0;for(E=0;E<=15;E++)j[E]=0;for(k=0;k=1&&0===j[B];B--);if(S>B&&(S=B),0===B)return u[c++]=20971520,u[c++]=20971520,h.bits=1,0;for(A=1;A0&&(0===t||1!==B))return-1;for(z[1]=0,E=1;E<15;E++)z[E+1]=z[E]+j[E];for(k=0;k852||2===t&&P>592)return 1;for(;;){_=E-U,l[k]w?(b=C[M+l[k]],v=$[T+l[k]]):(b=96,v=0),d=1<>U)+(p-=d)]=_<<24|b<<16|v}while(0!==p);for(d=1<>=1;if(0!==d?(R&=d-1,R+=d):R=0,k++,0===--j[E]){if(E===B)break;E=e[r+l[k]]}if(E>S&&(R&y)!==g){for(0===U&&(U=S),m+=A,O=1<<(I=E-U);I+U852||2===t&&P>592)return 1;u[g=R&y]=S<<24|I<<16|m-c}}return 0!==R&&(u[m+R]=E-U<<24|64<<16),h.bits=S,0}},2205:(t,e,r)=>{"use strict";var n=r(6743),i=r(1002),o=r(3144);t.exports=function(){return o(n,i,arguments)}},2535:t=>{function e(t){return Array.isArray(t)?t:[t]}const r=/^\s+$/,n=/(?:[^\\]|^)\\$/,i=/^\\!/,o=/^\\#/,s=/\r?\n/g,a=/^\.*\/|^\.+$/;let f="node-ignore";"undefined"!=typeof Symbol&&(f=Symbol.for("node-ignore"));const u=f,c=/([0-z])-([0-z])/g,l=()=>!1,h=[[/^\uFEFF/,()=>""],[/((?:\\\\)*?)(\\?\s+)$/,(t,e,r)=>e+(0===r.indexOf("\\")?" ":"")],[/(\\+?)\s/g,(t,e)=>{const{length:r}=e;return e.slice(0,r-r%2)+" "}],[/[\\$.|*+(){^]/g,t=>`\\${t}`],[/(?!\\)\?/g,()=>"[^/]"],[/^\//,()=>"^"],[/\//g,()=>"\\/"],[/^\^*\\\*\\\*\\\//,()=>"^(?:.*\\/)?"],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?"^":"(?:^|\\/)"}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(t,e,r)=>e+6e+r.replace(/\\\*/g,"[^\\/]*")],[/\\\\\\(?=[$.|*+(){^])/g,()=>"\\"],[/\\\\/g,()=>"\\"],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(t,e,r,n,i)=>"\\"===e?`\\[${r}${(t=>{const{length:e}=t;return t.slice(0,e-e%2)})(n)}${i}`:"]"===i&&n.length%2==0?`[${(t=>t.replace(c,(t,e,r)=>e.charCodeAt(0)<=r.charCodeAt(0)?t:""))(r)}${n}]`:"[]"],[/(?:[^*])$/,t=>/\/$/.test(t)?`${t}$`:`${t}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(t,e)=>(e?`${e}[^/]+`:"[^/]*")+"(?=$|\\/$)"]],d=Object.create(null),p=t=>"string"==typeof t;class g{constructor(t,e,r,n){this.origin=t,this.pattern=e,this.negative=r,this.regex=n}}const y=(t,e)=>{throw new e(t)},m=(t,e,r)=>p(t)?t?!m.isNotRelative(t)||r(`path should be a \`path.relative()\`d string, but got "${e}"`,RangeError):r("path must not be empty",TypeError):r(`path must be a string, but got \`${e}\``,TypeError),w=t=>a.test(t);m.isNotRelative=w,m.convert=t=>t;class _{constructor({ignorecase:t=!0,ignoreCase:e=t,allowRelativePaths:r=!1}={}){var n;n=u,Object.defineProperty(this,n,{value:true}),this._rules=[],this._ignoreCase=e,this._allowRelativePaths=r,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(t){if(t&&t[u])return this._rules=this._rules.concat(t._rules),void(this._added=!0);if((t=>t&&p(t)&&!r.test(t)&&!n.test(t)&&0!==t.indexOf("#"))(t)){const e=((t,e)=>{const r=t;let n=!1;0===t.indexOf("!")&&(n=!0,t=t.substr(1));const s=((t,e)=>{let r=d[t];return r||(r=h.reduce((e,[r,n])=>e.replace(r,n.bind(t)),t),d[t]=r),e?new RegExp(r,"i"):new RegExp(r)})(t=t.replace(i,"!").replace(o,"#"),e);return new g(r,t,n,s)})(t,this._ignoreCase);this._added=!0,this._rules.push(e)}}add(t){return this._added=!1,e(p(t)?(t=>t.split(s))(t):t).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(t){return this.add(t)}_testOne(t,e){let r=!1,n=!1;return this._rules.forEach(i=>{const{negative:o}=i;n===o&&r!==n||o&&!r&&!n&&!e||i.regex.test(t)&&(r=!o,n=o)}),{ignored:r,unignored:n}}_test(t,e,r,n){const i=t&&m.convert(t);return m(i,t,this._allowRelativePaths?l:y),this._t(i,e,r,n)}_t(t,e,r,n){if(t in e)return e[t];if(n||(n=t.split("/")),n.pop(),!n.length)return e[t]=this._testOne(t,r);const i=this._t(n.join("/")+"/",e,r,n);return e[t]=i.ignored?i:this._testOne(t,r)}ignores(t){return this._test(t,this._ignoreCache,!1).ignored}createFilter(){return t=>!this.ignores(t)}filter(t){return e(t).filter(this.createFilter())}test(t){return this._test(t,this._testCache,!0)}}const b=t=>new _(t);if(b.isPathValid=t=>m(t&&m.convert(t),t,l),b.default=b,t.exports=b,"undefined"!=typeof process&&(process.env&&process.env.IGNORE_TEST_WIN32||"win32"===process.platform)){const t=t=>/^\\\\\?\\/.test(t)||/["<>|\u0000-\u001F]+/u.test(t)?t:t.replace(/\\/g,"/");m.convert=t;const e=/^[a-z]:\//i;m.isNotRelative=t=>e.test(t)||w(t)}},2566:(t,e)=>{var r;r=function(t){t.version="1.2.2";var e=function(){for(var t=0,e=new Array(256),r=0;256!=r;++r)t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=r)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1,e[r]=t;return"undefined"!=typeof Int32Array?new Int32Array(e):e}(),r=function(t){var e=0,r=0,n=0,i="undefined"!=typeof Int32Array?new Int32Array(4096):new Array(4096);for(n=0;256!=n;++n)i[n]=t[n];for(n=0;256!=n;++n)for(r=t[n],e=256+n;e<4096;e+=256)r=i[e]=r>>>8^t[255&r];var o=[];for(n=1;16!=n;++n)o[n-1]="undefined"!=typeof Int32Array?i.subarray(256*n,256*n+256):i.slice(256*n,256*n+256);return o}(e),n=r[0],i=r[1],o=r[2],s=r[3],a=r[4],f=r[5],u=r[6],c=r[7],l=r[8],h=r[9],d=r[10],p=r[11],g=r[12],y=r[13],m=r[14];t.table=e,t.bstr=function(t,r){for(var n=-1^r,i=0,o=t.length;i>>8^e[255&(n^t.charCodeAt(i++))];return~n},t.buf=function(t,r){for(var w=-1^r,_=t.length-15,b=0;b<_;)w=m[t[b++]^255&w]^y[t[b++]^w>>8&255]^g[t[b++]^w>>16&255]^p[t[b++]^w>>>24]^d[t[b++]]^h[t[b++]]^l[t[b++]]^c[t[b++]]^u[t[b++]]^f[t[b++]]^a[t[b++]]^s[t[b++]]^o[t[b++]]^i[t[b++]]^n[t[b++]]^e[t[b++]];for(_+=15;b<_;)w=w>>>8^e[255&(w^t[b++])];return~w},t.str=function(t,r){for(var n=-1^r,i=0,o=t.length,s=0,a=0;i>>8^e[255&(n^s)]:s<2048?n=(n=n>>>8^e[255&(n^(192|s>>6&31))])>>>8^e[255&(n^(128|63&s))]:s>=55296&&s<57344?(s=64+(1023&s),a=1023&t.charCodeAt(i++),n=(n=(n=(n=n>>>8^e[255&(n^(240|s>>8&7))])>>>8^e[255&(n^(128|s>>2&63))])>>>8^e[255&(n^(128|a>>6&15|(3&s)<<4))])>>>8^e[255&(n^(128|63&a))]):n=(n=(n=n>>>8^e[255&(n^(224|s>>12&15))])>>>8^e[255&(n^(128|s>>6&63))])>>>8^e[255&(n^(128|63&s))];return~n}},"undefined"==typeof DO_NOT_EXPORT_CRC?r(e):r({})},2682:(t,e,r)=>{"use strict";var n=r(9600),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){if(!n(e))throw new TypeError("iterator must be a function");var s,a;arguments.length>=3&&(s=r),a=t,"[object Array]"===i.call(a)?function(t,e,r){for(var n=0,i=t.length;n{"use strict";var n=r(4459);t.exports=function(t){return n(t)||0===t?t:t<0?-1:1}},3126:(t,e,r)=>{"use strict";var n=r(6743),i=r(9675),o=r(76),s=r(3144);t.exports=function(t){if(t.length<1||"function"!=typeof t[0])throw new i("a function is required");return s(n,o,t)}},3144:(t,e,r)=>{"use strict";var n=r(6743),i=r(1002),o=r(76),s=r(7119);t.exports=s||n.call(o,i)},3269:t=>{"use strict";t.exports=function(t,e,r,n){for(var i=65535&t,o=t>>>16&65535,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{o=o+(i=i+e[n++]|0)|0}while(--s);i%=65521,o%=65521}return i|o<<16}},3303:(t,e,r)=>{"use strict";var n=r(8411),i=r(9805),o=r(1996),s=r(4674),a=r(4442),f=Object.prototype.toString;function u(t){if(!(this instanceof u))return new u(t);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==r)throw new Error(s[r]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var c;if(c="string"==typeof e.dictionary?o.string2buf(e.dictionary):"[object ArrayBuffer]"===f.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(r=n.deflateSetDictionary(this.strm,c)))throw new Error(s[r]);this._dict_set=!0}}function c(t,e){var r=new u(e);if(r.push(t,!0),r.err)throw r.msg||s[r.err];return r.result}u.prototype.push=function(t,e){var r,s,a=this.strm,u=this.options.chunkSize;if(this.ended)return!1;s=e===~~e?e:!0===e?4:0,"string"==typeof t?a.input=o.string2buf(t):"[object ArrayBuffer]"===f.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(u),a.next_out=0,a.avail_out=u),1!==(r=n.deflate(a,s))&&0!==r)return this.onEnd(r),this.ended=!0,!1;0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(a.output,a.next_out))):this.onData(i.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||0===a.avail_out)&&1!==r);return 4===s?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==s||(this.onEnd(0),a.avail_out=0,!0)},u.prototype.onData=function(t){this.chunks.push(t)},u.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Deflate=u,e.deflate=c,e.deflateRaw=function(t,e){return(e=e||{}).raw=!0,c(t,e)},e.gzip=function(t,e){return(e=e||{}).gzip=!0,c(t,e)}},3628:(t,e,r)=>{"use strict";var n=r(8648),i=r(1064),o=r(7176);t.exports=n?function(t){return n(t)}:i?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return i(t)}:o?function(t){return o(t)}:null},3665:(t,e,r)=>{"use strict";var n=r(9805);function i(t){for(var e=t.length;--e>=0;)t[e]=0}var o=[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],s=[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],a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],f=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],u=new Array(576);i(u);var c=new Array(60);i(c);var l=new Array(512);i(l);var h=new Array(256);i(h);var d=new Array(29);i(d);var p,g,y,m=new Array(30);function w(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function _(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function b(t){return t<256?l[t]:l[256+(t>>>7)]}function v(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function x(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<>>=1,r<<=1}while(--e>0);return r>>>1}function A(t,e,r){var n,i,o=new Array(16),s=0;for(n=1;n<=15;n++)o[n]=s=s+r[n-1]<<1;for(i=0;i<=e;i++){var a=t[2*i+1];0!==a&&(t[2*i]=k(o[a]++,a))}}function B(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function S(t){t.bi_valid>8?v(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function I(t,e,r,n){var i=2*e,o=2*r;return t[i]>1;r>=1;r--)U(t,o,r);i=f;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,o,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,o[2*i]=o[2*r]+o[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,o[2*r+1]=o[2*n+1]=i,t.heap[1]=i++,U(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,o,s,a,f=e.dyn_tree,u=e.max_code,c=e.stat_desc.static_tree,l=e.stat_desc.has_stree,h=e.stat_desc.extra_bits,d=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(o=0;o<=15;o++)t.bl_count[o]=0;for(f[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(o=f[2*f[2*(n=t.heap[r])+1]+1]+1)>p&&(o=p,g++),f[2*n+1]=o,n>u||(t.bl_count[o]++,s=0,n>=d&&(s=h[n-d]),a=f[2*n],t.opt_len+=a*(o+s),l&&(t.static_len+=a*(c[2*n+1]+s)));if(0!==g){do{for(o=p-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(o=p;0!==o;o--)for(n=t.bl_count[o];0!==n;)(i=t.heap[--r])>u||(f[2*i+1]!==o&&(t.opt_len+=(o-f[2*i+1])*f[2*i],f[2*i+1]=o),n--)}}(t,e),A(o,u,t.bl_count)}function R(t,e,r){var n,i,o=-1,s=e[1],a=0,f=7,u=4;for(0===s&&(f=138,u=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=e[2*(n+1)+1],++a>=7;n<30;n++)for(m[n]=i<<7,t=0;t<1<0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),P(t,t.l_desc),P(t,t.d_desc),s=function(t){var e;for(R(t,t.dyn_ltree,t.l_desc.max_code),R(t,t.dyn_dtree,t.d_desc.max_code),P(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*f[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?j(t,e,r,n):4===t.strategy||o===i?(x(t,2+(n?1:0),3),O(t,u,c)):(x(t,4+(n?1:0),3),function(t,e,r,n){var i;for(x(t,e-257,5),x(t,r-1,5),x(t,n-4,4),i=0;i>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(h[r]+256+1)]++,t.dyn_dtree[2*b(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){x(t,2,3),E(t,256,u),function(t){16===t.bi_valid?(v(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},3737:(t,e,r)=>{"use strict";var n=r(6698),i=r(392),o=r(8188).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function f(){this.init(),this._w=a,i.call(this,64,56)}function u(t){return t<<1|t>>>31}function c(t){return t<<5|t>>>27}function l(t){return t<<30|t>>>2}function h(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(f,i),f.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},f.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,f=0;f<16;++f)e[f]=t.readInt32BE(4*f);for(;f<80;++f)e[f]=u(e[f-3]^e[f-8]^e[f-14]^e[f-16]);for(var d=0;d<80;++d){var p=~~(d/20),g=c(r)+h(p,n,i,o)+a+e[d]+s[p]|0;a=o,o=i,i=l(n),n=r,r=g}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0},f.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=f},4039:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(1333);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},4372:(t,e,r)=>{"use strict";var n=r(9675),i=r(6556)("TypedArray.prototype.buffer",!0),o=r(5680);t.exports=i||function(t){if(!o(t))throw new n("Not a Typed Array");return t.buffer}},4442:t=>{"use strict";t.exports=function(){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}},4459:t=>{"use strict";t.exports=Number.isNaN||function(t){return t!=t}},4634:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},4674:t=>{"use strict";t.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"}},4823:t=>{"use strict";var e=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,r,n,i){var o=e,s=i+n;t^=-1;for(var a=i;a>>8^o[255&(t^r[a])];return-1^t}},5345:t=>{"use strict";t.exports=URIError},5377:(t,e,r)=>{"use strict";var n=r(945).Buffer,i=r(4634),o=r(4372),s=ArrayBuffer.isView||function(t){try{return o(t),!0}catch(t){return!1}},a="undefined"!=typeof Uint8Array,f="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,u=f&&(n.prototype instanceof Uint8Array||n.TYPED_ARRAY_SUPPORT);t.exports=function(t,e){if(t instanceof n)return t;if("string"==typeof t)return n.from(t,e);if(f&&s(t)){if(0===t.byteLength)return n.alloc(0);if(u){var r=n.from(t.buffer,t.byteOffset,t.byteLength);if(r.byteLength===t.byteLength)return r}var o=t instanceof Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),c=n.from(o);if(c.length===t.byteLength)return c}if(a&&t instanceof Uint8Array)return n.from(t);var l=i(t);if(l)for(var h=0;h255||~~d!==d)throw new RangeError("Array items must be numbers in the range 0-255.")}if(l||n.isBuffer(t)&&t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return n.from(t);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}},5680:(t,e,r)=>{"use strict";var n=r(5767);t.exports=function(t){return!!n(t)}},5767:(t,e,r)=>{"use strict";var n=r(2682),i=r(9209),o=r(487),s=r(6556),a=r(5795),f=r(3628),u=s("Object.prototype.toString"),c=r(9092)(),l="undefined"==typeof globalThis?r.g:globalThis,h=i(),d=s("String.prototype.slice"),p=s("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r-1?e:"Object"===e&&function(t){var e=!1;return n(g,function(r,n){if(!e)try{r(t),e=d(n,1)}catch(t){}}),e}(t)}return a?function(t){var e=!1;return n(g,function(r,n){if(!e)try{"$"+r(t)===n&&(e=d(n,1))}catch(t){}}),e}(t):null}},5795:(t,e,r)=>{"use strict";var n=r(6549);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},5880:t=>{"use strict";t.exports=Math.pow},6188:t=>{"use strict";t.exports=Math.max},6549:t=>{"use strict";t.exports=Object.getOwnPropertyDescriptor},6556:(t,e,r)=>{"use strict";var n=r(453),i=r(3126),o=i([n("%String.prototype.indexOf%")]);t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&o(t,".prototype.")>-1?i([r]):r}},6578:t=>{"use strict";t.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},6698:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},6743:(t,e,r)=>{"use strict";var n=r(9353);t.exports=Function.prototype.bind||n},6897:(t,e,r)=>{"use strict";var n=r(453),i=r(41),o=r(592)(),s=r(5795),a=r(9675),f=n("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||f(e)!==e)throw new a("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,u=!0;if("length"in t&&s){var c=s(t,"length");c&&!c.configurable&&(n=!1),c&&!c.writable&&(u=!1)}return(n||u||!r)&&(o?i(t,"length",e,!0,!0):i(t,"length",e)),t}},7083:(t,e,r)=>{"use strict";var n=r(1447),i=r(9805),o=r(1996),s=r(9681),a=r(4674),f=r(4442),u=r(7414),c=Object.prototype.toString;function l(t){if(!(this instanceof l))return new l(t);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new f,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,e.windowBits);if(r!==s.Z_OK)throw new Error(a[r]);if(this.header=new u,n.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=o.string2buf(e.dictionary):"[object ArrayBuffer]"===c.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(r=n.inflateSetDictionary(this.strm,e.dictionary))!==s.Z_OK))throw new Error(a[r])}function h(t,e){var r=new l(e);if(r.push(t,!0),r.err)throw r.msg||a[r.err];return r.result}l.prototype.push=function(t,e){var r,a,f,u,l,h=this.strm,d=this.options.chunkSize,p=this.options.dictionary,g=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof t?h.input=o.binstring2buf(t):"[object ArrayBuffer]"===c.call(t)?h.input=new Uint8Array(t):h.input=t,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new i.Buf8(d),h.next_out=0,h.avail_out=d),(r=n.inflate(h,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&p&&(r=n.inflateSetDictionary(this.strm,p)),r===s.Z_BUF_ERROR&&!0===g&&(r=s.Z_OK,g=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&r!==s.Z_STREAM_END&&(0!==h.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(f=o.utf8border(h.output,h.next_out),u=h.next_out-f,l=o.buf2string(h.output,f),h.next_out=u,h.avail_out=d-u,u&&i.arraySet(h.output,h.output,f,u,0),this.onData(l)):this.onData(i.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(g=!0)}while((h.avail_in>0||0===h.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),h.avail_out=0,!0)},l.prototype.onData=function(t){this.chunks.push(t)},l.prototype.onEnd=function(t){t===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},e.Inflate=l,e.inflate=h,e.inflateRaw=function(t,e){return(e=e||{}).raw=!0,h(t,e)},e.ungzip=h},7119:t=>{"use strict";t.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},7176:(t,e,r)=>{"use strict";var n,i=r(3126),o=r(5795);try{n=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var s=!!n&&o&&o(Object.prototype,"__proto__"),a=Object,f=a.getPrototypeOf;t.exports=s&&"function"==typeof s.get?i([s.get]):"function"==typeof f&&function(t){return f(null==t?t:a(t))}},7293:t=>{"use strict";t.exports=function(t,e){var r,n,i,o,s,a,f,u,c,l,h,d,p,g,y,m,w,_,b,v,x,E,k,A,B;r=t.state,n=t.next_in,A=t.input,i=n+(t.avail_in-5),o=t.next_out,B=t.output,s=o-(e-t.avail_out),a=o+(t.avail_out-257),f=r.dmax,u=r.wsize,c=r.whave,l=r.wnext,h=r.window,d=r.hold,p=r.bits,g=r.lencode,y=r.distcode,m=(1<>>=b=_>>>24,p-=b,0==(b=_>>>16&255))B[o++]=65535&_;else{if(!(16&b)){if(64&b){if(32&b){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}_=g[(65535&_)+(d&(1<>>=b,p-=b),p<15&&(d+=A[n++]<>>=b=_>>>24,p-=b,16&(b=_>>>16&255)){if(x=65535&_,p<(b&=15)&&(d+=A[n++]<f){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=b,p-=b,x>(b=o-s)){if((b=x-b)>c&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(E=0,k=h,0===l){if(E+=u-b,b2;)B[o++]=k[E++],B[o++]=k[E++],B[o++]=k[E++],v-=3;v&&(B[o++]=k[E++],v>1&&(B[o++]=k[E++]))}else{E=o-x;do{B[o++]=B[E++],B[o++]=B[E++],B[o++]=B[E++],v-=3}while(v>2);v&&(B[o++]=B[E++],v>1&&(B[o++]=B[E++]))}break}if(64&b){t.msg="invalid distance code",r.mode=30;break t}_=y[(65535&_)+(d&(1<>3,d&=(1<<(p-=v<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n{"use strict";t.exports=function(){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}},7526:(t,e)=>{"use strict";e.byteLength=function(t){var e=a(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=a(t),s=o[0],f=o[1],u=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,f)),c=0,l=f>0?s-4:s;for(r=0;r>16&255,u[c++]=e>>8&255,u[c++]=255&e;return 2===f&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[c++]=255&e),1===f&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[c++]=e>>8&255,u[c++]=255&e),u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,f=n-i;af?f:a+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function u(t,e,r){for(var n,i=[],o=e;o{"use strict";t.exports=Math.min},8068:t=>{"use strict";t.exports=SyntaxError},8188:(t,e,r)=>{var n=r(8287),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},8287:(t,e,r)=>{"use strict";const n=r(7526),i=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=f,e.SlowBuffer=function(t){return+t!=t&&(t=0),f.alloc(+t)},e.INSPECT_MAX_BYTES=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,f.prototype),e}function f(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!f.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|g(t,e);let n=a(r);const i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(Y(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return h(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(Y(t,ArrayBuffer)||t&&Y(t.buffer,ArrayBuffer))return d(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(Y(t,SharedArrayBuffer)||t&&Y(t.buffer,SharedArrayBuffer)))return d(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return f.from(n,e,r);const i=function(t){if(f.isBuffer(t)){const e=0|p(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||K(t.length)?a(0):h(t):"Buffer"===t.type&&Array.isArray(t.data)?h(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return f.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function c(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return c(t),a(t<0?0:0|p(t))}function h(t){const e=t.length<0?0:0|p(t.length),r=a(e);for(let n=0;n=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function g(t,e){if(f.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||Y(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return q(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return W(t).length;default:if(i)return n?-1:q(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return O(this,e,r);case"utf8":case"utf-8":return B(this,e,r);case"ascii":return I(this,e,r);case"latin1":case"binary":return U(this,e,r);case"base64":return A(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function m(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function w(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),K(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=f.from(e,n)),f.isBuffer(e))return 0===e.length?-1:_(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):_(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function _(t,e,r,n,i){let o,s=1,a=t.length,f=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,f/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;oa&&(r=a-f),o=r;o>=0;o--){let r=!0;for(let n=0;ni&&(n=i):n=i;const o=e.length;let s;for(n>o/2&&(n=o/2),s=0;s>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function A(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function B(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,a,f;switch(s){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(f=(31&e)<<6|63&r,f>127&&(o=f));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(f=(15&e)<<12|(63&r)<<6|63&n,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(f=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,f>65535&&f<1114112&&(o=f))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){const e=t.length;if(e<=S)return String.fromCharCode.apply(String,t);let r="",n=0;for(;nn.length?(f.isBuffer(e)||(e=f.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!f.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},f.byteLength=g,f.prototype._isBuffer=!0,f.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;er&&(t+=" ... "),""},o&&(f.prototype[o]=f.prototype.inspect),f.prototype.compare=function(t,e,r,n,i){if(Y(t,Uint8Array)&&(t=f.from(t,t.offset,t.byteLength)),!f.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const a=Math.min(o,s),u=this.slice(n,i),c=t.slice(e,r);for(let t=0;t>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return v(this,t,e,r);case"ascii":case"latin1":case"binary":return x(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const S=4096;function I(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;in)&&(r=n);let i="";for(let n=e;nr)throw new RangeError("Trying to access beyond buffer length")}function $(t,e,r,n,i,o){if(!f.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||et.length)throw new RangeError("Index out of range")}function T(t,e,r,n,i){D(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function j(t,e,r,n,i){D(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function z(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function C(t,e,r,n,o){return e=+e,r>>>=0,o||z(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function M(t,e,r,n,o){return e=+e,r>>>=0,o||z(t,0,r,8),i.write(t,e,r,n,52,8),r+8}f.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t],i=1,o=0;for(;++o>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},f.prototype.readUint8=f.prototype.readUInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),this[t]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(t,e){return t>>>=0,e||R(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readBigUInt64LE=J(function(t){G(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Z(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Z(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<>>=0,e>>>=0,r||R(t,e,this.length);let n=this[t],i=1,o=0;for(;++o=i&&(n-=Math.pow(2,8*e)),n},f.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||R(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},f.prototype.readInt8=function(t,e){return t>>>=0,e||R(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,e){t>>>=0,e||R(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt16BE=function(t,e){t>>>=0,e||R(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},f.prototype.readInt32LE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,e){return t>>>=0,e||R(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readBigInt64LE=J(function(t){G(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Z(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||Z(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<>>=0,e||R(t,4,this.length),i.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,e){return t>>>=0,e||R(t,4,this.length),i.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,e){return t>>>=0,e||R(t,8,this.length),i.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,e){return t>>>=0,e||R(t,8,this.length),i.read(this,t,!1,52,8)},f.prototype.writeUintLE=f.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||$(this,t,e,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,n||$(this,t,e,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},f.prototype.writeUint8=f.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||$(this,t,e,1,255,0),this[e]=255&t,e+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||$(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||$(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||$(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||$(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeBigUInt64LE=J(function(t,e=0){return T(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=J(function(t,e=0){return j(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);$(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i>>=0,!n){const n=Math.pow(2,8*r-1);$(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o|0)-s&255;return e+r},f.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||$(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},f.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||$(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},f.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||$(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},f.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||$(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},f.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||$(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},f.prototype.writeBigInt64LE=J(function(t,e=0){return T(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=J(function(t,e=0){return j(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeFloatLE=function(t,e,r){return C(this,t,e,!0,r)},f.prototype.writeFloatBE=function(t,e,r){return C(this,t,e,!1,r)},f.prototype.writeDoubleLE=function(t,e,r){return M(this,t,e,!0,r)},f.prototype.writeDoubleBE=function(t,e,r){return M(this,t,e,!1,r)},f.prototype.copy=function(t,e,r,n){if(!f.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function D(t,e,r,n,i,o){if(t>r||t3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new N.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){G(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||Z(e,t.length-(r+1))}(n,i,o)}function G(t,e){if("number"!=typeof t)throw new N.ERR_INVALID_ARG_TYPE(e,"number",t)}function Z(t,e,r){if(Math.floor(t)!==t)throw G(t,r),new N.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new N.ERR_BUFFER_OUT_OF_BOUNDS;throw new N.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}F("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),F("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),F("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=L(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=L(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);const H=/[^+/0-9A-Za-z-_]/g;function q(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let s=0;s55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function W(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function V(t,e,r,n){let i;for(i=0;i=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function Y(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function K(t){return t!=t}const X=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function J(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},8411:(t,e,r)=>{"use strict";var n,i=r(9805),o=r(3665),s=r(3269),a=r(4823),f=r(4674),u=-2,c=258,l=262,h=103,d=113,p=666;function g(t,e){return t.msg=f[e],e}function y(t){return(t<<1)-(t>4?9:0)}function m(t){for(var e=t.length;--e>=0;)t[e]=0}function w(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function _(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,w(t.strm)}function b(t,e){t.pending_buf[t.pending++]=e}function v(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function x(t,e,r,n){var o=t.avail_in;return o>n&&(o=n),0===o?0:(t.avail_in-=o,i.arraySet(e,t.input,t.next_in,o,r),1===t.state.wrap?t.adler=s(t.adler,e,o,r):2===t.state.wrap&&(t.adler=a(t.adler,e,o,r)),t.next_in+=o,t.total_in+=o,o)}function E(t,e){var r,n,i=t.max_chain_length,o=t.strstart,s=t.prev_length,a=t.nice_match,f=t.strstart>t.w_size-l?t.strstart-(t.w_size-l):0,u=t.window,h=t.w_mask,d=t.prev,p=t.strstart+c,g=u[o+s-1],y=u[o+s];t.prev_length>=t.good_match&&(i>>=2),a>t.lookahead&&(a=t.lookahead);do{if(u[(r=e)+s]===y&&u[r+s-1]===g&&u[r]===u[o]&&u[++r]===u[o+1]){o+=2,r++;do{}while(u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&u[++o]===u[++r]&&os){if(t.match_start=e,s=n,n>=a)break;g=u[o+s-1],y=u[o+s]}}}while((e=d[e&h])>f&&0!==--i);return s<=t.lookahead?s:t.lookahead}function k(t){var e,r,n,o,s,a=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=a+(a-l)){i.arraySet(t.window,t.window,a,a,0),t.match_start-=a,t.strstart-=a,t.block_start-=a,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=a?n-a:0}while(--r);e=r=a;do{n=t.prev[--e],t.prev[e]=n>=a?n-a:0}while(--r);o+=a}if(0===t.strm.avail_in)break;if(r=x(t.strm,t.window,t.strstart+t.lookahead,o),t.lookahead+=r,t.lookahead+t.insert>=3)for(s=t.strstart-t.insert,t.ins_h=t.window[s],t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<=3)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<=3&&(t.ins_h=(t.ins_h<4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<15&&(a=2,n-=16),o<1||o>9||8!==r||n<8||n>15||e<0||e>9||s<0||s>4)return g(t,u);8===n&&(n=9);var f=new I;return t.state=f,f.strm=t,f.wrap=a,f.gzhead=null,f.w_bits=n,f.w_size=1<t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(k(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,_(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-l&&(_(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(_(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(_(t,!1),t.strm.avail_out),1)}),new S(4,4,8,4,A),new S(4,5,16,8,A),new S(4,6,32,32,A),new S(4,4,16,16,B),new S(8,16,32,32,B),new S(8,16,128,128,B),new S(8,32,128,256,B),new S(32,128,258,1024,B),new S(32,258,258,4096,B)],e.deflateInit=function(t,e){return P(t,e,8,15,8,0)},e.deflateInit2=P,e.deflateReset=O,e.deflateResetKeep=U,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?u:(t.state.gzhead=e,0):u},e.deflate=function(t,e){var r,i,s,f;if(!t||!t.state||e>5||e<0)return t?g(t,u):u;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||i.status===p&&4!==e)return g(t,0===t.avail_out?-5:u);if(i.strm=t,r=i.last_flush,i.last_flush=e,42===i.status)if(2===i.wrap)t.adler=0,b(i,31),b(i,139),b(i,8),i.gzhead?(b(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)),b(i,255&i.gzhead.time),b(i,i.gzhead.time>>8&255),b(i,i.gzhead.time>>16&255),b(i,i.gzhead.time>>24&255),b(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),b(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(b(i,255&i.gzhead.extra.length),b(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=a(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(b(i,0),b(i,0),b(i,0),b(i,0),b(i,0),b(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),b(i,3),i.status=d);else{var l=8+(i.w_bits-8<<4)<<8;l|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(l|=32),l+=31-l%31,i.status=d,v(i,l),0!==i.strstart&&(v(i,t.adler>>>16),v(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),w(t),s=i.pending,i.pending!==i.pending_buf_size));)b(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),w(t),s=i.pending,i.pending===i.pending_buf_size)){f=1;break}f=i.gzindexs&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),0===f&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),w(t),s=i.pending,i.pending===i.pending_buf_size)){f=1;break}f=i.gzindexs&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),0===f&&(i.status=h)}else i.status=h;if(i.status===h&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&w(t),i.pending+2<=i.pending_buf_size&&(b(i,255&t.adler),b(i,t.adler>>8&255),t.adler=0,i.status=d)):i.status=d),0!==i.pending){if(w(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&y(e)<=y(r)&&4!==e)return g(t,-5);if(i.status===p&&0!==t.avail_in)return g(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&i.status!==p){var x=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(k(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(_(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(_(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(_(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,s,a=t.window;;){if(t.lookahead<=c){if(k(t),t.lookahead<=c&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=a[i=t.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=t.strstart+c;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&it.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(_(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(_(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(_(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==x&&4!==x||(i.status=p),1===x||3===x)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===x&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(m(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),w(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(b(i,255&t.adler),b(i,t.adler>>8&255),b(i,t.adler>>16&255),b(i,t.adler>>24&255),b(i,255&t.total_in),b(i,t.total_in>>8&255),b(i,t.total_in>>16&255),b(i,t.total_in>>24&255)):(v(i,t.adler>>>16),v(i,65535&t.adler)),w(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},e.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&e!==h&&e!==d&&e!==p?g(t,u):(t.state=null,e===d?g(t,-3):0):u},e.deflateSetDictionary=function(t,e){var r,n,o,a,f,c,l,h,d=e.length;if(!t||!t.state)return u;if(2===(a=(r=t.state).wrap)||1===a&&42!==r.status||r.lookahead)return u;for(1===a&&(t.adler=s(t.adler,e,d,0)),r.wrap=0,d>=r.w_size&&(0===a&&(m(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new i.Buf8(r.w_size),i.arraySet(h,e,d-r.w_size,r.w_size,0),e=h,d=r.w_size),f=t.avail_in,c=t.next_in,l=t.input,t.avail_in=d,t.next_in=0,t.input=e,k(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do{r.ins_h=(r.ins_h<{"use strict";t.exports=r(809)},8648:t=>{"use strict";t.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},8968:t=>{"use strict";t.exports=Math.floor},9092:(t,e,r)=>{"use strict";var n=r(1333);t.exports=function(){return n()&&!!Symbol.toStringTag}},9209:(t,e,r)=>{"use strict";var n=r(6578),i="undefined"==typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e{"use strict";t.exports=RangeError},9353:t=>{"use strict";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n{"use strict";t.exports=Error},9538:t=>{"use strict";t.exports=ReferenceError},9600:t=>{"use strict";var e,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i(function(){throw 42},null,e)}catch(t){t!==r&&(i=null)}else i=null;var o=/^\s*class\b/,s=function(t){try{var e=n.call(t);return o.test(e)}catch(t){return!1}},a=function(t){try{return!s(t)&&(n.call(t),!0)}catch(t){return!1}},f=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,c=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var h=document.all;f.call(h)===f.call(document.all)&&(l=function(t){if((c||!t)&&(void 0===t||"object"==typeof t))try{var e=f.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=i?function(t){if(l(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{i(t,null,e)}catch(t){if(t!==r)return!1}return!s(t)&&a(t)}:function(t){if(l(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return a(t);if(s(t))return!1;var e=f.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&a(t)}},9612:t=>{"use strict";t.exports=Object},9675:t=>{"use strict";t.exports=TypeError},9681:t=>{"use strict";t.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}},9805:(t,e)=>{"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)n(r,i)&&(t[i]=r[i])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var o=0;o{"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(6743);t.exports=o.call(n,i)}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};return(()=>{"use strict";r.r(n),r.d(n,{GitConfigManager:()=>g,GitIgnoreManager:()=>_,GitIndexManager:()=>N,GitRefManager:()=>X,GitRemoteHTTP:()=>gt,GitRemoteManager:()=>wt,GitShallowManager:()=>bt,GitStashManager:()=>Kt});const t=t=>{if("boolean"==typeof t)return t;if("true"===(t=t.trim().toLowerCase())||"yes"===t||"on"===t)return!0;if("false"===t||"no"===t||"off"===t)return!1;throw Error(`Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${t}`)},e={core:{filemode:t,bare:t,logallrefupdates:t,symlinks:t,ignorecase:t,bigFileThreshold:t=>{if("number"==typeof t)return t;t=t.toLowerCase();let e=parseInt(t);return t.endsWith("k")&&(e*=1024),t.endsWith("m")&&(e*=1048576),t.endsWith("g")&&(e*=1073741824),e}}},i=/^\[([A-Za-z0-9-.]+)(?: "(.*)")?\]$/,o=/^[A-Za-z0-9-.]+$/,s=/^([A-Za-z][A-Za-z-]*)(?: *= *(.*))?$/,a=/^[A-Za-z][A-Za-z-]*$/,f=/^(.*?)( *[#;].*)$/,u=t=>(t.match(/(?:^|[^\\])"/g)||[]).length%2!=0,c=t=>t.split("").reduce((t,e,r,n)=>{const i='"'===e&&"\\"!==n[r-1],o="\\"===e&&'"'===n[r+1];return i||o?t:t+e},""),l=t=>null!=t?t.toLowerCase():null,h=(t,e,r)=>[l(t),e,l(r)].filter(t=>null!=t).join("."),d=t=>{const e=t.split("."),r=e.shift(),n=e.pop(),i=e.length?e.join("."):void 0;return{section:r,subsection:i,name:n,path:h(r,i,n),sectionPath:h(r,i,null),isSection:!!r}};class p{constructor(t){let e=null,r=null;this.parsedConfig=t?t.split("\n").map(t=>{let n=null,o=null;const a=t.trim(),l=(t=>{const e=i.exec(t);if(null!=e){const[t,r]=e.slice(1);return[t,r]}return null})(a),d=null!=l;if(d)[e,r]=l;else{const t=(t=>{const e=s.exec(t);if(null!=e){const[t,r="true"]=e.slice(1),n=(t=>{const e=f.exec(t);if(null==e)return t;const[r,n]=e.slice(1);return u(r)&&u(n)?`${r}${n}`:r})(r);return[t,c(n)]}return null})(a);null!=t&&([n,o]=t)}const p=h(e,r,n);return{line:t,isSection:d,section:e,subsection:r,name:n,value:o,path:p}}):[]}static from(t){return new p(t)}async get(t,r=!1){const n=d(t).path,i=this.parsedConfig.filter(t=>t.path===n).map(({section:t,name:r,value:n})=>{const i=e[t]&&e[t][r];return i?i(n):n});return r?i:i.pop()}async getall(t){return this.get(t,!0)}async getSubsections(t){return this.parsedConfig.filter(e=>e.isSection&&e.section===t).map(t=>t.subsection)}async deleteSection(t,e){this.parsedConfig=this.parsedConfig.filter(r=>!(r.section===t&&r.subsection===e))}async append(t,e){return this.set(t,e,!0)}async set(t,e,r=!1){const{section:n,subsection:i,name:s,path:f,sectionPath:u,isSection:c}=d(t),l=(h=this.parsedConfig,p=t=>t.path===f,h.reduce((t,e,r)=>p(e)?r:t,-1));var h,p;if(null==e)-1!==l&&this.parsedConfig.splice(l,1);else if(-1!==l){const t=this.parsedConfig[l],n=Object.assign({},t,{name:s,value:e,modified:!0});r?this.parsedConfig.splice(l+1,0,n):this.parsedConfig[l]=n}else{const t=this.parsedConfig.findIndex(t=>t.path===u),r={section:n,subsection:i,name:s,value:e,modified:!0,path:f};if(o.test(n)&&a.test(s))if(t>=0)this.parsedConfig.splice(t+1,0,r);else{const t={isSection:c,section:n,subsection:i,modified:!0,path:u};this.parsedConfig.push(t,r)}}}toString(){return this.parsedConfig.map(({line:t,section:e,subsection:r,name:n,value:i,modified:o=!1})=>o?null!=n&&null!=i?"string"==typeof i&&/[#;]/.test(i)?`\t${n} = "${i}"`:`\t${n} = ${i}`:null!=r?`[${e} "${r}"]`:`[${e}]`:t).join("\n")}}class g{static async get({fs:t,gitdir:e}){const r=await t.read(`${e}/config`,{encoding:"utf8"});return p.from(r)}static async save({fs:t,gitdir:e,config:r}){await t.write(`${e}/config`,r.toString(),{encoding:"utf8"})}}var y=r(2535);function m(t){const e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return-1===e?".":0===e?"/":t.slice(0,e)}function w(...t){if(0===t.length)return".";let e;for(let r=0;r0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":function(t){if(!t.length)return".";const e="/"===t[0],r="/"===t.at(-1);return(t=function(t,e){let r="",n=0,i=-1,o=0,s="\0";for(let a=0;a<=t.length;++a){if(a2){const t=r.lastIndexOf("/");-1===t?(r="",n=0):(r=r.slice(0,t),n=r.length-1-r.lastIndexOf("/")),i=a,o=0;continue}if(0!==r.length){r="",n=0,i=a,o=0;continue}}e&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+="/"+t.slice(i+1,a):r=t.slice(i+1,a),n=a-i-1;i=a,o=0}else"."===s&&-1!==o?++o:o=-1}return r}(t,!e)).length?(r&&(t+="/"),e?`/${t}`:t):e?"/":r?"./":"."}(e)}class _{static async isIgnored({fs:t,dir:e,gitdir:r=w(e,".git"),filepath:n}){if(".git"===function(t){const e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return e>-1&&(t=t.slice(e+1)),t}(n))return!0;if("."===n)return!1;let i="";const o=w(r,"info","exclude");await t.exists(o)&&(i=await t.read(o,"utf8"));const s=[{gitignore:w(e,".gitignore"),filepath:n}],a=n.split("/").filter(Boolean);for(let t=1;t=this.buffer.length}tell(){return this._start}seek(t){this._start=t}slice(t){const e=this.buffer.slice(this._start,this._start+t);return this._start+=t,e}toString(t,e){const r=this.buffer.toString(t,this._start,this._start+e);return this._start+=e,r}write(t,e,r){const n=this.buffer.write(t,this._start,e,r);return this._start+=e,n}copy(t,e,r){const n=t.copy(this.buffer,this._start,e,r);return this._start+=n,n}readUInt8(){const t=this.buffer.readUInt8(this._start);return this._start+=1,t}writeUInt8(t){const e=this.buffer.writeUInt8(t,this._start);return this._start+=1,e}readUInt16BE(){const t=this.buffer.readUInt16BE(this._start);return this._start+=2,t}writeUInt16BE(t){const e=this.buffer.writeUInt16BE(t,this._start);return this._start+=2,e}readUInt32BE(){const t=this.buffer.readUInt32BE(this._start);return this._start+=4,t}writeUInt32BE(t){const e=this.buffer.writeUInt32BE(t,this._start);return this._start+=4,e}}function B(t,e){return function(t,e){return-(te)}(t.path,e.path)}function S(t){let e=t>0?t>>12:0;4!==e&&8!==e&&10!==e&&14!==e&&(e=8);let r=511&t;return r=73&r?493:420,8!==e&&(r=0),(e<<12)+r}const I=2**32;function U(t,e,r,n){if(void 0!==t&&void 0!==e)return[t,e];void 0===r&&(r=n.valueOf());const i=Math.floor(r/1e3);return[i,1e6*(r-1e3*i)]}function O(t){const[e,r]=U(t.ctimeSeconds,t.ctimeNanoseconds,t.ctimeMs,t.ctime),[n,i]=U(t.mtimeSeconds,t.mtimeNanoseconds,t.mtimeMs,t.mtime);return{ctimeSeconds:e%I,ctimeNanoseconds:r%I,mtimeSeconds:n%I,mtimeNanoseconds:i%I,dev:t.dev%I,ino:t.ino%I,mode:S(t.mode%I),uid:t.uid%I,gid:t.gid%I,size:t.size>-1?t.size%I:0}}var P=r(3737);let R=null;async function $(t){return null===R&&(R=await async function(){try{return"da39a3ee5e6b4b0d3255bfef95601890afd80709"===await T(new Uint8Array([]))}catch(t){}return!1}()),R?T(t):function(t){return(new P).update(t).digest("hex")}(t)}async function T(t){return function(t){let e="";for(const r of new Uint8Array(t))r<16&&(e+="0"),e+=r.toString(16);return e}(await crypto.subtle.digest("SHA-1",t))}function j(t){return{assumeValid:Boolean(32768&t),extended:Boolean(16384&t),stage:(12288&t)>>12,nameLength:4095&t}}class z{constructor(t,e){this._dirty=!1,this._unmergedPaths=e||new Set,this._entries=t||new Map}_addEntry(t){if(0===t.flags.stage)t.stages=[t],this._entries.set(t.path,t),this._unmergedPaths.delete(t.path);else{let e=this._entries.get(t.path);e||(this._entries.set(t.path,t),e=t),e.stages[t.flags.stage]=t,this._unmergedPaths.add(t.path)}}static async from(t){if(Buffer.isBuffer(t))return z.fromBuffer(t);if(null===t)return new z(null);throw new E("invalid type passed to GitIndex.from")}static async fromBuffer(t){if(0===t.length)throw new E("Index file is empty (.git/index)");const e=new z,r=new A(t),n=r.toString("utf8",4);if("DIRC"!==n)throw new E(`Invalid dircache magic file number: ${n}`);const i=await $(t.slice(0,-20)),o=t.slice(-20).toString("hex");if(o!==i)throw new E(`Invalid checksum in GitIndex buffer: expected ${o} but saw ${i}`);const s=r.readUInt32BE();if(2!==s)throw new E(`Unsupported dircache version: ${s}`);const a=r.readUInt32BE();let f=0;for(;!r.eof()&&ft.stages.length>1?t.stages.filter(t=>t):t)}*[Symbol.iterator](){for(const t of this.entries)yield t}insert({filepath:t,stats:e,oid:r,stage:n=0}){e||(e={ctimeSeconds:0,ctimeNanoseconds:0,mtimeSeconds:0,mtimeNanoseconds:0,dev:0,ino:0,mode:0,uid:0,gid:0,size:0}),e=O(e);const i=Buffer.from(t),o={ctimeSeconds:e.ctimeSeconds,ctimeNanoseconds:e.ctimeNanoseconds,mtimeSeconds:e.mtimeSeconds,mtimeNanoseconds:e.mtimeNanoseconds,dev:e.dev,ino:e.ino,mode:e.mode||33188,uid:e.uid,gid:e.gid,size:e.size,path:t,oid:r,flags:{assumeValid:!1,extended:!1,stage:n,nameLength:i.length<4095?i.length:4095},stages:[]};this._addEntry(o),this._dirty=!0}delete({filepath:t}){if(this._entries.has(t))this._entries.delete(t);else for(const e of this._entries.keys())e.startsWith(t+"/")&&this._entries.delete(e);this._unmergedPaths.has(t)&&this._unmergedPaths.delete(t),this._dirty=!0}clear(){this._entries.clear(),this._dirty=!0}has({filepath:t}){return this._entries.has(t)}render(){return this.entries.map(t=>`${t.mode.toString(8)} ${t.oid} ${t.path}`).join("\n")}static async _entryToBuffer(t){const e=Buffer.from(t.path),r=8*Math.ceil((62+e.length+1)/8),n=Buffer.alloc(r),i=new A(n),o=O(t);return i.writeUInt32BE(o.ctimeSeconds),i.writeUInt32BE(o.ctimeNanoseconds),i.writeUInt32BE(o.mtimeSeconds),i.writeUInt32BE(o.mtimeNanoseconds),i.writeUInt32BE(o.dev),i.writeUInt32BE(o.ino),i.writeUInt32BE(o.mode),i.writeUInt32BE(o.uid),i.writeUInt32BE(o.gid),i.writeUInt32BE(o.size),i.write(t.oid,20,"hex"),i.writeUInt16BE(function(t){const e=t.flags;return e.extended=!1,e.nameLength=Math.min(Buffer.from(t.path).length,4095),(e.assumeValid?32768:0)+(e.extended?16384:0)+((3&e.stage)<<12)+(4095&e.nameLength)}(t)),i.write(t.path,e.length,"utf8"),n}async toObject(){const t=Buffer.alloc(12),e=new A(t);e.write("DIRC",4,"utf8"),e.writeUInt32BE(2),e.writeUInt32BE(this.entriesFlat.length);let r=[];for(const t of this.entries)if(r.push(z._entryToBuffer(t)),t.stages.length>1)for(const e of t.stages)e&&e!==t&&r.push(z._entryToBuffer(e));r=await Promise.all(r);const n=Buffer.concat(r),i=Buffer.concat([t,n]),o=await $(i);return Buffer.concat([i,Buffer.from(o,"hex")])}}let C=null;const M=Symbol("IndexCache");class N{static async acquire({fs:t,gitdir:e,cache:r,allowUnmerged:n=!0},i){r[M]||(r[M]={map:new Map,stats:new Map});const o=`${e}/index`;let s;null===C&&(C=new b({maxPending:1/0}));let a=[];return await C.acquire(o,async()=>{const e=r[M];await async function(t,e,r){const n=r.stats.get(e);if(void 0===n)return!0;if(null===n)return!1;const i=await t.lstat(e);return null!==i&&function(t,e,r=!0,n=!0){const i=O(t),o=O(e);return r&&i.mode!==o.mode||i.mtimeSeconds!==o.mtimeSeconds||i.ctimeSeconds!==o.ctimeSeconds||i.uid!==o.uid||i.gid!==o.gid||n&&i.ino!==o.ino||i.size!==o.size}(n,i)}(t,o,e)&&await async function(t,e,r){const[n,i]=await Promise.all([t.lstat(e),t.read(e)]),o=await z.from(i);r.map.set(e,o),r.stats.set(e,n)}(t,o,e);const f=e.map.get(o);if(a=f.unmergedPaths,a.length&&!n)throw new x(a);if(s=await i(f),f._dirty){const r=await f.toObject();await t.write(o,r),e.stats.set(o,await t.lstat(o)),f._dirty=!1}}),s}}class F extends v{constructor(t){super(`Expected a 40-char hex object id but saw "${t}".`),this.code=this.name=F.code,this.data={value:t}}}F.code="InvalidOidError";class L extends v{constructor(t){super(`Could not find a fetch refspec for remote "${t}". Make sure the config file has an entry like the following:\n[remote "${t}"]\n\tfetch = +refs/heads/*:refs/remotes/origin/*\n`),this.code=this.name=L.code,this.data={remote:t}}}L.code="NoRefspecError";class D extends v{constructor(t){super(`Could not find ${t}.`),this.code=this.name=D.code,this.data={what:t}}}D.code="NotFoundError";class G{constructor(t){if(this.refs=new Map,this.parsedConfig=[],t){let e=null;this.parsedConfig=t.trim().split("\n").map(t=>{if(/^\s*#/.test(t))return{line:t,comment:!0};const r=t.indexOf(" ");if(t.startsWith("^")){const r=t.slice(1);return this.refs.set(e+"^{}",r),{line:t,ref:e,peeled:r}}{const n=t.slice(0,r);return e=t.slice(r+1),this.refs.set(e,n),{line:t,ref:e,oid:n}}})}return this}static from(t){return new G(t)}delete(t){this.parsedConfig=this.parsedConfig.filter(e=>e.ref!==t),this.refs.delete(t)}toString(){return this.parsedConfig.map(({line:t})=>t).join("\n")+"\n"}}class Z{constructor({remotePath:t,localPath:e,force:r,matchPrefix:n}){Object.assign(this,{remotePath:t,localPath:e,force:r,matchPrefix:n})}static from(t){const[e,r,n,i,o]=t.match(/^(\+?)(.*?)(\*?):(.*?)(\*?)$/).slice(1),s="+"===e,a="*"===n;if(a!==("*"===o))throw new E("Invalid refspec");return new Z({remotePath:r,localPath:i,force:s,matchPrefix:a})}translate(t){if(this.matchPrefix){if(t.startsWith(this.remotePath))return this.localPath+t.replace(this.remotePath,"")}else if(t===this.remotePath)return this.localPath;return null}reverseTranslate(t){if(this.matchPrefix){if(t.startsWith(this.localPath))return this.remotePath+t.replace(this.localPath,"")}else if(t===this.localPath)return this.remotePath;return null}}class H{constructor(t=[]){this.rules=t}static from(t){const e=[];for(const r of t)e.push(Z.from(r));return new H(e)}add(t){const e=Z.from(t);this.rules.push(e)}translate(t){const e=[];for(const r of this.rules)for(const n of t){const t=r.translate(n);t&&e.push([n,t])}return e}translateOne(t){let e=null;for(const r of this.rules){const n=r.translate(t);n&&(e=n)}return e}localNamespaces(){return this.rules.filter(t=>t.matchPrefix).map(t=>t.localPath.replace(/\/$/,""))}}function q(t,e){const r=t.replace(/\^\{\}$/,""),n=e.replace(/\^\{\}$/,""),i=-(rn);return 0===i?t.endsWith("^{}")?1:-1:i}const W=t=>[`${t}`,`refs/${t}`,`refs/tags/${t}`,`refs/heads/${t}`,`refs/remotes/${t}`,`refs/remotes/${t}/HEAD`],V=["config","description","index","shallow","commondir"];let Y;async function K(t,e){return void 0===Y&&(Y=new b),Y.acquire(t,e)}class X{static async updateRemoteRefs({fs:t,gitdir:e,remote:r,refs:n,symrefs:i,tags:o,refspecs:s,prune:a=!1,pruneTags:f=!1}){for(const t of n.values())if(!t.match(/[0-9a-f]{40}/))throw new F(t);const u=await g.get({fs:t,gitdir:e});if(!s){if(0===(s=await u.getall(`remote.${r}.fetch`)).length)throw new L(r);s.unshift(`+HEAD:refs/remotes/${r}/HEAD`)}const c=H.from(s),l=new Map;if(f){const r=await X.listRefs({fs:t,gitdir:e,filepath:"refs/tags"});await X.deleteRefs({fs:t,gitdir:e,refs:r.map(t=>`refs/tags/${t}`)})}if(o)for(const r of n.keys())if(r.startsWith("refs/tags")&&!r.endsWith("^{}")&&!await X.exists({fs:t,gitdir:e,ref:r})){const t=n.get(r);l.set(r,t)}const h=c.translate([...n.keys()]);for(const[t,e]of h){const r=n.get(t);l.set(e,r)}const d=c.translate([...i.keys()]);for(const[t,e]of d){const r=i.get(t),n=c.translateOne(r);n&&l.set(e,`ref: ${n}`)}const p=[];if(a){for(const r of c.localNamespaces()){const n=(await X.listRefs({fs:t,gitdir:e,filepath:r})).map(t=>`${r}/${t}`);for(const t of n)l.has(t)||p.push(t)}p.length>0&&await X.deleteRefs({fs:t,gitdir:e,refs:p})}for(const[r,n]of l)await K(r,async()=>t.write(w(e,r),`${n.trim()}\n`,"utf8"));return{pruned:p}}static async writeRef({fs:t,gitdir:e,ref:r,value:n}){if(!n.match(/[0-9a-f]{40}/))throw new F(n);await K(r,async()=>t.write(w(e,r),`${n.trim()}\n`,"utf8"))}static async writeSymbolicRef({fs:t,gitdir:e,ref:r,value:n}){await K(r,async()=>t.write(w(e,r),`ref: ${n.trim()}\n`,"utf8"))}static async deleteRef({fs:t,gitdir:e,ref:r}){return X.deleteRefs({fs:t,gitdir:e,refs:[r]})}static async deleteRefs({fs:t,gitdir:e,refs:r}){await Promise.all(r.map(r=>t.rm(w(e,r))));let n=await K("packed-refs",async()=>t.read(`${e}/packed-refs`,{encoding:"utf8"}));const i=G.from(n),o=i.refs.size;for(const t of r)i.refs.has(t)&&i.delete(t);i.refs.sizet.write(`${e}/packed-refs`,n,{encoding:"utf8"})))}static async resolve({fs:t,gitdir:e,ref:r,depth:n}){if(void 0!==n&&-1===--n)return r;if(r.startsWith("ref: "))return r=r.slice(5),X.resolve({fs:t,gitdir:e,ref:r,depth:n});if(40===r.length&&/[0-9a-f]{40}/.test(r))return r;const i=await X.packedRefs({fs:t,gitdir:e}),o=W(r).filter(t=>!V.includes(t));for(const r of o){const o=await K(r,async()=>await t.read(`${e}/${r}`,{encoding:"utf8"})||i.get(r));if(o)return X.resolve({fs:t,gitdir:e,ref:o.trim(),depth:n})}throw new D(r)}static async exists({fs:t,gitdir:e,ref:r}){try{return await X.expand({fs:t,gitdir:e,ref:r}),!0}catch(t){return!1}}static async expand({fs:t,gitdir:e,ref:r}){if(40===r.length&&/[0-9a-f]{40}/.test(r))return r;const n=await X.packedRefs({fs:t,gitdir:e}),i=W(r);for(const r of i){if(await K(r,async()=>t.exists(`${e}/${r}`)))return r;if(n.has(r))return r}throw new D(r)}static async expandAgainstMap({ref:t,map:e}){const r=W(t);for(const t of r)if(await e.has(t))return t;throw new D(t)}static resolveAgainstMap({ref:t,fullref:e=t,depth:r,map:n}){if(void 0!==r&&-1===--r)return{fullref:e,oid:t};if(t.startsWith("ref: "))return t=t.slice(5),X.resolveAgainstMap({ref:t,fullref:e,depth:r,map:n});if(40===t.length&&/[0-9a-f]{40}/.test(t))return{fullref:e,oid:t};const i=W(t);for(const t of i){const e=n.get(t);if(e)return X.resolveAgainstMap({ref:e.trim(),fullref:t,depth:r,map:n})}throw new D(t)}static async packedRefs({fs:t,gitdir:e}){const r=await K("packed-refs",async()=>t.read(`${e}/packed-refs`,{encoding:"utf8"}));return G.from(r).refs}static async listRefs({fs:t,gitdir:e,filepath:r}){const n=X.packedRefs({fs:t,gitdir:e});let i=null;try{i=await t.readdirDeep(`${e}/${r}`),i=i.map(t=>t.replace(`${e}/${r}/`,""))}catch(t){i=[]}for(let t of(await n).keys())t.startsWith(r)&&(t=t.replace(r+"/",""),i.includes(t)||i.push(t));return i.sort(q),i}static async listBranches({fs:t,gitdir:e,remote:r}){return r?X.listRefs({fs:t,gitdir:e,filepath:`refs/remotes/${r}`}):X.listRefs({fs:t,gitdir:e,filepath:"refs/heads"})}static async listTags({fs:t,gitdir:e}){return(await X.listRefs({fs:t,gitdir:e,filepath:"refs/tags"})).filter(t=>!t.endsWith("^{}"))}}class J extends v{constructor(t,e,r){super(`HTTP Error: ${t} ${e}`),this.code=this.name=J.code,this.data={statusCode:t,statusMessage:e,response:r}}}J.code="HttpError";class Q extends v{constructor(t,e){super(`Remote did not reply using the "smart" HTTP protocol. Expected "001e# service=git-upload-pack" but received: ${t}`),this.code=this.name=Q.code,this.data={preview:t,response:e}}}Q.code="SmartHttpError";class tt extends v{constructor(){super("The operation was canceled."),this.code=this.name=tt.code,this.data={}}}function et({username:t="",password:e=""}){return`Basic ${Buffer.from(`${t}:${e}`).toString("base64")}`}function rt(t){return t[Symbol.asyncIterator]?t[Symbol.asyncIterator]():t[Symbol.iterator]?t[Symbol.iterator]():t.next?t:function(t){let e=[t];return{next:()=>Promise.resolve({done:0===e.length,value:e.pop()}),return:()=>(e=[],{}),[Symbol.asyncIterator](){return this}}}(t)}function nt(t){let e=t.match(/^https?:\/\/([^/]+)@/);if(null==e)return{url:t,auth:{}};e=e[1];const[r,n]=e.split(":");return{url:t=t.replace(`${e}@`,""),auth:{username:r,password:n}}}tt.code="UserCanceledError";class it extends v{constructor(){super("Empty response from git server."),this.code=this.name=it.code,this.data={}}}it.code="EmptyServerResponseError";class ot extends v{constructor(t,e){super(`Expected "${t}" but received "${e}".`),this.code=this.name=ot.code,this.data={expected:t,actual:e}}}ot.code="ParseError";class st{constructor(t){if("undefined"==typeof Buffer)throw new Error("Missing Buffer dependency");this.stream=rt(t),this.buffer=null,this.cursor=0,this.undoCursor=0,this.started=!1,this._ended=!1,this._discardedBytes=0}eof(){return this._ended&&this.cursor===this.buffer.length}tell(){return this._discardedBytes+this.cursor}async byte(){if(!this.eof()&&(this.started||await this._init(),this.cursor!==this.buffer.length||(await this._loadnext(),!this._ended)))return this._moveCursor(1),this.buffer[this.undoCursor]}async chunk(){if(!this.eof()&&(this.started||await this._init(),this.cursor!==this.buffer.length||(await this._loadnext(),!this._ended)))return this._moveCursor(this.buffer.length),this.buffer.slice(this.undoCursor,this.cursor)}async read(t){if(!this.eof())return this.started||await this._init(),this.cursor+t>this.buffer.length&&(this._trim(),await this._accumulate(t)),this._moveCursor(t),this.buffer.slice(this.undoCursor,this.cursor)}async skip(t){this.eof()||(this.started||await this._init(),this.cursor+t>this.buffer.length&&(this._trim(),await this._accumulate(t)),this._moveCursor(t))}async undo(){this.cursor=this.undoCursor}async _next(){this.started=!0;let{done:t,value:e}=await this.stream.next();return t&&(this._ended=!0,!e)?Buffer.alloc(0):(e&&(e=Buffer.from(e)),e)}_trim(){this.buffer=this.buffer.slice(this.undoCursor),this.cursor-=this.undoCursor,this._discardedBytes+=this.undoCursor,this.undoCursor=0}_moveCursor(t){this.undoCursor=this.cursor,this.cursor+=t,this.cursor>this.buffer.length&&(this.cursor=this.buffer.length)}async _accumulate(t){if(this._ended)return;const e=[this.buffer];for(;this.cursor+t>at(e);){const t=await this._next();if(this._ended)break;e.push(t)}this.buffer=Buffer.concat(e)}async _loadnext(){this._discardedBytes+=this.buffer.length,this.undoCursor=0,this.cursor=0,this.buffer=await this._next()}async _init(){this.buffer=await this._next()}}function at(t){return t.reduce((t,e)=>t+e.length,0)}class ft{static flush(){return Buffer.from("0000","utf8")}static delim(){return Buffer.from("0001","utf8")}static encode(t){"string"==typeof t&&(t=Buffer.from(t));const e=function(t,e){const r=e.toString(16);return"0".repeat(4-r.length)+r}(0,t.length+4);return Buffer.concat([Buffer.from(e,"utf8"),t])}static streamReader(t){const e=new st(t);return async function(){try{let t=await e.read(4);if(null==t)return!0;if(t=parseInt(t.toString("utf8"),16),0===t)return null;if(1===t)return null;const r=await e.read(t-4);return null==r||r}catch(e){return t.error=e,!0}}}}async function ut(t){const e={};let r;for(;r=await t(),!0!==r;){if(null===r)continue;r=r.toString("utf8").replace(/\n$/,"");const t=r.indexOf("=");if(t>-1){const n=r.slice(0,t),i=r.slice(t+1);e[n]=i}else e[r]=!0}return{protocolVersion:2,capabilities2:e}}async function ct(t,{service:e}){const r=new Set,n=new Map,i=new Map,o=ft.streamReader(t);let s=await o();for(;null===s;)s=await o();if(!0===s)throw new it;if(s.includes("version 2"))return ut(o);if(s.toString("utf8").replace(/\n$/,"")!==`# service=${e}`)throw new ot(`# service=${e}\\n`,s.toString("utf8"));let a=await o();for(;null===a;)a=await o();if(!0===a)return{capabilities:r,refs:n,symrefs:i};if(a=a.toString("utf8"),a.includes("version 2"))return ut(o);const[f,u]=lt(a,"\0","\\x00");if(u.split(" ").map(t=>r.add(t)),"0000000000000000000000000000000000000000 capabilities^{}"!==f){const[t,e]=lt(f," "," ");for(n.set(e,t);;){const t=await o();if(!0===t)break;if(null!==t){const[e,r]=lt(t.toString("utf8")," "," ");n.set(r,e)}}}for(const t of r)if(t.startsWith("symref=")){const e=t.match(/symref=([^:]+):(.*)/);3===e.length&&i.set(e[1],e[2])}return{protocolVersion:1,capabilities:r,refs:n,symrefs:i}}function lt(t,e,r){const n=t.trim().split(e);if(2!==n.length)throw new ot(`Two strings separated by '${r}'`,t.toString("utf8"));return n}const ht=(t,e)=>t.endsWith("?")?`${t}${e}`:`${t}/${e.replace(/^https?:\/\//,"")}`,dt=(t,e)=>{(e.username||e.password)&&(t.Authorization=et(e)),e.headers&&Object.assign(t,e.headers)},pt=async t=>{try{const e=Buffer.from(await async function(t){let e=0;const r=[];await async function(t,e){const r=rt(t);for(;;){const{value:t,done:n}=await r.next();if(t&&await e(t),n)break}r.return&&r.return()}(t,t=>{r.push(t),e+=t.byteLength});const n=new Uint8Array(e);let i=0;for(const t of r)n.set(t,i),i+=t.byteLength;return n}(t.body)),r=e.toString("utf8");return{preview:r.length<256?r:r.slice(0,256)+"...",response:r,data:e}}catch(t){return{}}};class gt{static async capabilities(){return["discover","connect"]}static async discover({http:t,onProgress:e,onAuth:r,onAuthSuccess:n,onAuthFailure:i,corsProxy:o,service:s,url:a,headers:f,protocolVersion:u}){let{url:c,auth:l}=nt(a);const h=o?ht(o,c):c;let d,p;(l.username||l.password)&&(f.Authorization=et(l)),2===u&&(f["Git-Protocol"]="version=2");let g=!1;do{if(d=await t.request({onProgress:e,method:"GET",url:`${h}/info/refs?service=${s}`,headers:f}),p=!1,401===d.statusCode||203===d.statusCode){const t=g?i:r;if(t){if(l=await t(c,{...l,headers:{...f}}),l&&l.cancel)throw new tt;l&&(dt(f,l),g=!0,p=!0)}}else 200===d.statusCode&&g&&n&&await n(c,l)}while(p);if(200!==d.statusCode){const{response:t}=await pt(d);throw new J(d.statusCode,d.statusMessage,t)}if(d.headers["content-type"]===`application/x-${s}-advertisement`){const t=await ct(d.body,{service:s});return t.auth=l,t}{const{preview:t,response:e,data:r}=await pt(d);try{const t=await ct([r],{service:s});return t.auth=l,t}catch(r){throw new Q(t,e)}}}static async connect({http:t,onProgress:e,corsProxy:r,service:n,url:i,auth:o,body:s,headers:a}){const f=nt(i);f&&(i=f.url),r&&(i=ht(r,i)),a["content-type"]=`application/x-${n}-request`,a.accept=`application/x-${n}-result`,dt(a,o);const u=await t.request({onProgress:e,method:"POST",url:`${i}/${n}`,body:s,headers:a});if(200!==u.statusCode){const{response:t}=pt(u);throw new J(u.statusCode,u.statusMessage,t)}return u}}class yt extends v{constructor(t,e,r){super(`Git remote "${t}" uses an unrecognized transport protocol: "${e}"`),this.code=this.name=yt.code,this.data={url:t,transport:e,suggestion:r}}}yt.code="UnknownTransportError";class mt extends v{constructor(t){super(`Cannot parse remote URL: "${t}"`),this.code=this.name=mt.code,this.data={url:t}}}mt.code="UrlParseError";class wt{static getRemoteHelperFor({url:t}){const e=new Map;e.set("http",gt),e.set("https",gt);const r=function({url:t}){if(t.startsWith("git@"))return{transport:"ssh",address:t};const e=t.match(/(\w+)(:\/\/|::)(.*)/);return null!==e?"://"===e[2]?{transport:e[1],address:e[0]}:"::"===e[2]?{transport:e[1],address:e[3]}:void 0:void 0}({url:t});if(!r)throw new mt(t);if(e.has(r.transport))return e.get(r.transport);throw new yt(t,r.transport,"ssh"===r.transport?function(t){return(t=t.replace(/^git@([^:]+):/,"https://$1/")).replace(/^ssh:\/\//,"https://")}(t):void 0)}}let _t=null;class bt{static async read({fs:t,gitdir:e}){null===_t&&(_t=new b);const r=w(e,"shallow"),n=new Set;return await _t.acquire(r,async function(){const e=await t.read(r,{encoding:"utf8"});return null===e||""===e.trim()?n:void e.trim().split("\n").map(t=>n.add(t))}),n}static async write({fs:t,gitdir:e,oids:r}){null===_t&&(_t=new b);const n=w(e,"shallow");if(r.size>0){const e=[...r].join("\n")+"\n";await _t.acquire(n,async function(){await t.write(n,e,{encoding:"utf8"})})}else await _t.acquire(n,async function(){await t.rm(n)})}}class vt extends v{constructor(t,e,r,n){super(`Object ${t} ${n?`at ${n}`:""}was anticipated to be a ${r} but it is a ${e}.`),this.code=this.name=vt.code,this.data={oid:t,actual:e,expected:r,filepath:n}}}function xt({name:t,email:e,timestamp:r,timezoneOffset:n}){return`${t} <${e}> ${r} ${n=function(t){const e=function(t){return Math.sign(t)||(Object.is(t,-0)?-1:1)}(0===(r=t)?r:-r);var r;t=Math.abs(t);const n=Math.floor(t/60);t-=60*n;let i=String(n),o=String(t);return i.length<2&&(i="0"+i),o.length<2&&(o="0"+o),(-1===e?"-":"+")+i+o}(n)}`}function Et(t){return(t=(t=t.replace(/\r/g,"")).replace(/^\n+/,"")).replace(/\n+$/,"")+"\n"}function kt(t){const[,e,r,n,i]=t.match(/^(.*) <(.*)> (.*) (.*)$/);return{name:e,email:r,timestamp:Number(n),timezoneOffset:At(i)}}function At(t){let[,e,r,n]=t.match(/(\+|-)(\d\d)(\d\d)/);return n=("+"===e?1:-1)*(60*Number(r)+Number(n)),0===(i=n)?i:-i;var i}vt.code="ObjectTypeError";class Bt{constructor(t){if("string"==typeof t)this._tag=t;else if(Buffer.isBuffer(t))this._tag=t.toString("utf8");else{if("object"!=typeof t)throw new E("invalid type passed to GitAnnotatedTag constructor");this._tag=Bt.render(t)}}static from(t){return new Bt(t)}static render(t){return`object ${t.object}\ntype ${t.type}\ntag ${t.tag}\ntagger ${xt(t.tagger)}\n\n${t.message}\n${t.gpgsig?t.gpgsig:""}`}justHeaders(){return this._tag.slice(0,this._tag.indexOf("\n\n"))}message(){const t=this.withoutSignature();return t.slice(t.indexOf("\n\n")+2)}parse(){return Object.assign(this.headers(),{message:this.message(),gpgsig:this.gpgsig()})}render(){return this._tag}headers(){const t=this.justHeaders().split("\n"),e=[];for(const r of t)" "===r[0]?e[e.length-1]+="\n"+r.slice(1):e.push(r);const r={};for(const t of e){const e=t.slice(0,t.indexOf(" ")),n=t.slice(t.indexOf(" ")+1);Array.isArray(r[e])?r[e].push(n):r[e]=n}return r.tagger&&(r.tagger=kt(r.tagger)),r.committer&&(r.committer=kt(r.committer)),r}withoutSignature(){const t=Et(this._tag);return-1===t.indexOf("\n-----BEGIN PGP SIGNATURE-----")?t:t.slice(0,t.lastIndexOf("\n-----BEGIN PGP SIGNATURE-----"))}gpgsig(){if(-1!==this._tag.indexOf("\n-----BEGIN PGP SIGNATURE-----"))return Et(this._tag.slice(this._tag.indexOf("-----BEGIN PGP SIGNATURE-----"),this._tag.indexOf("-----END PGP SIGNATURE-----")+27))}payload(){return this.withoutSignature()+"\n"}toObject(){return Buffer.from(this._tag,"utf8")}static async sign(t,e,r){const n=t.payload();let{signature:i}=await e({payload:n,secretKey:r});i=Et(i);const o=n+i;return Bt.from(o)}}function St(t){return t.trim().split("\n").map(t=>" "+t).join("\n")+"\n"}class It{constructor(t){if("string"==typeof t)this._commit=t;else if(Buffer.isBuffer(t))this._commit=t.toString("utf8");else{if("object"!=typeof t)throw new E("invalid type passed to GitCommit constructor");this._commit=It.render(t)}}static fromPayloadSignature({payload:t,signature:e}){const r=It.justHeaders(t),n=It.justMessage(t),i=Et(r+"\ngpgsig"+St(e)+"\n"+n);return new It(i)}static from(t){return new It(t)}toObject(){return Buffer.from(this._commit,"utf8")}headers(){return this.parseHeaders()}message(){return It.justMessage(this._commit)}parse(){return Object.assign({message:this.message()},this.headers())}static justMessage(t){return Et(t.slice(t.indexOf("\n\n")+2))}static justHeaders(t){return t.slice(0,t.indexOf("\n\n"))}parseHeaders(){const t=It.justHeaders(this._commit).split("\n"),e=[];for(const r of t)" "===r[0]?e[e.length-1]+="\n"+r.slice(1):e.push(r);const r={parent:[]};for(const t of e){const e=t.slice(0,t.indexOf(" ")),n=t.slice(t.indexOf(" ")+1);Array.isArray(r[e])?r[e].push(n):r[e]=n}return r.author&&(r.author=kt(r.author)),r.committer&&(r.committer=kt(r.committer)),r}static renderHeaders(t){let e="";if(t.tree?e+=`tree ${t.tree}\n`:e+="tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904\n",t.parent){if(void 0===t.parent.length)throw new E("commit 'parent' property should be an array");for(const r of t.parent)e+=`parent ${r}\n`}return e+=`author ${xt(t.author)}\n`,e+=`committer ${xt(t.committer||t.author)}\n`,t.gpgsig&&(e+="gpgsig"+St(t.gpgsig)),e}static render(t){return It.renderHeaders(t)+"\n"+Et(t.message)}render(){return this._commit}withoutSignature(){const t=Et(this._commit);return-1===t.indexOf("\ngpgsig")?t:Et(t.slice(0,t.indexOf("\ngpgsig"))+"\n"+t.slice(t.indexOf("-----END PGP SIGNATURE-----\n")+28))}isolateSignature(){return this._commit.slice(this._commit.indexOf("-----BEGIN PGP SIGNATURE-----"),this._commit.indexOf("-----END PGP SIGNATURE-----")+27).split("\n").map(t=>t.replace(/^ /,"")).join("\n")}static async sign(t,e,r){const n=t.withoutSignature(),i=It.justMessage(t._commit);let{signature:o}=await e({payload:n,secretKey:r});o=Et(o);const s=It.justHeaders(t._commit)+"\ngpgsig"+St(o)+"\n"+i;return It.from(s)}}class Ut{static wrap({type:t,object:e}){const r=`${t} ${e.length}\0`,n=r.length,i=n+e.length,o=new Uint8Array(i);for(let t=0;t>=1,i+=8;return n}function $t(t,e){const r=t.readUInt8();if(128&r){const n=Rt(t,15&r,4);let i=Rt(t,(112&r)>>4,3);return 0===i&&(i=65536),e.slice(n,n+i)}return t.slice(r)}var Tt=r(1668);async function jt(t){let e=await t.byte();const r=e>>4&7;let n,i,o=15&e;if(128&e){let r=4;do{e=await t.byte(),o|=(127&e)<2147483648)throw new E("To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.");r.seek(r.tell()+1020);const i=r.readUInt32BE(),o=[];for(let t=0;t{null===u&&(u=a);const f=Math.floor(100*(u-a)/u);f!==c&&r&&await r({phase:"Receiving objects",loaded:u-a,total:u}),c=f,(["commit","tree","blob","tag"].includes(e=n[e])||"ofs-delta"===e||"ref-delta"===e)&&(i[s]={type:e,offset:s})});const l=Object.keys(i).map(Number);for(const[e,r]of l.entries()){const n=e+1===l.length?t.byteLength-20:l[e+1],o=i[r],s=Ot.buf(t.slice(r,n))>>>0;o.end=n,o.crc=s}const h=new Mt({pack:Promise.resolve(t),packfileSha:o,crcs:a,hashes:s,offsets:f,getExternalRefDelta:e});c=null;let d=0;const p=[0,0,0,0,0,0,0,0,0,0,0,0];for(let t in i){t=Number(t);const e=Math.floor(100*d/u);e!==c&&r&&await r({phase:"Resolving deltas",loaded:d,total:u}),d++,c=e;const n=i[t];if(!n.oid)try{h.readDepth=0,h.externalReadDepth=0;const{type:e,object:r}=await h.readSlice({start:t});p[h.readDepth]+=1;const i=await $(Ut.wrap({type:e,object:r}));n.oid=i,s.push(i),f.set(i,t),a[i]=n.crc}catch(t){continue}}return s.sort(),h}async toBuffer(){const t=[],e=(e,r)=>{t.push(Buffer.from(e,r))};e("ff744f63","hex"),e("00000002","hex");const r=new A(Buffer.alloc(1024));for(let t=0;t<256;t++){let e=0;for(const r of this.hashes)parseInt(r.slice(0,2),16)<=t&&e++;r.writeUInt32BE(e)}t.push(r.buffer);for(const t of this.hashes)e(t,"hex");const n=new A(Buffer.alloc(4*this.hashes.length));for(const t of this.hashes)n.writeUInt32BE(this.crcs[t]);t.push(n.buffer);const i=new A(Buffer.alloc(4*this.hashes.length));for(const t of this.hashes)i.writeUInt32BE(this.offsets.get(t));t.push(i.buffer),e(this.packfileSha,"hex");const o=Buffer.concat(t),s=await $(o),a=Buffer.alloc(20);return a.write(s,"hex"),Buffer.concat([o,a])}async load({pack:t}){this.pack=t}async unload(){this.pack=null}async read({oid:t}){if(!this.offsets.get(t)){if(this.getExternalRefDelta)return this.externalReadDepth++,this.getExternalRefDelta(t);throw new E(`Could not read object ${t} from packfile`)}const e=this.offsets.get(t);return this.readSlice({start:e})}async readSlice({start:t}){if(this.offsetCache[t])return Object.assign({},this.offsetCache[t]);if(this.readDepth++,!this.pack)throw new E("Tried to read from a GitPackIndex with no packfile loaded into memory");const e=(await this.pack).slice(t),r=new A(e),n=r.readUInt8(),i=112&n;let o={16:"commit",32:"tree",48:"blob",64:"tag",96:"ofs_delta",112:"ref_delta"}[i];if(void 0===o)throw new E("Unrecognized type: 0b"+i.toString(2));const s=15&n;let a=s;128&n&&(a=function(t,e){let r=e,n=4,i=null;do{i=t.readUInt8(),r|=(127&i)<t+1<<7|e,-1)}(r),n=t-e;({object:f,type:o}=await this.readSlice({start:n}))}if("ref_delta"===o){const t=r.slice(20).toString("hex");({object:f,type:o}=await this.read({oid:t}))}const c=e.slice(r.tell());if(u=Buffer.from(await Ct(c)),u.byteLength!==a)throw new E(`Packfile told us object would have length ${a} but it had length ${u.byteLength}`);return f&&(u=Buffer.from(function(t,e){const r=new A(t),n=Pt(r);if(n!==e.byteLength)throw new E(`applyDelta expected source buffer to be ${n} bytes but the provided buffer was ${e.length} bytes`);const i=Pt(r);let o;const s=$t(r,e);if(s.byteLength===i)o=s;else{o=Buffer.alloc(i);const t=new A(o);for(t.copy(s);!r.eof();)t.copy($t(r,e));const n=t.tell();if(i!==n)throw new E(`applyDelta expected target buffer to be ${i} bytes but the resulting buffer was ${n} bytes`)}return o}(u,f))),this.readDepth>3&&(this.offsetCache[t]={type:o,object:u}),{type:o,format:"content",object:u}}}const Nt=Symbol("PackfileCache");function Ft({fs:t,cache:e,filename:r,getExternalRefDelta:n,emitter:i,emitterPrefix:o}){e[Nt]||(e[Nt]=new Map);let s=e[Nt].get(r);return s||(s=async function({fs:t,filename:e,getExternalRefDelta:r,emitter:n,emitterPrefix:i}){const o=await t.read(e);return Mt.fromIdx({idx:o,getExternalRefDelta:r})}({fs:t,filename:r,getExternalRefDelta:n,emitter:i,emitterPrefix:o}),e[Nt].set(r,s)),s}async function Lt({fs:t,cache:e,gitdir:r,oid:n,format:i="content"}){const o=n=>Lt({fs:t,cache:e,gitdir:r,oid:n});let s;if("4b825dc642cb6eb9a060e54bf8d69288fbee4904"===n&&(s={format:"wrapped",object:Buffer.from("tree 0\0")}),s||(s=await async function({fs:t,gitdir:e,oid:r}){const n=`objects/${r.slice(0,2)}/${r.slice(2)}`,i=await t.read(`${e}/${n}`);return i?{object:i,format:"deflated",source:n}:null}({fs:t,gitdir:r,oid:n})),!s){if(s=await async function({fs:t,cache:e,gitdir:r,oid:n,format:i="content",getExternalRefDelta:o}){let s=await t.readdir(w(r,"objects/pack"));s=s.filter(t=>t.endsWith(".idx"));for(const i of s){const s=`${r}/objects/pack/${i}`,a=await Ft({fs:t,cache:e,filename:s,getExternalRefDelta:o});if(a.error)throw new E(a.error);if(a.offsets.has(n)){if(!a.pack){const e=s.replace(/idx$/,"pack");a.pack=t.read(e)}const e=await a.read({oid:n,getExternalRefDelta:o});return e.format="content",e.source=`objects/pack/${i.replace(/idx$/,"pack")}`,e}}return null}({fs:t,cache:e,gitdir:r,oid:n,getExternalRefDelta:o}),!s)throw new D(n);return s}if("deflated"===i)return s;if("deflated"===s.format&&(s.object=Buffer.from(await Ct(s.object)),s.format="wrapped"),"wrapped"===i)return s;const a=await $(s.object);if(a!==n)throw new E(`SHA check failed! Expected ${n}, computed ${a}`);const{object:f,type:u}=Ut.unwrap(s.object);if(s.type=u,s.object=f,s.format="content","content"===i)return s;throw new E(`invalid requested format "${i}"`)}async function Dt({fs:t,cache:e,gitdir:r,oid:n}){const{type:i,object:o}=await Lt({fs:t,cache:e,gitdir:r,oid:n});if("tag"===i)return Dt({fs:t,cache:e,gitdir:r,oid:n=Bt.from(o).parse().object});if("commit"!==i)throw new vt(n,i,"commit");return{commit:It.from(o),oid:n}}let Gt,Zt=null;async function Ht({fs:t,gitdir:e,type:r,object:n,format:i="content",oid:o,dryRun:s=!1}){return"deflated"!==i&&("wrapped"!==i&&(n=Ut.wrap({type:r,object:n})),o=await $(n),n=Buffer.from(await async function(t){return null===Zt&&(Zt=function(){try{return new CompressionStream("deflate").writable.close(),new Blob([]).stream().cancel(),!0}catch(t){return!1}}()),Zt?async function(t){const e=new CompressionStream("deflate"),r=new Blob([t]).stream().pipeThrough(e);return new Uint8Array(await new Response(r).arrayBuffer())}(t):Tt.deflate(t)}(n))),s||await async function({fs:t,gitdir:e,object:r,format:n,oid:i}){if("deflated"!==n)throw new E("GitObjectStoreLoose expects objects to write to be in deflated format");const o=`${e}/objects/${i.slice(0,2)}/${i.slice(2)}`;await t.exists(o)||await t.write(o,r)}({fs:t,gitdir:e,object:n,format:"deflated",oid:o}),o}class qt extends v{constructor(t,e){super(`"${t}" would be an invalid git reference. (Hint: a valid alternative would be "${e}".)`),this.code=this.name=qt.code,this.data={ref:t,suggestion:e}}}qt.code="InvalidRefNameError";class Wt extends v{constructor(t){super(`No name was provided for ${t} in the argument or in the .git/config file.`),this.code=this.name=Wt.code,this.data={role:t}}}Wt.code="MissingNameError";class Vt{static get timezoneOffsetForRefLogEntry(){const t=(new Date).getTimezoneOffset(),e=Math.abs(Math.floor(t/60)),r=Math.abs(t%60).toString().padStart(2,"0");return`${t>0?"-":"+"}${e.toString().padStart(2,"0")}${r}`}static createStashReflogEntry(t,e,r){const n=t.name.replace(/\s/g,""),i=Math.floor(Date.now()/1e3),o=Vt.timezoneOffsetForRefLogEntry;return`0000000000000000000000000000000000000000 ${e} ${n} ${t.email} ${i} ${o}\t${r}\n`}static getStashReflogEntry(t,e=!1){return t.split("\n").filter(t=>t).reverse().map((t,r)=>e?`stash@{${r}}: ${t.split("\t")[1]}`:t)}}async function Yt({fs:t,gitdir:e,path:r}){return(await g.get({fs:t,gitdir:e})).get(r)}Symbol("GitWalkSymbol");class Kt{constructor({fs:t,dir:e,gitdir:r=w(e,".git")}){Object.assign(this,{fs:t,dir:e,gitdir:r,_author:null})}static get refStash(){return"refs/stash"}static get refLogsStash(){return"logs/refs/stash"}get refStashPath(){return w(this.gitdir,Kt.refStash)}get refLogsStashPath(){return w(this.gitdir,Kt.refLogsStash)}async getAuthor(){if(!this._author&&(this._author=await async function({fs:t,gitdir:e,author:r,commit:n}){const i=Math.floor(Date.now()/1e3),o=function(t,...e){for(const r of e)if(r)for(const e of Object.keys(r)){const n=r[e];void 0!==n&&(t[e]=n)}return t}({},{name:await Yt({fs:t,gitdir:e,path:"user.name"}),email:await Yt({fs:t,gitdir:e,path:"user.email"})||"",timestamp:i,timezoneOffset:new Date(1e3*i).getTimezoneOffset()},n?n.author:void 0,r);if(void 0!==o.name)return o}({fs:this.fs,gitdir:this.gitdir,author:{}}),!this._author))throw new Wt("author");return this._author}async getStashSHA(t,e){return await this.fs.exists(this.refStashPath)?(e||await this.readStashReflogs({parsed:!1}))[t].split(" ")[1]:null}async writeStashCommit({message:t,tree:e,parent:r}){return async function({fs:t,gitdir:e,commit:r}){const n=It.from(r).toObject();return await Ht({fs:t,gitdir:e,type:"commit",object:n,format:"content"})}({fs:this.fs,gitdir:this.gitdir,commit:{message:t,tree:e,parent:r,author:await this.getAuthor(),committer:await this.getAuthor()}})}async readStashCommit(t){const e=await this.readStashReflogs({parsed:!1});if(0!==t&&(t<0||t>e.length-1))throw new qt(`stash@${t}`,"number that is in range of [0, num of stash pushed]");const r=await this.getStashSHA(t,e);return r?async function({fs:t,cache:e,gitdir:r,oid:n}){const{commit:i,oid:o}=await Dt({fs:t,cache:e,gitdir:r,oid:n});return{oid:o,commit:i.parse(),payload:i.withoutSignature()}}({fs:this.fs,cache:{},gitdir:this.gitdir,oid:r}):{}}async writeStashRef(t){return X.writeRef({fs:this.fs,gitdir:this.gitdir,ref:Kt.refStash,value:t})}async writeStashReflogEntry({stashCommit:t,message:e}){const r=await this.getAuthor(),n=Vt.createStashReflogEntry(r,t,e),i=this.refLogsStashPath;await async function(t,e){return void 0===Gt&&(Gt=new b),Gt.acquire(t,e)}({filepath:i,entry:n},async()=>{const t=await this.fs.exists(i)?await this.fs.read(i,"utf8"):"";await this.fs.write(i,t+n,"utf8")})}async readStashReflogs({parsed:t=!1}){if(!await this.fs.exists(this.refLogsStashPath))return[];const e=await this.fs.read(this.refLogsStashPath,"utf8");return Vt.getStashReflogEntry(e,t)}}})(),n})()); //# sourceMappingURL=index.umd.min.js.map