Files
site/node_modules/@sveltia/cms/npm/chunks/git-CKn6-lWj.js
T
site-admin 3ac81d5a52
deploy / build-and-publish (push) Successful in 1m37s
the editable site (validation-lab)
2026-11-21 08:03:55 +01:00

84 lines
165 KiB
JavaScript

import{r as e,t}from"./rolldown-runtime-XKyaHtl9.js";var n=t((e=>{e.byteLength=c,e.toByteArray=u,e.fromByteArray=p;for(var t=[],n=[],r=typeof Uint8Array<`u`?Uint8Array:Array,i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,a=0,o=i.length;a<o;++a)t[a]=i[a],n[i.charCodeAt(a)]=a;n[45]=62,n[95]=63;function s(e){var t=e.length;if(t%4>0)throw Error(`Invalid string. Length must be a multiple of 4`);var n=e.indexOf(`=`);n===-1&&(n=t);var r=n===t?0:4-n%4;return[n,r]}function c(e){var t=s(e),n=t[0],r=t[1];return(n+r)*3/4-r}function l(e,t,n){return(t+n)*3/4-n}function u(e){for(var t,i=s(e),a=i[0],o=i[1],c=new r(l(e,a,o)),u=0,d=o>0?a-4:a,f=0;f<d;f+=4)t=n[e.charCodeAt(f)]<<18|n[e.charCodeAt(f+1)]<<12|n[e.charCodeAt(f+2)]<<6|n[e.charCodeAt(f+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=t&255;return o===2&&(t=n[e.charCodeAt(f)]<<2|n[e.charCodeAt(f+1)]>>4,c[u++]=t&255),o===1&&(t=n[e.charCodeAt(f)]<<10|n[e.charCodeAt(f+1)]<<4|n[e.charCodeAt(f+2)]>>2,c[u++]=t>>8&255,c[u++]=t&255),c}function d(e){return t[e>>18&63]+t[e>>12&63]+t[e>>6&63]+t[e&63]}function f(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(e[a+2]&255),i.push(d(r));return i.join(``)}function p(e){for(var n,r=e.length,i=r%3,a=[],o=16383,s=0,c=r-i;s<c;s+=o)a.push(f(e,s,s+o>c?c:s+o));return i===1?(n=e[r-1],a.push(t[n>>2]+t[n<<4&63]+`==`)):i===2&&(n=(e[r-2]<<8)+e[r-1],a.push(t[n>>10]+t[n>>4&63]+t[n<<2&63]+`=`)),a.join(``)}})),r=t((e=>{
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
e.read=function(e,t,n,r,i){var a,o,s=i*8-r-1,c=(1<<s)-1,l=c>>1,u=-7,d=n?i-1:0,f=n?-1:1,p=e[t+d];for(d+=f,a=p&(1<<-u)-1,p>>=-u,u+=s;u>0;a=a*256+e[t+d],d+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=r;u>0;o=o*256+e[t+d],d+=f,u-=8);if(a===0)a=1-l;else if(a===c)return o?NaN:(p?-1:1)*(1/0);else o+=2**r,a-=l;return(p?-1:1)*o*2**(a-r)},e.write=function(e,t,n,r,i,a){var o,s,c,l=a*8-i-1,u=(1<<l)-1,d=u>>1,f=i===23?2**-24-2**-77:0,p=r?0:a-1,m=r?1:-1,h=+(t<0||t===0&&1/t<0);for(t=Math.abs(t),isNaN(t)||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=2**-o)<1&&(o--,c*=2),o+d>=1?t+=f/c:t+=f*2**(1-d),t*c>=2&&(o++,c/=2),o+d>=u?(s=0,o=u):o+d>=1?(s=(t*c-1)*2**i,o+=d):(s=t*2**(d-1)*2**i,o=0));i>=8;e[n+p]=s&255,p+=m,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[n+p]=o&255,p+=m,o/=256,l-=8);e[n+p-m]|=h*128}})),i=t((e=>{
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
var t=n(),i=r(),a=typeof Symbol==`function`&&typeof Symbol.for==`function`?Symbol.for(`nodejs.util.inspect.custom`):null;e.Buffer=l,e.SlowBuffer=b,e.INSPECT_MAX_BYTES=50;var o=2147483647;e.kMaxLength=o,l.TYPED_ARRAY_SUPPORT=s(),!l.TYPED_ARRAY_SUPPORT&&typeof console<`u`&&typeof console.error==`function`&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function s(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch{return!1}}Object.defineProperty(l.prototype,"parent",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.buffer}}),Object.defineProperty(l.prototype,"offset",{enumerable:!0,get:function(){if(l.isBuffer(this))return this.byteOffset}});function c(e){if(e>o)throw RangeError(`The value "`+e+`" is invalid for option "size"`);let t=new Uint8Array(e);return Object.setPrototypeOf(t,l.prototype),t}function l(e,t,n){if(typeof e==`number`){if(typeof t==`string`)throw TypeError(`The "string" argument must be of type string. Received type number`);return p(e)}return u(e,t,n)}l.poolSize=8192;function u(e,t,n){if(typeof e==`string`)return m(e,t);if(ArrayBuffer.isView(e))return g(e);if(e==null)throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e);if(W(e,ArrayBuffer)||e&&W(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<`u`&&(W(e,SharedArrayBuffer)||e&&W(e.buffer,SharedArrayBuffer)))return _(e,t,n);if(typeof e==`number`)throw TypeError(`The "value" argument must not be of type number. Received type number`);let r=e.valueOf&&e.valueOf();if(r!=null&&r!==e)return l.from(r,t,n);let i=v(e);if(i)return i;if(typeof Symbol<`u`&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]==`function`)return l.from(e[Symbol.toPrimitive](`string`),t,n);throw TypeError(`The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type `+typeof e)}l.from=function(e,t,n){return u(e,t,n)},Object.setPrototypeOf(l.prototype,Uint8Array.prototype),Object.setPrototypeOf(l,Uint8Array);function d(e){if(typeof e!=`number`)throw TypeError(`"size" argument must be of type number`);if(e<0)throw RangeError(`The value "`+e+`" is invalid for option "size"`)}function f(e,t,n){return d(e),e<=0||t===void 0?c(e):typeof n==`string`?c(e).fill(t,n):c(e).fill(t)}l.alloc=function(e,t,n){return f(e,t,n)};function p(e){return d(e),c(e<0?0:y(e)|0)}l.allocUnsafe=function(e){return p(e)},l.allocUnsafeSlow=function(e){return p(e)};function m(e,t){if((typeof t!=`string`||t===``)&&(t=`utf8`),!l.isEncoding(t))throw TypeError(`Unknown encoding: `+t);let n=x(e,t)|0,r=c(n),i=r.write(e,t);return i!==n&&(r=r.slice(0,i)),r}function h(e){let t=e.length<0?0:y(e.length)|0,n=c(t);for(let r=0;r<t;r+=1)n[r]=e[r]&255;return n}function g(e){if(W(e,Uint8Array)){let t=new Uint8Array(e);return _(t.buffer,t.byteOffset,t.byteLength)}return h(e)}function _(e,t,n){if(t<0||e.byteLength<t)throw RangeError(`"offset" is outside of buffer bounds`);if(e.byteLength<t+(n||0))throw RangeError(`"length" is outside of buffer bounds`);let r;return r=t===void 0&&n===void 0?new Uint8Array(e):n===void 0?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,l.prototype),r}function v(e){if(l.isBuffer(e)){let t=y(e.length)|0,n=c(t);return n.length===0||e.copy(n,0,0,t),n}if(e.length!==void 0)return typeof e.length!=`number`||G(e.length)?c(0):h(e);if(e.type===`Buffer`&&Array.isArray(e.data))return h(e.data)}function y(e){if(e>=o)throw RangeError(`Attempt to allocate Buffer larger than maximum size: 0x`+o.toString(16)+` bytes`);return e|0}function b(e){return+e!=e&&(e=0),l.alloc(+e)}l.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==l.prototype},l.compare=function(e,t){if(W(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),W(t,Uint8Array)&&(t=l.from(t,t.offset,t.byteLength)),!l.isBuffer(e)||!l.isBuffer(t))throw TypeError(`The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array`);if(e===t)return 0;let n=e.length,r=t.length;for(let i=0,a=Math.min(n,r);i<a;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:+(r<n)},l.isEncoding=function(e){switch(String(e).toLowerCase()){case`hex`:case`utf8`:case`utf-8`:case`ascii`:case`latin1`:case`binary`:case`base64`:case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return!0;default:return!1}},l.concat=function(e,t){if(!Array.isArray(e))throw TypeError(`"list" argument must be an Array of Buffers`);if(e.length===0)return l.alloc(0);let n;if(t===void 0)for(t=0,n=0;n<e.length;++n)t+=e[n].length;let r=l.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){let t=e[n];if(W(t,Uint8Array))i+t.length>r.length?(l.isBuffer(t)||(t=l.from(t)),t.copy(r,i)):Uint8Array.prototype.set.call(r,t,i);else if(l.isBuffer(t))t.copy(r,i);else throw TypeError(`"list" argument must be an Array of Buffers`);i+=t.length}return r};function x(e,t){if(l.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||W(e,ArrayBuffer))return e.byteLength;if(typeof e!=`string`)throw TypeError(`The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type `+typeof e);let n=e.length,r=arguments.length>2&&arguments[2]===!0;if(!r&&n===0)return 0;let i=!1;for(;;)switch(t){case`ascii`:case`latin1`:case`binary`:return n;case`utf8`:case`utf-8`:return pe(e).length;case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return n*2;case`hex`:return n>>>1;case`base64`:return he(e).length;default:if(i)return r?-1:pe(e).length;t=(``+t).toLowerCase(),i=!0}}l.byteLength=x;function S(e,t,n){let r=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((n===void 0||n>this.length)&&(n=this.length),n<=0)||(n>>>=0,t>>>=0,n<=t))return``;for(e||=`utf8`;;)switch(e){case`hex`:return ie(this,t,n);case`utf8`:case`utf-8`:return A(this,t,n);case`ascii`:return ne(this,t,n);case`latin1`:case`binary`:return re(this,t,n);case`base64`:return k(this,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return ae(this,t,n);default:if(r)throw TypeError(`Unknown encoding: `+e);e=(e+``).toLowerCase(),r=!0}}l.prototype._isBuffer=!0;function C(e,t,n){let r=e[t];e[t]=e[n],e[n]=r}l.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError(`Buffer size must be a multiple of 16-bits`);for(let t=0;t<e;t+=2)C(this,t,t+1);return this},l.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError(`Buffer size must be a multiple of 32-bits`);for(let t=0;t<e;t+=4)C(this,t,t+3),C(this,t+1,t+2);return this},l.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError(`Buffer size must be a multiple of 64-bits`);for(let t=0;t<e;t+=8)C(this,t,t+7),C(this,t+1,t+6),C(this,t+2,t+5),C(this,t+3,t+4);return this},l.prototype.toString=function(){let e=this.length;return e===0?``:arguments.length===0?A(this,0,e):S.apply(this,arguments)},l.prototype.toLocaleString=l.prototype.toString,l.prototype.equals=function(e){if(!l.isBuffer(e))throw TypeError(`Argument must be a Buffer`);return this===e||l.compare(this,e)===0},l.prototype.inspect=function(){let t=``,n=e.INSPECT_MAX_BYTES;return t=this.toString(`hex`,0,n).replace(/(.{2})/g,`$1 `).trim(),this.length>n&&(t+=` ... `),`<Buffer `+t+`>`},a&&(l.prototype[a]=l.prototype.inspect),l.prototype.compare=function(e,t,n,r,i){if(W(e,Uint8Array)&&(e=l.from(e,e.offset,e.byteLength)),!l.isBuffer(e))throw TypeError(`The "target" argument must be one of type Buffer or Uint8Array. Received type `+typeof e);if(t===void 0&&(t=0),n===void 0&&(n=e?e.length:0),r===void 0&&(r=0),i===void 0&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw RangeError(`out of range index`);if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;let a=i-r,o=n-t,s=Math.min(a,o),c=this.slice(r,i),u=e.slice(t,n);for(let e=0;e<s;++e)if(c[e]!==u[e]){a=c[e],o=u[e];break}return a<o?-1:+(o<a)};function w(e,t,n,r,i){if(e.length===0)return-1;if(typeof n==`string`?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,G(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(i)n=0;else return-1}if(typeof t==`string`&&(t=l.from(t,r)),l.isBuffer(t))return t.length===0?-1:T(e,t,n,r,i);if(typeof t==`number`)return t&=255,typeof Uint8Array.prototype.indexOf==`function`?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):T(e,[t],n,r,i);throw TypeError(`val must be string, number or Buffer`)}function T(e,t,n,r,i){let a=1,o=e.length,s=t.length;if(r!==void 0&&(r=String(r).toLowerCase(),r===`ucs2`||r===`ucs-2`||r===`utf16le`||r===`utf-16le`)){if(e.length<2||t.length<2)return-1;a=2,o/=2,s/=2,n/=2}function c(e,t){return a===1?e[t]:e.readUInt16BE(t*a)}let l;if(i){let r=-1;for(l=n;l<o;l++)if(c(e,l)===c(t,r===-1?0:l-r)){if(r===-1&&(r=l),l-r+1===s)return r*a}else r!==-1&&(l-=l-r),r=-1}else for(n+s>o&&(n=o-s),l=n;l>=0;l--){let n=!0;for(let r=0;r<s;r++)if(c(e,l+r)!==c(t,r)){n=!1;break}if(n)return l}return-1}l.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},l.prototype.indexOf=function(e,t,n){return w(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return w(this,e,t,n,!1)};function E(e,t,n,r){n=Number(n)||0;let i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;let a=t.length;r>a/2&&(r=a/2);let o=0;for(;o<r;++o){let r=parseInt(t.substr(o*2,2),16);if(G(r))return o;e[n+o]=r}return o}function D(e,t,n,r){return U(pe(t,e.length-n),e,n,r)}function ee(e,t,n,r){return U(me(t),e,n,r)}function te(e,t,n,r){return U(he(t),e,n,r)}function O(e,t,n,r){return U(H(t,e.length-n),e,n,r)}l.prototype.write=function(e,t,n,r){if(t===void 0)r=`utf8`,n=this.length,t=0;else if(n===void 0&&typeof t==`string`)r=t,n=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(n)?(n>>>=0,r===void 0&&(r=`utf8`)):(r=n,n=void 0);else throw Error(`Buffer.write(string, encoding, offset[, length]) is no longer supported`);let i=this.length-t;if((n===void 0||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw RangeError(`Attempt to write outside buffer bounds`);r||=`utf8`;let a=!1;for(;;)switch(r){case`hex`:return E(this,e,t,n);case`utf8`:case`utf-8`:return D(this,e,t,n);case`ascii`:case`latin1`:case`binary`:return ee(this,e,t,n);case`base64`:return te(this,e,t,n);case`ucs2`:case`ucs-2`:case`utf16le`:case`utf-16le`:return O(this,e,t,n);default:if(a)throw TypeError(`Unknown encoding: `+r);r=(``+r).toLowerCase(),a=!0}},l.prototype.toJSON=function(){return{type:`Buffer`,data:Array.prototype.slice.call(this._arr||this,0)}};function k(e,n,r){return n===0&&r===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(n,r))}function A(e,t,n){n=Math.min(e.length,n);let r=[],i=t;for(;i<n;){let t=e[i],a=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=n){let n,r,s,c;switch(o){case 1:t<128&&(a=t);break;case 2:n=e[i+1],(n&192)==128&&(c=(t&31)<<6|n&63,c>127&&(a=c));break;case 3:n=e[i+1],r=e[i+2],(n&192)==128&&(r&192)==128&&(c=(t&15)<<12|(n&63)<<6|r&63,c>2047&&(c<55296||c>57343)&&(a=c));break;case 4:n=e[i+1],r=e[i+2],s=e[i+3],(n&192)==128&&(r&192)==128&&(s&192)==128&&(c=(t&15)<<18|(n&63)<<12|(r&63)<<6|s&63,c>65535&&c<1114112&&(a=c))}}a===null?(a=65533,o=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|a&1023),r.push(a),i+=o}return M(r)}var j=4096;function M(e){let t=e.length;if(t<=j)return String.fromCharCode.apply(String,e);let n=``,r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=j));return n}function ne(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]&127);return r}function re(e,t,n){let r=``;n=Math.min(e.length,n);for(let i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function ie(e,t,n){let r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let i=``;for(let r=t;r<n;++r)i+=K[e[r]];return i}function ae(e,t,n){let r=e.slice(t,n),i=``;for(let e=0;e<r.length-1;e+=2)i+=String.fromCharCode(r[e]+r[e+1]*256);return i}l.prototype.slice=function(e,t){let n=this.length;e=~~e,t=t===void 0?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t<e&&(t=e);let r=this.subarray(e,t);return Object.setPrototypeOf(r,l.prototype),r};function N(e,t,n){if(e%1!=0||e<0)throw RangeError(`offset is not uint`);if(e+t>n)throw RangeError(`Trying to access beyond buffer length`)}l.prototype.readUintLE=l.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return r},l.prototype.readUintBE=l.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e+--t],i=1;for(;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUint8=l.prototype.readUInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),this[e]},l.prototype.readUint16LE=l.prototype.readUInt16LE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUint16BE=l.prototype.readUInt16BE=function(e,t){return e>>>=0,t||N(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUint32LE=l.prototype.readUInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216},l.prototype.readUint32BE=l.prototype.readUInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readBigUInt64LE=q(function(e){e>>>=0,fe(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&z(e,this.length-8);let r=t+this[++e]*256+this[++e]*2**16+this[++e]*2**24,i=this[++e]+this[++e]*256+this[++e]*2**16+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))}),l.prototype.readBigUInt64BE=q(function(e){e>>>=0,fe(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&z(e,this.length-8);let r=t*2**24+this[++e]*2**16+this[++e]*256+this[++e],i=this[++e]*2**24+this[++e]*2**16+this[++e]*256+n;return(BigInt(r)<<BigInt(32))+BigInt(i)}),l.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||N(e,t,this.length);let r=this[e],i=1,a=0;for(;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=2**(8*t)),r},l.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||N(e,t,this.length);let r=t,i=1,a=this[e+--r];for(;r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=2**(8*t)),a},l.prototype.readInt8=function(e,t){return e>>>=0,t||N(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]},l.prototype.readInt16LE=function(e,t){e>>>=0,t||N(e,2,this.length);let n=this[e]|this[e+1]<<8;return n&32768?n|4294901760:n},l.prototype.readInt16BE=function(e,t){e>>>=0,t||N(e,2,this.length);let n=this[e+1]|this[e]<<8;return n&32768?n|4294901760:n},l.prototype.readInt32LE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return e>>>=0,t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readBigInt64LE=q(function(e){e>>>=0,fe(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&z(e,this.length-8);let r=this[e+4]+this[e+5]*256+this[e+6]*2**16+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+this[++e]*256+this[++e]*2**16+this[++e]*2**24)}),l.prototype.readBigInt64BE=q(function(e){e>>>=0,fe(e,`offset`);let t=this[e],n=this[e+7];(t===void 0||n===void 0)&&z(e,this.length-8);let r=(t<<24)+this[++e]*2**16+this[++e]*256+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*256+n)}),l.prototype.readFloatLE=function(e,t){return e>>>=0,t||N(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return e>>>=0,t||N(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return e>>>=0,t||N(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return e>>>=0,t||N(e,8,this.length),i.read(this,e,!1,52,8)};function P(e,t,n,r,i,a){if(!l.isBuffer(e))throw TypeError(`"buffer" argument must be a Buffer instance`);if(t>i||t<a)throw RangeError(`"value" argument is out of bounds`);if(n+r>e.length)throw RangeError(`Index out of range`)}l.prototype.writeUintLE=l.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;P(this,e,t,n,r,0)}let i=1,a=0;for(this[t]=e&255;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},l.prototype.writeUintBE=l.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){let r=2**(8*n)-1;P(this,e,t,n,r,0)}let i=n-1,a=1;for(this[t+i]=e&255;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},l.prototype.writeUint8=l.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,1,255,0),this[t]=e&255,t+1},l.prototype.writeUint16LE=l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,65535,0),this[t]=e&255,this[t+1]=e>>>8,t+2},l.prototype.writeUint16BE=l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=e&255,t+2},l.prototype.writeUint32LE=l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e&255,t+4},l.prototype.writeUint32BE=l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4};function oe(e,t,n,r,i){R(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,o>>=8,e[n++]=o,n}function se(e,t,n,r,i){R(t,r,i,e,n,7);let a=Number(t&BigInt(4294967295));e[n+7]=a,a>>=8,e[n+6]=a,a>>=8,e[n+5]=a,a>>=8,e[n+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=o,o>>=8,e[n+2]=o,o>>=8,e[n+1]=o,o>>=8,e[n]=o,n+8}l.prototype.writeBigUInt64LE=q(function(e,t=0){return oe(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),l.prototype.writeBigUInt64BE=q(function(e,t=0){return se(this,e,t,BigInt(0),BigInt(`0xffffffffffffffff`))}),l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);P(this,e,t,n,r-1,-r)}let i=0,a=1,o=0;for(this[t]=e&255;++i<n&&(a*=256);)e<0&&o===0&&this[t+i-1]!==0&&(o=1),this[t+i]=(e/a|0)-o&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){let r=2**(8*n-1);P(this,e,t,n,r-1,-r)}let i=n-1,a=1,o=0;for(this[t+i]=e&255;--i>=0&&(a*=256);)e<0&&o===0&&this[t+i+1]!==0&&(o=1),this[t+i]=(e/a|0)-o&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=e&255,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,32767,-32768),this[t]=e&255,this[t+1]=e>>>8,t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=e&255,t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,2147483647,-2147483648),this[t]=e&255,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e&255,t+4},l.prototype.writeBigInt64LE=q(function(e,t=0){return oe(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))}),l.prototype.writeBigInt64BE=q(function(e,t=0){return se(this,e,t,-BigInt(`0x8000000000000000`),BigInt(`0x7fffffffffffffff`))});function F(e,t,n,r,i,a){if(n+r>e.length||n<0)throw RangeError(`Index out of range`)}function I(e,t,n,r,a){return t=+t,n>>>=0,a||F(e,t,n,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,n,r,23,4),n+4}l.prototype.writeFloatLE=function(e,t,n){return I(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return I(this,e,t,!1,n)};function ce(e,t,n,r,a){return t=+t,n>>>=0,a||F(e,t,n,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,n,r,52,8),n+8}l.prototype.writeDoubleLE=function(e,t,n){return ce(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return ce(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(!l.isBuffer(e))throw TypeError(`argument should be a Buffer`);if(n||=0,!r&&r!==0&&(r=this.length),t>=e.length&&(t=e.length),t||=0,r>0&&r<n&&(r=n),r===n||e.length===0||this.length===0)return 0;if(t<0)throw RangeError(`targetStart out of bounds`);if(n<0||n>=this.length)throw RangeError(`Index out of range`);if(r<0)throw RangeError(`sourceEnd out of bounds`);r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);let i=r-n;return this===e&&typeof Uint8Array.prototype.copyWithin==`function`?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),i},l.prototype.fill=function(e,t,n,r){if(typeof e==`string`){if(typeof t==`string`?(r=t,t=0,n=this.length):typeof n==`string`&&(r=n,n=this.length),r!==void 0&&typeof r!=`string`)throw TypeError(`encoding must be a string`);if(typeof r==`string`&&!l.isEncoding(r))throw TypeError(`Unknown encoding: `+r);if(e.length===1){let t=e.charCodeAt(0);(r===`utf8`&&t<128||r===`latin1`)&&(e=t)}}else typeof e==`number`?e&=255:typeof e==`boolean`&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw RangeError(`Out of range index`);if(n<=t)return this;t>>>=0,n=n===void 0?this.length:n>>>0,e||=0;let i;if(typeof e==`number`)for(i=t;i<n;++i)this[i]=e;else{let a=l.isBuffer(e)?e:l.from(e,r),o=a.length;if(o===0)throw TypeError(`The value "`+e+`" is invalid for argument "value"`);for(i=0;i<n-t;++i)this[i+t]=a[i%o]}return this};var le={};function ue(e,t,n){le[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}ue(`ERR_BUFFER_OUT_OF_BOUNDS`,function(e){return e?`${e} is outside of buffer bounds`:`Attempt to access memory outside buffer bounds`},RangeError),ue(`ERR_INVALID_ARG_TYPE`,function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),ue(`ERR_OUT_OF_RANGE`,function(e,t,n){let r=`The value of "${e}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=de(String(n)):typeof n==`bigint`&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=de(i)),i+=`n`),r+=` It must be ${t}. Received ${i}`,r},RangeError);function de(e){let t=``,n=e.length,r=+(e[0]===`-`);for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function L(e,t,n){fe(t,`offset`),(e[t]===void 0||e[t+n]===void 0)&&z(t,e.length-(n+1))}function R(e,t,n,r,i,a){if(e>n||e<t){let r=typeof t==`bigint`?`n`:``,i;throw i=a>3?t===0||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${(a+1)*8}${r}`:`>= -(2${r} ** ${(a+1)*8-1}${r}) and < 2 ** ${(a+1)*8-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new le.ERR_OUT_OF_RANGE(`value`,i,e)}L(r,i,a)}function fe(e,t){if(typeof e!=`number`)throw new le.ERR_INVALID_ARG_TYPE(t,`number`,e)}function z(e,t,n){throw Math.floor(e)===e?t<0?new le.ERR_BUFFER_OUT_OF_BOUNDS:new le.ERR_OUT_OF_RANGE(n||`offset`,`>= ${+!!n} and <= ${t}`,e):(fe(e,n),new le.ERR_OUT_OF_RANGE(n||`offset`,`an integer`,e))}var B=/[^+/0-9A-Za-z-_]/g;function V(e){if(e=e.split(`=`)[0],e=e.trim().replace(B,``),e.length<2)return``;for(;e.length%4!=0;)e+=`=`;return e}function pe(e,t){t||=1/0;let n,r=e.length,i=null,a=[];for(let o=0;o<r;++o){if(n=e.charCodeAt(o),n>55295&&n<57344){if(!i){if(n>56319||o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if(--t<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,n&63|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,n&63|128)}else if(n<1114112){if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,n&63|128)}else throw Error(`Invalid code point`)}return a}function me(e){let t=[];for(let n=0;n<e.length;++n)t.push(e.charCodeAt(n)&255);return t}function H(e,t){let n,r,i,a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}function he(e){return t.toByteArray(V(e))}function U(e,t,n,r){let i=0;for(;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function W(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function G(e){return e!==e}var K=(function(){let e=`0123456789abcdef`,t=Array(256);for(let n=0;n<16;++n){let r=n*16;for(let i=0;i<16;++i)t[r+i]=e[n]+e[i]}return t})();function q(e){return typeof BigInt>`u`?J:e}function J(){throw Error(`BigInt not supported`)}})),a=i();globalThis.Buffer??=a.Buffer;var o=t(((e,t)=>{t.exports=typeof Object.create==`function`?function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}})),s=t(((e,t)=>{
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
var n=i(),r=n.Buffer;function a(e,t){for(var n in e)t[n]=e[n]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?t.exports=n:(a(n,e),e.Buffer=o);function o(e,t,n){return r(e,t,n)}o.prototype=Object.create(r.prototype),a(r,o),o.from=function(e,t,n){if(typeof e==`number`)throw TypeError(`Argument must not be a number`);return r(e,t,n)},o.alloc=function(e,t,n){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);var i=r(e);return t===void 0?i.fill(0):typeof n==`string`?i.fill(t,n):i.fill(t),i},o.allocUnsafe=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return r(e)},o.allocUnsafeSlow=function(e){if(typeof e!=`number`)throw TypeError(`Argument must be a number`);return n.SlowBuffer(e)}})),c=t(((e,t)=>{var n={}.toString;t.exports=Array.isArray||function(e){return n.call(e)==`[object Array]`}})),l=t(((e,t)=>{t.exports=TypeError})),u=t(((e,t)=>{t.exports=Object})),d=t(((e,t)=>{t.exports=Error})),f=t(((e,t)=>{t.exports=EvalError})),p=t(((e,t)=>{t.exports=RangeError})),m=t(((e,t)=>{t.exports=ReferenceError})),h=t(((e,t)=>{t.exports=SyntaxError})),g=t(((e,t)=>{t.exports=URIError})),_=t(((e,t)=>{t.exports=Math.abs})),v=t(((e,t)=>{t.exports=Math.floor})),y=t(((e,t)=>{t.exports=Math.max})),b=t(((e,t)=>{t.exports=Math.min})),x=t(((e,t)=>{t.exports=Math.pow})),S=t(((e,t)=>{t.exports=Math.round})),C=t(((e,t)=>{t.exports=Number.isNaN||function(e){return e!==e}})),w=t(((e,t)=>{var n=C();t.exports=function(e){return n(e)||e===0?e:e<0?-1:1}})),T=t(((e,t)=>{t.exports=Object.getOwnPropertyDescriptor})),E=t(((e,t)=>{var n=T();if(n)try{n([],`length`)}catch{n=null}t.exports=n})),D=t(((e,t)=>{var n=Object.defineProperty||!1;if(n)try{n({},`a`,{value:1})}catch{n=!1}t.exports=n})),ee=t(((e,t)=>{t.exports=function(){if(typeof Symbol!=`function`||typeof Object.getOwnPropertySymbols!=`function`)return!1;if(typeof Symbol.iterator==`symbol`)return!0;var e={},t=Symbol(`test`),n=Object(t);if(typeof t==`string`||Object.prototype.toString.call(t)!==`[object Symbol]`||Object.prototype.toString.call(n)!==`[object Symbol]`)return!1;var r=42;for(var i in e[t]=r,e)return!1;if(typeof Object.keys==`function`&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames==`function`&&Object.getOwnPropertyNames(e).length!==0)return!1;var a=Object.getOwnPropertySymbols(e);if(a.length!==1||a[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor==`function`){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==r||o.enumerable!==!0)return!1}return!0}})),te=t(((e,t)=>{var n=typeof Symbol<`u`&&Symbol,r=ee();t.exports=function(){return typeof n!=`function`||typeof Symbol!=`function`||typeof n(`foo`)!=`symbol`||typeof Symbol(`bar`)!=`symbol`?!1:r()}})),O=t(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect.getPrototypeOf||null})),k=t(((e,t)=>{t.exports=u().getPrototypeOf||null})),A=t(((e,t)=>{var n=Object.prototype.toString,r=Math.max,i=`[object Function]`,a=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var i=0;i<t.length;i+=1)n[i+e.length]=t[i];return n},o=function(e,t){for(var n=[],r=t||0,i=0;r<e.length;r+=1,i+=1)n[i]=e[r];return n},s=function(e,t){for(var n=``,r=0;r<e.length;r+=1)n+=e[r],r+1<e.length&&(n+=t);return n};t.exports=function(e){var t=this;if(typeof t!=`function`||n.apply(t)!==i)throw TypeError(`Function.prototype.bind called on incompatible `+t);for(var c=o(arguments,1),l,u=function(){if(this instanceof l){var n=t.apply(this,a(c,arguments));return Object(n)===n?n:this}return t.apply(e,a(c,arguments))},d=r(0,t.length-c.length),f=[],p=0;p<d;p++)f[p]=`$`+p;if(l=Function(`binder`,`return function (`+s(f,`,`)+`){ return binder.apply(this,arguments); }`)(u),t.prototype){var m=function(){};m.prototype=t.prototype,l.prototype=new m,m.prototype=null}return l}})),j=t(((e,t)=>{var n=A();t.exports=Function.prototype.bind||n})),M=t(((e,t)=>{t.exports=Function.prototype.call})),ne=t(((e,t)=>{t.exports=Function.prototype.apply})),re=t(((e,t)=>{t.exports=typeof Reflect<`u`&&Reflect&&Reflect.apply})),ie=t(((e,t)=>{var n=j(),r=ne(),i=M();t.exports=re()||n.call(i,r)})),ae=t(((e,t)=>{var n=j(),r=l(),i=M(),a=ie();t.exports=function(e){if(e.length<1||typeof e[0]!=`function`)throw new r(`a function is required`);return a(n,i,e)}})),N=t(((e,t)=>{var n=ae(),r=E(),i;try{i=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!=`object`||!(`code`in e)||e.code!==`ERR_PROTO_ACCESS`)throw e}var a=!!i&&r&&r(Object.prototype,`__proto__`),o=Object,s=o.getPrototypeOf;t.exports=a&&typeof a.get==`function`?n([a.get]):typeof s==`function`&&function(e){return s(e==null?e:o(e))}})),P=t(((e,t)=>{var n=O(),r=k(),i=N();t.exports=n?function(e){return n(e)}:r?function(e){if(!e||typeof e!=`object`&&typeof e!=`function`)throw TypeError(`getProto: not an object`);return r(e)}:i?function(e){return i(e)}:null})),oe=t(((e,t)=>{var n=Function.prototype.call,r=Object.prototype.hasOwnProperty;t.exports=j().call(n,r)})),se=t(((e,t)=>{var n,r=u(),i=d(),a=f(),o=p(),s=m(),c=h(),C=l(),T=g(),ee=_(),A=v(),re=y(),ie=b(),ae=x(),N=S(),se=w(),F=Function,I=function(e){try{return F(`"use strict"; return (`+e+`).constructor;`)()}catch{}},ce=E(),le=D(),ue=function(){throw new C},de=ce?function(){try{return arguments.callee,ue}catch{try{return ce(arguments,`callee`).get}catch{return ue}}}():ue,L=te()(),R=P(),fe=k(),z=O(),B=ne(),V=M(),pe={},me=typeof Uint8Array>`u`||!R?n:R(Uint8Array),H={__proto__:null,"%AggregateError%":typeof AggregateError>`u`?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>`u`?n:ArrayBuffer,"%ArrayIteratorPrototype%":L&&R?R([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":pe,"%AsyncGenerator%":pe,"%AsyncGeneratorFunction%":pe,"%AsyncIteratorPrototype%":pe,"%Atomics%":typeof Atomics>`u`?n:Atomics,"%BigInt%":typeof BigInt>`u`?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>`u`?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>`u`?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>`u`?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>`u`?n:Float16Array,"%Float32Array%":typeof Float32Array>`u`?n:Float32Array,"%Float64Array%":typeof Float64Array>`u`?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>`u`?n:FinalizationRegistry,"%Function%":F,"%GeneratorFunction%":pe,"%Int8Array%":typeof Int8Array>`u`?n:Int8Array,"%Int16Array%":typeof Int16Array>`u`?n:Int16Array,"%Int32Array%":typeof Int32Array>`u`?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":L&&R?R(R([][Symbol.iterator]())):n,"%JSON%":typeof JSON==`object`?JSON:n,"%Map%":typeof Map>`u`?n:Map,"%MapIteratorPrototype%":typeof Map>`u`||!L||!R?n:R(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":r,"%Object.getOwnPropertyDescriptor%":ce,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>`u`?n:Promise,"%Proxy%":typeof Proxy>`u`?n:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>`u`?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>`u`?n:Set,"%SetIteratorPrototype%":typeof Set>`u`||!L||!R?n:R(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>`u`?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":L&&R?R(``[Symbol.iterator]()):n,"%Symbol%":L?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":de,"%TypedArray%":me,"%TypeError%":C,"%Uint8Array%":typeof Uint8Array>`u`?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>`u`?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>`u`?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>`u`?n:Uint32Array,"%URIError%":T,"%WeakMap%":typeof WeakMap>`u`?n:WeakMap,"%WeakRef%":typeof WeakRef>`u`?n:WeakRef,"%WeakSet%":typeof WeakSet>`u`?n:WeakSet,"%Function.prototype.call%":V,"%Function.prototype.apply%":B,"%Object.defineProperty%":le,"%Object.getPrototypeOf%":fe,"%Math.abs%":ee,"%Math.floor%":A,"%Math.max%":re,"%Math.min%":ie,"%Math.pow%":ae,"%Math.round%":N,"%Math.sign%":se,"%Reflect.getPrototypeOf%":z};if(R)try{null.error}catch(e){H[`%Error.prototype%`]=R(R(e))}var he=function e(t){var n;if(t===`%AsyncFunction%`)n=I(`async function () {}`);else if(t===`%GeneratorFunction%`)n=I(`function* () {}`);else if(t===`%AsyncGeneratorFunction%`)n=I(`async function* () {}`);else if(t===`%AsyncGenerator%`){var r=e(`%AsyncGeneratorFunction%`);r&&(n=r.prototype)}else if(t===`%AsyncIteratorPrototype%`){var i=e(`%AsyncGenerator%`);i&&R&&(n=R(i.prototype))}return H[t]=n,n},U={__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`]},W=j(),G=oe(),K=W.call(V,Array.prototype.concat),q=W.call(B,Array.prototype.splice),J=W.call(V,String.prototype.replace),Y=W.call(V,String.prototype.slice),ge=W.call(V,RegExp.prototype.exec),_e=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ve=/\\(\\)?/g,ye=function(e){var t=Y(e,0,1),n=Y(e,-1);if(t===`%`&&n!==`%`)throw new c("invalid intrinsic syntax, expected closing `%`");if(n===`%`&&t!==`%`)throw new c("invalid intrinsic syntax, expected opening `%`");var r=[];return J(e,_e,function(e,t,n,i){r[r.length]=n?J(i,ve,`$1`):t||e}),r},X=function(e,t){var n=e,r;if(G(U,n)&&(r=U[n],n=`%`+r[0]+`%`),G(H,n)){var i=H[n];if(i===pe&&(i=he(n)),i===void 0&&!t)throw new C(`intrinsic `+e+` exists, but is not available. Please file an issue!`);return{alias:r,name:n,value:i}}throw new c(`intrinsic `+e+` does not exist!`)};t.exports=function(e,t){if(typeof e!=`string`||e.length===0)throw new C(`intrinsic name must be a non-empty string`);if(arguments.length>1&&typeof t!=`boolean`)throw new C(`"allowMissing" argument must be a boolean`);if(ge(/^%?[^%]*%?$/,e)===null)throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ye(e),r=n.length>0?n[0]:``,i=X(`%`+r+`%`,t),a=i.name,o=i.value,s=!1,l=i.alias;l&&(r=l[0],q(n,K([0,1],l)));for(var u=1,d=!0;u<n.length;u+=1){var f=n[u],p=Y(f,0,1),m=Y(f,-1);if((p===`"`||p===`'`||p==="`"||m===`"`||m===`'`||m==="`")&&p!==m)throw new c(`property names with quotes must have matching quotes`);if(f!==`constructor`&&d||(s=!0),r+=`.`+f,a=`%`+r+`%`,G(H,a))o=H[a];else if(o!=null){if(!(f in o)){if(!t)throw new C(`base intrinsic for `+e+` exists, but the property is not available.`);return}if(ce&&u+1>=n.length){var h=ce(o,f);d=!!h,o=d&&`get`in h&&!(`originalValue`in h.get)?h.get:o[f]}else d=G(o,f),o=o[f];d&&!s&&(H[a]=o)}}return o}})),F=t(((e,t)=>{var n=se(),r=ae(),i=r([n(`%String.prototype.indexOf%`)]);t.exports=function(e,t){var a=n(e,!!t);return typeof a==`function`&&i(e,`.prototype.`)>-1?r([a]):a}})),I=t(((e,t)=>{var n=Function.prototype.toString,r=typeof Reflect==`object`&&Reflect!==null&&Reflect.apply,i,a;if(typeof r==`function`&&typeof Object.defineProperty==`function`)try{i=Object.defineProperty({},"length",{get:function(){throw a}}),a={},r(function(){throw 42},null,i)}catch(e){e!==a&&(r=null)}else r=null;var o=/^\s*class\b/,s=function(e){try{var t=n.call(e);return o.test(t)}catch{return!1}},c=function(e){try{return!s(e)&&(n.call(e),!0)}catch{return!1}},l=Object.prototype.toString,u=`[object Object]`,d=`[object Function]`,f=`[object GeneratorFunction]`,p=`[object HTMLAllCollection]`,m=`[object HTML document.all class]`,h=`[object HTMLCollection]`,g=typeof Symbol==`function`&&!!Symbol.toStringTag,_=!(0 in[,]),v=function(){return!1};if(typeof document==`object`){var y=document.all;l.call(y)===l.call(document.all)&&(v=function(e){if((_||!e)&&(e===void 0||typeof e==`object`))try{var t=l.call(e);return(t===p||t===m||t===h||t===u)&&e(``)==null}catch{}return!1})}t.exports=r?function(e){if(v(e))return!0;if(!e||typeof e!=`function`&&typeof e!=`object`)return!1;try{r(e,null,i)}catch(e){if(e!==a)return!1}return!s(e)&&c(e)}:function(e){if(v(e))return!0;if(!e||typeof e!=`function`&&typeof e!=`object`)return!1;if(g)return c(e);if(s(e))return!1;var t=l.call(e);return t!==d&&t!==f&&!/^\[object HTML/.test(t)?!1:c(e)}})),ce=t(((e,t)=>{var n=I(),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,a=function(e,t,n){for(var r=0,a=e.length;r<a;r++)i.call(e,r)&&(n==null?t(e[r],r,e):t.call(n,e[r],r,e))},o=function(e,t,n){for(var r=0,i=e.length;r<i;r++)n==null?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)},s=function(e,t,n){for(var r in e)i.call(e,r)&&(n==null?t(e[r],r,e):t.call(n,e[r],r,e))};function c(e){return r.call(e)===`[object Array]`}t.exports=function(e,t,r){if(!n(t))throw TypeError(`iterator must be a function`);var i;arguments.length>=3&&(i=r),c(e)?a(e,t,i):typeof e==`string`?o(e,t,i):s(e,t,i)}})),le=t(((e,t)=>{t.exports=[`Float16Array`,`Float32Array`,`Float64Array`,`Int8Array`,`Int16Array`,`Int32Array`,`Uint8Array`,`Uint8ClampedArray`,`Uint16Array`,`Uint32Array`,`BigInt64Array`,`BigUint64Array`]})),ue=t(((e,t)=>{var n=le(),r=typeof globalThis>`u`?global:globalThis;t.exports=function(){for(var e=[],t=0;t<n.length;t++)typeof r[n[t]]==`function`&&(e[e.length]=n[t]);return e}})),de=t(((e,t)=>{var n=D(),r=h(),i=l(),a=E();t.exports=function(e,t,o){if(!e||typeof e!=`object`&&typeof e!=`function`)throw new i("`obj` must be an object or a function`");if(typeof t!=`string`&&typeof t!=`symbol`)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!=`boolean`&&arguments[3]!==null)throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!=`boolean`&&arguments[4]!==null)throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!=`boolean`&&arguments[5]!==null)throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!=`boolean`)throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],d=!!a&&a(e,t);if(n)n(e,t,{configurable:l===null&&d?d.configurable:!l,enumerable:s===null&&d?d.enumerable:!s,value:o,writable:c===null&&d?d.writable:!c});else if(u||!s&&!c&&!l)e[t]=o;else throw new r(`This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.`)}})),L=t(((e,t)=>{var n=D(),r=function(){return!!n};r.hasArrayLengthDefineBug=function(){if(!n)return null;try{return n([],`length`,{value:1}).length!==1}catch{return!0}},t.exports=r})),R=t(((e,t)=>{var n=se(),r=de(),i=L()(),a=E(),o=l(),s=n(`%Math.floor%`);t.exports=function(e,t){if(typeof e!=`function`)throw new o("`fn` is not a function");if(typeof t!=`number`||t<0||t>4294967295||s(t)!==t)throw new o("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],c=!0,l=!0;if(`length`in e&&a){var u=a(e,`length`);u&&!u.configurable&&(c=!1),u&&!u.writable&&(l=!1)}return(c||l||!n)&&(i?r(e,`length`,t,!0,!0):r(e,`length`,t)),e}})),fe=t(((e,t)=>{var n=j(),r=ne(),i=ie();t.exports=function(){return i(n,r,arguments)}})),z=t(((e,t)=>{var n=R(),r=D(),i=ae(),a=fe();t.exports=function(e){var t=i(arguments),r=1+e.length-(arguments.length-1);return n(t,r>0?r:0,!0)},r?r(t.exports,`apply`,{value:a}):t.exports.apply=a})),B=t(((e,t)=>{var n=ee();t.exports=function(){return n()&&!!Symbol.toStringTag}})),V=t(((e,t)=>{var n=ce(),r=ue(),i=z(),a=F(),o=E(),s=P(),c=a(`Object.prototype.toString`),l=B()(),u=typeof globalThis>`u`?global:globalThis,d=r(),f=a(`String.prototype.slice`),p=a(`Array.prototype.indexOf`,!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},m={__proto__:null};l&&o&&s?n(d,function(e){var t=new u[e];if(Symbol.toStringTag in t&&s){var n=s(t),r=o(n,Symbol.toStringTag);if(!r&&n&&(r=o(s(n),Symbol.toStringTag)),r&&r.get){var a=i(r.get);m[`$`+e]=a}}}):n(d,function(e){var t=new u[e],n=t.slice||t.set;if(n){var r=i(n);m[`$`+e]=r}});function h(e){var t=!1;return n(m,function(n,r){if(!t)try{`$`+n(e)===r&&(t=f(r,1))}catch{}}),t}function g(e){var t=!1;return n(m,function(n,r){if(!t)try{n(e),t=f(r,1)}catch{}}),t}function _(e){return p(d,e)>-1}function v(e){if(!e||typeof e!=`object`)return!1;if(!l){var t=f(c(e),8,-1);return _(t)?t:t===`Object`&&g(e)}return o?h(e):null}t.exports=v})),pe=t(((e,t)=>{var n=V();t.exports=function(e){return!!n(e)}})),me=t(((e,t)=>{var n=l(),r=F()(`TypedArray.prototype.buffer`,!0),i=pe();t.exports=r||function(e){if(!i(e))throw new n(`Not a Typed Array`);return e.buffer}})),H=t(((e,t)=>{var n=s().Buffer,r=c(),i=me(),a=ArrayBuffer.isView||function(e){try{return i(e),!0}catch{return!1}},o=typeof Uint8Array<`u`,l=typeof ArrayBuffer<`u`&&typeof Uint8Array<`u`,u=l&&(n.prototype instanceof Uint8Array||n.TYPED_ARRAY_SUPPORT);t.exports=function(e,t){if(n.isBuffer(e))return e.constructor&&!(`isBuffer`in e)?n.from(e):e;if(typeof e==`string`)return n.from(e,t);if(l&&a(e)){if(e.byteLength===0)return n.alloc(0);if(u){var i=n.from(e.buffer,e.byteOffset,e.byteLength);if(i.byteLength===e.byteLength)return i}var s=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),c=n.from(s);if(c.length===e.byteLength)return c}if(o&&e instanceof Uint8Array)return n.from(e);var d=r(e);if(d)for(var f=0;f<e.length;f+=1){var p=e[f];if(typeof p!=`number`||p<0||p>255||~~p!==p)throw RangeError(`Array items must be numbers in the range 0-255.`)}if(d||n.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer==`function`&&e.constructor.isBuffer(e))return n.from(e);throw TypeError(`The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.`)}})),he=t(((e,t)=>{var n=s().Buffer,r=H();function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){e=r(e,t||`utf8`);for(var n=this._block,i=this._blockSize,a=e.length,o=this._len,s=0;s<a;){for(var c=o%i,l=Math.min(a-s,i-c),u=0;u<l;u++)n[c+u]=e[s+u];o+=l,s+=l,o%i===0&&this._update(n)}return this._len+=a,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=this._len*8;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(n|0)>>>0,i=(n-r)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var a=this._hash();return e?a.toString(e):a},i.prototype._update=function(){throw Error(`_update must be implemented by subclass`)},t.exports=i})),U=t(((e,t)=>{var n=o(),r=he(),i=s().Buffer,a=[1518500249,1859775393,-1894007588,-899497514],c=Array(80);function l(){this.init(),this._w=c,r.call(this,64,56)}n(l,r),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function u(e){return e<<1|e>>>31}function d(e){return e<<5|e>>>27}function f(e){return e<<30|e>>>2}function p(e,t,n,r){return e===0?t&n|~t&r:e===2?t&n|t&r|n&r:t^n^r}l.prototype._update=function(e){for(var t=this._w,n=this._a|0,r=this._b|0,i=this._c|0,o=this._d|0,s=this._e|0,c=0;c<16;++c)t[c]=e.readInt32BE(c*4);for(;c<80;++c)t[c]=u(t[c-3]^t[c-8]^t[c-14]^t[c-16]);for(var l=0;l<80;++l){var m=~~(l/20),h=d(n)+p(m,r,i,o)+s+t[l]+a[m]|0;s=o,o=i,i=f(r),r=n,n=h}this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},l.prototype._hash=function(){var e=i.allocUnsafe(20);return e.writeInt32BE(this._a|0,0),e.writeInt32BE(this._b|0,4),e.writeInt32BE(this._c|0,8),e.writeInt32BE(this._d|0,12),e.writeInt32BE(this._e|0,16),e},t.exports=l})),W=t(((e,t)=>{var n=function(e){if(e||={},this.Promise=e.Promise||Promise,this.queues=Object.create(null),this.domainReentrant=e.domainReentrant||!1,this.domainReentrant){if(typeof process>`u`||process.domain===void 0)throw 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=e.timeout||n.DEFAULT_TIMEOUT,this.maxOccupationTime=e.maxOccupationTime||n.DEFAULT_MAX_OCCUPATION_TIME,this.maxExecutionTime=e.maxExecutionTime||n.DEFAULT_MAX_EXECUTION_TIME,this.maxPending=e.maxPending===1/0||Number.isInteger(e.maxPending)&&e.maxPending>=0?e.maxPending:n.DEFAULT_MAX_PENDING};n.DEFAULT_TIMEOUT=0,n.DEFAULT_MAX_OCCUPATION_TIME=0,n.DEFAULT_MAX_EXECUTION_TIME=0,n.DEFAULT_MAX_PENDING=1e3,n.prototype.acquire=function(e,t,n,r){if(Array.isArray(e))return this._acquireBatch(e,t,n,r);if(typeof t!=`function`)throw Error(`You must pass a function to execute`);var i=null,a=null,o=null;typeof n!=`function`&&(r=n,n=null,o=new this.Promise(function(e,t){i=e,a=t})),r||={};var s=!1,c=null,l=null,u=null,d=this,f=function(t,r,c){l&&=(clearTimeout(l),null),u&&=(clearTimeout(u),null),t&&(d.queues[e]&&d.queues[e].length===0&&delete d.queues[e],d.domainReentrant&&delete d.domains[e]),s||=(o?r?a(r):i(c):typeof n==`function`&&n(r,c),!0),t&&d.queues[e]&&d.queues[e].length>0&&d.queues[e].shift()()},p=function(n){if(s)return f(n);c&&=(clearTimeout(c),null),d.domainReentrant&&n&&(d.domains[e]=process.domain);var i=r.maxExecutionTime||d.maxExecutionTime;if(i&&(u=setTimeout(function(){d.queues[e]&&f(n,Error(`Maximum execution time is exceeded `+e))},i)),t.length===1){var a=!1;try{t(function(e,t){a||(a=!0,f(n,e,t))})}catch(e){a||(a=!0,f(n,e))}}else d._promiseTry(function(){return t()}).then(function(e){f(n,void 0,e)},function(e){f(n,e)})};d.domainReentrant&&process.domain&&(p=process.domain.bind(p));var m=r.maxPending||d.maxPending;if(!d.queues[e])d.queues[e]=[],p(!0);else if(d.domainReentrant&&process.domain&&process.domain===d.domains[e])p(!1);else if(d.queues[e].length>=m)f(!1,Error(`Too many pending tasks in queue `+e));else{var h=function(){p(!0)};r.skipQueue?d.queues[e].unshift(h):d.queues[e].push(h);var g=r.timeout||d.timeout;g&&(c=setTimeout(function(){c=null,f(!1,Error(`async-lock timed out in queue `+e))},g))}var _=r.maxOccupationTime||d.maxOccupationTime;if(_&&(l=setTimeout(function(){d.queues[e]&&f(!1,Error(`Maximum occupation time is exceeded in queue `+e))},_)),o)return o},n.prototype._acquireBatch=function(e,t,n,r){var i=Object.create(null);e=e.filter(function(e){return!i[e]&&(i[e]=!0,!0)}),typeof n!=`function`&&(r=n,n=null);var a=this,o=function(e,t){return function(n){a.acquire(e,t,n,r)}},s=e.reduceRight(function(e,t){return o(t,e)},t);if(typeof n==`function`)s(n);else return new this.Promise(function(e,t){s.length===1?s(function(n,r){n?t(n):e(r)}):e(s())})},n.prototype.isBusy=function(e){return e?!!this.queues[e]:Object.keys(this.queues).length>0},n.prototype._promiseTry=function(e){try{return this.Promise.resolve(e())}catch(e){return this.Promise.reject(e)}},t.exports=n})),G=t(((e,t)=>{t.exports=W()})),K=t(((e,t)=>{function n(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function r(e,t,r){return t=t instanceof RegExp?t:new RegExp(n(t),`g`),e.replace(t,r)}t.exports={clean:function(e){if(typeof e!=`string`)throw Error(`Expected a string, received: `+e);return e=r(e,`./`,`/`),e=r(e,`..`,`.`),e=r(e,` `,`-`),e=r(e,/^[~^:?*\\\-]/g,``),e=r(e,/[~^:?*\\]/g,`-`),e=r(e,/[~^:?*\\\-]$/g,``),e=r(e,`@{`,`-`),e=r(e,/\.$/g,``),e=r(e,/\/$/g,``),e=r(e,/\.lock$/g,``),e}}})),q=t((e=>{
/*! crc32.js (C) 2014-present SheetJS -- http://sheetjs.com */
(function(t){typeof DO_NOT_EXPORT_CRC>`u`?typeof e==`object`?t(e):typeof define==`function`&&define.amd?define(function(){var e={};return t(e),e}):t({}):t({})})(function(e){e.version=`1.2.2`;function t(){for(var e=0,t=Array(256),n=0;n!=256;++n)e=n,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,e=e&1?-306674912^e>>>1:e>>>1,t[n]=e;return typeof Int32Array<`u`?new Int32Array(t):t}var n=t();function r(e){var t=0,n=0,r=0,i=typeof Int32Array<`u`?new Int32Array(4096):Array(4096);for(r=0;r!=256;++r)i[r]=e[r];for(r=0;r!=256;++r)for(n=e[r],t=256+r;t<4096;t+=256)n=i[t]=n>>>8^e[n&255];var a=[];for(r=1;r!=16;++r)a[r-1]=typeof Int32Array<`u`?i.subarray(r*256,r*256+256):i.slice(r*256,r*256+256);return a}var i=r(n),a=i[0],o=i[1],s=i[2],c=i[3],l=i[4],u=i[5],d=i[6],f=i[7],p=i[8],m=i[9],h=i[10],g=i[11],_=i[12],v=i[13],y=i[14];function b(e,t){for(var r=t^-1,i=0,a=e.length;i<a;)r=r>>>8^n[(r^e.charCodeAt(i++))&255];return~r}function x(e,t){for(var r=t^-1,i=e.length-15,b=0;b<i;)r=y[e[b++]^r&255]^v[e[b++]^r>>8&255]^_[e[b++]^r>>16&255]^g[e[b++]^r>>>24]^h[e[b++]]^m[e[b++]]^p[e[b++]]^f[e[b++]]^d[e[b++]]^u[e[b++]]^l[e[b++]]^c[e[b++]]^s[e[b++]]^o[e[b++]]^a[e[b++]]^n[e[b++]];for(i+=15;b<i;)r=r>>>8^n[(r^e[b++])&255];return~r}function S(e,t){for(var r=t^-1,i=0,a=e.length,o=0,s=0;i<a;)o=e.charCodeAt(i++),o<128?r=r>>>8^n[(r^o)&255]:o<2048?(r=r>>>8^n[(r^(192|o>>6&31))&255],r=r>>>8^n[(r^(128|o&63))&255]):o>=55296&&o<57344?(o=(o&1023)+64,s=e.charCodeAt(i++)&1023,r=r>>>8^n[(r^(240|o>>8&7))&255],r=r>>>8^n[(r^(128|o>>2&63))&255],r=r>>>8^n[(r^(128|s>>6&15|(o&3)<<4))&255],r=r>>>8^n[(r^(128|s&63))&255]):(r=r>>>8^n[(r^(224|o>>12&15))&255],r=r>>>8^n[(r^(128|o>>6&63))&255],r=r>>>8^n[(r^(128|o&63))&255]);return~r}e.table=n,e.bstr=b,e.buf=x,e.str=S})})),J=t((e=>{var t=typeof Uint8Array<`u`&&typeof Uint16Array<`u`&&typeof Int32Array<`u`;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if(typeof r!=`object`)throw TypeError(r+`must be non-object`);for(var i in r)n(r,i)&&(e[i]=r[i])}}return e},e.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){var t,n,r=0,i,a,o;for(t=0,n=e.length;t<n;t++)r+=e[t].length;for(o=new Uint8Array(r),i=0,t=0,n=e.length;t<n;t++)a=e[t],o.set(a,i),i+=a.length;return o}},i={arraySet:function(e,t,n,r,i){for(var a=0;a<r;a++)e[i+a]=t[n+a]},flattenChunks:function(e){return[].concat.apply([],e)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,r)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(t)})),Y=t((e=>{var t=J(),n=4,r=0,i=1,a=2;function o(e){for(var t=e.length;--t>=0;)e[t]=0}var s=0,c=1,l=2,u=3,d=258,f=29,p=256,m=p+1+f,h=30,g=19,_=2*m+1,v=15,y=16,b=7,x=256,S=16,C=17,w=18,T=[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],E=[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],D=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ee=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],te=512,O=Array((m+2)*2);o(O);var k=Array(h*2);o(k);var A=Array(te);o(A);var j=Array(d-u+1);o(j);var M=Array(f);o(M);var ne=Array(h);o(ne);function re(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}var ie,ae,N;function P(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function oe(e){return e<256?A[e]:A[256+(e>>>7)]}function se(e,t){e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255}function F(e,t,n){e.bi_valid>y-n?(e.bi_buf|=t<<e.bi_valid&65535,se(e,e.bi_buf),e.bi_buf=t>>y-e.bi_valid,e.bi_valid+=n-y):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function I(e,t,n){F(e,n[t*2],n[t*2+1])}function ce(e,t){var n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1}function le(e){e.bi_valid===16?(se(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)}function ue(e,t){var n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,d,f,p,m,h=0;for(f=0;f<=v;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<_;l++)u=e.heap[l],f=n[n[u*2+1]*2+1]+1,f>c&&(f=c,h++),n[u*2+1]=f,u>r||(e.bl_count[f]++,p=0,u>=s&&(p=o[u-s]),m=n[u*2],e.opt_len+=m*(f+p),a&&(e.static_len+=m*(i[u*2+1]+p)));if(h!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,h-=2}while(h>0);for(f=c;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--l],d>r||(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),u--)}}function de(e,t,n){for(var r=Array(v+1),i=0,a=1,o;a<=v;a++)r[a]=i=i+n[a-1]<<1;for(o=0;o<=t;o++){var s=e[o*2+1];s!==0&&(e[o*2]=ce(r[s]++,s))}}function L(){var e,t,n,r,i,a=Array(v+1);for(n=0,r=0;r<f-1;r++)for(M[r]=n,e=0;e<1<<T[r];e++)j[n++]=r;for(j[n-1]=r,i=0,r=0;r<16;r++)for(ne[r]=i,e=0;e<1<<E[r];e++)A[i++]=r;for(i>>=7;r<h;r++)for(ne[r]=i<<7,e=0;e<1<<E[r]-7;e++)A[256+i++]=r;for(t=0;t<=v;t++)a[t]=0;for(e=0;e<=143;)O[e*2+1]=8,e++,a[8]++;for(;e<=255;)O[e*2+1]=9,e++,a[9]++;for(;e<=279;)O[e*2+1]=7,e++,a[7]++;for(;e<=287;)O[e*2+1]=8,e++,a[8]++;for(de(O,m+1,a),e=0;e<h;e++)k[e*2+1]=5,k[e*2]=ce(e,5);ie=new re(O,T,p+1,m,v),ae=new re(k,E,0,h,v),N=new re([],D,0,g,b)}function R(e){for(var t=0;t<m;t++)e.dyn_ltree[t*2]=0;for(t=0;t<h;t++)e.dyn_dtree[t*2]=0;for(t=0;t<g;t++)e.bl_tree[t*2]=0;e.dyn_ltree[x*2]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function fe(e){e.bi_valid>8?se(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function z(e,n,r,i){fe(e),i&&(se(e,r),se(e,~r)),t.arraySet(e.pending_buf,e.window,n,r,e.pending),e.pending+=r}function B(e,t,n,r){var i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]}function V(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&B(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!B(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function pe(e,t,n){var r,i,a=0,o,s;if(e.last_lit!==0)do r=e.pending_buf[e.d_buf+a*2]<<8|e.pending_buf[e.d_buf+a*2+1],i=e.pending_buf[e.l_buf+a],a++,r===0?I(e,i,t):(o=j[i],I(e,o+p+1,t),s=T[o],s!==0&&(i-=M[o],F(e,i,s)),r--,o=oe(r),I(e,o,n),s=E[o],s!==0&&(r-=ne[o],F(e,r,s)));while(a<e.last_lit);I(e,x,t)}function me(e,t){var n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=_,o=0;o<a;o++)n[o*2]===0?n[o*2+1]=0:(e.heap[++e.heap_len]=c=o,e.depth[o]=0);for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)V(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],V(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,V(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],ue(e,t),de(n,c,e.bl_count)}function H(e,t,n){var r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],++s<c&&a===o||(s<l?e.bl_tree[a*2]+=s:a===0?s<=10?e.bl_tree[C*2]++:e.bl_tree[w*2]++:(a!==i&&e.bl_tree[a*2]++,e.bl_tree[S*2]++),s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))}function he(e,t,n){var r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)){if(s<l)do I(e,a,e.bl_tree);while(--s!==0);else a===0?s<=10?(I(e,C,e.bl_tree),F(e,s-3,3)):(I(e,w,e.bl_tree),F(e,s-11,7)):(a!==i&&(I(e,a,e.bl_tree),s--),I(e,S,e.bl_tree),F(e,s-3,2));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}}function U(e){var t;for(H(e,e.dyn_ltree,e.l_desc.max_code),H(e,e.dyn_dtree,e.d_desc.max_code),me(e,e.bl_desc),t=g-1;t>=3&&e.bl_tree[ee[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t}function W(e,t,n,r){var i;for(F(e,t-257,5),F(e,n-1,5),F(e,r-4,4),i=0;i<r;i++)F(e,e.bl_tree[ee[i]*2+1],3);he(e,e.dyn_ltree,t-1),he(e,e.dyn_dtree,n-1)}function G(e){for(var t=4093624447,n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return r;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return i;for(n=32;n<p;n++)if(e.dyn_ltree[n*2]!==0)return i;return r}var K=!1;function q(e){K||=(L(),!0),e.l_desc=new P(e.dyn_ltree,ie),e.d_desc=new P(e.dyn_dtree,ae),e.bl_desc=new P(e.bl_tree,N),e.bi_buf=0,e.bi_valid=0,R(e)}function Y(e,t,n,r){F(e,(s<<1)+ +!!r,3),z(e,t,n,!0)}function ge(e){F(e,c<<1,3),I(e,x,O),le(e)}function _e(e,t,r,i){var o,s,u=0;e.level>0?(e.strm.data_type===a&&(e.strm.data_type=G(e)),me(e,e.l_desc),me(e,e.d_desc),u=U(e),o=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=o&&(o=s)):o=s=r+5,r+4<=o&&t!==-1?Y(e,t,r,i):e.strategy===n||s===o?(F(e,(c<<1)+ +!!i,3),pe(e,O,k)):(F(e,(l<<1)+ +!!i,3),W(e,e.l_desc.max_code+1,e.d_desc.max_code+1,u+1),pe(e,e.dyn_ltree,e.dyn_dtree)),R(e),i&&fe(e)}function ve(e,t,n){return e.pending_buf[e.d_buf+e.last_lit*2]=t>>>8&255,e.pending_buf[e.d_buf+e.last_lit*2+1]=t&255,e.pending_buf[e.l_buf+e.last_lit]=n&255,e.last_lit++,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(j[n]+p+1)*2]++,e.dyn_dtree[oe(t)*2]++),e.last_lit===e.lit_bufsize-1}e._tr_init=q,e._tr_stored_block=Y,e._tr_flush_block=_e,e._tr_tally=ve,e._tr_align=ge})),ge=t(((e,t)=>{function n(e,t,n,r){for(var i=e&65535,a=e>>>16&65535,o=0;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16}t.exports=n})),_e=t(((e,t)=>{function n(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t}var r=n();function i(e,t,n,i){var a=r,o=i+n;e^=-1;for(var s=i;s<o;s++)e=e>>>8^a[(e^t[s])&255];return e^-1}t.exports=i})),ve=t(((e,t)=>{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`}})),ye=t((e=>{var t=J(),n=Y(),r=ge(),i=_e(),a=ve(),o=0,s=1,c=3,l=4,u=5,d=0,f=1,p=-2,m=-3,h=-5,g=-1,_=1,v=2,y=3,b=4,x=0,S=2,C=8,w=9,T=15,E=8,D=286,ee=30,te=19,O=2*D+1,k=15,A=3,j=258,M=j+A+1,ne=32,re=42,ie=69,ae=73,N=91,P=103,oe=113,se=666,F=1,I=2,ce=3,le=4,ue=3;function de(e,t){return e.msg=a[t],t}function L(e){return(e<<1)-(e>4?9:0)}function R(e){for(var t=e.length;--t>=0;)e[t]=0}function fe(e){var n=e.state,r=n.pending;r>e.avail_out&&(r=e.avail_out),r!==0&&(t.arraySet(e.output,n.pending_buf,n.pending_out,r,e.next_out),e.next_out+=r,n.pending_out+=r,e.total_out+=r,e.avail_out-=r,n.pending-=r,n.pending===0&&(n.pending_out=0))}function z(e,t){n._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,fe(e.strm)}function B(e,t){e.pending_buf[e.pending++]=t}function V(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255}function pe(e,n,a,o){var s=e.avail_in;return s>o&&(s=o),s===0?0:(e.avail_in-=s,t.arraySet(n,e.input,e.next_in,s,a),e.state.wrap===1?e.adler=r(e.adler,n,s,a):e.state.wrap===2&&(e.adler=i(e.adler,n,s,a)),e.next_in+=s,e.total_in+=s,s)}function me(e,t){var n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-M?e.strstart-(e.w_size-M):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+j,p=l[r+o-1],m=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,l[i+o]===m&&l[i+o-1]===p&&l[i]===l[r]&&l[++i]===l[r+1]){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<f);if(a=j-(f-r),r=f-j,a>o){if(e.match_start=t,o=a,a>=s)break;p=l[r+o-1],m=l[r+o]}}while((t=d[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead}function H(e){var n=e.w_size,r,i,a,o,s;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=n+(n-M)){t.arraySet(e.window,e.window,n,n,0),e.match_start-=n,e.strstart-=n,e.block_start-=n,i=e.hash_size,r=i;do a=e.head[--r],e.head[r]=a>=n?a-n:0;while(--i);i=n,r=i;do a=e.prev[--r],e.prev[r]=a>=n?a-n:0;while(--i);o+=n}if(e.strm.avail_in===0)break;if(i=pe(e.strm,e.window,e.strstart+e.lookahead,o),e.lookahead+=i,e.lookahead+e.insert>=A)for(s=e.strstart-e.insert,e.ins_h=e.window[s],e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[s+A-1])&e.hash_mask,e.prev[s&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=s,s++,e.insert--,!(e.lookahead+e.insert<A)););}while(e.lookahead<M&&e.strm.avail_in!==0)}function he(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(H(e),e.lookahead===0&&t===o)return F;if(e.lookahead===0)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((e.strstart===0||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,z(e,!1),e.strm.avail_out===0)||e.strstart-e.block_start>=e.w_size-M&&(z(e,!1),e.strm.avail_out===0))return F}return e.insert=0,t===l?(z(e,!0),e.strm.avail_out===0?ce:le):(e.strstart>e.block_start&&(z(e,!1),e.strm.avail_out),F)}function U(e,t){for(var r,i;;){if(e.lookahead<M){if(H(e),e.lookahead<M&&t===o)return F;if(e.lookahead===0)break}if(r=0,e.lookahead>=A&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+A-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),r!==0&&e.strstart-r<=e.w_size-M&&(e.match_length=me(e,r)),e.match_length>=A){if(i=n._tr_tally(e,e.strstart-e.match_start,e.match_length-A),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=A){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+A-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask}else i=n._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(z(e,!1),e.strm.avail_out===0))return F}return e.insert=e.strstart<A-1?e.strstart:A-1,t===l?(z(e,!0),e.strm.avail_out===0?ce:le):e.last_lit&&(z(e,!1),e.strm.avail_out===0)?F:I}function W(e,t){for(var r,i,a;;){if(e.lookahead<M){if(H(e),e.lookahead<M&&t===o)return F;if(e.lookahead===0)break}if(r=0,e.lookahead>=A&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+A-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=A-1,r!==0&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-M&&(e.match_length=me(e,r),e.match_length<=5&&(e.strategy===_||e.match_length===A&&e.strstart-e.match_start>4096)&&(e.match_length=A-1)),e.prev_length>=A&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-A,i=n._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-A),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=a&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+A-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=A-1,e.strstart++,i&&(z(e,!1),e.strm.avail_out===0))return F}else if(e.match_available){if(i=n._tr_tally(e,0,e.window[e.strstart-1]),i&&z(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return F}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&=(i=n._tr_tally(e,0,e.window[e.strstart-1]),0),e.insert=e.strstart<A-1?e.strstart:A-1,t===l?(z(e,!0),e.strm.avail_out===0?ce:le):e.last_lit&&(z(e,!1),e.strm.avail_out===0)?F:I}function G(e,t){for(var r,i,a,s,c=e.window;;){if(e.lookahead<=j){if(H(e),e.lookahead<=j&&t===o)return F;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=A&&e.strstart>0&&(a=e.strstart-1,i=c[a],i===c[++a]&&i===c[++a]&&i===c[++a])){s=e.strstart+j;do;while(i===c[++a]&&i===c[++a]&&i===c[++a]&&i===c[++a]&&i===c[++a]&&i===c[++a]&&i===c[++a]&&i===c[++a]&&a<s);e.match_length=j-(s-a),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=A?(r=n._tr_tally(e,1,e.match_length-A),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=n._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(z(e,!1),e.strm.avail_out===0))return F}return e.insert=0,t===l?(z(e,!0),e.strm.avail_out===0?ce:le):e.last_lit&&(z(e,!1),e.strm.avail_out===0)?F:I}function K(e,t){for(var r;;){if(e.lookahead===0&&(H(e),e.lookahead===0)){if(t===o)return F;break}if(e.match_length=0,r=n._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(z(e,!1),e.strm.avail_out===0))return F}return e.insert=0,t===l?(z(e,!0),e.strm.avail_out===0?ce:le):e.last_lit&&(z(e,!1),e.strm.avail_out===0)?F:I}function q(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var ye=[new q(0,0,0,0,he),new q(4,4,8,4,U),new q(4,5,16,8,U),new q(4,6,32,32,U),new q(4,4,16,16,W),new q(8,16,32,32,W),new q(8,16,128,128,W),new q(8,32,128,256,W),new q(32,128,258,1024,W),new q(32,258,258,4096,W)];function X(e){e.window_size=2*e.w_size,R(e.head),e.max_lazy_match=ye[e.level].max_lazy,e.good_match=ye[e.level].good_length,e.nice_match=ye[e.level].nice_length,e.max_chain_length=ye[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=A-1,e.match_available=0,e.ins_h=0}function Z(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=C,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new t.Buf16(O*2),this.dyn_dtree=new t.Buf16((2*ee+1)*2),this.bl_tree=new t.Buf16((2*te+1)*2),R(this.dyn_ltree),R(this.dyn_dtree),R(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new t.Buf16(k+1),this.heap=new t.Buf16(2*D+1),R(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new t.Buf16(2*D+1),R(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function be(e){var t;return!e||!e.state?de(e,p):(e.total_in=e.total_out=0,e.data_type=S,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?re:oe,e.adler=t.wrap===2?0:1,t.last_flush=o,n._tr_init(t),d)}function xe(e){var t=be(e);return t===d&&X(e.state),t}function Se(e,t){return!e||!e.state||e.state.wrap!==2?p:(e.state.gzhead=t,d)}function Ce(e,n,r,i,a,o){if(!e)return p;var s=1;if(n===g&&(n=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),a<1||a>w||r!==C||i<8||i>15||n<0||n>9||o<0||o>b)return de(e,p);i===8&&(i=9);var c=new Z;return e.state=c,c.strm=e,c.wrap=s,c.gzhead=null,c.w_bits=i,c.w_size=1<<c.w_bits,c.w_mask=c.w_size-1,c.hash_bits=a+7,c.hash_size=1<<c.hash_bits,c.hash_mask=c.hash_size-1,c.hash_shift=~~((c.hash_bits+A-1)/A),c.window=new t.Buf8(c.w_size*2),c.head=new t.Buf16(c.hash_size),c.prev=new t.Buf16(c.w_size),c.lit_bufsize=1<<a+6,c.pending_buf_size=c.lit_bufsize*4,c.pending_buf=new t.Buf8(c.pending_buf_size),c.d_buf=1*c.lit_bufsize,c.l_buf=3*c.lit_bufsize,c.level=n,c.strategy=o,c.method=r,xe(e)}function we(e,t){return Ce(e,t,C,T,E,x)}function Te(e,t){var r,a,m,g;if(!e||!e.state||t>u||t<0)return e?de(e,p):p;if(a=e.state,!e.output||!e.input&&e.avail_in!==0||a.status===se&&t!==l)return de(e,e.avail_out===0?h:p);if(a.strm=e,r=a.last_flush,a.last_flush=t,a.status===re){if(a.wrap===2)e.adler=0,B(a,31),B(a,139),B(a,8),a.gzhead?(B(a,+!!a.gzhead.text+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),B(a,a.gzhead.time&255),B(a,a.gzhead.time>>8&255),B(a,a.gzhead.time>>16&255),B(a,a.gzhead.time>>24&255),B(a,a.level===9?2:a.strategy>=v||a.level<2?4:0),B(a,a.gzhead.os&255),a.gzhead.extra&&a.gzhead.extra.length&&(B(a,a.gzhead.extra.length&255),B(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(e.adler=i(e.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=ie):(B(a,0),B(a,0),B(a,0),B(a,0),B(a,0),B(a,a.level===9?2:a.strategy>=v||a.level<2?4:0),B(a,ue),a.status=oe);else{var _=C+(a.w_bits-8<<4)<<8,b=-1;b=a.strategy>=v||a.level<2?0:a.level<6?1:a.level===6?2:3,_|=b<<6,a.strstart!==0&&(_|=ne),_+=31-_%31,a.status=oe,V(a,_),a.strstart!==0&&(V(a,e.adler>>>16),V(a,e.adler&65535)),e.adler=1}}if(a.status===ie){if(a.gzhead.extra){for(m=a.pending;a.gzindex<(a.gzhead.extra.length&65535)&&!(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>m&&(e.adler=i(e.adler,a.pending_buf,a.pending-m,m)),fe(e),m=a.pending,a.pending===a.pending_buf_size));)B(a,a.gzhead.extra[a.gzindex]&255),a.gzindex++;a.gzhead.hcrc&&a.pending>m&&(e.adler=i(e.adler,a.pending_buf,a.pending-m,m)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=ae)}else a.status=ae}if(a.status===ae){if(a.gzhead.name){m=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>m&&(e.adler=i(e.adler,a.pending_buf,a.pending-m,m)),fe(e),m=a.pending,a.pending===a.pending_buf_size)){g=1;break}g=a.gzindex<a.gzhead.name.length?a.gzhead.name.charCodeAt(a.gzindex++)&255:0,B(a,g)}while(g!==0);a.gzhead.hcrc&&a.pending>m&&(e.adler=i(e.adler,a.pending_buf,a.pending-m,m)),g===0&&(a.gzindex=0,a.status=N)}else a.status=N}if(a.status===N){if(a.gzhead.comment){m=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>m&&(e.adler=i(e.adler,a.pending_buf,a.pending-m,m)),fe(e),m=a.pending,a.pending===a.pending_buf_size)){g=1;break}g=a.gzindex<a.gzhead.comment.length?a.gzhead.comment.charCodeAt(a.gzindex++)&255:0,B(a,g)}while(g!==0);a.gzhead.hcrc&&a.pending>m&&(e.adler=i(e.adler,a.pending_buf,a.pending-m,m)),g===0&&(a.status=P)}else a.status=P}if(a.status===P&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&fe(e),a.pending+2<=a.pending_buf_size&&(B(a,e.adler&255),B(a,e.adler>>8&255),e.adler=0,a.status=oe)):a.status=oe),a.pending!==0){if(fe(e),e.avail_out===0)return a.last_flush=-1,d}else if(e.avail_in===0&&L(t)<=L(r)&&t!==l)return de(e,h);if(a.status===se&&e.avail_in!==0)return de(e,h);if(e.avail_in!==0||a.lookahead!==0||t!==o&&a.status!==se){var x=a.strategy===v?K(a,t):a.strategy===y?G(a,t):ye[a.level].func(a,t);if((x===ce||x===le)&&(a.status=se),x===F||x===ce)return e.avail_out===0&&(a.last_flush=-1),d;if(x===I&&(t===s?n._tr_align(a):t!==u&&(n._tr_stored_block(a,0,0,!1),t===c&&(R(a.head),a.lookahead===0&&(a.strstart=0,a.block_start=0,a.insert=0))),fe(e),e.avail_out===0))return a.last_flush=-1,d}return t===l?a.wrap<=0?f:(a.wrap===2?(B(a,e.adler&255),B(a,e.adler>>8&255),B(a,e.adler>>16&255),B(a,e.adler>>24&255),B(a,e.total_in&255),B(a,e.total_in>>8&255),B(a,e.total_in>>16&255),B(a,e.total_in>>24&255)):(V(a,e.adler>>>16),V(a,e.adler&65535)),fe(e),a.wrap>0&&(a.wrap=-a.wrap),a.pending===0?f:d):d}function Ee(e){var t;return!e||!e.state?p:(t=e.state.status,t!==re&&t!==ie&&t!==ae&&t!==N&&t!==P&&t!==oe&&t!==se?de(e,p):(e.state=null,t===oe?de(e,m):d))}function De(e,n){var i=n.length,a,o,s,c,l,u,f,m;if(!e||!e.state||(a=e.state,c=a.wrap,c===2||c===1&&a.status!==re||a.lookahead))return p;for(c===1&&(e.adler=r(e.adler,n,i,0)),a.wrap=0,i>=a.w_size&&(c===0&&(R(a.head),a.strstart=0,a.block_start=0,a.insert=0),m=new t.Buf8(a.w_size),t.arraySet(m,n,i-a.w_size,a.w_size,0),n=m,i=a.w_size),l=e.avail_in,u=e.next_in,f=e.input,e.avail_in=i,e.next_in=0,e.input=n,H(a);a.lookahead>=A;){o=a.strstart,s=a.lookahead-(A-1);do a.ins_h=(a.ins_h<<a.hash_shift^a.window[o+A-1])&a.hash_mask,a.prev[o&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=o,o++;while(--s);a.strstart=o,a.lookahead=A-1,H(a)}return a.strstart+=a.lookahead,a.block_start=a.strstart,a.insert=a.lookahead,a.lookahead=0,a.match_length=a.prev_length=A-1,a.match_available=0,e.next_in=u,e.input=f,e.avail_in=l,a.wrap=c,d}e.deflateInit=we,e.deflateInit2=Ce,e.deflateReset=xe,e.deflateResetKeep=be,e.deflateSetHeader=Se,e.deflate=Te,e.deflateEnd=Ee,e.deflateSetDictionary=De,e.deflateInfo=`pako deflate (from Nodeca project)`})),X=t((e=>{var t=J(),n=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch{n=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{r=!1}for(var i=new t.Buf8(256),a=0;a<256;a++)i[a]=a>=252?6:a>=248?5:a>=240?4:a>=224?3:a>=192?2:1;i[254]=i[254]=1,e.string2buf=function(e){var n,r,i,a,o,s=e.length,c=0;for(a=0;a<s;a++)r=e.charCodeAt(a),(r&64512)==55296&&a+1<s&&(i=e.charCodeAt(a+1),(i&64512)==56320&&(r=65536+(r-55296<<10)+(i-56320),a++)),c+=r<128?1:r<2048?2:r<65536?3:4;for(n=new t.Buf8(c),o=0,a=0;o<c;a++)r=e.charCodeAt(a),(r&64512)==55296&&a+1<s&&(i=e.charCodeAt(a+1),(i&64512)==56320&&(r=65536+(r-55296<<10)+(i-56320),a++)),r<128?n[o++]=r:r<2048?(n[o++]=192|r>>>6,n[o++]=128|r&63):r<65536?(n[o++]=224|r>>>12,n[o++]=128|r>>>6&63,n[o++]=128|r&63):(n[o++]=240|r>>>18,n[o++]=128|r>>>12&63,n[o++]=128|r>>>6&63,n[o++]=128|r&63);return n};function o(e,i){if(i<65534&&(e.subarray&&r||!e.subarray&&n))return String.fromCharCode.apply(null,t.shrinkBuf(e,i));for(var a=``,o=0;o<i;o++)a+=String.fromCharCode(e[o]);return a}e.buf2binstring=function(e){return o(e,e.length)},e.binstring2buf=function(e){for(var n=new t.Buf8(e.length),r=0,i=n.length;r<i;r++)n[r]=e.charCodeAt(r);return n},e.buf2string=function(e,t){var n,r,a,s,c=t||e.length,l=Array(c*2);for(r=0,n=0;n<c;)if(a=e[n++],a<128)l[r++]=a;else if(s=i[a],s>4)l[r++]=65533,n+=s-1;else{for(a&=s===2?31:s===3?15:7;s>1&&n<c;)a=a<<6|e[n++]&63,s--;s>1?l[r++]=65533:a<65536?l[r++]=a:(a-=65536,l[r++]=55296|a>>10&1023,l[r++]=56320|a&1023)}return o(l,r)},e.utf8border=function(e,t){var n;for(t||=e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&(e[n]&192)==128;)n--;return n<0||n===0?t:n+i[e[n]]>t?n:t}})),Z=t(((e,t)=>{function n(){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}t.exports=n})),be=t((e=>{var t=ye(),n=J(),r=X(),i=ve(),a=Z(),o=Object.prototype.toString,s=0,c=4,l=0,u=1,d=2,f=-1,p=0,m=8;function h(e){if(!(this instanceof h))return new h(e);this.options=n.assign({level:f,method:m,chunkSize:16384,windowBits:15,memLevel:8,strategy:p,to:``},e||{});var s=this.options;s.raw&&s.windowBits>0?s.windowBits=-s.windowBits:s.gzip&&s.windowBits>0&&s.windowBits<16&&(s.windowBits+=16),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var c=t.deflateInit2(this.strm,s.level,s.method,s.windowBits,s.memLevel,s.strategy);if(c!==l)throw Error(i[c]);if(s.header&&t.deflateSetHeader(this.strm,s.header),s.dictionary){var u=typeof s.dictionary==`string`?r.string2buf(s.dictionary):o.call(s.dictionary)===`[object ArrayBuffer]`?new Uint8Array(s.dictionary):s.dictionary;if(c=t.deflateSetDictionary(this.strm,u),c!==l)throw Error(i[c]);this._dict_set=!0}}h.prototype.push=function(e,i){var a=this.strm,f=this.options.chunkSize,p,m;if(this.ended)return!1;m=i===~~i?i:i===!0?c:s,a.input=typeof e==`string`?r.string2buf(e):o.call(e)===`[object ArrayBuffer]`?new Uint8Array(e):e,a.next_in=0,a.avail_in=a.input.length;do{if(a.avail_out===0&&(a.output=new n.Buf8(f),a.next_out=0,a.avail_out=f),p=t.deflate(a,m),p!==u&&p!==l)return this.onEnd(p),this.ended=!0,!1;(a.avail_out===0||a.avail_in===0&&(m===c||m===d))&&(this.options.to===`string`?this.onData(r.buf2binstring(n.shrinkBuf(a.output,a.next_out))):this.onData(n.shrinkBuf(a.output,a.next_out)))}while((a.avail_in>0||a.avail_out===0)&&p!==u);return m===c?(p=t.deflateEnd(this.strm),this.onEnd(p),this.ended=!0,p===l):(m===d&&(this.onEnd(l),a.avail_out=0),!0)},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===l&&(this.result=this.options.to===`string`?this.chunks.join(``):n.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function g(e,t){var n=new h(t);if(n.push(e,!0),n.err)throw n.msg||i[n.err];return n.result}function _(e,t){return t||={},t.raw=!0,g(e,t)}function v(e,t){return t||={},t.gzip=!0,g(e,t)}e.Deflate=h,e.deflate=g,e.deflateRaw=_,e.gzip=v})),xe=t(((e,t)=>{t.exports=function(e,t){var n=e.state,r=e.next_in,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=e.input,E;i=r+(e.avail_in-5),a=e.next_out,E=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),c=n.dmax,l=n.wsize,u=n.whave,d=n.wnext,f=n.window,p=n.hold,m=n.bits,h=n.lencode,g=n.distcode,_=(1<<n.lenbits)-1,v=(1<<n.distbits)-1;top:do{m<15&&(p+=T[r++]<<m,m+=8,p+=T[r++]<<m,m+=8),y=h[p&_];dolen:for(;;){if(b=y>>>24,p>>>=b,m-=b,b=y>>>16&255,b===0)E[a++]=y&65535;else if(b&16){x=y&65535,b&=15,b&&(m<b&&(p+=T[r++]<<m,m+=8),x+=p&(1<<b)-1,p>>>=b,m-=b),m<15&&(p+=T[r++]<<m,m+=8,p+=T[r++]<<m,m+=8),y=g[p&v];dodist:for(;;){if(b=y>>>24,p>>>=b,m-=b,b=y>>>16&255,b&16){if(S=y&65535,b&=15,m<b&&(p+=T[r++]<<m,m+=8,m<b&&(p+=T[r++]<<m,m+=8)),S+=p&(1<<b)-1,S>c){e.msg=`invalid distance too far back`,n.mode=30;break top}if(p>>>=b,m-=b,b=a-o,S>b){if(b=S-b,b>u&&n.sane){e.msg=`invalid distance too far back`,n.mode=30;break top}if(C=0,w=f,d===0){if(C+=l-b,b<x){x-=b;do E[a++]=f[C++];while(--b);C=a-S,w=E}}else if(d<b){if(C+=l+d-b,b-=d,b<x){x-=b;do E[a++]=f[C++];while(--b);if(C=0,d<x){b=d,x-=b;do E[a++]=f[C++];while(--b);C=a-S,w=E}}}else if(C+=d-b,b<x){x-=b;do E[a++]=f[C++];while(--b);C=a-S,w=E}for(;x>2;)E[a++]=w[C++],E[a++]=w[C++],E[a++]=w[C++],x-=3;x&&(E[a++]=w[C++],x>1&&(E[a++]=w[C++]))}else{C=a-S;do E[a++]=E[C++],E[a++]=E[C++],E[a++]=E[C++],x-=3;while(x>2);x&&(E[a++]=E[C++],x>1&&(E[a++]=E[C++]))}}else if(b&64){e.msg=`invalid distance code`,n.mode=30;break top}else{y=g[(y&65535)+(p&(1<<b)-1)];continue dodist}break}}else if(!(b&64)){y=h[(y&65535)+(p&(1<<b)-1)];continue dolen}else if(b&32){n.mode=12;break top}else{e.msg=`invalid literal/length code`,n.mode=30;break top}break}}while(r<i&&a<s);x=m>>3,r-=x,m-=x<<3,p&=(1<<m)-1,e.next_in=r,e.next_out=a,e.avail_in=r<i?5+(i-r):5-(r-i),e.avail_out=a<s?257+(s-a):257-(a-s),n.hold=p,n.bits=m}})),Se=t(((e,t)=>{var n=J(),r=15,i=852,a=592,o=0,s=1,c=2,l=[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],u=[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],d=[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],f=[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(e,t,p,m,h,g,_,v){var y=v.bits,b=0,x=0,S=0,C=0,w=0,T=0,E=0,D=0,ee=0,te=0,O,k,A,j,M,ne=null,re=0,ie,ae=new n.Buf16(r+1),N=new n.Buf16(r+1),P=null,oe=0,se,F,I;for(b=0;b<=r;b++)ae[b]=0;for(x=0;x<m;x++)ae[t[p+x]]++;for(w=y,C=r;C>=1&&ae[C]===0;C--);if(w>C&&(w=C),C===0)return h[g++]=20971520,h[g++]=20971520,v.bits=1,0;for(S=1;S<C&&ae[S]===0;S++);for(w<S&&(w=S),D=1,b=1;b<=r;b++)if(D<<=1,D-=ae[b],D<0)return-1;if(D>0&&(e===o||C!==1))return-1;for(N[1]=0,b=1;b<r;b++)N[b+1]=N[b]+ae[b];for(x=0;x<m;x++)t[p+x]!==0&&(_[N[t[p+x]]++]=x);if(e===o?(ne=P=_,ie=19):e===s?(ne=l,re-=257,P=u,oe-=257,ie=256):(ne=d,P=f,ie=-1),te=0,x=0,b=S,M=g,T=w,E=0,A=-1,ee=1<<w,j=ee-1,e===s&&ee>i||e===c&&ee>a)return 1;for(;;){se=b-E,_[x]<ie?(F=0,I=_[x]):_[x]>ie?(F=P[oe+_[x]],I=ne[re+_[x]]):(F=96,I=0),O=1<<b-E,k=1<<T,S=k;do k-=O,h[M+(te>>E)+k]=se<<24|F<<16|I;while(k!==0);for(O=1<<b-1;te&O;)O>>=1;if(O===0?te=0:(te&=O-1,te+=O),x++,--ae[b]===0){if(b===C)break;b=t[p+_[x]]}if(b>w&&(te&j)!==A){for(E===0&&(E=w),M+=S,T=b-E,D=1<<T;T+E<C&&(D-=ae[T+E],!(D<=0));)T++,D<<=1;if(ee+=1<<T,e===s&&ee>i||e===c&&ee>a)return 1;A=te&j,h[A]=w<<24|T<<16|M-g}}return te!==0&&(h[M+te]=b-E<<24|4194304),v.bits=w,0}})),Ce=t((e=>{var t=J(),n=ge(),r=_e(),i=xe(),a=Se(),o=0,s=1,c=2,l=4,u=5,d=6,f=0,p=1,m=2,h=-2,g=-3,_=-4,v=-5,y=8,b=1,x=2,S=3,C=4,w=5,T=6,E=7,D=8,ee=9,te=10,O=11,k=12,A=13,j=14,M=15,ne=16,re=17,ie=18,ae=19,N=20,P=21,oe=22,se=23,F=24,I=25,ce=26,le=27,ue=28,de=29,L=30,R=31,fe=32,z=852,B=592,V=15;function pe(e){return(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24)}function me(){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 t.Buf16(320),this.work=new t.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function H(e){var n;return!e||!e.state?h:(n=e.state,e.total_in=e.total_out=n.total=0,e.msg=``,n.wrap&&(e.adler=n.wrap&1),n.mode=b,n.last=0,n.havedict=0,n.dmax=32768,n.head=null,n.hold=0,n.bits=0,n.lencode=n.lendyn=new t.Buf32(z),n.distcode=n.distdyn=new t.Buf32(B),n.sane=1,n.back=-1,f)}function he(e){var t;return!e||!e.state?h:(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,H(e))}function U(e,t){var n,r;return!e||!e.state||(r=e.state,t<0?(n=0,t=-t):(n=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15))?h:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,he(e))}function W(e,t){var n,r;return e?(r=new me,e.state=r,r.window=null,n=U(e,t),n!==f&&(e.state=null),n):h}function G(e){return W(e,V)}var K=!0,q,Y;function ve(e){if(K){var n;for(q=new t.Buf32(512),Y=new t.Buf32(32),n=0;n<144;)e.lens[n++]=8;for(;n<256;)e.lens[n++]=9;for(;n<280;)e.lens[n++]=7;for(;n<288;)e.lens[n++]=8;for(a(s,e.lens,0,288,q,0,e.work,{bits:9}),n=0;n<32;)e.lens[n++]=5;a(c,e.lens,0,32,Y,0,e.work,{bits:5}),K=!1}e.lencode=q,e.lenbits=9,e.distcode=Y,e.distbits=5}function ye(e,n,r,i){var a,o=e.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new t.Buf8(o.wsize)),i>=o.wsize?(t.arraySet(o.window,n,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):(a=o.wsize-o.wnext,a>i&&(a=i),t.arraySet(o.window,n,r-i,a,o.wnext),i-=a,i?(t.arraySet(o.window,n,r-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),0}function X(e,z){var B,V,me,H,he,U,W,G,K,q,J,Y,ge,_e,X=0,Z,be,xe,Se,Ce,we,Te,Ee,De=new t.Buf8(4),Oe,ke,Ae=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&e.avail_in!==0)return h;B=e.state,B.mode===k&&(B.mode=A),he=e.next_out,me=e.output,W=e.avail_out,H=e.next_in,V=e.input,U=e.avail_in,G=B.hold,K=B.bits,q=U,J=W,Ee=f;inf_leave:for(;;)switch(B.mode){case b:if(B.wrap===0){B.mode=A;break}for(;K<16;){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}if(B.wrap&2&&G===35615){B.check=0,De[0]=G&255,De[1]=G>>>8&255,B.check=r(B.check,De,2,0),G=0,K=0,B.mode=x;break}if(B.flags=0,B.head&&(B.head.done=!1),!(B.wrap&1)||(((G&255)<<8)+(G>>8))%31){e.msg=`incorrect header check`,B.mode=L;break}if((G&15)!==y){e.msg=`unknown compression method`,B.mode=L;break}if(G>>>=4,K-=4,Te=(G&15)+8,B.wbits===0)B.wbits=Te;else if(Te>B.wbits){e.msg=`invalid window size`,B.mode=L;break}B.dmax=1<<Te,e.adler=B.check=1,B.mode=G&512?te:k,G=0,K=0;break;case x:for(;K<16;){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}if(B.flags=G,(B.flags&255)!==y){e.msg=`unknown compression method`,B.mode=L;break}if(B.flags&57344){e.msg=`unknown header flags set`,B.mode=L;break}B.head&&(B.head.text=G>>8&1),B.flags&512&&(De[0]=G&255,De[1]=G>>>8&255,B.check=r(B.check,De,2,0)),G=0,K=0,B.mode=S;case S:for(;K<32;){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}B.head&&(B.head.time=G),B.flags&512&&(De[0]=G&255,De[1]=G>>>8&255,De[2]=G>>>16&255,De[3]=G>>>24&255,B.check=r(B.check,De,4,0)),G=0,K=0,B.mode=C;case C:for(;K<16;){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}B.head&&(B.head.xflags=G&255,B.head.os=G>>8),B.flags&512&&(De[0]=G&255,De[1]=G>>>8&255,B.check=r(B.check,De,2,0)),G=0,K=0,B.mode=w;case w:if(B.flags&1024){for(;K<16;){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}B.length=G,B.head&&(B.head.extra_len=G),B.flags&512&&(De[0]=G&255,De[1]=G>>>8&255,B.check=r(B.check,De,2,0)),G=0,K=0}else B.head&&(B.head.extra=null);B.mode=T;case T:if(B.flags&1024&&(Y=B.length,Y>U&&(Y=U),Y&&(B.head&&(Te=B.head.extra_len-B.length,B.head.extra||(B.head.extra=Array(B.head.extra_len)),t.arraySet(B.head.extra,V,H,Y,Te)),B.flags&512&&(B.check=r(B.check,V,Y,H)),U-=Y,H+=Y,B.length-=Y),B.length))break inf_leave;B.length=0,B.mode=E;case E:if(B.flags&2048){if(U===0)break inf_leave;Y=0;do Te=V[H+Y++],B.head&&Te&&B.length<65536&&(B.head.name+=String.fromCharCode(Te));while(Te&&Y<U);if(B.flags&512&&(B.check=r(B.check,V,Y,H)),U-=Y,H+=Y,Te)break inf_leave}else B.head&&(B.head.name=null);B.length=0,B.mode=D;case D:if(B.flags&4096){if(U===0)break inf_leave;Y=0;do Te=V[H+Y++],B.head&&Te&&B.length<65536&&(B.head.comment+=String.fromCharCode(Te));while(Te&&Y<U);if(B.flags&512&&(B.check=r(B.check,V,Y,H)),U-=Y,H+=Y,Te)break inf_leave}else B.head&&(B.head.comment=null);B.mode=ee;case ee:if(B.flags&512){for(;K<16;){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}if(G!==(B.check&65535)){e.msg=`header crc mismatch`,B.mode=L;break}G=0,K=0}B.head&&(B.head.hcrc=B.flags>>9&1,B.head.done=!0),e.adler=B.check=0,B.mode=k;break;case te:for(;K<32;){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}e.adler=B.check=pe(G),G=0,K=0,B.mode=O;case O:if(B.havedict===0)return e.next_out=he,e.avail_out=W,e.next_in=H,e.avail_in=U,B.hold=G,B.bits=K,m;e.adler=B.check=1,B.mode=k;case k:if(z===u||z===d)break inf_leave;case A:if(B.last){G>>>=K&7,K-=K&7,B.mode=le;break}for(;K<3;){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}switch(B.last=G&1,G>>>=1,--K,G&3){case 0:B.mode=j;break;case 1:if(ve(B),B.mode=N,z===d){G>>>=2,K-=2;break inf_leave}break;case 2:B.mode=re;break;case 3:e.msg=`invalid block type`,B.mode=L}G>>>=2,K-=2;break;case j:for(G>>>=K&7,K-=K&7;K<32;){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}if((G&65535)!=(G>>>16^65535)){e.msg=`invalid stored block lengths`,B.mode=L;break}if(B.length=G&65535,G=0,K=0,B.mode=M,z===d)break inf_leave;case M:B.mode=ne;case ne:if(Y=B.length,Y){if(Y>U&&(Y=U),Y>W&&(Y=W),Y===0)break inf_leave;t.arraySet(me,V,H,Y,he),U-=Y,H+=Y,W-=Y,he+=Y,B.length-=Y;break}B.mode=k;break;case re:for(;K<14;){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}if(B.nlen=(G&31)+257,G>>>=5,K-=5,B.ndist=(G&31)+1,G>>>=5,K-=5,B.ncode=(G&15)+4,G>>>=4,K-=4,B.nlen>286||B.ndist>30){e.msg=`too many length or distance symbols`,B.mode=L;break}B.have=0,B.mode=ie;case ie:for(;B.have<B.ncode;){for(;K<3;){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}B.lens[Ae[B.have++]]=G&7,G>>>=3,K-=3}for(;B.have<19;)B.lens[Ae[B.have++]]=0;if(B.lencode=B.lendyn,B.lenbits=7,Oe={bits:B.lenbits},Ee=a(o,B.lens,0,19,B.lencode,0,B.work,Oe),B.lenbits=Oe.bits,Ee){e.msg=`invalid code lengths set`,B.mode=L;break}B.have=0,B.mode=ae;case ae:for(;B.have<B.nlen+B.ndist;){for(;X=B.lencode[G&(1<<B.lenbits)-1],Z=X>>>24,be=X>>>16&255,xe=X&65535,!(Z<=K);){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}if(xe<16)G>>>=Z,K-=Z,B.lens[B.have++]=xe;else{if(xe===16){for(ke=Z+2;K<ke;){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}if(G>>>=Z,K-=Z,B.have===0){e.msg=`invalid bit length repeat`,B.mode=L;break}Te=B.lens[B.have-1],Y=3+(G&3),G>>>=2,K-=2}else if(xe===17){for(ke=Z+3;K<ke;){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}G>>>=Z,K-=Z,Te=0,Y=3+(G&7),G>>>=3,K-=3}else{for(ke=Z+7;K<ke;){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}G>>>=Z,K-=Z,Te=0,Y=11+(G&127),G>>>=7,K-=7}if(B.have+Y>B.nlen+B.ndist){e.msg=`invalid bit length repeat`,B.mode=L;break}for(;Y--;)B.lens[B.have++]=Te}}if(B.mode===L)break;if(B.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,B.mode=L;break}if(B.lenbits=9,Oe={bits:B.lenbits},Ee=a(s,B.lens,0,B.nlen,B.lencode,0,B.work,Oe),B.lenbits=Oe.bits,Ee){e.msg=`invalid literal/lengths set`,B.mode=L;break}if(B.distbits=6,B.distcode=B.distdyn,Oe={bits:B.distbits},Ee=a(c,B.lens,B.nlen,B.ndist,B.distcode,0,B.work,Oe),B.distbits=Oe.bits,Ee){e.msg=`invalid distances set`,B.mode=L;break}if(B.mode=N,z===d)break inf_leave;case N:B.mode=P;case P:if(U>=6&&W>=258){e.next_out=he,e.avail_out=W,e.next_in=H,e.avail_in=U,B.hold=G,B.bits=K,i(e,J),he=e.next_out,me=e.output,W=e.avail_out,H=e.next_in,V=e.input,U=e.avail_in,G=B.hold,K=B.bits,B.mode===k&&(B.back=-1);break}for(B.back=0;X=B.lencode[G&(1<<B.lenbits)-1],Z=X>>>24,be=X>>>16&255,xe=X&65535,!(Z<=K);){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}if(be&&!(be&240)){for(Se=Z,Ce=be,we=xe;X=B.lencode[we+((G&(1<<Se+Ce)-1)>>Se)],Z=X>>>24,be=X>>>16&255,xe=X&65535,!(Se+Z<=K);){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}G>>>=Se,K-=Se,B.back+=Se}if(G>>>=Z,K-=Z,B.back+=Z,B.length=xe,be===0){B.mode=ce;break}if(be&32){B.back=-1,B.mode=k;break}if(be&64){e.msg=`invalid literal/length code`,B.mode=L;break}B.extra=be&15,B.mode=oe;case oe:if(B.extra){for(ke=B.extra;K<ke;){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}B.length+=G&(1<<B.extra)-1,G>>>=B.extra,K-=B.extra,B.back+=B.extra}B.was=B.length,B.mode=se;case se:for(;X=B.distcode[G&(1<<B.distbits)-1],Z=X>>>24,be=X>>>16&255,xe=X&65535,!(Z<=K);){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}if(!(be&240)){for(Se=Z,Ce=be,we=xe;X=B.distcode[we+((G&(1<<Se+Ce)-1)>>Se)],Z=X>>>24,be=X>>>16&255,xe=X&65535,!(Se+Z<=K);){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}G>>>=Se,K-=Se,B.back+=Se}if(G>>>=Z,K-=Z,B.back+=Z,be&64){e.msg=`invalid distance code`,B.mode=L;break}B.offset=xe,B.extra=be&15,B.mode=F;case F:if(B.extra){for(ke=B.extra;K<ke;){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}B.offset+=G&(1<<B.extra)-1,G>>>=B.extra,K-=B.extra,B.back+=B.extra}if(B.offset>B.dmax){e.msg=`invalid distance too far back`,B.mode=L;break}B.mode=I;case I:if(W===0)break inf_leave;if(Y=J-W,B.offset>Y){if(Y=B.offset-Y,Y>B.whave&&B.sane){e.msg=`invalid distance too far back`,B.mode=L;break}Y>B.wnext?(Y-=B.wnext,ge=B.wsize-Y):ge=B.wnext-Y,Y>B.length&&(Y=B.length),_e=B.window}else _e=me,ge=he-B.offset,Y=B.length;Y>W&&(Y=W),W-=Y,B.length-=Y;do me[he++]=_e[ge++];while(--Y);B.length===0&&(B.mode=P);break;case ce:if(W===0)break inf_leave;me[he++]=B.length,W--,B.mode=P;break;case le:if(B.wrap){for(;K<32;){if(U===0)break inf_leave;U--,G|=V[H++]<<K,K+=8}if(J-=W,e.total_out+=J,B.total+=J,J&&(e.adler=B.check=B.flags?r(B.check,me,J,he-J):n(B.check,me,J,he-J)),J=W,(B.flags?G:pe(G))!==B.check){e.msg=`incorrect data check`,B.mode=L;break}G=0,K=0}B.mode=ue;case ue:if(B.wrap&&B.flags){for(;K<32;){if(U===0)break inf_leave;U--,G+=V[H++]<<K,K+=8}if(G!==(B.total|0)){e.msg=`incorrect length check`,B.mode=L;break}G=0,K=0}B.mode=de;case de:Ee=p;break inf_leave;case L:Ee=g;break inf_leave;case R:return _;case fe:default:return h}return e.next_out=he,e.avail_out=W,e.next_in=H,e.avail_in=U,B.hold=G,B.bits=K,(B.wsize||J!==e.avail_out&&B.mode<L&&(B.mode<le||z!==l))&&ye(e,e.output,e.next_out,J-e.avail_out)?(B.mode=R,_):(q-=e.avail_in,J-=e.avail_out,e.total_in+=q,e.total_out+=J,B.total+=J,B.wrap&&J&&(e.adler=B.check=B.flags?r(B.check,me,J,e.next_out-J):n(B.check,me,J,e.next_out-J)),e.data_type=B.bits+(B.last?64:0)+(B.mode===k?128:0)+(B.mode===N||B.mode===M?256:0),(q===0&&J===0||z===l)&&Ee===f&&(Ee=v),Ee)}function Z(e){if(!e||!e.state)return h;var t=e.state;return t.window&&=null,e.state=null,f}function be(e,t){var n;return!e||!e.state||(n=e.state,!(n.wrap&2))?h:(n.head=t,t.done=!1,f)}function Ce(e,t){var r=t.length,i,a,o;return!e||!e.state||(i=e.state,i.wrap!==0&&i.mode!==O)?h:i.mode===O&&(a=1,a=n(a,t,r,0),a!==i.check)?g:(o=ye(e,t,r,r),o?(i.mode=R,_):(i.havedict=1,f))}e.inflateReset=he,e.inflateReset2=U,e.inflateResetKeep=H,e.inflateInit=G,e.inflateInit2=W,e.inflate=X,e.inflateEnd=Z,e.inflateGetHeader=be,e.inflateSetDictionary=Ce,e.inflateInfo=`pako inflate (from Nodeca project)`})),we=t(((e,t)=>{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}})),Te=t(((e,t)=>{function n(){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}t.exports=n})),Ee=t((e=>{var t=Ce(),n=J(),r=X(),i=we(),a=ve(),o=Z(),s=Te(),c=Object.prototype.toString;function l(e){if(!(this instanceof l))return new l(e);this.options=n.assign({chunkSize:16384,windowBits:0,to:``},e||{});var u=this.options;u.raw&&u.windowBits>=0&&u.windowBits<16&&(u.windowBits=-u.windowBits,u.windowBits===0&&(u.windowBits=-15)),u.windowBits>=0&&u.windowBits<16&&!(e&&e.windowBits)&&(u.windowBits+=32),u.windowBits>15&&u.windowBits<48&&(u.windowBits&15||(u.windowBits|=15)),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new o,this.strm.avail_out=0;var d=t.inflateInit2(this.strm,u.windowBits);if(d!==i.Z_OK||(this.header=new s,t.inflateGetHeader(this.strm,this.header),u.dictionary&&(typeof u.dictionary==`string`?u.dictionary=r.string2buf(u.dictionary):c.call(u.dictionary)===`[object ArrayBuffer]`&&(u.dictionary=new Uint8Array(u.dictionary)),u.raw&&(d=t.inflateSetDictionary(this.strm,u.dictionary),d!==i.Z_OK))))throw Error(a[d])}l.prototype.push=function(e,a){var o=this.strm,s=this.options.chunkSize,l=this.options.dictionary,u,d,f,p,m,h=!1;if(this.ended)return!1;d=a===~~a?a:a===!0?i.Z_FINISH:i.Z_NO_FLUSH,o.input=typeof e==`string`?r.binstring2buf(e):c.call(e)===`[object ArrayBuffer]`?new Uint8Array(e):e,o.next_in=0,o.avail_in=o.input.length;do{if(o.avail_out===0&&(o.output=new n.Buf8(s),o.next_out=0,o.avail_out=s),u=t.inflate(o,i.Z_NO_FLUSH),u===i.Z_NEED_DICT&&l&&(u=t.inflateSetDictionary(this.strm,l)),u===i.Z_BUF_ERROR&&h===!0&&(u=i.Z_OK,h=!1),u!==i.Z_STREAM_END&&u!==i.Z_OK)return this.onEnd(u),this.ended=!0,!1;o.next_out&&(o.avail_out===0||u===i.Z_STREAM_END||o.avail_in===0&&(d===i.Z_FINISH||d===i.Z_SYNC_FLUSH))&&(this.options.to===`string`?(f=r.utf8border(o.output,o.next_out),p=o.next_out-f,m=r.buf2string(o.output,f),o.next_out=p,o.avail_out=s-p,p&&n.arraySet(o.output,o.output,f,p,0),this.onData(m)):this.onData(n.shrinkBuf(o.output,o.next_out))),o.avail_in===0&&o.avail_out===0&&(h=!0)}while((o.avail_in>0||o.avail_out===0)&&u!==i.Z_STREAM_END);return u===i.Z_STREAM_END&&(d=i.Z_FINISH),d===i.Z_FINISH?(u=t.inflateEnd(this.strm),this.onEnd(u),this.ended=!0,u===i.Z_OK):(d===i.Z_SYNC_FLUSH&&(this.onEnd(i.Z_OK),o.avail_out=0),!0)},l.prototype.onData=function(e){this.chunks.push(e)},l.prototype.onEnd=function(e){e===i.Z_OK&&(this.result=this.options.to===`string`?this.chunks.join(``):n.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function u(e,t){var n=new l(t);if(n.push(e,!0),n.err)throw n.msg||a[n.err];return n.result}function d(e,t){return t||={},t.raw=!0,u(e,t)}e.Inflate=l,e.inflate=u,e.inflateRaw=d,e.ungzip=u})),De=t(((e,t)=>{var n=J().assign,r=be(),i=Ee(),a=we(),o={};n(o,r,i,a),t.exports=o})),Oe=t(((e,t)=>{var n=(e,t)=>function(...n){let r=t.promiseModule;return new r((r,i)=>{t.multiArgs?n.push((...e)=>{t.errorFirst?e[0]?i(e):(e.shift(),r(e)):r(e)}):t.errorFirst?n.push((e,t)=>{e?i(e):r(t)}):n.push(r),e.apply(this,n)})};t.exports=(e,t)=>{t=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},t);let r=typeof e;if(e===null||r!==`object`&&r!==`function`)throw TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${e===null?`null`:r}\``);let i=e=>{let n=t=>typeof t==`string`?e===t:t.test(e);return t.include?t.include.some(n):!t.exclude.some(n)},a;a=r===`function`?function(...r){return t.excludeMain?e(...r):n(e,t).apply(this,r)}:Object.create(Object.getPrototypeOf(e));for(let r in e){let o=e[r];a[r]=typeof o==`function`&&i(r)?n(o,t):o}return a}})),ke=t(((e,t)=>{function n(e){return Array.isArray(e)?e:[e]}var r=/^\s+$/,i=/(?:[^\\]|^)\\$/,a=/^\\!/,o=/^\\#/,s=/\r?\n/g,c=/^\.*\/|^\.+$/,l=`node-ignore`;typeof Symbol<`u`&&(l=Symbol.for(`node-ignore`));var u=l,d=(e,t,n)=>Object.defineProperty(e,t,{value:n}),f=/([0-z])-([0-z])/g,p=()=>!1,m=e=>e.replace(f,(e,t,n)=>t.charCodeAt(0)<=n.charCodeAt(0)?e:``),h=e=>{let{length:t}=e;return e.slice(0,t-t%2)},g=[[/^\uFEFF/,()=>``],[/((?:\\\\)*?)(\\?\s+)$/,(e,t,n)=>t+(n.indexOf(`\\`)===0?` `:``)],[/(\\+?)\s/g,(e,t)=>{let{length:n}=t;return t.slice(0,n-n%2)+` `}],[/[\\$.|*+(){^]/g,e=>`\\${e}`],[/(?!\\)\?/g,()=>`[^/]`],[/^\//,()=>`^`],[/\//g,()=>`\\/`],[/^\^*\\\*\\\*\\\//,()=>`^(?:.*\\/)?`],[/^(?=[^^])/,function(){return/\/(?!$)/.test(this)?`^`:`(?:^|\\/)`}],[/\\\/\\\*\\\*(?=\\\/|$)/g,(e,t,n)=>t+6<n.length?`(?:\\/[^\\/]+)*`:`\\/.+`],[/(^|[^\\]+)(\\\*)+(?=.+)/g,(e,t,n)=>t+n.replace(/\\\*/g,`[^\\/]*`)],[/\\\\\\(?=[$.|*+(){^])/g,()=>`\\`],[/\\\\/g,()=>`\\`],[/(\\)?\[([^\]/]*?)(\\*)($|\])/g,(e,t,n,r,i)=>t===`\\`?`\\[${n}${h(r)}${i}`:i===`]`&&r.length%2==0?`[${m(n)}${r}]`:`[]`],[/(?:[^*])$/,e=>/\/$/.test(e)?`${e}$`:`${e}(?=$|\\/$)`],[/(\^|\\\/)?\\\*$/,(e,t)=>`${t?`${t}[^/]+`:`[^/]*`}(?=$|\\/$)`]],_=Object.create(null),v=(e,t)=>{let n=_[e];return n||(n=g.reduce((t,[n,r])=>t.replace(n,r.bind(e)),e),_[e]=n),t?new RegExp(n,`i`):new RegExp(n)},y=e=>typeof e==`string`,b=e=>e&&y(e)&&!r.test(e)&&!i.test(e)&&e.indexOf(`#`)!==0,x=e=>e.split(s),S=class{constructor(e,t,n,r){this.origin=e,this.pattern=t,this.negative=n,this.regex=r}},C=(e,t)=>{let n=e,r=!1;e.indexOf(`!`)===0&&(r=!0,e=e.substr(1)),e=e.replace(a,`!`).replace(o,`#`);let i=v(e,t);return new S(n,e,r,i)},w=(e,t)=>{throw new t(e)},T=(e,t,n)=>y(e)?e?!T.isNotRelative(e)||n(`path should be a \`path.relative()\`d string, but got "${t}"`,RangeError):n(`path must not be empty`,TypeError):n(`path must be a string, but got \`${t}\``,TypeError),E=e=>c.test(e);T.isNotRelative=E,T.convert=e=>e;var D=class{constructor({ignorecase:e=!0,ignoreCase:t=e,allowRelativePaths:n=!1}={}){d(this,u,!0),this._rules=[],this._ignoreCase=t,this._allowRelativePaths=n,this._initCache()}_initCache(){this._ignoreCache=Object.create(null),this._testCache=Object.create(null)}_addPattern(e){if(e&&e[u])this._rules=this._rules.concat(e._rules),this._added=!0;else if(b(e)){let t=C(e,this._ignoreCase);this._added=!0,this._rules.push(t)}}add(e){return this._added=!1,n(y(e)?x(e):e).forEach(this._addPattern,this),this._added&&this._initCache(),this}addPattern(e){return this.add(e)}_testOne(e,t){let n=!1,r=!1;return this._rules.forEach(i=>{let{negative:a}=i;r===a&&n!==r||a&&!n&&!r&&!t||i.regex.test(e)&&(n=!a,r=a)}),{ignored:n,unignored:r}}_test(e,t,n,r){let i=e&&T.convert(e);return T(i,e,this._allowRelativePaths?p:w),this._t(i,t,n,r)}_t(e,t,n,r){if(e in t)return t[e];if(r||=e.split(`/`),r.pop(),!r.length)return t[e]=this._testOne(e,n);let i=this._t(r.join(`/`)+`/`,t,n,r);return t[e]=i.ignored?i:this._testOne(e,n)}ignores(e){return this._test(e,this._ignoreCache,!1).ignored}createFilter(){return e=>!this.ignores(e)}filter(e){return n(e).filter(this.createFilter())}test(e){return this._test(e,this._testCache,!0)}},ee=e=>new D(e);if(ee.isPathValid=e=>T(e&&T.convert(e),e,p),ee.default=ee,t.exports=ee,typeof process<`u`&&({}.IGNORE_TEST_WIN32||process.platform===`win32`)){T.convert=e=>/^\\\\\?\\/.test(e)||/["<>|\u0000-\u001F]+/u.test(e)?e:e.replace(/\\/g,`/`);let e=/^[a-z]:\//i;T.isNotRelative=t=>e.test(t)||E(t)}})),Ae=t(((e,t)=>{t.exports=function(e,t){var n=e,r=t,i=n.length,a=r.length,o=!1,s=null,c=i+1,l=[],u=[],d=[],f=``,p=-1,m=0,h=1,g,_,v=function(){i>=a&&(g=n,_=i,n=r,r=g,i=a,a=_,o=!0,c=i+1)},y=function(e,t,n){return{x:e,y:t,k:n}},b=function(e,t){return{elem:e,t}},x=function(e,t,o){var s=t>o?l[e-1+c]:l[e+1+c],d,f=Math.max(t,o);for(d=f-e;d<i&&f<a&&n[d]===r[f];)++d,++f;return l[e+c]=u.length,u[u.length]=new y(d,f,s),f},S=function(e){for(var t=i=1,i,a=s=0,s,c=e.length-1;c>=0;--c)for(;a<e[c].x||s<e[c].y;)e[c].y-e[c].x>s-a?(o?d[d.length]=new b(r[s],p):d[d.length]=new b(r[s],h),++i,++s):e[c].y-e[c].x<s-a?(o?d[d.length]=new b(n[a],h):d[d.length]=new b(n[a],p),++t,++a):(d[d.length]=new b(n[a],m),f+=n[a],++t,++i,++a,++s)};return v(),{SES_DELETE:-1,SES_COMMON:0,SES_ADD:1,editdistance:function(){return s},getlcs:function(){return f},getses:function(){return d},compose:function(){for(var e=a-i,t=i+a+3,n={},r,o,d,f=0,p;f<t;++f)n[f]=-1,l[f]=-1;r=-1;do{for(++r,p=-r;p<=e-1;++p)n[p+c]=x(p,n[p-1+c]+1,n[p+1+c]);for(p=e+r;p>=e+1;--p)n[p+c]=x(p,n[p-1+c]+1,n[p+1+c]);n[e+c]=x(e,n[e-1+c]+1,n[e+1+c])}while(n[e+c]!==a);for(s=e+2*r,o=l[e+c],d=[];o!==-1;)d[d.length]=new y(u[o].x,u[o].y,null),o=u[o].k;S(d)}}}})),je=t(((e,t)=>{var n=Ae();function r(e,t){var r=new n(e,t);r.compose();for(var i=r.getses(),a,o,s=e.length-1,c=t.length-1,l=i.length-1;l>=0;--l)i[l].t===r.SES_COMMON?(o?(o.chain={file1index:s,file2index:c,chain:null},o=o.chain):(a={file1index:s,file2index:c,chain:null},o=a),s--,c--):i[l].t===r.SES_DELETE?s--:i[l].t===r.SES_ADD&&c--;var u={file1index:-1,file2index:-1,chain:null};return o?(o.chain=u,a):u}function i(e,t){for(var n=[],i=e.length,a=t.length,o=r(e,t);o!==null;o=o.chain){var s=i-o.file1index-1,c=a-o.file2index-1;i=o.file1index,a=o.file2index,(s||c)&&n.push({file1:[i+1,s],file2:[a+1,c]})}return n.reverse(),n}function a(e,t,n){var r,a=i(t,e),o=i(t,n),s=[];function c(e,t){s.push([e.file1[0],t,e.file1[1],e.file2[0],e.file2[1]])}for(r=0;r<a.length;r++)c(a[r],0);for(r=0;r<o.length;r++)c(o[r],2);s.sort(function(e,t){return e[0]-t[0]});var l=[],u=0;function d(e){e>u&&(l.push([1,u,e-u]),u=e)}for(var f=0;f<s.length;f++){for(var p=f,m=s[f],h=m[0],g=h+m[2];f<s.length-1;){var _=s[f+1],v=_[0];if(v>g)break;g=Math.max(g,v+_[2]),f++}if(d(h),p==f)m[4]>0&&l.push([m[1],m[3],m[4]]);else{var y={0:[e.length,-1,t.length,-1],2:[n.length,-1,t.length,-1]};for(r=p;r<=f;r++){m=s[r];var b=y[m[1]],x=m[0],S=x+m[2],C=m[3],w=C+m[4];b[0]=Math.min(C,b[0]),b[1]=Math.max(w,b[1]),b[2]=Math.min(x,b[2]),b[3]=Math.max(S,b[3])}var T=y[0][0]+(h-y[0][2]),E=y[0][1]+(g-y[0][3]),D=y[2][0]+(h-y[2][2]),ee=y[2][1]+(g-y[2][3]);l.push([-1,T,E-T,h,g-h,D,ee-D])}u=g}return d(t.length),l}function o(e,t,n){var r=[],i=[e,t,n],o=a(e,t,n),s=[];function c(){s.length&&r.push({ok:s}),s=[]}function l(e){for(var t=0;t<e.length;t++)s.push(e[t])}function u(t){if(t[2]!=t[6])return!0;for(var r=t[1],i=t[5],a=0;a<t[2];a++)if(e[a+r]!=n[a+i])return!0;return!1}for(var d=0;d<o.length;d++){var f=o[d],p=f[0];p==-1?u(f)?(c(),r.push({conflict:{a:e.slice(f[1],f[1]+f[2]),aIndex:f[1],o:t.slice(f[3],f[3]+f[4]),oIndex:f[3],b:n.slice(f[5],f[5]+f[6]),bIndex:f[5]}})):l(i[0].slice(f[1],f[1]+f[2])):l(i[p].slice(f[1],f[1]+f[2]))}return c(),r}t.exports=o})),Me=e(U(),1),Ne=e(G(),1),Pe=e(K(),1),Fe=e(q(),1),Ie=e(De(),1),Le=e(Oe(),1),Re=e(ke(),1);je();var Q=class e extends Error{constructor(e){super(e),this.caller=``}toJSON(){let e=this;return{code:e.code,data:e.data,caller:this.caller,message:this.message,stack:this.stack}}fromJSON(t){let n=new e(t.message),r=n;return r.code=t.code,r.data=t.data,n.caller=t.caller,n.stack=t.stack,n}get isIsomorphicGitError(){return!0}},ze=class e extends Q{constructor(t){super(`Modifying the index is not possible because you have unmerged files: ${t.toString}. Fix them up in the work tree, and then use 'git add/rm as appropriate to mark resolution and make a commit.`),this.code=this.name=e.code,this.data={filepaths:t}}};ze.code=`UnmergedPathsError`;var $=class e extends Q{constructor(t){super(`An internal error caused this command to fail.\n\nIf you're using an application that depends on isomorphic-git, please report this error to that application's developers.\n\nIf you're a developer and you believe this is a bug in isomorphic-git, please file an issue at https://github.com/isomorphic-git/isomorphic-git/issues with a minimal reproduction, version and environment details, and this error message: ${t}`),this.code=this.name=e.code,this.data={message:t}}};$.code=`InternalError`;var Be=class e extends Q{constructor(t){super(`The filepath "${t}" contains unsafe character sequences`),this.code=this.name=e.code,this.data={filepath:t}}};Be.code=`UnsafeFilepathError`;var Ve=class{constructor(e){this.buffer=e,this._start=0}eof(){return this._start>=this.buffer.length}tell(){return this._start}seek(e){this._start=e}slice(e){let t=this.buffer.slice(this._start,this._start+e);return this._start+=e,t}toString(e,t){let n=this.buffer.toString(e,this._start,this._start+t);return this._start+=t,n}write(e,t,n){let r=this.buffer.write(e,this._start,t,n);return this._start+=t,r}copy(e,t,n){let r=e.copy(this.buffer,this._start,t,n);return this._start+=r,r}readUInt8(){let e=this.buffer.readUInt8(this._start);return this._start+=1,e}writeUInt8(e){let t=this.buffer.writeUInt8(e,this._start);return this._start+=1,t}readUInt16BE(){let e=this.buffer.readUInt16BE(this._start);return this._start+=2,e}writeUInt16BE(e){let t=this.buffer.writeUInt16BE(e,this._start);return this._start+=2,t}readUInt32BE(){let e=this.buffer.readUInt32BE(this._start);return this._start+=4,e}writeUInt32BE(e){let t=this.buffer.writeUInt32BE(e,this._start);return this._start+=4,t}},He=/[\ud800-￿]/;function Ue(e,t,n){if(n<55296||n>57343)return!1;if(n<56320){let n=t+1<e.length?e.charCodeAt(t+1):0;return n<56320||n>57343}let r=t>0?e.charCodeAt(t-1):0;return r<55296||r>56319}function We(e,t){if(!He.test(e)&&!He.test(t))return-(e<t)||+(e>t);let n=Math.min(e.length,t.length);for(let r=0;r<n;r++){let n=e.charCodeAt(r),i=t.charCodeAt(r);if(n!==i){if(Ue(e,r,n)&&(n=65533),Ue(t,r,i)&&(i=65533),n===i)continue;return n>=55296&&i>=55296&&(n+=n>=57344?-2048:8192,i+=i>=57344?-2048:8192),n<i?-1:1}}return e.length<t.length?-1:+(e.length>t.length)}function Ge(e,t){return We(e.path,t.path)}function Ke(e){let t=e>0?e>>12:0;t!==4&&t!==8&&t!==10&&t!==14&&(t=8);let n=e&511;return n=n&73?493:420,t!==8&&(n=0),(t<<12)+n}var qe=2**32;function Je(e,t,n,r){if(e!==void 0&&t!==void 0)return[e,t];n===void 0&&(n=r.valueOf());let i=Math.floor(n/1e3);return[i,Math.floor((n-i*1e3)*1e6)]}function Ye(e){let[t,n]=Je(e.ctimeSeconds,e.ctimeNanoseconds,e.ctimeMs,e.ctime),[r,i]=Je(e.mtimeSeconds,e.mtimeNanoseconds,e.mtimeMs,e.mtime);return{ctimeSeconds:t%qe,ctimeNanoseconds:n%qe,mtimeSeconds:r%qe,mtimeNanoseconds:i%qe,dev:e.dev%qe,ino:e.ino%qe,mode:Ke(e.mode%qe),uid:e.uid%qe,gid:e.gid%qe,size:e.size>-1?e.size%qe:0}}function Xe(){return new Me.default}function Ze(e){let t=``;for(let n of new Uint8Array(e))n<16&&(t+=`0`),t+=n.toString(16);return t}var Qe=null;async function $e(e){return Qe===null&&(Qe=await nt()),Qe?tt(e):et(e)}function et(e){return Xe().update(e).digest(`hex`)}async function tt(e){return Ze(await crypto.subtle.digest(`SHA-1`,e))}async function nt(){try{return await tt(new Uint8Array([]))===`da39a3ee5e6b4b0d3255bfef95601890afd80709`}catch{}return!1}function rt(e){return{assumeValid:!!(e&32768),extended:!!(e&16384),stage:(e&12288)>>12,nameLength:e&4095,skipWorktree:!1,intentToAdd:!1}}var it=16384,at=8192;function ot(e){return!!(e.flags.skipWorktree||e.flags.intentToAdd)}function st(e){let t=e.flags;return t.extended=ot(e),t.nameLength=Math.min(Buffer.from(e.path).length,4095),(t.assumeValid?32768:0)+(t.extended?16384:0)+((t.stage&3)<<12)+(t.nameLength&4095)}function ct(e){return(e.flags.skipWorktree?it:0)+(e.flags.intentToAdd?at:0)}var lt=class e{constructor(e,t){this._dirty=!1,this._unmergedPaths=t||new Set,this._entries=e||new Map}_addEntry(e){if(e.flags.stage===0)e.stages=[e],this._entries.set(e.path,e),this._unmergedPaths.delete(e.path);else{let t=this._entries.get(e.path);t||=(this._entries.set(e.path,e),e),t.stages[e.flags.stage]=e,this._unmergedPaths.add(e.path)}}static async from(t){if(Buffer.isBuffer(t))return e.fromBuffer(t);if(t===null)return new e(null);throw new $(`invalid type passed to GitIndex.from`)}static async fromBuffer(t){if(t.length===0)throw new $(`Index file is empty (.git/index)`);let n=new e,r=new Ve(t),i=r.toString(`utf8`,4);if(i!==`DIRC`)throw new $(`Invalid dircache magic file number: ${i}`);let a=await $e(t.slice(0,-20)),o=t.slice(-20).toString(`hex`);if(o!==a)throw new $(`Invalid checksum in GitIndex buffer: expected ${o} but saw ${a}`);let s=r.readUInt32BE();if(s!==2&&s!==3)throw new $(`Unsupported dircache version: ${s}`);let c=r.readUInt32BE(),l=0;for(;!r.eof()&&l<c;){let e={};if(e.ctimeSeconds=r.readUInt32BE(),e.ctimeNanoseconds=r.readUInt32BE(),e.mtimeSeconds=r.readUInt32BE(),e.mtimeNanoseconds=r.readUInt32BE(),e.dev=r.readUInt32BE(),e.ino=r.readUInt32BE(),e.mode=r.readUInt32BE(),e.uid=r.readUInt32BE(),e.gid=r.readUInt32BE(),e.size=r.readUInt32BE(),e.oid=r.slice(20).toString(`hex`),e.flags=rt(r.readUInt16BE()),e.flags.extended){let t=r.readUInt16BE();if(t&-24577)throw new $(`Unknown index entry format: 0x${t.toString(16)}`);e.flags.skipWorktree=!!(t&it),e.flags.intentToAdd=!!(t&at)}let i=t.indexOf(0,r.tell()+1)-r.tell();if(i<1)throw new $(`Got a path length of: ${i}`);if(e.path=r.toString(`utf8`,i),e.path.includes(`..\\`)||e.path.includes(`../`))throw new Be(e.path);let a=8-(r.tell()-12)%8;for(a===0&&(a=8);a--;){let t=r.readUInt8();if(t!==0)throw new $(`Expected 1-8 null characters but got '${t}' after ${e.path}`);if(r.eof())throw new $(`Unexpected end of file`)}e.stages=[],n._addEntry(e),l++}return n}get unmergedPaths(){return[...this._unmergedPaths]}get entries(){return[...this._entries.values()].sort(Ge)}get entriesMap(){return this._entries}get entriesFlat(){return[...this.entries].flatMap(e=>e.stages.length>1?e.stages.filter(e=>e):e)}*[Symbol.iterator](){for(let e of this.entries)yield e}insert({filepath:e,stats:t,oid:n,stage:r=0}){t||={ctimeSeconds:0,ctimeNanoseconds:0,mtimeSeconds:0,mtimeNanoseconds:0,dev:0,ino:0,mode:0,uid:0,gid:0,size:0},t=Ye(t);let i=Buffer.from(e),a=r===0?this._entries.get(e):void 0,o={ctimeSeconds:t.ctimeSeconds,ctimeNanoseconds:t.ctimeNanoseconds,mtimeSeconds:t.mtimeSeconds,mtimeNanoseconds:t.mtimeNanoseconds,dev:t.dev,ino:t.ino,mode:t.mode||33188,uid:t.uid,gid:t.gid,size:t.size,path:e,oid:n,flags:{assumeValid:!1,extended:!1,stage:r,nameLength:i.length<4095?i.length:4095,skipWorktree:!!a?.flags.skipWorktree,intentToAdd:!1},stages:[]};this._addEntry(o),this._dirty=!0}delete({filepath:e}){if(this._entries.has(e))this._entries.delete(e);else for(let t of this._entries.keys())t.startsWith(e+`/`)&&this._entries.delete(t);this._unmergedPaths.has(e)&&this._unmergedPaths.delete(e),this._dirty=!0}clear(){this._entries.clear(),this._dirty=!0}has({filepath:e}){return this._entries.has(e)}render(){return this.entries.map(e=>`${e.mode.toString(8)} ${e.oid} ${e.path}`).join(`
`)}static async _entryToBuffer(e){let t=Buffer.from(e.path),n=ot(e),r=Math.ceil((62+(n?2:0)+t.length+1)/8)*8,i=Buffer.alloc(r),a=new Ve(i),o=Ye(e);return a.writeUInt32BE(o.ctimeSeconds),a.writeUInt32BE(o.ctimeNanoseconds),a.writeUInt32BE(o.mtimeSeconds),a.writeUInt32BE(o.mtimeNanoseconds),a.writeUInt32BE(o.dev),a.writeUInt32BE(o.ino),a.writeUInt32BE(o.mode),a.writeUInt32BE(o.uid),a.writeUInt32BE(o.gid),a.writeUInt32BE(o.size),a.write(e.oid,20,`hex`),a.writeUInt16BE(st(e)),n&&a.writeUInt16BE(ct(e)),a.write(e.path,t.length,`utf8`),i}async toObject(){let t=Buffer.alloc(12),n=new Ve(t);n.write(`DIRC`,4,`utf8`),n.writeUInt32BE(this.entriesFlat.some(ot)?3:2),n.writeUInt32BE(this.entriesFlat.length);let r=[];for(let t of this.entries)if(r.push(e._entryToBuffer(t)),t.stages.length>1)for(let n of t.stages)n&&n!==t&&r.push(e._entryToBuffer(n));r=await Promise.all(r);let i=Buffer.concat(r),a=Buffer.concat([t,i]),o=await $e(a);return Buffer.concat([a,Buffer.from(o,`hex`)])}};function ut(e,t,n=!0,r=!0){let i=Ye(e),a=Ye(t);return n&&i.mode!==a.mode||i.mtimeSeconds!==a.mtimeSeconds||i.mtimeNanoseconds!==a.mtimeNanoseconds||i.ctimeSeconds!==a.ctimeSeconds||i.ctimeNanoseconds!==a.ctimeNanoseconds||i.uid!==a.uid||i.gid!==a.gid||r&&i.ino!==a.ino||i.size!==a.size}var dt;function ft(){return dt===void 0&&(dt=new Ne.default({maxPending:1/0})),dt}function pt(e,t){return ft().acquire(e,t)}var mt=Symbol(`IndexCache`);function ht(){return{map:new Map,stats:new Map}}async function gt(e,t,n){let[r,i]=await Promise.all([e.lstat(t),e.read(t)]),a=await lt.from(i);n.map.set(t,a),n.stats.set(t,r)}async function _t(e,t,n){let r=n.stats.get(t);if(r===void 0)return!0;if(r===null)return!1;let i=await e.lstat(t);if(i===null)return!1;if(ut(r,i))return!0;let a=Ye(r),o=Ye(i);return a.mtimeNanoseconds!==o.mtimeNanoseconds||a.ctimeNanoseconds!==o.ctimeNanoseconds}var vt=class{static async acquire({fs:e,gitdir:t,cache:n,allowUnmerged:r=!0},i){n[mt]||(n[mt]=ht());let a=`${t}/index`,o,s=[];return await pt(a,async()=>{let t=n[mt];await _t(e,a,t)&&await gt(e,a,t);let c=t.map.get(a);if(s=c.unmergedPaths,s.length&&!r)throw new ze(s);if(o=await i(c),c._dirty){let n=await c.toObject();await e.write(a,n),t.stats.set(a,await e.lstat(a)),c._dirty=!1}}),o}};function yt(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return t>-1&&(e=e.slice(t+1)),e}function bt(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return t===-1?`.`:t===0?`/`:e.slice(0,t)}function xt(e){let t=new Map,n=function(e){if(!t.has(e)){let r={type:`tree`,fullpath:e,basename:yt(e),metadata:{},children:[]};t.set(e,r),r.parent=n(bt(e)),r.parent&&r.parent!==r&&r.parent.children.push(r)}return t.get(e)},r=function(e,r){if(!t.has(e)){let i={type:`blob`,fullpath:e,basename:yt(e),metadata:r,parent:n(bt(e)),children:[]};i.parent&&i.parent.children.push(i),t.set(e,i)}return t.get(e)};n(`.`);for(let t of e)r(t.path,t);return t}var St=class e extends Q{constructor(t){super(`Could not find ${t}.`),this.code=this.name=e.code,this.data={what:t}}};St.code=`NotFoundError`;var Ct=class e extends Q{constructor(t,n,r,i){super(`Object ${t} ${i?`at ${i}`:``}was anticipated to be a ${r} but it is a ${n}.`),this.code=this.name=e.code,this.data={oid:t,actual:n,expected:r,filepath:i}}};Ct.code=`ObjectTypeError`;var wt=class e extends Q{constructor(t){super(`Expected a 40-char hex object id but saw "${t}".`),this.code=this.name=e.code,this.data={value:t}}};wt.code=`InvalidOidError`;var Tt=class e extends Q{constructor(t,n){super(`"${t}" would be an invalid git reference. (Hint: a valid alternative would be "${n}".)`),this.code=this.name=e.code,this.data={ref:t,suggestion:n}}};Tt.code=`InvalidRefNameError`;var Et=class e extends Q{constructor(t){super(`Could not find a fetch refspec for remote "${t}". Make sure the config file has an entry like the following:
[remote "${t}"]
\tfetch = +refs/heads/*:refs/remotes/origin/*
`),this.code=this.name=e.code,this.data={remote:t}}};Et.code=`NoRefspecError`;var Dt=class e{constructor(e){if(this.refs=new Map,this.parsedConfig=[],e){let t=null;this.parsedConfig=e.trim().split(`
`).map(e=>{if(/^\s*#/.test(e))return{line:e,comment:!0};let n=e.indexOf(` `);if(e.startsWith(`^`)){let n=e.slice(1);return this.refs.set(t+`^{}`,n),{line:e,ref:t,peeled:n}}{let r=e.slice(0,n);return t=e.slice(n+1),this.refs.set(t,r),{line:e,ref:t,oid:r}}})}return this}static from(t){return new e(t)}delete(e){this.parsedConfig=this.parsedConfig.filter(t=>t.ref!==e),this.refs.delete(e)}toString(){return this.parsedConfig.map(({line:e})=>e).join(`
`)+`
`}},Ot=class e{constructor({remotePath:e,localPath:t,force:n,matchPrefix:r}){Object.assign(this,{remotePath:e,localPath:t,force:n,matchPrefix:r})}static from(t){let[n,r,i,a,o]=t.match(/^(\+?)(.*?)(\*?):(.*?)(\*?)$/).slice(1),s=n===`+`,c=i===`*`;if(c!==(o===`*`))throw new $(`Invalid refspec`);return new e({remotePath:r,localPath:a,force:s,matchPrefix:c})}translate(e){if(this.matchPrefix){if(e.startsWith(this.remotePath))return this.localPath+e.replace(this.remotePath,``)}else if(e===this.remotePath)return this.localPath;return null}reverseTranslate(e){if(this.matchPrefix){if(e.startsWith(this.localPath))return this.remotePath+e.replace(this.localPath,``)}else if(e===this.localPath)return this.remotePath;return null}},kt=class e{constructor(e=[]){this.rules=e}static from(t){let n=[];for(let e of t)n.push(Ot.from(e));return new e(n)}add(e){let t=Ot.from(e);this.rules.push(t)}translate(e){let t=[];for(let n of this.rules)for(let r of e){let e=n.translate(r);e&&t.push([r,e])}return t}translateOne(e){let t=null;for(let n of this.rules){let r=n.translate(e);r&&(t=r)}return t}localNamespaces(){return this.rules.filter(e=>e.matchPrefix).map(e=>e.localPath.replace(/\/$/,``))}};function At(e,t){let n=e.replace(/\^\{\}$/,``),r=t.replace(/\^\{\}$/,``),i=-(n<r)||+(n>r);return i===0?e.endsWith(`^{}`)?1:-1:i}var jt=/(^|[/.])([/.]|$)|^@$|@{|[\x00-\x20\x7f~^:?*[\\]|\.lock(\/|$)/;function Mt(e,t){if(typeof e!=`string`)throw TypeError(`Reference name must be a string`);return!jt.test(e)&&(!!t||e.includes(`/`))}
/*!
* This code for `path.join` is directly copied from @zenfs/core/path for bundle size improvements.
* SPDX-License-Identifier: LGPL-3.0-or-later
* Copyright (c) James Prevett and other ZenFS contributors.
*
* Windows support added:
* - Backslashes are normalised to forward slashes before processing.
* - Drive-letter prefixes (e.g. "C:") are detected and preserved through
* normalisation, so absolute Windows paths are handled correctly.
* - An absolute argument passed to join() resets the accumulated path,
* matching Node behaviour and handling worktree gitdir paths properly.
*
* Limitation: UNC paths (e.g. \\server\share) are not supported. The leading
* backslashes are normalised to forward slashes and then collapsed by
* normalizeString, losing the UNC root. Git on Windows works with
* drive-letter paths, so this is not expected to be a practical issue.
*/
function Nt(e,t){let n=``,r=0,i=-1,a=0,o=`\0`;for(let s=0;s<=e.length;++s){if(s<e.length)o=e[s];else if(o===`/`)break;else o=`/`;if(o===`/`){if(i!==s-1&&a!==1){if(a===2){if(n.length<2||r!==2||n.at(-1)!==`.`||n.at(-2)!==`.`){if(n.length>2){let e=n.lastIndexOf(`/`);e===-1?(n=``,r=0):(n=n.slice(0,e),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}if(n.length!==0){n=``,r=0,i=s,a=0;continue}}t&&(n+=n.length>0?`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1}i=s,a=0}else o===`.`&&a!==-1?++a:a=-1}return n}function Pt(e){return e.length>=2&&/^[a-zA-Z]:/.test(e)?e.slice(0,2):null}function Ft(e){if(!e.length)return`.`;e=e.replace(/\\/g,`/`);let t=Pt(e),n=e[0]===`/`||t!==null&&e[2]===`/`,r=e.at(-1)===`/`,i=Nt(t?e.slice(2):e,!n);if(!i.length){let e=t?n?t+`/`:t:n?`/`:`.`;return r&&!n?e+`/`:e}return r&&(i+=`/`),t?n?`${t}/${i}`:`${t}${i}`:n?`/${i}`:i}function It(...e){if(e.length===0)return`.`;let t;for(let n=0;n<e.length;++n){let r=e[n].replace(/\\/g,`/`);r.length!==0&&(/^[a-zA-Z]:\//.test(r)||t===void 0?t=r:t+=`/`+r)}return t===void 0?`.`:Ft(t)}var Lt=e=>{if(typeof e==`number`)return e;e=e.toLowerCase();let t=parseInt(e);return e.endsWith(`k`)&&(t*=1024),e.endsWith(`m`)&&(t*=1048576),e.endsWith(`g`)&&(t*=1073741824),t},Rt=e=>{if(typeof e==`boolean`)return e;if(e=e.trim().toLowerCase(),e===`true`||e===`yes`||e===`on`)return!0;if(e===`false`||e===`no`||e===`off`)return!1;throw Error(`Expected 'true', 'false', 'yes', 'no', 'on', or 'off', but got ${e}`)},zt={core:{filemode:Rt,bare:Rt,logallrefupdates:Rt,symlinks:Rt,ignorecase:Rt,bigFileThreshold:Lt}},Bt=/^\[([A-Za-z0-9-.]+)(?:[ \t]+"((?:[^"\\]|\\.)*)")?\][ \t]*(?:[#;].*)?$/,Vt=/^[A-Za-z0-9-.]+$/,Ht=/^([A-Za-z][A-Za-z0-9-]*)(?:\s*=\s*(.*))?$/,Ut=/^[A-Za-z][A-Za-z0-9-]*$/,Wt=e=>{let t=Bt.exec(e);if(t!=null){let[e,n]=t.slice(1);return[e,n&&n.replace(/\\(.)/g,`$1`)]}return null},Gt=e=>{let t=Ht.exec(e);if(t!=null){let[e,n=`true`]=t.slice(1);return[e,qt(n)]}return null},Kt=new Map([[`t`,` `],[`b`,`\b`],[`n`,`
`],[`\\`,`\\`],[`"`,`"`]]),qt=e=>{let t=``,n=``,r=!1;for(let i=0;i<e.length;i++){let a=e[i];if(!r&&/[ \t\r\v\f]/.test(a))t!==``&&(n+=a);else{if(!r&&(a===`#`||a===`;`))break;t+=n,n=``,a===`\\`&&Kt.has(e[i+1])?t+=Kt.get(e[++i]):a===`"`?r=!r:t+=a}}return t},Jt=e=>{if(typeof e!=`string`)return e;let t=e.startsWith(` `)||e.endsWith(` `)||/[#;]/.test(e)?`"`:``;return`${t}${e.replace(/[\\"\n\t]/g,e=>e===`
`?`\\n`:e===` `?`\\t`:`\\${e}`)}${t}`},Yt=e=>e==null?null:e.toLowerCase(),Xt=(e,t,n)=>[Yt(e),t,Yt(n)].filter(e=>e!=null).join(`.`),Zt=e=>{let t=e.split(`.`),n=t.shift(),r=t.pop(),i=t.length?t.join(`.`):void 0;return{section:n,subsection:i,name:r,path:Xt(n,i,r),sectionPath:Xt(n,i,null),isSection:!!n}},Qt=(e,t)=>e.reduce((e,n,r)=>t(n)?r:e,-1),$t=class e{constructor(e){let t=null,n=null;this.parsedConfig=e?e.split(`
`).map(e=>{let r=null,i=null,a=e.trim(),o=Wt(a),s=o!=null;if(s)[t,n]=o;else{let e=Gt(a);e!=null&&([r,i]=e)}let c=Xt(t,n,r);return{line:e,isSection:s,section:t,subsection:n,name:r,value:i,path:c}}):[]}static from(t){return new e(t)}async get(e,t=!1){let n=Zt(e).path,r=this.parsedConfig.filter(e=>e.path===n).map(({section:e,name:t,value:n})=>{let r=zt[e]&&zt[e][t];return r?r(n):n});return t?r:r.pop()}async getall(e){return this.get(e,!0)}async getSubsections(e){return this.parsedConfig.filter(t=>t.isSection&&t.section===e).map(e=>e.subsection)}async deleteSection(e,t){this.parsedConfig=this.parsedConfig.filter(n=>n.section!==e||n.subsection!==t)}async append(e,t){return this.set(e,t,!0)}async set(e,t,n=!1){let{section:r,subsection:i,name:a,path:o,sectionPath:s,isSection:c}=Zt(e),l=Qt(this.parsedConfig,e=>e.path===o);if(t==null)l!==-1&&this.parsedConfig.splice(l,1);else if(l!==-1){let e=this.parsedConfig[l],r=Object.assign({},e,{name:a,value:t,modified:!0});n?this.parsedConfig.splice(l+1,0,r):this.parsedConfig[l]=r}else{let e=this.parsedConfig.findIndex(e=>e.path===s),n={section:r,subsection:i,name:a,value:t,modified:!0,path:o};if(Vt.test(r)&&Ut.test(a)){if(e>=0)this.parsedConfig.splice(e+1,0,n);else{let e={isSection:c,section:r,subsection:i,modified:!0,path:s};this.parsedConfig.push(e,n)}}}}toString(){return this.parsedConfig.map(({line:e,section:t,subsection:n,name:r,value:i,modified:a=!1})=>a?r!=null&&i!=null?`\t${r} = ${Jt(i)}`:n==null?`[${t}]`:`[${t} "${n}"]`:e).join(`
`)}},en=class{static async get({fs:e,gitdir:t}){let n=await e.read(`${t}/config`,{encoding:`utf8`});return $t.from(n)}static async save({fs:e,gitdir:t,config:n}){await e.write(`${t}/config`,n.toString(),{encoding:`utf8`})}},tn=e=>[`${e}`,`refs/${e}`,`refs/tags/${e}`,`refs/heads/${e}`,`refs/remotes/${e}`,`refs/remotes/${e}/HEAD`],nn=[`config`,`description`,`index`,`shallow`,`commondir`];function rn(e){if(nn.includes(e))throw new Tt(e,`refs/heads/${e}`);if(!Mt(e,!0))throw new Tt(e,Pe.default.clean(e))}var an=class e{static async updateRemoteRefs({fs:t,gitdir:n,remote:r,refs:i,symrefs:a,tags:o,refspecs:s=void 0,prune:c=!1,pruneTags:l=!1}){for(let e of i.values())if(!e.match(/[0-9a-f]{40}/))throw new wt(e);let u=await en.get({fs:t,gitdir:n});if(!s){if(s=await u.getall(`remote.${r}.fetch`),s.length===0)throw new Et(r);s.unshift(`+HEAD:refs/remotes/${r}/HEAD`)}let d=kt.from(s),f=new Map,p=d.translate([...i.keys()]),m=[];for(let[e,t]of d.translate([...a.keys()])){let n=d.translateOne(a.get(e));n&&(rn(n),m.push([t,`ref: ${n}`]))}let h=o?[...i.keys()].filter(e=>e.startsWith(`refs/tags`)&&!e.endsWith(`^{}`)):[];for(let[,e]of p)rn(e);for(let[e]of m)rn(e);if(h.forEach(rn),l){let r=await e.listRefs({fs:t,gitdir:n,filepath:`refs/tags`});await e.deleteRefs({fs:t,gitdir:n,refs:r.map(e=>`refs/tags/${e}`)})}for(let r of h)if(!await e.exists({fs:t,gitdir:n,ref:r})){let e=i.get(r);f.set(r,e)}for(let[e,t]of p){let n=i.get(e);f.set(t,n)}for(let[e,t]of m)f.set(e,t);let g=[];if(c){for(let r of d.localNamespaces()){let i=(await e.listRefs({fs:t,gitdir:n,filepath:r})).map(e=>`${r}/${e}`);for(let e of i)f.has(e)||g.push(e)}g.length>0&&await e.deleteRefs({fs:t,gitdir:n,refs:g})}for(let[e,r]of f)await pt(e,async()=>t.write(It(n,e),`${r.trim()}\n`,`utf8`));return{pruned:g}}static async writeRef({fs:e,gitdir:t,ref:n,value:r}){if(rn(n),!r.match(/[0-9a-f]{40}/))throw new wt(r);await pt(n,async()=>e.write(It(t,n),`${r.trim()}\n`,`utf8`))}static async writeSymbolicRef({fs:e,gitdir:t,ref:n,value:r}){rn(n),await pt(n,async()=>e.write(It(t,n),`ref: ${r.trim()}\n`,`utf8`))}static async deleteRef({fs:t,gitdir:n,ref:r}){return e.deleteRefs({fs:t,gitdir:n,refs:[r]})}static async deleteRefs({fs:e,gitdir:t,refs:n}){n.forEach(rn),await Promise.all(n.map(n=>e.rm(It(t,n))));let r=await pt(`packed-refs`,async()=>e.read(`${t}/packed-refs`,{encoding:`utf8`})),i=Dt.from(r),a=i.refs.size;for(let e of n)i.refs.has(e)&&i.delete(e);i.refs.size<a&&(r=i.toString(),await pt(`packed-refs`,async()=>e.write(`${t}/packed-refs`,r,{encoding:`utf8`})))}static async resolve({fs:t,gitdir:n,ref:r,depth:i=void 0,visited:a=new Set}){if(i!==void 0&&(i--,i===-1))return r;if(r.startsWith(`ref: `))return r=r.slice(5),e.resolve({fs:t,gitdir:n,ref:r,depth:i,visited:a});if(r.length===40&&/[0-9a-f]{40}/.test(r))return r;let o=await e.packedRefs({fs:t,gitdir:n}),s=tn(r).filter(e=>!nn.includes(e));for(let r of s){let s=await pt(r,async()=>await t.read(`${n}/${r}`,{encoding:`utf8`})||o.get(r));if(s){if(a.has(r))throw new $(`Circular reference detected while resolving ref "${r}"`);return a.add(r),e.resolve({fs:t,gitdir:n,ref:s.trim(),depth:i,visited:a})}}throw new St(r)}static async isUnbornBranch({fs:t,gitdir:n,ref:r}){let i;try{i=await e.resolve({fs:t,gitdir:n,ref:`HEAD`,depth:2})}catch(e){if(e instanceof St)return!1;throw e}return i.startsWith(`refs/heads/`)?r===`HEAD`||tn(r).includes(i):!1}static async exists({fs:t,gitdir:n,ref:r}){try{return await e.expand({fs:t,gitdir:n,ref:r}),!0}catch(e){if(e instanceof St)return!1;throw e}}static async expand({fs:t,gitdir:n,ref:r}){if(r.length===40&&/[0-9a-f]{40}/.test(r))return r;let i=await e.packedRefs({fs:t,gitdir:n}),a=tn(r).filter(e=>!nn.includes(e));for(let e of a)if(await pt(e,async()=>t.exists(`${n}/${e}`))||i.has(e))return e;throw new St(r)}static async expandAgainstMap({ref:e,map:t}){let n=tn(e);for(let e of n)if(await t.has(e))return e;throw new St(e)}static resolveAgainstMap({ref:t,fullref:n=t,depth:r=void 0,map:i}){if(r!==void 0&&(r--,r===-1))return{fullref:n,oid:t};if(t.startsWith(`ref: `))return t=t.slice(5),e.resolveAgainstMap({ref:t,fullref:n,depth:r,map:i});if(t.length===40&&/[0-9a-f]{40}/.test(t))return{fullref:n,oid:t};let a=tn(t);for(let t of a){let n=i.get(t);if(n)return e.resolveAgainstMap({ref:n.trim(),fullref:t,depth:r,map:i})}throw new St(t)}static async packedRefs({fs:e,gitdir:t}){let n=await pt(`packed-refs`,async()=>e.read(`${t}/packed-refs`,{encoding:`utf8`}));return Dt.from(n).refs}static async listRefs({fs:t,gitdir:n,filepath:r}){let i=await e.packedRefs({fs:t,gitdir:n}),a=null;try{a=await t.readdirDeep(`${n}/${r}`),a=a.map(e=>e.replace(`${n}/${r}/`,``))}catch{a=[]}for(let e of i.keys())e.startsWith(r)&&(e=e.replace(r+`/`,``),a.includes(e)||a.push(e));return a.sort(At),a}static async listBranches({fs:t,gitdir:n,remote:r}){return r?e.listRefs({fs:t,gitdir:n,filepath:`refs/remotes/${r}`}):e.listRefs({fs:t,gitdir:n,filepath:`refs/heads`})}static async listTags({fs:t,gitdir:n}){return(await e.listRefs({fs:t,gitdir:n,filepath:`refs/tags`})).filter(e=>!e.endsWith(`^{}`))}};function on(e,t){return We(sn(e),sn(t))}function sn(e){return e.mode===`040000`?e.path+`/`:e.path}function cn(e){switch(e){case`040000`:return`tree`;case`100644`:return`blob`;case`100755`:return`blob`;case`120000`:return`blob`;case`160000`:return`commit`}throw new $(`Unexpected GitTree entry mode: ${e}`)}function ln(e){let t=[],n=0;for(;n<e.length;){let r=e.indexOf(32,n);if(r===-1)throw new $(`GitTree: Error parsing buffer at byte location ${n}: Could not find the next space character.`);let i=e.indexOf(0,n);if(i===-1)throw new $(`GitTree: Error parsing buffer at byte location ${n}: Could not find the next null character.`);let a=e.slice(n,r).toString(`utf8`);a===`40000`&&(a=`040000`);let o=cn(a),s=e.slice(r+1,i).toString(`utf8`),c=s.replace(/[\u200C-\u200F\u202A-\u202E\u206A-\u206F\uFEFF]/g,``),l=c.split(`:`)[0].toLowerCase().replace(/[. ]+$/,``);if(s.includes(`\\`)||s.includes(`/`)||c===`.`||c===`..`||l===`.git`||/^\.?git~[1-9]$/.test(l))throw new Be(s);let u=e.slice(i+1,i+21).toString(`hex`);n=i+21,t.push({mode:a,path:s,oid:u,type:o})}return t}function un(e){if(typeof e==`number`&&(e=e.toString(8)),e.match(/^0?4.*/))return`040000`;if(e.match(/^1006.*/))return`100644`;if(e.match(/^1007.*/))return`100755`;if(e.match(/^120.*/))return`120000`;if(e.match(/^160.*/))return`160000`;throw new $(`Could not understand file mode: ${e}`)}function dn(e){return!e.oid&&e.sha&&(e.oid=e.sha),e.mode=un(e.mode),e.type||=cn(e.mode),e}var fn=class e{constructor(e){if(Buffer.isBuffer(e))this._entries=ln(e);else if(Array.isArray(e))this._entries=e.map(dn);else throw new $(`invalid type passed to GitTree constructor`);this._entries.sort(Ge)}static from(t){return new e(t)}render(){return this._entries.map(e=>`${e.mode} ${e.type} ${e.oid} ${e.path}`).join(`
`)}toObject(){let e=[...this._entries];return e.sort(on),Buffer.concat(e.map(e=>{let t=Buffer.from(e.mode.replace(/^0/,``)),n=Buffer.from(` `),r=Buffer.from(e.path,`utf8`),i=Buffer.from([0]),a=Buffer.from(e.oid,`hex`);return Buffer.concat([t,n,r,i,a])}))}entries(){return this._entries}*[Symbol.iterator](){for(let e of this._entries)yield e}},pn=class{static wrap({type:e,object:t}){let n=`${e} ${t.length}\x00`,r=n.length,i=r+t.length,a=new Uint8Array(i);for(let e=0;e<r;e++)a[e]=n.charCodeAt(e);return a.set(t,r),a}static unwrap(e){let t=e.indexOf(32),n=e.indexOf(0),r=e.slice(0,t).toString(`utf8`),i=e.slice(t+1,n).toString(`utf8`),a=e.length-(n+1);if(parseInt(i)!==a)throw new $(`Length mismatch: expected ${i} bytes but got ${a} instead.`);return{type:r,object:Buffer.from(e.slice(n+1))}}};async function mn({fs:e,gitdir:t,oid:n}){let r=`objects/${n.slice(0,2)}/${n.slice(2)}`,i=await e.read(`${t}/${r}`);return i?{object:i,format:`deflated`,source:r}:null}function hn(e,t){let n=new Ve(e),r=gn(n);if(r!==t.byteLength)throw new $(`applyDelta expected source buffer to be ${r} bytes but the provided buffer was ${t.length} bytes`);let i=gn(n),a,o=vn(n,t);if(o.byteLength===i)a=o;else{let e=[o],r=o.byteLength;for(;!n.eof();){let i=vn(n,t);e.push(i),r+=i.byteLength}if(i!==r)throw new $(`applyDelta expected target buffer to be ${i} bytes but the resulting buffer was ${r} bytes`);a=Buffer.concat(e,i)}return a}function gn(e){let t=0,n=0,r=null;do r=e.readUInt8(),t|=(r&127)<<n,n+=7;while(r&128);return t}function _n(e,t,n){let r=0,i=0;for(;n--;)t&1&&(r|=e.readUInt8()<<i),t>>=1,i+=8;return r}function vn(e,t){let n=e.readUInt8();if(n&128){let r=_n(e,n&15,4),i=_n(e,(n&112)>>4,3);return i===0&&(i=65536),t.slice(r,r+i)}return e.slice(n)}function yn(e){let t=[e];return{next(){return Promise.resolve({done:t.length===0,value:t.pop()})},return(){return t=[],{}},[Symbol.asyncIterator](){return this}}}function bn(e){return e[Symbol.asyncIterator]?e[Symbol.asyncIterator]():e[Symbol.iterator]?e[Symbol.iterator]():e.next?e:yn(e)}var xn=class{constructor(e){if(typeof Buffer>`u`)throw Error(`Missing Buffer dependency`);this.stream=bn(e),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(e){if(!this.eof())return this.started||await this._init(),this.cursor+e>this.buffer.length&&(this._trim(),await this._accumulate(e)),this._moveCursor(e),this.buffer.slice(this.undoCursor,this.cursor)}async skip(e){this.eof()||(this.started||await this._init(),this.cursor+e>this.buffer.length&&(this._trim(),await this._accumulate(e)),this._moveCursor(e))}async undo(){this.cursor=this.undoCursor}async _next(){this.started=!0;let{done:e,value:t}=await this.stream.next();return e&&(this._ended=!0,!t)?Buffer.alloc(0):(t&&=Buffer.from(t),t)}_trim(){this.buffer=this.buffer.slice(this.undoCursor),this.cursor-=this.undoCursor,this._discardedBytes+=this.undoCursor,this.undoCursor=0}_moveCursor(e){this.undoCursor=this.cursor,this.cursor+=e,this.cursor>this.buffer.length&&(this.cursor=this.buffer.length)}async _accumulate(e){if(this._ended)return;let t=[this.buffer];for(;this.cursor+e>Sn(t);){let e=await this._next();if(this._ended)break;t.push(e)}this.buffer=Buffer.concat(t)}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 Sn(e){return e.reduce((e,t)=>e+t.length,0)}async function Cn(e,t){let n=new xn(e),r=await n.read(4);if(r=r.toString(`utf8`),r!==`PACK`)throw new $(`Invalid PACK header '${r}'`);let i=await n.read(4);if(i=i.readUInt32BE(0),i!==2)throw new $(`Invalid packfile version: ${i}`);let a=await n.read(4);if(a=a.readUInt32BE(0),!(a<1))for(;!n.eof()&&a--;){let e=n.tell(),{type:r,length:i,ofs:o,reference:s}=await wn(n),c=new Ie.default.Inflate;for(;!c.result;){let l=await n.chunk();if(!l)break;if(c.push(l,!1),c.err)throw new $(`Pako error: ${c.msg}`);if(c.result){if(c.result.length!==i)throw new $(`Inflated object size is different from that stated in packfile.`);await n.undo(),await n.read(l.length-c.strm.avail_in);let u=n.tell();await t({data:c.result,type:r,num:a,offset:e,end:u,reference:s,ofs:o})}}}}async function wn(e){let t=await e.byte(),n=t>>4&7,r=t&15;if(t&128){let n=4;do t=await e.byte(),r|=(t&127)<<n,n+=7;while(t&128)}let i,a;if(n===6){let n=0;i=0;let r=[];do t=await e.byte(),i|=(t&127)<<n,n+=7,r.push(t);while(t&128);a=Buffer.from(r)}return n===7&&(a=await e.read(20)),{type:n,length:r,ofs:i,reference:a}}var Tn=class e extends Q{constructor(t){super(`Invalid compressed buffer: ${t}`),this.code=this.name=e.code,this.data={message:t}}};Tn.code=`DecompressionError`;async function En(e){let t=new DecompressionStream(`deflate`),n=new Blob([e]).stream().pipeThrough(t);try{return new Uint8Array(await new Response(n).arrayBuffer())}catch(e){throw e&&e.name===`TypeError`&&e.message===``?new Tn(`decompression failed`):e}}var Dn=!1;async function On(e){Dn===null&&(Dn=kn());try{return Dn?await En(e):Ie.default.inflate(e)}catch(e){throw typeof e==`string`?new Tn(e):e}}function kn(){try{if(new DecompressionStream(`deflate`))return!0}catch{}return!1}function An(e){let t=[],n=0,r=0;do{n=e.readUInt8();let i=n&127;t.push(i),r=n&128}while(r);return t.reduce((e,t)=>e+1<<7|t,-1)}function jn(e,t){let n=t,r=4,i=null;do i=e.readUInt8(),n|=(i&127)<<r,r+=7;while(i&128);return n}var Mn=33554432,Nn=class{constructor(e){this.maxBytes=e,this.bytes=0,this.map=new Map}get(e){let t=this.map.get(e);return t!==void 0&&(this.map.delete(e),this.map.set(e,t)),t}set(e,t){let n=t.object.byteLength;if(!(n>this.maxBytes/4)){this.map.set(e,t),this.bytes+=n;for(let[e,t]of this.map){if(this.bytes<=this.maxBytes)break;this.map.delete(e),this.bytes-=t.object.byteLength}}}};function Pn({type:e,data:t,reference:n,offset:r},i,a){let o=Buffer.from(t.buffer,t.byteOffset,t.byteLength);if(e!==`ofs-delta`&&e!==`ref-delta`)return{type:e,object:o};let s=e===`ofs-delta`?r-An(new Ve(n)):a.get(n.toString(`hex`)),c=i.get(s);if(!c)return null;try{return{type:c.type,object:Buffer.from(hn(o,c.object))}}catch(e){if(e instanceof $||e instanceof RangeError)return null;throw e}}var Fn=class e{constructor(e){Object.assign(this,e),this.offsetCache={}}static async fromIdx({idx:t,getExternalRefDelta:n}){let r=new Ve(t);if(r.slice(4).toString(`hex`)!==`ff744f63`)return;let i=r.readUInt32BE();if(i!==2)throw new $(`Unable to read version ${i} packfile IDX. (Only version 2 supported)`);if(t.byteLength>2147483648)throw new $(`To keep implementation simple, I haven't implemented the layer 5 feature needed to support packfiles > 2GB in size.`);r.seek(r.tell()+1020);let a=r.readUInt32BE(),o=[];for(let e=0;e<a;e++){let t=r.slice(20).toString(`hex`);o[e]=t}r.seek(r.tell()+4*a);let s=new Map;for(let e=0;e<a;e++)s.set(o[e],r.readUInt32BE());let c=r.slice(20).toString(`hex`);return new e({hashes:o,crcs:{},offsets:s,packfileSha:c,getExternalRefDelta:n})}static async fromPack({pack:t,getExternalRefDelta:n,onProgress:r}){let i={1:`commit`,2:`tree`,3:`blob`,4:`tag`,6:`ofs-delta`,7:`ref-delta`},a={},o=t.slice(-20).toString(`hex`),s=[],c={},l=new Map,u=null,d=null,f=new Nn(Mn),p=new Map;await Cn([t],async({data:e,type:t,reference:n,offset:o,num:s})=>{u===null&&(u=s);let c=Math.floor((u-s)*100/u);c!==d&&r&&await r({phase:`Receiving objects`,loaded:u-s,total:u}),d=c,t=i[t],([`commit`,`tree`,`blob`,`tag`].includes(t)||t===`ofs-delta`||t===`ref-delta`)&&(a[o]={type:t,offset:o});let l=a[o];if(!l)return;let m=Pn({type:t,data:e,reference:n,offset:o},f,p);m&&(l.oid=await $e(pn.wrap(m)),p.set(l.oid,o),f.set(o,m))});let m=Object.keys(a).map(Number);for(let[e,n]of m.entries()){let r=e+1===m.length?t.byteLength-20:m[e+1],i=a[n],o=Fe.default.buf(t.slice(n,r))>>>0;i.end=r,i.crc=o}let h=new e({pack:Promise.resolve(t),packfileSha:o,crcs:c,hashes:s,offsets:l,getExternalRefDelta:n});d=null;let g=0,_=[0,0,0,0,0,0,0,0,0,0,0,0];for(let e in a){e=Number(e);let t=Math.floor(g*100/u);t!==d&&r&&await r({phase:`Resolving deltas`,loaded:g,total:u}),g++,d=t;let n=a[e];if(!n.oid)try{h.readDepth=0,h.externalReadDepth=0;let{type:t,object:r}=await h.readSlice({start:e});_[h.readDepth]+=1,n.oid=await $e(pn.wrap({type:t,object:r}))}catch{continue}s.push(n.oid),l.set(n.oid,e),c[n.oid]=n.crc}return s.sort(),h}async toBuffer(){let e=[],t=(t,n)=>{e.push(Buffer.from(t,n))};t(`ff744f63`,`hex`),t(`00000002`,`hex`);let n=new Ve(Buffer.alloc(1024));for(let e=0;e<256;e++){let t=0;for(let n of this.hashes)parseInt(n.slice(0,2),16)<=e&&t++;n.writeUInt32BE(t)}e.push(n.buffer);for(let e of this.hashes)t(e,`hex`);let r=new Ve(Buffer.alloc(this.hashes.length*4));for(let e of this.hashes)r.writeUInt32BE(this.crcs[e]);e.push(r.buffer);let i=new Ve(Buffer.alloc(this.hashes.length*4));for(let e of this.hashes)i.writeUInt32BE(this.offsets.get(e));e.push(i.buffer),t(this.packfileSha,`hex`);let a=Buffer.concat(e),o=await $e(a),s=Buffer.alloc(20);return s.write(o,`hex`),Buffer.concat([a,s])}async load({pack:e}){this.pack=e}async unload(){this.pack=null}async read({oid:e}){if(!this.offsets.get(e)){if(this.getExternalRefDelta)return this.externalReadDepth++,this.getExternalRefDelta(e);throw new $(`Could not read object ${e} from packfile`)}let t=this.offsets.get(e);return this.readSlice({start:t})}async readSlice({start:e}){if(this.offsetCache[e])return Object.assign({},this.offsetCache[e]);this.readDepth++;let t={16:`commit`,32:`tree`,48:`blob`,64:`tag`,96:`ofs_delta`,112:`ref_delta`},n=await this.pack;if(!n)throw new $(`Could not read packfile data. The packfile may be missing, corrupted, or too large to read into memory.`);let r=n.slice(e),i=new Ve(r),a=i.readUInt8(),o=a&112,s=t[o];if(s===void 0)throw new $(`Unrecognized type: 0b`+o.toString(2));let c=a&15,l=c;a&128&&(l=jn(i,c));let u=null,d=null;if(s===`ofs_delta`){let t=e-An(i);({object:u,type:s}=await this.readSlice({start:t}))}if(s===`ref_delta`){let e=i.slice(20).toString(`hex`);({object:u,type:s}=await this.read({oid:e}))}let f=r.slice(i.tell());if(d=Buffer.from(await On(f)),d.byteLength!==l)throw new $(`Packfile told us object would have length ${l} but it had length ${d.byteLength}`);return u&&(d=Buffer.from(hn(d,u))),this.readDepth>3&&(this.offsetCache[e]={type:s,object:d}),{type:s,format:`content`,object:d}}},In=Symbol(`PackfileCache`);async function Ln({fs:e,filename:t,getExternalRefDelta:n,emitter:r,emitterPrefix:i}){let a=await e.read(t);return Fn.fromIdx({idx:a,getExternalRefDelta:n})}function Rn({fs:e,cache:t,filename:n,getExternalRefDelta:r,emitter:i,emitterPrefix:a}){t[In]||(t[In]=new Map);let o=t[In].get(n);return o||(o=Ln({fs:e,filename:n,getExternalRefDelta:r,emitter:i,emitterPrefix:a}),t[In].set(n,o),o.catch(()=>{t[In].get(n)===o&&t[In].delete(n)})),o}async function zn(e,{start:t=0,end:n=e.length}={}){return $e(e.subarray(t,n))}async function Bn({fs:e,cache:t,gitdir:n,oid:r,format:i=`content`,getExternalRefDelta:a}){let o=await e.readdir(It(n,`objects/pack`));o=o.filter(e=>e.endsWith(`.idx`));for(let i of o){let o=`${n}/objects/pack/${i}`,s=await Rn({fs:e,cache:t,filename:o,getExternalRefDelta:a});if(s.error)throw new $(s.error);if(s.offsets.has(r)){let t=o.replace(/idx$/,`pack`);if(!s.pack){let n=e.read(t);s.pack=n,n.catch(()=>{s.pack===n&&(s.pack=null)})}let n=await s.pack;if(!n)throw s.pack=null,new $(`Could not read packfile at ${t}. The file may be missing, corrupted, or too large to read into memory.`);s._checksumVerification||=Vn(n,s.packfileSha),await s._checksumVerification;let c=await s.read({oid:r,getExternalRefDelta:a});return c.format=`content`,c.source=`objects/pack/${i.replace(/idx$/,`pack`)}`,c}}return null}async function Vn(e,t){let n=e.subarray(-20),r=Array.from(n).map(e=>e.toString(16).padStart(2,`0`)).join(``);if(r!==t)throw new $(`Packfile trailer mismatch: expected ${t}, got ${r}. The packfile may be corrupted.`);let i=await zn(e,{start:0,end:e.length-20});if(i!==t)throw new $(`Packfile payload corrupted: calculated ${i} but expected ${t}. The packfile may have been tampered with.`)}async function Hn({fs:e,cache:t,gitdir:n,oid:r,format:i=`content`}){if(![`deflated`,`wrapped`,`content`].includes(i))throw new $(`invalid requested format "${i}"`);let a=r=>Hn({fs:e,cache:t,gitdir:n,oid:r}),o;if(r===`4b825dc642cb6eb9a060e54bf8d69288fbee4904`&&(o={format:`wrapped`,object:Buffer.from(`tree 0\0`)}),o||=await mn({fs:e,gitdir:n,oid:r}),!o){if(o=await Bn({fs:e,cache:t,gitdir:n,oid:r,getExternalRefDelta:a}),!o)throw new St(r);return o}if(i===`deflated`||(o.format===`deflated`&&(o.object=Buffer.from(await On(o.object)),o.format=`wrapped`),i===`wrapped`))return o;let s=await $e(o.object);if(s!==r)throw new $(`SHA check failed! Expected ${r}, computed ${s}`);let{object:c,type:l}=pn.unwrap(o.object);return o.type=l,o.object=c,o.format=`content`,o}var Un=class e extends Q{constructor(t,n,r=!0){super(`Failed to create ${t} at ${n} because it already exists.${r?` (Hint: use 'force: true' parameter to overwrite existing ${t}.)`:``}`),this.code=this.name=e.code,this.data={noun:t,where:n,canForce:r}}};Un.code=`AlreadyExistsError`;var Wn=class e extends Q{constructor(t,n,r){super(`Found multiple ${t} matching "${n}" (${r.join(`, `)}). Use a longer abbreviation length to disambiguate them.`),this.code=this.name=e.code,this.data={nouns:t,short:n,matches:r}}};Wn.code=`AmbiguousError`;var Gn=class e extends Q{constructor(t){super(`Your local changes to the following files would be overwritten by checkout: ${t.join(`, `)}`),this.code=this.name=e.code,this.data={filepaths:t}}};Gn.code=`CheckoutConflictError`;var Kn=class e extends Q{constructor(t){super(`Your local changes to the following files would be overwritten by cherry-pick: ${t.join(`, `)}`),this.code=this.name=e.code,this.data={filepaths:t}}};Kn.code=`CherryPickLocalChangesError`;var qn=class e extends Q{constructor(t,n){super(`Cannot cherry-pick merge commit ${t}. Merge commits have ${n} parents and require specifying which parent to use as the base.`),this.code=this.name=e.code,this.data={oid:t,parentCount:n}}};qn.code=`CherryPickMergeCommitError`;var Jn=class e extends Q{constructor(t){super(`Cannot cherry-pick root commit ${t}. Root commits have no parents.`),this.code=this.name=e.code,this.data={oid:t}}};Jn.code=`CherryPickRootCommitError`;var Yn=class e extends Q{constructor(t,n){super(`Failed to checkout "${t}" because commit ${n} is not available locally. Do a git fetch to make the branch available locally.`),this.code=this.name=e.code,this.data={ref:t,oid:n}}};Yn.code=`CommitNotFetchedError`;var Xn=class e extends Q{constructor(){super(`Cannot create an empty commit when disallowEmpty is true.`),this.code=this.name=e.code,this.data={}}};Xn.code=`EmptyCommitError`;var Zn=class e extends Q{constructor(){super(`Empty response from git server.`),this.code=this.name=e.code,this.data={}}};Zn.code=`EmptyServerResponseError`;var Qn=class e extends Q{constructor(){super(`A simple fast-forward merge was not possible.`),this.code=this.name=e.code,this.data={}}};Qn.code=`FastForwardError`;var $n=class e extends Q{constructor(t,n){super(`One or more branches were not updated: ${t}`),this.code=this.name=e.code,this.data={prettyDetails:t,result:n}}};$n.code=`GitPushError`;var er=class e extends Q{constructor(t,n,r){super(`HTTP Error: ${t} ${n}`),this.code=this.name=e.code,this.data={statusCode:t,statusMessage:n,response:r}}};er.code=`HttpError`;var tr=class e extends Q{constructor(t){let n=`invalid filepath`;t===`leading-slash`||t===`trailing-slash`?n=`"filepath" parameter should not include leading or trailing directory separators because these can cause problems on some platforms.`:t===`directory`&&(n=`"filepath" should not be a directory.`),super(n),this.code=this.name=e.code,this.data={reason:t}}};tr.code=`InvalidFilepathError`;var nr=class e extends Q{constructor(t){super(`Maximum search depth of ${t} exceeded.`),this.code=this.name=e.code,this.data={depth:t}}};nr.code=`MaxDepthError`;var rr=class e extends Q{constructor(){super(`Merges with conflicts are not supported yet.`),this.code=this.name=e.code,this.data={}}};rr.code=`MergeNotSupportedError`;var ir=class e extends Q{constructor(t,n,r,i){super(`Automatic merge failed with one or more merge conflicts in the following files: ${t.toString()}. Fix conflicts then commit the result.`),this.code=this.name=e.code,this.data={filepaths:t,bothModified:n,deleteByUs:r,deleteByTheirs:i}}};ir.code=`MergeConflictError`;var ar=class e extends Q{constructor(t){super(`No name was provided for ${t} in the argument or in the .git/config file.`),this.code=this.name=e.code,this.data={role:t}}};ar.code=`MissingNameError`;var or=class e extends Q{constructor(t){super(`The function requires a "${t}" parameter but none was provided.`),this.code=this.name=e.code,this.data={parameter:t}}};or.code=`MissingParameterError`;var sr=class e extends Q{constructor(t){super(`There are multiple errors that were thrown by the method. Please refer to the "errors" property to see more`),this.code=this.name=e.code,this.data={errors:t},this.errors=t}};sr.code=`MultipleGitError`;var cr=class e extends Q{constructor(t,n){super(`Expected "${t}" but received "${n}".`),this.code=this.name=e.code,this.data={expected:t,actual:n}}};cr.code=`ParseError`;var lr=class e extends Q{constructor(t){let n=``;t===`not-fast-forward`?n=` because it was not a simple fast-forward`:t===`tag-exists`&&(n=` because tag already exists`),super(`Push rejected${n}. Use "force: true" to override.`),this.code=this.name=e.code,this.data={reason:t}}};lr.code=`PushRejectedError`;var ur=class e extends Q{constructor(t,n){super(`Remote does not support the "${t}" so the "${n}" parameter cannot be used.`),this.code=this.name=e.code,this.data={capability:t,parameter:n}}};ur.code=`RemoteCapabilityError`;var dr=class e extends Q{constructor(t,n){super(`Remote did not reply using the "smart" HTTP protocol. Expected "001e# service=git-upload-pack" but received: ${t}`),this.code=this.name=e.code,this.data={preview:t,response:n}}};dr.code=`SmartHttpError`;var fr=class e extends Q{constructor(t,n,r){super(`Git remote "${t}" uses an unrecognized transport protocol: "${n}"`),this.code=this.name=e.code,this.data={url:t,transport:n,suggestion:r}}};fr.code=`UnknownTransportError`;var pr=class e extends Q{constructor(t){super(`Cannot parse remote URL: "${t}"`),this.code=this.name=e.code,this.data={url:t}}};pr.code=`UrlParseError`;var mr=class e extends Q{constructor(){super(`The operation was canceled.`),this.code=this.name=e.code,this.data={}}};mr.code=`UserCanceledError`;var hr=class e extends Q{constructor(t){super(`Could not merge index: Entry for '${t}' is not up to date. Either reset the index entry to HEAD, or stage your unstaged changes.`),this.code=this.name=e.code,this.data={filepath:t}}};hr.code=`IndexResetError`;var gr=class e extends Q{constructor(t){super(`"${t}" does not point to any commit. You're maybe working on a repository with no commits yet. `),this.code=this.name=e.code,this.data={ref:t}}};gr.code=`NoCommitError`;function _r({name:e,email:t,timestamp:n,timezoneOffset:r}){return r=vr(r),`${e} <${t}> ${n} ${r}`}function vr(e){let t=yr(br(e));e=Math.abs(e);let n=Math.floor(e/60);e-=n*60;let r=String(n),i=String(e);return r.length<2&&(r=`0`+r),i.length<2&&(i=`0`+i),(t===-1?`-`:`+`)+r+i}function yr(e){return Math.sign(e)||(Object.is(e,-0)?-1:1)}function br(e){return e===0?e:-e}function xr(e){return e=e.replace(/\r/g,``),e=e.replace(/^\n+/,``),e=e.replace(/\n+$/,``)+`
`,e}function Sr(e){let[,t,n,r,i]=e.match(/^(.*) <(.*)> (.*) (.*)$/);return{name:t,email:n,timestamp:Number(r),timezoneOffset:Cr(i)}}function Cr(e){let[,t,n,r]=e.match(/(\+|-)(\d\d)(\d\d)/);return r=(t===`+`?1:-1)*(Number(n)*60+Number(r)),wr(r)}function wr(e){return e===0?e:-e}var Tr=class e{constructor(t){if(typeof t==`string`)this._tag=t;else if(Buffer.isBuffer(t))this._tag=t.toString(`utf8`);else if(typeof t==`object`)this._tag=e.render(t);else throw new $(`invalid type passed to GitAnnotatedTag constructor`)}static from(t){return new e(t)}static render(e){return`object ${e.object}
type ${e.type}
tag ${e.tag}
tagger ${_r(e.tagger)}
${e.message}
${e.gpgsig?e.gpgsig:``}`}justHeaders(){return this._tag.slice(0,this._tag.indexOf(`
`))}message(){let e=this.withoutSignature();return e.slice(e.indexOf(`
`)+2)}parse(){return Object.assign(this.headers(),{message:this.message(),gpgsig:this.gpgsig()})}render(){return this._tag}headers(){let e=this.justHeaders().split(`
`),t=[];for(let n of e)n[0]===` `?t[t.length-1]+=`
`+n.slice(1):t.push(n);let n={},r=new Set;for(let e of t){let t=e.slice(0,e.indexOf(` `)),i=e.slice(e.indexOf(` `)+1);r.has(t)||(r.add(t),n[t]=i)}return n.tagger&&=Sr(n.tagger),n.committer&&=Sr(n.committer),n}withoutSignature(){let e=xr(this._tag);return e.indexOf(`
-----BEGIN PGP SIGNATURE-----`)===-1?e:e.slice(0,e.lastIndexOf(`
-----BEGIN PGP SIGNATURE-----`))}gpgsig(){if(this._tag.indexOf(`
-----BEGIN PGP SIGNATURE-----`)!==-1)return xr(this._tag.slice(this._tag.indexOf(`-----BEGIN PGP SIGNATURE-----`),this._tag.indexOf(`-----END PGP SIGNATURE-----`)+27))}payload(){return this.withoutSignature()+`
`}toObject(){return Buffer.from(this._tag,`utf8`)}static async sign(t,n,r){let i=t.payload(),{signature:a}=await n({payload:i,secretKey:r});a=xr(a);let o=i+a;return e.from(o)}};function Er(e){return e.trim().split(`
`).map(e=>` `+e).join(`
`)+`
`}function Dr(e){return e.split(`
`).map(e=>e.replace(/^ /,``)).join(`
`)}var Or=class e{constructor(t){if(typeof t==`string`)this._commit=t;else if(Buffer.isBuffer(t))this._commit=t.toString(`utf8`);else if(typeof t==`object`)this._commit=e.render(t);else throw new $(`invalid type passed to GitCommit constructor`)}static fromPayloadSignature({payload:t,signature:n}){let r=e.justHeaders(t),i=e.justMessage(t),a=xr(r+`
gpgsig`+Er(n)+`
`+i);return new e(a)}static from(t){return new e(t)}toObject(){return Buffer.from(this._commit,`utf8`)}headers(){return this.parseHeaders()}message(){return e.justMessage(this._commit)}parse(){return Object.assign({message:this.message()},this.headers())}static justMessage(e){return xr(e.slice(e.indexOf(`
`)+2))}static justHeaders(e){return e.slice(0,e.indexOf(`
`))}parseHeaders(){let t=e.justHeaders(this._commit).split(`
`),n=[];for(let e of t)e[0]===` `?n[n.length-1]+=`
`+e.slice(1):n.push(e);let r={parent:[]},i=e=>e.slice(0,e.indexOf(` `)),a=e=>e.slice(e.indexOf(` `)+1);if(n.length===0||i(n[0])!==`tree`)throw new cr(`tree as the first commit header`,i(n[0]||``));r.tree=a(n[0]);let o=1;for(;o<n.length&&i(n[o])===`parent`;)r.parent.push(a(n[o])),o++;let s=new Set([`tree`,`parent`]);for(;o<n.length;o++){let e=i(n[o]);s.has(e)||(s.add(e),r[e]=a(n[o]))}return r.author&&=Sr(r.author),r.committer&&=Sr(r.committer),r}static renderHeaders(e){let t=``;if(e.tree?t+=`tree ${e.tree}\n`:t+=`tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904
`,e.parent){if(e.parent.length===void 0)throw new $(`commit 'parent' property should be an array`);for(let n of e.parent)t+=`parent ${n}\n`}let n=e.author;t+=`author ${_r(n)}\n`;let r=e.committer||e.author;return t+=`committer ${_r(r)}\n`,e.gpgsig&&(t+=`gpgsig`+Er(e.gpgsig)),t}static render(t){return e.renderHeaders(t)+`
`+xr(t.message)}render(){return this._commit}withoutSignature(){let e=xr(this._commit);if(e.indexOf(`
gpgsig`)===-1)return e;let t=e.slice(0,e.indexOf(`
gpgsig`)),n=e.slice(e.indexOf(`-----END PGP SIGNATURE-----
`)+28);return xr(t+`
`+n)}isolateSignature(){return Dr(this._commit.slice(this._commit.indexOf(`-----BEGIN PGP SIGNATURE-----`),this._commit.indexOf(`-----END PGP SIGNATURE-----`)+27))}static async sign(t,n,r){let i=t.withoutSignature(),a=e.justMessage(t._commit),{signature:o}=await n({payload:i,secretKey:r});o=xr(o);let s=e.justHeaders(t._commit)+`
gpgsig`+Er(o)+`
`+a;return e.from(s)}};Array.prototype.flat;async function kr(e,t,n=10){try{await e(t)}catch(r){if(r===null||r.code===`EEXIST`)return;if(r.code!==`ENOENT`)throw r;let i=bt(t);if(i===`.`||i===`/`||i===t)throw r;await kr(e,i,n);for(let r=0;;r++)try{await e(t);return}catch(e){if(e===null||e.code===`EEXIST`)return;if(e.code===`ENOENT`&&r<n){await new Promise(e=>setTimeout(e,0));continue}throw e}}}async function Ar(e,t){let n=await e.readdir(t);n==null?await e.rm(t):n.length?await Promise.all(n.map(n=>{let r=It(t,n);return e.lstat(r).then(t=>{if(t)return t.isDirectory()?Ar(e,r):e.rm(r)})})).then(()=>e.rmdir(t)):await e.rmdir(t)}function jr(e){return Mr(e)&&Nr(e.then)&&Nr(e.catch)}function Mr(e){return e&&typeof e==`object`}function Nr(e){return typeof e==`function`}function Pr(e){let t=e.code;return typeof t==`string`?t===`ENOENT`||t===`ENOTDIR`||t.includes(`ENS`):!1}function Fr(e){return jr((e=>{try{return e.readFile().catch(e=>e)}catch(e){return e}})(e))}var Ir=[`readFile`,`writeFile`,`mkdir`,`rmdir`,`unlink`,`stat`,`lstat`,`readdir`,`readlink`,`symlink`];function Lr(e,t){if(Fr(t))for(let n of Ir)e[`_${n}`]=t[n].bind(t);else for(let n of Ir)e[`_${n}`]=(0,Le.default)(t[n].bind(t));Fr(t)?(t.cp&&(e._cp=t.cp.bind(t)),e._rm=t.rm?t.rm.bind(t):t.rmdir.length>1?t.rmdir.bind(t):Ar.bind(null,e)):(t.cp&&(e._cp=(0,Le.default)(t.cp.bind(t))),e._rm=t.rm?(0,Le.default)(t.rm.bind(t)):t.rmdir.length>2?(0,Le.default)(t.rmdir.bind(t)):Ar.bind(null,e))}var Rr=class{constructor(e){if(e._original_unwrapped_fs!==void 0)return e;let t=Object.getOwnPropertyDescriptor(e,`promises`);t&&t.enumerable?Lr(this,e.promises):Lr(this,e),this._original_unwrapped_fs=e}async exists(e,t={}){try{return await this._stat(e),!0}catch(e){if(Pr(e))return!1;throw console.log(`Unhandled error in "FileSystem.exists()" function`,e),e}}async read(e,t={}){let n;try{n=await this._readFile(e,t)}catch(e){if(Pr(e)||e.code===`EISDIR`)return null;throw e}if(n==null)return null;if(t.autocrlf===`true`)try{n=new TextDecoder(`utf8`,{fatal:!0}).decode(n),n=n.replace(/\r\n/g,`
`),n=new TextEncoder().encode(n)}catch{}return typeof n!=`string`&&(n=Buffer.from(n)),n}async write(e,t,n={}){try{await this._writeFile(e,t,n)}catch{await this.mkdir(bt(e)),await this._writeFile(e,t,n)}}async mkdir(e){await kr(this._mkdir,e)}async rm(e){try{await this._unlink(e)}catch(e){if(e.code!==`ENOENT`)throw e}}async rmdir(e,t){try{t&&t.recursive?await this._rm(e,t):await this._rmdir(e)}catch(e){if(e.code!==`ENOENT`)throw e}}async readdir(e){let t;try{t=await this._readdir(e)}catch(e){if(e.code===`ENOTDIR`)return null;if(Pr(e))return[];throw e}return t.sort(We),t}async readdirDeep(e){let t=await this._readdir(e);return(await Promise.all(t.map(async t=>{let n=e+`/`+t;return(await this._stat(n)).isDirectory()?this.readdirDeep(n):n}))).reduce((e,t)=>e.concat(t),[])}async lstat(e){try{return await this._lstat(e)}catch(e){if(Pr(e))return null;throw e}}async readlink(e,t={encoding:`buffer`}){try{let n=await this._readlink(e,t);return Buffer.isBuffer(n)?n:Buffer.from(n)}catch(e){if(Pr(e))return null;throw e}}async writelink(e,t){return this._symlink(t.toString(`utf8`),e)}};function zr(e,t){if(t===void 0)throw new or(e)}function Br(e){return e.startsWith(`/`)||/^[a-zA-Z]:[\\/]/.test(e)}async function Vr({fsp:e,dotgit:t}){zr(`fsp`,e),zr(`dotgit`,t);let n=await e._stat(t).catch(()=>({isFile:()=>!1,isDirectory:()=>!1}));return n.isDirectory()?t:n.isFile()?e._readFile(t,`utf8`).then(e=>e.trimRight().substr(8)).then(e=>Br(e)?e:It(bt(t),e)):t}var Hr=class{static async isIgnored({fs:e,dir:t,gitdir:n=It(t,`.git`),filepath:r}){if(yt(r)===`.git`)return!0;if(r===`.`)return!1;let i=``,a=It(n,`info`,`exclude`);await e.exists(a)&&(i=await e.read(a,`utf8`));let o=[{gitignore:It(t,`.gitignore`),filepath:r}],s=r.split(`/`).filter(Boolean);for(let e=1;e<s.length;e++){let n=s.slice(0,e).join(`/`),r=s.slice(e).join(`/`);o.push({gitignore:It(t,n,`.gitignore`),filepath:r})}let c=!1;for(let[t,n]of o.entries()){let r=await e.read(n.gitignore,`utf8`),a=(0,Re.default)();t===0&&a.add(i),a.add(r);let o=bt(n.filepath);if(o!==`.`&&a.ignores(o))return!0;c=c?!a.test(n.filepath).unignored:a.test(n.filepath).ignored}return c}};async function Ur({fs:e,gitdir:t,object:n,format:r,oid:i}){if(r!==`deflated`)throw new $(`GitObjectStoreLoose expects objects to write to be in deflated format`);let a=`${t}/${`objects/${i.slice(0,2)}/${i.slice(2)}`}`;await e.exists(a)||await e.write(a,n)}var Wr=null;async function Gr(e){return Wr===null&&(Wr=qr()),Wr?Kr(e):Ie.default.deflate(e)}async function Kr(e){let t=new CompressionStream(`deflate`),n=new Blob([e]).stream().pipeThrough(t);return new Uint8Array(await new Response(n).arrayBuffer())}function qr(){try{return new CompressionStream(`deflate`).writable.close(),new Blob([]).stream().cancel(),!0}catch{return!1}}async function Jr({fs:e,gitdir:t,type:n,object:r,format:i=`content`,oid:a=void 0,dryRun:o=!1}){return i!==`deflated`&&(i!==`wrapped`&&(r=pn.wrap({type:n,object:r})),a=await $e(r),r=Buffer.from(await Gr(r))),o||await Ur({fs:e,gitdir:t,object:r,format:`deflated`,oid:a}),a}async function Yr({fs:e,gitdir:t,oid:n}){let r=`objects/${n.slice(0,2)}/${n.slice(2)}`;return e.exists(`${t}/${r}`)}async function Xr({fs:e,cache:t,gitdir:n,oid:r,getExternalRefDelta:i}){let a=await e.readdir(It(n,`objects/pack`));a=a.filter(e=>e.endsWith(`.idx`));for(let o of a){let a=await Rn({fs:e,cache:t,filename:`${n}/objects/pack/${o}`,getExternalRefDelta:i});if(a.error)throw new $(a.error);if(a.offsets.has(r))return!0}return!1}async function Zr({fs:e,cache:t,gitdir:n,oid:r,format:i=`content`}){let a=r=>Hn({fs:e,cache:t,gitdir:n,oid:r}),o=await Yr({fs:e,gitdir:n,oid:r});return o||=await Xr({fs:e,cache:t,gitdir:n,oid:r,getExternalRefDelta:a}),o}async function Qr({fs:e,gitdir:t,path:n}){return(await en.get({fs:e,gitdir:t})).get(n)}function $r(e,...t){for(let n of t)if(n)for(let t of Object.keys(n)){let r=n[t];r!==void 0&&(e[t]=r)}return e}async function ei({fs:e,gitdir:t,author:n,commit:r}){let i=Math.floor(Date.now()/1e3),a=$r({},{name:await Qr({fs:e,gitdir:t,path:`user.name`}),email:await Qr({fs:e,gitdir:t,path:`user.email`})||``,timestamp:i,timezoneOffset:new Date(i*1e3).getTimezoneOffset()},r?r.author:void 0,n);if(a.name!==void 0)return a}async function ti({fs:e,gitdir:t,author:n,committer:r,commit:i}){let a=Math.floor(Date.now()/1e3),o=$r({},{name:await Qr({fs:e,gitdir:t,path:`user.name`}),email:await Qr({fs:e,gitdir:t,path:`user.email`})||``,timestamp:a,timezoneOffset:new Date(a*1e3).getTimezoneOffset()},i?i.committer:void 0,n,r);if(o.name!==void 0)return o}async function ni({fs:e,cache:t,gitdir:n,oid:r}){let{type:i,object:a}=await Hn({fs:e,cache:t,gitdir:n,oid:r});if(i===`tag`)return r=Tr.from(a).parse().object,ni({fs:e,cache:t,gitdir:n,oid:r});if(i!==`commit`)throw new Ct(r,i,`commit`);return{commit:Or.from(a),oid:r}}async function ri({fs:e,cache:t,gitdir:n,oid:r}){let{commit:i,oid:a}=await ni({fs:e,cache:t,gitdir:n,oid:r});return{oid:a,commit:i.parse(),payload:i.withoutSignature()}}var ii=`4b825dc642cb6eb9a060e54bf8d69288fbee4904`;async function ai({fs:e,cache:t,onSign:n,gitdir:r,message:i,author:a,committer:o,signingKey:s,amend:c=!1,dryRun:l=!1,noUpdateBranch:u=!1,disallowEmpty:d=!1,ref:f,parent:p,tree:m}){let h=!1,g=!1;f||=(g=!(await e.read(`${r}/HEAD`,{encoding:`utf8`})).startsWith(`ref:`),await an.resolve({fs:e,gitdir:r,ref:`HEAD`,depth:2}));let _,v;try{_=await an.resolve({fs:e,gitdir:r,ref:f})}catch(e){if(!(e instanceof St))throw e;h=!0}if(!h&&(c||d)&&(v=await ri({fs:e,gitdir:r,oid:_,cache:t})),c&&h)throw new gr(f);let y=c?await ei({fs:e,gitdir:r,author:a,commit:v.commit}):await ei({fs:e,gitdir:r,author:a});if(!y)throw new ar(`author`);let b=c?await ti({fs:e,gitdir:r,author:y,committer:o,commit:v.commit}):await ti({fs:e,gitdir:r,author:y,committer:o});if(!b)throw new ar(`committer`);return vt.acquire({fs:e,gitdir:r,cache:t,allowUnmerged:!1},async function(a){let o=xt(a.entries.filter(e=>!e.flags.intentToAdd)).get(`.`);if(m||=await oi({fs:e,gitdir:r,inode:o,dryRun:l}),p=p?await Promise.all(p.map(async n=>{let i=await an.resolve({fs:e,gitdir:r,ref:n});for(;await Zr({fs:e,cache:t,gitdir:r,oid:i});){let{type:n,object:a}=await Hn({fs:e,cache:t,gitdir:r,oid:i});if(n===`commit`)break;if(n!==`tag`)throw new Ct(i,n,`commit`);i=Tr.from(a).parse().object}return i})):c?v.commit.parent:_?[_]:[],d&&!c&&(h&&m===ii||!h&&m===v.commit.tree))throw new Xn;if(!i){if(c)i=v.commit.message;else throw new or(`message`)}let x=Or.from({tree:m,parent:p,author:y,committer:b,message:i});s&&(x=await Or.sign(x,n,s));let S=await Jr({fs:e,gitdir:r,type:`commit`,object:x.toObject(),dryRun:l});return!u&&!l&&await an.writeRef({fs:e,gitdir:r,ref:g?`HEAD`:f,value:S}),S})}async function oi({fs:e,gitdir:t,inode:n,dryRun:r}){let i=n.children;for(let n of i)n.type===`tree`&&(n.metadata.mode=`040000`,n.metadata.oid=await oi({fs:e,gitdir:t,inode:n,dryRun:r}));let a=i.map(e=>({mode:e.metadata.mode,path:e.basename,oid:e.metadata.oid,type:e.type}));return await Jr({fs:e,gitdir:t,type:`tree`,object:fn.from(a).toObject(),dryRun:r})}var si=/^refs\/(heads\/|tags\/|remotes\/)?(.*)/;function ci(e){let t=si.exec(e);return t?t[1]===`remotes/`&&e.endsWith(`/HEAD`)?t[2].slice(0,-5):t[2]:e}async function li({fs:e,gitdir:t,fullname:n=!1,test:r=!1}){let i=await an.resolve({fs:e,gitdir:t,ref:`HEAD`,depth:2});if(r)try{await an.resolve({fs:e,gitdir:t,ref:i})}catch(e){if(e instanceof St)return;throw e}if(i.startsWith(`refs/`))return n?i:ci(i)}async function ui({fs:e,onSign:t,dir:n,gitdir:r=It(n,`.git`),message:i,author:a,committer:o,signingKey:s,amend:c=!1,dryRun:l=!1,noUpdateBranch:u=!1,disallowEmpty:d=!1,ref:f,parent:p,tree:m,cache:h={}}){try{zr(`fs`,e),c||zr(`message`,i),s&&zr(`onSign`,t);let n=new Rr(e);return await ai({fs:n,cache:h,onSign:t,gitdir:await Vr({fsp:n,dotgit:r}),message:i,author:a,committer:o,signingKey:s,amend:c,dryRun:l,noUpdateBranch:u,disallowEmpty:d,ref:f,parent:p,tree:m})}catch(e){throw e.caller=`git.commit`,e}}async function di({fs:e,dir:t,gitdir:n=It(t,`.git`),fullname:r=!1,test:i=!1}){try{zr(`fs`,e),zr(`gitdir`,n);let t=new Rr(e);return await li({fs:t,gitdir:await Vr({fsp:t,dotgit:n}),fullname:r,test:i})}catch(e){throw e.caller=`git.currentBranch`,e}}async function fi({fs:e,dir:t,gitdir:n=It(t,`.git`),path:r}){try{zr(`fs`,e),zr(`gitdir`,n),zr(`path`,r);let t=new Rr(e);return await Qr({fs:t,gitdir:await Vr({fsp:t,dotgit:n}),path:r})}catch(e){throw e.caller=`git.getConfig`,e}}async function pi({fs:e,dir:t,gitdir:n=It(t,`.git`),filepath:r}){try{zr(`fs`,e),zr(`dir`,t),zr(`gitdir`,n),zr(`filepath`,r);let i=new Rr(e),a=await Vr({fsp:i,dotgit:n});return Hr.isIgnored({fs:i,dir:t,gitdir:a,filepath:r})}catch(e){throw e.caller=`git.isIgnored`,e}}async function mi({fs:e,dir:t,gitdir:n=It(t,`.git`),ref:r,depth:i}){try{zr(`fs`,e),zr(`gitdir`,n),zr(`ref`,r);let t=new Rr(e),a=await Vr({fsp:t,dotgit:n});return await an.resolve({fs:t,gitdir:a,ref:r,depth:i})}catch(e){throw e.caller=`git.resolveRef`,e}}var hi=a.Buffer;export{hi as Buffer,ui as commit,di as currentBranch,fi as getConfig,pi as isIgnored,mi as resolveRef};
//# sourceMappingURL=git-CKn6-lWj.js.map