@prose-reader/streamer 0.0.35 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see index.js.LICENSE.txt */
|
|
2
|
-
(()=>{var t={766:(t,e)=>{"use strict";e.byteLength=function(t){var e=u(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,o=u(t),a=o[0],s=o[1],c=new i(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),f=0,l=s>0?a-4:a;for(n=0;n<l;n+=4)e=r[t.charCodeAt(n)]<<18|r[t.charCodeAt(n+1)]<<12|r[t.charCodeAt(n+2)]<<6|r[t.charCodeAt(n+3)],c[f++]=e>>16&255,c[f++]=e>>8&255,c[f++]=255&e;return 2===s&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,c[f++]=255&e),1===s&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,c[f++]=e>>8&255,c[f++]=255&e),c},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],a=16383,s=0,u=r-i;s<u;s+=a)o.push(c(t,s,s+a>u?u:s+a));return 1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a<s;++a)n[a]=o[a],r[o.charCodeAt(a)]=a;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t,e,r){for(var i,o,a=[],s=e;s<r;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},834:(t,e,n)=>{"use strict";const r=n(766),i=n(333),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=function(t){return+t!=t&&(t=0),u.alloc(+t)},e.INSPECT_MAX_BYTES=50;const a=2147483647;function s(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return c(t,e,n)}function c(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|g(t,e);let r=s(n);const i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(H(t,Uint8Array)){const e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return h(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(H(t,ArrayBuffer)||t&&H(t.buffer,ArrayBuffer))return p(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(H(t,SharedArrayBuffer)||t&&H(t.buffer,SharedArrayBuffer)))return p(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return u.from(r,e,n);const i=function(t){if(u.isBuffer(t)){const e=0|d(t.length),n=s(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||Q(t.length)?s(0):h(t):"Buffer"===t.type&&Array.isArray(t.data)?h(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return f(t),s(t<0?0:0|d(t))}function h(t){const e=t.length<0?0:0|d(t.length),n=s(e);for(let r=0;r<e;r+=1)n[r]=255&t[r];return n}function p(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Object.setPrototypeOf(r,u.prototype),r}function d(t){if(t>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function g(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||H(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return X(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(t).length;default:if(i)return r?-1:X(t).length;e=(""+e).toLowerCase(),i=!0}}function m(t,e,n){let r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,e,n);case"utf8":case"utf-8":return _(this,e,n);case"ascii":return C(this,e,n);case"latin1":case"binary":return O(this,e,n);case"base64":return I(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function y(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Q(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:b(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):b(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,n,r,i){let o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){let r=-1;for(o=n;o<s;o++)if(c(t,o)===c(e,-1===r?0:o-r)){if(-1===r&&(r=o),o-r+1===u)return r*a}else-1!==r&&(o-=o-r),r=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){let n=!0;for(let r=0;r<u;r++)if(c(t,o+r)!==c(e,r)){n=!1;break}if(n)return o}return-1}function T(t,e,n,r){n=Number(n)||0;const i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;const o=e.length;let a;for(r>o/2&&(r=o/2),a=0;a<r;++a){const r=parseInt(e.substr(2*a,2),16);if(Q(r))return a;t[n+a]=r}return a}function w(t,e,n,r){return z(X(e,t.length-n),t,n,r)}function E(t,e,n,r){return z(function(t){const e=[];for(let n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function N(t,e,n,r){return z(q(e),t,n,r)}function A(t,e,n,r){return z(function(t,e){let n,r,i;const o=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function I(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function _(t,e,n){n=Math.min(t.length,n);const r=[];let i=e;for(;i<n;){const e=t[i];let o=null,a=e>239?4:e>223?3:e>191?2:1;if(i+a<=n){let n,r,s,u;switch(a){case 1:e<128&&(o=e);break;case 2:n=t[i+1],128==(192&n)&&(u=(31&e)<<6|63&n,u>127&&(o=u));break;case 3:n=t[i+1],r=t[i+2],128==(192&n)&&128==(192&r)&&(u=(15&e)<<12|(63&n)<<6|63&r,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:n=t[i+1],r=t[i+2],s=t[i+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(u=(15&e)<<18|(63&n)<<12|(63&r)<<6|63&s,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(t){const e=t.length;if(e<=B)return String.fromCharCode.apply(String,t);let n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=B));return n}(r)}e.kMaxLength=a,u.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||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."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,n){return c(t,e,n)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,n){return function(t,e,n){return f(t),t<=0?s(t):void 0!==e?"string"==typeof n?s(t).fill(e,n):s(t).fill(e):s(t)}(t,e,n)},u.allocUnsafe=function(t){return l(t)},u.allocUnsafeSlow=function(t){return l(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(H(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),H(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,r=e.length;for(let i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(t){switch(String(t).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}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);let n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;const r=u.allocUnsafe(e);let i=0;for(n=0;n<t.length;++n){let e=t[n];if(H(e,Uint8Array))i+e.length>r.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(r,i)):Uint8Array.prototype.set.call(r,e,i);else{if(!u.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(r,i)}i+=e.length}return r},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)y(this,e,e+1);return this},u.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},u.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},u.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?_(this,0,t):m.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){let t="";const n=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,n,r,i){if(H(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;let o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0);const s=Math.min(o,a),c=this.slice(r,i),f=t.slice(e,n);for(let t=0;t<s;++t)if(c[t]!==f[t]){o=c[t],a=f[t];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return v(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return v(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return T(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":case"latin1":case"binary":return E(this,t,e,n);case"base64":return N(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const B=4096;function C(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function O(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function x(t,e,n){const r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=e;r<n;++r)i+=Z[t[r]];return i}function S(t,e,n){const r=t.slice(e,n);let i="";for(let t=0;t<r.length-1;t+=2)i+=String.fromCharCode(r[t]+256*r[t+1]);return i}function U(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function D(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function P(t,e,n,r,i){k(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,n}function R(t,e,n,r,i){k(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n+7]=o,o>>=8,t[n+6]=o,o>>=8,t[n+5]=o,o>>=8,t[n+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=a,a>>=8,t[n+2]=a,a>>=8,t[n+1]=a,a>>=8,t[n]=a,n+8}function L(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(t,e,n,r,o){return e=+e,n>>>=0,o||L(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function M(t,e,n,r,o){return e=+e,n>>>=0,o||L(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);const r=this.subarray(t,e);return Object.setPrototypeOf(r,u.prototype),r},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||U(t,e,this.length);let r=this[t],i=1,o=0;for(;++o<e&&(i*=256);)r+=this[t+o]*i;return r},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||U(t,e,this.length);let r=this[t+--e],i=1;for(;e>0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||U(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||U(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||U(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=J((function(t){W(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=J((function(t){W(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||U(t,e,this.length);let r=this[t],i=1,o=0;for(;++o<e&&(i*=256);)r+=this[t+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||U(t,e,this.length);let r=e,i=1,o=this[t+--r];for(;r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||U(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||U(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){t>>>=0,e||U(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=J((function(t){W(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),u.prototype.readBigInt64BE=J((function(t){W(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+n)})),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||U(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||U(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||U(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||U(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||D(this,t,e,n,Math.pow(2,8*n)-1,0);let i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||D(this,t,e,n,Math.pow(2,8*n)-1,0);let i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=J((function(t,e=0){return P(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=J((function(t,e=0){return R(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);D(this,t,e,n,r-1,-r)}let i=0,o=1,a=0;for(this[e]=255&t;++i<n&&(o*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/o>>0)-a&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);D(this,t,e,n,r-1,-r)}let i=n-1,o=1,a=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o>>0)-a&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=J((function(t,e=0){return P(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=J((function(t,e=0){return R(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(t,e,n){return F(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return F(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return M(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return M(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);const i=r-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e),i},u.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){const e=t.charCodeAt(0);("utf8"===r&&e<128||"latin1"===r)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;let i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{const o=u.isBuffer(t)?t:u.from(t,r),a=o.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<n-e;++i)this[i+e]=o[i%a]}return this};const $={};function j(t,e,n){$[t]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function G(t){let e="",n=t.length;const r="-"===t[0]?1:0;for(;n>=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function k(t,e,n,r,i,o){if(t>n||t<e){const r="bigint"==typeof e?"n":"";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${e}${r} and <= ${n}${r}`,new $.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,n){W(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||V(e,t.length-(n+1))}(r,i,o)}function W(t,e){if("number"!=typeof t)throw new $.ERR_INVALID_ARG_TYPE(e,"number",t)}function V(t,e,n){if(Math.floor(t)!==t)throw W(t,n),new $.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new $.ERR_BUFFER_OUT_OF_BOUNDS;throw new $.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),j("ERR_OUT_OF_RANGE",(function(t,e,n){let r=`The value of "${t}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=G(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=G(i)),i+="n"),r+=` It must be ${e}. Received ${i}`,r}),RangeError);const Y=/[^+/0-9A-Za-z-_]/g;function X(t,e){let n;e=e||1/0;const r=t.length;let i=null;const o=[];for(let a=0;a<r;++a){if(n=t.charCodeAt(a),n>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(Y,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,n,r){let i;for(i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function H(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Q(t){return t!=t}const Z=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)e[r+i]=t[n]+t[i]}return e}();function J(t){return"undefined"==typeof BigInt?K:t}function K(){throw new Error("BigInt not supported")}},333:(t,e)=>{e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,f=-7,l=n?i-1:0,h=n?-1:1,p=t[e+l];for(l+=h,o=p&(1<<-f)-1,p>>=-f,f+=s;f>0;o=256*o+t[e+l],l+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=r;f>0;a=256*a+t[e+l],l+=h,f-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,r),o-=c}return(p?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,c=8*o-i-1,f=(1<<c)-1,l=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,d=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+l>=1?h/u:h*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(e*u-1)*Math.pow(2,i),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,i),a=0));i>=8;t[n+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[n+p]=255&a,p+=d,a/=256,c-=8);t[n+p-d]|=128*g}},480:(t,e,n)=>{!function(t){t.parser=function(t,e){return new i(t,e)},t.SAXParser=i,t.SAXStream=a,t.createStream=function(t,e){return new a(t,e)},t.MAX_BUFFER_LENGTH=65536;var e,r=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function i(e,n){if(!(this instanceof i))return new i(e,n);var o=this;!function(t){for(var e=0,n=r.length;e<n;e++)t[r[e]]=""}(o),o.q=o.c="",o.bufferCheckPosition=t.MAX_BUFFER_LENGTH,o.opt=n||{},o.opt.lowercase=o.opt.lowercase||o.opt.lowercasetags,o.looseCase=o.opt.lowercase?"toLowerCase":"toUpperCase",o.tags=[],o.closed=o.closedRoot=o.sawRoot=!1,o.tag=o.error=null,o.strict=!!e,o.noscript=!(!e&&!o.opt.noscript),o.state=E.BEGIN,o.strictEntities=o.opt.strictEntities,o.ENTITIES=o.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),o.attribList=[],o.opt.xmlns&&(o.ns=Object.create(c)),o.trackPosition=!1!==o.opt.position,o.trackPosition&&(o.position=o.line=o.column=0),A(o,"onready")}t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(t){function e(){}return e.prototype=t,new e}),Object.keys||(Object.keys=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}),i.prototype={end:function(){O(this)},write:function(e){var n=this;if(this.error)throw this.error;if(n.closed)return C(n,"Cannot write after close. Assign an onready handler.");if(null===e)return O(n);"object"==typeof e&&(e=e.toString());for(var i=0,o="";o=M(e,i++),n.c=o,o;)switch(n.trackPosition&&(n.position++,"\n"===o?(n.line++,n.column=0):n.column++),n.state){case E.BEGIN:if(n.state=E.BEGIN_WHITESPACE,"\ufeff"===o)continue;F(n,o);continue;case E.BEGIN_WHITESPACE:F(n,o);continue;case E.TEXT:if(n.sawRoot&&!n.closedRoot){for(var a=i-1;o&&"<"!==o&&"&"!==o;)(o=M(e,i++))&&n.trackPosition&&(n.position++,"\n"===o?(n.line++,n.column=0):n.column++);n.textNode+=e.substring(a,i-1)}"<"!==o||n.sawRoot&&n.closedRoot&&!n.strict?(d(o)||n.sawRoot&&!n.closedRoot||x(n,"Text data outside of root node."),"&"===o?n.state=E.TEXT_ENTITY:n.textNode+=o):(n.state=E.OPEN_WAKA,n.startTagPosition=n.position);continue;case E.SCRIPT:"<"===o?n.state=E.SCRIPT_ENDING:n.script+=o;continue;case E.SCRIPT_ENDING:"/"===o?n.state=E.CLOSE_TAG:(n.script+="<"+o,n.state=E.SCRIPT);continue;case E.OPEN_WAKA:if("!"===o)n.state=E.SGML_DECL,n.sgmlDecl="";else if(d(o));else if(y(f,o))n.state=E.OPEN_TAG,n.tagName=o;else if("/"===o)n.state=E.CLOSE_TAG,n.tagName="";else if("?"===o)n.state=E.PROC_INST,n.procInstName=n.procInstBody="";else{if(x(n,"Unencoded <"),n.startTagPosition+1<n.position){var s=n.position-n.startTagPosition;o=new Array(s).join(" ")+o}n.textNode+="<"+o,n.state=E.TEXT}continue;case E.SGML_DECL:"[CDATA["===(n.sgmlDecl+o).toUpperCase()?(I(n,"onopencdata"),n.state=E.CDATA,n.sgmlDecl="",n.cdata=""):n.sgmlDecl+o==="--"?(n.state=E.COMMENT,n.comment="",n.sgmlDecl=""):"DOCTYPE"===(n.sgmlDecl+o).toUpperCase()?(n.state=E.DOCTYPE,(n.doctype||n.sawRoot)&&x(n,"Inappropriately located doctype declaration"),n.doctype="",n.sgmlDecl=""):">"===o?(I(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=E.TEXT):g(o)?(n.state=E.SGML_DECL_QUOTED,n.sgmlDecl+=o):n.sgmlDecl+=o;continue;case E.SGML_DECL_QUOTED:o===n.q&&(n.state=E.SGML_DECL,n.q=""),n.sgmlDecl+=o;continue;case E.DOCTYPE:">"===o?(n.state=E.TEXT,I(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=o,"["===o?n.state=E.DOCTYPE_DTD:g(o)&&(n.state=E.DOCTYPE_QUOTED,n.q=o));continue;case E.DOCTYPE_QUOTED:n.doctype+=o,o===n.q&&(n.q="",n.state=E.DOCTYPE);continue;case E.DOCTYPE_DTD:n.doctype+=o,"]"===o?n.state=E.DOCTYPE:g(o)&&(n.state=E.DOCTYPE_DTD_QUOTED,n.q=o);continue;case E.DOCTYPE_DTD_QUOTED:n.doctype+=o,o===n.q&&(n.state=E.DOCTYPE_DTD,n.q="");continue;case E.COMMENT:"-"===o?n.state=E.COMMENT_ENDING:n.comment+=o;continue;case E.COMMENT_ENDING:"-"===o?(n.state=E.COMMENT_ENDED,n.comment=B(n.opt,n.comment),n.comment&&I(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+o,n.state=E.COMMENT);continue;case E.COMMENT_ENDED:">"!==o?(x(n,"Malformed comment"),n.comment+="--"+o,n.state=E.COMMENT):n.state=E.TEXT;continue;case E.CDATA:"]"===o?n.state=E.CDATA_ENDING:n.cdata+=o;continue;case E.CDATA_ENDING:"]"===o?n.state=E.CDATA_ENDING_2:(n.cdata+="]"+o,n.state=E.CDATA);continue;case E.CDATA_ENDING_2:">"===o?(n.cdata&&I(n,"oncdata",n.cdata),I(n,"onclosecdata"),n.cdata="",n.state=E.TEXT):"]"===o?n.cdata+="]":(n.cdata+="]]"+o,n.state=E.CDATA);continue;case E.PROC_INST:"?"===o?n.state=E.PROC_INST_ENDING:d(o)?n.state=E.PROC_INST_BODY:n.procInstName+=o;continue;case E.PROC_INST_BODY:if(!n.procInstBody&&d(o))continue;"?"===o?n.state=E.PROC_INST_ENDING:n.procInstBody+=o;continue;case E.PROC_INST_ENDING:">"===o?(I(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=E.TEXT):(n.procInstBody+="?"+o,n.state=E.PROC_INST_BODY);continue;case E.OPEN_TAG:y(l,o)?n.tagName+=o:(S(n),">"===o?P(n):"/"===o?n.state=E.OPEN_TAG_SLASH:(d(o)||x(n,"Invalid character in tag name"),n.state=E.ATTRIB));continue;case E.OPEN_TAG_SLASH:">"===o?(P(n,!0),R(n)):(x(n,"Forward-slash in opening tag not followed by >"),n.state=E.ATTRIB);continue;case E.ATTRIB:if(d(o))continue;">"===o?P(n):"/"===o?n.state=E.OPEN_TAG_SLASH:y(f,o)?(n.attribName=o,n.attribValue="",n.state=E.ATTRIB_NAME):x(n,"Invalid attribute name");continue;case E.ATTRIB_NAME:"="===o?n.state=E.ATTRIB_VALUE:">"===o?(x(n,"Attribute without value"),n.attribValue=n.attribName,D(n),P(n)):d(o)?n.state=E.ATTRIB_NAME_SAW_WHITE:y(l,o)?n.attribName+=o:x(n,"Invalid attribute name");continue;case E.ATTRIB_NAME_SAW_WHITE:if("="===o)n.state=E.ATTRIB_VALUE;else{if(d(o))continue;x(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",I(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",">"===o?P(n):y(f,o)?(n.attribName=o,n.state=E.ATTRIB_NAME):(x(n,"Invalid attribute name"),n.state=E.ATTRIB)}continue;case E.ATTRIB_VALUE:if(d(o))continue;g(o)?(n.q=o,n.state=E.ATTRIB_VALUE_QUOTED):(x(n,"Unquoted attribute value"),n.state=E.ATTRIB_VALUE_UNQUOTED,n.attribValue=o);continue;case E.ATTRIB_VALUE_QUOTED:if(o!==n.q){"&"===o?n.state=E.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=o;continue}D(n),n.q="",n.state=E.ATTRIB_VALUE_CLOSED;continue;case E.ATTRIB_VALUE_CLOSED:d(o)?n.state=E.ATTRIB:">"===o?P(n):"/"===o?n.state=E.OPEN_TAG_SLASH:y(f,o)?(x(n,"No whitespace between attributes"),n.attribName=o,n.attribValue="",n.state=E.ATTRIB_NAME):x(n,"Invalid attribute name");continue;case E.ATTRIB_VALUE_UNQUOTED:if(!m(o)){"&"===o?n.state=E.ATTRIB_VALUE_ENTITY_U:n.attribValue+=o;continue}D(n),">"===o?P(n):n.state=E.ATTRIB;continue;case E.CLOSE_TAG:if(n.tagName)">"===o?R(n):y(l,o)?n.tagName+=o:n.script?(n.script+="</"+n.tagName,n.tagName="",n.state=E.SCRIPT):(d(o)||x(n,"Invalid tagname in closing tag"),n.state=E.CLOSE_TAG_SAW_WHITE);else{if(d(o))continue;v(f,o)?n.script?(n.script+="</"+o,n.state=E.SCRIPT):x(n,"Invalid tagname in closing tag."):n.tagName=o}continue;case E.CLOSE_TAG_SAW_WHITE:if(d(o))continue;">"===o?R(n):x(n,"Invalid characters in closing tag");continue;case E.TEXT_ENTITY:case E.ATTRIB_VALUE_ENTITY_Q:case E.ATTRIB_VALUE_ENTITY_U:var u,c;switch(n.state){case E.TEXT_ENTITY:u=E.TEXT,c="textNode";break;case E.ATTRIB_VALUE_ENTITY_Q:u=E.ATTRIB_VALUE_QUOTED,c="attribValue";break;case E.ATTRIB_VALUE_ENTITY_U:u=E.ATTRIB_VALUE_UNQUOTED,c="attribValue"}";"===o?(n[c]+=L(n),n.entity="",n.state=u):y(n.entity.length?p:h,o)?n.entity+=o:(x(n,"Invalid character in entity name"),n[c]+="&"+n.entity+o,n.entity="",n.state=u);continue;default:throw new Error(n,"Unknown state: "+n.state)}return n.position>=n.bufferCheckPosition&&function(e){for(var n=Math.max(t.MAX_BUFFER_LENGTH,10),i=0,o=0,a=r.length;o<a;o++){var s=e[r[o]].length;if(s>n)switch(r[o]){case"textNode":_(e);break;case"cdata":I(e,"oncdata",e.cdata),e.cdata="";break;case"script":I(e,"onscript",e.script),e.script="";break;default:C(e,"Max buffer length exceeded: "+r[o])}i=Math.max(i,s)}var u=t.MAX_BUFFER_LENGTH-i;e.bufferCheckPosition=u+e.position}(n),n},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var t;_(t=this),""!==t.cdata&&(I(t,"oncdata",t.cdata),t.cdata=""),""!==t.script&&(I(t,"onscript",t.script),t.script="")}};try{e=n(761).F}catch(t){e=function(){}}var o=t.EVENTS.filter((function(t){return"error"!==t&&"end"!==t}));function a(t,n){if(!(this instanceof a))return new a(t,n);e.apply(this),this._parser=new i(t,n),this.writable=!0,this.readable=!0;var r=this;this._parser.onend=function(){r.emit("end")},this._parser.onerror=function(t){r.emit("error",t),r._parser.error=null},this._decoder=null,o.forEach((function(t){Object.defineProperty(r,"on"+t,{get:function(){return r._parser["on"+t]},set:function(e){if(!e)return r.removeAllListeners(t),r._parser["on"+t]=e,e;r.on(t,e)},enumerable:!0,configurable:!1})}))}a.prototype=Object.create(e.prototype,{constructor:{value:a}}),a.prototype.write=function(t){if("function"==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(t)){if(!this._decoder){var e=n(214).s;this._decoder=new e("utf8")}t=this._decoder.write(t)}return this._parser.write(t.toString()),this.emit("data",t),!0},a.prototype.end=function(t){return t&&t.length&&this.write(t),this._parser.end(),!0},a.prototype.on=function(t,n){var r=this;return r._parser["on"+t]||-1===o.indexOf(t)||(r._parser["on"+t]=function(){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t),r.emit.apply(r,e)}),e.prototype.on.call(r,t,n)};var s="http://www.w3.org/XML/1998/namespace",u="http://www.w3.org/2000/xmlns/",c={xml:s,xmlns:u},f=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,l=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,h=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,p=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function d(t){return" "===t||"\n"===t||"\r"===t||"\t"===t}function g(t){return'"'===t||"'"===t}function m(t){return">"===t||d(t)}function y(t,e){return t.test(e)}function v(t,e){return!y(t,e)}var b,T,w,E=0;for(var N in t.STATE={BEGIN:E++,BEGIN_WHITESPACE:E++,TEXT:E++,TEXT_ENTITY:E++,OPEN_WAKA:E++,SGML_DECL:E++,SGML_DECL_QUOTED:E++,DOCTYPE:E++,DOCTYPE_QUOTED:E++,DOCTYPE_DTD:E++,DOCTYPE_DTD_QUOTED:E++,COMMENT_STARTING:E++,COMMENT:E++,COMMENT_ENDING:E++,COMMENT_ENDED:E++,CDATA:E++,CDATA_ENDING:E++,CDATA_ENDING_2:E++,PROC_INST:E++,PROC_INST_BODY:E++,PROC_INST_ENDING:E++,OPEN_TAG:E++,OPEN_TAG_SLASH:E++,ATTRIB:E++,ATTRIB_NAME:E++,ATTRIB_NAME_SAW_WHITE:E++,ATTRIB_VALUE:E++,ATTRIB_VALUE_QUOTED:E++,ATTRIB_VALUE_CLOSED:E++,ATTRIB_VALUE_UNQUOTED:E++,ATTRIB_VALUE_ENTITY_Q:E++,ATTRIB_VALUE_ENTITY_U:E++,CLOSE_TAG:E++,CLOSE_TAG_SAW_WHITE:E++,SCRIPT:E++,SCRIPT_ENDING:E++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach((function(e){var n=t.ENTITIES[e],r="number"==typeof n?String.fromCharCode(n):n;t.ENTITIES[e]=r})),t.STATE)t.STATE[t.STATE[N]]=N;function A(t,e,n){t[e]&&t[e](n)}function I(t,e,n){t.textNode&&_(t),A(t,e,n)}function _(t){t.textNode=B(t.opt,t.textNode),t.textNode&&A(t,"ontext",t.textNode),t.textNode=""}function B(t,e){return t.trim&&(e=e.trim()),t.normalize&&(e=e.replace(/\s+/g," ")),e}function C(t,e){return _(t),t.trackPosition&&(e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c),e=new Error(e),t.error=e,A(t,"onerror",e),t}function O(t){return t.sawRoot&&!t.closedRoot&&x(t,"Unclosed root tag"),t.state!==E.BEGIN&&t.state!==E.BEGIN_WHITESPACE&&t.state!==E.TEXT&&C(t,"Unexpected end"),_(t),t.c="",t.closed=!0,A(t,"onend"),i.call(t,t.strict,t.opt),t}function x(t,e){if("object"!=typeof t||!(t instanceof i))throw new Error("bad call to strictFail");t.strict&&C(t,e)}function S(t){t.strict||(t.tagName=t.tagName[t.looseCase]());var e=t.tags[t.tags.length-1]||t,n=t.tag={name:t.tagName,attributes:{}};t.opt.xmlns&&(n.ns=e.ns),t.attribList.length=0,I(t,"onopentagstart",n)}function U(t,e){var n=t.indexOf(":")<0?["",t]:t.split(":"),r=n[0],i=n[1];return e&&"xmlns"===t&&(r="xmlns",i=""),{prefix:r,local:i}}function D(t){if(t.strict||(t.attribName=t.attribName[t.looseCase]()),-1!==t.attribList.indexOf(t.attribName)||t.tag.attributes.hasOwnProperty(t.attribName))t.attribName=t.attribValue="";else{if(t.opt.xmlns){var e=U(t.attribName,!0),n=e.prefix,r=e.local;if("xmlns"===n)if("xml"===r&&t.attribValue!==s)x(t,"xml: prefix must be bound to "+s+"\nActual: "+t.attribValue);else if("xmlns"===r&&t.attribValue!==u)x(t,"xmlns: prefix must be bound to "+u+"\nActual: "+t.attribValue);else{var i=t.tag,o=t.tags[t.tags.length-1]||t;i.ns===o.ns&&(i.ns=Object.create(o.ns)),i.ns[r]=t.attribValue}t.attribList.push([t.attribName,t.attribValue])}else t.tag.attributes[t.attribName]=t.attribValue,I(t,"onattribute",{name:t.attribName,value:t.attribValue});t.attribName=t.attribValue=""}}function P(t,e){if(t.opt.xmlns){var n=t.tag,r=U(t.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(x(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),n.uri=r.prefix);var i=t.tags[t.tags.length-1]||t;n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach((function(e){I(t,"onopennamespace",{prefix:e,uri:n.ns[e]})}));for(var o=0,a=t.attribList.length;o<a;o++){var s=t.attribList[o],u=s[0],c=s[1],f=U(u,!0),l=f.prefix,h=f.local,p=""===l?"":n.ns[l]||"",d={name:u,value:c,prefix:l,local:h,uri:p};l&&"xmlns"!==l&&!p&&(x(t,"Unbound namespace prefix: "+JSON.stringify(l)),d.uri=l),t.tag.attributes[u]=d,I(t,"onattribute",d)}t.attribList.length=0}t.tag.isSelfClosing=!!e,t.sawRoot=!0,t.tags.push(t.tag),I(t,"onopentag",t.tag),e||(t.noscript||"script"!==t.tagName.toLowerCase()?t.state=E.TEXT:t.state=E.SCRIPT,t.tag=null,t.tagName=""),t.attribName=t.attribValue="",t.attribList.length=0}function R(t){if(!t.tagName)return x(t,"Weird empty close tag."),t.textNode+="</>",void(t.state=E.TEXT);if(t.script){if("script"!==t.tagName)return t.script+="</"+t.tagName+">",t.tagName="",void(t.state=E.SCRIPT);I(t,"onscript",t.script),t.script=""}var e=t.tags.length,n=t.tagName;t.strict||(n=n[t.looseCase]());for(var r=n;e--&&t.tags[e].name!==r;)x(t,"Unexpected close tag");if(e<0)return x(t,"Unmatched closing tag: "+t.tagName),t.textNode+="</"+t.tagName+">",void(t.state=E.TEXT);t.tagName=n;for(var i=t.tags.length;i-- >e;){var o=t.tag=t.tags.pop();t.tagName=t.tag.name,I(t,"onclosetag",t.tagName);var a={};for(var s in o.ns)a[s]=o.ns[s];var u=t.tags[t.tags.length-1]||t;t.opt.xmlns&&o.ns!==u.ns&&Object.keys(o.ns).forEach((function(e){var n=o.ns[e];I(t,"onclosenamespace",{prefix:e,uri:n})}))}0===e&&(t.closedRoot=!0),t.tagName=t.attribValue=t.attribName="",t.attribList.length=0,t.state=E.TEXT}function L(t){var e,n=t.entity,r=n.toLowerCase(),i="";return t.ENTITIES[n]?t.ENTITIES[n]:t.ENTITIES[r]?t.ENTITIES[r]:("#"===(n=r).charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),i=(e=parseInt(n,16)).toString(16)):(n=n.slice(1),i=(e=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),isNaN(e)||i.toLowerCase()!==n?(x(t,"Invalid character entity"),"&"+t.entity+";"):String.fromCodePoint(e))}function F(t,e){"<"===e?(t.state=E.OPEN_WAKA,t.startTagPosition=t.position):d(e)||(x(t,"Non-whitespace before first tag."),t.textNode=e,t.state=E.TEXT)}function M(t,e){var n="";return e<t.length&&(n=t.charAt(e)),n}E=t.STATE,String.fromCodePoint||(b=String.fromCharCode,T=Math.floor,w=function(){var t,e,n=16384,r=[],i=-1,o=arguments.length;if(!o)return"";for(var a="";++i<o;){var s=Number(arguments[i]);if(!isFinite(s)||s<0||s>1114111||T(s)!==s)throw RangeError("Invalid code point: "+s);s<=65535?r.push(s):(t=55296+((s-=65536)>>10),e=s%1024+56320,r.push(t,e)),(i+1===o||r.length>n)&&(a+=b.apply(null,r),r.length=0)}return a},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:w,configurable:!0,writable:!0}):String.fromCodePoint=w)}(e)},214:(t,e,n)=>{"use strict";var r=n(805).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=f,this.end=l,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function f(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.s=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=a(e[r]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--r<n||-2===i?0:(i=a(e[r]))>=0?(i>0&&(t.lastNeed=i-2),i):--r<n||-2===i?0:(i=a(e[r]))>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},805:(t,e,n)=>{var r=n(834),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=a),o(i,a),a.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},a.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},668:(t,e,n)=>{t.exports=n(983)},983:(t,e,n)=>{!function(){var e;if(t.exports&&!n.g.xmldocAssumeBrowser)e=n(480);else if(!(e=this.sax))throw new Error("Expected sax to be defined. Make sure you're including sax.js before this file.");function r(t){var e=u[u.length-1].parser;this.name=t.name,this.attr=t.attributes,this.val="",this.children=[],this.firstChild=null,this.lastChild=null,this.line=e.line,this.column=e.column,this.position=e.position,this.startTagPosition=e.startTagPosition}function i(t){this.text=t}function o(t){this.cdata=t}function a(t){this.comment=t}function s(t){if(t&&(t=t.toString().trim()),!t)throw new Error("No XML to parse!");var n;this.doctype="",this.parser=e.parser(!0),(n=this.parser).onopentag=c,n.onclosetag=f,n.ontext=l,n.oncdata=h,n.oncomment=p,n.ondoctype=d,n.onerror=g,u=[this],this.parser.write(t),delete this.parser}r.prototype._addChild=function(t){this.children.push(t),this.firstChild||(this.firstChild=t),this.lastChild=t},r.prototype._opentag=function(t){var e=new r(t);this._addChild(e),u.unshift(e)},r.prototype._closetag=function(){u.shift()},r.prototype._text=function(t){void 0!==this.children&&(this.val+=t,this._addChild(new i(t)))},r.prototype._cdata=function(t){this.val+=t,this._addChild(new o(t))},r.prototype._comment=function(t){void 0!==this.children&&this._addChild(new a(t))},r.prototype._error=function(t){throw t},r.prototype.eachChild=function(t,e){for(var n=0,r=this.children.length;n<r;n++)if("element"===this.children[n].type&&!1===t.call(e,this.children[n],n,this.children))return},r.prototype.childNamed=function(t){for(var e=0,n=this.children.length;e<n;e++){var r=this.children[e];if(r.name===t)return r}},r.prototype.childrenNamed=function(t){for(var e=[],n=0,r=this.children.length;n<r;n++)this.children[n].name===t&&e.push(this.children[n]);return e},r.prototype.childWithAttribute=function(t,e){for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n];if("element"===i.type&&(e&&i.attr[t]===e||!e&&i.attr[t]))return i}},r.prototype.descendantWithPath=function(t){for(var e=this,n=t.split("."),r=0,i=n.length;r<i;r++){if(!e||"element"!==e.type)return;e=e.childNamed(n[r])}return e},r.prototype.valueWithPath=function(t){var e=t.split("@"),n=this.descendantWithPath(e[0]);return n?e.length>1?n.attr[e[1]]:n.val:void 0},r.prototype.toString=function(t){return this.toStringWithIndent("",t)},r.prototype.toStringWithIndent=function(t,e){var n=t+"<"+this.name,r=e&&e.compressed?"":"\n";for(var i in e&&e.preserveWhitespace,this.attr)Object.prototype.hasOwnProperty.call(this.attr,i)&&(n+=" "+i+'="'+m(this.attr[i])+'"');if(1===this.children.length&&"element"!==this.children[0].type)n+=">"+this.children[0].toString(e)+"</"+this.name+">";else if(this.children.length){n+=">"+r;for(var o=t+(e&&e.compressed?"":" "),a=0,s=this.children.length;a<s;a++)n+=this.children[a].toStringWithIndent(o,e)+r;n+=t+"</"+this.name+">"}else e&&e.html?-1!==["area","base","br","col","embed","frame","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"].indexOf(this.name)?n+="/>":n+="></"+this.name+">":n+="/>";return n},i.prototype.toString=function(t){return y(m(this.text),t)},i.prototype.toStringWithIndent=function(t,e){return t+this.toString(e)},o.prototype.toString=function(t){return"<![CDATA["+y(this.cdata,t)+"]]>"},o.prototype.toStringWithIndent=function(t,e){return t+this.toString(e)},a.prototype.toString=function(t){return"\x3c!--"+y(m(this.comment),t)+"--\x3e"},a.prototype.toStringWithIndent=function(t,e){return t+this.toString(e)},r.prototype.type="element",i.prototype.type="text",o.prototype.type="cdata",a.prototype.type="comment",function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}(s.prototype,r.prototype),s.prototype._opentag=function(t){void 0===this.children?r.call(this,t):r.prototype._opentag.apply(this,arguments)},s.prototype._doctype=function(t){this.doctype+=t};var u=null;function c(){u[0]&&u[0]._opentag.apply(u[0],arguments)}function f(){u[0]&&u[0]._closetag.apply(u[0],arguments)}function l(){u[0]&&u[0]._text.apply(u[0],arguments)}function h(){u[0]&&u[0]._cdata.apply(u[0],arguments)}function p(){u[0]&&u[0]._comment.apply(u[0],arguments)}function d(){u[0]&&u[0]._doctype.apply(u[0],arguments)}function g(){u[0]&&u[0]._error.apply(u[0],arguments)}function m(t){return t.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""")}function y(t,e){var n=t;return e&&e.trimmed&&t.length>25&&(n=n.substring(0,25).trim()+"…"),e&&e.preserveWhitespace||(n=n.trim()),n}t.exports&&!n.g.xmldocAssumeBrowser?t.exports.XmlDocument=s:this.XmlDocument=s}()},761:(t,e,n)=>{"use strict";n.d(e,{F:()=>r});const r=function(){}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{Report:()=>c,createArchiveFromArrayBufferList:()=>S,createArchiveFromJszip:()=>O,createArchiveFromText:()=>B,createArchiveFromUrls:()=>I,getArchiveOpfInfo:()=>f,getManifestFromArchive:()=>w,getResourceFromArchive:()=>d,xmldoc:()=>e()});var t=n(668),e=n.n(t),i=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))};const o=(t,{opfBasePath:e,baseUrl:n})=>{const r={contents:[],path:"",href:"",title:""};let i=t.childNamed("span")||t.childNamed("a");r.title=(null==i?void 0:i.attr.title)||(null==i?void 0:i.val.trim())||r.title;let a=null==i?void 0:i.name;"a"!==a&&(i=t.descendantWithPath(`${a}.a`),i&&(a=i.name.toLowerCase())),"a"===a&&(null==i?void 0:i.attr.href)&&(r.path=e?`${e}/${i.attr.href}`:`${i.attr.href}`,r.href=e?`${n}/${e}/${i.attr.href}`:`${n}/${i.attr.href}`);const s=t.childNamed("ol");if(s){const t=s.childrenNamed("li");t&&t.length>0&&(r.contents=t.map((t=>o(t,{opfBasePath:e,baseUrl:n}))))}return r},a=(t,{opfBasePath:e,baseUrl:n,prefix:r})=>{var i,o;const s=(null===(i=null==t?void 0:t.childNamed(`${r}content`))||void 0===i?void 0:i.attr.src)||"",u={title:(null===(o=null==t?void 0:t.descendantWithPath(`${r}navLabel.${r}text`))||void 0===o?void 0:o.val)||"",path:e?`${e}/${s}`:`${s}`,href:e?`${n}/${e}/${s}`:`${n}/${s}`,contents:[]},c=t.childrenNamed(`${r}navPoint`);return c&&c.length>0&&(u.contents=c.map((t=>a(t,{opfBasePath:e,baseUrl:n,prefix:r})))),u};var s=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))};let u=!1;const c={enable:t=>{u=t},log:(...t)=>{u&&console.log("[prose-reader-streamer]",...t)},warn:(...t)=>{u&&console.warn("[prose-reader-streamer]",...t)},error:(...t)=>{console.error(...t)},time:t=>{u&&console.time(`[prose-reader-streamer] [metric] ${t}`)},timeEnd:t=>{u&&console.timeEnd(`[prose-reader-streamer] [metric] ${t}`)},metric:(t,e=1/0)=>{const n="number"==typeof t?t:t.duration;u&&(t.duration<=e?console.log("[prose-reader-streamer] [metric] ",`${t.name} took ${n}ms`):console.warn("[prose-reader-streamer] [metric] ",`${t.name} took ${t.duration}ms which is above the ${e}ms target for this function`))},measurePerformance:(t,e=10,n)=>(...r)=>{const i=performance.now(),o=n(...r);if(o&&o.then)return o.then((n=>{const r=performance.now();return c.metric({name:t,duration:r-i},e),n}));const a=performance.now();return c.metric({name:t,duration:a-i},e),o}},f=t=>{const e=Object.values(t.files).filter((t=>!t.dir)),n=e.find((t=>t.uri.endsWith(".opf")));return{data:n,basePath:(null==n?void 0:n.uri.substring(0,n.uri.lastIndexOf("/")))||""}};const l=t=>{var e;const n=t.childNamed("manifest");return(null===(e=null==n?void 0:n.childrenNamed("item"))||void 0===e?void 0:e.map((t=>({href:t.attr.href||"",id:t.attr.id||"",mediaType:t.attr["media-type"]}))))||[]},h=({archive:t,baseUrl:n})=>r=>{return u=void 0,h=void 0,d=function*(){var u;const{data:h,basePath:p}=f(t)||{},d=yield(t=>s(void 0,void 0,void 0,(function*(){const n={renditionLayout:void 0};return yield Promise.all(t.files.map((t=>s(void 0,void 0,void 0,(function*(){var r,i;if(t.uri.endsWith("com.kobobooks.display-options.xml")){const o=null===(r=new(e().XmlDocument)(yield t.string()).childNamed("platform"))||void 0===r?void 0:r.childNamed("option");"fixed-layout"===(null===(i=null==o?void 0:o.attr)||void 0===i?void 0:i.name)&&"true"===o.val&&(n.renditionLayout="pre-paginated")}}))))),n})))(t);if(!h)return r;const g=yield h.string();c.log(g,d);const m=new(e().XmlDocument)(g),y=(yield((t,n,{baseUrl:r})=>i(void 0,void 0,void 0,(function*(){const{basePath:s}=f(n)||{};return(yield(({opfData:t,opfBasePath:n,baseUrl:r,archive:o})=>i(void 0,void 0,void 0,(function*(){var i;const s=t.childNamed("spine"),u=s&&s.attr.toc;if(u){const s=null===(i=t.childNamed("manifest"))||void 0===i?void 0:i.childrenNamed("item").find((t=>t.attr.id===u));if(s){const t=`${n}${""===n?"":"/"}${s.attr.href}`,i=Object.values(o.files).find((e=>e.uri.endsWith(t)));if(i)return((t,{opfBasePath:e,baseUrl:n})=>{var r;const i=[],o=t.name;let s="";return-1!==o.indexOf(":")&&(s=o.split(":")[0]+":"),null===(r=t.childNamed(`${s}navMap`))||void 0===r||r.childrenNamed(`${s}navPoint`).forEach((t=>i.push(a(t,{opfBasePath:e,baseUrl:n,prefix:s})))),i})(new(e().XmlDocument)(yield i.string()),{opfBasePath:n,baseUrl:r})}}})))({opfData:t,opfBasePath:s,archive:n,baseUrl:r}))||(yield((t,n,{opfBasePath:r,baseUrl:a})=>i(void 0,void 0,void 0,(function*(){var i;const s=null===(i=t.childNamed("manifest"))||void 0===i?void 0:i.childrenNamed("item").find((t=>"nav"===t.attr.properties));if(s){const t=Object.values(n.files).find((t=>t.uri.endsWith(s.attr.href||"")));if(t)return((t,{opfBasePath:e,baseUrl:n})=>{var r,i;const a=[];let s;return t.descendantWithPath("body.nav.ol")?s=null===(r=t.descendantWithPath("body.nav.ol"))||void 0===r?void 0:r.children:t.descendantWithPath("body.section.nav.ol")&&(s=null===(i=t.descendantWithPath("body.section.nav.ol"))||void 0===i?void 0:i.children),s&&s.length>0&&s.filter((t=>"li"===t.name)).forEach((t=>a.push(o(t,{opfBasePath:e,baseUrl:n})))),a})(new(e().XmlDocument)(yield t.string()),{opfBasePath:r,baseUrl:a})}})))(t,n,{opfBasePath:s,baseUrl:r}))})))(m,t,{baseUrl:n}))||[],v=m.childNamed("metadata"),b=m.childNamed("manifest"),T=m.childNamed("spine"),w=m.childNamed("guide"),E=null==v?void 0:v.childNamed("dc:title"),N=(null==v?void 0:v.childrenNamed("meta"))||[],A=N.find((t=>"rendition:layout"===t.attr.property)),I=N.find((t=>"rendition:flow"===t.attr.property)),_=N.find((t=>"rendition:spread"===t.attr.property)),B=null==A?void 0:A.val,C=null==I?void 0:I.val,O=null==_?void 0:_.val,x=(null==E?void 0:E.val)||(null===(u=t.files.find((({dir:t})=>t)))||void 0===u?void 0:u.basename)||"",S=null==T?void 0:T.attr["page-progression-direction"],U=null==T?void 0:T.childrenNamed("itemref").map((t=>t.attr.idref)),D=(null==b?void 0:b.childrenNamed("item").filter((t=>U.includes(t.attr.id||""))))||[],P=t.files.filter((t=>D.find((e=>p?`${p}/${e.attr.href}`===t.uri:`${e.attr.href}`===t.uri)))).reduce(((t,e)=>e.size+t),0);return{filename:t.filename,nav:{toc:y},renditionLayout:B||d.renditionLayout||"reflowable",renditionFlow:C||"auto",renditionSpread:O,title:x,readingDirection:S||"ltr",spineItems:(null==T?void 0:T.childrenNamed("itemref").map((e=>{var r,i,o;const a=null==b?void 0:b.childrenNamed("item").find((t=>t.attr.id===(null==e?void 0:e.attr.idref))),s=(null==a?void 0:a.attr.href)||"",u=(null===(r=null==e?void 0:e.attr.properties)||void 0===r?void 0:r.split(" "))||[],c=(null===(i=t.files.find((t=>t.uri.endsWith(s))))||void 0===i?void 0:i.size)||0;return Object.assign(Object.assign({id:(null==a?void 0:a.attr.id)||"",path:p?`${p}/${null==a?void 0:a.attr.href}`:`${null==a?void 0:a.attr.href}`,href:(null===(o=null==a?void 0:a.attr.href)||void 0===o?void 0:o.startsWith("https://"))?null==a?void 0:a.attr.href:p?`${n}/${p}/${null==a?void 0:a.attr.href}`:`${n}/${null==a?void 0:a.attr.href}`,renditionLayout:B||"reflowable"},u.find((t=>"rendition:layout-reflowable"===t))&&{renditionLayout:"reflowable"}),{progressionWeight:c/P,pageSpreadLeft:u.some((t=>"page-spread-left"===t))||void 0,pageSpreadRight:u.some((t=>"page-spread-right"===t))||void 0,mediaType:null==a?void 0:a.attr["media-type"]})})))||[],items:l(m),guide:null==w?void 0:w.childrenNamed("reference").map((t=>({href:t.attr.href||"",title:t.attr.title||"",type:t.attr.type})))}},new((p=void 0)||(p=Promise))((function(t,e){function n(t){try{i(d.next(t))}catch(t){e(t)}}function r(t){try{i(d.throw(t))}catch(t){e(t)}}function i(e){var i;e.done?t(e.value):(i=e.value,i instanceof p?i:new p((function(t){t(i)}))).then(n,r)}i((d=d.apply(u,h||[])).next())}));var u,h,p,d};var p=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))};const d=(t,e)=>p(void 0,void 0,void 0,(function*(){const n=Object.values(t.files).find((t=>t.uri===e)),r=yield g(t,e);if(!n)throw new Error("no file found");const i=yield n.blob();return new Response(i,{headers:Object.assign(Object.assign(Object.assign({},i.type&&{"Content-Type":i.type}),n.encodingFormat&&{"Content-Type":n.encodingFormat}),r.mediaType&&{"Content-Type":r.mediaType})})})),g=(t,n)=>p(void 0,void 0,void 0,(function*(){var r,i;const o=f(t),a=yield null===(r=o.data)||void 0===r?void 0:r.string();if(a){const t=new(e().XmlDocument)(a);return{mediaType:null===(i=l(t).find((t=>n.endsWith(t.href))))||void 0===i?void 0:i.mediaType}}return{mediaType:m(n)}})),m=t=>t.endsWith(".css")?"text/css; charset=UTF-8":t.endsWith(".jpg")?"image/jpg":t.endsWith(".xhtml")?"application/xhtml+xml":t.endsWith(".mp4")?"video/mp4":t.endsWith(".svg")?"image/svg+xml":void 0;const y=({archive:t,baseUrl:n})=>n=>{return r=void 0,i=void 0,a=function*(){var r;const i=t.files.find((t=>"comicinfo.xml"===t.basename.toLowerCase()));if(!i)return n;const o=yield i.string(),a=(null===(r=new(e().XmlDocument)(o).childNamed("Manga"))||void 0===r?void 0:r.val)||"unknown";return Object.assign(Object.assign({},n),{spineItems:n.spineItems.filter((t=>"comicinfo.xml"!==t.id.toLowerCase())),readingDirection:"YesAndRightToLeft"===a?"rtl":"ltr"})},new((o=void 0)||(o=Promise))((function(t,e){function n(t){try{u(a.next(t))}catch(t){e(t)}}function s(t){try{u(a.throw(t))}catch(t){e(t)}}function u(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o((function(t){t(r)}))).then(n,s)}u((a=a.apply(r,i||[])).next())}));var r,i,o,a};const v=({archive:t,baseUrl:e})=>n=>{return r=void 0,i=void 0,a=function*(){var n;const r=Object.values(t.files).filter((t=>!t.dir));return{filename:t.filename,nav:{toc:[]},title:(null===(n=t.files.find((({dir:t})=>t)))||void 0===n?void 0:n.basename.replace(/\/$/,""))||"",renditionLayout:"pre-paginated",renditionSpread:"auto",readingDirection:"ltr",spineItems:r.map((t=>({id:t.basename,path:`${t.uri}`,href:e?`${e}/${t.uri}`:t.uri,renditionLayout:"pre-paginated",progressionWeight:1/r.length,pageSpreadLeft:void 0,pageSpreadRight:void 0,mediaType:t.encodingFormat}))),items:r.map((t=>({id:t.basename,href:e?`${e}/${t.uri}`:t.uri})))}},new((o=void 0)||(o=Promise))((function(t,e){function n(t){try{u(a.next(t))}catch(t){e(t)}}function s(t){try{u(a.throw(t))}catch(t){e(t)}}function u(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o((function(t){t(r)}))).then(n,s)}u((a=a.apply(r,i||[])).next())}));var r,i,o,a};var b=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))};const T={filename:"",items:[],nav:{toc:[]},readingDirection:"ltr",renditionLayout:"pre-paginated",renditionSpread:"auto",spineItems:[],title:""},w=(t,{baseUrl:e=""}={})=>b(void 0,void 0,void 0,(function*(){const n=[v({archive:t,baseUrl:e}),h({archive:t,baseUrl:e}),y({archive:t,baseUrl:e})];try{const t=yield n.reduce(((t,e)=>b(void 0,void 0,void 0,(function*(){return yield e(yield t)}))),Promise.resolve(T)),e=JSON.stringify(t);return new Response(e,{status:200})}catch(t){return c.error(t),new Response(null==t?void 0:t.message,{status:500})}})),E=t=>{var e,n;switch((null===(n=null===(e=t.split(/[#?]/)[0])||void 0===e?void 0:e.split(".").pop())||void 0===n?void 0:n.trim())||""){case"png":return"image/png";case"jpg":return"image/jpg";case"jpeg":return"image/jpeg";case"txt":return"text/plain";case"webp":return"image/webp"}},N=t=>t.substring(t.lastIndexOf("/")+1)||t;var A=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))};const I=(t,e)=>A(void 0,void 0,void 0,(function*(){const n=`\n <?xml version="1.0" encoding="UTF-8"?><package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="bookid">\n <metadata>\n <meta property="rendition:layout">${(null==e?void 0:e.useRenditionFlow)?"reflowable":"pre-paginated"}</meta>\n ${(null==e?void 0:e.useRenditionFlow)?'<meta property="rendition:flow">scrolled-continuous</meta>':""}\n </metadata>\n <manifest>\n ${t.map((t=>`<item id="${N(t)}" href="${t}" media-type="${E(t)}"/>`)).join("\n")}\n </manifest>\n <spine>\n ${t.map((t=>`<itemref idref="${N(t)}" />`)).join("\n")}\n </spine>\n </package>\n `;return{filename:"",files:[{dir:!1,basename:"content.opf",uri:"content.opf",size:0,base64:()=>A(void 0,void 0,void 0,(function*(){return n})),blob:()=>A(void 0,void 0,void 0,(function*(){return new Blob})),string:()=>A(void 0,void 0,void 0,(function*(){return n}))},...t.map((e=>({dir:!1,basename:N(e),encodingFormat:E(e),uri:e,size:100/t.length,base64:()=>A(void 0,void 0,void 0,(function*(){return""})),blob:()=>A(void 0,void 0,void 0,(function*(){return new Blob})),string:()=>A(void 0,void 0,void 0,(function*(){return""}))})))]}}));var _=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))};const B=(t,e)=>_(void 0,void 0,void 0,(function*(){const n=`\n <?xml version="1.0" encoding="UTF-8"?>\n <package xmlns="http://www.idpf.org/2007/opf" version="3.0" xml:lang="ja" prefix="rendition: http://www.idpf.org/vocab/rendition/#"\n unique-identifier="ootuya-id">\n <metadata xmlns:opf="http://www.idpf.org/2007/opf" xmlns:dc="http://purl.org/dc/elements/1.1/"\n xmlns:dcterms="http://purl.org/dc/terms/">\n <meta property="rendition:layout">reflowable</meta>\n </metadata>\n <manifest>\n <item id="p01" href="p01.txt" media-type="text/plain"/>\n </manifest>\n <spine page-progression-direction="${(null==e?void 0:e.direction)||"ltr"}">\n <itemref idref="p01" />\n </spine>\n </package>\n `;return{filename:"content.txt",files:[{dir:!1,basename:N("generated.opf"),uri:"generated.opf",blob:()=>_(void 0,void 0,void 0,(function*(){return new Blob([n])})),string:()=>_(void 0,void 0,void 0,(function*(){return n})),base64:()=>_(void 0,void 0,void 0,(function*(){return btoa(n)})),size:0},{dir:!1,basename:N("p01.txt"),uri:"p01.txt",blob:()=>_(void 0,void 0,void 0,(function*(){return"string"==typeof t?new Blob([t]):t})),string:()=>_(void 0,void 0,void 0,(function*(){return"string"==typeof t?t:t.text()})),base64:()=>_(void 0,void 0,void 0,(function*(){return"string"==typeof t?btoa(t):(o=t,e=void 0,n=void 0,i=function*(){return new Promise((t=>{const e=new FileReader;e.readAsDataURL(o),e.onloadend=function(){const n=e.result;t(n)}}))},new((r=void 0)||(r=Promise))((function(t,o){function a(t){try{u(i.next(t))}catch(t){o(t)}}function s(t){try{u(i.throw(t))}catch(t){o(t)}}function u(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(t){t(n)}))).then(a,s)}u((i=i.apply(e,n||[])).next())})));var e,n,r,i,o})),size:"string"==typeof t?t.length:t.size,encodingFormat:"text/plain"}]}})),C=(t,e)=>{var n;const r=t.split(/(\d+)/),i=e.split(/(\d+)/);r.slice(-1)===[""]&&r.pop(),i.slice(-1)===[""]&&i.pop();for(let t=0,e=r.length;t<e;t++)if(r[t]!==i[t])return(null===(n=r[t])||void 0===n?void 0:n.match(/\d/))?+(r[t]||"")-+(i[t]||""):(r[t]||"").localeCompare(i[t]||"");return 1};const O=(t,{orderByAlpha:e,name:n}={})=>{return r=void 0,i=void 0,a=function*(){let r=Object.values(t.files);return e&&(r=r.sort(((t,e)=>C(t.name,e.name)))),{filename:n||"",files:r.map((t=>Object.assign(Object.assign({dir:t.dir,basename:N(t.name),uri:t.name,blob:()=>t.async("blob"),string:()=>t.async("string"),base64:()=>t.async("base64")},t.internalStream&&{stream:t.internalStream}),{size:t._data.uncompressedSize})))}},new((o=void 0)||(o=Promise))((function(t,e){function n(t){try{u(a.next(t))}catch(t){e(t)}}function s(t){try{u(a.throw(t))}catch(t){e(t)}}function u(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o((function(t){t(r)}))).then(n,s)}u((a=a.apply(r,i||[])).next())}));var r,i,o,a};var x=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))};const S=(t,{orderByAlpha:e,name:n}={})=>x(void 0,void 0,void 0,(function*(){let r=t;return e&&(r=r.sort(((t,e)=>C(t.name,e.name)))),{filename:n||"",files:r.map((t=>({dir:t.isDir,basename:N(t.name),uri:t.name,blob:()=>x(void 0,void 0,void 0,(function*(){return new Blob([yield t.data()])})),string:()=>x(void 0,void 0,void 0,(function*(){const e=yield t.data();return String.fromCharCode.apply(null,Array.from(new Uint16Array(e)))})),base64:()=>x(void 0,void 0,void 0,(function*(){return""})),size:t.size})))}}))})();var i=exports;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
|
|
2
|
+
(()=>{var t={766:(t,e)=>{"use strict";e.byteLength=function(t){var e=u(t),n=e[0],r=e[1];return 3*(n+r)/4-r},e.toByteArray=function(t){var e,n,o=u(t),a=o[0],s=o[1],c=new i(function(t,e,n){return 3*(e+n)/4-n}(0,a,s)),l=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)e=r[t.charCodeAt(n)]<<18|r[t.charCodeAt(n+1)]<<12|r[t.charCodeAt(n+2)]<<6|r[t.charCodeAt(n+3)],c[l++]=e>>16&255,c[l++]=e>>8&255,c[l++]=255&e;return 2===s&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,c[l++]=255&e),1===s&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,c[l++]=e>>8&255,c[l++]=255&e),c},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],a=16383,s=0,u=r-i;s<u;s+=a)o.push(c(t,s,s+a>u?u:s+a));return 1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),o.join("")};for(var n=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=o.length;a<s;++a)n[a]=o[a],r[o.charCodeAt(a)]=a;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function c(t,e,r){for(var i,o,a=[],s=e;s<r;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),a.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},250:(t,e,n)=>{"use strict";const r=n(766),i=n(333),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=function(t){return+t!=t&&(t=0),u.alloc(+t)},e.INSPECT_MAX_BYTES=50;const a=2147483647;function s(t){if(t>a)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,n){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return f(t)}return c(t,e,n)}function c(t,e,n){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const n=0|g(t,e);let r=s(n);const i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}(t,e);if(ArrayBuffer.isView(t))return function(t){if(H(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return h(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(H(t,ArrayBuffer)||t&&H(t.buffer,ArrayBuffer))return d(t,e,n);if("undefined"!=typeof SharedArrayBuffer&&(H(t,SharedArrayBuffer)||t&&H(t.buffer,SharedArrayBuffer)))return d(t,e,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=t.valueOf&&t.valueOf();if(null!=r&&r!==t)return u.from(r,e,n);const i=function(t){if(u.isBuffer(t)){const e=0|p(t.length),n=s(e);return 0===n.length||t.copy(n,0,0,e),n}return void 0!==t.length?"number"!=typeof t.length||Q(t.length)?s(0):h(t):"Buffer"===t.type&&Array.isArray(t.data)?h(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return l(t),s(t<0?0:0|p(t))}function h(t){const e=t.length<0?0:0|p(t.length),n=s(e);for(let r=0;r<e;r+=1)n[r]=255&t[r];return n}function d(t,e,n){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===e&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,e):new Uint8Array(t,e,n),Object.setPrototypeOf(r,u.prototype),r}function p(t){if(t>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|t}function g(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||H(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const n=t.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return Y(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(t).length;default:if(i)return r?-1:Y(t).length;e=(""+e).toLowerCase(),i=!0}}function m(t,e,n){let r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return x(this,e,n);case"utf8":case"utf-8":return _(this,e,n);case"ascii":return C(this,e,n);case"latin1":case"binary":return O(this,e,n);case"base64":return I(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function y(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function v(t,e,n,r,i){if(0===t.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Q(n=+n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof e&&(e=u.from(e,r)),u.isBuffer(e))return 0===e.length?-1:b(t,e,n,r,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):b(t,[e],n,r,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,n,r,i){let o,a=1,s=t.length,u=e.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,n/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(i){let r=-1;for(o=n;o<s;o++)if(c(t,o)===c(e,-1===r?0:o-r)){if(-1===r&&(r=o),o-r+1===u)return r*a}else-1!==r&&(o-=o-r),r=-1}else for(n+u>s&&(n=s-u),o=n;o>=0;o--){let n=!0;for(let r=0;r<u;r++)if(c(t,o+r)!==c(e,r)){n=!1;break}if(n)return o}return-1}function T(t,e,n,r){n=Number(n)||0;const i=t.length-n;r?(r=Number(r))>i&&(r=i):r=i;const o=e.length;let a;for(r>o/2&&(r=o/2),a=0;a<r;++a){const r=parseInt(e.substr(2*a,2),16);if(Q(r))return a;t[n+a]=r}return a}function E(t,e,n,r){return z(Y(e,t.length-n),t,n,r)}function w(t,e,n,r){return z(function(t){const e=[];for(let n=0;n<t.length;++n)e.push(255&t.charCodeAt(n));return e}(e),t,n,r)}function N(t,e,n,r){return z(q(e),t,n,r)}function A(t,e,n,r){return z(function(t,e){let n,r,i;const o=[];for(let a=0;a<t.length&&!((e-=2)<0);++a)n=t.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(e,t.length-n),t,n,r)}function I(t,e,n){return 0===e&&n===t.length?r.fromByteArray(t):r.fromByteArray(t.slice(e,n))}function _(t,e,n){n=Math.min(t.length,n);const r=[];let i=e;for(;i<n;){const e=t[i];let o=null,a=e>239?4:e>223?3:e>191?2:1;if(i+a<=n){let n,r,s,u;switch(a){case 1:e<128&&(o=e);break;case 2:n=t[i+1],128==(192&n)&&(u=(31&e)<<6|63&n,u>127&&(o=u));break;case 3:n=t[i+1],r=t[i+2],128==(192&n)&&128==(192&r)&&(u=(15&e)<<12|(63&n)<<6|63&r,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:n=t[i+1],r=t[i+2],s=t[i+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(u=(15&e)<<18|(63&n)<<12|(63&r)<<6|63&s,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=a}return function(t){const e=t.length;if(e<=B)return String.fromCharCode.apply(String,t);let n="",r=0;for(;r<e;)n+=String.fromCharCode.apply(String,t.slice(r,r+=B));return n}(r)}e.kMaxLength=a,u.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||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."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,n){return c(t,e,n)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,n){return function(t,e,n){return l(t),t<=0?s(t):void 0!==e?"string"==typeof n?s(t).fill(e,n):s(t).fill(e):s(t)}(t,e,n)},u.allocUnsafe=function(t){return f(t)},u.allocUnsafeSlow=function(t){return f(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(H(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),H(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let n=t.length,r=e.length;for(let i=0,o=Math.min(n,r);i<o;++i)if(t[i]!==e[i]){n=t[i],r=e[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(t){switch(String(t).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}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);let n;if(void 0===e)for(e=0,n=0;n<t.length;++n)e+=t[n].length;const r=u.allocUnsafe(e);let i=0;for(n=0;n<t.length;++n){let e=t[n];if(H(e,Uint8Array))i+e.length>r.length?(u.isBuffer(e)||(e=u.from(e)),e.copy(r,i)):Uint8Array.prototype.set.call(r,e,i);else{if(!u.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(r,i)}i+=e.length}return r},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)y(this,e,e+1);return this},u.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)y(this,e,e+3),y(this,e+1,e+2);return this},u.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)y(this,e,e+7),y(this,e+1,e+6),y(this,e+2,e+5),y(this,e+3,e+4);return this},u.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?_(this,0,t):m.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){let t="";const n=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(t+=" ... "),"<Buffer "+t+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,n,r,i){if(H(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),e<0||n>t.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&e>=n)return 0;if(r>=i)return-1;if(e>=n)return 1;if(this===t)return 0;let o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(e>>>=0);const s=Math.min(o,a),c=this.slice(r,i),l=t.slice(e,n);for(let t=0;t<s;++t)if(c[t]!==l[t]){o=c[t],a=l[t];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(t,e,n){return-1!==this.indexOf(t,e,n)},u.prototype.indexOf=function(t,e,n){return v(this,t,e,n,!0)},u.prototype.lastIndexOf=function(t,e,n){return v(this,t,e,n,!1)},u.prototype.write=function(t,e,n,r){if(void 0===e)r="utf8",n=this.length,e=0;else if(void 0===n&&"string"==typeof e)r=e,n=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const i=this.length-e;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let o=!1;for(;;)switch(r){case"hex":return T(this,t,e,n);case"utf8":case"utf-8":return E(this,t,e,n);case"ascii":case"latin1":case"binary":return w(this,t,e,n);case"base64":return N(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,e,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const B=4096;function C(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(127&t[i]);return r}function O(t,e,n){let r="";n=Math.min(t.length,n);for(let i=e;i<n;++i)r+=String.fromCharCode(t[i]);return r}function x(t,e,n){const r=t.length;(!e||e<0)&&(e=0),(!n||n<0||n>r)&&(n=r);let i="";for(let r=e;r<n;++r)i+=Z[t[r]];return i}function S(t,e,n){const r=t.slice(e,n);let i="";for(let t=0;t<r.length-1;t+=2)i+=String.fromCharCode(r[t]+256*r[t+1]);return i}function U(t,e,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>n)throw new RangeError("Trying to access beyond buffer length")}function D(t,e,n,r,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(n+r>t.length)throw new RangeError("Index out of range")}function P(t,e,n,r,i){k(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o,o>>=8,t[n++]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,a>>=8,t[n++]=a,n}function R(t,e,n,r,i){k(e,r,i,t,n,7);let o=Number(e&BigInt(4294967295));t[n+7]=o,o>>=8,t[n+6]=o,o>>=8,t[n+5]=o,o>>=8,t[n+4]=o;let a=Number(e>>BigInt(32)&BigInt(4294967295));return t[n+3]=a,a>>=8,t[n+2]=a,a>>=8,t[n+1]=a,a>>=8,t[n]=a,n+8}function L(t,e,n,r,i,o){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(t,e,n,r,o){return e=+e,n>>>=0,o||L(t,0,n,4),i.write(t,e,n,r,23,4),n+4}function M(t,e,n,r,o){return e=+e,n>>>=0,o||L(t,0,n,8),i.write(t,e,n,r,52,8),n+8}u.prototype.slice=function(t,e){const n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e<t&&(e=t);const r=this.subarray(t,e);return Object.setPrototypeOf(r,u.prototype),r},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,n){t>>>=0,e>>>=0,n||U(t,e,this.length);let r=this[t],i=1,o=0;for(;++o<e&&(i*=256);)r+=this[t+o]*i;return r},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,n){t>>>=0,e>>>=0,n||U(t,e,this.length);let r=this[t+--e],i=1;for(;e>0&&(i*=256);)r+=this[t+--e]*i;return r},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||U(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||U(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||U(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readBigUInt64LE=J((function(t){W(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+n*2**24;return BigInt(r)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=J((function(t){W(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+n;return(BigInt(r)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(t,e,n){t>>>=0,e>>>=0,n||U(t,e,this.length);let r=this[t],i=1,o=0;for(;++o<e&&(i*=256);)r+=this[t+o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},u.prototype.readIntBE=function(t,e,n){t>>>=0,e>>>=0,n||U(t,e,this.length);let r=e,i=1,o=this[t+--r];for(;r>0&&(i*=256);)o+=this[t+--r]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||U(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||U(t,2,this.length);const n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt16BE=function(t,e){t>>>=0,e||U(t,2,this.length);const n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readBigInt64LE=J((function(t){W(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=this[t+4]+256*this[t+5]+65536*this[t+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)})),u.prototype.readBigInt64BE=J((function(t){W(t>>>=0,"offset");const e=this[t],n=this[t+7];void 0!==e&&void 0!==n||V(t,this.length-8);const r=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(r)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+n)})),u.prototype.readFloatLE=function(t,e){return t>>>=0,e||U(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||U(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||U(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||U(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||D(this,t,e,n,Math.pow(2,8*n)-1,0);let i=1,o=0;for(this[e]=255&t;++o<n&&(i*=256);)this[e+o]=t/i&255;return e+n},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,n,r){t=+t,e>>>=0,n>>>=0,r||D(this,t,e,n,Math.pow(2,8*n)-1,0);let i=n-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+n},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigUInt64LE=J((function(t,e=0){return P(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=J((function(t,e=0){return R(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);D(this,t,e,n,r-1,-r)}let i=0,o=1,a=0;for(this[e]=255&t;++i<n&&(o*=256);)t<0&&0===a&&0!==this[e+i-1]&&(a=1),this[e+i]=(t/o>>0)-a&255;return e+n},u.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e>>>=0,!r){const r=Math.pow(2,8*n-1);D(this,t,e,n,r-1,-r)}let i=n-1,o=1,a=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/o>>0)-a&255;return e+n},u.prototype.writeInt8=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,n){return t=+t,e>>>=0,n||D(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeBigInt64LE=J((function(t,e=0){return P(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=J((function(t,e=0){return R(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(t,e,n){return F(this,t,e,!0,n)},u.prototype.writeFloatBE=function(t,e,n){return F(this,t,e,!1,n)},u.prototype.writeDoubleLE=function(t,e,n){return M(this,t,e,!0,n)},u.prototype.writeDoubleBE=function(t,e,n){return M(this,t,e,!1,n)},u.prototype.copy=function(t,e,n,r){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),e>=t.length&&(e=t.length),e||(e=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);const i=r-n;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,n,r):Uint8Array.prototype.set.call(t,this.subarray(n,r),e),i},u.prototype.fill=function(t,e,n,r){if("string"==typeof t){if("string"==typeof e?(r=e,e=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===t.length){const e=t.charCodeAt(0);("utf8"===r&&e<128||"latin1"===r)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;let i;if(e>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(i=e;i<n;++i)this[i]=t;else{const o=u.isBuffer(t)?t:u.from(t,r),a=o.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<n-e;++i)this[i+e]=o[i%a]}return this};const $={};function j(t,e,n){$[t]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function G(t){let e="",n=t.length;const r="-"===t[0]?1:0;for(;n>=r+4;n-=3)e=`_${t.slice(n-3,n)}${e}`;return`${t.slice(0,n)}${e}`}function k(t,e,n,r,i,o){if(t>n||t<e){const r="bigint"==typeof e?"n":"";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(o+1)}${r}`:`>= -(2${r} ** ${8*(o+1)-1}${r}) and < 2 ** ${8*(o+1)-1}${r}`:`>= ${e}${r} and <= ${n}${r}`,new $.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,n){W(e,"offset"),void 0!==t[e]&&void 0!==t[e+n]||V(e,t.length-(n+1))}(r,i,o)}function W(t,e){if("number"!=typeof t)throw new $.ERR_INVALID_ARG_TYPE(e,"number",t)}function V(t,e,n){if(Math.floor(t)!==t)throw W(t,n),new $.ERR_OUT_OF_RANGE(n||"offset","an integer",t);if(e<0)throw new $.ERR_BUFFER_OUT_OF_BOUNDS;throw new $.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${e}`,t)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`}),TypeError),j("ERR_OUT_OF_RANGE",(function(t,e,n){let r=`The value of "${t}" is out of range.`,i=n;return Number.isInteger(n)&&Math.abs(n)>2**32?i=G(String(n)):"bigint"==typeof n&&(i=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(i=G(i)),i+="n"),r+=` It must be ${e}. Received ${i}`,r}),RangeError);const X=/[^+/0-9A-Za-z-_]/g;function Y(t,e){let n;e=e||1/0;const r=t.length;let i=null;const o=[];for(let a=0;a<r;++a){if(n=t.charCodeAt(a),n>55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(e-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;o.push(n)}else if(n<2048){if((e-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function q(t){return r.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(X,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,e,n,r){let i;for(i=0;i<r&&!(i+n>=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function H(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Q(t){return t!=t}const Z=function(){const t="0123456789abcdef",e=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let i=0;i<16;++i)e[r+i]=t[n]+t[i]}return e}();function J(t){return"undefined"==typeof BigInt?K:t}function K(){throw new Error("BigInt not supported")}},333:(t,e)=>{e.read=function(t,e,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,f=n?i-1:0,h=n?-1:1,d=t[e+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+t[e+f],f+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;l>0;a=256*a+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),o-=c}return(d?-1:1)*a*Math.pow(2,o-r)},e.write=function(t,e,n,r,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=l):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(a++,u/=2),a+f>=l?(s=0,a=l):a+f>=1?(s=(e*u-1)*Math.pow(2,i),a+=f):(s=e*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;t[n+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;t[n+d]=255&a,d+=p,a/=256,c-=8);t[n+d-p]|=128*g}},834:(t,e,n)=>{var r=n(250),i=r.Buffer;function o(t,e){for(var n in t)e[n]=t[n]}function a(t,e,n){return i(t,e,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,e),e.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(t,e,n){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,n)},a.alloc=function(t,e,n){if("number"!=typeof t)throw new TypeError("Argument must be a number");var r=i(t);return void 0!==e?"string"==typeof n?r.fill(e,n):r.fill(e):r.fill(0),r},a.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},a.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}},480:(t,e,n)=>{!function(t){t.parser=function(t,e){return new i(t,e)},t.SAXParser=i,t.SAXStream=a,t.createStream=function(t,e){return new a(t,e)},t.MAX_BUFFER_LENGTH=65536;var e,r=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function i(e,n){if(!(this instanceof i))return new i(e,n);var o=this;!function(t){for(var e=0,n=r.length;e<n;e++)t[r[e]]=""}(o),o.q=o.c="",o.bufferCheckPosition=t.MAX_BUFFER_LENGTH,o.opt=n||{},o.opt.lowercase=o.opt.lowercase||o.opt.lowercasetags,o.looseCase=o.opt.lowercase?"toLowerCase":"toUpperCase",o.tags=[],o.closed=o.closedRoot=o.sawRoot=!1,o.tag=o.error=null,o.strict=!!e,o.noscript=!(!e&&!o.opt.noscript),o.state=w.BEGIN,o.strictEntities=o.opt.strictEntities,o.ENTITIES=o.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),o.attribList=[],o.opt.xmlns&&(o.ns=Object.create(c)),o.trackPosition=!1!==o.opt.position,o.trackPosition&&(o.position=o.line=o.column=0),A(o,"onready")}t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(t){function e(){}return e.prototype=t,new e}),Object.keys||(Object.keys=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}),i.prototype={end:function(){O(this)},write:function(e){var n=this;if(this.error)throw this.error;if(n.closed)return C(n,"Cannot write after close. Assign an onready handler.");if(null===e)return O(n);"object"==typeof e&&(e=e.toString());for(var i=0,o="";o=M(e,i++),n.c=o,o;)switch(n.trackPosition&&(n.position++,"\n"===o?(n.line++,n.column=0):n.column++),n.state){case w.BEGIN:if(n.state=w.BEGIN_WHITESPACE,"\ufeff"===o)continue;F(n,o);continue;case w.BEGIN_WHITESPACE:F(n,o);continue;case w.TEXT:if(n.sawRoot&&!n.closedRoot){for(var a=i-1;o&&"<"!==o&&"&"!==o;)(o=M(e,i++))&&n.trackPosition&&(n.position++,"\n"===o?(n.line++,n.column=0):n.column++);n.textNode+=e.substring(a,i-1)}"<"!==o||n.sawRoot&&n.closedRoot&&!n.strict?(p(o)||n.sawRoot&&!n.closedRoot||x(n,"Text data outside of root node."),"&"===o?n.state=w.TEXT_ENTITY:n.textNode+=o):(n.state=w.OPEN_WAKA,n.startTagPosition=n.position);continue;case w.SCRIPT:"<"===o?n.state=w.SCRIPT_ENDING:n.script+=o;continue;case w.SCRIPT_ENDING:"/"===o?n.state=w.CLOSE_TAG:(n.script+="<"+o,n.state=w.SCRIPT);continue;case w.OPEN_WAKA:if("!"===o)n.state=w.SGML_DECL,n.sgmlDecl="";else if(p(o));else if(y(l,o))n.state=w.OPEN_TAG,n.tagName=o;else if("/"===o)n.state=w.CLOSE_TAG,n.tagName="";else if("?"===o)n.state=w.PROC_INST,n.procInstName=n.procInstBody="";else{if(x(n,"Unencoded <"),n.startTagPosition+1<n.position){var s=n.position-n.startTagPosition;o=new Array(s).join(" ")+o}n.textNode+="<"+o,n.state=w.TEXT}continue;case w.SGML_DECL:"[CDATA["===(n.sgmlDecl+o).toUpperCase()?(I(n,"onopencdata"),n.state=w.CDATA,n.sgmlDecl="",n.cdata=""):n.sgmlDecl+o==="--"?(n.state=w.COMMENT,n.comment="",n.sgmlDecl=""):"DOCTYPE"===(n.sgmlDecl+o).toUpperCase()?(n.state=w.DOCTYPE,(n.doctype||n.sawRoot)&&x(n,"Inappropriately located doctype declaration"),n.doctype="",n.sgmlDecl=""):">"===o?(I(n,"onsgmldeclaration",n.sgmlDecl),n.sgmlDecl="",n.state=w.TEXT):g(o)?(n.state=w.SGML_DECL_QUOTED,n.sgmlDecl+=o):n.sgmlDecl+=o;continue;case w.SGML_DECL_QUOTED:o===n.q&&(n.state=w.SGML_DECL,n.q=""),n.sgmlDecl+=o;continue;case w.DOCTYPE:">"===o?(n.state=w.TEXT,I(n,"ondoctype",n.doctype),n.doctype=!0):(n.doctype+=o,"["===o?n.state=w.DOCTYPE_DTD:g(o)&&(n.state=w.DOCTYPE_QUOTED,n.q=o));continue;case w.DOCTYPE_QUOTED:n.doctype+=o,o===n.q&&(n.q="",n.state=w.DOCTYPE);continue;case w.DOCTYPE_DTD:n.doctype+=o,"]"===o?n.state=w.DOCTYPE:g(o)&&(n.state=w.DOCTYPE_DTD_QUOTED,n.q=o);continue;case w.DOCTYPE_DTD_QUOTED:n.doctype+=o,o===n.q&&(n.state=w.DOCTYPE_DTD,n.q="");continue;case w.COMMENT:"-"===o?n.state=w.COMMENT_ENDING:n.comment+=o;continue;case w.COMMENT_ENDING:"-"===o?(n.state=w.COMMENT_ENDED,n.comment=B(n.opt,n.comment),n.comment&&I(n,"oncomment",n.comment),n.comment=""):(n.comment+="-"+o,n.state=w.COMMENT);continue;case w.COMMENT_ENDED:">"!==o?(x(n,"Malformed comment"),n.comment+="--"+o,n.state=w.COMMENT):n.state=w.TEXT;continue;case w.CDATA:"]"===o?n.state=w.CDATA_ENDING:n.cdata+=o;continue;case w.CDATA_ENDING:"]"===o?n.state=w.CDATA_ENDING_2:(n.cdata+="]"+o,n.state=w.CDATA);continue;case w.CDATA_ENDING_2:">"===o?(n.cdata&&I(n,"oncdata",n.cdata),I(n,"onclosecdata"),n.cdata="",n.state=w.TEXT):"]"===o?n.cdata+="]":(n.cdata+="]]"+o,n.state=w.CDATA);continue;case w.PROC_INST:"?"===o?n.state=w.PROC_INST_ENDING:p(o)?n.state=w.PROC_INST_BODY:n.procInstName+=o;continue;case w.PROC_INST_BODY:if(!n.procInstBody&&p(o))continue;"?"===o?n.state=w.PROC_INST_ENDING:n.procInstBody+=o;continue;case w.PROC_INST_ENDING:">"===o?(I(n,"onprocessinginstruction",{name:n.procInstName,body:n.procInstBody}),n.procInstName=n.procInstBody="",n.state=w.TEXT):(n.procInstBody+="?"+o,n.state=w.PROC_INST_BODY);continue;case w.OPEN_TAG:y(f,o)?n.tagName+=o:(S(n),">"===o?P(n):"/"===o?n.state=w.OPEN_TAG_SLASH:(p(o)||x(n,"Invalid character in tag name"),n.state=w.ATTRIB));continue;case w.OPEN_TAG_SLASH:">"===o?(P(n,!0),R(n)):(x(n,"Forward-slash in opening tag not followed by >"),n.state=w.ATTRIB);continue;case w.ATTRIB:if(p(o))continue;">"===o?P(n):"/"===o?n.state=w.OPEN_TAG_SLASH:y(l,o)?(n.attribName=o,n.attribValue="",n.state=w.ATTRIB_NAME):x(n,"Invalid attribute name");continue;case w.ATTRIB_NAME:"="===o?n.state=w.ATTRIB_VALUE:">"===o?(x(n,"Attribute without value"),n.attribValue=n.attribName,D(n),P(n)):p(o)?n.state=w.ATTRIB_NAME_SAW_WHITE:y(f,o)?n.attribName+=o:x(n,"Invalid attribute name");continue;case w.ATTRIB_NAME_SAW_WHITE:if("="===o)n.state=w.ATTRIB_VALUE;else{if(p(o))continue;x(n,"Attribute without value"),n.tag.attributes[n.attribName]="",n.attribValue="",I(n,"onattribute",{name:n.attribName,value:""}),n.attribName="",">"===o?P(n):y(l,o)?(n.attribName=o,n.state=w.ATTRIB_NAME):(x(n,"Invalid attribute name"),n.state=w.ATTRIB)}continue;case w.ATTRIB_VALUE:if(p(o))continue;g(o)?(n.q=o,n.state=w.ATTRIB_VALUE_QUOTED):(x(n,"Unquoted attribute value"),n.state=w.ATTRIB_VALUE_UNQUOTED,n.attribValue=o);continue;case w.ATTRIB_VALUE_QUOTED:if(o!==n.q){"&"===o?n.state=w.ATTRIB_VALUE_ENTITY_Q:n.attribValue+=o;continue}D(n),n.q="",n.state=w.ATTRIB_VALUE_CLOSED;continue;case w.ATTRIB_VALUE_CLOSED:p(o)?n.state=w.ATTRIB:">"===o?P(n):"/"===o?n.state=w.OPEN_TAG_SLASH:y(l,o)?(x(n,"No whitespace between attributes"),n.attribName=o,n.attribValue="",n.state=w.ATTRIB_NAME):x(n,"Invalid attribute name");continue;case w.ATTRIB_VALUE_UNQUOTED:if(!m(o)){"&"===o?n.state=w.ATTRIB_VALUE_ENTITY_U:n.attribValue+=o;continue}D(n),">"===o?P(n):n.state=w.ATTRIB;continue;case w.CLOSE_TAG:if(n.tagName)">"===o?R(n):y(f,o)?n.tagName+=o:n.script?(n.script+="</"+n.tagName,n.tagName="",n.state=w.SCRIPT):(p(o)||x(n,"Invalid tagname in closing tag"),n.state=w.CLOSE_TAG_SAW_WHITE);else{if(p(o))continue;v(l,o)?n.script?(n.script+="</"+o,n.state=w.SCRIPT):x(n,"Invalid tagname in closing tag."):n.tagName=o}continue;case w.CLOSE_TAG_SAW_WHITE:if(p(o))continue;">"===o?R(n):x(n,"Invalid characters in closing tag");continue;case w.TEXT_ENTITY:case w.ATTRIB_VALUE_ENTITY_Q:case w.ATTRIB_VALUE_ENTITY_U:var u,c;switch(n.state){case w.TEXT_ENTITY:u=w.TEXT,c="textNode";break;case w.ATTRIB_VALUE_ENTITY_Q:u=w.ATTRIB_VALUE_QUOTED,c="attribValue";break;case w.ATTRIB_VALUE_ENTITY_U:u=w.ATTRIB_VALUE_UNQUOTED,c="attribValue"}";"===o?(n[c]+=L(n),n.entity="",n.state=u):y(n.entity.length?d:h,o)?n.entity+=o:(x(n,"Invalid character in entity name"),n[c]+="&"+n.entity+o,n.entity="",n.state=u);continue;default:throw new Error(n,"Unknown state: "+n.state)}return n.position>=n.bufferCheckPosition&&function(e){for(var n=Math.max(t.MAX_BUFFER_LENGTH,10),i=0,o=0,a=r.length;o<a;o++){var s=e[r[o]].length;if(s>n)switch(r[o]){case"textNode":_(e);break;case"cdata":I(e,"oncdata",e.cdata),e.cdata="";break;case"script":I(e,"onscript",e.script),e.script="";break;default:C(e,"Max buffer length exceeded: "+r[o])}i=Math.max(i,s)}var u=t.MAX_BUFFER_LENGTH-i;e.bufferCheckPosition=u+e.position}(n),n},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){var t;_(t=this),""!==t.cdata&&(I(t,"oncdata",t.cdata),t.cdata=""),""!==t.script&&(I(t,"onscript",t.script),t.script="")}};try{e=n(761).F}catch(t){e=function(){}}var o=t.EVENTS.filter((function(t){return"error"!==t&&"end"!==t}));function a(t,n){if(!(this instanceof a))return new a(t,n);e.apply(this),this._parser=new i(t,n),this.writable=!0,this.readable=!0;var r=this;this._parser.onend=function(){r.emit("end")},this._parser.onerror=function(t){r.emit("error",t),r._parser.error=null},this._decoder=null,o.forEach((function(t){Object.defineProperty(r,"on"+t,{get:function(){return r._parser["on"+t]},set:function(e){if(!e)return r.removeAllListeners(t),r._parser["on"+t]=e,e;r.on(t,e)},enumerable:!0,configurable:!1})}))}a.prototype=Object.create(e.prototype,{constructor:{value:a}}),a.prototype.write=function(t){if("function"==typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(t)){if(!this._decoder){var e=n(214).s;this._decoder=new e("utf8")}t=this._decoder.write(t)}return this._parser.write(t.toString()),this.emit("data",t),!0},a.prototype.end=function(t){return t&&t.length&&this.write(t),this._parser.end(),!0},a.prototype.on=function(t,n){var r=this;return r._parser["on"+t]||-1===o.indexOf(t)||(r._parser["on"+t]=function(){var e=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);e.splice(0,0,t),r.emit.apply(r,e)}),e.prototype.on.call(r,t,n)};var s="http://www.w3.org/XML/1998/namespace",u="http://www.w3.org/2000/xmlns/",c={xml:s,xmlns:u},l=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,f=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,h=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,d=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function p(t){return" "===t||"\n"===t||"\r"===t||"\t"===t}function g(t){return'"'===t||"'"===t}function m(t){return">"===t||p(t)}function y(t,e){return t.test(e)}function v(t,e){return!y(t,e)}var b,T,E,w=0;for(var N in t.STATE={BEGIN:w++,BEGIN_WHITESPACE:w++,TEXT:w++,TEXT_ENTITY:w++,OPEN_WAKA:w++,SGML_DECL:w++,SGML_DECL_QUOTED:w++,DOCTYPE:w++,DOCTYPE_QUOTED:w++,DOCTYPE_DTD:w++,DOCTYPE_DTD_QUOTED:w++,COMMENT_STARTING:w++,COMMENT:w++,COMMENT_ENDING:w++,COMMENT_ENDED:w++,CDATA:w++,CDATA_ENDING:w++,CDATA_ENDING_2:w++,PROC_INST:w++,PROC_INST_BODY:w++,PROC_INST_ENDING:w++,OPEN_TAG:w++,OPEN_TAG_SLASH:w++,ATTRIB:w++,ATTRIB_NAME:w++,ATTRIB_NAME_SAW_WHITE:w++,ATTRIB_VALUE:w++,ATTRIB_VALUE_QUOTED:w++,ATTRIB_VALUE_CLOSED:w++,ATTRIB_VALUE_UNQUOTED:w++,ATTRIB_VALUE_ENTITY_Q:w++,ATTRIB_VALUE_ENTITY_U:w++,CLOSE_TAG:w++,CLOSE_TAG_SAW_WHITE:w++,SCRIPT:w++,SCRIPT_ENDING:w++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach((function(e){var n=t.ENTITIES[e],r="number"==typeof n?String.fromCharCode(n):n;t.ENTITIES[e]=r})),t.STATE)t.STATE[t.STATE[N]]=N;function A(t,e,n){t[e]&&t[e](n)}function I(t,e,n){t.textNode&&_(t),A(t,e,n)}function _(t){t.textNode=B(t.opt,t.textNode),t.textNode&&A(t,"ontext",t.textNode),t.textNode=""}function B(t,e){return t.trim&&(e=e.trim()),t.normalize&&(e=e.replace(/\s+/g," ")),e}function C(t,e){return _(t),t.trackPosition&&(e+="\nLine: "+t.line+"\nColumn: "+t.column+"\nChar: "+t.c),e=new Error(e),t.error=e,A(t,"onerror",e),t}function O(t){return t.sawRoot&&!t.closedRoot&&x(t,"Unclosed root tag"),t.state!==w.BEGIN&&t.state!==w.BEGIN_WHITESPACE&&t.state!==w.TEXT&&C(t,"Unexpected end"),_(t),t.c="",t.closed=!0,A(t,"onend"),i.call(t,t.strict,t.opt),t}function x(t,e){if("object"!=typeof t||!(t instanceof i))throw new Error("bad call to strictFail");t.strict&&C(t,e)}function S(t){t.strict||(t.tagName=t.tagName[t.looseCase]());var e=t.tags[t.tags.length-1]||t,n=t.tag={name:t.tagName,attributes:{}};t.opt.xmlns&&(n.ns=e.ns),t.attribList.length=0,I(t,"onopentagstart",n)}function U(t,e){var n=t.indexOf(":")<0?["",t]:t.split(":"),r=n[0],i=n[1];return e&&"xmlns"===t&&(r="xmlns",i=""),{prefix:r,local:i}}function D(t){if(t.strict||(t.attribName=t.attribName[t.looseCase]()),-1!==t.attribList.indexOf(t.attribName)||t.tag.attributes.hasOwnProperty(t.attribName))t.attribName=t.attribValue="";else{if(t.opt.xmlns){var e=U(t.attribName,!0),n=e.prefix,r=e.local;if("xmlns"===n)if("xml"===r&&t.attribValue!==s)x(t,"xml: prefix must be bound to "+s+"\nActual: "+t.attribValue);else if("xmlns"===r&&t.attribValue!==u)x(t,"xmlns: prefix must be bound to "+u+"\nActual: "+t.attribValue);else{var i=t.tag,o=t.tags[t.tags.length-1]||t;i.ns===o.ns&&(i.ns=Object.create(o.ns)),i.ns[r]=t.attribValue}t.attribList.push([t.attribName,t.attribValue])}else t.tag.attributes[t.attribName]=t.attribValue,I(t,"onattribute",{name:t.attribName,value:t.attribValue});t.attribName=t.attribValue=""}}function P(t,e){if(t.opt.xmlns){var n=t.tag,r=U(t.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||"",n.prefix&&!n.uri&&(x(t,"Unbound namespace prefix: "+JSON.stringify(t.tagName)),n.uri=r.prefix);var i=t.tags[t.tags.length-1]||t;n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach((function(e){I(t,"onopennamespace",{prefix:e,uri:n.ns[e]})}));for(var o=0,a=t.attribList.length;o<a;o++){var s=t.attribList[o],u=s[0],c=s[1],l=U(u,!0),f=l.prefix,h=l.local,d=""===f?"":n.ns[f]||"",p={name:u,value:c,prefix:f,local:h,uri:d};f&&"xmlns"!==f&&!d&&(x(t,"Unbound namespace prefix: "+JSON.stringify(f)),p.uri=f),t.tag.attributes[u]=p,I(t,"onattribute",p)}t.attribList.length=0}t.tag.isSelfClosing=!!e,t.sawRoot=!0,t.tags.push(t.tag),I(t,"onopentag",t.tag),e||(t.noscript||"script"!==t.tagName.toLowerCase()?t.state=w.TEXT:t.state=w.SCRIPT,t.tag=null,t.tagName=""),t.attribName=t.attribValue="",t.attribList.length=0}function R(t){if(!t.tagName)return x(t,"Weird empty close tag."),t.textNode+="</>",void(t.state=w.TEXT);if(t.script){if("script"!==t.tagName)return t.script+="</"+t.tagName+">",t.tagName="",void(t.state=w.SCRIPT);I(t,"onscript",t.script),t.script=""}var e=t.tags.length,n=t.tagName;t.strict||(n=n[t.looseCase]());for(var r=n;e--&&t.tags[e].name!==r;)x(t,"Unexpected close tag");if(e<0)return x(t,"Unmatched closing tag: "+t.tagName),t.textNode+="</"+t.tagName+">",void(t.state=w.TEXT);t.tagName=n;for(var i=t.tags.length;i-- >e;){var o=t.tag=t.tags.pop();t.tagName=t.tag.name,I(t,"onclosetag",t.tagName);var a={};for(var s in o.ns)a[s]=o.ns[s];var u=t.tags[t.tags.length-1]||t;t.opt.xmlns&&o.ns!==u.ns&&Object.keys(o.ns).forEach((function(e){var n=o.ns[e];I(t,"onclosenamespace",{prefix:e,uri:n})}))}0===e&&(t.closedRoot=!0),t.tagName=t.attribValue=t.attribName="",t.attribList.length=0,t.state=w.TEXT}function L(t){var e,n=t.entity,r=n.toLowerCase(),i="";return t.ENTITIES[n]?t.ENTITIES[n]:t.ENTITIES[r]?t.ENTITIES[r]:("#"===(n=r).charAt(0)&&("x"===n.charAt(1)?(n=n.slice(2),i=(e=parseInt(n,16)).toString(16)):(n=n.slice(1),i=(e=parseInt(n,10)).toString(10))),n=n.replace(/^0+/,""),isNaN(e)||i.toLowerCase()!==n?(x(t,"Invalid character entity"),"&"+t.entity+";"):String.fromCodePoint(e))}function F(t,e){"<"===e?(t.state=w.OPEN_WAKA,t.startTagPosition=t.position):p(e)||(x(t,"Non-whitespace before first tag."),t.textNode=e,t.state=w.TEXT)}function M(t,e){var n="";return e<t.length&&(n=t.charAt(e)),n}w=t.STATE,String.fromCodePoint||(b=String.fromCharCode,T=Math.floor,E=function(){var t,e,n=16384,r=[],i=-1,o=arguments.length;if(!o)return"";for(var a="";++i<o;){var s=Number(arguments[i]);if(!isFinite(s)||s<0||s>1114111||T(s)!==s)throw RangeError("Invalid code point: "+s);s<=65535?r.push(s):(t=55296+((s-=65536)>>10),e=s%1024+56320,r.push(t,e)),(i+1===o||r.length>n)&&(a+=b.apply(null,r),r.length=0)}return a},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:E,configurable:!0,writable:!0}):String.fromCodePoint=E)}(e)},214:(t,e,n)=>{"use strict";var r=n(834).Buffer,i=r.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(r.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=s,e=4;break;case"base64":this.text=l,this.end=f,e=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(e)}function a(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function s(t){var e=this.lastTotal-this.lastNeed,n=function(t,e,n){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==n?n:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var n=t.toString("utf16le",e);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,n)}return e}function l(t,e){var n=(t.length-e)%3;return 0===n?t.toString("base64",e):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-n))}function f(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.s=o,o.prototype.write=function(t){if(0===t.length)return"";var e,n;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<t.length?e?e+this.text(t,n):this.text(t,n):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var n=function(t,e,n){var r=e.length-1;if(r<n)return 0;var i=a(e[r]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--r<n||-2===i?0:(i=a(e[r]))>=0?(i>0&&(t.lastNeed=i-2),i):--r<n||-2===i?0:(i=a(e[r]))>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=n;var r=t.length-(n-this.lastNeed);return t.copy(this.lastChar,0,r),t.toString("utf8",e,r)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},668:(t,e,n)=>{t.exports=n(983)},983:(t,e,n)=>{!function(){var e;if(t.exports&&!n.g.xmldocAssumeBrowser)e=n(480);else if(!(e=this.sax))throw new Error("Expected sax to be defined. Make sure you're including sax.js before this file.");function r(t){var e=u[u.length-1].parser;this.name=t.name,this.attr=t.attributes,this.val="",this.children=[],this.firstChild=null,this.lastChild=null,this.line=e.line,this.column=e.column,this.position=e.position,this.startTagPosition=e.startTagPosition}function i(t){this.text=t}function o(t){this.cdata=t}function a(t){this.comment=t}function s(t){if(t&&(t=t.toString().trim()),!t)throw new Error("No XML to parse!");var n;this.doctype="",this.parser=e.parser(!0),(n=this.parser).onopentag=c,n.onclosetag=l,n.ontext=f,n.oncdata=h,n.oncomment=d,n.ondoctype=p,n.onerror=g,u=[this],this.parser.write(t),delete this.parser}r.prototype._addChild=function(t){this.children.push(t),this.firstChild||(this.firstChild=t),this.lastChild=t},r.prototype._opentag=function(t){var e=new r(t);this._addChild(e),u.unshift(e)},r.prototype._closetag=function(){u.shift()},r.prototype._text=function(t){void 0!==this.children&&(this.val+=t,this._addChild(new i(t)))},r.prototype._cdata=function(t){this.val+=t,this._addChild(new o(t))},r.prototype._comment=function(t){void 0!==this.children&&this._addChild(new a(t))},r.prototype._error=function(t){throw t},r.prototype.eachChild=function(t,e){for(var n=0,r=this.children.length;n<r;n++)if("element"===this.children[n].type&&!1===t.call(e,this.children[n],n,this.children))return},r.prototype.childNamed=function(t){for(var e=0,n=this.children.length;e<n;e++){var r=this.children[e];if(r.name===t)return r}},r.prototype.childrenNamed=function(t){for(var e=[],n=0,r=this.children.length;n<r;n++)this.children[n].name===t&&e.push(this.children[n]);return e},r.prototype.childWithAttribute=function(t,e){for(var n=0,r=this.children.length;n<r;n++){var i=this.children[n];if("element"===i.type&&(e&&i.attr[t]===e||!e&&i.attr[t]))return i}},r.prototype.descendantsNamed=function(t){for(var e=[],n=0,r=this.children.length;n<r;n++){var i=this.children[n];"element"===i.type&&(i.name===t&&e.push(i),e=e.concat(i.descendantsNamed(t)))}return e},r.prototype.descendantWithPath=function(t){for(var e=this,n=t.split("."),r=0,i=n.length;r<i;r++){if(!e||"element"!==e.type)return;e=e.childNamed(n[r])}return e},r.prototype.valueWithPath=function(t){var e=t.split("@"),n=this.descendantWithPath(e[0]);return n?e.length>1?n.attr[e[1]]:n.val:void 0},r.prototype.toString=function(t){return this.toStringWithIndent("",t)},r.prototype.toStringWithIndent=function(t,e){var n=t+"<"+this.name,r=e&&e.compressed?"":"\n";for(var i in e&&e.preserveWhitespace,this.attr)Object.prototype.hasOwnProperty.call(this.attr,i)&&(n+=" "+i+'="'+m(this.attr[i])+'"');if(1===this.children.length&&"element"!==this.children[0].type)n+=">"+this.children[0].toString(e)+"</"+this.name+">";else if(this.children.length){n+=">"+r;for(var o=t+(e&&e.compressed?"":" "),a=0,s=this.children.length;a<s;a++)n+=this.children[a].toStringWithIndent(o,e)+r;n+=t+"</"+this.name+">"}else e&&e.html?-1!==["area","base","br","col","embed","frame","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"].indexOf(this.name)?n+="/>":n+="></"+this.name+">":n+="/>";return n},i.prototype.toString=function(t){return y(m(this.text),t)},i.prototype.toStringWithIndent=function(t,e){return t+this.toString(e)},o.prototype.toString=function(t){return"<![CDATA["+y(this.cdata,t)+"]]>"},o.prototype.toStringWithIndent=function(t,e){return t+this.toString(e)},a.prototype.toString=function(t){return"\x3c!--"+y(m(this.comment),t)+"--\x3e"},a.prototype.toStringWithIndent=function(t,e){return t+this.toString(e)},r.prototype.type="element",i.prototype.type="text",o.prototype.type="cdata",a.prototype.type="comment",function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])}(s.prototype,r.prototype),s.prototype._opentag=function(t){void 0===this.children?r.call(this,t):r.prototype._opentag.apply(this,arguments)},s.prototype._doctype=function(t){this.doctype+=t};var u=null;function c(){u[0]&&u[0]._opentag.apply(u[0],arguments)}function l(){u[0]&&u[0]._closetag.apply(u[0],arguments)}function f(){u[0]&&u[0]._text.apply(u[0],arguments)}function h(){u[0]&&u[0]._cdata.apply(u[0],arguments)}function d(){u[0]&&u[0]._comment.apply(u[0],arguments)}function p(){u[0]&&u[0]._doctype.apply(u[0],arguments)}function g(){u[0]&&u[0]._error.apply(u[0],arguments)}function m(t){return t.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'").replace(/"/g,""")}function y(t,e){var n=t;return e&&e.trimmed&&t.length>25&&(n=n.substring(0,25).trim()+"…"),e&&e.preserveWhitespace||(n=n.trim()),n}t.exports&&!n.g.xmldocAssumeBrowser?(t.exports.XmlDocument=s,t.exports.XmlElement=r,t.exports.XmlTextNode=i,t.exports.XmlCDataNode=o,t.exports.XmlCommentNode=a):(this.XmlDocument=s,this.XmlElement=r,this.XmlTextNode=i,this.XmlCDataNode=o,this.XmlCommentNode=a)}()},761:(t,e,n)=>{"use strict";n.d(e,{F:()=>r});const r=function(){}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{Report:()=>c,createArchiveFromArrayBufferList:()=>S,createArchiveFromJszip:()=>O,createArchiveFromText:()=>B,createArchiveFromUrls:()=>I,getArchiveOpfInfo:()=>l,getManifestFromArchive:()=>E,getResourceFromArchive:()=>p,xmldoc:()=>e()});var t=n(668),e=n.n(t),i=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))};const o=(t,{opfBasePath:e,baseUrl:n})=>{const r={contents:[],path:"",href:"",title:""};let i=t.childNamed("span")||t.childNamed("a");r.title=(null==i?void 0:i.attr.title)||(null==i?void 0:i.val.trim())||r.title;let a=null==i?void 0:i.name;"a"!==a&&(i=t.descendantWithPath(`${a}.a`),i&&(a=i.name.toLowerCase())),"a"===a&&(null==i?void 0:i.attr.href)&&(r.path=e?`${e}/${i.attr.href}`:`${i.attr.href}`,r.href=e?`${n}/${e}/${i.attr.href}`:`${n}/${i.attr.href}`);const s=t.childNamed("ol");if(s){const t=s.childrenNamed("li");t&&t.length>0&&(r.contents=t.map((t=>o(t,{opfBasePath:e,baseUrl:n}))))}return r},a=(t,{opfBasePath:e,baseUrl:n,prefix:r})=>{var i,o;const s=(null===(i=null==t?void 0:t.childNamed(`${r}content`))||void 0===i?void 0:i.attr.src)||"",u={title:(null===(o=null==t?void 0:t.descendantWithPath(`${r}navLabel.${r}text`))||void 0===o?void 0:o.val)||"",path:e?`${e}/${s}`:`${s}`,href:e?`${n}/${e}/${s}`:`${n}/${s}`,contents:[]},c=t.childrenNamed(`${r}navPoint`);return c&&c.length>0&&(u.contents=c.map((t=>a(t,{opfBasePath:e,baseUrl:n,prefix:r})))),u};var s=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))};let u=!1;const c={enable:t=>{u=t},log:(...t)=>{u&&console.log("[prose-reader-streamer]",...t)},warn:(...t)=>{u&&console.warn("[prose-reader-streamer]",...t)},error:(...t)=>{console.error(...t)},time:t=>{u&&console.time(`[prose-reader-streamer] [metric] ${t}`)},timeEnd:t=>{u&&console.timeEnd(`[prose-reader-streamer] [metric] ${t}`)},metric:(t,e=1/0)=>{const n="number"==typeof t?t:t.duration;u&&(t.duration<=e?console.log("[prose-reader-streamer] [metric] ",`${t.name} took ${n}ms`):console.warn("[prose-reader-streamer] [metric] ",`${t.name} took ${t.duration}ms which is above the ${e}ms target for this function`))},measurePerformance:(t,e=10,n)=>(...r)=>{const i=performance.now(),o=n(...r);if(o&&o.then)return o.then((n=>{const r=performance.now();return c.metric({name:t,duration:r-i},e),n}));const a=performance.now();return c.metric({name:t,duration:a-i},e),o}},l=t=>{const e=Object.values(t.files).filter((t=>!t.dir)),n=e.find((t=>t.uri.endsWith(".opf")));return{data:n,basePath:(null==n?void 0:n.uri.substring(0,n.uri.lastIndexOf("/")))||""}};const f=t=>{var e;const n=t.childNamed("manifest");return(null===(e=null==n?void 0:n.childrenNamed("item"))||void 0===e?void 0:e.map((t=>({href:t.attr.href||"",id:t.attr.id||"",mediaType:t.attr["media-type"]}))))||[]},h=({archive:t,baseUrl:n})=>r=>{return u=void 0,h=void 0,p=function*(){var u;const{data:h,basePath:d}=l(t)||{},p=yield(t=>s(void 0,void 0,void 0,(function*(){const n={renditionLayout:void 0};return yield Promise.all(t.files.map((t=>s(void 0,void 0,void 0,(function*(){var r,i;if(t.uri.endsWith("com.kobobooks.display-options.xml")){const o=null===(r=new(e().XmlDocument)(yield t.string()).childNamed("platform"))||void 0===r?void 0:r.childNamed("option");"fixed-layout"===(null===(i=null==o?void 0:o.attr)||void 0===i?void 0:i.name)&&"true"===o.val&&(n.renditionLayout="pre-paginated")}}))))),n})))(t);if(!h)return r;const g=yield h.string();c.log(g,p);const m=new(e().XmlDocument)(g),y=(yield((t,n,{baseUrl:r})=>i(void 0,void 0,void 0,(function*(){const{basePath:s}=l(n)||{};return(yield(({opfData:t,opfBasePath:n,baseUrl:r,archive:o})=>i(void 0,void 0,void 0,(function*(){var i;const s=t.childNamed("spine"),u=s&&s.attr.toc;if(u){const s=null===(i=t.childNamed("manifest"))||void 0===i?void 0:i.childrenNamed("item").find((t=>t.attr.id===u));if(s){const t=`${n}${""===n?"":"/"}${s.attr.href}`,i=Object.values(o.files).find((e=>e.uri.endsWith(t)));if(i)return((t,{opfBasePath:e,baseUrl:n})=>{var r;const i=[],o=t.name;let s="";return-1!==o.indexOf(":")&&(s=o.split(":")[0]+":"),null===(r=t.childNamed(`${s}navMap`))||void 0===r||r.childrenNamed(`${s}navPoint`).forEach((t=>i.push(a(t,{opfBasePath:e,baseUrl:n,prefix:s})))),i})(new(e().XmlDocument)(yield i.string()),{opfBasePath:n,baseUrl:r})}}})))({opfData:t,opfBasePath:s,archive:n,baseUrl:r}))||(yield((t,n,{opfBasePath:r,baseUrl:a})=>i(void 0,void 0,void 0,(function*(){var i;const s=null===(i=t.childNamed("manifest"))||void 0===i?void 0:i.childrenNamed("item").find((t=>"nav"===t.attr.properties));if(s){const t=Object.values(n.files).find((t=>t.uri.endsWith(s.attr.href||"")));if(t)return((t,{opfBasePath:e,baseUrl:n})=>{var r,i;const a=[];let s;return t.descendantWithPath("body.nav.ol")?s=null===(r=t.descendantWithPath("body.nav.ol"))||void 0===r?void 0:r.children:t.descendantWithPath("body.section.nav.ol")&&(s=null===(i=t.descendantWithPath("body.section.nav.ol"))||void 0===i?void 0:i.children),s&&s.length>0&&s.filter((t=>"li"===t.name)).forEach((t=>a.push(o(t,{opfBasePath:e,baseUrl:n})))),a})(new(e().XmlDocument)(yield t.string()),{opfBasePath:r,baseUrl:a})}})))(t,n,{opfBasePath:s,baseUrl:r}))})))(m,t,{baseUrl:n}))||[],v=m.childNamed("metadata"),b=m.childNamed("manifest"),T=m.childNamed("spine"),E=m.childNamed("guide"),w=null==v?void 0:v.childNamed("dc:title"),N=(null==v?void 0:v.childrenNamed("meta"))||[],A=N.find((t=>"rendition:layout"===t.attr.property)),I=N.find((t=>"rendition:flow"===t.attr.property)),_=N.find((t=>"rendition:spread"===t.attr.property)),B=null==A?void 0:A.val,C=null==I?void 0:I.val,O=null==_?void 0:_.val,x=(null==w?void 0:w.val)||(null===(u=t.files.find((({dir:t})=>t)))||void 0===u?void 0:u.basename)||"",S=null==T?void 0:T.attr["page-progression-direction"],U=null==T?void 0:T.childrenNamed("itemref").map((t=>t.attr.idref)),D=(null==b?void 0:b.childrenNamed("item").filter((t=>U.includes(t.attr.id||""))))||[],P=t.files.filter((t=>D.find((e=>d?`${d}/${e.attr.href}`===t.uri:`${e.attr.href}`===t.uri)))).reduce(((t,e)=>e.size+t),0);return{filename:t.filename,nav:{toc:y},renditionLayout:B||p.renditionLayout||"reflowable",renditionFlow:C||"auto",renditionSpread:O,title:x,readingDirection:S||"ltr",spineItems:(null==T?void 0:T.childrenNamed("itemref").map((e=>{var r,i,o;const a=null==b?void 0:b.childrenNamed("item").find((t=>t.attr.id===(null==e?void 0:e.attr.idref))),s=(null==a?void 0:a.attr.href)||"",u=(null===(r=null==e?void 0:e.attr.properties)||void 0===r?void 0:r.split(" "))||[],c=(null===(i=t.files.find((t=>t.uri.endsWith(s))))||void 0===i?void 0:i.size)||0;return Object.assign(Object.assign({id:(null==a?void 0:a.attr.id)||"",path:d?`${d}/${null==a?void 0:a.attr.href}`:`${null==a?void 0:a.attr.href}`,href:(null===(o=null==a?void 0:a.attr.href)||void 0===o?void 0:o.startsWith("https://"))?null==a?void 0:a.attr.href:d?`${n}/${d}/${null==a?void 0:a.attr.href}`:`${n}/${null==a?void 0:a.attr.href}`,renditionLayout:B||"reflowable"},u.find((t=>"rendition:layout-reflowable"===t))&&{renditionLayout:"reflowable"}),{progressionWeight:c/P,pageSpreadLeft:u.some((t=>"page-spread-left"===t))||void 0,pageSpreadRight:u.some((t=>"page-spread-right"===t))||void 0,mediaType:null==a?void 0:a.attr["media-type"]})})))||[],items:f(m),guide:null==E?void 0:E.childrenNamed("reference").map((t=>({href:t.attr.href||"",title:t.attr.title||"",type:t.attr.type})))}},new((d=void 0)||(d=Promise))((function(t,e){function n(t){try{i(p.next(t))}catch(t){e(t)}}function r(t){try{i(p.throw(t))}catch(t){e(t)}}function i(e){var i;e.done?t(e.value):(i=e.value,i instanceof d?i:new d((function(t){t(i)}))).then(n,r)}i((p=p.apply(u,h||[])).next())}));var u,h,d,p};var d=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))};const p=(t,e)=>d(void 0,void 0,void 0,(function*(){const n=Object.values(t.files).find((t=>t.uri===e)),r=yield g(t,e);if(!n)throw new Error("no file found");const i=yield n.blob();return new Response(i,{headers:Object.assign(Object.assign(Object.assign({},i.type&&{"Content-Type":i.type}),n.encodingFormat&&{"Content-Type":n.encodingFormat}),r.mediaType&&{"Content-Type":r.mediaType})})})),g=(t,n)=>d(void 0,void 0,void 0,(function*(){var r,i;const o=l(t),a=yield null===(r=o.data)||void 0===r?void 0:r.string();if(a){const t=new(e().XmlDocument)(a);return{mediaType:null===(i=f(t).find((t=>n.endsWith(t.href))))||void 0===i?void 0:i.mediaType}}return{mediaType:m(n)}})),m=t=>t.endsWith(".css")?"text/css; charset=UTF-8":t.endsWith(".jpg")?"image/jpg":t.endsWith(".xhtml")?"application/xhtml+xml":t.endsWith(".mp4")?"video/mp4":t.endsWith(".svg")?"image/svg+xml":void 0;const y=({archive:t,baseUrl:n})=>n=>{return r=void 0,i=void 0,a=function*(){var r;const i=t.files.find((t=>"comicinfo.xml"===t.basename.toLowerCase()));if(!i)return n;const o=yield i.string(),a=(null===(r=new(e().XmlDocument)(o).childNamed("Manga"))||void 0===r?void 0:r.val)||"unknown";return Object.assign(Object.assign({},n),{spineItems:n.spineItems.filter((t=>"comicinfo.xml"!==t.id.toLowerCase())),readingDirection:"YesAndRightToLeft"===a?"rtl":"ltr"})},new((o=void 0)||(o=Promise))((function(t,e){function n(t){try{u(a.next(t))}catch(t){e(t)}}function s(t){try{u(a.throw(t))}catch(t){e(t)}}function u(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o((function(t){t(r)}))).then(n,s)}u((a=a.apply(r,i||[])).next())}));var r,i,o,a};const v=({archive:t,baseUrl:e})=>n=>{return r=void 0,i=void 0,a=function*(){var n;const r=Object.values(t.files).filter((t=>!t.dir));return{filename:t.filename,nav:{toc:[]},title:(null===(n=t.files.find((({dir:t})=>t)))||void 0===n?void 0:n.basename.replace(/\/$/,""))||"",renditionLayout:"pre-paginated",renditionSpread:"auto",readingDirection:"ltr",spineItems:r.map((t=>({id:t.basename,path:`${t.uri}`,href:e?`${e}/${t.uri}`:t.uri,renditionLayout:"pre-paginated",progressionWeight:1/r.length,pageSpreadLeft:void 0,pageSpreadRight:void 0,mediaType:t.encodingFormat}))),items:r.map((t=>({id:t.basename,href:e?`${e}/${t.uri}`:t.uri})))}},new((o=void 0)||(o=Promise))((function(t,e){function n(t){try{u(a.next(t))}catch(t){e(t)}}function s(t){try{u(a.throw(t))}catch(t){e(t)}}function u(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o((function(t){t(r)}))).then(n,s)}u((a=a.apply(r,i||[])).next())}));var r,i,o,a};var b=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))};const T={filename:"",items:[],nav:{toc:[]},readingDirection:"ltr",renditionLayout:"pre-paginated",renditionSpread:"auto",spineItems:[],title:""},E=(t,{baseUrl:e=""}={})=>b(void 0,void 0,void 0,(function*(){const n=[v({archive:t,baseUrl:e}),h({archive:t,baseUrl:e}),y({archive:t,baseUrl:e})];try{const t=yield n.reduce(((t,e)=>b(void 0,void 0,void 0,(function*(){return yield e(yield t)}))),Promise.resolve(T)),e=JSON.stringify(t);return new Response(e,{status:200})}catch(t){return c.error(t),new Response(null==t?void 0:t.message,{status:500})}})),w=t=>{var e,n;switch((null===(n=null===(e=t.split(/[#?]/)[0])||void 0===e?void 0:e.split(".").pop())||void 0===n?void 0:n.trim())||""){case"png":return"image/png";case"jpg":return"image/jpg";case"jpeg":return"image/jpeg";case"txt":return"text/plain";case"webp":return"image/webp"}},N=t=>t.substring(t.lastIndexOf("/")+1)||t;var A=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))};const I=(t,e)=>A(void 0,void 0,void 0,(function*(){const n=`\n <?xml version="1.0" encoding="UTF-8"?><package xmlns="http://www.idpf.org/2007/opf" version="2.0" unique-identifier="bookid">\n <metadata>\n <meta property="rendition:layout">${(null==e?void 0:e.useRenditionFlow)?"reflowable":"pre-paginated"}</meta>\n ${(null==e?void 0:e.useRenditionFlow)?'<meta property="rendition:flow">scrolled-continuous</meta>':""}\n </metadata>\n <manifest>\n ${t.map((t=>`<item id="${N(t)}" href="${t}" media-type="${w(t)}"/>`)).join("\n")}\n </manifest>\n <spine>\n ${t.map((t=>`<itemref idref="${N(t)}" />`)).join("\n")}\n </spine>\n </package>\n `;return{filename:"",files:[{dir:!1,basename:"content.opf",uri:"content.opf",size:0,base64:()=>A(void 0,void 0,void 0,(function*(){return n})),blob:()=>A(void 0,void 0,void 0,(function*(){return new Blob})),string:()=>A(void 0,void 0,void 0,(function*(){return n}))},...t.map((e=>({dir:!1,basename:N(e),encodingFormat:w(e),uri:e,size:100/t.length,base64:()=>A(void 0,void 0,void 0,(function*(){return""})),blob:()=>A(void 0,void 0,void 0,(function*(){return new Blob})),string:()=>A(void 0,void 0,void 0,(function*(){return""}))})))]}}));var _=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))};const B=(t,e)=>_(void 0,void 0,void 0,(function*(){const n=`\n <?xml version="1.0" encoding="UTF-8"?>\n <package xmlns="http://www.idpf.org/2007/opf" version="3.0" xml:lang="ja" prefix="rendition: http://www.idpf.org/vocab/rendition/#"\n unique-identifier="ootuya-id">\n <metadata xmlns:opf="http://www.idpf.org/2007/opf" xmlns:dc="http://purl.org/dc/elements/1.1/"\n xmlns:dcterms="http://purl.org/dc/terms/">\n <meta property="rendition:layout">reflowable</meta>\n </metadata>\n <manifest>\n <item id="p01" href="p01.txt" media-type="text/plain"/>\n </manifest>\n <spine page-progression-direction="${(null==e?void 0:e.direction)||"ltr"}">\n <itemref idref="p01" />\n </spine>\n </package>\n `;return{filename:"content.txt",files:[{dir:!1,basename:N("generated.opf"),uri:"generated.opf",blob:()=>_(void 0,void 0,void 0,(function*(){return new Blob([n])})),string:()=>_(void 0,void 0,void 0,(function*(){return n})),base64:()=>_(void 0,void 0,void 0,(function*(){return btoa(n)})),size:0},{dir:!1,basename:N("p01.txt"),uri:"p01.txt",blob:()=>_(void 0,void 0,void 0,(function*(){return"string"==typeof t?new Blob([t]):t})),string:()=>_(void 0,void 0,void 0,(function*(){return"string"==typeof t?t:t.text()})),base64:()=>_(void 0,void 0,void 0,(function*(){return"string"==typeof t?btoa(t):(o=t,e=void 0,n=void 0,i=function*(){return new Promise((t=>{const e=new FileReader;e.readAsDataURL(o),e.onloadend=function(){const n=e.result;t(n)}}))},new((r=void 0)||(r=Promise))((function(t,o){function a(t){try{u(i.next(t))}catch(t){o(t)}}function s(t){try{u(i.throw(t))}catch(t){o(t)}}function u(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r((function(t){t(n)}))).then(a,s)}u((i=i.apply(e,n||[])).next())})));var e,n,r,i,o})),size:"string"==typeof t?t.length:t.size,encodingFormat:"text/plain"}]}})),C=(t,e)=>{var n;const r=t.split(/(\d+)/),i=e.split(/(\d+)/);for(let t=0,e=r.length;t<e;t++)if(r[t]!==i[t])return(null===(n=r[t])||void 0===n?void 0:n.match(/\d/))?+(r[t]||"")-+(i[t]||""):(r[t]||"").localeCompare(i[t]||"");return 1};const O=(t,{orderByAlpha:e,name:n}={})=>{return r=void 0,i=void 0,a=function*(){let r=Object.values(t.files);return e&&(r=r.sort(((t,e)=>C(t.name,e.name)))),{filename:n||"",files:r.map((t=>Object.assign(Object.assign({dir:t.dir,basename:N(t.name),uri:t.name,blob:()=>t.async("blob"),string:()=>t.async("string"),base64:()=>t.async("base64")},t.internalStream&&{stream:t.internalStream}),{size:t._data.uncompressedSize})))}},new((o=void 0)||(o=Promise))((function(t,e){function n(t){try{u(a.next(t))}catch(t){e(t)}}function s(t){try{u(a.throw(t))}catch(t){e(t)}}function u(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o((function(t){t(r)}))).then(n,s)}u((a=a.apply(r,i||[])).next())}));var r,i,o,a};var x=function(t,e,n,r){return new(n||(n=Promise))((function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}u((r=r.apply(t,e||[])).next())}))};const S=(t,{orderByAlpha:e,name:n}={})=>x(void 0,void 0,void 0,(function*(){let r=t;return e&&(r=r.sort(((t,e)=>C(t.name,e.name)))),{filename:n||"",files:r.map((t=>({dir:t.isDir,basename:N(t.name),uri:t.name,blob:()=>x(void 0,void 0,void 0,(function*(){return new Blob([yield t.data()])})),string:()=>x(void 0,void 0,void 0,(function*(){const e=yield t.data();return String.fromCharCode.apply(null,Array.from(new Uint16Array(e)))})),base64:()=>x(void 0,void 0,void 0,(function*(){return""})),size:t.size})))}}))})();var i=exports;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prose-reader/streamer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.37",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -18,25 +18,22 @@
|
|
|
18
18
|
"test": "jest"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@prose-reader/shared": "^0.0.
|
|
21
|
+
"@prose-reader/shared": "^0.0.7",
|
|
22
22
|
"@types/xmldoc": "^1.1.5",
|
|
23
23
|
"buffer": "6.0.3",
|
|
24
24
|
"xmldoc": "^1.1.2"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@babel/preset-typescript": "^7.16.5",
|
|
28
|
-
"@types/jest": "^27.0.3",
|
|
29
28
|
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
|
30
29
|
"@typescript-eslint/parser": "^5.0.0",
|
|
31
|
-
"eslint": "^7.32.0",
|
|
32
30
|
"eslint-config-prettier": "^8.3.0",
|
|
33
|
-
"eslint-config-standard": "^16.0.3",
|
|
34
31
|
"eslint-plugin-import": "^2.25.2",
|
|
35
32
|
"eslint-plugin-jest": "^25.3.2",
|
|
36
33
|
"eslint-plugin-node": "^11.1.0",
|
|
37
34
|
"eslint-plugin-promise": "^5.2.0",
|
|
38
35
|
"isomorphic-fetch": "^3.0.0",
|
|
39
|
-
"jest": "^
|
|
36
|
+
"jest": "^29.1.2",
|
|
40
37
|
"prettier": "^2.5.1",
|
|
41
38
|
"ts-loader": "^9.2.8",
|
|
42
39
|
"ts-node": "^10.4.0",
|
|
@@ -45,5 +42,5 @@
|
|
|
45
42
|
"webpack-cli": "^4.9.1",
|
|
46
43
|
"webpack-dev-server": "^4.6.0"
|
|
47
44
|
},
|
|
48
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "1f28c007ad5b72e6a131e77aa3438b652d0203c2"
|
|
49
46
|
}
|