@loaders.gl/tile-converter 3.1.0-alpha.5 → 3.1.0-beta.7
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/bundle.js +86025 -0
- package/dist/converter.min.js +22 -22
- package/dist/es5/3d-tiles-converter/helpers/b3dm-converter.js +2 -2
- package/dist/es5/3d-tiles-converter/helpers/b3dm-converter.js.map +1 -1
- package/dist/es5/i3s-converter/helpers/geometry-converter.js +2 -18
- package/dist/es5/i3s-converter/helpers/geometry-converter.js.map +1 -1
- package/dist/es5/pgm-loader.js +1 -1
- package/dist/es5/pgm-loader.js.map +1 -1
- package/dist/esm/3d-tiles-converter/helpers/b3dm-converter.js +1 -1
- package/dist/esm/3d-tiles-converter/helpers/b3dm-converter.js.map +1 -1
- package/dist/esm/i3s-converter/helpers/geometry-converter.js +2 -18
- package/dist/esm/i3s-converter/helpers/geometry-converter.js.map +1 -1
- package/dist/esm/pgm-loader.js +1 -1
- package/dist/esm/pgm-loader.js.map +1 -1
- package/package.json +18 -17
- package/src/3d-tiles-converter/helpers/b3dm-converter.js +1 -1
- package/src/i3s-converter/helpers/geometry-converter.js +5 -13
- package/dist/dist.min.js +0 -94
- package/dist/dist.min.js.map +0 -1
package/dist/dist.min.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("loaders"));else if("function"==typeof define&&define.amd)define(["loaders"],e);else{var r="object"==typeof exports?e(require("loaders")):e(t.loaders);for(var n in r)("object"==typeof exports?exports:t)[n]=r[n]}}(window,(function(t){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=149)}([function(t,e){var r,n,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(t){r=o}try{n="function"==typeof clearTimeout?clearTimeout:s}catch(t){n=s}}();var u,c=[],l=!1,h=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&d())}function d(){if(!l){var t=a(f);l=!0;for(var e=c.length;e;){for(u=c,c=[];++h<e;)u&&u[h].run();h=-1,e=c.length}u=null,l=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===s||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];c.push(new p(t,e)),1!==c.length||l||a(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e){},function(e,r){e.exports=t},function(t,e,r){"use strict";(function(t){r.d(e,"d",(function(){return s})),r.d(e,"e",(function(){return a})),r.d(e,"b",(function(){return u})),r.d(e,"c",(function(){return c})),r.d(e,"a",(function(){return l}));var n=r(10),i=r(1),o=r(56);async function s(t,e,r="index.json"){await n.promises.mkdir(t,{recursive:!0});const o=Object(i.join)(t,r);try{await n.promises.writeFile(o,e)}catch(t){throw t}return console.log(o+" saved."),o}async function a(t,e,r="index.json",n=!0){const i=await s(t,e,r);if(n){const t=await Object(o.a)(i);return await c(i),t}return i}function u(t){return n.promises.rmdir(t,{recursive:!0})}function c(t){return n.promises.unlink(t)}function l(e){return Object(i.isAbsolute)(e)?e:Object(i.join)(t.cwd(),e)}}).call(this,r(0))},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},,function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var n={};function i(t){const e=t&&t.lastIndexOf("/");return e>=0?t.substr(e+1):""}function o(t){const e=t&&t.lastIndexOf("/");return e>=0?t.substr(0,e):""}function s(...t){return(t=t.map((e,r)=>(r&&(e=e.replace(new RegExp("^/"),"")),r!==t.length-1&&(e=e.replace(new RegExp("/$"),"")),e))).join("/")}r.r(n),r.d(n,"filename",(function(){return i})),r.d(n,"dirname",(function(){return o})),r.d(n,"join",(function(){return s}));r(45),r(78)},function(t,e,r){const n=r(150);t.exports=n},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";(function(t){
|
|
2
|
-
/*!
|
|
3
|
-
* The buffer module from node.js, for the browser.
|
|
4
|
-
*
|
|
5
|
-
* @author Feross Aboukhadijeh <http://feross.org>
|
|
6
|
-
* @license MIT
|
|
7
|
-
*/
|
|
8
|
-
var n=r(152),i=r(153),o=r(80);function s(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(s()<e)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(e)).__proto__=u.prototype:(null===t&&(t=new u(e)),t.length=e),t}function u(t,e,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(t,e,r);if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return h(this,t)}return c(this,t,e,r)}function c(t,e,r,n){if("number"==typeof e)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer?function(t,e,r,n){if(e.byteLength,r<0||e.byteLength<r)throw new RangeError("'offset' is out of bounds");if(e.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");e=void 0===r&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,r):new Uint8Array(e,r,n);u.TYPED_ARRAY_SUPPORT?(t=e).__proto__=u.prototype:t=f(t,e);return t}(t,e,r,n):"string"==typeof e?function(t,e,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(e,r),i=(t=a(t,n)).write(e,r);i!==n&&(t=t.slice(0,i));return t}(t,e,r):function(t,e){if(u.isBuffer(e)){var r=0|d(e.length);return 0===(t=a(t,r)).length||e.copy(t,0,0,r),t}if(e){if("undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return"number"!=typeof e.length||(n=e.length)!=n?a(t,0):f(t,e);if("Buffer"===e.type&&o(e.data))return f(t,e.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,e)}function l(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function h(t,e){if(l(e),t=a(t,e<0?0:0|d(e)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<e;++r)t[r]=0;return t}function f(t,e){var r=e.length<0?0:0|d(e.length);t=a(t,r);for(var n=0;n<r;n+=1)t[n]=255&e[n];return t}function d(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function p(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return j(t).length;default:if(n)return G(t).length;e=(""+e).toLowerCase(),n=!0}}function m(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return O(this,e,r);case"utf8":case"utf-8":return C(this,e,r);case"ascii":return T(this,e,r);case"latin1":case"binary":return R(this,e,r);case"base64":return B(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function _(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:b(t,e,r,n,i);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):b(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=r;o<a;o++)if(c(t,o)===c(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var h=!0,f=0;f<u;f++)if(c(t,o+f)!==c(e,f)){h=!1;break}if(h)return o}return-1}function y(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(isNaN(a))return s;t[r+s]=a}return s}function w(t,e,r,n){return H(G(e,t.length-r),t,r,n)}function v(t,e,r,n){return H(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function A(t,e,r,n){return v(t,e,r,n)}function E(t,e,r,n){return H(j(e),t,r,n)}function S(t,e,r,n){return H(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function B(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function C(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,c=t[i],l=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(l=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,h=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=h}return function(t){var e=t.length;if(e<=4096)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=4096));return r}(n)}e.Buffer=u,e.SlowBuffer=function(t){+t!=t&&(t=0);return u.alloc(+t)},e.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),e.kMaxLength=s(),u.poolSize=8192,u._augment=function(t){return t.__proto__=u.prototype,t},u.from=function(t,e,r){return c(null,t,e,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(t,e,r){return function(t,e,r,n){return l(e),e<=0?a(t,e):void 0!==r?"string"==typeof n?a(t,e).fill(r,n):a(t,e).fill(r):a(t,e)}(null,t,e,r)},u.allocUnsafe=function(t){return h(null,t)},u.allocUnsafeSlow=function(t){return h(null,t)},u.isBuffer=function(t){return!(null==t||!t._isBuffer)},u.compare=function(t,e){if(!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?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(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var s=t[r];if(!u.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(n,i),i+=s.length}return n},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},u.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?C(this,0,t):m.apply(this,arguments)},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(){var t="",r=e.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),"<Buffer "+t+">"},u.prototype.compare=function(t,e,r,n,i){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),c=this.slice(n,i),l=t.slice(e,r),h=0;h<a;++h)if(c[h]!==l[h]){o=c[h],s=l[h];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return _(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return _(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return y(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return v(this,t,e,r);case"latin1":case"binary":return A(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function T(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function R(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function O(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=U(t[o]);return i}function I(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function M(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function x(t,e,r,n,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(r+n>t.length)throw new RangeError("Index out of range")}function D(t,e,r,n){e<0&&(e=65535+e+1);for(var i=0,o=Math.min(t.length-r,2);i<o;++i)t[r+i]=(e&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function k(t,e,r,n){e<0&&(e=4294967295+e+1);for(var i=0,o=Math.min(t.length-r,4);i<o;++i)t[r+i]=e>>>8*(n?i:3-i)&255}function P(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(t,e,r,n,o){return o||P(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function F(t,e,r,n,o){return o||P(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((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),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(t,e)).__proto__=u.prototype;else{var i=e-t;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+t]}return r},u.prototype.readUIntLE=function(t,e,r){t|=0,e|=0,r||M(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUIntBE=function(t,e,r){t|=0,e|=0,r||M(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUInt8=function(t,e){return e||M(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||M(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||M(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||M(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||M(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return e||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||M(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||M(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||M(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 e||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||M(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||M(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||M(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||M(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||x(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||x(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):k(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):k(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);x(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var i=Math.pow(2,8*r-1);x(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):D(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):D(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):k(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||x(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):k(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return F(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return F(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=u.isBuffer(t)?t:G(new u(t,n).toString()),a=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var N=/[^+\/0-9A-Za-z-_]/g;function U(t){return t<16?"0"+t.toString(16):t.toString(16)}function G(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function j(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(N,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}}).call(this,r(8))},function(t,e){},function(t,e,r){"use strict";var n,i="object"==typeof Reflect?Reflect:null,o=i&&"function"==typeof i.apply?i.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var s=Number.isNaN||function(t){return t!=t};function a(){a.init.call(this)}t.exports=a,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}_(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&_(t,"error",e,r)}(t,i,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var u=10;function c(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function l(t){return void 0===t._maxListeners?a.defaultMaxListeners:t._maxListeners}function h(t,e,r,n){var i,o,s,a;if(c(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),void 0===s)s=o[e]=r,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=l(t))>0&&s.length>i&&!s.warned){s.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=s.length,a=u,console&&console.warn&&console.warn(a)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=f.bind(n);return i.listener=r,n.wrapFn=i,i}function p(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):g(i,i.length)}function m(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function g(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function _(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");u=t}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||s(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var n="error"===t,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=i[t];if(void 0===u)return!1;if("function"==typeof u)o(u,this,e);else{var c=u.length,l=g(u,c);for(r=0;r<c;++r)o(l[r],this,e)}return!0},a.prototype.addListener=function(t,e){return h(this,t,e,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(t,e){return h(this,t,e,!0)},a.prototype.once=function(t,e){return c(e),this.on(t,d(this,t,e)),this},a.prototype.prependOnceListener=function(t,e){return c(e),this.prependListener(t,d(this,t,e)),this},a.prototype.removeListener=function(t,e){var r,n,i,o,s;if(c(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,s||e)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},a.prototype.listeners=function(t){return p(this,t,!0)},a.prototype.rawListeners=function(t){return p(this,t,!1)},a.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):m.call(t,e)},a.prototype.listenerCount=m,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},function(t,e,r){(function(t){var n=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},i=/%[sdj%]/g;e.format=function(t){if(!_(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(a(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,o=n.length,s=String(t).replace(i,(function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),u=n[r];r<o;u=n[++r])m(u)||!w(u)?s+=" "+u:s+=" "+a(u);return s},e.deprecate=function(r,n){if(void 0!==t&&!0===t.noDeprecation)return r;if(void 0===t)return function(){return e.deprecate(r,n).apply(this,arguments)};var i=!1;return function(){if(!i){if(t.throwDeprecation)throw new Error(n);t.traceDeprecation?console.trace(n):console.error(n),i=!0}return r.apply(this,arguments)}};var o,s={};function a(t,r){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(r)?n.showHidden=r:r&&e._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),l(n,t,n.depth)}function u(t,e){var r=a.styles[e];return r?"["+a.colors[r][0]+"m"+t+"["+a.colors[r][1]+"m":t}function c(t,e){return t}function l(t,r,n){if(t.customInspect&&r&&E(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return _(i)||(i=l(t,i,n)),i}var o=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(_(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(g(e))return t.stylize(""+e,"number");if(p(e))return t.stylize(""+e,"boolean");if(m(e))return t.stylize("null","null")}(t,r);if(o)return o;var s=Object.keys(r),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),A(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return h(r);if(0===s.length){if(E(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(y(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(v(r))return t.stylize(Date.prototype.toString.call(r),"date");if(A(r))return h(r)}var c,w="",S=!1,B=["{","}"];(d(r)&&(S=!0,B=["[","]"]),E(r))&&(w=" [Function"+(r.name?": "+r.name:"")+"]");return y(r)&&(w=" "+RegExp.prototype.toString.call(r)),v(r)&&(w=" "+Date.prototype.toUTCString.call(r)),A(r)&&(w=" "+h(r)),0!==s.length||S&&0!=r.length?n<0?y(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=S?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)R(e,String(s))?o.push(f(t,e,r,n,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(f(t,e,r,n,i,!0))})),o}(t,r,n,a,s):s.map((function(e){return f(t,r,n,a,e,S)})),t.seen.pop(),function(t,e,r){if(t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(c,w,B)):B[0]+w+B[1]}function h(t){return"["+Error.prototype.toString.call(t)+"]"}function f(t,e,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),R(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=m(r)?l(t,u.value,null):l(t,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),b(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function d(t){return Array.isArray(t)}function p(t){return"boolean"==typeof t}function m(t){return null===t}function g(t){return"number"==typeof t}function _(t){return"string"==typeof t}function b(t){return void 0===t}function y(t){return w(t)&&"[object RegExp]"===S(t)}function w(t){return"object"==typeof t&&null!==t}function v(t){return w(t)&&"[object Date]"===S(t)}function A(t){return w(t)&&("[object Error]"===S(t)||t instanceof Error)}function E(t){return"function"==typeof t}function S(t){return Object.prototype.toString.call(t)}function B(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(r){if(b(o)&&(o=t.env.NODE_DEBUG||""),r=r.toUpperCase(),!s[r])if(new RegExp("\\b"+r+"\\b","i").test(o)){var n=t.pid;s[r]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",r,n,t)}}else s[r]=function(){};return s[r]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=p,e.isNull=m,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=_,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=b,e.isRegExp=y,e.isObject=w,e.isDate=v,e.isError=A,e.isFunction=E,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(165);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T(){var t=new Date,e=[B(t.getHours()),B(t.getMinutes()),B(t.getSeconds())].join(":");return[t.getDate(),C[t.getMonth()],e].join(" ")}function R(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",T(),e.format.apply(e,arguments))},e.inherits=r(166),e._extend=function(t,e){if(!e||!w(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var O="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function I(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(O&&t[O]){var e;if("function"!=typeof(e=t[O]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,O,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,i)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),O&&Object.defineProperty(e,O,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,n(t))},e.promisify.custom=O,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function r(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var i=r.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,s=function(){return i.apply(o,arguments)};e.apply(this,r).then((function(e){t.nextTick(s,null,e)}),(function(e){t.nextTick(I,e,s)}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Object.defineProperties(r,n(e)),r}}).call(this,r(0))},function(t,e,r){"use strict";var n=r(158).Buffer,i=n.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&&(n.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=a,e=4;break;case"base64":this.text=l,this.end=h,e=3;break;default:return this.write=f,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){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!==r?r: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 r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}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 r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function l(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?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-r))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):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 r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if((i=s(e[n]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},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}},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return i}));"undefined"!=typeof self&&self,"undefined"!=typeof window&&window,"undefined"!=typeof document&&document;const i=Boolean("object"!=typeof n||"[object process]"!==String(n)||n.browser),o=void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version);o&&parseFloat(o[1])}).call(this,r(8),r(0))},function(t,e,r){"use strict";r.d(e,"a",(function(){return n})),r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return o}));r(19);function n(...t){const e=t.map(t=>t instanceof ArrayBuffer?new Uint8Array(t):t),r=e.reduce((t,e)=>t+e.byteLength,0),n=new Uint8Array(r);let i=0;for(const t of e)n.set(t,i),i+=t.byteLength;return n.buffer}function i(...t){const e=t,r=e&&e.length>1&&e[0].constructor||null;if(!r)throw new Error('"concatenateTypedArrays" - incorrect quantity of arguments or arguments have incompatible data types');const n=new r(e.reduce((t,e)=>t+e.length,0));let i=0;for(const t of e)n.set(t,i),i+=t.length;return n}function o(t,e,r){const n=void 0!==r?new Uint8Array(t).subarray(e,e+r):new Uint8Array(t).subarray(e);return new Uint8Array(n).buffer}},function(t,e,r){"use strict";(function(t,n){r.d(e,"a",(function(){return o})),r.d(e,"b",(function(){return s})),r.d(e,"c",(function(){return a}));const i={self:"undefined"!=typeof self&&self,window:"undefined"!=typeof window&&window,global:void 0!==t&&t,document:"undefined"!=typeof document&&document},o=i.global||i.self||i.window||{},s="object"!=typeof n||"[object process]"!==String(n)||n.browser,a="function"==typeof importScripts,u=("undefined"!=typeof window&&window.orientation,void 0!==n&&n.version&&/v([0-9]*)/.exec(n.version));u&&parseFloat(u[1])}).call(this,r(8),r(0))},,function(t,e,r){"use strict";var n=r(48),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=h;var o=Object.create(r(33));o.inherits=r(4);var s=r(81),a=r(60);o.inherits(h,s);for(var u=i(a.prototype),c=0;c<u.length;c++){var l=u[c];h.prototype[l]||(h.prototype[l]=a.prototype[l])}function h(t){if(!(this instanceof h))return new h(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",f)}function f(){this.allowHalfOpen||this._writableState.ended||n.nextTick(d,this)}function d(t){t.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),h.prototype._destroy=function(t,e){this.push(null),this.end(),n.nextTick(e,t)}},function(t,e,r){"use strict";r.d(e,"b",(function(){return n})),r.d(e,"a",(function(){return i}));r(73);function n(t){return t&&"object"==typeof t&&t.isBuffer}function i(t){if(n(t)){return new Uint8Array(t.buffer,t.byteOffset,t.length).slice().buffer}return t}},function(t,e,r){(function(e){function r(t){try{if(!e.localStorage)return!1}catch(t){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(this,r(8))},function(t,e,r){"use strict";var n={};function i(t,e,r){r||(r=Error);var i=function(t){var r,n;function i(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=t,n[t]=i}function o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,i,s,a;if("string"==typeof e&&(i="not ",e.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(n," ").concat(o(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(n," ").concat(o(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},function(t,e,r){"use strict";(function(e){var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var i=r(96),o=r(100);r(4)(c,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(h,this)}function h(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,r(0))},function(t,e,r){"use strict";var n={};function i(t,e,r){r||(r=Error);var i=function(t){var r,n;function i(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=t,n[t]=i}function o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,i,s,a;if("string"==typeof e&&(i="not ",e.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(n," ").concat(o(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(n," ").concat(o(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},function(t,e,r){"use strict";(function(e){var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var i=r(108),o=r(112);r(4)(c,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(h,this)}function h(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,r(0))},function(t,e,r){"use strict";var n={};function i(t,e,r){r||(r=Error);var i=function(t){var r,n;function i(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=t,n[t]=i}function o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,i,s,a;if("string"==typeof e&&(i="not ",e.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(n," ").concat(o(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(n," ").concat(o(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},function(t,e,r){"use strict";(function(e){var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var i=r(117),o=r(121);r(4)(c,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(h,this)}function h(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,r(0))},function(t,e,r){"use strict";var n={};function i(t,e,r){r||(r=Error);var i=function(t){var r,n;function i(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=t,n[t]=i}function o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,i,s,a;if("string"==typeof e&&(i="not ",e.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(n," ").concat(o(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(n," ").concat(o(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},function(t,e,r){"use strict";(function(e){var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var i=r(124),o=r(128);r(4)(c,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(h,this)}function h(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,r(0))},function(t,e,r){"use strict";var n={};function i(t,e,r){r||(r=Error);var i=function(t){var r,n;function i(r,n,i){return t.call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,n,i))||this}return n=t,(r=i).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n,i}(r);i.prototype.name=r.name,i.prototype.code=t,n[t]=i}function o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}i("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(t,e,r){var n,i,s,a;if("string"==typeof e&&(i="not ",e.substr(!s||s<0?0:+s,i.length)===i)?(n="must not be",e=e.replace(/^not /,"")):n="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(n," ").concat(o(e,"type"));else{var u=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(u," ").concat(n," ").concat(o(e,"type"))}return a+=". Received type ".concat(typeof r)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},function(t,e,r){"use strict";(function(e){var n=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=c;var i=r(131),o=r(135);r(4)(c,i);for(var s=n(o.prototype),a=0;a<s.length;a++){var u=s[a];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(t){if(!(this instanceof c))return new c(t);i.call(this,t),o.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||e.nextTick(h,this)}function h(t){t.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})}).call(this,r(0))},function(t,e,r){"use strict";r.d(e,"b",(function(){return i})),r.d(e,"a",(function(){return o}));var n=r(37);function i(t,e){return Object(n.a)(t>=0),Object(n.a)(e>0),t+(e-1)&~(e-1)}function o(t,e,r){let n;if(t instanceof ArrayBuffer)n=new Uint8Array(t);else{const e=t.byteOffset,r=t.byteLength;n=new Uint8Array(t.buffer||t.arrayBuffer,e,r)}return e.set(n,r),r+i(n.byteLength,4)}},,function(t,e){function r(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===r(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===r(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===r(t)},e.isError=function(t){return"[object Error]"===r(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=Buffer.isBuffer},function(t,e,r){"use strict";(function(e){var n=r(164);
|
|
9
|
-
/*!
|
|
10
|
-
* The buffer module from node.js, for the browser.
|
|
11
|
-
*
|
|
12
|
-
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
13
|
-
* @license MIT
|
|
14
|
-
*/function i(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function o(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var s=r(12),a=Object.prototype.hasOwnProperty,u=Array.prototype.slice,c="foo"===function(){}.name;function l(t){return Object.prototype.toString.call(t)}function h(t){return!o(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var f=t.exports=b,d=/\s*function\s+([^\(\s]*)\s*/;function p(t){if(s.isFunction(t)){if(c)return t.name;var e=t.toString().match(d);return e&&e[1]}}function m(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function g(t){if(c||!s.isFunction(t))return s.inspect(t);var e=p(t);return"[Function"+(e?": "+e:"")+"]"}function _(t,e,r,n,i){throw new f.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function b(t,e){t||_(t,!0,e,"==",f.ok)}function y(t,e,r,n){if(t===e)return!0;if(o(t)&&o(e))return 0===i(t,e);if(s.isDate(t)&&s.isDate(e))return t.getTime()===e.getTime();if(s.isRegExp(t)&&s.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(h(t)&&h(e)&&l(t)===l(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===i(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(o(t)!==o(e))return!1;var a=(n=n||{actual:[],expected:[]}).actual.indexOf(t);return-1!==a&&a===n.expected.indexOf(e)||(n.actual.push(t),n.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(s.isPrimitive(t)||s.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var i=w(t),o=w(e);if(i&&!o||!i&&o)return!1;if(i)return t=u.call(t),e=u.call(e),y(t,e,r);var a,c,l=E(t),h=E(e);if(l.length!==h.length)return!1;for(l.sort(),h.sort(),c=l.length-1;c>=0;c--)if(l[c]!==h[c])return!1;for(c=l.length-1;c>=0;c--)if(a=l[c],!y(t[a],e[a],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function w(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function v(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function A(t,e,r,n){var i;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&_(i,r,"Missing expected exception"+n);var o="string"==typeof n,a=!t&&i&&!r;if((!t&&s.isError(i)&&o&&v(i,r)||a)&&_(i,r,"Got unwanted exception"+n),t&&i&&r&&!v(i,r)||!t&&i)throw i}f.AssertionError=function(t){this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=function(t){return m(g(t.actual),128)+" "+t.operator+" "+m(g(t.expected),128)}(this),this.generatedMessage=!0);var e=t.stackStartFunction||_;if(Error.captureStackTrace)Error.captureStackTrace(this,e);else{var r=new Error;if(r.stack){var n=r.stack,i=p(e),o=n.indexOf("\n"+i);if(o>=0){var s=n.indexOf("\n",o+1);n=n.substring(s+1)}this.stack=n}}},s.inherits(f.AssertionError,Error),f.fail=_,f.ok=b,f.equal=function(t,e,r){t!=e&&_(t,e,r,"==",f.equal)},f.notEqual=function(t,e,r){t==e&&_(t,e,r,"!=",f.notEqual)},f.deepEqual=function(t,e,r){y(t,e,!1)||_(t,e,r,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(t,e,r){y(t,e,!0)||_(t,e,r,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(t,e,r){y(t,e,!1)&&_(t,e,r,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function t(e,r,n){y(e,r,!0)&&_(e,r,n,"notDeepStrictEqual",t)},f.strictEqual=function(t,e,r){t!==e&&_(t,e,r,"===",f.strictEqual)},f.notStrictEqual=function(t,e,r){t===e&&_(t,e,r,"!==",f.notStrictEqual)},f.throws=function(t,e,r){A(!0,t,e,r)},f.doesNotThrow=function(t,e,r){A(!1,t,e,r)},f.ifError=function(t){if(t)throw t},f.strict=n((function t(e,r){e||_(e,!0,r,"==",t)}),f,{equal:f.strictEqual,deepEqual:f.deepStrictEqual,notEqual:f.notStrictEqual,notDeepEqual:f.notDeepStrictEqual}),f.strict.strict=f.strict;var E=Object.keys||function(t){var e=[];for(var r in t)a.call(t,r)&&e.push(r);return e}}).call(this,r(8))},function(t,e,r){var n=r(88),i=r(1),o=(r(12),r(184)),s=r(90),a=r(185),u=r(46).Stream,c=r(47).PassThrough,l=t.exports={};l.file=r(186),l.collectStream=function(t,e){var r=[],n=0;t.on("error",e),t.on("data",(function(t){r.push(t),n+=t.length})),t.on("end",(function(){var t=new Buffer(n),i=0;r.forEach((function(e){e.copy(t,i),i+=e.length})),e(null,t)}))},l.dateify=function(t){return t=(t=t||new Date)instanceof Date?t:"string"==typeof t?new Date(t):new Date},l.defaults=function(t,e,r){var n=arguments;return n[0]=n[0]||{},a(...n)},l.isStream=function(t){return t instanceof u},l.lazyReadStream=function(t){return new o.Readable((function(){return n.createReadStream(t)}))},l.normalizeInputSource=function(t){if(null===t)return new Buffer(0);if("string"==typeof t)return new Buffer(t);if(l.isStream(t)&&!t._readableState){var e=new c;return t.pipe(e),e}return t},l.sanitizePath=function(t){return s(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,"")},l.trailingSlashIt=function(t){return"/"!==t.slice(-1)?t+"/":t},l.unixifyPath=function(t){return s(t,!1).replace(/^\w+:/,"")},l.walkdir=function(t,e,r){var o=[];"function"==typeof e&&(r=e,e=t),n.readdir(t,(function(s,a){var u,c,h=0;if(s)return r(s);!function s(){if(!(u=a[h++]))return r(null,o);c=i.join(t,u),n.stat(c,(function(t,r){o.push({path:c,relative:i.relative(e,c).replace(/\\/g,"/"),stats:r}),r&&r.isDirectory()?l.walkdir(c,e,(function(t,e){e.forEach((function(t){o.push(t)})),s()})):s()}))}()}))}},function(t,e,r){"use strict";function n(t,e=5){if("string"==typeof t)return t.slice(0,e);if(ArrayBuffer.isView(t))return i(t.buffer,t.byteOffset,e);if(t instanceof ArrayBuffer){return i(t,0,e)}return""}function i(t,e,r){if(t.byteLength<=e+r)return"";const n=new DataView(t);let i="";for(let t=0;t<r;t++)i+=String.fromCharCode(n.getUint8(e+t));return i}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";function n(t,e){if(!t)throw new Error(e||"loader assertion failed.")}r.d(e,"a",(function(){return n}))},function(t,e,r){"use strict";(function(t){function n(){let e;if("undefined"!=typeof window&&window.performance)e=window.performance.now();else if(void 0!==t&&t.hrtime){const r=t.hrtime();e=1e3*r[0]+r[1]/1e6}else e=Date.now();return e}r.d(e,"a",(function(){return n}))}).call(this,r(0))},function(t,e){},,,,,function(t,e){const r=t=>null==t;t.exports={has:(t,e)=>{const r=e.split(".");let n=!0,i=Object.assign({},t);return r.forEach(t=>{n=i&&n&&Object.keys(i).indexOf(t)>-1,i=i[t]}),n},get:(t,e)=>{const n=e.split(".");let i=Object.assign({},t);return n.forEach(t=>{i=i&&!r(i[t])?i[t]:void 0}),i},set:(t,e,r)=>{let n=t;const i=e.split(".");return i.forEach((t,e)=>{n[t]||(n[t]=e==i.length-1?r:{}),n=n[t]}),t},isUndefined:r}},function(t,e){},function(t,e,r){t.exports=i;var n=r(11).EventEmitter;function i(){n.call(this)}r(4)(i,n),i.Readable=r(47),i.Writable=r(160),i.Duplex=r(161),i.Transform=r(162),i.PassThrough=r(85),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(l(),0===n.listenerCount(this,"error"))throw t}function l(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",c),t.removeListener("error",c),r.removeListener("end",l),r.removeListener("close",l),t.removeListener("close",l)}return r.on("error",c),t.on("error",c),r.on("end",l),r.on("close",l),t.on("close",l),t.emit("pipe",r),t}},function(t,e,r){(e=t.exports=r(81)).Stream=e,e.Readable=e,e.Writable=r(60),e.Duplex=r(18),e.Transform=r(84),e.PassThrough=r(159)},function(t,e,r){"use strict";(function(e){void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,r)}));case 3:return e.nextTick((function(){t.call(null,r,n)}));case 4:return e.nextTick((function(){t.call(null,r,n,i)}));default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return e.nextTick((function(){t.apply(null,o)}))}}}:t.exports=e}).call(this,r(0))},function(t,e,r){(function(t){var n=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,n,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,n,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(n,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},r(157),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,r(8))},function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)i(r,n)&&(t[n]=r[n])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var o={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){var e,r,n,i,o,s;for(n=0,e=0,r=t.length;e<r;e++)n+=t[e].length;for(s=new Uint8Array(n),i=0,e=0,r=t.length;e<r;e++)o=t[e],s.set(o,i),i+=o.length;return s}},s={arraySet:function(t,e,r,n,i){for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,o)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,s))},e.setTyped(n)},function(t,e,r){t.exports=l,l.Minimatch=h;var n={sep:"/"};try{n=r(1)}catch(t){}var i=l.GLOBSTAR=h.GLOBSTAR={},o=r(177),s={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},a="().*{}+?[]^$\\!".split("").reduce((function(t,e){return t[e]=!0,t}),{});var u=/\/+/;function c(t,e){t=t||{},e=e||{};var r={};return Object.keys(e).forEach((function(t){r[t]=e[t]})),Object.keys(t).forEach((function(e){r[e]=t[e]})),r}function l(t,e,r){if("string"!=typeof e)throw new TypeError("glob pattern string required");return r||(r={}),!(!r.nocomment&&"#"===e.charAt(0))&&(""===e.trim()?""===t:new h(e,r).match(t))}function h(t,e){if(!(this instanceof h))return new h(t,e);if("string"!=typeof t)throw new TypeError("glob pattern string required");e||(e={}),t=t.trim(),"/"!==n.sep&&(t=t.split(n.sep).join("/")),this.options=e,this.set=[],this.pattern=t,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.make()}function f(t,e){if(e||(e=this instanceof h?this.options:{}),void 0===(t=void 0===t?this.pattern:t))throw new TypeError("undefined pattern");return e.nobrace||!t.match(/\{.*\}/)?[t]:o(t)}l.filter=function(t,e){return e=e||{},function(r,n,i){return l(r,t,e)}},l.defaults=function(t){if(!t||!Object.keys(t).length)return l;var e=l,r=function(r,n,i){return e.minimatch(r,n,c(t,i))};return r.Minimatch=function(r,n){return new e.Minimatch(r,c(t,n))},r},h.defaults=function(t){return t&&Object.keys(t).length?l.defaults(t).Minimatch:h},h.prototype.debug=function(){},h.prototype.make=function(){if(this._made)return;var t=this.pattern,e=this.options;if(!e.nocomment&&"#"===t.charAt(0))return void(this.comment=!0);if(!t)return void(this.empty=!0);this.parseNegate();var r=this.globSet=this.braceExpand();e.debug&&(this.debug=console.error);this.debug(this.pattern,r),r=this.globParts=r.map((function(t){return t.split(u)})),this.debug(this.pattern,r),r=r.map((function(t,e,r){return t.map(this.parse,this)}),this),this.debug(this.pattern,r),r=r.filter((function(t){return-1===t.indexOf(!1)})),this.debug(this.pattern,r),this.set=r},h.prototype.parseNegate=function(){var t=this.pattern,e=!1,r=this.options,n=0;if(r.nonegate)return;for(var i=0,o=t.length;i<o&&"!"===t.charAt(i);i++)e=!e,n++;n&&(this.pattern=t.substr(n));this.negate=e},l.braceExpand=function(t,e){return f(t,e)},h.prototype.braceExpand=f,h.prototype.parse=function(t,e){if(t.length>65536)throw new TypeError("pattern is too long");var r=this.options;if(!r.noglobstar&&"**"===t)return i;if(""===t)return"";var n,o="",u=!!r.nocase,c=!1,l=[],h=[],f=!1,p=-1,m=-1,g="."===t.charAt(0)?"":r.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",_=this;function b(){if(n){switch(n){case"*":o+="[^/]*?",u=!0;break;case"?":o+="[^/]",u=!0;break;default:o+="\\"+n}_.debug("clearStateChar %j %j",n,o),n=!1}}for(var y,w=0,v=t.length;w<v&&(y=t.charAt(w));w++)if(this.debug("%s\t%s %s %j",t,w,o,y),c&&a[y])o+="\\"+y,c=!1;else switch(y){case"/":return!1;case"\\":b(),c=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",t,w,o,y),f){this.debug(" in class"),"!"===y&&w===m+1&&(y="^"),o+=y;continue}_.debug("call clearStateChar %j",n),b(),n=y,r.noext&&b();continue;case"(":if(f){o+="(";continue}if(!n){o+="\\(";continue}l.push({type:n,start:w-1,reStart:o.length,open:s[n].open,close:s[n].close}),o+="!"===n?"(?:(?!(?:":"(?:",this.debug("plType %j %j",n,o),n=!1;continue;case")":if(f||!l.length){o+="\\)";continue}b(),u=!0;var A=l.pop();o+=A.close,"!"===A.type&&h.push(A),A.reEnd=o.length;continue;case"|":if(f||!l.length||c){o+="\\|",c=!1;continue}b(),o+="|";continue;case"[":if(b(),f){o+="\\"+y;continue}f=!0,m=w,p=o.length,o+=y;continue;case"]":if(w===m+1||!f){o+="\\"+y,c=!1;continue}if(f){var E=t.substring(m+1,w);try{RegExp("["+E+"]")}catch(t){var S=this.parse(E,d);o=o.substr(0,p)+"\\["+S[0]+"\\]",u=u||S[1],f=!1;continue}}u=!0,f=!1,o+=y;continue;default:b(),c?c=!1:!a[y]||"^"===y&&f||(o+="\\"),o+=y}f&&(E=t.substr(m+1),S=this.parse(E,d),o=o.substr(0,p)+"\\["+S[0],u=u||S[1]);for(A=l.pop();A;A=l.pop()){var B=o.slice(A.reStart+A.open.length);this.debug("setting tail",o,A),B=B.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(t,e,r){return r||(r="\\"),e+e+r+"|"})),this.debug("tail=%j\n %s",B,B,A,o);var C="*"===A.type?"[^/]*?":"?"===A.type?"[^/]":"\\"+A.type;u=!0,o=o.slice(0,A.reStart)+C+"\\("+B}b(),c&&(o+="\\\\");var T=!1;switch(o.charAt(0)){case".":case"[":case"(":T=!0}for(var R=h.length-1;R>-1;R--){var O=h[R],I=o.slice(0,O.reStart),M=o.slice(O.reStart,O.reEnd-8),x=o.slice(O.reEnd-8,O.reEnd),D=o.slice(O.reEnd);x+=D;var k=I.split("(").length-1,P=D;for(w=0;w<k;w++)P=P.replace(/\)[+*?]?/,"");var L="";""===(D=P)&&e!==d&&(L="$"),o=I+M+D+L+x}""!==o&&u&&(o="(?=.)"+o);T&&(o=g+o);if(e===d)return[o,u];if(!u)return function(t){return t.replace(/\\(.)/g,"$1")}(t);var F=r.nocase?"i":"";try{var N=new RegExp("^"+o+"$",F)}catch(t){return new RegExp("$.")}return N._glob=t,N._src=o,N};var d={};l.makeRe=function(t,e){return new h(t,e||{}).makeRe()},h.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var t=this.set;if(!t.length)return this.regexp=!1,this.regexp;var e=this.options,r=e.noglobstar?"[^/]*?":e.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",n=e.nocase?"i":"",o=t.map((function(t){return t.map((function(t){return t===i?r:"string"==typeof t?function(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}(t):t._src})).join("\\/")})).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,n)}catch(t){this.regexp=!1}return this.regexp},l.match=function(t,e,r){var n=new h(e,r=r||{});return t=t.filter((function(t){return n.match(t)})),n.options.nonull&&!t.length&&t.push(e),t},h.prototype.match=function(t,e){if(this.debug("match",t,this.pattern),this.comment)return!1;if(this.empty)return""===t;if("/"===t&&e)return!0;var r=this.options;"/"!==n.sep&&(t=t.split(n.sep).join("/"));t=t.split(u),this.debug(this.pattern,"split",t);var i,o,s=this.set;for(this.debug(this.pattern,"set",s),o=t.length-1;o>=0&&!(i=t[o]);o--);for(o=0;o<s.length;o++){var a=s[o],c=t;if(r.matchBase&&1===a.length&&(c=[i]),this.matchOne(c,a,e))return!!r.flipNegate||!this.negate}return!r.flipNegate&&this.negate},h.prototype.matchOne=function(t,e,r){var n=this.options;this.debug("matchOne",{this:this,file:t,pattern:e}),this.debug("matchOne",t.length,e.length);for(var o=0,s=0,a=t.length,u=e.length;o<a&&s<u;o++,s++){this.debug("matchOne loop");var c,l=e[s],h=t[o];if(this.debug(e,l,h),!1===l)return!1;if(l===i){this.debug("GLOBSTAR",[e,l,h]);var f=o,d=s+1;if(d===u){for(this.debug("** at the end");o<a;o++)if("."===t[o]||".."===t[o]||!n.dot&&"."===t[o].charAt(0))return!1;return!0}for(;f<a;){var p=t[f];if(this.debug("\nglobstar while",t,f,e,d,p),this.matchOne(t.slice(f),e.slice(d),r))return this.debug("globstar found match!",f,a,p),!0;if("."===p||".."===p||!n.dot&&"."===p.charAt(0)){this.debug("dot detected!",t,f,e,d);break}this.debug("globstar swallow a segment, and continue"),f++}return!(!r||(this.debug("\n>>> no match, partial?",t,f,e,d),f!==a))}if("string"==typeof l?(c=n.nocase?h.toLowerCase()===l.toLowerCase():h===l,this.debug("string match",l,h,c)):(c=h.match(l),this.debug("pattern match",l,h,c)),!c)return!1}if(o===a&&s===u)return!0;if(o===a)return r;if(s===u)return o===a-1&&""===t[o];throw new Error("wtf?")}},function(t,e,r){(e=t.exports=r(131)).Stream=e,e.Readable=e,e.Writable=r(135),e.Duplex=r(30),e.Transform=r(136),e.PassThrough=r(241),e.finished=r(69),e.pipeline=r(242)},function(t,e,r){"use strict";function n(t,e){const r=t.length,n=Math.ceil(r/e)*e-r;let i="";for(let t=0;t<n;++t)i+=" ";return t+i}function i(t,e,r,n){if(t)for(let i=0;i<n;i++)t.setUint8(e+i,r.charCodeAt(i));return e+n}function o(t,e,r,n){if(t)for(let i=0;i<n;i++)t.setUint8(e+i,r[i]);return e+n}r.d(e,"c",(function(){return n})),r.d(e,"b",(function(){return i})),r.d(e,"a",(function(){return o}))},function(t,e,r){"use strict";(function(t){var n=r(9).Buffer,i=r(46).Transform,o=r(163),s=r(12),a=r(34).ok,u=r(9).kMaxLength,c="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";o.Z_MIN_WINDOWBITS=8,o.Z_MAX_WINDOWBITS=15,o.Z_DEFAULT_WINDOWBITS=15,o.Z_MIN_CHUNK=64,o.Z_MAX_CHUNK=1/0,o.Z_DEFAULT_CHUNK=16384,o.Z_MIN_MEMLEVEL=1,o.Z_MAX_MEMLEVEL=9,o.Z_DEFAULT_MEMLEVEL=8,o.Z_MIN_LEVEL=-1,o.Z_MAX_LEVEL=9,o.Z_DEFAULT_LEVEL=o.Z_DEFAULT_COMPRESSION;for(var l=Object.keys(o),h=0;h<l.length;h++){var f=l[h];f.match(/^Z/)&&Object.defineProperty(e,f,{enumerable:!0,value:o[f],writable:!1})}for(var d={Z_OK:o.Z_OK,Z_STREAM_END:o.Z_STREAM_END,Z_NEED_DICT:o.Z_NEED_DICT,Z_ERRNO:o.Z_ERRNO,Z_STREAM_ERROR:o.Z_STREAM_ERROR,Z_DATA_ERROR:o.Z_DATA_ERROR,Z_MEM_ERROR:o.Z_MEM_ERROR,Z_BUF_ERROR:o.Z_BUF_ERROR,Z_VERSION_ERROR:o.Z_VERSION_ERROR},p=Object.keys(d),m=0;m<p.length;m++){var g=p[m];d[d[g]]=g}function _(t,e,r){var i=[],o=0;function s(){for(var e;null!==(e=t.read());)i.push(e),o+=e.length;t.once("readable",s)}function a(){var e,s=null;o>=u?s=new RangeError(c):e=n.concat(i,o),i=[],t.close(),r(s,e)}t.on("error",(function(e){t.removeListener("end",a),t.removeListener("readable",s),r(e)})),t.on("end",a),t.end(e),s()}function b(t,e){if("string"==typeof e&&(e=n.from(e)),!n.isBuffer(e))throw new TypeError("Not a string or buffer");var r=t._finishFlushFlag;return t._processChunk(e,r)}function y(t){if(!(this instanceof y))return new y(t);T.call(this,t,o.DEFLATE)}function w(t){if(!(this instanceof w))return new w(t);T.call(this,t,o.INFLATE)}function v(t){if(!(this instanceof v))return new v(t);T.call(this,t,o.GZIP)}function A(t){if(!(this instanceof A))return new A(t);T.call(this,t,o.GUNZIP)}function E(t){if(!(this instanceof E))return new E(t);T.call(this,t,o.DEFLATERAW)}function S(t){if(!(this instanceof S))return new S(t);T.call(this,t,o.INFLATERAW)}function B(t){if(!(this instanceof B))return new B(t);T.call(this,t,o.UNZIP)}function C(t){return t===o.Z_NO_FLUSH||t===o.Z_PARTIAL_FLUSH||t===o.Z_SYNC_FLUSH||t===o.Z_FULL_FLUSH||t===o.Z_FINISH||t===o.Z_BLOCK}function T(t,r){var s=this;if(this._opts=t=t||{},this._chunkSize=t.chunkSize||e.Z_DEFAULT_CHUNK,i.call(this,t),t.flush&&!C(t.flush))throw new Error("Invalid flush flag: "+t.flush);if(t.finishFlush&&!C(t.finishFlush))throw new Error("Invalid flush flag: "+t.finishFlush);if(this._flushFlag=t.flush||o.Z_NO_FLUSH,this._finishFlushFlag=void 0!==t.finishFlush?t.finishFlush:o.Z_FINISH,t.chunkSize&&(t.chunkSize<e.Z_MIN_CHUNK||t.chunkSize>e.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+t.chunkSize);if(t.windowBits&&(t.windowBits<e.Z_MIN_WINDOWBITS||t.windowBits>e.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+t.windowBits);if(t.level&&(t.level<e.Z_MIN_LEVEL||t.level>e.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+t.level);if(t.memLevel&&(t.memLevel<e.Z_MIN_MEMLEVEL||t.memLevel>e.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+t.memLevel);if(t.strategy&&t.strategy!=e.Z_FILTERED&&t.strategy!=e.Z_HUFFMAN_ONLY&&t.strategy!=e.Z_RLE&&t.strategy!=e.Z_FIXED&&t.strategy!=e.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+t.strategy);if(t.dictionary&&!n.isBuffer(t.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new o.Zlib(r);var a=this;this._hadError=!1,this._handle.onerror=function(t,r){R(a),a._hadError=!0;var n=new Error(t);n.errno=r,n.code=e.codes[r],a.emit("error",n)};var u=e.Z_DEFAULT_COMPRESSION;"number"==typeof t.level&&(u=t.level);var c=e.Z_DEFAULT_STRATEGY;"number"==typeof t.strategy&&(c=t.strategy),this._handle.init(t.windowBits||e.Z_DEFAULT_WINDOWBITS,u,t.memLevel||e.Z_DEFAULT_MEMLEVEL,c,t.dictionary),this._buffer=n.allocUnsafe(this._chunkSize),this._offset=0,this._level=u,this._strategy=c,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!s._handle},configurable:!0,enumerable:!0})}function R(e,r){r&&t.nextTick(r),e._handle&&(e._handle.close(),e._handle=null)}function O(t){t.emit("close")}Object.defineProperty(e,"codes",{enumerable:!0,value:Object.freeze(d),writable:!1}),e.Deflate=y,e.Inflate=w,e.Gzip=v,e.Gunzip=A,e.DeflateRaw=E,e.InflateRaw=S,e.Unzip=B,e.createDeflate=function(t){return new y(t)},e.createInflate=function(t){return new w(t)},e.createDeflateRaw=function(t){return new E(t)},e.createInflateRaw=function(t){return new S(t)},e.createGzip=function(t){return new v(t)},e.createGunzip=function(t){return new A(t)},e.createUnzip=function(t){return new B(t)},e.deflate=function(t,e,r){return"function"==typeof e&&(r=e,e={}),_(new y(e),t,r)},e.deflateSync=function(t,e){return b(new y(e),t)},e.gzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),_(new v(e),t,r)},e.gzipSync=function(t,e){return b(new v(e),t)},e.deflateRaw=function(t,e,r){return"function"==typeof e&&(r=e,e={}),_(new E(e),t,r)},e.deflateRawSync=function(t,e){return b(new E(e),t)},e.unzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),_(new B(e),t,r)},e.unzipSync=function(t,e){return b(new B(e),t)},e.inflate=function(t,e,r){return"function"==typeof e&&(r=e,e={}),_(new w(e),t,r)},e.inflateSync=function(t,e){return b(new w(e),t)},e.gunzip=function(t,e,r){return"function"==typeof e&&(r=e,e={}),_(new A(e),t,r)},e.gunzipSync=function(t,e){return b(new A(e),t)},e.inflateRaw=function(t,e,r){return"function"==typeof e&&(r=e,e={}),_(new S(e),t,r)},e.inflateRawSync=function(t,e){return b(new S(e),t)},s.inherits(T,i),T.prototype.params=function(r,n,i){if(r<e.Z_MIN_LEVEL||r>e.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+r);if(n!=e.Z_FILTERED&&n!=e.Z_HUFFMAN_ONLY&&n!=e.Z_RLE&&n!=e.Z_FIXED&&n!=e.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+n);if(this._level!==r||this._strategy!==n){var s=this;this.flush(o.Z_SYNC_FLUSH,(function(){a(s._handle,"zlib binding closed"),s._handle.params(r,n),s._hadError||(s._level=r,s._strategy=n,i&&i())}))}else t.nextTick(i)},T.prototype.reset=function(){return a(this._handle,"zlib binding closed"),this._handle.reset()},T.prototype._flush=function(t){this._transform(n.alloc(0),"",t)},T.prototype.flush=function(e,r){var i=this,s=this._writableState;("function"==typeof e||void 0===e&&!r)&&(r=e,e=o.Z_FULL_FLUSH),s.ended?r&&t.nextTick(r):s.ending?r&&this.once("end",r):s.needDrain?r&&this.once("drain",(function(){return i.flush(e,r)})):(this._flushFlag=e,this.write(n.alloc(0),"",r))},T.prototype.close=function(e){R(this,e),t.nextTick(O,this)},T.prototype._transform=function(t,e,r){var i,s=this._writableState,a=(s.ending||s.ended)&&(!t||s.length===t.length);return null===t||n.isBuffer(t)?this._handle?(a?i=this._finishFlushFlag:(i=this._flushFlag,t.length>=s.length&&(this._flushFlag=this._opts.flush||o.Z_NO_FLUSH)),void this._processChunk(t,i,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},T.prototype._processChunk=function(t,e,r){var i=t&&t.length,o=this._chunkSize-this._offset,s=0,l=this,h="function"==typeof r;if(!h){var f,d=[],p=0;this.on("error",(function(t){f=t})),a(this._handle,"zlib binding closed");do{var m=this._handle.writeSync(e,t,s,i,this._buffer,this._offset,o)}while(!this._hadError&&b(m[0],m[1]));if(this._hadError)throw f;if(p>=u)throw R(this),new RangeError(c);var g=n.concat(d,p);return R(this),g}a(this._handle,"zlib binding closed");var _=this._handle.write(e,t,s,i,this._buffer,this._offset,o);function b(u,c){if(this&&(this.buffer=null,this.callback=null),!l._hadError){var f=o-c;if(a(f>=0,"have should not go down"),f>0){var m=l._buffer.slice(l._offset,l._offset+f);l._offset+=f,h?l.push(m):(d.push(m),p+=m.length)}if((0===c||l._offset>=l._chunkSize)&&(o=l._chunkSize,l._offset=0,l._buffer=n.allocUnsafe(l._chunkSize)),0===c){if(s+=i-u,i=u,!h)return!0;var g=l._handle.write(e,t,s,i,l._buffer,l._offset,l._chunkSize);return g.callback=b,void(g.buffer=t)}if(!h)return!1;r()}}_.buffer=t,_.callback=b},s.inherits(y,T),s.inherits(w,T),s.inherits(v,T),s.inherits(A,T),s.inherits(E,T),s.inherits(S,T),s.inherits(B,T)}).call(this,r(0))},function(t,e,r){var n,i,o,s,a;n=r(72),i=r(77).utf8,o=r(151),s=r(77).bin,(a=function(t,e){t.constructor==String?t=e&&"binary"===e.encoding?s.stringToBytes(t):i.stringToBytes(t):o(t)?t=Array.prototype.slice.call(t,0):Array.isArray(t)||t.constructor===Uint8Array||(t=t.toString());for(var r=n.bytesToWords(t),u=8*t.length,c=1732584193,l=-271733879,h=-1732584194,f=271733878,d=0;d<r.length;d++)r[d]=16711935&(r[d]<<8|r[d]>>>24)|4278255360&(r[d]<<24|r[d]>>>8);r[u>>>5]|=128<<u%32,r[14+(u+64>>>9<<4)]=u;var p=a._ff,m=a._gg,g=a._hh,_=a._ii;for(d=0;d<r.length;d+=16){var b=c,y=l,w=h,v=f;c=p(c,l,h,f,r[d+0],7,-680876936),f=p(f,c,l,h,r[d+1],12,-389564586),h=p(h,f,c,l,r[d+2],17,606105819),l=p(l,h,f,c,r[d+3],22,-1044525330),c=p(c,l,h,f,r[d+4],7,-176418897),f=p(f,c,l,h,r[d+5],12,1200080426),h=p(h,f,c,l,r[d+6],17,-1473231341),l=p(l,h,f,c,r[d+7],22,-45705983),c=p(c,l,h,f,r[d+8],7,1770035416),f=p(f,c,l,h,r[d+9],12,-1958414417),h=p(h,f,c,l,r[d+10],17,-42063),l=p(l,h,f,c,r[d+11],22,-1990404162),c=p(c,l,h,f,r[d+12],7,1804603682),f=p(f,c,l,h,r[d+13],12,-40341101),h=p(h,f,c,l,r[d+14],17,-1502002290),c=m(c,l=p(l,h,f,c,r[d+15],22,1236535329),h,f,r[d+1],5,-165796510),f=m(f,c,l,h,r[d+6],9,-1069501632),h=m(h,f,c,l,r[d+11],14,643717713),l=m(l,h,f,c,r[d+0],20,-373897302),c=m(c,l,h,f,r[d+5],5,-701558691),f=m(f,c,l,h,r[d+10],9,38016083),h=m(h,f,c,l,r[d+15],14,-660478335),l=m(l,h,f,c,r[d+4],20,-405537848),c=m(c,l,h,f,r[d+9],5,568446438),f=m(f,c,l,h,r[d+14],9,-1019803690),h=m(h,f,c,l,r[d+3],14,-187363961),l=m(l,h,f,c,r[d+8],20,1163531501),c=m(c,l,h,f,r[d+13],5,-1444681467),f=m(f,c,l,h,r[d+2],9,-51403784),h=m(h,f,c,l,r[d+7],14,1735328473),c=g(c,l=m(l,h,f,c,r[d+12],20,-1926607734),h,f,r[d+5],4,-378558),f=g(f,c,l,h,r[d+8],11,-2022574463),h=g(h,f,c,l,r[d+11],16,1839030562),l=g(l,h,f,c,r[d+14],23,-35309556),c=g(c,l,h,f,r[d+1],4,-1530992060),f=g(f,c,l,h,r[d+4],11,1272893353),h=g(h,f,c,l,r[d+7],16,-155497632),l=g(l,h,f,c,r[d+10],23,-1094730640),c=g(c,l,h,f,r[d+13],4,681279174),f=g(f,c,l,h,r[d+0],11,-358537222),h=g(h,f,c,l,r[d+3],16,-722521979),l=g(l,h,f,c,r[d+6],23,76029189),c=g(c,l,h,f,r[d+9],4,-640364487),f=g(f,c,l,h,r[d+12],11,-421815835),h=g(h,f,c,l,r[d+15],16,530742520),c=_(c,l=g(l,h,f,c,r[d+2],23,-995338651),h,f,r[d+0],6,-198630844),f=_(f,c,l,h,r[d+7],10,1126891415),h=_(h,f,c,l,r[d+14],15,-1416354905),l=_(l,h,f,c,r[d+5],21,-57434055),c=_(c,l,h,f,r[d+12],6,1700485571),f=_(f,c,l,h,r[d+3],10,-1894986606),h=_(h,f,c,l,r[d+10],15,-1051523),l=_(l,h,f,c,r[d+1],21,-2054922799),c=_(c,l,h,f,r[d+8],6,1873313359),f=_(f,c,l,h,r[d+15],10,-30611744),h=_(h,f,c,l,r[d+6],15,-1560198380),l=_(l,h,f,c,r[d+13],21,1309151649),c=_(c,l,h,f,r[d+4],6,-145523070),f=_(f,c,l,h,r[d+11],10,-1120210379),h=_(h,f,c,l,r[d+2],15,718787259),l=_(l,h,f,c,r[d+9],21,-343485551),c=c+b>>>0,l=l+y>>>0,h=h+w>>>0,f=f+v>>>0}return n.endian([c,l,h,f])})._ff=function(t,e,r,n,i,o,s){var a=t+(e&r|~e&n)+(i>>>0)+s;return(a<<o|a>>>32-o)+e},a._gg=function(t,e,r,n,i,o,s){var a=t+(e&n|r&~n)+(i>>>0)+s;return(a<<o|a>>>32-o)+e},a._hh=function(t,e,r,n,i,o,s){var a=t+(e^r^n)+(i>>>0)+s;return(a<<o|a>>>32-o)+e},a._ii=function(t,e,r,n,i,o,s){var a=t+(r^(e|~n))+(i>>>0)+s;return(a<<o|a>>>32-o)+e},a._blocksize=16,a._digestsize=16,t.exports=function(t,e){if(null==t)throw new Error("Illegal argument "+t);var r=n.wordsToBytes(a(t,e));return e&&e.asBytes?r:e&&e.asString?s.bytesToString(r):n.bytesToHex(r)}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return c})),r.d(e,"b",(function(){return l}));var n=r(54),i=r(1),o=r(10),s=(r(139),r(3)),a=r(140),u=r.n(a);r(57),r(249),r(72);function c(t){const e=t+".gz",r=Object(n.createGzip)(),i=Object(o.createReadStream)(t),s=Object(o.createWriteStream)(e);return new Promise((t,n)=>{i.on("end",()=>{console.log(e+" compressed and saved."),t(e)}),i.on("error",t=>{console.log(e+": compression error!"),n(t)}),i.pipe(r).pipe(s)})}async function l(){"win32"===t.platform?await f(...arguments):await h(...arguments)}async function h(t,e,r=0,n="."){const i=["-"+r,"-r",Object(s.a)(e),n],o=new u.a;await o.start({command:"zip",arguments:i,spawn:{cwd:t},wait:0})}async function f(t,e,r=0,n=Object(i.join)(".","*"),o){"@"===n[0]&&(n="*"+n.substr(1));const a=["a","-tzip","-mx="+r,Object(s.a)(e),n],c=new u.a;await c.start({command:o,arguments:a,spawn:{cwd:""+t},wait:0})}}).call(this,r(0))},function(t,e,r){(function(e,r){t.exports=function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[s]={exports:{}};e[s][0].call(c.exports,(function(t){return i(e[s][1][t]||t)}),c,c.exports,t,e,r,n)}return r[s].exports}for(var o=!1,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,n,i){(function(e){!function(t){"object"==typeof i&&void 0!==n?n.exports=t():("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).JSZip=t()}((function(){return function e(r,n,i){function o(a,u){if(!n[a]){if(!r[a]){var c="function"==typeof t&&t;if(!u&&c)return c(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var h=n[a]={exports:{}};r[a][0].call(h.exports,(function(t){return o(r[a][1][t]||t)}),h,h.exports,e,r,n,i)}return n[a].exports}for(var s="function"==typeof t&&t,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,n,i){(function(e){!function(t){"object"==typeof i&&void 0!==n?n.exports=t():("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).JSZip=t()}((function(){return function e(r,n,i){function o(a,u){if(!n[a]){if(!r[a]){var c="function"==typeof t&&t;if(!u&&c)return c(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var h=n[a]={exports:{}};r[a][0].call(h.exports,(function(t){return o(r[a][1][t]||t)}),h,h.exports,e,r,n,i)}return n[a].exports}for(var s="function"==typeof t&&t,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,n,i){(function(e){!function(t){"object"==typeof i&&void 0!==n?n.exports=t():("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).JSZip=t()}((function(){return function e(r,n,i){function o(a,u){if(!n[a]){if(!r[a]){var c="function"==typeof t&&t;if(!u&&c)return c(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var h=n[a]={exports:{}};r[a][0].call(h.exports,(function(t){return o(r[a][1][t]||t)}),h,h.exports,e,r,n,i)}return n[a].exports}for(var s="function"==typeof t&&t,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,n,i){(function(e){!function(t){"object"==typeof i&&void 0!==n?n.exports=t():("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).JSZip=t()}((function(){return function e(r,n,i){function o(a,u){if(!n[a]){if(!r[a]){var c="function"==typeof t&&t;if(!u&&c)return c(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var h=n[a]={exports:{}};r[a][0].call(h.exports,(function(t){return o(r[a][1][t]||t)}),h,h.exports,e,r,n,i)}return n[a].exports}for(var s="function"==typeof t&&t,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,n,i){(function(e){!function(t){"object"==typeof i&&void 0!==n?n.exports=t():("undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:this).JSZip=t()}((function(){return function e(r,n,i){function o(a,u){if(!n[a]){if(!r[a]){var c="function"==typeof t&&t;if(!u&&c)return c(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var h=n[a]={exports:{}};r[a][0].call(h.exports,(function(t){return o(r[a][1][t]||t)}),h,h.exports,e,r,n,i)}return n[a].exports}for(var s="function"==typeof t&&t,a=0;a<i.length;a++)o(i[a]);return o}({1:[function(t,e,r){"use strict";var n=t("./utils"),i=t("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.encode=function(t){for(var e,r,i,s,a,u,c,l=[],h=0,f=t.length,d=f,p="string"!==n.getTypeOf(t);h<t.length;)d=f-h,i=p?(e=t[h++],r=h<f?t[h++]:0,h<f?t[h++]:0):(e=t.charCodeAt(h++),r=h<f?t.charCodeAt(h++):0,h<f?t.charCodeAt(h++):0),s=e>>2,a=(3&e)<<4|r>>4,u=1<d?(15&r)<<2|i>>6:64,c=2<d?63&i:64,l.push(o.charAt(s)+o.charAt(a)+o.charAt(u)+o.charAt(c));return l.join("")},r.decode=function(t){var e,r,n,s,a,u,c=0,l=0;if("data:"===t.substr(0,"data:".length))throw new Error("Invalid base64 input, it looks like a data url.");var h,f=3*(t=t.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(t.charAt(t.length-1)===o.charAt(64)&&f--,t.charAt(t.length-2)===o.charAt(64)&&f--,f%1!=0)throw new Error("Invalid base64 input, bad content length.");for(h=i.uint8array?new Uint8Array(0|f):new Array(0|f);c<t.length;)e=o.indexOf(t.charAt(c++))<<2|(s=o.indexOf(t.charAt(c++)))>>4,r=(15&s)<<4|(a=o.indexOf(t.charAt(c++)))>>2,n=(3&a)<<6|(u=o.indexOf(t.charAt(c++))),h[l++]=e,64!==a&&(h[l++]=r),64!==u&&(h[l++]=n);return h}},{"./support":30,"./utils":32}],2:[function(t,e,r){"use strict";var n=t("./external"),i=t("./stream/DataWorker"),o=t("./stream/Crc32Probe"),s=t("./stream/DataLengthProbe");function a(t,e,r,n,i){this.compressedSize=t,this.uncompressedSize=e,this.crc32=r,this.compression=n,this.compressedContent=i}a.prototype={getContentWorker:function(){var t=new i(n.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),e=this;return t.on("end",(function(){if(this.streamInfo.data_length!==e.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),t},getCompressedWorker:function(){return new i(n.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(t,e,r){return t.pipe(new o).pipe(new s("uncompressedSize")).pipe(e.compressWorker(r)).pipe(new s("compressedSize")).withStreamInfo("compression",e)},e.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(t,e,r){"use strict";var n=t("./stream/GenericWorker");r.STORE={magic:"\0\0",compressWorker:function(t){return new n("STORE compression")},uncompressWorker:function(){return new n("STORE decompression")}},r.DEFLATE=t("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(t,e,r){"use strict";var n=t("./utils"),i=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e){return void 0!==t&&t.length?"string"!==n.getTypeOf(t)?function(t,e,r){var n=i,o=0+r;t^=-1;for(var s=0;s<o;s++)t=t>>>8^n[255&(t^e[s])];return-1^t}(0|e,t,t.length):function(t,e,r){var n=i,o=0+r;t^=-1;for(var s=0;s<o;s++)t=t>>>8^n[255&(t^e.charCodeAt(s))];return-1^t}(0|e,t,t.length):0}},{"./utils":32}],5:[function(t,e,r){"use strict";r.base64=!1,r.binary=!1,r.dir=!1,r.createFolders=!0,r.date=null,r.compression=null,r.compressionOptions=null,r.comment=null,r.unixPermissions=null,r.dosPermissions=null},{}],6:[function(t,e,r){"use strict";var n;n="undefined"!=typeof Promise?Promise:t("lie"),e.exports={Promise:n}},{lie:37}],7:[function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=t("pako"),o=t("./utils"),s=t("./stream/GenericWorker"),a=n?"uint8array":"array";function u(t,e){s.call(this,"FlateWorker/"+t),this._pako=null,this._pakoAction=t,this._pakoOptions=e,this.meta={}}r.magic="\b\0",o.inherits(u,s),u.prototype.processChunk=function(t){this.meta=t.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(a,t.data),!1)},u.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var t=this;this._pako.onData=function(e){t.push({data:e,meta:t.meta})}},r.compressWorker=function(t){return new u("Deflate",t)},r.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(t,e,r){"use strict";function n(t,e){var r,n="";for(r=0;r<e;r++)n+=String.fromCharCode(255&t),t>>>=8;return n}function i(t,e,r,i,s,l){var h,f,d=t.file,p=t.compression,m=l!==a.utf8encode,g=o.transformTo("string",l(d.name)),_=o.transformTo("string",a.utf8encode(d.name)),b=d.comment,y=o.transformTo("string",l(b)),w=o.transformTo("string",a.utf8encode(b)),v=_.length!==d.name.length,A=w.length!==b.length,E="",S="",B="",C=d.dir,T=d.date,R={crc32:0,compressedSize:0,uncompressedSize:0};e&&!r||(R.crc32=t.crc32,R.compressedSize=t.compressedSize,R.uncompressedSize=t.uncompressedSize);var O=0;e&&(O|=8),m||!v&&!A||(O|=2048);var I,M=0,x=0;C&&(M|=16),"UNIX"===s?(x=798,M|=((I=d.unixPermissions)||(I=C?16893:33204),(65535&I)<<16)):(x=20,M|=63&(d.dosPermissions||0)),h=T.getUTCHours(),h<<=6,h|=T.getUTCMinutes(),h<<=5,h|=T.getUTCSeconds()/2,f=T.getUTCFullYear()-1980,f<<=4,f|=T.getUTCMonth()+1,f<<=5,f|=T.getUTCDate(),v&&(E+="up"+n((S=n(1,1)+n(u(g),4)+_).length,2)+S),A&&(E+="uc"+n((B=n(1,1)+n(u(y),4)+w).length,2)+B);var D="";return D+="\n\0",D+=n(O,2),D+=p.magic,D+=n(h,2),D+=n(f,2),D+=n(R.crc32,4),D+=n(R.compressedSize,4),D+=n(R.uncompressedSize,4),D+=n(g.length,2),D+=n(E.length,2),{fileRecord:c.LOCAL_FILE_HEADER+D+g+E,dirRecord:c.CENTRAL_FILE_HEADER+n(x,2)+D+n(y.length,2)+"\0\0\0\0"+n(M,4)+n(i,4)+g+E+y}}var o=t("../utils"),s=t("../stream/GenericWorker"),a=t("../utf8"),u=t("../crc32"),c=t("../signature");function l(t,e,r,n){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=e,this.zipPlatform=r,this.encodeFileName=n,this.streamFiles=t,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(l,s),l.prototype.push=function(t){var e=t.meta.percent||0,r=this.entriesCount,n=this._sources.length;this.accumulate?this.contentBuffer.push(t):(this.bytesWritten+=t.data.length,s.prototype.push.call(this,{data:t.data,meta:{currentFile:this.currentFile,percent:r?(e+100*(r-n-1))/r:100}}))},l.prototype.openedSource=function(t){this.currentSourceOffset=this.bytesWritten,this.currentFile=t.file.name;var e=this.streamFiles&&!t.file.dir;if(e){var r=i(t,e,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:r.fileRecord,meta:{percent:0}})}else this.accumulate=!0},l.prototype.closedSource=function(t){this.accumulate=!1;var e,r=this.streamFiles&&!t.file.dir,o=i(t,r,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(o.dirRecord),r)this.push({data:(e=t,c.DATA_DESCRIPTOR+n(e.crc32,4)+n(e.compressedSize,4)+n(e.uncompressedSize,4)),meta:{percent:100}});else for(this.push({data:o.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},l.prototype.flush=function(){for(var t=this.bytesWritten,e=0;e<this.dirRecords.length;e++)this.push({data:this.dirRecords[e],meta:{percent:100}});var r,i,s,a,u,l,h=this.bytesWritten-t,f=(r=this.dirRecords.length,i=h,s=t,a=this.zipComment,u=this.encodeFileName,l=o.transformTo("string",u(a)),c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+n(r,2)+n(r,2)+n(i,4)+n(s,4)+n(l.length,2)+l);this.push({data:f,meta:{percent:100}})},l.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},l.prototype.registerPrevious=function(t){this._sources.push(t);var e=this;return t.on("data",(function(t){e.processChunk(t)})),t.on("end",(function(){e.closedSource(e.previous.streamInfo),e._sources.length?e.prepareNextSource():e.end()})),t.on("error",(function(t){e.error(t)})),this},l.prototype.resume=function(){return!!s.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},l.prototype.error=function(t){var e=this._sources;if(!s.prototype.error.call(this,t))return!1;for(var r=0;r<e.length;r++)try{e[r].error(t)}catch(t){}return!0},l.prototype.lock=function(){s.prototype.lock.call(this);for(var t=this._sources,e=0;e<t.length;e++)t[e].lock()},e.exports=l},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(t,e,r){"use strict";var n=t("../compressions"),i=t("./ZipFileWorker");r.generateWorker=function(t,e,r){var o=new i(e.streamFiles,r,e.platform,e.encodeFileName),s=0;try{t.forEach((function(t,r){s++;var i=function(t,e){var r=t||e,i=n[r];if(!i)throw new Error(r+" is not a valid compression method !");return i}(r.options.compression,e.compression),a=r.options.compressionOptions||e.compressionOptions||{},u=r.dir,c=r.date;r._compressWorker(i,a).withStreamInfo("file",{name:t,dir:u,date:c,comment:r.comment||"",unixPermissions:r.unixPermissions,dosPermissions:r.dosPermissions}).pipe(o)})),o.entriesCount=s}catch(t){o.error(t)}return o}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(t,e,r){"use strict";function n(){if(!(this instanceof n))return new n;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var t=new n;for(var e in this)"function"!=typeof this[e]&&(t[e]=this[e]);return t}}(n.prototype=t("./object")).loadAsync=t("./load"),n.support=t("./support"),n.defaults=t("./defaults"),n.version="3.5.0",n.loadAsync=function(t,e){return(new n).loadAsync(t,e)},n.external=t("./external"),e.exports=n},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(t,e,r){"use strict";var n=t("./utils"),i=t("./external"),o=t("./utf8"),s=t("./zipEntries"),a=t("./stream/Crc32Probe"),u=t("./nodejsUtils");function c(t){return new i.Promise((function(e,r){var n=t.decompressed.getContentWorker().pipe(new a);n.on("error",(function(t){r(t)})).on("end",(function(){n.streamInfo.crc32!==t.decompressed.crc32?r(new Error("Corrupted zip : CRC32 mismatch")):e()})).resume()}))}e.exports=function(t,e){var r=this;return e=n.extend(e||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),u.isNode&&u.isStream(t)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):n.prepareContent("the loaded zip file",t,!0,e.optimizedBinaryString,e.base64).then((function(t){var r=new s(e);return r.load(t),r})).then((function(t){var r=[i.Promise.resolve(t)],n=t.files;if(e.checkCRC32)for(var o=0;o<n.length;o++)r.push(c(n[o]));return i.Promise.all(r)})).then((function(t){for(var n=t.shift(),i=n.files,o=0;o<i.length;o++){var s=i[o];r.file(s.fileNameStr,s.decompressed,{binary:!0,optimizedBinaryString:!0,date:s.date,dir:s.dir,comment:s.fileCommentStr.length?s.fileCommentStr:null,unixPermissions:s.unixPermissions,dosPermissions:s.dosPermissions,createFolders:e.createFolders})}return n.zipComment.length&&(r.comment=n.zipComment),r}))}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../stream/GenericWorker");function o(t,e){i.call(this,"Nodejs stream input adapter for "+t),this._upstreamEnded=!1,this._bindStream(e)}n.inherits(o,i),o.prototype._bindStream=function(t){var e=this;(this._stream=t).pause(),t.on("data",(function(t){e.push({data:t,meta:{percent:0}})})).on("error",(function(t){e.isPaused?this.generatedError=t:e.error(t)})).on("end",(function(){e.isPaused?e._upstreamEnded=!0:e.end()}))},o.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},e.exports=o},{"../stream/GenericWorker":28,"../utils":32}],13:[function(t,e,r){"use strict";var n=t("readable-stream").Readable;function i(t,e,r){n.call(this,e),this._helper=t;var i=this;t.on("data",(function(t,e){i.push(t)||i._helper.pause(),r&&r(e)})).on("error",(function(t){i.emit("error",t)})).on("end",(function(){i.push(null)}))}t("../utils").inherits(i,n),i.prototype._read=function(){this._helper.resume()},e.exports=i},{"../utils":32,"readable-stream":16}],14:[function(t,e,r){"use strict";e.exports={isNode:"undefined"!=typeof Buffer,newBufferFrom:function(t,e){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(t,e);if("number"==typeof t)throw new Error('The "data" argument must not be a number');return new Buffer(t,e)},allocBuffer:function(t){if(Buffer.alloc)return Buffer.alloc(t);var e=new Buffer(t);return e.fill(0),e},isBuffer:function(t){return Buffer.isBuffer(t)},isStream:function(t){return t&&"function"==typeof t.on&&"function"==typeof t.pause&&"function"==typeof t.resume}}},{}],15:[function(t,e,r){"use strict";function n(t,e,r){var n,o=s.getTypeOf(e),u=s.extend(r||{},c);u.date=u.date||new Date,null!==u.compression&&(u.compression=u.compression.toUpperCase()),"string"==typeof u.unixPermissions&&(u.unixPermissions=parseInt(u.unixPermissions,8)),u.unixPermissions&&16384&u.unixPermissions&&(u.dir=!0),u.dosPermissions&&16&u.dosPermissions&&(u.dir=!0),u.dir&&(t=i(t)),u.createFolders&&(n=function(t){"/"===t.slice(-1)&&(t=t.substring(0,t.length-1));var e=t.lastIndexOf("/");return 0<e?t.substring(0,e):""}(t))&&m.call(this,n,!0);var f,g="string"===o&&!1===u.binary&&!1===u.base64;r&&void 0!==r.binary||(u.binary=!g),(e instanceof l&&0===e.uncompressedSize||u.dir||!e||0===e.length)&&(u.base64=!1,u.binary=!0,e="",u.compression="STORE",o="string"),f=e instanceof l||e instanceof a?e:d.isNode&&d.isStream(e)?new p(t,e):s.prepareContent(t,e,u.binary,u.optimizedBinaryString,u.base64);var _=new h(t,f,u);this.files[t]=_}function i(t){return"/"!==t.slice(-1)&&(t+="/"),t}var o=t("./utf8"),s=t("./utils"),a=t("./stream/GenericWorker"),u=t("./stream/StreamHelper"),c=t("./defaults"),l=t("./compressedObject"),h=t("./zipObject"),f=t("./generate"),d=t("./nodejsUtils"),p=t("./nodejs/NodejsStreamInputAdapter"),m=function(t,e){return e=void 0!==e?e:c.createFolders,t=i(t),this.files[t]||n.call(this,t,null,{dir:!0,createFolders:e}),this.files[t]};function g(t){return"[object RegExp]"===Object.prototype.toString.call(t)}var _={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(t){var e,r,n;for(e in this.files)this.files.hasOwnProperty(e)&&(n=this.files[e],(r=e.slice(this.root.length,e.length))&&e.slice(0,this.root.length)===this.root&&t(r,n))},filter:function(t){var e=[];return this.forEach((function(r,n){t(r,n)&&e.push(n)})),e},file:function(t,e,r){if(1!==arguments.length)return t=this.root+t,n.call(this,t,e,r),this;if(g(t)){var i=t;return this.filter((function(t,e){return!e.dir&&i.test(t)}))}var o=this.files[this.root+t];return o&&!o.dir?o:null},folder:function(t){if(!t)return this;if(g(t))return this.filter((function(e,r){return r.dir&&t.test(e)}));var e=this.root+t,r=m.call(this,e),n=this.clone();return n.root=r.name,n},remove:function(t){t=this.root+t;var e=this.files[t];if(e||("/"!==t.slice(-1)&&(t+="/"),e=this.files[t]),e&&!e.dir)delete this.files[t];else for(var r=this.filter((function(e,r){return r.name.slice(0,t.length)===t})),n=0;n<r.length;n++)delete this.files[r[n].name];return this},generate:function(t){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(t){var e,r={};try{if((r=s.extend(t||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:o.utf8encode})).type=r.type.toLowerCase(),r.compression=r.compression.toUpperCase(),"binarystring"===r.type&&(r.type="string"),!r.type)throw new Error("No output type specified.");s.checkSupport(r.type),"darwin"!==r.platform&&"freebsd"!==r.platform&&"linux"!==r.platform&&"sunos"!==r.platform||(r.platform="UNIX"),"win32"===r.platform&&(r.platform="DOS");var n=r.comment||this.comment||"";e=f.generateWorker(this,r,n)}catch(t){(e=new a("error")).error(t)}return new u(e,r.type||"string",r.mimeType)},generateAsync:function(t,e){return this.generateInternalStream(t).accumulate(e)},generateNodeStream:function(t,e){return(t=t||{}).type||(t.type="nodebuffer"),this.generateInternalStream(t).toNodejsStream(e)}};e.exports=_},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(t,e,r){e.exports=t("stream")},{stream:void 0}],17:[function(t,e,r){"use strict";var n=t("./DataReader");function i(t){n.call(this,t);for(var e=0;e<this.data.length;e++)t[e]=255&t[e]}t("../utils").inherits(i,n),i.prototype.byteAt=function(t){return this.data[this.zero+t]},i.prototype.lastIndexOfSignature=function(t){for(var e=t.charCodeAt(0),r=t.charCodeAt(1),n=t.charCodeAt(2),i=t.charCodeAt(3),o=this.length-4;0<=o;--o)if(this.data[o]===e&&this.data[o+1]===r&&this.data[o+2]===n&&this.data[o+3]===i)return o-this.zero;return-1},i.prototype.readAndCheckSignature=function(t){var e=t.charCodeAt(0),r=t.charCodeAt(1),n=t.charCodeAt(2),i=t.charCodeAt(3),o=this.readData(4);return e===o[0]&&r===o[1]&&n===o[2]&&i===o[3]},i.prototype.readData=function(t){if(this.checkOffset(t),0===t)return[];var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./DataReader":18}],18:[function(t,e,r){"use strict";var n=t("../utils");function i(t){this.data=t,this.length=t.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(t){this.checkIndex(this.index+t)},checkIndex:function(t){if(this.length<this.zero+t||t<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+t+"). Corrupted zip ?")},setIndex:function(t){this.checkIndex(t),this.index=t},skip:function(t){this.setIndex(this.index+t)},byteAt:function(t){},readInt:function(t){var e,r=0;for(this.checkOffset(t),e=this.index+t-1;e>=this.index;e--)r=(r<<8)+this.byteAt(e);return this.index+=t,r},readString:function(t){return n.transformTo("string",this.readData(t))},readData:function(t){},lastIndexOfSignature:function(t){},readAndCheckSignature:function(t){},readDate:function(){var t=this.readInt(4);return new Date(Date.UTC(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1))}},e.exports=i},{"../utils":32}],19:[function(t,e,r){"use strict";var n=t("./Uint8ArrayReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(t,e,r){"use strict";var n=t("./DataReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.byteAt=function(t){return this.data.charCodeAt(this.zero+t)},i.prototype.lastIndexOfSignature=function(t){return this.data.lastIndexOf(t)-this.zero},i.prototype.readAndCheckSignature=function(t){return t===this.readData(4)},i.prototype.readData=function(t){this.checkOffset(t);var e=this.data.slice(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./DataReader":18}],21:[function(t,e,r){"use strict";var n=t("./ArrayReader");function i(t){n.call(this,t)}t("../utils").inherits(i,n),i.prototype.readData=function(t){if(this.checkOffset(t),0===t)return new Uint8Array(0);var e=this.data.subarray(this.zero+this.index,this.zero+this.index+t);return this.index+=t,e},e.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(t,e,r){"use strict";var n=t("../utils"),i=t("../support"),o=t("./ArrayReader"),s=t("./StringReader"),a=t("./NodeBufferReader"),u=t("./Uint8ArrayReader");e.exports=function(t){var e=n.getTypeOf(t);return n.checkSupport(e),"string"!==e||i.uint8array?"nodebuffer"===e?new a(t):i.uint8array?new u(n.transformTo("uint8array",t)):new o(n.transformTo("array",t)):new s(t)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(t,e,r){"use strict";r.LOCAL_FILE_HEADER="PK",r.CENTRAL_FILE_HEADER="PK",r.CENTRAL_DIRECTORY_END="PK",r.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",r.ZIP64_CENTRAL_DIRECTORY_END="PK",r.DATA_DESCRIPTOR="PK\b"},{}],24:[function(t,e,r){"use strict";var n=t("./GenericWorker"),i=t("../utils");function o(t){n.call(this,"ConvertWorker to "+t),this.destType=t}i.inherits(o,n),o.prototype.processChunk=function(t){this.push({data:i.transformTo(this.destType,t.data),meta:t.meta})},e.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(t,e,r){"use strict";var n=t("./GenericWorker"),i=t("../crc32");function o(){n.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}t("../utils").inherits(o,n),o.prototype.processChunk=function(t){this.streamInfo.crc32=i(t.data,this.streamInfo.crc32||0),this.push(t)},e.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./GenericWorker");function o(t){i.call(this,"DataLengthProbe for "+t),this.propName=t,this.withStreamInfo(t,0)}n.inherits(o,i),o.prototype.processChunk=function(t){if(t){var e=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=e+t.data.length}i.prototype.processChunk.call(this,t)},e.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./GenericWorker");function o(t){i.call(this,"DataWorker");var e=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,t.then((function(t){e.dataIsReady=!0,e.data=t,e.max=t&&t.length||0,e.type=n.getTypeOf(t),e.isPaused||e._tickAndRepeat()}),(function(t){e.error(t)}))}n.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,n.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(n.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var t=null,e=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":t=this.data.substring(this.index,e);break;case"uint8array":t=this.data.subarray(this.index,e);break;case"array":case"nodebuffer":t=this.data.slice(this.index,e)}return this.index=e,this.push({data:t,meta:{percent:this.max?this.index/this.max*100:0}})},e.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(t,e,r){"use strict";function n(t){this.name=t||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}n.prototype={push:function(t){this.emit("data",t)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(t){this.emit("error",t)}return!0},error:function(t){return!this.isFinished&&(this.isPaused?this.generatedError=t:(this.isFinished=!0,this.emit("error",t),this.previous&&this.previous.error(t),this.cleanUp()),!0)},on:function(t,e){return this._listeners[t].push(e),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(t,e){if(this._listeners[t])for(var r=0;r<this._listeners[t].length;r++)this._listeners[t][r].call(this,e)},pipe:function(t){return t.registerPrevious(this)},registerPrevious:function(t){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=t.streamInfo,this.mergeStreamInfo(),this.previous=t;var e=this;return t.on("data",(function(t){e.processChunk(t)})),t.on("end",(function(){e.end()})),t.on("error",(function(t){e.error(t)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var t=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),t=!0),this.previous&&this.previous.resume(),!t},flush:function(){},processChunk:function(t){this.push(t)},withStreamInfo:function(t,e){return this.extraStreamInfo[t]=e,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var t in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(t)&&(this.streamInfo[t]=this.extraStreamInfo[t])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var t="Worker "+this.name;return this.previous?this.previous+" -> "+t:t}},e.exports=n},{}],29:[function(t,e,r){"use strict";var n=t("../utils"),i=t("./ConvertWorker"),o=t("./GenericWorker"),s=t("../base64"),a=t("../support"),u=t("../external"),c=null;if(a.nodestream)try{c=t("../nodejs/NodejsStreamOutputAdapter")}catch(t){}function l(t,e,r){var s=e;switch(e){case"blob":case"arraybuffer":s="uint8array";break;case"base64":s="string"}try{this._internalType=s,this._outputType=e,this._mimeType=r,n.checkSupport(s),this._worker=t.pipe(new i(s)),t.lock()}catch(t){this._worker=new o("error"),this._worker.error(t)}}l.prototype={accumulate:function(t){return e=this,r=t,new u.Promise((function(t,i){var o=[],a=e._internalType,u=e._outputType,c=e._mimeType;e.on("data",(function(t,e){o.push(t),r&&r(e)})).on("error",(function(t){o=[],i(t)})).on("end",(function(){try{var e=function(t,e,r){switch(t){case"blob":return n.newBlob(n.transformTo("arraybuffer",e),r);case"base64":return s.encode(e);default:return n.transformTo(t,e)}}(u,function(t,e){var r,n=0,i=null,o=0;for(r=0;r<e.length;r++)o+=e[r].length;switch(t){case"string":return e.join("");case"array":return Array.prototype.concat.apply([],e);case"uint8array":for(i=new Uint8Array(o),r=0;r<e.length;r++)i.set(e[r],n),n+=e[r].length;return i;case"nodebuffer":return Buffer.concat(e);default:throw new Error("concat : unsupported type '"+t+"'")}}(a,o),c);t(e)}catch(e){i(e)}o=[]})).resume()}));var e,r},on:function(t,e){var r=this;return"data"===t?this._worker.on(t,(function(t){e.call(r,t.data,t.meta)})):this._worker.on(t,(function(){n.delay(e,arguments,r)})),this},resume:function(){return n.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(t){if(n.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new c(this,{objectMode:"nodebuffer"!==this._outputType},t)}},e.exports=l},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(t,e,r){"use strict";if(r.base64=!0,r.array=!0,r.string=!0,r.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,r.nodebuffer="undefined"!=typeof Buffer,r.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)r.blob=!1;else{var n=new ArrayBuffer(0);try{r.blob=0===new Blob([n],{type:"application/zip"}).size}catch(t){try{var i=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);i.append(n),r.blob=0===i.getBlob("application/zip").size}catch(t){r.blob=!1}}}try{r.nodestream=!!t("readable-stream").Readable}catch(t){r.nodestream=!1}},{"readable-stream":16}],31:[function(t,e,r){"use strict";for(var n=t("./utils"),i=t("./support"),o=t("./nodejsUtils"),s=t("./stream/GenericWorker"),a=new Array(256),u=0;u<256;u++)a[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function c(){s.call(this,"utf-8 decode"),this.leftOver=null}function l(){s.call(this,"utf-8 encode")}a[254]=a[254]=1,r.utf8encode=function(t){return i.nodebuffer?o.newBufferFrom(t,"utf-8"):function(t){var e,r,n,o,s,a=t.length,u=0;for(o=0;o<a;o++)55296==(64512&(r=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=t.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),u+=r<128?1:r<2048?2:r<65536?3:4;for(e=i.uint8array?new Uint8Array(u):new Array(u),o=s=0;s<u;o++)55296==(64512&(r=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(n=t.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(n-56320),o++),r<128?e[s++]=r:(r<2048?e[s++]=192|r>>>6:(r<65536?e[s++]=224|r>>>12:(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63),e[s++]=128|r>>>6&63),e[s++]=128|63&r);return e}(t)},r.utf8decode=function(t){return i.nodebuffer?n.transformTo("nodebuffer",t).toString("utf-8"):function(t){var e,r,i,o,s=t.length,u=new Array(2*s);for(e=r=0;e<s;)if((i=t[e++])<128)u[r++]=i;else if(4<(o=a[i]))u[r++]=65533,e+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&e<s;)i=i<<6|63&t[e++],o--;1<o?u[r++]=65533:i<65536?u[r++]=i:(i-=65536,u[r++]=55296|i>>10&1023,u[r++]=56320|1023&i)}return u.length!==r&&(u.subarray?u=u.subarray(0,r):u.length=r),n.applyFromCharCode(u)}(t=n.transformTo(i.uint8array?"uint8array":"array",t))},n.inherits(c,s),c.prototype.processChunk=function(t){var e=n.transformTo(i.uint8array?"uint8array":"array",t.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var o=e;(e=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),e.set(o,this.leftOver.length)}else e=this.leftOver.concat(e);this.leftOver=null}var s=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0||0===r?e:r+a[t[r]]>e?r:e}(e),u=e;s!==e.length&&(i.uint8array?(u=e.subarray(0,s),this.leftOver=e.subarray(s,e.length)):(u=e.slice(0,s),this.leftOver=e.slice(s,e.length))),this.push({data:r.utf8decode(u),meta:t.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:r.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},r.Utf8DecodeWorker=c,n.inherits(l,s),l.prototype.processChunk=function(t){this.push({data:r.utf8encode(t.data),meta:t.meta})},r.Utf8EncodeWorker=l},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(t,e,r){"use strict";var n=t("./support"),i=t("./base64"),o=t("./nodejsUtils"),s=t("set-immediate-shim"),a=t("./external");function u(t){return t}function c(t,e){for(var r=0;r<t.length;++r)e[r]=255&t.charCodeAt(r);return e}r.newBlob=function(t,e){r.checkSupport("blob");try{return new Blob([t],{type:e})}catch(r){try{var n=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return n.append(t),n.getBlob(e)}catch(t){throw new Error("Bug : can't construct the Blob.")}}};var l={stringifyByChunk:function(t,e,r){var n=[],i=0,o=t.length;if(o<=r)return String.fromCharCode.apply(null,t);for(;i<o;)"array"===e||"nodebuffer"===e?n.push(String.fromCharCode.apply(null,t.slice(i,Math.min(i+r,o)))):n.push(String.fromCharCode.apply(null,t.subarray(i,Math.min(i+r,o)))),i+=r;return n.join("")},stringifyByChar:function(t){for(var e="",r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return e},applyCanBeUsed:{uint8array:function(){try{return n.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(t){return!1}}(),nodebuffer:function(){try{return n.nodebuffer&&1===String.fromCharCode.apply(null,o.allocBuffer(1)).length}catch(t){return!1}}()}};function h(t){var e=65536,n=r.getTypeOf(t),i=!0;if("uint8array"===n?i=l.applyCanBeUsed.uint8array:"nodebuffer"===n&&(i=l.applyCanBeUsed.nodebuffer),i)for(;1<e;)try{return l.stringifyByChunk(t,n,e)}catch(t){e=Math.floor(e/2)}return l.stringifyByChar(t)}function f(t,e){for(var r=0;r<t.length;r++)e[r]=t[r];return e}r.applyFromCharCode=h;var d={};d.string={string:u,array:function(t){return c(t,new Array(t.length))},arraybuffer:function(t){return d.string.uint8array(t).buffer},uint8array:function(t){return c(t,new Uint8Array(t.length))},nodebuffer:function(t){return c(t,o.allocBuffer(t.length))}},d.array={string:h,array:u,arraybuffer:function(t){return new Uint8Array(t).buffer},uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return o.newBufferFrom(t)}},d.arraybuffer={string:function(t){return h(new Uint8Array(t))},array:function(t){return f(new Uint8Array(t),new Array(t.byteLength))},arraybuffer:u,uint8array:function(t){return new Uint8Array(t)},nodebuffer:function(t){return o.newBufferFrom(new Uint8Array(t))}},d.uint8array={string:h,array:function(t){return f(t,new Array(t.length))},arraybuffer:function(t){return t.buffer},uint8array:u,nodebuffer:function(t){return o.newBufferFrom(t)}},d.nodebuffer={string:h,array:function(t){return f(t,new Array(t.length))},arraybuffer:function(t){return d.nodebuffer.uint8array(t).buffer},uint8array:function(t){return f(t,new Uint8Array(t.length))},nodebuffer:u},r.transformTo=function(t,e){if(e=e||"",!t)return e;r.checkSupport(t);var n=r.getTypeOf(e);return d[n][t](e)},r.getTypeOf=function(t){return"string"==typeof t?"string":"[object Array]"===Object.prototype.toString.call(t)?"array":n.nodebuffer&&o.isBuffer(t)?"nodebuffer":n.uint8array&&t instanceof Uint8Array?"uint8array":n.arraybuffer&&t instanceof ArrayBuffer?"arraybuffer":void 0},r.checkSupport=function(t){if(!n[t.toLowerCase()])throw new Error(t+" is not supported by this platform")},r.MAX_VALUE_16BITS=65535,r.MAX_VALUE_32BITS=-1,r.pretty=function(t){var e,r,n="";for(r=0;r<(t||"").length;r++)n+="\\x"+((e=t.charCodeAt(r))<16?"0":"")+e.toString(16).toUpperCase();return n},r.delay=function(t,e,r){s((function(){t.apply(r||null,e||[])}))},r.inherits=function(t,e){function r(){}r.prototype=e.prototype,t.prototype=new r},r.extend=function(){var t,e,r={};for(t=0;t<arguments.length;t++)for(e in arguments[t])arguments[t].hasOwnProperty(e)&&void 0===r[e]&&(r[e]=arguments[t][e]);return r},r.prepareContent=function(t,e,o,s,u){return a.Promise.resolve(e).then((function(t){return n.blob&&(t instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(t)))&&"undefined"!=typeof FileReader?new a.Promise((function(e,r){var n=new FileReader;n.onload=function(t){e(t.target.result)},n.onerror=function(t){r(t.target.error)},n.readAsArrayBuffer(t)})):t})).then((function(e){var l,h=r.getTypeOf(e);return h?("arraybuffer"===h?e=r.transformTo("uint8array",e):"string"===h&&(u?e=i.decode(e):o&&!0!==s&&(e=c(l=e,n.uint8array?new Uint8Array(l.length):new Array(l.length)))),e):a.Promise.reject(new Error("Can't read the data of '"+t+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,"set-immediate-shim":54}],33:[function(t,e,r){"use strict";var n=t("./reader/readerFor"),i=t("./utils"),o=t("./signature"),s=t("./zipEntry"),a=(t("./utf8"),t("./support"));function u(t){this.files=[],this.loadOptions=t}u.prototype={checkSignature:function(t){if(!this.reader.readAndCheckSignature(t)){this.reader.index-=4;var e=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(e)+", expected "+i.pretty(t)+")")}},isSignature:function(t,e){var r=this.reader.index;this.reader.setIndex(t);var n=this.reader.readString(4)===e;return this.reader.setIndex(r),n},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var t=this.reader.readData(this.zipCommentLength),e=a.uint8array?"uint8array":"array",r=i.transformTo(e,t);this.zipComment=this.loadOptions.decodeFileName(r)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var t,e,r,n=this.zip64EndOfCentralSize-44;0<n;)t=this.reader.readInt(2),e=this.reader.readInt(4),r=this.reader.readData(e),this.zip64ExtensibleData[t]={id:t,length:e,value:r}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var t,e;for(t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var t;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(t=new s({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(t);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var t=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(t<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(t);var e=t;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(t=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(t),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var r=this.centralDirOffset+this.centralDirSize;this.zip64&&(r+=20,r+=12+this.zip64EndOfCentralSize);var n=e-r;if(0<n)this.isSignature(e,o.CENTRAL_FILE_HEADER)||(this.reader.zero=n);else if(n<0)throw new Error("Corrupted zip: missing "+Math.abs(n)+" bytes.")},prepareReader:function(t){this.reader=n(t)},load:function(t){this.prepareReader(t),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},e.exports=u},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utf8":31,"./utils":32,"./zipEntry":34}],34:[function(t,e,r){"use strict";var n=t("./reader/readerFor"),i=t("./utils"),o=t("./compressedObject"),s=t("./crc32"),a=t("./utf8"),u=t("./compressions"),c=t("./support");function l(t,e){this.options=t,this.loadOptions=e}l.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(t){var e,r;if(t.skip(22),this.fileNameLength=t.readInt(2),r=t.readInt(2),this.fileName=t.readData(this.fileNameLength),t.skip(r),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(e=function(t){for(var e in u)if(u.hasOwnProperty(e)&&u[e].magic===t)return u[e];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,e,t.readData(this.compressedSize))},readCentralPart:function(t){this.versionMadeBy=t.readInt(2),t.skip(2),this.bitFlag=t.readInt(2),this.compressionMethod=t.readString(2),this.date=t.readDate(),this.crc32=t.readInt(4),this.compressedSize=t.readInt(4),this.uncompressedSize=t.readInt(4);var e=t.readInt(2);if(this.extraFieldsLength=t.readInt(2),this.fileCommentLength=t.readInt(2),this.diskNumberStart=t.readInt(2),this.internalFileAttributes=t.readInt(2),this.externalFileAttributes=t.readInt(4),this.localHeaderOffset=t.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");t.skip(e),this.readExtraFields(t),this.parseZIP64ExtraField(t),this.fileComment=t.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var t=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==t&&(this.dosPermissions=63&this.externalFileAttributes),3==t&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(t){if(this.extraFields[1]){var e=n(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(t){var e,r,n,i=t.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});t.index+4<i;)e=t.readInt(2),r=t.readInt(2),n=t.readData(r),this.extraFields[e]={id:e,length:r,value:n};t.setIndex(i)},handleUTF8:function(){var t=c.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=a.utf8decode(this.fileName),this.fileCommentStr=a.utf8decode(this.fileComment);else{var e=this.findExtraFieldUnicodePath();if(null!==e)this.fileNameStr=e;else{var r=i.transformTo(t,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(r)}var n=this.findExtraFieldUnicodeComment();if(null!==n)this.fileCommentStr=n;else{var o=i.transformTo(t,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(o)}}},findExtraFieldUnicodePath:function(){var t=this.extraFields[28789];if(t){var e=n(t.value);return 1!==e.readInt(1)||s(this.fileName)!==e.readInt(4)?null:a.utf8decode(e.readData(t.length-5))}return null},findExtraFieldUnicodeComment:function(){var t=this.extraFields[25461];if(t){var e=n(t.value);return 1!==e.readInt(1)||s(this.fileComment)!==e.readInt(4)?null:a.utf8decode(e.readData(t.length-5))}return null}},e.exports=l},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(t,e,r){"use strict";function n(t,e,r){this.name=t,this.dir=r.dir,this.date=r.date,this.comment=r.comment,this.unixPermissions=r.unixPermissions,this.dosPermissions=r.dosPermissions,this._data=e,this._dataBinary=r.binary,this.options={compression:r.compression,compressionOptions:r.compressionOptions}}var i=t("./stream/StreamHelper"),o=t("./stream/DataWorker"),s=t("./utf8"),a=t("./compressedObject"),u=t("./stream/GenericWorker");n.prototype={internalStream:function(t){var e=null,r="string";try{if(!t)throw new Error("No output type specified.");var n="string"===(r=t.toLowerCase())||"text"===r;"binarystring"!==r&&"text"!==r||(r="string"),e=this._decompressWorker();var o=!this._dataBinary;o&&!n&&(e=e.pipe(new s.Utf8EncodeWorker)),!o&&n&&(e=e.pipe(new s.Utf8DecodeWorker))}catch(t){(e=new u("error")).error(t)}return new i(e,r,"")},async:function(t,e){return this.internalStream(t).accumulate(e)},nodeStream:function(t,e){return this.internalStream(t||"nodebuffer").toNodejsStream(e)},_compressWorker:function(t,e){if(this._data instanceof a&&this._data.compression.magic===t.magic)return this._data.getCompressedWorker();var r=this._decompressWorker();return this._dataBinary||(r=r.pipe(new s.Utf8EncodeWorker)),a.createWorkerFrom(r,t,e)},_decompressWorker:function(){return this._data instanceof a?this._data.getContentWorker():this._data instanceof u?this._data:new o(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<c.length;h++)n.prototype[c[h]]=l;e.exports=n},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(t,r,n){(function(t){"use strict";var e,n,i=t.MutationObserver||t.WebKitMutationObserver;if(i){var o=0,s=new i(l),a=t.document.createTextNode("");s.observe(a,{characterData:!0}),e=function(){a.data=o=++o%2}}else if(t.setImmediate||void 0===t.MessageChannel)e="document"in t&&"onreadystatechange"in t.document.createElement("script")?function(){var e=t.document.createElement("script");e.onreadystatechange=function(){l(),e.onreadystatechange=null,e.parentNode.removeChild(e),e=null},t.document.documentElement.appendChild(e)}:function(){setTimeout(l,0)};else{var u=new t.MessageChannel;u.port1.onmessage=l,e=function(){u.port2.postMessage(0)}}var c=[];function l(){var t,e;n=!0;for(var r=c.length;r;){for(e=c,c=[],t=-1;++t<r;)e[t]();r=c.length}n=!1}r.exports=function(t){1!==c.push(t)||n||e()}}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],37:[function(t,e,r){"use strict";var n=t("immediate");function i(){}var o={},s=["REJECTED"],a=["FULFILLED"],u=["PENDING"];function c(t){if("function"!=typeof t)throw new TypeError("resolver must be a function");this.state=u,this.queue=[],this.outcome=void 0,t!==i&&d(this,t)}function l(t,e,r){this.promise=t,"function"==typeof e&&(this.onFulfilled=e,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function h(t,e,r){n((function(){var n;try{n=e(r)}catch(n){return o.reject(t,n)}n===t?o.reject(t,new TypeError("Cannot resolve promise with itself")):o.resolve(t,n)}))}function f(t){var e=t&&t.then;if(t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof e)return function(){e.apply(t,arguments)}}function d(t,e){var r=!1;function n(e){r||(r=!0,o.reject(t,e))}function i(e){r||(r=!0,o.resolve(t,e))}var s=p((function(){e(i,n)}));"error"===s.status&&n(s.value)}function p(t,e){var r={};try{r.value=t(e),r.status="success"}catch(t){r.status="error",r.value=t}return r}(e.exports=c).prototype.finally=function(t){if("function"!=typeof t)return this;var e=this.constructor;return this.then((function(r){return e.resolve(t()).then((function(){return r}))}),(function(r){return e.resolve(t()).then((function(){throw r}))}))},c.prototype.catch=function(t){return this.then(null,t)},c.prototype.then=function(t,e){if("function"!=typeof t&&this.state===a||"function"!=typeof e&&this.state===s)return this;var r=new this.constructor(i);return this.state!==u?h(r,this.state===a?t:e,this.outcome):this.queue.push(new l(r,t,e)),r},l.prototype.callFulfilled=function(t){o.resolve(this.promise,t)},l.prototype.otherCallFulfilled=function(t){h(this.promise,this.onFulfilled,t)},l.prototype.callRejected=function(t){o.reject(this.promise,t)},l.prototype.otherCallRejected=function(t){h(this.promise,this.onRejected,t)},o.resolve=function(t,e){var r=p(f,e);if("error"===r.status)return o.reject(t,r.value);var n=r.value;if(n)d(t,n);else{t.state=a,t.outcome=e;for(var i=-1,s=t.queue.length;++i<s;)t.queue[i].callFulfilled(e)}return t},o.reject=function(t,e){t.state=s,t.outcome=e;for(var r=-1,n=t.queue.length;++r<n;)t.queue[r].callRejected(e);return t},c.resolve=function(t){return t instanceof this?t:o.resolve(new this(i),t)},c.reject=function(t){var e=new this(i);return o.reject(e,t)},c.all=function(t){var e=this;if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var r=t.length,n=!1;if(!r)return this.resolve([]);for(var s=new Array(r),a=0,u=-1,c=new this(i);++u<r;)l(t[u],u);return c;function l(t,i){e.resolve(t).then((function(t){s[i]=t,++a!==r||n||(n=!0,o.resolve(c,s))}),(function(t){n||(n=!0,o.reject(c,t))}))}},c.race=function(t){if("[object Array]"!==Object.prototype.toString.call(t))return this.reject(new TypeError("must be an array"));var e=t.length,r=!1;if(!e)return this.resolve([]);for(var n,s=-1,a=new this(i);++s<e;)n=t[s],this.resolve(n).then((function(t){r||(r=!0,o.resolve(a,t))}),(function(t){r||(r=!0,o.reject(a,t))}));return a}},{immediate:36}],38:[function(t,e,r){"use strict";var n={};(0,t("./lib/utils/common").assign)(n,t("./lib/deflate"),t("./lib/inflate"),t("./lib/zlib/constants")),e.exports=n},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(t,e,r){"use strict";var n=t("./zlib/deflate"),i=t("./utils/common"),o=t("./utils/strings"),s=t("./zlib/messages"),a=t("./zlib/zstream"),u=Object.prototype.toString;function c(t){if(!(this instanceof c))return new c(t);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},t||{});var e=this.options;e.raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var r=n.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(0!==r)throw new Error(s[r]);if(e.header&&n.deflateSetHeader(this.strm,e.header),e.dictionary){var l;if(l="string"==typeof e.dictionary?o.string2buf(e.dictionary):"[object ArrayBuffer]"===u.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(r=n.deflateSetDictionary(this.strm,l)))throw new Error(s[r]);this._dict_set=!0}}function l(t,e){var r=new c(e);if(r.push(t,!0),r.err)throw r.msg||s[r.err];return r.result}c.prototype.push=function(t,e){var r,s,a=this.strm,c=this.options.chunkSize;if(this.ended)return!1;s=e===~~e?e:!0===e?4:0,"string"==typeof t?a.input=o.string2buf(t):"[object ArrayBuffer]"===u.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;do{if(0===a.avail_out&&(a.output=new i.Buf8(c),a.next_out=0,a.avail_out=c),1!==(r=n.deflate(a,s))&&0!==r)return this.onEnd(r),!(this.ended=!0);0!==a.avail_out&&(0!==a.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(a.output,a.next_out))):this.onData(i.shrinkBuf(a.output,a.next_out)))}while((0<a.avail_in||0===a.avail_out)&&1!==r);return 4===s?(r=n.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,0===r):2!==s||(this.onEnd(0),!(a.avail_out=0))},c.prototype.onData=function(t){this.chunks.push(t)},c.prototype.onEnd=function(t){0===t&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Deflate=c,r.deflate=l,r.deflateRaw=function(t,e){return(e=e||{}).raw=!0,l(t,e)},r.gzip=function(t,e){return(e=e||{}).gzip=!0,l(t,e)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(t,e,r){"use strict";var n=t("./zlib/inflate"),i=t("./utils/common"),o=t("./utils/strings"),s=t("./zlib/constants"),a=t("./zlib/messages"),u=t("./zlib/zstream"),c=t("./zlib/gzheader"),l=Object.prototype.toString;function h(t){if(!(this instanceof h))return new h(t);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},t||{});var e=this.options;e.raw&&0<=e.windowBits&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(0<=e.windowBits&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),15<e.windowBits&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0;var r=n.inflateInit2(this.strm,e.windowBits);if(r!==s.Z_OK)throw new Error(a[r]);this.header=new c,n.inflateGetHeader(this.strm,this.header)}function f(t,e){var r=new h(e);if(r.push(t,!0),r.err)throw r.msg||a[r.err];return r.result}h.prototype.push=function(t,e){var r,a,u,c,h,f,d=this.strm,p=this.options.chunkSize,m=this.options.dictionary,g=!1;if(this.ended)return!1;a=e===~~e?e:!0===e?s.Z_FINISH:s.Z_NO_FLUSH,"string"==typeof t?d.input=o.binstring2buf(t):"[object ArrayBuffer]"===l.call(t)?d.input=new Uint8Array(t):d.input=t,d.next_in=0,d.avail_in=d.input.length;do{if(0===d.avail_out&&(d.output=new i.Buf8(p),d.next_out=0,d.avail_out=p),(r=n.inflate(d,s.Z_NO_FLUSH))===s.Z_NEED_DICT&&m&&(f="string"==typeof m?o.string2buf(m):"[object ArrayBuffer]"===l.call(m)?new Uint8Array(m):m,r=n.inflateSetDictionary(this.strm,f)),r===s.Z_BUF_ERROR&&!0===g&&(r=s.Z_OK,g=!1),r!==s.Z_STREAM_END&&r!==s.Z_OK)return this.onEnd(r),!(this.ended=!0);d.next_out&&(0!==d.avail_out&&r!==s.Z_STREAM_END&&(0!==d.avail_in||a!==s.Z_FINISH&&a!==s.Z_SYNC_FLUSH)||("string"===this.options.to?(u=o.utf8border(d.output,d.next_out),c=d.next_out-u,h=o.buf2string(d.output,u),d.next_out=c,d.avail_out=p-c,c&&i.arraySet(d.output,d.output,u,c,0),this.onData(h)):this.onData(i.shrinkBuf(d.output,d.next_out)))),0===d.avail_in&&0===d.avail_out&&(g=!0)}while((0<d.avail_in||0===d.avail_out)&&r!==s.Z_STREAM_END);return r===s.Z_STREAM_END&&(a=s.Z_FINISH),a===s.Z_FINISH?(r=n.inflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===s.Z_OK):a!==s.Z_SYNC_FLUSH||(this.onEnd(s.Z_OK),!(d.avail_out=0))},h.prototype.onData=function(t){this.chunks.push(t)},h.prototype.onEnd=function(t){t===s.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},r.Inflate=h,r.inflate=f,r.inflateRaw=function(t,e){return(e=e||{}).raw=!0,f(t,e)},r.ungzip=f},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(t,e,r){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;r.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var r=e.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])}}return t},r.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,r,n,i){if(e.subarray&&t.subarray)t.set(e.subarray(r,r+n),i);else for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){var e,r,n,i,o,s;for(e=n=0,r=t.length;e<r;e++)n+=t[e].length;for(s=new Uint8Array(n),e=i=0,r=t.length;e<r;e++)o=t[e],s.set(o,i),i+=o.length;return s}},o={arraySet:function(t,e,r,n,i){for(var o=0;o<n;o++)t[i+o]=e[r+o]},flattenChunks:function(t){return[].concat.apply([],t)}};r.setTyped=function(t){t?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,i)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,o))},r.setTyped(n)},{}],42:[function(t,e,r){"use strict";var n=t("./common"),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(t){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){o=!1}for(var s=new n.Buf8(256),a=0;a<256;a++)s[a]=252<=a?6:248<=a?5:240<=a?4:224<=a?3:192<=a?2:1;function u(t,e){if(e<65537&&(t.subarray&&o||!t.subarray&&i))return String.fromCharCode.apply(null,n.shrinkBuf(t,e));for(var r="",s=0;s<e;s++)r+=String.fromCharCode(t[s]);return r}s[254]=s[254]=1,r.string2buf=function(t){var e,r,i,o,s,a=t.length,u=0;for(o=0;o<a;o++)55296==(64512&(r=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=t.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),u+=r<128?1:r<2048?2:r<65536?3:4;for(e=new n.Buf8(u),o=s=0;s<u;o++)55296==(64512&(r=t.charCodeAt(o)))&&o+1<a&&56320==(64512&(i=t.charCodeAt(o+1)))&&(r=65536+(r-55296<<10)+(i-56320),o++),r<128?e[s++]=r:(r<2048?e[s++]=192|r>>>6:(r<65536?e[s++]=224|r>>>12:(e[s++]=240|r>>>18,e[s++]=128|r>>>12&63),e[s++]=128|r>>>6&63),e[s++]=128|63&r);return e},r.buf2binstring=function(t){return u(t,t.length)},r.binstring2buf=function(t){for(var e=new n.Buf8(t.length),r=0,i=e.length;r<i;r++)e[r]=t.charCodeAt(r);return e},r.buf2string=function(t,e){var r,n,i,o,a=e||t.length,c=new Array(2*a);for(r=n=0;r<a;)if((i=t[r++])<128)c[n++]=i;else if(4<(o=s[i]))c[n++]=65533,r+=o-1;else{for(i&=2===o?31:3===o?15:7;1<o&&r<a;)i=i<<6|63&t[r++],o--;1<o?c[n++]=65533:i<65536?c[n++]=i:(i-=65536,c[n++]=55296|i>>10&1023,c[n++]=56320|1023&i)}return u(c,n)},r.utf8border=function(t,e){var r;for((e=e||t.length)>t.length&&(e=t.length),r=e-1;0<=r&&128==(192&t[r]);)r--;return r<0||0===r?e:r+s[t[r]]>e?r:e}},{"./common":41}],43:[function(t,e,r){"use strict";e.exports=function(t,e,r,n){for(var i=65535&t|0,o=t>>>16&65535|0,s=0;0!==r;){for(r-=s=2e3<r?2e3:r;o=o+(i=i+e[n++]|0)|0,--s;);i%=65521,o%=65521}return i|o<<16|0}},{}],44:[function(t,e,r){"use strict";e.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],45:[function(t,e,r){"use strict";var n=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();e.exports=function(t,e,r,i){var o=n,s=i+r;t^=-1;for(var a=i;a<s;a++)t=t>>>8^o[255&(t^e[a])];return-1^t}},{}],46:[function(t,e,r){"use strict";var n,i=t("../utils/common"),o=t("./trees"),s=t("./adler32"),a=t("./crc32"),u=t("./messages"),c=-2,l=258,h=262,f=113;function d(t,e){return t.msg=u[e],e}function p(t){return(t<<1)-(4<t?9:0)}function m(t){for(var e=t.length;0<=--e;)t[e]=0}function g(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function _(t,e){o._tr_flush_block(t,0<=t.block_start?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,g(t.strm)}function b(t,e){t.pending_buf[t.pending++]=e}function y(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function w(t,e){var r,n,i=t.max_chain_length,o=t.strstart,s=t.prev_length,a=t.nice_match,u=t.strstart>t.w_size-h?t.strstart-(t.w_size-h):0,c=t.window,f=t.w_mask,d=t.prev,p=t.strstart+l,m=c[o+s-1],g=c[o+s];t.prev_length>=t.good_match&&(i>>=2),a>t.lookahead&&(a=t.lookahead);do{if(c[(r=e)+s]===g&&c[r+s-1]===m&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&o<p);if(n=l-(p-o),o=p-l,s<n){if(t.match_start=e,a<=(s=n))break;m=c[o+s-1],g=c[o+s]}}}while((e=d[e&f])>u&&0!=--i);return s<=t.lookahead?s:t.lookahead}function v(t){var e,r,n,o,u,c,l,f,d,p,m=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=m+(m-h)){for(i.arraySet(t.window,t.window,m,m,0),t.match_start-=m,t.strstart-=m,t.block_start-=m,e=r=t.hash_size;n=t.head[--e],t.head[e]=m<=n?n-m:0,--r;);for(e=r=m;n=t.prev[--e],t.prev[e]=m<=n?n-m:0,--r;);o+=m}if(0===t.strm.avail_in)break;if(c=t.strm,l=t.window,f=t.strstart+t.lookahead,p=void 0,(d=o)<(p=c.avail_in)&&(p=d),r=0===p?0:(c.avail_in-=p,i.arraySet(l,c.input,c.next_in,p,f),1===c.state.wrap?c.adler=s(c.adler,l,p,f):2===c.state.wrap&&(c.adler=a(c.adler,l,p,f)),c.next_in+=p,c.total_in+=p,p),t.lookahead+=r,t.lookahead+t.insert>=3)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+3-1])&t.hash_mask,t.prev[u&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=u,u++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<h&&0!==t.strm.avail_in)}function A(t,e){for(var r,n;;){if(t.lookahead<h){if(v(t),t.lookahead<h&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-h&&(t.match_length=w(t,r)),t.match_length>=3)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){for(t.match_length--;t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart,0!=--t.match_length;);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(_(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(_(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(_(t,!1),0===t.strm.avail_out)?1:2}function E(t,e){for(var r,n,i;;){if(t.lookahead<h){if(v(t),t.lookahead<h&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-h&&(t.match_length=w(t,r),t.match_length<=5&&(1===t.strategy||3===t.match_length&&4096<t.strstart-t.match_start)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){for(i=t.strstart+t.lookahead-3,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!=--t.prev_length;);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(_(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=o._tr_tally(t,0,t.window[t.strstart-1]))&&_(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=o._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(_(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(_(t,!1),0===t.strm.avail_out)?1:2}function S(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}function B(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),m(this.dyn_ltree),m(this.dyn_dtree),m(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),m(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),m(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function C(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:f,t.adler=2===e.wrap?0:1,e.last_flush=0,o._tr_init(e),0):d(t,c)}function T(t){var e,r=C(t);return 0===r&&((e=t.state).window_size=2*e.w_size,m(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),r}function R(t,e,r,n,o,s){if(!t)return c;var a=1;if(-1===e&&(e=6),n<0?(a=0,n=-n):15<n&&(a=2,n-=16),o<1||9<o||8!==r||n<8||15<n||e<0||9<e||s<0||4<s)return d(t,c);8===n&&(n=9);var u=new B;return(t.state=u).strm=t,u.wrap=a,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=e,u.strategy=s,u.method=r,T(t)}n=[new S(0,0,0,0,(function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(v(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,_(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-h&&(_(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(_(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(_(t,!1),t.strm.avail_out),1)})),new S(4,4,8,4,A),new S(4,5,16,8,A),new S(4,6,32,32,A),new S(4,4,16,16,E),new S(8,16,32,32,E),new S(8,16,128,128,E),new S(8,32,128,256,E),new S(32,128,258,1024,E),new S(32,258,258,4096,E)],r.deflateInit=function(t,e){return R(t,e,8,15,8,0)},r.deflateInit2=R,r.deflateReset=T,r.deflateResetKeep=C,r.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?c:(t.state.gzhead=e,0):c},r.deflate=function(t,e){var r,i,s,u;if(!t||!t.state||5<e||e<0)return t?d(t,c):c;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||666===i.status&&4!==e)return d(t,0===t.avail_out?-5:c);if(i.strm=t,r=i.last_flush,i.last_flush=e,42===i.status)if(2===i.wrap)t.adler=0,b(i,31),b(i,139),b(i,8),i.gzhead?(b(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),b(i,255&i.gzhead.time),b(i,i.gzhead.time>>8&255),b(i,i.gzhead.time>>16&255),b(i,i.gzhead.time>>24&255),b(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),b(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(b(i,255&i.gzhead.extra.length),b(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=a(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(b(i,0),b(i,0),b(i,0),b(i,0),b(i,0),b(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),b(i,3),i.status=f);else{var h=8+(i.w_bits-8<<4)<<8;h|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(h|=32),h+=31-h%31,i.status=f,y(i,h),0!==i.strstart&&(y(i,t.adler>>>16),y(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),g(t),s=i.pending,i.pending!==i.pending_buf_size));)b(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),g(t),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,b(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),g(t),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,b(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&g(t),i.pending+2<=i.pending_buf_size&&(b(i,255&t.adler),b(i,t.adler>>8&255),t.adler=0,i.status=f)):i.status=f),0!==i.pending){if(g(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&p(e)<=p(r)&&4!==e)return d(t,-5);if(666===i.status&&0!==t.avail_in)return d(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&666!==i.status){var w=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(v(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(_(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(_(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(_(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,s,a=t.window;;){if(t.lookahead<=l){if(v(t),t.lookahead<=l&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&0<t.strstart&&(n=a[i=t.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=t.strstart+l;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<s);t.match_length=l-(s-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(_(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(_(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(_(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==w&&4!==w||(i.status=666),1===w||3===w)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===w&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(m(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),g(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(b(i,255&t.adler),b(i,t.adler>>8&255),b(i,t.adler>>16&255),b(i,t.adler>>24&255),b(i,255&t.total_in),b(i,t.total_in>>8&255),b(i,t.total_in>>16&255),b(i,t.total_in>>24&255)):(y(i,t.adler>>>16),y(i,65535&t.adler)),g(t),0<i.wrap&&(i.wrap=-i.wrap),0!==i.pending?0:1)},r.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&e!==f&&666!==e?d(t,c):(t.state=null,e===f?d(t,-3):0):c},r.deflateSetDictionary=function(t,e){var r,n,o,a,u,l,h,f,d=e.length;if(!t||!t.state)return c;if(2===(a=(r=t.state).wrap)||1===a&&42!==r.status||r.lookahead)return c;for(1===a&&(t.adler=s(t.adler,e,d,0)),r.wrap=0,d>=r.w_size&&(0===a&&(m(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new i.Buf8(r.w_size),i.arraySet(f,e,d-r.w_size,r.w_size,0),e=f,d=r.w_size),u=t.avail_in,l=t.next_in,h=t.input,t.avail_in=d,t.next_in=0,t.input=e,v(r);r.lookahead>=3;){for(n=r.strstart,o=r.lookahead-2;r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++,--o;);r.strstart=n,r.lookahead=2,v(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,t.next_in=l,t.input=h,t.avail_in=u,r.wrap=a,0},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(t,e,r){"use strict";e.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],48:[function(t,e,r){"use strict";e.exports=function(t,e){var r,n,i,o,s,a,u,c,l,h,f,d,p,m,g,_,b,y,w,v,A,E,S,B,C;r=t.state,n=t.next_in,B=t.input,i=n+(t.avail_in-5),o=t.next_out,C=t.output,s=o-(e-t.avail_out),a=o+(t.avail_out-257),u=r.dmax,c=r.wsize,l=r.whave,h=r.wnext,f=r.window,d=r.hold,p=r.bits,m=r.lencode,g=r.distcode,_=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;t:do{p<15&&(d+=B[n++]<<p,p+=8,d+=B[n++]<<p,p+=8),y=m[d&_];e:for(;;){if(d>>>=w=y>>>24,p-=w,0==(w=y>>>16&255))C[o++]=65535&y;else{if(!(16&w)){if(0==(64&w)){y=m[(65535&y)+(d&(1<<w)-1)];continue e}if(32&w){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}v=65535&y,(w&=15)&&(p<w&&(d+=B[n++]<<p,p+=8),v+=d&(1<<w)-1,d>>>=w,p-=w),p<15&&(d+=B[n++]<<p,p+=8,d+=B[n++]<<p,p+=8),y=g[d&b];r:for(;;){if(d>>>=w=y>>>24,p-=w,!(16&(w=y>>>16&255))){if(0==(64&w)){y=g[(65535&y)+(d&(1<<w)-1)];continue r}t.msg="invalid distance code",r.mode=30;break t}if(A=65535&y,p<(w&=15)&&(d+=B[n++]<<p,(p+=8)<w&&(d+=B[n++]<<p,p+=8)),u<(A+=d&(1<<w)-1)){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=w,p-=w,(w=o-s)<A){if(l<(w=A-w)&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(S=f,(E=0)===h){if(E+=c-w,w<v){for(v-=w;C[o++]=f[E++],--w;);E=o-A,S=C}}else if(h<w){if(E+=c+h-w,(w-=h)<v){for(v-=w;C[o++]=f[E++],--w;);if(E=0,h<v){for(v-=w=h;C[o++]=f[E++],--w;);E=o-A,S=C}}}else if(E+=h-w,w<v){for(v-=w;C[o++]=f[E++],--w;);E=o-A,S=C}for(;2<v;)C[o++]=S[E++],C[o++]=S[E++],C[o++]=S[E++],v-=3;v&&(C[o++]=S[E++],1<v&&(C[o++]=S[E++]))}else{for(E=o-A;C[o++]=C[E++],C[o++]=C[E++],C[o++]=C[E++],2<(v-=3););v&&(C[o++]=C[E++],1<v&&(C[o++]=C[E++]))}break}}break}}while(n<i&&o<a);n-=v=p>>3,d&=(1<<(p-=v<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n<i?i-n+5:5-(n-i),t.avail_out=o<a?a-o+257:257-(o-a),r.hold=d,r.bits=p}},{}],49:[function(t,e,r){"use strict";var n=t("../utils/common"),i=t("./adler32"),o=t("./crc32"),s=t("./inffast"),a=t("./inftrees"),u=-2;function c(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function l(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function h(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):u}function f(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,h(t)):u}function d(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||15<e)?u:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,f(t))):u}function p(t,e){var r,n;return t?(n=new l,(t.state=n).window=null,0!==(r=d(t,e))&&(t.state=null),r):u}var m,g,_=!0;function b(t){if(_){var e;for(m=new n.Buf32(512),g=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(1,t.lens,0,288,m,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(2,t.lens,0,32,g,0,t.work,{bits:5}),_=!1}t.lencode=m,t.lenbits=9,t.distcode=g,t.distbits=5}function y(t,e,r,i){var o,s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),i>=s.wsize?(n.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(i<(o=s.wsize-s.wnext)&&(o=i),n.arraySet(s.window,e,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,e,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}r.inflateReset=f,r.inflateReset2=d,r.inflateResetKeep=h,r.inflateInit=function(t){return p(t,15)},r.inflateInit2=p,r.inflate=function(t,e){var r,l,h,f,d,p,m,g,_,w,v,A,E,S,B,C,T,R,O,I,M,x,D,k,P=0,L=new n.Buf8(4),F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return u;12===(r=t.state).mode&&(r.mode=13),d=t.next_out,h=t.output,m=t.avail_out,f=t.next_in,l=t.input,p=t.avail_in,g=r.hold,_=r.bits,w=p,v=m,x=0;t:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;_<16;){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}if(2&r.wrap&&35615===g){L[r.check=0]=255&g,L[1]=g>>>8&255,r.check=o(r.check,L,2,0),_=g=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&g)<<8)+(g>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&g)){t.msg="unknown compression method",r.mode=30;break}if(_-=4,M=8+(15&(g>>>=4)),0===r.wbits)r.wbits=M;else if(M>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<<M,t.adler=r.check=1,r.mode=512&g?10:12,_=g=0;break;case 2:for(;_<16;){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}if(r.flags=g,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=g>>8&1),512&r.flags&&(L[0]=255&g,L[1]=g>>>8&255,r.check=o(r.check,L,2,0)),_=g=0,r.mode=3;case 3:for(;_<32;){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}r.head&&(r.head.time=g),512&r.flags&&(L[0]=255&g,L[1]=g>>>8&255,L[2]=g>>>16&255,L[3]=g>>>24&255,r.check=o(r.check,L,4,0)),_=g=0,r.mode=4;case 4:for(;_<16;){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}r.head&&(r.head.xflags=255&g,r.head.os=g>>8),512&r.flags&&(L[0]=255&g,L[1]=g>>>8&255,r.check=o(r.check,L,2,0)),_=g=0,r.mode=5;case 5:if(1024&r.flags){for(;_<16;){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}r.length=g,r.head&&(r.head.extra_len=g),512&r.flags&&(L[0]=255&g,L[1]=g>>>8&255,r.check=o(r.check,L,2,0)),_=g=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&(p<(A=r.length)&&(A=p),A&&(r.head&&(M=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,l,f,A,M)),512&r.flags&&(r.check=o(r.check,l,A,f)),p-=A,f+=A,r.length-=A),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===p)break t;for(A=0;M=l[f+A++],r.head&&M&&r.length<65536&&(r.head.name+=String.fromCharCode(M)),M&&A<p;);if(512&r.flags&&(r.check=o(r.check,l,A,f)),p-=A,f+=A,M)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===p)break t;for(A=0;M=l[f+A++],r.head&&M&&r.length<65536&&(r.head.comment+=String.fromCharCode(M)),M&&A<p;);if(512&r.flags&&(r.check=o(r.check,l,A,f)),p-=A,f+=A,M)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;_<16;){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}if(g!==(65535&r.check)){t.msg="header crc mismatch",r.mode=30;break}_=g=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;_<32;){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}t.adler=r.check=c(g),_=g=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=d,t.avail_out=m,t.next_in=f,t.avail_in=p,r.hold=g,r.bits=_,2;t.adler=r.check=1,r.mode=12;case 12:if(5===e||6===e)break t;case 13:if(r.last){g>>>=7&_,_-=7&_,r.mode=27;break}for(;_<3;){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}switch(r.last=1&g,_-=1,3&(g>>>=1)){case 0:r.mode=14;break;case 1:if(b(r),r.mode=20,6!==e)break;g>>>=2,_-=2;break t;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}g>>>=2,_-=2;break;case 14:for(g>>>=7&_,_-=7&_;_<32;){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}if((65535&g)!=(g>>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&g,_=g=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(A=r.length){if(p<A&&(A=p),m<A&&(A=m),0===A)break t;n.arraySet(h,l,f,A,d),p-=A,f+=A,m-=A,d+=A,r.length-=A;break}r.mode=12;break;case 17:for(;_<14;){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}if(r.nlen=257+(31&g),g>>>=5,_-=5,r.ndist=1+(31&g),g>>>=5,_-=5,r.ncode=4+(15&g),g>>>=4,_-=4,286<r.nlen||30<r.ndist){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;_<3;){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}r.lens[F[r.have++]]=7&g,g>>>=3,_-=3}for(;r.have<19;)r.lens[F[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,D={bits:r.lenbits},x=a(0,r.lens,0,19,r.lencode,0,r.work,D),r.lenbits=D.bits,x){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;C=(P=r.lencode[g&(1<<r.lenbits)-1])>>>16&255,T=65535&P,!((B=P>>>24)<=_);){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}if(T<16)g>>>=B,_-=B,r.lens[r.have++]=T;else{if(16===T){for(k=B+2;_<k;){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}if(g>>>=B,_-=B,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}M=r.lens[r.have-1],A=3+(3&g),g>>>=2,_-=2}else if(17===T){for(k=B+3;_<k;){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}_-=B,M=0,A=3+(7&(g>>>=B)),g>>>=3,_-=3}else{for(k=B+7;_<k;){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}_-=B,M=0,A=11+(127&(g>>>=B)),g>>>=7,_-=7}if(r.have+A>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;A--;)r.lens[r.have++]=M}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,D={bits:r.lenbits},x=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,D),r.lenbits=D.bits,x){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,D={bits:r.distbits},x=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,D),r.distbits=D.bits,x){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(6<=p&&258<=m){t.next_out=d,t.avail_out=m,t.next_in=f,t.avail_in=p,r.hold=g,r.bits=_,s(t,v),d=t.next_out,h=t.output,m=t.avail_out,f=t.next_in,l=t.input,p=t.avail_in,g=r.hold,_=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;C=(P=r.lencode[g&(1<<r.lenbits)-1])>>>16&255,T=65535&P,!((B=P>>>24)<=_);){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}if(C&&0==(240&C)){for(R=B,O=C,I=T;C=(P=r.lencode[I+((g&(1<<R+O)-1)>>R)])>>>16&255,T=65535&P,!(R+(B=P>>>24)<=_);){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}g>>>=R,_-=R,r.back+=R}if(g>>>=B,_-=B,r.back+=B,r.length=T,0===C){r.mode=26;break}if(32&C){r.back=-1,r.mode=12;break}if(64&C){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&C,r.mode=22;case 22:if(r.extra){for(k=r.extra;_<k;){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}r.length+=g&(1<<r.extra)-1,g>>>=r.extra,_-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;C=(P=r.distcode[g&(1<<r.distbits)-1])>>>16&255,T=65535&P,!((B=P>>>24)<=_);){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}if(0==(240&C)){for(R=B,O=C,I=T;C=(P=r.distcode[I+((g&(1<<R+O)-1)>>R)])>>>16&255,T=65535&P,!(R+(B=P>>>24)<=_);){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}g>>>=R,_-=R,r.back+=R}if(g>>>=B,_-=B,r.back+=B,64&C){t.msg="invalid distance code",r.mode=30;break}r.offset=T,r.extra=15&C,r.mode=24;case 24:if(r.extra){for(k=r.extra;_<k;){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}r.offset+=g&(1<<r.extra)-1,g>>>=r.extra,_-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===m)break t;if(A=v-m,r.offset>A){if((A=r.offset-A)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}E=A>r.wnext?(A-=r.wnext,r.wsize-A):r.wnext-A,A>r.length&&(A=r.length),S=r.window}else S=h,E=d-r.offset,A=r.length;for(m<A&&(A=m),m-=A,r.length-=A;h[d++]=S[E++],--A;);0===r.length&&(r.mode=21);break;case 26:if(0===m)break t;h[d++]=r.length,m--,r.mode=21;break;case 27:if(r.wrap){for(;_<32;){if(0===p)break t;p--,g|=l[f++]<<_,_+=8}if(v-=m,t.total_out+=v,r.total+=v,v&&(t.adler=r.check=r.flags?o(r.check,h,v,d-v):i(r.check,h,v,d-v)),v=m,(r.flags?g:c(g))!==r.check){t.msg="incorrect data check",r.mode=30;break}_=g=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;_<32;){if(0===p)break t;p--,g+=l[f++]<<_,_+=8}if(g!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=30;break}_=g=0}r.mode=29;case 29:x=1;break t;case 30:x=-3;break t;case 31:return-4;case 32:default:return u}return t.next_out=d,t.avail_out=m,t.next_in=f,t.avail_in=p,r.hold=g,r.bits=_,(r.wsize||v!==t.avail_out&&r.mode<30&&(r.mode<27||4!==e))&&y(t,t.output,t.next_out,v-t.avail_out)?(r.mode=31,-4):(w-=t.avail_in,v-=t.avail_out,t.total_in+=w,t.total_out+=v,r.total+=v,r.wrap&&v&&(t.adler=r.check=r.flags?o(r.check,h,v,t.next_out-v):i(r.check,h,v,t.next_out-v)),t.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0==w&&0===v||4===e)&&0===x&&(x=-5),x)},r.inflateEnd=function(t){if(!t||!t.state)return u;var e=t.state;return e.window&&(e.window=null),t.state=null,0},r.inflateGetHeader=function(t,e){var r;return t&&t.state?0==(2&(r=t.state).wrap)?u:((r.head=e).done=!1,0):u},r.inflateSetDictionary=function(t,e){var r,n=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?u:11===r.mode&&i(1,e,n,0)!==r.check?-3:y(t,e,n,n)?(r.mode=31,-4):(r.havedict=1,0):u},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(t,e,r){"use strict";var n=t("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];e.exports=function(t,e,r,u,c,l,h,f){var d,p,m,g,_,b,y,w,v,A=f.bits,E=0,S=0,B=0,C=0,T=0,R=0,O=0,I=0,M=0,x=0,D=null,k=0,P=new n.Buf16(16),L=new n.Buf16(16),F=null,N=0;for(E=0;E<=15;E++)P[E]=0;for(S=0;S<u;S++)P[e[r+S]]++;for(T=A,C=15;1<=C&&0===P[C];C--);if(C<T&&(T=C),0===C)return c[l++]=20971520,c[l++]=20971520,f.bits=1,0;for(B=1;B<C&&0===P[B];B++);for(T<B&&(T=B),E=I=1;E<=15;E++)if(I<<=1,(I-=P[E])<0)return-1;if(0<I&&(0===t||1!==C))return-1;for(L[1]=0,E=1;E<15;E++)L[E+1]=L[E]+P[E];for(S=0;S<u;S++)0!==e[r+S]&&(h[L[e[r+S]]++]=S);if(b=0===t?(D=F=h,19):1===t?(D=i,k-=257,F=o,N-=257,256):(D=s,F=a,-1),E=B,_=l,O=S=x=0,m=-1,g=(M=1<<(R=T))-1,1===t&&852<M||2===t&&592<M)return 1;for(;;){for(y=E-O,v=h[S]<b?(w=0,h[S]):h[S]>b?(w=F[N+h[S]],D[k+h[S]]):(w=96,0),d=1<<E-O,B=p=1<<R;c[_+(x>>O)+(p-=d)]=y<<24|w<<16|v|0,0!==p;);for(d=1<<E-1;x&d;)d>>=1;if(0!==d?(x&=d-1,x+=d):x=0,S++,0==--P[E]){if(E===C)break;E=e[r+h[S]]}if(T<E&&(x&g)!==m){for(0===O&&(O=T),_+=B,I=1<<(R=E-O);R+O<C&&!((I-=P[R+O])<=0);)R++,I<<=1;if(M+=1<<R,1===t&&852<M||2===t&&592<M)return 1;c[m=x&g]=T<<24|R<<16|_-l|0}}return 0!==x&&(c[_+x]=E-O<<24|64<<16|0),f.bits=T,0}},{"../utils/common":41}],51:[function(t,e,r){"use strict";e.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],52:[function(t,e,r){"use strict";var n=t("../utils/common");function i(t){for(var e=t.length;0<=--e;)t[e]=0}var o=15,s=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],a=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],c=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],l=new Array(576);i(l);var h=new Array(60);i(h);var f=new Array(512);i(f);var d=new Array(256);i(d);var p=new Array(29);i(p);var m,g,_,b=new Array(30);function y(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function v(t){return t<256?f[t]:f[256+(t>>>7)]}function A(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function E(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,A(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function S(t,e,r){E(t,r[2*e],r[2*e+1])}function B(t,e){for(var r=0;r|=1&t,t>>>=1,r<<=1,0<--e;);return r>>>1}function C(t,e,r){var n,i,s=new Array(16),a=0;for(n=1;n<=o;n++)s[n]=a=a+r[n-1]<<1;for(i=0;i<=e;i++){var u=t[2*i+1];0!==u&&(t[2*i]=B(s[u]++,u))}}function T(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function R(t){8<t.bi_valid?A(t,t.bi_buf):0<t.bi_valid&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function O(t,e,r,n){var i=2*e,o=2*r;return t[i]<t[o]||t[i]===t[o]&&n[e]<=n[r]}function I(t,e,r){for(var n=t.heap[r],i=r<<1;i<=t.heap_len&&(i<t.heap_len&&O(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!O(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n}function M(t,e,r){var n,i,o,u,c=0;if(0!==t.last_lit)for(;n=t.pending_buf[t.d_buf+2*c]<<8|t.pending_buf[t.d_buf+2*c+1],i=t.pending_buf[t.l_buf+c],c++,0===n?S(t,i,e):(S(t,(o=d[i])+256+1,e),0!==(u=s[o])&&E(t,i-=p[o],u),S(t,o=v(--n),r),0!==(u=a[o])&&E(t,n-=b[o],u)),c<t.last_lit;);S(t,256,e)}function x(t,e){var r,n,i,s=e.dyn_tree,a=e.stat_desc.static_tree,u=e.stat_desc.has_stree,c=e.stat_desc.elems,l=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<c;r++)0!==s[2*r]?(t.heap[++t.heap_len]=l=r,t.depth[r]=0):s[2*r+1]=0;for(;t.heap_len<2;)s[2*(i=t.heap[++t.heap_len]=l<2?++l:0)]=1,t.depth[i]=0,t.opt_len--,u&&(t.static_len-=a[2*i+1]);for(e.max_code=l,r=t.heap_len>>1;1<=r;r--)I(t,s,r);for(i=c;r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],I(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,s[2*i]=s[2*r]+s[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,s[2*r+1]=s[2*n+1]=i,t.heap[1]=i++,I(t,s,1),2<=t.heap_len;);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,s,a,u,c=e.dyn_tree,l=e.max_code,h=e.stat_desc.static_tree,f=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,m=e.stat_desc.max_length,g=0;for(s=0;s<=o;s++)t.bl_count[s]=0;for(c[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)m<(s=c[2*c[2*(n=t.heap[r])+1]+1]+1)&&(s=m,g++),c[2*n+1]=s,l<n||(t.bl_count[s]++,a=0,p<=n&&(a=d[n-p]),u=c[2*n],t.opt_len+=u*(s+a),f&&(t.static_len+=u*(h[2*n+1]+a)));if(0!==g){do{for(s=m-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[m]--,g-=2}while(0<g);for(s=m;0!==s;s--)for(n=t.bl_count[s];0!==n;)l<(i=t.heap[--r])||(c[2*i+1]!==s&&(t.opt_len+=(s-c[2*i+1])*c[2*i],c[2*i+1]=s),n--)}}(t,e),C(s,l,t.bl_count)}function D(t,e,r){var n,i,o=-1,s=e[1],a=0,u=7,c=4;for(0===s&&(u=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=e[2*(n+1)+1],++a<u&&i===s||(a<c?t.bl_tree[2*i]+=a:0!==i?(i!==o&&t.bl_tree[2*i]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=i,c=(a=0)===s?(u=138,3):i===s?(u=6,3):(u=7,4))}function k(t,e,r){var n,i,o=-1,s=e[1],a=0,u=7,c=4;for(0===s&&(u=138,c=3),n=0;n<=r;n++)if(i=s,s=e[2*(n+1)+1],!(++a<u&&i===s)){if(a<c)for(;S(t,i,t.bl_tree),0!=--a;);else 0!==i?(i!==o&&(S(t,i,t.bl_tree),a--),S(t,16,t.bl_tree),E(t,a-3,2)):a<=10?(S(t,17,t.bl_tree),E(t,a-3,3)):(S(t,18,t.bl_tree),E(t,a-11,7));o=i,c=(a=0)===s?(u=138,3):i===s?(u=6,3):(u=7,4)}}i(b);var P=!1;function L(t,e,r,i){var o,s,a;E(t,0+(i?1:0),3),s=e,a=r,R(o=t),A(o,a),A(o,~a),n.arraySet(o.pending_buf,o.window,s,a,o.pending),o.pending+=a}r._tr_init=function(t){P||(function(){var t,e,r,n,i,c=new Array(16);for(n=r=0;n<28;n++)for(p[n]=r,t=0;t<1<<s[n];t++)d[r++]=n;for(d[r-1]=n,n=i=0;n<16;n++)for(b[n]=i,t=0;t<1<<a[n];t++)f[i++]=n;for(i>>=7;n<30;n++)for(b[n]=i<<7,t=0;t<1<<a[n]-7;t++)f[256+i++]=n;for(e=0;e<=o;e++)c[e]=0;for(t=0;t<=143;)l[2*t+1]=8,t++,c[8]++;for(;t<=255;)l[2*t+1]=9,t++,c[9]++;for(;t<=279;)l[2*t+1]=7,t++,c[7]++;for(;t<=287;)l[2*t+1]=8,t++,c[8]++;for(C(l,287,c),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=B(t,5);m=new y(l,s,257,286,o),g=new y(h,a,0,30,o),_=new y(new Array(0),u,0,19,7)}(),P=!0),t.l_desc=new w(t.dyn_ltree,m),t.d_desc=new w(t.dyn_dtree,g),t.bl_desc=new w(t.bl_tree,_),t.bi_buf=0,t.bi_valid=0,T(t)},r._tr_stored_block=L,r._tr_flush_block=function(t,e,r,n){var i,o,s=0;0<t.level?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),x(t,t.l_desc),x(t,t.d_desc),s=function(t){var e;for(D(t,t.dyn_ltree,t.l_desc.max_code),D(t,t.dyn_dtree,t.d_desc.max_code),x(t,t.bl_desc),e=18;3<=e&&0===t.bl_tree[2*c[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?L(t,e,r,n):4===t.strategy||o===i?(E(t,2+(n?1:0),3),M(t,l,h)):(E(t,4+(n?1:0),3),function(t,e,r,n){var i;for(E(t,e-257,5),E(t,r-1,5),E(t,n-4,4),i=0;i<n;i++)E(t,t.bl_tree[2*c[i]+1],3);k(t,t.dyn_ltree,e-1),k(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),M(t,t.dyn_ltree,t.dyn_dtree)),T(t),n&&R(t)},r._tr_tally=function(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(d[r]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},r._tr_align=function(t){var e;E(t,2,3),S(t,256,l),16===(e=t).bi_valid?(A(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},{"../utils/common":41}],53:[function(t,e,r){"use strict";e.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(t,e,n){"use strict";e.exports="function"==typeof r?r:function(){var t=[].slice.apply(arguments);t.splice(1,0,0),setTimeout.apply(null,t)}},{}]},{},[10])(10)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}))}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1])(1)}).call(this,r(8),r(49).setImmediate)},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(38);class i{constructor(t,e){this.name=t,this.type=e,this.sampleSize=1,this.reset()}setSampleSize(t){return this.sampleSize=t,this}incrementCount(){return this.addCount(1),this}decrementCount(){return this.subtractCount(1),this}addCount(t){return this._count+=t,this._samples++,this._checkSampling(),this}subtractCount(t){return this._count-=t,this._samples++,this._checkSampling(),this}addTime(t){return this._time+=t,this.lastTiming=t,this._samples++,this._checkSampling(),this}timeStart(){return this._startTime=Object(n.a)(),this._timerPending=!0,this}timeEnd(){return this._timerPending?(this.addTime(Object(n.a)()-this._startTime),this._timerPending=!1,this._checkSampling(),this):this}getSampleAverageCount(){return this.sampleSize>0?this.lastSampleCount/this.sampleSize:0}getSampleAverageTime(){return this.sampleSize>0?this.lastSampleTime/this.sampleSize:0}getSampleHz(){return this.lastSampleTime>0?this.sampleSize/(this.lastSampleTime/1e3):0}getAverageCount(){return this.samples>0?this.count/this.samples:0}getAverageTime(){return this.samples>0?this.time/this.samples:0}getHz(){return this.time>0?this.samples/(this.time/1e3):0}reset(){return this.time=0,this.count=0,this.samples=0,this.lastTiming=0,this.lastSampleTime=0,this.lastSampleCount=0,this._count=0,this._time=0,this._samples=0,this._startTime=0,this._timerPending=!1,this}_checkSampling(){this._samples===this.sampleSize&&(this.lastSampleTime=this._time,this.lastSampleCount=this._count,this.count+=this._count,this.time+=this._time,this.samples+=this._samples,this._time=0,this._count=0,this._samples=0)}}class o{constructor({id:t,stats:e}){this.id=t,this.stats={},this._initializeStats(e),Object.seal(this)}get(t,e="count"){return this._getOrCreate({name:t,type:e})}get size(){return Object.keys(this.stats).length}reset(){for(const t in this.stats)this.stats[t].reset();return this}forEach(t){for(const e in this.stats)t(this.stats[e])}getTable(){const t={};return this.forEach(e=>{t[e.name]={time:e.time||0,count:e.count||0,average:e.getAverageTime()||0,hz:e.getHz()||0}}),t}_initializeStats(t=[]){t.forEach(t=>this._getOrCreate(t))}_getOrCreate(t){if(!t||!t.name)return null;const{name:e,type:r}=t;return this.stats[e]||(this.stats[e]=t instanceof i?t:new i(e,r)),this.stats[e]}}},function(t,e,r){var n=r(9),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){"use strict";(function(e,n,i){var o=r(48);function s(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=b;var a,u=!e.browser&&["v0.10","v0.9."].indexOf(e.version.slice(0,5))>-1?n:o.nextTick;b.WritableState=_;var c=Object.create(r(33));c.inherits=r(4);var l={deprecate:r(20)},h=r(82),f=r(59).Buffer,d=i.Uint8Array||function(){};var p,m=r(83);function g(){}function _(t,e){a=a||r(18),t=t||{};var n=e instanceof a;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,c=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,i=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,i){--e.pendingcb,r?(o.nextTick(i,n),o.nextTick(S,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(i(n),t._writableState.errorEmitted=!0,t.emit("error",n),S(t,e))}(t,r,n,e,i);else{var s=A(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||v(t,r),n?u(w,t,r,s,i):w(t,r,s,i)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new s(this)}function b(t){if(a=a||r(18),!(p.call(b,this)||this instanceof a))return new b(t);this._writableState=new _(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function y(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function w(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),S(t,e)}function v(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),o=e.corkedRequestsFree;o.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,y(t,e,!0,e.length,i,"",o.finish),e.pendingcb++,e.lastBufferedRequest=null,o.next?(e.corkedRequestsFree=o.next,o.next=null):e.corkedRequestsFree=new s(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(y(t,e,!1,e.objectMode?1:c.length,c,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function A(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function E(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),S(t,e)}))}function S(t,e){var r=A(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,o.nextTick(E,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}c.inherits(b,h),_.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(_.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||this===b&&(t&&t._writableState instanceof _)}})):p=function(t){return t instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(t,e,r){var n,i=this._writableState,s=!1,a=!i.objectMode&&(n=t,f.isBuffer(n)||n instanceof d);return a&&!f.isBuffer(t)&&(t=function(t){return f.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),"function"!=typeof r&&(r=g),i.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),o.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var i=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),o.nextTick(n,s),i=!1),i}(this,i,t,r))&&(i.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=f.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else y(t,e,!1,a,n,i,o);return u}(this,i,a,t,e,r)),s},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||v(this,t))},b.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,S(t,e),r&&(e.finished?o.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),b.prototype.destroy=m.destroy,b.prototype._undestroy=m.undestroy,b.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,r(0),r(49).setImmediate,r(8))},function(t,e,r){"use strict";(function(e){function r(t){return"/"===t.charAt(0)}function n(t){var e=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/.exec(t),r=e[1]||"",n=Boolean(r&&":"!==r.charAt(1));return Boolean(e[2]||n)}t.exports="win32"===e.platform?n:r,t.exports.posix=r,t.exports.win32=n}).call(this,r(0))},function(t,e,r){var n=r(94);function i(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function o(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||"Function wrapped with `once`";return e.onceError=r+" shouldn't be called more than once",e.called=!1,e}t.exports=n(i),t.exports.strict=n(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},function(t,e,r){"use strict";var n=r(21).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||l()},c=e._writableState&&e._writableState.finished,l=function(){a=!1,c=!0,s||o.call(e)},h=e._readableState&&e._readableState.endEmitted,f=function(){s=!1,h=!0,a||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return s&&!h?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},m=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?m():e.on("request",m)),e.on("end",f),e.on("finish",l),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",m),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",f),e.removeListener("error",d),e.removeListener("close",p)}}},function(t,e){var r=t.exports=function(){};r.prototype.getName=function(){},r.prototype.getSize=function(){},r.prototype.getLastModifiedDate=function(){},r.prototype.isDirectory=function(){}},function(t,e){var r=t.exports={};r.dateToDos=function(t,e){var r=(e=e||!1)?t.getFullYear():t.getUTCFullYear();return r<1980?2162688:r>=2044?2141175677:r-1980<<25|(e?t.getMonth():t.getUTCMonth())+1<<21|(e?t.getDate():t.getUTCDate())<<16|(e?t.getHours():t.getUTCHours())<<11|(e?t.getMinutes():t.getUTCMinutes())<<5|(e?t.getSeconds():t.getUTCSeconds())/2},r.dosToDate=function(t){return new Date(1980+(t>>25&127),(t>>21&15)-1,t>>16&31,t>>11&31,t>>5&63,(31&t)<<1)},r.fromDosTime=function(t){return r.dosToDate(t.readUInt32LE(0))},r.getEightBytes=function(t){var e=Buffer.alloc(8);return e.writeUInt32LE(t%4294967296,0),e.writeUInt32LE(t/4294967296|0,4),e},r.getShortBytes=function(t){var e=Buffer.alloc(2);return e.writeUInt16LE((65535&t)>>>0,0),e},r.getShortBytesValue=function(t,e){return t.readUInt16LE(e)},r.getLongBytes=function(t){var e=Buffer.alloc(4);return e.writeUInt32LE((4294967295&t)>>>0,0),e},r.getLongBytesValue=function(t,e){return t.readUInt32LE(e)},r.toDosTime=function(t){return r.getLongBytes(r.dateToDos(t))}},function(t,e,r){"use strict";var n=r(23).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||l()},c=e._writableState&&e._writableState.finished,l=function(){a=!1,c=!0,s||o.call(e)},h=e._readableState&&e._readableState.endEmitted,f=function(){s=!1,h=!0,a||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return s&&!h?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},m=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?m():e.on("request",m)),e.on("end",f),e.on("finish",l),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",m),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",f),e.removeListener("error",d),e.removeListener("close",p)}}},function(t,e,r){"use strict";var n=r(25).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||l()},c=e._writableState&&e._writableState.finished,l=function(){a=!1,c=!0,s||o.call(e)},h=e._readableState&&e._readableState.endEmitted,f=function(){s=!1,h=!0,a||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return s&&!h?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},m=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?m():e.on("request",m)),e.on("end",f),e.on("finish",l),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",m),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",f),e.removeListener("error",d),e.removeListener("close",p)}}},function(t,e,r){"use strict";var n=r(27).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||l()},c=e._writableState&&e._writableState.finished,l=function(){a=!1,c=!0,s||o.call(e)},h=e._readableState&&e._readableState.endEmitted,f=function(){s=!1,h=!0,a||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return s&&!h?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},m=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?m():e.on("request",m)),e.on("end",f),e.on("finish",l),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",m),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",f),e.removeListener("error",d),e.removeListener("close",p)}}},function(t,e,r){"use strict";var n=r(29).codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||l()},c=e._writableState&&e._writableState.finished,l=function(){a=!1,c=!0,s||o.call(e)},h=e._readableState&&e._readableState.endEmitted,f=function(){s=!1,h=!0,a||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return s&&!h?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},m=function(){e.req.on("finish",l)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",u),e.on("close",u)):(e.on("complete",l),e.on("abort",p),e.req?m():e.on("request",m)),e.on("end",f),e.on("finish",l),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",l),e.removeListener("abort",p),e.removeListener("request",m),e.req&&e.req.removeListener("finish",l),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("end",f),e.removeListener("error",d),e.removeListener("close",p)}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(15);async function i(t){const e=[];for await(const r of t)e.push(r);return Object(n.a)(...e)}},function(t,e,r){"use strict";r.d(e,"a",(function(){return i})),r.d(e,"b",(function(){return o}));var n=r(31);function i(t,e,r,i){const o=Object(n.b)(r.byteLength,i),s=o-r.byteLength;if(t){const n=new Uint8Array(t.buffer,t.byteOffset+e,r.byteLength),i=new Uint8Array(r);n.set(i);for(let n=0;n<s;++n)t.setUint8(e+r.byteLength+n,32)}return e+=o}function o(t,e,r,n){return e=i(t,e,(new TextEncoder).encode(r),n)}},function(t,e){var r,n;r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(t,e){return t<<e|t>>>32-e},rotr:function(t,e){return t<<32-e|t>>>e},endian:function(t){if(t.constructor==Number)return 16711935&n.rotl(t,8)|4278255360&n.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=n.endian(t[e]);return t},randomBytes:function(t){for(var e=[];t>0;t--)e.push(Math.floor(256*Math.random()));return e},bytesToWords:function(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e},wordsToBytes:function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},bytesToHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push((t[r]>>>4).toString(16)),e.push((15&t[r]).toString(16));return e.join("")},hexToBytes:function(t){for(var e=[],r=0;r<t.length;r+=2)e.push(parseInt(t.substr(r,2),16));return e},bytesToBase64:function(t){for(var e=[],n=0;n<t.length;n+=3)for(var i=t[n]<<16|t[n+1]<<8|t[n+2],o=0;o<4;o++)8*n+6*o<=8*t.length?e.push(r.charAt(i>>>6*(3-o)&63)):e.push("=");return e.join("")},base64ToBytes:function(t){t=t.replace(/[^A-Z0-9+\/]/gi,"");for(var e=[],n=0,i=0;n<t.length;i=++n%4)0!=i&&e.push((r.indexOf(t.charAt(n-1))&Math.pow(2,-2*i+8)-1)<<2*i|r.indexOf(t.charAt(n))>>>6-2*i);return e}},t.exports=n},function(t,e){},,,,function(t,e){var r={utf8:{stringToBytes:function(t){return r.bin.stringToBytes(unescape(encodeURIComponent(t)))},bytesToString:function(t){return decodeURIComponent(escape(r.bin.bytesToString(t)))}},bin:{stringToBytes:function(t){for(var e=[],r=0;r<t.length;r++)e.push(255&t.charCodeAt(r));return e},bytesToString:function(t){for(var e=[],r=0;r<t.length;r++)e.push(String.fromCharCode(t[r]));return e.join("")}}};t.exports=r},function(t,e){},function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));var n=r(36);function i(t){try{return JSON.parse(t)}catch(e){throw new Error(`Failed to parse JSON from data starting with "${Object(n.a)(t)}"`)}}},function(t,e){var r={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==r.call(t)}},function(t,e,r){"use strict";(function(e,n){var i=r(48);t.exports=y;var o,s=r(80);y.ReadableState=b;r(11).EventEmitter;var a=function(t,e){return t.listeners(e).length},u=r(82),c=r(59).Buffer,l=e.Uint8Array||function(){};var h=Object.create(r(33));h.inherits=r(4);var f=r(154),d=void 0;d=f&&f.debuglog?f.debuglog("stream"):function(){};var p,m=r(155),g=r(83);h.inherits(y,u);var _=["error","close","destroy","pause","resume"];function b(t,e){t=t||{};var n=e instanceof(o=o||r(18));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=r(13).StringDecoder),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function y(t){if(o=o||r(18),!(this instanceof y))return new y(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(t,e,r,n,i){var o,s=t._readableState;null===e?(s.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,E(t)}(t,s)):(i||(o=function(t,e){var r;n=e,c.isBuffer(n)||n instanceof l||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),n?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):v(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?v(t,s,e,!1):B(t,s)):v(t,s,e,!1))):n||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function v(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&E(t)),B(t,e)}Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),y.prototype.destroy=g.destroy,y.prototype._undestroy=g.undestroy,y.prototype._destroy=function(t,e){this.push(null),e(t)},y.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=c.from(t,e),e=""),r=!0),w(this,t,e,!1,r)},y.prototype.unshift=function(t){return w(this,t,null,!0,!1)},y.prototype.isPaused=function(){return!1===this._readableState.flowing},y.prototype.setEncoding=function(t){return p||(p=r(13).StringDecoder),this._readableState.decoder=new p(t),this._readableState.encoding=t,this};function A(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=8388608?t=8388608:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function E(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(S,t):S(t))}function S(t){d("emit readable"),t.emit("readable"),O(t)}function B(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(C,t,e))}function C(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(d("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function T(t){d("readable nexttick read 0"),t.read(0)}function R(t,e){e.reading||(d("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),O(t),e.flowing&&!e.reading&&t.read(0)}function O(t){var e=t._readableState;for(d("flow",e.flowing);e.flowing&&null!==t.read(););}function I(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0===(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=c.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function M(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(x,e,t))}function x(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function D(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}y.prototype.read=function(t){d("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?M(this):E(this),null;if(0===(t=A(t,e))&&e.ended)return 0===e.length&&M(this),null;var n,i=e.needReadable;return d("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&d("length less than watermark",i=!0),e.ended||e.reading?d("reading or ended",i=!1):i&&(d("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=A(r,e))),null===(n=t>0?I(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&M(this)),null!==n&&this.emit("data",n),n},y.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},y.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?l:y;function c(e,n){d("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),t.removeListener("close",_),t.removeListener("finish",b),t.removeListener("drain",h),t.removeListener("error",g),t.removeListener("unpipe",c),r.removeListener("end",l),r.removeListener("end",y),r.removeListener("data",m),f=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function l(){d("onend"),t.end()}o.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",c);var h=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,O(t))}}(r);t.on("drain",h);var f=!1;var p=!1;function m(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==D(o.pipes,t))&&!f&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,p=!0),r.pause())}function g(e){d("onerror",e),y(),t.removeListener("error",g),0===a(t,"error")&&t.emit("error",e)}function _(){t.removeListener("finish",b),y()}function b(){d("onfinish"),t.removeListener("close",_),y()}function y(){d("unpipe"),r.unpipe(t)}return r.on("data",m),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",g),t.once("close",_),t.once("finish",b),t.emit("pipe",r),o.flowing||(d("pipe resume"),r.resume()),t},y.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,r);return this}var s=D(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},y.prototype.on=function(t,e){var r=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&E(this):i.nextTick(T,this))}return r},y.prototype.addListener=y.prototype.on,y.prototype.resume=function(){var t=this._readableState;return t.flowing||(d("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(R,t,e))}(this,t)),this},y.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},y.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(d("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<_.length;o++)t.on(_[o],this.emit.bind(this,_[o]));return this._read=function(e){d("wrapped _read",e),n&&(n=!1,t.resume())},this},Object.defineProperty(y.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),y._fromList=I}).call(this,r(8),r(0))},function(t,e,r){t.exports=r(11).EventEmitter},function(t,e,r){"use strict";var n=r(48);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(n.nextTick(i,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(t,e,r){"use strict";t.exports=s;var n=r(18),i=Object.create(r(33));function o(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(t){if(!(this instanceof s))return new s(t);n.call(this,t),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",a)}function a(){var t=this;"function"==typeof this._flush?this._flush((function(e,r){u(t,e,r)})):u(this,null,null)}function u(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=r(4),i.inherits(s,n),s.prototype.push=function(t,e){return this._transformState.needTransform=!1,n.prototype.push.call(this,t,e)},s.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},s.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},s.prototype._destroy=function(t,e){var r=this;n.prototype._destroy.call(this,t,(function(t){e(t),r.emit("close")}))}},function(t,e,r){t.exports=r(47).PassThrough},function(t,e,r){"use strict";t.exports=function(t,e,r,n){for(var i=65535&t|0,o=t>>>16&65535|0,s=0;0!==r;){r-=s=r>2e3?2e3:r;do{o=o+(i=i+e[n++]|0)|0}while(--s);i%=65521,o%=65521}return i|o<<16|0}},function(t,e,r){"use strict";var n=function(){for(var t,e=[],r=0;r<256;r++){t=r;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[r]=t}return e}();t.exports=function(t,e,r,i){var o=n,s=i+r;t^=-1;for(var a=i;a<s;a++)t=t>>>8^o[255&(t^e[a])];return-1^t}},function(t,e,r){(function(e,n){var i,o,s=r(1),a=r(181),u=r(182),c=r(183),l=r(12);function h(t,e){Object.defineProperty(t,i,{get:function(){return e}})}"function"==typeof Symbol&&"function"==typeof Symbol.for?(i=Symbol.for("graceful-fs.queue"),o=Symbol.for("graceful-fs.previous")):(i="___graceful-fs.queue",o="___graceful-fs.previous");var f=function(){};if(l.debuglog?f=l.debuglog("gfs4"):/\bgfs4\b/i.test(e.env.NODE_DEBUG||"")&&(f=function(){var t=l.format.apply(l,arguments);t="GFS4: "+t.split(/\n/).join("\nGFS4: "),console.error(t)}),!s[i]){var d=n[i]||[];h(s,d),s.close=function(t){function e(e,r){return t.call(s,e,(function(t){t||g(),"function"==typeof r&&r.apply(this,arguments)}))}return Object.defineProperty(e,o,{value:t}),e}(s.close),s.closeSync=function(t){function e(e){t.apply(s,arguments),g()}return Object.defineProperty(e,o,{value:t}),e}(s.closeSync),/\bgfs4\b/i.test(e.env.NODE_DEBUG||"")&&e.on("exit",(function(){f(s[i]),r(34).equal(s[i].length,0)}))}function p(t){a(t),t.gracefulify=p,t.createReadStream=function(e,r){return new t.ReadStream(e,r)},t.createWriteStream=function(e,r){return new t.WriteStream(e,r)};var r=t.readFile;t.readFile=function(t,e,n){"function"==typeof e&&(n=e,e=null);return function t(e,n,i){return r(e,n,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?("function"==typeof i&&i.apply(this,arguments),g()):m([t,[e,n,i]])}))}(t,e,n)};var n=t.writeFile;t.writeFile=function(t,e,r,i){"function"==typeof r&&(i=r,r=null);return function t(e,r,i,o){return n(e,r,i,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?("function"==typeof o&&o.apply(this,arguments),g()):m([t,[e,r,i,o]])}))}(t,e,r,i)};var i=t.appendFile;i&&(t.appendFile=function(t,e,r,n){"function"==typeof r&&(n=r,r=null);return function t(e,r,n,o){return i(e,r,n,(function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?("function"==typeof o&&o.apply(this,arguments),g()):m([t,[e,r,n,o]])}))}(t,e,r,n)});var o=t.copyFile;o&&(t.copyFile=function(t,e,r,n){"function"==typeof r&&(n=r,r=0);return o(t,e,r,(function(i){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?("function"==typeof n&&n.apply(this,arguments),g()):m([o,[t,e,r,n]])}))});var s=t.readdir;function c(e){return s.apply(t,e)}if(t.readdir=function(t,e,r){var n=[t];"function"!=typeof e?n.push(e):r=e;return n.push((function(t,e){e&&e.sort&&e.sort();!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?("function"==typeof r&&r.apply(this,arguments),g()):m([c,[n]])})),c(n)},"v0.8"===e.version.substr(0,4)){var l=u(t);b=l.ReadStream,y=l.WriteStream}var h=t.ReadStream;h&&(b.prototype=Object.create(h.prototype),b.prototype.open=function(){var t=this;v(t.path,t.flags,t.mode,(function(e,r){e?(t.autoClose&&t.destroy(),t.emit("error",e)):(t.fd=r,t.emit("open",r),t.read())}))});var f=t.WriteStream;f&&(y.prototype=Object.create(f.prototype),y.prototype.open=function(){var t=this;v(t.path,t.flags,t.mode,(function(e,r){e?(t.destroy(),t.emit("error",e)):(t.fd=r,t.emit("open",r))}))}),Object.defineProperty(t,"ReadStream",{get:function(){return b},set:function(t){b=t},enumerable:!0,configurable:!0}),Object.defineProperty(t,"WriteStream",{get:function(){return y},set:function(t){y=t},enumerable:!0,configurable:!0});var d=b;Object.defineProperty(t,"FileReadStream",{get:function(){return d},set:function(t){d=t},enumerable:!0,configurable:!0});var _=y;function b(t,e){return this instanceof b?(h.apply(this,arguments),this):b.apply(Object.create(b.prototype),arguments)}function y(t,e){return this instanceof y?(f.apply(this,arguments),this):y.apply(Object.create(y.prototype),arguments)}Object.defineProperty(t,"FileWriteStream",{get:function(){return _},set:function(t){_=t},enumerable:!0,configurable:!0});var w=t.open;function v(t,e,r,n){return"function"==typeof r&&(n=r,r=null),function t(e,r,n,i){return w(e,r,n,(function(o,s){!o||"EMFILE"!==o.code&&"ENFILE"!==o.code?("function"==typeof i&&i.apply(this,arguments),g()):m([t,[e,r,n,i]])}))}(t,e,r,n)}return t.open=v,t}function m(t){f("ENQUEUE",t[0].name,t[1]),s[i].push(t)}function g(){var t=s[i].shift();t&&(f("RETRY",t[0].name,t[1]),t[0].apply(null,t[1]))}n[i]||h(n,s[i]),t.exports=p(c(s)),e.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!s.__patched&&(t.exports=p(s),s.__patched=!0)}).call(this,r(0),r(8))},function(t){t.exports=JSON.parse('{"O_RDONLY":0,"O_WRONLY":1,"O_RDWR":2,"S_IFMT":61440,"S_IFREG":32768,"S_IFDIR":16384,"S_IFCHR":8192,"S_IFBLK":24576,"S_IFIFO":4096,"S_IFLNK":40960,"S_IFSOCK":49152,"O_CREAT":512,"O_EXCL":2048,"O_NOCTTY":131072,"O_TRUNC":1024,"O_APPEND":8,"O_DIRECTORY":1048576,"O_NOFOLLOW":256,"O_SYNC":128,"O_SYMLINK":2097152,"O_NONBLOCK":4,"S_IRWXU":448,"S_IRUSR":256,"S_IWUSR":128,"S_IXUSR":64,"S_IRWXG":56,"S_IRGRP":32,"S_IWGRP":16,"S_IXGRP":8,"S_IRWXO":7,"S_IROTH":4,"S_IWOTH":2,"S_IXOTH":1,"E2BIG":7,"EACCES":13,"EADDRINUSE":48,"EADDRNOTAVAIL":49,"EAFNOSUPPORT":47,"EAGAIN":35,"EALREADY":37,"EBADF":9,"EBADMSG":94,"EBUSY":16,"ECANCELED":89,"ECHILD":10,"ECONNABORTED":53,"ECONNREFUSED":61,"ECONNRESET":54,"EDEADLK":11,"EDESTADDRREQ":39,"EDOM":33,"EDQUOT":69,"EEXIST":17,"EFAULT":14,"EFBIG":27,"EHOSTUNREACH":65,"EIDRM":90,"EILSEQ":92,"EINPROGRESS":36,"EINTR":4,"EINVAL":22,"EIO":5,"EISCONN":56,"EISDIR":21,"ELOOP":62,"EMFILE":24,"EMLINK":31,"EMSGSIZE":40,"EMULTIHOP":95,"ENAMETOOLONG":63,"ENETDOWN":50,"ENETRESET":52,"ENETUNREACH":51,"ENFILE":23,"ENOBUFS":55,"ENODATA":96,"ENODEV":19,"ENOENT":2,"ENOEXEC":8,"ENOLCK":77,"ENOLINK":97,"ENOMEM":12,"ENOMSG":91,"ENOPROTOOPT":42,"ENOSPC":28,"ENOSR":98,"ENOSTR":99,"ENOSYS":78,"ENOTCONN":57,"ENOTDIR":20,"ENOTEMPTY":66,"ENOTSOCK":38,"ENOTSUP":45,"ENOTTY":25,"ENXIO":6,"EOPNOTSUPP":102,"EOVERFLOW":84,"EPERM":1,"EPIPE":32,"EPROTO":100,"EPROTONOSUPPORT":43,"EPROTOTYPE":41,"ERANGE":34,"EROFS":30,"ESPIPE":29,"ESRCH":3,"ESTALE":70,"ETIME":101,"ETIMEDOUT":60,"ETXTBSY":26,"EWOULDBLOCK":35,"EXDEV":18,"SIGHUP":1,"SIGINT":2,"SIGQUIT":3,"SIGILL":4,"SIGTRAP":5,"SIGABRT":6,"SIGIOT":6,"SIGBUS":10,"SIGFPE":8,"SIGKILL":9,"SIGUSR1":30,"SIGSEGV":11,"SIGUSR2":31,"SIGPIPE":13,"SIGALRM":14,"SIGTERM":15,"SIGCHLD":20,"SIGCONT":19,"SIGSTOP":17,"SIGTSTP":18,"SIGTTIN":21,"SIGTTOU":22,"SIGURG":16,"SIGXCPU":24,"SIGXFSZ":25,"SIGVTALRM":26,"SIGPROF":27,"SIGWINCH":28,"SIGIO":23,"SIGSYS":12,"SSL_OP_ALL":2147486719,"SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION":262144,"SSL_OP_CIPHER_SERVER_PREFERENCE":4194304,"SSL_OP_CISCO_ANYCONNECT":32768,"SSL_OP_COOKIE_EXCHANGE":8192,"SSL_OP_CRYPTOPRO_TLSEXT_BUG":2147483648,"SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS":2048,"SSL_OP_EPHEMERAL_RSA":0,"SSL_OP_LEGACY_SERVER_CONNECT":4,"SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER":32,"SSL_OP_MICROSOFT_SESS_ID_BUG":1,"SSL_OP_MSIE_SSLV2_RSA_PADDING":0,"SSL_OP_NETSCAPE_CA_DN_BUG":536870912,"SSL_OP_NETSCAPE_CHALLENGE_BUG":2,"SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG":1073741824,"SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG":8,"SSL_OP_NO_COMPRESSION":131072,"SSL_OP_NO_QUERY_MTU":4096,"SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION":65536,"SSL_OP_NO_SSLv2":16777216,"SSL_OP_NO_SSLv3":33554432,"SSL_OP_NO_TICKET":16384,"SSL_OP_NO_TLSv1":67108864,"SSL_OP_NO_TLSv1_1":268435456,"SSL_OP_NO_TLSv1_2":134217728,"SSL_OP_PKCS1_CHECK_1":0,"SSL_OP_PKCS1_CHECK_2":0,"SSL_OP_SINGLE_DH_USE":1048576,"SSL_OP_SINGLE_ECDH_USE":524288,"SSL_OP_SSLEAY_080_CLIENT_DH_BUG":128,"SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG":0,"SSL_OP_TLS_BLOCK_PADDING_BUG":512,"SSL_OP_TLS_D5_BUG":256,"SSL_OP_TLS_ROLLBACK_BUG":8388608,"ENGINE_METHOD_DSA":2,"ENGINE_METHOD_DH":4,"ENGINE_METHOD_RAND":8,"ENGINE_METHOD_ECDH":16,"ENGINE_METHOD_ECDSA":32,"ENGINE_METHOD_CIPHERS":64,"ENGINE_METHOD_DIGESTS":128,"ENGINE_METHOD_STORE":256,"ENGINE_METHOD_PKEY_METHS":512,"ENGINE_METHOD_PKEY_ASN1_METHS":1024,"ENGINE_METHOD_ALL":65535,"ENGINE_METHOD_NONE":0,"DH_CHECK_P_NOT_SAFE_PRIME":2,"DH_CHECK_P_NOT_PRIME":1,"DH_UNABLE_TO_CHECK_GENERATOR":4,"DH_NOT_SUITABLE_GENERATOR":8,"NPN_ENABLED":1,"RSA_PKCS1_PADDING":1,"RSA_SSLV23_PADDING":2,"RSA_NO_PADDING":3,"RSA_PKCS1_OAEP_PADDING":4,"RSA_X931_PADDING":5,"RSA_PKCS1_PSS_PADDING":6,"POINT_CONVERSION_COMPRESSED":2,"POINT_CONVERSION_UNCOMPRESSED":4,"POINT_CONVERSION_HYBRID":6,"F_OK":0,"R_OK":4,"W_OK":2,"X_OK":1,"UV_UDP_REUSEADDR":4}')},function(t,e){
|
|
15
|
-
/*!
|
|
16
|
-
* normalize-path <https://github.com/jonschlinkert/normalize-path>
|
|
17
|
-
*
|
|
18
|
-
* Copyright (c) 2014-2018, Jon Schlinkert.
|
|
19
|
-
* Released under the MIT License.
|
|
20
|
-
*/
|
|
21
|
-
t.exports=function(t,e){if("string"!=typeof t)throw new TypeError("expected path to be a string");if("\\"===t||"/"===t)return"/";var r=t.length;if(r<=1)return t;var n="";if(r>4&&"\\"===t[3]){var i=t[2];"?"!==i&&"."!==i||"\\\\"!==t.slice(0,2)||(t=t.slice(2),n="//")}var o=t.split(/[/\\]+/);return!1!==e&&""===o[o.length-1]&&o.pop(),n+o.join("/")}},function(t,e,r){(function(e){t.exports=y;var n=r(1),i=r(92),o=r(51),s=(o.Minimatch,r(4)),a=r(11).EventEmitter,u=r(1),c=r(34),l=r(61),h=r(192),f=r(93),d=f.setopts,p=f.ownProp,m=r(193),g=(r(12),f.childrenIgnored),_=f.isIgnored,b=r(62);function y(t,e,r){if("function"==typeof e&&(r=e,e={}),e||(e={}),e.sync){if(r)throw new TypeError("callback provided to sync glob");return h(t,e)}return new v(t,e,r)}y.sync=h;var w=y.GlobSync=h.GlobSync;function v(t,e,r){if("function"==typeof e&&(r=e,e=null),e&&e.sync){if(r)throw new TypeError("callback provided to sync glob");return new w(t,e)}if(!(this instanceof v))return new v(t,e,r);d(this,t,e),this._didRealPath=!1;var n=this.minimatch.set.length;this.matches=new Array(n),"function"==typeof r&&(r=b(r),this.on("error",r),this.on("end",(function(t){r(null,t)})));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(0===n)return s();for(var o=0;o<n;o++)this._process(this.minimatch.set[o],o,!1,s);function s(){--i._processing,i._processing<=0&&i._finish()}}y.glob=y,y.hasMagic=function(t,e){var r=function(t,e){if(null===e||"object"!=typeof e)return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t}({},e);r.noprocess=!0;var n=new v(t,r).minimatch.set;if(!t)return!1;if(n.length>1)return!0;for(var i=0;i<n[0].length;i++)if("string"!=typeof n[0][i])return!0;return!1},y.Glob=v,s(v,a),v.prototype._finish=function(){if(c(this instanceof v),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();f.finish(this),this.emit("end",this.found)}},v.prototype._realpath=function(){if(!this._didRealpath){this._didRealpath=!0;var t=this.matches.length;if(0===t)return this._finish();for(var e=this,r=0;r<this.matches.length;r++)this._realpathSet(r,n)}function n(){0==--t&&e._finish()}},v.prototype._realpathSet=function(t,e){var r=this.matches[t];if(!r)return e();var n=Object.keys(r),o=this,s=n.length;if(0===s)return e();var a=this.matches[t]=Object.create(null);n.forEach((function(r,n){r=o._makeAbs(r),i.realpath(r,o.realpathCache,(function(n,i){n?"stat"===n.syscall?a[r]=!0:o.emit("error",n):a[i]=!0,0==--s&&(o.matches[t]=a,e())}))}))},v.prototype._mark=function(t){return f.mark(this,t)},v.prototype._makeAbs=function(t){return f.makeAbs(this,t)},v.prototype.abort=function(){this.aborted=!0,this.emit("abort")},v.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))},v.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var t=this._emitQueue.slice(0);this._emitQueue.length=0;for(var e=0;e<t.length;e++){var r=t[e];this._emitMatch(r[0],r[1])}}if(this._processQueue.length){var n=this._processQueue.slice(0);this._processQueue.length=0;for(e=0;e<n.length;e++){var i=n[e];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}},v.prototype._process=function(t,e,r,n){if(c(this instanceof v),c("function"==typeof n),!this.aborted)if(this._processing++,this.paused)this._processQueue.push([t,e,r,n]);else{for(var i,s=0;"string"==typeof t[s];)s++;switch(s){case t.length:return void this._processSimple(t.join("/"),e,n);case 0:i=null;break;default:i=t.slice(0,s).join("/")}var a,u=t.slice(s);null===i?a=".":l(i)||l(t.join("/"))?(i&&l(i)||(i="/"+i),a=i):a=i;var h=this._makeAbs(a);if(g(this,a))return n();u[0]===o.GLOBSTAR?this._processGlobStar(i,a,h,u,e,r,n):this._processReaddir(i,a,h,u,e,r,n)}},v.prototype._processReaddir=function(t,e,r,n,i,o,s){var a=this;this._readdir(r,o,(function(u,c){return a._processReaddir2(t,e,r,n,i,o,c,s)}))},v.prototype._processReaddir2=function(t,e,r,n,i,o,s,a){if(!s)return a();for(var c=n[0],l=!!this.minimatch.negate,h=c._glob,f=this.dot||"."===h.charAt(0),d=[],p=0;p<s.length;p++){if("."!==(g=s[p]).charAt(0)||f)(l&&!t?!g.match(c):g.match(c))&&d.push(g)}var m=d.length;if(0===m)return a();if(1===n.length&&!this.mark&&!this.stat){this.matches[i]||(this.matches[i]=Object.create(null));for(p=0;p<m;p++){var g=d[p];t&&(g="/"!==t?t+"/"+g:t+g),"/"!==g.charAt(0)||this.nomount||(g=u.join(this.root,g)),this._emitMatch(i,g)}return a()}n.shift();for(p=0;p<m;p++){g=d[p];t&&(g="/"!==t?t+"/"+g:t+g),this._process([g].concat(n),i,o,a)}a()},v.prototype._emitMatch=function(t,e){if(!this.aborted&&!_(this,e))if(this.paused)this._emitQueue.push([t,e]);else{var r=l(e)?e:this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var n=this.cache[r];if("DIR"===n||Array.isArray(n))return}this.matches[t][e]=!0;var i=this.statCache[r];i&&this.emit("stat",e,i),this.emit("match",e)}}},v.prototype._readdirInGlobStar=function(t,e){if(!this.aborted){if(this.follow)return this._readdir(t,!1,e);var r=this,i=m("lstat\0"+t,(function(n,i){if(n&&"ENOENT"===n.code)return e();var o=i&&i.isSymbolicLink();r.symlinks[t]=o,o||!i||i.isDirectory()?r._readdir(t,!1,e):(r.cache[t]="FILE",e())}));i&&n.lstat(t,i)}},v.prototype._readdir=function(t,e,r){if(!this.aborted&&(r=m("readdir\0"+t+"\0"+e,r))){if(e&&!p(this.symlinks,t))return this._readdirInGlobStar(t,r);if(p(this.cache,t)){var i=this.cache[t];if(!i||"FILE"===i)return r();if(Array.isArray(i))return r(null,i)}n.readdir(t,function(t,e,r){return function(n,i){n?t._readdirError(e,n,r):t._readdirEntries(e,i,r)}}(this,t,r))}},v.prototype._readdirEntries=function(t,e,r){if(!this.aborted){if(!this.mark&&!this.stat)for(var n=0;n<e.length;n++){var i=e[n];i="/"===t?t+i:t+"/"+i,this.cache[i]=!0}return this.cache[t]=e,r(null,e)}},v.prototype._readdirError=function(t,e,r){if(!this.aborted){switch(e.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(t);if(this.cache[n]="FILE",n===this.cwdAbs){var i=new Error(e.code+" invalid cwd "+this.cwd);i.path=this.cwd,i.code=e.code,this.emit("error",i),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:this.cache[this._makeAbs(t)]=!1,this.strict&&(this.emit("error",e),this.abort()),this.silent||console.error("glob error",e)}return r()}},v.prototype._processGlobStar=function(t,e,r,n,i,o,s){var a=this;this._readdir(r,o,(function(u,c){a._processGlobStar2(t,e,r,n,i,o,c,s)}))},v.prototype._processGlobStar2=function(t,e,r,n,i,o,s,a){if(!s)return a();var u=n.slice(1),c=t?[t]:[],l=c.concat(u);this._process(l,i,!1,a);var h=this.symlinks[r],f=s.length;if(h&&o)return a();for(var d=0;d<f;d++){if("."!==s[d].charAt(0)||this.dot){var p=c.concat(s[d],u);this._process(p,i,!0,a);var m=c.concat(s[d],n);this._process(m,i,!0,a)}}a()},v.prototype._processSimple=function(t,e,r){var n=this;this._stat(t,(function(i,o){n._processSimple2(t,e,i,o,r)}))},v.prototype._processSimple2=function(t,r,n,i,o){if(this.matches[r]||(this.matches[r]=Object.create(null)),!i)return o();if(t&&l(t)&&!this.nomount){var s=/[\/\\]$/.test(t);"/"===t.charAt(0)?t=u.join(this.root,t):(t=u.resolve(this.root,t),s&&(t+="/"))}"win32"===e.platform&&(t=t.replace(/\\/g,"/")),this._emitMatch(r,t),o()},v.prototype._stat=function(t,e){var r=this._makeAbs(t),i="/"===t.slice(-1);if(t.length>this.maxLength)return e();if(!this.stat&&p(this.cache,r)){var o=this.cache[r];if(Array.isArray(o)&&(o="DIR"),!i||"DIR"===o)return e(null,o);if(i&&"FILE"===o)return e()}var s=this.statCache[r];if(void 0!==s){if(!1===s)return e(null,s);var a=s.isDirectory()?"DIR":"FILE";return i&&"FILE"===a?e():e(null,a,s)}var u=this,c=m("stat\0"+r,(function(i,o){if(o&&o.isSymbolicLink())return n.stat(r,(function(n,i){n?u._stat2(t,r,null,o,e):u._stat2(t,r,n,i,e)}));u._stat2(t,r,i,o,e)}));c&&n.lstat(r,c)},v.prototype._stat2=function(t,e,r,n,i){if(r&&("ENOENT"===r.code||"ENOTDIR"===r.code))return this.statCache[e]=!1,i();var o="/"===t.slice(-1);if(this.statCache[e]=n,"/"===e.slice(-1)&&n&&!n.isDirectory())return i(null,!1,n);var s=!0;return n&&(s=n.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||s,o&&"FILE"===s?i():i(null,s,n)}}).call(this,r(0))},function(t,e,r){(function(e){t.exports=l,l.realpath=l,l.sync=h,l.realpathSync=h,l.monkeypatch=function(){n.realpath=l,n.realpathSync=h},l.unmonkeypatch=function(){n.realpath=i,n.realpathSync=o};var n=r(1),i=n.realpath,o=n.realpathSync,s=e.version,a=/^v[0-5]\./.test(s),u=r(191);function c(t){return t&&"realpath"===t.syscall&&("ELOOP"===t.code||"ENOMEM"===t.code||"ENAMETOOLONG"===t.code)}function l(t,e,r){if(a)return i(t,e,r);"function"==typeof e&&(r=e,e=null),i(t,e,(function(n,i){c(n)?u.realpath(t,e,r):r(n,i)}))}function h(t,e){if(a)return o(t,e);try{return o(t,e)}catch(r){if(c(r))return u.realpathSync(t,e);throw r}}}).call(this,r(0))},function(t,e,r){(function(t){function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.setopts=function(e,r,o){o||(o={});if(o.matchBase&&-1===r.indexOf("/")){if(o.noglobstar)throw new Error("base matching requires globstar");r="**/"+r}e.silent=!!o.silent,e.pattern=r,e.strict=!1!==o.strict,e.realpath=!!o.realpath,e.realpathCache=o.realpathCache||Object.create(null),e.follow=!!o.follow,e.dot=!!o.dot,e.mark=!!o.mark,e.nodir=!!o.nodir,e.nodir&&(e.mark=!0);e.sync=!!o.sync,e.nounique=!!o.nounique,e.nonull=!!o.nonull,e.nosort=!!o.nosort,e.nocase=!!o.nocase,e.stat=!!o.stat,e.noprocess=!!o.noprocess,e.absolute=!!o.absolute,e.maxLength=o.maxLength||1/0,e.cache=o.cache||Object.create(null),e.statCache=o.statCache||Object.create(null),e.symlinks=o.symlinks||Object.create(null),function(t,e){t.ignore=e.ignore||[],Array.isArray(t.ignore)||(t.ignore=[t.ignore]);t.ignore.length&&(t.ignore=t.ignore.map(c))}(e,o),e.changedCwd=!1;var u=t.cwd();n(o,"cwd")?(e.cwd=i.resolve(o.cwd),e.changedCwd=e.cwd!==u):e.cwd=u;e.root=o.root||i.resolve(e.cwd,"/"),e.root=i.resolve(e.root),"win32"===t.platform&&(e.root=e.root.replace(/\\/g,"/"));e.cwdAbs=s(e.cwd)?e.cwd:l(e,e.cwd),"win32"===t.platform&&(e.cwdAbs=e.cwdAbs.replace(/\\/g,"/"));e.nomount=!!o.nomount,o.nonegate=!0,o.nocomment=!0,e.minimatch=new a(r,o),e.options=e.minimatch.options},e.ownProp=n,e.makeAbs=l,e.finish=function(t){for(var e=t.nounique,r=e?[]:Object.create(null),n=0,i=t.matches.length;n<i;n++){var o=t.matches[n];if(o&&0!==Object.keys(o).length){var s=Object.keys(o);e?r.push.apply(r,s):s.forEach((function(t){r[t]=!0}))}else if(t.nonull){var a=t.minimatch.globSet[n];e?r.push(a):r[a]=!0}}e||(r=Object.keys(r));t.nosort||(r=r.sort(u));if(t.mark){for(n=0;n<r.length;n++)r[n]=t._mark(r[n]);t.nodir&&(r=r.filter((function(e){var r=!/\/$/.test(e),n=t.cache[e]||t.cache[l(t,e)];return r&&n&&(r="DIR"!==n&&!Array.isArray(n)),r})))}t.ignore.length&&(r=r.filter((function(e){return!h(t,e)})));t.found=r},e.mark=function(t,e){var r=l(t,e),n=t.cache[r],i=e;if(n){var o="DIR"===n||Array.isArray(n),s="/"===e.slice(-1);if(o&&!s?i+="/":!o&&s&&(i=i.slice(0,-1)),i!==e){var a=l(t,i);t.statCache[a]=t.statCache[r],t.cache[a]=t.cache[r]}}return i},e.isIgnored=h,e.childrenIgnored=function(t,e){return!!t.ignore.length&&t.ignore.some((function(t){return!(!t.gmatcher||!t.gmatcher.match(e))}))};var i=r(1),o=r(51),s=r(61),a=o.Minimatch;function u(t,e){return t.localeCompare(e,"en")}function c(t){var e=null;if("/**"===t.slice(-3)){var r=t.replace(/(\/\*\*)+$/,"");e=new a(r,{dot:!0})}return{matcher:new a(t,{dot:!0}),gmatcher:e}}function l(e,r){var n=r;return n="/"===r.charAt(0)?i.join(e.root,r):s(r)||""===r?r:e.changedCwd?i.resolve(e.cwd,r):i.resolve(r),"win32"===t.platform&&(n=n.replace(/\\/g,"/")),n}function h(t,e){return!!t.ignore.length&&t.ignore.some((function(t){return t.matcher.match(e)||!(!t.gmatcher||!t.gmatcher.match(e))}))}}).call(this,r(0))},function(t,e){t.exports=function t(e,r){if(e&&r)return t(e)(r);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach((function(t){n[t]=e[t]})),n;function n(){for(var t=new Array(arguments.length),r=0;r<t.length;r++)t[r]=arguments[r];var n=e.apply(this,t),i=t[t.length-1];return"function"==typeof n&&n!==i&&Object.keys(i).forEach((function(t){n[t]=i[t]})),n}}},function(t,e,r){(e=t.exports=r(96)).Stream=e,e.Readable=e,e.Writable=r(100),e.Duplex=r(22),e.Transform=r(101),e.PassThrough=r(200),e.finished=r(63),e.pipeline=r(201)},function(t,e,r){"use strict";(function(e,n){var i;t.exports=B,B.ReadableState=S;r(11).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=r(97),a=r(9).Buffer,u=e.Uint8Array||function(){};var c,l=r(195);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,f,d,p=r(196),m=r(98),g=r(99).getHighWaterMark,_=r(21).codes,b=_.ERR_INVALID_ARG_TYPE,y=_.ERR_STREAM_PUSH_AFTER_EOF,w=_.ERR_METHOD_NOT_IMPLEMENTED,v=_.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(4)(B,s);var A=m.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(t,e,n){i=i||r(22),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=r(13).StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function B(t){if(i=i||r(22),!(this instanceof B))return new B(t);var e=this instanceof i;this._readableState=new S(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function C(t,e,r,n,i){c("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?O(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)))}(t,s);else if(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(s,e)),o)A(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)s.endEmitted?A(t,new v):T(t,s,e,!0);else if(s.ended)A(t,new y);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?T(t,s,e,!1):M(t,s)):T(t,s,e,!1)}else n||(s.reading=!1,M(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function T(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&O(t)),M(t,e)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),B.prototype.destroy=m.destroy,B.prototype._undestroy=m.undestroy,B.prototype._destroy=function(t,e){e(t)},B.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),C(this,t,e,!1,r)},B.prototype.unshift=function(t){return C(this,t,null,!0,!1)},B.prototype.isPaused=function(){return!1===this._readableState.flowing},B.prototype.setEncoding=function(t){h||(h=r(13).StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function R(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function O(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(I,t))}function I(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,L(t)}function M(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(x,t,e))}function x(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(c("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function D(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function k(t){c("readable nexttick read 0"),t.read(0)}function P(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),L(t),e.flowing&&!e.reading&&t.read(0)}function L(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function F(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function N(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(U,e,t))}function U(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function G(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}B.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?N(this):O(this),null;if(0===(t=R(t,e))&&e.ended)return 0===e.length&&N(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=R(r,e))),null===(n=t>0?F(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&N(this)),null!==n&&this.emit("data",n),n},B.prototype._read=function(t){A(this,new w("_read()"))},B.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?u:g;function a(e,n){c("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",f),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function u(){c("onend"),t.end()}i.endEmitted?n.nextTick(s):r.once("end",s),t.on("unpipe",a);var l=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,L(t))}}(r);t.on("drain",l);var h=!1;function f(e){c("ondata");var n=t.write(e);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==G(i.pipes,t))&&!h&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(e){c("onerror",e),g(),t.removeListener("error",d),0===o(t,"error")&&A(t,e)}function p(){t.removeListener("finish",m),g()}function m(){c("onfinish"),t.removeListener("close",p),g()}function g(){c("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",m),t.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),t},B.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=G(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},B.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?O(this):i.reading||n.nextTick(k,this))),r},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(D,this),r},B.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(D,this),e},B.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(P,t,e))}(this,t)),t.paused=!1,this},B.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},B.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<E.length;o++)t.on(E[o],this.emit.bind(this,E[o]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(B.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(198)),f(this)}),Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),B._fromList=F,Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(B.from=function(t,e){return void 0===d&&(d=r(199)),d(B,t,e)})}).call(this,r(8),r(0))},function(t,e,r){t.exports=r(11).EventEmitter},function(t,e,r){"use strict";(function(e){function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(r,s,t)):e.nextTick(r,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,r(0))},function(t,e,r){"use strict";var n=r(21).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,r){"use strict";(function(e,n){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=B,B.WritableState=S;var s={deprecate:r(20)},a=r(97),u=r(9).Buffer,c=e.Uint8Array||function(){};var l,h=r(98),f=r(99).getHighWaterMark,d=r(21).codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,_=d.ERR_STREAM_CANNOT_PIPE,b=d.ERR_STREAM_DESTROYED,y=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,A=h.errorOrDestroy;function E(){}function S(t,e,s){o=o||r(22),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new g;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(M,t,e),t._writableState.errorEmitted=!0,A(t,i)):(o(i),t._writableState.errorEmitted=!0,A(t,i),M(t,e))}(t,r,i,e,o);else{var s=O(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||R(t,r),i?n.nextTick(T,t,r,s,o):T(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function B(t){var e=this instanceof(o=o||r(22));if(!e&&!l.call(B,this))return new B(t);this._writableState=new S(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function C(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new b("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function T(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),M(t,e)}function R(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,C(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(C(t,e,!1,e.objectMode?1:c.length,c,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function O(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function I(t,e){t._final((function(r){e.pendingcb--,r&&A(t,r),e.prefinished=!0,t.emit("prefinish"),M(t,e)}))}function M(t,e){var r=O(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(I,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(4)(B,a),S.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(B,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===B&&(t&&t._writableState instanceof S)}})):l=function(t){return t instanceof this},B.prototype.pipe=function(){A(this,new _)},B.prototype.write=function(t,e,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,u.isBuffer(i)||i instanceof c);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=E),o.ending?function(t,e){var r=new w;A(t,r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var o;return null===r?o=new y:"string"==typeof r||e.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(A(t,o),n.nextTick(i,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else C(t,e,!1,a,n,i,o);return c}(this,o,a,t,e,r)),s},B.prototype.cork=function(){this._writableState.corked++},B.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||R(this,t))},B.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(B.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),B.prototype._write=function(t,e,r){r(new m("_write()"))},B.prototype._writev=null,B.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,M(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(B.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),B.prototype.destroy=h.destroy,B.prototype._undestroy=h.undestroy,B.prototype._destroy=function(t,e){e(t)}}).call(this,r(8),r(0))},function(t,e,r){"use strict";t.exports=l;var n=r(21).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(22);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(e,r){f(t,e,r)}))}function f(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(4)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,r){r(new i("_transform()"))},l.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e,r){t.exports={ArchiveEntry:r(64),ZipArchiveEntry:r(103),ArchiveOutputStream:r(106),ZipArchiveOutputStream:r(212)}},function(t,e,r){var n=r(12).inherits,i=r(90),o=r(64),s=r(104),a=r(204),u=r(105),c=r(65),l=t.exports=function(t){if(!(this instanceof l))return new l(t);o.call(this),this.platform=u.PLATFORM_FAT,this.method=-1,this.name=null,this.size=0,this.csize=0,this.gpb=new s,this.crc=0,this.time=-1,this.minver=u.MIN_VERSION_INITIAL,this.mode=-1,this.extra=null,this.exattr=0,this.inattr=0,this.comment=null,t&&this.setName(t)};n(l,o),l.prototype.getCentralDirectoryExtra=function(){return this.getExtra()},l.prototype.getComment=function(){return null!==this.comment?this.comment:""},l.prototype.getCompressedSize=function(){return this.csize},l.prototype.getCrc=function(){return this.crc},l.prototype.getExternalAttributes=function(){return this.exattr},l.prototype.getExtra=function(){return null!==this.extra?this.extra:u.EMPTY},l.prototype.getGeneralPurposeBit=function(){return this.gpb},l.prototype.getInternalAttributes=function(){return this.inattr},l.prototype.getLastModifiedDate=function(){return this.getTime()},l.prototype.getLocalFileDataExtra=function(){return this.getExtra()},l.prototype.getMethod=function(){return this.method},l.prototype.getName=function(){return this.name},l.prototype.getPlatform=function(){return this.platform},l.prototype.getSize=function(){return this.size},l.prototype.getTime=function(){return-1!==this.time?c.dosToDate(this.time):-1},l.prototype.getTimeDos=function(){return-1!==this.time?this.time:0},l.prototype.getUnixMode=function(){return this.platform!==u.PLATFORM_UNIX?0:this.getExternalAttributes()>>u.SHORT_SHIFT&u.SHORT_MASK},l.prototype.getVersionNeededToExtract=function(){return this.minver},l.prototype.setComment=function(t){Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.comment=t},l.prototype.setCompressedSize=function(t){if(t<0)throw new Error("invalid entry compressed size");this.csize=t},l.prototype.setCrc=function(t){if(t<0)throw new Error("invalid entry crc32");this.crc=t},l.prototype.setExternalAttributes=function(t){this.exattr=t>>>0},l.prototype.setExtra=function(t){this.extra=t},l.prototype.setGeneralPurposeBit=function(t){if(!(t instanceof s))throw new Error("invalid entry GeneralPurposeBit");this.gpb=t},l.prototype.setInternalAttributes=function(t){this.inattr=t},l.prototype.setMethod=function(t){if(t<0)throw new Error("invalid entry compression method");this.method=t},l.prototype.setName=function(t,e=!1){t=i(t,!1).replace(/^\w+:/,"").replace(/^(\.\.\/|\/)+/,""),e&&(t="/"+t),Buffer.byteLength(t)!==t.length&&this.getGeneralPurposeBit().useUTF8ForNames(!0),this.name=t},l.prototype.setPlatform=function(t){this.platform=t},l.prototype.setSize=function(t){if(t<0)throw new Error("invalid entry size");this.size=t},l.prototype.setTime=function(t,e){if(!(t instanceof Date))throw new Error("invalid entry time");this.time=c.dateToDos(t,e)},l.prototype.setUnixMode=function(t){var e=0;e|=(t|=this.isDirectory()?u.S_IFDIR:u.S_IFREG)<<u.SHORT_SHIFT|(this.isDirectory()?u.S_DOS_D:u.S_DOS_A),this.setExternalAttributes(e),this.mode=t&u.MODE_MASK,this.platform=u.PLATFORM_UNIX},l.prototype.setVersionNeededToExtract=function(t){this.minver=t},l.prototype.isDirectory=function(){return"/"===this.getName().slice(-1)},l.prototype.isUnixSymlink=function(){return(this.getUnixMode()&a.FILE_TYPE_FLAG)===a.LINK_FLAG},l.prototype.isZip64=function(){return this.csize>u.ZIP64_MAGIC||this.size>u.ZIP64_MAGIC}},function(t,e,r){var n=r(65),i=t.exports=function(){return this instanceof i?(this.descriptor=!1,this.encryption=!1,this.utf8=!1,this.numberOfShannonFanoTrees=0,this.strongEncryption=!1,this.slidingDictionarySize=0,this):new i};i.prototype.encode=function(){return n.getShortBytes((this.descriptor?8:0)|(this.utf8?2048:0)|(this.encryption?1:0)|(this.strongEncryption?64:0))},i.prototype.parse=function(t,e){var r=n.getShortBytesValue(t,e),o=new i;return o.useDataDescriptor(0!=(8&r)),o.useUTF8ForNames(0!=(2048&r)),o.useStrongEncryption(0!=(64&r)),o.useEncryption(0!=(1&r)),o.setSlidingDictionarySize(0!=(2&r)?8192:4096),o.setNumberOfShannonFanoTrees(0!=(4&r)?3:2),o},i.prototype.setNumberOfShannonFanoTrees=function(t){this.numberOfShannonFanoTrees=t},i.prototype.getNumberOfShannonFanoTrees=function(){return this.numberOfShannonFanoTrees},i.prototype.setSlidingDictionarySize=function(t){this.slidingDictionarySize=t},i.prototype.getSlidingDictionarySize=function(){return this.slidingDictionarySize},i.prototype.useDataDescriptor=function(t){this.descriptor=t},i.prototype.usesDataDescriptor=function(){return this.descriptor},i.prototype.useEncryption=function(t){this.encryption=t},i.prototype.usesEncryption=function(){return this.encryption},i.prototype.useStrongEncryption=function(t){this.strongEncryption=t},i.prototype.usesStrongEncryption=function(){return this.strongEncryption},i.prototype.useUTF8ForNames=function(t){this.utf8=t},i.prototype.usesUTF8ForNames=function(){return this.utf8}},function(t,e){t.exports={WORD:4,DWORD:8,EMPTY:Buffer.alloc(0),SHORT:2,SHORT_MASK:65535,SHORT_SHIFT:16,SHORT_ZERO:Buffer.from(Array(2)),LONG:4,LONG_ZERO:Buffer.from(Array(4)),MIN_VERSION_INITIAL:10,MIN_VERSION_DATA_DESCRIPTOR:20,MIN_VERSION_ZIP64:45,VERSION_MADEBY:45,METHOD_STORED:0,METHOD_DEFLATED:8,PLATFORM_UNIX:3,PLATFORM_FAT:0,SIG_LFH:67324752,SIG_DD:134695760,SIG_CFH:33639248,SIG_EOCD:101010256,SIG_ZIP64_EOCD:101075792,SIG_ZIP64_EOCD_LOC:117853008,ZIP64_MAGIC_SHORT:65535,ZIP64_MAGIC:4294967295,ZIP64_EXTRA_ID:1,ZLIB_NO_COMPRESSION:0,ZLIB_BEST_SPEED:1,ZLIB_BEST_COMPRESSION:9,ZLIB_DEFAULT_COMPRESSION:-1,MODE_MASK:4095,DEFAULT_FILE_MODE:33188,DEFAULT_DIR_MODE:16877,EXT_FILE_ATTR_DIR:1106051088,EXT_FILE_ATTR_FILE:2175008800,S_IFMT:61440,S_IFIFO:4096,S_IFCHR:8192,S_IFDIR:16384,S_IFBLK:24576,S_IFREG:32768,S_IFLNK:40960,S_IFSOCK:49152,S_DOS_A:32,S_DOS_D:16,S_DOS_V:8,S_DOS_S:4,S_DOS_H:2,S_DOS_R:1}},function(t,e,r){var n=r(12).inherits,i=r(107).Transform,o=r(64),s=r(114),a=t.exports=function(t){if(!(this instanceof a))return new a(t);i.call(this,t),this.offset=0,this._archive={finish:!1,finished:!1,processing:!1}};n(a,i),a.prototype._appendBuffer=function(t,e,r){},a.prototype._appendStream=function(t,e,r){},a.prototype._emitErrorCallback=function(t){t&&this.emit("error",t)},a.prototype._finish=function(t){},a.prototype._normalizeEntry=function(t){},a.prototype._transform=function(t,e,r){r(null,t)},a.prototype.entry=function(t,e,r){if(e=e||null,"function"!=typeof r&&(r=this._emitErrorCallback.bind(this)),t instanceof o)if(this._archive.finish||this._archive.finished)r(new Error("unacceptable entry after finish"));else{if(!this._archive.processing){if(this._archive.processing=!0,this._normalizeEntry(t),this._entry=t,e=s.normalizeInputSource(e),Buffer.isBuffer(e))this._appendBuffer(t,e,r);else{if(!s.isStream(e))return this._archive.processing=!1,void r(new Error("input source must be valid Stream or Buffer instance"));this._appendStream(t,e,r)}return this}r(new Error("already processing an entry"))}else r(new Error("not a valid instance of ArchiveEntry"))},a.prototype.finish=function(){this._archive.processing?this._archive.finish=!0:this._finish()},a.prototype.getBytesWritten=function(){return this.offset},a.prototype.write=function(t,e){return t&&(this.offset+=t.length),i.prototype.write.call(this,t,e)}},function(t,e,r){(e=t.exports=r(108)).Stream=e,e.Readable=e,e.Writable=r(112),e.Duplex=r(24),e.Transform=r(113),e.PassThrough=r(210),e.finished=r(66),e.pipeline=r(211)},function(t,e,r){"use strict";(function(e,n){var i;t.exports=B,B.ReadableState=S;r(11).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=r(109),a=r(9).Buffer,u=e.Uint8Array||function(){};var c,l=r(205);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,f,d,p=r(206),m=r(110),g=r(111).getHighWaterMark,_=r(23).codes,b=_.ERR_INVALID_ARG_TYPE,y=_.ERR_STREAM_PUSH_AFTER_EOF,w=_.ERR_METHOD_NOT_IMPLEMENTED,v=_.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(4)(B,s);var A=m.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(t,e,n){i=i||r(24),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=r(13).StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function B(t){if(i=i||r(24),!(this instanceof B))return new B(t);var e=this instanceof i;this._readableState=new S(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function C(t,e,r,n,i){c("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?O(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)))}(t,s);else if(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(s,e)),o)A(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)s.endEmitted?A(t,new v):T(t,s,e,!0);else if(s.ended)A(t,new y);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?T(t,s,e,!1):M(t,s)):T(t,s,e,!1)}else n||(s.reading=!1,M(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function T(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&O(t)),M(t,e)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),B.prototype.destroy=m.destroy,B.prototype._undestroy=m.undestroy,B.prototype._destroy=function(t,e){e(t)},B.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),C(this,t,e,!1,r)},B.prototype.unshift=function(t){return C(this,t,null,!0,!1)},B.prototype.isPaused=function(){return!1===this._readableState.flowing},B.prototype.setEncoding=function(t){h||(h=r(13).StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function R(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function O(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(I,t))}function I(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,L(t)}function M(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(x,t,e))}function x(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(c("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function D(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function k(t){c("readable nexttick read 0"),t.read(0)}function P(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),L(t),e.flowing&&!e.reading&&t.read(0)}function L(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function F(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function N(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(U,e,t))}function U(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function G(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}B.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?N(this):O(this),null;if(0===(t=R(t,e))&&e.ended)return 0===e.length&&N(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=R(r,e))),null===(n=t>0?F(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&N(this)),null!==n&&this.emit("data",n),n},B.prototype._read=function(t){A(this,new w("_read()"))},B.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?u:g;function a(e,n){c("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",f),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function u(){c("onend"),t.end()}i.endEmitted?n.nextTick(s):r.once("end",s),t.on("unpipe",a);var l=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,L(t))}}(r);t.on("drain",l);var h=!1;function f(e){c("ondata");var n=t.write(e);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==G(i.pipes,t))&&!h&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(e){c("onerror",e),g(),t.removeListener("error",d),0===o(t,"error")&&A(t,e)}function p(){t.removeListener("finish",m),g()}function m(){c("onfinish"),t.removeListener("close",p),g()}function g(){c("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",m),t.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),t},B.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=G(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},B.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?O(this):i.reading||n.nextTick(k,this))),r},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(D,this),r},B.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(D,this),e},B.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(P,t,e))}(this,t)),t.paused=!1,this},B.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},B.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<E.length;o++)t.on(E[o],this.emit.bind(this,E[o]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(B.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(208)),f(this)}),Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),B._fromList=F,Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(B.from=function(t,e){return void 0===d&&(d=r(209)),d(B,t,e)})}).call(this,r(8),r(0))},function(t,e,r){t.exports=r(11).EventEmitter},function(t,e,r){"use strict";(function(e){function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(r,s,t)):e.nextTick(r,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,r(0))},function(t,e,r){"use strict";var n=r(23).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,r){"use strict";(function(e,n){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=B,B.WritableState=S;var s={deprecate:r(20)},a=r(109),u=r(9).Buffer,c=e.Uint8Array||function(){};var l,h=r(110),f=r(111).getHighWaterMark,d=r(23).codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,_=d.ERR_STREAM_CANNOT_PIPE,b=d.ERR_STREAM_DESTROYED,y=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,A=h.errorOrDestroy;function E(){}function S(t,e,s){o=o||r(24),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new g;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(M,t,e),t._writableState.errorEmitted=!0,A(t,i)):(o(i),t._writableState.errorEmitted=!0,A(t,i),M(t,e))}(t,r,i,e,o);else{var s=O(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||R(t,r),i?n.nextTick(T,t,r,s,o):T(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function B(t){var e=this instanceof(o=o||r(24));if(!e&&!l.call(B,this))return new B(t);this._writableState=new S(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function C(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new b("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function T(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),M(t,e)}function R(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,C(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(C(t,e,!1,e.objectMode?1:c.length,c,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function O(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function I(t,e){t._final((function(r){e.pendingcb--,r&&A(t,r),e.prefinished=!0,t.emit("prefinish"),M(t,e)}))}function M(t,e){var r=O(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(I,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(4)(B,a),S.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(B,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===B&&(t&&t._writableState instanceof S)}})):l=function(t){return t instanceof this},B.prototype.pipe=function(){A(this,new _)},B.prototype.write=function(t,e,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,u.isBuffer(i)||i instanceof c);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=E),o.ending?function(t,e){var r=new w;A(t,r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var o;return null===r?o=new y:"string"==typeof r||e.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(A(t,o),n.nextTick(i,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else C(t,e,!1,a,n,i,o);return c}(this,o,a,t,e,r)),s},B.prototype.cork=function(){this._writableState.corked++},B.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||R(this,t))},B.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(B.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),B.prototype._write=function(t,e,r){r(new m("_write()"))},B.prototype._writev=null,B.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,M(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(B.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),B.prototype.destroy=h.destroy,B.prototype._undestroy=h.undestroy,B.prototype._destroy=function(t,e){e(t)}}).call(this,r(8),r(0))},function(t,e,r){"use strict";t.exports=l;var n=r(23).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(24);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(e,r){f(t,e,r)}))}function f(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(4)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,r){r(new i("_transform()"))},l.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e,r){var n=r(46).Stream,i=r(107).PassThrough,o=t.exports={};o.isStream=function(t){return t instanceof n},o.normalizeInputSource=function(t){if(null===t)return Buffer.alloc(0);if("string"==typeof t)return Buffer.from(t);if(o.isStream(t)&&!t._readableState){var e=new i;return t.pipe(e),e}return t}},function(t,e,r){var n=r(9).Buffer,i=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function o(t){if(n.isBuffer(t))return t;var e="function"==typeof n.alloc&&"function"==typeof n.from;if("number"==typeof t)return e?n.alloc(t):new n(t);if("string"==typeof t)return e?n.from(t):new n(t);throw new Error("input must be buffer, number, or string, received "+typeof t)}function s(t){var e=o(4);return e.writeInt32BE(t,0),e}function a(t,e){t=o(t),n.isBuffer(e)&&(e=e.readUInt32BE(0));for(var r=-1^~~e,s=0;s<t.length;s++)r=i[255&(r^t[s])]^r>>>8;return-1^r}function u(){return s(a.apply(null,arguments))}"undefined"!=typeof Int32Array&&(i=new Int32Array(i)),u.signed=function(){return a.apply(null,arguments)},u.unsigned=function(){return a.apply(null,arguments)>>>0},t.exports=u},function(t,e,r){"use strict";t.exports={CRC32Stream:r(213),DeflateCRC32Stream:r(222)}},function(t,e,r){"use strict";(function(e,n){var i;t.exports=B,B.ReadableState=S;r(11).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=r(118),a=r(9).Buffer,u=e.Uint8Array||function(){};var c,l=r(215);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,f,d,p=r(216),m=r(119),g=r(120).getHighWaterMark,_=r(25).codes,b=_.ERR_INVALID_ARG_TYPE,y=_.ERR_STREAM_PUSH_AFTER_EOF,w=_.ERR_METHOD_NOT_IMPLEMENTED,v=_.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(4)(B,s);var A=m.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(t,e,n){i=i||r(26),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=r(13).StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function B(t){if(i=i||r(26),!(this instanceof B))return new B(t);var e=this instanceof i;this._readableState=new S(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function C(t,e,r,n,i){c("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?O(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)))}(t,s);else if(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(s,e)),o)A(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)s.endEmitted?A(t,new v):T(t,s,e,!0);else if(s.ended)A(t,new y);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?T(t,s,e,!1):M(t,s)):T(t,s,e,!1)}else n||(s.reading=!1,M(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function T(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&O(t)),M(t,e)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),B.prototype.destroy=m.destroy,B.prototype._undestroy=m.undestroy,B.prototype._destroy=function(t,e){e(t)},B.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),C(this,t,e,!1,r)},B.prototype.unshift=function(t){return C(this,t,null,!0,!1)},B.prototype.isPaused=function(){return!1===this._readableState.flowing},B.prototype.setEncoding=function(t){h||(h=r(13).StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function R(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function O(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(I,t))}function I(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,L(t)}function M(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(x,t,e))}function x(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(c("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function D(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function k(t){c("readable nexttick read 0"),t.read(0)}function P(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),L(t),e.flowing&&!e.reading&&t.read(0)}function L(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function F(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function N(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(U,e,t))}function U(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function G(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}B.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?N(this):O(this),null;if(0===(t=R(t,e))&&e.ended)return 0===e.length&&N(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=R(r,e))),null===(n=t>0?F(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&N(this)),null!==n&&this.emit("data",n),n},B.prototype._read=function(t){A(this,new w("_read()"))},B.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?u:g;function a(e,n){c("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",f),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function u(){c("onend"),t.end()}i.endEmitted?n.nextTick(s):r.once("end",s),t.on("unpipe",a);var l=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,L(t))}}(r);t.on("drain",l);var h=!1;function f(e){c("ondata");var n=t.write(e);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==G(i.pipes,t))&&!h&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(e){c("onerror",e),g(),t.removeListener("error",d),0===o(t,"error")&&A(t,e)}function p(){t.removeListener("finish",m),g()}function m(){c("onfinish"),t.removeListener("close",p),g()}function g(){c("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",m),t.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),t},B.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=G(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},B.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?O(this):i.reading||n.nextTick(k,this))),r},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(D,this),r},B.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(D,this),e},B.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(P,t,e))}(this,t)),t.paused=!1,this},B.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},B.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<E.length;o++)t.on(E[o],this.emit.bind(this,E[o]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(B.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(218)),f(this)}),Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),B._fromList=F,Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(B.from=function(t,e){return void 0===d&&(d=r(219)),d(B,t,e)})}).call(this,r(8),r(0))},function(t,e,r){t.exports=r(11).EventEmitter},function(t,e,r){"use strict";(function(e){function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(r,s,t)):e.nextTick(r,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,r(0))},function(t,e,r){"use strict";var n=r(25).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,r){"use strict";(function(e,n){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=B,B.WritableState=S;var s={deprecate:r(20)},a=r(118),u=r(9).Buffer,c=e.Uint8Array||function(){};var l,h=r(119),f=r(120).getHighWaterMark,d=r(25).codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,_=d.ERR_STREAM_CANNOT_PIPE,b=d.ERR_STREAM_DESTROYED,y=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,A=h.errorOrDestroy;function E(){}function S(t,e,s){o=o||r(26),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new g;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(M,t,e),t._writableState.errorEmitted=!0,A(t,i)):(o(i),t._writableState.errorEmitted=!0,A(t,i),M(t,e))}(t,r,i,e,o);else{var s=O(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||R(t,r),i?n.nextTick(T,t,r,s,o):T(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function B(t){var e=this instanceof(o=o||r(26));if(!e&&!l.call(B,this))return new B(t);this._writableState=new S(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function C(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new b("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function T(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),M(t,e)}function R(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,C(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(C(t,e,!1,e.objectMode?1:c.length,c,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function O(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function I(t,e){t._final((function(r){e.pendingcb--,r&&A(t,r),e.prefinished=!0,t.emit("prefinish"),M(t,e)}))}function M(t,e){var r=O(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(I,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(4)(B,a),S.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(B,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===B&&(t&&t._writableState instanceof S)}})):l=function(t){return t instanceof this},B.prototype.pipe=function(){A(this,new _)},B.prototype.write=function(t,e,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,u.isBuffer(i)||i instanceof c);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=E),o.ending?function(t,e){var r=new w;A(t,r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var o;return null===r?o=new y:"string"==typeof r||e.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(A(t,o),n.nextTick(i,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else C(t,e,!1,a,n,i,o);return c}(this,o,a,t,e,r)),s},B.prototype.cork=function(){this._writableState.corked++},B.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||R(this,t))},B.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(B.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),B.prototype._write=function(t,e,r){r(new m("_write()"))},B.prototype._writev=null,B.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,M(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(B.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),B.prototype.destroy=h.destroy,B.prototype._undestroy=h.undestroy,B.prototype._destroy=function(t,e){e(t)}}).call(this,r(8),r(0))},function(t,e,r){"use strict";t.exports=l;var n=r(25).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(26);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(e,r){f(t,e,r)}))}function f(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(4)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,r){r(new i("_transform()"))},l.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e,r){var n;n=function(t){t.version="1.2.0";var e=function(){for(var t=0,e=new Array(256),r=0;256!=r;++r)t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=1&(t=r)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1)?-306674912^t>>>1:t>>>1,e[r]=t;return"undefined"!=typeof Int32Array?new Int32Array(e):e}();t.table=e,t.bstr=function(t,r){for(var n=-1^r,i=t.length-1,o=0;o<i;)n=(n=n>>>8^e[255&(n^t.charCodeAt(o++))])>>>8^e[255&(n^t.charCodeAt(o++))];return o===i&&(n=n>>>8^e[255&(n^t.charCodeAt(o))]),-1^n},t.buf=function(t,r){if(t.length>1e4)return function(t,r){for(var n=-1^r,i=t.length-7,o=0;o<i;)n=(n=(n=(n=(n=(n=(n=(n=n>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])];for(;o<i+7;)n=n>>>8^e[255&(n^t[o++])];return-1^n}(t,r);for(var n=-1^r,i=t.length-3,o=0;o<i;)n=(n=(n=(n=n>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])])>>>8^e[255&(n^t[o++])];for(;o<i+3;)n=n>>>8^e[255&(n^t[o++])];return-1^n},t.str=function(t,r){for(var n,i,o=-1^r,s=0,a=t.length;s<a;)(n=t.charCodeAt(s++))<128?o=o>>>8^e[255&(o^n)]:n<2048?o=(o=o>>>8^e[255&(o^(192|n>>6&31))])>>>8^e[255&(o^(128|63&n))]:n>=55296&&n<57344?(n=64+(1023&n),i=1023&t.charCodeAt(s++),o=(o=(o=(o=o>>>8^e[255&(o^(240|n>>8&7))])>>>8^e[255&(o^(128|n>>2&63))])>>>8^e[255&(o^(128|i>>6&15|(3&n)<<4))])>>>8^e[255&(o^(128|63&i))]):o=(o=(o=o>>>8^e[255&(o^(224|n>>12&15))])>>>8^e[255&(o^(128|n>>6&63))])>>>8^e[255&(o^(128|63&n))];return-1^o}},"undefined"==typeof DO_NOT_EXPORT_CRC?n(e):n({})},function(t,e,r){"use strict";(function(e,n){var i;t.exports=B,B.ReadableState=S;r(11).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=r(125),a=r(9).Buffer,u=e.Uint8Array||function(){};var c,l=r(228);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,f,d,p=r(229),m=r(126),g=r(127).getHighWaterMark,_=r(27).codes,b=_.ERR_INVALID_ARG_TYPE,y=_.ERR_STREAM_PUSH_AFTER_EOF,w=_.ERR_METHOD_NOT_IMPLEMENTED,v=_.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(4)(B,s);var A=m.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(t,e,n){i=i||r(28),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=r(13).StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function B(t){if(i=i||r(28),!(this instanceof B))return new B(t);var e=this instanceof i;this._readableState=new S(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function C(t,e,r,n,i){c("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?O(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)))}(t,s);else if(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(s,e)),o)A(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)s.endEmitted?A(t,new v):T(t,s,e,!0);else if(s.ended)A(t,new y);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?T(t,s,e,!1):M(t,s)):T(t,s,e,!1)}else n||(s.reading=!1,M(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function T(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&O(t)),M(t,e)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),B.prototype.destroy=m.destroy,B.prototype._undestroy=m.undestroy,B.prototype._destroy=function(t,e){e(t)},B.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),C(this,t,e,!1,r)},B.prototype.unshift=function(t){return C(this,t,null,!0,!1)},B.prototype.isPaused=function(){return!1===this._readableState.flowing},B.prototype.setEncoding=function(t){h||(h=r(13).StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function R(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function O(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(I,t))}function I(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,L(t)}function M(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(x,t,e))}function x(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(c("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function D(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function k(t){c("readable nexttick read 0"),t.read(0)}function P(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),L(t),e.flowing&&!e.reading&&t.read(0)}function L(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function F(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function N(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(U,e,t))}function U(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function G(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}B.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?N(this):O(this),null;if(0===(t=R(t,e))&&e.ended)return 0===e.length&&N(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=R(r,e))),null===(n=t>0?F(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&N(this)),null!==n&&this.emit("data",n),n},B.prototype._read=function(t){A(this,new w("_read()"))},B.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?u:g;function a(e,n){c("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",f),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function u(){c("onend"),t.end()}i.endEmitted?n.nextTick(s):r.once("end",s),t.on("unpipe",a);var l=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,L(t))}}(r);t.on("drain",l);var h=!1;function f(e){c("ondata");var n=t.write(e);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==G(i.pipes,t))&&!h&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(e){c("onerror",e),g(),t.removeListener("error",d),0===o(t,"error")&&A(t,e)}function p(){t.removeListener("finish",m),g()}function m(){c("onfinish"),t.removeListener("close",p),g()}function g(){c("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",m),t.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),t},B.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=G(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},B.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?O(this):i.reading||n.nextTick(k,this))),r},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(D,this),r},B.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(D,this),e},B.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(P,t,e))}(this,t)),t.paused=!1,this},B.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},B.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<E.length;o++)t.on(E[o],this.emit.bind(this,E[o]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(B.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(231)),f(this)}),Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),B._fromList=F,Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(B.from=function(t,e){return void 0===d&&(d=r(232)),d(B,t,e)})}).call(this,r(8),r(0))},function(t,e,r){t.exports=r(11).EventEmitter},function(t,e,r){"use strict";(function(e){function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(r,s,t)):e.nextTick(r,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,r(0))},function(t,e,r){"use strict";var n=r(27).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,r){"use strict";(function(e,n){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=B,B.WritableState=S;var s={deprecate:r(20)},a=r(125),u=r(9).Buffer,c=e.Uint8Array||function(){};var l,h=r(126),f=r(127).getHighWaterMark,d=r(27).codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,_=d.ERR_STREAM_CANNOT_PIPE,b=d.ERR_STREAM_DESTROYED,y=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,A=h.errorOrDestroy;function E(){}function S(t,e,s){o=o||r(28),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new g;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(M,t,e),t._writableState.errorEmitted=!0,A(t,i)):(o(i),t._writableState.errorEmitted=!0,A(t,i),M(t,e))}(t,r,i,e,o);else{var s=O(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||R(t,r),i?n.nextTick(T,t,r,s,o):T(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function B(t){var e=this instanceof(o=o||r(28));if(!e&&!l.call(B,this))return new B(t);this._writableState=new S(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function C(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new b("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function T(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),M(t,e)}function R(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,C(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(C(t,e,!1,e.objectMode?1:c.length,c,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function O(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function I(t,e){t._final((function(r){e.pendingcb--,r&&A(t,r),e.prefinished=!0,t.emit("prefinish"),M(t,e)}))}function M(t,e){var r=O(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(I,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(4)(B,a),S.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(B,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===B&&(t&&t._writableState instanceof S)}})):l=function(t){return t instanceof this},B.prototype.pipe=function(){A(this,new _)},B.prototype.write=function(t,e,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,u.isBuffer(i)||i instanceof c);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=E),o.ending?function(t,e){var r=new w;A(t,r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var o;return null===r?o=new y:"string"==typeof r||e.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(A(t,o),n.nextTick(i,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else C(t,e,!1,a,n,i,o);return c}(this,o,a,t,e,r)),s},B.prototype.cork=function(){this._writableState.corked++},B.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||R(this,t))},B.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(B.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),B.prototype._write=function(t,e,r){r(new m("_write()"))},B.prototype._writev=null,B.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,M(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(B.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),B.prototype.destroy=h.destroy,B.prototype._undestroy=h.undestroy,B.prototype._destroy=function(t,e){e(t)}}).call(this,r(8),r(0))},function(t,e,r){"use strict";t.exports=l;var n=r(27).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(28);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(e,r){f(t,e,r)}))}function f(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(4)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,r){r(new i("_transform()"))},l.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e){var r=Buffer.alloc,n="0".charCodeAt(0),i=Buffer.from("ustar\0","binary"),o=Buffer.from("00","binary"),s=Buffer.from("ustar ","binary"),a=Buffer.from(" \0","binary"),u=parseInt("7777",8),c=function(t,e,r,n){for(;r<n;r++)if(t[r]===e)return r;return n},l=function(t){for(var e=256,r=0;r<148;r++)e+=t[r];for(var n=156;n<512;n++)e+=t[n];return e},h=function(t,e){return(t=t.toString(8)).length>e?"7777777777777777777".slice(0,e)+" ":"0000000000000000000".slice(0,e-t.length)+t+" "};var f=function(t,e,r){if(128&(t=t.slice(e,e+r))[e=0])return function(t){var e;if(128===t[0])e=!0;else{if(255!==t[0])return null;e=!1}for(var r=[],n=t.length-1;n>0;n--){var i=t[n];e?r.push(i):r.push(255-i)}var o=0,s=r.length;for(n=0;n<s;n++)o+=r[n]*Math.pow(256,n);return e?o:-1*o}(t);for(;e<t.length&&32===t[e];)e++;for(var n=function(t,e,r){return"number"!=typeof t?r:(t=~~t)>=e?e:t>=0||(t+=e)>=0?t:0}(c(t,32,e,t.length),t.length,t.length);e<n&&0===t[e];)e++;return n===e?0:parseInt(t.slice(e,n).toString(),8)},d=function(t,e,r,n){return t.slice(e,c(t,0,e,e+r)).toString(n)},p=function(t){var e=Buffer.byteLength(t),r=Math.floor(Math.log(e)/Math.log(10))+1;return e+r>=Math.pow(10,r)&&r++,e+r+t};e.decodeLongPath=function(t,e){return d(t,0,t.length,e)},e.encodePax=function(t){var e="";t.name&&(e+=p(" path="+t.name+"\n")),t.linkname&&(e+=p(" linkpath="+t.linkname+"\n"));var r=t.pax;if(r)for(var n in r)e+=p(" "+n+"="+r[n]+"\n");return Buffer.from(e)},e.decodePax=function(t){for(var e={};t.length;){for(var r=0;r<t.length&&32!==t[r];)r++;var n=parseInt(t.slice(0,r).toString(),10);if(!n)return e;var i=t.slice(r+1,n-1).toString(),o=i.indexOf("=");if(-1===o)return e;e[i.slice(0,o)]=i.slice(o+1),t=t.slice(n)}return e},e.encode=function(t){var e=r(512),s=t.name,a="";if(5===t.typeflag&&"/"!==s[s.length-1]&&(s+="/"),Buffer.byteLength(s)!==s.length)return null;for(;Buffer.byteLength(s)>100;){var c=s.indexOf("/");if(-1===c)return null;a+=a?"/"+s.slice(0,c):s.slice(0,c),s=s.slice(c+1)}return Buffer.byteLength(s)>100||Buffer.byteLength(a)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(s),e.write(h(t.mode&u,6),100),e.write(h(t.uid,6),108),e.write(h(t.gid,6),116),e.write(h(t.size,11),124),e.write(h(t.mtime.getTime()/1e3|0,11),136),e[156]=n+function(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0}(t.type),t.linkname&&e.write(t.linkname,157),i.copy(e,257),o.copy(e,263),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(h(t.devmajor||0,6),329),e.write(h(t.devminor||0,6),337),a&&e.write(a,345),e.write(h(l(e),6),148),e)},e.decode=function(t,e,r){var o=0===t[156]?0:t[156]-n,u=d(t,0,100,e),c=f(t,100,8),h=f(t,108,8),p=f(t,116,8),m=f(t,124,12),g=f(t,136,12),_=function(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null}(o),b=0===t[157]?null:d(t,157,100,e),y=d(t,265,32),w=d(t,297,32),v=f(t,329,8),A=f(t,337,8),E=l(t);if(256===E)return null;if(E!==f(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(0===i.compare(t,257,263))t[345]&&(u=d(t,345,155,e)+"/"+u);else if(0===s.compare(t,257,263)&&0===a.compare(t,263,265));else if(!r)throw new Error("Invalid tar header: unknown format.");return 0===o&&u&&"/"===u[u.length-1]&&(o=5),{name:u,mode:c,uid:h,gid:p,size:m,mtime:new Date(1e3*g),type:_,linkname:b,uname:y,gname:w,devmajor:v,devminor:A}}},function(t,e,r){"use strict";(function(e,n){var i;t.exports=B,B.ReadableState=S;r(11).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=r(132),a=r(9).Buffer,u=e.Uint8Array||function(){};var c,l=r(236);c=l&&l.debuglog?l.debuglog("stream"):function(){};var h,f,d,p=r(237),m=r(133),g=r(134).getHighWaterMark,_=r(29).codes,b=_.ERR_INVALID_ARG_TYPE,y=_.ERR_STREAM_PUSH_AFTER_EOF,w=_.ERR_METHOD_NOT_IMPLEMENTED,v=_.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(4)(B,s);var A=m.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(t,e,n){i=i||r(30),t=t||{},"boolean"!=typeof n&&(n=e instanceof i),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=g(this,t,"readableHighWaterMark",n),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=r(13).StringDecoder),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function B(t){if(i=i||r(30),!(this instanceof B))return new B(t);var e=this instanceof i;this._readableState=new S(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function C(t,e,r,n,i){c("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(c("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?O(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,I(t)))}(t,s);else if(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof u||"string"==typeof e||void 0===e||t.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(s,e)),o)A(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)s.endEmitted?A(t,new v):T(t,s,e,!0);else if(s.ended)A(t,new y);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?T(t,s,e,!1):M(t,s)):T(t,s,e,!1)}else n||(s.reading=!1,M(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function T(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&O(t)),M(t,e)}Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),B.prototype.destroy=m.destroy,B.prototype._undestroy=m.undestroy,B.prototype._destroy=function(t,e){e(t)},B.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),C(this,t,e,!1,r)},B.prototype.unshift=function(t){return C(this,t,null,!0,!1)},B.prototype.isPaused=function(){return!1===this._readableState.flowing},B.prototype.setEncoding=function(t){h||(h=r(13).StringDecoder);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};function R(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=1073741824?t=1073741824:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function O(t){var e=t._readableState;c("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(c("emitReadable",e.flowing),e.emittedReadable=!0,n.nextTick(I,t))}function I(t){var e=t._readableState;c("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,L(t)}function M(t,e){e.readingMore||(e.readingMore=!0,n.nextTick(x,t,e))}function x(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(c("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function D(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function k(t){c("readable nexttick read 0"),t.read(0)}function P(t,e){c("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),L(t),e.flowing&&!e.reading&&t.read(0)}function L(t){var e=t._readableState;for(c("flow",e.flowing);e.flowing&&null!==t.read(););}function F(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function N(t){var e=t._readableState;c("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,n.nextTick(U,e,t))}function U(t,e){if(c("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function G(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}B.prototype.read=function(t){c("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return c("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?N(this):O(this),null;if(0===(t=R(t,e))&&e.ended)return 0===e.length&&N(this),null;var n,i=e.needReadable;return c("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&c("length less than watermark",i=!0),e.ended||e.reading?c("reading or ended",i=!1):i&&(c("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=R(r,e))),null===(n=t>0?F(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&N(this)),null!==n&&this.emit("data",n),n},B.prototype._read=function(t){A(this,new w("_read()"))},B.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,c("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?u:g;function a(e,n){c("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,c("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",l),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",f),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function u(){c("onend"),t.end()}i.endEmitted?n.nextTick(s):r.once("end",s),t.on("unpipe",a);var l=function(t){return function(){var e=t._readableState;c("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,L(t))}}(r);t.on("drain",l);var h=!1;function f(e){c("ondata");var n=t.write(e);c("dest.write",n),!1===n&&((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==G(i.pipes,t))&&!h&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function d(e){c("onerror",e),g(),t.removeListener("error",d),0===o(t,"error")&&A(t,e)}function p(){t.removeListener("finish",m),g()}function m(){c("onfinish"),t.removeListener("close",p),g()}function g(){c("unpipe"),r.unpipe(t)}return r.on("data",f),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",m),t.emit("pipe",r),i.flowing||(c("pipe resume"),r.resume()),t},B.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=G(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},B.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e),i=this._readableState;return"data"===t?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===t&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,c("on readable",i.length,i.reading),i.length?O(this):i.reading||n.nextTick(k,this))),r},B.prototype.addListener=B.prototype.on,B.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&n.nextTick(D,this),r},B.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||n.nextTick(D,this),e},B.prototype.resume=function(){var t=this._readableState;return t.flowing||(c("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,n.nextTick(P,t,e))}(this,t)),t.paused=!1,this},B.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},B.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(c("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){(c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<E.length;o++)t.on(E[o],this.emit.bind(this,E[o]));return this._read=function(e){c("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(B.prototype[Symbol.asyncIterator]=function(){return void 0===f&&(f=r(239)),f(this)}),Object.defineProperty(B.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(B.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(B.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),B._fromList=F,Object.defineProperty(B.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(B.from=function(t,e){return void 0===d&&(d=r(240)),d(B,t,e)})}).call(this,r(8),r(0))},function(t,e,r){t.exports=r(11).EventEmitter},function(t,e,r){"use strict";(function(e){function r(t,e){i(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,o){var s=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?s._writableState?s._writableState.errorEmitted?e.nextTick(n,s):(s._writableState.errorEmitted=!0,e.nextTick(r,s,t)):e.nextTick(r,s,t):o?(e.nextTick(n,s),o(t)):e.nextTick(n,s)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}}).call(this,r(0))},function(t,e,r){"use strict";var n=r(29).codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},function(t,e,r){"use strict";(function(e,n){function i(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}var o;t.exports=B,B.WritableState=S;var s={deprecate:r(20)},a=r(132),u=r(9).Buffer,c=e.Uint8Array||function(){};var l,h=r(133),f=r(134).getHighWaterMark,d=r(29).codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,_=d.ERR_STREAM_CANNOT_PIPE,b=d.ERR_STREAM_DESTROYED,y=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,v=d.ERR_UNKNOWN_ENCODING,A=h.errorOrDestroy;function E(){}function S(t,e,s){o=o||r(30),t=t||{},"boolean"!=typeof s&&(s=e instanceof o),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=f(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,o=r.writecb;if("function"!=typeof o)throw new g;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,o){--e.pendingcb,r?(n.nextTick(o,i),n.nextTick(M,t,e),t._writableState.errorEmitted=!0,A(t,i)):(o(i),t._writableState.errorEmitted=!0,A(t,i),M(t,e))}(t,r,i,e,o);else{var s=O(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||R(t,r),i?n.nextTick(T,t,r,s,o):T(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function B(t){var e=this instanceof(o=o||r(30));if(!e&&!l.call(B,this))return new B(t);this._writableState=new S(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function C(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new b("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function T(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),M(t,e)}function R(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,o=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)o[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;o.allBuffers=u,C(t,e,!0,e.length,o,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new i(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,h=r.callback;if(C(t,e,!1,e.objectMode?1:c.length,c,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function O(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function I(t,e){t._final((function(r){e.pendingcb--,r&&A(t,r),e.prefinished=!0,t.emit("prefinish"),M(t,e)}))}function M(t,e){var r=O(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,n.nextTick(I,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}r(4)(B,a),S.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(l=Function.prototype[Symbol.hasInstance],Object.defineProperty(B,Symbol.hasInstance,{value:function(t){return!!l.call(this,t)||this===B&&(t&&t._writableState instanceof S)}})):l=function(t){return t instanceof this},B.prototype.pipe=function(){A(this,new _)},B.prototype.write=function(t,e,r){var i,o=this._writableState,s=!1,a=!o.objectMode&&(i=t,u.isBuffer(i)||i instanceof c);return a&&!u.isBuffer(t)&&(t=function(t){return u.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=E),o.ending?function(t,e){var r=new w;A(t,r),n.nextTick(e,r)}(this,r):(a||function(t,e,r,i){var o;return null===r?o=new y:"string"==typeof r||e.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(A(t,o),n.nextTick(i,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=u.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var c=e.length<e.highWaterMark;c||(e.needDrain=!0);if(e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else C(t,e,!1,a,n,i,o);return c}(this,o,a,t,e,r)),s},B.prototype.cork=function(){this._writableState.corked++},B.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||R(this,t))},B.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new v(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(B.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(B.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),B.prototype._write=function(t,e,r){r(new m("_write()"))},B.prototype._writev=null,B.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,M(t,e),r&&(e.finished?n.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(B.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(B.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),B.prototype.destroy=h.destroy,B.prototype._undestroy=h.undestroy,B.prototype._destroy=function(t,e){e(t)}}).call(this,r(8),r(0))},function(t,e,r){"use strict";t.exports=l;var n=r(29).codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(30);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(t){if(!(this instanceof l))return new l(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(e,r){f(t,e,r)}))}function f(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(4)(l,u),l.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},l.prototype._transform=function(t,e,r){r(new i("_transform()"))},l.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},l.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},function(t,e,r){"use strict";r.d(e,"a",(function(){return s}));var n=r(58);function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const o={id:"request-scheduler",throttleRequests:!0,maxRequests:6};class s{constructor(t={}){i(this,"props",void 0),i(this,"stats",void 0),i(this,"activeRequestCount",0),i(this,"requestQueue",[]),i(this,"requestMap",new Map),i(this,"deferredUpdate",null),this.props={...o,...t},this.stats=new n.a({id:this.props.id}),this.stats.get("Queued Requests"),this.stats.get("Active Requests"),this.stats.get("Cancelled Requests"),this.stats.get("Queued Requests Ever"),this.stats.get("Active Requests Ever")}scheduleRequest(t,e=(()=>0)){if(!this.props.throttleRequests)return Promise.resolve({done:()=>{}});if(this.requestMap.has(t))return this.requestMap.get(t);const r={handle:t,priority:0,getPriority:e},n=new Promise(t=>(r.resolve=t,r));return this.requestQueue.push(r),this.requestMap.set(t,n),this._issueNewRequests(),n}_issueRequest(t){const{handle:e,resolve:r}=t;let n=!1;const i=()=>{n||(n=!0,this.requestMap.delete(e),this.activeRequestCount--,this._issueNewRequests())};return this.activeRequestCount++,r?r({done:i}):Promise.resolve({done:i})}_issueNewRequests(){this.deferredUpdate||(this.deferredUpdate=setTimeout(()=>this._issueNewRequestsAsync(),0))}_issueNewRequestsAsync(){this.deferredUpdate=null;const t=Math.max(this.props.maxRequests-this.activeRequestCount,0);if(0!==t){this._updateAllRequests();for(let e=0;e<t;++e){const t=this.requestQueue.shift();t&&this._issueRequest(t)}}}_updateAllRequests(){const t=this.requestQueue;for(let e=0;e<t.length;++e){const r=t[e];this._updateRequest(r)||(t.splice(e,1),this.requestMap.delete(r.handle),e--)}t.sort((t,e)=>t.priority-e.priority)}_updateRequest(t){return t.priority=t.getPriority(t.handle),!(t.priority<0)||(t.resolve(null),!1)}}},function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return a}));var n=r(2),i=r(248),o=r(3),s=r(1);class a{async install(e=""){console.log('Installing "EGM2008-5" model...');const r=await Object(n.load)("https://github.com/visgl/deck.gl-data/raw/master/egm/egm2008-5.zip",i.a,{fetch:{followRedirect:!0}});let a=t.cwd();e&&(a=Object(s.join)(a,e)),await Object(o.d)(a,new Uint8Array(r["geoids/egm2008-5.pgm"]),"egm2008-5.pgm"),console.log("All dependencies were installed succesfully.")}}}).call(this,r(0))},function(t,e,r){
|
|
22
|
-
/**
|
|
23
|
-
* Archiver Vending
|
|
24
|
-
*
|
|
25
|
-
* @ignore
|
|
26
|
-
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
27
|
-
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
28
|
-
*/
|
|
29
|
-
var n=r(175),i={},o=function(t,e){return o.create(t,e)};o.create=function(t,e){if(i[t]){var r=new n(t,e);return r.setFormat(t),r.setModule(new i[t](e)),r}throw new Error("create("+t+"): format not registered")},o.registerFormat=function(t,e){if(i[t])throw new Error("register("+t+"): format already registered");if("function"!=typeof e)throw new Error("register("+t+"): format module invalid");if("function"!=typeof e.prototype.append||"function"!=typeof e.prototype.finalize)throw new Error("register("+t+"): format module missing methods");i[t]=e},o.isRegisteredFormat=function(t){return!!i[t]},o.registerFormat("zip",r(202)),o.registerFormat("tar",r(223)),o.registerFormat("json",r(246)),t.exports=o},function(t,e){},,,,,,,,,function(t,e,r){const n=r(247);globalThis.loaders=globalThis.loaders||{},t.exports=Object.assign(globalThis.loaders,n)},function(t,e,r){const n=r(44).get,i=r(44).set,o=r(44).has,s=r(44).isUndefined,a=(t,e,r)=>{const a=Object.keys(e).reduce((r,a)=>{const u=Array.isArray(e[a].path)?e[a].path.filter(e=>o(t,e))[0]:e[a].path,c=u?n(t,u):void 0;return((t,e,r,n,o)=>{const a=t[e].default,u=t[e].transform,c=t[e].omitValues||[];let l=u?u(r,n,o):r;return s(l)&&!s(a)&&(l=a),-1==c.indexOf(l)?i(Object.assign({},n),e,l):n})(e,a,c,r,t)},{});return r?r(a,t):a},u=(t,e,r)=>Array.isArray(t)?((t,e,r)=>t.map(t=>{const n=u(t,e);return r?r(n,t):n}))(t,e,r):a(t,e,r);t.exports=u},function(t,e){function r(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}
|
|
30
|
-
/*!
|
|
31
|
-
* Determine if an object is a Buffer
|
|
32
|
-
*
|
|
33
|
-
* @author Feross Aboukhadijeh <https://feross.org>
|
|
34
|
-
* @license MIT
|
|
35
|
-
*/
|
|
36
|
-
t.exports=function(t){return null!=t&&(r(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&r(t.slice(0,0))}(t)||!!t._isBuffer)}},function(t,e,r){"use strict";e.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,n=c(t),s=n[0],a=n[1],u=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),l=0,h=a>0?s-4:s;for(r=0;r<h;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],u[l++]=e>>16&255,u[l++]=e>>8&255,u[l++]=255&e;2===a&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[l++]=255&e);1===a&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[l++]=e>>8&255,u[l++]=255&e);return u},e.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=0,a=r-i;s<a;s+=16383)o.push(l(t,s,s+16383>a?a:s+16383));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]+"="));return o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function l(t,e,r){for(var i,o,s=[],a=e;a<r;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,e){
|
|
37
|
-
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
38
|
-
e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,h=r?i-1:0,f=r?-1:1,d=t[e+h];for(h+=f,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+t[e+h],h+=f,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=l?(a=0,s=l):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+d]=255&s,d+=p,s/=256,c-=8);t[r+d-p]|=128*m}},function(t,e){},function(t,e,r){"use strict";var n=r(59).Buffer,i=r(156);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e,r,i,o=n.allocUnsafe(t>>>0),s=this.head,a=0;s;)e=s.data,r=o,i=a,e.copy(r,i),a+=s.data.length,s=s.next;return o},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},function(t,e){},function(t,e,r){(function(t,e){!function(t,r){"use strict";if(!t.setImmediate){var n,i,o,s,a,u=1,c={},l=!1,h=t.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(t);f=f&&f.setTimeout?f:t,"[object process]"==={}.toString.call(t.process)?n=function(t){e.nextTick((function(){p(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,r=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=r,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){p(t.data)},n=function(t){o.port2.postMessage(t)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,n=function(t){var e=h.createElement("script");e.onreadystatechange=function(){p(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):n=function(t){setTimeout(p,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&p(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),n=function(e){t.postMessage(s+e,"*")}),f.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),r=0;r<e.length;r++)e[r]=arguments[r+1];var i={callback:t,args:e};return c[u]=i,n(u),u++},f.clearImmediate=d}function d(t){delete c[t]}function p(t){if(l)setTimeout(p,0,t);else{var e=c[t];if(e){l=!0;try{!function(t){var e=t.callback,r=t.args;switch(r.length){case 0:e();break;case 1:e(r[0]);break;case 2:e(r[0],r[1]);break;case 3:e(r[0],r[1],r[2]);break;default:e.apply(void 0,r)}}(e)}finally{d(t),l=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,r(8),r(0))},function(t,e,r){
|
|
39
|
-
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
40
|
-
var n=r(9),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},function(t,e,r){"use strict";t.exports=o;var n=r(84),i=Object.create(r(33));function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=r(4),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){t.exports=r(60)},function(t,e,r){t.exports=r(18)},function(t,e,r){t.exports=r(47).Transform},function(t,e,r){"use strict";(function(t){var n=r(34),i=r(167),o=r(168),s=r(171),a=r(174);for(var u in a)e[u]=a[u];e.NONE=0,e.DEFLATE=1,e.INFLATE=2,e.GZIP=3,e.GUNZIP=4,e.DEFLATERAW=5,e.INFLATERAW=6,e.UNZIP=7;function c(t){if("number"!=typeof t||t<e.DEFLATE||t>e.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=t,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}c.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,n(this.init_done,"close before init"),n(this.mode<=e.UNZIP),this.mode===e.DEFLATE||this.mode===e.GZIP||this.mode===e.DEFLATERAW?o.deflateEnd(this.strm):this.mode!==e.INFLATE&&this.mode!==e.GUNZIP&&this.mode!==e.INFLATERAW&&this.mode!==e.UNZIP||s.inflateEnd(this.strm),this.mode=e.NONE,this.dictionary=null)},c.prototype.write=function(t,e,r,n,i,o,s){return this._write(!0,t,e,r,n,i,o,s)},c.prototype.writeSync=function(t,e,r,n,i,o,s){return this._write(!1,t,e,r,n,i,o,s)},c.prototype._write=function(r,i,o,s,a,u,c,l){if(n.equal(arguments.length,8),n(this.init_done,"write before init"),n(this.mode!==e.NONE,"already finalized"),n.equal(!1,this.write_in_progress,"write already in progress"),n.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,n.equal(!1,void 0===i,"must provide flush value"),this.write_in_progress=!0,i!==e.Z_NO_FLUSH&&i!==e.Z_PARTIAL_FLUSH&&i!==e.Z_SYNC_FLUSH&&i!==e.Z_FULL_FLUSH&&i!==e.Z_FINISH&&i!==e.Z_BLOCK)throw new Error("Invalid flush value");if(null==o&&(o=Buffer.alloc(0),a=0,s=0),this.strm.avail_in=a,this.strm.input=o,this.strm.next_in=s,this.strm.avail_out=l,this.strm.output=u,this.strm.next_out=c,this.flush=i,!r)return this._process(),this._checkError()?this._afterSync():void 0;var h=this;return t.nextTick((function(){h._process(),h._after()})),this},c.prototype._afterSync=function(){var t=this.strm.avail_out,e=this.strm.avail_in;return this.write_in_progress=!1,[e,t]},c.prototype._process=function(){var t=null;switch(this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=o.deflate(this.strm,this.flush);break;case e.UNZIP:switch(this.strm.avail_in>0&&(t=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===t)break;if(31!==this.strm.input[t]){this.mode=e.INFLATE;break}if(this.gzip_id_bytes_read=1,t++,1===this.strm.avail_in)break;case 1:if(null===t)break;139===this.strm.input[t]?(this.gzip_id_bytes_read=2,this.mode=e.GUNZIP):this.mode=e.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:for(this.err=s.inflate(this.strm,this.flush),this.err===e.Z_NEED_DICT&&this.dictionary&&(this.err=s.inflateSetDictionary(this.strm,this.dictionary),this.err===e.Z_OK?this.err=s.inflate(this.strm,this.flush):this.err===e.Z_DATA_ERROR&&(this.err=e.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===e.GUNZIP&&this.err===e.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=s.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},c.prototype._checkError=function(){switch(this.err){case e.Z_OK:case e.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===e.Z_FINISH)return this._error("unexpected end of file"),!1;break;case e.Z_STREAM_END:break;case e.Z_NEED_DICT:return null==this.dictionary?this._error("Missing dictionary"):this._error("Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},c.prototype._after=function(){if(this._checkError()){var t=this.strm.avail_out,e=this.strm.avail_in;this.write_in_progress=!1,this.callback(e,t),this.pending_close&&this.close()}},c.prototype._error=function(t){this.strm.msg&&(t=this.strm.msg),this.onerror(t,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},c.prototype.init=function(t,r,i,o,s){n(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),n(t>=8&&t<=15,"invalid windowBits"),n(r>=-1&&r<=9,"invalid compression level"),n(i>=1&&i<=9,"invalid memlevel"),n(o===e.Z_FILTERED||o===e.Z_HUFFMAN_ONLY||o===e.Z_RLE||o===e.Z_FIXED||o===e.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(r,t,i,o,s),this._setDictionary()},c.prototype.params=function(){throw new Error("deflateParams Not supported")},c.prototype.reset=function(){this._reset(),this._setDictionary()},c.prototype._init=function(t,r,n,a,u){switch(this.level=t,this.windowBits=r,this.memLevel=n,this.strategy=a,this.flush=e.Z_NO_FLUSH,this.err=e.Z_OK,this.mode!==e.GZIP&&this.mode!==e.GUNZIP||(this.windowBits+=16),this.mode===e.UNZIP&&(this.windowBits+=32),this.mode!==e.DEFLATERAW&&this.mode!==e.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new i,this.mode){case e.DEFLATE:case e.GZIP:case e.DEFLATERAW:this.err=o.deflateInit2(this.strm,this.level,e.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case e.INFLATE:case e.GUNZIP:case e.INFLATERAW:case e.UNZIP:this.err=s.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==e.Z_OK&&this._error("Init error"),this.dictionary=u,this.write_in_progress=!1,this.init_done=!0},c.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:this.err=o.deflateSetDictionary(this.strm,this.dictionary)}this.err!==e.Z_OK&&this._error("Failed to set dictionary")}},c.prototype._reset=function(){switch(this.err=e.Z_OK,this.mode){case e.DEFLATE:case e.DEFLATERAW:case e.GZIP:this.err=o.deflateReset(this.strm);break;case e.INFLATE:case e.INFLATERAW:case e.GUNZIP:this.err=s.inflateReset(this.strm)}this.err!==e.Z_OK&&this._error("Failed to reset stream")},e.Zlib=c}).call(this,r(0))},function(t,e,r){"use strict";
|
|
41
|
-
/*
|
|
42
|
-
object-assign
|
|
43
|
-
(c) Sindre Sorhus
|
|
44
|
-
@license MIT
|
|
45
|
-
*/var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable;function s(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,a,u=s(t),c=1;c<arguments.length;c++){for(var l in r=Object(arguments[c]))i.call(r,l)&&(u[l]=r[l]);if(n){a=n(r);for(var h=0;h<a.length;h++)o.call(r,a[h])&&(u[a[h]]=r[a[h]])}}return u}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(t,e,r){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},function(t,e,r){"use strict";var n,i=r(50),o=r(169),s=r(86),a=r(87),u=r(170);function c(t,e){return t.msg=u[e],e}function l(t){return(t<<1)-(t>4?9:0)}function h(t){for(var e=t.length;--e>=0;)t[e]=0}function f(t){var e=t.state,r=e.pending;r>t.avail_out&&(r=t.avail_out),0!==r&&(i.arraySet(t.output,e.pending_buf,e.pending_out,r,t.next_out),t.next_out+=r,e.pending_out+=r,t.total_out+=r,t.avail_out-=r,e.pending-=r,0===e.pending&&(e.pending_out=0))}function d(t,e){o._tr_flush_block(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,f(t.strm)}function p(t,e){t.pending_buf[t.pending++]=e}function m(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e}function g(t,e){var r,n,i=t.max_chain_length,o=t.strstart,s=t.prev_length,a=t.nice_match,u=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,c=t.window,l=t.w_mask,h=t.prev,f=t.strstart+258,d=c[o+s-1],p=c[o+s];t.prev_length>=t.good_match&&(i>>=2),a>t.lookahead&&(a=t.lookahead);do{if(c[(r=e)+s]===p&&c[r+s-1]===d&&c[r]===c[o]&&c[++r]===c[o+1]){o+=2,r++;do{}while(c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&c[++o]===c[++r]&&o<f);if(n=258-(f-o),o=f-258,n>s){if(t.match_start=e,s=n,n>=a)break;d=c[o+s-1],p=c[o+s]}}}while((e=h[e&l])>u&&0!=--i);return s<=t.lookahead?s:t.lookahead}function _(t){var e,r,n,o,u,c,l,h,f,d,p=t.w_size;do{if(o=t.window_size-t.lookahead-t.strstart,t.strstart>=p+(p-262)){i.arraySet(t.window,t.window,p,p,0),t.match_start-=p,t.strstart-=p,t.block_start-=p,e=r=t.hash_size;do{n=t.head[--e],t.head[e]=n>=p?n-p:0}while(--r);e=r=p;do{n=t.prev[--e],t.prev[e]=n>=p?n-p:0}while(--r);o+=p}if(0===t.strm.avail_in)break;if(c=t.strm,l=t.window,h=t.strstart+t.lookahead,f=o,d=void 0,(d=c.avail_in)>f&&(d=f),r=0===d?0:(c.avail_in-=d,i.arraySet(l,c.input,c.next_in,d,h),1===c.state.wrap?c.adler=s(c.adler,l,d,h):2===c.state.wrap&&(c.adler=a(c.adler,l,d,h)),c.next_in+=d,c.total_in+=d,d),t.lookahead+=r,t.lookahead+t.insert>=3)for(u=t.strstart-t.insert,t.ins_h=t.window[u],t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+1])&t.hash_mask;t.insert&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[u+3-1])&t.hash_mask,t.prev[u&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=u,u++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)}function b(t,e){for(var r,n;;){if(t.lookahead<262){if(_(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==r&&t.strstart-r<=t.w_size-262&&(t.match_length=g(t,r)),t.match_length>=3)if(n=o._tr_tally(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+1])&t.hash_mask;else n=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}function y(t,e){for(var r,n,i;;){if(t.lookahead<262){if(_(t),t.lookahead<262&&0===e)return 1;if(0===t.lookahead)break}if(r=0,t.lookahead>=3&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==r&&t.prev_length<t.max_lazy_match&&t.strstart-r<=t.w_size-262&&(t.match_length=g(t,r),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-3,n=o._tr_tally(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=i&&(t.ins_h=(t.ins_h<<t.hash_shift^t.window[t.strstart+3-1])&t.hash_mask,r=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(d(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=o._tr_tally(t,0,t.window[t.strstart-1]))&&d(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=o._tr_tally(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}function w(t,e,r,n,i){this.good_length=t,this.max_lazy=e,this.nice_length=r,this.max_chain=n,this.func=i}function v(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),h(this.dyn_ltree),h(this.dyn_dtree),h(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),h(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),h(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function A(t){var e;return t&&t.state?(t.total_in=t.total_out=0,t.data_type=2,(e=t.state).pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=0,o._tr_init(e),0):c(t,-2)}function E(t){var e,r=A(t);return 0===r&&((e=t.state).window_size=2*e.w_size,h(e.head),e.max_lazy_match=n[e.level].max_lazy,e.good_match=n[e.level].good_length,e.nice_match=n[e.level].nice_length,e.max_chain_length=n[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),r}function S(t,e,r,n,o,s){if(!t)return-2;var a=1;if(-1===e&&(e=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||8!==r||n<8||n>15||e<0||e>9||s<0||s>4)return c(t,-2);8===n&&(n=9);var u=new v;return t.state=u,u.strm=t,u.wrap=a,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=1*u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=e,u.strategy=s,u.method=r,E(t)}n=[new w(0,0,0,0,(function(t,e){var r=65535;for(r>t.pending_buf_size-5&&(r=t.pending_buf_size-5);;){if(t.lookahead<=1){if(_(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+r;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,d(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-262&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(d(t,!1),t.strm.avail_out),1)})),new w(4,4,8,4,b),new w(4,5,16,8,b),new w(4,6,32,32,b),new w(4,4,16,16,y),new w(8,16,32,32,y),new w(8,16,128,128,y),new w(8,32,128,256,y),new w(32,128,258,1024,y),new w(32,258,258,4096,y)],e.deflateInit=function(t,e){return S(t,e,8,15,8,0)},e.deflateInit2=S,e.deflateReset=E,e.deflateResetKeep=A,e.deflateSetHeader=function(t,e){return t&&t.state?2!==t.state.wrap?-2:(t.state.gzhead=e,0):-2},e.deflate=function(t,e){var r,i,s,u;if(!t||!t.state||e>5||e<0)return t?c(t,-2):-2;if(i=t.state,!t.output||!t.input&&0!==t.avail_in||666===i.status&&4!==e)return c(t,0===t.avail_out?-5:-2);if(i.strm=t,r=i.last_flush,i.last_flush=e,42===i.status)if(2===i.wrap)t.adler=0,p(i,31),p(i,139),p(i,8),i.gzhead?(p(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),p(i,255&i.gzhead.time),p(i,i.gzhead.time>>8&255),p(i,i.gzhead.time>>16&255),p(i,i.gzhead.time>>24&255),p(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),p(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(p(i,255&i.gzhead.extra.length),p(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(t.adler=a(t.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(p(i,0),p(i,0),p(i,0),p(i,0),p(i,0),p(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),p(i,3),i.status=113);else{var g=8+(i.w_bits-8<<4)<<8;g|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(g|=32),g+=31-g%31,i.status=113,m(i,g),0!==i.strstart&&(m(i,t.adler>>>16),m(i,65535&t.adler)),t.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),f(t),s=i.pending,i.pending!==i.pending_buf_size));)p(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),f(t),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,p(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),f(t),s=i.pending,i.pending===i.pending_buf_size)){u=1;break}u=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,p(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>s&&(t.adler=a(t.adler,i.pending_buf,i.pending-s,s)),0===u&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&f(t),i.pending+2<=i.pending_buf_size&&(p(i,255&t.adler),p(i,t.adler>>8&255),t.adler=0,i.status=113)):i.status=113),0!==i.pending){if(f(t),0===t.avail_out)return i.last_flush=-1,0}else if(0===t.avail_in&&l(e)<=l(r)&&4!==e)return c(t,-5);if(666===i.status&&0!==t.avail_in)return c(t,-5);if(0!==t.avail_in||0!==i.lookahead||0!==e&&666!==i.status){var b=2===i.strategy?function(t,e){for(var r;;){if(0===t.lookahead&&(_(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,r&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}(i,e):3===i.strategy?function(t,e){for(var r,n,i,s,a=t.window;;){if(t.lookahead<=258){if(_(t),t.lookahead<=258&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=a[i=t.strstart-1])===a[++i]&&n===a[++i]&&n===a[++i]){s=t.strstart+258;do{}while(n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&n===a[++i]&&i<s);t.match_length=258-(s-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(r=o._tr_tally(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(r=o._tr_tally(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),r&&(d(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(d(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(d(t,!1),0===t.strm.avail_out)?1:2}(i,e):n[i.level].func(i,e);if(3!==b&&4!==b||(i.status=666),1===b||3===b)return 0===t.avail_out&&(i.last_flush=-1),0;if(2===b&&(1===e?o._tr_align(i):5!==e&&(o._tr_stored_block(i,0,0,!1),3===e&&(h(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),f(t),0===t.avail_out))return i.last_flush=-1,0}return 4!==e?0:i.wrap<=0?1:(2===i.wrap?(p(i,255&t.adler),p(i,t.adler>>8&255),p(i,t.adler>>16&255),p(i,t.adler>>24&255),p(i,255&t.total_in),p(i,t.total_in>>8&255),p(i,t.total_in>>16&255),p(i,t.total_in>>24&255)):(m(i,t.adler>>>16),m(i,65535&t.adler)),f(t),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},e.deflateEnd=function(t){var e;return t&&t.state?42!==(e=t.state.status)&&69!==e&&73!==e&&91!==e&&103!==e&&113!==e&&666!==e?c(t,-2):(t.state=null,113===e?c(t,-3):0):-2},e.deflateSetDictionary=function(t,e){var r,n,o,a,u,c,l,f,d=e.length;if(!t||!t.state)return-2;if(2===(a=(r=t.state).wrap)||1===a&&42!==r.status||r.lookahead)return-2;for(1===a&&(t.adler=s(t.adler,e,d,0)),r.wrap=0,d>=r.w_size&&(0===a&&(h(r.head),r.strstart=0,r.block_start=0,r.insert=0),f=new i.Buf8(r.w_size),i.arraySet(f,e,d-r.w_size,r.w_size,0),e=f,d=r.w_size),u=t.avail_in,c=t.next_in,l=t.input,t.avail_in=d,t.next_in=0,t.input=e,_(r);r.lookahead>=3;){n=r.strstart,o=r.lookahead-2;do{r.ins_h=(r.ins_h<<r.hash_shift^r.window[n+3-1])&r.hash_mask,r.prev[n&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=n,n++}while(--o);r.strstart=n,r.lookahead=2,_(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,t.next_in=c,t.input=l,t.avail_in=u,r.wrap=a,0},e.deflateInfo="pako deflate (from Nodeca project)"},function(t,e,r){"use strict";var n=r(50);function i(t){for(var e=t.length;--e>=0;)t[e]=0}var o=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],s=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],u=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c=new Array(576);i(c);var l=new Array(60);i(l);var h=new Array(512);i(h);var f=new Array(256);i(f);var d=new Array(29);i(d);var p,m,g,_=new Array(30);function b(t,e,r,n,i){this.static_tree=t,this.extra_bits=e,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=t&&t.length}function y(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}function w(t){return t<256?h[t]:h[256+(t>>>7)]}function v(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255}function A(t,e,r){t.bi_valid>16-r?(t.bi_buf|=e<<t.bi_valid&65535,v(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=r-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=r)}function E(t,e,r){A(t,r[2*e],r[2*e+1])}function S(t,e){var r=0;do{r|=1&t,t>>>=1,r<<=1}while(--e>0);return r>>>1}function B(t,e,r){var n,i,o=new Array(16),s=0;for(n=1;n<=15;n++)o[n]=s=s+r[n-1]<<1;for(i=0;i<=e;i++){var a=t[2*i+1];0!==a&&(t[2*i]=S(o[a]++,a))}}function C(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0}function T(t){t.bi_valid>8?v(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0}function R(t,e,r,n){var i=2*e,o=2*r;return t[i]<t[o]||t[i]===t[o]&&n[e]<=n[r]}function O(t,e,r){for(var n=t.heap[r],i=r<<1;i<=t.heap_len&&(i<t.heap_len&&R(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!R(e,n,t.heap[i],t.depth));)t.heap[r]=t.heap[i],r=i,i<<=1;t.heap[r]=n}function I(t,e,r){var n,i,a,u,c=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*c]<<8|t.pending_buf[t.d_buf+2*c+1],i=t.pending_buf[t.l_buf+c],c++,0===n?E(t,i,e):(E(t,(a=f[i])+256+1,e),0!==(u=o[a])&&A(t,i-=d[a],u),E(t,a=w(--n),r),0!==(u=s[a])&&A(t,n-=_[a],u))}while(c<t.last_lit);E(t,256,e)}function M(t,e){var r,n,i,o=e.dyn_tree,s=e.stat_desc.static_tree,a=e.stat_desc.has_stree,u=e.stat_desc.elems,c=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<u;r++)0!==o[2*r]?(t.heap[++t.heap_len]=c=r,t.depth[r]=0):o[2*r+1]=0;for(;t.heap_len<2;)o[2*(i=t.heap[++t.heap_len]=c<2?++c:0)]=1,t.depth[i]=0,t.opt_len--,a&&(t.static_len-=s[2*i+1]);for(e.max_code=c,r=t.heap_len>>1;r>=1;r--)O(t,o,r);i=u;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],O(t,o,1),n=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=n,o[2*i]=o[2*r]+o[2*n],t.depth[i]=(t.depth[r]>=t.depth[n]?t.depth[r]:t.depth[n])+1,o[2*r+1]=o[2*n+1]=i,t.heap[1]=i++,O(t,o,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var r,n,i,o,s,a,u=e.dyn_tree,c=e.max_code,l=e.stat_desc.static_tree,h=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,d=e.stat_desc.extra_base,p=e.stat_desc.max_length,m=0;for(o=0;o<=15;o++)t.bl_count[o]=0;for(u[2*t.heap[t.heap_max]+1]=0,r=t.heap_max+1;r<573;r++)(o=u[2*u[2*(n=t.heap[r])+1]+1]+1)>p&&(o=p,m++),u[2*n+1]=o,n>c||(t.bl_count[o]++,s=0,n>=d&&(s=f[n-d]),a=u[2*n],t.opt_len+=a*(o+s),h&&(t.static_len+=a*(l[2*n+1]+s)));if(0!==m){do{for(o=p-1;0===t.bl_count[o];)o--;t.bl_count[o]--,t.bl_count[o+1]+=2,t.bl_count[p]--,m-=2}while(m>0);for(o=p;0!==o;o--)for(n=t.bl_count[o];0!==n;)(i=t.heap[--r])>c||(u[2*i+1]!==o&&(t.opt_len+=(o-u[2*i+1])*u[2*i],u[2*i+1]=o),n--)}}(t,e),B(o,c,t.bl_count)}function x(t,e,r){var n,i,o=-1,s=e[1],a=0,u=7,c=4;for(0===s&&(u=138,c=3),e[2*(r+1)+1]=65535,n=0;n<=r;n++)i=s,s=e[2*(n+1)+1],++a<u&&i===s||(a<c?t.bl_tree[2*i]+=a:0!==i?(i!==o&&t.bl_tree[2*i]++,t.bl_tree[32]++):a<=10?t.bl_tree[34]++:t.bl_tree[36]++,a=0,o=i,0===s?(u=138,c=3):i===s?(u=6,c=3):(u=7,c=4))}function D(t,e,r){var n,i,o=-1,s=e[1],a=0,u=7,c=4;for(0===s&&(u=138,c=3),n=0;n<=r;n++)if(i=s,s=e[2*(n+1)+1],!(++a<u&&i===s)){if(a<c)do{E(t,i,t.bl_tree)}while(0!=--a);else 0!==i?(i!==o&&(E(t,i,t.bl_tree),a--),E(t,16,t.bl_tree),A(t,a-3,2)):a<=10?(E(t,17,t.bl_tree),A(t,a-3,3)):(E(t,18,t.bl_tree),A(t,a-11,7));a=0,o=i,0===s?(u=138,c=3):i===s?(u=6,c=3):(u=7,c=4)}}i(_);var k=!1;function P(t,e,r,i){A(t,0+(i?1:0),3),function(t,e,r,i){T(t),i&&(v(t,r),v(t,~r)),n.arraySet(t.pending_buf,t.window,e,r,t.pending),t.pending+=r}(t,e,r,!0)}e._tr_init=function(t){k||(!function(){var t,e,r,n,i,u=new Array(16);for(r=0,n=0;n<28;n++)for(d[n]=r,t=0;t<1<<o[n];t++)f[r++]=n;for(f[r-1]=n,i=0,n=0;n<16;n++)for(_[n]=i,t=0;t<1<<s[n];t++)h[i++]=n;for(i>>=7;n<30;n++)for(_[n]=i<<7,t=0;t<1<<s[n]-7;t++)h[256+i++]=n;for(e=0;e<=15;e++)u[e]=0;for(t=0;t<=143;)c[2*t+1]=8,t++,u[8]++;for(;t<=255;)c[2*t+1]=9,t++,u[9]++;for(;t<=279;)c[2*t+1]=7,t++,u[7]++;for(;t<=287;)c[2*t+1]=8,t++,u[8]++;for(B(c,287,u),t=0;t<30;t++)l[2*t+1]=5,l[2*t]=S(t,5);p=new b(c,o,257,286,15),m=new b(l,s,0,30,15),g=new b(new Array(0),a,0,19,7)}(),k=!0),t.l_desc=new y(t.dyn_ltree,p),t.d_desc=new y(t.dyn_dtree,m),t.bl_desc=new y(t.bl_tree,g),t.bi_buf=0,t.bi_valid=0,C(t)},e._tr_stored_block=P,e._tr_flush_block=function(t,e,r,n){var i,o,s=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,r=4093624447;for(e=0;e<=31;e++,r>>>=1)if(1&r&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),M(t,t.l_desc),M(t,t.d_desc),s=function(t){var e;for(x(t,t.dyn_ltree,t.l_desc.max_code),x(t,t.dyn_dtree,t.d_desc.max_code),M(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*u[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(o=t.static_len+3+7>>>3)<=i&&(i=o)):i=o=r+5,r+4<=i&&-1!==e?P(t,e,r,n):4===t.strategy||o===i?(A(t,2+(n?1:0),3),I(t,c,l)):(A(t,4+(n?1:0),3),function(t,e,r,n){var i;for(A(t,e-257,5),A(t,r-1,5),A(t,n-4,4),i=0;i<n;i++)A(t,t.bl_tree[2*u[i]+1],3);D(t,t.dyn_ltree,e-1),D(t,t.dyn_dtree,r-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,s+1),I(t,t.dyn_ltree,t.dyn_dtree)),C(t),n&&T(t)},e._tr_tally=function(t,e,r){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&r,t.last_lit++,0===e?t.dyn_ltree[2*r]++:(t.matches++,e--,t.dyn_ltree[2*(f[r]+256+1)]++,t.dyn_dtree[2*w(e)]++),t.last_lit===t.lit_bufsize-1},e._tr_align=function(t){A(t,2,3),E(t,256,c),function(t){16===t.bi_valid?(v(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},function(t,e,r){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},function(t,e,r){"use strict";var n=r(50),i=r(86),o=r(87),s=r(172),a=r(173);function u(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function l(t){var e;return t&&t.state?(e=t.state,t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=1,e.last=0,e.havedict=0,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new n.Buf32(852),e.distcode=e.distdyn=new n.Buf32(592),e.sane=1,e.back=-1,0):-2}function h(t){var e;return t&&t.state?((e=t.state).wsize=0,e.whave=0,e.wnext=0,l(t)):-2}function f(t,e){var r,n;return t&&t.state?(n=t.state,e<0?(r=0,e=-e):(r=1+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?-2:(null!==n.window&&n.wbits!==e&&(n.window=null),n.wrap=r,n.wbits=e,h(t))):-2}function d(t,e){var r,n;return t?(n=new c,t.state=n,n.window=null,0!==(r=f(t,e))&&(t.state=null),r):-2}var p,m,g=!0;function _(t){if(g){var e;for(p=new n.Buf32(512),m=new n.Buf32(32),e=0;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(a(1,t.lens,0,288,p,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;a(2,t.lens,0,32,m,0,t.work,{bits:5}),g=!1}t.lencode=p,t.lenbits=9,t.distcode=m,t.distbits=5}function b(t,e,r,i){var o,s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new n.Buf8(s.wsize)),i>=s.wsize?(n.arraySet(s.window,e,r-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):((o=s.wsize-s.wnext)>i&&(o=i),n.arraySet(s.window,e,r-i,o,s.wnext),(i-=o)?(n.arraySet(s.window,e,r-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=o))),0}e.inflateReset=h,e.inflateReset2=f,e.inflateResetKeep=l,e.inflateInit=function(t){return d(t,15)},e.inflateInit2=d,e.inflate=function(t,e){var r,c,l,h,f,d,p,m,g,y,w,v,A,E,S,B,C,T,R,O,I,M,x,D,k=0,P=new n.Buf8(4),L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!t||!t.state||!t.output||!t.input&&0!==t.avail_in)return-2;12===(r=t.state).mode&&(r.mode=13),f=t.next_out,l=t.output,p=t.avail_out,h=t.next_in,c=t.input,d=t.avail_in,m=r.hold,g=r.bits,y=d,w=p,M=0;t:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;g<16;){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}if(2&r.wrap&&35615===m){r.check=0,P[0]=255&m,P[1]=m>>>8&255,r.check=o(r.check,P,2,0),m=0,g=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&m)<<8)+(m>>8))%31){t.msg="incorrect header check",r.mode=30;break}if(8!=(15&m)){t.msg="unknown compression method",r.mode=30;break}if(g-=4,I=8+(15&(m>>>=4)),0===r.wbits)r.wbits=I;else if(I>r.wbits){t.msg="invalid window size",r.mode=30;break}r.dmax=1<<I,t.adler=r.check=1,r.mode=512&m?10:12,m=0,g=0;break;case 2:for(;g<16;){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}if(r.flags=m,8!=(255&r.flags)){t.msg="unknown compression method",r.mode=30;break}if(57344&r.flags){t.msg="unknown header flags set",r.mode=30;break}r.head&&(r.head.text=m>>8&1),512&r.flags&&(P[0]=255&m,P[1]=m>>>8&255,r.check=o(r.check,P,2,0)),m=0,g=0,r.mode=3;case 3:for(;g<32;){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}r.head&&(r.head.time=m),512&r.flags&&(P[0]=255&m,P[1]=m>>>8&255,P[2]=m>>>16&255,P[3]=m>>>24&255,r.check=o(r.check,P,4,0)),m=0,g=0,r.mode=4;case 4:for(;g<16;){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}r.head&&(r.head.xflags=255&m,r.head.os=m>>8),512&r.flags&&(P[0]=255&m,P[1]=m>>>8&255,r.check=o(r.check,P,2,0)),m=0,g=0,r.mode=5;case 5:if(1024&r.flags){for(;g<16;){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}r.length=m,r.head&&(r.head.extra_len=m),512&r.flags&&(P[0]=255&m,P[1]=m>>>8&255,r.check=o(r.check,P,2,0)),m=0,g=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((v=r.length)>d&&(v=d),v&&(r.head&&(I=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,c,h,v,I)),512&r.flags&&(r.check=o(r.check,c,v,h)),d-=v,h+=v,r.length-=v),r.length))break t;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===d)break t;v=0;do{I=c[h+v++],r.head&&I&&r.length<65536&&(r.head.name+=String.fromCharCode(I))}while(I&&v<d);if(512&r.flags&&(r.check=o(r.check,c,v,h)),d-=v,h+=v,I)break t}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===d)break t;v=0;do{I=c[h+v++],r.head&&I&&r.length<65536&&(r.head.comment+=String.fromCharCode(I))}while(I&&v<d);if(512&r.flags&&(r.check=o(r.check,c,v,h)),d-=v,h+=v,I)break t}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;g<16;){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}if(m!==(65535&r.check)){t.msg="header crc mismatch",r.mode=30;break}m=0,g=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),t.adler=r.check=0,r.mode=12;break;case 10:for(;g<32;){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}t.adler=r.check=u(m),m=0,g=0,r.mode=11;case 11:if(0===r.havedict)return t.next_out=f,t.avail_out=p,t.next_in=h,t.avail_in=d,r.hold=m,r.bits=g,2;t.adler=r.check=1,r.mode=12;case 12:if(5===e||6===e)break t;case 13:if(r.last){m>>>=7&g,g-=7&g,r.mode=27;break}for(;g<3;){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}switch(r.last=1&m,g-=1,3&(m>>>=1)){case 0:r.mode=14;break;case 1:if(_(r),r.mode=20,6===e){m>>>=2,g-=2;break t}break;case 2:r.mode=17;break;case 3:t.msg="invalid block type",r.mode=30}m>>>=2,g-=2;break;case 14:for(m>>>=7&g,g-=7&g;g<32;){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}if((65535&m)!=(m>>>16^65535)){t.msg="invalid stored block lengths",r.mode=30;break}if(r.length=65535&m,m=0,g=0,r.mode=15,6===e)break t;case 15:r.mode=16;case 16:if(v=r.length){if(v>d&&(v=d),v>p&&(v=p),0===v)break t;n.arraySet(l,c,h,v,f),d-=v,h+=v,p-=v,f+=v,r.length-=v;break}r.mode=12;break;case 17:for(;g<14;){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}if(r.nlen=257+(31&m),m>>>=5,g-=5,r.ndist=1+(31&m),m>>>=5,g-=5,r.ncode=4+(15&m),m>>>=4,g-=4,r.nlen>286||r.ndist>30){t.msg="too many length or distance symbols",r.mode=30;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;g<3;){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}r.lens[L[r.have++]]=7&m,m>>>=3,g-=3}for(;r.have<19;)r.lens[L[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,x={bits:r.lenbits},M=a(0,r.lens,0,19,r.lencode,0,r.work,x),r.lenbits=x.bits,M){t.msg="invalid code lengths set",r.mode=30;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;B=(k=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,C=65535&k,!((S=k>>>24)<=g);){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}if(C<16)m>>>=S,g-=S,r.lens[r.have++]=C;else{if(16===C){for(D=S+2;g<D;){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}if(m>>>=S,g-=S,0===r.have){t.msg="invalid bit length repeat",r.mode=30;break}I=r.lens[r.have-1],v=3+(3&m),m>>>=2,g-=2}else if(17===C){for(D=S+3;g<D;){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}g-=S,I=0,v=3+(7&(m>>>=S)),m>>>=3,g-=3}else{for(D=S+7;g<D;){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}g-=S,I=0,v=11+(127&(m>>>=S)),m>>>=7,g-=7}if(r.have+v>r.nlen+r.ndist){t.msg="invalid bit length repeat",r.mode=30;break}for(;v--;)r.lens[r.have++]=I}}if(30===r.mode)break;if(0===r.lens[256]){t.msg="invalid code -- missing end-of-block",r.mode=30;break}if(r.lenbits=9,x={bits:r.lenbits},M=a(1,r.lens,0,r.nlen,r.lencode,0,r.work,x),r.lenbits=x.bits,M){t.msg="invalid literal/lengths set",r.mode=30;break}if(r.distbits=6,r.distcode=r.distdyn,x={bits:r.distbits},M=a(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,x),r.distbits=x.bits,M){t.msg="invalid distances set",r.mode=30;break}if(r.mode=20,6===e)break t;case 20:r.mode=21;case 21:if(d>=6&&p>=258){t.next_out=f,t.avail_out=p,t.next_in=h,t.avail_in=d,r.hold=m,r.bits=g,s(t,w),f=t.next_out,l=t.output,p=t.avail_out,h=t.next_in,c=t.input,d=t.avail_in,m=r.hold,g=r.bits,12===r.mode&&(r.back=-1);break}for(r.back=0;B=(k=r.lencode[m&(1<<r.lenbits)-1])>>>16&255,C=65535&k,!((S=k>>>24)<=g);){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}if(B&&0==(240&B)){for(T=S,R=B,O=C;B=(k=r.lencode[O+((m&(1<<T+R)-1)>>T)])>>>16&255,C=65535&k,!(T+(S=k>>>24)<=g);){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}m>>>=T,g-=T,r.back+=T}if(m>>>=S,g-=S,r.back+=S,r.length=C,0===B){r.mode=26;break}if(32&B){r.back=-1,r.mode=12;break}if(64&B){t.msg="invalid literal/length code",r.mode=30;break}r.extra=15&B,r.mode=22;case 22:if(r.extra){for(D=r.extra;g<D;){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}r.length+=m&(1<<r.extra)-1,m>>>=r.extra,g-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;B=(k=r.distcode[m&(1<<r.distbits)-1])>>>16&255,C=65535&k,!((S=k>>>24)<=g);){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}if(0==(240&B)){for(T=S,R=B,O=C;B=(k=r.distcode[O+((m&(1<<T+R)-1)>>T)])>>>16&255,C=65535&k,!(T+(S=k>>>24)<=g);){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}m>>>=T,g-=T,r.back+=T}if(m>>>=S,g-=S,r.back+=S,64&B){t.msg="invalid distance code",r.mode=30;break}r.offset=C,r.extra=15&B,r.mode=24;case 24:if(r.extra){for(D=r.extra;g<D;){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}r.offset+=m&(1<<r.extra)-1,m>>>=r.extra,g-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){t.msg="invalid distance too far back",r.mode=30;break}r.mode=25;case 25:if(0===p)break t;if(v=w-p,r.offset>v){if((v=r.offset-v)>r.whave&&r.sane){t.msg="invalid distance too far back",r.mode=30;break}v>r.wnext?(v-=r.wnext,A=r.wsize-v):A=r.wnext-v,v>r.length&&(v=r.length),E=r.window}else E=l,A=f-r.offset,v=r.length;v>p&&(v=p),p-=v,r.length-=v;do{l[f++]=E[A++]}while(--v);0===r.length&&(r.mode=21);break;case 26:if(0===p)break t;l[f++]=r.length,p--,r.mode=21;break;case 27:if(r.wrap){for(;g<32;){if(0===d)break t;d--,m|=c[h++]<<g,g+=8}if(w-=p,t.total_out+=w,r.total+=w,w&&(t.adler=r.check=r.flags?o(r.check,l,w,f-w):i(r.check,l,w,f-w)),w=p,(r.flags?m:u(m))!==r.check){t.msg="incorrect data check",r.mode=30;break}m=0,g=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;g<32;){if(0===d)break t;d--,m+=c[h++]<<g,g+=8}if(m!==(4294967295&r.total)){t.msg="incorrect length check",r.mode=30;break}m=0,g=0}r.mode=29;case 29:M=1;break t;case 30:M=-3;break t;case 31:return-4;case 32:default:return-2}return t.next_out=f,t.avail_out=p,t.next_in=h,t.avail_in=d,r.hold=m,r.bits=g,(r.wsize||w!==t.avail_out&&r.mode<30&&(r.mode<27||4!==e))&&b(t,t.output,t.next_out,w-t.avail_out)?(r.mode=31,-4):(y-=t.avail_in,w-=t.avail_out,t.total_in+=y,t.total_out+=w,r.total+=w,r.wrap&&w&&(t.adler=r.check=r.flags?o(r.check,l,w,t.next_out-w):i(r.check,l,w,t.next_out-w)),t.data_type=r.bits+(r.last?64:0)+(12===r.mode?128:0)+(20===r.mode||15===r.mode?256:0),(0===y&&0===w||4===e)&&0===M&&(M=-5),M)},e.inflateEnd=function(t){if(!t||!t.state)return-2;var e=t.state;return e.window&&(e.window=null),t.state=null,0},e.inflateGetHeader=function(t,e){var r;return t&&t.state?0==(2&(r=t.state).wrap)?-2:(r.head=e,e.done=!1,0):-2},e.inflateSetDictionary=function(t,e){var r,n=e.length;return t&&t.state?0!==(r=t.state).wrap&&11!==r.mode?-2:11===r.mode&&i(1,e,n,0)!==r.check?-3:b(t,e,n,n)?(r.mode=31,-4):(r.havedict=1,0):-2},e.inflateInfo="pako inflate (from Nodeca project)"},function(t,e,r){"use strict";t.exports=function(t,e){var r,n,i,o,s,a,u,c,l,h,f,d,p,m,g,_,b,y,w,v,A,E,S,B,C;r=t.state,n=t.next_in,B=t.input,i=n+(t.avail_in-5),o=t.next_out,C=t.output,s=o-(e-t.avail_out),a=o+(t.avail_out-257),u=r.dmax,c=r.wsize,l=r.whave,h=r.wnext,f=r.window,d=r.hold,p=r.bits,m=r.lencode,g=r.distcode,_=(1<<r.lenbits)-1,b=(1<<r.distbits)-1;t:do{p<15&&(d+=B[n++]<<p,p+=8,d+=B[n++]<<p,p+=8),y=m[d&_];e:for(;;){if(d>>>=w=y>>>24,p-=w,0===(w=y>>>16&255))C[o++]=65535&y;else{if(!(16&w)){if(0==(64&w)){y=m[(65535&y)+(d&(1<<w)-1)];continue e}if(32&w){r.mode=12;break t}t.msg="invalid literal/length code",r.mode=30;break t}v=65535&y,(w&=15)&&(p<w&&(d+=B[n++]<<p,p+=8),v+=d&(1<<w)-1,d>>>=w,p-=w),p<15&&(d+=B[n++]<<p,p+=8,d+=B[n++]<<p,p+=8),y=g[d&b];r:for(;;){if(d>>>=w=y>>>24,p-=w,!(16&(w=y>>>16&255))){if(0==(64&w)){y=g[(65535&y)+(d&(1<<w)-1)];continue r}t.msg="invalid distance code",r.mode=30;break t}if(A=65535&y,p<(w&=15)&&(d+=B[n++]<<p,(p+=8)<w&&(d+=B[n++]<<p,p+=8)),(A+=d&(1<<w)-1)>u){t.msg="invalid distance too far back",r.mode=30;break t}if(d>>>=w,p-=w,A>(w=o-s)){if((w=A-w)>l&&r.sane){t.msg="invalid distance too far back",r.mode=30;break t}if(E=0,S=f,0===h){if(E+=c-w,w<v){v-=w;do{C[o++]=f[E++]}while(--w);E=o-A,S=C}}else if(h<w){if(E+=c+h-w,(w-=h)<v){v-=w;do{C[o++]=f[E++]}while(--w);if(E=0,h<v){v-=w=h;do{C[o++]=f[E++]}while(--w);E=o-A,S=C}}}else if(E+=h-w,w<v){v-=w;do{C[o++]=f[E++]}while(--w);E=o-A,S=C}for(;v>2;)C[o++]=S[E++],C[o++]=S[E++],C[o++]=S[E++],v-=3;v&&(C[o++]=S[E++],v>1&&(C[o++]=S[E++]))}else{E=o-A;do{C[o++]=C[E++],C[o++]=C[E++],C[o++]=C[E++],v-=3}while(v>2);v&&(C[o++]=C[E++],v>1&&(C[o++]=C[E++]))}break}}break}}while(n<i&&o<a);n-=v=p>>3,d&=(1<<(p-=v<<3))-1,t.next_in=n,t.next_out=o,t.avail_in=n<i?i-n+5:5-(n-i),t.avail_out=o<a?a-o+257:257-(o-a),r.hold=d,r.bits=p}},function(t,e,r){"use strict";var n=r(50),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],s=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],a=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(t,e,r,u,c,l,h,f){var d,p,m,g,_,b,y,w,v,A=f.bits,E=0,S=0,B=0,C=0,T=0,R=0,O=0,I=0,M=0,x=0,D=null,k=0,P=new n.Buf16(16),L=new n.Buf16(16),F=null,N=0;for(E=0;E<=15;E++)P[E]=0;for(S=0;S<u;S++)P[e[r+S]]++;for(T=A,C=15;C>=1&&0===P[C];C--);if(T>C&&(T=C),0===C)return c[l++]=20971520,c[l++]=20971520,f.bits=1,0;for(B=1;B<C&&0===P[B];B++);for(T<B&&(T=B),I=1,E=1;E<=15;E++)if(I<<=1,(I-=P[E])<0)return-1;if(I>0&&(0===t||1!==C))return-1;for(L[1]=0,E=1;E<15;E++)L[E+1]=L[E]+P[E];for(S=0;S<u;S++)0!==e[r+S]&&(h[L[e[r+S]]++]=S);if(0===t?(D=F=h,b=19):1===t?(D=i,k-=257,F=o,N-=257,b=256):(D=s,F=a,b=-1),x=0,S=0,E=B,_=l,R=T,O=0,m=-1,g=(M=1<<T)-1,1===t&&M>852||2===t&&M>592)return 1;for(;;){y=E-O,h[S]<b?(w=0,v=h[S]):h[S]>b?(w=F[N+h[S]],v=D[k+h[S]]):(w=96,v=0),d=1<<E-O,B=p=1<<R;do{c[_+(x>>O)+(p-=d)]=y<<24|w<<16|v|0}while(0!==p);for(d=1<<E-1;x&d;)d>>=1;if(0!==d?(x&=d-1,x+=d):x=0,S++,0==--P[E]){if(E===C)break;E=e[r+h[S]]}if(E>T&&(x&g)!==m){for(0===O&&(O=T),_+=B,I=1<<(R=E-O);R+O<C&&!((I-=P[R+O])<=0);)R++,I<<=1;if(M+=1<<R,1===t&&M>852||2===t&&M>592)return 1;c[m=x&g]=T<<24|R<<16|_-l|0}}return 0!==x&&(c[_+x]=E-O<<24|64<<16|0),f.bits=T,0}},function(t,e,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},function(t,e,r){(function(e,n){
|
|
46
|
-
/**
|
|
47
|
-
* Archiver Core
|
|
48
|
-
*
|
|
49
|
-
* @ignore
|
|
50
|
-
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
51
|
-
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
52
|
-
*/
|
|
53
|
-
var i=r(1),o=r(176),s=r(180),a=r(1),u=r(35),c=r(12).inherits,l=r(194),h=r(95).Transform,f="win32"===e.platform,d=function(t,e){if(!(this instanceof d))return new d(t,e);"string"!=typeof t&&(e=t,t="zip"),e=this.options=u.defaults(e,{highWaterMark:1048576,statConcurrency:4}),h.call(this,e),this._format=!1,this._module=!1,this._pending=0,this._pointer=0,this._entriesCount=0,this._entriesProcessedCount=0,this._fsEntriesTotalBytes=0,this._fsEntriesProcessedBytes=0,this._queue=s.queue(this._onQueueTask.bind(this),1),this._queue.drain(this._onQueueDrain.bind(this)),this._statQueue=s.queue(this._onStatQueueTask.bind(this),e.statConcurrency),this._statQueue.drain(this._onQueueDrain.bind(this)),this._state={aborted:!1,finalize:!1,finalizing:!1,finalized:!1,modulePiped:!1},this._streams=[]};c(d,h),d.prototype._abort=function(){this._state.aborted=!0,this._queue.kill(),this._statQueue.kill(),this._queue.idle()&&this._shutdown()},d.prototype._append=function(t,e){var r={source:null,filepath:t};(e=e||{}).name||(e.name=t),e.sourcePath=t,r.data=e,this._entriesCount++,e.stats&&e.stats instanceof i.Stats?(r=this._updateQueueTaskWithStats(r,e.stats))&&(e.stats.size&&(this._fsEntriesTotalBytes+=e.stats.size),this._queue.push(r)):this._statQueue.push(r)},d.prototype._finalize=function(){this._state.finalizing||this._state.finalized||this._state.aborted||(this._state.finalizing=!0,this._moduleFinalize(),this._state.finalizing=!1,this._state.finalized=!0)},d.prototype._maybeFinalize=function(){return!(this._state.finalizing||this._state.finalized||this._state.aborted)&&(!!(this._state.finalize&&0===this._pending&&this._queue.idle()&&this._statQueue.idle())&&(this._finalize(),!0))},d.prototype._moduleAppend=function(t,e,r){this._state.aborted?r():this._module.append(t,e,function(t){if(this._task=null,this._state.aborted)this._shutdown();else{if(t)return this.emit("error",t),void n(r);this.emit("entry",e),this._entriesProcessedCount++,e.stats&&e.stats.size&&(this._fsEntriesProcessedBytes+=e.stats.size),this.emit("progress",{entries:{total:this._entriesCount,processed:this._entriesProcessedCount},fs:{totalBytes:this._fsEntriesTotalBytes,processedBytes:this._fsEntriesProcessedBytes}}),n(r)}}.bind(this))},d.prototype._moduleFinalize=function(){"function"==typeof this._module.finalize?this._module.finalize():"function"==typeof this._module.end?this._module.end():this.emit("error",new l("NOENDMETHOD"))},d.prototype._modulePipe=function(){this._module.on("error",this._onModuleError.bind(this)),this._module.pipe(this),this._state.modulePiped=!0},d.prototype._moduleSupports=function(t){return!(!this._module.supports||!this._module.supports[t])&&this._module.supports[t]},d.prototype._moduleUnpipe=function(){this._module.unpipe(this),this._state.modulePiped=!1},d.prototype._normalizeEntryData=function(t,e){t=u.defaults(t,{type:"file",name:null,date:null,mode:null,prefix:null,sourcePath:null,stats:!1}),e&&!1===t.stats&&(t.stats=e);var r="directory"===t.type;return t.name&&("string"==typeof t.prefix&&""!==t.prefix&&(t.name=t.prefix+"/"+t.name,t.prefix=null),t.name=u.sanitizePath(t.name),"symlink"!==t.type&&"/"===t.name.slice(-1)?(r=!0,t.type="directory"):r&&(t.name+="/")),"number"==typeof t.mode?t.mode&=f?511:4095:t.stats&&null===t.mode?(t.mode=f?511&t.stats.mode:4095&t.stats.mode,f&&r&&(t.mode=493)):null===t.mode&&(t.mode=r?493:420),t.stats&&null===t.date?t.date=t.stats.mtime:t.date=u.dateify(t.date),t},d.prototype._onModuleError=function(t){this.emit("error",t)},d.prototype._onQueueDrain=function(){this._state.finalizing||this._state.finalized||this._state.aborted||this._state.finalize&&0===this._pending&&this._queue.idle()&&this._statQueue.idle()&&this._finalize()},d.prototype._onQueueTask=function(t,e){var r=()=>{t.data.callback&&t.data.callback(),e()};this._state.finalizing||this._state.finalized||this._state.aborted?r():(this._task=t,this._moduleAppend(t.source,t.data,r))},d.prototype._onStatQueueTask=function(t,e){this._state.finalizing||this._state.finalized||this._state.aborted?e():i.lstat(t.filepath,function(r,i){if(this._state.aborted)n(e);else{if(r)return this._entriesCount--,this.emit("warning",r),void n(e);(t=this._updateQueueTaskWithStats(t,i))&&(i.size&&(this._fsEntriesTotalBytes+=i.size),this._queue.push(t)),n(e)}}.bind(this))},d.prototype._shutdown=function(){this._moduleUnpipe(),this.end()},d.prototype._transform=function(t,e,r){t&&(this._pointer+=t.length),r(null,t)},d.prototype._updateQueueTaskWithStats=function(t,e){if(e.isFile())t.data.type="file",t.data.sourceType="stream",t.source=u.lazyReadStream(t.filepath);else if(e.isDirectory()&&this._moduleSupports("directory"))t.data.name=u.trailingSlashIt(t.data.name),t.data.type="directory",t.data.sourcePath=u.trailingSlashIt(t.filepath),t.data.sourceType="buffer",t.source=Buffer.concat([]);else{if(!e.isSymbolicLink()||!this._moduleSupports("symlink"))return e.isDirectory()?this.emit("warning",new l("DIRECTORYNOTSUPPORTED",t.data)):e.isSymbolicLink()?this.emit("warning",new l("SYMLINKNOTSUPPORTED",t.data)):this.emit("warning",new l("ENTRYNOTSUPPORTED",t.data)),null;var r=i.readlinkSync(t.filepath),n=a.dirname(t.filepath);t.data.type="symlink",t.data.linkname=a.relative(n,a.resolve(n,r)),t.data.sourceType="buffer",t.source=Buffer.concat([])}return t.data=this._normalizeEntryData(t.data,e),t},d.prototype.abort=function(){return this._state.aborted||this._state.finalized||this._abort(),this},d.prototype.append=function(t,e){if(this._state.finalize||this._state.aborted)return this.emit("error",new l("QUEUECLOSED")),this;if("string"!=typeof(e=this._normalizeEntryData(e)).name||0===e.name.length)return this.emit("error",new l("ENTRYNAMEREQUIRED")),this;if("directory"===e.type&&!this._moduleSupports("directory"))return this.emit("error",new l("DIRECTORYNOTSUPPORTED",{name:e.name})),this;if(t=u.normalizeInputSource(t),Buffer.isBuffer(t))e.sourceType="buffer";else{if(!u.isStream(t))return this.emit("error",new l("INPUTSTEAMBUFFERREQUIRED",{name:e.name})),this;e.sourceType="stream"}return this._entriesCount++,this._queue.push({data:e,source:t}),this},d.prototype.directory=function(t,e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new l("QUEUECLOSED")),this;if("string"!=typeof t||0===t.length)return this.emit("error",new l("DIRECTORYDIRPATHREQUIRED")),this;this._pending++,!1===e?e="":"string"!=typeof e&&(e=t);var n=!1;"function"==typeof r?(n=r,r={}):"object"!=typeof r&&(r={});var i=o(t,{stat:!0,dot:!0});return i.on("error",function(t){this.emit("error",t)}.bind(this)),i.on("match",function(o){i.pause();var s=!1,a=Object.assign({},r);a.name=o.relative,a.prefix=e,a.stats=o.stat,a.callback=i.resume.bind(i);try{if(n)if(!1===(a=n(a)))s=!0;else if("object"!=typeof a)throw new l("DIRECTORYFUNCTIONINVALIDDATA",{dirpath:t})}catch(t){return void this.emit("error",t)}s?i.resume():this._append(o.absolute,a)}.bind(this)),i.on("end",function(){this._pending--,this._maybeFinalize()}.bind(this)),this},d.prototype.file=function(t,e){return this._state.finalize||this._state.aborted?(this.emit("error",new l("QUEUECLOSED")),this):"string"!=typeof t||0===t.length?(this.emit("error",new l("FILEFILEPATHREQUIRED")),this):(this._append(t,e),this)},d.prototype.glob=function(t,e,r){this._pending++,e=u.defaults(e,{stat:!0,pattern:t});var n=o(e.cwd||".",e);return n.on("error",function(t){this.emit("error",t)}.bind(this)),n.on("match",function(t){n.pause();var e=Object.assign({},r);e.callback=n.resume.bind(n),e.stats=t.stat,e.name=t.relative,this._append(t.absolute,e)}.bind(this)),n.on("end",function(){this._pending--,this._maybeFinalize()}.bind(this)),this},d.prototype.finalize=function(){if(this._state.aborted){var t=new l("ABORTED");return this.emit("error",t),Promise.reject(t)}if(this._state.finalize){var e=new l("FINALIZING");return this.emit("error",e),Promise.reject(e)}this._state.finalize=!0,0===this._pending&&this._queue.idle()&&this._statQueue.idle()&&this._finalize();var r=this;return new Promise((function(t,e){var n;r._module.on("end",(function(){n||t()})),r._module.on("error",(function(t){n=!0,e(t)}))}))},d.prototype.setFormat=function(t){return this._format?(this.emit("error",new l("FORMATSET")),this):(this._format=t,this)},d.prototype.setModule=function(t){return this._state.aborted?(this.emit("error",new l("ABORTED")),this):this._state.module?(this.emit("error",new l("MODULESET")),this):(this._module=t,this._modulePipe(),this)},d.prototype.symlink=function(t,e,r){if(this._state.finalize||this._state.aborted)return this.emit("error",new l("QUEUECLOSED")),this;if("string"!=typeof t||0===t.length)return this.emit("error",new l("SYMLINKFILEPATHREQUIRED")),this;if("string"!=typeof e||0===e.length)return this.emit("error",new l("SYMLINKTARGETREQUIRED",{filepath:t})),this;if(!this._moduleSupports("symlink"))return this.emit("error",new l("SYMLINKNOTSUPPORTED",{filepath:t})),this;var n={type:"symlink"};return n.name=t.replace(/\\/g,"/"),n.linkname=e.replace(/\\/g,"/"),n.sourceType="buffer","number"==typeof r&&(n.mode=r),this._entriesCount++,this._queue.push({data:n,source:Buffer.concat([])}),this},d.prototype.pointer=function(){return this._pointer},d.prototype.use=function(t){return this._streams.push(t),this},t.exports=d}).call(this,r(0),r(49).setImmediate)},function(t,e,r){t.exports=l;const n=r(1),{EventEmitter:i}=r(11),{Minimatch:o}=r(51),{resolve:s}=r(1);function a(t,e){return new Promise((r,i)=>{(e?n.stat:n.lstat)(t,(n,i)=>{if(n)switch(n.code){case"ENOENT":r(e?a(t,!1):null);break;default:r(null)}else r(i)})})}async function*u(t,e,r,i,o,s){let c=await function(t,e){return new Promise((r,i)=>{n.readdir(t,{withFileTypes:!0},(t,n)=>{if(t)switch(t.code){case"ENOTDIR":e?i(t):r([]);break;case"ENOTSUP":case"ENOENT":case"ENAMETOOLONG":case"UNKNOWN":r([]);break;case"ELOOP":default:i(t)}else r(n)})})}(e+t,s);for(const n of c){let s=n.name;void 0===s&&(s=n,i=!0);const c=t+"/"+s,l=c.slice(1),h=e+"/"+l;let f=null;(i||r)&&(f=await a(h,r)),f||void 0===n.name||(f=n),null===f&&(f={isDirectory:()=>!1}),f.isDirectory()?o(l)||(yield{relative:l,absolute:h,stats:f},yield*u(c,e,r,i,o,!1)):yield{relative:l,absolute:h,stats:f}}}class c extends i{constructor(t,e,r){if(super(),"function"==typeof e&&(r=e,e=null),this.options=function(t){return{pattern:t.pattern,dot:!!t.dot,noglobstar:!!t.noglobstar,matchBase:!!t.matchBase,nocase:!!t.nocase,ignore:t.ignore,skip:t.skip,follow:!!t.follow,stat:!!t.stat,nodir:!!t.nodir,mark:!!t.mark,silent:!!t.silent,absolute:!!t.absolute}}(e||{}),this.matchers=[],this.options.pattern){const t=Array.isArray(this.options.pattern)?this.options.pattern:[this.options.pattern];this.matchers=t.map(t=>new o(t,{dot:this.options.dot,noglobstar:this.options.noglobstar,matchBase:this.options.matchBase,nocase:this.options.nocase}))}if(this.ignoreMatchers=[],this.options.ignore){const t=Array.isArray(this.options.ignore)?this.options.ignore:[this.options.ignore];this.ignoreMatchers=t.map(t=>new o(t,{dot:!0}))}if(this.skipMatchers=[],this.options.skip){const t=Array.isArray(this.options.skip)?this.options.skip:[this.options.skip];this.skipMatchers=t.map(t=>new o(t,{dot:!0}))}this.iterator=async function*(t,e,r,n){yield*u("",t,e,r,n,!0)}(s(t||"."),this.options.follow,this.options.stat,this._shouldSkipDirectory.bind(this)),this.paused=!1,this.inactive=!1,this.aborted=!1,r&&(this._matches=[],this.on("match",t=>this._matches.push(this.options.absolute?t.absolute:t.relative)),this.on("error",t=>r(t)),this.on("end",()=>r(null,this._matches))),setTimeout(()=>this._next(),0)}_shouldSkipDirectory(t){return this.skipMatchers.some(e=>e.match(t))}_fileMatches(t,e){const r=t+(e?"/":"");return(0===this.matchers.length||this.matchers.some(t=>t.match(r)))&&!this.ignoreMatchers.some(t=>t.match(r))&&(!this.options.nodir||!e)}_next(){this.paused||this.aborted?this.inactive=!0:this.iterator.next().then(t=>{if(t.done)this.emit("end");else{const e=t.value.stats.isDirectory();if(this._fileMatches(t.value.relative,e)){let r=t.value.relative,n=t.value.absolute;this.options.mark&&e&&(r+="/",n+="/"),this.options.stat?this.emit("match",{relative:r,absolute:n,stat:t.value.stats}):this.emit("match",{relative:r,absolute:n})}this._next(this.iterator)}}).catch(t=>{this.abort(),this.emit("error",t),t.code||this.options.silent||console.error(t)})}abort(){this.aborted=!0}pause(){this.paused=!0}resume(){this.paused=!1,this.inactive&&(this.inactive=!1,this._next())}}function l(t,e,r){return new c(t,e,r)}l.ReaddirGlob=c},function(t,e,r){var n=r(178),i=r(179);t.exports=function(t){if(!t)return[];"{}"===t.substr(0,2)&&(t="\\{\\}"+t.substr(2));return function t(e,r){var o=[],s=i("{","}",e);if(!s||/\$$/.test(s.pre))return[e];var u,c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(s.body),h=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(s.body),g=c||h,_=s.body.indexOf(",")>=0;if(!g&&!_)return s.post.match(/,.*\}/)?(e=s.pre+"{"+s.body+a+s.post,t(e)):[e];if(g)u=s.body.split(/\.\./);else{if(1===(u=function t(e){if(!e)return[""];var r=[],n=i("{","}",e);if(!n)return e.split(",");var o=n.pre,s=n.body,a=n.post,u=o.split(",");u[u.length-1]+="{"+s+"}";var c=t(a);a.length&&(u[u.length-1]+=c.shift(),u.push.apply(u,c));return r.push.apply(r,u),r}(s.body)).length)if(1===(u=t(u[0],!1).map(f)).length)return(w=s.post.length?t(s.post,!1):[""]).map((function(t){return s.pre+u[0]+t}))}var b,y=s.pre,w=s.post.length?t(s.post,!1):[""];if(g){var v=l(u[0]),A=l(u[1]),E=Math.max(u[0].length,u[1].length),S=3==u.length?Math.abs(l(u[2])):1,B=p;A<v&&(S*=-1,B=m);var C=u.some(d);b=[];for(var T=v;B(T,A);T+=S){var R;if(h)"\\"===(R=String.fromCharCode(T))&&(R="");else if(R=String(T),C){var O=E-R.length;if(O>0){var I=new Array(O+1).join("0");R=T<0?"-"+I+R.slice(1):I+R}}b.push(R)}}else b=n(u,(function(e){return t(e,!1)}));for(var M=0;M<b.length;M++)for(var x=0;x<w.length;x++){var D=y+b[M]+w[x];(!r||g||D)&&o.push(D)}return o}(function(t){return t.split("\\\\").join(o).split("\\{").join(s).split("\\}").join(a).split("\\,").join(u).split("\\.").join(c)}(t),!0).map(h)};var o="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",u="\0COMMA"+Math.random()+"\0",c="\0PERIOD"+Math.random()+"\0";function l(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function h(t){return t.split(o).join("\\").split(s).join("{").split(a).join("}").split(u).join(",").split(c).join(".")}function f(t){return"{"+t+"}"}function d(t){return/^-?0\d/.test(t)}function p(t,e){return t<=e}function m(t,e){return t>=e}},function(t,e){t.exports=function(t,e){for(var n=[],i=0;i<t.length;i++){var o=e(t[i],i);r(o)?n.push.apply(n,o):n.push(o)}return n};var r=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},function(t,e,r){"use strict";function n(t,e,r){t instanceof RegExp&&(t=i(t,r)),e instanceof RegExp&&(e=i(e,r));var n=o(t,e,r);return n&&{start:n[0],end:n[1],pre:r.slice(0,n[0]),body:r.slice(n[0]+t.length,n[1]),post:r.slice(n[1]+e.length)}}function i(t,e){var r=e.match(t);return r?r[0]:null}function o(t,e,r){var n,i,o,s,a,u=r.indexOf(t),c=r.indexOf(e,u+1),l=u;if(u>=0&&c>0){if(t===e)return[u,c];for(n=[],o=r.length;l>=0&&!a;)l==u?(n.push(l),u=r.indexOf(t,l+1)):1==n.length?a=[n.pop(),c]:((i=n.pop())<o&&(o=i,s=c),c=r.indexOf(e,l+1)),l=u<c&&u>=0?u:c;n.length&&(a=[o,s])}return a}t.exports=n,n.range=o},function(t,e,r){"use strict";r.r(e),function(t,n){function i(t,...e){return(...r)=>t(...e,...r)}function o(t){return function(...e){var r=e.pop();return t.call(this,e,r)}}r.d(e,"apply",(function(){return i})),r.d(e,"applyEach",(function(){return M})),r.d(e,"applyEachSeries",(function(){return k})),r.d(e,"asyncify",(function(){return h})),r.d(e,"auto",(function(){return F})),r.d(e,"autoInject",(function(){return z})),r.d(e,"cargo",(function(){return Q})),r.d(e,"cargoQueue",(function(){return q})),r.d(e,"compose",(function(){return X})),r.d(e,"concat",(function(){return tt})),r.d(e,"concatLimit",(function(){return $})),r.d(e,"concatSeries",(function(){return et})),r.d(e,"constant",(function(){return rt})),r.d(e,"detect",(function(){return it})),r.d(e,"detectLimit",(function(){return ot})),r.d(e,"detectSeries",(function(){return st})),r.d(e,"dir",(function(){return ut})),r.d(e,"doUntil",(function(){return lt})),r.d(e,"doWhilst",(function(){return ct})),r.d(e,"each",(function(){return ft})),r.d(e,"eachLimit",(function(){return dt})),r.d(e,"eachOf",(function(){return O})),r.d(e,"eachOfLimit",(function(){return C})),r.d(e,"eachOfSeries",(function(){return x})),r.d(e,"eachSeries",(function(){return pt})),r.d(e,"ensureAsync",(function(){return mt})),r.d(e,"every",(function(){return gt})),r.d(e,"everyLimit",(function(){return _t})),r.d(e,"everySeries",(function(){return bt})),r.d(e,"filter",(function(){return At})),r.d(e,"filterLimit",(function(){return Et})),r.d(e,"filterSeries",(function(){return St})),r.d(e,"forever",(function(){return Bt})),r.d(e,"groupBy",(function(){return Tt})),r.d(e,"groupByLimit",(function(){return Ct})),r.d(e,"groupBySeries",(function(){return Rt})),r.d(e,"log",(function(){return Ot})),r.d(e,"map",(function(){return I})),r.d(e,"mapLimit",(function(){return Y})),r.d(e,"mapSeries",(function(){return D})),r.d(e,"mapValues",(function(){return Mt})),r.d(e,"mapValuesLimit",(function(){return It})),r.d(e,"mapValuesSeries",(function(){return xt})),r.d(e,"memoize",(function(){return Dt})),r.d(e,"nextTick",(function(){return kt})),r.d(e,"parallel",(function(){return Lt})),r.d(e,"parallelLimit",(function(){return Ft})),r.d(e,"priorityQueue",(function(){return Ht})),r.d(e,"queue",(function(){return Nt})),r.d(e,"race",(function(){return zt})),r.d(e,"reduce",(function(){return V})),r.d(e,"reduceRight",(function(){return Jt})),r.d(e,"reflect",(function(){return Wt})),r.d(e,"reflectAll",(function(){return Kt})),r.d(e,"reject",(function(){return qt})),r.d(e,"rejectLimit",(function(){return Vt})),r.d(e,"rejectSeries",(function(){return Zt})),r.d(e,"retry",(function(){return Yt})),r.d(e,"retryable",(function(){return te})),r.d(e,"seq",(function(){return Z})),r.d(e,"series",(function(){return ee})),r.d(e,"setImmediate",(function(){return l})),r.d(e,"some",(function(){return re})),r.d(e,"someLimit",(function(){return ne})),r.d(e,"someSeries",(function(){return ie})),r.d(e,"sortBy",(function(){return oe})),r.d(e,"timeout",(function(){return se})),r.d(e,"times",(function(){return ue})),r.d(e,"timesLimit",(function(){return ae})),r.d(e,"timesSeries",(function(){return ce})),r.d(e,"transform",(function(){return le})),r.d(e,"tryEach",(function(){return he})),r.d(e,"unmemoize",(function(){return fe})),r.d(e,"until",(function(){return pe})),r.d(e,"waterfall",(function(){return me})),r.d(e,"whilst",(function(){return de})),r.d(e,"all",(function(){return gt})),r.d(e,"allLimit",(function(){return _t})),r.d(e,"allSeries",(function(){return bt})),r.d(e,"any",(function(){return re})),r.d(e,"anyLimit",(function(){return ne})),r.d(e,"anySeries",(function(){return ie})),r.d(e,"find",(function(){return it})),r.d(e,"findLimit",(function(){return ot})),r.d(e,"findSeries",(function(){return st})),r.d(e,"flatMap",(function(){return tt})),r.d(e,"flatMapLimit",(function(){return $})),r.d(e,"flatMapSeries",(function(){return et})),r.d(e,"forEach",(function(){return ft})),r.d(e,"forEachSeries",(function(){return pt})),r.d(e,"forEachLimit",(function(){return dt})),r.d(e,"forEachOf",(function(){return O})),r.d(e,"forEachOfSeries",(function(){return x})),r.d(e,"forEachOfLimit",(function(){return C})),r.d(e,"inject",(function(){return V})),r.d(e,"foldl",(function(){return V})),r.d(e,"foldr",(function(){return Jt})),r.d(e,"select",(function(){return At})),r.d(e,"selectLimit",(function(){return Et})),r.d(e,"selectSeries",(function(){return St})),r.d(e,"wrapSync",(function(){return h})),r.d(e,"during",(function(){return de})),r.d(e,"doDuring",(function(){return ct}));var s="function"==typeof t&&t,a="object"==typeof n&&"function"==typeof n.nextTick;function u(t){setTimeout(t,0)}function c(t){return(e,...r)=>t(()=>e(...r))}var l=c(s?t:a?n.nextTick:u);function h(t){return p(t)?function(...e){const r=e.pop();return f(t.apply(this,e),r)}:o((function(e,r){var n;try{n=t.apply(this,e)}catch(t){return r(t)}if(n&&"function"==typeof n.then)return f(n,r);r(null,n)}))}function f(t,e){return t.then(t=>{d(e,null,t)},t=>{d(e,t&&t.message?t:new Error(t))})}function d(t,e,r){try{t(e,r)}catch(t){l(t=>{throw t},t)}}function p(t){return"AsyncFunction"===t[Symbol.toStringTag]}function m(t){if("function"!=typeof t)throw new Error("expected a function");return p(t)?h(t):t}function g(t,e=t.length){if(!e)throw new Error("arity is undefined");return function(...r){return"function"==typeof r[e-1]?t.apply(this,r):new Promise((n,i)=>{r[e-1]=(t,...e)=>{if(t)return i(t);n(e.length>1?e:e[0])},t.apply(this,r)})}}function _(t){return function(e,...r){return g((function(n){var i=this;return t(e,(t,e)=>{m(t).apply(i,r.concat(e))},n)}))}}function b(t,e,r,n){e=e||[];var i=[],o=0,s=m(r);return t(e,(t,e,r)=>{var n=o++;s(t,(t,e)=>{i[n]=e,r(t)})},t=>{n(t,i)})}function y(t){return t&&"number"==typeof t.length&&t.length>=0&&t.length%1==0}const w={};function v(t){function e(...e){if(null!==t){var r=t;t=null,r.apply(this,e)}}return Object.assign(e,t),e}function A(t){if(y(t))return function(t){var e=-1,r=t.length;return function(){return++e<r?{value:t[e],key:e}:null}}(t);var e,r,n,i,o=function(t){return t[Symbol.iterator]&&t[Symbol.iterator]()}(t);return o?function(t){var e=-1;return function(){var r=t.next();return r.done?null:(e++,{value:r.value,key:e})}}(o):(r=(e=t)?Object.keys(e):[],n=-1,i=r.length,function(){var t=r[++n];return n<i?{value:e[t],key:t}:null})}function E(t){return function(...e){if(null===t)throw new Error("Callback was already called.");var r=t;t=null,r.apply(this,e)}}function S(t,e,r,n){let i=!1,o=!1,s=!1,a=0,u=0;function c(){a>=e||s||i||(s=!0,t.next().then(({value:t,done:e})=>{if(!o&&!i){if(s=!1,e)return i=!0,void(a<=0&&n(null));a++,r(t,u,l),u++,c()}}).catch(h))}function l(t,e){if(a-=1,!o)return t?h(t):!1===t?(i=!0,void(o=!0)):e===w||i&&a<=0?(i=!0,n(null)):void c()}function h(t){o||(s=!1,i=!0,n(t))}c()}var B=t=>(e,r,n)=>{if(n=v(n),t<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!e)return n(null);if("AsyncGenerator"===e[Symbol.toStringTag])return S(e,t,r,n);if(function(t){return"function"==typeof t[Symbol.asyncIterator]}(e))return S(e[Symbol.asyncIterator](),t,r,n);var i=A(e),o=!1,s=!1,a=0,u=!1;function c(t,e){if(!s)if(a-=1,t)o=!0,n(t);else if(!1===t)o=!0,s=!0;else{if(e===w||o&&a<=0)return o=!0,n(null);u||l()}}function l(){for(u=!0;a<t&&!o;){var e=i();if(null===e)return o=!0,void(a<=0&&n(null));a+=1,r(e.value,e.key,E(c))}u=!1}l()};var C=g((function(t,e,r,n){return B(e)(t,m(r),n)}),4);function T(t,e,r){r=v(r);var n=0,i=0,{length:o}=t,s=!1;function a(t,e){!1===t&&(s=!0),!0!==s&&(t?r(t):++i!==o&&e!==w||r(null))}for(0===o&&r(null);n<o;n++)e(t[n],n,E(a))}function R(t,e,r){return C(t,1/0,e,r)}var O=g((function(t,e,r){return(y(t)?T:R)(t,m(e),r)}),3);var I=g((function(t,e,r){return b(O,t,e,r)}),3),M=_(I);var x=g((function(t,e,r){return C(t,1,e,r)}),3);var D=g((function(t,e,r){return b(x,t,e,r)}),3),k=_(D);const P=Symbol("promiseCallback");function L(){let t,e;function r(r,...n){if(r)return e(r);t(n.length>1?n:n[0])}return r[P]=new Promise((r,n)=>{t=r,e=n}),r}function F(t,e,r){"number"!=typeof e&&(r=e,e=null),r=v(r||L());var n=Object.keys(t).length;if(!n)return r(null);e||(e=n);var i={},o=0,s=!1,a=!1,u=Object.create(null),c=[],l=[],h={};function f(t,e){c.push(()=>function(t,e){if(a)return;var n=E((e,...n)=>{if(o--,!1!==e)if(n.length<2&&([n]=n),e){var c={};if(Object.keys(i).forEach(t=>{c[t]=i[t]}),c[t]=n,a=!0,u=Object.create(null),s)return;r(e,c)}else i[t]=n,(u[t]||[]).forEach(t=>t()),d();else s=!0});o++;var c=m(e[e.length-1]);e.length>1?c(i,n):c(n)}(t,e))}function d(){if(!s){if(0===c.length&&0===o)return r(null,i);for(;c.length&&o<e;){c.shift()()}}}function p(e){var r=[];return Object.keys(t).forEach(n=>{const i=t[n];Array.isArray(i)&&i.indexOf(e)>=0&&r.push(n)}),r}return Object.keys(t).forEach(e=>{var r=t[e];if(!Array.isArray(r))return f(e,[r]),void l.push(e);var n=r.slice(0,r.length-1),i=n.length;if(0===i)return f(e,r),void l.push(e);h[e]=i,n.forEach(o=>{if(!t[o])throw new Error("async.auto task `"+e+"` has a non-existent dependency `"+o+"` in "+n.join(", "));!function(t,e){var r=u[t];r||(r=u[t]=[]);r.push(e)}(o,()=>{0===--i&&f(e,r)})})}),function(){var t,e=0;for(;l.length;)t=l.pop(),e++,p(t).forEach(t=>{0==--h[t]&&l.push(t)});if(e!==n)throw new Error("async.auto cannot execute tasks due to a recursive dependency")}(),d(),r[P]}var N=/^(?:async\s+)?(?:function)?\s*\w*\s*\(\s*([^)]+)\s*\)(?:\s*{)/,U=/^(?:async\s+)?\(?\s*([^)=]+)\s*\)?(?:\s*=>)/,G=/,/,j=/(=.+)?(\s*)$/,H=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm;function z(t,e){var r={};return Object.keys(t).forEach(e=>{var n,i=t[e],o=p(i),s=!o&&1===i.length||o&&0===i.length;if(Array.isArray(i))n=[...i],i=n.pop(),r[e]=n.concat(n.length>0?a:i);else if(s)r[e]=i;else{if(n=function(t){const e=t.toString().replace(H,"");let r=e.match(N);if(r||(r=e.match(U)),!r)throw new Error("could not parse args in autoInject\nSource:\n"+e);let[,n]=r;return n.replace(/\s/g,"").split(G).map(t=>t.replace(j,"").trim())}(i),0===i.length&&!o&&0===n.length)throw new Error("autoInject task functions require explicit parameters.");o||n.pop(),r[e]=n.concat(a)}function a(t,e){var r=n.map(e=>t[e]);r.push(e),m(i)(...r)}}),F(r,e)}class J{constructor(){this.head=this.tail=null,this.length=0}removeLink(t){return t.prev?t.prev.next=t.next:this.head=t.next,t.next?t.next.prev=t.prev:this.tail=t.prev,t.prev=t.next=null,this.length-=1,t}empty(){for(;this.head;)this.shift();return this}insertAfter(t,e){e.prev=t,e.next=t.next,t.next?t.next.prev=e:this.tail=e,t.next=e,this.length+=1}insertBefore(t,e){e.prev=t.prev,e.next=t,t.prev?t.prev.next=e:this.head=e,t.prev=e,this.length+=1}unshift(t){this.head?this.insertBefore(this.head,t):W(this,t)}push(t){this.tail?this.insertAfter(this.tail,t):W(this,t)}shift(){return this.head&&this.removeLink(this.head)}pop(){return this.tail&&this.removeLink(this.tail)}toArray(){return[...this]}*[Symbol.iterator](){for(var t=this.head;t;)yield t.data,t=t.next}remove(t){for(var e=this.head;e;){var{next:r}=e;t(e)&&this.removeLink(e),e=r}return this}}function W(t,e){t.length=1,t.head=t.tail=e}function K(t,e,r){if(null==e)e=1;else if(0===e)throw new RangeError("Concurrency must not be zero");var n=m(t),i=0,o=[];const s={error:[],drain:[],saturated:[],unsaturated:[],empty:[]};function a(t,e){return t?e?void(s[t]=s[t].filter(t=>t!==e)):s[t]=[]:Object.keys(s).forEach(t=>s[t]=[])}function u(t,...e){s[t].forEach(t=>t(...e))}var c=!1;function h(t,e,r,n){if(null!=n&&"function"!=typeof n)throw new Error("task callback must be a function");var i,o;function s(t,...e){return t?r?o(t):i():e.length<=1?i(e[0]):void i(e)}_.started=!0;var a={data:t,callback:r?s:n||s};if(e?_._tasks.unshift(a):_._tasks.push(a),c||(c=!0,l(()=>{c=!1,_.process()})),r||!n)return new Promise((t,e)=>{i=t,o=e})}function f(t){return function(e,...r){i-=1;for(var n=0,s=t.length;n<s;n++){var a=t[n],c=o.indexOf(a);0===c?o.shift():c>0&&o.splice(c,1),a.callback(e,...r),null!=e&&u("error",e,a.data)}i<=_.concurrency-_.buffer&&u("unsaturated"),_.idle()&&u("drain"),_.process()}}function d(t){return!(0!==t.length||!_.idle())&&(l(()=>u("drain")),!0)}const p=t=>e=>{if(!e)return new Promise((e,r)=>{!function(t,e){const r=(...n)=>{a(t,r),e(...n)};s[t].push(r)}(t,(t,n)=>{if(t)return r(t);e(n)})});a(t),function(t,e){s[t].push(e)}(t,e)};var g=!1,_={_tasks:new J,*[Symbol.iterator](){yield*_._tasks[Symbol.iterator]()},concurrency:e,payload:r,buffer:e/4,started:!1,paused:!1,push(t,e){if(Array.isArray(t)){if(d(t))return;return t.map(t=>h(t,!1,!1,e))}return h(t,!1,!1,e)},pushAsync(t,e){if(Array.isArray(t)){if(d(t))return;return t.map(t=>h(t,!1,!0,e))}return h(t,!1,!0,e)},kill(){a(),_._tasks.empty()},unshift(t,e){if(Array.isArray(t)){if(d(t))return;return t.map(t=>h(t,!0,!1,e))}return h(t,!0,!1,e)},unshiftAsync(t,e){if(Array.isArray(t)){if(d(t))return;return t.map(t=>h(t,!0,!0,e))}return h(t,!0,!0,e)},remove(t){_._tasks.remove(t)},process(){if(!g){for(g=!0;!_.paused&&i<_.concurrency&&_._tasks.length;){var t=[],e=[],r=_._tasks.length;_.payload&&(r=Math.min(r,_.payload));for(var s=0;s<r;s++){var a=_._tasks.shift();t.push(a),o.push(a),e.push(a.data)}i+=1,0===_._tasks.length&&u("empty"),i===_.concurrency&&u("saturated");var c=E(f(t));n(e,c)}g=!1}},length:()=>_._tasks.length,running:()=>i,workersList:()=>o,idle:()=>_._tasks.length+i===0,pause(){_.paused=!0},resume(){!1!==_.paused&&(_.paused=!1,l(_.process))}};return Object.defineProperties(_,{saturated:{writable:!1,value:p("saturated")},unsaturated:{writable:!1,value:p("unsaturated")},empty:{writable:!1,value:p("empty")},drain:{writable:!1,value:p("drain")},error:{writable:!1,value:p("error")}}),_}function Q(t,e){return K(t,1,e)}function q(t,e,r){return K(t,e,r)}var V=g((function(t,e,r,n){n=v(n);var i=m(r);return x(t,(t,r,n)=>{i(e,t,(t,r)=>{e=r,n(t)})},t=>n(t,e))}),4);function Z(...t){var e=t.map(m);return function(...t){var r=this,n=t[t.length-1];return"function"==typeof n?t.pop():n=L(),V(e,t,(t,e,n)=>{e.apply(r,t.concat((t,...e)=>{n(t,e)}))},(t,e)=>n(t,...e)),n[P]}}function X(...t){return Z(...t.reverse())}var Y=g((function(t,e,r,n){return b(B(e),t,r,n)}),4);var $=g((function(t,e,r,n){var i=m(r);return Y(t,e,(t,e)=>{i(t,(t,...r)=>t?e(t):e(t,r))},(t,e)=>{for(var r=[],i=0;i<e.length;i++)e[i]&&(r=r.concat(...e[i]));return n(t,r)})}),4);var tt=g((function(t,e,r){return $(t,1/0,e,r)}),3);var et=g((function(t,e,r){return $(t,1,e,r)}),3);function rt(...t){return function(...e){return e.pop()(null,...t)}}function nt(t,e){return(r,n,i,o)=>{var s,a=!1;const u=m(i);r(n,(r,n,i)=>{u(r,(n,o)=>n||!1===n?i(n):t(o)&&!s?(a=!0,s=e(!0,r),i(null,w)):void i())},t=>{if(t)return o(t);o(null,a?s:e(!1))})}}var it=g((function(t,e,r){return nt(t=>t,(t,e)=>e)(O,t,e,r)}),3);var ot=g((function(t,e,r,n){return nt(t=>t,(t,e)=>e)(B(e),t,r,n)}),4);var st=g((function(t,e,r){return nt(t=>t,(t,e)=>e)(B(1),t,e,r)}),3);function at(t){return(e,...r)=>m(e)(...r,(e,...r)=>{"object"==typeof console&&(e?console.error&&console.error(e):console[t]&&r.forEach(e=>console[t](e)))})}var ut=at("dir");var ct=g((function(t,e,r){r=E(r);var n,i=m(t),o=m(e);function s(t,...e){if(t)return r(t);!1!==t&&(n=e,o(...e,a))}function a(t,e){return t?r(t):!1!==t?e?void i(s):r(null,...n):void 0}return a(null,!0)}),3);function lt(t,e,r){const n=m(e);return ct(t,(...t)=>{const e=t.pop();n(...t,(t,r)=>e(t,!r))},r)}function ht(t){return(e,r,n)=>t(e,n)}var ft=g((function(t,e,r){return O(t,ht(m(e)),r)}),3);var dt=g((function(t,e,r,n){return B(e)(t,ht(m(r)),n)}),4);var pt=g((function(t,e,r){return dt(t,1,e,r)}),3);function mt(t){return p(t)?t:function(...e){var r=e.pop(),n=!0;e.push((...t)=>{n?l(()=>r(...t)):r(...t)}),t.apply(this,e),n=!1}}var gt=g((function(t,e,r){return nt(t=>!t,t=>!t)(O,t,e,r)}),3);var _t=g((function(t,e,r,n){return nt(t=>!t,t=>!t)(B(e),t,r,n)}),4);var bt=g((function(t,e,r){return nt(t=>!t,t=>!t)(x,t,e,r)}),3);function yt(t,e,r,n){var i=new Array(e.length);t(e,(t,e,n)=>{r(t,(t,r)=>{i[e]=!!r,n(t)})},t=>{if(t)return n(t);for(var r=[],o=0;o<e.length;o++)i[o]&&r.push(e[o]);n(null,r)})}function wt(t,e,r,n){var i=[];t(e,(t,e,n)=>{r(t,(r,o)=>{if(r)return n(r);o&&i.push({index:e,value:t}),n(r)})},t=>{if(t)return n(t);n(null,i.sort((t,e)=>t.index-e.index).map(t=>t.value))})}function vt(t,e,r,n){return(y(e)?yt:wt)(t,e,m(r),n)}var At=g((function(t,e,r){return vt(O,t,e,r)}),3);var Et=g((function(t,e,r,n){return vt(B(e),t,r,n)}),4);var St=g((function(t,e,r){return vt(x,t,e,r)}),3);var Bt=g((function(t,e){var r=E(e),n=m(mt(t));return function t(e){if(e)return r(e);!1!==e&&n(t)}()}),2);var Ct=g((function(t,e,r,n){var i=m(r);return Y(t,e,(t,e)=>{i(t,(r,n)=>r?e(r):e(r,{key:n,val:t}))},(t,e)=>{for(var r={},{hasOwnProperty:i}=Object.prototype,o=0;o<e.length;o++)if(e[o]){var{key:s}=e[o],{val:a}=e[o];i.call(r,s)?r[s].push(a):r[s]=[a]}return n(t,r)})}),4);function Tt(t,e,r){return Ct(t,1/0,e,r)}function Rt(t,e,r){return Ct(t,1,e,r)}var Ot=at("log");var It=g((function(t,e,r,n){n=v(n);var i={},o=m(r);return B(e)(t,(t,e,r)=>{o(t,e,(t,n)=>{if(t)return r(t);i[e]=n,r(t)})},t=>n(t,i))}),4);function Mt(t,e,r){return It(t,1/0,e,r)}function xt(t,e,r){return It(t,1,e,r)}function Dt(t,e=(t=>t)){var r=Object.create(null),n=Object.create(null),i=m(t),s=o((t,o)=>{var s=e(...t);s in r?l(()=>o(null,...r[s])):s in n?n[s].push(o):(n[s]=[o],i(...t,(t,...e)=>{t||(r[s]=e);var i=n[s];delete n[s];for(var o=0,a=i.length;o<a;o++)i[o](t,...e)}))});return s.memo=r,s.unmemoized=t,s}var kt=c(a?n.nextTick:s?t:u),Pt=g((t,e,r)=>{var n=y(e)?[]:{};t(e,(t,e,r)=>{m(t)((t,...i)=>{i.length<2&&([i]=i),n[e]=i,r(t)})},t=>r(t,n))},3);function Lt(t,e){return Pt(O,t,e)}function Ft(t,e,r){return Pt(B(e),t,r)}function Nt(t,e){var r=m(t);return K((t,e)=>{r(t[0],e)},e,1)}class Ut{constructor(){this.heap=[],this.pushCount=Number.MIN_SAFE_INTEGER}get length(){return this.heap.length}empty(){return this.heap=[],this}percUp(t){let e;for(;t>0&&jt(this.heap[t],this.heap[e=Gt(t)]);){let r=this.heap[t];this.heap[t]=this.heap[e],this.heap[e]=r,t=e}}percDown(t){let e;for(;(e=1+(t<<1))<this.heap.length&&(e+1<this.heap.length&&jt(this.heap[e+1],this.heap[e])&&(e+=1),!jt(this.heap[t],this.heap[e]));){let r=this.heap[t];this.heap[t]=this.heap[e],this.heap[e]=r,t=e}}push(t){t.pushCount=++this.pushCount,this.heap.push(t),this.percUp(this.heap.length-1)}unshift(t){return this.heap.push(t)}shift(){let[t]=this.heap;return this.heap[0]=this.heap[this.heap.length-1],this.heap.pop(),this.percDown(0),t}toArray(){return[...this]}*[Symbol.iterator](){for(let t=0;t<this.heap.length;t++)yield this.heap[t].data}remove(t){let e=0;for(let r=0;r<this.heap.length;r++)t(this.heap[r])||(this.heap[e]=this.heap[r],e++);this.heap.splice(e);for(let t=Gt(this.heap.length-1);t>=0;t--)this.percDown(t);return this}}function Gt(t){return(t+1>>1)-1}function jt(t,e){return t.priority!==e.priority?t.priority<e.priority:t.pushCount<e.pushCount}function Ht(t,e){var r=Nt(t,e);return r._tasks=new Ut,r.push=function(t,e=0,n=(()=>{})){if("function"!=typeof n)throw new Error("task callback must be a function");if(r.started=!0,Array.isArray(t)||(t=[t]),0===t.length&&r.idle())return l(()=>r.drain());for(var i=0,o=t.length;i<o;i++){var s={data:t[i],priority:e,callback:n};r._tasks.push(s)}l(r.process)},delete r.unshift,r}var zt=g((function(t,e){if(e=v(e),!Array.isArray(t))return e(new TypeError("First argument to race must be an array of functions"));if(!t.length)return e();for(var r=0,n=t.length;r<n;r++)m(t[r])(e)}),2);function Jt(t,e,r,n){var i=[...t].reverse();return V(i,e,r,n)}function Wt(t){var e=m(t);return o((function(t,r){return t.push((t,...e)=>{let n={};if(t&&(n.error=t),e.length>0){var i=e;e.length<=1&&([i]=e),n.value=i}r(null,n)}),e.apply(this,t)}))}function Kt(t){var e;return Array.isArray(t)?e=t.map(Wt):(e={},Object.keys(t).forEach(r=>{e[r]=Wt.call(this,t[r])})),e}function Qt(t,e,r,n){const i=m(r);return vt(t,e,(t,e)=>{i(t,(t,r)=>{e(t,!r)})},n)}var qt=g((function(t,e,r){return Qt(O,t,e,r)}),3);var Vt=g((function(t,e,r,n){return Qt(B(e),t,r,n)}),4);var Zt=g((function(t,e,r){return Qt(x,t,e,r)}),3);function Xt(t){return function(){return t}}function Yt(t,e,r){var n={times:5,intervalFunc:Xt(0)};if(arguments.length<3&&"function"==typeof t?(r=e||L(),e=t):($t(n,t),r=r||L()),"function"!=typeof e)throw new Error("Invalid arguments for async.retry");var i=m(e),o=1;function s(){i((t,...e)=>{!1!==t&&(t&&o++<n.times&&("function"!=typeof n.errorFilter||n.errorFilter(t))?setTimeout(s,n.intervalFunc(o-1)):r(t,...e))})}return s(),r[P]}function $t(t,e){if("object"==typeof e)t.times=+e.times||5,t.intervalFunc="function"==typeof e.interval?e.interval:Xt(+e.interval||0),t.errorFilter=e.errorFilter;else{if("number"!=typeof e&&"string"!=typeof e)throw new Error("Invalid arguments for async.retry");t.times=+e||5}}function te(t,e){e||(e=t,t=null);let r=t&&t.arity||e.length;p(e)&&(r+=1);var n=m(e);return o((e,i)=>{function o(t){n(...e,t)}return(e.length<r-1||null==i)&&(e.push(i),i=L()),t?Yt(t,o,i):Yt(o,i),i[P]})}function ee(t,e){return Pt(x,t,e)}var re=g((function(t,e,r){return nt(Boolean,t=>t)(O,t,e,r)}),3);var ne=g((function(t,e,r,n){return nt(Boolean,t=>t)(B(e),t,r,n)}),4);var ie=g((function(t,e,r){return nt(Boolean,t=>t)(x,t,e,r)}),3);var oe=g((function(t,e,r){var n=m(e);return I(t,(t,e)=>{n(t,(r,n)=>{if(r)return e(r);e(r,{value:t,criteria:n})})},(t,e)=>{if(t)return r(t);r(null,e.sort(i).map(t=>t.value))});function i(t,e){var r=t.criteria,n=e.criteria;return r<n?-1:r>n?1:0}}),3);function se(t,e,r){var n=m(t);return o((i,o)=>{var s,a=!1;i.push((...t)=>{a||(o(...t),clearTimeout(s))}),s=setTimeout((function(){var e=t.name||"anonymous",n=new Error('Callback function "'+e+'" timed out.');n.code="ETIMEDOUT",r&&(n.info=r),a=!0,o(n)}),e),n(...i)})}function ae(t,e,r,n){var i=m(r);return Y(function(t){for(var e=Array(t);t--;)e[t]=t;return e}(t),e,i,n)}function ue(t,e,r){return ae(t,1/0,e,r)}function ce(t,e,r){return ae(t,1,e,r)}function le(t,e,r,n){arguments.length<=3&&"function"==typeof e&&(n=r,r=e,e=Array.isArray(t)?[]:{}),n=v(n||L());var i=m(r);return O(t,(t,r,n)=>{i(e,t,r,n)},t=>n(t,e)),n[P]}var he=g((function(t,e){var r,n=null;return pt(t,(t,e)=>{m(t)((t,...i)=>{if(!1===t)return e(t);i.length<2?[r]=i:r=i,n=t,e(t?null:{})})},()=>e(n,r))}));function fe(t){return(...e)=>(t.unmemoized||t)(...e)}var de=g((function(t,e,r){r=E(r);var n=m(e),i=m(t),o=[];function s(t,...e){if(t)return r(t);o=e,!1!==t&&i(a)}function a(t,e){return t?r(t):!1!==t?e?void n(s):r(null,...o):void 0}return i(a)}),3);function pe(t,e,r){const n=m(t);return de(t=>n((e,r)=>t(e,!r)),e,r)}var me=g((function(t,e){if(e=v(e),!Array.isArray(t))return e(new Error("First argument to waterfall must be an array of functions"));if(!t.length)return e();var r=0;function n(e){m(t[r++])(...e,E(i))}function i(i,...o){if(!1!==i)return i||r===t.length?e(i,...o):void n(o)}n([])})),ge={apply:i,applyEach:M,applyEachSeries:k,asyncify:h,auto:F,autoInject:z,cargo:Q,cargoQueue:q,compose:X,concat:tt,concatLimit:$,concatSeries:et,constant:rt,detect:it,detectLimit:ot,detectSeries:st,dir:ut,doUntil:lt,doWhilst:ct,each:ft,eachLimit:dt,eachOf:O,eachOfLimit:C,eachOfSeries:x,eachSeries:pt,ensureAsync:mt,every:gt,everyLimit:_t,everySeries:bt,filter:At,filterLimit:Et,filterSeries:St,forever:Bt,groupBy:Tt,groupByLimit:Ct,groupBySeries:Rt,log:Ot,map:I,mapLimit:Y,mapSeries:D,mapValues:Mt,mapValuesLimit:It,mapValuesSeries:xt,memoize:Dt,nextTick:kt,parallel:Lt,parallelLimit:Ft,priorityQueue:Ht,queue:Nt,race:zt,reduce:V,reduceRight:Jt,reflect:Wt,reflectAll:Kt,reject:qt,rejectLimit:Vt,rejectSeries:Zt,retry:Yt,retryable:te,seq:Z,series:ee,setImmediate:l,some:re,someLimit:ne,someSeries:ie,sortBy:oe,timeout:se,times:ue,timesLimit:ae,timesSeries:ce,transform:le,tryEach:he,unmemoize:fe,until:pe,waterfall:me,whilst:de,all:gt,allLimit:_t,allSeries:bt,any:re,anyLimit:ne,anySeries:ie,find:it,findLimit:ot,findSeries:st,flatMap:tt,flatMapLimit:$,flatMapSeries:et,forEach:ft,forEachSeries:pt,forEachLimit:dt,forEachOf:O,forEachOfSeries:x,forEachOfLimit:C,inject:V,foldl:V,foldr:Jt,select:At,selectLimit:Et,selectSeries:St,wrapSync:h,during:de,doDuring:ct};e.default=ge}.call(this,r(49).setImmediate,r(0))},function(t,e,r){(function(e){var n=r(89),i=e.cwd,o=null,s=e.env.GRACEFUL_FS_PLATFORM||e.platform;e.cwd=function(){return o||(o=i.call(e)),o};try{e.cwd()}catch(t){}if("function"==typeof e.chdir){var a=e.chdir;e.chdir=function(t){o=null,a.call(e,t)},Object.setPrototypeOf&&Object.setPrototypeOf(e.chdir,a)}t.exports=function(t){n.hasOwnProperty("O_SYMLINK")&&e.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(t){t.lchmod=function(e,r,i){t.open(e,n.O_WRONLY|n.O_SYMLINK,r,(function(e,n){e?i&&i(e):t.fchmod(n,r,(function(e){t.close(n,(function(t){i&&i(e||t)}))}))}))},t.lchmodSync=function(e,r){var i,o=t.openSync(e,n.O_WRONLY|n.O_SYMLINK,r),s=!0;try{i=t.fchmodSync(o,r),s=!1}finally{if(s)try{t.closeSync(o)}catch(t){}else t.closeSync(o)}return i}}(t);t.lutimes||function(t){n.hasOwnProperty("O_SYMLINK")?(t.lutimes=function(e,r,i,o){t.open(e,n.O_SYMLINK,(function(e,n){e?o&&o(e):t.futimes(n,r,i,(function(e){t.close(n,(function(t){o&&o(e||t)}))}))}))},t.lutimesSync=function(e,r,i){var o,s=t.openSync(e,n.O_SYMLINK),a=!0;try{o=t.futimesSync(s,r,i),a=!1}finally{if(a)try{t.closeSync(s)}catch(t){}else t.closeSync(s)}return o}):(t.lutimes=function(t,r,n,i){i&&e.nextTick(i)},t.lutimesSync=function(){})}(t);t.chown=a(t.chown),t.fchown=a(t.fchown),t.lchown=a(t.lchown),t.chmod=i(t.chmod),t.fchmod=i(t.fchmod),t.lchmod=i(t.lchmod),t.chownSync=u(t.chownSync),t.fchownSync=u(t.fchownSync),t.lchownSync=u(t.lchownSync),t.chmodSync=o(t.chmodSync),t.fchmodSync=o(t.fchmodSync),t.lchmodSync=o(t.lchmodSync),t.stat=c(t.stat),t.fstat=c(t.fstat),t.lstat=c(t.lstat),t.statSync=l(t.statSync),t.fstatSync=l(t.fstatSync),t.lstatSync=l(t.lstatSync),t.lchmod||(t.lchmod=function(t,r,n){n&&e.nextTick(n)},t.lchmodSync=function(){});t.lchown||(t.lchown=function(t,r,n,i){i&&e.nextTick(i)},t.lchownSync=function(){});"win32"===s&&(t.rename=(r=t.rename,function(e,n,i){var o=Date.now(),s=0;r(e,n,(function a(u){if(u&&("EACCES"===u.code||"EPERM"===u.code)&&Date.now()-o<6e4)return setTimeout((function(){t.stat(n,(function(t,o){t&&"ENOENT"===t.code?r(e,n,a):i(u)}))}),s),void(s<100&&(s+=10));i&&i(u)}))}));var r;function i(e){return e?function(r,n,i){return e.call(t,r,n,(function(t){h(t)&&(t=null),i&&i.apply(this,arguments)}))}:e}function o(e){return e?function(r,n){try{return e.call(t,r,n)}catch(t){if(!h(t))throw t}}:e}function a(e){return e?function(r,n,i,o){return e.call(t,r,n,i,(function(t){h(t)&&(t=null),o&&o.apply(this,arguments)}))}:e}function u(e){return e?function(r,n,i){try{return e.call(t,r,n,i)}catch(t){if(!h(t))throw t}}:e}function c(e){return e?function(r,n,i){function o(t,e){e&&(e.uid<0&&(e.uid+=4294967296),e.gid<0&&(e.gid+=4294967296)),i&&i.apply(this,arguments)}return"function"==typeof n&&(i=n,n=null),n?e.call(t,r,n,o):e.call(t,r,o)}:e}function l(e){return e?function(r,n){var i=n?e.call(t,r,n):e.call(t,r);return i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296),i}:e}function h(t){return!t||("ENOSYS"===t.code||!(e.getuid&&0===e.getuid()||"EINVAL"!==t.code&&"EPERM"!==t.code))}t.read=function(e){function r(r,n,i,o,s,a){var u;if(a&&"function"==typeof a){var c=0;u=function(l,h,f){if(l&&"EAGAIN"===l.code&&c<10)return c++,e.call(t,r,n,i,o,s,u);a.apply(this,arguments)}}return e.call(t,r,n,i,o,s,u)}return Object.setPrototypeOf&&Object.setPrototypeOf(r,e),r}(t.read),t.readSync=(f=t.readSync,function(e,r,n,i,o){for(var s=0;;)try{return f.call(t,e,r,n,i,o)}catch(t){if("EAGAIN"===t.code&&s<10){s++;continue}throw t}});var f}}).call(this,r(0))},function(t,e,r){(function(e){var n=r(46).Stream;t.exports=function(t){return{ReadStream:function r(i,o){if(!(this instanceof r))return new r(i,o);n.call(this);var s=this;this.path=i,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,o=o||{};for(var a=Object.keys(o),u=0,c=a.length;u<c;u++){var l=a[u];this[l]=o[l]}this.encoding&&this.setEncoding(this.encoding);if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(void 0===this.end)this.end=1/0;else if("number"!=typeof this.end)throw TypeError("end must be a Number");if(this.start>this.end)throw new Error("start must be <= end");this.pos=this.start}if(null!==this.fd)return void e.nextTick((function(){s._read()}));t.open(this.path,this.flags,this.mode,(function(t,e){if(t)return s.emit("error",t),void(s.readable=!1);s.fd=e,s.emit("open",e),s._read()}))},WriteStream:function e(r,i){if(!(this instanceof e))return new e(r,i);n.call(this),this.path=r,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,i=i||{};for(var o=Object.keys(i),s=0,a=o.length;s<a;s++){var u=o[s];this[u]=i[u]}if(void 0!==this.start){if("number"!=typeof this.start)throw TypeError("start must be a Number");if(this.start<0)throw new Error("start must be >= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=t.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}}}).call(this,r(0))},function(t,e,r){"use strict";t.exports=function(t){if(null===t||"object"!=typeof t)return t;if(t instanceof Object)var e={__proto__:n(t)};else e=Object.create(null);return Object.getOwnPropertyNames(t).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))})),e};var n=Object.getPrototypeOf||function(t){return t.__proto__}},function(t,e,r){var n=r(12),i=r(85);function o(t,e,r){t[e]=function(){return delete t[e],r.apply(this,arguments),this[e].apply(this,arguments)}}function s(t,e){if(!(this instanceof s))return new s(t,e);i.call(this,e),o(this,"_read",(function(){var r=t.call(this,e),n=this.emit.bind(this,"error");r.on("error",n),r.pipe(this)})),this.emit("readable")}function a(t,e){if(!(this instanceof a))return new a(t,e);i.call(this,e),o(this,"_write",(function(){var r=t.call(this,e),n=this.emit.bind(this,"error");r.on("error",n),this.pipe(r)})),this.emit("writable")}t.exports={Readable:s,Writable:a},n.inherits(s,i),n.inherits(a,i)},function(t,e){var r=/^(?:0|[1-9]\d*)$/;function n(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=i.propertyIsEnumerable,u=Math.max;function c(t,e){var r=g(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&_(t)}(t)&&o.call(t,"callee")&&(!a.call(t,"callee")||"[object Arguments]"==s.call(t))}(t)?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],n=r.length,i=!!n;for(var u in t)!e&&!o.call(t,u)||i&&("length"==u||p(u,n))||r.push(u);return r}function l(t,e,r,n){return void 0===t||m(t,i[r])&&!o.call(n,r)?e:t}function h(t,e,r){var n=t[e];o.call(t,e)&&m(n,r)&&(void 0!==r||e in t)||(t[e]=r)}function f(t){if(!b(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e,r,n,s=(r=(e=t)&&e.constructor,n="function"==typeof r&&r.prototype||i,e===n),a=[];for(var u in t)("constructor"!=u||!s&&o.call(t,u))&&a.push(u);return a}function d(t,e){return e=u(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=u(r.length-e,0),s=Array(o);++i<o;)s[i]=r[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=r[i];return a[e]=s,n(t,this,a)}}function p(t,e){return!!(e=null==e?9007199254740991:e)&&("number"==typeof t||r.test(t))&&t>-1&&t%1==0&&t<e}function m(t,e){return t===e||t!=t&&e!=e}var g=Array.isArray;function _(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}(t.length)&&!function(t){var e=b(t)?s.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)}function b(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}var y,w=(y=function(t,e,r,n){!function(t,e,r,n){r||(r={});for(var i=-1,o=e.length;++i<o;){var s=e[i],a=n?n(r[s],t[s],s,r,t):void 0;h(r,s,void 0===a?t[s]:a)}}(e,function(t){return _(t)?c(t,!0):f(t)}(e),t,n)},d((function(t,e){var r=-1,n=e.length,i=n>1?e[n-1]:void 0,o=n>2?e[2]:void 0;for(i=y.length>3&&"function"==typeof i?(n--,i):void 0,o&&function(t,e,r){if(!b(r))return!1;var n=typeof e;return!!("number"==n?_(r)&&p(e,r.length):"string"==n&&e in r)&&m(r[e],t)}(e[0],e[1],o)&&(i=n<3?void 0:i,n=1),t=Object(t);++r<n;){var s=e[r];s&&y(t,s,r,i)}return t}))),v=d((function(t){return t.push(void 0,l),n(w,void 0,t)}));t.exports=v},function(t,e,r){var n=r(88),i=r(1),o=r(187),s=r(188),a=r(189),u=r(190),c=r(91),l=t.exports={},h=/[\/\\]/g;l.exists=function(){var t=i.join.apply(i,arguments);return n.existsSync(t)},l.expand=function(...t){var e=u(t[0])?t.shift():{},r=Array.isArray(t[0])?t[0]:t;if(0===r.length)return[];var l=function(t,e){var r=[];return o(t).forEach((function(t){var n=0===t.indexOf("!");n&&(t=t.slice(1));var i=e(t);r=n?s(r,i):a(r,i)})),r}(r,(function(t){return c.sync(t,e)}));return e.filter&&(l=l.filter((function(t){t=i.join(e.cwd||"",t);try{return"function"==typeof e.filter?e.filter(t):n.statSync(t)[e.filter]()}catch(t){return!1}}))),l},l.expandMapping=function(t,e,r){r=Object.assign({rename:function(t,e){return i.join(t||"",e)}},r);var n=[],o={};return l.expand(r,t).forEach((function(t){var s=t;r.flatten&&(s=i.basename(s)),r.ext&&(s=s.replace(/(\.[^\/]*)?$/,r.ext));var a=r.rename(e,s,r);r.cwd&&(t=i.join(r.cwd,t)),a=a.replace(h,"/"),t=t.replace(h,"/"),o[a]?o[a].src.push(t):(n.push({src:[t],dest:a}),o[a]=n[n.length-1])})),n},l.normalizeFilesArray=function(t){var e=[];return t.forEach((function(t){("src"in t||"dest"in t)&&e.push(t)})),0===e.length?[]:e=_(e).chain().forEach((function(t){"src"in t&&t.src&&(Array.isArray(t.src)?t.src=o(t.src):t.src=[t.src])})).map((function(t){var e=Object.assign({},t);if(delete e.src,delete e.dest,t.expand)return l.expandMapping(t.src,t.dest,e).map((function(e){var r=Object.assign({},t);return r.orig=Object.assign({},t),r.src=e.src,r.dest=e.dest,["expand","cwd","flatten","rename","ext"].forEach((function(t){delete r[t]})),r}));var r=Object.assign({},t);return r.orig=Object.assign({},t),"src"in r&&Object.defineProperty(r,"src",{enumerable:!0,get:function r(){var n;return"result"in r||(n=t.src,n=Array.isArray(n)?o(n):[n],r.result=l.expand(e,n)),r.result}}),"dest"in r&&(r.dest=t.dest),r})).flatten().value()}},function(t,e,r){(function(e){var r="object"==typeof e&&e&&e.Object===Object&&e,n="object"==typeof self&&self&&self.Object===Object&&self,i=r||n||Function("return this")();function o(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}var s=Object.prototype,a=s.hasOwnProperty,u=s.toString,c=i.Symbol,l=s.propertyIsEnumerable,h=c?c.isConcatSpreadable:void 0;function f(t){return d(t)||function(t){return function(t){return function(t){return!!t&&"object"==typeof t}(t)&&function(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}(t.length)&&!function(t){var e=function(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}(t)?u.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)}(t)}(t)&&a.call(t,"callee")&&(!l.call(t,"callee")||"[object Arguments]"==u.call(t))}(t)||!!(h&&t&&t[h])}var d=Array.isArray;t.exports=function(t){return(t?t.length:0)?function t(e,r,n,i,s){var a=-1,u=e.length;for(n||(n=f),s||(s=[]);++a<u;){var c=e[a];r>0&&n(c)?r>1?t(c,r-1,n,i,s):o(s,c):i||(s[s.length]=c)}return s}(t,1):[]}}).call(this,r(8))},function(t,e,r){(function(e){var r=/^\[object .+?Constructor\]$/,n="object"==typeof e&&e&&e.Object===Object&&e,i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();function s(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function a(t,e){return!!(t?t.length:0)&&function(t,e,r){if(e!=e)return function(t,e,r,n){var i=t.length,o=r+(n?1:-1);for(;n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}(t,l,r);var n=r-1,i=t.length;for(;++n<i;)if(t[n]===e)return n;return-1}(t,e,0)>-1}function u(t,e,r){for(var n=-1,i=t?t.length:0;++n<i;)if(r(e,t[n]))return!0;return!1}function c(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function l(t){return t!=t}function h(t,e){return t.has(e)}var f,d=Array.prototype,p=Function.prototype,m=Object.prototype,g=o["__core-js_shared__"],_=(f=/[^.]+$/.exec(g&&g.keys&&g.keys.IE_PROTO||""))?"Symbol(src)_1."+f:"",b=p.toString,y=m.hasOwnProperty,w=m.toString,v=RegExp("^"+b.call(y).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),A=o.Symbol,E=m.propertyIsEnumerable,S=d.splice,B=A?A.isConcatSpreadable:void 0,C=Math.max,T=F(o,"Map"),R=F(Object,"create");function O(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function I(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function M(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function x(t){var e=-1,r=t?t.length:0;for(this.__data__=new M;++e<r;)this.add(t[e])}function D(t,e){for(var r,n,i=t.length;i--;)if((r=t[i][0])===(n=e)||r!=r&&n!=n)return i;return-1}function k(t,e,r,n){var i,o=-1,s=a,c=!0,l=t.length,f=[],d=e.length;if(!l)return f;r&&(e=function(t,e){for(var r=-1,n=t?t.length:0,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}(e,(i=r,function(t){return i(t)}))),n?(s=u,c=!1):e.length>=200&&(s=h,c=!1,e=new x(e));t:for(;++o<l;){var p=t[o],m=r?r(p):p;if(p=n||0!==p?p:0,c&&m==m){for(var g=d;g--;)if(e[g]===m)continue t;f.push(p)}else s(e,m,n)||f.push(p)}return f}function P(t){return!(!K(t)||(e=t,_&&_ in e))&&(W(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?v:r).test(function(t){if(null!=t){try{return b.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}function L(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function F(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return P(r)?r:void 0}function N(t){return H(t)||function(t){return J(t)&&y.call(t,"callee")&&(!E.call(t,"callee")||"[object Arguments]"==w.call(t))}(t)||!!(B&&t&&t[B])}O.prototype.clear=function(){this.__data__=R?R(null):{}},O.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},O.prototype.get=function(t){var e=this.__data__;if(R){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return y.call(e,t)?e[t]:void 0},O.prototype.has=function(t){var e=this.__data__;return R?void 0!==e[t]:y.call(e,t)},O.prototype.set=function(t,e){return this.__data__[t]=R&&void 0===e?"__lodash_hash_undefined__":e,this},I.prototype.clear=function(){this.__data__=[]},I.prototype.delete=function(t){var e=this.__data__,r=D(e,t);return!(r<0)&&(r==e.length-1?e.pop():S.call(e,r,1),!0)},I.prototype.get=function(t){var e=this.__data__,r=D(e,t);return r<0?void 0:e[r][1]},I.prototype.has=function(t){return D(this.__data__,t)>-1},I.prototype.set=function(t,e){var r=this.__data__,n=D(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},M.prototype.clear=function(){this.__data__={hash:new O,map:new(T||I),string:new O}},M.prototype.delete=function(t){return L(this,t).delete(t)},M.prototype.get=function(t){return L(this,t).get(t)},M.prototype.has=function(t){return L(this,t).has(t)},M.prototype.set=function(t,e){return L(this,t).set(t,e),this},x.prototype.add=x.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},x.prototype.has=function(t){return this.__data__.has(t)};var U,G,j=(U=function(t,e){return J(t)?k(t,function t(e,r,n,i,o){var s=-1,a=e.length;for(n||(n=N),o||(o=[]);++s<a;){var u=e[s];r>0&&n(u)?r>1?t(u,r-1,n,i,o):c(o,u):i||(o[o.length]=u)}return o}(e,1,J,!0)):[]},G=C(void 0===G?U.length-1:G,0),function(){for(var t=arguments,e=-1,r=C(t.length-G,0),n=Array(r);++e<r;)n[e]=t[G+e];e=-1;for(var i=Array(G+1);++e<G;)i[e]=t[e];return i[G]=n,s(U,this,i)});var H=Array.isArray;function z(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}(t.length)&&!W(t)}function J(t){return function(t){return!!t&&"object"==typeof t}(t)&&z(t)}function W(t){var e=K(t)?w.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}function K(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=j}).call(this,r(8))},function(t,e,r){(function(e){var r=/^\[object .+?Constructor\]$/,n="object"==typeof e&&e&&e.Object===Object&&e,i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();function s(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function a(t,e){return!!(t?t.length:0)&&function(t,e,r){if(e!=e)return function(t,e,r,n){var i=t.length,o=r+(n?1:-1);for(;n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}(t,l,r);var n=r-1,i=t.length;for(;++n<i;)if(t[n]===e)return n;return-1}(t,e,0)>-1}function u(t,e,r){for(var n=-1,i=t?t.length:0;++n<i;)if(r(e,t[n]))return!0;return!1}function c(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function l(t){return t!=t}function h(t,e){return t.has(e)}function f(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var d,p=Array.prototype,m=Function.prototype,g=Object.prototype,_=o["__core-js_shared__"],b=(d=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+d:"",y=m.toString,w=g.hasOwnProperty,v=g.toString,A=RegExp("^"+y.call(w).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E=o.Symbol,S=g.propertyIsEnumerable,B=p.splice,C=E?E.isConcatSpreadable:void 0,T=Math.max,R=U(o,"Map"),O=U(o,"Set"),I=U(Object,"create");function M(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function x(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function D(t){var e=-1,r=t?t.length:0;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function k(t){var e=-1,r=t?t.length:0;for(this.__data__=new D;++e<r;)this.add(t[e])}function P(t,e){for(var r,n,i=t.length;i--;)if((r=t[i][0])===(n=e)||r!=r&&n!=n)return i;return-1}function L(t){return!(!q(t)||(e=t,b&&b in e))&&(Q(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t)?A:r).test(function(t){if(null!=t){try{return y.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t));var e}M.prototype.clear=function(){this.__data__=I?I(null):{}},M.prototype.delete=function(t){return this.has(t)&&delete this.__data__[t]},M.prototype.get=function(t){var e=this.__data__;if(I){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return w.call(e,t)?e[t]:void 0},M.prototype.has=function(t){var e=this.__data__;return I?void 0!==e[t]:w.call(e,t)},M.prototype.set=function(t,e){return this.__data__[t]=I&&void 0===e?"__lodash_hash_undefined__":e,this},x.prototype.clear=function(){this.__data__=[]},x.prototype.delete=function(t){var e=this.__data__,r=P(e,t);return!(r<0)&&(r==e.length-1?e.pop():B.call(e,r,1),!0)},x.prototype.get=function(t){var e=this.__data__,r=P(e,t);return r<0?void 0:e[r][1]},x.prototype.has=function(t){return P(this.__data__,t)>-1},x.prototype.set=function(t,e){var r=this.__data__,n=P(r,t);return n<0?r.push([t,e]):r[n][1]=e,this},D.prototype.clear=function(){this.__data__={hash:new M,map:new(R||x),string:new M}},D.prototype.delete=function(t){return N(this,t).delete(t)},D.prototype.get=function(t){return N(this,t).get(t)},D.prototype.has=function(t){return N(this,t).has(t)},D.prototype.set=function(t,e){return N(this,t).set(t,e),this},k.prototype.add=k.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},k.prototype.has=function(t){return this.__data__.has(t)};var F=O&&1/f(new O([,-0]))[1]==1/0?function(t){return new O(t)}:function(){};function N(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function U(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return L(r)?r:void 0}function G(t){return J(t)||function(t){return K(t)&&w.call(t,"callee")&&(!S.call(t,"callee")||"[object Arguments]"==v.call(t))}(t)||!!(C&&t&&t[C])}var j,H,z=(j=function(t){return function(t,e,r){var n=-1,i=a,o=t.length,s=!0,c=[],l=c;if(r)s=!1,i=u;else if(o>=200){var d=e?null:F(t);if(d)return f(d);s=!1,i=h,l=new k}else l=e?[]:c;t:for(;++n<o;){var p=t[n],m=e?e(p):p;if(p=r||0!==p?p:0,s&&m==m){for(var g=l.length;g--;)if(l[g]===m)continue t;e&&l.push(m),c.push(p)}else i(l,m,r)||(l!==c&&l.push(m),c.push(p))}return c}(function t(e,r,n,i,o){var s=-1,a=e.length;for(n||(n=G),o||(o=[]);++s<a;){var u=e[s];r>0&&n(u)?r>1?t(u,r-1,n,i,o):c(o,u):i||(o[o.length]=u)}return o}(t,1,K,!0))},H=T(void 0===H?j.length-1:H,0),function(){for(var t=arguments,e=-1,r=T(t.length-H,0),n=Array(r);++e<r;)n[e]=t[H+e];e=-1;for(var i=Array(H+1);++e<H;)i[e]=t[e];return i[H]=n,s(j,this,i)});var J=Array.isArray;function W(t){return null!=t&&function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}(t.length)&&!Q(t)}function K(t){return function(t){return!!t&&"object"==typeof t}(t)&&W(t)}function Q(t){var e=q(t)?v.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}function q(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}t.exports=z}).call(this,r(8))},function(t,e){var r,n,i=Function.prototype,o=Object.prototype,s=i.toString,a=o.hasOwnProperty,u=s.call(Object),c=o.toString,l=(r=Object.getPrototypeOf,n=Object,function(t){return r(n(t))});t.exports=function(t){if(!function(t){return!!t&&"object"==typeof t}(t)||"[object Object]"!=c.call(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(t){}return e}(t))return!1;var e=l(t);if(null===e)return!0;var r=a.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&s.call(r)==u}},function(t,e,r){(function(t){var n=r(1),i="win32"===t.platform,o=r(1),s=t.env.NODE_DEBUG&&/fs/.test(t.env.NODE_DEBUG);function a(e){return"function"==typeof e?e:function(){var e;if(s){var r=new Error;e=function(t){t&&(r.message=t.message,n(t=r))}}else e=n;return e;function n(e){if(e){if(t.throwDeprecation)throw e;if(!t.noDeprecation){var r="fs: missing callback "+(e.stack||e.message);t.traceDeprecation?console.trace(r):console.error(r)}}}}()}n.normalize;if(i)var u=/(.*?)(?:[\/\\]+|$)/g;else u=/(.*?)(?:[\/]+|$)/g;if(i)var c=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;else c=/^[\/]*/;e.realpathSync=function(t,e){if(t=n.resolve(t),e&&Object.prototype.hasOwnProperty.call(e,t))return e[t];var r,s,a,l,h=t,f={},d={};function p(){var e=c.exec(t);r=e[0].length,s=e[0],a=e[0],l="",i&&!d[a]&&(o.lstatSync(a),d[a]=!0)}for(p();r<t.length;){u.lastIndex=r;var m=u.exec(t);if(l=s,s+=m[0],a=l+m[1],r=u.lastIndex,!(d[a]||e&&e[a]===a)){var g;if(e&&Object.prototype.hasOwnProperty.call(e,a))g=e[a];else{var _=o.lstatSync(a);if(!_.isSymbolicLink()){d[a]=!0,e&&(e[a]=a);continue}var b=null;if(!i){var y=_.dev.toString(32)+":"+_.ino.toString(32);f.hasOwnProperty(y)&&(b=f[y])}null===b&&(o.statSync(a),b=o.readlinkSync(a)),g=n.resolve(l,b),e&&(e[a]=g),i||(f[y]=b)}t=n.resolve(g,t.slice(r)),p()}}return e&&(e[h]=t),t},e.realpath=function(e,r,s){if("function"!=typeof s&&(s=a(r),r=null),e=n.resolve(e),r&&Object.prototype.hasOwnProperty.call(r,e))return t.nextTick(s.bind(null,null,r[e]));var l,h,f,d,p=e,m={},g={};function _(){var r=c.exec(e);l=r[0].length,h=r[0],f=r[0],d="",i&&!g[f]?o.lstat(f,(function(t){if(t)return s(t);g[f]=!0,b()})):t.nextTick(b)}function b(){if(l>=e.length)return r&&(r[p]=e),s(null,e);u.lastIndex=l;var n=u.exec(e);return d=h,h+=n[0],f=d+n[1],l=u.lastIndex,g[f]||r&&r[f]===f?t.nextTick(b):r&&Object.prototype.hasOwnProperty.call(r,f)?v(r[f]):o.lstat(f,y)}function y(e,n){if(e)return s(e);if(!n.isSymbolicLink())return g[f]=!0,r&&(r[f]=f),t.nextTick(b);if(!i){var a=n.dev.toString(32)+":"+n.ino.toString(32);if(m.hasOwnProperty(a))return w(null,m[a],f)}o.stat(f,(function(t){if(t)return s(t);o.readlink(f,(function(t,e){i||(m[a]=e),w(t,e)}))}))}function w(t,e,i){if(t)return s(t);var o=n.resolve(d,e);r&&(r[i]=o),v(o)}function v(t){e=n.resolve(t,e.slice(l)),_()}_()}}).call(this,r(0))},function(t,e,r){(function(e){t.exports=p,p.GlobSync=m;var n=r(1),i=r(92),o=r(51),s=(o.Minimatch,r(91).Glob,r(12),r(1)),a=r(34),u=r(61),c=r(93),l=c.setopts,h=c.ownProp,f=c.childrenIgnored,d=c.isIgnored;function p(t,e){if("function"==typeof e||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new m(t,e).found}function m(t,e){if(!t)throw new Error("must provide pattern");if("function"==typeof e||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof m))return new m(t,e);if(l(this,t,e),this.noprocess)return this;var r=this.minimatch.set.length;this.matches=new Array(r);for(var n=0;n<r;n++)this._process(this.minimatch.set[n],n,!1);this._finish()}m.prototype._finish=function(){if(a(this instanceof m),this.realpath){var t=this;this.matches.forEach((function(e,r){var n=t.matches[r]=Object.create(null);for(var o in e)try{o=t._makeAbs(o),n[i.realpathSync(o,t.realpathCache)]=!0}catch(e){if("stat"!==e.syscall)throw e;n[t._makeAbs(o)]=!0}}))}c.finish(this)},m.prototype._process=function(t,e,r){a(this instanceof m);for(var n,i=0;"string"==typeof t[i];)i++;switch(i){case t.length:return void this._processSimple(t.join("/"),e);case 0:n=null;break;default:n=t.slice(0,i).join("/")}var s,c=t.slice(i);null===n?s=".":u(n)||u(t.join("/"))?(n&&u(n)||(n="/"+n),s=n):s=n;var l=this._makeAbs(s);f(this,s)||(c[0]===o.GLOBSTAR?this._processGlobStar(n,s,l,c,e,r):this._processReaddir(n,s,l,c,e,r))},m.prototype._processReaddir=function(t,e,r,n,i,o){var a=this._readdir(r,o);if(a){for(var u=n[0],c=!!this.minimatch.negate,l=u._glob,h=this.dot||"."===l.charAt(0),f=[],d=0;d<a.length;d++){if("."!==(g=a[d]).charAt(0)||h)(c&&!t?!g.match(u):g.match(u))&&f.push(g)}var p=f.length;if(0!==p)if(1!==n.length||this.mark||this.stat){n.shift();for(d=0;d<p;d++){var m;g=f[d];m=t?[t,g]:[g],this._process(m.concat(n),i,o)}}else{this.matches[i]||(this.matches[i]=Object.create(null));for(var d=0;d<p;d++){var g=f[d];t&&(g="/"!==t.slice(-1)?t+"/"+g:t+g),"/"!==g.charAt(0)||this.nomount||(g=s.join(this.root,g)),this._emitMatch(i,g)}}}},m.prototype._emitMatch=function(t,e){if(!d(this,e)){var r=this._makeAbs(e);if(this.mark&&(e=this._mark(e)),this.absolute&&(e=r),!this.matches[t][e]){if(this.nodir){var n=this.cache[r];if("DIR"===n||Array.isArray(n))return}this.matches[t][e]=!0,this.stat&&this._stat(e)}}},m.prototype._readdirInGlobStar=function(t){if(this.follow)return this._readdir(t,!1);var e,r;try{r=n.lstatSync(t)}catch(t){if("ENOENT"===t.code)return null}var i=r&&r.isSymbolicLink();return this.symlinks[t]=i,i||!r||r.isDirectory()?e=this._readdir(t,!1):this.cache[t]="FILE",e},m.prototype._readdir=function(t,e){if(e&&!h(this.symlinks,t))return this._readdirInGlobStar(t);if(h(this.cache,t)){var r=this.cache[t];if(!r||"FILE"===r)return null;if(Array.isArray(r))return r}try{return this._readdirEntries(t,n.readdirSync(t))}catch(e){return this._readdirError(t,e),null}},m.prototype._readdirEntries=function(t,e){if(!this.mark&&!this.stat)for(var r=0;r<e.length;r++){var n=e[r];n="/"===t?t+n:t+"/"+n,this.cache[n]=!0}return this.cache[t]=e,e},m.prototype._readdirError=function(t,e){switch(e.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(t);if(this.cache[r]="FILE",r===this.cwdAbs){var n=new Error(e.code+" invalid cwd "+this.cwd);throw n.path=this.cwd,n.code=e.code,n}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(t)]=!1;break;default:if(this.cache[this._makeAbs(t)]=!1,this.strict)throw e;this.silent||console.error("glob error",e)}},m.prototype._processGlobStar=function(t,e,r,n,i,o){var s=this._readdir(r,o);if(s){var a=n.slice(1),u=t?[t]:[],c=u.concat(a);this._process(c,i,!1);var l=s.length;if(!this.symlinks[r]||!o)for(var h=0;h<l;h++){if("."!==s[h].charAt(0)||this.dot){var f=u.concat(s[h],a);this._process(f,i,!0);var d=u.concat(s[h],n);this._process(d,i,!0)}}}},m.prototype._processSimple=function(t,r){var n=this._stat(t);if(this.matches[r]||(this.matches[r]=Object.create(null)),n){if(t&&u(t)&&!this.nomount){var i=/[\/\\]$/.test(t);"/"===t.charAt(0)?t=s.join(this.root,t):(t=s.resolve(this.root,t),i&&(t+="/"))}"win32"===e.platform&&(t=t.replace(/\\/g,"/")),this._emitMatch(r,t)}},m.prototype._stat=function(t){var e=this._makeAbs(t),r="/"===t.slice(-1);if(t.length>this.maxLength)return!1;if(!this.stat&&h(this.cache,e)){var i=this.cache[e];if(Array.isArray(i)&&(i="DIR"),!r||"DIR"===i)return i;if(r&&"FILE"===i)return!1}var o=this.statCache[e];if(!o){var s;try{s=n.lstatSync(e)}catch(t){if(t&&("ENOENT"===t.code||"ENOTDIR"===t.code))return this.statCache[e]=!1,!1}if(s&&s.isSymbolicLink())try{o=n.statSync(e)}catch(t){o=s}else o=s}this.statCache[e]=o;i=!0;return o&&(i=o.isDirectory()?"DIR":"FILE"),this.cache[e]=this.cache[e]||i,(!r||"FILE"!==i)&&i},m.prototype._mark=function(t){return c.mark(this,t)},m.prototype._makeAbs=function(t){return c.makeAbs(this,t)}}).call(this,r(0))},function(t,e,r){(function(e){var n=r(94),i=Object.create(null),o=r(62);function s(t){for(var e=t.length,r=[],n=0;n<e;n++)r[n]=t[n];return r}t.exports=n((function(t,r){return i[t]?(i[t].push(r),null):(i[t]=[r],function(t){return o((function r(){var n=i[t],o=n.length,a=s(arguments);try{for(var u=0;u<o;u++)n[u].apply(null,a)}finally{n.length>o?(n.splice(0,o),e.nextTick((function(){r.apply(null,a)}))):delete i[t]}}))}(t))}))}).call(this,r(0))},function(t,e,r){
|
|
54
|
-
/**
|
|
55
|
-
* Archiver Core
|
|
56
|
-
*
|
|
57
|
-
* @ignore
|
|
58
|
-
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
59
|
-
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
60
|
-
*/
|
|
61
|
-
var n=r(12);const i={ABORTED:"archive was aborted",DIRECTORYDIRPATHREQUIRED:"diretory dirpath argument must be a non-empty string value",DIRECTORYFUNCTIONINVALIDDATA:"invalid data returned by directory custom data function",ENTRYNAMEREQUIRED:"entry name must be a non-empty string value",FILEFILEPATHREQUIRED:"file filepath argument must be a non-empty string value",FINALIZING:"archive already finalizing",QUEUECLOSED:"queue closed",NOENDMETHOD:"no suitable finalize/end method defined by module",DIRECTORYNOTSUPPORTED:"support for directory entries not defined by module",FORMATSET:"archive format already set",INPUTSTEAMBUFFERREQUIRED:"input source must be valid Stream or Buffer instance",MODULESET:"module already set",SYMLINKNOTSUPPORTED:"support for symlink entries not defined by module",SYMLINKFILEPATHREQUIRED:"symlink filepath argument must be a non-empty string value",SYMLINKTARGETREQUIRED:"symlink target argument must be a non-empty string value",ENTRYNOTSUPPORTED:"entry not supported"};function o(t,e){Error.captureStackTrace(this,this.constructor),this.message=i[t]||t,this.code=t,this.data=e}n.inherits(o,Error),t.exports=o},function(t,e){},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(9).Buffer,a=r(197).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,c;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),c&&o(e,c),t}()},function(t,e){},function(t,e,r){"use strict";(function(e){var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(63),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function d(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[f].read();null!==r&&(t[l]=null,t[s]=null,t[a]=null,e(d(r,!1)))}}function m(t){e.nextTick(p,t)}var g=Object.getPrototypeOf((function(){})),_=Object.setPrototypeOf((i(n={get stream(){return this[f]},next:function(){var t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(d(void 0,!0));if(this[f].destroyed)return new Promise((function(r,n){e.nextTick((function(){t[u]?n(t[u]):r(d(void 0,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(d(void 0,!0)):e[h](r,n)}),n)}}(i,this));else{var o=this[f].read();if(null!==o)return Promise.resolve(d(o,!1));n=new Promise(this[h])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[f].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),g);t.exports=function(t){var e,r=Object.create(_,(i(e={},f,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,h,{value:function(t,e){var n=r[f].read();n?(r[l]=null,r[s]=null,r[a]=null,t(d(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[l]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[c]=!0})),t.on("readable",m.bind(null,r)),r}}).call(this,r(0))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,r){"use strict";t.exports=i;var n=r(101);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(4)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";var n;var i=r(21).codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(63)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(c),o||(s.forEach(c),i(n))}))}));return e.reduce(l)}},function(t,e,r){
|
|
62
|
-
/**
|
|
63
|
-
* ZIP Format Plugin
|
|
64
|
-
*
|
|
65
|
-
* @module plugins/zip
|
|
66
|
-
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
67
|
-
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
68
|
-
*/
|
|
69
|
-
var n=r(203),i=r(35),o=function(t){if(!(this instanceof o))return new o(t);t=this.options=i.defaults(t,{comment:"",forceUTC:!1,namePrependSlash:!1,store:!1}),this.supports={directory:!0,symlink:!0},this.engine=new n(t)};o.prototype.append=function(t,e,r){this.engine.entry(t,e,r)},o.prototype.finalize=function(){this.engine.finalize()},o.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},o.prototype.pipe=function(){return this.engine.pipe.apply(this.engine,arguments)},o.prototype.unpipe=function(){return this.engine.unpipe.apply(this.engine,arguments)},t.exports=o},function(t,e,r){
|
|
70
|
-
/**
|
|
71
|
-
* ZipStream
|
|
72
|
-
*
|
|
73
|
-
* @ignore
|
|
74
|
-
* @license [MIT]{@link https://github.com/archiverjs/node-zip-stream/blob/master/LICENSE}
|
|
75
|
-
* @copyright (c) 2014 Chris Talkington, contributors.
|
|
76
|
-
*/
|
|
77
|
-
var n=r(12).inherits,i=r(102).ZipArchiveOutputStream,o=r(102).ZipArchiveEntry,s=r(35),a=t.exports=function(t){if(!(this instanceof a))return new a(t);(t=this.options=t||{}).zlib=t.zlib||{},i.call(this,t),"number"==typeof t.level&&t.level>=0&&(t.zlib.level=t.level,delete t.level),t.forceZip64||"number"!=typeof t.zlib.level||0!==t.zlib.level||(t.store=!0),t.namePrependSlash=t.namePrependSlash||!1,t.comment&&t.comment.length>0&&this.setComment(t.comment)};n(a,i),a.prototype._normalizeFileData=function(t){var e="directory"===(t=s.defaults(t,{type:"file",name:null,namePrependSlash:this.options.namePrependSlash,linkname:null,date:null,mode:null,store:this.options.store,comment:""})).type,r="symlink"===t.type;return t.name&&(t.name=s.sanitizePath(t.name),r||"/"!==t.name.slice(-1)?e&&(t.name+="/"):(e=!0,t.type="directory")),(e||r)&&(t.store=!0),t.date=s.dateify(t.date),t},a.prototype.entry=function(t,e,r){if("function"!=typeof r&&(r=this._emitErrorCallback.bind(this)),"file"===(e=this._normalizeFileData(e)).type||"directory"===e.type||"symlink"===e.type)if("string"==typeof e.name&&0!==e.name.length){if("symlink"!==e.type||"string"==typeof e.linkname){var n=new o(e.name);return n.setTime(e.date,this.options.forceLocalTime),e.namePrependSlash&&n.setName(e.name,!0),e.store&&n.setMethod(0),e.comment.length>0&&n.setComment(e.comment),"symlink"===e.type&&"number"!=typeof e.mode&&(e.mode=40960),"number"==typeof e.mode&&("symlink"===e.type&&(e.mode|=40960),n.setUnixMode(e.mode)),"symlink"===e.type&&"string"==typeof e.linkname&&(t=Buffer.from(e.linkname)),i.prototype.entry.call(this,n,t,r)}r(new Error("entry linkname must be a non-empty string value when type equals symlink"))}else r(new Error("entry name must be a non-empty string value"));else r(new Error(e.type+" entries not currently supported"))},a.prototype.finalize=function(){this.finish()}},function(t,e){t.exports={PERM_MASK:4095,FILE_TYPE_FLAG:61440,LINK_FLAG:40960,FILE_FLAG:32768,DIR_FLAG:16384,DEFAULT_LINK_PERM:511,DEFAULT_DIR_PERM:493,DEFAULT_FILE_PERM:420}},function(t,e){},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(9).Buffer,a=r(207).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,c;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),c&&o(e,c),t}()},function(t,e){},function(t,e,r){"use strict";(function(e){var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(66),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function d(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[f].read();null!==r&&(t[l]=null,t[s]=null,t[a]=null,e(d(r,!1)))}}function m(t){e.nextTick(p,t)}var g=Object.getPrototypeOf((function(){})),_=Object.setPrototypeOf((i(n={get stream(){return this[f]},next:function(){var t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(d(void 0,!0));if(this[f].destroyed)return new Promise((function(r,n){e.nextTick((function(){t[u]?n(t[u]):r(d(void 0,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(d(void 0,!0)):e[h](r,n)}),n)}}(i,this));else{var o=this[f].read();if(null!==o)return Promise.resolve(d(o,!1));n=new Promise(this[h])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[f].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),g);t.exports=function(t){var e,r=Object.create(_,(i(e={},f,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,h,{value:function(t,e){var n=r[f].read();n?(r[l]=null,r[s]=null,r[a]=null,t(d(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[l]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[c]=!0})),t.on("readable",m.bind(null,r)),r}}).call(this,r(0))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,r){"use strict";t.exports=i;var n=r(113);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(4)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";var n;var i=r(23).codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(66)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(c),o||(s.forEach(c),i(n))}))}));return e.reduce(l)}},function(t,e,r){var n=r(12).inherits,i=r(115),{CRC32Stream:o}=r(116),{DeflateCRC32Stream:s}=r(116),a=r(106),u=(r(103),r(104),r(105)),c=(r(114),r(65)),l=t.exports=function(t){if(!(this instanceof l))return new l(t);t=this.options=this._defaults(t),a.call(this,t),this._entry=null,this._entries=[],this._archive={centralLength:0,centralOffset:0,comment:"",finish:!1,finished:!1,processing:!1,forceZip64:t.forceZip64,forceLocalTime:t.forceLocalTime}};n(l,a),l.prototype._afterAppend=function(t){this._entries.push(t),t.getGeneralPurposeBit().usesDataDescriptor()&&this._writeDataDescriptor(t),this._archive.processing=!1,this._entry=null,this._archive.finish&&!this._archive.finished&&this._finish()},l.prototype._appendBuffer=function(t,e,r){0===e.length&&t.setMethod(u.METHOD_STORED);var n=t.getMethod();return n===u.METHOD_STORED&&(t.setSize(e.length),t.setCompressedSize(e.length),t.setCrc(i.unsigned(e))),this._writeLocalFileHeader(t),n===u.METHOD_STORED?(this.write(e),this._afterAppend(t),void r(null,t)):n===u.METHOD_DEFLATED?void this._smartStream(t,r).end(e):void r(new Error("compression method "+n+" not implemented"))},l.prototype._appendStream=function(t,e,r){t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(u.MIN_VERSION_DATA_DESCRIPTOR),this._writeLocalFileHeader(t);var n=this._smartStream(t,r);e.once("error",(function(t){n.emit("error",t),n.end()})),e.pipe(n)},l.prototype._defaults=function(t){return"object"!=typeof t&&(t={}),"object"!=typeof t.zlib&&(t.zlib={}),"number"!=typeof t.zlib.level&&(t.zlib.level=u.ZLIB_BEST_SPEED),t.forceZip64=!!t.forceZip64,t.forceLocalTime=!!t.forceLocalTime,t},l.prototype._finish=function(){this._archive.centralOffset=this.offset,this._entries.forEach(function(t){this._writeCentralFileHeader(t)}.bind(this)),this._archive.centralLength=this.offset-this._archive.centralOffset,this.isZip64()&&this._writeCentralDirectoryZip64(),this._writeCentralDirectoryEnd(),this._archive.processing=!1,this._archive.finish=!0,this._archive.finished=!0,this.end()},l.prototype._normalizeEntry=function(t){-1===t.getMethod()&&t.setMethod(u.METHOD_DEFLATED),t.getMethod()===u.METHOD_DEFLATED&&(t.getGeneralPurposeBit().useDataDescriptor(!0),t.setVersionNeededToExtract(u.MIN_VERSION_DATA_DESCRIPTOR)),-1===t.getTime()&&t.setTime(new Date,this._archive.forceLocalTime),t._offsets={file:0,data:0,contents:0}},l.prototype._smartStream=function(t,e){var r=t.getMethod()===u.METHOD_DEFLATED?new s(this.options.zlib):new o,n=null;return r.once("end",function(){var i=r.digest().readUInt32BE(0);t.setCrc(i),t.setSize(r.size()),t.setCompressedSize(r.size(!0)),this._afterAppend(t),e(n,t)}.bind(this)),r.once("error",(function(t){n=t})),r.pipe(this,{end:!1}),r},l.prototype._writeCentralDirectoryEnd=function(){var t=this._entries.length,e=this._archive.centralLength,r=this._archive.centralOffset;this.isZip64()&&(t=u.ZIP64_MAGIC_SHORT,e=u.ZIP64_MAGIC,r=u.ZIP64_MAGIC),this.write(c.getLongBytes(u.SIG_EOCD)),this.write(u.SHORT_ZERO),this.write(u.SHORT_ZERO),this.write(c.getShortBytes(t)),this.write(c.getShortBytes(t)),this.write(c.getLongBytes(e)),this.write(c.getLongBytes(r));var n=this.getComment(),i=Buffer.byteLength(n);this.write(c.getShortBytes(i)),this.write(n)},l.prototype._writeCentralDirectoryZip64=function(){this.write(c.getLongBytes(u.SIG_ZIP64_EOCD)),this.write(c.getEightBytes(44)),this.write(c.getShortBytes(u.MIN_VERSION_ZIP64)),this.write(c.getShortBytes(u.MIN_VERSION_ZIP64)),this.write(u.LONG_ZERO),this.write(u.LONG_ZERO),this.write(c.getEightBytes(this._entries.length)),this.write(c.getEightBytes(this._entries.length)),this.write(c.getEightBytes(this._archive.centralLength)),this.write(c.getEightBytes(this._archive.centralOffset)),this.write(c.getLongBytes(u.SIG_ZIP64_EOCD_LOC)),this.write(u.LONG_ZERO),this.write(c.getEightBytes(this._archive.centralOffset+this._archive.centralLength)),this.write(c.getLongBytes(1))},l.prototype._writeCentralFileHeader=function(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),n=t._offsets,i=t.getSize(),o=t.getCompressedSize();if(t.isZip64()||n.file>u.ZIP64_MAGIC){i=u.ZIP64_MAGIC,o=u.ZIP64_MAGIC,t.setVersionNeededToExtract(u.MIN_VERSION_ZIP64);var s=Buffer.concat([c.getShortBytes(u.ZIP64_EXTRA_ID),c.getShortBytes(24),c.getEightBytes(t.getSize()),c.getEightBytes(t.getCompressedSize()),c.getEightBytes(n.file)],28);t.setExtra(s)}this.write(c.getLongBytes(u.SIG_CFH)),this.write(c.getShortBytes(t.getPlatform()<<8|u.VERSION_MADEBY)),this.write(c.getShortBytes(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(c.getShortBytes(r)),this.write(c.getLongBytes(t.getTimeDos())),this.write(c.getLongBytes(t.getCrc())),this.write(c.getLongBytes(o)),this.write(c.getLongBytes(i));var a=t.getName(),l=t.getComment(),h=t.getCentralDirectoryExtra();e.usesUTF8ForNames()&&(a=Buffer.from(a),l=Buffer.from(l)),this.write(c.getShortBytes(a.length)),this.write(c.getShortBytes(h.length)),this.write(c.getShortBytes(l.length)),this.write(u.SHORT_ZERO),this.write(c.getShortBytes(t.getInternalAttributes())),this.write(c.getLongBytes(t.getExternalAttributes())),n.file>u.ZIP64_MAGIC?this.write(c.getLongBytes(u.ZIP64_MAGIC)):this.write(c.getLongBytes(n.file)),this.write(a),this.write(h),this.write(l)},l.prototype._writeDataDescriptor=function(t){this.write(c.getLongBytes(u.SIG_DD)),this.write(c.getLongBytes(t.getCrc())),t.isZip64()?(this.write(c.getEightBytes(t.getCompressedSize())),this.write(c.getEightBytes(t.getSize()))):(this.write(c.getLongBytes(t.getCompressedSize())),this.write(c.getLongBytes(t.getSize())))},l.prototype._writeLocalFileHeader=function(t){var e=t.getGeneralPurposeBit(),r=t.getMethod(),n=t.getName(),i=t.getLocalFileDataExtra();t.isZip64()&&(e.useDataDescriptor(!0),t.setVersionNeededToExtract(u.MIN_VERSION_ZIP64)),e.usesUTF8ForNames()&&(n=Buffer.from(n)),t._offsets.file=this.offset,this.write(c.getLongBytes(u.SIG_LFH)),this.write(c.getShortBytes(t.getVersionNeededToExtract())),this.write(e.encode()),this.write(c.getShortBytes(r)),this.write(c.getLongBytes(t.getTimeDos())),t._offsets.data=this.offset,e.usesDataDescriptor()?(this.write(u.LONG_ZERO),this.write(u.LONG_ZERO),this.write(u.LONG_ZERO)):(this.write(c.getLongBytes(t.getCrc())),this.write(c.getLongBytes(t.getCompressedSize())),this.write(c.getLongBytes(t.getSize()))),this.write(c.getShortBytes(n.length)),this.write(c.getShortBytes(i.length)),this.write(n),this.write(i),t._offsets.contents=this.offset},l.prototype.getComment=function(t){return null!==this._archive.comment?this._archive.comment:""},l.prototype.isZip64=function(){return this._archive.forceZip64||this._entries.length>u.ZIP64_MAGIC_SHORT||this._archive.centralLength>u.ZIP64_MAGIC||this._archive.centralOffset>u.ZIP64_MAGIC},l.prototype.setComment=function(t){this._archive.comment=t}},function(t,e,r){"use strict";const{Transform:n}=r(214),i=r(123);t.exports=class extends n{constructor(t){super(t),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0}_transform(t,e,r){t&&(this.checksum=i.buf(t,this.checksum)>>>0,this.rawSize+=t.length),r(null,t)}digest(t){const e=Buffer.allocUnsafe(4);return e.writeUInt32BE(this.checksum>>>0,0),t?e.toString(t):e}hex(){return this.digest("hex").toUpperCase()}size(){return this.rawSize}}},function(t,e,r){(e=t.exports=r(117)).Stream=e,e.Readable=e,e.Writable=r(121),e.Duplex=r(26),e.Transform=r(122),e.PassThrough=r(220),e.finished=r(67),e.pipeline=r(221)},function(t,e){},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(9).Buffer,a=r(217).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,c;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),c&&o(e,c),t}()},function(t,e){},function(t,e,r){"use strict";(function(e){var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(67),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function d(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[f].read();null!==r&&(t[l]=null,t[s]=null,t[a]=null,e(d(r,!1)))}}function m(t){e.nextTick(p,t)}var g=Object.getPrototypeOf((function(){})),_=Object.setPrototypeOf((i(n={get stream(){return this[f]},next:function(){var t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(d(void 0,!0));if(this[f].destroyed)return new Promise((function(r,n){e.nextTick((function(){t[u]?n(t[u]):r(d(void 0,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(d(void 0,!0)):e[h](r,n)}),n)}}(i,this));else{var o=this[f].read();if(null!==o)return Promise.resolve(d(o,!1));n=new Promise(this[h])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[f].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),g);t.exports=function(t){var e,r=Object.create(_,(i(e={},f,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,h,{value:function(t,e){var n=r[f].read();n?(r[l]=null,r[s]=null,r[a]=null,t(d(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[l]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[c]=!0})),t.on("readable",m.bind(null,r)),r}}).call(this,r(0))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,r){"use strict";t.exports=i;var n=r(122);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(4)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";var n;var i=r(25).codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(67)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(c),o||(s.forEach(c),i(n))}))}));return e.reduce(l)}},function(t,e,r){"use strict";const{DeflateRaw:n}=r(54),i=r(123);t.exports=class extends n{constructor(t){super(t),this.checksum=Buffer.allocUnsafe(4),this.checksum.writeInt32BE(0,0),this.rawSize=0,this.compressedSize=0}push(t,e){return t&&(this.compressedSize+=t.length),super.push(t,e)}_transform(t,e,r){t&&(this.checksum=i.buf(t,this.checksum)>>>0,this.rawSize+=t.length),super._transform(t,e,r)}digest(t){const e=Buffer.allocUnsafe(4);return e.writeUInt32BE(this.checksum>>>0,0),t?e.toString(t):e}hex(){return this.digest("hex").toUpperCase()}size(t=!1){return t?this.compressedSize:this.rawSize}}},function(t,e,r){
|
|
78
|
-
/**
|
|
79
|
-
* TAR Format Plugin
|
|
80
|
-
*
|
|
81
|
-
* @module plugins/tar
|
|
82
|
-
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
83
|
-
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
84
|
-
*/
|
|
85
|
-
var n=r(54),i=r(224),o=r(35),s=function(t){if(!(this instanceof s))return new s(t);"object"!=typeof(t=this.options=o.defaults(t,{gzip:!1})).gzipOptions&&(t.gzipOptions={}),this.supports={directory:!0,symlink:!0},this.engine=i.pack(t),this.compressor=!1,t.gzip&&(this.compressor=n.createGzip(t.gzipOptions),this.compressor.on("error",this._onCompressorError.bind(this)))};s.prototype._onCompressorError=function(t){this.engine.emit("error",t)},s.prototype.append=function(t,e,r){var n=this;function i(t,i){t?r(t):n.engine.entry(e,i,(function(t){r(t,e)}))}if(e.mtime=e.date,"buffer"===e.sourceType)i(null,t);else if("stream"===e.sourceType&&e.stats){e.size=e.stats.size;var s=n.engine.entry(e,(function(t){r(t,e)}));t.pipe(s)}else"stream"===e.sourceType&&o.collectStream(t,i)},s.prototype.finalize=function(){this.engine.finalize()},s.prototype.on=function(){return this.engine.on.apply(this.engine,arguments)},s.prototype.pipe=function(t,e){return this.compressor?this.engine.pipe.apply(this.engine,[this.compressor]).pipe(t,e):this.engine.pipe.apply(this.engine,arguments)},s.prototype.unpipe=function(){return this.compressor?this.compressor.unpipe.apply(this.compressor,arguments):this.engine.unpipe.apply(this.engine,arguments)},t.exports=s},function(t,e,r){e.extract=r(225),e.pack=r(243)},function(t,e,r){var n=r(12),i=r(226),o=r(130),s=r(52).Writable,a=r(52).PassThrough,u=function(){},c=function(t){return(t&=511)&&512-t},l=function(t,e){this._parent=t,this.offset=e,a.call(this,{autoDestroy:!1})};n.inherits(l,a),l.prototype.destroy=function(t){this._parent.destroy(t)};var h=function(t){if(!(this instanceof h))return new h(t);s.call(this,t),t=t||{},this._offset=0,this._buffer=i(),this._missing=0,this._partial=!1,this._onparse=u,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var e=this,r=e._buffer,n=function(){e._continue()},a=function(t){if(e._locked=!1,t)return e.destroy(t);e._stream||n()},f=function(){e._stream=null;var t=c(e._header.size);t?e._parse(t,d):e._parse(512,b),e._locked||n()},d=function(){e._buffer.consume(c(e._header.size)),e._parse(512,b),n()},p=function(){var t=e._header.size;e._paxGlobal=o.decodePax(r.slice(0,t)),r.consume(t),f()},m=function(){var t=e._header.size;e._pax=o.decodePax(r.slice(0,t)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(t),f()},g=function(){var n=e._header.size;this._gnuLongPath=o.decodeLongPath(r.slice(0,n),t.filenameEncoding),r.consume(n),f()},_=function(){var n=e._header.size;this._gnuLongLinkPath=o.decodeLongPath(r.slice(0,n),t.filenameEncoding),r.consume(n),f()},b=function(){var i,s=e._offset;try{i=e._header=o.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(t){e.emit("error",t)}return r.consume(512),i?"gnu-long-path"===i.type?(e._parse(i.size,g),void n()):"gnu-long-link-path"===i.type?(e._parse(i.size,_),void n()):"pax-global-header"===i.type?(e._parse(i.size,p),void n()):"pax-header"===i.type?(e._parse(i.size,m),void n()):(e._gnuLongPath&&(i.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(i.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=i=function(t,e){return e.path&&(t.name=e.path),e.linkpath&&(t.linkname=e.linkpath),e.size&&(t.size=parseInt(e.size,10)),t.pax=e,t}(i,e._pax),e._pax=null),e._locked=!0,i.size&&"directory"!==i.type?(e._stream=new l(e,s),e.emit("entry",i,e._stream,a),e._parse(i.size,f),void n()):(e._parse(512,b),void e.emit("entry",i,function(t,e){var r=new l(t,e);return r.end(),r}(e,s),a))):(e._parse(512,b),void n())};this._onheader=b,this._parse(512,b)};n.inherits(h,s),h.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.emit("close"))},h.prototype._parse=function(t,e){this._destroyed||(this._offset+=t,this._missing=t,e===this._onheader&&(this._partial=!1),this._onparse=e)},h.prototype._continue=function(){if(!this._destroyed){var t=this._cb;this._cb=u,this._overflow?this._write(this._overflow,void 0,t):t()}},h.prototype._write=function(t,e,r){if(!this._destroyed){var n=this._stream,i=this._buffer,o=this._missing;if(t.length&&(this._partial=!0),t.length<o)return this._missing-=t.length,this._overflow=null,n?n.write(t,r):(i.append(t),r());this._cb=r,this._missing=0;var s=null;t.length>o&&(s=t.slice(o),t=t.slice(0,o)),n?n.end(t):i.append(t),this._overflow=s,this._onparse()}},h.prototype._final=function(t){if(this._partial)return this.destroy(new Error("Unexpected end of data"));t()},t.exports=h},function(t,e,r){"use strict";const n=r(227).Duplex,i=r(4),o=r(235);function s(t){if(!(this instanceof s))return new s(t);if("function"==typeof t){this._callback=t;const e=function(t){this._callback&&(this._callback(t),this._callback=null)}.bind(this);this.on("pipe",(function(t){t.on("error",e)})),this.on("unpipe",(function(t){t.removeListener("error",e)})),t=null}o._init.call(this,t),n.call(this)}i(s,n),Object.assign(s.prototype,o.prototype),s.prototype._new=function(t){return new s(t)},s.prototype._write=function(t,e,r){this._appendBuffer(t),"function"==typeof r&&r()},s.prototype._read=function(t){if(!this.length)return this.push(null);t=Math.min(t,this.length),this.push(this.slice(0,t)),this.consume(t)},s.prototype.end=function(t){n.prototype.end.call(this,t),this._callback&&(this._callback(null,this.slice()),this._callback=null)},s.prototype._destroy=function(t,e){this._bufs.length=0,this.length=0,e(t)},s.prototype._isBufferList=function(t){return t instanceof s||t instanceof o||s.isBufferList(t)},s.isBufferList=o.isBufferList,t.exports=s,t.exports.BufferListStream=s,t.exports.BufferList=o},function(t,e,r){(e=t.exports=r(124)).Stream=e,e.Readable=e,e.Writable=r(128),e.Duplex=r(28),e.Transform=r(129),e.PassThrough=r(233),e.finished=r(68),e.pipeline=r(234)},function(t,e){},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(9).Buffer,a=r(230).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,c;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),c&&o(e,c),t}()},function(t,e){},function(t,e,r){"use strict";(function(e){var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(68),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function d(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[f].read();null!==r&&(t[l]=null,t[s]=null,t[a]=null,e(d(r,!1)))}}function m(t){e.nextTick(p,t)}var g=Object.getPrototypeOf((function(){})),_=Object.setPrototypeOf((i(n={get stream(){return this[f]},next:function(){var t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(d(void 0,!0));if(this[f].destroyed)return new Promise((function(r,n){e.nextTick((function(){t[u]?n(t[u]):r(d(void 0,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(d(void 0,!0)):e[h](r,n)}),n)}}(i,this));else{var o=this[f].read();if(null!==o)return Promise.resolve(d(o,!1));n=new Promise(this[h])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[f].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),g);t.exports=function(t){var e,r=Object.create(_,(i(e={},f,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,h,{value:function(t,e){var n=r[f].read();n?(r[l]=null,r[s]=null,r[a]=null,t(d(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[l]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[c]=!0})),t.on("readable",m.bind(null,r)),r}}).call(this,r(0))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,r){"use strict";t.exports=i;var n=r(129);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(4)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";var n;var i=r(27).codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(68)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(c),o||(s.forEach(c),i(n))}))}));return e.reduce(l)}},function(t,e,r){"use strict";const{Buffer:n}=r(9),i=Symbol.for("BufferList");function o(t){if(!(this instanceof o))return new o(t);o._init.call(this,t)}o._init=function(t){Object.defineProperty(this,i,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)},o.prototype._new=function(t){return new o(t)},o.prototype._offset=function(t){if(0===t)return[0,0];let e=0;for(let r=0;r<this._bufs.length;r++){const n=e+this._bufs[r].length;if(t<n||r===this._bufs.length-1)return[r,t-e];e=n}},o.prototype._reverseOffset=function(t){const e=t[0];let r=t[1];for(let t=0;t<e;t++)r+=this._bufs[t].length;return r},o.prototype.get=function(t){if(t>this.length||t<0)return;const e=this._offset(t);return this._bufs[e[0]][e[1]]},o.prototype.slice=function(t,e){return"number"==typeof t&&t<0&&(t+=this.length),"number"==typeof e&&e<0&&(e+=this.length),this.copy(null,0,t,e)},o.prototype.copy=function(t,e,r,i){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof i||i>this.length)&&(i=this.length),r>=this.length)return t||n.alloc(0);if(i<=0)return t||n.alloc(0);const o=!!t,s=this._offset(r),a=i-r;let u=a,c=o&&e||0,l=s[1];if(0===r&&i===this.length){if(!o)return 1===this._bufs.length?this._bufs[0]:n.concat(this._bufs,this.length);for(let e=0;e<this._bufs.length;e++)this._bufs[e].copy(t,c),c+=this._bufs[e].length;return t}if(u<=this._bufs[s[0]].length-l)return o?this._bufs[s[0]].copy(t,e,l,l+u):this._bufs[s[0]].slice(l,l+u);o||(t=n.allocUnsafe(a));for(let e=s[0];e<this._bufs.length;e++){const r=this._bufs[e].length-l;if(!(u>r)){this._bufs[e].copy(t,c,l,l+u),c+=r;break}this._bufs[e].copy(t,c,l),c+=r,u-=r,l&&(l=0)}return t.length>c?t.slice(0,c):t},o.prototype.shallowSlice=function(t,e){if(t=t||0,e="number"!=typeof e?this.length:e,t<0&&(t+=this.length),e<0&&(e+=this.length),t===e)return this._new();const r=this._offset(t),n=this._offset(e),i=this._bufs.slice(r[0],n[0]+1);return 0===n[1]?i.pop():i[i.length-1]=i[i.length-1].slice(0,n[1]),0!==r[1]&&(i[0]=i[0].slice(r[1])),this._new(i)},o.prototype.toString=function(t,e,r){return this.slice(e,r).toString(t)},o.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;){if(!(t>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},o.prototype.duplicate=function(){const t=this._new();for(let e=0;e<this._bufs.length;e++)t.append(this._bufs[e]);return t},o.prototype.append=function(t){if(null==t)return this;if(t.buffer)this._appendBuffer(n.from(t.buffer,t.byteOffset,t.byteLength));else if(Array.isArray(t))for(let e=0;e<t.length;e++)this.append(t[e]);else if(this._isBufferList(t))for(let e=0;e<t._bufs.length;e++)this.append(t._bufs[e]);else"number"==typeof t&&(t=t.toString()),this._appendBuffer(n.from(t));return this},o.prototype._appendBuffer=function(t){this._bufs.push(t),this.length+=t.length},o.prototype.indexOf=function(t,e,r){if(void 0===r&&"string"==typeof e&&(r=e,e=void 0),"function"==typeof t||Array.isArray(t))throw new TypeError('The "value" argument must be one of type string, Buffer, BufferList, or Uint8Array.');if("number"==typeof t?t=n.from([t]):"string"==typeof t?t=n.from(t,r):this._isBufferList(t)?t=t.slice():Array.isArray(t.buffer)?t=n.from(t.buffer,t.byteOffset,t.byteLength):n.isBuffer(t)||(t=n.from(t)),e=Number(e||0),isNaN(e)&&(e=0),e<0&&(e=this.length+e),e<0&&(e=0),0===t.length)return e>this.length?this.length:e;const i=this._offset(e);let o=i[0],s=i[1];for(;o<this._bufs.length;o++){const e=this._bufs[o];for(;s<e.length;){if(e.length-s>=t.length){const r=e.indexOf(t,s);if(-1!==r)return this._reverseOffset([o,r]);s=e.length-t.length+1}else{const e=this._reverseOffset([o,s]);if(this._match(e,t))return e;s++}}s=0}return-1},o.prototype._match=function(t,e){if(this.length-t<e.length)return!1;for(let r=0;r<e.length;r++)if(this.get(t+r)!==e[r])return!1;return!0},function(){const t={readDoubleBE:8,readDoubleLE:8,readFloatBE:4,readFloatLE:4,readInt32BE:4,readInt32LE:4,readUInt32BE:4,readUInt32LE:4,readInt16BE:2,readInt16LE:2,readUInt16BE:2,readUInt16LE:2,readInt8:1,readUInt8:1,readIntBE:null,readIntLE:null,readUIntBE:null,readUIntLE:null};for(const e in t)!function(e){o.prototype[e]=null===t[e]?function(t,r){return this.slice(t,t+r)[e](0,r)}:function(r=0){return this.slice(r,r+t[e])[e](0)}}(e)}(),o.prototype._isBufferList=function(t){return t instanceof o||o.isBufferList(t)},o.isBufferList=function(t){return null!=t&&t[i]},t.exports=o},function(t,e){},function(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(9).Buffer,a=r(238).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,c;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}])&&o(e.prototype,r),c&&o(e,c),t}()},function(t,e){},function(t,e,r){"use strict";(function(e){var n;function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=r(69),s=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function d(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[f].read();null!==r&&(t[l]=null,t[s]=null,t[a]=null,e(d(r,!1)))}}function m(t){e.nextTick(p,t)}var g=Object.getPrototypeOf((function(){})),_=Object.setPrototypeOf((i(n={get stream(){return this[f]},next:function(){var t=this,r=this[u];if(null!==r)return Promise.reject(r);if(this[c])return Promise.resolve(d(void 0,!0));if(this[f].destroyed)return new Promise((function(r,n){e.nextTick((function(){t[u]?n(t[u]):r(d(void 0,!0))}))}));var n,i=this[l];if(i)n=new Promise(function(t,e){return function(r,n){t.then((function(){e[c]?r(d(void 0,!0)):e[h](r,n)}),n)}}(i,this));else{var o=this[f].read();if(null!==o)return Promise.resolve(d(o,!1));n=new Promise(this[h])}return this[l]=n,n}},Symbol.asyncIterator,(function(){return this})),i(n,"return",(function(){var t=this;return new Promise((function(e,r){t[f].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),g);t.exports=function(t){var e,r=Object.create(_,(i(e={},f,{value:t,writable:!0}),i(e,s,{value:null,writable:!0}),i(e,a,{value:null,writable:!0}),i(e,u,{value:null,writable:!0}),i(e,c,{value:t._readableState.endEmitted,writable:!0}),i(e,h,{value:function(t,e){var n=r[f].read();n?(r[l]=null,r[s]=null,r[a]=null,t(d(n,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[l]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[l]=null,r[s]=null,r[a]=null,e(t)),void(r[u]=t)}var n=r[s];null!==n&&(r[l]=null,r[s]=null,r[a]=null,n(d(void 0,!0))),r[c]=!0})),t.on("readable",m.bind(null,r)),r}}).call(this,r(0))},function(t,e){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(t,e,r){"use strict";t.exports=i;var n=r(136);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(4)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},function(t,e,r){"use strict";var n;var i=r(29).codes,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(69)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function c(t){t()}function l(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(c),o||(s.forEach(c),i(n))}))}));return e.reduce(l)}},function(t,e,r){(function(e){var n=r(244),i=r(245),o=r(4),s=Buffer.alloc,a=r(52).Readable,u=r(52).Writable,c=r(13).StringDecoder,l=r(130),h=parseInt("755",8),f=parseInt("644",8),d=s(1024),p=function(){},m=function(t,e){(e&=511)&&t.push(d.slice(0,512-e))};var g=function(t){u.call(this),this.written=0,this._to=t,this._destroyed=!1};o(g,u),g.prototype._write=function(t,e,r){if(this.written+=t.length,this._to.push(t))return r();this._to._drain=r},g.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var _=function(){u.call(this),this.linkname="",this._decoder=new c("utf-8"),this._destroyed=!1};o(_,u),_.prototype._write=function(t,e,r){this.linkname+=this._decoder.write(t),r()},_.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var b=function(){u.call(this),this._destroyed=!1};o(b,u),b.prototype._write=function(t,e,r){r(new Error("No body allowed for this entry"))},b.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var y=function(t){if(!(this instanceof y))return new y(t);a.call(this,t),this._drain=p,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};o(y,a),y.prototype.entry=function(t,r,o){if(this._stream)throw new Error("already piping an entry");if(!this._finalized&&!this._destroyed){"function"==typeof r&&(o=r,r=null),o||(o=p);var s=this;if(t.size&&"symlink"!==t.type||(t.size=0),t.type||(t.type=function(t){switch(t&n.S_IFMT){case n.S_IFBLK:return"block-device";case n.S_IFCHR:return"character-device";case n.S_IFDIR:return"directory";case n.S_IFIFO:return"fifo";case n.S_IFLNK:return"symlink"}return"file"}(t.mode)),t.mode||(t.mode="directory"===t.type?h:f),t.uid||(t.uid=0),t.gid||(t.gid=0),t.mtime||(t.mtime=new Date),"string"==typeof r&&(r=Buffer.from(r)),Buffer.isBuffer(r)){t.size=r.length,this._encode(t);var a=this.push(r);return m(s,t.size),a?e.nextTick(o):this._drain=o,new b}if("symlink"===t.type&&!t.linkname){var u=new _;return i(u,(function(e){if(e)return s.destroy(),o(e);t.linkname=u.linkname,s._encode(t),o()})),u}if(this._encode(t),"file"!==t.type&&"contiguous-file"!==t.type)return e.nextTick(o),new b;var c=new g(this);return this._stream=c,i(c,(function(e){return s._stream=null,e?(s.destroy(),o(e)):c.written!==t.size?(s.destroy(),o(new Error("size mismatch"))):(m(s,t.size),s._finalizing&&s.finalize(),void o())})),c}},y.prototype.finalize=function(){this._stream?this._finalizing=!0:this._finalized||(this._finalized=!0,this.push(d),this.push(null))},y.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())},y.prototype._encode=function(t){if(!t.pax){var e=l.encode(t);if(e)return void this.push(e)}this._encodePax(t)},y.prototype._encodePax=function(t){var e=l.encodePax({name:t.name,linkname:t.linkname,pax:t.pax}),r={name:"PaxHeader",mode:t.mode,uid:t.uid,gid:t.gid,size:e.length,mtime:t.mtime,type:"pax-header",linkname:t.linkname&&"PaxHeader",uname:t.uname,gname:t.gname,devmajor:t.devmajor,devminor:t.devminor};this.push(l.encode(r)),this.push(e),m(this,e.length),r.size=t.size,r.type=t.type,this.push(l.encode(r))},y.prototype._read=function(t){var e=this._drain;this._drain=p,e()},t.exports=y}).call(this,r(0))},function(t,e,r){t.exports=r(89)},function(t,e,r){(function(e){var n=r(62),i=function(){},o=function(t,r,s){if("function"==typeof r)return o(t,null,r);r||(r={}),s=n(s||i);var a=t._writableState,u=t._readableState,c=r.readable||!1!==r.readable&&t.readable,l=r.writable||!1!==r.writable&&t.writable,h=!1,f=function(){t.writable||d()},d=function(){l=!1,c||s.call(t)},p=function(){c=!1,l||s.call(t)},m=function(e){s.call(t,e?new Error("exited with error code: "+e):null)},g=function(e){s.call(t,e)},_=function(){e.nextTick(b)},b=function(){if(!h)return(!c||u&&u.ended&&!u.destroyed)&&(!l||a&&a.ended&&!a.destroyed)?void 0:s.call(t,new Error("premature close"))},y=function(){t.req.on("finish",d)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(t)?l&&!a&&(t.on("end",f),t.on("close",f)):(t.on("complete",d),t.on("abort",_),t.req?y():t.on("request",y)),function(t){return t.stdio&&Array.isArray(t.stdio)&&3===t.stdio.length}(t)&&t.on("exit",m),t.on("end",p),t.on("finish",d),!1!==r.error&&t.on("error",g),t.on("close",_),function(){h=!0,t.removeListener("complete",d),t.removeListener("abort",_),t.removeListener("request",y),t.req&&t.req.removeListener("finish",d),t.removeListener("end",f),t.removeListener("close",f),t.removeListener("finish",d),t.removeListener("exit",m),t.removeListener("end",p),t.removeListener("error",g),t.removeListener("close",_)}};t.exports=o}).call(this,r(0))},function(t,e,r){
|
|
86
|
-
/**
|
|
87
|
-
* JSON Format Plugin
|
|
88
|
-
*
|
|
89
|
-
* @module plugins/json
|
|
90
|
-
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
91
|
-
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
92
|
-
*/
|
|
93
|
-
var n=r(12).inherits,i=r(95).Transform,o=r(115),s=r(35),a=function(t){if(!(this instanceof a))return new a(t);t=this.options=s.defaults(t,{}),i.call(this,t),this.supports={directory:!0,symlink:!0},this.files=[]};n(a,i),a.prototype._transform=function(t,e,r){r(null,t)},a.prototype._writeStringified=function(){var t=JSON.stringify(this.files);this.write(t)},a.prototype.append=function(t,e,r){var n=this;function i(t,i){t?r(t):(e.size=i.length||0,e.crc32=o.unsigned(i),n.files.push(e),r(null,e))}e.crc32=0,"buffer"===e.sourceType?i(null,t):"stream"===e.sourceType&&s.collectStream(t,i)},a.prototype.finalize=function(){this._writeStringified(),this.end()},t.exports=a},function(t,e,r){"use strict";r.r(e),r.d(e,"I3SConverter",(function(){return Fu})),r.d(e,"NodePages",(function(){return ua})),r.d(e,"Tiles3DConverter",(function(){return hl})),r.d(e,"DepsInstaller",(function(){return fl.a}));var n={};r.r(n),r.d(n,"name",(function(){return Go})),r.d(n,"preprocess",(function(){return jo})),r.d(n,"decode",(function(){return Ho}));var i={};r.r(i),r.d(i,"name",(function(){return Qo})),r.d(i,"preprocess",(function(){return qo}));var o={};r.r(o),r.d(o,"name",(function(){return Vo})),r.d(o,"preprocess",(function(){return Zo}));var s={};r.r(s),r.d(s,"name",(function(){return Yo})),r.d(s,"preprocess",(function(){return $o})),r.d(s,"decode",(function(){return ts})),r.d(s,"encode",(function(){return es}));var a={};r.r(a),r.d(a,"name",(function(){return os})),r.d(a,"decode",(function(){return ss})),r.d(a,"encode",(function(){return as}));var u={};r.r(u),r.d(u,"name",(function(){return us})),r.d(u,"decode",(function(){return cs})),r.d(u,"encode",(function(){return ls}));var c={};r.r(c),r.d(c,"name",(function(){return hs})),r.d(c,"decode",(function(){return fs})),r.d(c,"encode",(function(){return ds}));var l=r(2);function h(t,e){if(!t)throw new Error("math.gl assertion ".concat(e))}const f=1/Math.PI*180,d=1/180*Math.PI,p={};function m(t,{precision:e=p.precision||4}={}){return t=function(t){return Math.round(t/p.EPSILON)*p.EPSILON}(t),"".concat(parseFloat(t.toPrecision(e)))}function g(t){return Array.isArray(t)||ArrayBuffer.isView(t)&&!(t instanceof DataView)}function _(t,e,r){if(g(t)){r=r||((n=t).clone?n.clone():new Array(n.length));for(let n=0;n<r.length&&n<t.length;++n)r[n]=e(t[n],n,r);return r}var n;return e(t)}function b(t){return function(t,e){return _(t,t=>t*d,e)}(t)}function y(t){return w(t)}function w(t,e){return _(t,t=>t*f,e)}function v(t,e,r){return _(t,t=>Math.max(e,Math.min(r,t)))}function A(t,e,r){const n=p.EPSILON;r&&(p.EPSILON=r);try{if(t===e)return!0;if(g(t)&&g(e)){if(t.length!==e.length)return!1;for(let r=0;r<t.length;++r)if(!A(t[r],e[r]))return!1;return!0}return t&&t.equals?t.equals(e):e&&e.equals?e.equals(t):!(!Number.isFinite(t)||!Number.isFinite(e))&&Math.abs(t-e)<=p.EPSILON*Math.max(1,Math.abs(t),Math.abs(e))}finally{p.EPSILON=n}}function E(t){if(!Number.isFinite(t))throw new Error("Invalid number ".concat(t));return t}function S(t,e,r=""){if(p.debug&&!function(t,e){if(t.length!==e)return!1;for(let e=0;e<t.length;++e)if(!Number.isFinite(t[e]))return!1;return!0}(t,e))throw new Error("math.gl: ".concat(r," some fields set to invalid numbers'"));return t}p.EPSILON=1e-12,p.debug=!1,p.precision=4,p.printTypes=!1,p.printDegrees=!1,p.printRowMajor=!0;const B={};function C(t,e){B[t]||(B[t]=!0,console.warn("".concat(t," has been removed in version ").concat(e,", see upgrade guide for more information")))}class T extends(function(t){function e(){var e=Reflect.construct(t,Array.from(arguments));return Object.setPrototypeOf(e,Object.getPrototypeOf(this)),e}return e.prototype=Object.create(t.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t,e}(Array)){get ELEMENTS(){return h(!1),0}clone(){return(new this.constructor).copy(this)}from(t){return Array.isArray(t)?this.copy(t):this.fromObject(t)}fromArray(t,e=0){for(let r=0;r<this.ELEMENTS;++r)this[r]=t[r+e];return this.check()}to(t){return t===this?this:g(t)?this.toArray(t):this.toObject(t)}toTarget(t){return t?this.to(t):this}toArray(t=[],e=0){for(let r=0;r<this.ELEMENTS;++r)t[e+r]=this[r];return t}toFloat32Array(){return new Float32Array(this)}toString(){return this.formatString(p)}formatString(t){let e="";for(let r=0;r<this.ELEMENTS;++r)e+=(r>0?", ":"")+m(this[r],t);return"".concat(t.printTypes?this.constructor.name:"","[").concat(e,"]")}equals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(!A(this[e],t[e]))return!1;return!0}exactEquals(t){if(!t||this.length!==t.length)return!1;for(let e=0;e<this.ELEMENTS;++e)if(this[e]!==t[e])return!1;return!0}negate(){for(let t=0;t<this.ELEMENTS;++t)this[t]=-this[t];return this.check()}lerp(t,e,r){void 0===r&&(r=e,e=t,t=this);for(let n=0;n<this.ELEMENTS;++n){const i=t[n];this[n]=i+r*(e[n]-i)}return this.check()}min(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.min(t[e],this[e]);return this.check()}max(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=Math.max(t[e],this[e]);return this.check()}clamp(t,e){for(let r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],t[r]),e[r]);return this.check()}add(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]+=e[t];return this.check()}subtract(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]-=e[t];return this.check()}scale(t){if(Array.isArray(t))return this.multiply(t);for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}sub(t){return this.subtract(t)}setScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]=t;return this.check()}addScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]+=t;return this.check()}subScalar(t){return this.addScalar(-t)}multiplyScalar(t){for(let e=0;e<this.ELEMENTS;++e)this[e]*=t;return this.check()}divideScalar(t){return this.scale(1/t)}clampScalar(t,e){for(let r=0;r<this.ELEMENTS;++r)this[r]=Math.min(Math.max(this[r],t),e);return this.check()}multiplyByScalar(t){return this.scale(t)}get elements(){return this}check(){if(p.debug&&!this.validate())throw new Error("math.gl: ".concat(this.constructor.name," some fields set to invalid numbers'"));return this}validate(){let t=this.length===this.ELEMENTS;for(let e=0;e<this.ELEMENTS;++e)t=t&&Number.isFinite(this[e]);return t}}class R extends T{get ELEMENTS(){return h(!1),0}get RANK(){return h(!1),0}toString(){let t="[";if(p.printRowMajor){t+="row-major:";for(let e=0;e<this.RANK;++e)for(let r=0;r<this.RANK;++r)t+=" ".concat(this[r*this.RANK+e])}else{t+="column-major:";for(let e=0;e<this.ELEMENTS;++e)t+=" ".concat(this[e])}return t+="]",t}getElementIndex(t,e){return e*this.RANK+t}getElement(t,e){return this[e*this.RANK+t]}setElement(t,e,r){return this[e*this.RANK+t]=E(r),this}getColumn(t,e=new Array(this.RANK).fill(-0)){const r=t*this.RANK;for(let t=0;t<this.RANK;++t)e[t]=this[r+t];return e}setColumn(t,e){const r=t*this.RANK;for(let t=0;t<this.RANK;++t)this[r+t]=e[t];return this}}function O(t,e,r){const n=e[0],i=e[1],o=r[3]*n+r[7]*i||1;return t[0]=(r[0]*n+r[4]*i)/o,t[1]=(r[1]*n+r[5]*i)/o,t}function I(t,e,r){const n=e[0],i=e[1],o=e[2],s=r[3]*n+r[7]*i+r[11]*o||1;return t[0]=(r[0]*n+r[4]*i+r[8]*o)/s,t[1]=(r[1]*n+r[5]*i+r[9]*o)/s,t[2]=(r[2]*n+r[6]*i+r[10]*o)/s,t}function M(t,e,r){const n=e[0],i=e[1],o=e[2];return t[0]=r[0]*n+r[3]*i+r[6]*o,t[1]=r[1]*n+r[4]*i+r[7]*o,t[2]=r[2]*n+r[5]*i+r[8]*o,t[3]=e[3],t}var x=1e-6,D="undefined"!=typeof Float32Array?Float32Array:Array;Math.random;Math.PI;function k(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],m=e[12],g=e[13],_=e[14],b=e[15],y=r[0],w=r[1],v=r[2],A=r[3];return t[0]=y*n+w*a+v*h+A*m,t[1]=y*i+w*u+v*f+A*g,t[2]=y*o+w*c+v*d+A*_,t[3]=y*s+w*l+v*p+A*b,y=r[4],w=r[5],v=r[6],A=r[7],t[4]=y*n+w*a+v*h+A*m,t[5]=y*i+w*u+v*f+A*g,t[6]=y*o+w*c+v*d+A*_,t[7]=y*s+w*l+v*p+A*b,y=r[8],w=r[9],v=r[10],A=r[11],t[8]=y*n+w*a+v*h+A*m,t[9]=y*i+w*u+v*f+A*g,t[10]=y*o+w*c+v*d+A*_,t[11]=y*s+w*l+v*p+A*b,y=r[12],w=r[13],v=r[14],A=r[15],t[12]=y*n+w*a+v*h+A*m,t[13]=y*i+w*u+v*f+A*g,t[14]=y*o+w*c+v*d+A*_,t[15]=y*s+w*l+v*p+A*b,t}function P(t,e,r){var n=r[0],i=r[1],o=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*i,t[5]=e[5]*i,t[6]=e[6]*i,t[7]=e[7]*i,t[8]=e[8]*o,t[9]=e[9]*o,t[10]=e[10]*o,t[11]=e[11]*o,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function L(t,e){var r=e[0],n=e[1],i=e[2],o=e[4],s=e[5],a=e[6],u=e[8],c=e[9],l=e[10];return t[0]=Math.hypot(r,n,i),t[1]=Math.hypot(o,s,a),t[2]=Math.hypot(u,c,l),t}Math.hypot||(Math.hypot=function(){for(var t=0,e=arguments.length;e--;)t+=arguments[e]*arguments[e];return Math.sqrt(t)});function F(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[3]*i+r[6],t[1]=r[1]*n+r[4]*i+r[7],t}function N(t,e,r){var n=e[0],i=e[1];return t[0]=r[0]*n+r[4]*i+r[12],t[1]=r[1]*n+r[5]*i+r[13],t}var U,G;U=new D(2),D!=Float32Array&&(U[0]=0,U[1]=0),G=U;function j(){var t=new D(3);return D!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t}function H(t){var e=t[0],r=t[1],n=t[2];return Math.hypot(e,r,n)}function z(t,e,r){var n=new D(3);return n[0]=t,n[1]=e,n[2]=r,n}function J(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function W(t,e,r){var n=e[0],i=e[1],o=e[2],s=r[0],a=r[1],u=r[2];return t[0]=i*u-o*a,t[1]=o*s-n*u,t[2]=n*a-i*s,t}function K(t,e,r){var n=e[0],i=e[1],o=e[2],s=r[3]*n+r[7]*i+r[11]*o+r[15];return s=s||1,t[0]=(r[0]*n+r[4]*i+r[8]*o+r[12])/s,t[1]=(r[1]*n+r[5]*i+r[9]*o+r[13])/s,t[2]=(r[2]*n+r[6]*i+r[10]*o+r[14])/s,t}function Q(t,e,r){var n=e[0],i=e[1],o=e[2];return t[0]=n*r[0]+i*r[3]+o*r[6],t[1]=n*r[1]+i*r[4]+o*r[7],t[2]=n*r[2]+i*r[5]+o*r[8],t}function q(t,e,r){var n=r[0],i=r[1],o=r[2],s=r[3],a=e[0],u=e[1],c=e[2],l=i*c-o*u,h=o*a-n*c,f=n*u-i*a,d=i*f-o*h,p=o*l-n*f,m=n*h-i*l,g=2*s;return l*=g,h*=g,f*=g,d*=2,p*=2,m*=2,t[0]=a+l+d,t[1]=u+h+p,t[2]=c+f+m,t}var V=H;!function(){var t=j()}();function Z(t){var e=t[0],r=t[1],n=t[2],i=t[3];return Math.hypot(e,r,n,i)}function X(t){var e=t[0],r=t[1],n=t[2],i=t[3];return e*e+r*r+n*n+i*i}!function(){var t=function(){var t=new D(4);return D!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0,t[3]=0),t}()}();const Y=Object.freeze([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),$=Object.freeze([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),tt=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL0ROW3:3,COL1ROW0:4,COL1ROW1:5,COL1ROW2:6,COL1ROW3:7,COL2ROW0:8,COL2ROW1:9,COL2ROW2:10,COL2ROW3:11,COL3ROW0:12,COL3ROW1:13,COL3ROW2:14,COL3ROW3:15}),et={};class rt extends R{static get IDENTITY(){return et.IDENTITY=et.IDENTITY||Object.freeze(new rt(Y)),et.IDENTITY}static get ZERO(){return et.ZERO=et.ZERO||Object.freeze(new rt($)),et.ZERO}get INDICES(){return tt}get ELEMENTS(){return 16}get RANK(){return 4}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this[9]=t[9],this[10]=t[10],this[11]=t[11],this[12]=t[12],this[13]=t[13],this[14]=t[14],this[15]=t[15],this.check()}set(t,e,r,n,i,o,s,a,u,c,l,h,f,d,p,m){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this[4]=i,this[5]=o,this[6]=s,this[7]=a,this[8]=u,this[9]=c,this[10]=l,this[11]=h,this[12]=f,this[13]=d,this[14]=p,this[15]=m,this.check()}setRowMajor(t,e,r,n,i,o,s,a,u,c,l,h,f,d,p,m){return this[0]=t,this[1]=i,this[2]=u,this[3]=f,this[4]=e,this[5]=o,this[6]=c,this[7]=d,this[8]=r,this[9]=s,this[10]=l,this[11]=p,this[12]=n,this[13]=a,this[14]=h,this[15]=m,this.check()}toRowMajor(t){return t[0]=this[0],t[1]=this[4],t[2]=this[8],t[3]=this[12],t[4]=this[1],t[5]=this[5],t[6]=this[9],t[7]=this[13],t[8]=this[2],t[9]=this[6],t[10]=this[10],t[11]=this[14],t[12]=this[3],t[13]=this[7],t[14]=this[11],t[15]=this[15],t}identity(){return this.copy(Y)}fromQuaternion(t){return function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=r+r,a=n+n,u=i+i,c=r*s,l=n*s,h=n*a,f=i*s,d=i*a,p=i*u,m=o*s,g=o*a,_=o*u;t[0]=1-h-p,t[1]=l+_,t[2]=f-g,t[3]=0,t[4]=l-_,t[5]=1-c-p,t[6]=d+m,t[7]=0,t[8]=f+g,t[9]=d-m,t[10]=1-c-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1}(this,t),this.check()}frustum({left:t,right:e,bottom:r,top:n,near:i,far:o}){return o===1/0?rt._computeInfinitePerspectiveOffCenter(this,t,e,r,n,i):function(t,e,r,n,i,o,s){var a=1/(r-e),u=1/(i-n),c=1/(o-s);t[0]=2*o*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*o*u,t[6]=0,t[7]=0,t[8]=(r+e)*a,t[9]=(i+n)*u,t[10]=(s+o)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=s*o*2*c,t[15]=0}(this,t,e,r,n,i,o),this.check()}static _computeInfinitePerspectiveOffCenter(t,e,r,n,i,o){const s=2*o/(r-e),a=2*o/(i-n),u=(r+e)/(r-e),c=(i+n)/(i-n),l=-2*o;return t[0]=s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=u,t[9]=c,t[10]=-1,t[11]=-1,t[12]=0,t[13]=0,t[14]=l,t[15]=0,t}lookAt(t,e,r){return 1===arguments.length&&({eye:t,center:e,up:r}=t),function(t,e,r,n){var i,o,s,a,u,c,l,h,f,d,p=e[0],m=e[1],g=e[2],_=n[0],b=n[1],y=n[2],w=r[0],v=r[1],A=r[2];Math.abs(p-w)<x&&Math.abs(m-v)<x&&Math.abs(g-A)<x?function(t){t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1}(t):(l=p-w,h=m-v,f=g-A,i=b*(f*=d=1/Math.hypot(l,h,f))-y*(h*=d),o=y*(l*=d)-_*f,s=_*h-b*l,(d=Math.hypot(i,o,s))?(i*=d=1/d,o*=d,s*=d):(i=0,o=0,s=0),a=h*s-f*o,u=f*i-l*s,c=l*o-h*i,(d=Math.hypot(a,u,c))?(a*=d=1/d,u*=d,c*=d):(a=0,u=0,c=0),t[0]=i,t[1]=a,t[2]=l,t[3]=0,t[4]=o,t[5]=u,t[6]=h,t[7]=0,t[8]=s,t[9]=c,t[10]=f,t[11]=0,t[12]=-(i*p+o*m+s*g),t[13]=-(a*p+u*m+c*g),t[14]=-(l*p+h*m+f*g),t[15]=1)}(this,t,e=e||[0,0,0],r=r||[0,1,0]),this.check()}ortho({left:t,right:e,bottom:r,top:n,near:i=.1,far:o=500}){return function(t,e,r,n,i,o,s){var a=1/(e-r),u=1/(n-i),c=1/(o-s);t[0]=-2*a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*a,t[13]=(i+n)*u,t[14]=(s+o)*c,t[15]=1}(this,t,e,r,n,i,o),this.check()}orthographic({fovy:t=45*Math.PI/180,aspect:e=1,focalDistance:r=1,near:n=.1,far:i=500}){if(t>2*Math.PI)throw Error("radians");const o=t/2,s=r*Math.tan(o),a=s*e;return(new rt).ortho({left:-a,right:a,bottom:-s,top:s,near:n,far:i})}perspective({fovy:t,fov:e=45*Math.PI/180,aspect:r=1,near:n=.1,far:i=500}={}){if((t=t||e)>2*Math.PI)throw Error("radians");return function(t,e,r,n,i){var o,s=1/Math.tan(e/2);t[0]=s/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=i&&i!==1/0?(o=1/(n-i),t[10]=(i+n)*o,t[14]=2*i*n*o):(t[10]=-1,t[14]=-2*n)}(this,t,r,n,i),this.check()}determinant(){return e=(t=this)[0],r=t[1],n=t[2],i=t[3],o=t[4],s=t[5],a=t[6],u=t[7],c=t[8],l=t[9],h=t[10],f=t[11],d=t[12],p=t[13],m=t[14],g=t[15],(e*s-r*o)*(h*g-f*m)-(e*a-n*o)*(l*g-f*p)+(e*u-i*o)*(l*m-h*p)+(r*a-n*s)*(c*g-f*d)-(r*u-i*s)*(c*m-h*d)+(n*u-i*a)*(c*p-l*d);var t,e,r,n,i,o,s,a,u,c,l,h,f,d,p,m,g}getScale(t=[-0,-0,-0]){return t[0]=Math.sqrt(this[0]*this[0]+this[1]*this[1]+this[2]*this[2]),t[1]=Math.sqrt(this[4]*this[4]+this[5]*this[5]+this[6]*this[6]),t[2]=Math.sqrt(this[8]*this[8]+this[9]*this[9]+this[10]*this[10]),t}getTranslation(t=[-0,-0,-0]){return t[0]=this[12],t[1]=this[13],t[2]=this[14],t}getRotation(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0,-0],e=null){const r=this.getScale(e||[-0,-0,-0]),n=1/r[0],i=1/r[1],o=1/r[2];return t[0]=this[0]*n,t[1]=this[1]*i,t[2]=this[2]*o,t[3]=0,t[4]=this[4]*n,t[5]=this[5]*i,t[6]=this[6]*o,t[7]=0,t[8]=this[8]*n,t[9]=this[9]*i,t[10]=this[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}getRotationMatrix3(t=[-0,-0,-0,-0,-0,-0,-0,-0,-0],e=null){const r=this.getScale(e||[-0,-0,-0]),n=1/r[0],i=1/r[1],o=1/r[2];return t[0]=this[0]*n,t[1]=this[1]*i,t[2]=this[2]*o,t[3]=this[4]*n,t[4]=this[5]*i,t[5]=this[6]*o,t[6]=this[8]*n,t[7]=this[9]*i,t[8]=this[10]*o,t}transpose(){return function(t,e){if(t===e){var r=e[1],n=e[2],i=e[3],o=e[6],s=e[7],a=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=o,t[11]=e[14],t[12]=i,t[13]=s,t[14]=a}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15]}(this,this),this.check()}invert(){return function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=e[4],a=e[5],u=e[6],c=e[7],l=e[8],h=e[9],f=e[10],d=e[11],p=e[12],m=e[13],g=e[14],_=e[15],b=r*a-n*s,y=r*u-i*s,w=r*c-o*s,v=n*u-i*a,A=n*c-o*a,E=i*c-o*u,S=l*m-h*p,B=l*g-f*p,C=l*_-d*p,T=h*g-f*m,R=h*_-d*m,O=f*_-d*g,I=b*O-y*R+w*T+v*C-A*B+E*S;I&&(I=1/I,t[0]=(a*O-u*R+c*T)*I,t[1]=(i*R-n*O-o*T)*I,t[2]=(m*E-g*A+_*v)*I,t[3]=(f*A-h*E-d*v)*I,t[4]=(u*C-s*O-c*B)*I,t[5]=(r*O-i*C+o*B)*I,t[6]=(g*w-p*E-_*y)*I,t[7]=(l*E-f*w+d*y)*I,t[8]=(s*R-a*C+c*S)*I,t[9]=(n*C-r*R-o*S)*I,t[10]=(p*A-m*w+_*b)*I,t[11]=(h*w-l*A-d*b)*I,t[12]=(a*B-s*T-u*S)*I,t[13]=(r*T-n*B+i*S)*I,t[14]=(m*y-p*v-g*b)*I,t[15]=(l*v-h*y+f*b)*I)}(this,this),this.check()}multiplyLeft(t){return k(this,t,this),this.check()}multiplyRight(t){return k(this,this,t),this.check()}rotateX(t){return function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[4],s=e[5],a=e[6],u=e[7],c=e[8],l=e[9],h=e[10],f=e[11];e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=o*i+c*n,t[5]=s*i+l*n,t[6]=a*i+h*n,t[7]=u*i+f*n,t[8]=c*i-o*n,t[9]=l*i-s*n,t[10]=h*i-a*n,t[11]=f*i-u*n}(this,this,t),this.check()}rotateY(t){return function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],s=e[1],a=e[2],u=e[3],c=e[8],l=e[9],h=e[10],f=e[11];e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i-c*n,t[1]=s*i-l*n,t[2]=a*i-h*n,t[3]=u*i-f*n,t[8]=o*n+c*i,t[9]=s*n+l*i,t[10]=a*n+h*i,t[11]=u*n+f*i}(this,this,t),this.check()}rotateZ(t){return function(t,e,r){var n=Math.sin(r),i=Math.cos(r),o=e[0],s=e[1],a=e[2],u=e[3],c=e[4],l=e[5],h=e[6],f=e[7];e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=o*i+c*n,t[1]=s*i+l*n,t[2]=a*i+h*n,t[3]=u*i+f*n,t[4]=c*i-o*n,t[5]=l*i-s*n,t[6]=h*i-a*n,t[7]=f*i-u*n}(this,this,t),this.check()}rotateXYZ([t,e,r]){return this.rotateX(t).rotateY(e).rotateZ(r)}rotateAxis(t,e){return function(t,e,r,n){var i,o,s,a,u,c,l,h,f,d,p,m,g,_,b,y,w,v,A,E,S,B,C,T,R=n[0],O=n[1],I=n[2],M=Math.hypot(R,O,I);M<x||(R*=M=1/M,O*=M,I*=M,i=Math.sin(r),s=1-(o=Math.cos(r)),a=e[0],u=e[1],c=e[2],l=e[3],h=e[4],f=e[5],d=e[6],p=e[7],m=e[8],g=e[9],_=e[10],b=e[11],y=R*R*s+o,w=O*R*s+I*i,v=I*R*s-O*i,A=R*O*s-I*i,E=O*O*s+o,S=I*O*s+R*i,B=R*I*s+O*i,C=O*I*s-R*i,T=I*I*s+o,t[0]=a*y+h*w+m*v,t[1]=u*y+f*w+g*v,t[2]=c*y+d*w+_*v,t[3]=l*y+p*w+b*v,t[4]=a*A+h*E+m*S,t[5]=u*A+f*E+g*S,t[6]=c*A+d*E+_*S,t[7]=l*A+p*E+b*S,t[8]=a*B+h*C+m*T,t[9]=u*B+f*C+g*T,t[10]=c*B+d*C+_*T,t[11]=l*B+p*C+b*T,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]))}(this,this,t,e),this.check()}scale(t){return Array.isArray(t)?P(this,this,t):P(this,this,[t,t,t]),this.check()}translate(t){return function(t,e,r){var n,i,o,s,a,u,c,l,h,f,d,p,m=r[0],g=r[1],_=r[2];e===t?(t[12]=e[0]*m+e[4]*g+e[8]*_+e[12],t[13]=e[1]*m+e[5]*g+e[9]*_+e[13],t[14]=e[2]*m+e[6]*g+e[10]*_+e[14],t[15]=e[3]*m+e[7]*g+e[11]*_+e[15]):(n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=e[9],d=e[10],p=e[11],t[0]=n,t[1]=i,t[2]=o,t[3]=s,t[4]=a,t[5]=u,t[6]=c,t[7]=l,t[8]=h,t[9]=f,t[10]=d,t[11]=p,t[12]=n*m+a*g+h*_+e[12],t[13]=i*m+u*g+f*_+e[13],t[14]=o*m+c*g+d*_+e[14],t[15]=s*m+l*g+p*_+e[15])}(this,this,t),this.check()}transform(t,e){return 4===t.length?(S(e=function(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3];return t[0]=r[0]*n+r[4]*i+r[8]*o+r[12]*s,t[1]=r[1]*n+r[5]*i+r[9]*o+r[13]*s,t[2]=r[2]*n+r[6]*i+r[10]*o+r[14]*s,t[3]=r[3]*n+r[7]*i+r[11]*o+r[15]*s,t}(e||[-0,-0,-0,-0],t,this),4),e):this.transformAsPoint(t,e)}transformAsPoint(t,e){const{length:r}=t;switch(r){case 2:e=N(e||[-0,-0],t,this);break;case 3:e=K(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return S(e,t.length),e}transformAsVector(t,e){switch(t.length){case 2:e=O(e||[-0,-0],t,this);break;case 3:e=I(e||[-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return S(e,t.length),e}makeRotationX(t){return this.identity().rotateX(t)}makeTranslation(t,e,r){return this.identity().translate([t,e,r])}transformPoint(t,e){return C("Matrix4.transformPoint","3.0"),this.transformAsPoint(t,e)}transformVector(t,e){return C("Matrix4.transformVector","3.0"),this.transformAsPoint(t,e)}transformDirection(t,e){return C("Matrix4.transformDirection","3.0"),this.transformAsVector(t,e)}}class nt extends T{get ELEMENTS(){return h(!1),0}copy(t){return h(!1),this}get x(){return this[0]}set x(t){this[0]=E(t)}get y(){return this[1]}set y(t){this[1]=E(t)}len(){return Math.sqrt(this.lengthSquared())}magnitude(){return this.len()}lengthSquared(){let t=0;for(let e=0;e<this.ELEMENTS;++e)t+=this[e]*this[e];return t}magnitudeSquared(){return this.lengthSquared()}distance(t){return Math.sqrt(this.distanceSquared(t))}distanceSquared(t){let e=0;for(let r=0;r<this.ELEMENTS;++r){const n=this[r]-t[r];e+=n*n}return E(e)}dot(t){let e=0;for(let r=0;r<this.ELEMENTS;++r)e+=this[r]*t[r];return E(e)}normalize(){const t=this.magnitude();if(0!==t)for(let e=0;e<this.ELEMENTS;++e)this[e]/=t;return this.check()}multiply(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]*=e[t];return this.check()}divide(...t){for(const e of t)for(let t=0;t<this.ELEMENTS;++t)this[t]/=e[t];return this.check()}lengthSq(){return this.lengthSquared()}distanceTo(t){return this.distance(t)}distanceToSquared(t){return this.distanceSquared(t)}getComponent(t){return h(t>=0&&t<this.ELEMENTS,"index is out of range"),E(this[t])}setComponent(t,e){return h(t>=0&&t<this.ELEMENTS,"index is out of range"),this[t]=e,this.check()}addVectors(t,e){return this.copy(t).add(e)}subVectors(t,e){return this.copy(t).subtract(e)}multiplyVectors(t,e){return this.copy(t).multiply(e)}addScaledVector(t,e){return this.add(new this.constructor(t).multiplyScalar(e))}}const it=[0,0,0],ot={};class st extends nt{static get ZERO(){return ot.ZERO=ot.ZERO||Object.freeze(new st(0,0,0,0))}constructor(t=0,e=0,r=0){super(-0,-0,-0),1===arguments.length&&g(t)?this.copy(t):(p.debug&&(E(t),E(e),E(r)),this[0]=t,this[1]=e,this[2]=r)}set(t,e,r){return this[0]=t,this[1]=e,this[2]=r,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this.check()}fromObject(t){return p.debug&&(E(t.x),E(t.y),E(t.z)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t}get ELEMENTS(){return 3}get z(){return this[2]}set z(t){this[2]=E(t)}angle(t){return r=t,n=(e=this)[0],i=e[1],o=e[2],s=r[0],a=r[1],u=r[2],c=Math.sqrt(n*n+i*i+o*o)*Math.sqrt(s*s+a*a+u*u),l=c&&J(e,r)/c,Math.acos(Math.min(Math.max(l,-1),1));var e,r,n,i,o,s,a,u,c,l}cross(t){return W(this,this,t),this.check()}rotateX({radians:t,origin:e=it}){return function(t,e,r,n){var i=[],o=[];i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],o[0]=i[0],o[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),o[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),t[0]=o[0]+r[0],t[1]=o[1]+r[1],t[2]=o[2]+r[2]}(this,this,e,t),this.check()}rotateY({radians:t,origin:e=it}){return function(t,e,r,n){var i=[],o=[];i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],o[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),o[1]=i[1],o[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),t[0]=o[0]+r[0],t[1]=o[1]+r[1],t[2]=o[2]+r[2]}(this,this,e,t),this.check()}rotateZ({radians:t,origin:e=it}){return function(t,e,r,n){var i=[],o=[];i[0]=e[0]-r[0],i[1]=e[1]-r[1],i[2]=e[2]-r[2],o[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),o[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),o[2]=i[2],t[0]=o[0]+r[0],t[1]=o[1]+r[1],t[2]=o[2]+r[2]}(this,this,e,t),this.check()}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return K(this,this,t),this.check()}transformAsVector(t){return I(this,this,t),this.check()}transformByMatrix3(t){return Q(this,this,t),this.check()}transformByMatrix2(t){return function(t,e,r){const n=e[0],i=e[1];t[0]=r[0]*n+r[2]*i,t[1]=r[1]*n+r[3]*i,t[2]=e[2]}(this,this,t),this.check()}transformByQuaternion(t){return q(this,this,t),this.check()}}var at=.1,ut=1e-12,ct=1e-15;Math.PI,Math.PI,Math.PI,Math.PI;Math.max(6378137,6378137,6356752.314245179);const lt=t=>t,ht=new st;function ft(t,e,r=lt){return g(t)?(e[0]=r(t[0]),e[1]=r(t[1]),e[2]=t[2]):"longitude"in t?(e[0]=r(t.longitude),e[1]=r(t.latitude),e[2]=t.height):(e[0]=r(t.x),e[1]=r(t.y),e[2]=t.z),e}function dt(t,e,r=lt){return g(e)?(e[0]=r(t[0]),e[1]=r(t[1]),e[2]=t[2]):"longitude"in e?(e.longitude=r(t[0]),e.latitude=r(t[1]),e.height=t[2]):(e.x=r(t[0]),e.y=r(t[1]),e.z=t[2]),e}const pt=new st,mt=new st,gt=new st;const _t=new st,bt={up:{south:"east",north:"west",west:"south",east:"north"},down:{south:"west",north:"east",west:"north",east:"south"},south:{up:"west",down:"east",west:"down",east:"up"},north:{up:"east",down:"west",west:"up",east:"down"},west:{up:"north",down:"south",north:"down",south:"up"},east:{up:"south",down:"north",north:"up",south:"down"}},yt={north:[-1,0,0],east:[0,1,0],up:[0,0,1],south:[1,0,0],west:[0,-1,0],down:[0,0,-1]},wt={east:new st,north:new st,up:new st,west:new st,south:new st,down:new st},vt=new st,At=new st,Et=new st;function St(t,e,r,n,i,o){const s=bt[e]&&bt[e][r];let a,u,c;h(s&&(!n||n===s));const l=_t.copy(i);if(A(l.x,0,1e-14)&&A(l.y,0,1e-14)){const t=Math.sign(l.z);a=vt.fromArray(yt[e]),"east"!==e&&"west"!==e&&a.scale(t),u=At.fromArray(yt[r]),"east"!==r&&"west"!==r&&u.scale(t),c=Et.fromArray(yt[n]),"east"!==n&&"west"!==n&&c.scale(t)}else{const{up:i,east:o,north:s}=wt;o.set(-l.y,l.x,0).normalize(),t.geodeticSurfaceNormal(l,i),s.copy(i).cross(o);const{down:h,west:f,south:d}=wt;h.copy(i).scale(-1),f.copy(o).scale(-1),d.copy(s).scale(-1),a=wt[e],u=wt[r],c=wt[n]}return o[0]=a.x,o[1]=a.y,o[2]=a.z,o[3]=0,o[4]=u.x,o[5]=u.y,o[6]=u.z,o[7]=0,o[8]=c.x,o[9]=c.y,o[10]=c.z,o[11]=0,o[12]=l.x,o[13]=l.y,o[14]=l.z,o[15]=1,o}const Bt=new st,Ct=new st,Tt=new st,Rt=new st,Ot=new st,It=new st;let Mt;class xt{static get WGS84(){return Mt=Mt||new xt(6378137,6378137,6356752.314245179),Mt}constructor(t=0,e=0,r=0){h(t>=0),h(e>=0),h(r>=0),this.radii=new st(t,e,r),this.radiiSquared=new st(t*t,e*e,r*r),this.radiiToTheFourth=new st(t*t*t*t,e*e*e*e,r*r*r*r),this.oneOverRadii=new st(0===t?0:1/t,0===e?0:1/e,0===r?0:1/r),this.oneOverRadiiSquared=new st(0===t?0:1/(t*t),0===e?0:1/(e*e),0===r?0:1/(r*r)),this.minimumRadius=Math.min(t,e,r),this.maximumRadius=Math.max(t,e,r),this.centerToleranceSquared=at,0!==this.radiiSquared.z&&(this.squaredXOverSquaredZ=this.radiiSquared.x/this.radiiSquared.z),Object.freeze(this)}equals(t){return this===t||Boolean(t&&this.radii.equals(t.radii))}toString(){return this.radii.toString()}cartographicToCartesian(t,e=[0,0,0]){const r=Ct,n=Tt,[,,i]=t;this.geodeticSurfaceNormalCartographic(t,r),n.copy(this.radiiSquared).scale(r);const o=Math.sqrt(r.dot(n));return n.scale(1/o),r.scale(i),n.add(r),n.to(e)}cartesianToCartographic(t,e=[0,0,0]){It.from(t);const r=this.scaleToGeodeticSurface(It,Rt);if(!r)return;const n=this.geodeticSurfaceNormal(r,Ct),i=Ot;i.copy(It).subtract(r);const o=Math.atan2(n.y,n.x),s=Math.asin(n.z),a=Math.sign(J(i,It))*H(i);return dt([o,s,a],e,p._cartographicRadians?lt:y)}eastNorthUpToFixedFrame(t,e=new rt){return St(this,"east","north","up",t,e)}localFrameToFixedFrame(t,e,r,n,i=new rt){return St(this,t,e,r,n,i)}geocentricSurfaceNormal(t,e=[0,0,0]){return Bt.from(t).normalize().to(e)}geodeticSurfaceNormalCartographic(t,e=[0,0,0]){const r=function(t,e=ht){return ft(t,e,p._cartographicRadians?lt:b)}(t),n=r[0],i=r[1],o=Math.cos(i);return Bt.set(o*Math.cos(n),o*Math.sin(n),Math.sin(i)).normalize(),Bt.to(e)}geodeticSurfaceNormal(t,e=[0,0,0]){return Bt.from(t).scale(this.oneOverRadiiSquared).normalize().to(e)}scaleToGeodeticSurface(t,e){return function(t,e,r=new st){const{oneOverRadii:n,oneOverRadiiSquared:i,centerToleranceSquared:o}=e;pt.from(t);const s=t.x,a=t.y,u=t.z,c=n.x,l=n.y,h=n.z,f=s*s*c*c,d=a*a*l*l,p=u*u*h*h,m=f+d+p,g=Math.sqrt(1/m);if(!Number.isFinite(g))return;const _=mt;if(_.copy(t).scale(g),m<o)return _.to(r);const b=i.x,y=i.y,w=i.z,v=gt;v.set(_.x*b*2,_.y*y*2,_.z*w*2);let A,E,S,B,C=(1-g)*t.len()/(.5*v.len()),T=0;do{C-=T,A=1/(1+C*b),E=1/(1+C*y),S=1/(1+C*w);const t=A*A,e=E*E,r=S*S;B=f*t+d*e+p*r-1;T=B/(-2*(f*(t*A)*b+d*(e*E)*y+p*(r*S)*w))}while(Math.abs(B)>ut);return pt.scale([A,E,S]).to(r)}(t,this,e)}scaleToGeocentricSurface(t,e=[0,0,0]){Rt.from(t);const r=Rt.x,n=Rt.y,i=Rt.z,o=this.oneOverRadiiSquared,s=1/Math.sqrt(r*r*o.x+n*n*o.y+i*i*o.z);return Rt.multiplyScalar(s).to(e)}transformPositionToScaledSpace(t,e=[0,0,0]){return Rt.from(t).scale(this.oneOverRadii).to(e)}transformPositionFromScaledSpace(t,e=[0,0,0]){return Rt.from(t).scale(this.radii).to(e)}getSurfaceNormalIntersectionWithZAxis(t,e=0,r=[0,0,0]){h(A(this.radii.x,this.radii.y,ct)),h(this.radii.z>0),Rt.from(t);const n=Rt.z*(1-this.squaredXOverSquaredZ);if(!(Math.abs(n)>=this.radii.z-e))return Rt.set(0,0,n).to(r)}}var Dt=r(58),kt=r(37),Pt=r(6),Lt=r(137);class Ft{constructor(t,e,r){this.item=t,this.previous=e,this.next=r}}class Nt{constructor(){this.head=null,this.tail=null,this._length=0}get length(){return this._length}add(t){const e=new Ft(t,this.tail,null);return this.tail?(this.tail.next=e,this.tail=e):(this.head=e,this.tail=e),++this._length,e}remove(t){t&&(t.previous&&t.next?(t.previous.next=t.next,t.next.previous=t.previous):t.previous?(t.previous.next=null,this.tail=t.previous):t.next?(t.next.previous=null,this.head=t.next):(this.head=null,this.tail=null),t.next=null,t.previous=null,--this._length)}splice(t,e){t!==e&&(this.remove(e),this._insert(t,e))}_insert(t,e){const r=t.next;t.next=e,this.tail===t?this.tail=e:r.previous=e,e.next=r,e.previous=t,++this._length}}function Ut(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Gt(t){return null!=t}class jt{constructor(){Ut(this,"_list",void 0),Ut(this,"_sentinel",void 0),Ut(this,"_trimTiles",void 0),this._list=new Nt,this._sentinel=this._list.add("sentinel"),this._trimTiles=!1}reset(){this._list.splice(this._list.tail,this._sentinel)}touch(t){const e=t._cacheNode;Gt(e)&&this._list.splice(this._sentinel,e)}add(t,e,r){Gt(e._cacheNode)||(e._cacheNode=this._list.add(e),r&&r(t,e))}unloadTile(t,e,r){const n=e._cacheNode;Gt(n)&&(this._list.remove(n),e._cacheNode=void 0,r&&r(t,e))}unloadTiles(t,e){const r=this._trimTiles;this._trimTiles=!1;const n=this._list,i=1024*t.maximumMemoryUsage*1024,o=this._sentinel;let s=n.head;for(;s!==o&&(t.gpuMemoryUsageInBytes>i||r);){const r=s.item;s=s.next,this.unloadTile(t,r,e)}}trim(){this._trimTiles=!0}}const Ht=Object.freeze({OUTSIDE:-1,INTERSECTING:0,INSIDE:1});new st,new st;const zt=new st,Jt=new st;class Wt{constructor(t=[0,0,0],e=0){this.radius=-0,this.center=new st,this.fromCenterRadius(t,e)}fromCenterRadius(t,e){return this.center.from(t),this.radius=e,this}fromCornerPoints(t,e){return e=zt.from(e),this.center=(new st).from(t).add(e).scale(.5),this.radius=this.center.distance(e),this}equals(t){return this===t||Boolean(t)&&this.center.equals(t.center)&&this.radius===t.radius}clone(){return new Wt(this.center,this.radius)}union(t){const e=this.center,r=this.radius,n=t.center,i=t.radius,o=zt.copy(n).subtract(e),s=o.magnitude();if(r>=s+i)return this.clone();if(i>=s+r)return t.clone();const a=.5*(r+s+i);return Jt.copy(o).scale((-r+a)/s).add(e),this.center.copy(Jt),this.radius=a,this}expand(t){const e=(t=zt.from(t)).subtract(this.center).magnitude();return e>this.radius&&(this.radius=e),this}transform(t){this.center.transform(t);const e=L(zt,t);return this.radius=Math.max(e[0],Math.max(e[1],e[2]))*this.radius,this}distanceSquaredTo(t){return(t=zt.from(t)).subtract(this.center).lengthSquared()-this.radius*this.radius}distanceTo(t){return Math.sqrt(this.distanceSquaredTo(t))}intersectPlane(t){const e=this.center,r=this.radius,n=t.normal.dot(e)+t.distance;return n<-r?Ht.OUTSIDE:n<r?Ht.INTERSECTING:Ht.INSIDE}}function Kt(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=r[0],d=r[1],p=r[2],m=r[3],g=r[4],_=r[5],b=r[6],y=r[7],w=r[8];return t[0]=f*n+d*s+p*c,t[1]=f*i+d*a+p*l,t[2]=f*o+d*u+p*h,t[3]=m*n+g*s+_*c,t[4]=m*i+g*a+_*l,t[5]=m*o+g*u+_*h,t[6]=b*n+y*s+w*c,t[7]=b*i+y*a+w*l,t[8]=b*o+y*u+w*h,t}function Qt(t,e,r){var n=r[0],i=r[1];return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t}const qt=Object.freeze([1,0,0,0,1,0,0,0,1]),Vt=Object.freeze([0,0,0,0,0,0,0,0,0]),Zt=Object.freeze({COL0ROW0:0,COL0ROW1:1,COL0ROW2:2,COL1ROW0:3,COL1ROW1:4,COL1ROW2:5,COL2ROW0:6,COL2ROW1:7,COL2ROW2:8}),Xt={};class Yt extends R{static get IDENTITY(){return Xt.IDENTITY=Xt.IDENTITY||Object.freeze(new Yt(qt)),Xt.IDENTITY}static get ZERO(){return Xt.ZERO=Xt.ZERO||Object.freeze(new Yt(Vt)),Xt.ZERO}get ELEMENTS(){return 9}get RANK(){return 3}get INDICES(){return Zt}constructor(t){super(-0,-0,-0,-0,-0,-0,-0,-0,-0),1===arguments.length&&Array.isArray(t)?this.copy(t):this.identity()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this[4]=t[4],this[5]=t[5],this[6]=t[6],this[7]=t[7],this[8]=t[8],this.check()}set(t,e,r,n,i,o,s,a,u){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this[4]=i,this[5]=o,this[6]=s,this[7]=a,this[8]=u,this.check()}setRowMajor(t,e,r,n,i,o,s,a,u){return this[0]=t,this[1]=n,this[2]=s,this[3]=e,this[4]=i,this[5]=a,this[6]=r,this[7]=o,this[8]=u,this.check()}determinant(){return e=(t=this)[0],r=t[1],n=t[2],i=t[3],o=t[4],s=t[5],a=t[6],u=t[7],c=t[8],e*(c*o-s*u)+r*(-c*i+s*a)+n*(u*i-o*a);var t,e,r,n,i,o,s,a,u,c}identity(){return this.copy(qt)}fromQuaternion(t){return function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=r+r,a=n+n,u=i+i,c=r*s,l=n*s,h=n*a,f=i*s,d=i*a,p=i*u,m=o*s,g=o*a,_=o*u;t[0]=1-h-p,t[3]=l-_,t[6]=f+g,t[1]=l+_,t[4]=1-c-p,t[7]=d-m,t[2]=f-g,t[5]=d+m,t[8]=1-c-h}(this,t),this.check()}transpose(){return function(t,e){if(t===e){var r=e[1],n=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=r,t[5]=e[7],t[6]=n,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8]}(this,this),this.check()}invert(){return function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=e[4],a=e[5],u=e[6],c=e[7],l=e[8],h=l*s-a*c,f=-l*o+a*u,d=c*o-s*u,p=r*h+n*f+i*d;p&&(p=1/p,t[0]=h*p,t[1]=(-l*n+i*c)*p,t[2]=(a*n-i*s)*p,t[3]=f*p,t[4]=(l*r-i*u)*p,t[5]=(-a*r+i*o)*p,t[6]=d*p,t[7]=(-c*r+n*u)*p,t[8]=(s*r-n*o)*p)}(this,this),this.check()}multiplyLeft(t){return Kt(this,t,this),this.check()}multiplyRight(t){return Kt(this,this,t),this.check()}rotate(t){return function(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=Math.sin(r),d=Math.cos(r);t[0]=d*n+f*s,t[1]=d*i+f*a,t[2]=d*o+f*u,t[3]=d*s-f*n,t[4]=d*a-f*i,t[5]=d*u-f*o,t[6]=c,t[7]=l,t[8]=h}(this,this,t),this.check()}scale(t){return Array.isArray(t)?Qt(this,this,t):Qt(this,this,[t,t,t]),this.check()}translate(t){return function(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=e[4],u=e[5],c=e[6],l=e[7],h=e[8],f=r[0],d=r[1];t[0]=n,t[1]=i,t[2]=o,t[3]=s,t[4]=a,t[5]=u,t[6]=f*n+d*s+c,t[7]=f*i+d*a+l,t[8]=f*o+d*u+h}(this,this,t),this.check()}transform(t,e){switch(t.length){case 2:e=F(e||[-0,-0],t,this);break;case 3:e=Q(e||[-0,-0,-0],t,this);break;case 4:e=M(e||[-0,-0,-0,-0],t,this);break;default:throw new Error("Illegal vector")}return S(e,t.length),e}transformVector(t,e){return C("Matrix3.transformVector"),this.transform(t,e)}transformVector2(t,e){return C("Matrix3.transformVector"),this.transform(t,e)}transformVector3(t,e){return C("Matrix3.transformVector"),this.transform(t,e)}}function $t(){var t=new D(4);return D!=Float32Array&&(t[0]=0,t[1]=0,t[2]=0),t[3]=1,t}function te(t,e,r){r*=.5;var n=Math.sin(r);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(r),t}function ee(t,e,r){var n=e[0],i=e[1],o=e[2],s=e[3],a=r[0],u=r[1],c=r[2],l=r[3];return t[0]=n*l+s*a+i*c-o*u,t[1]=i*l+s*u+o*a-n*c,t[2]=o*l+s*c+n*u-i*a,t[3]=s*l-n*a-i*u-o*c,t}function re(t,e,r,n){var i,o,s,a,u,c=e[0],l=e[1],h=e[2],f=e[3],d=r[0],p=r[1],m=r[2],g=r[3];return(o=c*d+l*p+h*m+f*g)<0&&(o=-o,d=-d,p=-p,m=-m,g=-g),1-o>x?(i=Math.acos(o),s=Math.sin(i),a=Math.sin((1-n)*i)/s,u=Math.sin(n*i)/s):(a=1-n,u=n),t[0]=a*c+u*d,t[1]=a*l+u*p,t[2]=a*h+u*m,t[3]=a*f+u*g,t}function ne(t,e){var r,n=e[0]+e[4]+e[8];if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[3*i+i]&&(i=2);var o=(i+1)%3,s=(i+2)%3;r=Math.sqrt(e[3*i+i]-e[3*o+o]-e[3*s+s]+1),t[i]=.5*r,r=.5/r,t[3]=(e[3*o+s]-e[3*s+o])*r,t[o]=(e[3*o+i]+e[3*i+o])*r,t[s]=(e[3*s+i]+e[3*i+s])*r}return t}var ie,oe,se,ae,ue,ce,le=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t},he=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t},fe=function(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]},de=function(t,e,r,n){var i=e[0],o=e[1],s=e[2],a=e[3];return t[0]=i+n*(r[0]-i),t[1]=o+n*(r[1]-o),t[2]=s+n*(r[2]-s),t[3]=a+n*(r[3]-a),t},pe=Z,me=X,ge=function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=r*r+n*n+i*i+o*o;return s>0&&(s=1/Math.sqrt(s)),t[0]=r*s,t[1]=n*s,t[2]=i*s,t[3]=o*s,t},_e=(ie=j(),oe=z(1,0,0),se=z(0,1,0),function(t,e,r){var n=J(e,r);return n<-.999999?(W(ie,oe,e),V(ie)<1e-6&&W(ie,se,e),function(t,e){var r=e[0],n=e[1],i=e[2],o=r*r+n*n+i*i;o>0&&(o=1/Math.sqrt(o)),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o}(ie,ie),te(t,ie,Math.PI),t):n>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):(W(ie,e,r),t[0]=ie[0],t[1]=ie[1],t[2]=ie[2],t[3]=1+n,ge(t,t))});ae=$t(),ue=$t(),ce=function(){var t=new D(9);return D!=Float32Array&&(t[1]=0,t[2]=0,t[3]=0,t[5]=0,t[6]=0,t[7]=0),t[0]=1,t[4]=1,t[8]=1,t}();const be=[0,0,0,1];class ye extends T{constructor(t=0,e=0,r=0,n=1){super(-0,-0,-0,-0),Array.isArray(t)&&1===arguments.length?this.copy(t):this.set(t,e,r,n)}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}set(t,e,r,n){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this.check()}fromMatrix3(t){return ne(this,t),this.check()}identity(){return function(t){t[0]=0,t[1]=0,t[2]=0,t[3]=1}(this),this.check()}fromAxisRotation(t,e){return te(this,t,e),this.check()}setAxisAngle(t,e){return this.fromAxisRotation(t,e)}get ELEMENTS(){return 4}get x(){return this[0]}set x(t){this[0]=E(t)}get y(){return this[1]}set y(t){this[1]=E(t)}get z(){return this[2]}set z(t){this[2]=E(t)}get w(){return this[3]}set w(t){this[3]=E(t)}len(){return pe(this)}lengthSquared(){return me(this)}dot(t,e){if(void 0!==e)throw new Error("Quaternion.dot only takes one argument");return fe(this,t)}rotationTo(t,e){return _e(this,t,e),this.check()}add(t,e){if(void 0!==e)throw new Error("Quaternion.add only takes one argument");return le(this,this,t),this.check()}calculateW(){return function(t,e){var r=e[0],n=e[1],i=e[2];t[0]=r,t[1]=n,t[2]=i,t[3]=Math.sqrt(Math.abs(1-r*r-n*n-i*i))}(this,this),this.check()}conjugate(){return function(t,e){t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3]}(this,this),this.check()}invert(){return function(t,e){var r=e[0],n=e[1],i=e[2],o=e[3],s=r*r+n*n+i*i+o*o,a=s?1/s:0;t[0]=-r*a,t[1]=-n*a,t[2]=-i*a,t[3]=o*a}(this,this),this.check()}lerp(t,e,r){return de(this,t,e,r),this.check()}multiplyRight(t,e){return h(!e),ee(this,this,t),this.check()}multiplyLeft(t,e){return h(!e),ee(this,t,this),this.check()}normalize(){const t=this.len(),e=t>0?1/t:0;return this[0]=this[0]*e,this[1]=this[1]*e,this[2]=this[2]*e,this[3]=this[3]*e,0===t&&(this[3]=1),this.check()}rotateX(t){return function(t,e,r){r*=.5;var n=e[0],i=e[1],o=e[2],s=e[3],a=Math.sin(r),u=Math.cos(r);t[0]=n*u+s*a,t[1]=i*u+o*a,t[2]=o*u-i*a,t[3]=s*u-n*a}(this,this,t),this.check()}rotateY(t){return function(t,e,r){r*=.5;var n=e[0],i=e[1],o=e[2],s=e[3],a=Math.sin(r),u=Math.cos(r);t[0]=n*u-o*a,t[1]=i*u+s*a,t[2]=o*u+n*a,t[3]=s*u-i*a}(this,this,t),this.check()}rotateZ(t){return function(t,e,r){r*=.5;var n=e[0],i=e[1],o=e[2],s=e[3],a=Math.sin(r),u=Math.cos(r);t[0]=n*u+i*a,t[1]=i*u-n*a,t[2]=o*u+s*a,t[3]=s*u-o*a}(this,this,t),this.check()}scale(t){return he(this,this,t),this.check()}slerp(t,e,r){switch(arguments.length){case 1:({start:t=be,target:e,ratio:r}=arguments[0]);break;case 2:[e,r]=arguments,t=this}return re(this,t,e,r),this.check()}transformVector4(t,e=t){return function(t,e,r){var n=e[0],i=e[1],o=e[2],s=r[0],a=r[1],u=r[2],c=r[3],l=c*n+a*o-u*i,h=c*i+u*n-s*o,f=c*o+s*i-a*n,d=-s*n-a*i-u*o;t[0]=l*c+d*-s+h*-u-f*-a,t[1]=h*c+d*-a+f*-s-l*-u,t[2]=f*c+d*-u+l*-a-h*-s,t[3]=e[3]}(e,t,this),S(e,4)}lengthSq(){return this.lengthSquared()}setFromAxisAngle(t,e){return this.setAxisAngle(t,e)}premultiply(t,e){return this.multiplyLeft(t,e)}multiply(t,e){return this.multiplyRight(t,e)}}const we=new st,ve=new st,Ae=new st,Ee=new st,Se=new st,Be=new st,Ce=new st,Te=0,Re=1,Oe=2,Ie=3,Me=4,xe=5,De=6,ke=7,Pe=8;class Le{constructor(t=[0,0,0],e=[0,0,0,0,0,0,0,0,0]){this.center=(new st).from(t),this.halfAxes=new Yt(e)}get halfSize(){const t=this.halfAxes.getColumn(0),e=this.halfAxes.getColumn(1),r=this.halfAxes.getColumn(2);return[new st(t).len(),new st(e).len(),new st(r).len()]}get quaternion(){const t=this.halfAxes.getColumn(0),e=this.halfAxes.getColumn(1),r=this.halfAxes.getColumn(2),n=new st(t).normalize(),i=new st(e).normalize(),o=new st(r).normalize();return(new ye).fromMatrix3(new Yt([...n,...i,...o]))}fromCenterHalfSizeQuaternion(t,e,r){const n=new ye(r),i=(new Yt).fromQuaternion(n);return i[0]=i[0]*e[0],i[1]=i[1]*e[0],i[2]=i[2]*e[0],i[3]=i[3]*e[1],i[4]=i[4]*e[1],i[5]=i[5]*e[1],i[6]=i[6]*e[2],i[7]=i[7]*e[2],i[8]=i[8]*e[2],this.center=(new st).from(t),this.halfAxes=i,this}clone(){return new Le(this.center,this.halfAxes)}equals(t){return this===t||Boolean(t)&&this.center.equals(t.center)&&this.halfAxes.equals(t.halfAxes)}getBoundingSphere(t=new Wt){const e=this.halfAxes,r=e.getColumn(0,Ae),n=e.getColumn(1,Ee),i=e.getColumn(2,Se),o=we.copy(r).add(n).add(i);return t.center.copy(this.center),t.radius=o.magnitude(),t}intersectPlane(t){const e=this.center,r=t.normal,n=this.halfAxes,i=r.x,o=r.y,s=r.z,a=Math.abs(i*n[Te]+o*n[Re]+s*n[Oe])+Math.abs(i*n[Ie]+o*n[Me]+s*n[xe])+Math.abs(i*n[De]+o*n[ke]+s*n[Pe]),u=r.dot(e)+t.distance;return u<=-a?Ht.OUTSIDE:u>=a?Ht.INSIDE:Ht.INTERSECTING}distanceTo(t){return Math.sqrt(this.distanceSquaredTo(t))}distanceSquaredTo(t){const e=ve.from(t).subtract(this.center),r=this.halfAxes,n=r.getColumn(0,Ae),i=r.getColumn(1,Ee),o=r.getColumn(2,Se),s=n.magnitude(),a=i.magnitude(),u=o.magnitude();n.normalize(),i.normalize(),o.normalize();let c,l=0;return c=Math.abs(e.dot(n))-s,c>0&&(l+=c*c),c=Math.abs(e.dot(i))-a,c>0&&(l+=c*c),c=Math.abs(e.dot(o))-u,c>0&&(l+=c*c),l}computePlaneDistances(t,e,r=[-0,-0]){let n=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;const o=this.center,s=this.halfAxes,a=s.getColumn(0,Ae),u=s.getColumn(1,Ee),c=s.getColumn(2,Se),l=Be.copy(a).add(u).add(c).add(o),h=Ce.copy(l).subtract(t);let f=e.dot(h);return n=Math.min(f,n),i=Math.max(f,i),l.copy(o).add(a).add(u).subtract(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),l.copy(o).add(a).subtract(u).add(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),l.copy(o).add(a).subtract(u).subtract(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),o.copy(l).subtract(a).add(u).add(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),o.copy(l).subtract(a).add(u).subtract(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),o.copy(l).subtract(a).subtract(u).add(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),o.copy(l).subtract(a).subtract(u).subtract(c),h.copy(l).subtract(t),f=e.dot(h),n=Math.min(f,n),i=Math.max(f,i),r[0]=n,r[1]=i,r}transform(t){this.center.transformAsPoint(t);const e=this.halfAxes.getColumn(0,Ae);e.transformAsPoint(t);const r=this.halfAxes.getColumn(1,Ee);r.transformAsPoint(t);const n=this.halfAxes.getColumn(2,Se);return n.transformAsPoint(t),this.halfAxes=new Yt([...e,...r,...n]),this}getTransform(){throw new Error("not implemented")}}const Fe=new st,Ne=new st;class Ue{constructor(t=[0,0,1],e=0){this.normal=new st,this.distance=-0,this.fromNormalDistance(t,e)}fromNormalDistance(t,e){return h(Number.isFinite(e)),this.normal.from(t).normalize(),this.distance=e,this}fromPointNormal(t,e){t=Fe.from(t),this.normal.from(e).normalize();const r=-this.normal.dot(t);return this.distance=r,this}fromCoefficients(t,e,r,n){return this.normal.set(t,e,r),h(A(this.normal.len(),1)),this.distance=n,this}clone(t){return new Ue(this.normal,this.distance)}equals(t){return A(this.distance,t.distance)&&A(this.normal,t.normal)}getPointDistance(t){return this.normal.dot(t)+this.distance}transform(t){const e=Ne.copy(this.normal).transformAsVector(t).normalize(),r=this.normal.scale(-this.distance).transform(t);return this.fromPointNormal(r,e)}projectPointOntoPlane(t,e=[0,0,0]){t=Fe.from(t);const r=this.getPointDistance(t),n=Ne.copy(this.normal).scale(r);return t.subtract(n).to(e)}}const Ge=[new st([1,0,0]),new st([0,1,0]),new st([0,0,1])],je=new st,He=new st;new Ue(new st(1,0,0),0);class ze{static get MASK_OUTSIDE(){return 4294967295}static get MASK_INSIDE(){return 0}static get MASK_INDETERMINATE(){return 2147483647}constructor(t=[]){this.planes=t,h(this.planes.every(t=>t instanceof Ue))}fromBoundingSphere(t){this.planes.length=2*Ge.length;const e=t.center,r=t.radius;let n=0;for(const t of Ge){let i=this.planes[n],o=this.planes[n+1];i||(i=this.planes[n]=new Ue),o||(o=this.planes[n+1]=new Ue);const s=je.copy(t).scale(-r).add(e);t.dot(s);i.fromPointNormal(s,t);const a=je.copy(t).scale(r).add(e),u=He.copy(t).negate();u.dot(a);o.fromPointNormal(a,u),n+=2}return this}computeVisibility(t){h(t);let e=Ht.INSIDE;for(const r of this.planes){switch(t.intersectPlane(r)){case Ht.OUTSIDE:return Ht.OUTSIDE;case Ht.INTERSECTING:e=Ht.INTERSECTING}}return e}computeVisibilityWithPlaneMask(t,e){if(h(t,"boundingVolume is required."),h(Number.isFinite(e),"parentPlaneMask is required."),e===ze.MASK_OUTSIDE||e===ze.MASK_INSIDE)return e;let r=ze.MASK_INSIDE;const n=this.planes;for(let i=0;i<this.planes.length;++i){const o=i<31?1<<i:0;if(i<31&&0==(e&o))continue;const s=n[i],a=t.intersectPlane(s);if(a===Ht.OUTSIDE)return ze.MASK_OUTSIDE;a===Ht.INTERSECTING&&(r|=o)}return r}}new st,new st,new st,new st,new st;new st,new st,new st,new st,new st,new st,new st,new st,new st,new st,new st,new st,Math.PI;new Yt,new Yt,new Yt,new Yt,new Yt;new st,new st,new st,new st,new st,new Yt,new Yt,new Yt;const Je=new st,We=new st,Ke=new ze([new Ue,new Ue,new Ue,new Ue,new Ue,new Ue]);function Qe(t,e){const{cameraDirection:r,cameraUp:n,height:i}=t,{metersPerUnit:o}=t.distanceScales,s=[t.longitude,t.latitude,0],a=xt.WGS84.cartographicToCartesian(s,new st),u=xt.WGS84.eastNorthUpToFixedFrame(a),c=t.unprojectPosition(t.cameraPosition),l=xt.WGS84.cartographicToCartesian(c,new st),h=new st(u.transformAsVector(new st(r).scale(o))).normalize(),f=new st(u.transformAsVector(new st(n).scale(o))).normalize();return function(t,e){const r=t.getFrustumPlanes();let n=0;for(const i in r){const o=r[i],s=o.normal.dot(t.center);We.copy(o.normal).scale(o.distance-s).add(t.center);const a=t.unprojectPosition(We),u=xt.WGS84.cartographicToCartesian(a,new st);Ke.planes[n++].fromPointNormal(u,Je.copy(e).subtract(u))}}(t,a),{camera:{position:l,direction:h,up:f},viewport:t,height:i,cullingVolume:Ke,frameNumber:e,sseDenominator:1.15}}const qe=new st;function Ve(t){const{halfAxes:e,radius:r,width:n,height:i}=t;if(e){const t=function(t){t.getColumn(0,qe);const e=t.getColumn(1),r=t.getColumn(2),n=qe.add(e).add(r);return n.len()}(e);return Math.log2(6356752.314245179/t)}if(r)return Math.log2(6356752.314245179/r);if(i&&n){return(Math.log2(6378137/n)+Math.log2(6378137/i))/2}return 1}const Ze=0,Xe=1,Ye=3,$e=4,tr=5,er=1,rr=2,nr="empty",ir="scenegraph",or="pointcloud",sr="mesh",ar="I3S",ur="TILES3D",cr="geometricError",lr=1;function hr(t){return null!=t}const fr=new st,dr=new st,pr=new st;function mr(t,e,r){if(Object(kt.a)(t,"3D Tile: boundingVolume must be defined"),t.box)return function(t,e,r){const n=new st(t[0],t[1],t[2]);e.transform(n,n);let i=[];if(10===t.length){const e=t.slice(3,6),r=new ye;r.fromArray(t,6);const n=new st([1,0,0]),o=new st([0,1,0]),s=new st([0,0,1]);n.transformByQuaternion(r),n.scale(e[0]),o.transformByQuaternion(r),o.scale(e[1]),s.transformByQuaternion(r),s.scale(e[2]),i=[...n.toArray(),...o.toArray(),...s.toArray()]}else i=[...t.slice(3,6),...t.slice(6,9),...t.slice(9,12)];const o=e.transformAsVector(i.slice(0,3)),s=e.transformAsVector(i.slice(3,6)),a=e.transformAsVector(i.slice(6,9)),u=new Yt([o[0],o[1],o[2],s[0],s[1],s[2],a[0],a[1],a[2]]);if(hr(r))return r.center=n,r.halfAxes=u,r;return new Le(n,u)}(t.box,e,r);if(t.region){const[e,r,n,i,o,s]=t.region,a=xt.WGS84.cartographicToCartesian([w(e),w(i),o],dr),u=xt.WGS84.cartographicToCartesian([w(n),w(r),s],pr),c=(new st).addVectors(a,u).multiplyScalar(.5),l=(new st).subVectors(a,u).len()/2;return gr([c[0],c[1],c[2],l],new rt)}if(t.sphere)return gr(t.sphere,e,r);throw new Error("3D Tile: boundingVolume must contain a sphere, region, or box")}function gr(t,e,r){const n=new st(t[0],t[1],t[2]);e.transform(n,n);const i=e.getScale(fr),o=Math.max(Math.max(i[0],i[1]),i[2]),s=t[3]*o;return hr(r)?(r.center=n,r.radius=s,r):new Wt(n,s)}new st,new st,new rt,new st,new st,new st;function _r(t,e){if(t.dynamicScreenSpaceError&&t.dynamicScreenSpaceErrorComputedDensity){const r=t.dynamicScreenSpaceErrorComputedDensity,n=t.dynamicScreenSpaceErrorFactor;return function(t,e){const r=t*e;return 1-Math.exp(-r*r)}(e,r)*n}return 0}function br(t,e){const r=e.viewport,n=r.constructor,{longitude:i,latitude:o,height:s,width:a,bearing:u,zoom:c}=r,l=new n({longitude:i,latitude:o,height:s,width:a,bearing:u,zoom:c,pitch:0}),h=t.header.mbs[1],f=t.header.mbs[0],d=t.header.mbs[2],p=t.header.mbs[3],m=[...t.boundingVolume.center],g=l.unprojectPosition(l.cameraPosition),_=xt.WGS84.cartographicToCartesian(g,new st),b=new st(_).subtract(m).normalize(),y=new rt;xt.WGS84.eastNorthUpToFixedFrame(m,y);const w=new rt(y).invert(),v=new st(_).transform(w),A=Math.sqrt(v[0]*v[0]+v[1]*v[1]),E=A*A/v[2],S=new st([v[0],v[1],E]).transform(y),B=new st(S).subtract(m).normalize(),C=b.cross(B).normalize().scale(p),T=new st(m).add(C),R=xt.WGS84.cartesianToCartographic(T),O=l.project([f,h,d]),I=l.project(R);return new st(O).subtract(I).magnitude()}class yr{constructor(t=0){this._array=new Array(t),this._map=new Map,this._length=t}get length(){return this._length}set length(t){this._length=t,t>this._array.length&&(this._array.length=t)}get values(){return this._array}get(t){return Object(kt.a)(t<this._array.length),this._array[t]}set(t,e){Object(kt.a)(t>=0),t>=this.length&&(this.length=t+1),this._map.has(this._array[t])&&this._map.delete(this._array[t]),this._array[t]=e,this._map.set(e,t)}delete(t){const e=this._map.get(t);e>=0&&(this._array.splice(e,1),this._map.delete(t),this.length--)}peek(){return this._array[this._length-1]}push(t){if(!this._map.has(t)){const e=this.length++;this._array[e]=t,this._map.set(t,e)}}pop(){const t=this._array[--this.length];return this._map.delete(t),t}reserve(t){Object(kt.a)(t>=0),t>this._array.length&&(this._array.length=t)}resize(t){Object(kt.a)(t>=0),this.length=t}trim(t){null==t&&(t=this.length),this._array.length=t}reset(){this._array=[],this._map=new Map,this._length=0}find(t){return this._map.has(t)}}function wr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const vr={loadSiblings:!1,skipLevelOfDetail:!1,maximumScreenSpaceError:2,updateTransforms:!0,onTraversalEnd:()=>{},viewportTraversersMap:{},basePath:""};class Ar{constructor(t){wr(this,"options",void 0),wr(this,"root",void 0),wr(this,"requestedTiles",void 0),wr(this,"selectedTiles",void 0),wr(this,"emptyTiles",void 0),wr(this,"_traversalStack",void 0),wr(this,"_emptyTraversalStack",void 0),wr(this,"_frameNumber",void 0),this.options={...vr,...t},this._traversalStack=new yr,this._emptyTraversalStack=new yr,this._frameNumber=null,this.root=null,this.selectedTiles={},this.requestedTiles={},this.emptyTiles={}}traverse(t,e,r){this.root=t,this.options={...this.options,...r},this.reset(),this.updateTile(t,e),this._frameNumber=e.frameNumber,this.executeTraversal(t,e)}reset(){this.requestedTiles={},this.selectedTiles={},this.emptyTiles={},this._traversalStack.reset(),this._emptyTraversalStack.reset()}executeTraversal(t,e){const r=this._traversalStack;for(t._selectionDepth=1,r.push(t);r.length>0;){const t=r.pop();let n=!1;this.canTraverse(t,e)&&(this.updateChildTiles(t,e),n=this.updateAndPushChildren(t,e,r,t.hasRenderContent?t._selectionDepth+1:t._selectionDepth));const i=t.parent,o=Boolean(!i||i._shouldRefine),s=!n;t.hasRenderContent?t.refine===er?(this.loadTile(t,e),this.selectTile(t,e)):t.refine===rr&&(this.loadTile(t,e),s&&this.selectTile(t,e)):(this.emptyTiles[t.id]=t,this.loadTile(t,e),s&&this.selectTile(t,e)),this.touchTile(t,e),t._shouldRefine=n&&o}this.options.onTraversalEnd(e)}updateChildTiles(t,e){const r=t.children;for(const t of r)this.updateTile(t,e);return!0}updateAndPushChildren(t,e,r,n){const{loadSiblings:i,skipLevelOfDetail:o}=this.options,s=t.children;s.sort(this.compareDistanceToCamera.bind(this));const a=t.refine===rr&&t.hasRenderContent&&!o;let u=!1,c=!0;for(const t of s)if(t._selectionDepth=n,t.isVisibleAndInRequestVolume?(r.find(t)&&r.delete(t),r.push(t),u=!0):(a||i)&&(this.loadTile(t,e),this.touchTile(t,e)),a){let r;if(r=!!t._inRequestVolume&&(t.hasRenderContent?t.contentAvailable:this.executeEmptyTraversal(t,e)),c=c&&r,!c)return!1}return u||(c=!1),c}updateTile(t,e){this.updateTileVisibility(t,e)}selectTile(t,e){this.shouldSelectTile(t)&&(t._selectedFrame=e.frameNumber,this.selectedTiles[t.id]=t)}loadTile(t,e){this.shouldLoadTile(t)&&(t._requestedFrame=e.frameNumber,t._priority=t._getPriority(),this.requestedTiles[t.id]=t)}touchTile(t,e){t.tileset._cache.touch(t),t._touchedFrame=e.frameNumber}canTraverse(t,e,r=!1,n=!1){return!!t.hasChildren&&(t.hasTilesetContent?!t.contentExpired:!(!n&&!t.isVisibleAndInRequestVolume)&&this.shouldRefine(t,e,r))}shouldLoadTile(t){return t.hasUnloadedContent||t.contentExpired}shouldSelectTile(t){return t.contentAvailable&&!this.options.skipLevelOfDetail}shouldRefine(t,e,r){let n=t._screenSpaceError;return r&&(n=t.getScreenSpaceError(e,!0)),n>this.options.maximumScreenSpaceError}updateTileVisibility(t,e){const r=[];if(this.options.viewportTraversersMap)for(const t in this.options.viewportTraversersMap){this.options.viewportTraversersMap[t]===e.viewport.id&&r.push(t)}else r.push(e.viewport.id);t.updateVisibility(e,r)}compareDistanceToCamera(t,e){return t._distanceToCamera-e._distanceToCamera}anyChildrenVisible(t,e){let r=!1;for(const n of t.children)n.updateVisibility(e),r=r||n.isVisibleAndInRequestVolume;return r}executeEmptyTraversal(t,e){let r=!0;const n=this._emptyTraversalStack;for(n.push(t);n.length>0&&r;){const t=n.pop();this.updateTile(t,e),t.isVisibleAndInRequestVolume||this.loadTile(t,e),this.touchTile(t,e);if(!t.hasRenderContent&&this.canTraverse(t,e,!1,!0)){const e=t.children;for(const t of e)n.find(t)&&n.delete(t),n.push(t)}else t.contentAvailable||(r=!1)}return r}}function Er(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Sr=new st;class Br{constructor(t,e,r,n=""){Er(this,"tileset",void 0),Er(this,"header",void 0),Er(this,"id",void 0),Er(this,"url",void 0),Er(this,"parent",void 0),Er(this,"refine",void 0),Er(this,"type",void 0),Er(this,"contentUrl",void 0),Er(this,"lodMetricType",void 0),Er(this,"lodMetricValue",void 0),Er(this,"boundingVolume",void 0),Er(this,"content",void 0),Er(this,"contentState",void 0),Er(this,"gpuMemoryUsageInBytes",void 0),Er(this,"children",void 0),Er(this,"depth",void 0),Er(this,"viewportIds",void 0),Er(this,"transform",void 0),Er(this,"userData",void 0),Er(this,"computedTransform",void 0),Er(this,"hasEmptyContent",void 0),Er(this,"hasTilesetContent",void 0),Er(this,"traverser",void 0),Er(this,"_cacheNode",void 0),Er(this,"_frameNumber",void 0),Er(this,"_lodJudge",void 0),Er(this,"_expireDate",void 0),Er(this,"_expiredContent",void 0),Er(this,"_shouldRefine",void 0),Er(this,"_distanceToCamera",void 0),Er(this,"_centerZDepth",void 0),Er(this,"_screenSpaceError",void 0),Er(this,"_visibilityPlaneMask",void 0),Er(this,"_visible",void 0),Er(this,"_inRequestVolume",void 0),Er(this,"_stackLength",void 0),Er(this,"_selectionDepth",void 0),Er(this,"_touchedFrame",void 0),Er(this,"_visitedFrame",void 0),Er(this,"_selectedFrame",void 0),Er(this,"_requestedFrame",void 0),Er(this,"_priority",void 0),Er(this,"_contentBoundingVolume",void 0),Er(this,"_viewerRequestVolume",void 0),Er(this,"_initialTransform",void 0),this.header=e,this.tileset=t,this.id=n||e.id,this.url=e.url,this.parent=r,this.refine=this._getRefine(e.refine),this.type=e.type,this.contentUrl=e.contentUrl,this.lodMetricType="geometricError",this.lodMetricValue=0,this.boundingVolume=null,this.content=null,this.contentState=Ze,this.gpuMemoryUsageInBytes=0,this.children=[],this.hasEmptyContent=!1,this.hasTilesetContent=!1,this.depth=0,this.viewportIds=[],this.userData={},this._priority=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._requestedFrame=0,this._screenSpaceError=0,this._cacheNode=null,this._frameNumber=null,this._cacheNode=null,this.traverser=new Ar({}),this._shouldRefine=!1,this._distanceToCamera=0,this._centerZDepth=0,this._visible=void 0,this._inRequestVolume=!1,this._stackLength=0,this._selectionDepth=0,this._initialTransform=new rt,this.transform=new rt,this._initializeLodMetric(e),this._initializeTransforms(e),this._initializeBoundingVolumes(e),this._initializeContent(e),this._initializeRenderingState(e),this._lodJudge=null,this._expireDate=null,this._expiredContent=null,Object.seal(this)}destroy(){this.header=null}isDestroyed(){return null===this.header}get selected(){return this._selectedFrame===this.tileset._frameNumber}get isVisible(){return this._visible}get isVisibleAndInRequestVolume(){return this._visible&&this._inRequestVolume}get hasRenderContent(){return!this.hasEmptyContent&&!this.hasTilesetContent}get hasChildren(){return this.children.length>0||this.header.children&&this.header.children.length>0}get contentReady(){return this.contentState===Ye||this.hasEmptyContent}get contentAvailable(){return Boolean(this.contentReady&&this.hasRenderContent||this._expiredContent&&!this.contentFailed)}get hasUnloadedContent(){return this.hasRenderContent&&this.contentUnloaded}get contentUnloaded(){return this.contentState===Ze}get contentExpired(){return this.contentState===$e}get contentFailed(){return this.contentState===tr}getScreenSpaceError(t,e){switch(this.tileset.type){case ar:return br(this,t);case ur:return function(t,e,r){const n=t.tileset,i=t.parent&&t.parent.lodMetricValue||t.lodMetricValue,o=r?i:t.lodMetricValue;if(0===o)return 0;const s=Math.max(t._distanceToCamera,1e-7),{height:a,sseDenominator:u}=e,{viewDistanceScale:c}=n.options;let l=o*a*(c||1)/(s*u);return l-=_r(n,s),l}(this,t,e);default:throw new Error("Unsupported tileset type")}}_getPriority(){const t=this.tileset._traverser,{skipLevelOfDetail:e}=t.options,r=this.refine===er||e;if(r&&!this.isVisible&&void 0!==this._visible)return-1;if(this.tileset._frameNumber-this._touchedFrame>=1)return-1;if(this.contentState===Ze)return-1;const n=this.parent,i=n&&(!r||0===this._screenSpaceError||n.hasTilesetContent)?n._screenSpaceError:this._screenSpaceError,o=t.root?t.root._screenSpaceError:0;return Math.max(o-i,0)}async loadContent(){if(this.hasEmptyContent)return!1;if(this.content)return!0;this.contentExpired&&(this._expireDate=null),this.contentState=Xe;const t=await this.tileset._requestScheduler.scheduleRequest(this.id,this._getPriority.bind(this));if(!t)return this.contentState=Ze,!1;try{const e=this.tileset.getTileUrl(this.contentUrl),r=this.tileset.loader,n={...this.tileset.loadOptions,[r.id]:{...this.tileset.loadOptions[r.id],isTileset:"json"===this.type,...this._getLoaderSpecificOptions(r.id)}};return this.content=await Object(l.load)(e,r,n),this.tileset.options.contentLoader&&await this.tileset.options.contentLoader(this),this._isTileset()&&this.tileset._initializeTileHeaders(this.content,this),this.contentState=Ye,this._onContentLoaded(),!0}catch(t){throw this.contentState=tr,t}finally{t.done()}}unloadContent(){return this.content&&this.content.destroy&&this.content.destroy(),this.content=null,this.header.content&&this.header.content.destroy&&this.header.content.destroy(),this.header.content=null,this.contentState=Ze,!0}updateVisibility(t,e){if(this._frameNumber===t.frameNumber)return;const r=this.parent,n=r?r._visibilityPlaneMask:ze.MASK_INDETERMINATE;if(this.tileset._traverser.options.updateTransforms){const t=r?r.computedTransform:this.tileset.modelMatrix;this._updateTransform(t)}this._distanceToCamera=this.distanceToTile(t),this._screenSpaceError=this.getScreenSpaceError(t,!1),this._visibilityPlaneMask=this.visibility(t,n),this._visible=this._visibilityPlaneMask!==ze.MASK_OUTSIDE,this._inRequestVolume=this.insideViewerRequestVolume(t),this._frameNumber=t.frameNumber,this.viewportIds=e}visibility(t,e){const{cullingVolume:r}=t,{boundingVolume:n}=this;return r.computeVisibilityWithPlaneMask(n,e)}contentVisibility(){return!0}distanceToTile(t){const e=this.boundingVolume;return Math.sqrt(Math.max(e.distanceSquaredTo(t.camera.position),0))}cameraSpaceZDepth({camera:t}){const e=this.boundingVolume;return Sr.subVectors(e.center,t.position),t.direction.dot(Sr)}insideViewerRequestVolume(t){const e=this._viewerRequestVolume;return!e||e.distanceSquaredTo(t.camera.position)<=0}updateExpiration(){if(null!=this._expireDate&&this.contentReady&&!this.hasEmptyContent){const t=Date.now();Date.lessThan(this._expireDate,t)&&(this.contentState=$e,this._expiredContent=this.content)}}get extras(){return this.header.extras}_initializeLodMetric(t){"lodMetricType"in t?this.lodMetricType=t.lodMetricType:(this.lodMetricType=this.parent&&this.parent.lodMetricType||this.tileset.lodMetricType,console.warn("3D Tile: Required prop lodMetricType is undefined. Using parent lodMetricType")),"lodMetricValue"in t?this.lodMetricValue=t.lodMetricValue:(this.lodMetricValue=this.parent&&this.parent.lodMetricValue||this.tileset.lodMetricValue,console.warn("3D Tile: Required prop lodMetricValue is undefined. Using parent lodMetricValue"))}_initializeTransforms(t){this.transform=t.transform?new rt(t.transform):new rt;const e=this.parent,r=this.tileset,n=e&&e.computedTransform?e.computedTransform.clone():r.modelMatrix.clone();this.computedTransform=new rt(n).multiplyRight(this.transform);const i=e&&e._initialTransform?e._initialTransform.clone():new rt;this._initialTransform=new rt(i).multiplyRight(this.transform)}_initializeBoundingVolumes(t){this._contentBoundingVolume=null,this._viewerRequestVolume=null,this._updateBoundingVolume(t)}_initializeContent(t){this.content={_tileset:this.tileset,_tile:this},this.hasEmptyContent=!0,this.contentState=Ze,this.hasTilesetContent=!1,t.contentUrl&&(this.content=null,this.hasEmptyContent=!1)}_initializeRenderingState(t){this.depth=t.level||(this.parent?this.parent.depth+1:0),this._shouldRefine=!1,this._distanceToCamera=0,this._centerZDepth=0,this._screenSpaceError=0,this._visibilityPlaneMask=ze.MASK_INDETERMINATE,this._visible=void 0,this._inRequestVolume=!1,this._stackLength=0,this._selectionDepth=0,this._frameNumber=0,this._touchedFrame=0,this._visitedFrame=0,this._selectedFrame=0,this._requestedFrame=0,this._priority=0}_getRefine(t){return t||this.parent&&this.parent.refine||rr}_isTileset(){return-1!==this.contentUrl.indexOf(".json")}_onContentLoaded(){switch(this.content&&this.content.type){case"vctr":case"geom":this.tileset._traverser.disableSkipLevelOfDetail=!0}this._isTileset()&&(this.hasTilesetContent=!0)}_updateBoundingVolume(t){this.boundingVolume=mr(t.boundingVolume,this.computedTransform,this.boundingVolume);const e=t.content;e&&(e.boundingVolume&&(this._contentBoundingVolume=mr(e.boundingVolume,this.computedTransform,this._contentBoundingVolume)),t.viewerRequestVolume&&(this._viewerRequestVolume=mr(t.viewerRequestVolume,this.computedTransform,this._viewerRequestVolume)))}_updateTransform(t=new rt){const e=t.clone().multiplyRight(this.transform);!e.equals(this.computedTransform)&&(this.computedTransform=e,this._updateBoundingVolume(this.header))}_getLoaderSpecificOptions(t){switch(t){case"i3s":return{...this.tileset.options.i3s,tile:this.header,tileset:this.tileset.tileset,isTileHeader:!1};case"3d-tiles":case"cesium-ion":default:return{assetGltfUpAxis:(e=this.tileset.tileset).asset&&e.asset.gltfUpAxis||"Y"}}var e}}class Cr extends Ar{compareDistanceToCamera(t,e){return 0===e._distanceToCamera&&0===t._distanceToCamera?e._centerZDepth-t._centerZDepth:e._distanceToCamera-t._distanceToCamera}updateTileVisibility(t,e){if(super.updateTileVisibility(t,e),!t.isVisibleAndInRequestVolume)return;const r=t.children.length>0;if(t.hasTilesetContent&&r){const r=t.children[0];return this.updateTileVisibility(r,e),void(t._visible=r._visible)}if(this.meetsScreenSpaceErrorEarly(t,e))return void(t._visible=!1);const n=t.refine===rr,i=t._optimChildrenWithinParent===lr;n&&i&&r&&!this.anyChildrenVisible(t,e)&&(t._visible=!1)}meetsScreenSpaceErrorEarly(t,e){const{parent:r}=t;return!(!r||r.hasTilesetContent||r.refine!==er)&&!this.shouldRefine(t,e,!0)}}const Tr="REQUESTED",Rr="COMPLETED",Or="ERROR";class Ir{constructor(){var t,e,r;r=void 0,(e="_statusMap")in(t=this)?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,this._statusMap={}}add(t,e,r,n){this._statusMap[e]||(this._statusMap[e]={request:t,callback:r,key:e,frameState:n,status:Tr},t().then(t=>{this._statusMap[e].status=Rr,this._statusMap[e].callback(t,n)}).catch(t=>{this._statusMap[e].status=Or,r(t)}))}update(t,e){this._statusMap[t]&&(this._statusMap[t].frameState=e)}find(t){return this._statusMap[t]}}class Mr extends Ar{constructor(t){var e,r,n;super(t),n=void 0,(r="_tileManager")in(e=this)?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,this._tileManager=new Ir}shouldRefine(t,e){return t._lodJudge=function(t,e){if(0===t.lodMetricValue||isNaN(t.lodMetricValue))return"DIG";const r=2*br(t,e);return r<2?"OUT":!t.header.children||r<=t.lodMetricValue?"DRAW":t.header.children?"DIG":"OUT"}(t,e),"DIG"===t._lodJudge}updateChildTiles(t,e){const r=t.header.children||[],n=t.children,i=t.tileset;for(const o of r){const r=`${o.id}-${e.viewport.id}`,s=n&&n.find(t=>t.id===r);if(s)s&&this.updateTile(s,e);else{let n=()=>this._loadTile(o.id,i);this._tileManager.find(r)?this._tileManager.update(r,e):(i.tileset.nodePages&&(n=()=>i.tileset.nodePagesTile.formTileFromNodePages(o.id)),this._tileManager.add(n,r,e=>this._onTileLoad(e,t,r),e))}}return!1}async _loadTile(t,e){const{loader:r}=e,n=e.getTileUrl(`${e.url}/nodes/${t}`),i={...e.loadOptions,i3s:{...e.loadOptions.i3s,isTileHeader:!0,loadContent:!1}};return await Object(l.load)(n,r,i)}_onTileLoad(t,e,r){const n=new Br(e.tileset,t,e,r);e.children.push(n);const i=this._tileManager.find(n.id).frameState;this.updateTile(n,i),this._frameNumber===i.frameNumber&&this.executeTraversal(n,i)}}function xr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Dr={description:"",ellipsoid:xt.WGS84,modelMatrix:new rt,throttleRequests:!0,maxRequests:64,maximumMemoryUsage:32,onTileLoad:()=>{},onTileUnload:()=>{},onTileError:()=>{},onTraversalComplete:t=>t,contentLoader:void 0,viewDistanceScale:1,maximumScreenSpaceError:8,loadTiles:!0,updateTransforms:!0,viewportTraversersMap:null,loadOptions:{fetch:{}},attributions:[],basePath:"",i3s:{}};class kr{constructor(t,e){xr(this,"options",void 0),xr(this,"loadOptions",void 0),xr(this,"type",void 0),xr(this,"tileset",void 0),xr(this,"loader",void 0),xr(this,"url",void 0),xr(this,"basePath",void 0),xr(this,"modelMatrix",void 0),xr(this,"ellipsoid",void 0),xr(this,"lodMetricType",void 0),xr(this,"lodMetricValue",void 0),xr(this,"refine",void 0),xr(this,"root",void 0),xr(this,"roots",void 0),xr(this,"asset",void 0),xr(this,"description",void 0),xr(this,"properties",void 0),xr(this,"extras",void 0),xr(this,"attributions",void 0),xr(this,"credits",void 0),xr(this,"stats",void 0),xr(this,"traverseCounter",void 0),xr(this,"geometricError",void 0),xr(this,"selectedTiles",void 0),xr(this,"cartographicCenter",void 0),xr(this,"cartesianCenter",void 0),xr(this,"zoom",void 0),xr(this,"boundingVolume",void 0),xr(this,"gpuMemoryUsageInBytes",void 0),xr(this,"dynamicScreenSpaceErrorComputedDensity",void 0),xr(this,"_traverser",void 0),xr(this,"_cache",void 0),xr(this,"_requestScheduler",void 0),xr(this,"_frameNumber",void 0),xr(this,"_queryParamsString",void 0),xr(this,"_queryParams",void 0),xr(this,"_extensionsUsed",void 0),xr(this,"_tiles",void 0),xr(this,"_pendingCount",void 0),xr(this,"lastUpdatedVieports",void 0),xr(this,"_requestedTiles",void 0),xr(this,"_emptyTiles",void 0),xr(this,"frameStateData",void 0),xr(this,"maximumMemoryUsage",void 0),Object(kt.a)(t),this.options={...Dr,...e},this.tileset=t,this.loader=t.loader,this.type=t.type,this.url=t.url,this.basePath=t.basePath||Pt.a.dirname(this.url),this.modelMatrix=this.options.modelMatrix,this.ellipsoid=this.options.ellipsoid,this.lodMetricType=t.lodMetricType,this.lodMetricValue=t.lodMetricValue,this.refine=t.root.refine,this.loadOptions=this.options.loadOptions||{},this.root=null,this.roots={},this.cartographicCenter=null,this.cartesianCenter=null,this.zoom=1,this.boundingVolume=null,this.traverseCounter=0,this.geometricError=0,this._traverser=this._initializeTraverser(),this._cache=new jt,this._requestScheduler=new Lt.a({throttleRequests:this.options.throttleRequests,maxRequests:this.options.maxRequests}),this._frameNumber=0,this._pendingCount=0,this._tiles={},this.selectedTiles=[],this._emptyTiles=[],this._requestedTiles=[],this.frameStateData={},this.lastUpdatedVieports=null,this._queryParams={},this._queryParamsString="",this.maximumMemoryUsage=this.options.maximumMemoryUsage||32,this.gpuMemoryUsageInBytes=0,this.stats=new Dt.a({id:this.url}),this._initializeStats(),this._extensionsUsed=void 0,this.dynamicScreenSpaceErrorComputedDensity=0,this.extras=null,this.asset={},this.credits={},this.description=this.options.description||"",this._initializeTileSet(t)}destroy(){this._destroy()}isLoaded(){return 0===this._pendingCount&&0!==this._frameNumber}get tiles(){return Object.values(this._tiles)}get frameNumber(){return this._frameNumber}get queryParams(){return this._queryParamsString||(this._queryParamsString=function(t){const e=[];for(const r of Object.keys(t))e.push(`${r}=${t[r]}`);switch(e.length){case 0:return"";case 1:return"?"+e[0];default:return"?"+e.join("&")}}(this._queryParams)),this._queryParamsString}setProps(t){this.options={...this.options,...t}}setOptions(t){this.options={...this.options,...t}}getTileUrl(t){return t.startsWith("data:")?t:`${t}${this.queryParams}`}hasExtension(t){return Boolean(this._extensionsUsed&&this._extensionsUsed.indexOf(t)>-1)}update(t){if("loadTiles"in this.options&&!this.options.loadTiles)return;if(this.traverseCounter>0)return;!t&&this.lastUpdatedVieports?t=this.lastUpdatedVieports:this.lastUpdatedVieports=t,t instanceof Array||(t=[t]),this._cache.reset(),this._frameNumber++,this.traverseCounter=t.length;const e=[];for(const r of t){const t=r.id;this._needTraverse(t)?e.push(t):this.traverseCounter--}for(const r of t){const t=r.id;if(this.roots[t]||(this.roots[t]=this._initializeTileHeaders(this.tileset,null)),!e.includes(t))continue;const n=Qe(r,this._frameNumber);this._traverser.traverse(this.roots[t],n,this.options)}}_needTraverse(t){let e=t;return this.options.viewportTraversersMap&&(e=this.options.viewportTraversersMap[t]),e===t}_onTraversalEnd(t){const e=t.viewport.id;this.frameStateData[e]||(this.frameStateData[e]={selectedTiles:[],_requestedTiles:[],_emptyTiles:[]});const r=this.frameStateData[e],n=Object.values(this._traverser.selectedTiles);r.selectedTiles=n,r._requestedTiles=Object.values(this._traverser.requestedTiles),r._emptyTiles=Object.values(this._traverser.emptyTiles),this.traverseCounter--,this.traverseCounter>0||this._updateTiles()}_updateTiles(){this.selectedTiles=[],this._requestedTiles=[],this._emptyTiles=[];for(const t in this.frameStateData){const e=this.frameStateData[t];this.selectedTiles=this.selectedTiles.concat(e.selectedTiles),this._requestedTiles=this._requestedTiles.concat(e._requestedTiles),this._emptyTiles=this._emptyTiles.concat(e._emptyTiles)}this.selectedTiles=this.options.onTraversalComplete(this.selectedTiles);for(const t of this.selectedTiles)this._tiles[t.id]=t;this._loadTiles(),this._unloadTiles(),this._updateStats()}_tilesChanged(t,e){if(t.length!==e.length)return!0;const r=new Set(t.map(t=>t.id)),n=new Set(e.map(t=>t.id));let i=t.filter(t=>!n.has(t.id)).length>0;return i=i||e.filter(t=>!r.has(t.id)).length>0,i}_loadTiles(){for(const t of this._requestedTiles)t.contentUnloaded&&this._loadTile(t)}_unloadTiles(){this._cache.unloadTiles(this,(t,e)=>t._unloadTile(e))}_updateStats(){let t=0,e=0;for(const r of this.selectedTiles)r.contentAvailable&&r.content&&(t++,r.content.pointCount&&(e+=r.content.pointCount));this.stats.get("Tiles In View").count=this.selectedTiles.length,this.stats.get("Tiles To Render").count=t,this.stats.get("Points").count=e}_initializeTileSet(t){this.root=this._initializeTileHeaders(t,null),this.type===ur&&this._initializeCesiumTileset(t),this.type===ar&&this._initializeI3STileset(),this._calculateViewProps()}_calculateViewProps(){const t=this.root;Object(kt.a)(t);const{center:e}=t.boundingVolume;if(!e)return console.warn("center was not pre-calculated for the root tile"),this.cartographicCenter=new st,void(this.zoom=1);this.cartographicCenter=xt.WGS84.cartesianToCartographic(e,new st),this.cartesianCenter=e,this.zoom=Ve(t.boundingVolume)}_initializeStats(){this.stats.get("Tiles In Tileset(s)"),this.stats.get("Tiles Loading"),this.stats.get("Tiles In Memory"),this.stats.get("Tiles In View"),this.stats.get("Tiles To Render"),this.stats.get("Tiles Loaded"),this.stats.get("Tiles Unloaded"),this.stats.get("Failed Tile Loads"),this.stats.get("Points","memory"),this.stats.get("Tile Memory Use","memory")}_initializeTileHeaders(t,e){const r=new Br(this,t.root,e);if(e&&(e.children.push(r),r.depth=e.depth+1),this.type===ur){const t=[];for(t.push(r);t.length>0;){const e=t.pop();this.stats.get("Tiles In Tileset(s)").incrementCount();const r=e.header.children||[];for(const n of r){const r=new Br(this,n,e);e.children.push(r),r.depth=e.depth+1,t.push(r)}}}return r}_initializeTraverser(){let t;switch(this.type){case ur:t=Cr;break;case ar:t=Mr;break;default:t=Ar}return new t({basePath:this.basePath,onTraversalEnd:this._onTraversalEnd.bind(this)})}_destroyTileHeaders(t){this._destroySubtree(t)}async _loadTile(t){let e;try{this._onStartTileLoading(),e=await t.loadContent()}catch(e){this._onTileLoadError(t,e)}finally{this._onEndTileLoading(),this._onTileLoad(t,e)}}_onTileLoadError(t,e){this.stats.get("Failed Tile Loads").incrementCount();const r=e.message||e.toString(),n=t.url;console.error(`A 3D tile failed to load: ${t.url} ${r}`),this.options.onTileError(t,r,n)}_onTileLoad(t,e){e&&(t&&t.content&&function(t,e){Object(kt.a)(t),Object(kt.a)(e);const{rtcCenter:r,gltfUpAxis:n}=e,{computedTransform:i,boundingVolume:{center:o}}=t;let s=new rt(i);switch(r&&s.translate(r),n){case"Z":break;case"Y":const t=(new rt).rotateX(Math.PI/2);s=s.multiplyRight(t);break;case"X":const e=(new rt).rotateY(-Math.PI/2);s=s.multiplyRight(e)}e.isQuantized&&s.translate(e.quantizedVolumeOffset).scale(e.quantizedVolumeScale);const a=new st(o);e.cartesianModelMatrix=s,e.cartesianOrigin=a;const u=xt.WGS84.cartesianToCartographic(a,new st),c=xt.WGS84.eastNorthUpToFixedFrame(a).invert();e.cartographicModelMatrix=c.multiplyRight(s),e.cartographicOrigin=u,e.coordinateSystem||(e.modelMatrix=e.cartographicModelMatrix)}(t,t.content),this._addTileToCache(t),this.options.onTileLoad(t))}_onStartTileLoading(){this._pendingCount++,this.stats.get("Tiles Loading").incrementCount()}_onEndTileLoading(){this._pendingCount--,this.stats.get("Tiles Loading").decrementCount()}_addTileToCache(t){this._cache.add(this,t,e=>e._updateCacheStats(t))}_updateCacheStats(t){this.stats.get("Tiles Loaded").incrementCount(),this.stats.get("Tiles In Memory").incrementCount(),this.gpuMemoryUsageInBytes+=t.content.byteLength||0,this.stats.get("Tile Memory Use").count=this.gpuMemoryUsageInBytes}_unloadTile(t){this.gpuMemoryUsageInBytes-=t.content&&t.content.byteLength||0,this.stats.get("Tiles In Memory").decrementCount(),this.stats.get("Tiles Unloaded").incrementCount(),this.stats.get("Tile Memory Use").count=this.gpuMemoryUsageInBytes,this.options.onTileUnload(t),t.unloadContent()}_destroy(){const t=[];for(this.root&&t.push(this.root);t.length>0;){const e=t.pop();for(const r of e.children)t.push(r);this._destroyTile(e)}this.root=null}_destroySubtree(t){const e=t,r=[];for(r.push(e);r.length>0;){t=r.pop();for(const e of t.children)r.push(e);t!==e&&this._destroyTile(t)}e.children=[]}_destroyTile(t){this._cache.unloadTile(this,t),this._unloadTile(t),t.destroy()}_initializeCesiumTileset(t){if(this.asset=t.asset,!this.asset)throw new Error("Tileset must have an asset property.");if("0.0"!==this.asset.version&&"1.0"!==this.asset.version)throw new Error("The tileset must be 3D Tiles version 0.0 or 1.0.");"tilesetVersion"in this.asset&&(this._queryParams.v=this.asset.tilesetVersion),this.credits={attributions:this.options.attributions||[]},this.description=this.options.description||"",this.properties=t.properties,this.geometricError=t.geometricError,this._extensionsUsed=t.extensionsUsed,this.extras=t.extras}_initializeI3STileset(){this.loadOptions.i3s&&"token"in this.loadOptions.i3s&&(this._queryParams.token=this.loadOptions.i3s.token)}}const Pr={COMPOSITE:"cmpt",POINT_CLOUD:"pnts",BATCHED_3D_MODEL:"b3dm",INSTANCED_3D_MODEL:"i3dm",GEOMETRY:"geom",VECTOR:"vect"},Lr=(Object.keys(Pr),{BATCHED_MODEL:[98,51,100,109],INSTANCED_MODEL:[105,51,100,109],POINT_CLOUD:[112,110,116,115],COMPOSITE:[99,109,112,116]});function Fr(t,e,r){Object(kt.a)(t instanceof ArrayBuffer);const n=new TextDecoder("utf8"),i=new Uint8Array(t,e,r);return n.decode(i)}const Nr={name:"Draco",id:"draco",module:"draco",shapes:["mesh"],version:"3.1.0-alpha.5",worker:!0,extensions:["drc"],mimeTypes:["application/octet-stream"],binary:!0,tests:["DRACO"],options:{draco:{decoderType:"object"==typeof WebAssembly?"wasm":"js",libraryPath:"libs/",extraAttributes:{},attributeNameEntry:void 0}}};function Ur(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class Gr{constructor(t,e){Ur(this,"fields",void 0),Ur(this,"metadata",void 0),function(t,e){if(!t)throw new Error(e||"loader assertion failed.")}(Array.isArray(t)),function(t){const e={};for(const r of t)e[r.name]&&console.warn("Schema: duplicated field name",r.name,r),e[r.name]=!0}(t),this.fields=t,this.metadata=e||new Map}compareTo(t){if(this.metadata!==t.metadata)return!1;if(this.fields.length!==t.fields.length)return!1;for(let e=0;e<this.fields.length;++e)if(!this.fields[e].compareTo(t.fields[e]))return!1;return!0}select(...t){const e=Object.create(null);for(const r of t)e[r]=!0;const r=this.fields.filter(t=>e[t.name]);return new Gr(r,this.metadata)}selectAt(...t){const e=t.map(t=>this.fields[t]).filter(Boolean);return new Gr(e,this.metadata)}assign(t){let e,r=this.metadata;if(t instanceof Gr){const n=t;e=n.fields,r=jr(jr(new Map,this.metadata),n.metadata)}else e=t;const n=Object.create(null);for(const t of this.fields)n[t.name]=t;for(const t of e)n[t.name]=t;const i=Object.values(n);return new Gr(i,r)}}function jr(t,e){return new Map([...t||new Map,...e||new Map])}function Hr(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class zr{constructor(t,e,r=!1,n=new Map){Hr(this,"name",void 0),Hr(this,"type",void 0),Hr(this,"nullable",void 0),Hr(this,"metadata",void 0),this.name=t,this.type=e,this.nullable=r,this.metadata=n}get typeId(){return this.type&&this.type.typeId}clone(){return new zr(this.name,this.type,this.nullable,this.metadata)}compareTo(t){return this.name===t.name&&this.type===t.type&&this.nullable===t.nullable&&this.metadata===t.metadata}toString(){return`${this.type}${this.nullable?", nullable":""}${this.metadata?", metadata: "+this.metadata:""}`}}let Jr,Wr,Kr,Qr,qr,Vr,Zr,Xr,Yr;function $r(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}!function(t){t[t.NONE=0]="NONE",t[t.Null=1]="Null",t[t.Int=2]="Int",t[t.Float=3]="Float",t[t.Binary=4]="Binary",t[t.Utf8=5]="Utf8",t[t.Bool=6]="Bool",t[t.Decimal=7]="Decimal",t[t.Date=8]="Date",t[t.Time=9]="Time",t[t.Timestamp=10]="Timestamp",t[t.Interval=11]="Interval",t[t.List=12]="List",t[t.Struct=13]="Struct",t[t.Union=14]="Union",t[t.FixedSizeBinary=15]="FixedSizeBinary",t[t.FixedSizeList=16]="FixedSizeList",t[t.Map=17]="Map",t[t.Dictionary=-1]="Dictionary",t[t.Int8=-2]="Int8",t[t.Int16=-3]="Int16",t[t.Int32=-4]="Int32",t[t.Int64=-5]="Int64",t[t.Uint8=-6]="Uint8",t[t.Uint16=-7]="Uint16",t[t.Uint32=-8]="Uint32",t[t.Uint64=-9]="Uint64",t[t.Float16=-10]="Float16",t[t.Float32=-11]="Float32",t[t.Float64=-12]="Float64",t[t.DateDay=-13]="DateDay",t[t.DateMillisecond=-14]="DateMillisecond",t[t.TimestampSecond=-15]="TimestampSecond",t[t.TimestampMillisecond=-16]="TimestampMillisecond",t[t.TimestampMicrosecond=-17]="TimestampMicrosecond",t[t.TimestampNanosecond=-18]="TimestampNanosecond",t[t.TimeSecond=-19]="TimeSecond",t[t.TimeMillisecond=-20]="TimeMillisecond",t[t.TimeMicrosecond=-21]="TimeMicrosecond",t[t.TimeNanosecond=-22]="TimeNanosecond",t[t.DenseUnion=-23]="DenseUnion",t[t.SparseUnion=-24]="SparseUnion",t[t.IntervalDayTime=-25]="IntervalDayTime",t[t.IntervalYearMonth=-26]="IntervalYearMonth"}(Jr||(Jr={}));class tn{static isNull(t){return t&&t.typeId===Jr.Null}static isInt(t){return t&&t.typeId===Jr.Int}static isFloat(t){return t&&t.typeId===Jr.Float}static isBinary(t){return t&&t.typeId===Jr.Binary}static isUtf8(t){return t&&t.typeId===Jr.Utf8}static isBool(t){return t&&t.typeId===Jr.Bool}static isDecimal(t){return t&&t.typeId===Jr.Decimal}static isDate(t){return t&&t.typeId===Jr.Date}static isTime(t){return t&&t.typeId===Jr.Time}static isTimestamp(t){return t&&t.typeId===Jr.Timestamp}static isInterval(t){return t&&t.typeId===Jr.Interval}static isList(t){return t&&t.typeId===Jr.List}static isStruct(t){return t&&t.typeId===Jr.Struct}static isUnion(t){return t&&t.typeId===Jr.Union}static isFixedSizeBinary(t){return t&&t.typeId===Jr.FixedSizeBinary}static isFixedSizeList(t){return t&&t.typeId===Jr.FixedSizeList}static isMap(t){return t&&t.typeId===Jr.Map}static isDictionary(t){return t&&t.typeId===Jr.Dictionary}get typeId(){return Jr.NONE}compareTo(t){return this===t}}Symbol.toStringTag;Symbol.toStringTag;Wr=Symbol.toStringTag;class en extends tn{constructor(t,e){super(),$r(this,"isSigned",void 0),$r(this,"bitWidth",void 0),this.isSigned=t,this.bitWidth=e}get typeId(){return Jr.Int}get[Wr](){return"Int"}toString(){return`${this.isSigned?"I":"Ui"}nt${this.bitWidth}`}}class rn extends en{constructor(){super(!0,8)}}class nn extends en{constructor(){super(!0,16)}}class on extends en{constructor(){super(!0,32)}}class sn extends en{constructor(){super(!1,8)}}class an extends en{constructor(){super(!1,16)}}class un extends en{constructor(){super(!1,32)}}const cn=32,ln=64;Kr=Symbol.toStringTag;class hn extends tn{constructor(t){super(),$r(this,"precision",void 0),this.precision=t}get typeId(){return Jr.Float}get[Kr](){return"Float"}toString(){return"Float"+this.precision}}class fn extends hn{constructor(){super(cn)}}class dn extends hn{constructor(){super(ln)}}Symbol.toStringTag;Symbol.toStringTag;Qr=Symbol.toStringTag;qr=Symbol.toStringTag;Vr=Symbol.toStringTag;Zr=Symbol.toStringTag;Xr=Symbol.toStringTag;class pn extends tn{constructor(t,e){super(),$r(this,"listSize",void 0),$r(this,"children",void 0),this.listSize=t,this.children=[e]}get typeId(){return Jr.FixedSizeList}get valueType(){return this.children[0].type}get valueField(){return this.children[0]}get[Xr](){return"FixedSizeList"}toString(){return`FixedSizeList[${this.listSize}]<${this.valueType}>`}}Yr=Symbol.toStringTag;function mn(t,e,r){const n=function(t){switch(t.constructor){case Int8Array:return new rn;case Uint8Array:return new sn;case Int16Array:return new nn;case Uint16Array:return new an;case Int32Array:return new on;case Uint32Array:return new un;case Float32Array:return new fn;case Float64Array:return new dn;default:throw new Error("array type not supported")}}(e.value),i=r||function(t){const e=new Map;"byteOffset"in t&&e.set("byteOffset",t.byteOffset.toString(10));"byteStride"in t&&e.set("byteStride",t.byteStride.toString(10));"normalized"in t&&e.set("normalized",t.normalized.toString());return e}(e);return new zr(t,new pn(e.size,new zr("value",n)),!1,i)}function gn(t,e,r){return mn(t,e,r?_n(r.metadata):void 0)}function _n(t){const e=new Map;for(const r in t)e.set(r+".string",JSON.stringify(t[r]));return e}function bn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const yn={POSITION:"POSITION",NORMAL:"NORMAL",COLOR:"COLOR_0",TEX_COORD:"TEXCOORD_0"},wn={1:Int8Array,2:Uint8Array,3:Int16Array,4:Uint16Array,5:Int32Array,6:Uint32Array,9:Float32Array};class vn{constructor(t){bn(this,"draco",void 0),bn(this,"decoder",void 0),bn(this,"metadataQuerier",void 0),this.draco=t,this.decoder=new this.draco.Decoder,this.metadataQuerier=new this.draco.MetadataQuerier}destroy(){this.draco.destroy(this.decoder),this.draco.destroy(this.metadataQuerier)}parseSync(t,e={}){const r=new this.draco.DecoderBuffer;r.Init(new Int8Array(t),t.byteLength),this._disableAttributeTransforms(e);const n=this.decoder.GetEncodedGeometryType(r),i=n===this.draco.TRIANGULAR_MESH?new this.draco.Mesh:new this.draco.PointCloud;try{let t;switch(n){case this.draco.TRIANGULAR_MESH:t=this.decoder.DecodeBufferToMesh(r,i);break;case this.draco.POINT_CLOUD:t=this.decoder.DecodeBufferToPointCloud(r,i);break;default:throw new Error("DRACO: Unknown geometry type.")}if(!t.ok()||!i.ptr){const e="DRACO decompression failed: "+t.error_msg();throw new Error(e)}const o=this._getDracoLoaderData(i,n,e),s=this._getMeshData(i,o,e),a=function(t){let e=1/0,r=1/0,n=1/0,i=-1/0,o=-1/0,s=-1/0;const a=t.POSITION?t.POSITION.value:[],u=a&&a.length;for(let t=0;t<u;t+=3){const u=a[t],c=a[t+1],l=a[t+2];e=u<e?u:e,r=c<r?c:r,n=l<n?l:n,i=u>i?u:i,o=c>o?c:o,s=l>s?l:s}return[[e,r,n],[i,o,s]]}(s.attributes),u=function(t,e,r){const n=_n(e.metadata),i=[],o=function(t){const e={};for(const r in t){const n=t[r];e[n.name||"undefined"]=n}return e}(e.attributes);for(const e in t){const r=gn(e,t[e],o[e]);i.push(r)}if(r){const t=gn("indices",r);i.push(t)}return new Gr(i,n)}(s.attributes,o,s.indices);return{loader:"draco",loaderData:o,header:{vertexCount:i.num_points(),boundingBox:a},...s,schema:u}}finally{this.draco.destroy(r),i&&this.draco.destroy(i)}}_getDracoLoaderData(t,e,r){const n=this._getTopLevelMetadata(t),i=this._getDracoAttributes(t,r);return{geometry_type:e,num_attributes:t.num_attributes(),num_points:t.num_points(),num_faces:t instanceof this.draco.Mesh?t.num_faces():0,metadata:n,attributes:i}}_getDracoAttributes(t,e){const r={};for(let n=0;n<t.num_attributes();n++){const i=this.decoder.GetAttribute(t,n),o=this._getAttributeMetadata(t,n);r[i.unique_id()]={unique_id:i.unique_id(),attribute_type:i.attribute_type(),data_type:i.data_type(),num_components:i.num_components(),byte_offset:i.byte_offset(),byte_stride:i.byte_stride(),normalized:i.normalized(),attribute_index:n,metadata:o};const s=this._getQuantizationTransform(i,e);s&&(r[i.unique_id()].quantization_transform=s);const a=this._getOctahedronTransform(i,e);a&&(r[i.unique_id()].octahedron_transform=a)}return r}_getMeshData(t,e,r){const n=this._getMeshAttributes(e,t,r);if(!n.POSITION)throw new Error("DRACO: No position attribute found.");if(t instanceof this.draco.Mesh)switch(r.topology){case"triangle-strip":return{topology:"triangle-strip",mode:4,attributes:n,indices:{value:this._getTriangleStripIndices(t),size:1}};case"triangle-list":default:return{topology:"triangle-list",mode:5,attributes:n,indices:{value:this._getTriangleListIndices(t),size:1}}}return{topology:"point-list",mode:0,attributes:n}}_getMeshAttributes(t,e,r){const n={};for(const i of Object.values(t.attributes)){const t=this._deduceAttributeName(i,r);i.name=t;const{value:o,size:s}=this._getAttributeValues(e,i);n[t]={value:o,size:s,byteOffset:i.byte_offset,byteStride:i.byte_stride,normalized:i.normalized}}return n}_getTriangleListIndices(t){const e=3*t.num_faces(),r=4*e,n=this.draco._malloc(r);try{return this.decoder.GetTrianglesUInt32Array(t,r,n),new Uint32Array(this.draco.HEAPF32.buffer,n,e).slice()}finally{this.draco._free(n)}}_getTriangleStripIndices(t){const e=new this.draco.DracoInt32Array;try{return this.decoder.GetTriangleStripsFromMesh(t,e),function(t){const e=t.size(),r=new Int32Array(e);for(let n=0;n<e;n++)r[n]=t.GetValue(n);return r}(e)}finally{this.draco.destroy(e)}}_getAttributeValues(t,e){const r=wn[e.data_type],n=e.num_components,i=t.num_points()*n,o=i*r.BYTES_PER_ELEMENT,s=function(t,e){switch(e){case Float32Array:return t.DT_FLOAT32;case Int8Array:return t.DT_INT8;case Int16Array:return t.DT_INT16;case Int32Array:return t.DT_INT32;case Uint8Array:return t.DT_UINT8;case Uint16Array:return t.DT_UINT16;case Uint32Array:return t.DT_UINT32;default:return t.DT_INVALID}}(this.draco,r);let a;const u=this.draco._malloc(o);try{const n=this.decoder.GetAttribute(t,e.attribute_index);this.decoder.GetAttributeDataArrayForAllPoints(t,n,s,o,u),a=new r(this.draco.HEAPF32.buffer,u,i).slice()}finally{this.draco._free(u)}return{value:a,size:n}}_deduceAttributeName(t,e){const r=t.unique_id;for(const[t,n]of Object.entries(e.extraAttributes||{}))if(n===r)return t;const n=t.attribute_type;for(const t in yn){if(this.draco[t]===n)return yn[t]}const i=e.attributeNameEntry||"name";return t.metadata[i]?t.metadata[i].string:"CUSTOM_ATTRIBUTE_"+r}_getTopLevelMetadata(t){const e=this.decoder.GetMetadata(t);return this._getDracoMetadata(e)}_getAttributeMetadata(t,e){const r=this.decoder.GetAttributeMetadata(t,e);return this._getDracoMetadata(r)}_getDracoMetadata(t){if(!t||!t.ptr)return{};const e={},r=this.metadataQuerier.NumEntries(t);for(let n=0;n<r;n++){const r=this.metadataQuerier.GetEntryName(t,n);e[r]=this._getDracoMetadataField(t,r)}return e}_getDracoMetadataField(t,e){const r=new this.draco.DracoInt32Array;try{this.metadataQuerier.GetIntEntryArray(t,e,r);const n=function(t){const e=t.size(),r=new Int32Array(e);for(let n=0;n<e;n++)r[n]=t.GetValue(n);return r}(r);return{int:this.metadataQuerier.GetIntEntry(t,e),string:this.metadataQuerier.GetStringEntry(t,e),double:this.metadataQuerier.GetDoubleEntry(t,e),intArray:n}}finally{this.draco.destroy(r)}}_disableAttributeTransforms(t){const{quantizedAttributes:e=[],octahedronAttributes:r=[]}=t,n=[...e,...r];for(const t of n)this.decoder.SkipAttributeTransform(this.draco[t])}_getQuantizationTransform(t,e){const{quantizedAttributes:r=[]}=e,n=t.attribute_type();if(r.map(t=>this.decoder[t]).includes(n)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits(),range:e.range(),min_values:new Float32Array([1,2,3]).map(t=>e.min_value(t))}}finally{this.draco.destroy(e)}}return null}_getOctahedronTransform(t,e){const{octahedronAttributes:r=[]}=e,n=t.attribute_type();if(r.map(t=>this.decoder[t]).includes(n)){const e=new this.draco.AttributeQuantizationTransform;try{if(e.InitFromAttribute(t))return{quantization_bits:e.quantization_bits()}}finally{this.draco.destroy(e)}}return null}}var An=r(16),En=r(39);const Sn={};async function Bn(t,e=null,r={}){return e&&(t=function(t,e,r){if(t.startsWith("http"))return t;const n=r.modules||{};if(n[t])return n[t];if(!An.b)return`modules/${e}/dist/libs/${t}`;if(r.CDN)return function(t,e){if(!t)throw new Error(e||"loaders.gl assertion failed.")}(r.CDN.startsWith("http")),`${r.CDN}/${e}@3.1.0-alpha.5/dist/libs/${t}`;if(An.c)return"../src/libs/"+t;return`modules/${e}/src/libs/${t}`}(t,e,r)),Sn[t]=Sn[t]||async function(t){if(t.endsWith("wasm")){const e=await fetch(t);return await e.arrayBuffer()}if(!An.b)return En.requireFromFile&&await En.requireFromFile(t);if(An.c)return importScripts(t);const e=await fetch(t);return function(t,e){if(!An.b)return En.requireFromString&&En.requireFromString(t,e);if(An.c)return eval.call(An.a,t),null;const r=document.createElement("script");r.id=e;try{r.appendChild(document.createTextNode(t))}catch(e){r.text=t}return document.body.appendChild(r),null}(await e.text(),t)}(t),await Sn[t]}let Cn,Tn;async function Rn(t){const e=t.modules||{};return Cn=e.draco3d?Cn||e.draco3d.createDecoderModule({}).then(t=>({draco:t})):Cn||async function(t){let e,r;switch(t.draco&&t.draco.decoderType){case"js":e=await Bn("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.js","draco",t);break;case"wasm":default:[e,r]=await Promise.all([await Bn("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_wasm_wrapper.js","draco",t),await Bn("https://www.gstatic.com/draco/versioned/decoders/1.4.1/draco_decoder.wasm","draco",t)])}return e=e||globalThis.DracoDecoderModule,await function(t,e){const r={};e&&(r.wasmBinary=e);return new Promise(e=>{t({...r,onModuleLoaded:t=>e({draco:t})})})}(e,r)}(t),await Cn}async function On(t){const e=t.modules||{};return Tn=e.draco3d?Tn||e.draco3d.createEncoderModule({}).then(t=>({draco:t})):Tn||async function(t){let e=await Bn("https://raw.githubusercontent.com/google/draco/1.4.1/javascript/draco_encoder.js","draco",t);return e=e||globalThis.DracoEncoderModule,new Promise(t=>{e({onModuleLoaded:e=>t({draco:e})})})}(t),await Tn}const In={...Nr,parse:async function(t,e){const{draco:r}=await Rn(e),n=new vn(r);try{return n.parseSync(t,null==e?void 0:e.draco)}finally{n.destroy()}}};const Mn={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130},xn={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,...Mn},Dn={[Mn.DOUBLE]:Float64Array,[Mn.FLOAT]:Float32Array,[Mn.UNSIGNED_SHORT]:Uint16Array,[Mn.UNSIGNED_INT]:Uint32Array,[Mn.UNSIGNED_BYTE]:Uint8Array,[Mn.BYTE]:Int8Array,[Mn.SHORT]:Int16Array,[Mn.INT]:Int32Array},kn={DOUBLE:Mn.DOUBLE,FLOAT:Mn.FLOAT,UNSIGNED_SHORT:Mn.UNSIGNED_SHORT,UNSIGNED_INT:Mn.UNSIGNED_INT,UNSIGNED_BYTE:Mn.UNSIGNED_BYTE,BYTE:Mn.BYTE,SHORT:Mn.SHORT,INT:Mn.INT};class Pn{static fromTypedArray(t){t=ArrayBuffer.isView(t)?t.constructor:t;for(const e in Dn){if(Dn[e]===t)return e}throw new Error("Failed to convert GL type")}static fromName(t){const e=kn[t];if(!e)throw new Error("Failed to convert GL type");return e}static getArrayType(t){switch(t){case Mn.UNSIGNED_SHORT_5_6_5:case Mn.UNSIGNED_SHORT_4_4_4_4:case Mn.UNSIGNED_SHORT_5_5_5_1:return Uint16Array;default:const e=Dn[t];if(!e)throw new Error("Failed to convert GL type");return e}}static getByteSize(t){return Pn.getArrayType(t).BYTES_PER_ELEMENT}static validate(t){return Boolean(Pn.getArrayType(t))}static createTypedArray(t,e,r=0,n){void 0===n&&(n=(e.byteLength-r)/Pn.getByteSize(t));return new(Pn.getArrayType(t))(e,r,n)}}class Ln{constructor(t,e){this.json=t,this.buffer=e,this.featuresLength=0,this._cachedTypedArrays={}}getExtension(t){return this.json.extensions&&this.json.extensions[t]}hasProperty(t){return Boolean(this.json[t])}getGlobalProperty(t,e=xn.UNSIGNED_INT,r=1){const n=this.json[t];return n&&Number.isFinite(n.byteOffset)?this._getTypedArrayFromBinary(t,e,r,1,n.byteOffset):n}getPropertyArray(t,e,r){const n=this.json[t];return n&&Number.isFinite(n.byteOffset)?("componentType"in n&&(e=Pn.fromName(n.componentType)),this._getTypedArrayFromBinary(t,e,r,this.featuresLength,n.byteOffset)):this._getTypedArrayFromArray(t,e,n)}getProperty(t,e,r,n,i){const o=this.json[t];if(!o)return o;const s=this.getPropertyArray(t,e,r);if(1===r)return s[n];for(let t=0;t<r;++t)i[t]=s[r*n+t];return i}_getTypedArrayFromBinary(t,e,r,n,i){const o=this._cachedTypedArrays;let s=o[t];return s||(s=Pn.createTypedArray(e,this.buffer.buffer,this.buffer.byteOffset+i,n*r),o[t]=s),s}_getTypedArrayFromArray(t,e,r){const n=this._cachedTypedArrays;let i=n[t];return i||(i=Pn.createTypedArray(e,r),n[t]=i),i}}const Fn={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Nn={SCALAR:(t,e)=>t[e],VEC2:(t,e)=>[t[2*e+0],t[2*e+1]],VEC3:(t,e)=>[t[3*e+0],t[3*e+1],t[3*e+2]],VEC4:(t,e)=>[t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]],MAT2:(t,e)=>[t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]],MAT3:(t,e)=>[t[9*e+0],t[9*e+1],t[9*e+2],t[9*e+3],t[9*e+4],t[9*e+5],t[9*e+6],t[9*e+7],t[9*e+8]],MAT4:(t,e)=>[t[16*e+0],t[16*e+1],t[16*e+2],t[16*e+3],t[16*e+4],t[16*e+5],t[16*e+6],t[16*e+7],t[16*e+8],t[16*e+9],t[16*e+10],t[16*e+11],t[16*e+12],t[16*e+13],t[16*e+14],t[16*e+15]]},Un={SCALAR:(t,e,r)=>{e[r]=t},VEC2:(t,e,r)=>{e[2*r+0]=t[0],e[2*r+1]=t[1]},VEC3:(t,e,r)=>{e[3*r+0]=t[0],e[3*r+1]=t[1],e[3*r+2]=t[2]},VEC4:(t,e,r)=>{e[4*r+0]=t[0],e[4*r+1]=t[1],e[4*r+2]=t[2],e[4*r+3]=t[3]},MAT2:(t,e,r)=>{e[4*r+0]=t[0],e[4*r+1]=t[1],e[4*r+2]=t[2],e[4*r+3]=t[3]},MAT3:(t,e,r)=>{e[9*r+0]=t[0],e[9*r+1]=t[1],e[9*r+2]=t[2],e[9*r+3]=t[3],e[9*r+4]=t[4],e[9*r+5]=t[5],e[9*r+6]=t[6],e[9*r+7]=t[7],e[9*r+8]=t[8],e[9*r+9]=t[9]},MAT4:(t,e,r)=>{e[16*r+0]=t[0],e[16*r+1]=t[1],e[16*r+2]=t[2],e[16*r+3]=t[3],e[16*r+4]=t[4],e[16*r+5]=t[5],e[16*r+6]=t[6],e[16*r+7]=t[7],e[16*r+8]=t[8],e[16*r+9]=t[9],e[16*r+10]=t[10],e[16*r+11]=t[11],e[16*r+12]=t[12],e[16*r+13]=t[13],e[16*r+14]=t[14],e[16*r+15]=t[15]}};const Gn=t=>void 0!==t;function jn(t,e,r){if(!e)return null;let n=t.getExtension("3DTILES_batch_table_hierarchy");const i=e.HIERARCHY;return i&&(console.warn("3D Tile Parser: HIERARCHY is deprecated. Use 3DTILES_batch_table_hierarchy."),e.extensions=e.extensions||{},e.extensions["3DTILES_batch_table_hierarchy"]=i,n=i),n?function(t,e){let r,n,i;const o=t.instancesLength,s=t.classes;let a,u=t.classIds,c=t.parentCounts,l=t.parentIds,h=o;Gn(u.byteOffset)&&(u.componentType=defaultValue(u.componentType,GL.UNSIGNED_SHORT),u.type=AttributeType.SCALAR,i=getBinaryAccessor(u),u=i.createArrayBufferView(e.buffer,e.byteOffset+u.byteOffset,o));if(Gn(c))for(Gn(c.byteOffset)&&(c.componentType=defaultValue(c.componentType,GL.UNSIGNED_SHORT),c.type=AttributeType.SCALAR,i=getBinaryAccessor(c),c=i.createArrayBufferView(e.buffer,e.byteOffset+c.byteOffset,o)),a=new Uint16Array(o),h=0,r=0;r<o;++r)a[r]=h,h+=c[r];Gn(l)&&Gn(l.byteOffset)&&(l.componentType=defaultValue(l.componentType,GL.UNSIGNED_SHORT),l.type=AttributeType.SCALAR,i=getBinaryAccessor(l),l=i.createArrayBufferView(e.buffer,e.byteOffset+l.byteOffset,h));const f=s.length;for(r=0;r<f;++r){const t=s[r].length,n=s[r].instances,i=getBinaryProperties(t,n,e);s[r].instances=combine(i,n)}const d=new Array(f).fill(0),p=new Uint16Array(o);for(r=0;r<o;++r)n=u[r],p[r]=d[n],++d[n];const m={classes:s,classIds:u,classIndexes:p,parentCounts:c,parentIndexes:a,parentIds:l};return function(t){const e=t.classIds.length;for(let r=0;r<e;++r)zn(t,r,stack)}(m),m}(n,r):null}function Hn(t,e,r){if(!t)return;const n=t.parentCounts;return t.parentIds?r(t,e):n>0?function(t,e,r){const n=t.classIds,i=t.parentCounts,o=t.parentIds,s=t.parentIndexes,a=n.length,u=scratchVisited;u.length=Math.max(u.length,a);const c=++marker,l=scratchStack;l.length=0,l.push(e);for(;l.length>0;){if(e=l.pop(),u[e]===c)continue;u[e]=c;const n=r(t,e);if(Gn(n))return n;const a=i[e],h=s[e];for(let t=0;t<a;++t){const r=o[h+t];r!==e&&l.push(r)}}return null}(t,e,r):function(t,e,r){let n=!0;for(;n;){const i=r(t,e);if(Gn(i))return i;const o=t.parentIds[e];n=o!==e,e=o}throw new Error("traverseHierarchySingleParent")}(t,e,r)}function zn(t,e,r){const n=t.parentCounts,i=t.parentIds,o=t.parentIndexes,s=t.classIds.length;if(!Gn(i))return;assert(e<s,`Parent index ${e} exceeds the total number of instances: ${s}`),assert(-1===r.indexOf(e),"Circular dependency detected in the batch table hierarchy."),r.push(e);const a=Gn(n)?n[e]:1,u=Gn(n)?o[e]:e;for(let n=0;n<a;++n){const o=i[u+n];o!==e&&zn(t,o,r)}r.pop(e)}function Jn(t){return null!=t}const Wn=(t,e)=>t,Kn={HIERARCHY:!0,extensions:!0,extras:!0};class Qn{constructor(t,e,r,n={}){var i;Object(kt.a)(r>=0),this.json=t||{},this.binary=e,this.featureCount=r,this._extensions=(null===(i=this.json)||void 0===i?void 0:i.extensions)||{},this._properties={};for(const t in this.json)Kn[t]||(this._properties[t]=this.json[t]);this._binaryProperties=this._initializeBinaryProperties(),n["3DTILES_batch_table_hierarchy"]&&(this._hierarchy=jn(this,this.json,this.binary))}getExtension(t){return this.json&&this.json.extensions&&this.json.extensions[t]}memorySizeInBytes(){return 0}isClass(t,e){if(this._checkBatchId(t),Object(kt.a)("string"==typeof e,e),this._hierarchy){return Jn(Hn(this._hierarchy,t,(t,r)=>{const n=t.classIds[r];return t.classes[n].name===e}))}return!1}isExactClass(t,e){return Object(kt.a)("string"==typeof e,e),this.getExactClassName(t)===e}getExactClassName(t){if(this._checkBatchId(t),this._hierarchy){const e=this._hierarchy.classIds[t];return this._hierarchy.classes[e].name}}hasProperty(t,e){return this._checkBatchId(t),Object(kt.a)("string"==typeof e,e),Jn(this._properties[e])||this._hasPropertyInHierarchy(t,e)}getPropertyNames(t,e){this._checkBatchId(t),(e=Jn(e)?e:[]).length=0;const r=Object.keys(this._properties);return e.push(...r),this._hierarchy&&this._getPropertyNamesInHierarchy(t,e),e}getProperty(t,e){if(this._checkBatchId(t),Object(kt.a)("string"==typeof e,e),this._binaryProperties){const r=this._binaryProperties[e];if(Jn(r))return this._getBinaryProperty(r,t)}const r=this._properties[e];if(Jn(r))return Wn(r[t]);if(this._hierarchy){const r=this._getHierarchyProperty(t,e);if(Jn(r))return r}}setProperty(t,e,r){const n=this.featureCount;if(this._checkBatchId(t),Object(kt.a)("string"==typeof e,e),this._binaryProperties){const n=this._binaryProperties[e];if(n)return void this._setBinaryProperty(n,t,r)}if(this._hierarchy&&this._setHierarchyProperty(this,t,e,r))return;let i=this._properties[e];Jn(i)||(this._properties[e]=new Array(n),i=this._properties[e]),i[t]=Wn(r)}_checkBatchId(t){if(!(t>=0&&t<this.featureCount))throw new Error("batchId not in range [0, featureCount - 1].")}_getBinaryProperty(t,e){return t.unpack(t.typedArray,e)}_setBinaryProperty(t,e,r){t.pack(r,t.typedArray,e)}_initializeBinaryProperties(){let t=null;for(const e in this._properties){const r=this._properties[e],n=this._initializeBinaryProperty(e,r);n&&(t=t||{},t[e]=n)}return t}_initializeBinaryProperty(t,e){if("byteOffset"in e){const r=e;Object(kt.a)(this.binary,`Property ${t} requires a batch table binary.`),Object(kt.a)(r.type,`Property ${t} requires a type.`);const n=function(t,e,r,n){const{componentType:i}=t;Object(kt.a)(t.componentType);const o="string"==typeof i?Pn.fromName(i):i,s=Fn[t.type],a=Nn[t.type],u=Un[t.type];return r+=t.byteOffset,{values:Pn.createTypedArray(o,e,r,s*n),type:o,size:s,unpacker:a,packer:u}}(r,this.binary.buffer,0|this.binary.byteOffset,this.featureCount);return{typedArray:n.values,componentCount:n.size,unpack:n.unpacker,pack:n.packer}}return null}_hasPropertyInHierarchy(t,e){if(!this._hierarchy)return!1;const r=Hn(this._hierarchy,t,(t,r)=>{const n=t.classIds[r];return Jn(t.classes[n].instances[e])});return Jn(r)}_getPropertyNamesInHierarchy(t,e){Hn(this._hierarchy,t,(t,r)=>{const n=t.classIds[r],i=t.classes[n].instances;for(const t in i)i.hasOwnProperty(t)&&-1===e.indexOf(t)&&e.push(t)})}_getHierarchyProperty(t,e){return Hn(this._hierarchy,t,(t,r)=>{const n=t.classIds[r],i=t.classes[n],o=t.classIndexes[r],s=i.instances[e];return Jn(s)?Jn(s.typedArray)?this._getBinaryProperty(s,o):Wn(s[o]):null})}_setHierarchyProperty(t,e,r,n){const i=Hn(this._hierarchy,e,(t,i)=>{const o=t.classIds[i],s=t.classes[o],a=t.classIndexes[i],u=s.instances[r];return!!Jn(u)&&(Object(kt.a)(i===e,`Inherited property "${r}" is read-only.`),Jn(u.typedArray)?this._setBinaryProperty(u,a,n):u[a]=Wn(n),!0)});return Jn(i)}}function qn(t,e,r=0){const n=new DataView(e);if(t.magic=n.getUint32(r,!0),r+=4,t.version=n.getUint32(r,!0),r+=4,t.byteLength=n.getUint32(r,!0),r+=4,1!==t.version)throw new Error(`3D Tile Version ${t.version} not supported`);return r}function Vn(t,e,r){const n=new DataView(e);let i;t.header=t.header||{};let o=n.getUint32(r,!0);r+=4;let s=n.getUint32(r,!0);r+=4;let a=n.getUint32(r,!0);r+=4;let u=n.getUint32(r,!0);return r+=4,a>=570425344?(r-=8,i=o,a=s,u=0,o=0,s=0,console.warn("b3dm tile in legacy format.")):u>=570425344&&(r-=4,i=a,a=o,u=s,o=0,s=0,console.warn("b3dm tile in legacy format.")),t.header.featureTableJsonByteLength=o,t.header.featureTableBinaryByteLength=s,t.header.batchTableJsonByteLength=a,t.header.batchTableBinaryByteLength=u,t.header.batchLength=i,r}function Zn(t,e,r,n){return r=function(t,e,r,n){const{featureTableJsonByteLength:i,featureTableBinaryByteLength:o,batchLength:s}=t.header;if(t.featureTableJson={BATCH_LENGTH:s||0},i>0){const n=Fr(e,r,i);t.featureTableJson=JSON.parse(n)}return r+=i,t.featureTableBinary=new Uint8Array(e,r,o),r+=o}(t,e,r),r=function(t,e,r,n){const{batchTableJsonByteLength:i,batchTableBinaryByteLength:o}=t.header;if(i>0){const n=Fr(e,r,i);t.batchTableJson=JSON.parse(n),r+=i,o>0&&(t.batchTableBinary=new Uint8Array(e,r,o),t.batchTableBinary=new Uint8Array(t.batchTableBinary),r+=o)}return r}(t,e,r)}function Xn(t,e=[0,0,0]){const r=t>>11&31,n=t>>5&63,i=31&t;return e[0]=r<<3,e[1]=n<<2,e[2]=i<<3,e}function Yn(t,e,r){if(!(e||t&&t.batchIds&&r))return null;const{batchIds:n,isRGB565:i,pointCount:o}=t;if(n&&r){const t=new Uint8ClampedArray(3*o);for(let e=0;e<o;e++){const i=n[e],o=r.getProperty(i,"dimensions").map(t=>255*t);t[3*e]=o[0],t[3*e+1]=o[1],t[3*e+2]=o[2]}return{type:xn.UNSIGNED_BYTE,value:t,size:3,normalized:!0}}if(i){const t=new Uint8ClampedArray(3*o);for(let r=0;r<o;r++){const n=Xn(e[r]);t[3*r]=n[0],t[3*r+1]=n[1],t[3*r+2]=n[2]}return{type:xn.UNSIGNED_BYTE,value:t,size:3,normalized:!0}}return e&&e.length===3*o?{type:xn.UNSIGNED_BYTE,value:e,size:3,normalized:!0}:{type:xn.UNSIGNED_BYTE,value:e,size:4,normalized:!0}}class $n extends nt{constructor(t=0,e=0){super(2),g(t)&&1===arguments.length?this.copy(t):(p.debug&&(E(t),E(e)),this[0]=t,this[1]=e)}set(t,e){return this[0]=t,this[1]=e,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this.check()}fromObject(t){return p.debug&&(E(t.x),E(t.y)),this[0]=t.x,this[1]=t.y,this.check()}toObject(t){return t.x=this[0],t.y=this[1],t}get ELEMENTS(){return 2}horizontalAngle(){return Math.atan2(this.y,this.x)}verticalAngle(){return Math.atan2(this.x,this.y)}transform(t){return this.transformAsPoint(t)}transformAsPoint(t){return N(this,this,t),this.check()}transformAsVector(t){return O(this,this,t),this.check()}transformByMatrix3(t){return F(this,this,t),this.check()}transformByMatrix2x3(t){return function(t,e,r){var n=e[0],i=e[1];t[0]=r[0]*n+r[2]*i+r[4],t[1]=r[1]*n+r[3]*i+r[5]}(this,this,t),this.check()}transformByMatrix2(t){return function(t,e,r){var n=e[0],i=e[1];t[0]=r[0]*n+r[2]*i,t[1]=r[1]*n+r[3]*i}(this,this,t),this.check()}}function ti(t,e){if(!t)throw new Error("math.gl assertion failed. "+e)}new $n,new st,new $n,new $n,new Uint8Array(1);function ei(t,e=255){return v(t,0,e)/e*2-1}function ri(t){return t<0?-1:1}function ni(t,e,r,n){if(ti(n),t<0||t>r||e<0||e>r)throw new Error("x and y must be unsigned normalized integers between 0 and "+r);if(n.x=ei(t,r),n.y=ei(e,r),n.z=1-(Math.abs(n.x)+Math.abs(n.y)),n.z<0){const t=n.x;n.x=(1-Math.abs(n.y))*ri(t),n.y=(1-Math.abs(t))*ri(n.y)}return n.normalize()}function ii(t,e,r){return ni(t,e,255,r)}const oi=new st;function si(t,e,r){return t.isQuantized?r["3d-tiles"]&&r["3d-tiles"].decodeQuantizedPositions?(t.isQuantized=!1,function(t,e){const r=new st,n=new Float32Array(3*t.pointCount);for(let i=0;i<t.pointCount;i++)r.set(e[3*i],e[3*i+1],e[3*i+2]).scale(1/t.quantizedRange).multiply(t.quantizedVolumeScale).add(t.quantizedVolumeOffset).toArray(n,3*i);return n}(t,e)):{type:xn.UNSIGNED_SHORT,value:e,size:3,normalized:!0}:e}async function ai(t,e,r,n,i){r=Zn(t,e,r=Vn(t,e,r=qn(t,e,r))),function(t){t.attributes={positions:null,colors:null,normals:null,batchIds:null},t.isQuantized=!1,t.isTranslucent=!1,t.isRGB565=!1,t.isOctEncoded16P=!1}(t);const{featureTable:o,batchTable:s}=function(t){const e=new Ln(t.featureTableJson,t.featureTableBinary),r=e.getGlobalProperty("POINTS_LENGTH");if(!Number.isFinite(r))throw new Error("POINTS_LENGTH must be defined");e.featuresLength=r,t.featuresLength=r,t.pointsLength=r,t.pointCount=r,t.rtcCenter=e.getGlobalProperty("RTC_CENTER",xn.FLOAT,3);const n=function(t,e){let r=null;if(!t.batchIds&&e.hasProperty("BATCH_ID")&&(t.batchIds=e.getPropertyArray("BATCH_ID",xn.UNSIGNED_SHORT,1),t.batchIds)){const n=e.getGlobalProperty("BATCH_LENGTH");if(!n)throw new Error("Global property: BATCH_LENGTH must be defined when BATCH_ID is defined.");const{batchTableJson:i,batchTableBinary:o}=t;r=new Qn(i,o,n)}return r}(t,e);return{featureTable:e,batchTable:n}}(t);return await async function(t,e,r,n,i){let o,s,a;const u=t.batchTableJson&&t.batchTableJson.extensions&&t.batchTableJson.extensions["3DTILES_draco_point_compression"];u&&(a=u.properties);const c=e.getExtension("3DTILES_draco_point_compression");if(c){s=c.properties;const e=c.byteOffset,r=c.byteLength;if(!s||!Number.isFinite(e)||!r)throw new Error("Draco properties, byteOffset, and byteLength must be defined");o=t.featureTableBinary.slice(e,e+r),t.hasPositions=Number.isFinite(s.POSITION),t.hasColors=Number.isFinite(s.RGB)||Number.isFinite(s.RGBA),t.hasNormals=Number.isFinite(s.NORMAL),t.hasBatchIds=Number.isFinite(s.BATCH_ID),t.isTranslucent=Number.isFinite(s.RGBA)}if(!o)return!0;const l={buffer:o,properties:{...s,...a},featureTableProperties:s,batchTableProperties:a,dequantizeInShader:!1};return await async function(t,e,r,n){const{parse:i}=n,o={...r,draco:{...r.draco,extraAttributes:e.batchTableProperties||{}}};delete o["3d-tiles"];const s=await i(e.buffer,In,o),a=s.attributes.POSITION&&s.attributes.POSITION.value,u=s.attributes.COLOR_0&&s.attributes.COLOR_0.value,c=s.attributes.NORMAL&&s.attributes.NORMAL.value,l=s.attributes.BATCH_ID&&s.attributes.BATCH_ID.value,h=a&&s.attributes.POSITION.value.quantization,f=c&&s.attributes.NORMAL.value.quantization;if(h){const e=s.POSITION.data.quantization,r=e.range;t.quantizedVolumeScale=new st(r,r,r),t.quantizedVolumeOffset=new st(e.minValues),t.quantizedRange=(1<<e.quantizationBits)-1,t.isQuantizedDraco=!0}f&&(t.octEncodedRange=(1<<s.NORMAL.data.quantization.quantizationBits)-1,t.isOctEncodedDraco=!0);const d={};if(e.batchTableProperties)for(const t of Object.keys(e.batchTableProperties))s.attributes[t]&&s.attributes[t].value&&(d[t.toLowerCase()]=s.attributes[t].value);t.attributes={positions:a,colors:Yn(t,u),normals:c,batchIds:l,...d}}(t,l,n,i)}(t,o,0,n,i),function(t,e,r){if(!t.attributes.positions)if(e.hasProperty("POSITION"))t.attributes.positions=e.getPropertyArray("POSITION",xn.FLOAT,3);else if(e.hasProperty("POSITION_QUANTIZED")){const n=e.getPropertyArray("POSITION_QUANTIZED",xn.UNSIGNED_SHORT,3);if(t.isQuantized=!0,t.quantizedRange=65535,t.quantizedVolumeScale=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",xn.FLOAT,3),!t.quantizedVolumeScale)throw new Error("QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");if(t.quantizedVolumeOffset=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",xn.FLOAT,3),!t.quantizedVolumeOffset)throw new Error("QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");t.attributes.positions=si(t,n,r)}if(!t.attributes.positions)throw new Error("Either POSITION or POSITION_QUANTIZED must be defined.")}(t,o,n),function(t,e,r){if(!t.attributes.colors){let n=null;e.hasProperty("RGBA")?(n=e.getPropertyArray("RGBA",xn.UNSIGNED_BYTE,4),t.isTranslucent=!0):e.hasProperty("RGB")?n=e.getPropertyArray("RGB",xn.UNSIGNED_BYTE,3):e.hasProperty("RGB565")&&(n=e.getPropertyArray("RGB565",xn.UNSIGNED_SHORT,1),t.isRGB565=!0),t.attributes.colors=Yn(t,n,r)}e.hasProperty("CONSTANT_RGBA")&&(t.constantRGBA=e.getGlobalProperty("CONSTANT_RGBA",xn.UNSIGNED_BYTE,4))}(t,o,s),function(t,e){if(!t.attributes.normals){let r=null;e.hasProperty("NORMAL")?r=e.getPropertyArray("NORMAL",xn.FLOAT,3):e.hasProperty("NORMAL_OCT16P")&&(r=e.getPropertyArray("NORMAL_OCT16P",xn.UNSIGNED_BYTE,2),t.isOctEncoded16P=!0),t.attributes.normals=function(t,e){if(!e)return null;if(t.isOctEncoded16P){const r=new Float32Array(3*t.pointsLength);for(let n=0;n<t.pointsLength;n++)ii(e[2*n],e[2*n+1],oi),oi.toArray(r,3*n);return{type:xn.FLOAT,size:2,value:r}}return{type:xn.FLOAT,size:2,value:e}}(t,r)}}(t,o),r}let ui,ci;async function li(t){const e=t.modules||{};return e.basis?e.basis:(ui=ui||async function(t){let e=null,r=null;return[e,r]=await Promise.all([await Bn("basis_transcoder.js","textures",t),await Bn("basis_transcoder.wasm","textures",t)]),e=e||globalThis.BASIS,await function(t,e){const r={};e&&(r.wasmBinary=e);return new Promise(e=>{t(r).then(t=>{const{BasisFile:r,initializeBasis:n}=t;n(),e({BasisFile:r})})})}(e,r)}(t),await ui)}async function hi(t){const e=t.modules||{};return e.basisEncoder?e.basisEncoder:(ci=ci||async function(t){let e=null,r=null;return[e,r]=await Promise.all([await Bn("https://unpkg.com/@loaders.gl/textures@3.1.0-alpha.5/dist/libs/basis_encoder.js","textures",t),await Bn("https://unpkg.com/@loaders.gl/textures@3.1.0-alpha.5/dist/libs/basis_encoder.wasm","textures",t)]),e=e||globalThis.BASIS,await function(t,e){const r={};e&&(r.wasmBinary=e);return new Promise(e=>{t(r).then(t=>{const{BasisFile:r,KTX2File:n,initializeBasis:i,BasisEncoder:o}=t;i(),e({BasisFile:r,KTX2File:n,BasisEncoder:o})})})}(e,r)}(t),await ci)}const fi={COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35987,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,COMPRESSED_RGBA_ASTC_4X4_KHR:37808,COMPRESSED_RGBA_ASTC_5X4_KHR:37809,COMPRESSED_RGBA_ASTC_5X5_KHR:37810,COMPRESSED_RGBA_ASTC_6X5_KHR:37811,COMPRESSED_RGBA_ASTC_6X6_KHR:37812,COMPRESSED_RGBA_ASTC_8X5_KHR:37813,COMPRESSED_RGBA_ASTC_8X6_KHR:37814,COMPRESSED_RGBA_ASTC_8X8_KHR:37815,COMPRESSED_RGBA_ASTC_10X5_KHR:37816,COMPRESSED_RGBA_ASTC_10X6_KHR:37817,COMPRESSED_RGBA_ASTC_10X8_KHR:37818,COMPRESSED_RGBA_ASTC_10X10_KHR:37819,COMPRESSED_RGBA_ASTC_12X10_KHR:37820,COMPRESSED_RGBA_ASTC_12X12_KHR:37821,COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR:37840,COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR:37841,COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR:37842,COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR:37843,COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR:37844,COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR:37845,COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR:37846,COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR:37847,COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR:37848,COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR:37849,COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR:37850,COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR:37851,COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR:37852,COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR:37853,COMPRESSED_RED_RGTC1_EXT:36283,COMPRESSED_SIGNED_RED_RGTC1_EXT:36284,COMPRESSED_RED_GREEN_RGTC2_EXT:36285,COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT:36286,COMPRESSED_SRGB_S3TC_DXT1_EXT:35916,COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:35917,COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:35918,COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:35919},di=["","WEBKIT_","MOZ_"],pi={WEBGL_compressed_texture_s3tc:"dxt",WEBGL_compressed_texture_s3tc_srgb:"dxt-srgb",WEBGL_compressed_texture_etc1:"etc1",WEBGL_compressed_texture_etc:"etc2",WEBGL_compressed_texture_pvrtc:"pvrtc",WEBGL_compressed_texture_atc:"atc",WEBGL_compressed_texture_astc:"astc",EXT_texture_compression_rgtc:"rgtc"};let mi=null;function gi(t){if(!mi){t=t||function(){try{return document.createElement("canvas").getContext("webgl")}catch(t){return null}}()||void 0,mi=new Set;for(const e of di)for(const r in pi)if(t&&t.getExtension(`${e}${r}`)){const t=pi[r];mi.add(t)}}return mi}new Uint8Array([0]);const _i=[171,75,84,88,32,50,48,187,13,10,26,10];var bi,yi,wi,vi,Ai,Ei,Si,Bi,Ci;(Ci=bi||(bi={}))[Ci.NONE=0]="NONE",Ci[Ci.BASISLZ=1]="BASISLZ",Ci[Ci.ZSTD=2]="ZSTD",Ci[Ci.ZLIB=3]="ZLIB",function(t){t[t.BASICFORMAT=0]="BASICFORMAT"}(yi||(yi={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.ETC1S=163]="ETC1S",t[t.UASTC=166]="UASTC"}(wi||(wi={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.SRGB=1]="SRGB"}(vi||(vi={})),function(t){t[t.UNSPECIFIED=0]="UNSPECIFIED",t[t.LINEAR=1]="LINEAR",t[t.SRGB=2]="SRGB",t[t.ITU=3]="ITU",t[t.NTSC=4]="NTSC",t[t.SLOG=5]="SLOG",t[t.SLOG2=6]="SLOG2"}(Ai||(Ai={})),function(t){t[t.ALPHA_STRAIGHT=0]="ALPHA_STRAIGHT",t[t.ALPHA_PREMULTIPLIED=1]="ALPHA_PREMULTIPLIED"}(Ei||(Ei={})),function(t){t[t.RGB=0]="RGB",t[t.RRR=3]="RRR",t[t.GGG=4]="GGG",t[t.AAA=15]="AAA"}(Si||(Si={})),function(t){t[t.RGB=0]="RGB",t[t.RGBA=3]="RGBA",t[t.RRR=4]="RRR",t[t.RRRG=5]="RRRG"}(Bi||(Bi={}));class Ti{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=bi.NONE,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:yi.BASICFORMAT,versionNumber:2,descriptorBlockSize:40,colorModel:wi.UNSPECIFIED,colorPrimaries:vi.SRGB,transferFunction:vi.SRGB,flags:Ei.ALPHA_STRAIGHT,texelBlockDimension:{x:4,y:4,z:1,w:1},bytesPlane:[],samples:[]}],this.keyValue={},this.globalData=null}}class Ri{constructor(t,e,r,n){this._dataView=new DataView(t.buffer,t.byteOffset+e,r),this._littleEndian=n,this._offset=0}_nextUint8(){const t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){const t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){const t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){const t=this._dataView.getUint32(this._offset,this._littleEndian)+2**32*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,t}_skip(t){return this._offset+=t,this}_scan(t,e=0){const r=this._offset;let n=0;for(;this._dataView.getUint8(this._offset)!==e&&n<t;)n++,this._offset++;return n<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+r,n)}}function Oi(t){return"undefined"!=typeof TextDecoder?(new TextDecoder).decode(t):Buffer.from(t).toString("utf8")}function Ii(t,e){const r=new Array(e.mipMapLevels);let n=e.width,i=e.height,o=0;for(let s=0;s<e.mipMapLevels;++s){const a=xi(e,n,i,t,s),u=Mi(t,s,o,a);r[s]={compressed:!0,format:e.internalFormat,data:u,width:n,height:i,levelSize:a},n=Math.max(1,n>>1),i=Math.max(1,i>>1),o+=a}return r}function Mi(t,e,r,n){return Array.isArray(t)?t[e].levelData:new Uint8Array(t.buffer,t.byteOffset+r,n)}function xi(t,e,r,n,i){return Array.isArray(n)?t.sizeFunction(n[i]):t.sizeFunction(e,r)}const Di={131:fi.COMPRESSED_RGB_S3TC_DXT1_EXT,132:fi.COMPRESSED_SRGB_S3TC_DXT1_EXT,133:fi.COMPRESSED_RGBA_S3TC_DXT1_EXT,134:fi.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,135:fi.COMPRESSED_RGBA_S3TC_DXT3_EXT,136:fi.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,137:fi.COMPRESSED_RGBA_S3TC_DXT5_EXT,138:fi.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,139:fi.COMPRESSED_RED_RGTC1_EXT,140:fi.COMPRESSED_SIGNED_RED_RGTC1_EXT,141:fi.COMPRESSED_RED_GREEN_RGTC2_EXT,142:fi.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT,147:fi.COMPRESSED_RGB8_ETC2,148:fi.COMPRESSED_SRGB8_ETC2,149:fi.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,150:fi.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,151:fi.COMPRESSED_RGBA8_ETC2_EAC,152:fi.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC,153:fi.COMPRESSED_R11_EAC,154:fi.COMPRESSED_SIGNED_R11_EAC,155:fi.COMPRESSED_RG11_EAC,156:fi.COMPRESSED_SIGNED_RG11_EAC,157:fi.COMPRESSED_RGBA_ASTC_4x4_KHR,158:fi.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,159:fi.COMPRESSED_RGBA_ASTC_5x4_KHR,160:fi.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR,161:fi.COMPRESSED_RGBA_ASTC_5x5_KHR,162:fi.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,163:fi.COMPRESSED_RGBA_ASTC_6x5_KHR,164:fi.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,165:fi.COMPRESSED_RGBA_ASTC_6x6_KHR,166:fi.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,167:fi.COMPRESSED_RGBA_ASTC_8x5_KHR,168:fi.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,169:fi.COMPRESSED_RGBA_ASTC_8x6_KHR,170:fi.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,171:fi.COMPRESSED_RGBA_ASTC_8x8_KHR,172:fi.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,173:fi.COMPRESSED_RGBA_ASTC_10x5_KHR,174:fi.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,175:fi.COMPRESSED_RGBA_ASTC_10x6_KHR,176:fi.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,177:fi.COMPRESSED_RGBA_ASTC_10x8_KHR,178:fi.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,179:fi.COMPRESSED_RGBA_ASTC_10x10_KHR,180:fi.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,181:fi.COMPRESSED_RGBA_ASTC_12x10_KHR,182:fi.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,183:fi.COMPRESSED_RGBA_ASTC_12x12_KHR,184:fi.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR,1000054e3:fi.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,1000054001:fi.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,1000066e3:fi.COMPRESSED_RGBA_ASTC_4x4_KHR,1000066001:fi.COMPRESSED_RGBA_ASTC_5x4_KHR,1000066002:fi.COMPRESSED_RGBA_ASTC_5x5_KHR,1000066003:fi.COMPRESSED_RGBA_ASTC_6x5_KHR,1000066004:fi.COMPRESSED_RGBA_ASTC_6x6_KHR,1000066005:fi.COMPRESSED_RGBA_ASTC_8x5_KHR,1000066006:fi.COMPRESSED_RGBA_ASTC_8x6_KHR,1000066007:fi.COMPRESSED_RGBA_ASTC_8x8_KHR,1000066008:fi.COMPRESSED_RGBA_ASTC_10x5_KHR,1000066009:fi.COMPRESSED_RGBA_ASTC_10x6_KHR,1000066010:fi.COMPRESSED_RGBA_ASTC_10x8_KHR,1000066011:fi.COMPRESSED_RGBA_ASTC_10x10_KHR,1000066012:fi.COMPRESSED_RGBA_ASTC_12x10_KHR,1000066013:fi.COMPRESSED_RGBA_ASTC_12x12_KHR};const ki=[171,75,84,88,32,50,48,187,13,10,26,10];function Pi(t){const e=new Uint8Array(t.buffer||t,t.byteOffset||0,ki.length);return!(e[0]!==ki[0]||e[1]!==ki[1]||e[2]!==ki[2]||e[3]!==ki[3]||e[4]!==ki[4]||e[5]!==ki[5]||e[6]!==ki[6]||e[7]!==ki[7]||e[8]!==ki[8]||e[9]!==ki[9]||e[10]!==ki[10]||e[11]!==ki[11])}function Li(t){const e=function(t){const e=new Uint8Array(t.buffer,t.byteOffset,_i.length);if(e[0]!==_i[0]||e[1]!==_i[1]||e[2]!==_i[2]||e[3]!==_i[3]||e[4]!==_i[4]||e[5]!==_i[5]||e[6]!==_i[6]||e[7]!==_i[7]||e[8]!==_i[8]||e[9]!==_i[9]||e[10]!==_i[10]||e[11]!==_i[11])throw new Error("Missing KTX 2.0 identifier.");const r=new Ti,n=17*Uint32Array.BYTES_PER_ELEMENT,i=new Ri(t,_i.length,n,!0);r.vkFormat=i._nextUint32(),r.typeSize=i._nextUint32(),r.pixelWidth=i._nextUint32(),r.pixelHeight=i._nextUint32(),r.pixelDepth=i._nextUint32(),r.layerCount=i._nextUint32(),r.faceCount=i._nextUint32();const o=i._nextUint32();r.supercompressionScheme=i._nextUint32();const s=i._nextUint32(),a=i._nextUint32(),u=i._nextUint32(),c=i._nextUint32(),l=i._nextUint64(),h=i._nextUint64(),f=new Ri(t,_i.length+n,3*o*8,!0);for(let e=0;e<o;e++)r.levels.push({levelData:new Uint8Array(t.buffer,t.byteOffset+f._nextUint64(),f._nextUint64()),uncompressedByteLength:f._nextUint64()});const d=new Ri(t,s,a,!0),p={vendorId:d._skip(4)._nextUint16(),descriptorType:d._nextUint16(),versionNumber:d._nextUint16(),descriptorBlockSize:d._nextUint16(),colorModel:d._nextUint8(),colorPrimaries:d._nextUint8(),transferFunction:d._nextUint8(),flags:d._nextUint8(),texelBlockDimension:{x:d._nextUint8()+1,y:d._nextUint8()+1,z:d._nextUint8()+1,w:d._nextUint8()+1},bytesPlane:[d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8()],samples:[]},m=(p.descriptorBlockSize/4-6)/4;for(let t=0;t<m;t++)p.samples[t]={bitOffset:d._nextUint16(),bitLength:d._nextUint8(),channelID:d._nextUint8(),samplePosition:[d._nextUint8(),d._nextUint8(),d._nextUint8(),d._nextUint8()],sampleLower:d._nextUint32(),sampleUpper:d._nextUint32()};r.dataFormatDescriptor.length=0,r.dataFormatDescriptor.push(p);const g=new Ri(t,u,c,!0);for(;g._offset<c;){const t=g._nextUint32(),e=g._scan(t),n=Oi(e),i=g._scan(t-e.byteLength);r.keyValue[n]=n.match(/^ktx/i)?Oi(i):i,t%4&&g._skip(4-t%4)}if(h<=0)return r;const _=new Ri(t,l,h,!0),b=_._nextUint16(),y=_._nextUint16(),w=_._nextUint32(),v=_._nextUint32(),A=_._nextUint32(),E=_._nextUint32(),S=[];for(let t=0;t<o;t++)S.push({imageFlags:_._nextUint32(),rgbSliceByteOffset:_._nextUint32(),rgbSliceByteLength:_._nextUint32(),alphaSliceByteOffset:_._nextUint32(),alphaSliceByteLength:_._nextUint32()});const B=l+_._offset,C=B+w,T=C+v,R=T+A,O=new Uint8Array(t.buffer,t.byteOffset+B,w),I=new Uint8Array(t.buffer,t.byteOffset+C,v),M=new Uint8Array(t.buffer,t.byteOffset+T,A),x=new Uint8Array(t.buffer,t.byteOffset+R,E);return r.globalData={endpointCount:b,selectorCount:y,imageDescs:S,endpointsData:O,selectorsData:I,tablesData:M,extendedData:x},r}(new Uint8Array(t)),r=Math.max(1,e.levels.length),n=e.pixelWidth,i=e.pixelHeight,o=(s=e.vkFormat,Di[s]);var s;return Ii(e.levels,{mipMapLevels:r,width:n,height:i,sizeFunction:t=>t.uncompressedByteLength,internalFormat:o})}const Fi={etc1:{basisFormat:0,compressed:!0,format:fi.COMPRESSED_RGB_ETC1_WEBGL},etc2:{basisFormat:1,compressed:!0},bc1:{basisFormat:2,compressed:!0,format:fi.COMPRESSED_RGB_S3TC_DXT1_EXT},bc3:{basisFormat:3,compressed:!0,format:fi.COMPRESSED_RGBA_S3TC_DXT5_EXT},bc4:{basisFormat:4,compressed:!0},bc5:{basisFormat:5,compressed:!0},"bc7-m6-opaque-only":{basisFormat:6,compressed:!0},"bc7-m5":{basisFormat:7,compressed:!0},"pvrtc1-4-rgb":{basisFormat:8,compressed:!0,format:fi.COMPRESSED_RGB_PVRTC_4BPPV1_IMG},"pvrtc1-4-rgba":{basisFormat:9,compressed:!0,format:fi.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG},"astc-4x4":{basisFormat:10,compressed:!0,format:fi.COMPRESSED_RGBA_ASTC_4X4_KHR},"atc-rgb":{basisFormat:11,compressed:!0},"atc-rgba-interpolated-alpha":{basisFormat:12,compressed:!0},rgba32:{basisFormat:13,compressed:!1},rgb565:{basisFormat:14,compressed:!1},bgr565:{basisFormat:15,compressed:!1},rgba4444:{basisFormat:16,compressed:!1}};async function Ni(t,e){if("auto"===e.basis.containerFormat){if(Pi(t)){return ji((await hi(e)).KTX2File,t,e)}const{BasisFile:r}=await li(e);return Ui(r,t,e)}switch(e.basis.module){case"encoder":const r=await hi(e);switch(e.basis.containerFormat){case"ktx2":return ji(r.KTX2File,t,e);case"basis":default:return Ui(r.BasisFile,t,e)}case"transcoder":default:const{BasisFile:n}=await li(e);return Ui(n,t,e)}}function Ui(t,e,r){const n=new t(new Uint8Array(e));try{if(!n.startTranscoding())return null;const t=n.getNumImages(),e=[];for(let i=0;i<t;i++){const t=n.getNumLevels(i),o=[];for(let e=0;e<t;e++)o.push(Gi(n,i,e,r));e.push(o)}return e}finally{n.close(),n.delete()}}function Gi(t,e,r,n){const i=t.getImageWidth(e,r),o=t.getImageHeight(e,r),s=t.getHasAlpha(),{compressed:a,format:u,basisFormat:c}=zi(n,s),l=t.getImageTranscodedSizeInBytes(e,r,c),h=new Uint8Array(l);return t.transcodeImage(h,e,r,c,0,0)?{width:i,height:o,data:h,compressed:a,hasAlpha:s,format:u}:null}function ji(t,e,r){const n=new t(new Uint8Array(e));try{if(!n.startTranscoding())return null;const t=n.getLevels(),e=[];for(let i=0;i<t;i++){e.push(Hi(n,i,r));break}return e}finally{n.close(),n.delete()}}function Hi(t,e,r){const{alphaFlag:n,height:i,width:o}=t.getImageLevelInfo(e,0,0),{compressed:s,format:a,basisFormat:u}=zi(r,n),c=t.getImageTranscodedSizeInBytes(e,0,0,u),l=new Uint8Array(c);return t.transcodeImage(l,e,0,0,u,0,-1,-1)?{width:o,height:i,data:l,compressed:s,alphaFlag:n,format:a}:null}function zi(t,e){let r=t&&t.basis&&t.basis.format;return"auto"===r&&(r=Ji()),"object"==typeof r&&(r=e?r.alpha:r.noAlpha),r=r.toLowerCase(),Fi[r]}function Ji(){const t=gi();return t.has("astc")?"astc-4x4":t.has("dxt")?{alpha:"bc3",noAlpha:"bc1"}:t.has("pvrtc")?{alpha:"pvrtc1-4-rgba",noAlpha:"pvrtc1-4-rgb"}:t.has("etc1")?"etc1":t.has("etc2")?"etc2":"rgb565"}const Wi={name:"Basis",id:"basis",module:"textures",version:"3.1.0-alpha.5",worker:!0,extensions:["basis","ktx2"],mimeTypes:["application/octet-stream","image/ktx2"],tests:["sB"],binary:!0,options:{basis:{format:"auto",libraryPath:"libs/",containerFormat:"auto",module:"transcoder"}}},Ki={...Wi,parse:Ni};var Qi=r(14);const{_parseImageNode:qi}=globalThis,Vi="undefined"!=typeof Image,Zi="undefined"!=typeof ImageBitmap,Xi=Boolean(qi),Yi=!!Qi.a||Xi;function $i(t){const e=eo(t);if(!e)throw new Error("Not an image");return e}function to(t){switch($i(t)){case"data":return t;case"image":case"imagebitmap":const e=document.createElement("canvas"),r=e.getContext("2d");if(!r)throw new Error("getImageData");return e.width=t.width,e.height=t.height,r.drawImage(t,0,0),r.getImageData(0,0,t.width,t.height);default:throw new Error("getImageData")}}function eo(t){return"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?"imagebitmap":"undefined"!=typeof Image&&t instanceof Image?"image":t&&"object"==typeof t&&t.data&&t.width&&t.height?"data":null}const ro=/^data:image\/svg\+xml/,no=/\.svg((\?|#).*)?$/;function io(t){return t&&(ro.test(t)||no.test(t))}function oo(t,e){if(io(e))throw new Error("SVG cannot be parsed directly to imagebitmap");return new Blob([new Uint8Array(t)])}async function so(t,e,r){const n=function(t,e){if(io(e)){let e=(new TextDecoder).decode(t);try{"function"==typeof unescape&&"function"==typeof encodeURIComponent&&(e=unescape(encodeURIComponent(e)))}catch(t){throw new Error(t.message)}return"data:image/svg+xml;base64,"+btoa(e)}return oo(t,e)}(t,r),i=self.URL||self.webkitURL,o="string"!=typeof n&&i.createObjectURL(n);try{return await async function(t,e){const r=new Image;if(r.src=t,e.image&&e.image.decode&&r.decode)return await r.decode(),r;return await new Promise((e,n)=>{try{r.onload=()=>e(r),r.onerror=e=>n(new Error(`Could not load image ${t}: ${e}`))}catch(t){n(t)}})}(o||n,e)}finally{o&&i.revokeObjectURL(o)}}const ao={};let uo=!0;async function co(t,e,r){let n;if(io(r)){n=await so(t,e,r)}else n=oo(t,r);const i=e&&e.imagebitmap;return await async function(t,e=null){!function(t){for(const e in t||ao)return!1;return!0}(e)&&uo||(e=null);if(e)try{return await createImageBitmap(t,e)}catch(t){console.warn(t),uo=!1}return await createImageBitmap(t)}(n,i)}function lo(t){const e=ho(t);return function(t){const e=ho(t);if(!(e.byteLength>=24&&2303741511===e.getUint32(0,!1)))return null;return{mimeType:"image/png",width:e.getUint32(16,!1),height:e.getUint32(20,!1)}}(e)||function(t){const e=ho(t);if(!(e.byteLength>=3&&65496===e.getUint16(0,!1)&&255===e.getUint8(2)))return null;const{tableMarkers:r,sofMarkers:n}=function(){const t=new Set([65499,65476,65484,65501,65534]);for(let e=65504;e<65520;++e)t.add(e);const e=new Set([65472,65473,65474,65475,65477,65478,65479,65481,65482,65483,65485,65486,65487,65502]);return{tableMarkers:t,sofMarkers:e}}();let i=2;for(;i+9<e.byteLength;){const t=e.getUint16(i,!1);if(n.has(t))return{mimeType:"image/jpeg",height:e.getUint16(i+5,!1),width:e.getUint16(i+7,!1)};if(!r.has(t))return null;i+=2,i+=e.getUint16(i,!1)}return null}(e)||function(t){const e=ho(t);if(!(e.byteLength>=10&&1195984440===e.getUint32(0,!1)))return null;return{mimeType:"image/gif",width:e.getUint16(6,!0),height:e.getUint16(8,!0)}}(e)||function(t){const e=ho(t);if(!(e.byteLength>=14&&16973===e.getUint16(0,!1)&&e.getUint32(2,!0)===e.byteLength))return null;return{mimeType:"image/bmp",width:e.getUint32(18,!0),height:e.getUint32(22,!0)}}(e)}function ho(t){if(t instanceof DataView)return t;if(ArrayBuffer.isView(t))return new DataView(t.buffer);if(t instanceof ArrayBuffer)return new DataView(t);throw new Error("toDataView")}const fo={id:"image",module:"images",name:"Images",version:"3.1.0-alpha.5",mimeTypes:["image/png","image/jpeg","image/gif","image/webp","image/bmp","image/vnd.microsoft.icon","image/svg+xml"],extensions:["png","jpg","jpeg","gif","webp","bmp","ico","svg"],parse:async function(t,e,r){const n=((e=e||{}).image||{}).type||"auto",{url:i}=r||{};let o;switch(function(t){switch(t){case"auto":case"data":return function(){if(Zi)return"imagebitmap";if(Vi)return"image";if(Yi)return"data";throw new Error("Install '@loaders.gl/polyfills' to parse images under Node.js")}();default:return function(t){switch(t){case"auto":return Zi||Vi||Yi;case"imagebitmap":return Zi;case"image":return Vi;case"data":return Yi;default:throw new Error(`@loaders.gl/images: image ${t} not supported in this environment`)}}(t),t}}(n)){case"imagebitmap":o=await co(t,e,i);break;case"image":o=await so(t,e,i);break;case"data":o=await async function(t,e){const{mimeType:r}=lo(t)||{},n=globalThis._parseImageNode;return Object(kt.a)(n),await n(t,r)}(t);break;default:Object(kt.a)(!1)}return"data"===n&&(o=to(o)),o},tests:[t=>Boolean(lo(new DataView(t)))],options:{image:{type:"auto",decode:!0}}};var po=r(79),mo=r(15);function go(t,e){if(!t)throw new Error(e||"assert failed: gltf")}function _o(t,e){if(t.startsWith("data:")||t.startsWith("http:")||t.startsWith("https:"))return t;const r=e.baseUri||e.uri;if(!r)throw new Error("'baseUri' must be provided to resolve relative url "+t);return r.substr(0,r.lastIndexOf("/")+1)+t}function bo(t,e,r){const n=t.bufferViews[r];go(n);const i=e[n.buffer];go(i);const o=(n.byteOffset||0)+i.byteOffset;return new Uint8Array(i.arrayBuffer,o,n.byteLength)}var yo=r(31);const wo=["SCALAR","VEC2","VEC3","VEC4"],vo=[[Int8Array,5120],[Uint8Array,5121],[Int16Array,5122],[Uint16Array,5123],[Uint32Array,5125],[Float32Array,5126],[Float64Array,5130]],Ao=new Map(vo),Eo={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},So={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},Bo={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array};function Co(t){return wo[t-1]||wo[0]}function To(t){const e=Ao.get(t.constructor);if(!e)throw new Error("Illegal typed array");return e}function Ro(t,e){const r=Bo[t.componentType],n=Eo[t.type],i=So[t.componentType],o=t.count*n,s=t.count*n*i;return go(s>=0&&s<=e.byteLength),{ArrayType:r,length:o,byteLength:s}}function Oo(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Io={asset:{version:"2.0",generator:"loaders.gl"},buffers:[]};class Mo{constructor(t){Oo(this,"gltf",void 0),Oo(this,"sourceBuffers",void 0),Oo(this,"byteLength",void 0),this.gltf=t||{json:{...Io},buffers:[]},this.sourceBuffers=[],this.byteLength=0,this.gltf.buffers&&this.gltf.buffers[0]&&(this.byteLength=this.gltf.buffers[0].byteLength,this.sourceBuffers=[this.gltf.buffers[0]])}get json(){return this.gltf.json}getApplicationData(t){return this.json[t]}getExtraData(t){return(this.json.extras||{})[t]}getExtension(t){const e=this.getUsedExtensions().find(e=>e===t),r=this.json.extensions||{};return e?r[t]||!0:null}getRequiredExtension(t){return this.getRequiredExtensions().find(e=>e===t)?this.getExtension(t):null}getRequiredExtensions(){return this.json.extensionsRequired||[]}getUsedExtensions(){return this.json.extensionsUsed||[]}getObjectExtension(t,e){return(t.extensions||{})[e]}getScene(t){return this.getObject("scenes",t)}getNode(t){return this.getObject("nodes",t)}getSkin(t){return this.getObject("skins",t)}getMesh(t){return this.getObject("meshes",t)}getMaterial(t){return this.getObject("materials",t)}getAccessor(t){return this.getObject("accessors",t)}getTexture(t){return this.getObject("textures",t)}getSampler(t){return this.getObject("samplers",t)}getImage(t){return this.getObject("images",t)}getBufferView(t){return this.getObject("bufferViews",t)}getBuffer(t){return this.getObject("buffers",t)}getObject(t,e){if("object"==typeof e)return e;const r=this.json[t]&&this.json[t][e];if(!r)throw new Error(`glTF file error: Could not find ${t}[${e}]`);return r}getTypedArrayForBufferView(t){const e=(t=this.getBufferView(t)).buffer,r=this.gltf.buffers[e];go(r);const n=(t.byteOffset||0)+r.byteOffset;return new Uint8Array(r.arrayBuffer,n,t.byteLength)}getTypedArrayForAccessor(t){t=this.getAccessor(t);const e=this.getBufferView(t.bufferView),r=this.getBuffer(e.buffer).data,{ArrayType:n,length:i}=Ro(t,e);return new n(r,e.byteOffset+t.byteOffset,i)}getTypedArrayForImageData(t){t=this.getAccessor(t);const e=this.getBufferView(t.bufferView),r=this.getBuffer(e.buffer).data,n=e.byteOffset||0;return new Uint8Array(r,n,e.byteLength)}addApplicationData(t,e){return this.json[t]=e,this}addExtraData(t,e){return this.json.extras=this.json.extras||{},this.json.extras[t]=e,this}addObjectExtension(t,e,r){return t.extensions=t.extensions||{},t.extensions[e]=r,this.registerUsedExtension(e),this}setObjectExtension(t,e,r){(t.extensions||{})[e]=r}removeObjectExtension(t,e){const r=t.extensions||{},n=r[e];return delete r[e],n}addExtension(t,e={}){return go(e),this.json.extensions=this.json.extensions||{},this.json.extensions[t]=e,this.registerUsedExtension(t),e}addRequiredExtension(t,e={}){return go(e),this.addExtension(t,e),this.registerRequiredExtension(t),e}registerUsedExtension(t){this.json.extensionsUsed=this.json.extensionsUsed||[],this.json.extensionsUsed.find(e=>e===t)||this.json.extensionsUsed.push(t)}registerRequiredExtension(t){this.registerUsedExtension(t),this.json.extensionsRequired=this.json.extensionsRequired||[],this.json.extensionsRequired.find(e=>e===t)||this.json.extensionsRequired.push(t)}removeExtension(t){this.json.extensionsRequired&&this._removeStringFromArray(this.json.extensionsRequired,t),this.json.extensionsUsed&&this._removeStringFromArray(this.json.extensionsUsed,t),this.json.extensions&&delete this.json.extensions[t]}setDefaultScene(t){this.json.scene=t}addScene(t){const{nodeIndices:e}=t;return this.json.scenes=this.json.scenes||[],this.json.scenes.push({nodes:e}),this.json.scenes.length-1}addNode(t){const{meshIndex:e,matrix:r}=t;this.json.nodes=this.json.nodes||[];const n={mesh:e};return r&&(n.matrix=r),this.json.nodes.push(n),this.json.nodes.length-1}addMesh(t){const{attributes:e,indices:r,material:n,mode:i=4}=t,o={primitives:[{attributes:this._addAttributes(e),mode:i}]};if(r){const t=this._addIndices(r);o.primitives[0].indices=t}return Number.isFinite(n)&&(o.primitives[0].material=n),this.json.meshes=this.json.meshes||[],this.json.meshes.push(o),this.json.meshes.length-1}addPointCloud(t){const e={primitives:[{attributes:this._addAttributes(t),mode:0}]};return this.json.meshes=this.json.meshes||[],this.json.meshes.push(e),this.json.meshes.length-1}addImage(t,e){const r=lo(t),n=e||(null==r?void 0:r.mimeType),i={bufferView:this.addBufferView(t),mimeType:n};return this.json.images=this.json.images||[],this.json.images.push(i),this.json.images.length-1}addBufferView(t){const e=t.byteLength;go(Number.isFinite(e)),this.sourceBuffers=this.sourceBuffers||[],this.sourceBuffers.push(t);const r={buffer:0,byteOffset:this.byteLength,byteLength:e};return this.byteLength+=Object(yo.b)(e,4),this.json.bufferViews=this.json.bufferViews||[],this.json.bufferViews.push(r),this.json.bufferViews.length-1}addAccessor(t,e){const r={bufferView:t,type:Co(e.size),componentType:e.componentType,count:e.count,max:e.max,min:e.min};return this.json.accessors=this.json.accessors||[],this.json.accessors.push(r),this.json.accessors.length-1}addBinaryBuffer(t,e={size:3}){const r=this.addBufferView(t);let n={min:e.min,max:e.max};n.min&&n.max||(n=this._getAccessorMinMax(t,e.size));const i={size:e.size,componentType:To(t),count:Math.round(t.length/e.size),min:n.min,max:n.max};return this.addAccessor(r,Object.assign(i,e))}addTexture(t){const{imageIndex:e}=t,r={source:e};return this.json.textures=this.json.textures||[],this.json.textures.push(r),this.json.textures.length-1}addMaterial(t){return this.json.materials=this.json.materials||[],this.json.materials.push(t),this.json.materials.length-1}createBinaryChunk(){var t,e;this.gltf.buffers=[];const r=this.byteLength,n=new ArrayBuffer(r),i=new Uint8Array(n);let o=0;for(const t of this.sourceBuffers||[])o=Object(yo.a)(t,i,o);null!==(t=this.json)&&void 0!==t&&null!==(e=t.buffers)&&void 0!==e&&e[0]?this.json.buffers[0].byteLength=r:this.json.buffers=[{byteLength:r}],this.gltf.binary=n,this.sourceBuffers=[n]}_removeStringFromArray(t,e){let r=!0;for(;r;){const n=t.indexOf(e);n>-1?t.splice(n,1):r=!1}}_addAttributes(t={}){const e={};for(const r in t){const n=t[r],i=this._getGltfAttributeName(r),o=this.addBinaryBuffer(n.value,n);e[i]=o}return e}_addIndices(t){return this.addBinaryBuffer(t,{size:1})}_getGltfAttributeName(t){switch(t.toLowerCase()){case"position":case"positions":case"vertices":return"POSITION";case"normal":case"normals":return"NORMAL";case"color":case"colors":return"COLOR_0";case"texcoord":case"texcoords":return"TEXCOORD_0";default:return t}}_getAccessorMinMax(t,e){const r={min:null,max:null};if(t.length<e)return r;r.min=[],r.max=[];const n=t.subarray(0,e);for(const t of n)r.min.push(t),r.max.push(t);for(let n=e;n<t.length;n+=e)for(let i=0;i<e;i++)r.min[0+i]=Math.min(r.min[0+i],t[n+i]),r.max[0+i]=Math.max(r.max[0+i],t[n+i]);return r}}const xo="object"!=typeof WebAssembly,Do=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),ko=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]),Po={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},Lo={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};let Fo;async function No(){return Fo||(Fo=async function(){let t="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB";WebAssembly.validate(Do)&&(t="B9h9z9tFBBBF8dL9gBB9gLaaaaaFa9gEaaaB9gGaaB9gFaFaEQSBBFBFFGEGEGIILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBNn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBcI9z9iqlBMc/j9JSIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMkRIbaG97FaK978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAnDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAnDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAnDeBJAeCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPD8dBhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBAeCx+YUUBJDBBBHnAnDQBBBBBBBBBBBBBBBBAPD8dFhUg/8/4/w/goB9+h84k7HeCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAnDeBJAeCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMGXAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBRnCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBHiCFD9tAiAPD9OD9hD9RHiDQBTFtGmEYIPLdKeOnH8ZAIAQJDBIBHpCFD9tApAPD9OD9hD9RHpAIASJDBIBHyCFD9tAyAPD9OD9hD9RHyDQBTFtGmEYIPLdKeOnH8cDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAnD9uHnDyBjGBAEAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJHIAnA8ZA8cDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHnDyBjGBAIAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJHIAnAdAiDQNiV8ZcpMyS8cQ8df8eb8fHdApAyDQNiV8ZcpMyS8cQ8df8eb8fHiDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHnDyBjGBAIAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJHIAnAdAiDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHnDyBjGBAIAGJHIAnAPAPDQILKOILKOILKOILKOD9uHnDyBjGBAIAGJHIAnAPAPDQNVcMNVcMNVcMNVcMD9uHnDyBjGBAIAGJHIAnAPAPDQSQfbSQfbSQfbSQfbD9uHnDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/xLGEaK978jUUUUBCAlHE8kUUUUBGXGXAGCI9HQBGXAFC98ZHI9FQBABRGCBRLEXAGAGDBBBHKCiD+rFCiD+sFD/6FHOAKCND+rFCiD+sFD/6FAOD/gFAKCTD+rFCiD+sFD/6FHND/gFD/kFD/lFHVCBDtD+2FHcAOCUUUU94DtHMD9OD9RD/kFHO9DBB/+hDYAOAOD/mFAVAVD/mFANAcANAMD9OD9RD/kFHOAOD/mFD/kFD/kFD/jFD/nFHND/mF9DBBX9LDYHcD/kFCgFDtD9OAKCUUU94DtD9OD9QAOAND/mFAcD/kFCND+rFCU/+EDtD9OD9QAVAND/mFAcD/kFCTD+rFCUU/8ODtD9OD9QDMBBAGCTJRGALCIJHLAI9JQBMMAIAF9PQFAEAFCEZHLCGWHGqCBCTAGl/8MBAEABAICGWJHIAG/8cBBGXAL9FQBAEAEDBIBHKCiD+rFCiD+sFD/6FHOAKCND+rFCiD+sFD/6FAOD/gFAKCTD+rFCiD+sFD/6FHND/gFD/kFD/lFHVCBDtD+2FHcAOCUUUU94DtHMD9OD9RD/kFHO9DBB/+hDYAOAOD/mFAVAVD/mFANAcANAMD9OD9RD/kFHOAOD/mFD/kFD/kFD/jFD/nFHND/mF9DBBX9LDYHcD/kFCgFDtD9OAKCUUU94DtD9OD9QAOAND/mFAcD/kFCND+rFCU/+EDtD9OD9QAVAND/mFAcD/kFCTD+rFCUU/8ODtD9OD9QDMIBMAIAEAG/8cBBSFMABAFC98ZHGT+HUUUBAGAF9PQBAEAFCEZHICEWHLJCBCAALl/8MBAEABAGCEWJHGAL/8cBBAEAIT+HUUUBAGAEAL/8cBBMAECAJ8kUUUUBM+yEGGaO97GXAF9FQBCBRGEXABCTJHEAEDBBBHICBDtHLCUU98D8cFCUU98D8cEHKD9OABDBBBHOAIDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAOAIDQBFGENVcMTtmYi8ZpyHICTD+sFD/6FHND/gFAICTD+rFCTD+sFD/6FHVD/gFD/kFD/lFHI9DB/+g6DYAVAIALD+2FHLAVCUUUU94DtHcD9OD9RD/kFHVAVD/mFAIAID/mFANALANAcD9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHND/mF9DBBX9LDYHLD/kFCTD+rFAVAND/mFALD/kFCggEDtD9OD9QHVAIAND/mFALD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHIDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAOAKD9OAVAIDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM94FEa8jUUUUBCAlHE8kUUUUBABAFC98ZHIT+JUUUBGXAIAF9PQBAEAFCEZHLCEWHFJCBCAAFl/8MBAEABAICEWJHBAF/8cBBAEALT+JUUUBABAEAF/8cBBMAECAJ8kUUUUBM/hEIGaF97FaL978jUUUUBCTlRGGXAF9FQBCBREEXAGABDBBBHIABCTJHLDBBBHKDQILKOSQfbPden8c8d8e8fHOCTD+sFHNCID+rFDMIBAB9DBBU8/DY9D/zI818/DYANCEDtD9QD/6FD/nFHNAIAKDQBFGENVcMTtmYi8ZpyHICTD+rFCTD+sFD/6FD/mFHKAKD/mFANAICTD+sFD/6FD/mFHVAVD/mFANAOCTD+rFCTD+sFD/6FD/mFHOAOD/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHND/mF9DBBX9LDYHID/kFCggEDtHcD9OAVAND/mFAID/kFCTD+rFD9QHVAOAND/mFAID/kFCTD+rFAKAND/mFAID/kFAcD9OD9QHNDQBFTtGEmYILPdKOenHID8dBAGDBIBDyB+t+J83EBABCNJAID8dFAGDBIBDyF+t+J83EBALAVANDQNVi8ZcMpySQ8c8dfb8e8fHND8dBAGDBIBDyG+t+J83EBABCiJAND8dFAGDBIBDyE+t+J83EBABCAJRBAECIJHEAF9JQBMMM/3FGEaF978jUUUUBCoBlREGXAGCGrAF9sHIC98ZHL9FQBCBRGABRFEXAFAFDBBBHKCND+rFCND+sFD/6FAKCiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBAFCTJRFAGCIJHGAL9JQBMMGXALAI9PQBAEAICEZHGCGWHFqCBCoBAFl/8MBAEABALCGWJHLAF/8cBBGXAG9FQBAEAEDBIBHKCND+rFCND+sFD/6FAKCiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMIBMALAEAF/8cBBMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB",console.log("Warning: meshopt_decoder is using experimental SIMD support"));const e=await WebAssembly.instantiate(function(t){const e=new Uint8Array(t.length);for(let r=0;r<t.length;++r){const n=t.charCodeAt(r);e[r]=n>96?n-71:n>64?n-65:n>47?n+4:n>46?63:62}let r=0;for(let n=0;n<t.length;++n)e[r++]=e[n]<60?ko[e[n]]:64*(e[n]-60)+e[++n];return e.buffer.slice(0,r)}(t),{});return await e.instance.exports.__wasm_call_ctors(),e.instance}()),Fo}function Uo(t,e,r,n,i,o,s){const a=t.exports.sbrk,u=n+3&-4,c=a(u*i),l=a(o.length),h=new Uint8Array(t.exports.memory.buffer);h.set(o,l);const f=e(c,n,i,l,o.length);if(0===f&&s&&s(c,u,i),r.set(h.subarray(c,c+n*i)),a(c-a(0)),0!==f)throw new Error("Malformed buffer data: "+f)}const Go="EXT_meshopt_compression";function jo(t){if(new Mo(t).getRequiredExtensions().includes("EXT_meshopt_compression")&&!xo)throw new Error("gltf: Required extension EXT_meshopt_compression not supported by browser")}async function Ho(t,e){var r;const n=new Mo(t);if(null==e||null===(r=e.gltf)||void 0===r||!r.decompressMeshes)return;const i=[];for(const e of t.json.bufferViews||[])i.push(zo(n,e));await Promise.all(i),n.removeExtension("EXT_meshopt_compression")}async function zo(t,e){const r=t.getObjectExtension(e,"EXT_meshopt_compression");if(r){const t=e.buffer,{byteOffset:n=0,byteLength:i=0,byteStride:o,count:s,mode:a,filter:u="NONE"}=r,c=new Uint8Array(t,n,i),l=new ArrayBuffer(s*o);return await async function(t,e,r,n,i,o="NONE"){const s=await No();Uo(s,s.exports[Lo[i]],t,e,r,n,s.exports[Po[o||"NONE"]])}(new Uint8Array(l),s,o,c,a,u),l}return null}const Jo=["image/png","image/jpeg","image/gif"],Wo={};function Ko(t){return void 0===Wo[t]&&(Wo[t]=function(t){switch(t){case"image/webp":return function(){if(!Qi.a)return!1;try{return 0===document.createElement("canvas").toDataURL("image/webp").indexOf("data:image/webp")}catch{return!1}}();case"image/svg":return Qi.a;default:if(!Qi.a){const{_parseImageNode:e}=globalThis;return Boolean(e)&&Jo.includes(t)}return!0}}(t)),Wo[t]}const Qo="EXT_texture_webp";function qo(t,e){const r=new Mo(t);if(!Ko("image/webp")){if(r.getRequiredExtensions().includes("EXT_texture_webp"))throw new Error("gltf: Required extension EXT_texture_webp not supported by browser");return}const{json:n}=r;for(const t of n.textures||[]){const e=r.getObjectExtension(t,"EXT_texture_webp");e&&(t.source=e.source),r.removeObjectExtension(t,"EXT_texture_webp")}r.removeExtension("EXT_texture_webp")}const Vo="KHR_texture_basisu";function Zo(t,e){const r=new Mo(t),{json:n}=r;for(const t of n.textures||[]){const e=r.getObjectExtension(t,"KHR_texture_basisu");e&&(t.source=e.source),r.removeObjectExtension(t,"KHR_texture_basisu")}r.removeExtension("KHR_texture_basisu")}function Xo(t){const{buffer:e,size:r,count:n}=function(t){let e=t,r=1,n=0;t&&t.value&&(e=t.value,r=t.size||1);e&&(ArrayBuffer.isView(e)||(e=function(t,e,r=!1){if(!t)return null;if(Array.isArray(t))return new e(t);if(r&&!(t instanceof e))return new e(t);return t}(e,Float32Array)),n=e.length/r);return{buffer:e,size:r,count:n}}(t);return{value:e,size:r,byteOffset:0,count:n,type:Co(r),componentType:To(e)}}const Yo="KHR_draco_mesh_compression";function $o(t,e,r){const n=new Mo(t);for(const t of is(n))n.getObjectExtension(t,"KHR_draco_mesh_compression")}async function ts(t,e,r){var n;if(null==e||null===(n=e.gltf)||void 0===n||!n.decompressMeshes)return;const i=new Mo(t),o=[];for(const t of is(i))i.getObjectExtension(t,"KHR_draco_mesh_compression")&&o.push(rs(i,t,e,r));await Promise.all(o),i.removeExtension("KHR_draco_mesh_compression")}function es(t,e={}){const r=new Mo(t);for(const t of r.json.meshes||[])ns(t,e),r.addRequiredExtension("KHR_draco_mesh_compression")}async function rs(t,e,r,n){const i=t.getObjectExtension(e,"KHR_draco_mesh_compression");if(!i)return;const o=t.getTypedArrayForBufferView(i.bufferView),s=Object(mo.c)(o.buffer,o.byteOffset),{parse:a}=n,u={...r};delete u["3d-tiles"];const c=await a(s,In,u,n),l=function(t){const e={};for(const r in t){const n=t[r];if("indices"!==r){const t=Xo(n);e[r]=t}}return e}(c.attributes);for(const[r,n]of Object.entries(l))if(r in e.attributes){const i=e.attributes[r],o=t.getAccessor(i);null!=o&&o.min&&null!=o&&o.max&&(n.min=o.min,n.max=o.max)}e.attributes=l,c.indices&&(e.indices=Xo(c.indices)),function(t){if(!t.attributes&&Object.keys(t.attributes).length>0)throw new Error("glTF: Empty primitive detected: Draco decompression failure?")}(e)}function ns(t,e,r=4,n,i){var o;if(!n.DracoWriter)throw new Error("options.gltf.DracoWriter not provided");const s=n.DracoWriter.encodeSync({attributes:t}),a=null==i||null===(o=i.parseSync)||void 0===o?void 0:o.call(i,{attributes:t}),u=n._addFauxAttributes(a.attributes);return{primitives:[{attributes:u,mode:r,extensions:{KHR_draco_mesh_compression:{bufferView:n.addBufferView(s),attributes:u}}}]}}function*is(t){for(const e of t.json.meshes||[])for(const t of e.primitives)yield t}const os="KHR_lights_punctual";async function ss(t){const e=new Mo(t),{json:r}=e,n=e.getExtension("KHR_lights_punctual");n&&(e.json.lights=n.lights,e.removeExtension("KHR_lights_punctual"));for(const t of r.nodes||[]){const r=e.getObjectExtension(t,"KHR_lights_punctual");r&&(t.light=r.light),e.removeObjectExtension(t,"KHR_lights_punctual")}}async function as(t){const e=new Mo(t),{json:r}=e;if(r.lights){const t=e.addExtension("KHR_lights_punctual");go(!t.lights),t.lights=r.lights,delete r.lights}if(e.json.lights){for(const t of e.json.lights){const r=t.node;e.addObjectExtension(r,"KHR_lights_punctual",t)}delete e.json.lights}}const us="KHR_materials_unlit";async function cs(t){const e=new Mo(t),{json:r}=e;e.removeExtension("KHR_materials_unlit");for(const t of r.materials||[]){t.extensions&&t.extensions.KHR_materials_unlit&&(t.unlit=!0),e.removeObjectExtension(t,"KHR_materials_unlit")}}function ls(t){const e=new Mo(t),{json:r}=e;if(e.materials)for(const t of r.materials||[])t.unlit&&(delete t.unlit,e.addObjectExtension(t,"KHR_materials_unlit",{}),e.addExtension("KHR_materials_unlit"))}const hs="KHR_techniques_webgl";async function fs(t){const e=new Mo(t),{json:r}=e,n=e.getExtension("KHR_techniques_webgl");if(n){const t=function(t,e){const{programs:r=[],shaders:n=[],techniques:i=[]}=t,o=new TextDecoder;return n.forEach(t=>{if(!Number.isFinite(t.bufferView))throw new Error("KHR_techniques_webgl: no shader code");t.code=o.decode(e.getTypedArrayForBufferView(t.bufferView))}),r.forEach(t=>{t.fragmentShader=n[t.fragmentShader],t.vertexShader=n[t.vertexShader]}),i.forEach(t=>{t.program=r[t.program]}),i}(n,e);for(const n of r.materials||[]){const r=e.getObjectExtension(n,"KHR_techniques_webgl");r&&(n.technique=Object.assign({},r,t[r.technique]),n.technique.values=ps(n.technique,e)),e.removeObjectExtension(n,"KHR_techniques_webgl")}e.removeExtension("KHR_techniques_webgl")}}async function ds(t,e){}function ps(t,e){const r=Object.assign({},t.values);return Object.keys(t.uniforms||{}).forEach(e=>{t.uniforms[e].value&&!(e in r)&&(r[e]=t.uniforms[e].value)}),Object.keys(r).forEach(t=>{"object"==typeof r[t]&&void 0!==r[t].index&&(r[t].texture=e.getTexture(r[t].index))}),r}const ms=[n,i,o,s,a,u,c];function gs(t,e){var r;const n=(null==e||null===(r=e.gltf)||void 0===r?void 0:r.excludeExtensions)||{};return!(t in n&&!n[t])}const _s={accessors:"accessor",animations:"animation",buffers:"buffer",bufferViews:"bufferView",images:"image",materials:"material",meshes:"mesh",nodes:"node",samplers:"sampler",scenes:"scene",skins:"skin",textures:"texture"},bs={accessor:"accessors",animations:"animation",buffer:"buffers",bufferView:"bufferViews",image:"images",material:"materials",mesh:"meshes",node:"nodes",sampler:"samplers",scene:"scenes",skin:"skins",texture:"textures"};class ys{constructor(t){this.idToIndexMap={animations:{},accessors:{},buffers:{},bufferViews:{},images:{},materials:{},meshes:{},nodes:{},samplers:{},scenes:{},skins:{},textures:{}}}normalize(t,e){this.json=t.json;const r=t.json;switch(r.asset&&r.asset.version){case"2.0":return;case void 0:case"1.0":break;default:return void console.warn("glTF: Unknown version "+r.asset.version)}if(!e.normalize)throw new Error("glTF v1 is not supported.");console.warn("Converting glTF v1 to glTF v2 format. This is experimental and may fail."),this._addAsset(r),this._convertTopLevelObjectsToArrays(r),function(t){const e=new Mo(t),{json:r}=e;for(const t of r.images||[]){const r=e.getObjectExtension(t,"KHR_binary_glTF");r&&Object.assign(t,r),e.removeObjectExtension(t,"KHR_binary_glTF")}r.buffers&&r.buffers[0]&&delete r.buffers[0].uri,e.removeExtension("KHR_binary_glTF")}(t),this._convertObjectIdsToArrayIndices(r),this._updateObjects(r),this._updateMaterial(r)}_addAsset(t){t.asset=t.asset||{},t.asset.version="2.0",t.asset.generator=t.asset.generator||"Normalized to glTF 2.0 by loaders.gl"}_convertTopLevelObjectsToArrays(t){for(const e in _s)this._convertTopLevelObjectToArray(t,e)}_convertTopLevelObjectToArray(t,e){const r=t[e];if(r&&!Array.isArray(r)){t[e]=[];for(const n in r){const i=r[n];i.id=i.id||n;const o=t[e].length;t[e].push(i),this.idToIndexMap[e][n]=o}}}_convertObjectIdsToArrayIndices(t){for(const e in _s)this._convertIdsToIndices(t,e);"scene"in t&&(t.scene=this._convertIdToIndex(t.scene,"scene"));for(const e of t.textures)this._convertTextureIds(e);for(const e of t.meshes)this._convertMeshIds(e);for(const e of t.nodes)this._convertNodeIds(e);for(const e of t.scenes)this._convertSceneIds(e)}_convertTextureIds(t){t.source&&(t.source=this._convertIdToIndex(t.source,"image"))}_convertMeshIds(t){for(const e of t.primitives){const{attributes:t,indices:r,material:n}=e;for(const e in t)t[e]=this._convertIdToIndex(t[e],"accessor");r&&(e.indices=this._convertIdToIndex(r,"accessor")),n&&(e.material=this._convertIdToIndex(n,"material"))}}_convertNodeIds(t){t.children&&(t.children=t.children.map(t=>this._convertIdToIndex(t,"node"))),t.meshes&&(t.meshes=t.meshes.map(t=>this._convertIdToIndex(t,"mesh")))}_convertSceneIds(t){t.nodes&&(t.nodes=t.nodes.map(t=>this._convertIdToIndex(t,"node")))}_convertIdsToIndices(t,e){t[e]||(console.warn("gltf v1: json doesn't contain attribute "+e),t[e]=[]);for(const r of t[e])for(const t in r){const e=r[t],n=this._convertIdToIndex(e,t);r[t]=n}}_convertIdToIndex(t,e){const r=bs[e];if(r in this.idToIndexMap){const n=this.idToIndexMap[r][t];if(!Number.isFinite(n))throw new Error(`gltf v1: failed to resolve ${e} with id ${t}`);return n}return t}_updateObjects(t){for(const t of this.json.buffers)delete t.type}_updateMaterial(t){for(const e of t.materials){e.pbrMetallicRoughness={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1};const r=e.values&&e.values.tex,n=t.textures.findIndex(t=>t.id===r);-1!==n&&(e.pbrMetallicRoughness.baseColorTexture={index:n})}}}const ws={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},vs={5120:1,5121:1,5122:2,5123:2,5125:4,5126:4},As={TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,REPEAT:10497,LINEAR:9729,NEAREST_MIPMAP_LINEAR:9986},Es={magFilter:As.TEXTURE_MAG_FILTER,minFilter:As.TEXTURE_MIN_FILTER,wrapS:As.TEXTURE_WRAP_S,wrapT:As.TEXTURE_WRAP_T},Ss={[As.TEXTURE_MAG_FILTER]:As.LINEAR,[As.TEXTURE_MIN_FILTER]:As.NEAREST_MIPMAP_LINEAR,[As.TEXTURE_WRAP_S]:As.REPEAT,[As.TEXTURE_WRAP_]:As.REPEAT};class Bs{postProcess(t,e={}){const{json:r,buffers:n=[],images:i=[],baseUri:o=""}=t;return go(r),this.baseUri=o,this.json=r,this.buffers=n,this.images=i,this._resolveTree(this.json,e),this.json}_resolveTree(t,e={}){t.bufferViews&&(t.bufferViews=t.bufferViews.map((t,e)=>this._resolveBufferView(t,e))),t.images&&(t.images=t.images.map((t,e)=>this._resolveImage(t,e))),t.samplers&&(t.samplers=t.samplers.map((t,e)=>this._resolveSampler(t,e))),t.textures&&(t.textures=t.textures.map((t,e)=>this._resolveTexture(t,e))),t.accessors&&(t.accessors=t.accessors.map((t,e)=>this._resolveAccessor(t,e))),t.materials&&(t.materials=t.materials.map((t,e)=>this._resolveMaterial(t,e))),t.meshes&&(t.meshes=t.meshes.map((t,e)=>this._resolveMesh(t,e))),t.nodes&&(t.nodes=t.nodes.map((t,e)=>this._resolveNode(t,e))),t.skins&&(t.skins=t.skins.map((t,e)=>this._resolveSkin(t,e))),t.scenes&&(t.scenes=t.scenes.map((t,e)=>this._resolveScene(t,e))),void 0!==t.scene&&(t.scene=t.scenes[this.json.scene])}getScene(t){return this._get("scenes",t)}getNode(t){return this._get("nodes",t)}getSkin(t){return this._get("skins",t)}getMesh(t){return this._get("meshes",t)}getMaterial(t){return this._get("materials",t)}getAccessor(t){return this._get("accessors",t)}getCamera(t){return null}getTexture(t){return this._get("textures",t)}getSampler(t){return this._get("samplers",t)}getImage(t){return this._get("images",t)}getBufferView(t){return this._get("bufferViews",t)}getBuffer(t){return this._get("buffers",t)}_get(t,e){if("object"==typeof e)return e;const r=this.json[t]&&this.json[t][e];return r||console.warn(`glTF file error: Could not find ${t}[${e}]`),r}_resolveScene(t,e){return t.id=t.id||"scene-"+e,t.nodes=(t.nodes||[]).map(t=>this.getNode(t)),t}_resolveNode(t,e){return t.id=t.id||"node-"+e,t.children&&(t.children=t.children.map(t=>this.getNode(t))),void 0!==t.mesh?t.mesh=this.getMesh(t.mesh):void 0!==t.meshes&&t.meshes.length&&(t.mesh=t.meshes.reduce((t,e)=>{const r=this.getMesh(e);return t.id=r.id,t.primitives=t.primitives.concat(r.primitives),t},{primitives:[]})),void 0!==t.camera&&(t.camera=this.getCamera(t.camera)),void 0!==t.skin&&(t.skin=this.getSkin(t.skin)),t}_resolveSkin(t,e){return t.id=t.id||"skin-"+e,t.inverseBindMatrices=this.getAccessor(t.inverseBindMatrices),t}_resolveMesh(t,e){return t.id=t.id||"mesh-"+e,t.primitives&&(t.primitives=t.primitives.map(t=>{const e=(t={...t}).attributes;t.attributes={};for(const r in e)t.attributes[r]=this.getAccessor(e[r]);return void 0!==t.indices&&(t.indices=this.getAccessor(t.indices)),void 0!==t.material&&(t.material=this.getMaterial(t.material)),t})),t}_resolveMaterial(t,e){if(t.id=t.id||"material-"+e,t.normalTexture&&(t.normalTexture={...t.normalTexture},t.normalTexture.texture=this.getTexture(t.normalTexture.index)),t.occlusionTexture&&(t.occlustionTexture={...t.occlustionTexture},t.occlusionTexture.texture=this.getTexture(t.occlusionTexture.index)),t.emissiveTexture&&(t.emmisiveTexture={...t.emmisiveTexture},t.emissiveTexture.texture=this.getTexture(t.emissiveTexture.index)),t.emissiveFactor||(t.emissiveFactor=t.emmisiveTexture?[1,1,1]:[0,0,0]),t.pbrMetallicRoughness){t.pbrMetallicRoughness={...t.pbrMetallicRoughness};const e=t.pbrMetallicRoughness;e.baseColorTexture&&(e.baseColorTexture={...e.baseColorTexture},e.baseColorTexture.texture=this.getTexture(e.baseColorTexture.index)),e.metallicRoughnessTexture&&(e.metallicRoughnessTexture={...e.metallicRoughnessTexture},e.metallicRoughnessTexture.texture=this.getTexture(e.metallicRoughnessTexture.index))}return t}_resolveAccessor(t,e){var r,n;if(t.id=t.id||"accessor-"+e,void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView)),t.bytesPerComponent=(r=t.componentType,vs[r]),t.components=(n=t.type,ws[n]),t.bytesPerElement=t.bytesPerComponent*t.components,t.bufferView){const e=t.bufferView.buffer,{ArrayType:r,byteLength:n}=Ro(t,t.bufferView),i=(t.bufferView.byteOffset||0)+(t.byteOffset||0)+e.byteOffset,o=e.arrayBuffer.slice(i,i+n);t.value=new r(o)}return t}_resolveTexture(t,e){return t.id=t.id||"texture-"+e,t.sampler="sampler"in t?this.getSampler(t.sampler):Ss,t.source=this.getImage(t.source),t}_resolveSampler(t,e){t.id=t.id||"sampler-"+e,t.parameters={};for(const e in t){const r=this._enumSamplerParameter(e);void 0!==r&&(t.parameters[r]=t[e])}return t}_enumSamplerParameter(t){return Es[t]}_resolveImage(t,e){t.id=t.id||"image-"+e,void 0!==t.bufferView&&(t.bufferView=this.getBufferView(t.bufferView));const r=this.images[e];return r&&(t.image=r),t}_resolveBufferView(t,e){t.id=t.id||"bufferView-"+e;const r=t.buffer;t.buffer=this.buffers[r];const n=this.buffers[r].arrayBuffer;let i=this.buffers[r].byteOffset||0;return"byteOffset"in t&&(i+=t.byteOffset),t.data=new Uint8Array(n,i,t.byteLength),t}_resolveCamera(t,e){return t.id=t.id||"camera-"+e,t.perspective,t.orthographic,t}}const Cs=1735152710;function Ts(t,e=0,r={}){const n=new DataView(t),{magic:i=Cs}=r,o=n.getUint32(e,!1);return o===i||o===Cs}function Rs(t,e,r=0,n={}){const i=new DataView(e),o=function(t,e=0){return`${String.fromCharCode(t.getUint8(e+0))}${String.fromCharCode(t.getUint8(e+1))}${String.fromCharCode(t.getUint8(e+2))}${String.fromCharCode(t.getUint8(e+3))}`}(i,r+0),s=i.getUint32(r+4,!0),a=i.getUint32(r+8,!0);switch(Object.assign(t,{header:{byteOffset:r,byteLength:a,hasBinChunk:!1},type:o,version:s,json:{},binChunks:[]}),r+=12,t.version){case 1:return function(t,e,r){Object(kt.a)(t.header.byteLength>20);const n=e.getUint32(r+0,!0),i=e.getUint32(r+4,!0);return r+=8,Object(kt.a)(0===i),Os(t,e,r,n),r+=n,r+=Is(t,e,r,t.header.byteLength)}(t,i,r);case 2:return function(t,e,r,n){return Object(kt.a)(t.header.byteLength>20),function(t,e,r,n){for(;r+8<=t.header.byteLength;){const i=e.getUint32(r+0,!0),o=e.getUint32(r+4,!0);switch(r+=8,o){case 1313821514:Os(t,e,r,i);break;case 5130562:Is(t,e,r,i);break;case 0:n.strict||Os(t,e,r,i);break;case 1:n.strict||Is(t,e,r,i)}r+=Object(yo.b)(i,4)}}(t,e,r,n),r+t.header.byteLength}(t,i,r,{});default:throw new Error(`Invalid GLB version ${t.version}. Only supports v1 and v2.`)}}function Os(t,e,r,n){const i=new Uint8Array(e.buffer,r,n),o=new TextDecoder("utf8").decode(i);return t.json=JSON.parse(o),Object(yo.b)(n,4)}function Is(t,e,r,n){return t.header.hasBinChunk=!0,t.binChunks.push({byteOffset:r,byteLength:n,arrayBuffer:e.buffer}),Object(yo.b)(n,4)}async function Ms(t,e,r=0,n,i){var o,s,a,u;!function(t,e,r,n){n.uri&&(t.baseUri=n.uri);if(e instanceof ArrayBuffer&&!Ts(e,r,n)){const t=new TextDecoder;e=t.decode(e)}if("string"==typeof e)t.json=Object(po.a)(e);else if(e instanceof ArrayBuffer){const i={};r=Rs(i,e,r,n.glb),go("glTF"===i.type,"Invalid GLB magic string "+i.type),t._glb=i,t.json=i.json}else go(!1,"GLTF: must be ArrayBuffer or string");const i=t.json.buffers||[];if(t.buffers=new Array(i.length).fill(null),t._glb&&t._glb.header.hasBinChunk){const{binChunks:e}=t._glb;t.buffers[0]={arrayBuffer:e[0].arrayBuffer,byteOffset:e[0].byteOffset,byteLength:e[0].byteLength}}const o=t.json.images||[];t.images=new Array(o.length).fill({})}(t,e,r,n),function(t,e={}){(new ys).normalize(t,e)}(t,{normalize:null==n||null===(o=n.gltf)||void 0===o?void 0:o.normalize}),function(t,e={},r){const n=ms.filter(t=>gs(t.name,e));for(const o of n){var i;null===(i=o.preprocess)||void 0===i||i.call(o,t,e,r)}}(t,n,i);const c=[];if(null!=n&&null!==(s=n.gltf)&&void 0!==s&&s.loadBuffers&&t.json.buffers&&await async function(t,e,r){const n=t.json.buffers||[];for(let s=0;s<n.length;++s){const a=n[s];if(a.uri){var i,o;const{fetch:n}=r;go(n);const u=_o(a.uri,e),c=await(null==r||null===(i=r.fetch)||void 0===i?void 0:i.call(r,u)),l=await(null==c||null===(o=c.arrayBuffer)||void 0===o?void 0:o.call(c));t.buffers[s]={arrayBuffer:l,byteOffset:0,byteLength:l.byteLength},delete a.uri}}}(t,n,i),null!=n&&null!==(a=n.gltf)&&void 0!==a&&a.loadImages){const e=async function(t,e,r){const n=function(t){const e=new Set,r=t.json.textures||[];for(const t of r)void 0!==t.source&&e.add(t.source);return Array.from(e).sort()}(t),i=t.json.images||[],o=[];for(const s of n)o.push(xs(t,i[s],s,e,r));return await Promise.all(o)}(t,n,i);c.push(e)}const l=async function(t,e={},r){const n=ms.filter(t=>gs(t.name,e));for(const o of n){var i;await(null===(i=o.decode)||void 0===i?void 0:i.call(o,t,e,r))}}(t,n,i);return c.push(l),await Promise.all(c),null!=n&&null!==(u=n.gltf)&&void 0!==u&&u.postProcess?function(t,e){return(new Bs).postProcess(t,e)}(t,n):t}async function xs(t,e,r,n,i){const{fetch:o,parse:s}=i;let a;if(e.uri){const t=_o(e.uri,n),r=await o(t);a=await r.arrayBuffer()}if(Number.isFinite(e.bufferView)){const r=bo(t.json,t.buffers,e.bufferView);a=Object(mo.c)(r.buffer,r.byteOffset,r.byteLength)}go(a,"glTF image has no data");let u=await s(a,[fo,Ki],{mimeType:e.mimeType,basis:{format:Ji()}},i);u&&u[0]&&(u={compressed:!0,mipmaps:!1,width:u[0].width,height:u[0].height,data:u}),t.images=t.images||[],t.images[r]=u}const Ds={name:"glTF",id:"gltf",module:"gltf",version:"3.1.0-alpha.5",extensions:["gltf","glb"],mimeTypes:["model/gltf+json","model/gltf-binary"],text:!0,binary:!0,tests:["glTF"],parse:async function(t,e={},r){(e={...Ds.options,...e}).gltf={...Ds.options.gltf,...e.gltf};const{byteOffset:n=0}=e;return await Ms({},t,n,e,r)},options:{gltf:{normalize:!0,loadBuffers:!0,loadImages:!0,decompressMeshes:!0,postProcess:!0},log:console},deprecatedOptions:{fetchImages:"gltf.loadImages",createImages:"gltf.loadImages",decompress:"gltf.decompressMeshes",postProcess:"gltf.postProcess",gltf:{decompress:"gltf.decompressMeshes"}}};const ks=0,Ps=1;function Ls(t,e,r,n){t.rotateYtoZ=!0;const i=t.byteOffset+t.byteLength-r;if(0===i)throw new Error("glTF byte length must be greater than 0.");return t.gltfUpAxis=n["3d-tiles"]&&n["3d-tiles"].assetGltfUpAxis?n["3d-tiles"].assetGltfUpAxis:"Y",t.gltfArrayBuffer=Object(mo.c)(e,r,i),t.gltfByteOffset=0,t.gltfByteLength=i,r%4==0||console.warn(t.type+": embedded glb is not aligned to a 4-byte boundary."),t.byteOffset+t.byteLength}async function Fs(t,e,r,n){const i=r["3d-tiles"]||{};if(function(t,e,r){switch(e){case ks:const e=new Uint8Array(t.gltfArrayBuffer,t.gltfByteOffset),r=(new TextDecoder).decode(e);t.gltfUrl=r.replace(/[\s\0]+$/,""),delete t.gltfArrayBuffer,delete t.gltfByteOffset,delete t.gltfByteLength;break;case Ps:break;default:throw new Error("b3dm: Illegal glTF format field")}}(t,e),i.loadGLTF){const{parse:e,fetch:i}=n;t.gltfUrl&&(t.gltfArrayBuffer=await i(t.gltfUrl,r),t.gltfByteOffset=0),t.gltfArrayBuffer&&(t.gltf=await e(t.gltfArrayBuffer,Ds,r,n),delete t.gltfArrayBuffer,delete t.gltfByteOffset,delete t.gltfByteLength)}}async function Ns(t,e,r,n,i){var o;r=function(t,e,r,n,i){r=qn(t,e,r),r=Vn(t,e,r),r=Zn(t,e,r),r=Ls(t,e,r,n);const o=new Ln(t.featureTableJson,t.featureTableBinary);return t.rtcCenter=o.getGlobalProperty("RTC_CENTER",xn.FLOAT,3),r}(t,e,r,n),await Fs(t,Ps,n,i);const s=null==t||null===(o=t.gltf)||void 0===o?void 0:o.extensions;return s&&s.CESIUM_RTC&&(t.rtcCenter=s.CESIUM_RTC.center),r}async function Us(t,e,r,n,i){return r=function(t,e,r,n,i){if(r=qn(t,e,r),1!==t.version)throw new Error(`Instanced 3D Model version ${t.version} is not supported`);r=Vn(t,e,r);const o=new DataView(e);if(t.gltfFormat=o.getUint32(r,!0),r=Zn(t,e,r+=4),r=Ls(t,e,r,n),0===t.featureTableJsonByteLength)throw new Error("i3dm parser: featureTableJsonByteLength is zero.");const s=new Ln(t.featureTableJson,t.featureTableBinary),a=s.getGlobalProperty("INSTANCES_LENGTH");if(s.featuresLength=a,!Number.isFinite(a))throw new Error("i3dm parser: INSTANCES_LENGTH must be defined");t.eastNorthUp=s.getGlobalProperty("EAST_NORTH_UP"),t.rtcCenter=s.getGlobalProperty("RTC_CENTER",xn.FLOAT,3);new Qn(t.batchTableJson,t.batchTableBinary,a);return function(t,e,r,n){const i=[new Array(n),t._batchTable][0],o=new st,s=new st,a=new st,u=new st,c=new Yt,l=new ye,h=new st,f={},d=new rt,p=[],m=[],g=new st,_=new st;for(let r=0;r<n;r++){let n;if(e.hasProperty("POSITION"))n=e.getProperty("POSITION",xn.FLOAT,3,r,o);else if(e.hasProperty("POSITION_QUANTIZED")){n=e.getProperty("POSITION_QUANTIZED",xn.UNSIGNED_SHORT,3,r,o);const t=e.getGlobalProperty("QUANTIZED_VOLUME_OFFSET",xn.FLOAT,3,g);if(!t)throw new Error("i3dm parser: QUANTIZED_VOLUME_OFFSET must be defined for quantized positions.");const i=e.getGlobalProperty("QUANTIZED_VOLUME_SCALE",xn.FLOAT,3,_);if(!i)throw new Error("i3dm parser: QUANTIZED_VOLUME_SCALE must be defined for quantized positions.");const s=65535;for(let e=0;e<3;e++)n[e]=n[e]/s*i[e]+t[e]}if(!n)throw new Error("i3dm: POSITION or POSITION_QUANTIZED must be defined for each instance.");o.copy(n),f.translation=o,t.normalUp=e.getProperty("NORMAL_UP",xn.FLOAT,3,r,p),t.normalRight=e.getProperty("NORMAL_RIGHT",xn.FLOAT,3,r,m);const b=!1;if(t.normalUp){if(!t.normalRight)throw new Error("i3dm: Custom orientation requires both NORMAL_UP and NORMAL_RIGHT.");t.hasCustomOrientation=!0}else{if(t.octNormalUp=e.getProperty("NORMAL_UP_OCT32P",xn.UNSIGNED_SHORT,2,p),t.octNormalRight=e.getProperty("NORMAL_RIGHT_OCT32P",xn.UNSIGNED_SHORT,2,m),t.octNormalUp){if(!t.octNormalRight)throw new Error("i3dm: oct-encoded orientation requires NORMAL_UP_OCT32P and NORMAL_RIGHT_OCT32P");throw new Error("i3dm: oct-encoded orientation not implemented")}t.eastNorthUp?(xt.WGS84.eastNorthUpToFixedFrame(o,d),d.getRotationMatrix3(c)):c.identity()}b&&(u.copy(s).cross(a).normalize(),c.setColumn(0,s),c.setColumn(1,a),c.setColumn(2,u)),l.fromMatrix3(c),f.rotation=l,h.set(1,1,1);const y=e.getProperty("SCALE",xn.FLOAT,1,r);Number.isFinite(y)&&h.multiplyByScalar(y);const w=e.getProperty("SCALE_NON_UNIFORM",xn.FLOAT,3,r,p);w&&h.scale(w),f.scale=h;let v=e.getProperty("BATCH_ID",xn.UNSIGNED_SHORT,1,r);void 0===v&&(v=r);const A=(new rt).fromQuaternion(f.rotation);d.identity(),d.translate(f.translation),d.multiplyRight(A),d.scale(f.scale);const E=d.clone();i[r]={modelMatrix:E,batchId:v}}t.instances=i}(t,s,0,a),r}(t,e,r,n),await Fs(t,t.gltfFormat,n,i),r}async function Gs(t,e=0,r,n,i={}){switch(i.byteOffset=e,i.type=function(t,e=0){const r=new DataView(t);return`${String.fromCharCode(r.getUint8(e+0))}${String.fromCharCode(r.getUint8(e+1))}${String.fromCharCode(r.getUint8(e+2))}${String.fromCharCode(r.getUint8(e+3))}`}(t,e),i.type){case Pr.COMPOSITE:return await async function(t,e,r,n,i,o){r=qn(t,e,r);const s=new DataView(e);for(t.tilesLength=s.getUint32(r,!0),r+=4,t.tiles=[];t.tiles.length<t.tilesLength&&t.byteLength-r>12;){const s={};t.tiles.push(s),r=await o(e,r,n,i,s)}return r}(i,t,e,r,n,Gs);case Pr.BATCHED_3D_MODEL:return await Ns(i,t,e,r,n);case Pr.INSTANCED_3D_MODEL:return await Us(i,t,e,r,n);case Pr.POINT_CLOUD:return await ai(i,t,e,r,n);default:throw new Error("3DTileLoader: unknown type "+i.type)}}function js(t,e){if(!t)return null;if(t.content){const r=t.content.uri||t.content.url;t.contentUrl=`${e.basePath}/${r}`}return t.id=t.contentUrl,t.lodMetricType=cr,t.lodMetricValue=t.geometricError,t.transformMatrix=t.transform,t.type=function(t){if(!t.contentUrl)return nr;const e=t.contentUrl.split(".").pop();switch(e){case"pnts":return or;case"i3dm":case"b3dm":return ir;default:return e}}(t),t.refine=function(t){switch(t){case"REPLACE":case"replace":return rr;case"ADD":case"add":return er;default:return t}}(t.refine),t}const Hs={id:"3d-tiles",name:"3D Tiles",module:"3d-tiles",version:"3.1.0-alpha.5",extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],tests:["cmpt","pnts","b3dm","i3dm"],parse:async function(t,e,r){const n=e["3d-tiles"]||{};let i;i="auto"===n.isTileset?r.url&&-1!==r.url.indexOf(".json"):n.isTileset;t=i?await async function(t,e,r){var n;const i=JSON.parse((new TextDecoder).decode(t));return i.loader=e.loader||Hs,i.url=r.url,i.basePath=function(t){return Pt.a.dirname(t.url)}(i),i.root=function(t){const e=t.basePath,r=js(t.root,t),n=[];for(n.push(r);n.length>0;){const t=(n.pop()||{}).children||[];for(const r of t)js(r,{basePath:e}),n.push(r)}return r}(i),i.type=ur,i.lodMetricType=cr,i.lodMetricValue=(null===(n=i.root)||void 0===n?void 0:n.lodMetricValue)||0,i}(t,e,r):await async function(t,e,r){const n={content:{featureIds:null}};return await Gs(t,0,e,r,n.content),n.content}(t,e,r);return t},options:{"3d-tiles":{loadGLTF:!0,decodeQuantizedPositions:!1,isTileset:"auto",assetGltfUpAxis:null}}};async function zs(t,e){if(!e){const r=await async function(t){Object(kt.a)(t);const e={Authorization:"Bearer "+t},r=await Object(l.fetchFile)("https://api.cesium.com/v1/assets",{fetch:{headers:e}});if(!r.ok)throw new Error(r.statusText);return await r.json()}(t);for(const t of r.items)"3DTILES"===t.type&&(e=t.id)}const r=await async function(t,e){Object(kt.a)(t,e);const r={Authorization:"Bearer "+t},n="https://api.cesium.com/v1/assets/"+e;let i=await Object(l.fetchFile)(""+n,{fetch:{headers:r}});if(!i.ok)throw new Error(i.statusText);let o=await i.json();if(i=await Object(l.fetchFile)(n+"/endpoint",{fetch:{headers:r}}),!i.ok)throw new Error(i.statusText);const s=await i.json();return o={...o,...s},o}(t,e),{type:n,url:i}=r;return Object(kt.a)("3DTILES"===n&&i),r.headers={Authorization:"Bearer "+r.accessToken},r}const Js={...Hs,id:"cesium-ion",name:"Cesium Ion",preload:async function(t,e={}){e=e["cesium-ion"]||{};const{accessToken:r}=e;let n=e.assetId;if(!Number.isFinite(n)){const e=t.match(/\/([0-9]+)\/tileset.json/);n=e&&e[1]}return zs(r,n)},parse:async(t,e,r)=>((e={...e})["3d-tiles"]=e["cesium-ion"],e.loader=Js,Hs.parse(t,e,r)),options:{"cesium-ion":{...Hs.options["3d-tiles"],accessToken:null}}};var Ws,Ks=r(1),Qs=new Uint8Array(16);function qs(){if(!Ws&&!(Ws="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ws(Qs)}var Vs=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var Zs=function(t){return"string"==typeof t&&Vs.test(t)},Xs=[],Ys=0;Ys<256;++Ys)Xs.push((Ys+256).toString(16).substr(1));var $s=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(Xs[t[e+0]]+Xs[t[e+1]]+Xs[t[e+2]]+Xs[t[e+3]]+"-"+Xs[t[e+4]]+Xs[t[e+5]]+"-"+Xs[t[e+6]]+Xs[t[e+7]]+"-"+Xs[t[e+8]]+Xs[t[e+9]]+"-"+Xs[t[e+10]]+Xs[t[e+11]]+Xs[t[e+12]]+Xs[t[e+13]]+Xs[t[e+14]]+Xs[t[e+15]]).toLowerCase();if(!Zs(r))throw TypeError("Stringified UUID is invalid");return r};var ta=function(t,e,r){var n=(t=t||{}).random||(t.rng||qs)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,e){r=r||0;for(var i=0;i<16;++i)e[r+i]=n[i];return e}return $s(n)},ea=r(0),ra=r.n(ea),na=r(7),ia=r.n(na),oa=r(55),sa=r.n(oa);const aa={folderPattern:{path:"folderPattern",default:"BASIC"},archiveCompressionType:{path:"archiveCompressionType",default:"STORE"},resourceCompressionType:{path:"resourceCompressionType",default:"GZIP"},I3SVersion:{path:"I3SVersion",default:"1.8"},nodeCount:{path:"nodeCount"}};class ua{constructor(t,e){this.nodesPerPage=e,this.nodesCounter=0,this.nodePages=[{}],this.nodePages[0].nodes=[],this.writeFile=t}useWriteFunction(t){this.writeFile=t}getNodeById(t){const e=Math.floor(t/this.nodesPerPage),r=t%this.nodesPerPage;return this.nodePages[e].nodes[r]}updateMaterialByNodeId(t,e){const r=this.getNodeById(t);r.mesh&&(r.mesh.material={definition:e,resource:r.index})}updateVertexCountByNodeId(t,e){const r=this.getNodeById(t);r.mesh&&(r.mesh.geometry.vertexCount=e)}updateNodeAttributeByNodeId(t){const e=this.getNodeById(t);e.mesh&&(e.mesh.attribute.resource=e.index)}updateFeatureCountByNodeId(t,e){const r=this.getNodeById(t);r.mesh&&(r.mesh.geometry.featureCount=e)}updateTexelCountHintByNodeId(t,e){const r=this.getNodeById(t);r.mesh&&r.mesh.material&&(r.mesh.material.texelCountHint=e)}addChildRelation(t,e){if(null===t)return;this.getNodeById(t).children.push(e)}updateResourceInMesh(t){t.mesh&&(t.mesh.geometry.resource=t.index)}push(t,e=null){let r=this.nodePages[this.nodePages.length-1];return r.nodes.length===this.nodesPerPage&&(r={nodes:[]},this.nodePages.push(r)),t.index=this.nodesCounter++,r.nodes.push(t),this.addChildRelation(e,t.index),this.updateResourceInMesh(t),t.index}async save(t,e,r=!1){const n=[];if(r){for(const[r,i]of this.nodePages.entries()){const o=JSON.stringify(i),s=Object(Ks.join)(t,"nodepages");n.push(this.writeFile(s,o,r.toString()+".json")),e[`nodePages/${r.toString()}.json.gz`]=s+".json.gz"}const r=ia()({nodeCount:this.nodesCounter},aa),i=!1;e["metadata.json"]=await this.writeFile(t,JSON.stringify(r),"metadata.json",i)}else for(const[e,r]of this.nodePages.entries()){const i=JSON.stringify(r),o=Object(Ks.join)(t,"nodepages",e.toString());n.push(this.writeFile(o,i))}await Promise.all(n)}}var ca=r(3),la=r(56),ha=r(10);function fa(t){let e=t[0];const r=Math.floor(e/3600);e-=3600*r;const n=Math.floor(e/60);e-=60*n;const i=Math.floor(e),o=t[1]/1e6;let s="";return r&&(s+=r+"h "),n&&(s+=n+"m "),i&&(s+=i+"s"),s||(s+=o+"ms"),s}async function da(t){const{slpk:e,outputPath:r,tilesetName:n}=t,i=Object(ca.a)(r);try{if(e){const t=Object(Ks.join)(i,n+".slpk");return(await ha.promises.stat(t)).size}const t=Object(Ks.join)(i,n);return await async function t(e){let r=0;const n=await ha.promises.readdir(e);for(const i of n){const n=await ha.promises.stat(Object(Ks.join)(e,i));n.isDirectory()?r+=await t(Object(Ks.join)(e,i)):r+=n.size}return r}(t)}catch(t){return console.log("Calculate file sizes error: ",t),null}}const pa={};class ma extends nt{static get ZERO(){return pa.ZERO=pa.ZERO||Object.freeze(new ma(0,0,0,0))}constructor(t=0,e=0,r=0,n=0){super(-0,-0,-0,-0),g(t)&&1===arguments.length?this.copy(t):(p.debug&&(E(t),E(e),E(r),E(n)),this[0]=t,this[1]=e,this[2]=r,this[3]=n)}set(t,e,r,n){return this[0]=t,this[1]=e,this[2]=r,this[3]=n,this.check()}copy(t){return this[0]=t[0],this[1]=t[1],this[2]=t[2],this[3]=t[3],this.check()}fromObject(t){return p.debug&&(E(t.x),E(t.y),E(t.z),E(t.w)),this[0]=t.x,this[1]=t.y,this[2]=t.z,this[3]=t.w,this}toObject(t){return t.x=this[0],t.y=this[1],t.z=this[2],t.w=this[3],t}get ELEMENTS(){return 4}get z(){return this[2]}set z(t){this[2]=E(t)}get w(){return this[3]}set w(t){this[3]=E(t)}transform(t){return K(this,this,t),this.check()}transformByMatrix3(t){return M(this,this,t),this.check()}transformByMatrix2(t){return function(t,e,r){const n=e[0],i=e[1];t[0]=r[0]*n+r[2]*i,t[1]=r[1]*n+r[3]*i,t[2]=e[2],t[3]=e[3]}(this,this,t),this.check()}transformByQuaternion(t){return q(this,this,t),this.check()}applyMatrix4(t){return t.transform(this,this),this}}function ga(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const _a={POSITION:"POSITION",NORMAL:"NORMAL",COLOR_0:"COLOR",TEXCOORD_0:"TEX_COORD"},ba=()=>{};class ya{constructor(t){ga(this,"draco",void 0),ga(this,"dracoEncoder",void 0),ga(this,"dracoMeshBuilder",void 0),ga(this,"dracoMetadataBuilder",void 0),ga(this,"log",void 0),this.draco=t,this.dracoEncoder=new this.draco.Encoder,this.dracoMeshBuilder=new this.draco.MeshBuilder,this.dracoMetadataBuilder=new this.draco.MetadataBuilder}destroy(){this.destroyEncodedObject(this.dracoMeshBuilder),this.destroyEncodedObject(this.dracoEncoder),this.destroyEncodedObject(this.dracoMetadataBuilder),this.dracoMeshBuilder=null,this.dracoEncoder=null,this.draco=null}destroyEncodedObject(t){t&&this.draco.destroy(t)}encodeSync(t,e={}){return this.log=ba,this._setOptions(e),e.pointcloud?this._encodePointCloud(t,e):this._encodeMesh(t,e)}_getAttributesFromMesh(t){const e={...t,...t.attributes};return t.indices&&(e.indices=t.indices),e}_encodePointCloud(t,e){const r=new this.draco.PointCloud;e.metadata&&this._addGeometryMetadata(r,e.metadata);const n=this._getAttributesFromMesh(t);this._createDracoPointCloud(r,n,e);const i=new this.draco.DracoInt8Array;try{const t=this.dracoEncoder.EncodePointCloudToDracoBuffer(r,!1,i);if(!(t>0))throw new Error("Draco encoding failed.");return this.log(`DRACO encoded ${r.num_points()} points\n with ${r.num_attributes()} attributes into ${t} bytes`),wa(i)}finally{this.destroyEncodedObject(i),this.destroyEncodedObject(r)}}_encodeMesh(t,e){const r=new this.draco.Mesh;e.metadata&&this._addGeometryMetadata(r,e.metadata);const n=this._getAttributesFromMesh(t);this._createDracoMesh(r,n,e);const i=new this.draco.DracoInt8Array;try{const t=this.dracoEncoder.EncodeMeshToDracoBuffer(r,i);if(t<=0)throw new Error("Draco encoding failed.");return this.log(`DRACO encoded ${r.num_points()} points\n with ${r.num_attributes()} attributes into ${t} bytes`),wa(i)}finally{this.destroyEncodedObject(i),this.destroyEncodedObject(r)}}_setOptions(t){if("speed"in t&&this.dracoEncoder.SetSpeedOptions(...t.speed),"method"in t){const e=this.draco[t.method||"MESH_SEQUENTIAL_ENCODING"];this.dracoEncoder.SetEncodingMethod(e)}if("quantization"in t)for(const e in t.quantization){const r=t.quantization[e],n=this.draco[e];this.dracoEncoder.SetAttributeQuantization(n,r)}}_createDracoMesh(t,e,r){const n=r.attributesMetadata||{};try{const r=this._getPositionAttribute(e);if(!r)throw new Error("positions");const i=r.length/3;for(let r in e){const o=e[r];r=_a[r]||r;const s=this._addAttributeToMesh(t,r,o,i);-1!==s&&this._addAttributeMetadata(t,s,{name:r,...n[r]||{}})}}catch(e){throw this.destroyEncodedObject(t),e}return t}_createDracoPointCloud(t,e,r){const n=r.attributesMetadata||{};try{const r=this._getPositionAttribute(e);if(!r)throw new Error("positions");const i=r.length/3;for(let r in e){const o=e[r];r=_a[r]||r;const s=this._addAttributeToMesh(t,r,o,i);-1!==s&&this._addAttributeMetadata(t,s,{name:r,...n[r]||{}})}}catch(e){throw this.destroyEncodedObject(t),e}return t}_addAttributeToMesh(t,e,r,n){if(!ArrayBuffer.isView(r))return-1;const i=this._getDracoAttributeType(e),o=r.length/n;if("indices"===i){const n=r.length/3;return this.log(`Adding attribute ${e}, size ${n}`),this.dracoMeshBuilder.AddFacesToMesh(t,n,r),-1}this.log(`Adding attribute ${e}, size ${o}`);const s=this.dracoMeshBuilder,{buffer:a}=r;switch(r.constructor){case Int8Array:return s.AddInt8Attribute(t,i,n,o,new Int8Array(a));case Int16Array:return s.AddInt16Attribute(t,i,n,o,new Int16Array(a));case Int32Array:return s.AddInt32Attribute(t,i,n,o,new Int32Array(a));case Uint8Array:case Uint8ClampedArray:return s.AddUInt8Attribute(t,i,n,o,new Uint8Array(a));case Uint16Array:return s.AddUInt16Attribute(t,i,n,o,new Uint16Array(a));case Uint32Array:return s.AddUInt32Attribute(t,i,n,o,new Uint32Array(a));case Float32Array:default:return s.AddFloatAttribute(t,i,n,o,new Float32Array(a))}}_getDracoAttributeType(t){switch(t.toLowerCase()){case"indices":return"indices";case"position":case"positions":case"vertices":return this.draco.POSITION;case"normal":case"normals":return this.draco.NORMAL;case"color":case"colors":return this.draco.COLOR;case"texcoord":case"texcoords":return this.draco.TEX_COORD;default:return this.draco.GENERIC}}_getPositionAttribute(t){for(const e in t){const r=t[e];if(this._getDracoAttributeType(e)===this.draco.POSITION)return r}return null}_addGeometryMetadata(t,e){const r=new this.draco.Metadata;this._populateDracoMetadata(r,e),this.dracoMeshBuilder.AddMetadata(t,r)}_addAttributeMetadata(t,e,r){const n=new this.draco.Metadata;this._populateDracoMetadata(n,r),this.dracoMeshBuilder.SetMetadataForAttribute(t,e,n)}_populateDracoMetadata(t,e){for(const[n,i]of(r=e).entries&&!r.hasOwnProperty("entries")?r.entries():Object.entries(r))switch(typeof i){case"number":Math.trunc(i)===i?this.dracoMetadataBuilder.AddIntEntry(t,n,i):this.dracoMetadataBuilder.AddDoubleEntry(t,n,i);break;case"object":i instanceof Int32Array&&this.dracoMetadataBuilder.AddIntEntryArray(t,n,i,i.length);break;case"string":default:this.dracoMetadataBuilder.AddStringEntry(t,n,i)}var r}}function wa(t){const e=t.size(),r=new ArrayBuffer(e),n=new Int8Array(r);for(let r=0;r<e;++r)n[r]=t.GetValue(r);return r}const va={name:"DRACO",id:"draco",module:"draco",version:"3.1.0-alpha.5",extensions:["drc"],encode:async function(t,e={}){const{draco:r}=await On(e),n=new ya(r);try{return n.encodeSync(t,e.draco)}finally{n.destroy()}},options:{draco:{pointcloud:!1,attributeNameEntry:"name"}}};function Aa(t){const{positions:e,normals:r,texCoords:n,colors:i,featureIndices:o,triangleCount:s}=t;if(!o.length)return{faceRange:new Uint32Array([0,s-1]),featureIds:[0],featureCount:1,positions:e,normals:r,texCoords:n,colors:i};const{faceRange:a,featureCount:u,featureIds:c}=function(t){let e=1,r=1,n=t[0];const i=[],o=[],s=[n];i[0]=0,o[0]=n;for(let a=1;a<t.length;a++)n!==t[a]&&(i[e]=a/3-1,i[e+1]=a/3,o[r]=t[a],s.includes(t[a])||s.push(t[a]),e+=2,r+=1),n=t[a];i[e]=t.length/3-1;const a=new Uint32Array(i),u=s.length;return{faceRange:a,featureCount:u,featureIds:o}}(o);return{featureCount:u,...function(t){const e=t[0],r=[e.featureId];let n=new Float32Array(e.positions),i=new Float32Array(e.normals),o=new Uint8Array(e.colors),s=new Float32Array(e.texCoords);const a=[0];let u=0,c=0;for(let e=1;e<t.length;e++){const l=t[e];r.push(l.featureId),n=Object(mo.b)(n,l.positions),i=Object(mo.b)(i,l.normals),o=Object(mo.b)(o,l.colors),s=Object(mo.b)(s,l.texCoords);const h=t[u];a.push(h.positions.length/9-1+c),a.push(h.positions.length/9+c),c+=h.positions.length/9,u+=1}a.push(n.length/9-1);return{faceRange:new Uint32Array(a),featureIds:r,positions:n,normals:i,colors:o,texCoords:s}}(function(t){const e=[];for(let r=0;r<t.length;r++){const n=t[r],i=e.find(t=>t.featureId===n.featureId);i?(i.positions=Object(mo.b)(i.positions,n.positions),i.normals=Object(mo.b)(i.normals,n.normals),i.colors=Object(mo.b)(i.colors,n.colors),i.texCoords=Object(mo.b)(i.texCoords,n.texCoords)):e.push(n)}return e}(function(t){const{featureIds:e,positions:r,normals:n,colors:i,texCoords:o,faceRange:s}=t,a=[];let u=new Float32Array(r),c=new Float32Array(n),l=new Uint8Array(i),h=new Float32Array(o),f=0;for(let t=0;t<e.length;t++){const r=s[t+f],n=s[t+f+1],i=Ea("positions",r,n),o=Ea("normals",r,n),d=Ea("colors",r,n),p=Ea("texCoords",r,n);a.push({featureId:e[t],positions:u.slice(0,i),normals:c.slice(0,o),colors:l.slice(0,d),texCoords:h.slice(0,p)}),u=u.slice(i),c=c.slice(o),l=l.slice(d),h=h.slice(p),f+=1}return a.sort((t,e)=>t.featureId-e.featureId)}({faceRange:a,featureIds:c,...t})))}}function Ea(t,e,r){const n=r-e+1,i=3*n;switch(t){case"positions":case"normals":return 9*n;case"colors":return 4*i;case"texCoords":return 2*i;default:return 0}}const Sa=["CUSTOM_ATTRIBUTE_2","_BATCHID","BATCHID"];async function Ba(t,e,r,n,i){const o=function(t){const e=[],r=t.gltf.materials||[];for(const t of r)e.push(La(t));return e}(t),s=function(t){var e;const r=new Map;for(const e of t.gltf.materials||[{id:"default"}])r.set(e.id,{positions:new Float32Array(0),normals:new Float32Array(0),texCoords:new Float32Array(0),colors:new Uint8Array(0),featureIndices:[]});Ta((t.gltf.scene||(null===(e=t.gltf.scenes)||void 0===e?void 0:e[0])||t.gltf).nodes,t,r);for(const t of r.keys()){const e=r.get(t);if(0===e.positions.length){r.delete(t);continue}const n=e.positions.length/3;if(!e.colors.length){e.colors=new Uint8Array(4*n);for(let t=0;t<e.colors.length;t+=4)e.colors.set([255,255,255,255],t)}if(!e.texCoords.length){e.texCoords=new Float32Array(2*n);for(let t=0;t<e.texCoords.length;t+=2)e.texCoords.set([1,1],t)}e.featureIndices=e.featureIndices.reduce((t,e)=>t.concat(e))}return r}(t);s.has("default")&&o.push({material:{alphaMode:"opaque",pbrMetallicRoughness:{}}});const a=[];let u=e,{materials:c=[]}=t.gltf;0===!c.length&&c.push({id:"default"});for(let e=0;e<c.length;e++){const l=c[e];if(!s.has(l.id))continue;const h=s.get(l.id),{material:f,texture:d}=o[e];a.push(await Ca({convertedAttributes:h,material:f,texture:d,tileContent:t,nodeId:u,featuresHashArray:r,attributeStorageInfo:n,draco:i})),u++}return a.length?a:null}async function Ca({convertedAttributes:t,material:e,texture:r,tileContent:n,nodeId:i,featuresHashArray:o,attributeStorageInfo:s,draco:a}){const u=t.positions.length/3,c=u/3,{faceRange:h,featureIds:f,positions:d,normals:p,colors:m,texCoords:g,featureCount:_}=Aa({triangleCount:c,...t});n.batchTableJson&&function(t,e,r,n){const i=function(t,e,r){const n={};for(let i=0;i<t.length;i++){const o=t[i],s=ja(i,e,r);n[o.toString()]=s}return n}(t,n,r);Ha(e,i),Ha(t,i)}(f,t.featureIndices,o,n.batchTableJson);const b=new Uint32Array(2),y=function(t){const e=new BigUint64Array(t.length);for(let r=0;r<t.length;r++)e[r]=BigInt(t[r]);return e}(f);b.set([u,_],0);const w=new Uint8Array(Object(mo.a)(b.buffer,d.buffer,p.buffer,r?g.buffer:new ArrayBuffer(0),m.buffer,y.buffer,h.buffer)),v=a?await async function(t,e,r){const{positions:n,normals:i,texCoords:o,colors:s,featureIds:a,faceRange:u}=r,c=new Uint32Array(t);for(let t=0;t<c.length;t++)c.set([t],t);const h=function(t,e){const r=new Uint32Array(t.length);let n=0,i=0;for(let t=1;t<e.length;t+=2){const o=3*(e[t]+1);r.fill(n,i,o),n++,i=o+1}return r}(new Uint32Array(e.featureIndices.length?e.featureIndices:t),u),f={positions:n,normals:i,colors:s,"feature-index":h};o.length&&(f.texCoords=o);const d={"feature-index":{"i3s-attribute-type":"feature-index","i3s-feature-ids":new Int32Array(a)}};return new Uint8Array(await Object(l.encode)({attributes:f,indices:c},va,{draco:{method:"MESH_SEQUENTIAL_ENCODING",attributesMetadata:d}}))}(u,t,{positions:d,normals:p,texCoords:r?g:new Float32Array(0),colors:m,featureIds:f,faceRange:h}):null,A=function(t,e,r){const n=[];if(t){const i={OBJECTID:e,...t};for(const t in i){const e=za(t,r);let o=null;switch(e){case"Oid32":case"Int32":o=Ja(i[t]);break;case"Float64":o=Wa(i[t]);break;case"string":o=Ka(i[t]);break;default:o=Ka(i[t])}n.push(o)}}return n}(n.batchTableJson,f,s);return{geometry:w,compressedGeometry:v,texture:r,sharedResources:Fa(n,i),meshMaterial:e,vertexCount:u,attributes:A,featureCount:_}}function Ta(t,e,r,n=new rt([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])){if(t)for(const i of t)Ra(i,e,r,n)}function Ra(t,e,r,n=new rt([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])){const i=t.matrix,o=i?n.multiplyRight(i):n,s=t.mesh;s&&function(t,e,r,n=new rt([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])){for(const i of t.primitives){let t=null;i.material?t=r.get(i.material.id):r.has("default")&&(t=r.get("default")),Object(l.assert)(null!==t,"Primitive - material mapping failed");const o=i.attributes;t.positions=Object(mo.b)(t.positions,Oa({vertices:o.POSITION.value,cartographicOrigin:e.cartographicOrigin,cartesianModelMatrix:e.cartesianModelMatrix,nodeMatrix:n,indices:i.indices.value,attributeSpecificTransformation:Ia})),t.normals=Object(mo.b)(t.normals,Oa({vertices:o.NORMAL&&o.NORMAL.value,cartographicOrigin:e.cartographicOrigin,cartesianModelMatrix:e.cartesianModelMatrix,nodeMatrix:n,indices:i.indices.value,attributeSpecificTransformation:Ma})),t.texCoords=Object(mo.b)(t.texCoords,xa(o.TEXCOORD_0&&o.TEXCOORD_0.value,i.indices.value)),t.colors=Object(mo.b)(t.colors,Da(o.COLOR_0,i.indices.value)),t.featureIndices.push(ka(Pa(o),i.indices.value))}}(s,e,r,o),Ta(t.children,e,r,o)}function Oa(t){const{vertices:e,indices:r,attributeSpecificTransformation:n}=t,i=new Float32Array(3*r.length);if(!e)return i;for(let o=0;o<r.length;o++){const s=3*r[o],a=e.subarray(s,s+3);let u=new st(Array.from(a));u=n(u,t),i[3*o]=u.x,i[3*o+1]=u.y,i[3*o+2]=u.z}return i}function Ia(t,e){const{cartesianModelMatrix:r,cartographicOrigin:n,nodeMatrix:i}=e;return i&&(t=t.transform(i)),t=t.transform(r),xt.WGS84.cartesianToCartographic([t[0],t[1],t[2]],t),t=t.subtract(n)}function Ma(t,e){const{cartesianModelMatrix:r,nodeMatrix:n}=e;return n&&(t=t.transformAsVector(n)),t=t.transformAsVector(r)}function xa(t,e){const r=new Float32Array(2*e.length);if(!t)return r;for(let n=0;n<e.length;n++){const i=2*e[n],o=t.subarray(i,i+2);r[2*n]=o[0],r[2*n+1]=o[1]}return r}function Da(t,e){const r=(null==t?void 0:t.components)||4,n=new Uint8Array(e.length*r);if(!t)return n;const i=t.value;for(let t=0;t<e.length;t++){const o=e[t]*r,s=i.subarray(o,o+r),a=new Uint8Array(r);for(let t=0;t<s.length;t++)a[t]=255*s[t];n.set(a,t*r)}return n}function ka(t,e){if(!t.length||!e.length)return[];const r=[];for(let n=0;n<e.length;n++){const i=e[n];r.push(t[i])}return r}function Pa(t){let e=[];for(let r=0;r<Sa.length;r++){const n=Sa[r];if(t[n]&&t[n].value){e=t[n].value;break}}return e}function La(t){const e={doubleSided:t.doubleSided,emissiveFactor:t.emissiveFactor.map(t=>Math.round(255*t)),alphaMode:(t.alphaMode||"OPAQUE").toLowerCase(),pbrMetallicRoughness:{roughnessFactor:t.pbrMetallicRoughness.roughnessFactor,metallicFactor:t.pbrMetallicRoughness.metallicFactor}};let r;if(t.pbrMetallicRoughness.baseColorTexture?(r=t.pbrMetallicRoughness.baseColorTexture.texture.source,e.pbrMetallicRoughness.baseColorTexture={textureSetDefinitionId:0}):t.emissiveTexture&&(r=t.emissiveTexture.texture.source,e.pbrMetallicRoughness.baseColorTexture={textureSetDefinitionId:0}),!r){const r=t.pbrMetallicRoughness.baseColorFactor;e.pbrMetallicRoughness.baseColorFactor=r&&r.map(t=>Math.round(255*t))||void 0}return{material:e,texture:r}}function Fa(t,e){const r=t.gltf.materials,n={};if(!r||!r.length)return n;n.materialDefinitionInfos=[];for(const t of r){const{materialDefinitionInfo:r,textureDefinitionInfo:i}=Na(t,e);n.materialDefinitionInfos.push(r),i&&(n.textureDefinitionInfos=n.textureDefinitionInfos||[],n.textureDefinitionInfos.push(i))}return n}function Na(t,e){const r=t.pbrMetallicRoughness.baseColorTexture||t.emissiveTexture;let n=null;r&&(n=function(t,e){return{encoding:[t.source.mimeType],images:[{id:Ga(t,e),size:t.source.image.width,length:[t.source.image.data.length]}]}}(r.texture,e));const{baseColorFactor:i,metallicFactor:o}=t.pbrMetallicRoughness;let s=i;return i&&0!==i[3]||!t.emissiveFactor||(s=t.emissiveFactor,s[3]=s[3]||1),{materialDefinitionInfo:Ua(s,o),textureDefinitionInfo:n}}function Ua(t,e=0){const r=new ma(0,0,0,1),n=new ma(1,1,1,1),i=new ma(.04/255,.04/255,.04/255,0),o=new ma(t),s=n.subtract(i).multiply(o),a=s.lerp(s,r,e);i[3]=1;const u=i.lerp(i,o,e);return{diffuse:a.toArray(),specular:u.toArray()}}function Ga(t,e){const{width:r,height:n}=t.source.image,i=e+1,o=32-i.toString(2).length,s="0".repeat(o).concat(i.toString(2));return BigInt(`0b${(268435456+(r-1<<12)+(n-1<<0)).toString(2)}${s}`).toString()}function ja(t,e,r){const n=function(t,e){let r="";for(const n in t)r+=t[n][e];return r}(e,t),i=sa()(n);return r.includes(i)?r.indexOf(i):r.push(i)-1}function Ha(t,e){for(let r=0;r<t.length;r++)t[r]=e[t[r]]}function za(t,e){return e.find(e=>e.name===t).attributeValues.valueType}function Ja(t){const e=new Uint32Array([t.length]),r=new Uint32Array(t);return Object(mo.a)(e.buffer,r.buffer)}function Wa(t){const e=new Uint32Array([t.length]),r=new Uint8Array(4),n=new Float64Array(t);return Object(mo.a)(e.buffer,r.buffer,n.buffer)}function Ka(t){const e=new Uint32Array([t.length]);let r=0;const n=new Uint32Array(t.length),i=[];for(let e=0;e<t.length;e++){const o=String(t[e])+"\0",s=Buffer.from(o),a=s.length;r+=a,n[e]=a,i.push(s)}const o=new Uint32Array([r]);return Object(mo.a)(e.buffer,o.buffer,n.buffer,...i)}function Qa(t,e){let r,n,i;const o=t.boundingVolume,s=xt.WGS84.cartesianToCartographic(o.center,new st);return s[2]=s[2]-e.getHeight(s[1],s[0]),o instanceof Le?(n=o.halfSize,r=new st(n[0],n[1],n[2]).len(),i=o.quaternion):(r=t.boundingVolume.radius,n=[r,r,r],i=(new ye).fromMatrix3(new Yt([n[0],0,0,0,n[1],0,0,0,n[2]])).normalize()),{mbs:[s[0],s[1],s[2],r],obb:{center:[s[0],s[1],s[2]],halfSize:n,quaternion:i}}}function qa(t){const e=t[3],r=new st(t[0],t[1],t[2]),n=new Yt([e,0,0,0,e,0,0,0,e]);return new Le(r,n)}const Va={serviceItemId:{path:"serviceItemId"},serviceName:{path:"layerName"},name:{path:"layerName"},currentVersion:{path:"currentVersion",default:10.7},serviceVersion:{path:"serviceVersion",default:"1.8"},supportedBindings:{path:"supportedBindings",default:["REST"]},layers:{path:"layers0",transform:t=>[t]}};function Za(t){let e=(t.header.lodSelection.maxScreenThreshold||{}).maxError;if(!e){const r=t.header.lodSelection.maxScreenThresholdSQ;r&&(e=Math.sqrt(r.maxError/(.25*Math.PI)))}return e||(e=16),2*t.header.mbs[3]*16/e}const Xa=[9,-18,-88,0,96,90,0,0,-60,-20,-9,18,8,0,-96,30,0,0,60,-20,9,-88,-18,90,96,0,-20,-60,0,0,186,-42,-42,-150,-96,-150,60,60,60,60,54,162,-78,30,-24,-90,-60,60,-60,60,-9,-32,18,30,24,0,20,-60,0,0,-9,8,18,30,-96,0,-20,60,0,0,54,-78,162,-90,-24,30,60,-60,60,-60,-54,78,78,90,144,90,-60,-60,-60,-60,9,-8,-18,-30,-24,0,20,60,0,0,-9,18,-32,0,24,30,0,0,-60,20,9,-18,-8,0,-24,-30,0,0,60,20],Ya=[0,0,-131,0,138,144,0,0,-102,-31,0,0,7,0,-138,42,0,0,102,-31,62,0,-31,0,0,-62,0,0,0,31,124,0,-62,0,0,-124,0,0,0,62,124,0,-62,0,0,-124,0,0,0,62,62,0,-31,0,0,-62,0,0,0,31,0,0,45,0,-183,-9,0,93,18,0,0,0,216,0,33,87,0,-93,12,-93,0,0,156,0,153,99,0,-93,-12,-93,0,0,-45,0,-3,9,0,93,-18,0,0,0,-55,0,48,42,0,0,-84,31,0,0,-7,0,-48,-42,0,0,84,31],$a=[18,-36,-122,0,120,135,0,0,-84,-31,-18,36,-2,0,-120,51,0,0,84,-31,36,-165,-27,93,147,-9,0,-93,18,0,210,45,-111,-93,-57,-192,0,93,12,93,162,141,-75,-93,-129,-180,0,93,-12,93,-36,-21,27,93,39,9,0,-93,-18,0,0,0,62,0,0,31,0,0,0,-31,0,0,124,0,0,62,0,0,0,-62,0,0,124,0,0,62,0,0,0,-62,0,0,62,0,0,31,0,0,0,-31,-18,36,-64,0,66,51,0,0,-102,31,18,-36,2,0,-66,-51,0,0,102,31];class tu{constructor(t){this.options=t,this._v00=0,this._v01=0,this._v10=0,this._v11=0,this._t=[],this._ix=this.options._width,this._iy=this.options._height}getHeight(t,e){if(t=Math.abs(t)>90?NaN:t,isNaN(t)||isNaN(e))return NaN;const r=function(t,e){e=Math.abs(e);let r=eu(t,e);2*Math.abs(r)===e?r-=eu(t,2*e)-r:2*Math.abs(r)>e&&(r+=r<0?e:-e);return r}(e,360);let n=(e=-180!==r?r:180)*this.options._rlonres,i=-t*this.options._rlatres,o=Math.floor(n),s=Math.min(Math.round((this.options._height-1)/2-1),Math.floor(i));n-=o,i-=s,s+=(this.options._height-1)/2,o+=o<0?this.options._width:o>=this.options._width?-this.options._width:0;let a=0,u=0,c=0,l=0,h=new Array(10);if(o!==this._ix||s!==this._iy)if(this.options.cubic){const t=[this._rawval(o,s-1),this._rawval(o+1,s-1),this._rawval(o-1,s),this._rawval(o,s),this._rawval(o+1,s),this._rawval(o+2,s),this._rawval(o-1,s+1),this._rawval(o,s+1),this._rawval(o+1,s+1),this._rawval(o+2,s+1),this._rawval(o,s+2),this._rawval(o+1,s+2)];let e=Ya;0!==s&&(e=s===this.options._height-2?$a:Xa);let r=372;0!==s&&(r=s===this.options._height-2?372:240);for(let n=0;n<10;++n){h[n]=0;for(let r=0;r<12;++r)h[n]+=t[r]*e[10*r+n];h[n]/=r}}else a=this._rawval(o,s),u=this._rawval(o+1,s),c=this._rawval(o,s+1),l=this._rawval(o+1,s+1);else this.options.cubic?h=this._t:(a=this._v00,u=this._v01,c=this._v10,l=this._v11);if(!this.options.cubic){const t=(1-i)*((1-n)*a+n*u)+i*((1-n)*c+n*l),e=this.options._offset+this.options._scale*t;return this._ix=o,this._iy=s,this._v00=a,this._v01=u,this._v10=c,this._v11=l,e}let f=h[0]+n*(h[1]+n*(h[3]+n*h[6]))+i*(h[2]+n*(h[4]+n*h[7])+i*(h[5]+n*h[8]+i*h[9]));return f=this.options._offset+this.options._scale*f,this._ix=o,this._iy=s,this._t=h,f}_rawval(t,e){t<0?t+=this.options._width:t>=this.options._width&&(t-=this.options._width),(e<0||e>=this.options._height)&&(e=e<0?-e:2*(this.options._height-1)-e,t+=(t<this.options._width/2?1:-1)*this.options._width/2);const r=this.options._datastart+2*(e*this.options._swidth+t);return this.options.data[r]<<8|this.options.data[r+1]}}function eu(t,e){return t-Math.floor(t/e)*e}function ru(t,e){const r=function*(t){let e=0;do{const r=t.indexOf(10,e);if(-1!==r){const n=t.subarray(e,r);e=r+1,yield{offset:e,line:nu(n)}}else{const r=t.subarray(e,t.length);e=t.length,yield{offset:e,line:nu(r)}}}while(e<t.length);return{offset:e,line:""}}(t);let n=r.next();if(n.done||"P5"!==n.value.line)throw new Error("Geoid model file: File not in PGM format");let i=Number.MAX_VALUE,o=0,s=-1,a=-1,u="NONE",c="UNKNOWN",l=0,h=0,f=null,d=null;do{n=r.next();const t=n.value.line;if(t.length){if("#"!==t[0]){let e=t.split(" ");if(e=e.filter(t=>""!==t),l=parseInt(e[0],10),h=parseInt(e[1],10),!l||!h)throw new Error("Geoid model file: Error reading raster size");break}{const r=t.split(" "),n=r[0],l=r[1];if("#"!==n||!l)continue;const h=r.length>2?r.slice(2):[];if("Description"===l)u=h.join(" ");else if("DateTime"===l)c=h.join(" ");else if("Offset"===l){if(!r[2])throw new Error("Geoid model file: Error reading offset");i=parseInt(r[2],10)}else if("Scale"===l){if(!r[2])throw new Error("Geoid model file: Error reading scale");o=parseFloat(r[2])}else l===(e.cubic?"MaxCubicError":"MaxBilinearError")?isFinite(parseFloat(r[2]))&&(s=parseFloat(r[2])):l===(e.cubic?"RMSCubicError":"RMSBilinearError")&&isFinite(parseFloat(r[2]))&&(a=parseFloat(r[2]))}}}while(!n.done);n=r.next();const p=parseInt(n.value.line,10);if(n.done)throw new Error("Geoid model file: Error reading maxval");if(65535!==p)throw new Error("Geoid model file: Incorrect value of maxval");if(f=n.value.offset,d=l,i===Number.MAX_VALUE)throw new Error("Geoid model file: Offset not set");if(0===o)throw new Error("Geoid model file: Scale not set");if(o<0)throw new Error("Geoid model file: Scale must be positive");if(h<2||l<2)throw new Error("Geoid model file: Raster size too small");if(1&l)throw new Error("Geoid model file: Raster width is odd");if(!(1&h))throw new Error("Geoid model file: Raster height is even");const m=l/360,g=(h-1)/180;return new tu({cubic:e.cubic,_width:l,_height:h,_rlonres:m,_rlatres:g,_offset:i,_scale:o,_swidth:d,_datastart:f,_maxerror:s,_rmserror:a,_description:u,_datetime:c,data:t})}function nu(t){let e="";for(const r of t)e+=String.fromCharCode(r);return e}const iu={name:"PGM - Netpbm grayscale image format",id:"pgm",module:"tile-converter",version:"3.1.0-alpha.5",mimeTypes:["image/x-portable-graymap"],parse:(t,e)=>ru(new Uint8Array(t),e),extensions:["pgm"],options:{cubic:!1}},ou={id:{path:"id",transform:t=>t.toUpperCase()},profile:{path:"profile",default:"meshpyramids"},version:{path:"version",default:"1.8"},resourcePattern:{path:"resourcePattern",default:["3dNodeIndexDocument","Attributes","SharedResource","Geometry"]},rootNode:{path:"rootNode",default:"./nodes/root"},extent:{path:"extent"},indexCRS:{path:"indexCRS",default:"http://www.opengis.net/def/crs/EPSG/0/4326"},vertexCRS:{path:"vertexCRS",default:"http://www.opengis.net/def/crs/EPSG/0/4326"},normalReferenceFrame:{path:"normalReferenceFrame",default:"east-north-up"},attributeEncoding:{path:"attributeEncoding",default:"application/octet-stream; version=1.6"},textureEncoding:{path:"textureEncoding",default:["image/jpeg","image/ktx2"]},lodType:{path:"lodType",default:"MeshPyramid"},lodModel:{path:"lodModel",default:"node-switching"},defaultGeometrySchema:{path:"defaultGeometrySchema",default:{geometryType:"triangles",header:[{property:"vertexCount",type:"UInt32"},{property:"featureCount",type:"UInt32"}],topology:"PerAttributeArray",ordering:["position","normal","uv0","color"],vertexAttributes:{position:{valueType:"Float32",valuesPerElement:3},normal:{valueType:"Float32",valuesPerElement:3},uv0:{valueType:"Float32",valuesPerElement:2},color:{valueType:"UInt8",valuesPerElement:4}},featureAttributeOrder:["id","faceRange"],featureAttributes:{id:{valueType:"UInt64",valuesPerElement:1},faceRange:{valueType:"UInt32",valuesPerElement:2}}}}},su={offset:8,position:{type:"Float32",component:3},normal:{type:"Float32",component:3},uv0:{type:"Float32",component:2},color:{type:"UInt8",component:4},featureId:{binding:"per-feature",type:"UInt64",component:1},faceRange:{binding:"per-feature",type:"UInt32",component:2}},au={offset:8,position:{type:"Float32",component:3},normal:{type:"Float32",component:3},color:{type:"UInt8",component:4},featureId:{binding:"per-feature",type:"UInt64",component:1},faceRange:{binding:"per-feature",type:"UInt32",component:2}},uu={compressedAttributes:{encoding:"draco",attributes:["position","normal","uv0","color","feature-index"]}},cu={compressedAttributes:{encoding:"draco",attributes:["position","normal","color","feature-index"]}},lu={wkid:{path:"wkid",default:4326},latestWkid:{path:"latestWkid",default:4326},vcsWkid:{path:"vcsWkid",default:5773},latestVcsWkid:{path:"latestVcsWkid",default:5773}},hu={heightModel:{path:"heightModel",default:"gravity_related_height"},vertCRS:{path:"vertCRS",default:"EGM96_Geoid"},heightUnit:{path:"heightUnit",default:"meter"}},fu={nodesPerPage:{path:"nodesPerPage"},lodSelectionMetricType:{path:"lodSelectionMetricType",default:"maxScreenThresholdSQ"}},du={version:{path:"version",transform:t=>t.toUpperCase()},id:{path:"id",default:0},name:{path:"name"},href:{path:"href",default:"./layers/0"},layerType:{path:"layerType",default:"IntegratedMesh"},spatialReference:{path:"spatialReference",transform:t=>ia()(t,lu)},capabilities:{path:"capabilities",default:["View","Query"]},store:{path:"store",transform:t=>ia()(t,ou)},heightModelInfo:{path:"heightModelInfo",transform:t=>ia()(t,hu)},nodePages:{path:"nodePages",transform:t=>ia()(t,fu)},materialDefinitions:{path:"materialDefinitions",default:[]},textureSetDefinitions:{path:"textureSetDefinitions",default:[]},geometryDefinitions:{path:"compressGeometry",transform:t=>{const e=[{},{}];return e[0].geometryBuffers=[],e[1].geometryBuffers=[],e[0].geometryBuffers.push(su),e[1].geometryBuffers.push(au),t&&(e[0].geometryBuffers.push(uu),e[1].geometryBuffers.push(cu)),e},default:[{geometryBuffers:[su,au]}]},attributeStorageInfo:{path:"attributeStorageInfo",default:[]},fields:{path:"fields",default:[]},popupInfo:{path:"popupInfo",default:null}},pu={mbs:{path:"mbs"},obb:{path:"obb"}},mu={id:{path:"id"},href:{path:"href"},...pu},gu={version:{path:"version"},id:{path:"id"},path:{path:"path"},level:{path:"level"},...pu,lodSelection:{path:"lodSelection",default:[{metricType:"maxScreenThresholdSQ",maxError:196349.54374999998},{metricType:"maxScreenThreshold",maxError:999.9999999999999}]},children:{path:"children",default:null},neighbors:{path:"neighbors",default:null},parentNode:{path:"parentNode",transform:t=>ia()(t,mu),default:null},sharedResource:{path:"sharedResource",default:null},featureData:{path:"featureData",default:null},geometryData:{path:"geometryData",default:null},textureData:{path:"textureData",default:null},attributeData:{path:"attributeData",default:null}},_u={renderMode:{path:"renderMode",default:"solid"},shininess:{path:"shininess",default:1},reflectivity:{path:"reflectivity",default:0},ambient:{path:"ambient",default:[1,1,1,1]},diffuse:{path:"diffuse",default:[1,1,1,1]},specular:{path:"specular",default:[0,0,0,0]},useVertexColorAlpha:{path:"useVertexColorAlpha",default:!1},vertexRegions:{path:"vertexRegions",default:!1},vertexColors:{path:"vertexColors",default:!0}},bu={name:{path:"name",default:"standard"},type:{path:"type",default:"standard"},params:{path:"params",transform:(t,e,r)=>ia()(r,_u)}},yu={id:{path:"id"},size:{path:"size"},href:{path:"href",default:["../textures/0"]},length:{path:"length"}},wu={encoding:{path:"encoding"},wrap:{path:"wrap",default:["none"]},atlas:{path:"atlas",default:!1},uvSet:{path:"uvSet",default:"uv0"},channels:{path:"channels",default:"rgb"},images:{path:"images",transform:(t,e,r)=>t.map(t=>ia()(t,yu))}},vu={materialDefinitions:{path:"materialDefinitionInfos",transform:function(t,e,r){const n={};for(const[e,i]of t.entries())n[`Mat${r.nodePath}${e}`]=ia()(i,bu);return n}},textureDefinitions:{path:"textureDefinitionInfos",transform:function(t,e,r){if(!t)return null;const n={};for(const[e,i]of t.entries()){const t=`${r.nodePath}${e}`;i.imageIndex=t,n[t]=ia()(i,wu)}return n}}};function Au(t,e){if(!t)throw new Error(e||"luma.gl: assertion failed.")}const Eu={};function Su(t="id"){Eu[t]=Eu[t]||1;const e=Eu[t]++;return"".concat(t,"-").concat(e)}const Bu={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6};const Cu=new Uint16Array([0,1,2,0,2,3,4,5,6,4,6,7,8,9,10,8,10,11,12,13,14,12,14,15,16,17,18,16,18,19,20,21,22,20,22,23]),Tu=new Float32Array([-1,-1,1,1,-1,1,1,1,1,-1,1,1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,1,-1,-1,1,1,1,1,1,1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,-1,1,-1,-1,-1,-1,-1,1,-1,1,1,-1,1,-1]),Ru=new Float32Array([0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0]),Ou=new Float32Array([0,0,1,0,1,1,0,1,1,0,1,1,0,1,0,0,0,1,0,0,1,0,1,1,1,1,0,1,0,0,1,0,1,0,1,1,0,1,0,0,0,0,1,0,1,1,0,1]),Iu={POSITION:{size:3,value:new Float32Array(Tu)},NORMAL:{size:3,value:new Float32Array(Ru)},TEXCOORD_0:{size:2,value:new Float32Array(Ou)}};class Mu extends class{static get DRAW_MODE(){return Bu}constructor(t={}){const{id:e=Su("geometry"),drawMode:r=Bu.TRIANGLES,attributes:n={},indices:i=null,vertexCount:o=null}=t;this.id=e,this.drawMode=0|r,this.attributes={},this.userData={},this._setAttributes(n,i),this.vertexCount=o||this._calculateVertexCount(this.attributes,this.indices)}get mode(){return this.drawMode}getVertexCount(){return this.vertexCount}getAttributes(){return this.indices?{indices:this.indices,...this.attributes}:this.attributes}_print(t){return"Geometry ".concat(this.id," attribute ").concat(t)}_setAttributes(t,e){e&&(this.indices=ArrayBuffer.isView(e)?{value:e,size:1}:e);for(const e in t){let r=t[e];r=ArrayBuffer.isView(r)?{value:r}:r,Au(ArrayBuffer.isView(r.value),"".concat(this._print(e),": must be typed array or object with value as typed array")),"POSITION"!==e&&"positions"!==e||r.size||(r.size=3),"indices"===e?(Au(!this.indices),this.indices=r):this.attributes[e]=r}return this.indices&&void 0!==this.indices.isIndexed&&(this.indices=Object.assign({},this.indices),delete this.indices.isIndexed),this}_calculateVertexCount(t,e){if(e)return e.value.length;let r=1/0;for(const e in t){const n=t[e],{value:i,size:o,constant:s}=n;!s&&i&&o>=1&&(r=Math.min(r,i.length/o))}return Au(Number.isFinite(r)),r}}{constructor(t={}){const{id:e=Su("cube-geometry")}=t;super({...t,id:e,indices:{size:1,value:new Uint16Array(Cu)},attributes:{...Iu,...t.attributes}})}}function xu(t){if(!t.parentNode.obb||!t.parentNode.mbs)return null;const e=[];return function(t,e){const r=function(t){const{center:e,halfSize:r,quaternion:n}=t;return(new Le).fromCenterHalfSizeQuaternion(e,r,n)}(e.parentNode.obb),n=function(t){const e=new Mu,r=t.obb.halfSize,{attributes:n}=e,i=new Float32Array(n.POSITION.value),o=xt.WGS84.cartographicToCartesian(t.obb.center);let s=[];for(let e=0;e<i.length;e+=3){const n=new st(i[e]*=r[0],i[e+1]*=r[1],i[e+2]*=r[2]).transformByQuaternion(t.obb.quaternion).add(o);s=s.concat(n)}return s}(e);if(function(t,e){let r=!0;for(let n=0;n<e.length/3;n+=3){const i=[e[n],e[n+1],e[n+2]],o=xt.WGS84.cartesianToCartographic(i);if(t.distanceTo(o)>0){r=!1;break}}return r}(r,n))return;const i=`OBB of Tile (${e.id}) doesn't fit into Parent (${e.parentNode.id}) tile OBB`;t.push(i)}(e,t),function(t,e){const r=Du(e.mbs),n=Du(e.parentNode.mbs);if(r.center.distanceTo(n.center)+r.radius>n.radius){const r=`MBS of Tile (${e.id}) doesn't fit into Parent (${e.parentNode.id}) tile MBS`;t.push(r)}}(e,t),e}function Du(t){return new Wt([t[0],t[1],t[2]],t[3])}const ku={name:"Basis Universal Supercompressed GPU Texture",id:"ktx2-basis-supercompressed-texture",module:"textures",version:"3.1.0-alpha.5",extensions:["ktx2"],options:{useSRGB:!1,qualityLevel:10,encodeUASTC:!1,mipmaps:!1},encode:async function(t,e={}){const{useSRGB:r=!1,qualityLevel:n=10,encodeUASTC:i=!1,mipmaps:o=!1}=e,{BasisEncoder:s}=await hi(e),a=new s;try{const e=new Uint8Array(t.width*t.height*4);a.setCreateKTX2File(!0),a.setKTX2UASTCSupercompression(!0),a.setKTX2SRGBTransferFunc(!0),a.setSliceSourceImage(0,t.data,t.width,t.height,!1),a.setPerceptual(r),a.setMipSRGB(r),a.setQualityLevel(n),a.setUASTC(i),a.setMipGen(o);const s=a.encode(e);return new Uint8Array(e.buffer,0,s)}catch(t){throw console.error("Basis Universal Supercompressed GPU Texture encoder Error: ",t),t}finally{a.delete()}}};function Pu(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const Lu=ra.a.env.IonToken||"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJlYWMxMzcyYy0zZjJkLTQwODctODNlNi01MDRkZmMzMjIxOWIiLCJpZCI6OTYyMCwic2NvcGVzIjpbImFzbCIsImFzciIsImdjIl0sImlhdCI6MTU2Mjg2NjI3M30.1FNiClUyk00YH_nWfSGpiQAjR5V2OvREDq1PJ5QMjWQ";class Fu{constructor(){Pu(this,"nodePages",void 0),Pu(this,"fileMap",void 0),Pu(this,"options",void 0),Pu(this,"layers0Path",void 0),Pu(this,"materialMap",void 0),Pu(this,"materialDefinitions",void 0),Pu(this,"vertexCounter",void 0),Pu(this,"layers0",void 0),Pu(this,"featuresHashArray",void 0),Pu(this,"refinementCounter",void 0),Pu(this,"validate",void 0),Pu(this,"boundingVolumeWarnings",void 0),Pu(this,"conversionStartTime",void 0),Pu(this,"refreshTokenTime",void 0),Pu(this,"sourceTileset",void 0),Pu(this,"geoidHeightModel",void 0),Pu(this,"Loader",Hs),this.nodePages=new ua(ca.d,64),this.fileMap={},this.options={},this.layers0Path="",this.materialMap=new Map,this.materialDefinitions=[],this.vertexCounter=0,this.layers0=null,this.featuresHashArray=[],this.refinementCounter={tilesCount:0,tilesWithAddRefineCount:0},this.validate=!1,this.boundingVolumeWarnings=null}async convert(t){this.conversionStartTime=ra.a.hrtime();const{tilesetName:e,slpk:r,egmFilePath:n,inputUrl:i,validate:o,outputPath:s,draco:a,sevenZipExe:u,maxDepth:c,token:h}=t;this.options={maxDepth:c,slpk:r,sevenZipExe:u,egmFilePath:n,draco:a,token:h,inputUrl:i},this.validate=o,this.Loader=-1!==i.indexOf("https://")?Js:Hs,console.log("Loading egm file..."),this.geoidHeightModel=await Object(l.load)(n,iu),console.log("Loading egm file completed!"),r&&this.nodePages.useWriteFunction(ca.e);const f=await this._fetchPreloadOptions(),d={loadOptions:{}};f.headers&&(d.loadOptions.fetch={headers:f.headers}),Object.assign(d,f);const p=await Object(l.load)(i,this.Loader,d.loadOptions);return this.sourceTileset=new kr(p,d),await this._createAndSaveTileset(s,e),await this._finishConversion({slpk:r,outputPath:s,tilesetName:e}),p}async _createAndSaveTileset(t,e){const r=Object(Ks.join)(""+t,""+e);try{await Object(ca.b)(r)}catch(t){}this.layers0Path=Object(Ks.join)(r,"SceneServer","layers","0"),this._formLayers0(e),this.materialDefinitions=[],this.materialMap=new Map;const n=this.sourceTileset.root,i=Qa(n,this.geoidHeightModel),o=this.nodePages.push({lodThreshold:0,obb:i.obb,children:[]}),s=this.options.slpk,a=this._formRootNodeIndexDocument(i);await this._convertNodesTree(a,n,o,i),this.layers0.materialDefinitions=this.materialDefinitions,await this._writeLayers0(),async function(t,e,r){const n={serviceItemId:ta().replace(/-/gi,""),layerName:t,layers0:e},i=ia()(n,Va),o=Object(Ks.join)(r,"SceneServer");await Object(ca.d)(o,JSON.stringify(i))}(e,this.layers0,r),await this._writeNodeIndexDocument(a,"root",Object(Ks.join)(this.layers0Path,"nodes","root")),await this.nodePages.save(this.layers0Path,this.fileMap,s),await this._createSlpk(r)}_formLayers0(t){const e=function(t){const e=t.cartesianCenter,r=t.lodMetricValue,n=xt.WGS84.cartesianToCartographic(new st(e[0]+r,e[1]+r,e[2]),new st),i=xt.WGS84.cartesianToCartographic(new st(e[0]-r,e[1]-r,e[2]),new st),o=n[0]<i[0],s=n[1]<i[1];return[o?n[0]:i[0],s?n[1]:i[1],o?i[0]:n[0],s?i[1]:n[1]]}(this.sourceTileset),r={version:`{${ta().toUpperCase()}}`,id:0,name:t,href:"./layers/0",store:{id:`{${ta().toUpperCase()}}`,extent:e},nodePages:{nodesPerPage:64},compressGeometry:this.options.draco};this.layers0=ia()(r,du)}_formRootNodeIndexDocument(t){const e={version:`{${ta().toUpperCase()}}`,id:"root",level:0,lodSelection:[{metricType:"maxScreenThresholdSQ",maxError:0},{metricType:"maxScreenThreshold",maxError:0}],...t,children:[]};return ia()(e,gu)}async _convertNodesTree(t,e,r,n){if(await this.sourceTileset._loadTile(e),e.content&&"b3dm"===e.content.type){t.children.push({id:"1",href:"./1",...n});const[i]=await this._createNode(t,e,r,0),o=Object(Ks.join)(this.layers0Path,"nodes",i.path);this.options.slpk?this.fileMap["nodes/1/3dNodeIndexDocument.json.gz"]=await Object(ca.e)(o,JSON.stringify(i),"3dNodeIndexDocument.json"):await Object(ca.d)(o,JSON.stringify(i))}else await this._addChildrenWithNeighborsAndWriteFile({parentNode:t,sourceTiles:e.children,parentId:r,level:1});await e.unloadContent()}async _writeLayers0(){this.options.slpk?this.fileMap["3dSceneLayer.json.gz"]=await Object(ca.e)(this.layers0Path,JSON.stringify(this.layers0),"3dSceneLayer.json"):await Object(ca.d)(this.layers0Path,JSON.stringify(this.layers0))}async _writeNodeIndexDocument(t,e,r){this.options.slpk?this.fileMap[`nodes/${e}/3dNodeIndexDocument.json.gz`]=await Object(ca.e)(r,JSON.stringify(t),"3dNodeIndexDocument.json"):await Object(ca.d)(r,JSON.stringify(t))}async _createSlpk(t){if(this.options.slpk){const e=Object(Ks.join)(t,"SceneServer","layers","0"),r=t+".slpk";await Object(la.b)(e,r,0,".",this.options.sevenZipExe);try{await Object(ca.b)(t)}catch(t){}}}async _addChildrenWithNeighborsAndWriteFile(t){const e=[];await this._addChildren({...t,childNodes:e}),await this._addNeighborsAndWriteFile(t.parentNode,e)}async _addChildren(t){const{childNodes:e,sourceTiles:r,parentNode:n,parentId:i,level:o}=t;if(!(this.options.maxDepth&&o>this.options.maxDepth))for(const t of r){if("json"===t.type)await this.sourceTileset._loadTile(t),await this._addChildren({parentNode:n,sourceTiles:t.children,childNodes:e,parentId:i,level:o+1}),await t.unloadContent();else{const r=Qa(t,this.geoidHeightModel),s=await this._createNode(n,t,i,o);for(const t of s)n.children.push({id:t.id,href:"../"+t.path,...r}),e.push(t)}t.id&&console.log(t.id)}}async _addNeighborsAndWriteFile(t,e){for(const r of e){const e=Object(Ks.join)(this.layers0Path,"nodes",r.path),n=r.path;if(delete r.path,t.children.length<1e3)for(const e of t.children)r.id!==e.id&&r.neighbors.push({...e});else console.warn(`Node ${r.id}: neighbors attribute is omited because of large number of neigbors`),delete r.neighbors;await this._writeNodeIndexDocument(r,n,e),r.neighbors=[]}}async _createNode(t,e,r,n){var i;this.validate&&this._checkAddRefinementTypeForTile(e),await this._updateTilesetOptions(),await this.sourceTileset._loadTile(e);const o=Qa(e,this.geoidHeightModel),s=function(t,e){const r=[],n=t.boundingVolume,i=t.lodMetricValue||.1,o={metricType:"maxScreenThreshold",maxError:2*e.mbs[3]*16/i},s={metricType:"maxScreenThresholdSQ",maxError:.25*Math.PI*o.maxError*o.maxError};return"OrientedBoundingBox"===n.constructor.name?(r.push(s),r.push(o)):(r.push(o),r.push(s)),r}(e,o),a=s.find(t=>"maxScreenThresholdSQ"===t.metricType)||{maxError:0};(null==e||null===(i=e.content)||void 0===i?void 0:i.batchTableJson)&&this._convertAttributeStorageInfo(e.content);const u=await this._convertResources(e),c=[],l={geometry:null,compressedGeometry:null,texture:null,sharedResources:null,meshMaterial:null,vertexCount:null,attributes:null,featureCount:null};for(const n of u||[l]){const i=this._createNodeInNodePages(a,o,e,r,n),u=this._createNodeIndexDocument(t,o,s,i,n);i.mesh&&await this._writeResources(n,u.path),this.validate&&(this.boundingVolumeWarnings=xu(u),this.boundingVolumeWarnings&&this.boundingVolumeWarnings.length&&console.warn("Bounding Volume Warnings: ",...this.boundingVolumeWarnings)),c.push(u)}e.unloadContent();const h=c[0];return await this._addChildrenWithNeighborsAndWriteFile({parentNode:h,sourceTiles:e.children,parentId:h.id,level:n+1}),c}_convertAttributeStorageInfo(t){const e=t&&t.batchTableJson;e&&!this.layers0.attributeStorageInfo.length&&this._convertBatchTableInfoToNodeAttributes(e)}async _convertResources(t){if(!t.content||"b3dm"!==t.content.type)return null;return await Ba(t.content,Number(this.nodePages.nodesCounter),this.featuresHashArray,this.layers0.attributeStorageInfo,this.options.draco)}_createNodeInNodePages(t,e,r,n,i){const{meshMaterial:o,texture:s,vertexCount:a,featureCount:u,geometry:c}=i,l={lodThreshold:t.maxError,obb:e.obb,children:[],mesh:null};c&&r.content&&"b3dm"===r.content.type&&(l.mesh={geometry:{definition:s?0:1},attribute:{}});const h=this.nodePages.push(l,n);if(o&&this.nodePages.updateMaterialByNodeId(h,this._findOrCreateMaterial(o)),s){const t=s.image.height*s.image.width;this.nodePages.updateTexelCountHintByNodeId(h,t)}return a&&(this.vertexCounter+=a,this.nodePages.updateVertexCountByNodeId(h,a)),this.nodePages.updateNodeAttributeByNodeId(h),u&&this.nodePages.updateFeatureCountByNodeId(h,u),l}_createNodeIndexDocument(t,e,r,n,i){const{texture:o,attributes:s}=i,a=n.index,u={version:t.version,id:a.toString(),path:a.toString(),level:t.level+1,...e,lodSelection:r,parentNode:{id:t.id,href:"../"+t.id,mbs:t.mbs,obb:t.obb},children:[],neighbors:[]},c=ia()(u,gu);if(n.mesh&&(c.geometryData=[{href:"./geometries/0"}],c.sharedResource={href:"./shared"},o&&(c.textureData=[{href:"./textures/0"},{href:"./textures/1"}]),s&&s.length&&this.layers0.attributeStorageInfo&&this.layers0.attributeStorageInfo.length)){c.attributeData=[];for(let t=0;t<s.length;t++){const e=this.layers0.attributeStorageInfo[t].key;c.attributeData.push({href:`./attributes/${e}/0`})}}return c}async _writeResources(t,e){const{geometry:r,compressedGeometry:n,texture:i,sharedResources:o,attributes:s}=t,a=Object(Ks.join)(this.layers0Path,"nodes",e),u=Object(Ks.join)("nodes",e);await this._writeGeometries(r,n,a,u),await this._writeShared(o,a,u,e),await this._writeTexture(i,a,u),await this._writeAttributes(s,a,u)}async _writeGeometries(t,e,r,n){if(this.options.slpk){const e=Object(Ks.join)(r,"geometries");this.fileMap[n+"/geometries/0.bin.gz"]=await Object(ca.e)(e,t,"0.bin")}else{const e=Object(Ks.join)(r,"geometries/0/");await Object(ca.d)(e,t,"index.bin")}if(this.options.draco)if(this.options.slpk){const t=Object(Ks.join)(r,"geometries");this.fileMap[n+"/geometries/1.bin.gz"]=await Object(ca.e)(t,e,"1.bin")}else{const t=Object(Ks.join)(r,"geometries/1/");await Object(ca.d)(t,e,"index.bin")}}async _writeShared(t,e,r,n){t.nodePath=n;const i=ia()(t,vu),o=JSON.stringify(i);if(this.options.slpk){const t=Object(Ks.join)(e,"shared");this.fileMap[r+"/shared/sharedResource.json.gz"]=await Object(ca.e)(t,o,"sharedResource.json")}else{const t=Object(Ks.join)(e,"shared/");await Object(ca.d)(t,o)}}async _writeTexture(t,e,r){if(t){const n=this._getFormatByMimeType(t.mimeType);this.layers0.textureSetDefinitions.length||this.layers0.textureSetDefinitions.push({formats:[{name:"0",format:n},{name:"1",format:"ktx2"}]});const i=t.bufferView.data,o=await Object(l.encode)(t.image,ku);if(this.options.slpk){const t=Object(Ks.join)(e,"textures"),s=!1;this.fileMap[`${r}/textures/0.${n}`]=await Object(ca.e)(t,i,"0."+n,s),this.fileMap[r+"/textures/1.ktx2"]=await Object(ca.e)(t,o,"1.ktx2",s)}else{const t=Object(Ks.join)(e,"textures/0/");await Object(ca.d)(t,i,"index."+n);const r=Object(Ks.join)(e,"textures/1/");await Object(ca.d)(r,o,"index.ktx2")}}}async _writeAttributes(t,e,r){if(t.length&&this.layers0.attributeStorageInfo&&this.layers0.attributeStorageInfo.length)for(let n=0;n<t.length;n++){const i=this.layers0.attributeStorageInfo[n].key,o=new Uint8Array(t[n]);if(this.options.slpk){const t=Object(Ks.join)(e,"attributes",i);this.fileMap[`${r}/attributes/${i}.bin.gz`]=await Object(ca.e)(t,o,"0.bin")}else{const t=Object(Ks.join)(e,`attributes/${i}/0`);await Object(ca.d)(t,o,"index.bin")}}}_getFormatByMimeType(t){switch(t){case"image/jpeg":return"jpg";case"image/png":return"png";default:return"jpg"}}_findOrCreateMaterial(t){const e=sa()(JSON.stringify(t));if(this.materialMap.has(e))return this.materialMap.get(e);const r=this.materialDefinitions.push(t)-1;return this.materialMap.set(e,r),r}_createdStorageAttribute(t,e,r){const n={key:"f_"+t,name:e,ordering:["attributeValues"],header:[{property:"count",valueType:"UInt32"}],attributeValues:{valueType:"Int32",valuesPerElement:1}};switch(r){case"OBJECTID":this._setupIdAttribute(n);break;case"string":this._setupStringAttribute(n);break;case"double":this._setupDoubleAttribute(n);break;case"Int32":break;default:this._setupStringAttribute(n)}return n}getAttributeType(t,e){return"OBJECTID"===t?"OBJECTID":"string"==typeof e?"string":"number"==typeof e?Number.isInteger(e)?"Int32":"double":"string"}_setupStringAttribute(t){t.ordering.unshift("attributeByteCounts"),t.header.push({property:"attributeValuesByteCount",valueType:"UInt32"}),t.attributeValues={valueType:"String",encoding:"UTF-8",valuesPerElement:1},t.attributeByteCounts={valueType:"UInt32",valuesPerElement:1}}_setupIdAttribute(t){t.attributeValues={valueType:"Oid32",valuesPerElement:1}}_setupDoubleAttribute(t){t.attributeValues={valueType:"Float64",valuesPerElement:1}}_createFieldAttribute(t,e){return{name:t,type:e,alias:t}}_convertBatchTableInfoToNodeAttributes(t){let e=0;const r={OBJECTID:[0],...t};for(const t in r){const n=r[t][0],i=this.getAttributeType(t,n),o=this._createdStorageAttribute(e,t,i),s=this._getFieldAttributeType(i),a=this._createFieldAttribute(t,s),u=this._createPopupInfo(r);this.layers0.attributeStorageInfo.push(o),this.layers0.fields.push(a),this.layers0.popupInfo=u,this.layers0.layerType="3DObject",e+=1}}_getFieldAttributeType(t){switch(t){case"OBJECTID":return"esriFieldTypeOID";case"string":return"esriFieldTypeString";case"Int32":return"esriFieldTypeInteger";case"double":return"esriFieldTypeDouble";default:return"esriFieldTypeString"}}_createPopupInfo(t){const e=[],r=[];for(const r in t)e.push({fieldName:r,visible:!0,isEditable:!1,label:r});return r.push({fieldInfos:e,type:"fields"}),{title:"{OBJECTID}",mediaInfos:[],popupElements:r,fieldInfos:e,expressionInfos:[]}}async _finishConversion(t){const{tilesCount:e,tilesWithAddRefineCount:r}=this.refinementCounter,n=r?r/e*100:0,i=await da(t),o=fa(ra.a.hrtime(this.conversionStartTime));console.log("------------------------------------------------"),console.log("Finishing conversion of 3DTILES"),console.log("Total conversion time: "+o),console.log("Vertex count: ",this.vertexCounter),console.log("File(s) size: ",i," bytes"),console.log('Percentage of tiles with "ADD" refinement type:',n,"%"),console.log("------------------------------------------------")}async _fetchPreloadOptions(){if(!this.Loader.preload)return{};const t={"cesium-ion":{accessToken:this.options.token||Lu}},e=await this.Loader.preload(this.options.inputUrl,t);return this.refreshTokenTime=ra.a.hrtime(),{...t,...e}}async _updateTilesetOptions(){if(ra.a.hrtime(this.refreshTokenTime)[0]<1800)return;this.refreshTokenTime=ra.a.hrtime();const t=await this._fetchPreloadOptions();this.sourceTileset.options={...this.sourceTileset.options,...t},t.headers&&(this.sourceTileset.loadOptions.fetch={...this.sourceTileset.loadOptions.fetch,headers:t.headers},console.log("Authorization Bearer token has been updated"))}_checkAddRefinementTypeForTile(t){1===t.refine&&(this.refinementCounter.tilesWithAddRefineCount+=1,console.warn('This tile uses "ADD" type of refinement')),this.refinementCounter.tilesCount+=1}}const Nu={MAGIC_NUMBER:542327876,HEADER_LENGTH:31,MAGIC_NUMBER_INDEX:0,HEADER_SIZE_INDEX:1,HEADER_FLAGS_INDEX:2,HEADER_HEIGHT_INDEX:3,HEADER_WIDTH_INDEX:4,MIPMAPCOUNT_INDEX:7,HEADER_PF_FLAGS_INDEX:20,HEADER_PF_FOURCC_INDEX:21,DDSD_MIPMAPCOUNT:131072,DDPF_FOURCC:4,PIXEL_FORMATS:{DXT1:fi.COMPRESSED_RGB_S3TC_DXT1_EXT,DXT3:fi.COMPRESSED_RGBA_S3TC_DXT3_EXT,DXT5:fi.COMPRESSED_RGBA_S3TC_DXT5_EXT,"ATC ":fi.COMPRESSED_RGB_ATC_WEBGL,ATCA:fi.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL,ATCI:fi.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL},SIZE_FUNCTIONS:{DXT1:Gu,DXT3:ju,DXT5:ju,"ATC ":Gu,ATCA:ju,ATCI:ju}};function Uu(t){const e=new Int32Array(t,0,Nu.HEADER_LENGTH),r=e[Nu.HEADER_PF_FOURCC_INDEX];Object(kt.a)(Boolean(e[Nu.HEADER_PF_FLAGS_INDEX]&Nu.DDPF_FOURCC),"DDS: Unsupported format, must contain a FourCC code");const n=(i=r,String.fromCharCode(255&i,i>>8&255,i>>16&255,i>>24&255));var i;const o=Nu.PIXEL_FORMATS[n],s=Nu.SIZE_FUNCTIONS[n];Object(kt.a)(o&&s,"DDS: Unknown pixel format "+r);let a=1;e[Nu.HEADER_FLAGS_INDEX]&Nu.DDSD_MIPMAPCOUNT&&(a=Math.max(1,e[Nu.MIPMAPCOUNT_INDEX]));const u=e[Nu.HEADER_WIDTH_INDEX],c=e[Nu.HEADER_HEIGHT_INDEX],l=e[Nu.HEADER_SIZE_INDEX]+4;return Ii(new Uint8Array(t,l),{mipMapLevels:a,width:u,height:c,sizeFunction:s,internalFormat:o})}function Gu(t,e){return(t+3>>2)*(e+3>>2)*8}function ju(t,e){return(t+3>>2)*(e+3>>2)*16}const Hu=55727696,zu=1347834371,Ju=13,Wu=52,Ku=0,Qu=2,qu=4,Vu=6,Zu=7,Xu=11,Yu=12,$u={0:[fi.COMPRESSED_RGB_PVRTC_2BPPV1_IMG],1:[fi.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG],2:[fi.COMPRESSED_RGB_PVRTC_4BPPV1_IMG],3:[fi.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG],6:[fi.COMPRESSED_RGB_ETC1_WEBGL],7:[fi.COMPRESSED_RGB_S3TC_DXT1_EXT],9:[fi.COMPRESSED_RGBA_S3TC_DXT3_EXT],11:[fi.COMPRESSED_RGBA_S3TC_DXT5_EXT],22:[fi.COMPRESSED_RGB8_ETC2],23:[fi.COMPRESSED_RGBA8_ETC2_EAC],24:[fi.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2],25:[fi.COMPRESSED_R11_EAC],26:[fi.COMPRESSED_RG11_EAC],27:[fi.COMPRESSED_RGBA_ASTC_4X4_KHR,fi.COMPRESSED_SRGB8_ALPHA8_ASTC_4X4_KHR],28:[fi.COMPRESSED_RGBA_ASTC_5X4_KHR,fi.COMPRESSED_SRGB8_ALPHA8_ASTC_5X4_KHR],29:[fi.COMPRESSED_RGBA_ASTC_5X5_KHR,fi.COMPRESSED_SRGB8_ALPHA8_ASTC_5X5_KHR],30:[fi.COMPRESSED_RGBA_ASTC_6X5_KHR,fi.COMPRESSED_SRGB8_ALPHA8_ASTC_6X5_KHR],31:[fi.COMPRESSED_RGBA_ASTC_6X6_KHR,fi.COMPRESSED_SRGB8_ALPHA8_ASTC_6X6_KHR],32:[fi.COMPRESSED_RGBA_ASTC_8X5_KHR,fi.COMPRESSED_SRGB8_ALPHA8_ASTC_8X5_KHR],33:[fi.COMPRESSED_RGBA_ASTC_8X6_KHR,fi.COMPRESSED_SRGB8_ALPHA8_ASTC_8X6_KHR],34:[fi.COMPRESSED_RGBA_ASTC_8X8_KHR,fi.COMPRESSED_SRGB8_ALPHA8_ASTC_8X8_KHR],35:[fi.COMPRESSED_RGBA_ASTC_10X5_KHR,fi.COMPRESSED_SRGB8_ALPHA8_ASTC_10X5_KHR],36:[fi.COMPRESSED_RGBA_ASTC_10X6_KHR,fi.COMPRESSED_SRGB8_ALPHA8_ASTC_10X6_KHR],37:[fi.COMPRESSED_RGBA_ASTC_10X8_KHR,fi.COMPRESSED_SRGB8_ALPHA8_ASTC_10X8_KHR],38:[fi.COMPRESSED_RGBA_ASTC_10X10_KHR,fi.COMPRESSED_SRGB8_ALPHA8_ASTC_10X10_KHR],39:[fi.COMPRESSED_RGBA_ASTC_12X10_KHR,fi.COMPRESSED_SRGB8_ALPHA8_ASTC_12X10_KHR],40:[fi.COMPRESSED_RGBA_ASTC_12X12_KHR,fi.COMPRESSED_SRGB8_ALPHA8_ASTC_12X12_KHR]},tc={0:ec,1:ec,2:rc,3:rc,6:nc,7:nc,9:ic,11:ic,22:nc,23:ic,24:nc,25:nc,26:ic,27:ic,28:function(t,e){return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16},29:function(t,e){return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16},30:function(t,e){return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16},31:function(t,e){return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16},32:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16},33:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16},34:function(t,e){return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16},35:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16},36:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16},37:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16},38:function(t,e){return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16},39:function(t,e){return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16},40:function(t,e){return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16}};function ec(t,e){return(t=Math.max(t,16))*(e=Math.max(e,8))/4}function rc(t,e){return(t=Math.max(t,8))*(e=Math.max(e,8))/2}function nc(t,e){return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8}function ic(t,e){return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16}function oc(t){if(Pi(t))return Li(t);if(function(t){return new Uint32Array(t,0,Nu.HEADER_LENGTH)[Nu.MAGIC_NUMBER_INDEX]===Nu.MAGIC_NUMBER}(t))return Uu(t);if(function(t){const e=new Uint32Array(t,0,Ju)[Ku];return e===Hu||e===zu}(t))return function(t){const e=new Uint32Array(t,0,Ju),r=e[Qu],n=e[qu],i=$u[r]||[],o=i.length>1&&n?i[1]:i[0],s=tc[r],a=e[Xu],u=e[Zu],c=e[Vu],l=Wu+e[Yu];return Ii(new Uint8Array(t,l),{mipMapLevels:a,width:u,height:c,sizeFunction:s,internalFormat:o})}(t);throw new Error("Texture container format not recognized")}const sc={name:"Texture Containers",id:"compressed-texture",module:"textures",version:"3.1.0-alpha.5",worker:!0,extensions:["ktx","ktx2","dds","pvr"],mimeTypes:["image/ktx2","image/ktx","image/vnd-ms.dds","image/x-dds","application/octet-stream"],binary:!0,options:{"compressed-texture":{libraryPath:"libs/",useBasis:!1}}},ac={...sc,parse:async(t,e)=>e["compressed-texture"].useBasis?(e.basis={format:{alpha:"BC3",noAlpha:"BC1"},...e.basis,containerFormat:"ktx2",module:"encoder"},await Ni(t,e)):oc(t)};function uc(t,e=null){return e?`${t}?token=${e}`:t}var cc=5121,lc=5125,hc=5126,fc=5130;const dc={UInt8:Uint8Array,UInt16:Uint16Array,UInt32:Uint32Array,Float32:Float32Array,UInt64:Float64Array},pc={UInt8:cc,UInt16:lc,Float32:hc,UInt32:lc,UInt64:fc},mc={position:"position",normal:"normal",uv0:"uv0",color:"color",region:"region"},gc={vertexAttributes:"vertexAttributes",featureAttributeOrder:"featureAttributeOrder",featureAttributes:"featureAttributes"},_c="header",bc="vertexCount",yc="featureCount",wc={UInt8:1,UInt16:2,UInt32:4,Float32:4,UInt64:8},vc=2,Ac=3,Ec=new st([0,0,0]),Sc={jpeg:fo,png:fo,"ktx-etc2":ac,dds:ac,ktx2:Ki};async function Bc(t,e,r,n,i){if(e.content=e.content||{},e.content.featureIds=e.content.featureIds||null,e.content.featureData=function(t,e){const r=e.store.defaultGeometrySchema,n=r;for(const t in gc)for(const e in mc){const i=r[t][e];if(i){const{byteOffset:r=0,count:o=0,valueType:s,valuesPerElement:a}=i;n[t][e]={valueType:s,valuesPerElement:a,byteOffset:r,count:o}}}return n.attributesOrder=r.ordering,n}(0,r),e.content.attributes={},e.textureUrl){var o;const t=uc(e.textureUrl,null==n||null===(o=n.i3s)||void 0===o?void 0:o.token),r=Sc[e.textureFormat]||fo,s=await fetch(t),a=await s.arrayBuffer();if(null!=n&&n.i3s.decodeTextures){if(r===fo){const t={...e.textureLoaderOptions,image:{type:"data"}};try{e.content.texture=await i.parse(a,t)}catch(n){e.content.texture=await Object(l.parse)(a,r,t)}}else if(r===ac||r===Ki){const t=await Object(l.load)(a,r,e.textureLoaderOptions);e.content.texture={compressed:!0,mipmaps:!1,width:t[0].width,height:t[0].height,data:t}}}else e.content.texture=a}return e.content.material=function(t,e){let r;t?r={...t,pbrMetallicRoughness:t.pbrMetallicRoughness?{...t.pbrMetallicRoughness}:{baseColorFactor:[255,255,255,255]}}:(r={pbrMetallicRoughness:{}},e?r.pbrMetallicRoughness.baseColorTexture={texCoord:0}:r.pbrMetallicRoughness.baseColorFactor=[255,255,255,255]);r.alphaCutoff=r.alphaCutoff||.25,r.alphaMode&&(r.alphaMode=r.alphaMode.toUpperCase());r.emissiveFactor&&(r.emissiveFactor=Oc(r.emissiveFactor));r.pbrMetallicRoughness&&r.pbrMetallicRoughness.baseColorFactor&&(r.pbrMetallicRoughness.baseColorFactor=Oc(r.pbrMetallicRoughness.baseColorFactor));return function(t,e){const r={source:{image:e}};t.pbrMetallicRoughness&&t.pbrMetallicRoughness.baseColorTexture?t.pbrMetallicRoughness.baseColorTexture={...t.pbrMetallicRoughness.baseColorTexture,texture:r}:t.emissiveTexture?t.emissiveTexture={...t.emissiveTexture,texture:r}:t.pbrMetallicRoughness&&t.pbrMetallicRoughness.metallicRoughnessTexture?t.pbrMetallicRoughness.metallicRoughnessTexture={...t.pbrMetallicRoughness.metallicRoughnessTexture,texture:r}:t.normalTexture?t.normalTexture={...t.normalTexture,texture:r}:t.occlusionTexture&&(t.occlusionTexture={...t.occlusionTexture,texture:r})}(r,e),r}(e.materialDefinition,e.content.texture),e.content.material&&(e.content.texture=null),await async function(t,e={},r,n){var i;if(!e.content)return e;const o=e.content;let s,a,u=0,c=0;if(e.isDracoGeometry){const e=await Object(l.parse)(t,In,{draco:{attributeNameEntry:"i3s-attribute-type"}});a=e.header.vertexCount;const r=e.indices.value,{POSITION:n,NORMAL:i,COLOR_0:o,TEXCOORD_0:u,"feature-index":c,"uv-region":h}=e.attributes;s={position:n,normal:i,color:o,uv0:u,uvRegion:h,id:c,indices:r},function(t,e){for(const r in e.loaderData.attributes){const n=e.loaderData.attributes[r];switch(n.name){case"POSITION":t.position.metadata=n.metadata;break;case"feature-index":t.id.metadata=n.metadata}}}(s,e);const f=function(t){return t&&t.metadata&&t.metadata["i3s-feature-ids"]&&t.metadata["i3s-feature-ids"].intArray}(c);f&&function(t,e){const r=t.id.value,n=new Float32Array(r.length);for(let t=0;t<r.length;t++)n[t]=e[r[t]];t.id.value=n}(s,f)}else{const{vertexAttributes:e,attributesOrder:r,featureAttributes:n,featureAttributeOrder:i}=o.featureData,l=function(t,e){let r=0,n=0,i=0;const o=t.featureData[_c];for(const t in o){const{property:s,type:a}=o[t],u=dc[a];s===bc&&(n=new u(e,0,4)[0],r+=wc[a]),s===yc&&(i=new u(e,4,4)[0],r+=wc[a])}return{vertexCount:n,featureCount:i,byteOffset:r}}(o,t);u=l.byteOffset,a=l.vertexCount,c=l.featureCount;const{attributes:h,byteOffset:f}=Tc(t,u,e,a,r),{attributes:d}=Tc(t,f,n,c,i);!function(t){const{id:e,faceRange:r}=t;if(!e||!r)return;const n=e.value,i=r.value,o=i[i.length-1]+1,s=new Uint32Array(3*o);let a=0,u=0;for(let t=1;t<i.length;t+=2){const e=Number(n[a]),r=i[t],o=i[t-1],c=u+3*(r-o+1);s.fill(e,u,c),a++,u=c}t.id.value=s}(d),s=function(t,e){return{...t,...e}}(h,d)}if(null!=r&&null!==(i=r.i3s)&&void 0!==i&&i.coordinateSystem&&r.i3s.coordinateSystem!==vc)o.modelMatrix=function(t){var e,r;const n=t.metadata,i=(null==n||null===(e=n["i3s-scale_x"])||void 0===e?void 0:e.double)||1,o=(null==n||null===(r=n["i3s-scale_y"])||void 0===r?void 0:r.double)||1,s=new rt;return s[0]=i,s[5]=o,s}(s.position),o.coordinateSystem=Ac;else{const{enuMatrix:t}=function(t,e){const r=e.mbs,n=t.value,i=t.metadata,o=new rt,s=new st(r[0],r[1],r[2]),a=new st;return xt.WGS84.cartographicToCartesian(s,a),xt.WGS84.eastNorthUpToFixedFrame(a,o),t.value=function(t,e={},r){const n=new Float64Array(t.length),i=e["i3s-scale_x"]&&e["i3s-scale_x"].double||1,o=e["i3s-scale_y"]&&e["i3s-scale_y"].double||1;for(let e=0;e<n.length;e+=3)n[e]=t[e]*i+r.x,n[e+1]=t[e+1]*o+r.y,n[e+2]=t[e+2]+r.z;for(let t=0;t<n.length;t+=3)xt.WGS84.cartographicToCartesian(n.subarray(t,t+3),Ec),n[t]=Ec.x,n[t+1]=Ec.y,n[t+2]=Ec.z;return n}(n,i,s),{enuMatrix:o}}(s.position,e);o.modelMatrix=t.invert(),o.coordinateSystem=vc}o.attributes={positions:s.position,normals:s.normal,colors:Cc(s.color),texCoords:s.uv0,uvRegions:Cc(s.uvRegion)},o.indices=s.indices||null,s.id&&s.id.value&&(e.content.featureIds=s.id.value);for(const t in o.attributes)o.attributes[t]||delete o.attributes[t];return o.vertexCount=a,o.byteLength=t.byteLength,e}(t,e,n)}function Cc(t){return t?(t.normalized=!0,t):t}function Tc(t,e,r,n,i){const o={};for(const s of i)if(r[s]){const{valueType:i,valuesPerElement:a}=r[s],u=n;if(e+u*a>t.byteLength)break;const c=t.slice(e);let l=[];if("UInt64"===i)l=Rc(c,u*a,wc[i]);else{l=new(0,dc[i])(c,0,u*a)}switch(o[s]={value:l,type:pc[i],size:a},s){case"color":o.color.normalized=!0}e+=u*a*wc[i]}return{attributes:o,byteOffset:e}}function Rc(t,e,r){const n=[],i=new DataView(t);let o=0;for(let t=0;t<e;t++){const t=i.getUint32(o,!0)+2**32*i.getUint32(o+4,!0);n.push(t),o+=r}return n}function Oc(t){const e=[...t];for(let r=0;r<t.length;r++)e[r]=t[r]/255;return e}const Ic={name:"I3S Content (Indexed Scene Layers)",id:"i3s-content",module:"i3s",worker:!0,version:"3.1.0-alpha.5",mimeTypes:["application/octet-stream"],parse:async function(t,e,r){const{tile:n,tileset:i}=(null==e?void 0:e.i3s)||{};return await Bc(t,n,i,e,r),n.content},extensions:["bin"],options:{"i3s-content":{}}};async function Mc(t){return JSON.parse((new TextDecoder).decode(t))}const xc={name:"I3S Node Page",id:"i3s-node-page",module:"i3s",version:"3.1.0-alpha.5",mimeTypes:["application/json"],parse:async function(t){return t=Mc(t)},extensions:["json"],options:{}};function Dc(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class kc{constructor(t,e){Dc(this,"tileset",void 0),Dc(this,"nodePages",[]),Dc(this,"pendingNodePages",[]),Dc(this,"nodesPerPage",void 0),Dc(this,"options",void 0),Dc(this,"lodSelectionMetricType",void 0),Dc(this,"textureDefinitionsSelectedFormats",[]),Dc(this,"textureLoaderOptions",{}),this.tileset={...t},this.nodesPerPage=t.nodePages.nodesPerPage,this.lodSelectionMetricType=t.nodePages.lodSelectionMetricType,this.options=e,this.initSelectedFormatsForTextureDefinitions(t)}async getNodeById(t){const e=Math.floor(t/this.nodesPerPage);if(!this.nodePages[e]&&!this.pendingNodePages[e]){var r;const t=uc(`${this.tileset.url}/nodepages/${e}`,null===(r=this.options.i3s)||void 0===r?void 0:r.token);this.pendingNodePages[e]={status:"Pending",promise:Object(l.load)(t,xc,this.options)},this.nodePages[e]=await this.pendingNodePages[e].promise,this.pendingNodePages[e].status="Done"}"Pending"===this.pendingNodePages[e].status&&(this.nodePages[e]=await this.pendingNodePages[e].promise);const n=t%this.nodesPerPage;return this.nodePages[e].nodes[n]}async formTileFromNodePages(t){const e=await this.getNodeById(t),r=[];for(const t of e.children||[]){const e=await this.getNodeById(t);r.push({id:t,obb:e.obb})}let n=null,i=null,o=null,s="jpeg",a=[],u=!1;if(e&&e.mesh){const{url:t,isDracoGeometry:r}=e.mesh.geometry&&this.getContentUrl(e.mesh.geometry)||{url:null,isDracoGeometry:null};n=t,u=r;const[c,l]=this.getInformationFromMaterial(e.mesh.material);o=l,s=c.format||s,c.name&&(i=`${this.tileset.url}/nodes/${e.mesh.material.resource}/textures/${c.name}`),this.tileset.attributeStorageInfo&&(a=function(t,e){const r=[],{attributeStorageInfo:n,url:i}=t;for(let t=0;t<n.length;t++){const o=n[t].key;r.push(`${i}/nodes/${e}/attributes/${o}/0`)}return r}(this.tileset,e.mesh.attribute.resource))}return Pc({id:t,lodSelection:this.getLodSelection(e),obb:e.obb,contentUrl:n,textureUrl:i,attributeUrls:a,materialDefinition:o,textureFormat:s,textureLoaderOptions:this.textureLoaderOptions,children:r,isDracoGeometry:u})}getContentUrl(t){let e={};const r=this.tileset.geometryDefinitions[t.definition];let n=-1;if(this.options.i3s&&this.options.i3s.useDracoGeometry&&(n=r.geometryBuffers.findIndex(t=>t.compressedAttributes&&"draco"===t.compressedAttributes.encoding)),-1===n&&(n=r.geometryBuffers.findIndex(t=>!t.compressedAttributes)),-1!==n){const i=Boolean(r.geometryBuffers[n].compressedAttributes);e={url:`${this.tileset.url}/nodes/${t.resource}/geometries/${n}`,isDracoGeometry:i}}return e}getLodSelection(t){const e=[];return"maxScreenThresholdSQ"===this.lodSelectionMetricType&&e.push({metricType:"maxScreenThreshold",maxError:Math.sqrt(t.lodThreshold/(.25*Math.PI))}),e.push({metricType:this.lodSelectionMetricType,maxError:t.lodThreshold}),e}getInformationFromMaterial(t){const e={name:null,format:null};if(t){const r=this.tileset.materialDefinitions[t.definition],n=r&&r.pbrMetallicRoughness&&r.pbrMetallicRoughness.baseColorTexture&&r.pbrMetallicRoughness.baseColorTexture.textureSetDefinitionId;if(n||0===n){return[this.textureDefinitionsSelectedFormats[n]||e,r]}return[e,r]}return[e,null]}initSelectedFormatsForTextureDefinitions(t){this.textureDefinitionsSelectedFormats=[];const e=this.getSupportedTextureFormats(),r=t.textureSetDefinitions||[];for(const t of r){const r=t&&t.formats||[];let n=null;for(const t of e){const e=r.find(e=>e.format===t);if(e){n=e;break}}n&&"ktx2"===n.format&&(this.textureLoaderOptions.basis={format:Ji(),containerFormat:"ktx2",module:"encoder"}),this.textureDefinitionsSelectedFormats.push(n)}}getSupportedTextureFormats(){const t=[];if(!this.options.i3s||this.options.i3s.useCompressedTextures){const e=gi();e.has("etc2")&&t.push("ktx-etc2"),e.has("dxt")&&t.push("dds"),t.push("ktx2")}return t.push("jpg"),t.push("png"),t}}function Pc(t){const e=t.obb?[...xt.WGS84.cartographicToCartesian(t.obb.center),...t.obb.halfSize,...t.obb.quaternion]:void 0;let r;if(t.mbs)r=[...xt.WGS84.cartographicToCartesian(t.mbs.slice(0,3)),t.mbs[3]];else if(e){const n=(new Le).fromCenterHalfSizeQuaternion(e.slice(0,3),t.obb.halfSize,t.obb.quaternion).getBoundingSphere();r=[...n.center,n.radius],t.mbs=[...t.obb.center,n.radius]}return t.boundingVolume={sphere:r,box:e},t.lodMetricType=t.lodSelection[0].metricType,t.lodMetricValue=t.lodSelection[0].maxError,t.transformMatrix=t.transform,t.type=sr,t.refine=rr,t}const Lc=/layers\/[0-9]+$/,Fc=/nodes\/([0-9-]+|root)$/,Nc={name:"I3S (Indexed Scene Layers)",id:"i3s",module:"i3s",version:"3.1.0-alpha.5",mimeTypes:["application/octet-stream"],parse:async function(t,e,r){const n=r.url;e.i3s=e.i3s||{};if("504b0304"===function(t){if(t instanceof ArrayBuffer)return[...new Uint8Array(t,0,4)].map(t=>t.toString(16).padStart(2,"0")).join("");return null}(t))throw new Error("Files with .slpk extention currently are not supported by I3SLoader");let i,o;i="auto"===e.i3s.isTileset?Lc.test(n):e.i3s.isTileset;o="auto"===e.isTileHeader?Fc.test(n):e.i3s.isTileHeader;i?t=await async function(t,e,r){const n=JSON.parse((new TextDecoder).decode(t));return n.loader=Nc,await async function(t,e,r){if(t.url=r.url,t.nodePages)t.nodePagesTile=new kc(t,e),t.root=await t.nodePagesTile.formTileFromNodePages(0);else{var n;const r=uc(t.url+"/nodes/root",null===(n=e.i3s)||void 0===n?void 0:n.token);t.root=await Object(l.load)(r,t.loader,{i3s:{loadContent:!1,isTileHeader:!0,isTileset:!1}})}t.basePath=t.url,t.type=ar,t.lodMetricType=t.root.lodMetricType,t.lodMetricValue=t.root.lodMetricValue}(n,e,r),n}(t,e,r):o?(t=await async function(t,e,r){return function(t,e,r){return t.url=r.url,t.featureData&&(t.featureUrl=`${t.url}/${t.featureData[0].href}`),t.geometryData&&(t.contentUrl=`${t.url}/${t.geometryData[0].href}`),t.textureData&&(t.textureUrl=`${t.url}/${t.textureData[0].href}`),t.attributeData&&(t.attributeUrls=function(t){const{url:e,attributeData:r}=t,n=[];for(let t=0;t<r.length;t++){const i=r[t].href.replace("./","");n.push(`${e}/${i}`)}return n}(t)),Pc(t)}(t=JSON.parse((new TextDecoder).decode(t)),0,r)}(t,0,r),e.i3s.loadContent&&(e.i3s.tile=t,await Object(l.load)(t.contentUrl,Nc,e))):t=await async function(t,e){return await Object(l.parse)(t,Ic,e)}(t,e);return t},extensions:["bin"],options:{i3s:{loadContent:!0,token:null,isTileset:"auto",isTileHeader:"auto",tile:null,tileset:null,useDracoGeometry:!0,useCompressedTextures:!0,decodeTextures:!0,coordinateSystem:vc}}};async function Uc(t,e){const{attributeName:r,attributeType:n}=e;return r?{[r]:n?Gc(n,t):null}:{}}function Gc(t,e){switch(t){case"String":return function(t){const e=[];try{const r=new DataView(t,0,4).getUint32(0,!0),n=new Uint32Array(t,8,r);let i=8+4*r;for(const r of n){const n=new TextDecoder("utf-8"),o=new Uint8Array(t,i,r);e.push(n.decode(o)),i+=r}}catch(t){console.error("Parse string attribute error: ",t.message)}return e}(e);case"Oid32":return jc(e);case"Float64":return function(t){return new Float64Array(t,8)}(e);case"Int16":return function(t){return new Int16Array(t,4)}(e);default:return jc(e)}}function jc(t){return new Uint32Array(t,4)}const Hc={name:"I3S Attribute",id:"i3s-attribute",module:"i3s",version:"3.1.0-alpha.5",mimeTypes:["application/binary"],parse:async function(t,e){return t=Uc(t,e)},extensions:["bin"],options:{},binary:!0};function zc(t,e){const r=[t.center[0],t.center[1],t.center[2]+e.getHeight(t.center[1],t.center[0])],n=xt.WGS84.cartographicToCartesian(r,new st),i=(new Le).fromCenterHalfSizeQuaternion(n,t.halfSize,t.quaternion);return[...i.center,...i.halfAxes.toArray()]}const Jc={version:{path:"version",default:"1.0"}},Wc={boundingVolume:{path:"boundingVolume"},geometricError:{path:"geometricError"},content:{path:"content"},children:{path:"children",transform:t=>t.map(t=>ia()(t,Wc))}},Kc={asset:{path:"asset",transform:t=>ia()(t,Jc)},geometricError:{path:"root",transform:t=>t.geometricError},root:{path:"root",transform:t=>ia()(t,Wc)}};var Qc=r(71);const qc=1179937895;function Vc(t,e,r,n){return function(t,{firstBuffer:e=0}={}){if(t.buffers&&t.buffers.length>e)throw new Error("encodeGLTF: multiple buffers not yet implemented")}(t),function(t,e,r=0,n={}){const{magic:i=qc,version:o=2,json:s={},binary:a}=t,u=r;e&&(e.setUint32(r+0,i,!0),e.setUint32(r+4,o,!0),e.setUint32(r+8,0,!0));const c=r+8,l=r+=12;e&&(e.setUint32(r+0,0,!0),e.setUint32(r+4,1313821514,!0)),r+=8;const h=JSON.stringify(s);if(r=Object(Qc.b)(e,r,h,4),e){const t=r-l-8;e.setUint32(l+0,t,!0)}if(a){const t=r;if(e&&(e.setUint32(r+0,0,!0),e.setUint32(r+4,5130562,!0)),r+=8,r=Object(Qc.a)(e,r,a,4),e){const n=r-t-8;e.setUint32(t+0,n,!0)}}if(e){const t=r-u;e.setUint32(c,t,!0)}return r}(t,e,r,n)}const Zc={name:"glTF",id:"gltf",module:"gltf",version:"3.1.0-alpha.5",extensions:["glb"],mimeTypes:["model/gltf-binary"],binary:!0,encodeSync:function(t,e={}){const{byteOffset:r=0}=e,n=Vc(t,null,r,e),i=new ArrayBuffer(n),o=new DataView(i);return Vc(t,o,r,e),i},options:{gltf:{}}};function Xc(t,e,r){if(!e)return r+12;const{magic:n,version:i=1,byteLength:o=12}=t;return Object(kt.a)(Array.isArray(n)&&Number.isFinite(i)&&Number.isFinite(o)),e.setUint8(r+0,n[0]),e.setUint8(r+1,n[1]),e.setUint8(r+2,n[2]),e.setUint8(r+3,n[3]),e.setUint32(r+4,i,!0),e.setUint32(r+8,o,!0),r+=12}function Yc(t,e,r){t&&t.setUint32(e+8,r,!0)}var $c=r(53);const tl={POINTS_LENGTH:1,POSITIONS:{byteOffset:0}};function el(t,e,r,n){switch(Object(kt.a)("string"==typeof t.type),t.type){case Pr.COMPOSITE:return function(t,e,r,n,i){const o=r;r+=Xc(t={magic:Lr.COMPOSITE,tiles:[],...t},e,r),e&&e.setUint32(r,t.tiles.length,!0),r+=4;for(let o=0;o<t.tiles.length;++o)r+=i(t.tiles[o],e,r,n);return Yc(e,o,r-o),r}(t,e,r,n,el);case Pr.POINT_CLOUD:return function(t,e,r,n){const{featureTableJson:i=tl}=t;let o=JSON.stringify(i);o=Object($c.c)(o,4);const{featureTableJsonByteLength:s=o.length}=t,a=new ArrayBuffer(12),u=a.byteLength,c=r;return r+=Xc(t={magic:Lr.POINT_CLOUD,...t},e,0),e&&(e.setUint32(r+0,s,!0),e.setUint32(r+4,u,!0),e.setUint32(r+8,0,!0),e.setUint32(r+12,0,!0)),r+=16,r+=Object($c.b)(e,r,o,s),Yc(e,c,(r+=Object($c.a)(e,r,a,u))-c),r}(t,e,r);case Pr.BATCHED_3D_MODEL:return function(t,e,r,n){const{featuresLength:i=0,batchTable:o}=t,s={BATCH_LENGTH:i},a=JSON.stringify(s),u=o?JSON.stringify(o):"",c=Object(yo.b)(a.length,8),l=u?Object(yo.b)(u.length,8):0,h=r;r=Xc(t={magic:Lr.BATCHED_MODEL,...t},e,r),e&&(e.setUint32(12,c,!0),e.setUint32(16,0,!0),e.setUint32(20,l,!0),e.setUint32(24,0,!0)),r+=16,r=Object(Qc.b)(e,r,a,8),o&&(r=Object(Qc.b)(e,r,u,8));const f=t.gltfEncoded;return f&&(r=Object($c.a)(e,r,f,f.byteLength)),Yc(e,h,r-h),r}(t,e,r);case Pr.INSTANCED_3D_MODEL:return function(t,e,r,n){const{featuresLength:i=1,gltfFormat:o=1,gltfUri:s=""}=t,a=s.length,u={INSTANCES_LENGTH:i,POSITION:new Array(3*i).fill(0)},c=JSON.stringify(u),l=c.length,h=r;return r=Xc(t={magic:Lr.INSTANCED_MODEL,...t},e,0),e&&(e.setUint32(12,l,!0),e.setUint32(16,0,!0),e.setUint32(20,0,!0),e.setUint32(24,0,!0),e.setUint32(28,o,!0)),r+=20,r+=Object($c.b)(e,r,c,l),Yc(e,h,(r+=Object($c.b)(e,r,s,a))-h),r}(t,e,r);default:throw new Error("3D Tiles: unknown tile type")}}const rl={name:"3D Tile",id:"3d-tiles",module:"3d-tiles",version:"3.1.0-alpha.5",extensions:["cmpt","pnts","b3dm","i3dm"],mimeTypes:["application/octet-stream"],encodeSync:function(t,e){return function(t,e){const r=el(t,null,0,e),n=new ArrayBuffer(r);return el(t,new DataView(n),0,e),n}(t,e)},binary:!0,options:{"3d-tiles":{}}};const{_encodeImageNode:nl}=globalThis;let il=!0;const ol={name:"Images",id:"image",module:"images",version:"3.1.0-alpha.5",extensions:["jpeg"],options:{image:{mimeType:"image/png",jpegQuality:null}},encode:async function(t,e){return(e=e||{}).image=e.image||{},nl?nl(t,{type:e.image.mimeType}):async function(t,e){const{mimeType:r,jpegQuality:n}=e.image,{width:i,height:o}=function(t){return to(t)}(t),s=document.createElement("canvas");s.width=i,s.height=o,function(t,e,r=0,n=0){if(0===r&&0===n&&"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const r=e.getContext("bitmaprenderer");if(r)return r.transferFromImageBitmap(t),e}const i=e.getContext("2d");if(t.data){const r=new Uint8ClampedArray(t.data),n=new ImageData(r,t.width,t.height);return i.putImageData(n,0,0),e}i.drawImage(t,0,0)}(t,s);const a=await new Promise(t=>{if(n&&il)try{return void s.toBlob(t,r,n)}catch(t){il=!1}s.toBlob(t,r)});if(!a)throw new Error("image encoding failed");return await a.arrayBuffer()}(t,e)}};function sl(t){return[t[0]-Math.floor(t[0]),t[1]-Math.floor(t[1])]}const al=new rt([1,0,0,0,0,0,-1,0,0,1,0,0,0,0,0,1]),ul=new st;class cl{async convert(t,e=null){this.i3sTile=t;const r=await this.buildGltf(t);return Object(l.encodeSync)({gltfEncoded:new Uint8Array(r),type:"b3dm",featuresLength:this._getFeaturesLength(e),batchTable:e},rl)}async buildGltf(t){const{material:e,attributes:r,indices:n,cartesianOrigin:i,cartographicOrigin:o,modelMatrix:s}=t.content,a=new Mo,u=await this._addI3sTextureToGltf(t,a),c=this._convertI3sMaterialToGltfMaterial(e,u),h=a.addMaterial(c),f=r.positions,d=f.value;r.uvRegions&&r.texCoords&&(r.texCoords.value=function(t,e){const r=new Float32Array(t.length),n=function(t){const e=[];for(let r=0;r<t.length;r++)e[r]=t[r]/65535;return e}(e);for(let e=0;e<t.length;e+=2){const i=t.subarray(e,e+2),o=n.slice(2*e,2*e+4),s=sl(i),a=[o[2]-o[0],o[3]-o[1]],u=[s[0]*a[0],s[1]*a[1]],c=[u[0]+o[0],u[1]+o[1]];r[e]=c[0],r[e+1]=c[1]}return r}(r.texCoords.value,r.uvRegions.value)),r.positions.value=this._normalizePositions(d,i,o,s),r.normals&&!this._checkNormals(r.normals.value)&&delete r.normals;const p=n||this._generateSynteticIndices(d.length/f.size),m=a.addMesh({attributes:r,indices:p,material:h}),g=this._generateTransformMatrix(i),_=a.addNode({meshIndex:m,matrix:g}),b=a.addScene({nodeIndices:[_]});a.setDefaultScene(b),a.createBinaryChunk();return Object(l.encodeSync)(a.gltf,Zc)}async _addI3sTextureToGltf(t,e){const{content:{texture:r,material:n,attributes:i},header:{textureFormat:o}}=t;let s=null,a=r;if(!r&&n&&(a=n.pbrMetallicRoughness&&n.pbrMetallicRoughness.baseColorTexture&&n.pbrMetallicRoughness.baseColorTexture.texture.source.image),a){const t=this._deduceMimeTypeFromFormat(o),r=await Object(l.encode)(a,ol),n=e.addImage(r,t);s=e.addTexture({imageIndex:n}),delete i.colors}return s}_normalizePositions(t,e,r,n){const i=new Float32Array(t.length);for(let o=0;o<t.length;o+=3){const s=t.subarray(o,o+3),a=new st(e);let u=new st(Array.from(s)).transform(n).add(r);xt.WGS84.cartographicToCartesian(u,ul),u=ul.subtract(a),i.set(u,o)}return i}_generateTransformMatrix(t){return(new rt).translate(t).multiplyLeft(al)}_generateBatchId(t){const e=3*(t[t.length-1]+1),r=new Float32Array(e);let n=0,i=0;for(let e=0;e<t.length/2;e++){const e=3*t[n],o=3*(t[n+1]+1);r.fill(i,e,o),n+=2,i+=1}return r}_generateSynteticIndices(t){const e=new Uint32Array(t);for(let r=0;r<t;r++)e.set([r],r);return e}_deduceMimeTypeFromFormat(t){switch(t){case"jpg":return"image/jpeg";case"png":return"image/png";default:return console.warn("Unexpected texture format in I3S: "+t),"image/jpeg"}}_convertI3sMaterialToGltfMaterial(t,e){return t?(null!==e&&(t=this._setGltfTexture(t,e)),t):(t={alphaMode:"OPAQUE",doubleSided:!1,pbrMetallicRoughness:{metallicFactor:0,roughnessFactor:1}},null!==e?t.pbrMetallicRoughness.baseColorTexture={index:e,texCoord:0}:t.pbrMetallicRoughness.baseColorFactor=[1,1,1,1],t)}_setGltfTexture(t,e){const r={...t,pbrMetallicRoughness:{...t.pbrMetallicRoughness}};return t.pbrMetallicRoughness&&t.pbrMetallicRoughness.baseColorTexture?r.pbrMetallicRoughness.baseColorTexture={index:e,texCoord:0}:t.emissiveTexture?r.emissiveTexture={index:e,texCoord:0}:t.pbrMetallicRoughness&&t.pbrMetallicRoughness.metallicRoughnessTexture?r.pbrMetallicRoughness.metallicRoughnessTexture={index:e,texCoord:0}:t.normalTexture?r.normalTexture={index:e,texCoord:0}:t.occlusionTexture&&(r.occlusionTexture={index:e,texCoord:0}),r}_getFeaturesLength(t){if(!t)return 0;const e=Object.keys(t)[0];return e?t[e].length:0}_checkNormals(t){return t.find(t=>t)}}function ll(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}class hl{constructor(){ll(this,"options",void 0),ll(this,"tilesetPath",void 0),ll(this,"vertexCounter",void 0),ll(this,"conversionStartTime",void 0),ll(this,"geoidHeightModel",void 0),ll(this,"sourceTileset",void 0),ll(this,"attributeStorageInfo",void 0),this.options={},this.tilesetPath="",this.vertexCounter=0,this.conversionStartTime=[0,0],this.geoidHeightModel=null,this.sourceTileset=null,this.attributeStorageInfo=null}async convert(t){const{inputUrl:e,outputPath:r,tilesetName:n,maxDepth:i,egmFilePath:o}=t;this.conversionStartTime=ra.a.hrtime(),this.options={maxDepth:i},console.log("Loading egm file..."),this.geoidHeightModel=await Object(l.load)(o,iu),console.log("Loading egm file completed!");const s=await Object(l.load)(e,Nc,{});this.sourceTileset=new kr(s,{loadOptions:{i3s:{coordinateSystem:Ac}}}),this.sourceTileset.root.header.obb||(this.sourceTileset.root.header.obb=qa(this.sourceTileset.root.header.mbs)),this.tilesetPath=Object(Ks.join)(""+r,""+n),this.attributeStorageInfo=s.attributeStorageInfo;try{await Object(ca.b)(this.tilesetPath)}catch(t){}const a={boundingVolume:{box:zc(this.sourceTileset.root.header.obb,this.geoidHeightModel)},geometricError:Za(this.sourceTileset.root),children:[]};await this._addChildren(this.sourceTileset.root,a,1);const u=ia()({root:a},Kc);await Object(ca.d)(this.tilesetPath,JSON.stringify(u),"tileset.json"),this._finishConversion({slpk:!1,outputPath:r,tilesetName:n})}async _addChildren(t,e,r){if(!(this.options.maxDepth&&r>this.options.maxDepth))for(const n of t.header.children||[]){const i=await this._loadChildNode(t,n);if(t.children.push(i),i.contentUrl){await this.sourceTileset._loadTile(i),this.vertexCounter+=i.content.vertexCount;let t=null;this.attributeStorageInfo&&(t=await this._loadChildAttributes(i,this.attributeStorageInfo)),i.header.obb||(i.header.obb=qa(i.header.mbs));const n={box:zc(i.header.obb,this.geoidHeightModel)},o={boundingVolume:n,geometricError:Za(i),children:[]},s=await(new cl).convert(i,t);o.content={uri:i.id+".b3dm",boundingVolume:n},await Object(ca.d)(this.tilesetPath,new Uint8Array(s),i.id+".b3dm"),e.children.push(o),i.unloadContent(),await this._addChildren(i,o,r+1)}else await this._addChildren(i,e,r+1)}}async _loadChildNode(t,e){let r;if(this.sourceTileset.tileset.nodePages)console.log("Node conversion: "+e.id),r=await this.sourceTileset.tileset.nodePagesTile.formTileFromNodePages(e.id);else{const{loader:n}=this.sourceTileset,i=this._relativeUrlToFullUrl(t.url,e.href),o={i3s:{...this.sourceTileset.loadOptions,isTileHeader:!0,loadContent:!1}};console.log("Node conversion: "+i),r=await Object(l.load)(i,n,o)}return new Br(this.sourceTileset,r,t)}_relativeUrlToFullUrl(t,e){let r=t.split("/");const n=e.split("/");for(const t of n)switch(t){case".":continue;case"..":r=r.slice(0,-1);break;default:r.push(t)}return r.join("/")}async _loadChildAttributes(t,e){const r=[],{attributeUrls:n}=t.header;for(let t=0;t<n.length;t++){const i=n[t],o=e[t],s={attributeName:o.name,attributeType:this._getAttributeType(o)};r.push(Object(l.load)(i,Hc,s))}const i=await Promise.all(r);return this._replaceNestedArrays(i),Object.assign({},...i)}_getAttributeType(t){return t.attributeValues?t.attributeValues.valueType:t.objectIds?"Oid32":""}_replaceNestedArrays(t){for(let e=0;e<t.length;e++){const r=t[e];for(const t in r)r[t]=Array.from(r[t])}}async _finishConversion(t){const e=await da(t),r=fa(ra.a.hrtime(this.conversionStartTime));console.log("------------------------------------------------"),console.log("Finish conversion of I3S"),console.log("Total conversion time: "+r),console.log("Vertex count: ",this.vertexCounter),console.log("File(s) size: ",e," bytes"),console.log("------------------------------------------------")}}var fl=r(138)},function(t,e,r){"use strict";r.d(e,"a",(function(){return o}));var n=r(57),i=r.n(n);const o={id:"zip",module:"zip",name:"Zip Archive",version:"3.1.0-alpha.5",extensions:["zip"],mimeTypes:["application/zip"],category:"archive",tests:["PK"],options:{},parse:async function(t,e={}){const r=[],n={};try{const o=new i.a;return(await o.loadAsync(t,e)).forEach((t,i)=>{const s=i.name,a=async function(t,e,r={}){try{return await t.file(e).async(r.dataType||"arraybuffer")}catch(t){return r.log.error(`Unable to read ${e} from zip archive: ${t}`),t}}(o,s,e).then(e=>{n[t]=e});r.push(a)}),await Promise.all(r),n}catch(t){throw e.log.error("Unable to read zip archive: "+t),t}}}},function(t,e,r){"use strict";r.d(e,"a",(function(){return g}));var n=r(70);function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}const o="function"==typeof atob?atob:"function"==typeof Buffer?function(t){return Buffer.from(t,"base64").toString("binary")}:f,s=o("AGFzbQEAAAABDANgAX8AYAAAYAABfwIeAgdpbXBvcnRzA2xvZwAAB2ltcG9ydHMDbWVtAgABAzIxAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEAAAAAAAAAAAAAAAAAAAAAAgICAgIAAAAAAAaYARt/AUGBxpS6Bgt/AUGJ17b+fgt/AUH+uevFeQt/AUH2qMmBAQt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALfwFBAAt/AUEAC38BQQALB7oCJQhvbmVGdWxsQQAYCG9uZUZ1bGxCABkIb25lRnVsbEMAGghvbmVGdWxsRAAbBWxvb3BzAAEEbG9vcAACBXByaW1lAAMFbG9vcEEABAZsb29wQTEABQZsb29wQTIABgZsb29wQTMABwZsb29wQTQACAVsb29wQgAJBmxvb3BCMQAKBmxvb3BCMgALBmxvb3BCMwAMBmxvb3BCNAANBWxvb3BDAA4GbG9vcEMxAA8GbG9vcEMyABAGbG9vcEMzABEGbG9vcEM0ABIFbG9vcEQAEwZsb29wRDEAFAZsb29wRDIAFQZsb29wRDMAFgZsb29wRDQAFwRnZXRBACgEZ2V0QgApBGdldEMAKgRnZXREACsEZ2V0WAAsBHNldEEALQRzZXRCAC4Ec2V0QwAvBHNldEQAMARzZXRYADEKzA0xWwEBf0EAJAggAEEGdCEBAkADQCMIIAFGDQEjACQEIwEkBSMCJAYjAyQHEAIjBCMAaiQAIwUjAWokASMGIwJqJAIjByMDaiQDIwhBwABqJAgMAAsLIwgjGmokGgsTACMIIxpqJAkQAxAEEAkQDhATC6IBAEEAIwlqKAIAJApBBCMJaigCACQLQQgjCWooAgAkDEEMIwlqKAIAJA1BECMJaigCACQOQRQjCWooAgAkD0EYIwlqKAIAJBBBHCMJaigCACQRQSAjCWooAgAkEkEkIwlqKAIAJBNBKCMJaigCACQUQSwjCWooAgAkFUEwIwlqKAIAJBZBNCMJaigCACQXQTgjCWooAgAkGEE8IwlqKAIAJBkLCgAQBRAGEAcQCAsuAEH4yKq7fSMKahAYQdbunsZ+IwtqEBtB2+GBoQIjDGoQGkHunfeNfCMNahAZCy0AQa+f8Kt/Iw5qEBhBqoyfvAQjD2oQG0GTjMHBeiMQahAaQYGqmmojEWoQGQssAEHYsYLMBiMSahAYQa/vk9p4IxNqEBtBsbd9IxRqEBpBvq/zyngjFWoQGQstAEGiosDcBiMWahAYQZPj4WwjF2oQG0GOh+WzeiMYahAaQaGQ0M0EIxlqEBkLCgAQChALEAwQDQsuAEHiyviwfyMLahAcQcDmgoJ8IxBqEB9B0bT5sgIjFWoQHkGqj9vNfiMKahAdCy0AQd2gvLF9Iw9qEBxB06iQEiMUahAfQYHNh8V9IxlqEB5ByPfPvn4jDmoQHQsuAEHmm4ePAiMTahAcQdaP3Jl8IxhqEB9Bh5vUpn8jDWoQHkHtqeiqBCMSahAdCy0AQYXSj896IxdqEBxB+Me+ZyMMahAfQdmFvLsGIxFqEB5Bipmp6XgjFmoQHQsKABAPEBAQERASCysAQcLyaCMPahAgQYHtx7t4IxJqECNBosL17AYjFWoQIkGM8JRvIxhqECELLgBBxNT7pXojC2oQIEGpn/veBCMOahAjQeCW7bV/IxFqECJB8Pj+9XsjFGoQIQstAEHG/e3EAiMXahAgQfrPhNV+IwpqECNBheG8p30jDWoQIkGFuqAkIxBqECELLgBBuaDTzn0jE2oQIEHls+62fiMWahAjQfj5if0BIxlqECJB5ayxpXwjDGoQIQsKABAUEBUQFhAXCy0AQcTEpKF/IwpqECRBl/+rmQQjEWoQJ0Gnx9DceiMYahAmQbnAzmQjD2oQJQstAEHDs+2qBiMWahAkQZKZs/h4Iw1qECdB/ei/fyMUahAmQdG7kax4IwtqECULLQBBz/yh/QYjEmoQJEHgzbNxIxlqECdBlIaFmHojEGoQJkGho6DwBCMXahAlCy4AQYL9zbp/Iw5qECRBteTr6XsjFWoQJ0G7pd/WAiMMahAmQZGnm9x+IxNqECULKAEBf0F/IwFzIwNxIwEjAnFyIwBqIABqIgFBB3QgAUEZdnIjAWokAAsoAQF/QX8jAnMjAHEjAiMDcXIjAWogAGoiAUEWdCABQQp2ciMCaiQBCygBAX9BfyMDcyMBcSMDIwBxciMCaiAAaiIBQRF0IAFBD3ZyIwNqJAILKAEBf0F/IwBzIwJxIwAjAXFyIwNqIABqIgFBDHQgAUEUdnIjAGokAwsoAQF/IwJBfyMDc3EjASMDcXIjAGogAGoiAUEFdCABQRt2ciMBaiQACygBAX8jA0F/IwBzcSMCIwBxciMBaiAAaiIBQRR0IAFBDHZyIwJqJAELKAEBfyMAQX8jAXNxIwMjAXFyIwJqIABqIgFBDnQgAUESdnIjA2okAgsoAQF/IwFBfyMCc3EjACMCcXIjA2ogAGoiAUEJdCABQRd2ciMAaiQDCyIBAX8jASMCcyMDcyMAaiAAaiIBQQR0IAFBHHZyIwFqJAALIgEBfyMCIwNzIwBzIwFqIABqIgFBF3QgAUEJdnIjAmokAQsiAQF/IwMjAHMjAXMjAmogAGoiAUEQdCABQRB2ciMDaiQCCyIBAX8jACMBcyMCcyMDaiAAaiIBQQt0IAFBFXZyIwBqJAMLJQEBf0F/IwNzIwFyIwJzIwBqIABqIgFBBnQgAUEadnIjAWokAAslAQF/QX8jAHMjAnIjA3MjAWogAGoiAUEVdCABQQt2ciMCaiQBCyUBAX9BfyMBcyMDciMAcyMCaiAAaiIBQQ90IAFBEXZyIwNqJAILJQEBf0F/IwJzIwByIwFzIwNqIABqIgFBCnQgAUEWdnIjAGokAwsEACMACwQAIwELBAAjAgsEACMDCwQAIxoLBgAgACQACwYAIAAkAQsGACAAJAILBgAgACQDCwYAIAAkGgsA6gQEbmFtZQGSAzIAA2xvZwEFbG9vcHMCBGxvb3ADBXByaW1lBAVsb29wQQUGbG9vcEExBgZsb29wQTIHBmxvb3BBMwgGbG9vcEE0CQVsb29wQgoGbG9vcEIxCwZsb29wQjIMBmxvb3BCMw0GbG9vcEI0DgVsb29wQw8GbG9vcEMxEAZsb29wQzIRBmxvb3BDMxIGbG9vcEM0EwVsb29wRBQGbG9vcEQxFQZsb29wRDIWBmxvb3BEMxcGbG9vcEQ0GAhvbmVGdWxsQRkIb25lRnVsbEIaCG9uZUZ1bGxDGwhvbmVGdWxsRBwIdHdvRnVsbEEdCHR3b0Z1bGxCHgh0d29GdWxsQx8IdHdvRnVsbEQgCHRyZUZ1bGxBIQh0cmVGdWxsQiIIdHJlRnVsbEMjCHRyZUZ1bGxEJAhxdWFGdWxsQSUIcXVhRnVsbEImCHF1YUZ1bGxDJwhxdWFGdWxsRCgEZ2V0QSkEZ2V0QioEZ2V0QysEZ2V0RCwEZ2V0WC0Ec2V0QS4Ec2V0Qi8Ec2V0QzAEc2V0RDEEc2V0WALNATIAAQAAAQIAAAEIbnVtbG9vcHMCAAMABAAFAAYABwAIAAkACgALAAwADQAOAA8AEAARABIAEwAUABUAFgAXABgCAAABAW4ZAgAAAQFuGgIAAAEBbhsCAAABAW4cAgAAAQFuHQIAAAEBbh4CAAABAW4fAgAAAQFuIAIAAAEBbiECAAABAW4iAgAAAQFuIwIAAAEBbiQCAAABAW4lAgAAAQFuJgIAAAEBbicCAAABAW4oACkAKgArACwALQEAAC4BAAAvAQAAMAEAADEBAAA="),a=!(!WebAssembly||o===f)&&function(t){var e,r,n,i=-1;e=t.length-1,r=new ArrayBuffer(t.length),n=new Uint8Array(r);for(;e>i++;)n[i]=t.charCodeAt(i);return n}(s).buffer,u={rotl:function(t,e){return t<<e|t>>>32-e},endian:function(t){if(t.constructor==Number)return 16711935&u.rotl(t,8)|4278255360&u.rotl(t,24);for(var e=0;e<t.length;e++)t[e]=u.endian(t[e]);return t},bytesToWords:function(t){for(var e=[],r=0,n=0;r<t.length;r++,n+=8)e[n>>>5]|=t[r]<<24-n%32;return e},wordsToBytes:function(t){for(var e=[],r=0;r<32*t.length;r+=8)e.push(t[r>>>5]>>>24-r%32&255);return e},bytesToHex:function(t){for(var e=[],r=0;r<t.length;r++)e.push((t[r]>>>4).toString(16)),e.push((15&t[r]).toString(16));return e.join("")}},c=Math.floor(1048576.00032768),l="Parameter must be Buffer, ArrayBuffer or Uint8Array";function h(t){var e,r,n,i,o,s,h,f,d;const p=function(t,e){var r=u.wordsToBytes(function(t,e){(new Date).getTime();var r,n,i,o,s,a,c,l,h,f,d,p,m,g,_,b,y,w,v,A,E,S=1732584193,B=-271733879,C=-1732584194,T=271733878,R=8*t.length;E=u.bytesToWords(t);for(var O=0;O<E.length;O++)E[O]=16711935&(E[O]<<8|E[O]>>>24)|4278255360&(E[O]<<24|E[O]>>>8);E[R>>>5]|=128<<R%32,E[14+(R+64>>>9<<4)]=R;for(var I=0;I<E.length;I+=16)y=S,w=B,v=C,A=T,r=E[I+0]>>>0,n=E[I+1]>>>0,i=E[I+2]>>>0,o=E[I+3]>>>0,s=E[I+4]>>>0,a=E[I+5]>>>0,c=E[I+6]>>>0,l=E[I+7]>>>0,h=E[I+8]>>>0,f=E[I+9]>>>0,d=E[I+10]>>>0,p=E[I+11]>>>0,m=E[I+12]>>>0,g=E[I+13]>>>0,_=E[I+14]>>>0,b=E[I+15]>>>0,S=M(7,25,S+(B&C|~B&T)+r-680876936)+B,T=M(12,20,T+(S&B|~S&C)+n-389564586)+S,C=M(17,15,C+(T&S|~T&B)+i+606105819)+T,B=M(22,10,B+(C&T|~C&S)+o-1044525330)+C,S=M(7,25,S+(B&C|~B&T)+s-176418897)+B,T=M(12,20,T+(S&B|~S&C)+a+1200080426)+S,C=M(17,15,C+(T&S|~T&B)+c-1473231341)+T,B=M(22,10,B+(C&T|~C&S)+l-45705983)+C,S=M(7,25,S+(B&C|~B&T)+h+1770035416)+B,T=M(12,20,T+(S&B|~S&C)+f-1958414417)+S,C=M(17,15,C+(T&S|~T&B)+d-42063)+T,B=M(22,10,B+(C&T|~C&S)+p-1990404162)+C,S=M(7,25,S+(B&C|~B&T)+m+1804603682)+B,T=M(12,20,T+(S&B|~S&C)+g-40341101)+S,C=M(17,15,C+(T&S|~T&B)+_-1502002290)+T,B=M(22,10,B+(C&T|~C&S)+b+1236535329)+C,S=M(5,27,S+(B&T|C&~T)+n-165796510)+B,T=M(9,23,T+(S&C|B&~C)+c-1069501632)+S,C=M(14,18,C+(T&B|S&~B)+p+643717713)+T,B=M(20,12,B+(C&S|T&~S)+r-373897302)+C,S=M(5,27,S+(B&T|C&~T)+a-701558691)+B,T=M(9,23,T+(S&C|B&~C)+d+38016083)+S,C=M(14,18,C+(T&B|S&~B)+b-660478335)+T,B=M(20,12,B+(C&S|T&~S)+s-405537848)+C,S=M(5,27,S+(B&T|C&~T)+f+568446438)+B,T=M(9,23,T+(S&C|B&~C)+_-1019803690)+S,C=M(14,18,C+(T&B|S&~B)+o-187363961)+T,B=M(20,12,B+(C&S|T&~S)+h+1163531501)+C,S=M(5,27,S+(B&T|C&~T)+g-1444681467)+B,T=M(9,23,T+(S&C|B&~C)+i-51403784)+S,C=M(14,18,C+(T&B|S&~B)+l+1735328473)+T,B=M(20,12,B+(C&S|T&~S)+m-1926607734)+C,S=M(4,28,S+(B^C^T)+a-378558)+B,T=M(11,21,T+(S^B^C)+h-2022574463)+S,C=M(16,16,C+(T^S^B)+p+1839030562)+T,B=M(23,9,B+(C^T^S)+_-35309556)+C,S=M(4,28,S+(B^C^T)+n-1530992060)+B,T=M(11,21,T+(S^B^C)+s+1272893353)+S,C=M(16,16,C+(T^S^B)+l-155497632)+T,B=M(23,9,B+(C^T^S)+d-1094730640)+C,S=M(4,28,S+(B^C^T)+g+681279174)+B,T=M(11,21,T+(S^B^C)+r-358537222)+S,C=M(16,16,C+(T^S^B)+o-722521979)+T,B=M(23,9,B+(C^T^S)+c+76029189)+C,S=M(4,28,S+(B^C^T)+f-640364487)+B,T=M(11,21,T+(S^B^C)+m-421815835)+S,C=M(16,16,C+(T^S^B)+b+530742520)+T,B=M(23,9,B+(C^T^S)+i-995338651)+C,S=M(6,26,S+(C^(B|~T))+r-198630844)+B,T=M(10,22,T+(B^(S|~C))+l+1126891415)+S,C=M(15,17,C+(S^(T|~B))+_-1416354905)+T,B=M(21,11,B+(T^(C|~S))+a-57434055)+C,S=M(6,26,S+(C^(B|~T))+m+1700485571)+B,T=M(10,22,T+(B^(S|~C))+o-1894986606)+S,C=M(15,17,C+(S^(T|~B))+d-1051523)+T,B=M(21,11,B+(T^(C|~S))+n-2054922799)+C,S=M(6,26,S+(C^(B|~T))+h+1873313359)+B,T=M(10,22,T+(B^(S|~C))+b-30611744)+S,C=M(15,17,C+(S^(T|~B))+c-1560198380)+T,B=M(21,11,B+(T^(C|~S))+g+1309151649)+C,S=M(6,26,S+(C^(B|~T))+s-145523070)+B,T=M(10,22,T+(B^(S|~C))+p-1120210379)+S,C=M(15,17,C+(S^(T|~B))+i+718787259)+T,B=M(21,11,B+(T^(C|~S))+f-343485551)+C,S=S+y>>>0,B=B+w>>>0,C=C+v>>>0,T=T+A>>>0;return u.endian([S,B,C,T]);function M(t,e,r){return r<<t|r>>>e}}(t));return e&&e.asBytes?r:u.bytesToHex(r)},m=function(){var t,e,r,n,i,o,s,a,l,h;return function(f,d,p,m){var g;return t=d.loops,d.loop,e=d.getA,n=d.getB,o=d.getC,a=d.getD,d.getX,r=d.setA,i=d.setB,s=d.setC,l=d.setD,d.setX,h=p,g=u.wordsToBytes(function(f){(new Date).getTime();var d,p,m,g,_,b,y,w,v,A,E,S,B,C,T,R,O,I,M,x,D,k,P=1732584193,L=-271733879,F=-1732584194,N=271733878,U=0,G=8*f.length;for(function(t,e){var r,n,i,o,s=-1,a=Math.floor((t.length-1)/4),u=0;for(;a-8>s++;)u=s<<2,e[s]=t[u+0]|t[u+1]<<8|t[u+2]<<16|t[u+3]<<24;s--;for(;a>s++;)r=void 0===t[(u=s<<2)+0]?0:t[u+0],n=void 0===t[u+1]?0:t[u+1],i=void 0===t[u+2]?0:t[u+2],o=void 0===t[u+3]?0:t[u+3],e[s]=r|n<<8|i<<16|o<<24;return a+1}(f,h),h[G>>>5]|=128<<G%32,h[14+(G+64>>>9<<4)]=G,k=15+(G+64>>>9<<4),D=h;U<k;)k>U+c?(r(P),i(L),s(F),l(N),t(61440),U+=983040,P=e(),L=n(),F=o(),N=a()):(O=P,I=L,M=F,x=N,d=D[U+0]>>>0,p=D[U+1]>>>0,m=D[U+2]>>>0,g=D[U+3]>>>0,_=D[U+4]>>>0,b=D[U+5]>>>0,y=D[U+6]>>>0,w=D[U+7]>>>0,v=D[U+8]>>>0,A=D[U+9]>>>0,E=D[U+10]>>>0,S=D[U+11]>>>0,B=D[U+12]>>>0,C=D[U+13]>>>0,T=D[U+14]>>>0,R=D[U+15]>>>0,P=j(7,25,P+(L&F|~L&N)+d-680876936)+L,N=j(12,20,N+(P&L|~P&F)+p-389564586)+P,F=j(17,15,F+(N&P|~N&L)+m+606105819)+N,L=j(22,10,L+(F&N|~F&P)+g-1044525330)+F,P=j(7,25,P+(L&F|~L&N)+_-176418897)+L,N=j(12,20,N+(P&L|~P&F)+b+1200080426)+P,F=j(17,15,F+(N&P|~N&L)+y-1473231341)+N,L=j(22,10,L+(F&N|~F&P)+w-45705983)+F,P=j(7,25,P+(L&F|~L&N)+v+1770035416)+L,N=j(12,20,N+(P&L|~P&F)+A-1958414417)+P,F=j(17,15,F+(N&P|~N&L)+E-42063)+N,L=j(22,10,L+(F&N|~F&P)+S-1990404162)+F,P=j(7,25,P+(L&F|~L&N)+B+1804603682)+L,N=j(12,20,N+(P&L|~P&F)+C-40341101)+P,F=j(17,15,F+(N&P|~N&L)+T-1502002290)+N,L=j(22,10,L+(F&N|~F&P)+R+1236535329)+F,P=j(5,27,P+(L&N|F&~N)+p-165796510)+L,N=j(9,23,N+(P&F|L&~F)+y-1069501632)+P,F=j(14,18,F+(N&L|P&~L)+S+643717713)+N,L=j(20,12,L+(F&P|N&~P)+d-373897302)+F,P=j(5,27,P+(L&N|F&~N)+b-701558691)+L,N=j(9,23,N+(P&F|L&~F)+E+38016083)+P,F=j(14,18,F+(N&L|P&~L)+R-660478335)+N,L=j(20,12,L+(F&P|N&~P)+_-405537848)+F,P=j(5,27,P+(L&N|F&~N)+A+568446438)+L,N=j(9,23,N+(P&F|L&~F)+T-1019803690)+P,F=j(14,18,F+(N&L|P&~L)+g-187363961)+N,L=j(20,12,L+(F&P|N&~P)+v+1163531501)+F,P=j(5,27,P+(L&N|F&~N)+C-1444681467)+L,N=j(9,23,N+(P&F|L&~F)+m-51403784)+P,F=j(14,18,F+(N&L|P&~L)+w+1735328473)+N,L=j(20,12,L+(F&P|N&~P)+B-1926607734)+F,P=j(4,28,P+(L^F^N)+b-378558)+L,N=j(11,21,N+(P^L^F)+v-2022574463)+P,F=j(16,16,F+(N^P^L)+S+1839030562)+N,L=j(23,9,L+(F^N^P)+T-35309556)+F,P=j(4,28,P+(L^F^N)+p-1530992060)+L,N=j(11,21,N+(P^L^F)+_+1272893353)+P,F=j(16,16,F+(N^P^L)+w-155497632)+N,L=j(23,9,L+(F^N^P)+E-1094730640)+F,P=j(4,28,P+(L^F^N)+C+681279174)+L,N=j(11,21,N+(P^L^F)+d-358537222)+P,F=j(16,16,F+(N^P^L)+g-722521979)+N,L=j(23,9,L+(F^N^P)+y+76029189)+F,P=j(4,28,P+(L^F^N)+A-640364487)+L,N=j(11,21,N+(P^L^F)+B-421815835)+P,F=j(16,16,F+(N^P^L)+R+530742520)+N,L=j(23,9,L+(F^N^P)+m-995338651)+F,P=j(6,26,P+(F^(L|~N))+d-198630844)+L,N=j(10,22,N+(L^(P|~F))+w+1126891415)+P,F=j(15,17,F+(P^(N|~L))+T-1416354905)+N,L=j(21,11,L+(N^(F|~P))+b-57434055)+F,P=j(6,26,P+(F^(L|~N))+B+1700485571)+L,N=j(10,22,N+(L^(P|~F))+g-1894986606)+P,F=j(15,17,F+(P^(N|~L))+E-1051523)+N,L=j(21,11,L+(N^(F|~P))+p-2054922799)+F,P=j(6,26,P+(F^(L|~N))+v+1873313359)+L,N=j(10,22,N+(L^(P|~F))+R-30611744)+P,F=j(15,17,F+(P^(N|~L))+y-1560198380)+N,L=j(21,11,L+(N^(F|~P))+C+1309151649)+F,P=j(6,26,P+(F^(L|~N))+_-145523070)+L,N=j(10,22,N+(L^(P|~F))+S-1120210379)+P,F=j(15,17,F+(P^(N|~L))+m+718787259)+N,L=j(21,11,L+(N^(F|~P))+A-343485551)+F,U+=16,P=P+O>>>0,L=L+I>>>0,F=F+M>>>0,N=N+x>>>0);return u.endian([P,L,F,N]);function j(t,e,r){return r<<t|r>>>e}}(f)),m&&m.asBytes?g:u.bytesToHex(g)}}(),g={},_=(new Date).getTime();return g.then=function(t){return s=t,b(),g},g.catch=function(t){return h=t,g},t&&"object"==typeof t?"function"==typeof Buffer&&t.constructor===Buffer?o=t:t.constructor===Uint8Array||t.constructor===ArrayBuffer?o=t.constructor===ArrayBuffer?new Uint8Array(t):t:y(new TypeError(l)):y(new TypeError(l)),o&&(i=o.length,a&&i>c?i>268369920?y(new Error("Parameter exceeds max size of 255.9 Mbytes")):(e=new WebAssembly.Memory({initial:i>32e6?i>64e6?i>128e6?4096:2048:1024:512}),r=new Uint32Array(e.buffer),n={imports:{mem:e,log:console.log}},WebAssembly.instantiate(a,n).then((function(t){b(m(o,t.instance.exports,r))}))):b(p(o))),g;function b(t){var e=Boolean(t)?t:f;Boolean(t)&&(d=(new Date).getTime()),"function"==typeof s?Boolean(e)&&(s(e,d-_),s=h=null):Boolean(t)&&(f=t)}function y(t){"function"==typeof h&&h(t)}}function f(t){return t}function d(t){return t<26?String.fromCharCode(t+"A".charCodeAt(0)):t<52?String.fromCharCode(t-26+"a".charCodeAt(0)):t<62?String.fromCharCode(t-52+"0".charCodeAt(0)):62===t?"+":63===t?"/":void 0}function p(t){t.length%2!=0&&(t="0"+t);return function(t){t=""+t;for(let e=0;e<t.length;e++)if(t.charCodeAt(e)>255)return null;let e="";for(let r=0;r<t.length;r+=3){const n=[void 0,void 0,void 0,void 0];n[0]=t.charCodeAt(r)>>2,n[1]=(3&t.charCodeAt(r))<<4,t.length>r+1&&(n[1]|=t.charCodeAt(r+1)>>4,n[2]=(15&t.charCodeAt(r+1))<<2),t.length>r+2&&(n[2]|=t.charCodeAt(r+2)>>6,n[3]=63&t.charCodeAt(r+2));for(let t=0;t<n.length;t++)void 0===n[t]?e+="=":e+=d(n[t])}return e}(t.match(/\w{2}/g).map(t=>String.fromCharCode(parseInt(t,16))).join(""))}function m(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}a||console.log("WebAssembly not available or WASM module could not be decoded; md5WASM will fall back to JavaScript");class g extends class{constructor(t={}){i(this,"name",void 0),i(this,"options",void 0),this.hashBatches=this.hashBatches.bind(this)}async preload(){}async*hashBatches(t){var e,r,n;const i=[];for await(const e of t)i.push(e),yield e;const o=await this.concatenate(i),s=await this.hash(o);null===(e=this.options)||void 0===e||null===(r=e.crypto)||void 0===r||null===(n=r.onEnd)||void 0===n||n.call(r,{hash:s})}async concatenate(t){return await Object(n.a)(t)}}{constructor(t={}){super(),m(this,"name","md5"),m(this,"options",void 0),this.options=t}async hash(t){const e=new Promise((e,r)=>h(t).then(e).catch(r));return p(await e)}}}])}));
|
|
94
|
-
//# sourceMappingURL=dist.min.js.map
|