mirror of
https://github.com/gchq/CyberChef.git
synced 2026-03-03 05:54:28 +01:00
2 lines
1.3 MiB
Executable File
2 lines
1.3 MiB
Executable File
/*! For license information please see Image.js.LICENSE.txt */
|
||
(()=>{var __webpack_modules__={94148(e,t,r){"use strict";var n=r(65606);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function o(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e){var t=function(e){if("object"!==i(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(t)?t:String(t)}var u,l,c=r(69597).codes,f=c.ERR_AMBIGUOUS_ARGUMENT,h=c.ERR_INVALID_ARG_TYPE,d=c.ERR_INVALID_ARG_VALUE,p=c.ERR_INVALID_RETURN_VALUE,m=c.ERR_MISSING_ARGS,g=r(3918),b=r(94591).inspect,y=r(94591).types,_=y.isPromise,v=y.isRegExp,w=r(11514)(),x=r(9394)(),k=r(38075)("RegExp.prototype.test");function B(){var e=r(82299);u=e.isDeepEqual,l=e.isDeepStrictEqual}new Map;var E=!1,S=e.exports=P,A={};function C(e){if(e.message instanceof Error)throw e.message;throw new g(e)}function I(e,t,r,n){if(!r){var i=!1;if(0===t)i=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var a=new g({actual:r,expected:!0,message:n,operator:"==",stackStartFn:e});throw a.generatedMessage=i,a}}function P(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];I.apply(void 0,[P,t.length].concat(t))}S.fail=function e(t,r,i,a,o){var s,u=arguments.length;if(0===u?s="Failed":1===u?(i=t,t=void 0):(!1===E&&(E=!0,(n.emitWarning?n.emitWarning:console.warn.bind(console))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")),2===u&&(a="!=")),i instanceof Error)throw i;var l={actual:t,expected:r,operator:void 0===a?"fail":a,stackStartFn:o||e};void 0!==i&&(l.message=i);var c=new g(l);throw s&&(c.message=s,c.generatedMessage=!0),c},S.AssertionError=g,S.ok=P,S.equal=function e(t,r,n){if(arguments.length<2)throw new m("actual","expected");t!=r&&C({actual:t,expected:r,message:n,operator:"==",stackStartFn:e})},S.notEqual=function e(t,r,n){if(arguments.length<2)throw new m("actual","expected");t==r&&C({actual:t,expected:r,message:n,operator:"!=",stackStartFn:e})},S.deepEqual=function e(t,r,n){if(arguments.length<2)throw new m("actual","expected");void 0===u&&B(),u(t,r)||C({actual:t,expected:r,message:n,operator:"deepEqual",stackStartFn:e})},S.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new m("actual","expected");void 0===u&&B(),u(t,r)&&C({actual:t,expected:r,message:n,operator:"notDeepEqual",stackStartFn:e})},S.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new m("actual","expected");void 0===u&&B(),l(t,r)||C({actual:t,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:e})},S.notDeepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new m("actual","expected");void 0===u&&B(),l(t,r)&&C({actual:t,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:e})},S.strictEqual=function e(t,r,n){if(arguments.length<2)throw new m("actual","expected");x(t,r)||C({actual:t,expected:r,message:n,operator:"strictEqual",stackStartFn:e})},S.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new m("actual","expected");x(t,r)&&C({actual:t,expected:r,message:n,operator:"notStrictEqual",stackStartFn:e})};var T=o(function e(t,r,n){var i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r.forEach(function(e){e in t&&(void 0!==n&&"string"==typeof n[e]&&v(t[e])&&k(t[e],n[e])?i[e]=n[e]:i[e]=t[e])})});function M(e,t,r,n){if("function"!=typeof t){if(v(t))return k(t,e);if(2===arguments.length)throw new h("expected",["Function","RegExp"],t);if("object"!==i(e)||null===e){var a=new g({actual:e,expected:t,message:r,operator:"deepStrictEqual",stackStartFn:n});throw a.operator=n.name,a}var o=Object.keys(t);if(t instanceof Error)o.push("name","message");else if(0===o.length)throw new d("error",t,"may not be an empty object");return void 0===u&&B(),o.forEach(function(i){"string"==typeof e[i]&&v(t[i])&&k(t[i],e[i])||function(e,t,r,n,i,a){if(!(r in e)||!l(e[r],t[r])){if(!n){var o=new T(e,i),s=new T(t,i,e),u=new g({actual:o,expected:s,operator:"deepStrictEqual",stackStartFn:a});throw u.actual=e,u.expected=t,u.operator=a.name,u}C({actual:e,expected:t,message:n,operator:a.name,stackStartFn:a})}}(e,t,i,r,o,n)}),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function R(e){if("function"!=typeof e)throw new h("fn","Function",e);try{e()}catch(e){return e}return A}function F(e){return _(e)||null!==e&&"object"===i(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function O(e){return Promise.resolve().then(function(){var t;if("function"==typeof e){if(!F(t=e()))throw new p("instance of Promise","promiseFn",t)}else{if(!F(e))throw new h("promiseFn",["Function","Promise"],e);t=e}return Promise.resolve().then(function(){return t}).then(function(){return A}).catch(function(e){return e})})}function N(e,t,r,n){if("string"==typeof r){if(4===arguments.length)throw new h("error",["Object","Error","Function","RegExp"],r);if("object"===i(t)&&null!==t){if(t.message===r)throw new f("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===r)throw new f("error/message",'The error "'.concat(t,'" is identical to the message.'));n=r,r=void 0}else if(null!=r&&"object"!==i(r)&&"function"!=typeof r)throw new h("error",["Object","Error","Function","RegExp"],r);if(t===A){var a="";r&&r.name&&(a+=" (".concat(r.name,")")),a+=n?": ".concat(n):".";var o="rejects"===e.name?"rejection":"exception";C({actual:void 0,expected:r,operator:e.name,message:"Missing expected ".concat(o).concat(a),stackStartFn:e})}if(r&&!M(t,r,n,e))throw t}function L(e,t,r,n){if(t!==A){if("string"==typeof r&&(n=r,r=void 0),!r||M(t,r)){var i=n?": ".concat(n):".",a="doesNotReject"===e.name?"rejection":"exception";C({actual:t,expected:r,operator:e.name,message:"Got unwanted ".concat(a).concat(i,"\n")+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}function D(e,t,r,n,a){if(!v(t))throw new h("regexp","RegExp",t);var o="match"===a;if("string"!=typeof e||k(t,e)!==o){if(r instanceof Error)throw r;var s=!r;r=r||("string"!=typeof e?'The "string" argument must be of type string. Received type '+"".concat(i(e)," (").concat(b(e),")"):(o?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(b(t),". Input:\n\n").concat(b(e),"\n"));var u=new g({actual:e,expected:t,message:r,operator:a,stackStartFn:n});throw u.generatedMessage=s,u}}function z(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];I.apply(void 0,[z,t.length].concat(t))}S.throws=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];N.apply(void 0,[e,R(t)].concat(n))},S.rejects=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return O(t).then(function(t){return N.apply(void 0,[e,t].concat(n))})},S.doesNotThrow=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];L.apply(void 0,[e,R(t)].concat(n))},S.doesNotReject=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return O(t).then(function(t){return L.apply(void 0,[e,t].concat(n))})},S.ifError=function e(t){if(null!=t){var r="ifError got unwanted exception: ";"object"===i(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?r+=t.constructor.name:r+=t.message:r+=b(t);var n=new g({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),a=t.stack;if("string"==typeof a){var o=a.split("\n");o.shift();for(var s=n.stack.split("\n"),u=0;u<o.length;u++){var l=s.indexOf(o[u]);if(-1!==l){s=s.slice(0,l);break}}n.stack="".concat(s.join("\n"),"\n").concat(o.join("\n"))}throw n}},S.match=function e(t,r,n){D(t,r,n,e,"match")},S.doesNotMatch=function e(t,r,n){D(t,r,n,e,"doesNotMatch")},S.strict=w(z,S,{equal:S.strictEqual,deepEqual:S.deepStrictEqual,notEqual:S.notStrictEqual,notDeepEqual:S.notDeepStrictEqual}),S.strict.strict=S.strict},3918(e,t,r){"use strict";var n=r(65606);function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach(function(t){var n,i,a;n=e,i=t,a=r[t],(i=s(i))in n?Object.defineProperty(n,i,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[i]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e){if("object"!==m(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===m(t)?t:String(t)}function u(e,t){if(t&&("object"===m(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return l(e)}function l(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c(e){var t="function"==typeof Map?new Map:void 0;return c=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return f(e,arguments,p(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),d(n,e)},c(e)}function f(e,t,r){return f=h()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&d(i,r.prototype),i},f.apply(null,arguments)}function h(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}var g=r(94591).inspect,b=r(69597).codes.ERR_INVALID_ARG_TYPE;function y(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var _="",v="",w="",x="",k={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function B(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(t){r[t]=e[t]}),Object.defineProperty(r,"message",{value:e.message}),r}function E(e){return g(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var S=function(e,t){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(S,e);var r,i,s,c,f=(r=S,i=h(),function(){var e,t=p(r);if(i){var n=p(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return u(this,e)});function S(e){var t;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,S),"object"!==m(e)||null===e)throw new b("options","Object",e);var r=e.message,i=e.operator,a=e.stackStartFn,o=e.actual,s=e.expected,c=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)t=f.call(this,String(r));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(_="[34m",v="[32m",x="[39m",w="[31m"):(_="",v="",x="",w="")),"object"===m(o)&&null!==o&&"object"===m(s)&&null!==s&&"stack"in o&&o instanceof Error&&"stack"in s&&s instanceof Error&&(o=B(o),s=B(s)),"deepStrictEqual"===i||"strictEqual"===i)t=f.call(this,function(e,t,r){var i="",a="",o=0,s="",u=!1,l=E(e),c=l.split("\n"),f=E(t).split("\n"),h=0,d="";if("strictEqual"===r&&"object"===m(e)&&"object"===m(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===c.length&&1===f.length&&c[0]!==f[0]){var p=c[0].length+f[0].length;if(p<=10){if(!("object"===m(e)&&null!==e||"object"===m(t)&&null!==t||0===e&&0===t))return"".concat(k[r],"\n\n")+"".concat(c[0]," !== ").concat(f[0],"\n")}else if("strictEqualObject"!==r&&p<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;c[0][h]===f[0][h];)h++;h>2&&(d="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",h),"^"),h=0)}}for(var g=c[c.length-1],b=f[f.length-1];g===b&&(h++<2?s="\n ".concat(g).concat(s):i=g,c.pop(),f.pop(),0!==c.length&&0!==f.length);)g=c[c.length-1],b=f[f.length-1];var B=Math.max(c.length,f.length);if(0===B){var S=l.split("\n");if(S.length>30)for(S[26]="".concat(_,"...").concat(x);S.length>27;)S.pop();return"".concat(k.notIdentical,"\n\n").concat(S.join("\n"),"\n")}h>3&&(s="\n".concat(_,"...").concat(x).concat(s),u=!0),""!==i&&(s="\n ".concat(i).concat(s),i="");var A=0,C=k[r]+"\n".concat(v,"+ actual").concat(x," ").concat(w,"- expected").concat(x),I=" ".concat(_,"...").concat(x," Lines skipped");for(h=0;h<B;h++){var P=h-o;if(c.length<h+1)P>1&&h>2&&(P>4?(a+="\n".concat(_,"...").concat(x),u=!0):P>3&&(a+="\n ".concat(f[h-2]),A++),a+="\n ".concat(f[h-1]),A++),o=h,i+="\n".concat(w,"-").concat(x," ").concat(f[h]),A++;else if(f.length<h+1)P>1&&h>2&&(P>4?(a+="\n".concat(_,"...").concat(x),u=!0):P>3&&(a+="\n ".concat(c[h-2]),A++),a+="\n ".concat(c[h-1]),A++),o=h,a+="\n".concat(v,"+").concat(x," ").concat(c[h]),A++;else{var T=f[h],M=c[h],R=M!==T&&(!y(M,",")||M.slice(0,-1)!==T);R&&y(T,",")&&T.slice(0,-1)===M&&(R=!1,M+=","),R?(P>1&&h>2&&(P>4?(a+="\n".concat(_,"...").concat(x),u=!0):P>3&&(a+="\n ".concat(c[h-2]),A++),a+="\n ".concat(c[h-1]),A++),o=h,a+="\n".concat(v,"+").concat(x," ").concat(M),i+="\n".concat(w,"-").concat(x," ").concat(T),A+=2):(a+=i,i="",1!==P&&0!==h||(a+="\n ".concat(M),A++))}if(A>20&&h<B-2)return"".concat(C).concat(I,"\n").concat(a,"\n").concat(_,"...").concat(x).concat(i,"\n")+"".concat(_,"...").concat(x)}return"".concat(C).concat(u?I:"","\n").concat(a).concat(i).concat(s).concat(d)}(o,s,i));else if("notDeepStrictEqual"===i||"notStrictEqual"===i){var h=k[i],d=E(o).split("\n");if("notStrictEqual"===i&&"object"===m(o)&&null!==o&&(h=k.notStrictEqualObject),d.length>30)for(d[26]="".concat(_,"...").concat(x);d.length>27;)d.pop();t=1===d.length?f.call(this,"".concat(h," ").concat(d[0])):f.call(this,"".concat(h,"\n\n").concat(d.join("\n"),"\n"))}else{var p=E(o),g="",A=k[i];"notDeepEqual"===i||"notEqual"===i?(p="".concat(k[i],"\n\n").concat(p)).length>1024&&(p="".concat(p.slice(0,1021),"...")):(g="".concat(E(s)),p.length>512&&(p="".concat(p.slice(0,509),"...")),g.length>512&&(g="".concat(g.slice(0,509),"...")),"deepEqual"===i||"equal"===i?p="".concat(A,"\n\n").concat(p,"\n\nshould equal\n\n"):g=" ".concat(i," ").concat(g)),t=f.call(this,"".concat(p).concat(g))}return Error.stackTraceLimit=c,t.generatedMessage=!r,Object.defineProperty(l(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=o,t.expected=s,t.operator=i,Error.captureStackTrace&&Error.captureStackTrace(l(t),a),t.stack,t.name="AssertionError",u(t)}return s=S,(c=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return g(this,a(a({},t),{},{customInspect:!1,depth:0}))}}])&&o(s.prototype,c),Object.defineProperty(s,"prototype",{writable:!1}),S}(c(Error),g.custom);e.exports=S},69597(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}var o,s,u={};function l(e,t,r){r||(r=Error);var o=function(r){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&i(e,t)}(c,r);var o,s,u,l=(s=c,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=a(s);if(u){var r=a(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function c(r,n,i){var a;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a=l.call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,n,i)),a.code=e,a}return o=c,Object.defineProperty(o,"prototype",{writable:!1}),o}(r);u[e]=o}function c(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(e){return String(e)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}l("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),l("ERR_INVALID_ARG_TYPE",function(e,t,i){var a,s,u,l,f;if(void 0===o&&(o=r(94148)),o("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(s="not ",t.substr(0,4)===s)?(a="must not be",t=t.replace(/^not /,"")):a="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))u="The ".concat(e," ").concat(a," ").concat(c(t,"type"));else{var h=("number"!=typeof f&&(f=0),f+1>(l=e).length||-1===l.indexOf(".",f)?"argument":"property");u='The "'.concat(e,'" ').concat(h," ").concat(a," ").concat(c(t,"type"))}return u+". Received type ".concat(n(i))},TypeError),l("ERR_INVALID_ARG_VALUE",function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===s&&(s=r(94591));var i=s.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(i)},TypeError,RangeError),l("ERR_INVALID_RETURN_VALUE",function(e,t,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")},TypeError),l("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];void 0===o&&(o=r(94148)),o(t.length>0,"At least one arg needs to be specified");var i="The ",a=t.length;switch(t=t.map(function(e){return'"'.concat(e,'"')}),a){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,a-1).join(", "),i+=", and ".concat(t[a-1]," arguments")}return"".concat(i," must be specified")},TypeError),e.exports.codes=u},82299(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){l=!0,i=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}var o=void 0!==/a/g.flags,s=function(e){var t=[];return e.forEach(function(e){return t.push(e)}),t},u=function(e){var t=[];return e.forEach(function(e,r){return t.push([r,e])}),t},l=Object.is?Object.is:r(37653),c=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},f=Number.isNaN?Number.isNaN:r(24133);function h(e){return e.call.bind(e)}var d=h(Object.prototype.hasOwnProperty),p=h(Object.prototype.propertyIsEnumerable),m=h(Object.prototype.toString),g=r(94591).types,b=g.isAnyArrayBuffer,y=g.isArrayBufferView,_=g.isDate,v=g.isMap,w=g.isRegExp,x=g.isSet,k=g.isNativeError,B=g.isBoxedPrimitive,E=g.isNumberObject,S=g.isStringObject,A=g.isBooleanObject,C=g.isBigIntObject,I=g.isSymbolObject,P=g.isFloat32Array,T=g.isFloat64Array;function M(e){if(0===e.length||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function R(e){return Object.keys(e).filter(M).concat(c(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function F(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}function O(e,t,r,n){if(e===t)return 0!==e||!r||l(e,t);if(r){if("object"!==a(e))return"number"==typeof e&&f(e)&&f(t);if("object"!==a(t)||null===e||null===t)return!1;if(Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||"object"!==a(e))return(null===t||"object"!==a(t))&&e==t;if(null===t||"object"!==a(t))return!1}var i,s,u,c,h=m(e);if(h!==m(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var d=R(e),p=R(t);return d.length===p.length&&L(e,t,r,n,1,d)}if("[object Object]"===h&&(!v(e)&&v(t)||!x(e)&&x(t)))return!1;if(_(e)){if(!_(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(w(e)){if(!w(t)||(u=e,c=t,!(o?u.source===c.source&&u.flags===c.flags:RegExp.prototype.toString.call(u)===RegExp.prototype.toString.call(c))))return!1}else if(k(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else{if(y(e)){if(r||!P(e)&&!T(e)){if(!function(e,t){return e.byteLength===t.byteLength&&0===F(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}(e,t))return!1}else if(!function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}(e,t))return!1;var g=R(e),M=R(t);return g.length===M.length&&L(e,t,r,n,0,g)}if(x(e))return!(!x(t)||e.size!==t.size)&&L(e,t,r,n,2);if(v(e))return!(!v(t)||e.size!==t.size)&&L(e,t,r,n,3);if(b(e)){if(s=t,(i=e).byteLength!==s.byteLength||0!==F(new Uint8Array(i),new Uint8Array(s)))return!1}else if(B(e)&&!function(e,t){return E(e)?E(t)&&l(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):S(e)?S(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):A(e)?A(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):C(e)?C(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):I(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}(e,t))return!1}return L(e,t,r,n,0)}function N(e,t){return t.filter(function(t){return p(e,t)})}function L(e,t,r,i,o,l){if(5===arguments.length){l=Object.keys(e);var f=Object.keys(t);if(l.length!==f.length)return!1}for(var h=0;h<l.length;h++)if(!d(t,l[h]))return!1;if(r&&5===arguments.length){var m=c(e);if(0!==m.length){var g=0;for(h=0;h<m.length;h++){var b=m[h];if(p(e,b)){if(!p(t,b))return!1;l.push(b),g++}else if(p(t,b))return!1}var y=c(t);if(m.length!==y.length&&N(t,y).length!==g)return!1}else{var _=c(t);if(0!==_.length&&0!==N(t,_).length)return!1}}if(0===l.length&&(0===o||1===o&&0===e.length||0===e.size))return!0;if(void 0===i)i={val1:new Map,val2:new Map,position:0};else{var v=i.val1.get(e);if(void 0!==v){var w=i.val2.get(t);if(void 0!==w)return v===w}i.position++}i.val1.set(e,i.position),i.val2.set(t,i.position);var x=function(e,t,r,i,o,l){var c=0;if(2===l){if(!function(e,t,r,n){for(var i=null,o=s(e),u=0;u<o.length;u++){var l=o[u];if("object"===a(l)&&null!==l)null===i&&(i=new Set),i.add(l);else if(!t.has(l)){if(r)return!1;if(!U(e,t,l))return!1;null===i&&(i=new Set),i.add(l)}}if(null!==i){for(var c=s(t),f=0;f<c.length;f++){var h=c[f];if("object"===a(h)&&null!==h){if(!D(i,h,r,n))return!1}else if(!r&&!e.has(h)&&!D(i,h,r,n))return!1}return 0===i.size}return!0}(e,t,r,o))return!1}else if(3===l){if(!function(e,t,r,i){for(var o=null,s=u(e),l=0;l<s.length;l++){var c=n(s[l],2),f=c[0],h=c[1];if("object"===a(f)&&null!==f)null===o&&(o=new Set),o.add(f);else{var d=t.get(f);if(void 0===d&&!t.has(f)||!O(h,d,r,i)){if(r)return!1;if(!$(e,t,f,h,i))return!1;null===o&&(o=new Set),o.add(f)}}}if(null!==o){for(var p=u(t),m=0;m<p.length;m++){var g=n(p[m],2),b=g[0],y=g[1];if("object"===a(b)&&null!==b){if(!j(o,e,b,y,r,i))return!1}else if(!(r||e.has(b)&&O(e.get(b),y,!1,i)||j(o,e,b,y,!1,i)))return!1}return 0===o.size}return!0}(e,t,r,o))return!1}else if(1===l)for(;c<e.length;c++){if(!d(e,c)){if(d(t,c))return!1;for(var f=Object.keys(e);c<f.length;c++){var h=f[c];if(!d(t,h)||!O(e[h],t[h],r,o))return!1}return f.length===Object.keys(t).length}if(!d(t,c)||!O(e[c],t[c],r,o))return!1}for(c=0;c<i.length;c++){var p=i[c];if(!O(e[p],t[p],r,o))return!1}return!0}(e,t,r,l,i,o);return i.val1.delete(e),i.val2.delete(t),x}function D(e,t,r,n){for(var i=s(e),a=0;a<i.length;a++){var o=i[a];if(O(t,o,r,n))return e.delete(o),!0}return!1}function z(e){switch(a(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e=+e;case"number":if(f(e))return!1}return!0}function U(e,t,r){var n=z(r);return null!=n?n:t.has(n)&&!e.has(n)}function $(e,t,r,n,i){var a=z(r);if(null!=a)return a;var o=t.get(a);return!(void 0===o&&!t.has(a)||!O(n,o,!1,i))&&!e.has(a)&&O(n,o,!1,i)}function j(e,t,r,n,i,a){for(var o=s(e),u=0;u<o.length;u++){var l=o[u];if(O(r,l,i,a)&&O(n,t.get(l),i,a))return e.delete(l),!0}return!1}e.exports={isDeepEqual:function(e,t){return O(e,t,!1)},isDeepStrictEqual:function(e,t){return O(e,t,!0)}}},33845(e){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},12078(e,t,r){"use strict";var n=r(47244),i=r(48184),a=r(25767),o=r(35680);function s(e){return e.call.bind(e)}var u="undefined"!=typeof BigInt,l="undefined"!=typeof Symbol,c=s(Object.prototype.toString),f=s(Number.prototype.valueOf),h=s(String.prototype.valueOf),d=s(Boolean.prototype.valueOf);if(u)var p=s(BigInt.prototype.valueOf);if(l)var m=s(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function b(e){return"[object Map]"===c(e)}function y(e){return"[object Set]"===c(e)}function _(e){return"[object WeakMap]"===c(e)}function v(e){return"[object WeakSet]"===c(e)}function w(e){return"[object ArrayBuffer]"===c(e)}function x(e){return"undefined"!=typeof ArrayBuffer&&(w.working?w(e):e instanceof ArrayBuffer)}function k(e){return"[object DataView]"===c(e)}function B(e){return"undefined"!=typeof DataView&&(k.working?k(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=i,t.isTypedArray=o,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):o(e)||B(e)},t.isUint8Array=function(e){return"Uint8Array"===a(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===a(e)},t.isUint16Array=function(e){return"Uint16Array"===a(e)},t.isUint32Array=function(e){return"Uint32Array"===a(e)},t.isInt8Array=function(e){return"Int8Array"===a(e)},t.isInt16Array=function(e){return"Int16Array"===a(e)},t.isInt32Array=function(e){return"Int32Array"===a(e)},t.isFloat32Array=function(e){return"Float32Array"===a(e)},t.isFloat64Array=function(e){return"Float64Array"===a(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===a(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===a(e)},b.working="undefined"!=typeof Map&&b(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(b.working?b(e):e instanceof Map)},y.working="undefined"!=typeof Set&&y(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(y.working?y(e):e instanceof Set)},_.working="undefined"!=typeof WeakMap&&_(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(_.working?_(e):e instanceof WeakMap)},v.working="undefined"!=typeof WeakSet&&v(new WeakSet),t.isWeakSet=function(e){return v(e)},w.working="undefined"!=typeof ArrayBuffer&&w(new ArrayBuffer),t.isArrayBuffer=x,k.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&k(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=B;var E="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function S(e){return"[object SharedArrayBuffer]"===c(e)}function A(e){return void 0!==E&&(void 0===S.working&&(S.working=S(new E)),S.working?S(e):e instanceof E)}function C(e){return g(e,f)}function I(e){return g(e,h)}function P(e){return g(e,d)}function T(e){return u&&g(e,p)}function M(e){return l&&g(e,m)}t.isSharedArrayBuffer=A,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===c(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===c(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===c(e)},t.isGeneratorObject=function(e){return"[object Generator]"===c(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===c(e)},t.isNumberObject=C,t.isStringObject=I,t.isBooleanObject=P,t.isBigIntObject=T,t.isSymbolObject=M,t.isBoxedPrimitive=function(e){return C(e)||I(e)||P(e)||T(e)||M(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(x(e)||A(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})},94591(e,t,r){var n=r(65606),i=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},a=/%[sdj%]/g;t.format=function(e){if(!_(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(l(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,i=n.length,o=String(e).replace(a,function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),s=n[r];r<i;s=n[++r])b(s)||!x(s)?o+=" "+s:o+=" "+l(s);return o},t.deprecate=function(e,r){if(void 0!==n&&!0===n.noDeprecation)return e;if(void 0===n)return function(){return t.deprecate(e,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),i=!0}return e.apply(this,arguments)}};var o={},s=/^$/;if(n.env.NODE_DEBUG){var u=n.env.NODE_DEBUG;u=u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+u+"$","i")}function l(e,r){var n={seen:[],stylize:f};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),h(n,e,n.depth)}function c(e,t){var r=l.styles[t];return r?"["+l.colors[r][0]+"m"+e+"["+l.colors[r][1]+"m":e}function f(e,t){return e}function h(e,r,n){if(e.customInspect&&r&&E(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return _(i)||(i=h(e,i,n)),i}var a=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(_(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return y(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):b(t)?e.stylize("null","null"):void 0}(e,r);if(a)return a;var o=Object.keys(r),s=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),B(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return d(r);if(0===o.length){if(E(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(w(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(k(r))return e.stylize(Date.prototype.toString.call(r),"date");if(B(r))return d(r)}var l,c="",f=!1,x=["{","}"];return m(r)&&(f=!0,x=["[","]"]),E(r)&&(c=" [Function"+(r.name?": "+r.name:"")+"]"),w(r)&&(c=" "+RegExp.prototype.toString.call(r)),k(r)&&(c=" "+Date.prototype.toUTCString.call(r)),B(r)&&(c=" "+d(r)),0!==o.length||f&&0!=r.length?n<0?w(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),l=f?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o<s;++o)I(t,String(o))?a.push(p(e,t,r,n,String(o),!0)):a.push("");return i.forEach(function(i){i.match(/^\d+$/)||a.push(p(e,t,r,n,i,!0))}),a}(e,r,n,s,o):o.map(function(t){return p(e,r,n,s,t,f)}),e.seen.pop(),function(e,t,r){return e.reduce(function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(l,c,x)):x[0]+c+x[1]}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,i,a){var o,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),I(n,i)||(o="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=b(r)?h(e,u.value,null):h(e,u.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map(function(e){return" "+e}).join("\n").slice(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),v(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function m(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function b(e){return null===e}function y(e){return"number"==typeof e}function _(e){return"string"==typeof e}function v(e){return void 0===e}function w(e){return x(e)&&"[object RegExp]"===S(e)}function x(e){return"object"==typeof e&&null!==e}function k(e){return x(e)&&"[object Date]"===S(e)}function B(e){return x(e)&&("[object Error]"===S(e)||e instanceof Error)}function E(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(e=e.toUpperCase(),!o[e])if(s.test(e)){var r=n.pid;o[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else o[e]=function(){};return o[e]},t.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(12078),t.isArray=m,t.isBoolean=g,t.isNull=b,t.isNullOrUndefined=function(e){return null==e},t.isNumber=y,t.isString=_,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=v,t.isRegExp=w,t.types.isRegExp=w,t.isObject=x,t.isDate=k,t.types.isDate=k,t.isError=B,t.types.isNativeError=B,t.isFunction=E,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(33845);var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[A((e=new Date).getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":"),[e.getDate(),C[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(56698),t._extend=function(e,t){if(!t||!x(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var P="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function T(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(P&&e[P]){var t;if("function"!=typeof(t=e[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise(function(e,n){t=e,r=n}),i=[],a=0;a<arguments.length;a++)i.push(arguments[a]);i.push(function(e,n){e?r(e):t(n)});try{e.apply(this,i)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),P&&Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,i(e))},t.promisify.custom=P,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var i=t.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var a=this,o=function(){return i.apply(a,arguments)};e.apply(this,t).then(function(e){n.nextTick(o.bind(null,null,e))},function(e){n.nextTick(T.bind(null,e,o))})}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,i(e)),t}},67526(e,t){"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,a=s(e),o=a[0],u=a[1],l=new i(function(e,t,r){return 3*(t+r)/4-r}(0,o,u)),c=0,f=u>0?o-4:o;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],l[c++]=t>>16&255,l[c++]=t>>8&255,l[c++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,l[c++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t),l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=16383,s=0,u=n-i;s<u;s+=o)a.push(l(e,s,s+o>u?u:s+o));return 1===i?(t=e[n-1],a.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],a.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0;o<64;++o)r[o]=a[o],n[a.charCodeAt(o)]=o;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function l(e,t,r){for(var n,i=[],a=t;a<r;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),i.push(u(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},5974(e,t,r){"use strict";var n=r(48287).Buffer,i=r(65606),a=r(94148),o=r(44442),s=r(58411),u=r(71447),l=r(19681);for(var c in l)t[c]=l[c];function f(e){if("number"!=typeof e||e<t.DEFLATE||e>t.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=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}t.NONE=0,t.DEFLATE=1,t.INFLATE=2,t.GZIP=3,t.GUNZIP=4,t.DEFLATERAW=5,t.INFLATERAW=6,t.UNZIP=7,f.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,a(this.init_done,"close before init"),a(this.mode<=t.UNZIP),this.mode===t.DEFLATE||this.mode===t.GZIP||this.mode===t.DEFLATERAW?s.deflateEnd(this.strm):this.mode!==t.INFLATE&&this.mode!==t.GUNZIP&&this.mode!==t.INFLATERAW&&this.mode!==t.UNZIP||u.inflateEnd(this.strm),this.mode=t.NONE,this.dictionary=null)},f.prototype.write=function(e,t,r,n,i,a,o){return this._write(!0,e,t,r,n,i,a,o)},f.prototype.writeSync=function(e,t,r,n,i,a,o){return this._write(!1,e,t,r,n,i,a,o)},f.prototype._write=function(e,r,o,s,u,l,c,f){if(a.equal(arguments.length,8),a(this.init_done,"write before init"),a(this.mode!==t.NONE,"already finalized"),a.equal(!1,this.write_in_progress,"write already in progress"),a.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,a.equal(!1,void 0===r,"must provide flush value"),this.write_in_progress=!0,r!==t.Z_NO_FLUSH&&r!==t.Z_PARTIAL_FLUSH&&r!==t.Z_SYNC_FLUSH&&r!==t.Z_FULL_FLUSH&&r!==t.Z_FINISH&&r!==t.Z_BLOCK)throw new Error("Invalid flush value");if(null==o&&(o=n.alloc(0),u=0,s=0),this.strm.avail_in=u,this.strm.input=o,this.strm.next_in=s,this.strm.avail_out=f,this.strm.output=l,this.strm.next_out=c,this.flush=r,!e)return this._process(),this._checkError()?this._afterSync():void 0;var h=this;return i.nextTick(function(){h._process(),h._after()}),this},f.prototype._afterSync=function(){var e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},f.prototype._process=function(){var e=null;switch(this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=s.deflate(this.strm,this.flush);break;case t.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=t.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=t.GUNZIP):this.mode=t.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:for(this.err=u.inflate(this.strm,this.flush),this.err===t.Z_NEED_DICT&&this.dictionary&&(this.err=u.inflateSetDictionary(this.strm,this.dictionary),this.err===t.Z_OK?this.err=u.inflate(this.strm,this.flush):this.err===t.Z_DATA_ERROR&&(this.err=t.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===t.GUNZIP&&this.err===t.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=u.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},f.prototype._checkError=function(){switch(this.err){case t.Z_OK:case t.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===t.Z_FINISH)return this._error("unexpected end of file"),!1;break;case t.Z_STREAM_END:break;case t.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},f.prototype._after=function(){if(this._checkError()){var e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},f.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},f.prototype.init=function(e,r,n,i,o){a(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),a(e>=8&&e<=15,"invalid windowBits"),a(r>=-1&&r<=9,"invalid compression level"),a(n>=1&&n<=9,"invalid memlevel"),a(i===t.Z_FILTERED||i===t.Z_HUFFMAN_ONLY||i===t.Z_RLE||i===t.Z_FIXED||i===t.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(r,e,n,i,o),this._setDictionary()},f.prototype.params=function(){throw new Error("deflateParams Not supported")},f.prototype.reset=function(){this._reset(),this._setDictionary()},f.prototype._init=function(e,r,n,i,a){switch(this.level=e,this.windowBits=r,this.memLevel=n,this.strategy=i,this.flush=t.Z_NO_FLUSH,this.err=t.Z_OK,this.mode!==t.GZIP&&this.mode!==t.GUNZIP||(this.windowBits+=16),this.mode===t.UNZIP&&(this.windowBits+=32),this.mode!==t.DEFLATERAW&&this.mode!==t.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new o,this.mode){case t.DEFLATE:case t.GZIP:case t.DEFLATERAW:this.err=s.deflateInit2(this.strm,this.level,t.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case t.INFLATE:case t.GUNZIP:case t.INFLATERAW:case t.UNZIP:this.err=u.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==t.Z_OK&&this._error("Init error"),this.dictionary=a,this.write_in_progress=!1,this.init_done=!0},f.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:this.err=s.deflateSetDictionary(this.strm,this.dictionary)}this.err!==t.Z_OK&&this._error("Failed to set dictionary")}},f.prototype._reset=function(){switch(this.err=t.Z_OK,this.mode){case t.DEFLATE:case t.DEFLATERAW:case t.GZIP:this.err=s.deflateReset(this.strm);break;case t.INFLATE:case t.INFLATERAW:case t.GUNZIP:this.err=u.inflateReset(this.strm)}this.err!==t.Z_OK&&this._error("Failed to reset stream")},t.Zlib=f},78559(e,t,r){"use strict";var n=r(65606),i=r(48287).Buffer,a=r(88310).Transform,o=r(5974),s=r(40537),u=r(94148).ok,l=r(48287).kMaxLength,c="Cannot create final Buffer. It would be larger than 0x"+l.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 f=Object.keys(o),h=0;h<f.length;h++){var d=f[h];d.match(/^Z/)&&Object.defineProperty(t,d,{enumerable:!0,value:o[d],writable:!1})}for(var p={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},m=Object.keys(p),g=0;g<m.length;g++){var b=m[g];p[p[b]]=b}function y(e,t,r){var n=[],a=0;function o(){for(var t;null!==(t=e.read());)n.push(t),a+=t.length;e.once("readable",o)}function s(){var t,o=null;a>=l?o=new RangeError(c):t=i.concat(n,a),n=[],e.close(),r(o,t)}e.on("error",function(t){e.removeListener("end",s),e.removeListener("readable",o),r(t)}),e.on("end",s),e.end(t),o()}function _(e,t){if("string"==typeof t&&(t=i.from(t)),!i.isBuffer(t))throw new TypeError("Not a string or buffer");var r=e._finishFlushFlag;return e._processChunk(t,r)}function v(e){if(!(this instanceof v))return new v(e);C.call(this,e,o.DEFLATE)}function w(e){if(!(this instanceof w))return new w(e);C.call(this,e,o.INFLATE)}function x(e){if(!(this instanceof x))return new x(e);C.call(this,e,o.GZIP)}function k(e){if(!(this instanceof k))return new k(e);C.call(this,e,o.GUNZIP)}function B(e){if(!(this instanceof B))return new B(e);C.call(this,e,o.DEFLATERAW)}function E(e){if(!(this instanceof E))return new E(e);C.call(this,e,o.INFLATERAW)}function S(e){if(!(this instanceof S))return new S(e);C.call(this,e,o.UNZIP)}function A(e){return e===o.Z_NO_FLUSH||e===o.Z_PARTIAL_FLUSH||e===o.Z_SYNC_FLUSH||e===o.Z_FULL_FLUSH||e===o.Z_FINISH||e===o.Z_BLOCK}function C(e,r){var n=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||t.Z_DEFAULT_CHUNK,a.call(this,e),e.flush&&!A(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!A(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||o.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:o.Z_FINISH,e.chunkSize&&(e.chunkSize<t.Z_MIN_CHUNK||e.chunkSize>t.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<t.Z_MIN_WINDOWBITS||e.windowBits>t.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<t.Z_MIN_LEVEL||e.level>t.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<t.Z_MIN_MEMLEVEL||e.memLevel>t.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=t.Z_FILTERED&&e.strategy!=t.Z_HUFFMAN_ONLY&&e.strategy!=t.Z_RLE&&e.strategy!=t.Z_FIXED&&e.strategy!=t.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!i.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new o.Zlib(r);var s=this;this._hadError=!1,this._handle.onerror=function(e,r){I(s),s._hadError=!0;var n=new Error(e);n.errno=r,n.code=t.codes[r],s.emit("error",n)};var u=t.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(u=e.level);var l=t.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(l=e.strategy),this._handle.init(e.windowBits||t.Z_DEFAULT_WINDOWBITS,u,e.memLevel||t.Z_DEFAULT_MEMLEVEL,l,e.dictionary),this._buffer=i.allocUnsafe(this._chunkSize),this._offset=0,this._level=u,this._strategy=l,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!n._handle},configurable:!0,enumerable:!0})}function I(e,t){t&&n.nextTick(t),e._handle&&(e._handle.close(),e._handle=null)}function P(e){e.emit("close")}Object.defineProperty(t,"codes",{enumerable:!0,value:Object.freeze(p),writable:!1}),t.Deflate=v,t.Inflate=w,t.Gzip=x,t.Gunzip=k,t.DeflateRaw=B,t.InflateRaw=E,t.Unzip=S,t.createDeflate=function(e){return new v(e)},t.createInflate=function(e){return new w(e)},t.createDeflateRaw=function(e){return new B(e)},t.createInflateRaw=function(e){return new E(e)},t.createGzip=function(e){return new x(e)},t.createGunzip=function(e){return new k(e)},t.createUnzip=function(e){return new S(e)},t.deflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),y(new v(t),e,r)},t.deflateSync=function(e,t){return _(new v(t),e)},t.gzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),y(new x(t),e,r)},t.gzipSync=function(e,t){return _(new x(t),e)},t.deflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),y(new B(t),e,r)},t.deflateRawSync=function(e,t){return _(new B(t),e)},t.unzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),y(new S(t),e,r)},t.unzipSync=function(e,t){return _(new S(t),e)},t.inflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),y(new w(t),e,r)},t.inflateSync=function(e,t){return _(new w(t),e)},t.gunzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),y(new k(t),e,r)},t.gunzipSync=function(e,t){return _(new k(t),e)},t.inflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),y(new E(t),e,r)},t.inflateRawSync=function(e,t){return _(new E(t),e)},s.inherits(C,a),C.prototype.params=function(e,r,i){if(e<t.Z_MIN_LEVEL||e>t.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(r!=t.Z_FILTERED&&r!=t.Z_HUFFMAN_ONLY&&r!=t.Z_RLE&&r!=t.Z_FIXED&&r!=t.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+r);if(this._level!==e||this._strategy!==r){var a=this;this.flush(o.Z_SYNC_FLUSH,function(){u(a._handle,"zlib binding closed"),a._handle.params(e,r),a._hadError||(a._level=e,a._strategy=r,i&&i())})}else n.nextTick(i)},C.prototype.reset=function(){return u(this._handle,"zlib binding closed"),this._handle.reset()},C.prototype._flush=function(e){this._transform(i.alloc(0),"",e)},C.prototype.flush=function(e,t){var r=this,a=this._writableState;("function"==typeof e||void 0===e&&!t)&&(t=e,e=o.Z_FULL_FLUSH),a.ended?t&&n.nextTick(t):a.ending?t&&this.once("end",t):a.needDrain?t&&this.once("drain",function(){return r.flush(e,t)}):(this._flushFlag=e,this.write(i.alloc(0),"",t))},C.prototype.close=function(e){I(this,e),n.nextTick(P,this)},C.prototype._transform=function(e,t,r){var n,a=this._writableState,s=(a.ending||a.ended)&&(!e||a.length===e.length);return null===e||i.isBuffer(e)?this._handle?(s?n=this._finishFlushFlag:(n=this._flushFlag,e.length>=a.length&&(this._flushFlag=this._opts.flush||o.Z_NO_FLUSH)),void this._processChunk(e,n,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},C.prototype._processChunk=function(e,t,r){var n=e&&e.length,a=this._chunkSize-this._offset,o=0,s=this,f="function"==typeof r;if(!f){var h,d=[],p=0;this.on("error",function(e){h=e}),u(this._handle,"zlib binding closed");do{var m=this._handle.writeSync(t,e,o,n,this._buffer,this._offset,a)}while(!this._hadError&&y(m[0],m[1]));if(this._hadError)throw h;if(p>=l)throw I(this),new RangeError(c);var g=i.concat(d,p);return I(this),g}u(this._handle,"zlib binding closed");var b=this._handle.write(t,e,o,n,this._buffer,this._offset,a);function y(l,c){if(this&&(this.buffer=null,this.callback=null),!s._hadError){var h=a-c;if(u(h>=0,"have should not go down"),h>0){var m=s._buffer.slice(s._offset,s._offset+h);s._offset+=h,f?s.push(m):(d.push(m),p+=m.length)}if((0===c||s._offset>=s._chunkSize)&&(a=s._chunkSize,s._offset=0,s._buffer=i.allocUnsafe(s._chunkSize)),0===c){if(o+=n-l,n=l,!f)return!0;var g=s._handle.write(t,e,o,n,s._buffer,s._offset,s._chunkSize);return g.callback=y,void(g.buffer=e)}if(!f)return!1;r()}}b.buffer=e,b.callback=y},s.inherits(v,C),s.inherits(w,C),s.inherits(x,C),s.inherits(k,C),s.inherits(B,C),s.inherits(E,C),s.inherits(S,C)},48287(e,t,r){"use strict";const n=r(67526),i=r(251),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=s(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(V(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(V(e,ArrayBuffer)||e&&V(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(V(e,SharedArrayBuffer)||e&&V(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?s(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return c(e),s(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function m(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||V(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(e).length;default:if(i)return n?-1:H(e).length;t=(""+t).toLowerCase(),i=!0}}function g(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return P(this,t,r);case"utf8":case"utf-8":return S(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return E(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function b(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function y(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:_(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):_(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function _(e,t,r,n,i){let a,o=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,r/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let n=-1;for(a=r;a<s;a++)if(l(e,a)===l(t,-1===n?0:a-n)){if(-1===n&&(n=a),a-n+1===u)return n*o}else-1!==n&&(a-=a-n),n=-1}else for(r+u>s&&(r=s-u),a=r;a>=0;a--){let r=!0;for(let n=0;n<u;n++)if(l(e,a+n)!==l(t,n)){r=!1;break}if(r)return a}return-1}function v(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const a=t.length;let o;for(n>a/2&&(n=a/2),o=0;o<n;++o){const n=parseInt(t.substr(2*o,2),16);if(Y(n))return o;e[r+o]=n}return o}function w(e,t,r,n){return Q(H(t,e.length-r),e,r,n)}function x(e,t,r,n){return Q(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function k(e,t,r,n){return Q(q(t),e,r,n)}function B(e,t,r,n){return Q(function(e,t){let r,n,i;const a=[];for(let o=0;o<e.length&&!((t-=2)<0);++o)r=e.charCodeAt(o),n=r>>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function E(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function S(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let a=null,o=t>239?4:t>223?3:t>191?2:1;if(i+o<=r){let r,n,s,u;switch(o){case 1:t<128&&(a=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(a=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(a=u));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(a=u))}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=o}return function(e){const t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=A));return r}(n)}t.kMaxLength=o,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return c(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},u.allocUnsafe=function(e){return f(e)},u.allocUnsafeSlow=function(e){return f(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(V(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),V(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(V(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)b(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)b(this,t,t+3),b(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)b(this,t,t+7),b(this,t+1,t+6),b(this,t+2,t+5),b(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?S(this,0,e):g.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},a&&(u.prototype[a]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(V(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0);const s=Math.min(a,o),l=this.slice(n,i),c=e.slice(t,r);for(let e=0;e<s;++e)if(l[e]!==c[e]){a=l[e],o=c[e];break}return a<o?-1:o<a?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return y(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return y(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let a=!1;for(;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return w(this,e,t,r);case"ascii":case"latin1":case"binary":return x(this,e,t,r);case"base64":return k(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const A=4096;function C(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function I(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function P(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=K[e[n]];return i}function T(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function M(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,a){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function F(e,t,r,n,i){j(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function O(e,t,r,n,i){j(t,n,i,e,r,7);let a=Number(t&BigInt(4294967295));e[r+7]=a,a>>=8,e[r+6]=a,a>>=8,e[r+5]=a,a>>=8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function N(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,a){return t=+t,r>>>=0,a||N(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function D(e,t,r,n,a){return t=+t,r>>>=0,a||N(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e],i=1,a=0;for(;++a<t&&(i*=256);)n+=this[e+a]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=X(function(e){Z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))}),u.prototype.readBigUInt64BE=X(function(e){Z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);let n=this[e],i=1,a=0;for(;++a<t&&(i*=256);)n+=this[e+a]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||M(e,t,this.length);let n=t,i=1,a=this[e+--n];for(;n>0&&(i*=256);)a+=this[e+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},u.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||M(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||M(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=X(function(e){Z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),u.prototype.readBigInt64BE=X(function(e){Z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)}),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||M(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||R(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,a=0;for(this[t]=255&e;++a<r&&(i*=256);)this[t+a]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||R(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=X(function(e,t=0){return F(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=X(function(e,t=0){return O(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}let i=0,a=1,o=0;for(this[t]=255&e;++i<r&&(a*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/a|0)-o&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);R(this,e,t,r,n-1,-n)}let i=r-1,a=1,o=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a|0)-o&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=X(function(e,t=0){return F(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=X(function(e,t=0){return O(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return D(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return D(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),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);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const a=u.isBuffer(e)?e:u.from(e,n),o=a.length;if(0===o)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=a[i%o]}return this};const z={};function U(e,t,r){z[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function $(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function j(e,t,r,n,i,a){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=a>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(a+1)}${n}`:`>= -(2${n} ** ${8*(a+1)-1}${n}) and < 2 ** ${8*(a+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new z.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){Z(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||G(t,e.length-(r+1))}(n,i,a)}function Z(e,t){if("number"!=typeof e)throw new z.ERR_INVALID_ARG_TYPE(t,"number",e)}function G(e,t,r){if(Math.floor(e)!==e)throw Z(e,r),new z.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new z.ERR_BUFFER_OUT_OF_BOUNDS;throw new z.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),U("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),U("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=$(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=$(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);const W=/[^+/0-9A-Za-z-_]/g;function H(e,t){let r;t=t||1/0;const n=e.length;let i=null;const a=[];for(let o=0;o<n;++o){if(r=e.charCodeAt(o),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function q(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Q(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function V(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const K=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?J:e}function J(){throw new Error("BigInt not supported")}},13144(e,t,r){"use strict";var n=r(66743),i=r(11002),a=r(10076),o=r(47119);e.exports=o||n.call(a,i)},12205(e,t,r){"use strict";var n=r(66743),i=r(11002),a=r(13144);e.exports=function(){return a(n,i,arguments)}},11002(e){"use strict";e.exports=Function.prototype.apply},10076(e){"use strict";e.exports=Function.prototype.call},73126(e,t,r){"use strict";var n=r(66743),i=r(69675),a=r(10076),o=r(13144);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new i("a function is required");return o(n,a,e)}},47119(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},38075(e,t,r){"use strict";var n=r(70453),i=r(10487),a=i(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&a(e,".prototype.")>-1?i(r):r}},10487(e,t,r){"use strict";var n=r(96897),i=r(30655),a=r(73126),o=r(12205);e.exports=function(e){var t=a(arguments),r=e.length-(arguments.length-1);return n(t,1+(r>0?r:0),!0)},i?i(e.exports,"apply",{value:o}):e.exports.apply=o},36556(e,t,r){"use strict";var n=r(70453),i=r(73126),a=i([n("%String.prototype.indexOf%")]);e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&a(e,".prototype.")>-1?i([r]):r}},30041(e,t,r){"use strict";var n=r(30655),i=r(58068),a=r(69675),o=r(75795);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new a("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,l=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],f=!!o&&o(e,t);if(n)n(e,t,{configurable:null===l&&f?f.configurable:!l,enumerable:null===s&&f?f.enumerable:!s,value:r,writable:null===u&&f?f.writable:!u});else{if(!c&&(s||u||l))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},38452(e,t,r){"use strict";var n=r(1189),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),a=Object.prototype.toString,o=Array.prototype.concat,s=r(30041),u=r(30592)(),l=function(e,t,r,n){if(t in e)if(!0===n){if(e[t]===r)return}else if("function"!=typeof(i=n)||"[object Function]"!==a.call(i)||!n())return;var i;u?s(e,t,r,!0):s(e,t,r)},c=function(e,t){var r=arguments.length>2?arguments[2]:{},a=n(t);i&&(a=o.call(a,Object.getOwnPropertySymbols(t)));for(var s=0;s<a.length;s+=1)l(e,a[s],t[a[s]],r[a[s]])};c.supportsDescriptors=!!u,e.exports=c},7176(e,t,r){"use strict";var n,i=r(73126),a=r(75795);try{n=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var o=!!n&&a&&a(Object.prototype,"__proto__"),s=Object,u=s.getPrototypeOf;e.exports=o&&"function"==typeof o.get?i([o.get]):"function"==typeof u&&function(e){return u(null==e?e:s(e))}},30655(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},41237(e){"use strict";e.exports=EvalError},69383(e){"use strict";e.exports=Error},79290(e){"use strict";e.exports=RangeError},79538(e){"use strict";e.exports=ReferenceError},58068(e){"use strict";e.exports=SyntaxError},69675(e){"use strict";e.exports=TypeError},35345(e){"use strict";e.exports=URIError},79612(e){"use strict";e.exports=Object},37007(e){"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise(function(r,n){function i(r){e.removeListener(t,a),n(r)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}m(e,t,a,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&m(e,"error",t,{once:!0})}(e,i)})},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,a,o,l;if(s(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]),void 0===o)o=a[t]=r,++e._eventsCount;else if("function"==typeof o?o=a[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=u(e))>0&&o.length>i&&!o.warned){o.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=o.length,l=c,console&&console.warn&&console.warn(l)}return e}function c(){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 f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=c.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function m(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function i(a){n.once&&e.removeEventListener(t,i),r(a)})}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),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(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return u(this)},a.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,a=this._events;if(void 0!==a)i=i&&void 0===a.error;else if(!i)return!1;if(i){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var u=a[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var l=u.length,c=p(u,l);for(r=0;r<l;++r)n(c[r],this,t)}return!0},a.prototype.addListener=function(e,t){return l(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return l(this,e,t,!0)},a.prototype.once=function(e,t){return s(t),this.on(e,f(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,f(this,e,t)),this},a.prototype.removeListener=function(e,t){var r,n,i,a,o;if(s(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,a=r.length-1;a>=0;a--)if(r[a]===t||r[a].listener===t){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,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[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,a=Object.keys(r);for(n=0;n<a.length;++n)"removeListener"!==(i=a[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},a.prototype.listeners=function(e){return h(this,e,!0)},a.prototype.rawListeners=function(e){return h(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},a.prototype.listenerCount=d,a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},87833(e,t,r){var n=r(74942);e.exports={create:function(e,t){if(e instanceof(t=t||(0,eval)("this")).ArrayBuffer){var i=r(84628);return new n(new i(e,0,e.byteLength,!0,t))}var a=r(83779);return new n(new a(e,0,e.length,!0))}}},83779(e){function t(e,t,r,n){this.buffer=e,this.offset=t||0,r="number"==typeof r?r:e.length,this.endPosition=this.offset+r,this.setBigEndian(n)}t.prototype={setBigEndian:function(e){this.bigEndian=!!e},nextUInt8:function(){var e=this.buffer.readUInt8(this.offset);return this.offset+=1,e},nextInt8:function(){var e=this.buffer.readInt8(this.offset);return this.offset+=1,e},nextUInt16:function(){var e=this.bigEndian?this.buffer.readUInt16BE(this.offset):this.buffer.readUInt16LE(this.offset);return this.offset+=2,e},nextUInt32:function(){var e=this.bigEndian?this.buffer.readUInt32BE(this.offset):this.buffer.readUInt32LE(this.offset);return this.offset+=4,e},nextInt16:function(){var e=this.bigEndian?this.buffer.readInt16BE(this.offset):this.buffer.readInt16LE(this.offset);return this.offset+=2,e},nextInt32:function(){var e=this.bigEndian?this.buffer.readInt32BE(this.offset):this.buffer.readInt32LE(this.offset);return this.offset+=4,e},nextFloat:function(){var e=this.bigEndian?this.buffer.readFloatBE(this.offset):this.buffer.readFloatLE(this.offset);return this.offset+=4,e},nextDouble:function(){var e=this.bigEndian?this.buffer.readDoubleBE(this.offset):this.buffer.readDoubleLE(this.offset);return this.offset+=8,e},nextBuffer:function(e){var t=this.buffer.slice(this.offset,this.offset+e);return this.offset+=e,t},remainingLength:function(){return this.endPosition-this.offset},nextString:function(e){var t=this.buffer.toString("utf8",this.offset,this.offset+e);return this.offset+=e,t},mark:function(){var e=this;return{openWithOffset:function(r){return r=(r||0)+this.offset,new t(e.buffer,r,e.endPosition-r,e.bigEndian)},offset:this.offset}},offsetFrom:function(e){return this.offset-e.offset},skip:function(e){this.offset+=e},branch:function(e,r){return r="number"==typeof r?r:this.endPosition-(this.offset+e),new t(this.buffer,this.offset+e,r,this.bigEndian)}},e.exports=t},32297(e){function t(e){return parseInt(e,10)}function r(e,r){e=e.map(t),r=r.map(t);var n=e[0],i=e[1]-1,a=e[2],o=r[0],s=r[1],u=r[2];return Date.UTC(n,i,a,o,s,u,0)/1e3}function n(e){var n=e.substr(0,10).split("-"),i=e.substr(11,8).split(":"),a=e.substr(19,6).split(":").map(t),o=3600*a[0]+60*a[1],s=r(n,i);if("number"==typeof(s-=o)&&!isNaN(s))return s}function i(e){var t=e.split(" "),n=r(t[0].split(":"),t[1].split(":"));if("number"==typeof n&&!isNaN(n))return n}e.exports={parseDateWithSpecFormat:i,parseDateWithTimezoneFormat:n,parseExifDate:function(e){var t=19===e.length&&":"===e.charAt(4);return 25===e.length&&"T"===e.charAt(10)?n(e):t?i(e):void 0}}},84628(e){function t(e,t,r,n,i,a){this.global=i,t=t||0,r=r||e.byteLength-t,this.arrayBuffer=e.slice(t,t+r),this.view=new i.DataView(this.arrayBuffer,0,this.arrayBuffer.byteLength),this.setBigEndian(n),this.offset=0,this.parentOffset=(a||0)+t}t.prototype={setBigEndian:function(e){this.littleEndian=!e},nextUInt8:function(){var e=this.view.getUint8(this.offset);return this.offset+=1,e},nextInt8:function(){var e=this.view.getInt8(this.offset);return this.offset+=1,e},nextUInt16:function(){var e=this.view.getUint16(this.offset,this.littleEndian);return this.offset+=2,e},nextUInt32:function(){var e=this.view.getUint32(this.offset,this.littleEndian);return this.offset+=4,e},nextInt16:function(){var e=this.view.getInt16(this.offset,this.littleEndian);return this.offset+=2,e},nextInt32:function(){var e=this.view.getInt32(this.offset,this.littleEndian);return this.offset+=4,e},nextFloat:function(){var e=this.view.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e},nextDouble:function(){var e=this.view.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e},nextBuffer:function(e){var t=this.arrayBuffer.slice(this.offset,this.offset+e);return this.offset+=e,t},remainingLength:function(){return this.arrayBuffer.byteLength-this.offset},nextString:function(e){var t=this.arrayBuffer.slice(this.offset,this.offset+e);return t=String.fromCharCode.apply(null,new this.global.Uint8Array(t)),this.offset+=e,t},mark:function(){var e=this;return{openWithOffset:function(r){return r=(r||0)+this.offset,new t(e.arrayBuffer,r,e.arrayBuffer.byteLength-r,!e.littleEndian,e.global,e.parentOffset)},offset:this.offset,getParentOffset:function(){return e.parentOffset}}},offsetFrom:function(e){return this.parentOffset+this.offset-(e.offset+e.getParentOffset())},skip:function(e){this.offset+=e},branch:function(e,r){return r="number"==typeof r?r:this.arrayBuffer.byteLength-(this.offset+e),new t(this.arrayBuffer,this.offset+e,r,!this.littleEndian,this.global,this.parentOffset)}},e.exports=t},26393(e){e.exports={exif:{1:"InteropIndex",2:"InteropVersion",11:"ProcessingSoftware",254:"SubfileType",255:"OldSubfileType",256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:"Thresholding",264:"CellWidth",265:"CellLength",266:"FillOrder",269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",285:"PageName",286:"XPosition",287:"YPosition",288:"FreeOffsets",289:"FreeByteCounts",290:"GrayResponseUnit",291:"GrayResponseCurve",292:"T4Options",293:"T6Options",296:"ResolutionUnit",297:"PageNumber",300:"ColorResponseUnit",301:"TransferFunction",305:"Software",306:"ModifyDate",315:"Artist",316:"HostComputer",317:"Predictor",318:"WhitePoint",319:"PrimaryChromaticities",320:"ColorMap",321:"HalftoneHints",322:"TileWidth",323:"TileLength",324:"TileOffsets",325:"TileByteCounts",326:"BadFaxLines",327:"CleanFaxData",328:"ConsecutiveBadFaxLines",330:"SubIFD",332:"InkSet",333:"InkNames",334:"NumberofInks",336:"DotRange",337:"TargetPrinter",338:"ExtraSamples",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",342:"TransferRange",343:"ClipPath",344:"XClipPathUnits",345:"YClipPathUnits",346:"Indexed",347:"JPEGTables",351:"OPIProxy",400:"GlobalParametersIFD",401:"ProfileType",402:"FaxProfile",403:"CodingMethods",404:"VersionYear",405:"ModeNumber",433:"Decode",434:"DefaultImageColor",435:"T82Options",437:"JPEGTables",512:"JPEGProc",513:"ThumbnailOffset",514:"ThumbnailLength",515:"JPEGRestartInterval",517:"JPEGLosslessPredictors",518:"JPEGPointTransforms",519:"JPEGQTables",520:"JPEGDCTables",521:"JPEGACTables",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite",559:"StripRowCounts",700:"ApplicationNotes",999:"USPTOMiscellaneous",4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight",18246:"Rating",18247:"XP_DIP_XML",18248:"StitchInfo",18249:"RatingPercent",32781:"ImageID",32931:"WangTag1",32932:"WangAnnotation",32933:"WangTag3",32934:"WangTag4",32995:"Matteing",32996:"DataType",32997:"ImageDepth",32998:"TileDepth",33405:"Model2",33421:"CFARepeatPatternDim",33422:"CFAPattern2",33423:"BatteryLevel",33424:"KodakIFD",33432:"Copyright",33434:"ExposureTime",33437:"FNumber",33445:"MDFileTag",33446:"MDScalePixel",33447:"MDColorTable",33448:"MDLabName",33449:"MDSampleInfo",33450:"MDPrepDate",33451:"MDPrepTime",33452:"MDFileUnits",33550:"PixelScale",33589:"AdventScale",33590:"AdventRevision",33628:"UIC1Tag",33629:"UIC2Tag",33630:"UIC3Tag",33631:"UIC4Tag",33723:"IPTC-NAA",33918:"IntergraphPacketData",33919:"IntergraphFlagRegisters",33920:"IntergraphMatrix",33921:"INGRReserved",33922:"ModelTiePoint",34016:"Site",34017:"ColorSequence",34018:"IT8Header",34019:"RasterPadding",34020:"BitsPerRunLength",34021:"BitsPerExtendedRunLength",34022:"ColorTable",34023:"ImageColorIndicator",34024:"BackgroundColorIndicator",34025:"ImageColorValue",34026:"BackgroundColorValue",34027:"PixelIntensityRange",34028:"TransparencyIndicator",34029:"ColorCharacterization",34030:"HCUsage",34031:"TrapIndicator",34032:"CMYKEquivalent",34118:"SEMInfo",34152:"AFCP_IPTC",34232:"PixelMagicJBIGOptions",34264:"ModelTransform",34306:"WB_GRGBLevels",34310:"LeafData",34377:"PhotoshopSettings",34665:"ExifOffset",34675:"ICC_Profile",34687:"TIFF_FXExtensions",34688:"MultiProfiles",34689:"SharedData",34690:"T88Options",34732:"ImageLayer",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34850:"ExposureProgram",34852:"SpectralSensitivity",34853:"GPSInfo",34855:"ISO",34856:"Opto-ElectricConvFactor",34857:"Interlace",34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:"SensitivityType",34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",34908:"FaxRecvParams",34909:"FaxSubAddress",34910:"FaxRecvTime",34954:"LeafSubIFD",36864:"ExifVersion",36867:"DateTimeOriginal",36868:"CreateDate",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureCompensation",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37386:"FocalLength",37387:"FlashEnergy",37388:"SpatialFrequencyResponse",37389:"Noise",37390:"FocalPlaneXResolution",37391:"FocalPlaneYResolution",37392:"FocalPlaneResolutionUnit",37393:"ImageNumber",37394:"SecurityClassification",37395:"ImageHistory",37396:"SubjectArea",37397:"ExposureIndex",37398:"TIFF-EPStandardID",37399:"SensingMethod",37434:"CIP3DataFile",37435:"CIP3Sheet",37436:"CIP3Side",37439:"StoNits",37500:"MakerNote",37510:"UserComment",37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37679:"MSDocumentText",37680:"MSPropertySetStorage",37681:"MSDocumentTextPosition",37724:"ImageSourceData",40091:"XPTitle",40092:"XPComment",40093:"XPAuthor",40094:"XPKeywords",40095:"XPSubject",40960:"FlashpixVersion",40961:"ColorSpace",40962:"ExifImageWidth",40963:"ExifImageHeight",40964:"RelatedSoundFile",40965:"InteropOffset",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41485:"Noise",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41489:"ImageNumber",41490:"SecurityClassification",41491:"ImageHistory",41492:"SubjectLocation",41493:"ExposureIndex",41494:"TIFF-EPStandardID",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRatio",41989:"FocalLengthIn35mmFormat",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",42016:"ImageUniqueID",42032:"OwnerName",42033:"SerialNumber",42034:"LensInfo",42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42112:"GDALMetadata",42113:"GDALNoData",42240:"Gamma",44992:"ExpandSoftware",44993:"ExpandLens",44994:"ExpandFilm",44995:"ExpandFilterLens",44996:"ExpandScanner",44997:"ExpandFlashLamp",48129:"PixelFormat",48130:"Transformation",48131:"Uncompressed",48132:"ImageType",48256:"ImageWidth",48257:"ImageHeight",48258:"WidthResolution",48259:"HeightResolution",48320:"ImageOffset",48321:"ImageByteCount",48322:"AlphaOffset",48323:"AlphaByteCount",48324:"ImageDataDiscard",48325:"AlphaDataDiscard",50215:"OceScanjobDesc",50216:"OceApplicationSelector",50217:"OceIDNumber",50218:"OceImageLogic",50255:"Annotations",50341:"PrintIM",50560:"USPTOOriginalContentType",50706:"DNGVersion",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50710:"CFAPlaneColor",50711:"CFALayout",50712:"LinearizationTable",50713:"BlackLevelRepeatDim",50714:"BlackLevel",50715:"BlackLevelDeltaH",50716:"BlackLevelDeltaV",50717:"WhiteLevel",50718:"DefaultScale",50719:"DefaultCropOrigin",50720:"DefaultCropSize",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50733:"BayerGreenSplit",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50737:"ChromaBlurRadius",50738:"AntiAliasStrength",50739:"ShadowScale",50740:"DNGPrivateData",50741:"MakerNoteSafety",50752:"RawImageSegmentation",50778:"CalibrationIlluminant1",50779:"CalibrationIlluminant2",50780:"BestQualityScale",50781:"RawDataUniqueID",50784:"AliasLayerMetadata",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50829:"ActiveArea",50830:"MaskedAreas",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"ColorimetricReference",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50935:"NoiseReductionApplied",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:"ProfileEmbedPolicy",50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:"PreviewColorSpace",50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50974:"SubTileBlockSize",50975:"RowInterleaveFactor",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51008:"OpcodeList1",51009:"OpcodeList2",51022:"OpcodeList3",51041:"NoiseProfile",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:"ProfileHueSatMapEncoding",51108:"ProfileLookTableEncoding",51109:"BaselineExposureOffset",51110:"DefaultBlackRender",51111:"NewRawImageDigest",51112:"RawToPreviewGain",51125:"DefaultUserCrop",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65024:"KDC_IFD",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential",31:"GPSHPositioningError"}}},58107(e){function t(e,t){switch(e){case 1:return t.nextUInt8();case 3:case 8:return t.nextUInt16();case 4:case 9:return t.nextUInt32();case 5:return[t.nextUInt32(),t.nextUInt32()];case 6:return t.nextInt8();case 10:return[t.nextInt32(),t.nextInt32()];case 11:return t.nextFloat();case 12:return t.nextDouble();default:throw new Error("Invalid format while decoding: "+e)}}function r(e,r){var n,i,a=r.nextUInt16(),o=r.nextUInt16(),s=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}}(o),u=r.nextUInt32(),l=s*u;if(l>4&&(r=e.openWithOffset(r.nextUInt32())),2===o){var c=(n=r.nextString(u)).indexOf("\0");-1!==c&&(n=n.substr(0,c))}else if(7===o)n=r.nextBuffer(u);else if(0!==o)for(n=[],i=0;i<u;++i)n.push(t(o,r));return l<4&&r.skip(4-l),[a,n,o]}function n(e,t,n){var i,a,o=t.nextUInt16();for(a=0;a<o;++a)n((i=r(e,t))[0],i[1],i[2])}e.exports={IFD0:1,IFD1:2,GPSIFD:3,SubIFD:4,InteropIFD:5,parseTags:function(e,t){var r,i,a,o;try{r=function(e){if("Exif\0\0"!==e.nextString(6))throw new Error("Invalid EXIF header");var t=e.mark(),r=e.nextUInt16();if(18761===r)e.setBigEndian(!1);else{if(19789!==r)throw new Error("Invalid TIFF header");e.setBigEndian(!0)}if(42!==e.nextUInt16())throw new Error("Invalid TIFF data");return t}(e)}catch(e){return!1}var s=r.openWithOffset(e.nextUInt32()),u=this.IFD0;n(r,s,function(e,r,n){switch(e){case 34853:a=r[0];break;case 34665:i=r[0];break;default:t(u,e,r,n)}});var l=s.nextUInt32();if(0!==l){var c=r.openWithOffset(l);n(r,c,t.bind(null,this.IFD1))}if(a){var f=r.openWithOffset(a);n(r,f,t.bind(null,this.GPSIFD))}if(i){var h=r.openWithOffset(i),d=this.InteropIFD;n(r,h,function(e,r,n){40965===e?o=r[0]:t(d,e,r,n)})}if(o){var p=r.openWithOffset(o);n(r,p,t.bind(null,this.InteropIFD))}return!0}}},62335(e){e.exports={parseSections:function(e,t){var r,n;for(e.setBigEndian(!0);e.remainingLength()>0&&218!==n;){if(255!==e.nextUInt8())throw new Error("Invalid JPEG section offset");r=(n=e.nextUInt8())>=208&&n<=217||218===n?0:e.nextUInt16()-2,t(n,e.branch(0,r)),e.skip(r)}},getSizeFromSOFSection:function(e){return e.skip(1),{height:e.nextUInt16(),width:e.nextUInt16()}},getSectionName:function(e){var t,r;switch(e){case 216:t="SOI";break;case 196:t="DHT";break;case 219:t="DQT";break;case 221:t="DRI";break;case 218:t="SOS";break;case 254:t="COM";break;case 217:t="EOI";break;default:e>=224&&e<=239?(t="APP",r=e-224):e>=192&&e<=207&&196!==e&&200!==e&&204!==e?(t="SOF",r=e-192):e>=208&&e<=215&&(t="RST",r=e-208)}var n={name:t};return"number"==typeof r&&(n.index=r),n}}},74942(e,t,r){var n=r(62335),i=r(58107),a=r(29062);function o(e,t,r,n,i,a,o){this.startMarker=e,this.tags=t,this.imageSize=r,this.thumbnailOffset=n,this.thumbnailLength=i,this.thumbnailType=a,this.app1Offset=o}function s(e){this.stream=e,this.flags={readBinaryTags:!1,resolveTagNames:!0,simplifyValues:!0,imageSize:!0,hidePointers:!0,returnTags:!0}}o.prototype={hasThumbnail:function(e){return!(!this.thumbnailOffset||!this.thumbnailLength||"string"==typeof e&&("image/jpeg"===e.toLowerCase().trim()?6!==this.thumbnailType:"image/tiff"!==e.toLowerCase().trim()||1!==this.thumbnailType))},getThumbnailOffset:function(){return this.app1Offset+6+this.thumbnailOffset},getThumbnailLength:function(){return this.thumbnailLength},getThumbnailBuffer:function(){return this._getThumbnailStream().nextBuffer(this.thumbnailLength)},_getThumbnailStream:function(){return this.startMarker.openWithOffset(this.getThumbnailOffset())},getImageSize:function(){return this.imageSize},getThumbnailSize:function(){var e,t=this._getThumbnailStream();return n.parseSections(t,function(t,r){"SOF"===n.getSectionName(t).name&&(e=n.getSizeFromSOFSection(r))}),e}},s.prototype={enableBinaryFields:function(e){return this.flags.readBinaryTags=!!e,this},enablePointers:function(e){return this.flags.hidePointers=!e,this},enableTagNames:function(e){return this.flags.resolveTagNames=!!e,this},enableImageSize:function(e){return this.flags.imageSize=!!e,this},enableReturnTags:function(e){return this.flags.returnTags=!!e,this},enableSimpleValues:function(e){return this.flags.simplifyValues=!!e,this},parse:function(){var e,t,s,u,l,c,f,h,d,p=this.stream.mark(),m=p.openWithOffset(0),g=this.flags;return g.resolveTagNames&&(f=r(26393)),g.resolveTagNames?(e={},h=function(t){return e[t.name]},d=function(t,r){e[t.name]=r}):(e=[],h=function(t){var r;for(r=0;r<e.length;++r)if(e[r].type===t.type&&e[r].section===t.section)return e.value},d=function(t,r){var n;for(n=0;n<e.length;++n)if(e[n].type===t.type&&e[n].section===t.section)return void(e.value=r)}),n.parseSections(m,function(r,o){var h=o.offsetFrom(p);225===r?i.parseTags(o,function(t,r,n,o){if(g.readBinaryTags||7!==o){if(513===r){if(s=n[0],g.hidePointers)return}else if(514===r){if(u=n[0],g.hidePointers)return}else if(259===r&&(l=n[0],g.hidePointers))return;if(g.returnTags)if(g.simplifyValues&&(n=a.simplifyValue(n,o)),g.resolveTagNames){var c=(t===i.GPSIFD?f.gps:f.exif)[r];c||(c=f.exif[r]),e.hasOwnProperty(c)||(e[c]=n)}else e.push({section:t,type:r,value:n})}})&&(c=h):g.imageSize&&"SOF"===n.getSectionName(r).name&&(t=n.getSizeFromSOFSection(o))}),g.simplifyValues&&(a.castDegreeValues(h,d),a.castDateValues(h,d)),new o(p,e,t,s,u,l,c)}},e.exports=s},29062(e,t,r){var n=r(58107),i=r(32297),a=[{section:n.GPSIFD,type:2,name:"GPSLatitude",refType:1,refName:"GPSLatitudeRef",posVal:"N"},{section:n.GPSIFD,type:4,name:"GPSLongitude",refType:3,refName:"GPSLongitudeRef",posVal:"E"}],o=[{section:n.SubIFD,type:306,name:"ModifyDate"},{section:n.SubIFD,type:36867,name:"DateTimeOriginal"},{section:n.SubIFD,type:36868,name:"CreateDate"},{section:n.SubIFD,type:306,name:"ModifyDate"}];e.exports={castDegreeValues:function(e,t){a.forEach(function(r){var n=e(r);if(n){var i=e({section:r.section,type:r.refType,name:r.refName})===r.posVal?1:-1,a=(n[0]+n[1]/60+n[2]/3600)*i;t(r,a)}})},castDateValues:function(e,t){o.forEach(function(r){var n=e(r);if(n){var a=i.parseExifDate(n);void 0!==a&&t(r,a)}})},simplifyValue:function(e,t){return Array.isArray(e)&&1===(e=e.map(function(e){return 10===t||5===t?e[0]/e[1]:e})).length&&(e=e[0]),e}}},60301(e,t,r){"use strict";var n=r(69600),i=Object.prototype.toString,a=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var o;arguments.length>=3&&(o=r),"[object Array]"===i.call(e)?function(e,t,r){for(var n=0,i=e.length;n<i;n++)a.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,o):"string"==typeof e?function(e,t,r){for(var n=0,i=e.length;n<i;n++)null==r?t(e.charAt(n),n,e):t.call(r,e.charAt(n),n,e)}(e,t,o):function(e,t,r){for(var n in e)a.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,o)}},89353(e){"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var i=0;i<t.length;i+=1)r[i+e.length]=t[i];return r};e.exports=function(e){var i=this;if("function"!=typeof i||"[object Function]"!==t.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var a,o=function(e){for(var t=[],r=1,n=0;r<e.length;r+=1,n+=1)t[n]=e[r];return t}(arguments),s=r(0,i.length-o.length),u=[],l=0;l<s;l++)u[l]="$"+l;if(a=Function("binder","return function ("+function(e){for(var t="",r=0;r<e.length;r+=1)t+=e[r],r+1<e.length&&(t+=",");return t}(u)+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof a){var t=i.apply(this,n(o,arguments));return Object(t)===t?t:this}return i.apply(e,n(o,arguments))}),i.prototype){var c=function(){};c.prototype=i.prototype,a.prototype=new c,c.prototype=null}return a}},66743(e,t,r){"use strict";var n=r(89353);e.exports=Function.prototype.bind||n},4233(e){"use strict";const t=function*(){}.constructor;e.exports=()=>t},70453(e,t,r){"use strict";var n,i=r(79612),a=r(69383),o=r(41237),s=r(79290),u=r(79538),l=r(58068),c=r(69675),f=r(35345),h=r(71514),d=r(58968),p=r(6188),m=r(68002),g=r(75880),b=r(70414),y=r(73093),_=Function,v=function(e){try{return _('"use strict"; return ('+e+").constructor;")()}catch(e){}},w=r(75795),x=r(30655),k=function(){throw new c},B=w?function(){try{return k}catch(e){try{return w(arguments,"callee").get}catch(e){return k}}}():k,E=r(64039)(),S=r(93628),A=r(71064),C=r(48648),I=r(11002),P=r(10076),T={},M="undefined"!=typeof Uint8Array&&S?S(Uint8Array):n,R={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":E&&S?S([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":T,"%AsyncGenerator%":T,"%AsyncGeneratorFunction%":T,"%AsyncIteratorPrototype%":T,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":a,"%eval%":eval,"%EvalError%":o,"%Float16Array%":"undefined"==typeof Float16Array?n:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":_,"%GeneratorFunction%":T,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":E&&S?S(S([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&E&&S?S((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":w,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":s,"%ReferenceError%":u,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&E&&S?S((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":E&&S?S(""[Symbol.iterator]()):n,"%Symbol%":E?Symbol:n,"%SyntaxError%":l,"%ThrowTypeError%":B,"%TypedArray%":M,"%TypeError%":c,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":f,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet,"%Function.prototype.call%":P,"%Function.prototype.apply%":I,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":A,"%Math.abs%":h,"%Math.floor%":d,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":g,"%Math.round%":b,"%Math.sign%":y,"%Reflect.getPrototypeOf%":C};if(S)try{null.error}catch(e){var F=S(S(e));R["%Error.prototype%"]=F}var O=function e(t){var r;if("%AsyncFunction%"===t)r=v("async function () {}");else if("%GeneratorFunction%"===t)r=v("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=v("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&S&&(r=S(i.prototype))}return R[t]=r,r},N={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},L=r(66743),D=r(9957),z=L.call(P,Array.prototype.concat),U=L.call(I,Array.prototype.splice),$=L.call(P,String.prototype.replace),j=L.call(P,String.prototype.slice),Z=L.call(P,RegExp.prototype.exec),G=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,W=/\\(\\)?/g,H=function(e,t){var r,n=e;if(D(N,n)&&(n="%"+(r=N[n])[0]+"%"),D(R,n)){var i=R[n];if(i===T&&(i=O(n)),void 0===i&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new l("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===Z(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=j(e,0,1),r=j(e,-1);if("%"===t&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var n=[];return $(e,G,function(e,t,r,i){n[n.length]=r?$(i,W,"$1"):t||e}),n}(e),n=r.length>0?r[0]:"",i=H("%"+n+"%",t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(n=u[0],U(r,z([0,1],u)));for(var f=1,h=!0;f<r.length;f+=1){var d=r[f],p=j(d,0,1),m=j(d,-1);if(('"'===p||"'"===p||"`"===p||'"'===m||"'"===m||"`"===m)&&p!==m)throw new l("property names with quotes must have matching quotes");if("constructor"!==d&&h||(s=!0),D(R,a="%"+(n+="."+d)+"%"))o=R[a];else if(null!=o){if(!(d in o)){if(!t)throw new c("base intrinsic for "+e+" exists, but the property is not available.");return}if(w&&f+1>=r.length){var g=w(o,d);o=(h=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:o[d]}else h=D(o,d),o=o[d];h&&!s&&(R[a]=o)}}return o}},71064(e,t,r){"use strict";var n=r(79612);e.exports=n.getPrototypeOf||null},48648(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},93628(e,t,r){"use strict";var n=r(48648),i=r(71064),a=r(7176);e.exports=n?function(e){return n(e)}:i?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return i(e)}:a?function(e){return a(e)}:null},6549(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},75795(e,t,r){"use strict";var n=r(6549);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},30592(e,t,r){"use strict";var n=r(30655),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=i},64039(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(41333);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},41333(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0}},49092(e,t,r){"use strict";var n=r(41333);e.exports=function(){return n()&&!!Symbol.toStringTag}},9957(e,t,r){"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,a=r(66743);e.exports=a.call(n,i)},251(e,t){t.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,u=(1<<s)-1,l=u>>1,c=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=256*a+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+e[t+f],f+=h,c-=8);if(0===a)a=1-l;else{if(a===u)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=l}return(d?-1:1)*o*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var o,s,u,l=8*a-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*u-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[r+d]=255&o,d+=p,o/=256,l-=8);e[r+d-p]|=128*m}},56698(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},47244(e,t,r){"use strict";var n=r(49092)(),i=r(36556)("Object.prototype.toString"),a=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===i(e)},o=function(e){return!!a(e)||null!==e&&"object"==typeof e&&"length"in e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"callee"in e&&"[object Function]"===i(e.callee)},s=function(){return a(arguments)}();a.isLegacyArguments=o,e.exports=s?a:o},69600(e){"use strict";var t,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i(function(){throw 42},null,t)}catch(e){e!==r&&(i=null)}else i=null;var a=/^\s*class\b/,o=function(e){try{var t=n.call(e);return a.test(t)}catch(e){return!1}},s=function(e){try{return!o(e)&&(n.call(e),!0)}catch(e){return!1}},u=Object.prototype.toString,l="function"==typeof Symbol&&!!Symbol.toStringTag,c=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var h=document.all;u.call(h)===u.call(document.all)&&(f=function(e){if((c||!e)&&(void 0===e||"object"==typeof e))try{var t=u.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=i?function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{i(e,null,t)}catch(e){if(e!==r)return!1}return!o(e)&&s(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(l)return s(e);if(o(e))return!1;var t=u.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&s(e)}},48184(e,t,r){"use strict";var n=r(36556),i=r(99721)(/^\s*(?:function)?\*/),a=r(49092)(),o=r(93628),s=n("Object.prototype.toString"),u=n("Function.prototype.toString"),l=r(4233);e.exports=function(e){if("function"!=typeof e)return!1;if(i(u(e)))return!0;if(!a)return"[object GeneratorFunction]"===s(e);if(!o)return!1;var t=l();return t&&o(e)===t.prototype}},13003(e){"use strict";e.exports=function(e){return e!=e}},24133(e,t,r){"use strict";var n=r(10487),i=r(38452),a=r(13003),o=r(76642),s=r(92464),u=n(o(),Number);i(u,{getPolyfill:o,implementation:a,shim:s}),e.exports=u},76642(e,t,r){"use strict";var n=r(13003);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},92464(e,t,r){"use strict";var n=r(38452),i=r(76642);e.exports=function(){var e=i();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},14035(e,t,r){"use strict";var n,i=r(36556),a=r(49092)(),o=r(9957),s=r(75795);if(a){var u=i("RegExp.prototype.exec"),l={},c=function(){throw l},f={toString:c,valueOf:c};"symbol"==typeof Symbol.toPrimitive&&(f[Symbol.toPrimitive]=c),n=function(e){if(!e||"object"!=typeof e)return!1;var t=s(e,"lastIndex");if(!t||!o(t,"value"))return!1;try{u(e,f)}catch(e){return e===l}}}else{var h=i("Object.prototype.toString");n=function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===h(e)}}e.exports=n},35680(e,t,r){"use strict";var n=r(25767);e.exports=function(e){return!!n(e)}},66624(e){var t;"undefined"!=typeof self&&self,t=function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=3)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e,t){this.width=t,this.height=e.length/t,this.data=e}return e.createEmpty=function(t,r){return new e(new Uint8ClampedArray(t*r),t)},e.prototype.get=function(e,t){return!(e<0||e>=this.width||t<0||t>=this.height||!this.data[t*this.width+e])},e.prototype.set=function(e,t,r){this.data[t*this.width+e]=r?1:0},e.prototype.setRegion=function(e,t,r,n,i){for(var a=t;a<t+n;a++)for(var o=e;o<e+r;o++)this.set(o,a,!!i)},e}();t.BitMatrix=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2);t.addOrSubtractGF=function(e,t){return e^t};var i=function(){function e(e,t,r){this.primitive=e,this.size=t,this.generatorBase=r,this.expTable=new Array(this.size),this.logTable=new Array(this.size);for(var i=1,a=0;a<this.size;a++)this.expTable[a]=i,(i*=2)>=this.size&&(i=(i^this.primitive)&this.size-1);for(a=0;a<this.size-1;a++)this.logTable[this.expTable[a]]=a;this.zero=new n.default(this,Uint8ClampedArray.from([0])),this.one=new n.default(this,Uint8ClampedArray.from([1]))}return e.prototype.multiply=function(e,t){return 0===e||0===t?0:this.expTable[(this.logTable[e]+this.logTable[t])%(this.size-1)]},e.prototype.inverse=function(e){if(0===e)throw new Error("Can't invert 0");return this.expTable[this.size-this.logTable[e]-1]},e.prototype.buildMonomial=function(e,t){if(e<0)throw new Error("Invalid monomial degree less than 0");if(0===t)return this.zero;var r=new Uint8ClampedArray(e+1);return r[0]=t,new n.default(this,r)},e.prototype.log=function(e){if(0===e)throw new Error("Can't take log(0)");return this.logTable[e]},e.prototype.exp=function(e){return this.expTable[e]},e}();t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=function(){function e(e,t){if(0===t.length)throw new Error("No coefficients.");this.field=e;var r=t.length;if(r>1&&0===t[0]){for(var n=1;n<r&&0===t[n];)n++;if(n===r)this.coefficients=e.zero.coefficients;else{this.coefficients=new Uint8ClampedArray(r-n);for(var i=0;i<this.coefficients.length;i++)this.coefficients[i]=t[n+i]}}else this.coefficients=t}return e.prototype.degree=function(){return this.coefficients.length-1},e.prototype.isZero=function(){return 0===this.coefficients[0]},e.prototype.getCoefficient=function(e){return this.coefficients[this.coefficients.length-1-e]},e.prototype.addOrSubtract=function(t){var r;if(this.isZero())return t;if(t.isZero())return this;var i=this.coefficients,a=t.coefficients;i.length>a.length&&(i=(r=[a,i])[0],a=r[1]);for(var o=new Uint8ClampedArray(a.length),s=a.length-i.length,u=0;u<s;u++)o[u]=a[u];for(u=s;u<a.length;u++)o[u]=n.addOrSubtractGF(i[u-s],a[u]);return new e(this.field,o)},e.prototype.multiply=function(t){if(0===t)return this.field.zero;if(1===t)return this;for(var r=this.coefficients.length,n=new Uint8ClampedArray(r),i=0;i<r;i++)n[i]=this.field.multiply(this.coefficients[i],t);return new e(this.field,n)},e.prototype.multiplyPoly=function(t){if(this.isZero()||t.isZero())return this.field.zero;for(var r=this.coefficients,i=r.length,a=t.coefficients,o=a.length,s=new Uint8ClampedArray(i+o-1),u=0;u<i;u++)for(var l=r[u],c=0;c<o;c++)s[u+c]=n.addOrSubtractGF(s[u+c],this.field.multiply(l,a[c]));return new e(this.field,s)},e.prototype.multiplyByMonomial=function(t,r){if(t<0)throw new Error("Invalid degree less than 0");if(0===r)return this.field.zero;for(var n=this.coefficients.length,i=new Uint8ClampedArray(n+t),a=0;a<n;a++)i[a]=this.field.multiply(this.coefficients[a],r);return new e(this.field,i)},e.prototype.evaluateAt=function(e){var t=0;if(0===e)return this.getCoefficient(0);var r=this.coefficients.length;if(1===e)return this.coefficients.forEach(function(e){t=n.addOrSubtractGF(t,e)}),t;t=this.coefficients[0];for(var i=1;i<r;i++)t=n.addOrSubtractGF(this.field.multiply(e,t),this.coefficients[i]);return t},e}();t.default=i},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4),i=r(5),a=r(11),o=r(12);function s(e){var t=o.locate(e);if(!t)return null;for(var r=0,n=t;r<n.length;r++){var s=n[r],u=a.extract(e,s),l=i.decode(u.matrix);if(l)return{binaryData:l.bytes,data:l.text,chunks:l.chunks,version:l.version,location:{topRightCorner:u.mappingFunction(s.dimension,0),topLeftCorner:u.mappingFunction(0,0),bottomRightCorner:u.mappingFunction(s.dimension,s.dimension),bottomLeftCorner:u.mappingFunction(0,s.dimension),topRightFinderPattern:s.topRight,topLeftFinderPattern:s.topLeft,bottomLeftFinderPattern:s.bottomLeft,bottomRightAlignmentPattern:s.alignmentPattern}}}return null}var u={inversionAttempts:"attemptBoth"};function l(e,t,r,i){void 0===i&&(i={});var a=u;Object.keys(a||{}).forEach(function(e){a[e]=i[e]||a[e]});var o="attemptBoth"===a.inversionAttempts||"invertFirst"===a.inversionAttempts,l="onlyInvert"===a.inversionAttempts||"invertFirst"===a.inversionAttempts,c=n.binarize(e,t,r,o),f=c.binarized,h=c.inverted,d=s(l?h:f);return d||"attemptBoth"!==a.inversionAttempts&&"invertFirst"!==a.inversionAttempts||(d=s(l?f:h)),d}l.default=l,t.default=l},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);function i(e,t,r){return e<t?t:e>r?r:e}var a=function(){function e(e,t){this.width=e,this.data=new Uint8ClampedArray(e*t)}return e.prototype.get=function(e,t){return this.data[t*this.width+e]},e.prototype.set=function(e,t,r){this.data[t*this.width+e]=r},e}();t.binarize=function(e,t,r,o){if(e.length!==t*r*4)throw new Error("Malformed data passed to binarizer.");for(var s=new a(t,r),u=0;u<t;u++)for(var l=0;l<r;l++){var c=e[4*(l*t+u)+0],f=e[4*(l*t+u)+1],h=e[4*(l*t+u)+2];s.set(u,l,.2126*c+.7152*f+.0722*h)}for(var d=Math.ceil(t/8),p=Math.ceil(r/8),m=new a(d,p),g=0;g<p;g++)for(var b=0;b<d;b++){var y=0,_=1/0,v=0;for(l=0;l<8;l++)for(u=0;u<8;u++){var w=s.get(8*b+u,8*g+l);y+=w,_=Math.min(_,w),v=Math.max(v,w)}var x=y/Math.pow(8,2);if(v-_<=24&&(x=_/2,g>0&&b>0)){var k=(m.get(b,g-1)+2*m.get(b-1,g)+m.get(b-1,g-1))/4;_<k&&(x=k)}m.set(b,g,x)}var B=n.BitMatrix.createEmpty(t,r),E=null;for(o&&(E=n.BitMatrix.createEmpty(t,r)),g=0;g<p;g++)for(b=0;b<d;b++){for(var S=i(b,2,d-3),A=i(g,2,p-3),C=(y=0,-2);C<=2;C++)for(var I=-2;I<=2;I++)y+=m.get(S+C,A+I);var P=y/25;for(C=0;C<8;C++)for(I=0;I<8;I++){u=8*b+C,l=8*g+I;var T=s.get(u,l);B.set(u,l,T<=P),o&&E.set(u,l,!(T<=P))}}return o?{binarized:B,inverted:E}:{binarized:B}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0),i=r(6),a=r(9),o=r(10);function s(e,t){for(var r=e^t,n=0;r;)n++,r&=r-1;return n}function u(e,t){return t<<1|e}var l=[{bits:21522,formatInfo:{errorCorrectionLevel:1,dataMask:0}},{bits:20773,formatInfo:{errorCorrectionLevel:1,dataMask:1}},{bits:24188,formatInfo:{errorCorrectionLevel:1,dataMask:2}},{bits:23371,formatInfo:{errorCorrectionLevel:1,dataMask:3}},{bits:17913,formatInfo:{errorCorrectionLevel:1,dataMask:4}},{bits:16590,formatInfo:{errorCorrectionLevel:1,dataMask:5}},{bits:20375,formatInfo:{errorCorrectionLevel:1,dataMask:6}},{bits:19104,formatInfo:{errorCorrectionLevel:1,dataMask:7}},{bits:30660,formatInfo:{errorCorrectionLevel:0,dataMask:0}},{bits:29427,formatInfo:{errorCorrectionLevel:0,dataMask:1}},{bits:32170,formatInfo:{errorCorrectionLevel:0,dataMask:2}},{bits:30877,formatInfo:{errorCorrectionLevel:0,dataMask:3}},{bits:26159,formatInfo:{errorCorrectionLevel:0,dataMask:4}},{bits:25368,formatInfo:{errorCorrectionLevel:0,dataMask:5}},{bits:27713,formatInfo:{errorCorrectionLevel:0,dataMask:6}},{bits:26998,formatInfo:{errorCorrectionLevel:0,dataMask:7}},{bits:5769,formatInfo:{errorCorrectionLevel:3,dataMask:0}},{bits:5054,formatInfo:{errorCorrectionLevel:3,dataMask:1}},{bits:7399,formatInfo:{errorCorrectionLevel:3,dataMask:2}},{bits:6608,formatInfo:{errorCorrectionLevel:3,dataMask:3}},{bits:1890,formatInfo:{errorCorrectionLevel:3,dataMask:4}},{bits:597,formatInfo:{errorCorrectionLevel:3,dataMask:5}},{bits:3340,formatInfo:{errorCorrectionLevel:3,dataMask:6}},{bits:2107,formatInfo:{errorCorrectionLevel:3,dataMask:7}},{bits:13663,formatInfo:{errorCorrectionLevel:2,dataMask:0}},{bits:12392,formatInfo:{errorCorrectionLevel:2,dataMask:1}},{bits:16177,formatInfo:{errorCorrectionLevel:2,dataMask:2}},{bits:14854,formatInfo:{errorCorrectionLevel:2,dataMask:3}},{bits:9396,formatInfo:{errorCorrectionLevel:2,dataMask:4}},{bits:8579,formatInfo:{errorCorrectionLevel:2,dataMask:5}},{bits:11994,formatInfo:{errorCorrectionLevel:2,dataMask:6}},{bits:11245,formatInfo:{errorCorrectionLevel:2,dataMask:7}}],c=[function(e){return(e.y+e.x)%2==0},function(e){return e.y%2==0},function(e){return e.x%3==0},function(e){return(e.y+e.x)%3==0},function(e){return(Math.floor(e.y/2)+Math.floor(e.x/3))%2==0},function(e){return e.x*e.y%2+e.x*e.y%3==0},function(e){return(e.y*e.x%2+e.y*e.x%3)%2==0},function(e){return((e.y+e.x)%2+e.y*e.x%3)%2==0}];function f(e){var t=function(e){var t=e.height,r=Math.floor((t-17)/4);if(r<=6)return o.VERSIONS[r-1];for(var n=0,i=5;i>=0;i--)for(var a=t-9;a>=t-11;a--)n=u(e.get(a,i),n);var l=0;for(a=5;a>=0;a--)for(i=t-9;i>=t-11;i--)l=u(e.get(a,i),l);for(var c,f=1/0,h=0,d=o.VERSIONS;h<d.length;h++){var p=d[h];if(p.infoBits===n||p.infoBits===l)return p;var m=s(n,p.infoBits);m<f&&(c=p,f=m),(m=s(l,p.infoBits))<f&&(c=p,f=m)}return f<=3?c:void 0}(e);if(!t)return null;var r=function(e){for(var t=0,r=0;r<=8;r++)6!==r&&(t=u(e.get(r,8),t));for(var n=7;n>=0;n--)6!==n&&(t=u(e.get(8,n),t));var i=e.height,a=0;for(n=i-1;n>=i-7;n--)a=u(e.get(8,n),a);for(r=i-8;r<i;r++)a=u(e.get(r,8),a);for(var o=1/0,c=null,f=0,h=l;f<h.length;f++){var d=h[f],p=d.bits,m=d.formatInfo;if(p===t||p===a)return m;var g=s(t,p);g<o&&(c=m,o=g),t!==a&&(g=s(a,p))<o&&(c=m,o=g)}return o<=3?c:null}(e);if(!r)return null;var f=function(e,t,r){var n=t.errorCorrectionLevels[r],i=[],a=0;if(n.ecBlocks.forEach(function(e){for(var t=0;t<e.numBlocks;t++)i.push({numDataCodewords:e.dataCodewordsPerBlock,codewords:[]}),a+=e.dataCodewordsPerBlock+n.ecCodewordsPerBlock}),e.length<a)return null;e=e.slice(0,a);for(var o=n.ecBlocks[0].dataCodewordsPerBlock,s=0;s<o;s++)for(var u=0,l=i;u<l.length;u++)l[u].codewords.push(e.shift());if(n.ecBlocks.length>1){var c=n.ecBlocks[0].numBlocks,f=n.ecBlocks[1].numBlocks;for(s=0;s<f;s++)i[c+s].codewords.push(e.shift())}for(;e.length>0;)for(var h=0,d=i;h<d.length;h++)d[h].codewords.push(e.shift());return i}(function(e,t,r){for(var i=c[r.dataMask],a=e.height,o=function(e){var t=17+4*e.versionNumber,r=n.BitMatrix.createEmpty(t,t);r.setRegion(0,0,9,9,!0),r.setRegion(t-8,0,8,9,!0),r.setRegion(0,t-8,9,8,!0);for(var i=0,a=e.alignmentPatternCenters;i<a.length;i++)for(var o=a[i],s=0,u=e.alignmentPatternCenters;s<u.length;s++){var l=u[s];6===o&&6===l||6===o&&l===t-7||o===t-7&&6===l||r.setRegion(o-2,l-2,5,5,!0)}return r.setRegion(6,9,1,t-17,!0),r.setRegion(9,6,t-17,1,!0),e.versionNumber>6&&(r.setRegion(t-11,0,3,6,!0),r.setRegion(0,t-11,6,3,!0)),r}(t),s=[],l=0,f=0,h=!0,d=a-1;d>0;d-=2){6===d&&d--;for(var p=0;p<a;p++)for(var m=h?a-1-p:p,g=0;g<2;g++){var b=d-g;if(!o.get(b,m)){f++;var y=e.get(b,m);i({y:m,x:b})&&(y=!y),l=u(y,l),8===f&&(s.push(l),f=0,l=0)}}h=!h}return s}(e,t,r),t,r.errorCorrectionLevel);if(!f)return null;for(var h=f.reduce(function(e,t){return e+t.numDataCodewords},0),d=new Uint8ClampedArray(h),p=0,m=0,g=f;m<g.length;m++){var b=g[m],y=a.decode(b.codewords,b.codewords.length-b.numDataCodewords);if(!y)return null;for(var _=0;_<b.numDataCodewords;_++)d[p++]=y[_]}try{return i.decode(d,t.versionNumber)}catch(e){return null}}t.decode=function(e){if(null==e)return null;var t=f(e);if(t)return t;for(var r=0;r<e.width;r++)for(var n=r+1;n<e.height;n++)e.get(r,n)!==e.get(n,r)&&(e.set(r,n,!e.get(r,n)),e.set(n,r,!e.get(n,r)));return f(e)}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,i,a=r(7),o=r(8);function s(e,t){for(var r=[],n="",i=[10,12,14][t],a=e.readBits(i);a>=3;){if((l=e.readBits(10))>=1e3)throw new Error("Invalid numeric value above 999");var o=Math.floor(l/100),s=Math.floor(l/10)%10,u=l%10;r.push(48+o,48+s,48+u),n+=o.toString()+s.toString()+u.toString(),a-=3}if(2===a){if((l=e.readBits(7))>=100)throw new Error("Invalid numeric value above 99");o=Math.floor(l/10),s=l%10,r.push(48+o,48+s),n+=o.toString()+s.toString()}else if(1===a){var l;if((l=e.readBits(4))>=10)throw new Error("Invalid numeric value above 9");r.push(48+l),n+=l.toString()}return{bytes:r,text:n}}!function(e){e.Numeric="numeric",e.Alphanumeric="alphanumeric",e.Byte="byte",e.Kanji="kanji",e.ECI="eci"}(n=t.Mode||(t.Mode={})),function(e){e[e.Terminator=0]="Terminator",e[e.Numeric=1]="Numeric",e[e.Alphanumeric=2]="Alphanumeric",e[e.Byte=4]="Byte",e[e.Kanji=8]="Kanji",e[e.ECI=7]="ECI"}(i||(i={}));var u=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function l(e,t){for(var r=[],n="",i=[9,11,13][t],a=e.readBits(i);a>=2;){var o=e.readBits(11),s=Math.floor(o/45),l=o%45;r.push(u[s].charCodeAt(0),u[l].charCodeAt(0)),n+=u[s]+u[l],a-=2}return 1===a&&(s=e.readBits(6),r.push(u[s].charCodeAt(0)),n+=u[s]),{bytes:r,text:n}}function c(e,t){for(var r=[],n="",i=[8,16,16][t],a=e.readBits(i),o=0;o<a;o++){var s=e.readBits(8);r.push(s)}try{n+=decodeURIComponent(r.map(function(e){return"%"+("0"+e.toString(16)).substr(-2)}).join(""))}catch(e){}return{bytes:r,text:n}}function f(e,t){for(var r=[],n="",i=[8,10,12][t],a=e.readBits(i),s=0;s<a;s++){var u=e.readBits(13),l=Math.floor(u/192)<<8|u%192;l+=l<7936?33088:49472,r.push(l>>8,255&l),n+=String.fromCharCode(o.shiftJISTable[l])}return{bytes:r,text:n}}t.decode=function(e,t){for(var r,o,u,h,d=new a.BitStream(e),p=t<=9?0:t<=26?1:2,m={text:"",bytes:[],chunks:[],version:t};d.available()>=4;){var g=d.readBits(4);if(g===i.Terminator)return m;if(g===i.ECI)0===d.readBits(1)?m.chunks.push({type:n.ECI,assignmentNumber:d.readBits(7)}):0===d.readBits(1)?m.chunks.push({type:n.ECI,assignmentNumber:d.readBits(14)}):0===d.readBits(1)?m.chunks.push({type:n.ECI,assignmentNumber:d.readBits(21)}):m.chunks.push({type:n.ECI,assignmentNumber:-1});else if(g===i.Numeric){var b=s(d,p);m.text+=b.text,(r=m.bytes).push.apply(r,b.bytes),m.chunks.push({type:n.Numeric,text:b.text})}else if(g===i.Alphanumeric){var y=l(d,p);m.text+=y.text,(o=m.bytes).push.apply(o,y.bytes),m.chunks.push({type:n.Alphanumeric,text:y.text})}else if(g===i.Byte){var _=c(d,p);m.text+=_.text,(u=m.bytes).push.apply(u,_.bytes),m.chunks.push({type:n.Byte,bytes:_.bytes,text:_.text})}else if(g===i.Kanji){var v=f(d,p);m.text+=v.text,(h=m.bytes).push.apply(h,v.bytes),m.chunks.push({type:n.Kanji,bytes:v.bytes,text:v.text})}}if(0===d.available()||0===d.readBits(d.available()))return m}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(e){this.byteOffset=0,this.bitOffset=0,this.bytes=e}return e.prototype.readBits=function(e){if(e<1||e>32||e>this.available())throw new Error("Cannot read "+e.toString()+" bits");var t=0;if(this.bitOffset>0){var r=8-this.bitOffset,n=e<r?e:r,i=255>>8-n<<(a=r-n);t=(this.bytes[this.byteOffset]&i)>>a,e-=n,this.bitOffset+=n,8===this.bitOffset&&(this.bitOffset=0,this.byteOffset++)}if(e>0){for(;e>=8;)t=t<<8|255&this.bytes[this.byteOffset],this.byteOffset++,e-=8;var a;e>0&&(i=255>>(a=8-e)<<a,t=t<<e|(this.bytes[this.byteOffset]&i)>>a,this.bitOffset+=e)}return t},e.prototype.available=function(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset},e}();t.BitStream=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shiftJISTable={32:32,33:33,34:34,35:35,36:36,37:37,38:38,39:39,40:40,41:41,42:42,43:43,44:44,45:45,46:46,47:47,48:48,49:49,50:50,51:51,52:52,53:53,54:54,55:55,56:56,57:57,58:58,59:59,60:60,61:61,62:62,63:63,64:64,65:65,66:66,67:67,68:68,69:69,70:70,71:71,72:72,73:73,74:74,75:75,76:76,77:77,78:78,79:79,80:80,81:81,82:82,83:83,84:84,85:85,86:86,87:87,88:88,89:89,90:90,91:91,92:165,93:93,94:94,95:95,96:96,97:97,98:98,99:99,100:100,101:101,102:102,103:103,104:104,105:105,106:106,107:107,108:108,109:109,110:110,111:111,112:112,113:113,114:114,115:115,116:116,117:117,118:118,119:119,120:120,121:121,122:122,123:123,124:124,125:125,126:8254,33088:12288,33089:12289,33090:12290,33091:65292,33092:65294,33093:12539,33094:65306,33095:65307,33096:65311,33097:65281,33098:12443,33099:12444,33100:180,33101:65344,33102:168,33103:65342,33104:65507,33105:65343,33106:12541,33107:12542,33108:12445,33109:12446,33110:12291,33111:20189,33112:12293,33113:12294,33114:12295,33115:12540,33116:8213,33117:8208,33118:65295,33119:92,33120:12316,33121:8214,33122:65372,33123:8230,33124:8229,33125:8216,33126:8217,33127:8220,33128:8221,33129:65288,33130:65289,33131:12308,33132:12309,33133:65339,33134:65341,33135:65371,33136:65373,33137:12296,33138:12297,33139:12298,33140:12299,33141:12300,33142:12301,33143:12302,33144:12303,33145:12304,33146:12305,33147:65291,33148:8722,33149:177,33150:215,33152:247,33153:65309,33154:8800,33155:65308,33156:65310,33157:8806,33158:8807,33159:8734,33160:8756,33161:9794,33162:9792,33163:176,33164:8242,33165:8243,33166:8451,33167:65509,33168:65284,33169:162,33170:163,33171:65285,33172:65283,33173:65286,33174:65290,33175:65312,33176:167,33177:9734,33178:9733,33179:9675,33180:9679,33181:9678,33182:9671,33183:9670,33184:9633,33185:9632,33186:9651,33187:9650,33188:9661,33189:9660,33190:8251,33191:12306,33192:8594,33193:8592,33194:8593,33195:8595,33196:12307,33208:8712,33209:8715,33210:8838,33211:8839,33212:8834,33213:8835,33214:8746,33215:8745,33224:8743,33225:8744,33226:172,33227:8658,33228:8660,33229:8704,33230:8707,33242:8736,33243:8869,33244:8978,33245:8706,33246:8711,33247:8801,33248:8786,33249:8810,33250:8811,33251:8730,33252:8765,33253:8733,33254:8757,33255:8747,33256:8748,33264:8491,33265:8240,33266:9839,33267:9837,33268:9834,33269:8224,33270:8225,33271:182,33276:9711,33359:65296,33360:65297,33361:65298,33362:65299,33363:65300,33364:65301,33365:65302,33366:65303,33367:65304,33368:65305,33376:65313,33377:65314,33378:65315,33379:65316,33380:65317,33381:65318,33382:65319,33383:65320,33384:65321,33385:65322,33386:65323,33387:65324,33388:65325,33389:65326,33390:65327,33391:65328,33392:65329,33393:65330,33394:65331,33395:65332,33396:65333,33397:65334,33398:65335,33399:65336,33400:65337,33401:65338,33409:65345,33410:65346,33411:65347,33412:65348,33413:65349,33414:65350,33415:65351,33416:65352,33417:65353,33418:65354,33419:65355,33420:65356,33421:65357,33422:65358,33423:65359,33424:65360,33425:65361,33426:65362,33427:65363,33428:65364,33429:65365,33430:65366,33431:65367,33432:65368,33433:65369,33434:65370,33439:12353,33440:12354,33441:12355,33442:12356,33443:12357,33444:12358,33445:12359,33446:12360,33447:12361,33448:12362,33449:12363,33450:12364,33451:12365,33452:12366,33453:12367,33454:12368,33455:12369,33456:12370,33457:12371,33458:12372,33459:12373,33460:12374,33461:12375,33462:12376,33463:12377,33464:12378,33465:12379,33466:12380,33467:12381,33468:12382,33469:12383,33470:12384,33471:12385,33472:12386,33473:12387,33474:12388,33475:12389,33476:12390,33477:12391,33478:12392,33479:12393,33480:12394,33481:12395,33482:12396,33483:12397,33484:12398,33485:12399,33486:12400,33487:12401,33488:12402,33489:12403,33490:12404,33491:12405,33492:12406,33493:12407,33494:12408,33495:12409,33496:12410,33497:12411,33498:12412,33499:12413,33500:12414,33501:12415,33502:12416,33503:12417,33504:12418,33505:12419,33506:12420,33507:12421,33508:12422,33509:12423,33510:12424,33511:12425,33512:12426,33513:12427,33514:12428,33515:12429,33516:12430,33517:12431,33518:12432,33519:12433,33520:12434,33521:12435,33600:12449,33601:12450,33602:12451,33603:12452,33604:12453,33605:12454,33606:12455,33607:12456,33608:12457,33609:12458,33610:12459,33611:12460,33612:12461,33613:12462,33614:12463,33615:12464,33616:12465,33617:12466,33618:12467,33619:12468,33620:12469,33621:12470,33622:12471,33623:12472,33624:12473,33625:12474,33626:12475,33627:12476,33628:12477,33629:12478,33630:12479,33631:12480,33632:12481,33633:12482,33634:12483,33635:12484,33636:12485,33637:12486,33638:12487,33639:12488,33640:12489,33641:12490,33642:12491,33643:12492,33644:12493,33645:12494,33646:12495,33647:12496,33648:12497,33649:12498,33650:12499,33651:12500,33652:12501,33653:12502,33654:12503,33655:12504,33656:12505,33657:12506,33658:12507,33659:12508,33660:12509,33661:12510,33662:12511,33664:12512,33665:12513,33666:12514,33667:12515,33668:12516,33669:12517,33670:12518,33671:12519,33672:12520,33673:12521,33674:12522,33675:12523,33676:12524,33677:12525,33678:12526,33679:12527,33680:12528,33681:12529,33682:12530,33683:12531,33684:12532,33685:12533,33686:12534,33695:913,33696:914,33697:915,33698:916,33699:917,33700:918,33701:919,33702:920,33703:921,33704:922,33705:923,33706:924,33707:925,33708:926,33709:927,33710:928,33711:929,33712:931,33713:932,33714:933,33715:934,33716:935,33717:936,33718:937,33727:945,33728:946,33729:947,33730:948,33731:949,33732:950,33733:951,33734:952,33735:953,33736:954,33737:955,33738:956,33739:957,33740:958,33741:959,33742:960,33743:961,33744:963,33745:964,33746:965,33747:966,33748:967,33749:968,33750:969,33856:1040,33857:1041,33858:1042,33859:1043,33860:1044,33861:1045,33862:1025,33863:1046,33864:1047,33865:1048,33866:1049,33867:1050,33868:1051,33869:1052,33870:1053,33871:1054,33872:1055,33873:1056,33874:1057,33875:1058,33876:1059,33877:1060,33878:1061,33879:1062,33880:1063,33881:1064,33882:1065,33883:1066,33884:1067,33885:1068,33886:1069,33887:1070,33888:1071,33904:1072,33905:1073,33906:1074,33907:1075,33908:1076,33909:1077,33910:1105,33911:1078,33912:1079,33913:1080,33914:1081,33915:1082,33916:1083,33917:1084,33918:1085,33920:1086,33921:1087,33922:1088,33923:1089,33924:1090,33925:1091,33926:1092,33927:1093,33928:1094,33929:1095,33930:1096,33931:1097,33932:1098,33933:1099,33934:1100,33935:1101,33936:1102,33937:1103,33951:9472,33952:9474,33953:9484,33954:9488,33955:9496,33956:9492,33957:9500,33958:9516,33959:9508,33960:9524,33961:9532,33962:9473,33963:9475,33964:9487,33965:9491,33966:9499,33967:9495,33968:9507,33969:9523,33970:9515,33971:9531,33972:9547,33973:9504,33974:9519,33975:9512,33976:9527,33977:9535,33978:9501,33979:9520,33980:9509,33981:9528,33982:9538,34975:20124,34976:21782,34977:23043,34978:38463,34979:21696,34980:24859,34981:25384,34982:23030,34983:36898,34984:33909,34985:33564,34986:31312,34987:24746,34988:25569,34989:28197,34990:26093,34991:33894,34992:33446,34993:39925,34994:26771,34995:22311,34996:26017,34997:25201,34998:23451,34999:22992,35e3:34427,35001:39156,35002:32098,35003:32190,35004:39822,35005:25110,35006:31903,35007:34999,35008:23433,35009:24245,35010:25353,35011:26263,35012:26696,35013:38343,35014:38797,35015:26447,35016:20197,35017:20234,35018:20301,35019:20381,35020:20553,35021:22258,35022:22839,35023:22996,35024:23041,35025:23561,35026:24799,35027:24847,35028:24944,35029:26131,35030:26885,35031:28858,35032:30031,35033:30064,35034:31227,35035:32173,35036:32239,35037:32963,35038:33806,35039:34915,35040:35586,35041:36949,35042:36986,35043:21307,35044:20117,35045:20133,35046:22495,35047:32946,35048:37057,35049:30959,35050:19968,35051:22769,35052:28322,35053:36920,35054:31282,35055:33576,35056:33419,35057:39983,35058:20801,35059:21360,35060:21693,35061:21729,35062:22240,35063:23035,35064:24341,35065:39154,35066:28139,35067:32996,35068:34093,35136:38498,35137:38512,35138:38560,35139:38907,35140:21515,35141:21491,35142:23431,35143:28879,35144:32701,35145:36802,35146:38632,35147:21359,35148:40284,35149:31418,35150:19985,35151:30867,35152:33276,35153:28198,35154:22040,35155:21764,35156:27421,35157:34074,35158:39995,35159:23013,35160:21417,35161:28006,35162:29916,35163:38287,35164:22082,35165:20113,35166:36939,35167:38642,35168:33615,35169:39180,35170:21473,35171:21942,35172:23344,35173:24433,35174:26144,35175:26355,35176:26628,35177:27704,35178:27891,35179:27945,35180:29787,35181:30408,35182:31310,35183:38964,35184:33521,35185:34907,35186:35424,35187:37613,35188:28082,35189:30123,35190:30410,35191:39365,35192:24742,35193:35585,35194:36234,35195:38322,35196:27022,35197:21421,35198:20870,35200:22290,35201:22576,35202:22852,35203:23476,35204:24310,35205:24616,35206:25513,35207:25588,35208:27839,35209:28436,35210:28814,35211:28948,35212:29017,35213:29141,35214:29503,35215:32257,35216:33398,35217:33489,35218:34199,35219:36960,35220:37467,35221:40219,35222:22633,35223:26044,35224:27738,35225:29989,35226:20985,35227:22830,35228:22885,35229:24448,35230:24540,35231:25276,35232:26106,35233:27178,35234:27431,35235:27572,35236:29579,35237:32705,35238:35158,35239:40236,35240:40206,35241:40644,35242:23713,35243:27798,35244:33659,35245:20740,35246:23627,35247:25014,35248:33222,35249:26742,35250:29281,35251:20057,35252:20474,35253:21368,35254:24681,35255:28201,35256:31311,35257:38899,35258:19979,35259:21270,35260:20206,35261:20309,35262:20285,35263:20385,35264:20339,35265:21152,35266:21487,35267:22025,35268:22799,35269:23233,35270:23478,35271:23521,35272:31185,35273:26247,35274:26524,35275:26550,35276:27468,35277:27827,35278:28779,35279:29634,35280:31117,35281:31166,35282:31292,35283:31623,35284:33457,35285:33499,35286:33540,35287:33655,35288:33775,35289:33747,35290:34662,35291:35506,35292:22057,35293:36008,35294:36838,35295:36942,35296:38686,35297:34442,35298:20420,35299:23784,35300:25105,35301:29273,35302:30011,35303:33253,35304:33469,35305:34558,35306:36032,35307:38597,35308:39187,35309:39381,35310:20171,35311:20250,35312:35299,35313:22238,35314:22602,35315:22730,35316:24315,35317:24555,35318:24618,35319:24724,35320:24674,35321:25040,35322:25106,35323:25296,35324:25913,35392:39745,35393:26214,35394:26800,35395:28023,35396:28784,35397:30028,35398:30342,35399:32117,35400:33445,35401:34809,35402:38283,35403:38542,35404:35997,35405:20977,35406:21182,35407:22806,35408:21683,35409:23475,35410:23830,35411:24936,35412:27010,35413:28079,35414:30861,35415:33995,35416:34903,35417:35442,35418:37799,35419:39608,35420:28012,35421:39336,35422:34521,35423:22435,35424:26623,35425:34510,35426:37390,35427:21123,35428:22151,35429:21508,35430:24275,35431:25313,35432:25785,35433:26684,35434:26680,35435:27579,35436:29554,35437:30906,35438:31339,35439:35226,35440:35282,35441:36203,35442:36611,35443:37101,35444:38307,35445:38548,35446:38761,35447:23398,35448:23731,35449:27005,35450:38989,35451:38990,35452:25499,35453:31520,35454:27179,35456:27263,35457:26806,35458:39949,35459:28511,35460:21106,35461:21917,35462:24688,35463:25324,35464:27963,35465:28167,35466:28369,35467:33883,35468:35088,35469:36676,35470:19988,35471:39993,35472:21494,35473:26907,35474:27194,35475:38788,35476:26666,35477:20828,35478:31427,35479:33970,35480:37340,35481:37772,35482:22107,35483:40232,35484:26658,35485:33541,35486:33841,35487:31909,35488:21e3,35489:33477,35490:29926,35491:20094,35492:20355,35493:20896,35494:23506,35495:21002,35496:21208,35497:21223,35498:24059,35499:21914,35500:22570,35501:23014,35502:23436,35503:23448,35504:23515,35505:24178,35506:24185,35507:24739,35508:24863,35509:24931,35510:25022,35511:25563,35512:25954,35513:26577,35514:26707,35515:26874,35516:27454,35517:27475,35518:27735,35519:28450,35520:28567,35521:28485,35522:29872,35523:29976,35524:30435,35525:30475,35526:31487,35527:31649,35528:31777,35529:32233,35530:32566,35531:32752,35532:32925,35533:33382,35534:33694,35535:35251,35536:35532,35537:36011,35538:36996,35539:37969,35540:38291,35541:38289,35542:38306,35543:38501,35544:38867,35545:39208,35546:33304,35547:20024,35548:21547,35549:23736,35550:24012,35551:29609,35552:30284,35553:30524,35554:23721,35555:32747,35556:36107,35557:38593,35558:38929,35559:38996,35560:39e3,35561:20225,35562:20238,35563:21361,35564:21916,35565:22120,35566:22522,35567:22855,35568:23305,35569:23492,35570:23696,35571:24076,35572:24190,35573:24524,35574:25582,35575:26426,35576:26071,35577:26082,35578:26399,35579:26827,35580:26820,35648:27231,35649:24112,35650:27589,35651:27671,35652:27773,35653:30079,35654:31048,35655:23395,35656:31232,35657:32e3,35658:24509,35659:35215,35660:35352,35661:36020,35662:36215,35663:36556,35664:36637,35665:39138,35666:39438,35667:39740,35668:20096,35669:20605,35670:20736,35671:22931,35672:23452,35673:25135,35674:25216,35675:25836,35676:27450,35677:29344,35678:30097,35679:31047,35680:32681,35681:34811,35682:35516,35683:35696,35684:25516,35685:33738,35686:38816,35687:21513,35688:21507,35689:21931,35690:26708,35691:27224,35692:35440,35693:30759,35694:26485,35695:40653,35696:21364,35697:23458,35698:33050,35699:34384,35700:36870,35701:19992,35702:20037,35703:20167,35704:20241,35705:21450,35706:21560,35707:23470,35708:24339,35709:24613,35710:25937,35712:26429,35713:27714,35714:27762,35715:27875,35716:28792,35717:29699,35718:31350,35719:31406,35720:31496,35721:32026,35722:31998,35723:32102,35724:26087,35725:29275,35726:21435,35727:23621,35728:24040,35729:25298,35730:25312,35731:25369,35732:28192,35733:34394,35734:35377,35735:36317,35736:37624,35737:28417,35738:31142,35739:39770,35740:20136,35741:20139,35742:20140,35743:20379,35744:20384,35745:20689,35746:20807,35747:31478,35748:20849,35749:20982,35750:21332,35751:21281,35752:21375,35753:21483,35754:21932,35755:22659,35756:23777,35757:24375,35758:24394,35759:24623,35760:24656,35761:24685,35762:25375,35763:25945,35764:27211,35765:27841,35766:29378,35767:29421,35768:30703,35769:33016,35770:33029,35771:33288,35772:34126,35773:37111,35774:37857,35775:38911,35776:39255,35777:39514,35778:20208,35779:20957,35780:23597,35781:26241,35782:26989,35783:23616,35784:26354,35785:26997,35786:29577,35787:26704,35788:31873,35789:20677,35790:21220,35791:22343,35792:24062,35793:37670,35794:26020,35795:27427,35796:27453,35797:29748,35798:31105,35799:31165,35800:31563,35801:32202,35802:33465,35803:33740,35804:34943,35805:35167,35806:35641,35807:36817,35808:37329,35809:21535,35810:37504,35811:20061,35812:20534,35813:21477,35814:21306,35815:29399,35816:29590,35817:30697,35818:33510,35819:36527,35820:39366,35821:39368,35822:39378,35823:20855,35824:24858,35825:34398,35826:21936,35827:31354,35828:20598,35829:23507,35830:36935,35831:38533,35832:20018,35833:27355,35834:37351,35835:23633,35836:23624,35904:25496,35905:31391,35906:27795,35907:38772,35908:36705,35909:31402,35910:29066,35911:38536,35912:31874,35913:26647,35914:32368,35915:26705,35916:37740,35917:21234,35918:21531,35919:34219,35920:35347,35921:32676,35922:36557,35923:37089,35924:21350,35925:34952,35926:31041,35927:20418,35928:20670,35929:21009,35930:20804,35931:21843,35932:22317,35933:29674,35934:22411,35935:22865,35936:24418,35937:24452,35938:24693,35939:24950,35940:24935,35941:25001,35942:25522,35943:25658,35944:25964,35945:26223,35946:26690,35947:28179,35948:30054,35949:31293,35950:31995,35951:32076,35952:32153,35953:32331,35954:32619,35955:33550,35956:33610,35957:34509,35958:35336,35959:35427,35960:35686,35961:36605,35962:38938,35963:40335,35964:33464,35965:36814,35966:39912,35968:21127,35969:25119,35970:25731,35971:28608,35972:38553,35973:26689,35974:20625,35975:27424,35976:27770,35977:28500,35978:31348,35979:32080,35980:34880,35981:35363,35982:26376,35983:20214,35984:20537,35985:20518,35986:20581,35987:20860,35988:21048,35989:21091,35990:21927,35991:22287,35992:22533,35993:23244,35994:24314,35995:25010,35996:25080,35997:25331,35998:25458,35999:26908,36e3:27177,36001:29309,36002:29356,36003:29486,36004:30740,36005:30831,36006:32121,36007:30476,36008:32937,36009:35211,36010:35609,36011:36066,36012:36562,36013:36963,36014:37749,36015:38522,36016:38997,36017:39443,36018:40568,36019:20803,36020:21407,36021:21427,36022:24187,36023:24358,36024:28187,36025:28304,36026:29572,36027:29694,36028:32067,36029:33335,36030:35328,36031:35578,36032:38480,36033:20046,36034:20491,36035:21476,36036:21628,36037:22266,36038:22993,36039:23396,36040:24049,36041:24235,36042:24359,36043:25144,36044:25925,36045:26543,36046:28246,36047:29392,36048:31946,36049:34996,36050:32929,36051:32993,36052:33776,36053:34382,36054:35463,36055:36328,36056:37431,36057:38599,36058:39015,36059:40723,36060:20116,36061:20114,36062:20237,36063:21320,36064:21577,36065:21566,36066:23087,36067:24460,36068:24481,36069:24735,36070:26791,36071:27278,36072:29786,36073:30849,36074:35486,36075:35492,36076:35703,36077:37264,36078:20062,36079:39881,36080:20132,36081:20348,36082:20399,36083:20505,36084:20502,36085:20809,36086:20844,36087:21151,36088:21177,36089:21246,36090:21402,36091:21475,36092:21521,36160:21518,36161:21897,36162:22353,36163:22434,36164:22909,36165:23380,36166:23389,36167:23439,36168:24037,36169:24039,36170:24055,36171:24184,36172:24195,36173:24218,36174:24247,36175:24344,36176:24658,36177:24908,36178:25239,36179:25304,36180:25511,36181:25915,36182:26114,36183:26179,36184:26356,36185:26477,36186:26657,36187:26775,36188:27083,36189:27743,36190:27946,36191:28009,36192:28207,36193:28317,36194:30002,36195:30343,36196:30828,36197:31295,36198:31968,36199:32005,36200:32024,36201:32094,36202:32177,36203:32789,36204:32771,36205:32943,36206:32945,36207:33108,36208:33167,36209:33322,36210:33618,36211:34892,36212:34913,36213:35611,36214:36002,36215:36092,36216:37066,36217:37237,36218:37489,36219:30783,36220:37628,36221:38308,36222:38477,36224:38917,36225:39321,36226:39640,36227:40251,36228:21083,36229:21163,36230:21495,36231:21512,36232:22741,36233:25335,36234:28640,36235:35946,36236:36703,36237:40633,36238:20811,36239:21051,36240:21578,36241:22269,36242:31296,36243:37239,36244:40288,36245:40658,36246:29508,36247:28425,36248:33136,36249:29969,36250:24573,36251:24794,36252:39592,36253:29403,36254:36796,36255:27492,36256:38915,36257:20170,36258:22256,36259:22372,36260:22718,36261:23130,36262:24680,36263:25031,36264:26127,36265:26118,36266:26681,36267:26801,36268:28151,36269:30165,36270:32058,36271:33390,36272:39746,36273:20123,36274:20304,36275:21449,36276:21766,36277:23919,36278:24038,36279:24046,36280:26619,36281:27801,36282:29811,36283:30722,36284:35408,36285:37782,36286:35039,36287:22352,36288:24231,36289:25387,36290:20661,36291:20652,36292:20877,36293:26368,36294:21705,36295:22622,36296:22971,36297:23472,36298:24425,36299:25165,36300:25505,36301:26685,36302:27507,36303:28168,36304:28797,36305:37319,36306:29312,36307:30741,36308:30758,36309:31085,36310:25998,36311:32048,36312:33756,36313:35009,36314:36617,36315:38555,36316:21092,36317:22312,36318:26448,36319:32618,36320:36001,36321:20916,36322:22338,36323:38442,36324:22586,36325:27018,36326:32948,36327:21682,36328:23822,36329:22524,36330:30869,36331:40442,36332:20316,36333:21066,36334:21643,36335:25662,36336:26152,36337:26388,36338:26613,36339:31364,36340:31574,36341:32034,36342:37679,36343:26716,36344:39853,36345:31545,36346:21273,36347:20874,36348:21047,36416:23519,36417:25334,36418:25774,36419:25830,36420:26413,36421:27578,36422:34217,36423:38609,36424:30352,36425:39894,36426:25420,36427:37638,36428:39851,36429:30399,36430:26194,36431:19977,36432:20632,36433:21442,36434:23665,36435:24808,36436:25746,36437:25955,36438:26719,36439:29158,36440:29642,36441:29987,36442:31639,36443:32386,36444:34453,36445:35715,36446:36059,36447:37240,36448:39184,36449:26028,36450:26283,36451:27531,36452:20181,36453:20180,36454:20282,36455:20351,36456:21050,36457:21496,36458:21490,36459:21987,36460:22235,36461:22763,36462:22987,36463:22985,36464:23039,36465:23376,36466:23629,36467:24066,36468:24107,36469:24535,36470:24605,36471:25351,36472:25903,36473:23388,36474:26031,36475:26045,36476:26088,36477:26525,36478:27490,36480:27515,36481:27663,36482:29509,36483:31049,36484:31169,36485:31992,36486:32025,36487:32043,36488:32930,36489:33026,36490:33267,36491:35222,36492:35422,36493:35433,36494:35430,36495:35468,36496:35566,36497:36039,36498:36060,36499:38604,36500:39164,36501:27503,36502:20107,36503:20284,36504:20365,36505:20816,36506:23383,36507:23546,36508:24904,36509:25345,36510:26178,36511:27425,36512:28363,36513:27835,36514:29246,36515:29885,36516:30164,36517:30913,36518:31034,36519:32780,36520:32819,36521:33258,36522:33940,36523:36766,36524:27728,36525:40575,36526:24335,36527:35672,36528:40235,36529:31482,36530:36600,36531:23437,36532:38635,36533:19971,36534:21489,36535:22519,36536:22833,36537:23241,36538:23460,36539:24713,36540:28287,36541:28422,36542:30142,36543:36074,36544:23455,36545:34048,36546:31712,36547:20594,36548:26612,36549:33437,36550:23649,36551:34122,36552:32286,36553:33294,36554:20889,36555:23556,36556:25448,36557:36198,36558:26012,36559:29038,36560:31038,36561:32023,36562:32773,36563:35613,36564:36554,36565:36974,36566:34503,36567:37034,36568:20511,36569:21242,36570:23610,36571:26451,36572:28796,36573:29237,36574:37196,36575:37320,36576:37675,36577:33509,36578:23490,36579:24369,36580:24825,36581:20027,36582:21462,36583:23432,36584:25163,36585:26417,36586:27530,36587:29417,36588:29664,36589:31278,36590:33131,36591:36259,36592:37202,36593:39318,36594:20754,36595:21463,36596:21610,36597:23551,36598:25480,36599:27193,36600:32172,36601:38656,36602:22234,36603:21454,36604:21608,36672:23447,36673:23601,36674:24030,36675:20462,36676:24833,36677:25342,36678:27954,36679:31168,36680:31179,36681:32066,36682:32333,36683:32722,36684:33261,36685:33311,36686:33936,36687:34886,36688:35186,36689:35728,36690:36468,36691:36655,36692:36913,36693:37195,36694:37228,36695:38598,36696:37276,36697:20160,36698:20303,36699:20805,36700:21313,36701:24467,36702:25102,36703:26580,36704:27713,36705:28171,36706:29539,36707:32294,36708:37325,36709:37507,36710:21460,36711:22809,36712:23487,36713:28113,36714:31069,36715:32302,36716:31899,36717:22654,36718:29087,36719:20986,36720:34899,36721:36848,36722:20426,36723:23803,36724:26149,36725:30636,36726:31459,36727:33308,36728:39423,36729:20934,36730:24490,36731:26092,36732:26991,36733:27529,36734:28147,36736:28310,36737:28516,36738:30462,36739:32020,36740:24033,36741:36981,36742:37255,36743:38918,36744:20966,36745:21021,36746:25152,36747:26257,36748:26329,36749:28186,36750:24246,36751:32210,36752:32626,36753:26360,36754:34223,36755:34295,36756:35576,36757:21161,36758:21465,36759:22899,36760:24207,36761:24464,36762:24661,36763:37604,36764:38500,36765:20663,36766:20767,36767:21213,36768:21280,36769:21319,36770:21484,36771:21736,36772:21830,36773:21809,36774:22039,36775:22888,36776:22974,36777:23100,36778:23477,36779:23558,36780:23567,36781:23569,36782:23578,36783:24196,36784:24202,36785:24288,36786:24432,36787:25215,36788:25220,36789:25307,36790:25484,36791:25463,36792:26119,36793:26124,36794:26157,36795:26230,36796:26494,36797:26786,36798:27167,36799:27189,36800:27836,36801:28040,36802:28169,36803:28248,36804:28988,36805:28966,36806:29031,36807:30151,36808:30465,36809:30813,36810:30977,36811:31077,36812:31216,36813:31456,36814:31505,36815:31911,36816:32057,36817:32918,36818:33750,36819:33931,36820:34121,36821:34909,36822:35059,36823:35359,36824:35388,36825:35412,36826:35443,36827:35937,36828:36062,36829:37284,36830:37478,36831:37758,36832:37912,36833:38556,36834:38808,36835:19978,36836:19976,36837:19998,36838:20055,36839:20887,36840:21104,36841:22478,36842:22580,36843:22732,36844:23330,36845:24120,36846:24773,36847:25854,36848:26465,36849:26454,36850:27972,36851:29366,36852:30067,36853:31331,36854:33976,36855:35698,36856:37304,36857:37664,36858:22065,36859:22516,36860:39166,36928:25325,36929:26893,36930:27542,36931:29165,36932:32340,36933:32887,36934:33394,36935:35302,36936:39135,36937:34645,36938:36785,36939:23611,36940:20280,36941:20449,36942:20405,36943:21767,36944:23072,36945:23517,36946:23529,36947:24515,36948:24910,36949:25391,36950:26032,36951:26187,36952:26862,36953:27035,36954:28024,36955:28145,36956:30003,36957:30137,36958:30495,36959:31070,36960:31206,36961:32051,36962:33251,36963:33455,36964:34218,36965:35242,36966:35386,36967:36523,36968:36763,36969:36914,36970:37341,36971:38663,36972:20154,36973:20161,36974:20995,36975:22645,36976:22764,36977:23563,36978:29978,36979:23613,36980:33102,36981:35338,36982:36805,36983:38499,36984:38765,36985:31525,36986:35535,36987:38920,36988:37218,36989:22259,36990:21416,36992:36887,36993:21561,36994:22402,36995:24101,36996:25512,36997:27700,36998:28810,36999:30561,37e3:31883,37001:32736,37002:34928,37003:36930,37004:37204,37005:37648,37006:37656,37007:38543,37008:29790,37009:39620,37010:23815,37011:23913,37012:25968,37013:26530,37014:36264,37015:38619,37016:25454,37017:26441,37018:26905,37019:33733,37020:38935,37021:38592,37022:35070,37023:28548,37024:25722,37025:23544,37026:19990,37027:28716,37028:30045,37029:26159,37030:20932,37031:21046,37032:21218,37033:22995,37034:24449,37035:24615,37036:25104,37037:25919,37038:25972,37039:26143,37040:26228,37041:26866,37042:26646,37043:27491,37044:28165,37045:29298,37046:29983,37047:30427,37048:31934,37049:32854,37050:22768,37051:35069,37052:35199,37053:35488,37054:35475,37055:35531,37056:36893,37057:37266,37058:38738,37059:38745,37060:25993,37061:31246,37062:33030,37063:38587,37064:24109,37065:24796,37066:25114,37067:26021,37068:26132,37069:26512,37070:30707,37071:31309,37072:31821,37073:32318,37074:33034,37075:36012,37076:36196,37077:36321,37078:36447,37079:30889,37080:20999,37081:25305,37082:25509,37083:25666,37084:25240,37085:35373,37086:31363,37087:31680,37088:35500,37089:38634,37090:32118,37091:33292,37092:34633,37093:20185,37094:20808,37095:21315,37096:21344,37097:23459,37098:23554,37099:23574,37100:24029,37101:25126,37102:25159,37103:25776,37104:26643,37105:26676,37106:27849,37107:27973,37108:27927,37109:26579,37110:28508,37111:29006,37112:29053,37113:26059,37114:31359,37115:31661,37116:32218,37184:32330,37185:32680,37186:33146,37187:33307,37188:33337,37189:34214,37190:35438,37191:36046,37192:36341,37193:36984,37194:36983,37195:37549,37196:37521,37197:38275,37198:39854,37199:21069,37200:21892,37201:28472,37202:28982,37203:20840,37204:31109,37205:32341,37206:33203,37207:31950,37208:22092,37209:22609,37210:23720,37211:25514,37212:26366,37213:26365,37214:26970,37215:29401,37216:30095,37217:30094,37218:30990,37219:31062,37220:31199,37221:31895,37222:32032,37223:32068,37224:34311,37225:35380,37226:38459,37227:36961,37228:40736,37229:20711,37230:21109,37231:21452,37232:21474,37233:20489,37234:21930,37235:22766,37236:22863,37237:29245,37238:23435,37239:23652,37240:21277,37241:24803,37242:24819,37243:25436,37244:25475,37245:25407,37246:25531,37248:25805,37249:26089,37250:26361,37251:24035,37252:27085,37253:27133,37254:28437,37255:29157,37256:20105,37257:30185,37258:30456,37259:31379,37260:31967,37261:32207,37262:32156,37263:32865,37264:33609,37265:33624,37266:33900,37267:33980,37268:34299,37269:35013,37270:36208,37271:36865,37272:36973,37273:37783,37274:38684,37275:39442,37276:20687,37277:22679,37278:24974,37279:33235,37280:34101,37281:36104,37282:36896,37283:20419,37284:20596,37285:21063,37286:21363,37287:24687,37288:25417,37289:26463,37290:28204,37291:36275,37292:36895,37293:20439,37294:23646,37295:36042,37296:26063,37297:32154,37298:21330,37299:34966,37300:20854,37301:25539,37302:23384,37303:23403,37304:23562,37305:25613,37306:26449,37307:36956,37308:20182,37309:22810,37310:22826,37311:27760,37312:35409,37313:21822,37314:22549,37315:22949,37316:24816,37317:25171,37318:26561,37319:33333,37320:26965,37321:38464,37322:39364,37323:39464,37324:20307,37325:22534,37326:23550,37327:32784,37328:23729,37329:24111,37330:24453,37331:24608,37332:24907,37333:25140,37334:26367,37335:27888,37336:28382,37337:32974,37338:33151,37339:33492,37340:34955,37341:36024,37342:36864,37343:36910,37344:38538,37345:40667,37346:39899,37347:20195,37348:21488,37349:22823,37350:31532,37351:37261,37352:38988,37353:40441,37354:28381,37355:28711,37356:21331,37357:21828,37358:23429,37359:25176,37360:25246,37361:25299,37362:27810,37363:28655,37364:29730,37365:35351,37366:37944,37367:28609,37368:35582,37369:33592,37370:20967,37371:34552,37372:21482,37440:21481,37441:20294,37442:36948,37443:36784,37444:22890,37445:33073,37446:24061,37447:31466,37448:36799,37449:26842,37450:35895,37451:29432,37452:40008,37453:27197,37454:35504,37455:20025,37456:21336,37457:22022,37458:22374,37459:25285,37460:25506,37461:26086,37462:27470,37463:28129,37464:28251,37465:28845,37466:30701,37467:31471,37468:31658,37469:32187,37470:32829,37471:32966,37472:34507,37473:35477,37474:37723,37475:22243,37476:22727,37477:24382,37478:26029,37479:26262,37480:27264,37481:27573,37482:30007,37483:35527,37484:20516,37485:30693,37486:22320,37487:24347,37488:24677,37489:26234,37490:27744,37491:30196,37492:31258,37493:32622,37494:33268,37495:34584,37496:36933,37497:39347,37498:31689,37499:30044,37500:31481,37501:31569,37502:33988,37504:36880,37505:31209,37506:31378,37507:33590,37508:23265,37509:30528,37510:20013,37511:20210,37512:23449,37513:24544,37514:25277,37515:26172,37516:26609,37517:27880,37518:34411,37519:34935,37520:35387,37521:37198,37522:37619,37523:39376,37524:27159,37525:28710,37526:29482,37527:33511,37528:33879,37529:36015,37530:19969,37531:20806,37532:20939,37533:21899,37534:23541,37535:24086,37536:24115,37537:24193,37538:24340,37539:24373,37540:24427,37541:24500,37542:25074,37543:25361,37544:26274,37545:26397,37546:28526,37547:29266,37548:30010,37549:30522,37550:32884,37551:33081,37552:33144,37553:34678,37554:35519,37555:35548,37556:36229,37557:36339,37558:37530,37559:38263,37560:38914,37561:40165,37562:21189,37563:25431,37564:30452,37565:26389,37566:27784,37567:29645,37568:36035,37569:37806,37570:38515,37571:27941,37572:22684,37573:26894,37574:27084,37575:36861,37576:37786,37577:30171,37578:36890,37579:22618,37580:26626,37581:25524,37582:27131,37583:20291,37584:28460,37585:26584,37586:36795,37587:34086,37588:32180,37589:37716,37590:26943,37591:28528,37592:22378,37593:22775,37594:23340,37595:32044,37596:29226,37597:21514,37598:37347,37599:40372,37600:20141,37601:20302,37602:20572,37603:20597,37604:21059,37605:35998,37606:21576,37607:22564,37608:23450,37609:24093,37610:24213,37611:24237,37612:24311,37613:24351,37614:24716,37615:25269,37616:25402,37617:25552,37618:26799,37619:27712,37620:30855,37621:31118,37622:31243,37623:32224,37624:33351,37625:35330,37626:35558,37627:36420,37628:36883,37696:37048,37697:37165,37698:37336,37699:40718,37700:27877,37701:25688,37702:25826,37703:25973,37704:28404,37705:30340,37706:31515,37707:36969,37708:37841,37709:28346,37710:21746,37711:24505,37712:25764,37713:36685,37714:36845,37715:37444,37716:20856,37717:22635,37718:22825,37719:23637,37720:24215,37721:28155,37722:32399,37723:29980,37724:36028,37725:36578,37726:39003,37727:28857,37728:20253,37729:27583,37730:28593,37731:3e4,37732:38651,37733:20814,37734:21520,37735:22581,37736:22615,37737:22956,37738:23648,37739:24466,37740:26007,37741:26460,37742:28193,37743:30331,37744:33759,37745:36077,37746:36884,37747:37117,37748:37709,37749:30757,37750:30778,37751:21162,37752:24230,37753:22303,37754:22900,37755:24594,37756:20498,37757:20826,37758:20908,37760:20941,37761:20992,37762:21776,37763:22612,37764:22616,37765:22871,37766:23445,37767:23798,37768:23947,37769:24764,37770:25237,37771:25645,37772:26481,37773:26691,37774:26812,37775:26847,37776:30423,37777:28120,37778:28271,37779:28059,37780:28783,37781:29128,37782:24403,37783:30168,37784:31095,37785:31561,37786:31572,37787:31570,37788:31958,37789:32113,37790:21040,37791:33891,37792:34153,37793:34276,37794:35342,37795:35588,37796:35910,37797:36367,37798:36867,37799:36879,37800:37913,37801:38518,37802:38957,37803:39472,37804:38360,37805:20685,37806:21205,37807:21516,37808:22530,37809:23566,37810:24999,37811:25758,37812:27934,37813:30643,37814:31461,37815:33012,37816:33796,37817:36947,37818:37509,37819:23776,37820:40199,37821:21311,37822:24471,37823:24499,37824:28060,37825:29305,37826:30563,37827:31167,37828:31716,37829:27602,37830:29420,37831:35501,37832:26627,37833:27233,37834:20984,37835:31361,37836:26932,37837:23626,37838:40182,37839:33515,37840:23493,37841:37193,37842:28702,37843:22136,37844:23663,37845:24775,37846:25958,37847:27788,37848:35930,37849:36929,37850:38931,37851:21585,37852:26311,37853:37389,37854:22856,37855:37027,37856:20869,37857:20045,37858:20970,37859:34201,37860:35598,37861:28760,37862:25466,37863:37707,37864:26978,37865:39348,37866:32260,37867:30071,37868:21335,37869:26976,37870:36575,37871:38627,37872:27741,37873:20108,37874:23612,37875:24336,37876:36841,37877:21250,37878:36049,37879:32905,37880:34425,37881:24319,37882:26085,37883:20083,37884:20837,37952:22914,37953:23615,37954:38894,37955:20219,37956:22922,37957:24525,37958:35469,37959:28641,37960:31152,37961:31074,37962:23527,37963:33905,37964:29483,37965:29105,37966:24180,37967:24565,37968:25467,37969:25754,37970:29123,37971:31896,37972:20035,37973:24316,37974:20043,37975:22492,37976:22178,37977:24745,37978:28611,37979:32013,37980:33021,37981:33075,37982:33215,37983:36786,37984:35223,37985:34468,37986:24052,37987:25226,37988:25773,37989:35207,37990:26487,37991:27874,37992:27966,37993:29750,37994:30772,37995:23110,37996:32629,37997:33453,37998:39340,37999:20467,38e3:24259,38001:25309,38002:25490,38003:25943,38004:26479,38005:30403,38006:29260,38007:32972,38008:32954,38009:36649,38010:37197,38011:20493,38012:22521,38013:23186,38014:26757,38016:26995,38017:29028,38018:29437,38019:36023,38020:22770,38021:36064,38022:38506,38023:36889,38024:34687,38025:31204,38026:30695,38027:33833,38028:20271,38029:21093,38030:21338,38031:25293,38032:26575,38033:27850,38034:30333,38035:31636,38036:31893,38037:33334,38038:34180,38039:36843,38040:26333,38041:28448,38042:29190,38043:32283,38044:33707,38045:39361,38046:40614,38047:20989,38048:31665,38049:30834,38050:31672,38051:32903,38052:31560,38053:27368,38054:24161,38055:32908,38056:30033,38057:30048,38058:20843,38059:37474,38060:28300,38061:30330,38062:37271,38063:39658,38064:20240,38065:32624,38066:25244,38067:31567,38068:38309,38069:40169,38070:22138,38071:22617,38072:34532,38073:38588,38074:20276,38075:21028,38076:21322,38077:21453,38078:21467,38079:24070,38080:25644,38081:26001,38082:26495,38083:27710,38084:27726,38085:29256,38086:29359,38087:29677,38088:30036,38089:32321,38090:33324,38091:34281,38092:36009,38093:31684,38094:37318,38095:29033,38096:38930,38097:39151,38098:25405,38099:26217,38100:30058,38101:30436,38102:30928,38103:34115,38104:34542,38105:21290,38106:21329,38107:21542,38108:22915,38109:24199,38110:24444,38111:24754,38112:25161,38113:25209,38114:25259,38115:26e3,38116:27604,38117:27852,38118:30130,38119:30382,38120:30865,38121:31192,38122:32203,38123:32631,38124:32933,38125:34987,38126:35513,38127:36027,38128:36991,38129:38750,38130:39131,38131:27147,38132:31800,38133:20633,38134:23614,38135:24494,38136:26503,38137:27608,38138:29749,38139:30473,38140:32654,38208:40763,38209:26570,38210:31255,38211:21305,38212:30091,38213:39661,38214:24422,38215:33181,38216:33777,38217:32920,38218:24380,38219:24517,38220:30050,38221:31558,38222:36924,38223:26727,38224:23019,38225:23195,38226:32016,38227:30334,38228:35628,38229:20469,38230:24426,38231:27161,38232:27703,38233:28418,38234:29922,38235:31080,38236:34920,38237:35413,38238:35961,38239:24287,38240:25551,38241:30149,38242:31186,38243:33495,38244:37672,38245:37618,38246:33948,38247:34541,38248:39981,38249:21697,38250:24428,38251:25996,38252:27996,38253:28693,38254:36007,38255:36051,38256:38971,38257:25935,38258:29942,38259:19981,38260:20184,38261:22496,38262:22827,38263:23142,38264:23500,38265:20904,38266:24067,38267:24220,38268:24598,38269:25206,38270:25975,38272:26023,38273:26222,38274:28014,38275:29238,38276:31526,38277:33104,38278:33178,38279:33433,38280:35676,38281:36e3,38282:36070,38283:36212,38284:38428,38285:38468,38286:20398,38287:25771,38288:27494,38289:33310,38290:33889,38291:34154,38292:37096,38293:23553,38294:26963,38295:39080,38296:33914,38297:34135,38298:20239,38299:21103,38300:24489,38301:24133,38302:26381,38303:31119,38304:33145,38305:35079,38306:35206,38307:28149,38308:24343,38309:25173,38310:27832,38311:20175,38312:29289,38313:39826,38314:20998,38315:21563,38316:22132,38317:22707,38318:24996,38319:25198,38320:28954,38321:22894,38322:31881,38323:31966,38324:32027,38325:38640,38326:25991,38327:32862,38328:19993,38329:20341,38330:20853,38331:22592,38332:24163,38333:24179,38334:24330,38335:26564,38336:20006,38337:34109,38338:38281,38339:38491,38340:31859,38341:38913,38342:20731,38343:22721,38344:30294,38345:30887,38346:21029,38347:30629,38348:34065,38349:31622,38350:20559,38351:22793,38352:29255,38353:31687,38354:32232,38355:36794,38356:36820,38357:36941,38358:20415,38359:21193,38360:23081,38361:24321,38362:38829,38363:20445,38364:33303,38365:37610,38366:22275,38367:25429,38368:27497,38369:29995,38370:35036,38371:36628,38372:31298,38373:21215,38374:22675,38375:24917,38376:25098,38377:26286,38378:27597,38379:31807,38380:33769,38381:20515,38382:20472,38383:21253,38384:21574,38385:22577,38386:22857,38387:23453,38388:23792,38389:23791,38390:23849,38391:24214,38392:25265,38393:25447,38394:25918,38395:26041,38396:26379,38464:27861,38465:27873,38466:28921,38467:30770,38468:32299,38469:32990,38470:33459,38471:33804,38472:34028,38473:34562,38474:35090,38475:35370,38476:35914,38477:37030,38478:37586,38479:39165,38480:40179,38481:40300,38482:20047,38483:20129,38484:20621,38485:21078,38486:22346,38487:22952,38488:24125,38489:24536,38490:24537,38491:25151,38492:26292,38493:26395,38494:26576,38495:26834,38496:20882,38497:32033,38498:32938,38499:33192,38500:35584,38501:35980,38502:36031,38503:37502,38504:38450,38505:21536,38506:38956,38507:21271,38508:20693,38509:21340,38510:22696,38511:25778,38512:26420,38513:29287,38514:30566,38515:31302,38516:37350,38517:21187,38518:27809,38519:27526,38520:22528,38521:24140,38522:22868,38523:26412,38524:32763,38525:20961,38526:30406,38528:25705,38529:30952,38530:39764,38531:40635,38532:22475,38533:22969,38534:26151,38535:26522,38536:27598,38537:21737,38538:27097,38539:24149,38540:33180,38541:26517,38542:39850,38543:26622,38544:40018,38545:26717,38546:20134,38547:20451,38548:21448,38549:25273,38550:26411,38551:27819,38552:36804,38553:20397,38554:32365,38555:40639,38556:19975,38557:24930,38558:28288,38559:28459,38560:34067,38561:21619,38562:26410,38563:39749,38564:24051,38565:31637,38566:23724,38567:23494,38568:34588,38569:28234,38570:34001,38571:31252,38572:33032,38573:22937,38574:31885,38575:27665,38576:30496,38577:21209,38578:22818,38579:28961,38580:29279,38581:30683,38582:38695,38583:40289,38584:26891,38585:23167,38586:23064,38587:20901,38588:21517,38589:21629,38590:26126,38591:30431,38592:36855,38593:37528,38594:40180,38595:23018,38596:29277,38597:28357,38598:20813,38599:26825,38600:32191,38601:32236,38602:38754,38603:40634,38604:25720,38605:27169,38606:33538,38607:22916,38608:23391,38609:27611,38610:29467,38611:30450,38612:32178,38613:32791,38614:33945,38615:20786,38616:26408,38617:40665,38618:30446,38619:26466,38620:21247,38621:39173,38622:23588,38623:25147,38624:31870,38625:36016,38626:21839,38627:24758,38628:32011,38629:38272,38630:21249,38631:20063,38632:20918,38633:22812,38634:29242,38635:32822,38636:37326,38637:24357,38638:30690,38639:21380,38640:24441,38641:32004,38642:34220,38643:35379,38644:36493,38645:38742,38646:26611,38647:34222,38648:37971,38649:24841,38650:24840,38651:27833,38652:30290,38720:35565,38721:36664,38722:21807,38723:20305,38724:20778,38725:21191,38726:21451,38727:23461,38728:24189,38729:24736,38730:24962,38731:25558,38732:26377,38733:26586,38734:28263,38735:28044,38736:29494,38737:29495,38738:30001,38739:31056,38740:35029,38741:35480,38742:36938,38743:37009,38744:37109,38745:38596,38746:34701,38747:22805,38748:20104,38749:20313,38750:19982,38751:35465,38752:36671,38753:38928,38754:20653,38755:24188,38756:22934,38757:23481,38758:24248,38759:25562,38760:25594,38761:25793,38762:26332,38763:26954,38764:27096,38765:27915,38766:28342,38767:29076,38768:29992,38769:31407,38770:32650,38771:32768,38772:33865,38773:33993,38774:35201,38775:35617,38776:36362,38777:36965,38778:38525,38779:39178,38780:24958,38781:25233,38782:27442,38784:27779,38785:28020,38786:32716,38787:32764,38788:28096,38789:32645,38790:34746,38791:35064,38792:26469,38793:33713,38794:38972,38795:38647,38796:27931,38797:32097,38798:33853,38799:37226,38800:20081,38801:21365,38802:23888,38803:27396,38804:28651,38805:34253,38806:34349,38807:35239,38808:21033,38809:21519,38810:23653,38811:26446,38812:26792,38813:29702,38814:29827,38815:30178,38816:35023,38817:35041,38818:37324,38819:38626,38820:38520,38821:24459,38822:29575,38823:31435,38824:33870,38825:25504,38826:30053,38827:21129,38828:27969,38829:28316,38830:29705,38831:30041,38832:30827,38833:31890,38834:38534,38835:31452,38836:40845,38837:20406,38838:24942,38839:26053,38840:34396,38841:20102,38842:20142,38843:20698,38844:20001,38845:20940,38846:23534,38847:26009,38848:26753,38849:28092,38850:29471,38851:30274,38852:30637,38853:31260,38854:31975,38855:33391,38856:35538,38857:36988,38858:37327,38859:38517,38860:38936,38861:21147,38862:32209,38863:20523,38864:21400,38865:26519,38866:28107,38867:29136,38868:29747,38869:33256,38870:36650,38871:38563,38872:40023,38873:40607,38874:29792,38875:22593,38876:28057,38877:32047,38878:39006,38879:20196,38880:20278,38881:20363,38882:20919,38883:21169,38884:23994,38885:24604,38886:29618,38887:31036,38888:33491,38889:37428,38890:38583,38891:38646,38892:38666,38893:40599,38894:40802,38895:26278,38896:27508,38897:21015,38898:21155,38899:28872,38900:35010,38901:24265,38902:24651,38903:24976,38904:28451,38905:29001,38906:31806,38907:32244,38908:32879,38976:34030,38977:36899,38978:37676,38979:21570,38980:39791,38981:27347,38982:28809,38983:36034,38984:36335,38985:38706,38986:21172,38987:23105,38988:24266,38989:24324,38990:26391,38991:27004,38992:27028,38993:28010,38994:28431,38995:29282,38996:29436,38997:31725,38998:32769,38999:32894,39e3:34635,39001:37070,39002:20845,39003:40595,39004:31108,39005:32907,39006:37682,39007:35542,39008:20525,39009:21644,39010:35441,39011:27498,39012:36036,39013:33031,39014:24785,39015:26528,39016:40434,39017:20121,39018:20120,39019:39952,39020:35435,39021:34241,39022:34152,39023:26880,39024:28286,39025:30871,39026:33109,39071:24332,39072:19984,39073:19989,39074:20010,39075:20017,39076:20022,39077:20028,39078:20031,39079:20034,39080:20054,39081:20056,39082:20098,39083:20101,39084:35947,39085:20106,39086:33298,39087:24333,39088:20110,39089:20126,39090:20127,39091:20128,39092:20130,39093:20144,39094:20147,39095:20150,39096:20174,39097:20173,39098:20164,39099:20166,39100:20162,39101:20183,39102:20190,39103:20205,39104:20191,39105:20215,39106:20233,39107:20314,39108:20272,39109:20315,39110:20317,39111:20311,39112:20295,39113:20342,39114:20360,39115:20367,39116:20376,39117:20347,39118:20329,39119:20336,39120:20369,39121:20335,39122:20358,39123:20374,39124:20760,39125:20436,39126:20447,39127:20430,39128:20440,39129:20443,39130:20433,39131:20442,39132:20432,39133:20452,39134:20453,39135:20506,39136:20520,39137:20500,39138:20522,39139:20517,39140:20485,39141:20252,39142:20470,39143:20513,39144:20521,39145:20524,39146:20478,39147:20463,39148:20497,39149:20486,39150:20547,39151:20551,39152:26371,39153:20565,39154:20560,39155:20552,39156:20570,39157:20566,39158:20588,39159:20600,39160:20608,39161:20634,39162:20613,39163:20660,39164:20658,39232:20681,39233:20682,39234:20659,39235:20674,39236:20694,39237:20702,39238:20709,39239:20717,39240:20707,39241:20718,39242:20729,39243:20725,39244:20745,39245:20737,39246:20738,39247:20758,39248:20757,39249:20756,39250:20762,39251:20769,39252:20794,39253:20791,39254:20796,39255:20795,39256:20799,39257:20800,39258:20818,39259:20812,39260:20820,39261:20834,39262:31480,39263:20841,39264:20842,39265:20846,39266:20864,39267:20866,39268:22232,39269:20876,39270:20873,39271:20879,39272:20881,39273:20883,39274:20885,39275:20886,39276:20900,39277:20902,39278:20898,39279:20905,39280:20906,39281:20907,39282:20915,39283:20913,39284:20914,39285:20912,39286:20917,39287:20925,39288:20933,39289:20937,39290:20955,39291:20960,39292:34389,39293:20969,39294:20973,39296:20976,39297:20981,39298:20990,39299:20996,39300:21003,39301:21012,39302:21006,39303:21031,39304:21034,39305:21038,39306:21043,39307:21049,39308:21071,39309:21060,39310:21067,39311:21068,39312:21086,39313:21076,39314:21098,39315:21108,39316:21097,39317:21107,39318:21119,39319:21117,39320:21133,39321:21140,39322:21138,39323:21105,39324:21128,39325:21137,39326:36776,39327:36775,39328:21164,39329:21165,39330:21180,39331:21173,39332:21185,39333:21197,39334:21207,39335:21214,39336:21219,39337:21222,39338:39149,39339:21216,39340:21235,39341:21237,39342:21240,39343:21241,39344:21254,39345:21256,39346:30008,39347:21261,39348:21264,39349:21263,39350:21269,39351:21274,39352:21283,39353:21295,39354:21297,39355:21299,39356:21304,39357:21312,39358:21318,39359:21317,39360:19991,39361:21321,39362:21325,39363:20950,39364:21342,39365:21353,39366:21358,39367:22808,39368:21371,39369:21367,39370:21378,39371:21398,39372:21408,39373:21414,39374:21413,39375:21422,39376:21424,39377:21430,39378:21443,39379:31762,39380:38617,39381:21471,39382:26364,39383:29166,39384:21486,39385:21480,39386:21485,39387:21498,39388:21505,39389:21565,39390:21568,39391:21548,39392:21549,39393:21564,39394:21550,39395:21558,39396:21545,39397:21533,39398:21582,39399:21647,39400:21621,39401:21646,39402:21599,39403:21617,39404:21623,39405:21616,39406:21650,39407:21627,39408:21632,39409:21622,39410:21636,39411:21648,39412:21638,39413:21703,39414:21666,39415:21688,39416:21669,39417:21676,39418:21700,39419:21704,39420:21672,39488:21675,39489:21698,39490:21668,39491:21694,39492:21692,39493:21720,39494:21733,39495:21734,39496:21775,39497:21780,39498:21757,39499:21742,39500:21741,39501:21754,39502:21730,39503:21817,39504:21824,39505:21859,39506:21836,39507:21806,39508:21852,39509:21829,39510:21846,39511:21847,39512:21816,39513:21811,39514:21853,39515:21913,39516:21888,39517:21679,39518:21898,39519:21919,39520:21883,39521:21886,39522:21912,39523:21918,39524:21934,39525:21884,39526:21891,39527:21929,39528:21895,39529:21928,39530:21978,39531:21957,39532:21983,39533:21956,39534:21980,39535:21988,39536:21972,39537:22036,39538:22007,39539:22038,39540:22014,39541:22013,39542:22043,39543:22009,39544:22094,39545:22096,39546:29151,39547:22068,39548:22070,39549:22066,39550:22072,39552:22123,39553:22116,39554:22063,39555:22124,39556:22122,39557:22150,39558:22144,39559:22154,39560:22176,39561:22164,39562:22159,39563:22181,39564:22190,39565:22198,39566:22196,39567:22210,39568:22204,39569:22209,39570:22211,39571:22208,39572:22216,39573:22222,39574:22225,39575:22227,39576:22231,39577:22254,39578:22265,39579:22272,39580:22271,39581:22276,39582:22281,39583:22280,39584:22283,39585:22285,39586:22291,39587:22296,39588:22294,39589:21959,39590:22300,39591:22310,39592:22327,39593:22328,39594:22350,39595:22331,39596:22336,39597:22351,39598:22377,39599:22464,39600:22408,39601:22369,39602:22399,39603:22409,39604:22419,39605:22432,39606:22451,39607:22436,39608:22442,39609:22448,39610:22467,39611:22470,39612:22484,39613:22482,39614:22483,39615:22538,39616:22486,39617:22499,39618:22539,39619:22553,39620:22557,39621:22642,39622:22561,39623:22626,39624:22603,39625:22640,39626:27584,39627:22610,39628:22589,39629:22649,39630:22661,39631:22713,39632:22687,39633:22699,39634:22714,39635:22750,39636:22715,39637:22712,39638:22702,39639:22725,39640:22739,39641:22737,39642:22743,39643:22745,39644:22744,39645:22757,39646:22748,39647:22756,39648:22751,39649:22767,39650:22778,39651:22777,39652:22779,39653:22780,39654:22781,39655:22786,39656:22794,39657:22800,39658:22811,39659:26790,39660:22821,39661:22828,39662:22829,39663:22834,39664:22840,39665:22846,39666:31442,39667:22869,39668:22864,39669:22862,39670:22874,39671:22872,39672:22882,39673:22880,39674:22887,39675:22892,39676:22889,39744:22904,39745:22913,39746:22941,39747:20318,39748:20395,39749:22947,39750:22962,39751:22982,39752:23016,39753:23004,39754:22925,39755:23001,39756:23002,39757:23077,39758:23071,39759:23057,39760:23068,39761:23049,39762:23066,39763:23104,39764:23148,39765:23113,39766:23093,39767:23094,39768:23138,39769:23146,39770:23194,39771:23228,39772:23230,39773:23243,39774:23234,39775:23229,39776:23267,39777:23255,39778:23270,39779:23273,39780:23254,39781:23290,39782:23291,39783:23308,39784:23307,39785:23318,39786:23346,39787:23248,39788:23338,39789:23350,39790:23358,39791:23363,39792:23365,39793:23360,39794:23377,39795:23381,39796:23386,39797:23387,39798:23397,39799:23401,39800:23408,39801:23411,39802:23413,39803:23416,39804:25992,39805:23418,39806:23424,39808:23427,39809:23462,39810:23480,39811:23491,39812:23495,39813:23497,39814:23508,39815:23504,39816:23524,39817:23526,39818:23522,39819:23518,39820:23525,39821:23531,39822:23536,39823:23542,39824:23539,39825:23557,39826:23559,39827:23560,39828:23565,39829:23571,39830:23584,39831:23586,39832:23592,39833:23608,39834:23609,39835:23617,39836:23622,39837:23630,39838:23635,39839:23632,39840:23631,39841:23409,39842:23660,39843:23662,39844:20066,39845:23670,39846:23673,39847:23692,39848:23697,39849:23700,39850:22939,39851:23723,39852:23739,39853:23734,39854:23740,39855:23735,39856:23749,39857:23742,39858:23751,39859:23769,39860:23785,39861:23805,39862:23802,39863:23789,39864:23948,39865:23786,39866:23819,39867:23829,39868:23831,39869:23900,39870:23839,39871:23835,39872:23825,39873:23828,39874:23842,39875:23834,39876:23833,39877:23832,39878:23884,39879:23890,39880:23886,39881:23883,39882:23916,39883:23923,39884:23926,39885:23943,39886:23940,39887:23938,39888:23970,39889:23965,39890:23980,39891:23982,39892:23997,39893:23952,39894:23991,39895:23996,39896:24009,39897:24013,39898:24019,39899:24018,39900:24022,39901:24027,39902:24043,39903:24050,39904:24053,39905:24075,39906:24090,39907:24089,39908:24081,39909:24091,39910:24118,39911:24119,39912:24132,39913:24131,39914:24128,39915:24142,39916:24151,39917:24148,39918:24159,39919:24162,39920:24164,39921:24135,39922:24181,39923:24182,39924:24186,39925:40636,39926:24191,39927:24224,39928:24257,39929:24258,39930:24264,39931:24272,39932:24271,4e4:24278,40001:24291,40002:24285,40003:24282,40004:24283,40005:24290,40006:24289,40007:24296,40008:24297,40009:24300,40010:24305,40011:24307,40012:24304,40013:24308,40014:24312,40015:24318,40016:24323,40017:24329,40018:24413,40019:24412,40020:24331,40021:24337,40022:24342,40023:24361,40024:24365,40025:24376,40026:24385,40027:24392,40028:24396,40029:24398,40030:24367,40031:24401,40032:24406,40033:24407,40034:24409,40035:24417,40036:24429,40037:24435,40038:24439,40039:24451,40040:24450,40041:24447,40042:24458,40043:24456,40044:24465,40045:24455,40046:24478,40047:24473,40048:24472,40049:24480,40050:24488,40051:24493,40052:24508,40053:24534,40054:24571,40055:24548,40056:24568,40057:24561,40058:24541,40059:24755,40060:24575,40061:24609,40062:24672,40064:24601,40065:24592,40066:24617,40067:24590,40068:24625,40069:24603,40070:24597,40071:24619,40072:24614,40073:24591,40074:24634,40075:24666,40076:24641,40077:24682,40078:24695,40079:24671,40080:24650,40081:24646,40082:24653,40083:24675,40084:24643,40085:24676,40086:24642,40087:24684,40088:24683,40089:24665,40090:24705,40091:24717,40092:24807,40093:24707,40094:24730,40095:24708,40096:24731,40097:24726,40098:24727,40099:24722,40100:24743,40101:24715,40102:24801,40103:24760,40104:24800,40105:24787,40106:24756,40107:24560,40108:24765,40109:24774,40110:24757,40111:24792,40112:24909,40113:24853,40114:24838,40115:24822,40116:24823,40117:24832,40118:24820,40119:24826,40120:24835,40121:24865,40122:24827,40123:24817,40124:24845,40125:24846,40126:24903,40127:24894,40128:24872,40129:24871,40130:24906,40131:24895,40132:24892,40133:24876,40134:24884,40135:24893,40136:24898,40137:24900,40138:24947,40139:24951,40140:24920,40141:24921,40142:24922,40143:24939,40144:24948,40145:24943,40146:24933,40147:24945,40148:24927,40149:24925,40150:24915,40151:24949,40152:24985,40153:24982,40154:24967,40155:25004,40156:24980,40157:24986,40158:24970,40159:24977,40160:25003,40161:25006,40162:25036,40163:25034,40164:25033,40165:25079,40166:25032,40167:25027,40168:25030,40169:25018,40170:25035,40171:32633,40172:25037,40173:25062,40174:25059,40175:25078,40176:25082,40177:25076,40178:25087,40179:25085,40180:25084,40181:25086,40182:25088,40183:25096,40184:25097,40185:25101,40186:25100,40187:25108,40188:25115,40256:25118,40257:25121,40258:25130,40259:25134,40260:25136,40261:25138,40262:25139,40263:25153,40264:25166,40265:25182,40266:25187,40267:25179,40268:25184,40269:25192,40270:25212,40271:25218,40272:25225,40273:25214,40274:25234,40275:25235,40276:25238,40277:25300,40278:25219,40279:25236,40280:25303,40281:25297,40282:25275,40283:25295,40284:25343,40285:25286,40286:25812,40287:25288,40288:25308,40289:25292,40290:25290,40291:25282,40292:25287,40293:25243,40294:25289,40295:25356,40296:25326,40297:25329,40298:25383,40299:25346,40300:25352,40301:25327,40302:25333,40303:25424,40304:25406,40305:25421,40306:25628,40307:25423,40308:25494,40309:25486,40310:25472,40311:25515,40312:25462,40313:25507,40314:25487,40315:25481,40316:25503,40317:25525,40318:25451,40320:25449,40321:25534,40322:25577,40323:25536,40324:25542,40325:25571,40326:25545,40327:25554,40328:25590,40329:25540,40330:25622,40331:25652,40332:25606,40333:25619,40334:25638,40335:25654,40336:25885,40337:25623,40338:25640,40339:25615,40340:25703,40341:25711,40342:25718,40343:25678,40344:25898,40345:25749,40346:25747,40347:25765,40348:25769,40349:25736,40350:25788,40351:25818,40352:25810,40353:25797,40354:25799,40355:25787,40356:25816,40357:25794,40358:25841,40359:25831,40360:33289,40361:25824,40362:25825,40363:25260,40364:25827,40365:25839,40366:25900,40367:25846,40368:25844,40369:25842,40370:25850,40371:25856,40372:25853,40373:25880,40374:25884,40375:25861,40376:25892,40377:25891,40378:25899,40379:25908,40380:25909,40381:25911,40382:25910,40383:25912,40384:30027,40385:25928,40386:25942,40387:25941,40388:25933,40389:25944,40390:25950,40391:25949,40392:25970,40393:25976,40394:25986,40395:25987,40396:35722,40397:26011,40398:26015,40399:26027,40400:26039,40401:26051,40402:26054,40403:26049,40404:26052,40405:26060,40406:26066,40407:26075,40408:26073,40409:26080,40410:26081,40411:26097,40412:26482,40413:26122,40414:26115,40415:26107,40416:26483,40417:26165,40418:26166,40419:26164,40420:26140,40421:26191,40422:26180,40423:26185,40424:26177,40425:26206,40426:26205,40427:26212,40428:26215,40429:26216,40430:26207,40431:26210,40432:26224,40433:26243,40434:26248,40435:26254,40436:26249,40437:26244,40438:26264,40439:26269,40440:26305,40441:26297,40442:26313,40443:26302,40444:26300,40512:26308,40513:26296,40514:26326,40515:26330,40516:26336,40517:26175,40518:26342,40519:26345,40520:26352,40521:26357,40522:26359,40523:26383,40524:26390,40525:26398,40526:26406,40527:26407,40528:38712,40529:26414,40530:26431,40531:26422,40532:26433,40533:26424,40534:26423,40535:26438,40536:26462,40537:26464,40538:26457,40539:26467,40540:26468,40541:26505,40542:26480,40543:26537,40544:26492,40545:26474,40546:26508,40547:26507,40548:26534,40549:26529,40550:26501,40551:26551,40552:26607,40553:26548,40554:26604,40555:26547,40556:26601,40557:26552,40558:26596,40559:26590,40560:26589,40561:26594,40562:26606,40563:26553,40564:26574,40565:26566,40566:26599,40567:27292,40568:26654,40569:26694,40570:26665,40571:26688,40572:26701,40573:26674,40574:26702,40576:26803,40577:26667,40578:26713,40579:26723,40580:26743,40581:26751,40582:26783,40583:26767,40584:26797,40585:26772,40586:26781,40587:26779,40588:26755,40589:27310,40590:26809,40591:26740,40592:26805,40593:26784,40594:26810,40595:26895,40596:26765,40597:26750,40598:26881,40599:26826,40600:26888,40601:26840,40602:26914,40603:26918,40604:26849,40605:26892,40606:26829,40607:26836,40608:26855,40609:26837,40610:26934,40611:26898,40612:26884,40613:26839,40614:26851,40615:26917,40616:26873,40617:26848,40618:26863,40619:26920,40620:26922,40621:26906,40622:26915,40623:26913,40624:26822,40625:27001,40626:26999,40627:26972,40628:27e3,40629:26987,40630:26964,40631:27006,40632:26990,40633:26937,40634:26996,40635:26941,40636:26969,40637:26928,40638:26977,40639:26974,40640:26973,40641:27009,40642:26986,40643:27058,40644:27054,40645:27088,40646:27071,40647:27073,40648:27091,40649:27070,40650:27086,40651:23528,40652:27082,40653:27101,40654:27067,40655:27075,40656:27047,40657:27182,40658:27025,40659:27040,40660:27036,40661:27029,40662:27060,40663:27102,40664:27112,40665:27138,40666:27163,40667:27135,40668:27402,40669:27129,40670:27122,40671:27111,40672:27141,40673:27057,40674:27166,40675:27117,40676:27156,40677:27115,40678:27146,40679:27154,40680:27329,40681:27171,40682:27155,40683:27204,40684:27148,40685:27250,40686:27190,40687:27256,40688:27207,40689:27234,40690:27225,40691:27238,40692:27208,40693:27192,40694:27170,40695:27280,40696:27277,40697:27296,40698:27268,40699:27298,40700:27299,40768:27287,40769:34327,40770:27323,40771:27331,40772:27330,40773:27320,40774:27315,40775:27308,40776:27358,40777:27345,40778:27359,40779:27306,40780:27354,40781:27370,40782:27387,40783:27397,40784:34326,40785:27386,40786:27410,40787:27414,40788:39729,40789:27423,40790:27448,40791:27447,40792:30428,40793:27449,40794:39150,40795:27463,40796:27459,40797:27465,40798:27472,40799:27481,40800:27476,40801:27483,40802:27487,40803:27489,40804:27512,40805:27513,40806:27519,40807:27520,40808:27524,40809:27523,40810:27533,40811:27544,40812:27541,40813:27550,40814:27556,40815:27562,40816:27563,40817:27567,40818:27570,40819:27569,40820:27571,40821:27575,40822:27580,40823:27590,40824:27595,40825:27603,40826:27615,40827:27628,40828:27627,40829:27635,40830:27631,40832:40638,40833:27656,40834:27667,40835:27668,40836:27675,40837:27684,40838:27683,40839:27742,40840:27733,40841:27746,40842:27754,40843:27778,40844:27789,40845:27802,40846:27777,40847:27803,40848:27774,40849:27752,40850:27763,40851:27794,40852:27792,40853:27844,40854:27889,40855:27859,40856:27837,40857:27863,40858:27845,40859:27869,40860:27822,40861:27825,40862:27838,40863:27834,40864:27867,40865:27887,40866:27865,40867:27882,40868:27935,40869:34893,40870:27958,40871:27947,40872:27965,40873:27960,40874:27929,40875:27957,40876:27955,40877:27922,40878:27916,40879:28003,40880:28051,40881:28004,40882:27994,40883:28025,40884:27993,40885:28046,40886:28053,40887:28644,40888:28037,40889:28153,40890:28181,40891:28170,40892:28085,40893:28103,40894:28134,40895:28088,40896:28102,40897:28140,40898:28126,40899:28108,40900:28136,40901:28114,40902:28101,40903:28154,40904:28121,40905:28132,40906:28117,40907:28138,40908:28142,40909:28205,40910:28270,40911:28206,40912:28185,40913:28274,40914:28255,40915:28222,40916:28195,40917:28267,40918:28203,40919:28278,40920:28237,40921:28191,40922:28227,40923:28218,40924:28238,40925:28196,40926:28415,40927:28189,40928:28216,40929:28290,40930:28330,40931:28312,40932:28361,40933:28343,40934:28371,40935:28349,40936:28335,40937:28356,40938:28338,40939:28372,40940:28373,40941:28303,40942:28325,40943:28354,40944:28319,40945:28481,40946:28433,40947:28748,40948:28396,40949:28408,40950:28414,40951:28479,40952:28402,40953:28465,40954:28399,40955:28466,40956:28364,161:65377,162:65378,163:65379,164:65380,165:65381,166:65382,167:65383,168:65384,169:65385,170:65386,171:65387,172:65388,173:65389,174:65390,175:65391,176:65392,177:65393,178:65394,179:65395,180:65396,181:65397,182:65398,183:65399,184:65400,185:65401,186:65402,187:65403,188:65404,189:65405,190:65406,191:65407,192:65408,193:65409,194:65410,195:65411,196:65412,197:65413,198:65414,199:65415,200:65416,201:65417,202:65418,203:65419,204:65420,205:65421,206:65422,207:65423,208:65424,209:65425,210:65426,211:65427,212:65428,213:65429,214:65430,215:65431,216:65432,217:65433,218:65434,219:65435,220:65436,221:65437,222:65438,223:65439,57408:28478,57409:28435,57410:28407,57411:28550,57412:28538,57413:28536,57414:28545,57415:28544,57416:28527,57417:28507,57418:28659,57419:28525,57420:28546,57421:28540,57422:28504,57423:28558,57424:28561,57425:28610,57426:28518,57427:28595,57428:28579,57429:28577,57430:28580,57431:28601,57432:28614,57433:28586,57434:28639,57435:28629,57436:28652,57437:28628,57438:28632,57439:28657,57440:28654,57441:28635,57442:28681,57443:28683,57444:28666,57445:28689,57446:28673,57447:28687,57448:28670,57449:28699,57450:28698,57451:28532,57452:28701,57453:28696,57454:28703,57455:28720,57456:28734,57457:28722,57458:28753,57459:28771,57460:28825,57461:28818,57462:28847,57463:28913,57464:28844,57465:28856,57466:28851,57467:28846,57468:28895,57469:28875,57470:28893,57472:28889,57473:28937,57474:28925,57475:28956,57476:28953,57477:29029,57478:29013,57479:29064,57480:29030,57481:29026,57482:29004,57483:29014,57484:29036,57485:29071,57486:29179,57487:29060,57488:29077,57489:29096,57490:29100,57491:29143,57492:29113,57493:29118,57494:29138,57495:29129,57496:29140,57497:29134,57498:29152,57499:29164,57500:29159,57501:29173,57502:29180,57503:29177,57504:29183,57505:29197,57506:29200,57507:29211,57508:29224,57509:29229,57510:29228,57511:29232,57512:29234,57513:29243,57514:29244,57515:29247,57516:29248,57517:29254,57518:29259,57519:29272,57520:29300,57521:29310,57522:29314,57523:29313,57524:29319,57525:29330,57526:29334,57527:29346,57528:29351,57529:29369,57530:29362,57531:29379,57532:29382,57533:29380,57534:29390,57535:29394,57536:29410,57537:29408,57538:29409,57539:29433,57540:29431,57541:20495,57542:29463,57543:29450,57544:29468,57545:29462,57546:29469,57547:29492,57548:29487,57549:29481,57550:29477,57551:29502,57552:29518,57553:29519,57554:40664,57555:29527,57556:29546,57557:29544,57558:29552,57559:29560,57560:29557,57561:29563,57562:29562,57563:29640,57564:29619,57565:29646,57566:29627,57567:29632,57568:29669,57569:29678,57570:29662,57571:29858,57572:29701,57573:29807,57574:29733,57575:29688,57576:29746,57577:29754,57578:29781,57579:29759,57580:29791,57581:29785,57582:29761,57583:29788,57584:29801,57585:29808,57586:29795,57587:29802,57588:29814,57589:29822,57590:29835,57591:29854,57592:29863,57593:29898,57594:29903,57595:29908,57596:29681,57664:29920,57665:29923,57666:29927,57667:29929,57668:29934,57669:29938,57670:29936,57671:29937,57672:29944,57673:29943,57674:29956,57675:29955,57676:29957,57677:29964,57678:29966,57679:29965,57680:29973,57681:29971,57682:29982,57683:29990,57684:29996,57685:30012,57686:30020,57687:30029,57688:30026,57689:30025,57690:30043,57691:30022,57692:30042,57693:30057,57694:30052,57695:30055,57696:30059,57697:30061,57698:30072,57699:30070,57700:30086,57701:30087,57702:30068,57703:30090,57704:30089,57705:30082,57706:30100,57707:30106,57708:30109,57709:30117,57710:30115,57711:30146,57712:30131,57713:30147,57714:30133,57715:30141,57716:30136,57717:30140,57718:30129,57719:30157,57720:30154,57721:30162,57722:30169,57723:30179,57724:30174,57725:30206,57726:30207,57728:30204,57729:30209,57730:30192,57731:30202,57732:30194,57733:30195,57734:30219,57735:30221,57736:30217,57737:30239,57738:30247,57739:30240,57740:30241,57741:30242,57742:30244,57743:30260,57744:30256,57745:30267,57746:30279,57747:30280,57748:30278,57749:30300,57750:30296,57751:30305,57752:30306,57753:30312,57754:30313,57755:30314,57756:30311,57757:30316,57758:30320,57759:30322,57760:30326,57761:30328,57762:30332,57763:30336,57764:30339,57765:30344,57766:30347,57767:30350,57768:30358,57769:30355,57770:30361,57771:30362,57772:30384,57773:30388,57774:30392,57775:30393,57776:30394,57777:30402,57778:30413,57779:30422,57780:30418,57781:30430,57782:30433,57783:30437,57784:30439,57785:30442,57786:34351,57787:30459,57788:30472,57789:30471,57790:30468,57791:30505,57792:30500,57793:30494,57794:30501,57795:30502,57796:30491,57797:30519,57798:30520,57799:30535,57800:30554,57801:30568,57802:30571,57803:30555,57804:30565,57805:30591,57806:30590,57807:30585,57808:30606,57809:30603,57810:30609,57811:30624,57812:30622,57813:30640,57814:30646,57815:30649,57816:30655,57817:30652,57818:30653,57819:30651,57820:30663,57821:30669,57822:30679,57823:30682,57824:30684,57825:30691,57826:30702,57827:30716,57828:30732,57829:30738,57830:31014,57831:30752,57832:31018,57833:30789,57834:30862,57835:30836,57836:30854,57837:30844,57838:30874,57839:30860,57840:30883,57841:30901,57842:30890,57843:30895,57844:30929,57845:30918,57846:30923,57847:30932,57848:30910,57849:30908,57850:30917,57851:30922,57852:30956,57920:30951,57921:30938,57922:30973,57923:30964,57924:30983,57925:30994,57926:30993,57927:31001,57928:31020,57929:31019,57930:31040,57931:31072,57932:31063,57933:31071,57934:31066,57935:31061,57936:31059,57937:31098,57938:31103,57939:31114,57940:31133,57941:31143,57942:40779,57943:31146,57944:31150,57945:31155,57946:31161,57947:31162,57948:31177,57949:31189,57950:31207,57951:31212,57952:31201,57953:31203,57954:31240,57955:31245,57956:31256,57957:31257,57958:31264,57959:31263,57960:31104,57961:31281,57962:31291,57963:31294,57964:31287,57965:31299,57966:31319,57967:31305,57968:31329,57969:31330,57970:31337,57971:40861,57972:31344,57973:31353,57974:31357,57975:31368,57976:31383,57977:31381,57978:31384,57979:31382,57980:31401,57981:31432,57982:31408,57984:31414,57985:31429,57986:31428,57987:31423,57988:36995,57989:31431,57990:31434,57991:31437,57992:31439,57993:31445,57994:31443,57995:31449,57996:31450,57997:31453,57998:31457,57999:31458,58e3:31462,58001:31469,58002:31472,58003:31490,58004:31503,58005:31498,58006:31494,58007:31539,58008:31512,58009:31513,58010:31518,58011:31541,58012:31528,58013:31542,58014:31568,58015:31610,58016:31492,58017:31565,58018:31499,58019:31564,58020:31557,58021:31605,58022:31589,58023:31604,58024:31591,58025:31600,58026:31601,58027:31596,58028:31598,58029:31645,58030:31640,58031:31647,58032:31629,58033:31644,58034:31642,58035:31627,58036:31634,58037:31631,58038:31581,58039:31641,58040:31691,58041:31681,58042:31692,58043:31695,58044:31668,58045:31686,58046:31709,58047:31721,58048:31761,58049:31764,58050:31718,58051:31717,58052:31840,58053:31744,58054:31751,58055:31763,58056:31731,58057:31735,58058:31767,58059:31757,58060:31734,58061:31779,58062:31783,58063:31786,58064:31775,58065:31799,58066:31787,58067:31805,58068:31820,58069:31811,58070:31828,58071:31823,58072:31808,58073:31824,58074:31832,58075:31839,58076:31844,58077:31830,58078:31845,58079:31852,58080:31861,58081:31875,58082:31888,58083:31908,58084:31917,58085:31906,58086:31915,58087:31905,58088:31912,58089:31923,58090:31922,58091:31921,58092:31918,58093:31929,58094:31933,58095:31936,58096:31941,58097:31938,58098:31960,58099:31954,58100:31964,58101:31970,58102:39739,58103:31983,58104:31986,58105:31988,58106:31990,58107:31994,58108:32006,58176:32002,58177:32028,58178:32021,58179:32010,58180:32069,58181:32075,58182:32046,58183:32050,58184:32063,58185:32053,58186:32070,58187:32115,58188:32086,58189:32078,58190:32114,58191:32104,58192:32110,58193:32079,58194:32099,58195:32147,58196:32137,58197:32091,58198:32143,58199:32125,58200:32155,58201:32186,58202:32174,58203:32163,58204:32181,58205:32199,58206:32189,58207:32171,58208:32317,58209:32162,58210:32175,58211:32220,58212:32184,58213:32159,58214:32176,58215:32216,58216:32221,58217:32228,58218:32222,58219:32251,58220:32242,58221:32225,58222:32261,58223:32266,58224:32291,58225:32289,58226:32274,58227:32305,58228:32287,58229:32265,58230:32267,58231:32290,58232:32326,58233:32358,58234:32315,58235:32309,58236:32313,58237:32323,58238:32311,58240:32306,58241:32314,58242:32359,58243:32349,58244:32342,58245:32350,58246:32345,58247:32346,58248:32377,58249:32362,58250:32361,58251:32380,58252:32379,58253:32387,58254:32213,58255:32381,58256:36782,58257:32383,58258:32392,58259:32393,58260:32396,58261:32402,58262:32400,58263:32403,58264:32404,58265:32406,58266:32398,58267:32411,58268:32412,58269:32568,58270:32570,58271:32581,58272:32588,58273:32589,58274:32590,58275:32592,58276:32593,58277:32597,58278:32596,58279:32600,58280:32607,58281:32608,58282:32616,58283:32617,58284:32615,58285:32632,58286:32642,58287:32646,58288:32643,58289:32648,58290:32647,58291:32652,58292:32660,58293:32670,58294:32669,58295:32666,58296:32675,58297:32687,58298:32690,58299:32697,58300:32686,58301:32694,58302:32696,58303:35697,58304:32709,58305:32710,58306:32714,58307:32725,58308:32724,58309:32737,58310:32742,58311:32745,58312:32755,58313:32761,58314:39132,58315:32774,58316:32772,58317:32779,58318:32786,58319:32792,58320:32793,58321:32796,58322:32801,58323:32808,58324:32831,58325:32827,58326:32842,58327:32838,58328:32850,58329:32856,58330:32858,58331:32863,58332:32866,58333:32872,58334:32883,58335:32882,58336:32880,58337:32886,58338:32889,58339:32893,58340:32895,58341:32900,58342:32902,58343:32901,58344:32923,58345:32915,58346:32922,58347:32941,58348:20880,58349:32940,58350:32987,58351:32997,58352:32985,58353:32989,58354:32964,58355:32986,58356:32982,58357:33033,58358:33007,58359:33009,58360:33051,58361:33065,58362:33059,58363:33071,58364:33099,58432:38539,58433:33094,58434:33086,58435:33107,58436:33105,58437:33020,58438:33137,58439:33134,58440:33125,58441:33126,58442:33140,58443:33155,58444:33160,58445:33162,58446:33152,58447:33154,58448:33184,58449:33173,58450:33188,58451:33187,58452:33119,58453:33171,58454:33193,58455:33200,58456:33205,58457:33214,58458:33208,58459:33213,58460:33216,58461:33218,58462:33210,58463:33225,58464:33229,58465:33233,58466:33241,58467:33240,58468:33224,58469:33242,58470:33247,58471:33248,58472:33255,58473:33274,58474:33275,58475:33278,58476:33281,58477:33282,58478:33285,58479:33287,58480:33290,58481:33293,58482:33296,58483:33302,58484:33321,58485:33323,58486:33336,58487:33331,58488:33344,58489:33369,58490:33368,58491:33373,58492:33370,58493:33375,58494:33380,58496:33378,58497:33384,58498:33386,58499:33387,58500:33326,58501:33393,58502:33399,58503:33400,58504:33406,58505:33421,58506:33426,58507:33451,58508:33439,58509:33467,58510:33452,58511:33505,58512:33507,58513:33503,58514:33490,58515:33524,58516:33523,58517:33530,58518:33683,58519:33539,58520:33531,58521:33529,58522:33502,58523:33542,58524:33500,58525:33545,58526:33497,58527:33589,58528:33588,58529:33558,58530:33586,58531:33585,58532:33600,58533:33593,58534:33616,58535:33605,58536:33583,58537:33579,58538:33559,58539:33560,58540:33669,58541:33690,58542:33706,58543:33695,58544:33698,58545:33686,58546:33571,58547:33678,58548:33671,58549:33674,58550:33660,58551:33717,58552:33651,58553:33653,58554:33696,58555:33673,58556:33704,58557:33780,58558:33811,58559:33771,58560:33742,58561:33789,58562:33795,58563:33752,58564:33803,58565:33729,58566:33783,58567:33799,58568:33760,58569:33778,58570:33805,58571:33826,58572:33824,58573:33725,58574:33848,58575:34054,58576:33787,58577:33901,58578:33834,58579:33852,58580:34138,58581:33924,58582:33911,58583:33899,58584:33965,58585:33902,58586:33922,58587:33897,58588:33862,58589:33836,58590:33903,58591:33913,58592:33845,58593:33994,58594:33890,58595:33977,58596:33983,58597:33951,58598:34009,58599:33997,58600:33979,58601:34010,58602:34e3,58603:33985,58604:33990,58605:34006,58606:33953,58607:34081,58608:34047,58609:34036,58610:34071,58611:34072,58612:34092,58613:34079,58614:34069,58615:34068,58616:34044,58617:34112,58618:34147,58619:34136,58620:34120,58688:34113,58689:34306,58690:34123,58691:34133,58692:34176,58693:34212,58694:34184,58695:34193,58696:34186,58697:34216,58698:34157,58699:34196,58700:34203,58701:34282,58702:34183,58703:34204,58704:34167,58705:34174,58706:34192,58707:34249,58708:34234,58709:34255,58710:34233,58711:34256,58712:34261,58713:34269,58714:34277,58715:34268,58716:34297,58717:34314,58718:34323,58719:34315,58720:34302,58721:34298,58722:34310,58723:34338,58724:34330,58725:34352,58726:34367,58727:34381,58728:20053,58729:34388,58730:34399,58731:34407,58732:34417,58733:34451,58734:34467,58735:34473,58736:34474,58737:34443,58738:34444,58739:34486,58740:34479,58741:34500,58742:34502,58743:34480,58744:34505,58745:34851,58746:34475,58747:34516,58748:34526,58749:34537,58750:34540,58752:34527,58753:34523,58754:34543,58755:34578,58756:34566,58757:34568,58758:34560,58759:34563,58760:34555,58761:34577,58762:34569,58763:34573,58764:34553,58765:34570,58766:34612,58767:34623,58768:34615,58769:34619,58770:34597,58771:34601,58772:34586,58773:34656,58774:34655,58775:34680,58776:34636,58777:34638,58778:34676,58779:34647,58780:34664,58781:34670,58782:34649,58783:34643,58784:34659,58785:34666,58786:34821,58787:34722,58788:34719,58789:34690,58790:34735,58791:34763,58792:34749,58793:34752,58794:34768,58795:38614,58796:34731,58797:34756,58798:34739,58799:34759,58800:34758,58801:34747,58802:34799,58803:34802,58804:34784,58805:34831,58806:34829,58807:34814,58808:34806,58809:34807,58810:34830,58811:34770,58812:34833,58813:34838,58814:34837,58815:34850,58816:34849,58817:34865,58818:34870,58819:34873,58820:34855,58821:34875,58822:34884,58823:34882,58824:34898,58825:34905,58826:34910,58827:34914,58828:34923,58829:34945,58830:34942,58831:34974,58832:34933,58833:34941,58834:34997,58835:34930,58836:34946,58837:34967,58838:34962,58839:34990,58840:34969,58841:34978,58842:34957,58843:34980,58844:34992,58845:35007,58846:34993,58847:35011,58848:35012,58849:35028,58850:35032,58851:35033,58852:35037,58853:35065,58854:35074,58855:35068,58856:35060,58857:35048,58858:35058,58859:35076,58860:35084,58861:35082,58862:35091,58863:35139,58864:35102,58865:35109,58866:35114,58867:35115,58868:35137,58869:35140,58870:35131,58871:35126,58872:35128,58873:35148,58874:35101,58875:35168,58876:35166,58944:35174,58945:35172,58946:35181,58947:35178,58948:35183,58949:35188,58950:35191,58951:35198,58952:35203,58953:35208,58954:35210,58955:35219,58956:35224,58957:35233,58958:35241,58959:35238,58960:35244,58961:35247,58962:35250,58963:35258,58964:35261,58965:35263,58966:35264,58967:35290,58968:35292,58969:35293,58970:35303,58971:35316,58972:35320,58973:35331,58974:35350,58975:35344,58976:35340,58977:35355,58978:35357,58979:35365,58980:35382,58981:35393,58982:35419,58983:35410,58984:35398,58985:35400,58986:35452,58987:35437,58988:35436,58989:35426,58990:35461,58991:35458,58992:35460,58993:35496,58994:35489,58995:35473,58996:35493,58997:35494,58998:35482,58999:35491,59e3:35524,59001:35533,59002:35522,59003:35546,59004:35563,59005:35571,59006:35559,59008:35556,59009:35569,59010:35604,59011:35552,59012:35554,59013:35575,59014:35550,59015:35547,59016:35596,59017:35591,59018:35610,59019:35553,59020:35606,59021:35600,59022:35607,59023:35616,59024:35635,59025:38827,59026:35622,59027:35627,59028:35646,59029:35624,59030:35649,59031:35660,59032:35663,59033:35662,59034:35657,59035:35670,59036:35675,59037:35674,59038:35691,59039:35679,59040:35692,59041:35695,59042:35700,59043:35709,59044:35712,59045:35724,59046:35726,59047:35730,59048:35731,59049:35734,59050:35737,59051:35738,59052:35898,59053:35905,59054:35903,59055:35912,59056:35916,59057:35918,59058:35920,59059:35925,59060:35938,59061:35948,59062:35960,59063:35962,59064:35970,59065:35977,59066:35973,59067:35978,59068:35981,59069:35982,59070:35988,59071:35964,59072:35992,59073:25117,59074:36013,59075:36010,59076:36029,59077:36018,59078:36019,59079:36014,59080:36022,59081:36040,59082:36033,59083:36068,59084:36067,59085:36058,59086:36093,59087:36090,59088:36091,59089:36100,59090:36101,59091:36106,59092:36103,59093:36111,59094:36109,59095:36112,59096:40782,59097:36115,59098:36045,59099:36116,59100:36118,59101:36199,59102:36205,59103:36209,59104:36211,59105:36225,59106:36249,59107:36290,59108:36286,59109:36282,59110:36303,59111:36314,59112:36310,59113:36300,59114:36315,59115:36299,59116:36330,59117:36331,59118:36319,59119:36323,59120:36348,59121:36360,59122:36361,59123:36351,59124:36381,59125:36382,59126:36368,59127:36383,59128:36418,59129:36405,59130:36400,59131:36404,59132:36426,59200:36423,59201:36425,59202:36428,59203:36432,59204:36424,59205:36441,59206:36452,59207:36448,59208:36394,59209:36451,59210:36437,59211:36470,59212:36466,59213:36476,59214:36481,59215:36487,59216:36485,59217:36484,59218:36491,59219:36490,59220:36499,59221:36497,59222:36500,59223:36505,59224:36522,59225:36513,59226:36524,59227:36528,59228:36550,59229:36529,59230:36542,59231:36549,59232:36552,59233:36555,59234:36571,59235:36579,59236:36604,59237:36603,59238:36587,59239:36606,59240:36618,59241:36613,59242:36629,59243:36626,59244:36633,59245:36627,59246:36636,59247:36639,59248:36635,59249:36620,59250:36646,59251:36659,59252:36667,59253:36665,59254:36677,59255:36674,59256:36670,59257:36684,59258:36681,59259:36678,59260:36686,59261:36695,59262:36700,59264:36706,59265:36707,59266:36708,59267:36764,59268:36767,59269:36771,59270:36781,59271:36783,59272:36791,59273:36826,59274:36837,59275:36834,59276:36842,59277:36847,59278:36999,59279:36852,59280:36869,59281:36857,59282:36858,59283:36881,59284:36885,59285:36897,59286:36877,59287:36894,59288:36886,59289:36875,59290:36903,59291:36918,59292:36917,59293:36921,59294:36856,59295:36943,59296:36944,59297:36945,59298:36946,59299:36878,59300:36937,59301:36926,59302:36950,59303:36952,59304:36958,59305:36968,59306:36975,59307:36982,59308:38568,59309:36978,59310:36994,59311:36989,59312:36993,59313:36992,59314:37002,59315:37001,59316:37007,59317:37032,59318:37039,59319:37041,59320:37045,59321:37090,59322:37092,59323:25160,59324:37083,59325:37122,59326:37138,59327:37145,59328:37170,59329:37168,59330:37194,59331:37206,59332:37208,59333:37219,59334:37221,59335:37225,59336:37235,59337:37234,59338:37259,59339:37257,59340:37250,59341:37282,59342:37291,59343:37295,59344:37290,59345:37301,59346:37300,59347:37306,59348:37312,59349:37313,59350:37321,59351:37323,59352:37328,59353:37334,59354:37343,59355:37345,59356:37339,59357:37372,59358:37365,59359:37366,59360:37406,59361:37375,59362:37396,59363:37420,59364:37397,59365:37393,59366:37470,59367:37463,59368:37445,59369:37449,59370:37476,59371:37448,59372:37525,59373:37439,59374:37451,59375:37456,59376:37532,59377:37526,59378:37523,59379:37531,59380:37466,59381:37583,59382:37561,59383:37559,59384:37609,59385:37647,59386:37626,59387:37700,59388:37678,59456:37657,59457:37666,59458:37658,59459:37667,59460:37690,59461:37685,59462:37691,59463:37724,59464:37728,59465:37756,59466:37742,59467:37718,59468:37808,59469:37804,59470:37805,59471:37780,59472:37817,59473:37846,59474:37847,59475:37864,59476:37861,59477:37848,59478:37827,59479:37853,59480:37840,59481:37832,59482:37860,59483:37914,59484:37908,59485:37907,59486:37891,59487:37895,59488:37904,59489:37942,59490:37931,59491:37941,59492:37921,59493:37946,59494:37953,59495:37970,59496:37956,59497:37979,59498:37984,59499:37986,59500:37982,59501:37994,59502:37417,59503:38e3,59504:38005,59505:38007,59506:38013,59507:37978,59508:38012,59509:38014,59510:38017,59511:38015,59512:38274,59513:38279,59514:38282,59515:38292,59516:38294,59517:38296,59518:38297,59520:38304,59521:38312,59522:38311,59523:38317,59524:38332,59525:38331,59526:38329,59527:38334,59528:38346,59529:28662,59530:38339,59531:38349,59532:38348,59533:38357,59534:38356,59535:38358,59536:38364,59537:38369,59538:38373,59539:38370,59540:38433,59541:38440,59542:38446,59543:38447,59544:38466,59545:38476,59546:38479,59547:38475,59548:38519,59549:38492,59550:38494,59551:38493,59552:38495,59553:38502,59554:38514,59555:38508,59556:38541,59557:38552,59558:38549,59559:38551,59560:38570,59561:38567,59562:38577,59563:38578,59564:38576,59565:38580,59566:38582,59567:38584,59568:38585,59569:38606,59570:38603,59571:38601,59572:38605,59573:35149,59574:38620,59575:38669,59576:38613,59577:38649,59578:38660,59579:38662,59580:38664,59581:38675,59582:38670,59583:38673,59584:38671,59585:38678,59586:38681,59587:38692,59588:38698,59589:38704,59590:38713,59591:38717,59592:38718,59593:38724,59594:38726,59595:38728,59596:38722,59597:38729,59598:38748,59599:38752,59600:38756,59601:38758,59602:38760,59603:21202,59604:38763,59605:38769,59606:38777,59607:38789,59608:38780,59609:38785,59610:38778,59611:38790,59612:38795,59613:38799,59614:38800,59615:38812,59616:38824,59617:38822,59618:38819,59619:38835,59620:38836,59621:38851,59622:38854,59623:38856,59624:38859,59625:38876,59626:38893,59627:40783,59628:38898,59629:31455,59630:38902,59631:38901,59632:38927,59633:38924,59634:38968,59635:38948,59636:38945,59637:38967,59638:38973,59639:38982,59640:38991,59641:38987,59642:39019,59643:39023,59644:39024,59712:39025,59713:39028,59714:39027,59715:39082,59716:39087,59717:39089,59718:39094,59719:39108,59720:39107,59721:39110,59722:39145,59723:39147,59724:39171,59725:39177,59726:39186,59727:39188,59728:39192,59729:39201,59730:39197,59731:39198,59732:39204,59733:39200,59734:39212,59735:39214,59736:39229,59737:39230,59738:39234,59739:39241,59740:39237,59741:39248,59742:39243,59743:39249,59744:39250,59745:39244,59746:39253,59747:39319,59748:39320,59749:39333,59750:39341,59751:39342,59752:39356,59753:39391,59754:39387,59755:39389,59756:39384,59757:39377,59758:39405,59759:39406,59760:39409,59761:39410,59762:39419,59763:39416,59764:39425,59765:39439,59766:39429,59767:39394,59768:39449,59769:39467,59770:39479,59771:39493,59772:39490,59773:39488,59774:39491,59776:39486,59777:39509,59778:39501,59779:39515,59780:39511,59781:39519,59782:39522,59783:39525,59784:39524,59785:39529,59786:39531,59787:39530,59788:39597,59789:39600,59790:39612,59791:39616,59792:39631,59793:39633,59794:39635,59795:39636,59796:39646,59797:39647,59798:39650,59799:39651,59800:39654,59801:39663,59802:39659,59803:39662,59804:39668,59805:39665,59806:39671,59807:39675,59808:39686,59809:39704,59810:39706,59811:39711,59812:39714,59813:39715,59814:39717,59815:39719,59816:39720,59817:39721,59818:39722,59819:39726,59820:39727,59821:39730,59822:39748,59823:39747,59824:39759,59825:39757,59826:39758,59827:39761,59828:39768,59829:39796,59830:39827,59831:39811,59832:39825,59833:39830,59834:39831,59835:39839,59836:39840,59837:39848,59838:39860,59839:39872,59840:39882,59841:39865,59842:39878,59843:39887,59844:39889,59845:39890,59846:39907,59847:39906,59848:39908,59849:39892,59850:39905,59851:39994,59852:39922,59853:39921,59854:39920,59855:39957,59856:39956,59857:39945,59858:39955,59859:39948,59860:39942,59861:39944,59862:39954,59863:39946,59864:39940,59865:39982,59866:39963,59867:39973,59868:39972,59869:39969,59870:39984,59871:40007,59872:39986,59873:40006,59874:39998,59875:40026,59876:40032,59877:40039,59878:40054,59879:40056,59880:40167,59881:40172,59882:40176,59883:40201,59884:40200,59885:40171,59886:40195,59887:40198,59888:40234,59889:40230,59890:40367,59891:40227,59892:40223,59893:40260,59894:40213,59895:40210,59896:40257,59897:40255,59898:40254,59899:40262,59900:40264,59968:40285,59969:40286,59970:40292,59971:40273,59972:40272,59973:40281,59974:40306,59975:40329,59976:40327,59977:40363,59978:40303,59979:40314,59980:40346,59981:40356,59982:40361,59983:40370,59984:40388,59985:40385,59986:40379,59987:40376,59988:40378,59989:40390,59990:40399,59991:40386,59992:40409,59993:40403,59994:40440,59995:40422,59996:40429,59997:40431,59998:40445,59999:40474,6e4:40475,60001:40478,60002:40565,60003:40569,60004:40573,60005:40577,60006:40584,60007:40587,60008:40588,60009:40594,60010:40597,60011:40593,60012:40605,60013:40613,60014:40617,60015:40632,60016:40618,60017:40621,60018:38753,60019:40652,60020:40654,60021:40655,60022:40656,60023:40660,60024:40668,60025:40670,60026:40669,60027:40672,60028:40677,60029:40680,60030:40687,60032:40692,60033:40694,60034:40695,60035:40697,60036:40699,60037:40700,60038:40701,60039:40711,60040:40712,60041:30391,60042:40725,60043:40737,60044:40748,60045:40766,60046:40778,60047:40786,60048:40788,60049:40803,60050:40799,60051:40800,60052:40801,60053:40806,60054:40807,60055:40812,60056:40810,60057:40823,60058:40818,60059:40822,60060:40853,60061:40860,60062:40864,60063:22575,60064:27079,60065:36953,60066:29796,60067:20956,60068:29081}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1),i=r(2);t.decode=function(e,t){var r=new Uint8ClampedArray(e.length);r.set(e);for(var a=new n.default(285,256,0),o=new i.default(a,r),s=new Uint8ClampedArray(t),u=!1,l=0;l<t;l++){var c=o.evaluateAt(a.exp(l+a.generatorBase));s[s.length-1-l]=c,0!==c&&(u=!0)}if(!u)return r;var f=new i.default(a,s),h=function(e,t,r,n){var i;t.degree()<r.degree()&&(t=(i=[r,t])[0],r=i[1]);for(var a=t,o=r,s=e.zero,u=e.one;o.degree()>=n/2;){var l=a,c=s;if(s=u,(a=o).isZero())return null;o=l;for(var f=e.zero,h=a.getCoefficient(a.degree()),d=e.inverse(h);o.degree()>=a.degree()&&!o.isZero();){var p=o.degree()-a.degree(),m=e.multiply(o.getCoefficient(o.degree()),d);f=f.addOrSubtract(e.buildMonomial(p,m)),o=o.addOrSubtract(a.multiplyByMonomial(p,m))}if(u=f.multiplyPoly(s).addOrSubtract(c),o.degree()>=a.degree())return null}var g=u.getCoefficient(0);if(0===g)return null;var b=e.inverse(g);return[u.multiply(b),o.multiply(b)]}(a,a.buildMonomial(t,1),f,t);if(null===h)return null;var d=function(e,t){var r=t.degree();if(1===r)return[t.getCoefficient(1)];for(var n=new Array(r),i=0,a=1;a<e.size&&i<r;a++)0===t.evaluateAt(a)&&(n[i]=e.inverse(a),i++);return i!==r?null:n}(a,h[0]);if(null==d)return null;for(var p=function(e,t,r){for(var i=r.length,a=new Array(i),o=0;o<i;o++){for(var s=e.inverse(r[o]),u=1,l=0;l<i;l++)o!==l&&(u=e.multiply(u,n.addOrSubtractGF(1,e.multiply(r[l],s))));a[o]=e.multiply(t.evaluateAt(s),e.inverse(u)),0!==e.generatorBase&&(a[o]=e.multiply(a[o],s))}return a}(a,h[1],d),m=0;m<d.length;m++){var g=r.length-1-a.log(d[m]);if(g<0)return null;r[g]=n.addOrSubtractGF(r[g],p[m])}return r}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VERSIONS=[{infoBits:null,versionNumber:1,alignmentPatternCenters:[],errorCorrectionLevels:[{ecCodewordsPerBlock:7,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:13,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:13}]},{ecCodewordsPerBlock:17,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:2,alignmentPatternCenters:[6,18],errorCorrectionLevels:[{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:34}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:28}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]}]},{infoBits:null,versionNumber:3,alignmentPatternCenters:[6,22],errorCorrectionLevels:[{ecCodewordsPerBlock:15,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:55}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:13}]}]},{infoBits:null,versionNumber:4,alignmentPatternCenters:[6,26],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:80}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:32}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:5,alignmentPatternCenters:[6,30],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:43}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:11},{numBlocks:2,dataCodewordsPerBlock:12}]}]},{infoBits:null,versionNumber:6,alignmentPatternCenters:[6,34],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:27}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:31892,versionNumber:7,alignmentPatternCenters:[6,22,38],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:78}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:31}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:13},{numBlocks:1,dataCodewordsPerBlock:14}]}]},{infoBits:34236,versionNumber:8,alignmentPatternCenters:[6,24,42],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:97}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:38},{numBlocks:2,dataCodewordsPerBlock:39}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:18},{numBlocks:2,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:14},{numBlocks:2,dataCodewordsPerBlock:15}]}]},{infoBits:39577,versionNumber:9,alignmentPatternCenters:[6,26,46],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:12},{numBlocks:4,dataCodewordsPerBlock:13}]}]},{infoBits:42195,versionNumber:10,alignmentPatternCenters:[6,28,50],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68},{numBlocks:2,dataCodewordsPerBlock:69}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:43},{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]}]},{infoBits:48118,versionNumber:11,alignmentPatternCenters:[6,30,54],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:81}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:50},{numBlocks:4,dataCodewordsPerBlock:51}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:22},{numBlocks:4,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:12},{numBlocks:8,dataCodewordsPerBlock:13}]}]},{infoBits:51042,versionNumber:12,alignmentPatternCenters:[6,32,58],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:92},{numBlocks:2,dataCodewordsPerBlock:93}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:20},{numBlocks:6,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:55367,versionNumber:13,alignmentPatternCenters:[6,34,62],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:37},{numBlocks:1,dataCodewordsPerBlock:38}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:20},{numBlocks:4,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:11},{numBlocks:4,dataCodewordsPerBlock:12}]}]},{infoBits:58893,versionNumber:14,alignmentPatternCenters:[6,26,46,66],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:40},{numBlocks:5,dataCodewordsPerBlock:41}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:16},{numBlocks:5,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:5,dataCodewordsPerBlock:13}]}]},{infoBits:63784,versionNumber:15,alignmentPatternCenters:[6,26,48,70],errorCorrectionLevels:[{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:87},{numBlocks:1,dataCodewordsPerBlock:88}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:41},{numBlocks:5,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:7,dataCodewordsPerBlock:13}]}]},{infoBits:68472,versionNumber:16,alignmentPatternCenters:[6,26,50,74],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:98},{numBlocks:1,dataCodewordsPerBlock:99}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:70749,versionNumber:17,alignmentPatternCenters:[6,30,54,78],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:1,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22},{numBlocks:15,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:17,dataCodewordsPerBlock:15}]}]},{infoBits:76311,versionNumber:18,alignmentPatternCenters:[6,30,56,82],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:120},{numBlocks:1,dataCodewordsPerBlock:121}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:43},{numBlocks:4,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:1,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:19,dataCodewordsPerBlock:15}]}]},{infoBits:79154,versionNumber:19,alignmentPatternCenters:[6,30,58,86],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:113},{numBlocks:4,dataCodewordsPerBlock:114}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:44},{numBlocks:11,dataCodewordsPerBlock:45}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:21},{numBlocks:4,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:13},{numBlocks:16,dataCodewordsPerBlock:14}]}]},{infoBits:84390,versionNumber:20,alignmentPatternCenters:[6,34,62,90],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:41},{numBlocks:13,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:5,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:15},{numBlocks:10,dataCodewordsPerBlock:16}]}]},{infoBits:87683,versionNumber:21,alignmentPatternCenters:[6,28,50,72,94],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:116},{numBlocks:4,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:16},{numBlocks:6,dataCodewordsPerBlock:17}]}]},{infoBits:92361,versionNumber:22,alignmentPatternCenters:[6,26,50,74,98],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:111},{numBlocks:7,dataCodewordsPerBlock:112}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:13}]}]},{infoBits:96236,versionNumber:23,alignmentPatternCenters:[6,30,54,74,102],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:121},{numBlocks:5,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:47},{numBlocks:14,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:16,dataCodewordsPerBlock:15},{numBlocks:14,dataCodewordsPerBlock:16}]}]},{infoBits:102084,versionNumber:24,alignmentPatternCenters:[6,28,54,80,106],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:45},{numBlocks:14,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:30,dataCodewordsPerBlock:16},{numBlocks:2,dataCodewordsPerBlock:17}]}]},{infoBits:102881,versionNumber:25,alignmentPatternCenters:[6,32,58,84,110],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:106},{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:47},{numBlocks:13,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:110507,versionNumber:26,alignmentPatternCenters:[6,30,58,86,114],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:114},{numBlocks:2,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:46},{numBlocks:4,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:28,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:33,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]}]},{infoBits:110734,versionNumber:27,alignmentPatternCenters:[6,34,62,90,118],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:23},{numBlocks:26,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:117786,versionNumber:28,alignmentPatternCenters:[6,26,50,74,98,122],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:117},{numBlocks:10,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:45},{numBlocks:23,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:24},{numBlocks:31,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:31,dataCodewordsPerBlock:16}]}]},{infoBits:119615,versionNumber:29,alignmentPatternCenters:[6,30,54,78,102,126],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:116},{numBlocks:7,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:21,dataCodewordsPerBlock:45},{numBlocks:7,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:23},{numBlocks:37,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:26,dataCodewordsPerBlock:16}]}]},{infoBits:126325,versionNumber:30,alignmentPatternCenters:[6,26,52,78,104,130],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:115},{numBlocks:10,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:47},{numBlocks:10,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:25,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:25,dataCodewordsPerBlock:16}]}]},{infoBits:127568,versionNumber:31,alignmentPatternCenters:[6,30,56,82,108,134],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:3,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:46},{numBlocks:29,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:24},{numBlocks:1,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:133589,versionNumber:32,alignmentPatternCenters:[6,34,60,86,112,138],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:24},{numBlocks:35,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:35,dataCodewordsPerBlock:16}]}]},{infoBits:136944,versionNumber:33,alignmentPatternCenters:[6,30,58,86,114,142],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:21,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:24},{numBlocks:19,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:141498,versionNumber:34,alignmentPatternCenters:[6,34,62,90,118,146],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:6,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:44,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:59,dataCodewordsPerBlock:16},{numBlocks:1,dataCodewordsPerBlock:17}]}]},{infoBits:145311,versionNumber:35,alignmentPatternCenters:[6,30,54,78,102,126,150],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:121},{numBlocks:7,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:47},{numBlocks:26,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:39,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:41,dataCodewordsPerBlock:16}]}]},{infoBits:150283,versionNumber:36,alignmentPatternCenters:[6,24,50,76,102,128,154],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:121},{numBlocks:14,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:47},{numBlocks:34,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:46,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:64,dataCodewordsPerBlock:16}]}]},{infoBits:152622,versionNumber:37,alignmentPatternCenters:[6,28,54,80,106,132,158],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:46},{numBlocks:14,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:49,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:24,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:158308,versionNumber:38,alignmentPatternCenters:[6,32,58,84,110,136,162],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:122},{numBlocks:18,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:46},{numBlocks:32,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:48,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:15},{numBlocks:32,dataCodewordsPerBlock:16}]}]},{infoBits:161089,versionNumber:39,alignmentPatternCenters:[6,26,54,82,110,138,166],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:40,dataCodewordsPerBlock:47},{numBlocks:7,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:43,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:15},{numBlocks:67,dataCodewordsPerBlock:16}]}]},{infoBits:167017,versionNumber:40,alignmentPatternCenters:[6,30,58,86,114,142,170],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:118},{numBlocks:6,dataCodewordsPerBlock:119}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:18,dataCodewordsPerBlock:47},{numBlocks:31,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:24},{numBlocks:34,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:15},{numBlocks:61,dataCodewordsPerBlock:16}]}]}]},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(0);function i(e,t,r,n){var i=e.x-t.x+r.x-n.x,a=e.y-t.y+r.y-n.y;if(0===i&&0===a)return{a11:t.x-e.x,a12:t.y-e.y,a13:0,a21:r.x-t.x,a22:r.y-t.y,a23:0,a31:e.x,a32:e.y,a33:1};var o=t.x-r.x,s=n.x-r.x,u=t.y-r.y,l=n.y-r.y,c=o*l-s*u,f=(i*l-s*a)/c,h=(o*a-i*u)/c;return{a11:t.x-e.x+f*t.x,a12:t.y-e.y+f*t.y,a13:f,a21:n.x-e.x+h*n.x,a22:n.y-e.y+h*n.y,a23:h,a31:e.x,a32:e.y,a33:1}}t.extract=function(e,t){for(var r,a,o=function(e,t,r,n){var a=i({x:3.5,y:3.5},t,r,n);return{a11:a.a22*a.a33-a.a23*a.a32,a12:a.a13*a.a32-a.a12*a.a33,a13:a.a12*a.a23-a.a13*a.a22,a21:a.a23*a.a31-a.a21*a.a33,a22:a.a11*a.a33-a.a13*a.a31,a23:a.a13*a.a21-a.a11*a.a23,a31:a.a21*a.a32-a.a22*a.a31,a32:a.a12*a.a31-a.a11*a.a32,a33:a.a11*a.a22-a.a12*a.a21}}(0,{x:t.dimension-3.5,y:3.5},{x:t.dimension-6.5,y:t.dimension-6.5},{x:3.5,y:t.dimension-3.5}),s=(a=o,{a11:(r=i(t.topLeft,t.topRight,t.alignmentPattern,t.bottomLeft)).a11*a.a11+r.a21*a.a12+r.a31*a.a13,a12:r.a12*a.a11+r.a22*a.a12+r.a32*a.a13,a13:r.a13*a.a11+r.a23*a.a12+r.a33*a.a13,a21:r.a11*a.a21+r.a21*a.a22+r.a31*a.a23,a22:r.a12*a.a21+r.a22*a.a22+r.a32*a.a23,a23:r.a13*a.a21+r.a23*a.a22+r.a33*a.a23,a31:r.a11*a.a31+r.a21*a.a32+r.a31*a.a33,a32:r.a12*a.a31+r.a22*a.a32+r.a32*a.a33,a33:r.a13*a.a31+r.a23*a.a32+r.a33*a.a33}),u=n.BitMatrix.createEmpty(t.dimension,t.dimension),l=function(e,t){var r=s.a13*e+s.a23*t+s.a33;return{x:(s.a11*e+s.a21*t+s.a31)/r,y:(s.a12*e+s.a22*t+s.a32)/r}},c=0;c<t.dimension;c++)for(var f=0;f<t.dimension;f++){var h=l(f+.5,c+.5);u.set(f,c,e.get(Math.floor(h.x),Math.floor(h.y)))}return{matrix:u,mappingFunction:l}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))};function i(e){return e.reduce(function(e,t){return e+t})}function a(e,t,r,i){var a,o,s,u,l=[{x:Math.floor(e.x),y:Math.floor(e.y)}],c=Math.abs(t.y-e.y)>Math.abs(t.x-e.x);c?(a=Math.floor(e.y),o=Math.floor(e.x),s=Math.floor(t.y),u=Math.floor(t.x)):(a=Math.floor(e.x),o=Math.floor(e.y),s=Math.floor(t.x),u=Math.floor(t.y));for(var f=Math.abs(s-a),h=Math.abs(u-o),d=Math.floor(-f/2),p=a<s?1:-1,m=o<u?1:-1,g=!0,b=a,y=o;b!==s+p;b+=p){var _=c?y:b,v=c?b:y;if(r.get(_,v)!==g&&(g=!g,l.push({x:_,y:v}),l.length===i+1))break;if((d+=h)>0){if(y===u)break;y+=m,d-=f}}for(var w=[],x=0;x<i;x++)l[x]&&l[x+1]?w.push(n(l[x],l[x+1])):w.push(0);return w}function o(e,t,r,n){var i,o=t.y-e.y,s=t.x-e.x,u=a(e,t,r,Math.ceil(n/2)),l=a(e,{x:e.x-s,y:e.y-o},r,Math.ceil(n/2)),c=u.shift()+l.shift()-1;return(i=l.concat(c)).concat.apply(i,u)}function s(e,t){var r=i(e)/i(t),n=0;return t.forEach(function(t,i){n+=Math.pow(e[i]-t*r,2)}),{averageSize:r,error:n}}function u(e,t,r){try{var n=o(e,{x:-1,y:e.y},r,t.length),i=o(e,{x:e.x,y:-1},r,t.length),a=o(e,{x:Math.max(0,e.x-e.y)-1,y:Math.max(0,e.y-e.x)-1},r,t.length),u=o(e,{x:Math.min(r.width,e.x+e.y)+1,y:Math.min(r.height,e.y+e.x)+1},r,t.length),l=s(n,t),c=s(i,t),f=s(a,t),h=s(u,t),d=Math.sqrt(l.error*l.error+c.error*c.error+f.error*f.error+h.error*h.error),p=(l.averageSize+c.averageSize+f.averageSize+h.averageSize)/4;return d+(Math.pow(l.averageSize-p,2)+Math.pow(c.averageSize-p,2)+Math.pow(f.averageSize-p,2)+Math.pow(h.averageSize-p,2))/p}catch(e){return 1/0}}function l(e,t){for(var r=Math.round(t.x);e.get(r,Math.round(t.y));)r--;for(var n=Math.round(t.x);e.get(n,Math.round(t.y));)n++;for(var i=(r+n)/2,a=Math.round(t.y);e.get(Math.round(i),a);)a--;for(var o=Math.round(t.y);e.get(Math.round(i),o);)o++;return{x:i,y:(a+o)/2}}function c(e,t,r,a,s){var l,c,f;try{l=function(e,t,r,a){var s=(i(o(e,r,a,5))/7+i(o(e,t,a,5))/7+i(o(r,e,a,5))/7+i(o(t,e,a,5))/7)/4;if(s<1)throw new Error("Invalid module size");var u=Math.round(n(e,t)/s),l=Math.round(n(e,r)/s),c=Math.floor((u+l)/2)+7;switch(c%4){case 0:c++;break;case 2:c--}return{dimension:c,moduleSize:s}}(a,r,s,e),c=l.dimension,f=l.moduleSize}catch(e){return null}var h=r.x-a.x+s.x,d=r.y-a.y+s.y,p=(n(a,s)+n(a,r))/2/f,m=1-3/p,g={x:a.x+m*(h-a.x),y:a.y+m*(d-a.y)},b=t.map(function(t){var r=(t.top.startX+t.top.endX+t.bottom.startX+t.bottom.endX)/4,a=(t.top.y+t.bottom.y+1)/2;if(e.get(Math.floor(r),Math.floor(a)))return i([t.top.endX-t.top.startX,t.bottom.endX-t.bottom.startX,t.bottom.y-t.top.y+1]),{x:r,y:a,score:u({x:Math.floor(r),y:Math.floor(a)},[1,1,1],e)+n({x:r,y:a},g)}}).filter(function(e){return!!e}).sort(function(e,t){return e.score-t.score});return{alignmentPattern:p>=15&&b.length?b[0]:g,dimension:c}}t.locate=function(e){for(var t=[],r=[],a=[],o=[],s=function(n){for(var s=0,u=!1,l=[0,0,0,0,0],c=function(t){var a=e.get(t,n);if(a===u)s++;else{l=[l[1],l[2],l[3],l[4],s],s=1,u=a;var c=i(l)/7,f=Math.abs(l[0]-c)<c&&Math.abs(l[1]-c)<c&&Math.abs(l[2]-3*c)<3*c&&Math.abs(l[3]-c)<c&&Math.abs(l[4]-c)<c&&!a,h=i(l.slice(-3))/3,d=Math.abs(l[2]-h)<h&&Math.abs(l[3]-h)<h&&Math.abs(l[4]-h)<h&&a;if(f){var p=t-l[3]-l[4],m=p-l[2],g={startX:m,endX:p,y:n};(b=r.filter(function(e){return m>=e.bottom.startX&&m<=e.bottom.endX||p>=e.bottom.startX&&m<=e.bottom.endX||m<=e.bottom.startX&&p>=e.bottom.endX&&l[2]/(e.bottom.endX-e.bottom.startX)<1.5&&l[2]/(e.bottom.endX-e.bottom.startX)>.5})).length>0?b[0].bottom=g:r.push({top:g,bottom:g})}if(d){var b,y=t-l[4],_=y-l[3];g={startX:_,y:n,endX:y},(b=o.filter(function(e){return _>=e.bottom.startX&&_<=e.bottom.endX||y>=e.bottom.startX&&_<=e.bottom.endX||_<=e.bottom.startX&&y>=e.bottom.endX&&l[2]/(e.bottom.endX-e.bottom.startX)<1.5&&l[2]/(e.bottom.endX-e.bottom.startX)>.5})).length>0?b[0].bottom=g:o.push({top:g,bottom:g})}}},f=-1;f<=e.width;f++)c(f);t.push.apply(t,r.filter(function(e){return e.bottom.y!==n&&e.bottom.y-e.top.y>=2})),r=r.filter(function(e){return e.bottom.y===n}),a.push.apply(a,o.filter(function(e){return e.bottom.y!==n})),o=o.filter(function(e){return e.bottom.y===n})},f=0;f<=e.height;f++)s(f);t.push.apply(t,r.filter(function(e){return e.bottom.y-e.top.y>=2})),a.push.apply(a,o);var h=t.filter(function(e){return e.bottom.y-e.top.y>=2}).map(function(t){var r=(t.top.startX+t.top.endX+t.bottom.startX+t.bottom.endX)/4,n=(t.top.y+t.bottom.y+1)/2;if(e.get(Math.round(r),Math.round(n))){var a=[t.top.endX-t.top.startX,t.bottom.endX-t.bottom.startX,t.bottom.y-t.top.y+1],o=i(a)/a.length;return{score:u({x:Math.round(r),y:Math.round(n)},[1,1,3,1,1],e),x:r,y:n,size:o}}}).filter(function(e){return!!e}).sort(function(e,t){return e.score-t.score}).map(function(e,t,r){if(t>4)return null;var n=r.filter(function(e,r){return t!==r}).map(function(t){return{x:t.x,y:t.y,score:t.score+Math.pow(t.size-e.size,2)/e.size,size:t.size}}).sort(function(e,t){return e.score-t.score});if(n.length<2)return null;var i=e.score+n[0].score+n[1].score;return{points:[e].concat(n.slice(0,2)),score:i}}).filter(function(e){return!!e}).sort(function(e,t){return e.score-t.score});if(0===h.length)return null;var d=function(e,t,r){var i,a,o,s,u,l,c,f=n(e,t),h=n(t,r),d=n(e,r);return h>=f&&h>=d?(u=(i=[t,e,r])[0],l=i[1],c=i[2]):d>=h&&d>=f?(u=(a=[e,t,r])[0],l=a[1],c=a[2]):(u=(o=[e,r,t])[0],l=o[1],c=o[2]),(c.x-l.x)*(u.y-l.y)-(c.y-l.y)*(u.x-l.x)<0&&(u=(s=[c,u])[0],c=s[1]),{bottomLeft:u,topLeft:l,topRight:c}}(h[0].points[0],h[0].points[1],h[0].points[2]),p=d.topRight,m=d.topLeft,g=d.bottomLeft,b=c(e,a,p,m,g),y=[];b&&y.push({alignmentPattern:{x:b.alignmentPattern.x,y:b.alignmentPattern.y},bottomLeft:{x:g.x,y:g.y},dimension:b.dimension,topLeft:{x:m.x,y:m.y},topRight:{x:p.x,y:p.y}});var _=l(e,p),v=l(e,m),w=l(e,g),x=c(e,a,_,v,w);return x&&y.push({alignmentPattern:{x:x.alignmentPattern.x,y:x.alignmentPattern.y},bottomLeft:{x:w.x,y:w.y},topLeft:{x:v.x,y:v.y},topRight:{x:_.x,y:_.y},dimension:x.dimension}),0===y.length?null:y}}]).default},e.exports=t()},73065(e,t,r){var n,i;!function(){"use strict";n=function(){var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],i={},a=null;function o(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(){for(var r=this.getLevel(),i=0;i<n.length;i++){var a=n[i];this[a]=i<r?e:this.methodFactory(a,r,this.name)}if(this.log=this.debug,typeof console===t&&r<this.levels.SILENT)return"No console available for logging"}function l(e){return function(){typeof console!==t&&(u.call(this),this[e].apply(this,arguments))}}function c(n,i,a){return function(n){return"debug"===n&&(n="log"),typeof console!==t&&("trace"===n&&r?s:void 0!==console[n]?o(console,n):void 0!==console.log?o(console,"log"):e)}(n)||l.apply(this,arguments)}function f(e,r){var o,s,l,f=this,h="loglevel";function d(){var e;if(typeof window!==t&&h){try{e=window.localStorage[h]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,n=encodeURIComponent(h),i=r.indexOf(n+"=");-1!==i&&(e=/^([^;]+)/.exec(r.slice(i+n.length+1))[1])}catch(e){}return void 0===f.levels[e]&&(e=void 0),e}}function p(e){var t=e;if("string"==typeof t&&void 0!==f.levels[t.toUpperCase()]&&(t=f.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=f.levels.SILENT)return t;throw new TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?h+=":"+e:"symbol"==typeof e&&(h=void 0),f.name=e,f.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},f.methodFactory=r||c,f.getLevel=function(){return null!=l?l:null!=s?s:o},f.setLevel=function(e,r){return l=p(e),!1!==r&&function(e){var r=(n[e]||"silent").toUpperCase();if(typeof window!==t&&h){try{return void(window.localStorage[h]=r)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"="+r+";"}catch(e){}}}(l),u.call(f)},f.setDefaultLevel=function(e){s=p(e),d()||f.setLevel(e,!1)},f.resetLevel=function(){l=null,function(){if(typeof window!==t&&h){try{window.localStorage.removeItem(h)}catch(e){}try{window.document.cookie=encodeURIComponent(h)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}}(),u.call(f)},f.enableAll=function(e){f.setLevel(f.levels.TRACE,e)},f.disableAll=function(e){f.setLevel(f.levels.SILENT,e)},f.rebuild=function(){if(a!==f&&(o=p(a.getLevel())),u.call(f),a===f)for(var e in i)i[e].rebuild()},o=p(a?a.getLevel():"WARN");var m=d();null!=m&&(l=p(m)),u.call(f)}(a=new f).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw new TypeError("You must supply a name when creating a logger.");var t=i[e];return t||(t=i[e]=new f(e,a.methodFactory)),t};var h=typeof window!==t?window.log:void 0;return a.noConflict=function(){return typeof window!==t&&window.log===a&&(window.log=h),a},a.getLoggers=function(){return i},a.default=a,a},void 0===(i=n.call(t,r,t,e))||(e.exports=i)}()},71514(e){"use strict";e.exports=Math.abs},58968(e){"use strict";e.exports=Math.floor},94459(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},6188(e){"use strict";e.exports=Math.max},68002(e){"use strict";e.exports=Math.min},75880(e){"use strict";e.exports=Math.pow},70414(e){"use strict";e.exports=Math.round},73093(e,t,r){"use strict";var n=r(94459);e.exports=function(e){return n(e)||0===e?e:e<0?-1:1}},89211(e){"use strict";var t=function(e){return e!=e};e.exports=function(e,r){return 0===e&&0===r?1/e==1/r:e===r||!(!t(e)||!t(r))}},37653(e,t,r){"use strict";var n=r(38452),i=r(10487),a=r(89211),o=r(9394),s=r(36576),u=i(o(),Object);n(u,{getPolyfill:o,implementation:a,shim:s}),e.exports=u},9394(e,t,r){"use strict";var n=r(89211);e.exports=function(){return"function"==typeof Object.is?Object.is:n}},36576(e,t,r){"use strict";var n=r(9394),i=r(38452);e.exports=function(){var e=n();return i(Object,{is:e},{is:function(){return Object.is!==e}}),e}},28875(e,t,r){"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,a=Object.prototype.toString,o=r(1093),s=Object.prototype.propertyIsEnumerable,u=!s.call({toString:null},"toString"),l=s.call(function(){},"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t=e.constructor;return t&&t.prototype===e},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},d=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!h["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{f(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===a.call(e),n=o(e),s=t&&"[object String]"===a.call(e),h=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var p=l&&r;if(s&&e.length>0&&!i.call(e,0))for(var m=0;m<e.length;++m)h.push(String(m));if(n&&e.length>0)for(var g=0;g<e.length;++g)h.push(String(g));else for(var b in e)p&&"prototype"===b||!i.call(e,b)||h.push(String(b));if(u)for(var y=function(e){if("undefined"==typeof window||!d)return f(e);try{return f(e)}catch(e){return!1}}(e),_=0;_<c.length;++_)y&&"constructor"===c[_]||!i.call(e,c[_])||h.push(c[_]);return h}}e.exports=n},1189(e,t,r){"use strict";var n=Array.prototype.slice,i=r(1093),a=Object.keys,o=a?function(e){return a(e)}:r(28875),s=Object.keys;o.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return i(e)?s(n.call(e)):s(e)})}else Object.keys=o;return Object.keys||o},e.exports=o},1093(e){"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},38403(e,t,r){"use strict";var n=r(1189),i=r(41333)(),a=r(36556),o=r(79612),s=a("Array.prototype.push"),u=a("Object.prototype.propertyIsEnumerable"),l=i?o.getOwnPropertySymbols:null;e.exports=function(e,t){if(null==e)throw new TypeError("target must be an object");var r=o(e);if(1===arguments.length)return r;for(var a=1;a<arguments.length;++a){var c=o(arguments[a]),f=n(c),h=i&&(o.getOwnPropertySymbols||l);if(h)for(var d=h(c),p=0;p<d.length;++p){var m=d[p];u(c,m)&&s(f,m)}for(var g=0;g<f.length;++g){var b=f[g];if(u(c,b)){var y=c[b];r[b]=y}}}return r}},11514(e,t,r){"use strict";var n=r(38403);e.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n<t.length;++n)r[t[n]]=t[n];var i=Object.assign({},r),a="";for(var o in i)a+=o;return e!==a}()||function(){if(!Object.assign||!Object.preventExtensions)return!1;var e=Object.preventExtensions({1:2});try{Object.assign(e,"xy")}catch(t){return"y"===e[1]}return!1}()?n:Object.assign:n}},9805(e,t){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var i in r)n(r,i)&&(e[i]=r[i])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var i={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var a=0;a<n;a++)e[i+a]=t[r+a]},flattenChunks:function(e){var t,r,n,i,a,o;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(o=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)a=e[t],o.set(a,i),i+=a.length;return o}},a={arraySet:function(e,t,r,n,i){for(var a=0;a<n;a++)e[i+a]=t[r+a]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,i)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,a))},t.setTyped(r)},53269(e){"use strict";e.exports=function(e,t,r,n){for(var i=65535&e,a=e>>>16&65535,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{a=a+(i=i+t[n++]|0)|0}while(--o);i%=65521,a%=65521}return i|a<<16}},19681(e){"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}},14823(e){"use strict";var t=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();e.exports=function(e,r,n,i){var a=t,o=i+n;e^=-1;for(var s=i;s<o;s++)e=e>>>8^a[255&(e^r[s])];return-1^e}},58411(e,t,r){"use strict";var n,i=r(9805),a=r(23665),o=r(53269),s=r(14823),u=r(54674),l=-2,c=258,f=262,h=103,d=113,p=666;function m(e,t){return e.msg=u[t],t}function g(e){return(e<<1)-(e>4?9:0)}function b(e){for(var t=e.length;--t>=0;)e[t]=0}function y(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function _(e,t){a._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,y(e.strm)}function v(e,t){e.pending_buf[e.pending++]=t}function w(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function x(e,t,r,n){var a=e.avail_in;return a>n&&(a=n),0===a?0:(e.avail_in-=a,i.arraySet(t,e.input,e.next_in,a,r),1===e.state.wrap?e.adler=o(e.adler,t,a,r):2===e.state.wrap&&(e.adler=s(e.adler,t,a,r)),e.next_in+=a,e.total_in+=a,a)}function k(e,t){var r,n,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-f?e.strstart-(e.w_size-f):0,l=e.window,h=e.w_mask,d=e.prev,p=e.strstart+c,m=l[a+o-1],g=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(l[(r=t)+o]===g&&l[r+o-1]===m&&l[r]===l[a]&&l[++r]===l[a+1]){a+=2,r++;do{}while(l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&a<p);if(n=c-(p-a),a=p-c,n>o){if(e.match_start=t,o=n,n>=s)break;m=l[a+o-1],g=l[a+o]}}}while((t=d[t&h])>u&&0!==--i);return o<=e.lookahead?o:e.lookahead}function B(e){var t,r,n,a,o,s=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=s+(s-f)){i.arraySet(e.window,e.window,s,s,0),e.match_start-=s,e.strstart-=s,e.block_start-=s,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=s?n-s:0}while(--r);t=r=s;do{n=e.prev[--t],e.prev[t]=n>=s?n-s:0}while(--r);a+=s}if(0===e.strm.avail_in)break;if(r=x(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=r,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+3-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<f&&0!==e.strm.avail_in)}function E(e,t){for(var r,n;;){if(e.lookahead<f){if(B(e),e.lookahead<f&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-f&&(e.match_length=k(e,r)),e.match_length>=3)if(n=a._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!==--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(_(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?1:2}function S(e,t){for(var r,n,i;;){if(e.lookahead<f){if(B(e),e.lookahead<f&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-f&&(e.match_length=k(e,r),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,n=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!==--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(_(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=a._tr_tally(e,0,e.window[e.strstart-1]))&&_(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=a._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?1:2}function A(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function C(){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),b(this.dyn_ltree),b(this.dyn_dtree),b(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),b(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),b(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 I(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:d,e.adler=2===t.wrap?0:1,t.last_flush=0,a._tr_init(t),0):m(e,l)}function P(e){var t,r=I(e);return 0===r&&((t=e.state).window_size=2*t.w_size,b(t.head),t.max_lazy_match=n[t.level].max_lazy,t.good_match=n[t.level].good_length,t.nice_match=n[t.level].nice_length,t.max_chain_length=n[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0),r}function T(e,t,r,n,a,o){if(!e)return l;var s=1;if(-1===t&&(t=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),a<1||a>9||8!==r||n<8||n>15||t<0||t>9||o<0||o>4)return m(e,l);8===n&&(n=9);var u=new C;return e.state=u,u.strm=e,u.wrap=s,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=a+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<<a+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=t,u.strategy=o,u.method=r,P(e)}n=[new A(0,0,0,0,function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(B(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,_(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-f&&(_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(_(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(_(e,!1),e.strm.avail_out),1)}),new A(4,4,8,4,E),new A(4,5,16,8,E),new A(4,6,32,32,E),new A(4,4,16,16,S),new A(8,16,32,32,S),new A(8,16,128,128,S),new A(8,32,128,256,S),new A(32,128,258,1024,S),new A(32,258,258,4096,S)],t.deflateInit=function(e,t){return T(e,t,8,15,8,0)},t.deflateInit2=T,t.deflateReset=P,t.deflateResetKeep=I,t.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?l:(e.state.gzhead=t,0):l},t.deflate=function(e,t){var r,i,o,u;if(!e||!e.state||t>5||t<0)return e?m(e,l):l;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===p&&4!==t)return m(e,0===e.avail_out?-5:l);if(i.strm=e,r=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,v(i,31),v(i,139),v(i,8),i.gzhead?(v(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)),v(i,255&i.gzhead.time),v(i,i.gzhead.time>>8&255),v(i,i.gzhead.time>>16&255),v(i,i.gzhead.time>>24&255),v(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),v(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(v(i,255&i.gzhead.extra.length),v(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(v(i,0),v(i,0),v(i,0),v(i,0),v(i,0),v(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),v(i,3),i.status=d);else{var f=8+(i.w_bits-8<<4)<<8;f|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(f|=32),f+=31-f%31,i.status=d,w(i,f),0!==i.strstart&&(w(i,e.adler>>>16),w(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),y(e),o=i.pending,i.pending!==i.pending_buf_size));)v(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),y(e),o=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,v(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),y(e),o=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,v(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),0===u&&(i.status=h)}else i.status=h;if(i.status===h&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&y(e),i.pending+2<=i.pending_buf_size&&(v(i,255&e.adler),v(i,e.adler>>8&255),e.adler=0,i.status=d)):i.status=d),0!==i.pending){if(y(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&g(t)<=g(r)&&4!==t)return m(e,-5);if(i.status===p&&0!==e.avail_in)return m(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&i.status!==p){var x=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(B(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,o,s=e.window;;){if(e.lookahead<=c){if(B(e),e.lookahead<=c&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=s[i=e.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){o=e.strstart+c;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i<o);e.match_length=c-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=a._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==x&&4!==x||(i.status=p),1===x||3===x)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===x&&(1===t?a._tr_align(i):5!==t&&(a._tr_stored_block(i,0,0,!1),3===t&&(b(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),y(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(v(i,255&e.adler),v(i,e.adler>>8&255),v(i,e.adler>>16&255),v(i,e.adler>>24&255),v(i,255&e.total_in),v(i,e.total_in>>8&255),v(i,e.total_in>>16&255),v(i,e.total_in>>24&255)):(w(i,e.adler>>>16),w(i,65535&e.adler)),y(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},t.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==h&&t!==d&&t!==p?m(e,l):(e.state=null,t===d?m(e,-3):0):l},t.deflateSetDictionary=function(e,t){var r,n,a,s,u,c,f,h,d=t.length;if(!e||!e.state)return l;if(2===(s=(r=e.state).wrap)||1===s&&42!==r.status||r.lookahead)return l;for(1===s&&(e.adler=o(e.adler,t,d,0)),r.wrap=0,d>=r.w_size&&(0===s&&(b(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new i.Buf8(r.w_size),i.arraySet(h,t,d-r.w_size,r.w_size,0),t=h,d=r.w_size),u=e.avail_in,c=e.next_in,f=e.input,e.avail_in=d,e.next_in=0,e.input=t,B(r);r.lookahead>=3;){n=r.strstart,a=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(--a);r.strstart=n,r.lookahead=2,B(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,e.next_in=c,e.input=f,e.avail_in=u,r.wrap=s,0},t.deflateInfo="pako deflate (from Nodeca project)"},47293(e){"use strict";e.exports=function(e,t){var r,n,i,a,o,s,u,l,c,f,h,d,p,m,g,b,y,_,v,w,x,k,B,E,S;r=e.state,n=e.next_in,E=e.input,i=n+(e.avail_in-5),a=e.next_out,S=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),u=r.dmax,l=r.wsize,c=r.whave,f=r.wnext,h=r.window,d=r.hold,p=r.bits,m=r.lencode,g=r.distcode,b=(1<<r.lenbits)-1,y=(1<<r.distbits)-1;e:do{p<15&&(d+=E[n++]<<p,p+=8,d+=E[n++]<<p,p+=8),_=m[d&b];t:for(;;){if(d>>>=v=_>>>24,p-=v,0==(v=_>>>16&255))S[a++]=65535&_;else{if(!(16&v)){if(64&v){if(32&v){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}_=m[(65535&_)+(d&(1<<v)-1)];continue t}for(w=65535&_,(v&=15)&&(p<v&&(d+=E[n++]<<p,p+=8),w+=d&(1<<v)-1,d>>>=v,p-=v),p<15&&(d+=E[n++]<<p,p+=8,d+=E[n++]<<p,p+=8),_=g[d&y];;){if(d>>>=v=_>>>24,p-=v,16&(v=_>>>16&255)){if(x=65535&_,p<(v&=15)&&(d+=E[n++]<<p,(p+=8)<v&&(d+=E[n++]<<p,p+=8)),(x+=d&(1<<v)-1)>u){e.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=v,p-=v,x>(v=a-o)){if((v=x-v)>c&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(k=0,B=h,0===f){if(k+=l-v,v<w){w-=v;do{S[a++]=h[k++]}while(--v);k=a-x,B=S}}else if(f<v){if(k+=l+f-v,(v-=f)<w){w-=v;do{S[a++]=h[k++]}while(--v);if(k=0,f<w){w-=v=f;do{S[a++]=h[k++]}while(--v);k=a-x,B=S}}}else if(k+=f-v,v<w){w-=v;do{S[a++]=h[k++]}while(--v);k=a-x,B=S}for(;w>2;)S[a++]=B[k++],S[a++]=B[k++],S[a++]=B[k++],w-=3;w&&(S[a++]=B[k++],w>1&&(S[a++]=B[k++]))}else{k=a-x;do{S[a++]=S[k++],S[a++]=S[k++],S[a++]=S[k++],w-=3}while(w>2);w&&(S[a++]=S[k++],w>1&&(S[a++]=S[k++]))}break}if(64&v){e.msg="invalid distance code",r.mode=30;break e}_=g[(65535&_)+(d&(1<<v)-1)]}}break}}while(n<i&&a<s);n-=w=p>>3,d&=(1<<(p-=w<<3))-1,e.next_in=n,e.next_out=a,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=a<s?s-a+257:257-(a-s),r.hold=d,r.bits=p}},71447(e,t,r){"use strict";var n=r(9805),i=r(53269),a=r(14823),o=r(47293),s=r(21998),u=-2,l=12,c=30;function f(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function h(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function d(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):u}function p(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,d(e)):u}function m(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?u:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,p(e))):u}function g(e,t){var r,n;return e?(n=new h,e.state=n,n.window=null,0!==(r=m(e,t))&&(e.state=null),r):u}var b,y,_=!0;function v(e){if(_){var t;for(b=new n.Buf32(512),y=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,b,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,y,0,e.work,{bits:5}),_=!1}e.lencode=b,e.lenbits=9,e.distcode=y,e.distbits=5}function w(e,t,r,i){var a,o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new n.Buf8(o.wsize)),i>=o.wsize?(n.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>i&&(a=i),n.arraySet(o.window,t,r-i,a,o.wnext),(i-=a)?(n.arraySet(o.window,t,r-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),0}t.inflateReset=p,t.inflateReset2=m,t.inflateResetKeep=d,t.inflateInit=function(e){return g(e,15)},t.inflateInit2=g,t.inflate=function(e,t){var r,h,d,p,m,g,b,y,_,x,k,B,E,S,A,C,I,P,T,M,R,F,O,N,L=0,D=new n.Buf8(4),z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return u;(r=e.state).mode===l&&(r.mode=13),m=e.next_out,d=e.output,b=e.avail_out,p=e.next_in,h=e.input,g=e.avail_in,y=r.hold,_=r.bits,x=g,k=b,F=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;_<16;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}if(2&r.wrap&&35615===y){r.check=0,D[0]=255&y,D[1]=y>>>8&255,r.check=a(r.check,D,2,0),y=0,_=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&y)<<8)+(y>>8))%31){e.msg="incorrect header check",r.mode=c;break}if(8!=(15&y)){e.msg="unknown compression method",r.mode=c;break}if(_-=4,R=8+(15&(y>>>=4)),0===r.wbits)r.wbits=R;else if(R>r.wbits){e.msg="invalid window size",r.mode=c;break}r.dmax=1<<R,e.adler=r.check=1,r.mode=512&y?10:l,y=0,_=0;break;case 2:for(;_<16;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}if(r.flags=y,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=c;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=c;break}r.head&&(r.head.text=y>>8&1),512&r.flags&&(D[0]=255&y,D[1]=y>>>8&255,r.check=a(r.check,D,2,0)),y=0,_=0,r.mode=3;case 3:for(;_<32;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}r.head&&(r.head.time=y),512&r.flags&&(D[0]=255&y,D[1]=y>>>8&255,D[2]=y>>>16&255,D[3]=y>>>24&255,r.check=a(r.check,D,4,0)),y=0,_=0,r.mode=4;case 4:for(;_<16;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}r.head&&(r.head.xflags=255&y,r.head.os=y>>8),512&r.flags&&(D[0]=255&y,D[1]=y>>>8&255,r.check=a(r.check,D,2,0)),y=0,_=0,r.mode=5;case 5:if(1024&r.flags){for(;_<16;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}r.length=y,r.head&&(r.head.extra_len=y),512&r.flags&&(D[0]=255&y,D[1]=y>>>8&255,r.check=a(r.check,D,2,0)),y=0,_=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((B=r.length)>g&&(B=g),B&&(r.head&&(R=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,h,p,B,R)),512&r.flags&&(r.check=a(r.check,h,B,p)),g-=B,p+=B,r.length-=B),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===g)break e;B=0;do{R=h[p+B++],r.head&&R&&r.length<65536&&(r.head.name+=String.fromCharCode(R))}while(R&&B<g);if(512&r.flags&&(r.check=a(r.check,h,B,p)),g-=B,p+=B,R)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===g)break e;B=0;do{R=h[p+B++],r.head&&R&&r.length<65536&&(r.head.comment+=String.fromCharCode(R))}while(R&&B<g);if(512&r.flags&&(r.check=a(r.check,h,B,p)),g-=B,p+=B,R)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;_<16;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}if(y!==(65535&r.check)){e.msg="header crc mismatch",r.mode=c;break}y=0,_=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=l;break;case 10:for(;_<32;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}e.adler=r.check=f(y),y=0,_=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=m,e.avail_out=b,e.next_in=p,e.avail_in=g,r.hold=y,r.bits=_,2;e.adler=r.check=1,r.mode=l;case l:if(5===t||6===t)break e;case 13:if(r.last){y>>>=7&_,_-=7&_,r.mode=27;break}for(;_<3;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}switch(r.last=1&y,_-=1,3&(y>>>=1)){case 0:r.mode=14;break;case 1:if(v(r),r.mode=20,6===t){y>>>=2,_-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=c}y>>>=2,_-=2;break;case 14:for(y>>>=7&_,_-=7&_;_<32;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}if((65535&y)!=(y>>>16^65535)){e.msg="invalid stored block lengths",r.mode=c;break}if(r.length=65535&y,y=0,_=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(B=r.length){if(B>g&&(B=g),B>b&&(B=b),0===B)break e;n.arraySet(d,h,p,B,m),g-=B,p+=B,b-=B,m+=B,r.length-=B;break}r.mode=l;break;case 17:for(;_<14;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}if(r.nlen=257+(31&y),y>>>=5,_-=5,r.ndist=1+(31&y),y>>>=5,_-=5,r.ncode=4+(15&y),y>>>=4,_-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=c;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;_<3;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}r.lens[z[r.have++]]=7&y,y>>>=3,_-=3}for(;r.have<19;)r.lens[z[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,O={bits:r.lenbits},F=s(0,r.lens,0,19,r.lencode,0,r.work,O),r.lenbits=O.bits,F){e.msg="invalid code lengths set",r.mode=c;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;C=(L=r.lencode[y&(1<<r.lenbits)-1])>>>16&255,I=65535&L,!((A=L>>>24)<=_);){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}if(I<16)y>>>=A,_-=A,r.lens[r.have++]=I;else{if(16===I){for(N=A+2;_<N;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}if(y>>>=A,_-=A,0===r.have){e.msg="invalid bit length repeat",r.mode=c;break}R=r.lens[r.have-1],B=3+(3&y),y>>>=2,_-=2}else if(17===I){for(N=A+3;_<N;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}_-=A,R=0,B=3+(7&(y>>>=A)),y>>>=3,_-=3}else{for(N=A+7;_<N;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}_-=A,R=0,B=11+(127&(y>>>=A)),y>>>=7,_-=7}if(r.have+B>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=c;break}for(;B--;)r.lens[r.have++]=R}}if(r.mode===c)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=c;break}if(r.lenbits=9,O={bits:r.lenbits},F=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,O),r.lenbits=O.bits,F){e.msg="invalid literal/lengths set",r.mode=c;break}if(r.distbits=6,r.distcode=r.distdyn,O={bits:r.distbits},F=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,O),r.distbits=O.bits,F){e.msg="invalid distances set",r.mode=c;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(g>=6&&b>=258){e.next_out=m,e.avail_out=b,e.next_in=p,e.avail_in=g,r.hold=y,r.bits=_,o(e,k),m=e.next_out,d=e.output,b=e.avail_out,p=e.next_in,h=e.input,g=e.avail_in,y=r.hold,_=r.bits,r.mode===l&&(r.back=-1);break}for(r.back=0;C=(L=r.lencode[y&(1<<r.lenbits)-1])>>>16&255,I=65535&L,!((A=L>>>24)<=_);){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}if(C&&!(240&C)){for(P=A,T=C,M=I;C=(L=r.lencode[M+((y&(1<<P+T)-1)>>P)])>>>16&255,I=65535&L,!(P+(A=L>>>24)<=_);){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}y>>>=P,_-=P,r.back+=P}if(y>>>=A,_-=A,r.back+=A,r.length=I,0===C){r.mode=26;break}if(32&C){r.back=-1,r.mode=l;break}if(64&C){e.msg="invalid literal/length code",r.mode=c;break}r.extra=15&C,r.mode=22;case 22:if(r.extra){for(N=r.extra;_<N;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}r.length+=y&(1<<r.extra)-1,y>>>=r.extra,_-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;C=(L=r.distcode[y&(1<<r.distbits)-1])>>>16&255,I=65535&L,!((A=L>>>24)<=_);){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}if(!(240&C)){for(P=A,T=C,M=I;C=(L=r.distcode[M+((y&(1<<P+T)-1)>>P)])>>>16&255,I=65535&L,!(P+(A=L>>>24)<=_);){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}y>>>=P,_-=P,r.back+=P}if(y>>>=A,_-=A,r.back+=A,64&C){e.msg="invalid distance code",r.mode=c;break}r.offset=I,r.extra=15&C,r.mode=24;case 24:if(r.extra){for(N=r.extra;_<N;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}r.offset+=y&(1<<r.extra)-1,y>>>=r.extra,_-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=c;break}r.mode=25;case 25:if(0===b)break e;if(B=k-b,r.offset>B){if((B=r.offset-B)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=c;break}B>r.wnext?(B-=r.wnext,E=r.wsize-B):E=r.wnext-B,B>r.length&&(B=r.length),S=r.window}else S=d,E=m-r.offset,B=r.length;B>b&&(B=b),b-=B,r.length-=B;do{d[m++]=S[E++]}while(--B);0===r.length&&(r.mode=21);break;case 26:if(0===b)break e;d[m++]=r.length,b--,r.mode=21;break;case 27:if(r.wrap){for(;_<32;){if(0===g)break e;g--,y|=h[p++]<<_,_+=8}if(k-=b,e.total_out+=k,r.total+=k,k&&(e.adler=r.check=r.flags?a(r.check,d,k,m-k):i(r.check,d,k,m-k)),k=b,(r.flags?y:f(y))!==r.check){e.msg="incorrect data check",r.mode=c;break}y=0,_=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;_<32;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}if(y!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=c;break}y=0,_=0}r.mode=29;case 29:F=1;break e;case c:F=-3;break e;case 31:return-4;default:return u}return e.next_out=m,e.avail_out=b,e.next_in=p,e.avail_in=g,r.hold=y,r.bits=_,(r.wsize||k!==e.avail_out&&r.mode<c&&(r.mode<27||4!==t))&&w(e,e.output,e.next_out,k-e.avail_out)?(r.mode=31,-4):(x-=e.avail_in,k-=e.avail_out,e.total_in+=x,e.total_out+=k,r.total+=k,r.wrap&&k&&(e.adler=r.check=r.flags?a(r.check,d,k,e.next_out-k):i(r.check,d,k,e.next_out-k)),e.data_type=r.bits+(r.last?64:0)+(r.mode===l?128:0)+(20===r.mode||15===r.mode?256:0),(0===x&&0===k||4===t)&&0===F&&(F=-5),F)},t.inflateEnd=function(e){if(!e||!e.state)return u;var t=e.state;return t.window&&(t.window=null),e.state=null,0},t.inflateGetHeader=function(e,t){var r;return e&&e.state&&2&(r=e.state).wrap?(r.head=t,t.done=!1,0):u},t.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?u:11===r.mode&&i(1,t,n,0)!==r.check?-3:w(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,0):u},t.inflateInfo="pako inflate (from Nodeca project)"},21998(e,t,r){"use strict";var n=r(9805),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],a=[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],o=[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],s=[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(e,t,r,u,l,c,f,h){var d,p,m,g,b,y,_,v,w,x=h.bits,k=0,B=0,E=0,S=0,A=0,C=0,I=0,P=0,T=0,M=0,R=null,F=0,O=new n.Buf16(16),N=new n.Buf16(16),L=null,D=0;for(k=0;k<=15;k++)O[k]=0;for(B=0;B<u;B++)O[t[r+B]]++;for(A=x,S=15;S>=1&&0===O[S];S--);if(A>S&&(A=S),0===S)return l[c++]=20971520,l[c++]=20971520,h.bits=1,0;for(E=1;E<S&&0===O[E];E++);for(A<E&&(A=E),P=1,k=1;k<=15;k++)if(P<<=1,(P-=O[k])<0)return-1;if(P>0&&(0===e||1!==S))return-1;for(N[1]=0,k=1;k<15;k++)N[k+1]=N[k]+O[k];for(B=0;B<u;B++)0!==t[r+B]&&(f[N[t[r+B]]++]=B);if(0===e?(R=L=f,y=19):1===e?(R=i,F-=257,L=a,D-=257,y=256):(R=o,L=s,y=-1),M=0,B=0,k=E,b=c,C=A,I=0,m=-1,g=(T=1<<A)-1,1===e&&T>852||2===e&&T>592)return 1;for(;;){_=k-I,f[B]<y?(v=0,w=f[B]):f[B]>y?(v=L[D+f[B]],w=R[F+f[B]]):(v=96,w=0),d=1<<k-I,E=p=1<<C;do{l[b+(M>>I)+(p-=d)]=_<<24|v<<16|w}while(0!==p);for(d=1<<k-1;M&d;)d>>=1;if(0!==d?(M&=d-1,M+=d):M=0,B++,0===--O[k]){if(k===S)break;k=t[r+f[B]]}if(k>A&&(M&g)!==m){for(0===I&&(I=A),b+=E,P=1<<(C=k-I);C+I<S&&!((P-=O[C+I])<=0);)C++,P<<=1;if(T+=1<<C,1===e&&T>852||2===e&&T>592)return 1;l[m=M&g]=A<<24|C<<16|b-c}}return 0!==M&&(l[b+M]=k-I<<24|64<<16),h.bits=A,0}},54674(e){"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"}},23665(e,t,r){"use strict";var n=r(9805);function i(e){for(var t=e.length;--t>=0;)e[t]=0}var a=[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],o=[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],s=[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],l=new Array(576);i(l);var c=new Array(60);i(c);var f=new Array(512);i(f);var h=new Array(256);i(h);var d=new Array(29);i(d);var p,m,g,b=new Array(30);function y(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function _(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function v(e){return e<256?f[e]:f[256+(e>>>7)]}function w(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function x(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,w(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function k(e,t,r){x(e,r[2*t],r[2*t+1])}function B(e,t){var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function E(e,t,r){var n,i,a=new Array(16),o=0;for(n=1;n<=15;n++)a[n]=o=o+r[n-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=B(a[s]++,s))}}function S(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function A(e){e.bi_valid>8?w(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function C(e,t,r,n){var i=2*t,a=2*r;return e[i]<e[a]||e[i]===e[a]&&n[t]<=n[r]}function I(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&C(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!C(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function P(e,t,r){var n,i,s,u,l=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*l]<<8|e.pending_buf[e.d_buf+2*l+1],i=e.pending_buf[e.l_buf+l],l++,0===n?k(e,i,t):(k(e,(s=h[i])+256+1,t),0!==(u=a[s])&&x(e,i-=d[s],u),k(e,s=v(--n),r),0!==(u=o[s])&&x(e,n-=b[s],u))}while(l<e.last_lit);k(e,256,t)}function T(e,t){var r,n,i,a=t.dyn_tree,o=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<u;r++)0!==a[2*r]?(e.heap[++e.heap_len]=l=r,e.depth[r]=0):a[2*r+1]=0;for(;e.heap_len<2;)a[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=o[2*i+1]);for(t.max_code=l,r=e.heap_len>>1;r>=1;r--)I(e,a,r);i=u;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],I(e,a,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,a[2*i]=a[2*r]+a[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,a[2*r+1]=a[2*n+1]=i,e.heap[1]=i++,I(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,a,o,s,u=t.dyn_tree,l=t.max_code,c=t.stat_desc.static_tree,f=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(a=0;a<=15;a++)e.bl_count[a]=0;for(u[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(a=u[2*u[2*(n=e.heap[r])+1]+1]+1)>p&&(a=p,m++),u[2*n+1]=a,n>l||(e.bl_count[a]++,o=0,n>=d&&(o=h[n-d]),s=u[2*n],e.opt_len+=s*(a+o),f&&(e.static_len+=s*(c[2*n+1]+o)));if(0!==m){do{for(a=p-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[p]--,m-=2}while(m>0);for(a=p;0!==a;a--)for(n=e.bl_count[a];0!==n;)(i=e.heap[--r])>l||(u[2*i+1]!==a&&(e.opt_len+=(a-u[2*i+1])*u[2*i],u[2*i+1]=a),n--)}}(e,t),E(a,l,e.bl_count)}function M(e,t,r){var n,i,a=-1,o=t[1],s=0,u=7,l=4;for(0===o&&(u=138,l=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=t[2*(n+1)+1],++s<u&&i===o||(s<l?e.bl_tree[2*i]+=s:0!==i?(i!==a&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,a=i,0===o?(u=138,l=3):i===o?(u=6,l=3):(u=7,l=4))}function R(e,t,r){var n,i,a=-1,o=t[1],s=0,u=7,l=4;for(0===o&&(u=138,l=3),n=0;n<=r;n++)if(i=o,o=t[2*(n+1)+1],!(++s<u&&i===o)){if(s<l)do{k(e,i,e.bl_tree)}while(0!==--s);else 0!==i?(i!==a&&(k(e,i,e.bl_tree),s--),k(e,16,e.bl_tree),x(e,s-3,2)):s<=10?(k(e,17,e.bl_tree),x(e,s-3,3)):(k(e,18,e.bl_tree),x(e,s-11,7));s=0,a=i,0===o?(u=138,l=3):i===o?(u=6,l=3):(u=7,l=4)}}i(b);var F=!1;function O(e,t,r,i){x(e,0+(i?1:0),3),function(e,t,r){A(e),w(e,r),w(e,~r),n.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}(e,t,r)}t._tr_init=function(e){F||(function(){var e,t,r,n,i,u=new Array(16);for(r=0,n=0;n<28;n++)for(d[n]=r,e=0;e<1<<a[n];e++)h[r++]=n;for(h[r-1]=n,i=0,n=0;n<16;n++)for(b[n]=i,e=0;e<1<<o[n];e++)f[i++]=n;for(i>>=7;n<30;n++)for(b[n]=i<<7,e=0;e<1<<o[n]-7;e++)f[256+i++]=n;for(t=0;t<=15;t++)u[t]=0;for(e=0;e<=143;)l[2*e+1]=8,e++,u[8]++;for(;e<=255;)l[2*e+1]=9,e++,u[9]++;for(;e<=279;)l[2*e+1]=7,e++,u[7]++;for(;e<=287;)l[2*e+1]=8,e++,u[8]++;for(E(l,287,u),e=0;e<30;e++)c[2*e+1]=5,c[2*e]=B(e,5);p=new y(l,a,257,286,15),m=new y(c,o,0,30,15),g=new y(new Array(0),s,0,19,7)}(),F=!0),e.l_desc=new _(e.dyn_ltree,p),e.d_desc=new _(e.dyn_dtree,m),e.bl_desc=new _(e.bl_tree,g),e.bi_buf=0,e.bi_valid=0,S(e)},t._tr_stored_block=O,t._tr_flush_block=function(e,t,r,n){var i,a,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),T(e,e.l_desc),T(e,e.d_desc),o=function(e){var t;for(M(e,e.dyn_ltree,e.l_desc.max_code),M(e,e.dyn_dtree,e.d_desc.max_code),T(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*u[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==t?O(e,t,r,n):4===e.strategy||a===i?(x(e,2+(n?1:0),3),P(e,l,c)):(x(e,4+(n?1:0),3),function(e,t,r,n){var i;for(x(e,t-257,5),x(e,r-1,5),x(e,n-4,4),i=0;i<n;i++)x(e,e.bl_tree[2*u[i]+1],3);R(e,e.dyn_ltree,t-1),R(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),P(e,e.dyn_ltree,e.dyn_dtree)),S(e),n&&A(e)},t._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(h[r]+256+1)]++,e.dyn_dtree[2*v(t)]++),e.last_lit===e.lit_bufsize-1},t._tr_align=function(e){x(e,2,3),k(e,256,l),function(e){16===e.bi_valid?(w(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},44442(e){"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}},76578(e){"use strict";e.exports=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},65606(e){var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,u=[],l=!1,c=-1;function f(){l&&s&&(l=!1,s.length?u=s.concat(u):c=-1,u.length&&h())}function h(){if(!l){var e=o(f);l=!0;for(var t=u.length;t;){for(s=u,u=[];++c<t;)s&&s[c].run();c=-1,t=u.length}s=null,l=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new d(e,t)),1!==u.length||l||o(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},84461(e,t,r){"use strict";var n=r(65606),i=r(48287).Buffer;!function(){if("arm"!==n.arch){var t=[];!function(){for(var e=0;e<256;e++){for(var r=e,n=0;n<8;n++)1&r?r=3988292384^r>>>1:r>>>=1;t[e]=r>>>0}}(),e.exports=function(){for(var e=arguments.length,t=-1,r=0;r<e;r++)t=a(t,new i(arguments[r]));return(-1^t)>>>0}}else e.exports=r(29275);function a(e,r){for(var n=r.length,i=0;i<n;i++)e=t[255&(e^r[i])]^e>>>8;return e}}()},29275(e,t,r){"use strict";for(var n=r(48287).Buffer,i=[],a=0;a<256;a++){var o=i[a]=new n(4);o.writeUInt32BE(a,0);for(var s=0;s<8;s++){var u=1&o[0],l=1&o[1],c=1&o[2],f=1&o[3];o[0]=o[0]>>1^(f?237:0),o[1]=o[1]>>1^(f?184:0)^(u?128:0),o[2]=o[2]>>1^(f?131:0)^(l?128:0),o[3]=o[3]>>1^(f?32:0)^(c?128:0)}}function h(e,t){for(var r=t.length,n=0;n<r;n++){var a=i[e[3]^t[n]];e[3]=a[3]^e[2],e[2]=a[2]^e[1],e[1]=a[1]^e[0],e[0]=a[0]}}e.exports=function(){var e=arguments.length,t=new n(4);t.fill(255);for(var r=0;r<e;r++)h(t,new n(arguments[r]));return t[0]=255^t[0],t[1]=255^t[1],t[2]=255^t[2],t[3]=255^t[3],t.readUInt32BE(0)}},99602(e,t,r){"use strict";var n=r(48287).Buffer;function i(e,t,r){for(var n=1<<t-1;n;n>>>=1)e.push(n&r?1:0)}var a=function(){for(var e={},t=0;t<45;t++)e["0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"[t]]=t;return e}();e.exports=function e(t,r){var o,s=typeof t;if("string"==s||"number"==s)t=new n(o=""+t);else if(n.isBuffer(t))o=t.toString();else{if(!Array.isArray(t))throw new Error("Bad data");o=(t=new n(t)).toString()}if(/^[0-9]+$/.test(o)){if(t.length>7089)throw new Error("Too much data");return function(e){for(var t=e.length,r=[],n=0;n<t;n+=3){var a=e.substr(n,3);i(r,Math.ceil(10*a.length/3),parseInt(a,10))}var o,s={};return i(o=[0,0,0,1],14,t),s.data27=o.concat(r),t<4096&&(i(o=[0,0,0,1],12,t),s.data10=o.concat(r)),t<1024&&(i(o=[0,0,0,1],10,t),s.data1=o.concat(r)),s}(o)}if(/^[0-9A-Z \$%\*\+\.\/\:\-]+$/.test(o)){if(t.length>4296)throw new Error("Too much data");return function(e){for(var t=e.length,r=[],n=0;n<t;n+=2){var o=6,s=a[e[n]];e[n+1]&&(o=11,s=45*s+a[e[n+1]]),i(r,o,s)}var u,l={};return i(u=[0,0,1,0],13,t),l.data27=u.concat(r),t<2048&&(i(u=[0,0,1,0],11,t),l.data10=u.concat(r)),t<512&&(i(u=[0,0,1,0],9,t),l.data1=u.concat(r)),l}(o)}if(r&&/^https?:/i.test(o))return function(t){var r=t.indexOf("/",8)+1||t.length,n=e(t.slice(0,r).toUpperCase(),!1);if(r>=t.length)return n;var i=e(t.slice(r),!1);return n.data27=n.data27.concat(i.data27),n.data10&&i.data10&&(n.data10=n.data10.concat(i.data10)),n.data1&&i.data1&&(n.data1=n.data1.concat(i.data1)),n}(o);if(t.length>2953)throw new Error("Too much data");return function(e){for(var t=e.length,r=[],n=0;n<t;n++)i(r,8,e[n]);var a,o={};return i(a=[0,1,0,0],16,t),o.data10=o.data27=a.concat(r),t<256&&(i(a=[0,1,0,0],8,t),o.data1=a.concat(r)),o}(t)}},78213(e,t,r){"use strict";for(var n=r(48287).Buffer,i=[1],a=[],o=1;o<256;o++){var s=i[o-1]<<1;s>255&&(s^=285),i[o]=s}for(o=0;o<255;o++)a[i[o]]=o;function u(e){for(;e<0;)e+=255;for(;e>255;)e-=255;return i[e]}function l(e){if(e<1||e>255)throw Error("Bad log("+e+")");return a[e]}var c=[[0],[0,0],[0,25,1]];function f(e){if(c[e])return c[e];var t=f(e-1),r=[];r[0]=t[0];for(var n=1;n<=e;n++)r[n]=l(u(t[n])^u(t[n-1]+e-1));return c[e]=r,r}e.exports=function(e,t){e=[].slice.call(e);for(var r=f(t),i=0;i<t;i++)e.push(0);for(;e.length>t;)if(e[0]){var a=l(e[0]);for(i=0;i<=t;i++)e[i]=e[i]^u(r[i]+a);e.shift()}else e.shift();return new n(e)}},94081(e,t,r){"use strict";var n=r(48287).Buffer;function i(e){var t=4*e+17,r=[],i=new n(t);i.fill(0),i=[].slice.call(i);for(var a=0;a<t;a++)r[a]=i.slice();return r}function a(e){for(var t=e.length,r=-3;r<=3;r++)for(var n=-3;n<=3;n++){var i=Math.max(r,n),a=Math.min(r,n),o=2==i&&a>=-2||-2==a&&i<=2?128:129;e[3+r][3+n]=o,e[3+r][t-4+n]=o,e[t-4+r][3+n]=o}for(r=0;r<8;r++)e[7][r]=e[r][7]=e[7][t-r-1]=e[r][t-8]=e[t-8][r]=e[t-1-r][7]=128}function o(e){var t=e.length;if(t>21){var r=t-13,n=Math.round(r/Math.ceil(r/28));n%2&&n++;for(var i=[],a=r+6;a>10;a-=n)i.unshift(a);i.unshift(6);for(var o=0;o<i.length;o++)for(var s=0;s<i.length;s++){var u=i[o],l=i[s];if(!e[u][l])for(var c=-2;c<=2;c++)for(var f=-2;f<=2;f++){var h=Math.max(c,f),d=Math.min(c,f),p=1==h&&d>=-1||-1==d&&h<=1?128:129;e[u+c][l+f]=p}}}for(o=8;o<t-8;o++)e[6][o]=e[o][6]=o%2?128:129}function s(e){for(var t=e.length,r=0;r<8;r++)6!=r&&(e[8][r]=e[r][8]=128),e[8][t-1-r]=128,e[t-1-r][8]=128;if(e[8][8]=128,e[t-8][8]=129,!(t<45))for(r=t-11;r<t-8;r++)for(var n=0;n<6;n++)e[r][n]=e[n][r]=128}var u,l=function(){for(var e=Array(32),t=Array(40),r=0;r<32;r++){for(var n=r<<10,i=5;i>0;i--)n>>>9+i&&(n^=1335<<i-1);e[r]=21522^(n|r<<10)}for(var a=7;a<=40;a++){for(n=a<<12,i=6;i>0;i--)n>>>11+i&&(n^=7973<<i-1);t[a]=n|a<<12}var o={L:1,M:0,Q:3,H:2};return function(r,n,i){var a=r.length,s=e[o[n]<<3|i];function u(e){return s>>e&1?129:128}for(var l=0;l<8;l++)r[8][a-1-l]=u(l),l<6&&(r[l][8]=u(l));for(l=8;l<15;l++)r[a-15+l][8]=u(l),l>8&&(r[8][14-l]=u(l));r[7][8]=u(6),r[8][8]=u(7),r[8][7]=u(8);var c=t[(a-17)/4];if(c)for(l=0;l<6;l++)for(var f=0;f<3;f++)r[a-11+f][l]=r[l][a-11+f]=h(3*l+f);function h(e){return c>>e&1?129:128}}}(),c=(u=[function(e,t){return(e+t)%2==0},function(e,t){return e%2==0},function(e,t){return t%3==0},function(e,t){return(e+t)%3==0},function(e,t){return(Math.floor(e/2)+Math.floor(t/3))%2==0},function(e,t){return e*t%2+e*t%3==0},function(e,t){return(e*t%2+e*t%3)%2==0},function(e,t){return(e*t%3+(e+t)%2)%2==0}],function(e,t,r){var n,i,a=e.length,o=-1;n=i=a-1;for(var s=u[r],l=t.blocks[t.blocks.length-1].length,c=0;c<l;c++)for(var f=0;f<t.blocks.length;f++)t.blocks[f].length<=c||h(t.blocks[f][c]);for(l=t.ec_len,c=0;c<l;c++)for(f=0;f<t.ec.length;f++)h(t.ec[f][c]);if(i>-1)do{e[n][i]=s(n,i)?1:0}while(d());function h(t){for(var r=128;r;r>>=1){var a=!!(r&t);s(n,i)&&(a=!a),e[n][i]=a?1:0,d()}}function d(){do{if(i%2^i<6?o<0&&0==n||o>0&&n==a-1?(i--,o=-o):(i++,n+=o):i--,6==i&&i--,i<0)return!1}while(240&e[n][i]);return!0}});function f(e){for(var t=e.length,r=0,n=0;n<t;n++){for(var i=1&e[n][0],a=1,o=1;o<t;o++)(s=1&e[n][o])!=i?(a>=5&&(r+=a-2),i=s,a=1):a++;a>=5&&(r+=a-2)}for(o=0;o<t;o++){for(i=1&e[0][o],a=1,n=1;n<t;n++){var s;(s=1&e[n][o])!=i?(a>=5&&(r+=a-2),i=s,a=1):a++}a>=5&&(r+=a-2)}for(n=0;n<t-1;n++)for(o=0;o<t-1;o++){var u=e[n][o]+e[n][o+1]+e[n+1][o]+e[n+1][o+1]&7;0!=u&&4!=u||(r+=3)}function l(t){return 1&e[n][o+t]}function c(t){return 1&e[n+t][o]}for(n=0;n<t;n++)for(o=0;o<t;o++)o<t-6&&l(0)&&!l(1)&&l(2)&&l(3)&&l(4)&&!l(5)&&l(6)&&(o>=4&&!(l(-4)||l(-3)||l(-2)||l(-1))&&(r+=40),o<t-10&&!(l(7)||l(8)||l(9)||l(10))&&(r+=40)),n<t-6&&c(0)&&!c(1)&&c(2)&&c(3)&&c(4)&&!c(5)&&c(6)&&(n>=4&&!(c(-4)||c(-3)||c(-2)||c(-1))&&(r+=40),n<t-10&&!(c(7)||c(8)||c(9)||c(10))&&(r+=40));var f=0;for(n=0;n<t;n++)for(o=0;o<t;o++)1&e[n][o]&&f++;return r+10*Math.floor(Math.abs(10-20*f/(t*t)))}e.exports={getMatrix:function(e){var t=i(e.version);a(t),o(t),s(t);for(var r=1/0,n=0,u=0;u<8;u++){c(t,e,u),l(t,e.ec_level,u);var h=f(t);h<r&&(r=h,n=u)}return c(t,e,n),l(t,e.ec_level,n),t.map(function(e){return e.map(function(e){return 1&e})})},init:i,fillFinders:a,fillAlignAndTiming:o,fillStub:s,fillReserved:l,fillData:c,calculatePenalty:f}},77641(e,t,r){"use strict";var n=r(48287).Buffer,i=r(78559),a=r(84461),o=new n([137,80,78,71,13,10,26,10]),s=new n([0,0,0,13,73,72,68,82,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0]),u=new n([0,0,0,0,73,68,65,84]),l=new n([0,0,0,0,73,69,78,68,174,66,96,130]);e.exports={bitmap:function(e,t,r){var i=e.length,a=(i+2*r)*t,o=new n((a+1)*a);o.fill(255);for(var s=0;s<a;s++)o[s*(a+1)]=0;for(s=0;s<i;s++)for(var u=0;u<i;u++)if(e[s][u]){var l=((r+s)*(a+1)+(r+u))*t+1;o.fill(0,l,l+t);for(var c=1;c<t;c++)o.copy(o,l+c*(a+1),l,l+t)}return{data:o,size:a}},png:function(e,t){t.push(o);var r=n.concat([s]);r.writeUInt32BE(e.size,8),r.writeUInt32BE(e.size,12),r.writeUInt32BE(a(r.slice(4,-4)),21),t.push(r);var c=n.concat([u,i.deflateSync(e.data,{level:9}),new n(4)]);c.writeUInt32BE(c.length-12,0),c.writeUInt32BE(a(c.slice(4,-4)),c.length-4),t.push(c),t.push(l),t.push(null)}}},32129(e,t,r){"use strict";var n=r(48287).Buffer,i=r(99602),a=r(78213),o=r(94081);function s(e){return JSON.parse(JSON.stringify(e))}var u=["L","M","Q","H"],l=[[],[26,7,1,10,1,13,1,17,1],[44,10,1,16,1,22,1,28,1],[70,15,1,26,1,36,2,44,2],[100,20,1,36,2,52,2,64,4],[134,26,1,48,2,72,4,88,4],[172,36,2,64,4,96,4,112,4],[196,40,2,72,4,108,6,130,5],[242,48,2,88,4,132,6,156,6],[292,60,2,110,5,160,8,192,8],[346,72,4,130,5,192,8,224,8],[404,80,4,150,5,224,8,264,11],[466,96,4,176,8,260,10,308,11],[532,104,4,198,9,288,12,352,16],[581,120,4,216,9,320,16,384,16],[655,132,6,240,10,360,12,432,18],[733,144,6,280,10,408,17,480,16],[815,168,6,308,11,448,16,532,19],[901,180,6,338,13,504,18,588,21],[991,196,7,364,14,546,21,650,25],[1085,224,8,416,16,600,20,700,25],[1156,224,8,442,17,644,23,750,25],[1258,252,9,476,17,690,23,816,34],[1364,270,9,504,18,750,25,900,30],[1474,300,10,560,20,810,27,960,32],[1588,312,12,588,21,870,29,1050,35],[1706,336,12,644,23,952,34,1110,37],[1828,360,12,700,25,1020,34,1200,40],[1921,390,13,728,26,1050,35,1260,42],[2051,420,14,784,28,1140,38,1350,45],[2185,450,15,812,29,1200,40,1440,48],[2323,480,16,868,31,1290,43,1530,51],[2465,510,17,924,33,1350,45,1620,54],[2611,540,18,980,35,1440,48,1710,57],[2761,570,19,1036,37,1530,51,1800,60],[2876,570,19,1064,38,1590,53,1890,63],[3034,600,20,1120,40,1680,56,1980,66],[3196,630,21,1204,43,1770,59,2100,70],[3362,660,22,1260,45,1860,62,2220,74],[3532,720,24,1316,47,1950,65,2310,77],[3706,750,25,1372,49,2040,68,2430,81]];function c(e,t){var r,n=1;for(e.data1?r=Math.ceil(e.data1.length/8):n=10;n<10;n++)if((i=l[n][t]).data_len>=r)return s(i);for(e.data10?r=Math.ceil(e.data10.length/8):n=27;n<27;n++)if((i=l[n][t]).data_len>=r)return s(i);for(r=Math.ceil(e.data27.length/8);n<41;n++){var i;if((i=l[n][t]).data_len>=r)return s(i)}throw new Error("Too much data")}function f(e,t){var r=new n(t.data_len);r.fill(0);for(var i=(e=t.version<10?e.data1:t.version<27?e.data10:e.data27).length,o=0;o<i;o+=8){for(var s=0,u=0;u<8;u++)s=s<<1|(e[o+u]?1:0);r[o/8]=s}var l=236;for(o=Math.ceil((i+4)/8);o<r.length;o++)r[o]=l,l=236==l?17:236;var c=0;return t.blocks=t.blocks.map(function(e){var n=r.slice(c,c+e);return c+=e,t.ec.push(a(n,t.ec_len)),n}),t}l=l.map(function(e,t){if(!t)return{};for(var r={},n=1;n<8;n+=2){for(var i=e[0]-e[n],a=e[n+1],o=u[n/2|0],s={version:t,ec_level:o,data_len:i,ec_len:e[n]/a,blocks:[],ec:[]},l=a,c=i;l>0;l--){var f=c/l|0;s.blocks.push(f),c-=f}r[o]=s}return r}),e.exports={QR:function(e,t,r){t=u.indexOf(t)>-1?t:"M";var n=i(e,r),a=f(n,c(n,t));return o.getMatrix(a)},getTemplate:c,fillTemplate:f}},65235(e,t,r){"use strict";var n=r(65606),i=r(48287).Buffer,a=r(88310).Readable,o=r(32129).QR,s=r(77641),u=r(13087),l=function(){},c={parse_url:!1,ec_level:"M",size:5,margin:4,customize:null},f={parse_url:!1,ec_level:"M",margin:1,size:0};function h(e,t){e="string"==typeof e?{ec_level:e}:e||{};var r={type:String(t||e.type||"png").toLowerCase()},n="png"==r.type?c:f;for(var i in n)r[i]=i in e?e[i]:n[i];return r}e.exports={matrix:o,image:function(e,t){t=h(t);var r=o(e,t.ec_level,t.parse_url),i=new a;switch(i._read=l,t.type){case"svg":case"pdf":case"eps":n.nextTick(function(){u[t.type](r,i,t.margin,t.size)});break;case"svgpath":n.nextTick(function(){var e=u.svg_object(r,t.margin,t.size);i.push(e.path),i.push(null)});break;default:n.nextTick(function(){var e=s.bitmap(r,t.size,t.margin);t.customize&&t.customize(e),s.png(e,i)})}return i},imageSync:function(e,t){t=h(t);var r,n=o(e,t.ec_level,t.parse_url),a=[];switch(t.type){case"svg":case"pdf":case"eps":u[t.type](n,a,t.margin,t.size),r=a.filter(Boolean).join("");break;default:var l=s.bitmap(n,t.size,t.margin);t.customize&&t.customize(l),s.png(l,a),r=i.concat(a.filter(Boolean))}return r},svgObject:function(e,t){t=h(t,"svg");var r=o(e,t.ec_level);return u.svg_object(r,t.margin)}}},13087(e){"use strict";function t(e){for(var t=e.length,r=[],n=-1;n<=t;n++)r[n]=[];var i=[];for(n=0;n<t;n++)for(var a=0;a<t;a++)r[n][a]||(r[n][a]=1,o(n,a)?o(n-1,a)||i.push(s(n,a,"right")):o(n,a-1)&&i.push(s(n,a,"down")));return i;function o(r,n){return!(r<0||n<0||r>=t||n>=t||!e[r][n])}function s(e,t,n){r[e][t]=1;var i=[];i.push(["M",t,e]);var a=e,s=t,u=0;do{switch(n){case"right":r[a][s]=1,o(a,s)?(r[a-1][s]=1,o(a-1,s)?(i.push(["h",u]),u=0,n="up"):(u++,s++)):(i.push(["h",u]),u=0,n="down");break;case"left":r[a-1][s-1]=1,o(a-1,s-1)?(r[a][s-1]=1,o(a,s-1)?(i.push(["h",-u]),u=0,n="down"):(u++,s--)):(i.push(["h",-u]),u=0,n="up");break;case"down":r[a][s-1]=1,o(a,s-1)?(r[a][s]=1,o(a,s)?(i.push(["v",u]),u=0,n="right"):(u++,a++)):(i.push(["v",u]),u=0,n="left");break;case"up":r[a-1][s]=1,o(a-1,s)?(r[a-1][s-1]=1,o(a-1,s-1)?(i.push(["v",-u]),u=0,n="left"):(u++,a--)):(i.push(["v",-u]),u=0,n="right")}}while(a!=e||s!=t);return i}}function r(e,r,n){t(e).forEach(function(e){for(var t="",i=0;i<e.length;i++){var a=e[i];"M"===a[0]?t+="M"+(a[1]+n)+" "+(a[2]+n):t+=a.join("")}t+="z",r.push(t)})}e.exports={svg:function(e,t,n,i){var a=e.length+2*n;if(t.push('<svg xmlns="http://www.w3.org/2000/svg" '),i>0){var o=a*i;t.push('width="'+o+'" height="'+o+'" ')}t.push('viewBox="0 0 '+a+" "+a+'">'),t.push('<path d="'),r(e,t,n),t.push('"/></svg>'),t.push(null)},eps:function(e,r,n){var i=e.length,a=9*(i+2*n);r.push(["%!PS-Adobe-3.0 EPSF-3.0","%%BoundingBox: 0 0 "+a+" "+a,"/h { 0 rlineto } bind def","/v { 0 exch neg rlineto } bind def","/M { neg "+(i+n)+" add moveto } bind def","/z { closepath } bind def","9 9 scale",""].join("\n")),t(e).forEach(function(e){for(var t="",i=0;i<e.length;i++){var a=e[i];"M"===a[0]?t+=a[1]+n+" "+a[2]+" M ":t+=a[1]+" "+a[0]+" "}t+="z\n",r.push(t)}),r.push("fill\n%%EOF\n"),r.push(null)},pdf:function(e,r,n){var i=e.length,a=9*(i+2*n),o=["%PDF-1.0\n\n","1 0 obj << /Type /Catalog /Pages 2 0 R >> endobj\n","2 0 obj << /Type /Pages /Count 1 /Kids [ 3 0 R ] >> endobj\n"];o.push("3 0 obj << /Type /Page /Parent 2 0 R /Resources <<>> /Contents 4 0 R /MediaBox [ 0 0 "+a+" "+a+" ] >> endobj\n");var s="9 0 0 9 0 0 cm\n";s+=t(e).map(function(e){for(var t,r,a="",o=0;o<e.length;o++){var s=e[o];switch(s[0]){case"M":a+=(t=s[1]+n)+" "+(r=i-s[2]+n)+" m ";break;case"h":a+=(t+=s[1])+" "+r+" l ";break;case"v":a+=t+" "+(r-=s[1])+" l "}}return a+"h"}).join("\n"),s+="\nf\n",o.push("4 0 obj << /Length "+s.length+" >> stream\n"+s+"endstream\nendobj\n");for(var u="xref\n0 5\n0000000000 65535 f \n",l=1,c=o[0].length;l<5;l++)u+=("0000000000"+c).substr(-10)+" 00000 n \n",c+=o[l].length;o.push(u,"trailer << /Root 1 0 R /Size 5 >>\n","startxref\n"+c+"\n%%EOF\n"),r.push(o.join("")),r.push(null)},svg_object:function(e,t){var n=[];return r(e,n,t),{size:e.length+2*t,path:n.filter(Boolean).join("")}}}},99721(e,t,r){"use strict";var n=r(36556),i=r(14035),a=n("RegExp.prototype.exec"),o=r(69675);e.exports=function(e){if(!i(e))throw new o("`regex` must be a RegExp");return function(t){return null!==a(e,t)}}},96897(e,t,r){"use strict";var n=r(70453),i=r(30041),a=r(30592)(),o=r(75795),s=r(69675),u=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new s("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||u(t)!==t)throw new s("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,l=!0;if("length"in e&&o){var c=o(e,"length");c&&!c.configurable&&(n=!1),c&&!c.writable&&(l=!1)}return(n||l||!r)&&(a?i(e,"length",t,!0,!0):i(e,"length",t)),e}},88310(e,t,r){e.exports=i;var n=r(37007).EventEmitter;function i(){n.call(this)}r(56698)(i,n),i.Readable=r(46891),i.Writable=r(81999),i.Duplex=r(88101),i.Transform=r(59083),i.PassThrough=r(3681),i.finished=r(14257),i.pipeline=r(5267),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function a(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",a),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",u));var o=!1;function s(){o||(o=!0,e.end())}function u(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){r.removeListener("data",i),e.removeListener("drain",a),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("error",l),e.on("error",l),r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}},12463(e){"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){var t,n;function i(t,n,i){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,i))||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(e){return String(e)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){var i,a,o,s,u;if("string"==typeof t&&(a="not ",t.substr(0,4)===a)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))o="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var l=("number"!=typeof u&&(u=0),u+1>(s=e).length||-1===s.indexOf(".",u)?"argument":"property");o='The "'.concat(e,'" ').concat(l," ").concat(i," ").concat(n(t,"type"))}return o+". Received type ".concat(typeof r)},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},88101(e,t,r){"use strict";var n=r(65606),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=c;var a=r(46891),o=r(81999);r(56698)(c,a);for(var s=i(o.prototype),u=0;u<s.length;u++){var l=s[u];c.prototype[l]||(c.prototype[l]=o.prototype[l])}function c(e){if(!(this instanceof c))return new c(e);a.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||n.nextTick(h,this)}function h(e){e.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(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},3681(e,t,r){"use strict";e.exports=i;var n=r(59083);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(56698)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},46891(e,t,r){"use strict";var n,i=r(65606);e.exports=E,E.ReadableState=B,r(37007).EventEmitter;var a,o=function(e,t){return e.listeners(t).length},s=r(41396),u=r(48287).Buffer,l=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},c=r(77199);a=c&&c.debuglog?c.debuglog("stream"):function(){};var f,h,d,p=r(81766),m=r(54347),g=r(66644).getHighWaterMark,b=r(12463).F,y=b.ERR_INVALID_ARG_TYPE,_=b.ERR_STREAM_PUSH_AFTER_EOF,v=b.ERR_METHOD_NOT_IMPLEMENTED,w=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(56698)(E,s);var x=m.errorOrDestroy,k=["error","close","destroy","pause","resume"];function B(e,t,i){n=n||r(88101),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",i),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!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(83141).I),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function E(e){if(n=n||r(88101),!(this instanceof E))return new E(e);var t=this instanceof n;this._readableState=new B(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function S(e,t,r,n,i){a("readableAddChunk",t);var o,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(a("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?P(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,T(e)))}}(e,s);else if(i||(o=function(e,t){var r,n;return n=t,u.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],t)),r}(s,t)),o)x(e,o);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n)s.endEmitted?x(e,new w):A(e,s,t,!0);else if(s.ended)x(e,new _);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?A(e,s,t,!1):M(e,s)):A(e,s,t,!1)}else n||(s.reading=!1,M(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function A(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&P(e)),M(e,t)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=m.destroy,E.prototype._undestroy=m.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),S(this,e,t,!1,r)},E.prototype.unshift=function(e){return S(this,e,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(e){f||(f=r(83141).I);var t=new f(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var C=1073741824;function I(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=C?e=C:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function P(e){var t=e._readableState;a("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(a("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(T,e))}function T(e){var t=e._readableState;a("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function M(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(a("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function F(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function O(e){a("readable nexttick read 0"),e.read(0)}function N(e,t){a("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(a("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function z(e){var t=e._readableState;a("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(U,t,e))}function U(e,t){if(a("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function $(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}E.prototype.read=function(e){a("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return a("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?z(this):P(this),null;if(0===(e=I(e,t))&&t.ended)return 0===t.length&&z(this),null;var n,i=t.needReadable;return a("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&a("length less than watermark",i=!0),t.ended||t.reading?a("reading or ended",i=!1):i&&(a("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=I(r,t))),null===(n=e>0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&z(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){x(this,new v("_read()"))},E.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,a("pipe count=%d opts=%j",n.pipesCount,t);var s=t&&!1===t.end||e===i.stdout||e===i.stderr?m:u;function u(){a("onend"),e.end()}n.endEmitted?i.nextTick(s):r.once("end",s),e.on("unpipe",function t(i,o){a("onunpipe"),i===r&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,a("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",t),r.removeListener("end",u),r.removeListener("end",m),r.removeListener("data",f),c=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||l())});var l=function(e){return function(){var t=e._readableState;a("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,L(e))}}(r);e.on("drain",l);var c=!1;function f(t){a("ondata");var i=e.write(t);a("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==$(n.pipes,e))&&!c&&(a("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){a("onerror",t),m(),e.removeListener("error",h),0===o(e,"error")&&x(e,t)}function d(){e.removeListener("finish",p),m()}function p(){a("onfinish"),e.removeListener("close",d),m()}function m(){a("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",d),e.once("finish",p),e.emit("pipe",r),n.flowing||(a("pipe resume"),r.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=$(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},E.prototype.on=function(e,t){var r=s.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,a("on readable",n.length,n.reading),n.length?P(this):n.reading||i.nextTick(O,this))),r},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var r=s.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(F,this),r},E.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(F,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(a("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(N,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(a("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){a("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<k.length;o++)e.on(k[o],this.emit.bind(this,k[o]));return this._read=function(t){a("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=r(65034)),h(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=D,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(e,t){return void 0===d&&(d=r(90968)),d(E,e,t)})},59083(e,t,r){"use strict";e.exports=c;var n=r(12463).F,i=n.ERR_METHOD_NOT_IMPLEMENTED,a=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(88101);function l(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new a);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);u.call(this,e),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush(function(t,r){h(e,t,r)})}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new o;return e.push(null)}r(56698)(c,u),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,r){r(new i("_transform()"))},c.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,function(e){t(e)})}},81999(e,t,r){"use strict";var n,i=r(65606);function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(void 0),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=E,E.WritableState=B;var o,s={deprecate:r(94643)},u=r(41396),l=r(48287).Buffer,c=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},f=r(54347),h=r(66644).getHighWaterMark,d=r(12463).F,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,b=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,_=d.ERR_STREAM_NULL_VALUES,v=d.ERR_STREAM_WRITE_AFTER_END,w=d.ERR_UNKNOWN_ENCODING,x=f.errorOrDestroy;function k(){}function B(e,t,o){n=n||r(88101),e=e||{},"boolean"!=typeof o&&(o=t instanceof n),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,a=r.writecb;if("function"!=typeof a)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,a){--t.pendingcb,r?(i.nextTick(a,n),i.nextTick(T,e,t),e._writableState.errorEmitted=!0,x(e,n)):(a(n),e._writableState.errorEmitted=!0,x(e,n),T(e,t))}(e,r,n,t,a);else{var o=I(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||C(e,r),n?i.nextTick(A,e,r,o,a):A(e,r,o,a)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new a(this)}function E(e){var t=this instanceof(n=n||r(88101));if(!t&&!o.call(E,this))return new E(e);this._writableState=new B(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),u.call(this)}function S(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function A(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),T(e,t)}function C(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var s=0,u=!0;r;)i[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;i.allBuffers=u,S(e,t,!0,t.length,i,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,c=r.encoding,f=r.callback;if(S(e,t,!1,t.objectMode?1:l.length,l,c,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function I(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function P(e,t){e._final(function(r){t.pendingcb--,r&&x(e,r),t.prefinished=!0,e.emit("prefinish"),T(e,t)})}function T(e,t){var r=I(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(P,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(56698)(E,u),B.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(B.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(e){return!!o.call(this,e)||this===E&&e&&e._writableState instanceof B}})):o=function(e){return e instanceof this},E.prototype.pipe=function(){x(this,new b)},E.prototype.write=function(e,t,r){var n,a=this._writableState,o=!1,s=!a.objectMode&&(n=e,l.isBuffer(n)||n instanceof c);return s&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(r=t,t=null),s?t="buffer":t||(t=a.defaultEncoding),"function"!=typeof r&&(r=k),a.ending?function(e,t){var r=new v;x(e,r),i.nextTick(t,r)}(this,r):(s||function(e,t,r,n){var a;return null===r?a=new _:"string"==typeof r||t.objectMode||(a=new p("chunk",["string","Buffer"],r)),!a||(x(e,a),i.nextTick(n,a),!1)}(this,a,e,r))&&(a.pendingcb++,o=function(e,t,r,n,i,a){if(!r){var o=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r)),t}(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else S(e,t,!1,s,n,i,a);return u}(this,a,s,e,t,r)),o},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||C(this,e))},E.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new m("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,T(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=f.destroy,E.prototype._undestroy=f.undestroy,E.prototype._destroy=function(e,t){t(e)}},65034(e,t,r){"use strict";var n,i=r(65606);function a(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(14257),s=Symbol("lastResolve"),u=Symbol("lastReject"),l=Symbol("error"),c=Symbol("ended"),f=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function p(e,t){return{value:e,done:t}}function m(e){var t=e[s];if(null!==t){var r=e[d].read();null!==r&&(e[f]=null,e[s]=null,e[u]=null,t(p(r,!1)))}}function g(e){i.nextTick(m,e)}var b=Object.getPrototypeOf(function(){}),y=Object.setPrototypeOf((a(n={get stream(){return this[d]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise(function(t,r){i.nextTick(function(){e[l]?r(e[l]):t(p(void 0,!0))})});var r,n=this[f];if(n)r=new Promise(function(e,t){return function(r,n){e.then(function(){t[c]?r(p(void 0,!0)):t[h](r,n)},n)}}(n,this));else{var a=this[d].read();if(null!==a)return Promise.resolve(p(a,!1));r=new Promise(this[h])}return this[f]=r,r}},Symbol.asyncIterator,function(){return this}),a(n,"return",function(){var e=this;return new Promise(function(t,r){e[d].destroy(null,function(e){e?r(e):t(p(void 0,!0))})})}),n),b);e.exports=function(e){var t,r=Object.create(y,(a(t={},d,{value:e,writable:!0}),a(t,s,{value:null,writable:!0}),a(t,u,{value:null,writable:!0}),a(t,l,{value:null,writable:!0}),a(t,c,{value:e._readableState.endEmitted,writable:!0}),a(t,h,{value:function(e,t){var n=r[d].read();n?(r[f]=null,r[s]=null,r[u]=null,e(p(n,!1))):(r[s]=e,r[u]=t)},writable:!0}),t));return r[f]=null,o(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[u];return null!==t&&(r[f]=null,r[s]=null,r[u]=null,t(e)),void(r[l]=e)}var n=r[s];null!==n&&(r[f]=null,r[s]=null,r[u]=null,n(p(void 0,!0))),r[c]=!0}),e.on("readable",g.bind(null,r)),r}},81766(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){a(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function a(e,t,r){return(t=s(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,s(n.key),n)}}function s(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}var u=r(48287).Buffer,l=r(63779).inspect,c=l&&l.custom||"inspect";function f(e,t,r){u.prototype.copy.call(e,t,r)}e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t=u.allocUnsafe(e>>>0),r=this.head,n=0;r;)f(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,a=e>i.length?i.length:e;if(a===i.length?n+=i:n+=i.slice(0,e),0===(e-=a)){a===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,a=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,a),0===(e-=a)){a===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(a));break}++n}return this.length-=n,t}},{key:c,value:function(e,t){return l(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&o(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},54347(e,t,r){"use strict";var n=r(65606);function i(e,t){o(e,t),a(e)}function a(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(o,this,e)):n.nextTick(o,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(a,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t?(n.nextTick(a,r),t(e)):n.nextTick(a,r)}),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(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},14257(e,t,r){"use strict";var n=r(12463).F.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,a){if("function"==typeof r)return e(t,null,r);r||(r={}),a=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(a||i);var o=r.readable||!1!==r.readable&&t.readable,s=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||c()},l=t._writableState&&t._writableState.finished,c=function(){s=!1,l=!0,o||a.call(t)},f=t._readableState&&t._readableState.endEmitted,h=function(){o=!1,f=!0,s||a.call(t)},d=function(e){a.call(t,e)},p=function(){var e;return o&&!f?(t._readableState&&t._readableState.ended||(e=new n),a.call(t,e)):s&&!l?(t._writableState&&t._writableState.ended||(e=new n),a.call(t,e)):void 0},m=function(){t.req.on("finish",c)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",c),t.on("abort",p),t.req?m():t.on("request",m)):s&&!t._writableState&&(t.on("end",u),t.on("close",u)),t.on("end",h),t.on("finish",c),!1!==r.error&&t.on("error",d),t.on("close",p),function(){t.removeListener("complete",c),t.removeListener("abort",p),t.removeListener("request",m),t.req&&t.req.removeListener("finish",c),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("end",h),t.removeListener("error",d),t.removeListener("close",p)}}},90968(e){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},5267(e,t,r){"use strict";var n,i=r(12463).F,a=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e){e()}function l(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var c,f=function(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new a("streams");var h=t.map(function(e,i){var a=i<t.length-1;return function(e,t,i,a){a=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(a);var s=!1;e.on("close",function(){s=!0}),void 0===n&&(n=r(14257)),n(e,{readable:t,writable:i},function(e){if(e)return a(e);s=!0,a()});var u=!1;return function(t){if(!s&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void a(t||new o("pipe"))}}(e,a,i>0,function(e){c||(c=e),e&&h.forEach(u),a||(h.forEach(u),f(c))})});return t.reduce(l)}},66644(e,t,r){"use strict";var n=r(12463).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var a=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new n(i?r:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},41396(e,t,r){e.exports=r(37007).EventEmitter},83141(e,t,r){"use strict";var n=r(15003).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.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 a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"<22>";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"<22>";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"<22>"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.I=a,a.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},a.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>":t},a.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=o(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=o(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=o(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},15003(e,t,r){var n=r(48287),i=n.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(a(n,t),t.Buffer=o),a(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},90031(e,t){!function(e){var t,r,n,i=String.fromCharCode;function a(e){for(var t,r,n=[],i=0,a=e.length;i<a;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<a?56320==(64512&(r=e.charCodeAt(i++)))?n.push(((1023&t)<<10)+(1023&r)+65536):(n.push(t),i--):n.push(t);return n}function o(e){if(e>=55296&&e<=57343)throw Error("Lone surrogate U+"+e.toString(16).toUpperCase()+" is not a scalar value")}function s(e,t){return i(e>>t&63|128)}function u(e){if(!(4294967168&e))return i(e);var t="";return 4294965248&e?4294901760&e?4292870144&e||(t=i(e>>18&7|240),t+=s(e,12),t+=s(e,6)):(o(e),t=i(e>>12&15|224),t+=s(e,6)):t=i(e>>6&31|192),t+i(63&e|128)}function l(){if(n>=r)throw Error("Invalid byte index");var e=255&t[n];if(n++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function c(){var e,i;if(n>r)throw Error("Invalid byte index");if(n==r)return!1;if(e=255&t[n],n++,!(128&e))return e;if(192==(224&e)){if((i=(31&e)<<6|l())>=128)return i;throw Error("Invalid continuation byte")}if(224==(240&e)){if((i=(15&e)<<12|l()<<6|l())>=2048)return o(i),i;throw Error("Invalid continuation byte")}if(240==(248&e)&&(i=(7&e)<<18|l()<<12|l()<<6|l())>=65536&&i<=1114111)return i;throw Error("Invalid UTF-8 detected")}e.version="3.0.0",e.encode=function(e){for(var t=a(e),r=t.length,n=-1,i="";++n<r;)i+=u(t[n]);return i},e.decode=function(e){t=a(e),r=t.length,n=0;for(var o,s=[];!1!==(o=c());)s.push(o);return function(e){for(var t,r=e.length,n=-1,a="";++n<r;)(t=e[n])>65535&&(a+=i((t-=65536)>>>10&1023|55296),t=56320|1023&t),a+=i(t);return a}(s)}}(t)},94643(e,t,r){function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},36622(e){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},81135(e){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},40537(e,t,r){var n=r(65606),i=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(s(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,a=n.length,o=String(e).replace(i,function(e){if("%%"===e)return"%";if(r>=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),u=n[r];r<a;u=n[++r])m(u)||!v(u)?o+=" "+u:o+=" "+s(u);return o},t.deprecate=function(e,i){if(y(r.g.process))return function(){return t.deprecate(e,i).apply(this,arguments)};if(!0===n.noDeprecation)return e;var a=!1;return function(){if(!a){if(n.throwDeprecation)throw new Error(i);n.traceDeprecation?console.trace(i):console.error(i),a=!0}return e.apply(this,arguments)}};var a,o={};function s(e,r){var n={seen:[],stylize:l};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),p(r)?n.showHidden=r:r&&t._extend(n,r),y(n.showHidden)&&(n.showHidden=!1),y(n.depth)&&(n.depth=2),y(n.colors)&&(n.colors=!1),y(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),c(n,e,n.depth)}function u(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function l(e,t){return e}function c(e,r,n){if(e.customInspect&&r&&k(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,e);return b(i)||(i=c(e,i,n)),i}var a=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(b(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return g(t)?e.stylize(""+t,"number"):p(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0}(e,r);if(a)return a;var o=Object.keys(r),s=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(r)),x(r)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return f(r);if(0===o.length){if(k(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(_(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(w(r))return e.stylize(Date.prototype.toString.call(r),"date");if(x(r))return f(r)}var l,v="",B=!1,E=["{","}"];return d(r)&&(B=!0,E=["[","]"]),k(r)&&(v=" [Function"+(r.name?": "+r.name:"")+"]"),_(r)&&(v=" "+RegExp.prototype.toString.call(r)),w(r)&&(v=" "+Date.prototype.toUTCString.call(r)),x(r)&&(v=" "+f(r)),0!==o.length||B&&0!=r.length?n<0?_(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),l=B?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o<s;++o)A(t,String(o))?a.push(h(e,t,r,n,String(o),!0)):a.push("");return i.forEach(function(i){i.match(/^\d+$/)||a.push(h(e,t,r,n,i,!0))}),a}(e,r,n,s,o):o.map(function(t){return h(e,r,n,s,t,B)}),e.seen.pop(),function(e,t,r){return e.reduce(function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(l,v,E)):E[0]+v+E[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,r,n,i,a){var o,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),A(n,i)||(o="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=m(r)?c(e,u.value,null):c(e,u.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),y(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function d(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function b(e){return"string"==typeof e}function y(e){return void 0===e}function _(e){return v(e)&&"[object RegExp]"===B(e)}function v(e){return"object"==typeof e&&null!==e}function w(e){return v(e)&&"[object Date]"===B(e)}function x(e){return v(e)&&("[object Error]"===B(e)||e instanceof Error)}function k(e){return"function"==typeof e}function B(e){return Object.prototype.toString.call(e)}function E(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(y(a)&&(a=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var r=n.pid;o[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else o[e]=function(){};return o[e]},t.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=p,t.isNull=m,t.isNullOrUndefined=function(e){return null==e},t.isNumber=g,t.isString=b,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=y,t.isRegExp=_,t.isObject=v,t.isDate=w,t.isError=x,t.isFunction=k,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(81135);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(r=[E((e=new Date).getHours()),E(e.getMinutes()),E(e.getSeconds())].join(":"),[e.getDate(),S[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(36622),t._extend=function(e,t){if(!t||!v(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}},25767(e,t,r){"use strict";var n=r(60301),i=r(39209),a=r(10487),o=r(36556),s=r(75795),u=o("Object.prototype.toString"),l=r(49092)(),c="undefined"==typeof globalThis?r.g:globalThis,f=i(),h=o("String.prototype.slice"),d=Object.getPrototypeOf,p=o("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},m={__proto__:null};n(f,l&&s&&d?function(e){var t=new c[e];if(Symbol.toStringTag in t){var r=d(t),n=s(r,Symbol.toStringTag);if(!n){var i=d(r);n=s(i,Symbol.toStringTag)}m["$"+e]=a(n.get)}}:function(e){var t=new c[e],r=t.slice||t.set;r&&(m["$"+e]=a(r))}),e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!l){var t=h(u(e),8,-1);return p(f,t)>-1?t:"Object"===t&&function(e){var t=!1;return n(m,function(r,n){if(!t)try{r(e),t=h(n,1)}catch(e){}}),t}(e)}return s?function(e){var t=!1;return n(m,function(r,n){if(!t)try{"$"+r(e)===n&&(t=h(n,1))}catch(e){}}),t}(e):null}},85966(e,t,r){"use strict";e.exports=r.p+"assets/fonts/Roboto72White.fnt"},47707(e,t,r){"use strict";e.exports=r.p+"assets/fonts/Roboto72White.png"},60261(e,t,r){"use strict";e.exports=r.p+"assets/fonts/RobotoBlack72White.fnt"},55560(e,t,r){"use strict";e.exports=r.p+"assets/fonts/RobotoBlack72White.png"},13773(e,t,r){"use strict";e.exports=r.p+"assets/fonts/RobotoMono72White.fnt"},53968(e,t,r){"use strict";e.exports=r.p+"assets/fonts/RobotoMono72White.png"},6758(e,t,r){"use strict";e.exports=r.p+"assets/fonts/RobotoSlab72White.fnt"},25971(e,t,r){"use strict";e.exports=r.p+"assets/fonts/RobotoSlab72White.png"},63779(){},77199(){},25172(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},16993(e,t,r){var n=r(75546);function i(){var t,r,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.toStringTag||"@@toStringTag";function u(e,i,a,o){var s=i&&i.prototype instanceof c?i:c,u=Object.create(s.prototype);return n(u,"_invoke",function(e,n,i){var a,o,s,u=0,c=i||[],f=!1,h={p:0,n:0,v:t,a:d,f:d.bind(t,4),d:function(e,r){return a=e,o=0,s=t,h.n=r,l}};function d(e,n){for(o=e,s=n,r=0;!f&&u&&!i&&r<c.length;r++){var i,a=c[r],d=h.p,p=a[2];e>3?(i=p===n)&&(s=a[(o=a[4])?5:(o=3,3)],a[4]=a[5]=t):a[0]<=d&&((i=e<2&&d<a[1])?(o=0,h.v=n,h.n=a[1]):d<p&&(i=e<3||a[0]>n||n>p)&&(a[4]=e,a[5]=n,h.n=p,o=0))}if(i||e>1)return l;throw f=!0,n}return function(i,c,p){if(u>1)throw TypeError("Generator is already running");for(f&&1===c&&d(c,p),o=c,s=p;(r=o<2?t:s)||!f;){a||(o?o<3?(o>1&&(h.n=-1),d(o,s)):h.n=s:h.v=s);try{if(u=2,a){if(o||(i="next"),r=a[i]){if(!(r=r.call(a,s)))throw TypeError("iterator result is not an object");if(!r.done)return r;s=r.value,o<2&&(o=0)}else 1===o&&(r=a.return)&&r.call(a),o<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),o=1);a=t}else if((r=(f=h.n<0)?s:e.call(n,h))!==l)break}catch(e){a=t,o=1,s=e}finally{u=1}}return{value:r,done:f}}}(e,a,o),!0),u}var l={};function c(){}function f(){}function h(){}r=Object.getPrototypeOf;var d=[][o]?r(r([][o]())):(n(r={},o,function(){return this}),r),p=h.prototype=c.prototype=Object.create(d);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,n(e,s,"GeneratorFunction")),e.prototype=Object.create(p),e}return f.prototype=h,n(p,"constructor",h),n(h,"constructor",f),f.displayName="GeneratorFunction",n(h,s,"GeneratorFunction"),n(p),n(p,s,"Generator"),n(p,o,function(){return this}),n(p,"toString",function(){return"[object Generator]"}),(e.exports=i=function(){return{w:u,m}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},55869(e,t,r){var n=r(887);e.exports=function(e,t,r,i,a){var o=n(e,t,r,i,a);return o.next().then(function(e){return e.done?e.value:o.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},887(e,t,r){var n=r(16993),i=r(11791);e.exports=function(e,t,r,a,o){return new i(n().w(e,t,r,a),o||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},11791(e,t,r){var n=r(25172),i=r(75546);e.exports=function e(t,r){function a(e,i,o,s){try{var u=t[e](i),l=u.value;return l instanceof n?r.resolve(l.v).then(function(e){a("next",e,o,s)},function(e){a("throw",e,o,s)}):r.resolve(l).then(function(e){u.value=e,o(u)},function(e){return a("throw",e,o,s)})}catch(e){s(e)}}var o;this.next||(i(e.prototype),i(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),i(this,"_invoke",function(e,t,n){function i(){return new r(function(t,r){a(e,n,t,r)})}return o=o?o.then(i,i):i()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},75546(e){function t(r,n,i,a){var o=Object.defineProperty;try{o({},"",{})}catch(r){o=0}e.exports=t=function(e,r,n,i){function a(r,n){t(e,r,function(e){return this._invoke(r,n,e)})}r?o?o(e,r,{value:n,enumerable:!i,configurable:!i,writable:!i}):e[r]=n:(a("next",0),a("throw",1),a("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(r,n,i,a)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4373(e){e.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},4633(e,t,r){var n=r(25172),i=r(16993),a=r(55869),o=r(887),s=r(11791),u=r(4373),l=r(30579);function c(){"use strict";var t=i(),r=t.m(c),f=(Object.getPrototypeOf?Object.getPrototypeOf(r):r.__proto__).constructor;function h(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))}var d={throw:1,return:2,break:3,continue:3};function p(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,d[e],t)},delegateYield:function(e,i,a){return t.resultName=i,r(n.d,l(e),a)},finish:function(e){return r(n.f,e)}},r=function(e,r,i){n.p=t.prev,n.n=t.next;try{return e(r,i)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(e.exports=c=function(){return{wrap:function(e,r,n,i){return t.w(p(e),r,n,i&&i.reverse())},isGeneratorFunction:h,mark:t.m,awrap:function(e,t){return new n(e,t)},AsyncIterator:s,async:function(e,t,r,n,i){return(h(t)?o:a)(p(e),t,r,n,i)},keys:u,values:l}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=c,e.exports.__esModule=!0,e.exports.default=e.exports},30579(e,t,r){var n=r(73738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(n(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},73738(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},54756(e,t,r){var n=r(4633)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},39209(e,t,r){"use strict";var n=r(76578),i="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof i[n[t]]&&(e[e.length]=n[t]);return e}},69962(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,{Al:()=>loadFont,G4:()=>VerticalAlign,Rf:()=>measureTextHeight,dK:()=>Jimp,ej:()=>PNGFilterType,kD:()=>measureText,od:()=>ResizeStrategy,pY:()=>JimpMime,rO:()=>rgbaToInt,wq:()=>HorizontalAlign});var process=__webpack_require__(65606),commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==__webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function getAugmentedNamespace(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}"undefined"==typeof self&&"object"==typeof commonjsGlobal&&(commonjsGlobal.self=commonjsGlobal);var global$1=void 0!==__webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},lookup=[],revLookup=[],Arr="undefined"!=typeof Uint8Array?Uint8Array:Array,inited=!1;function init(){inited=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)lookup[t]=e[t],revLookup[e.charCodeAt(t)]=t;revLookup["-".charCodeAt(0)]=62,revLookup["_".charCodeAt(0)]=63}function toByteArray(e){var t,r,n,i,a,o;inited||init();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new Arr(3*s/4-a),n=a>0?s-4:s;var u=0;for(t=0,r=0;t<n;t+=4,r+=3)i=revLookup[e.charCodeAt(t)]<<18|revLookup[e.charCodeAt(t+1)]<<12|revLookup[e.charCodeAt(t+2)]<<6|revLookup[e.charCodeAt(t+3)],o[u++]=i>>16&255,o[u++]=i>>8&255,o[u++]=255&i;return 2===a?(i=revLookup[e.charCodeAt(t)]<<2|revLookup[e.charCodeAt(t+1)]>>4,o[u++]=255&i):1===a&&(i=revLookup[e.charCodeAt(t)]<<10|revLookup[e.charCodeAt(t+1)]<<4|revLookup[e.charCodeAt(t+2)]>>2,o[u++]=i>>8&255,o[u++]=255&i),o}function tripletToBase64(e){return lookup[e>>18&63]+lookup[e>>12&63]+lookup[e>>6&63]+lookup[63&e]}function encodeChunk(e,t,r){for(var n,i=[],a=t;a<r;a+=3)n=(e[a]<<16)+(e[a+1]<<8)+e[a+2],i.push(tripletToBase64(n));return i.join("")}function fromByteArray(e){var t;inited||init();for(var r=e.length,n=r%3,i="",a=[],o=16383,s=0,u=r-n;s<u;s+=o)a.push(encodeChunk(e,s,s+o>u?u:s+o));return 1===n?(t=e[r-1],i+=lookup[t>>2],i+=lookup[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=lookup[t>>10],i+=lookup[t>>4&63],i+=lookup[t<<2&63],i+="="),a.push(i),a.join("")}function read(e,t,r,n,i){var a,o,s=8*i-n-1,u=(1<<s)-1,l=u>>1,c=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=256*a+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+e[t+f],f+=h,c-=8);if(0===a)a=1-l;else{if(a===u)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=l}return(d?-1:1)*o*Math.pow(2,a-n)}function write(e,t,r,n,i,a){var o,s,u,l=8*a-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*u-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[r+d]=255&o,d+=p,o/=256,l-=8);e[r+d-p]|=128*m}var toString={}.toString,isArray=Array.isArray||function(e){return"[object Array]"==toString.call(e)},INSPECT_MAX_BYTES=50;function kMaxLength(){return Buffer.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(e,t){if(kMaxLength()<t)throw new RangeError("Invalid typed array length");return Buffer.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=Buffer.prototype:(null===e&&(e=new Buffer(t)),e.length=t),e}function Buffer(e,t,r){if(!(Buffer.TYPED_ARRAY_SUPPORT||this instanceof Buffer))return new Buffer(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return allocUnsafe(this,e)}return from(this,e,t,r)}function from(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?fromArrayBuffer(e,t,r,n):"string"==typeof t?fromString(e,t,r):fromObject(e,t)}function assertSize(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function alloc(e,t,r,n){return assertSize(t),t<=0?createBuffer(e,t):void 0!==r?"string"==typeof n?createBuffer(e,t).fill(r,n):createBuffer(e,t).fill(r):createBuffer(e,t)}function allocUnsafe(e,t){if(assertSize(t),e=createBuffer(e,t<0?0:0|checked(t)),!Buffer.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function fromString(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!Buffer.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|byteLength(t,r),i=(e=createBuffer(e,n)).write(t,r);return i!==n&&(e=e.slice(0,i)),e}function fromArrayLike(e,t){var r=t.length<0?0:0|checked(t.length);e=createBuffer(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function fromArrayBuffer(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),Buffer.TYPED_ARRAY_SUPPORT?(e=t).__proto__=Buffer.prototype:e=fromArrayLike(e,t),e}function fromObject(e,t){if(internalIsBuffer(t)){var r=0|checked(t.length);return 0===(e=createBuffer(e,r)).length||t.copy(e,0,0,r),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||isnan(t.length)?createBuffer(e,0):fromArrayLike(e,t);if("Buffer"===t.type&&isArray(t.data))return fromArrayLike(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function checked(e){if(e>=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|e}function internalIsBuffer(e){return!(null==e||!e._isBuffer)}function byteLength(e,t){if(internalIsBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return utf8ToBytes(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return base64ToBytes(e).length;default:if(n)return utf8ToBytes(e).length;t=(""+t).toLowerCase(),n=!0}}function slowToString(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return hexSlice(this,t,r);case"utf8":case"utf-8":return utf8Slice(this,t,r);case"ascii":return asciiSlice(this,t,r);case"latin1":case"binary":return latin1Slice(this,t,r);case"base64":return base64Slice(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function swap(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function bidirectionalIndexOf(e,t,r,n,i){if(0===e.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:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=Buffer.from(t,n)),internalIsBuffer(t))return 0===t.length?-1:arrayIndexOf(e,t,r,n,i);if("number"==typeof t)return t&=255,Buffer.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):arrayIndexOf(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(e,t,r,n,i){var a,o=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,r/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=r;a<s;a++)if(l(e,a)===l(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===u)return c*o}else-1!==c&&(a-=a-c),c=-1}else for(r+u>s&&(r=s-u),a=r;a>=0;a--){for(var f=!0,h=0;h<u;h++)if(l(e,a+h)!==l(t,h)){f=!1;break}if(f)return a}return-1}function hexWrite(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[r+o]=s}return o}function utf8Write(e,t,r,n){return blitBuffer(utf8ToBytes(t,e.length-r),e,r,n)}function asciiWrite(e,t,r,n){return blitBuffer(asciiToBytes(t),e,r,n)}function latin1Write(e,t,r,n){return asciiWrite(e,t,r,n)}function base64Write(e,t,r,n){return blitBuffer(base64ToBytes(t),e,r,n)}function ucs2Write(e,t,r,n){return blitBuffer(utf16leToBytes(t,e.length-r),e,r,n)}function base64Slice(e,t,r){return 0===t&&r===e.length?fromByteArray(e):fromByteArray(e.slice(t,r))}function utf8Slice(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var a,o,s,u,l=e[i],c=null,f=l>239?4:l>223?3:l>191?2:1;if(i+f<=r)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(a=e[i+1]))&&(u=(31&l)<<6|63&a)>127&&(c=u);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(u=(15&l)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(u=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=f}return decodeCodePointsArray(n)}Buffer.TYPED_ARRAY_SUPPORT=void 0===global$1.TYPED_ARRAY_SUPPORT||global$1.TYPED_ARRAY_SUPPORT,kMaxLength(),Buffer.poolSize=8192,Buffer._augment=function(e){return e.__proto__=Buffer.prototype,e},Buffer.from=function(e,t,r){return from(null,e,t,r)},Buffer.TYPED_ARRAY_SUPPORT&&(Buffer.prototype.__proto__=Uint8Array.prototype,Buffer.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&Buffer[Symbol.species]),Buffer.alloc=function(e,t,r){return alloc(null,e,t,r)},Buffer.allocUnsafe=function(e){return allocUnsafe(null,e)},Buffer.allocUnsafeSlow=function(e){return allocUnsafe(null,e)},Buffer.isBuffer=isBuffer,Buffer.compare=function(e,t){if(!internalIsBuffer(e)||!internalIsBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},Buffer.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},Buffer.concat=function(e,t){if(!isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return Buffer.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=Buffer.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(!internalIsBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},Buffer.byteLength=byteLength,Buffer.prototype._isBuffer=!0,Buffer.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)swap(this,t,t+1);return this},Buffer.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)swap(this,t,t+3),swap(this,t+1,t+2);return this},Buffer.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)swap(this,t,t+7),swap(this,t+1,t+6),swap(this,t+2,t+5),swap(this,t+3,t+4);return this},Buffer.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?utf8Slice(this,0,e):slowToString.apply(this,arguments)},Buffer.prototype.equals=function(e){if(!internalIsBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===Buffer.compare(this,e)},Buffer.prototype.inspect=function(){var e="",t=INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},Buffer.prototype.compare=function(e,t,r,n,i){if(!internalIsBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(a,o),u=this.slice(n,i),l=e.slice(t,r),c=0;c<s;++c)if(u[c]!==l[c]){a=u[c],o=l[c];break}return a<o?-1:o<a?1:0},Buffer.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},Buffer.prototype.indexOf=function(e,t,r){return bidirectionalIndexOf(this,e,t,r,!0)},Buffer.prototype.lastIndexOf=function(e,t,r){return bidirectionalIndexOf(this,e,t,r,!1)},Buffer.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return hexWrite(this,e,t,r);case"utf8":case"utf-8":return utf8Write(this,e,t,r);case"ascii":return asciiWrite(this,e,t,r);case"latin1":case"binary":return latin1Write(this,e,t,r);case"base64":return base64Write(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},Buffer.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(e){var t=e.length;if(t<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=MAX_ARGUMENTS_LENGTH));return r}function asciiSlice(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function latin1Slice(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function hexSlice(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",a=t;a<r;++a)i+=toHex(e[a]);return i}function utf16leSlice(e,t,r){for(var n=e.slice(t,r),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function checkOffset(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function checkInt(e,t,r,n,i,a){if(!internalIsBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function objectWriteUInt16(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i<a;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function objectWriteUInt32(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i<a;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function checkIEEE754(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function writeFloat(e,t,r,n,i){return i||checkIEEE754(e,t,r,4),write(e,t,r,n,23,4),r+4}function writeDouble(e,t,r,n,i){return i||checkIEEE754(e,t,r,8),write(e,t,r,n,52,8),r+8}Buffer.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),Buffer.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=Buffer.prototype;else{var i=t-e;r=new Buffer(i,void 0);for(var a=0;a<i;++a)r[a]=this[a+e]}return r},Buffer.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||checkOffset(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n},Buffer.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||checkOffset(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},Buffer.prototype.readUInt8=function(e,t){return t||checkOffset(e,1,this.length),this[e]},Buffer.prototype.readUInt16LE=function(e,t){return t||checkOffset(e,2,this.length),this[e]|this[e+1]<<8},Buffer.prototype.readUInt16BE=function(e,t){return t||checkOffset(e,2,this.length),this[e]<<8|this[e+1]},Buffer.prototype.readUInt32LE=function(e,t){return t||checkOffset(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},Buffer.prototype.readUInt32BE=function(e,t){return t||checkOffset(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},Buffer.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||checkOffset(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},Buffer.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||checkOffset(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},Buffer.prototype.readInt8=function(e,t){return t||checkOffset(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},Buffer.prototype.readInt16LE=function(e,t){t||checkOffset(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt16BE=function(e,t){t||checkOffset(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},Buffer.prototype.readInt32LE=function(e,t){return t||checkOffset(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},Buffer.prototype.readInt32BE=function(e,t){return t||checkOffset(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},Buffer.prototype.readFloatLE=function(e,t){return t||checkOffset(e,4,this.length),read(this,e,!0,23,4)},Buffer.prototype.readFloatBE=function(e,t){return t||checkOffset(e,4,this.length),read(this,e,!1,23,4)},Buffer.prototype.readDoubleLE=function(e,t){return t||checkOffset(e,8,this.length),read(this,e,!0,52,8)},Buffer.prototype.readDoubleBE=function(e,t){return t||checkOffset(e,8,this.length),read(this,e,!1,52,8)},Buffer.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||checkInt(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a<r&&(i*=256);)this[t+a]=e/i&255;return t+r},Buffer.prototype.writeUIntBE=function(e,t,r,n){e=+e,t|=0,r|=0,n||checkInt(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},Buffer.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,1,255,0),Buffer.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},Buffer.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):objectWriteUInt16(this,e,t,!0),t+2},Buffer.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,2,65535,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):objectWriteUInt16(this,e,t,!1),t+2},Buffer.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):objectWriteUInt32(this,e,t,!0),t+4},Buffer.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,4,4294967295,0),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):objectWriteUInt32(this,e,t,!1),t+4},Buffer.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);checkInt(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<r&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+r},Buffer.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);checkInt(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+r},Buffer.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,1,127,-128),Buffer.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},Buffer.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):objectWriteUInt16(this,e,t,!0),t+2},Buffer.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,2,32767,-32768),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):objectWriteUInt16(this,e,t,!1),t+2},Buffer.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,4,2147483647,-2147483648),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):objectWriteUInt32(this,e,t,!0),t+4},Buffer.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||checkInt(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),Buffer.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):objectWriteUInt32(this,e,t,!1),t+4},Buffer.prototype.writeFloatLE=function(e,t,r){return writeFloat(this,e,t,!0,r)},Buffer.prototype.writeFloatBE=function(e,t,r){return writeFloat(this,e,t,!1,r)},Buffer.prototype.writeDoubleLE=function(e,t,r){return writeDouble(this,e,t,!0,r)},Buffer.prototype.writeDoubleBE=function(e,t,r){return writeDouble(this,e,t,!1,r)},Buffer.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<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),e.length-t<n-r&&(n=e.length-t+r);var i,a=n-r;if(this===e&&r<t&&t<n)for(i=a-1;i>=0;--i)e[i+t]=this[i+r];else if(a<1e3||!Buffer.TYPED_ARRAY_SUPPORT)for(i=0;i<a;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+a),t);return a},Buffer.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!Buffer.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var a;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var o=internalIsBuffer(e)?e:utf8ToBytes(new Buffer(e,n).toString()),s=o.length;for(a=0;a<r-t;++a)this[a+t]=o[a%s]}return this};var INVALID_BASE64_RE=/[^+\/0-9A-Za-z-_]/g,HeaderTypes;function base64clean(e){if((e=stringtrim(e).replace(INVALID_BASE64_RE,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}function stringtrim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function toHex(e){return e<16?"0"+e.toString(16):e.toString(16)}function utf8ToBytes(e,t){var r;t=t||1/0;for(var n=e.length,i=null,a=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function asciiToBytes(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function utf16leToBytes(e,t){for(var r,n,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,i=r%256,a.push(i),a.push(n);return a}function base64ToBytes(e){return toByteArray(base64clean(e))}function blitBuffer(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function isnan(e){return e!=e}function isBuffer(e){return null!=e&&(!!e._isBuffer||isFastBuffer(e)||isSlowBuffer(e))}function isFastBuffer(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function isSlowBuffer(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&isFastBuffer(e.slice(0,0))}!function(e){e[e.BITMAP_INFO_HEADER=40]="BITMAP_INFO_HEADER",e[e.BITMAP_V2_INFO_HEADER=52]="BITMAP_V2_INFO_HEADER",e[e.BITMAP_V3_INFO_HEADER=56]="BITMAP_V3_INFO_HEADER",e[e.BITMAP_V4_HEADER=108]="BITMAP_V4_HEADER",e[e.BITMAP_V5_HEADER=124]="BITMAP_V5_HEADER"}(HeaderTypes||(HeaderTypes={}));var HeaderTypes$1=HeaderTypes,BmpCompression;function maskColor(e,t,r,n){const i=1+~e&e,a=1+~t&t,o=1+~r&r,s=1+~n&n,u=e/i+1,l=t/a+1,c=r/o+1,f=n/s+1;return{shiftRed:t=>(t&e)/i*256/u,shiftGreen:e=>(e&t)/a*256/l,shiftBlue:e=>(e&r)/o*256/c,shiftAlpha:0!==n?e=>(e&n)/s*256/f:()=>255}}!function(e){e[e.NONE=0]="NONE",e[e.BI_RLE8=1]="BI_RLE8",e[e.BI_RLE4=2]="BI_RLE4",e[e.BI_BIT_FIELDS=3]="BI_BIT_FIELDS",e[e.BI_ALPHA_BIT_FIELDS=6]="BI_ALPHA_BIT_FIELDS"}(BmpCompression||(BmpCompression={}));class BmpDecoder{flag;fileSize;reserved1;reserved2;offset;headerSize;width;height;planes;bitPP;compression;rawSize;hr;vr;colors;importantColors;palette;data;maskRed;maskGreen;maskBlue;maskAlpha;toRGBA;pos;bottomUp;buffer;locRed;locGreen;locBlue;locAlpha;shiftRed;shiftGreen;shiftBlue;shiftAlpha;constructor(e,{toRGBA:t}={toRGBA:!1}){if(this.buffer=e,this.toRGBA=!!t,this.pos=0,this.bottomUp=!0,this.flag=this.buffer.toString("utf-8",0,this.pos+=2),"BM"!==this.flag)throw new Error("Invalid BMP File");this.locRed=this.toRGBA?0:3,this.locGreen=this.toRGBA?1:2,this.locBlue=this.toRGBA?2:1,this.locAlpha=this.toRGBA?3:0,this.parseHeader(),this.parseRGBA()}parseHeader(){if(this.fileSize=this.readUInt32LE(),this.reserved1=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.reserved2=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.offset=this.readUInt32LE(),this.headerSize=this.readUInt32LE(),!(this.headerSize in HeaderTypes$1))throw new Error(`Unsupported BMP header size ${this.headerSize}`);if(this.width=this.readUInt32LE(),this.height=this.readUInt32LE(),this.height=this.height>2147483647?this.height-4294967296:this.height,this.planes=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.bitPP=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.compression=this.readUInt32LE(),this.rawSize=this.readUInt32LE(),this.hr=this.readUInt32LE(),this.vr=this.readUInt32LE(),this.colors=this.readUInt32LE(),this.importantColors=this.readUInt32LE(),32===this.bitPP?(this.maskAlpha=0,this.maskRed=16711680,this.maskGreen=65280,this.maskBlue=255):16===this.bitPP&&(this.maskAlpha=0,this.maskRed=31744,this.maskGreen=992,this.maskBlue=31),(this.headerSize>HeaderTypes$1.BITMAP_INFO_HEADER||this.compression===BmpCompression.BI_BIT_FIELDS||this.compression===BmpCompression.BI_ALPHA_BIT_FIELDS)&&(this.maskRed=this.readUInt32LE(),this.maskGreen=this.readUInt32LE(),this.maskBlue=this.readUInt32LE()),(this.headerSize>HeaderTypes$1.BITMAP_V2_INFO_HEADER||this.compression===BmpCompression.BI_ALPHA_BIT_FIELDS)&&(this.maskAlpha=this.readUInt32LE()),this.headerSize>HeaderTypes$1.BITMAP_V3_INFO_HEADER&&(this.pos+=HeaderTypes$1.BITMAP_V4_HEADER-HeaderTypes$1.BITMAP_V3_INFO_HEADER),this.headerSize>HeaderTypes$1.BITMAP_V4_HEADER&&(this.pos+=HeaderTypes$1.BITMAP_V5_HEADER-HeaderTypes$1.BITMAP_V4_HEADER),this.bitPP<=8||this.colors>0){const e=0===this.colors?1<<this.bitPP:this.colors;this.palette=new Array(e);for(let t=0;t<e;t++){const e=this.buffer.readUInt8(this.pos++),r=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++);this.palette[t]={red:n,green:r,blue:e,quad:i}}}this.height<0&&(this.height*=-1,this.bottomUp=!1);const e=maskColor(this.maskRed,this.maskGreen,this.maskBlue,this.maskAlpha);this.shiftRed=e.shiftRed,this.shiftGreen=e.shiftGreen,this.shiftBlue=e.shiftBlue,this.shiftAlpha=e.shiftAlpha}parseRGBA(){switch(this.data=Buffer.alloc(this.width*this.height*4),this.bitPP){case 1:this.bit1();break;case 4:this.bit4();break;case 8:this.bit8();break;case 16:this.bit16();break;case 24:this.bit24();break;default:this.bit32()}}bit1(){const e=Math.ceil(this.width/8),t=e%4,r=0!==t?4-t:0;this.scanImage(r,e,(e,t)=>{const r=this.buffer.readUInt8(this.pos++),n=t*this.width*4+8*e*4;for(let t=0;t<8&&8*e+t<this.width;t++){const e=this.palette[r>>7-t&1];this.data[n+t*this.locAlpha]=0,this.data[n+4*t+this.locBlue]=e.blue,this.data[n+4*t+this.locGreen]=e.green,this.data[n+4*t+this.locRed]=e.red}})}bit4(){if(this.compression===BmpCompression.BI_RLE4){this.data.fill(0);let e=!1,t=this.bottomUp?this.height-1:0,r=0;for(;r<this.data.length;){const n=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++);if(0===n){if(0===i){t+=this.bottomUp?-1:1,r=t*this.width*4,e=!1;continue}if(1===i)break;if(2===i){const e=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++);t+=this.bottomUp?-n:n,r+=n*this.width*4+4*e}else{let t=this.buffer.readUInt8(this.pos++);for(let n=0;n<i;n++)r=this.setPixelData(r,e?15&t:(240&t)>>4),1&n&&n+1<i&&(t=this.buffer.readUInt8(this.pos++)),e=!e;1==(i+1>>1&1)&&this.pos++}}else for(let t=0;t<n;t++)r=this.setPixelData(r,e?15&i:(240&i)>>4),e=!e}}else{const e=Math.ceil(this.width/2),t=e%4,r=0!==t?4-t:0;this.scanImage(r,e,(e,t)=>{const r=this.buffer.readUInt8(this.pos++),n=t*this.width*4+2*e*4,i=r>>4;let a=this.palette[i];if(this.data[n]=0,this.data[n+1]=a.blue,this.data[n+2]=a.green,this.data[n+3]=a.red,2*e+1>=this.width)return!1;const o=15&r;a=this.palette[o],this.data[n+4]=0,this.data[n+4+1]=a.blue,this.data[n+4+2]=a.green,this.data[n+4+3]=a.red})}}bit8(){if(this.compression===BmpCompression.BI_RLE8){this.data.fill(0);let e=this.bottomUp?this.height-1:0,t=0;for(;t<this.data.length;){const r=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++);if(0===r){if(0===n){e+=this.bottomUp?-1:1,t=e*this.width*4;continue}if(1===n)break;if(2===n){const r=this.buffer.readUInt8(this.pos++),n=this.buffer.readUInt8(this.pos++);e+=this.bottomUp?-n:n,t+=n*this.width*4+4*r}else{for(let e=0;e<n;e++){const e=this.buffer.readUInt8(this.pos++);t=this.setPixelData(t,e)}!0&n&&this.pos++}}else for(let e=0;e<r;e++)t=this.setPixelData(t,n)}}else{const e=this.width%4,t=0!==e?4-e:0;this.scanImage(t,this.width,(e,t)=>{const r=this.buffer.readUInt8(this.pos++),n=t*this.width*4+4*e;if(r<this.palette.length){const e=this.palette[r];this.data[n]=0,this.data[n+1]=e.blue,this.data[n+2]=e.green,this.data[n+3]=e.red}else this.data[n]=0,this.data[n+1]=255,this.data[n+2]=255,this.data[n+3]=255})}}bit16(){const e=this.width%2*2;this.scanImage(e,this.width,(e,t)=>{const r=t*this.width*4+4*e,n=this.buffer.readUInt16LE(this.pos);this.pos+=2,this.data[r+this.locRed]=this.shiftRed(n),this.data[r+this.locGreen]=this.shiftGreen(n),this.data[r+this.locBlue]=this.shiftBlue(n),this.data[r+this.locAlpha]=this.shiftAlpha(n)})}bit24(){const e=this.width%4;this.scanImage(e,this.width,(e,t)=>{const r=t*this.width*4+4*e,n=this.buffer.readUInt8(this.pos++),i=this.buffer.readUInt8(this.pos++),a=this.buffer.readUInt8(this.pos++);this.data[r+this.locRed]=a,this.data[r+this.locGreen]=i,this.data[r+this.locBlue]=n,this.data[r+this.locAlpha]=0})}bit32(){this.scanImage(0,this.width,(e,t)=>{const r=t*this.width*4+4*e,n=this.readUInt32LE();this.data[r+this.locRed]=this.shiftRed(n),this.data[r+this.locGreen]=this.shiftGreen(n),this.data[r+this.locBlue]=this.shiftBlue(n),this.data[r+this.locAlpha]=this.shiftAlpha(n)})}scanImage(e=0,t=this.width,r){for(let n=this.height-1;n>=0;n--){const i=this.bottomUp?n:this.height-1-n;for(let e=0;e<t;e++)if(!1===r.call(this,e,i))return;this.pos+=e}}readUInt32LE(){const e=this.buffer.readUInt32LE(this.pos);return this.pos+=4,e}setPixelData(e,t){const{blue:r,green:n,red:i}=this.palette[t];return this.data[e+this.locAlpha]=0,this.data[e+1+this.locBlue]=r,this.data[e+2+this.locGreen]=n,this.data[e+3+this.locRed]=i,e+4}}function createInteger(e){return e.reduce((e,t)=>e<<1|t,0)}function createColor(e){return e.quad<<24|e.red<<16|e.green<<8|e.blue}class BmpEncoder{fileSize;reserved1;reserved2;offset;width;flag;height;planes;bitPP;compress;hr;vr;colors;importantColors;rawSize;headerSize;data;palette;extraBytes;buffer;bytesInColor;pos;constructor(e){switch(this.buffer=e.data,this.width=e.width,this.height=e.height,this.headerSize=HeaderTypes$1.BITMAP_INFO_HEADER,this.flag="BM",this.bitPP=e.bitPP||24,this.offset=54,this.reserved1=e.reserved1||0,this.reserved2=e.reserved2||0,this.planes=1,this.compress=0,this.hr=e.hr||0,this.vr=e.vr||0,this.importantColors=e.importantColors||0,this.colors=Math.min(2**(this.bitPP-1||1),e.colors||1/0),this.palette=e.palette||[],this.colors&&this.bitPP<16?this.offset+=4*this.colors:this.colors=0,this.bitPP){case 32:this.bytesInColor=4;break;case 16:this.bytesInColor=2;break;case 8:this.bytesInColor=1;break;case 4:this.bytesInColor=.5;break;case 1:this.bytesInColor=1/8;break;default:this.bytesInColor=3,this.bitPP=24}const t=this.width*this.bitPP/32,r=Math.ceil(t);this.extraBytes=4*(r-t),this.rawSize=this.height*r*4+2,this.fileSize=this.rawSize+this.offset,this.data=Buffer.alloc(this.fileSize,1),this.pos=0,this.encode()}encode(){switch(this.pos=0,this.writeHeader(),this.bitPP){case 32:this.bit32();break;case 16:this.bit16();break;case 8:this.bit8();break;case 4:this.bit4();break;case 1:this.bit1();break;default:this.bit24()}}writeHeader(){this.data.write(this.flag,this.pos,2),this.pos+=2,this.writeUInt32LE(this.fileSize),this.writeUInt32LE(this.reserved1<<16|this.reserved2),this.writeUInt32LE(this.offset),this.writeUInt32LE(this.headerSize),this.writeUInt32LE(this.width),this.writeUInt32LE(this.height),this.data.writeUInt16LE(this.planes,this.pos),this.pos+=2,this.data.writeUInt16LE(this.bitPP,this.pos),this.pos+=2,this.writeUInt32LE(this.compress),this.writeUInt32LE(this.rawSize),this.writeUInt32LE(this.hr),this.writeUInt32LE(this.vr),this.writeUInt32LE(this.colors),this.writeUInt32LE(this.importantColors)}bit1(){this.palette.length&&2===this.colors?this.initColors(1):(this.writeUInt32LE(16777215),this.writeUInt32LE(0)),this.pos+=1;let e=[];this.writeImage((t,r,n)=>{let i=r;i++;const a=this.buffer[i++],o=this.buffer[i++],s=.2126*this.buffer[i++]+.7152*o+.0722*a;return e.push(s>127?0:1),(n+1)%8==0?(this.data[t-1]=createInteger(e),e=[]):n===this.width-1&&e.length>0&&(this.data[t-1]=createInteger(e)<<4,e=[]),i})}bit4(){const e=this.initColors(4);let t=[];this.writeImage((r,n,i)=>{let a=n;const o=createColor({quad:this.buffer[a++],blue:this.buffer[a++],green:this.buffer[a++],red:this.buffer[a++]}),s=e.findIndex(e=>e===o);return-1!==s?t.push(s):t.push(0),(i+1)%2==0&&(this.data[r]=t[0]<<4|t[1],t=[]),a})}bit8(){const e=this.initColors(8);this.writeImage((t,r)=>{let n=r;const i=createColor({quad:this.buffer[n++],blue:this.buffer[n++],green:this.buffer[n++],red:this.buffer[n++]}),a=e.findIndex(e=>e===i);return this.data[t]=-1!==a?a:0,n})}bit16(){this.writeImage((e,t)=>{let r=t+1;const n=this.buffer[r++]/8,i=this.buffer[r++]/8,a=this.buffer[r++]/8<<10|i<<5|n;return this.data[e]=255&a,this.data[e+1]=(65280&a)>>8,r})}bit24(){this.writeImage((e,t)=>{let r=t+1;return this.data[e]=this.buffer[r++],this.data[e+1]=this.buffer[r++],this.data[e+2]=this.buffer[r++],r})}bit32(){this.writeImage((e,t)=>{let r=t;return this.data[e+3]=this.buffer[r++],this.data[e]=this.buffer[r++],this.data[e+1]=this.buffer[r++],this.data[e+2]=this.buffer[r++],r})}writeImage(e){const t=this.extraBytes+this.width*this.bytesInColor;let r=0;for(let n=0;n<this.height;n++)for(let i=0;i<this.width;i++){const a=Math.floor(this.pos+(this.height-1-n)*t+i*this.bytesInColor);r=e.call(this,a,r,i,n)}}initColors(e){const t=[];if(!this.palette.length)throw new Error(`To encode ${e}-bit BMPs a pallette is needed. Please choose up to ${this.colors} colors. Colors must be 32-bit integers.`);for(let e=0;e<this.colors;e++){const r=createColor(this.palette[e]);this.writeUInt32LE(r),t.push(r)}return t}writeUInt32LE(e){this.data.writeUInt32LE(e,this.pos),this.pos+=4}}function decode$2(e,t){return new BmpDecoder(e,t)}function encode$2(e){return new BmpEncoder(e)}function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}var trimLeft=/^\s+/,trimRight=/\s+$/;function tinycolor(e,t){if(t=t||{},(e=e||"")instanceof tinycolor)return e;if(!(this instanceof tinycolor))return new tinycolor(e,t);var r=inputToRGB(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=r.ok}function inputToRGB(e){var t={r:0,g:0,b:0},r=1,n=null,i=null,a=null,o=!1,s=!1;return"string"==typeof e&&(e=stringInputToObject(e)),"object"==_typeof(e)&&(isValidCSSUnit(e.r)&&isValidCSSUnit(e.g)&&isValidCSSUnit(e.b)?(t=rgbToRgb(e.r,e.g,e.b),o=!0,s="%"===String(e.r).substr(-1)?"prgb":"rgb"):isValidCSSUnit(e.h)&&isValidCSSUnit(e.s)&&isValidCSSUnit(e.v)?(n=convertToPercentage(e.s),i=convertToPercentage(e.v),t=hsvToRgb(e.h,n,i),o=!0,s="hsv"):isValidCSSUnit(e.h)&&isValidCSSUnit(e.s)&&isValidCSSUnit(e.l)&&(n=convertToPercentage(e.s),a=convertToPercentage(e.l),t=hslToRgb(e.h,n,a),o=!0,s="hsl"),e.hasOwnProperty("a")&&(r=e.a)),r=boundAlpha(r),{ok:o,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:r}}function rgbToRgb(e,t,r){return{r:255*bound01(e,255),g:255*bound01(t,255),b:255*bound01(r,255)}}function rgbToHsl(e,t,r){e=bound01(e,255),t=bound01(t,255),r=bound01(r,255);var n,i,a=Math.max(e,t,r),o=Math.min(e,t,r),s=(a+o)/2;if(a==o)n=i=0;else{var u=a-o;switch(i=s>.5?u/(2-a-o):u/(a+o),a){case e:n=(t-r)/u+(t<r?6:0);break;case t:n=(r-e)/u+2;break;case r:n=(e-t)/u+4}n/=6}return{h:n,s:i,l:s}}function hslToRgb(e,t,r){var n,i,a;function o(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=bound01(e,360),t=bound01(t,100),r=bound01(r,100),0===t)n=i=a=r;else{var s=r<.5?r*(1+t):r+t-r*t,u=2*r-s;n=o(u,s,e+1/3),i=o(u,s,e),a=o(u,s,e-1/3)}return{r:255*n,g:255*i,b:255*a}}function rgbToHsv(e,t,r){e=bound01(e,255),t=bound01(t,255),r=bound01(r,255);var n,i,a=Math.max(e,t,r),o=Math.min(e,t,r),s=a,u=a-o;if(i=0===a?0:u/a,a==o)n=0;else{switch(a){case e:n=(t-r)/u+(t<r?6:0);break;case t:n=(r-e)/u+2;break;case r:n=(e-t)/u+4}n/=6}return{h:n,s:i,v:s}}function hsvToRgb(e,t,r){e=6*bound01(e,360),t=bound01(t,100),r=bound01(r,100);var n=Math.floor(e),i=e-n,a=r*(1-t),o=r*(1-i*t),s=r*(1-(1-i)*t),u=n%6;return{r:255*[r,o,a,a,s,r][u],g:255*[s,r,r,o,a,a][u],b:255*[a,a,s,r,r,o][u]}}function rgbToHex(e,t,r,n){var i=[pad2(Math.round(e).toString(16)),pad2(Math.round(t).toString(16)),pad2(Math.round(r).toString(16))];return n&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function rgbaToHex(e,t,r,n,i){var a=[pad2(Math.round(e).toString(16)),pad2(Math.round(t).toString(16)),pad2(Math.round(r).toString(16)),pad2(convertDecimalToHex(n))];return i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function rgbaToArgbHex(e,t,r,n){return[pad2(convertDecimalToHex(n)),pad2(Math.round(e).toString(16)),pad2(Math.round(t).toString(16)),pad2(Math.round(r).toString(16))].join("")}function _desaturate(e,t){t=0===t?0:t||10;var r=tinycolor(e).toHsl();return r.s-=t/100,r.s=clamp01(r.s),tinycolor(r)}function _saturate(e,t){t=0===t?0:t||10;var r=tinycolor(e).toHsl();return r.s+=t/100,r.s=clamp01(r.s),tinycolor(r)}function _greyscale(e){return tinycolor(e).desaturate(100)}function _lighten(e,t){t=0===t?0:t||10;var r=tinycolor(e).toHsl();return r.l+=t/100,r.l=clamp01(r.l),tinycolor(r)}function _brighten(e,t){t=0===t?0:t||10;var r=tinycolor(e).toRgb();return r.r=Math.max(0,Math.min(255,r.r-Math.round(-t/100*255))),r.g=Math.max(0,Math.min(255,r.g-Math.round(-t/100*255))),r.b=Math.max(0,Math.min(255,r.b-Math.round(-t/100*255))),tinycolor(r)}function _darken(e,t){t=0===t?0:t||10;var r=tinycolor(e).toHsl();return r.l-=t/100,r.l=clamp01(r.l),tinycolor(r)}function _spin(e,t){var r=tinycolor(e).toHsl(),n=(r.h+t)%360;return r.h=n<0?360+n:n,tinycolor(r)}function _complement(e){var t=tinycolor(e).toHsl();return t.h=(t.h+180)%360,tinycolor(t)}function polyad(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var r=tinycolor(e).toHsl(),n=[tinycolor(e)],i=360/t,a=1;a<t;a++)n.push(tinycolor({h:(r.h+a*i)%360,s:r.s,l:r.l}));return n}function _splitcomplement(e){var t=tinycolor(e).toHsl(),r=t.h;return[tinycolor(e),tinycolor({h:(r+72)%360,s:t.s,l:t.l}),tinycolor({h:(r+216)%360,s:t.s,l:t.l})]}function _analogous(e,t,r){t=t||6,r=r||30;var n=tinycolor(e).toHsl(),i=360/r,a=[tinycolor(e)];for(n.h=(n.h-(i*t>>1)+720)%360;--t;)n.h=(n.h+i)%360,a.push(tinycolor(n));return a}function _monochromatic(e,t){t=t||6;for(var r=tinycolor(e).toHsv(),n=r.h,i=r.s,a=r.v,o=[],s=1/t;t--;)o.push(tinycolor({h:n,s:i,v:a})),a=(a+s)%1;return o}tinycolor.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,n=this.toRgb();return e=n.r/255,t=n.g/255,r=n.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=boundAlpha(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=rgbToHsv(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=rgbToHsv(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+n+"%)":"hsva("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHsl:function(){var e=rgbToHsl(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=rgbToHsl(this._r,this._g,this._b),t=Math.round(360*e.h),r=Math.round(100*e.s),n=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+n+"%)":"hsla("+t+", "+r+"%, "+n+"%, "+this._roundA+")"},toHex:function(e){return rgbToHex(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return rgbaToHex(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*bound01(this._r,255))+"%",g:Math.round(100*bound01(this._g,255))+"%",b:Math.round(100*bound01(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*bound01(this._r,255))+"%, "+Math.round(100*bound01(this._g,255))+"%, "+Math.round(100*bound01(this._b,255))+"%)":"rgba("+Math.round(100*bound01(this._r,255))+"%, "+Math.round(100*bound01(this._g,255))+"%, "+Math.round(100*bound01(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(hexNames[rgbToHex(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+rgbaToArgbHex(this._r,this._g,this._b,this._a),r=t,n=this._gradientType?"GradientType = 1, ":"";if(e){var i=tinycolor(e);r="#"+rgbaToArgbHex(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+n+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,n=this._a<1&&this._a>=0;return t||!n||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return tinycolor(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(_lighten,arguments)},brighten:function(){return this._applyModification(_brighten,arguments)},darken:function(){return this._applyModification(_darken,arguments)},desaturate:function(){return this._applyModification(_desaturate,arguments)},saturate:function(){return this._applyModification(_saturate,arguments)},greyscale:function(){return this._applyModification(_greyscale,arguments)},spin:function(){return this._applyModification(_spin,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(_analogous,arguments)},complement:function(){return this._applyCombination(_complement,arguments)},monochromatic:function(){return this._applyCombination(_monochromatic,arguments)},splitcomplement:function(){return this._applyCombination(_splitcomplement,arguments)},triad:function(){return this._applyCombination(polyad,[3])},tetrad:function(){return this._applyCombination(polyad,[4])}},tinycolor.fromRatio=function(e,t){if("object"==_typeof(e)){var r={};for(var n in e)e.hasOwnProperty(n)&&(r[n]="a"===n?e[n]:convertToPercentage(e[n]));e=r}return tinycolor(e,t)},tinycolor.equals=function(e,t){return!(!e||!t)&&tinycolor(e).toRgbString()==tinycolor(t).toRgbString()},tinycolor.random=function(){return tinycolor.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},tinycolor.mix=function(e,t,r){r=0===r?0:r||50;var n=tinycolor(e).toRgb(),i=tinycolor(t).toRgb(),a=r/100;return tinycolor({r:(i.r-n.r)*a+n.r,g:(i.g-n.g)*a+n.g,b:(i.b-n.b)*a+n.b,a:(i.a-n.a)*a+n.a})},tinycolor.readability=function(e,t){var r=tinycolor(e),n=tinycolor(t);return(Math.max(r.getLuminance(),n.getLuminance())+.05)/(Math.min(r.getLuminance(),n.getLuminance())+.05)},tinycolor.isReadable=function(e,t,r){var n,i,a=tinycolor.readability(e,t);switch(i=!1,(n=validateWCAG2Parms(r)).level+n.size){case"AAsmall":case"AAAlarge":i=a>=4.5;break;case"AAlarge":i=a>=3;break;case"AAAsmall":i=a>=7}return i},tinycolor.mostReadable=function(e,t,r){var n,i,a,o,s=null,u=0;i=(r=r||{}).includeFallbackColors,a=r.level,o=r.size;for(var l=0;l<t.length;l++)(n=tinycolor.readability(e,t[l]))>u&&(u=n,s=tinycolor(t[l]));return tinycolor.isReadable(e,s,{level:a,size:o})||!i?s:(r.includeFallbackColors=!1,tinycolor.mostReadable(e,["#fff","#000"],r))};var names$1=tinycolor.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},hexNames=tinycolor.hexNames=flip(names$1);function flip(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}function boundAlpha(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function bound01(e,t){isOnePointZero(e)&&(e="100%");var r=isPercentage(e);return e=Math.min(t,Math.max(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function clamp01(e){return Math.min(1,Math.max(0,e))}function parseIntFromHex(e){return parseInt(e,16)}function isOnePointZero(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)}function isPercentage(e){return"string"==typeof e&&-1!=e.indexOf("%")}function pad2(e){return 1==e.length?"0"+e:""+e}function convertToPercentage(e){return e<=1&&(e=100*e+"%"),e}function convertDecimalToHex(e){return Math.round(255*parseFloat(e)).toString(16)}function convertHexToDecimal(e){return parseIntFromHex(e)/255}var matchers=(CSS_UNIT="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",PERMISSIVE_MATCH3="[\\s|\\(]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")\\s*\\)?",PERMISSIVE_MATCH4="[\\s|\\(]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")\\s*\\)?",{CSS_UNIT:new RegExp(CSS_UNIT),rgb:new RegExp("rgb"+PERMISSIVE_MATCH3),rgba:new RegExp("rgba"+PERMISSIVE_MATCH4),hsl:new RegExp("hsl"+PERMISSIVE_MATCH3),hsla:new RegExp("hsla"+PERMISSIVE_MATCH4),hsv:new RegExp("hsv"+PERMISSIVE_MATCH3),hsva:new RegExp("hsva"+PERMISSIVE_MATCH4),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}),CSS_UNIT,PERMISSIVE_MATCH3,PERMISSIVE_MATCH4;function isValidCSSUnit(e){return!!matchers.CSS_UNIT.exec(e)}function stringInputToObject(e){e=e.replace(trimLeft,"").replace(trimRight,"").toLowerCase();var t,r=!1;if(names$1[e])e=names$1[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=matchers.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=matchers.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=matchers.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=matchers.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=matchers.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=matchers.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=matchers.hex8.exec(e))?{r:parseIntFromHex(t[1]),g:parseIntFromHex(t[2]),b:parseIntFromHex(t[3]),a:convertHexToDecimal(t[4]),format:r?"name":"hex8"}:(t=matchers.hex6.exec(e))?{r:parseIntFromHex(t[1]),g:parseIntFromHex(t[2]),b:parseIntFromHex(t[3]),format:r?"name":"hex"}:(t=matchers.hex4.exec(e))?{r:parseIntFromHex(t[1]+""+t[1]),g:parseIntFromHex(t[2]+""+t[2]),b:parseIntFromHex(t[3]+""+t[3]),a:convertHexToDecimal(t[4]+""+t[4]),format:r?"name":"hex8"}:!!(t=matchers.hex3.exec(e))&&{r:parseIntFromHex(t[1]+""+t[1]),g:parseIntFromHex(t[2]+""+t[2]),b:parseIntFromHex(t[3]+""+t[3]),format:r?"name":"hex"}}function validateWCAG2Parms(e){var t,r;return"AA"!==(t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==t&&(t="AA"),"small"!==(r=(e.size||"small").toLowerCase())&&"large"!==r&&(r="small"),{level:t,size:r}}function clone(e){const t={width:e.bitmap.width,height:e.bitmap.height,data:Buffer.from(e.bitmap.data)};return new e.constructor(t)}function scan(e,t,r,n,i,a){let o,s,u,l,c;if("function"==typeof t)c=t,o=0,s=0,u=e.bitmap.width,l=e.bitmap.height;else{if(o=t,"number"!=typeof r)throw new Error("y must be a number");if(s=r,"number"!=typeof n)throw new Error("w must be a number");if(u=n,"number"!=typeof i)throw new Error("h must be a number");if(l=i,"function"!=typeof a)throw new Error("cb must be a function");c=a}o=Math.round(o),s=Math.round(s),u=Math.round(u),l=Math.round(l);const f=c.bind(e);for(let t=s;t<s+l;t++)for(let r=o;r<o+u;r++)f(r,t,e.bitmap.width*t+r<<2);return e}function*scanIterator(e,t,r,n,i){t=Math.round(t),r=Math.round(r),n=Math.round(n),i=Math.round(i);for(let a=r;a<r+i;a++)for(let r=t;r<t+n;r++){const t=e.bitmap.width*a+r<<2;yield{x:r,y:a,idx:t,image:e}}}function intToRGBA$1(e){if("number"!=typeof e)throw new Error("i must be a number");const t={r:0,g:0,b:0,a:0};return t.r=Math.floor(e/Math.pow(256,3)),t.g=Math.floor((e-t.r*Math.pow(256,3))/Math.pow(256,2)),t.b=Math.floor((e-t.r*Math.pow(256,3)-t.g*Math.pow(256,2))/Math.pow(256,1)),t.a=Math.floor((e-t.r*Math.pow(256,3)-t.g*Math.pow(256,2)-t.b*Math.pow(256,1))/Math.pow(256,0)),t}function rgbaToInt(e,t,r,n){if("number"!=typeof e||"number"!=typeof t||"number"!=typeof r||"number"!=typeof n)throw new Error("r, g, b and a must be numbers");if(e<0||e>255)throw new Error("r must be between 0 and 255");if(t<0||t>255)throw new Error("g must be between 0 and 255");if(r<0||r>255)throw new Error("b must be between 0 and 255");if(n<0||n>255)throw new Error("a must be between 0 and 255");let i=255&e;return i<<=8,i|=255&t,i<<=8,i|=255&r,i<<=8,i|=255&n,i>>>=0,i}function colorDiff(e,t){const r=e=>Math.pow(e,2),{max:n}=Math,i="a"in e?e.a:255,a="a"in t?t.a:255;return(n(r(e.r-t.r),r(e.r-t.r-i+a))+n(r(e.g-t.g),r(e.g-t.g-i+a))+n(r(e.b-t.b),r(e.b-t.b-i+a)))/195075}function limit255(e){return e=Math.max(e,0),Math.min(e,255)}function cssColorToHex(e){return"number"==typeof e?e:parseInt(tinycolor(e).toHex8(),16)}function encode$1(e,t={}){return scan({bitmap:e},0,0,e.width,e.height,function(t,r,n){const i=e.data[n+0],a=e.data[n+1],o=e.data[n+2],s=e.data[n+3];e.data[n+0]=s,e.data[n+1]=o,e.data[n+2]=a,e.data[n+3]=i}),encode$2({...e,...t}).data}function decode$1(e,t){const r=decode$2(e,t);return scan({bitmap:r},0,0,r.width,r.height,function(e,t,n){const i=r.data[n+1],a=r.data[n+2],o=r.data[n+3];r.data[n+0]=o,r.data[n+1]=a,r.data[n+2]=i,r.data[n+3]=255}),r}function msBmp(){return{mime:"image/x-ms-bmp",encode:encode$1,decode:decode$1}}function bmp(){return{mime:"image/bmp",encode:encode$1,decode:decode$1}}var omggif={},GifReader_1,GifWriter_1;function GifWriter(e,t,r,n){var i=0,a=void 0===(n=void 0===n?{}:n).loop?null:n.loop,o=void 0===n.palette?null:n.palette;if(t<=0||r<=0||t>65535||r>65535)throw new Error("Width/Height invalid.");function s(e){var t=e.length;if(t<2||t>256||t&t-1)throw new Error("Invalid code/color length, must be power of 2 and 2 .. 256.");return t}e[i++]=71,e[i++]=73,e[i++]=70,e[i++]=56,e[i++]=57,e[i++]=97;var u=0,l=0;if(null!==o){for(var c=s(o);c>>=1;)++u;if(c=1<<u,--u,void 0!==n.background){if((l=n.background)>=c)throw new Error("Background index out of range.");if(0===l)throw new Error("Background index explicitly passed as 0.")}}if(e[i++]=255&t,e[i++]=t>>8&255,e[i++]=255&r,e[i++]=r>>8&255,e[i++]=(null!==o?128:0)|u,e[i++]=l,e[i++]=0,null!==o)for(var f=0,h=o.length;f<h;++f){var d=o[f];e[i++]=d>>16&255,e[i++]=d>>8&255,e[i++]=255&d}if(null!==a){if(a<0||a>65535)throw new Error("Loop count invalid.");e[i++]=33,e[i++]=255,e[i++]=11,e[i++]=78,e[i++]=69,e[i++]=84,e[i++]=83,e[i++]=67,e[i++]=65,e[i++]=80,e[i++]=69,e[i++]=50,e[i++]=46,e[i++]=48,e[i++]=3,e[i++]=1,e[i++]=255&a,e[i++]=a>>8&255,e[i++]=0}var p=!1;this.addFrame=function(t,r,n,a,u,l){if(!0===p&&(--i,p=!1),l=void 0===l?{}:l,t<0||r<0||t>65535||r>65535)throw new Error("x/y invalid.");if(n<=0||a<=0||n>65535||a>65535)throw new Error("Width/Height invalid.");if(u.length<n*a)throw new Error("Not enough pixels for the frame size.");var c=!0,f=l.palette;if(null==f&&(c=!1,f=o),null==f)throw new Error("Must supply either a local or global palette.");for(var h=s(f),d=0;h>>=1;)++d;h=1<<d;var m=void 0===l.delay?0:l.delay,g=void 0===l.disposal?0:l.disposal;if(g<0||g>3)throw new Error("Disposal out of range.");var b=!1,y=0;if(void 0!==l.transparent&&null!==l.transparent&&(b=!0,(y=l.transparent)<0||y>=h))throw new Error("Transparent color index.");if((0!==g||b||0!==m)&&(e[i++]=33,e[i++]=249,e[i++]=4,e[i++]=g<<2|(!0===b?1:0),e[i++]=255&m,e[i++]=m>>8&255,e[i++]=y,e[i++]=0),e[i++]=44,e[i++]=255&t,e[i++]=t>>8&255,e[i++]=255&r,e[i++]=r>>8&255,e[i++]=255&n,e[i++]=n>>8&255,e[i++]=255&a,e[i++]=a>>8&255,e[i++]=!0===c?128|d-1:0,!0===c)for(var _=0,v=f.length;_<v;++_){var w=f[_];e[i++]=w>>16&255,e[i++]=w>>8&255,e[i++]=255&w}return i=GifWriterOutputLZWCodeStream(e,i,d<2?2:d,u)},this.end=function(){return!1===p&&(e[i++]=59,p=!0),i},this.getOutputBuffer=function(){return e},this.setOutputBuffer=function(t){e=t},this.getOutputBufferPosition=function(){return i},this.setOutputBufferPosition=function(e){i=e}}function GifWriterOutputLZWCodeStream(e,t,r,n){e[t++]=r;var i=t++,a=1<<r,o=a-1,s=a+1,u=s+1,l=r+1,c=0,f=0;function h(r){for(;c>=r;)e[t++]=255&f,f>>=8,c-=8,t===i+256&&(e[i]=255,i=t++)}function d(e){f|=e<<c,c+=l,h(8)}var p=n[0]&o,m={};d(a);for(var g=1,b=n.length;g<b;++g){var y=n[g]&o,_=p<<8|y,v=m[_];if(void 0===v){for(f|=p<<c,c+=l;c>=8;)e[t++]=255&f,f>>=8,c-=8,t===i+256&&(e[i]=255,i=t++);4096===u?(d(a),u=s+1,l=r+1,m={}):(u>=1<<l&&++l,m[_]=u++),p=y}else p=v}return d(p),d(s),h(1),i+1===t?e[i]=0:(e[i]=t-i-1,e[t++]=0),t}function GifReader(e){var t=0;if(71!==e[t++]||73!==e[t++]||70!==e[t++]||56!==e[t++]||56!=(e[t++]+1&253)||97!==e[t++])throw new Error("Invalid GIF 87a/89a header.");var r=e[t++]|e[t++]<<8,n=e[t++]|e[t++]<<8,i=e[t++],a=i>>7,o=1<<1+(7&i);e[t++],e[t++];var s=null,u=null;a&&(s=t,u=o,t+=3*o);var l=!0,c=[],f=0,h=null,d=0,p=null;for(this.width=r,this.height=n;l&&t<e.length;)switch(e[t++]){case 33:switch(e[t++]){case 255:if(11!==e[t]||78==e[t+1]&&69==e[t+2]&&84==e[t+3]&&83==e[t+4]&&67==e[t+5]&&65==e[t+6]&&80==e[t+7]&&69==e[t+8]&&50==e[t+9]&&46==e[t+10]&&48==e[t+11]&&3==e[t+12]&&1==e[t+13]&&0==e[t+16])t+=14,p=e[t++]|e[t++]<<8,t++;else for(t+=12;;){if(!((A=e[t++])>=0))throw Error("Invalid block size");if(0===A)break;t+=A}break;case 249:if(4!==e[t++]||0!==e[t+4])throw new Error("Invalid graphics extension block.");var m=e[t++];f=e[t++]|e[t++]<<8,h=e[t++],1&m||(h=null),d=m>>2&7,t++;break;case 254:for(;;){if(!((A=e[t++])>=0))throw Error("Invalid block size");if(0===A)break;t+=A}break;default:throw new Error("Unknown graphic control label: 0x"+e[t-1].toString(16))}break;case 44:var g=e[t++]|e[t++]<<8,b=e[t++]|e[t++]<<8,y=e[t++]|e[t++]<<8,_=e[t++]|e[t++]<<8,v=e[t++],w=v>>6&1,x=1<<1+(7&v),k=s,B=u,E=!1;v>>7&&(E=!0,k=t,B=x,t+=3*x);var S=t;for(t++;;){var A;if(!((A=e[t++])>=0))throw Error("Invalid block size");if(0===A)break;t+=A}c.push({x:g,y:b,width:y,height:_,has_local_palette:E,palette_offset:k,palette_size:B,data_offset:S,data_length:t-S,transparent_index:h,interlaced:!!w,delay:f,disposal:d});break;case 59:l=!1;break;default:throw new Error("Unknown gif block: 0x"+e[t-1].toString(16))}this.numFrames=function(){return c.length},this.loopCount=function(){return p},this.frameInfo=function(e){if(e<0||e>=c.length)throw new Error("Frame index out of range.");return c[e]},this.decodeAndBlitFrameBGRA=function(t,n){var i=this.frameInfo(t),a=i.width*i.height,o=new Uint8Array(a);GifReaderLZWOutputIndexStream(e,i.data_offset,o,a);var s=i.palette_offset,u=i.transparent_index;null===u&&(u=256);var l=i.width,c=r-l,f=l,h=4*(i.y*r+i.x),d=4*((i.y+i.height)*r+i.x),p=h,m=4*c;!0===i.interlaced&&(m+=4*r*7);for(var g=8,b=0,y=o.length;b<y;++b){var _=o[b];if(0===f&&(f=l,(p+=m)>=d&&(m=4*c+4*r*(g-1),p=h+(l+c)*(g<<1),g>>=1)),_===u)p+=4;else{var v=e[s+3*_],w=e[s+3*_+1],x=e[s+3*_+2];n[p++]=x,n[p++]=w,n[p++]=v,n[p++]=255}--f}},this.decodeAndBlitFrameRGBA=function(t,n){var i=this.frameInfo(t),a=i.width*i.height,o=new Uint8Array(a);GifReaderLZWOutputIndexStream(e,i.data_offset,o,a);var s=i.palette_offset,u=i.transparent_index;null===u&&(u=256);var l=i.width,c=r-l,f=l,h=4*(i.y*r+i.x),d=4*((i.y+i.height)*r+i.x),p=h,m=4*c;!0===i.interlaced&&(m+=4*r*7);for(var g=8,b=0,y=o.length;b<y;++b){var _=o[b];if(0===f&&(f=l,(p+=m)>=d&&(m=4*c+4*r*(g-1),p=h+(l+c)*(g<<1),g>>=1)),_===u)p+=4;else{var v=e[s+3*_],w=e[s+3*_+1],x=e[s+3*_+2];n[p++]=v,n[p++]=w,n[p++]=x,n[p++]=255}--f}}}function GifReaderLZWOutputIndexStream(e,t,r,n){for(var i=e[t++],a=1<<i,o=a+1,s=o+1,u=i+1,l=(1<<u)-1,c=0,f=0,h=0,d=e[t++],p=new Int32Array(4096),m=null;;){for(;c<16&&0!==d;)f|=e[t++]<<c,c+=8,1===d?d=e[t++]:--d;if(c<u)break;var g=f&l;if(f>>=u,c-=u,g!==a){if(g===o)break;for(var b=g<s?g:m,y=0,_=b;_>a;)_=p[_]>>8,++y;var v=_;if(h+y+(b!==g?1:0)>n)return void console.log("Warning, gif stream longer than expected.");r[h++]=v;var w=h+=y;for(b!==g&&(r[h++]=v),_=b;y--;)_=p[_],r[--w]=255&_,_>>=8;null!==m&&s<4096&&(p[s++]=m<<8|v,s>=l+1&&u<12&&(++u,l=l<<1|1)),m=g}else s=o+1,l=(1<<(u=i+1))-1,m=null}return h!==n&&console.log("Warning, gif stream shorter than expected."),r}try{GifWriter_1=omggif.GifWriter=GifWriter,GifReader_1=omggif.GifReader=GifReader}catch(e){}let BitmapImage$2=class e{constructor(...t){if(0===t.length)throw new Error("constructor requires parameters");const r=t[0];if(null!==r&&"object"==typeof r)if(r instanceof e){const e=r.bitmap;this.bitmap={width:e.width,height:e.height,data:new Buffer(e.width*e.height*4)},e.data.copy(this.bitmap.data)}else{if(!(r.width&&r.height&&r.data))throw new Error("unrecognized constructor parameters");this.bitmap=r}else{if("number"!=typeof r||"number"!=typeof t[1])throw new Error("unrecognized constructor parameters");{const e=r,n=t[1],i=t[2];this.bitmap={width:e,height:n},Buffer.isBuffer(i)?this.bitmap.data=i:(this.bitmap.data=new Buffer(e*n*4),"number"==typeof i&&this.fillRGBA(i))}}}blit(e,t,r,n,i,a,o){if(n+a>this.bitmap.width)throw new Error("copy exceeds width of source bitmap");if(t+a>e.bitmap.width)throw new Error("copy exceeds width of target bitmap");if(i+o>this.bitmap.height)throw new Error("copy exceeds height of source bitmap");if(r+o>e.bitmap.height)throw new Erro("copy exceeds height of target bitmap");const s=this.bitmap.data,u=e.bitmap.data,l=4*this.bitmap.width,c=4*e.bitmap.width,f=4*a;let h=i*l+4*n,d=r*c+4*t;for(;--o>=0;)s.copy(u,d,h,h+f),h+=l,d+=c;return this}fillRGBA(e){const t=this.bitmap.data,r=4*this.bitmap.height;let n=0;for(;n<r;)t.writeUInt32BE(e,n),n+=4;for(;n<t.length;)t.copy(t,n,0,r),n+=r;return this}getRGBA(e,t){const r=4*(t*this.bitmap.width+e);return this.bitmap.data.readUInt32BE(r)}getRGBASet(){const e=new Set,t=this.bitmap.data;for(let r=0;r<t.length;r+=4)e.add(t.readUInt32BE(r,!0));return e}greyscale(){const e=this.bitmap.data;return this.scan(0,0,this.bitmap.width,this.bitmap.height,(t,r,n)=>{const i=Math.round(.299*e[n]+.587*e[n+1]+.114*e[n+2]);e[n]=i,e[n+1]=i,e[n+2]=i}),this}reframe(t,r,n,i,a){const o=t<0?0:t,s=r<0?0:r,u=n+o>this.bitmap.width?this.bitmap.width-o:n,l=i+s>this.bitmap.height?this.bitmap.height-s:i,c=t<0?-t:0,f=r<0?-r:0;let h;if(void 0===a){if(o!==t||s!=r||u!==n||l!==i)throw new GifError("fillRGBA required for this reframing");h=new e(n,i)}else h=new e(n,i,a);return this.blit(h,c,f,o,s,u,l),this.bitmap=h.bitmap,this}scale(e){if(1===e)return;if(!Number.isInteger(e)||e<1)throw new Error("the scale must be an integer >= 1");const t=this.bitmap.width,r=this.bitmap.height,n=t*e*4,i=this.bitmap.data,a=new Buffer(r*n*e);let o,s=0,u=0;for(let l=0;l<r;++l){o=u;for(let r=0;r<t;++r){const t=i.readUInt32BE(s,!0);for(let r=0;r<e;++r)a.writeUInt32BE(t,u),u+=4;s+=4}for(let t=1;t<e;++t)a.copy(a,u,o,u),u+=n,o+=n}return this.bitmap={width:t*e,height:r*e,data:a},this}scanAllCoords(e){const t=this.bitmap.width,r=this.bitmap.data.length;let n=0,i=0;for(let a=0;a<r;a+=4)e(n,i,a),++n===t&&(n=0,++i)}scanAllIndexes(e){const t=this.bitmap.data.length;for(let r=0;r<t;r+=4)e(r)}};var bitmapimage=BitmapImage$2,gif$1={};let Gif$1=class{constructor(e,t,r){this.width=r.width,this.height=r.height,this.loops=r.loops,this.usesTransparency=r.usesTransparency,this.colorScope=r.colorScope,this.frames=t,this.buffer=e}};Gif$1.GlobalColorsPreferred=0,Gif$1.GlobalColorsOnly=1,Gif$1.LocalColorsOnly=2;let GifError$2=class extends Error{constructor(e){super(e),e instanceof Error&&(this.stack="Gif"+e.stack)}};gif$1.Gif=Gif$1,gif$1.GifError=GifError$2;var gifcodec={},gifutil={},_polyfillNode_fs={},_polyfillNode_fs$1=Object.freeze({__proto__:null,default:_polyfillNode_fs}),require$$0=getAugmentedNamespace(_polyfillNode_fs$1),__defProp$3=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__defNormalProp$3=(e,t,r)=>t in e?__defProp$3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__markAsModule=e=>__defProp$3(e,"__esModule",{value:!0}),__export$1=(e,t)=>{for(var r in t)__defProp$3(e,r,{get:t[r],enumerable:!0})},__reExport=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of __getOwnPropNames(t))!__hasOwnProp.call(e,i)&&r&&__defProp$3(e,i,{get:()=>t[i],enumerable:!(n=__getOwnPropDesc(t,i))||n.enumerable});return e},__toCommonJS=(e=>(t,r)=>e&&e.get(t)||(r=__reExport(__markAsModule({}),t,1),e&&e.set(t,r),r))("undefined"!=typeof WeakMap?new WeakMap:0),__publicField$3=(e,t,r)=>(__defNormalProp$3(e,"symbol"!=typeof t?t+"":t,r),r),src_exports={};__export$1(src_exports,{applyPalette:()=>applyPalette,applyPaletteSync:()=>applyPaletteSync$1,buildPalette:()=>buildPalette,buildPaletteSync:()=>buildPaletteSync$1,constants:()=>constants_exports$1,conversion:()=>conversion_exports$1,distance:()=>distance_exports$1,image:()=>image_exports$1,palette:()=>palette_exports$1,quality:()=>quality_exports$1,utils:()=>utils_exports$1});var constants_exports$1={};__export$1(constants_exports$1,{bt709:()=>bt709_exports$1});var bt709_exports$1={};__export$1(bt709_exports$1,{Y:()=>Y$1,x:()=>x$2,y:()=>y$2});var Y$1=(e=>(e[e.RED=.2126]="RED",e[e.GREEN=.7152]="GREEN",e[e.BLUE=.0722]="BLUE",e[e.WHITE=1]="WHITE",e))(Y$1||{}),x$2=(e=>(e[e.RED=.64]="RED",e[e.GREEN=.3]="GREEN",e[e.BLUE=.15]="BLUE",e[e.WHITE=.3127]="WHITE",e))(x$2||{}),y$2=(e=>(e[e.RED=.33]="RED",e[e.GREEN=.6]="GREEN",e[e.BLUE=.06]="BLUE",e[e.WHITE=.329]="WHITE",e))(y$2||{}),conversion_exports$1={};function correctGamma$1(e){return e>.04045?((e+.055)/1.055)**2.4:e/12.92}function rgb2xyz$1(e,t,r){return{x:.4124*(e=correctGamma$1(e/255))+.3576*(t=correctGamma$1(t/255))+.1805*(r=correctGamma$1(r/255)),y:.2126*e+.7152*t+.0722*r,z:.0193*e+.1192*t+.9505*r}}__export$1(conversion_exports$1,{lab2rgb:()=>lab2rgb$1,lab2xyz:()=>lab2xyz$1,rgb2hsl:()=>rgb2hsl$1,rgb2lab:()=>rgb2lab$1,rgb2xyz:()=>rgb2xyz$1,xyz2lab:()=>xyz2lab$1,xyz2rgb:()=>xyz2rgb$1});var arithmetic_exports$1={};function degrees2radians$1(e){return e*(Math.PI/180)}function max3$1(e,t,r){let n=e;return n<t&&(n=t),n<r&&(n=r),n}function min3$1(e,t,r){let n=e;return n>t&&(n=t),n>r&&(n=r),n}function intInRange$1(e,t,r){return e>r&&(e=r),e<t&&(e=t),0|e}function inRange0to255Rounded$1(e){return(e=Math.round(e))>255?e=255:e<0&&(e=0),e}function inRange0to255$1(e){return e>255?e=255:e<0&&(e=0),e}function stableSort$1(e,t){const r=typeof e[0];let n;if("number"===r||"string"===r){const r=Object.create(null);for(let t=0,n=e.length;t<n;t++){const n=e[t];r[n]||0===r[n]||(r[n]=t)}n=e.sort((e,n)=>t(e,n)||r[e]-r[n])}else{const r=e.slice(0);n=e.sort((e,n)=>t(e,n)||r.indexOf(e)-r.indexOf(n))}return n}function rgb2hsl$1(e,t,r){const n=min3$1(e,t,r),i=max3$1(e,t,r),a=i-n,o=(n+i)/510;let s=0;o>0&&o<1&&(s=a/(o<.5?i+n:510-i-n));let u=0;return a>0&&(u=i===e?(t-r)/a:i===t?2+(r-e)/a:4+(e-t)/a,u*=60,u<0&&(u+=360)),{h:u,s,l:o}}__export$1(arithmetic_exports$1,{degrees2radians:()=>degrees2radians$1,inRange0to255:()=>inRange0to255$1,inRange0to255Rounded:()=>inRange0to255Rounded$1,intInRange:()=>intInRange$1,max3:()=>max3$1,min3:()=>min3$1,stableSort:()=>stableSort$1});var refX$1=.95047,refY$1=1,refZ$1=1.08883;function pivot$1(e){return e>.008856?e**(1/3):7.787*e+16/116}function xyz2lab$1(e,t,r){if(e=pivot$1(e/refX$1),t=pivot$1(t/refY$1),r=pivot$1(r/refZ$1),116*t-16<0)throw new Error("xxx");return{L:Math.max(0,116*t-16),a:500*(e-t),b:200*(t-r)}}function rgb2lab$1(e,t,r){const n=rgb2xyz$1(e,t,r);return xyz2lab$1(n.x,n.y,n.z)}var refX2$1=.95047,refY2$1=1,refZ2$1=1.08883;function pivot2$1(e){return e>.206893034?e**3:(e-16/116)/7.787}function lab2xyz$1(e,t,r){const n=(e+16)/116,i=n-r/200;return{x:refX2$1*pivot2$1(t/500+n),y:refY2$1*pivot2$1(n),z:refZ2$1*pivot2$1(i)}}function correctGamma2$1(e){return e>.0031308?1.055*e**(1/2.4)-.055:12.92*e}function xyz2rgb$1(e,t,r){const n=correctGamma2$1(3.2406*e+-1.5372*t+-.4986*r),i=correctGamma2$1(-.9689*e+1.8758*t+.0415*r),a=correctGamma2$1(.0557*e+-.204*t+1.057*r);return{r:inRange0to255Rounded$1(255*n),g:inRange0to255Rounded$1(255*i),b:inRange0to255Rounded$1(255*a)}}function lab2rgb$1(e,t,r){const n=lab2xyz$1(e,t,r);return xyz2rgb$1(n.x,n.y,n.z)}var distance_exports$1={};__export$1(distance_exports$1,{AbstractDistanceCalculator:()=>AbstractDistanceCalculator$1,AbstractEuclidean:()=>AbstractEuclidean$1,AbstractManhattan:()=>AbstractManhattan$1,CIE94GraphicArts:()=>CIE94GraphicArts$1,CIE94Textiles:()=>CIE94Textiles$1,CIEDE2000:()=>CIEDE2000$1,CMetric:()=>CMetric$1,Euclidean:()=>Euclidean$1,EuclideanBT709:()=>EuclideanBT709$1,EuclideanBT709NoAlpha:()=>EuclideanBT709NoAlpha$1,Manhattan:()=>Manhattan$1,ManhattanBT709:()=>ManhattanBT709$1,ManhattanNommyde:()=>ManhattanNommyde$1,PNGQuant:()=>PNGQuant$1});var AbstractDistanceCalculator$1=class{constructor(){__publicField$3(this,"_maxDistance"),__publicField$3(this,"_whitePoint"),this._setDefaults(),this.setWhitePoint(255,255,255,255)}setWhitePoint(e,t,r,n){this._whitePoint={r:e>0?255/e:0,g:t>0?255/t:0,b:r>0?255/r:0,a:n>0?255/n:0},this._maxDistance=this.calculateRaw(e,t,r,n,0,0,0,0)}calculateNormalized(e,t){return this.calculateRaw(e.r,e.g,e.b,e.a,t.r,t.g,t.b,t.a)/this._maxDistance}},AbstractCIE94$1=class extends AbstractDistanceCalculator$1{calculateRaw(e,t,r,n,i,a,o,s){const u=rgb2lab$1(inRange0to255$1(e*this._whitePoint.r),inRange0to255$1(t*this._whitePoint.g),inRange0to255$1(r*this._whitePoint.b)),l=rgb2lab$1(inRange0to255$1(i*this._whitePoint.r),inRange0to255$1(a*this._whitePoint.g),inRange0to255$1(o*this._whitePoint.b)),c=u.L-l.L,f=u.a-l.a,h=u.b-l.b,d=Math.sqrt(u.a*u.a+u.b*u.b),p=d-Math.sqrt(l.a*l.a+l.b*l.b);let m=f*f+h*h-p*p;m=m<0?0:Math.sqrt(m);const g=(s-n)*this._whitePoint.a*this._kA;return Math.sqrt((c/this._Kl)**2+(p/(1+this._K1*d))**2+(m/(1+this._K2*d))**2+g**2)}},CIE94Textiles$1=class extends AbstractCIE94$1{_setDefaults(){this._Kl=2,this._K1=.048,this._K2=.014,this._kA=12.5/255}},CIE94GraphicArts$1=class extends AbstractCIE94$1{_setDefaults(){this._Kl=1,this._K1=.045,this._K2=.015,this._kA=25/255}},_CIEDE2000$1=class extends AbstractDistanceCalculator$1{_setDefaults(){}static _calculatehp(e,t){const r=Math.atan2(e,t);return r>=0?r:r+_CIEDE2000$1._deg360InRad}static _calculateRT(e,t){const r=t**7,n=2*Math.sqrt(r/(r+_CIEDE2000$1._pow25to7)),i=_CIEDE2000$1._deg30InRad*Math.exp(-(((e-_CIEDE2000$1._deg275InRad)/_CIEDE2000$1._deg25InRad)**2));return-Math.sin(2*i)*n}static _calculateT(e){return 1-.17*Math.cos(e-_CIEDE2000$1._deg30InRad)+.24*Math.cos(2*e)+.32*Math.cos(3*e+_CIEDE2000$1._deg6InRad)-.2*Math.cos(4*e-_CIEDE2000$1._deg63InRad)}static _calculate_ahp(e,t,r,n){const i=r+n;return 0===e?i:t<=_CIEDE2000$1._deg180InRad?i/2:i<_CIEDE2000$1._deg360InRad?(i+_CIEDE2000$1._deg360InRad)/2:(i-_CIEDE2000$1._deg360InRad)/2}static _calculate_dHp(e,t,r,n){let i;return i=0===e?0:t<=_CIEDE2000$1._deg180InRad?r-n:r<=n?r-n+_CIEDE2000$1._deg360InRad:r-n-_CIEDE2000$1._deg360InRad,2*Math.sqrt(e)*Math.sin(i/2)}calculateRaw(e,t,r,n,i,a,o,s){const u=rgb2lab$1(inRange0to255$1(e*this._whitePoint.r),inRange0to255$1(t*this._whitePoint.g),inRange0to255$1(r*this._whitePoint.b)),l=rgb2lab$1(inRange0to255$1(i*this._whitePoint.r),inRange0to255$1(a*this._whitePoint.g),inRange0to255$1(o*this._whitePoint.b)),c=(s-n)*this._whitePoint.a*_CIEDE2000$1._kA,f=this.calculateRawInLab(u,l);return Math.sqrt(f+c*c)}calculateRawInLab(e,t){const r=e.L,n=e.a,i=e.b,a=t.L,o=t.a,s=t.b,u=((Math.sqrt(n*n+i*i)+Math.sqrt(o*o+s*s))/2)**7,l=.5*(1-Math.sqrt(u/(u+_CIEDE2000$1._pow25to7))),c=(1+l)*n,f=(1+l)*o,h=Math.sqrt(c*c+i*i),d=Math.sqrt(f*f+s*s),p=h*d,m=_CIEDE2000$1._calculatehp(i,c),g=_CIEDE2000$1._calculatehp(s,f),b=Math.abs(m-g),y=a-r,_=d-h,v=_CIEDE2000$1._calculate_dHp(p,b,g,m),w=_CIEDE2000$1._calculate_ahp(p,b,m,g),x=(h+d)/2,k=((r+a)/2-50)**2,B=_/(1+.045*x),E=v/(1+.015*_CIEDE2000$1._calculateT(w)*x);return(y/(1+.015*k/Math.sqrt(20+k)))**2+B**2+E**2+_CIEDE2000$1._calculateRT(w,x)*B*E}},CIEDE2000$1=_CIEDE2000$1;__publicField$3(CIEDE2000$1,"_kA",25/255),__publicField$3(CIEDE2000$1,"_pow25to7",25**7),__publicField$3(CIEDE2000$1,"_deg360InRad",degrees2radians$1(360)),__publicField$3(CIEDE2000$1,"_deg180InRad",degrees2radians$1(180)),__publicField$3(CIEDE2000$1,"_deg30InRad",degrees2radians$1(30)),__publicField$3(CIEDE2000$1,"_deg6InRad",degrees2radians$1(6)),__publicField$3(CIEDE2000$1,"_deg63InRad",degrees2radians$1(63)),__publicField$3(CIEDE2000$1,"_deg275InRad",degrees2radians$1(275)),__publicField$3(CIEDE2000$1,"_deg25InRad",degrees2radians$1(25));var CMetric$1=class extends AbstractDistanceCalculator$1{calculateRaw(e,t,r,n,i,a,o,s){const u=(e+i)/2*this._whitePoint.r,l=(e-i)*this._whitePoint.r,c=(t-a)*this._whitePoint.g,f=(r-o)*this._whitePoint.b,h=((512+u)*l*l>>8)+4*c*c+((767-u)*f*f>>8),d=(s-n)*this._whitePoint.a;return Math.sqrt(h+d*d)}_setDefaults(){}},AbstractEuclidean$1=class extends AbstractDistanceCalculator$1{calculateRaw(e,t,r,n,i,a,o,s){const u=i-e,l=a-t,c=o-r,f=s-n;return Math.sqrt(this._kR*u*u+this._kG*l*l+this._kB*c*c+this._kA*f*f)}},Euclidean$1=class extends AbstractEuclidean$1{_setDefaults(){this._kR=1,this._kG=1,this._kB=1,this._kA=1}},EuclideanBT709$1=class extends AbstractEuclidean$1{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=1}},EuclideanBT709NoAlpha$1=class extends AbstractEuclidean$1{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=0}},AbstractManhattan$1=class extends AbstractDistanceCalculator$1{calculateRaw(e,t,r,n,i,a,o,s){let u=i-e,l=a-t,c=o-r,f=s-n;return u<0&&(u=0-u),l<0&&(l=0-l),c<0&&(c=0-c),f<0&&(f=0-f),this._kR*u+this._kG*l+this._kB*c+this._kA*f}},Manhattan$1=class extends AbstractManhattan$1{_setDefaults(){this._kR=1,this._kG=1,this._kB=1,this._kA=1}},ManhattanNommyde$1=class extends AbstractManhattan$1{_setDefaults(){this._kR=.4984,this._kG=.8625,this._kB=.2979,this._kA=1}},ManhattanBT709$1=class extends AbstractManhattan$1{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=1}},PNGQuant$1=class extends AbstractDistanceCalculator$1{calculateRaw(e,t,r,n,i,a,o,s){const u=(s-n)*this._whitePoint.a;return this._colordifferenceCh(e*this._whitePoint.r,i*this._whitePoint.r,u)+this._colordifferenceCh(t*this._whitePoint.g,a*this._whitePoint.g,u)+this._colordifferenceCh(r*this._whitePoint.b,o*this._whitePoint.b,u)}_colordifferenceCh(e,t,r){const n=e-t,i=n+r;return n*n+i*i}_setDefaults(){}},palette_exports$1={};__export$1(palette_exports$1,{AbstractPaletteQuantizer:()=>AbstractPaletteQuantizer$1,ColorHistogram:()=>ColorHistogram$1,NeuQuant:()=>NeuQuant$1,NeuQuantFloat:()=>NeuQuantFloat$1,RGBQuant:()=>RGBQuant$1,WuColorCube:()=>WuColorCube$1,WuQuant:()=>WuQuant$1});var AbstractPaletteQuantizer$1=class{quantizeSync(){for(const e of this.quantize())if(e.palette)return e.palette;throw new Error("unreachable")}},Point$1=class{constructor(){__publicField$3(this,"r"),__publicField$3(this,"g"),__publicField$3(this,"b"),__publicField$3(this,"a"),__publicField$3(this,"uint32"),__publicField$3(this,"rgba"),this.uint32=-1>>>0,this.r=this.g=this.b=this.a=0,this.rgba=new Array(4),this.rgba[0]=0,this.rgba[1]=0,this.rgba[2]=0,this.rgba[3]=0}static createByQuadruplet(e){const t=new Point$1;return t.r=0|e[0],t.g=0|e[1],t.b=0|e[2],t.a=0|e[3],t._loadUINT32(),t._loadQuadruplet(),t}static createByRGBA(e,t,r,n){const i=new Point$1;return i.r=0|e,i.g=0|t,i.b=0|r,i.a=0|n,i._loadUINT32(),i._loadQuadruplet(),i}static createByUint32(e){const t=new Point$1;return t.uint32=e>>>0,t._loadRGBA(),t._loadQuadruplet(),t}from(e){this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this.uint32=e.uint32,this.rgba[0]=e.r,this.rgba[1]=e.g,this.rgba[2]=e.b,this.rgba[3]=e.a}getLuminosity(e){let t=this.r,r=this.g,n=this.b;return e&&(t=Math.min(255,255-this.a+this.a*t/255),r=Math.min(255,255-this.a+this.a*r/255),n=Math.min(255,255-this.a+this.a*n/255)),.2126*t+.7152*r+.0722*n}_loadUINT32(){this.uint32=(this.a<<24|this.b<<16|this.g<<8|this.r)>>>0}_loadRGBA(){this.r=255&this.uint32,this.g=this.uint32>>>8&255,this.b=this.uint32>>>16&255,this.a=this.uint32>>>24&255}_loadQuadruplet(){this.rgba[0]=this.r,this.rgba[1]=this.g,this.rgba[2]=this.b,this.rgba[3]=this.a}},PointContainer$1=class{constructor(){__publicField$3(this,"_pointArray"),__publicField$3(this,"_width"),__publicField$3(this,"_height"),this._width=0,this._height=0,this._pointArray=[]}getWidth(){return this._width}getHeight(){return this._height}setWidth(e){this._width=e}setHeight(e){this._height=e}getPointArray(){return this._pointArray}clone(){const e=new PointContainer$1;e._width=this._width,e._height=this._height;for(let t=0,r=this._pointArray.length;t<r;t++)e._pointArray[t]=Point$1.createByUint32(0|this._pointArray[t].uint32);return e}toUint32Array(){const e=this._pointArray.length,t=new Uint32Array(e);for(let r=0;r<e;r++)t[r]=this._pointArray[r].uint32;return t}toUint8Array(){return new Uint8Array(this.toUint32Array().buffer)}static fromHTMLImageElement(e){const t=e.naturalWidth,r=e.naturalHeight,n=document.createElement("canvas");return n.width=t,n.height=r,n.getContext("2d").drawImage(e,0,0,t,r,0,0,t,r),PointContainer$1.fromHTMLCanvasElement(n)}static fromHTMLCanvasElement(e){const t=e.width,r=e.height,n=e.getContext("2d").getImageData(0,0,t,r);return PointContainer$1.fromImageData(n)}static fromImageData(e){const t=e.width,r=e.height;return PointContainer$1.fromUint8Array(e.data,t,r)}static fromUint8Array(e,t,r){switch(Object.prototype.toString.call(e)){case"[object Uint8ClampedArray]":case"[object Uint8Array]":break;default:e=new Uint8Array(e)}const n=new Uint32Array(e.buffer);return PointContainer$1.fromUint32Array(n,t,r)}static fromUint32Array(e,t,r){const n=new PointContainer$1;n._width=t,n._height=r;for(let t=0,r=e.length;t<r;t++)n._pointArray[t]=Point$1.createByUint32(0|e[t]);return n}static fromBuffer(e,t,r){const n=new Uint32Array(e.buffer,e.byteOffset,e.byteLength/Uint32Array.BYTES_PER_ELEMENT);return PointContainer$1.fromUint32Array(n,t,r)}},hueGroups$1=10;function hueGroup$1(e,t){const r=360/t;for(let n=1,i=r-r/2;n<t;n++,i+=r)if(e>=i&&e<i+r)return n;return 0}var Palette$1=class{constructor(){__publicField$3(this,"_pointContainer"),__publicField$3(this,"_pointArray",[]),__publicField$3(this,"_i32idx",{}),this._pointContainer=new PointContainer$1,this._pointContainer.setHeight(1),this._pointArray=this._pointContainer.getPointArray()}add(e){this._pointArray.push(e),this._pointContainer.setWidth(this._pointArray.length)}has(e){for(let t=this._pointArray.length-1;t>=0;t--)if(e.uint32===this._pointArray[t].uint32)return!0;return!1}getNearestColor(e,t){return this._pointArray[0|this._getNearestIndex(e,t)]}getPointContainer(){return this._pointContainer}_nearestPointFromCache(e){return"number"==typeof this._i32idx[e]?this._i32idx[e]:-1}_getNearestIndex(e,t){let r=this._nearestPointFromCache(""+t.uint32);if(r>=0)return r;let n=Number.MAX_VALUE;r=0;for(let i=0,a=this._pointArray.length;i<a;i++){const a=this._pointArray[i],o=e.calculateRaw(t.r,t.g,t.b,t.a,a.r,a.g,a.b,a.a);o<n&&(n=o,r=i)}return this._i32idx[t.uint32]=r,r}sort(){this._i32idx={},this._pointArray.sort((e,t)=>{const r=rgb2hsl$1(e.r,e.g,e.b),n=rgb2hsl$1(t.r,t.g,t.b),i=e.r===e.g&&e.g===e.b?0:1+hueGroup$1(r.h,hueGroups$1),a=(t.r===t.g&&t.g===t.b?0:1+hueGroup$1(n.h,hueGroups$1))-i;if(a)return-a;const o=e.getLuminosity(!0),s=t.getLuminosity(!0);if(s-o!=0)return s-o;const u=(100*n.s|0)-(100*r.s|0);return u?-u:0})}},utils_exports$1={};__export$1(utils_exports$1,{HueStatistics:()=>HueStatistics$1,Palette:()=>Palette$1,Point:()=>Point$1,PointContainer:()=>PointContainer$1,ProgressTracker:()=>ProgressTracker$1,arithmetic:()=>arithmetic_exports$1});var HueGroup$1=class{constructor(){__publicField$3(this,"num",0),__publicField$3(this,"cols",[])}},HueStatistics$1=class{constructor(e,t){__publicField$3(this,"_numGroups"),__publicField$3(this,"_minCols"),__publicField$3(this,"_stats"),__publicField$3(this,"_groupsFull"),this._numGroups=e,this._minCols=t,this._stats=[];for(let t=0;t<=e;t++)this._stats[t]=new HueGroup$1;this._groupsFull=0}check(e){this._groupsFull===this._numGroups+1&&(this.check=()=>{});const t=255&e,r=e>>>8&255,n=e>>>16&255,i=t===r&&r===n?0:1+hueGroup$1(rgb2hsl$1(t,r,n).h,this._numGroups),a=this._stats[i],o=this._minCols;a.num++,a.num>o||(a.num===o&&this._groupsFull++,a.num<=o&&this._stats[i].cols.push(e))}injectIntoDictionary(e){for(let t=0;t<=this._numGroups;t++)this._stats[t].num<=this._minCols&&this._stats[t].cols.forEach(t=>{e[t]?e[t]++:e[t]=1})}injectIntoArray(e){for(let t=0;t<=this._numGroups;t++)this._stats[t].num<=this._minCols&&this._stats[t].cols.forEach(t=>{-1===e.indexOf(t)&&e.push(t)})}},_ProgressTracker$1=class{constructor(e,t){__publicField$3(this,"progress"),__publicField$3(this,"_step"),__publicField$3(this,"_range"),__publicField$3(this,"_last"),__publicField$3(this,"_progressRange"),this._range=e,this._progressRange=t,this._step=Math.max(1,this._range/(_ProgressTracker$1.steps+1)|0),this._last=-this._step,this.progress=0}shouldNotify(e){return e-this._last>=this._step&&(this._last=e,this.progress=Math.min(this._progressRange*this._last/this._range,this._progressRange),!0)}},ProgressTracker$1=_ProgressTracker$1;__publicField$3(ProgressTracker$1,"steps",100);var networkBiasShift$1=3,Neuron$1=class{constructor(e){__publicField$3(this,"r"),__publicField$3(this,"g"),__publicField$3(this,"b"),__publicField$3(this,"a"),this.r=this.g=this.b=this.a=e}toPoint(){return Point$1.createByRGBA(this.r>>networkBiasShift$1,this.g>>networkBiasShift$1,this.b>>networkBiasShift$1,this.a>>networkBiasShift$1)}subtract(e,t,r,n){this.r-=0|e,this.g-=0|t,this.b-=0|r,this.a-=0|n}},_NeuQuant$1=class extends AbstractPaletteQuantizer$1{constructor(e,t=256){super(),__publicField$3(this,"_pointArray"),__publicField$3(this,"_networkSize"),__publicField$3(this,"_network"),__publicField$3(this,"_sampleFactor"),__publicField$3(this,"_radPower"),__publicField$3(this,"_freq"),__publicField$3(this,"_bias"),__publicField$3(this,"_distance"),this._distance=e,this._pointArray=[],this._sampleFactor=1,this._networkSize=t,this._distance.setWhitePoint(255<<networkBiasShift$1,255<<networkBiasShift$1,255<<networkBiasShift$1,255<<networkBiasShift$1)}sample(e){this._pointArray=this._pointArray.concat(e.getPointArray())}*quantize(){this._init(),yield*this._learn(),yield{palette:this._buildPalette(),progress:100}}_init(){this._freq=[],this._bias=[],this._radPower=[],this._network=[];for(let e=0;e<this._networkSize;e++)this._network[e]=new Neuron$1((e<<networkBiasShift$1+8)/this._networkSize|0),this._freq[e]=_NeuQuant$1._initialBias/this._networkSize|0,this._bias[e]=0}*_learn(){let e=this._sampleFactor;const t=this._pointArray.length;t<_NeuQuant$1._minpicturebytes&&(e=1);const r=30+(e-1)/3|0,n=t/e|0;let i,a=n/_NeuQuant$1._nCycles|0,o=_NeuQuant$1._initAlpha,s=(this._networkSize>>3)*_NeuQuant$1._radiusBias,u=s>>_NeuQuant$1._radiusBiasShift;u<=1&&(u=0);for(let e=0;e<u;e++)this._radPower[e]=o*((u*u-e*e)*_NeuQuant$1._radBias/(u*u))>>>0;i=t<_NeuQuant$1._minpicturebytes?1:t%_NeuQuant$1._prime1!=0?_NeuQuant$1._prime1:t%_NeuQuant$1._prime2!=0?_NeuQuant$1._prime2:t%_NeuQuant$1._prime3!=0?_NeuQuant$1._prime3:_NeuQuant$1._prime4;const l=new ProgressTracker$1(n,99);for(let e=0,c=0;e<n;){l.shouldNotify(e)&&(yield{progress:l.progress});const n=this._pointArray[c],f=n.b<<networkBiasShift$1,h=n.g<<networkBiasShift$1,d=n.r<<networkBiasShift$1,p=n.a<<networkBiasShift$1,m=this._contest(f,h,d,p);if(this._alterSingle(o,m,f,h,d,p),0!==u&&this._alterNeighbour(u,m,f,h,d,p),c+=i,c>=t&&(c-=t),e++,0===a&&(a=1),e%a==0){o-=o/r|0,s-=s/_NeuQuant$1._radiusDecrease|0,u=s>>_NeuQuant$1._radiusBiasShift,u<=1&&(u=0);for(let e=0;e<u;e++)this._radPower[e]=o*((u*u-e*e)*_NeuQuant$1._radBias/(u*u))>>>0}}}_buildPalette(){const e=new Palette$1;return this._network.forEach(t=>{e.add(t.toPoint())}),e.sort(),e}_alterNeighbour(e,t,r,n,i,a){let o=t-e;o<-1&&(o=-1);let s=t+e;s>this._networkSize&&(s=this._networkSize);let u=t+1,l=t-1,c=1;for(;u<s||l>o;){const e=this._radPower[c++]/_NeuQuant$1._alphaRadBias;if(u<s){const t=this._network[u++];t.subtract(e*(t.r-i),e*(t.g-n),e*(t.b-r),e*(t.a-a))}if(l>o){const t=this._network[l--];t.subtract(e*(t.r-i),e*(t.g-n),e*(t.b-r),e*(t.a-a))}}}_alterSingle(e,t,r,n,i,a){e/=_NeuQuant$1._initAlpha;const o=this._network[t];o.subtract(e*(o.r-i),e*(o.g-n),e*(o.b-r),e*(o.a-a))}_contest(e,t,r,n){const i=1020<<networkBiasShift$1;let a=~(1<<31),o=a,s=-1,u=s;for(let l=0;l<this._networkSize;l++){const c=this._network[l],f=this._distance.calculateNormalized(c,{r,g:t,b:e,a:n})*i|0;f<a&&(a=f,s=l);const h=f-(this._bias[l]>>_NeuQuant$1._initialBiasShift-networkBiasShift$1);h<o&&(o=h,u=l);const d=this._freq[l]>>_NeuQuant$1._betaShift;this._freq[l]-=d,this._bias[l]+=d<<_NeuQuant$1._gammaShift}return this._freq[s]+=_NeuQuant$1._beta,this._bias[s]-=_NeuQuant$1._betaGamma,u}},NeuQuant$1=_NeuQuant$1;__publicField$3(NeuQuant$1,"_prime1",499),__publicField$3(NeuQuant$1,"_prime2",491),__publicField$3(NeuQuant$1,"_prime3",487),__publicField$3(NeuQuant$1,"_prime4",503),__publicField$3(NeuQuant$1,"_minpicturebytes",_NeuQuant$1._prime4),__publicField$3(NeuQuant$1,"_nCycles",100),__publicField$3(NeuQuant$1,"_initialBiasShift",16),__publicField$3(NeuQuant$1,"_initialBias",1<<_NeuQuant$1._initialBiasShift),__publicField$3(NeuQuant$1,"_gammaShift",10),__publicField$3(NeuQuant$1,"_betaShift",10),__publicField$3(NeuQuant$1,"_beta",_NeuQuant$1._initialBias>>_NeuQuant$1._betaShift),__publicField$3(NeuQuant$1,"_betaGamma",_NeuQuant$1._initialBias<<_NeuQuant$1._gammaShift-_NeuQuant$1._betaShift),__publicField$3(NeuQuant$1,"_radiusBiasShift",6),__publicField$3(NeuQuant$1,"_radiusBias",1<<_NeuQuant$1._radiusBiasShift),__publicField$3(NeuQuant$1,"_radiusDecrease",30),__publicField$3(NeuQuant$1,"_alphaBiasShift",10),__publicField$3(NeuQuant$1,"_initAlpha",1<<_NeuQuant$1._alphaBiasShift),__publicField$3(NeuQuant$1,"_radBiasShift",8),__publicField$3(NeuQuant$1,"_radBias",1<<_NeuQuant$1._radBiasShift),__publicField$3(NeuQuant$1,"_alphaRadBiasShift",_NeuQuant$1._alphaBiasShift+_NeuQuant$1._radBiasShift),__publicField$3(NeuQuant$1,"_alphaRadBias",1<<_NeuQuant$1._alphaRadBiasShift);var networkBiasShift2$1=3,NeuronFloat$1=class{constructor(e){__publicField$3(this,"r"),__publicField$3(this,"g"),__publicField$3(this,"b"),__publicField$3(this,"a"),this.r=this.g=this.b=this.a=e}toPoint(){return Point$1.createByRGBA(this.r>>networkBiasShift2$1,this.g>>networkBiasShift2$1,this.b>>networkBiasShift2$1,this.a>>networkBiasShift2$1)}subtract(e,t,r,n){this.r-=e,this.g-=t,this.b-=r,this.a-=n}},_NeuQuantFloat$1=class extends AbstractPaletteQuantizer$1{constructor(e,t=256){super(),__publicField$3(this,"_pointArray"),__publicField$3(this,"_networkSize"),__publicField$3(this,"_network"),__publicField$3(this,"_sampleFactor"),__publicField$3(this,"_radPower"),__publicField$3(this,"_freq"),__publicField$3(this,"_bias"),__publicField$3(this,"_distance"),this._distance=e,this._pointArray=[],this._sampleFactor=1,this._networkSize=t,this._distance.setWhitePoint(255<<networkBiasShift2$1,255<<networkBiasShift2$1,255<<networkBiasShift2$1,255<<networkBiasShift2$1)}sample(e){this._pointArray=this._pointArray.concat(e.getPointArray())}*quantize(){this._init(),yield*this._learn(),yield{palette:this._buildPalette(),progress:100}}_init(){this._freq=[],this._bias=[],this._radPower=[],this._network=[];for(let e=0;e<this._networkSize;e++)this._network[e]=new NeuronFloat$1((e<<networkBiasShift2$1+8)/this._networkSize),this._freq[e]=_NeuQuantFloat$1._initialBias/this._networkSize,this._bias[e]=0}*_learn(){let e=this._sampleFactor;const t=this._pointArray.length;t<_NeuQuantFloat$1._minpicturebytes&&(e=1);const r=30+(e-1)/3,n=t/e;let i,a=n/_NeuQuantFloat$1._nCycles|0,o=_NeuQuantFloat$1._initAlpha,s=(this._networkSize>>3)*_NeuQuantFloat$1._radiusBias,u=s>>_NeuQuantFloat$1._radiusBiasShift;u<=1&&(u=0);for(let e=0;e<u;e++)this._radPower[e]=o*((u*u-e*e)*_NeuQuantFloat$1._radBias/(u*u));i=t<_NeuQuantFloat$1._minpicturebytes?1:t%_NeuQuantFloat$1._prime1!=0?_NeuQuantFloat$1._prime1:t%_NeuQuantFloat$1._prime2!=0?_NeuQuantFloat$1._prime2:t%_NeuQuantFloat$1._prime3!=0?_NeuQuantFloat$1._prime3:_NeuQuantFloat$1._prime4;const l=new ProgressTracker$1(n,99);for(let e=0,c=0;e<n;){l.shouldNotify(e)&&(yield{progress:l.progress});const n=this._pointArray[c],f=n.b<<networkBiasShift2$1,h=n.g<<networkBiasShift2$1,d=n.r<<networkBiasShift2$1,p=n.a<<networkBiasShift2$1,m=this._contest(f,h,d,p);if(this._alterSingle(o,m,f,h,d,p),0!==u&&this._alterNeighbour(u,m,f,h,d,p),c+=i,c>=t&&(c-=t),e++,0===a&&(a=1),e%a==0){o-=o/r,s-=s/_NeuQuantFloat$1._radiusDecrease,u=s>>_NeuQuantFloat$1._radiusBiasShift,u<=1&&(u=0);for(let e=0;e<u;e++)this._radPower[e]=o*((u*u-e*e)*_NeuQuantFloat$1._radBias/(u*u))}}}_buildPalette(){const e=new Palette$1;return this._network.forEach(t=>{e.add(t.toPoint())}),e.sort(),e}_alterNeighbour(e,t,r,n,i,a){let o=t-e;o<-1&&(o=-1);let s=t+e;s>this._networkSize&&(s=this._networkSize);let u=t+1,l=t-1,c=1;for(;u<s||l>o;){const e=this._radPower[c++]/_NeuQuantFloat$1._alphaRadBias;if(u<s){const t=this._network[u++];t.subtract(e*(t.r-i),e*(t.g-n),e*(t.b-r),e*(t.a-a))}if(l>o){const t=this._network[l--];t.subtract(e*(t.r-i),e*(t.g-n),e*(t.b-r),e*(t.a-a))}}}_alterSingle(e,t,r,n,i,a){e/=_NeuQuantFloat$1._initAlpha;const o=this._network[t];o.subtract(e*(o.r-i),e*(o.g-n),e*(o.b-r),e*(o.a-a))}_contest(e,t,r,n){const i=1020<<networkBiasShift2$1;let a=~(1<<31),o=a,s=-1,u=s;for(let l=0;l<this._networkSize;l++){const c=this._network[l],f=this._distance.calculateNormalized(c,{r,g:t,b:e,a:n})*i;f<a&&(a=f,s=l);const h=f-(this._bias[l]>>_NeuQuantFloat$1._initialBiasShift-networkBiasShift2$1);h<o&&(o=h,u=l);const d=this._freq[l]>>_NeuQuantFloat$1._betaShift;this._freq[l]-=d,this._bias[l]+=d<<_NeuQuantFloat$1._gammaShift}return this._freq[s]+=_NeuQuantFloat$1._beta,this._bias[s]-=_NeuQuantFloat$1._betaGamma,u}},NeuQuantFloat$1=_NeuQuantFloat$1;__publicField$3(NeuQuantFloat$1,"_prime1",499),__publicField$3(NeuQuantFloat$1,"_prime2",491),__publicField$3(NeuQuantFloat$1,"_prime3",487),__publicField$3(NeuQuantFloat$1,"_prime4",503),__publicField$3(NeuQuantFloat$1,"_minpicturebytes",_NeuQuantFloat$1._prime4),__publicField$3(NeuQuantFloat$1,"_nCycles",100),__publicField$3(NeuQuantFloat$1,"_initialBiasShift",16),__publicField$3(NeuQuantFloat$1,"_initialBias",1<<_NeuQuantFloat$1._initialBiasShift),__publicField$3(NeuQuantFloat$1,"_gammaShift",10),__publicField$3(NeuQuantFloat$1,"_betaShift",10),__publicField$3(NeuQuantFloat$1,"_beta",_NeuQuantFloat$1._initialBias>>_NeuQuantFloat$1._betaShift),__publicField$3(NeuQuantFloat$1,"_betaGamma",_NeuQuantFloat$1._initialBias<<_NeuQuantFloat$1._gammaShift-_NeuQuantFloat$1._betaShift),__publicField$3(NeuQuantFloat$1,"_radiusBiasShift",6),__publicField$3(NeuQuantFloat$1,"_radiusBias",1<<_NeuQuantFloat$1._radiusBiasShift),__publicField$3(NeuQuantFloat$1,"_radiusDecrease",30),__publicField$3(NeuQuantFloat$1,"_alphaBiasShift",10),__publicField$3(NeuQuantFloat$1,"_initAlpha",1<<_NeuQuantFloat$1._alphaBiasShift),__publicField$3(NeuQuantFloat$1,"_radBiasShift",8),__publicField$3(NeuQuantFloat$1,"_radBias",1<<_NeuQuantFloat$1._radBiasShift),__publicField$3(NeuQuantFloat$1,"_alphaRadBiasShift",_NeuQuantFloat$1._alphaBiasShift+_NeuQuantFloat$1._radBiasShift),__publicField$3(NeuQuantFloat$1,"_alphaRadBias",1<<_NeuQuantFloat$1._alphaRadBiasShift);var _ColorHistogram$1=class{constructor(e,t){__publicField$3(this,"_method"),__publicField$3(this,"_hueStats"),__publicField$3(this,"_histogram"),__publicField$3(this,"_initColors"),__publicField$3(this,"_minHueCols"),this._method=e,this._minHueCols=t<<2,this._initColors=t<<2,this._hueStats=new HueStatistics$1(_ColorHistogram$1._hueGroups,this._minHueCols),this._histogram=Object.create(null)}sample(e){switch(this._method){case 1:this._colorStats1D(e);break;case 2:this._colorStats2D(e)}}getImportanceSortedColorsIDXI32(){const e=stableSort$1(Object.keys(this._histogram),(e,t)=>this._histogram[t]-this._histogram[e]);if(0===e.length)return[];let t;switch(this._method){case 1:const r=Math.min(e.length,this._initColors),n=e[r-1],i=this._histogram[n];t=e.slice(0,r);let a=r;const o=e.length;for(;a<o&&this._histogram[e[a]]===i;)t.push(e[a++]);this._hueStats.injectIntoArray(t);break;case 2:t=e;break;default:throw new Error("Incorrect method")}return t.map(e=>+e)}_colorStats1D(e){const t=this._histogram,r=e.getPointArray(),n=r.length;for(let e=0;e<n;e++){const n=r[e].uint32;this._hueStats.check(n),n in t?t[n]++:t[n]=1}}_colorStats2D(e){const t=e.getWidth(),r=e.getHeight(),n=e.getPointArray(),i=_ColorHistogram$1._boxSize[0],a=_ColorHistogram$1._boxSize[1],o=i*a,s=this._makeBoxes(t,r,i,a),u=this._histogram;s.forEach(e=>{let r=Math.round(e.w*e.h/o)*_ColorHistogram$1._boxPixels;r<2&&(r=2);const i={};this._iterateBox(e,t,e=>{const t=n[e].uint32;this._hueStats.check(t),t in u?u[t]++:t in i?++i[t]>=r&&(u[t]=i[t]):i[t]=1})}),this._hueStats.injectIntoDictionary(u)}_iterateBox(e,t,r){const n=e,i=n.y*t+n.x,a=(n.y+n.h-1)*t+(n.x+n.w-1),o=t-n.w+1;let s=0,u=i;do{r.call(this,u),u+=++s%n.w==0?o:1}while(u<=a)}_makeBoxes(e,t,r,n){const i=e%r,a=t%n,o=e-i,s=t-a,u=[];for(let l=0;l<t;l+=n)for(let t=0;t<e;t+=r)u.push({x:t,y:l,w:t===o?i:r,h:l===s?a:n});return u}},ColorHistogram$1=_ColorHistogram$1;__publicField$3(ColorHistogram$1,"_boxSize",[64,64]),__publicField$3(ColorHistogram$1,"_boxPixels",2),__publicField$3(ColorHistogram$1,"_hueGroups",10);var RemovedColor$1=class{constructor(e,t,r){__publicField$3(this,"index"),__publicField$3(this,"color"),__publicField$3(this,"distance"),this.index=e,this.color=t,this.distance=r}},RGBQuant$1=class extends AbstractPaletteQuantizer$1{constructor(e,t=256,r=2){super(),__publicField$3(this,"_colors"),__publicField$3(this,"_initialDistance"),__publicField$3(this,"_distanceIncrement"),__publicField$3(this,"_histogram"),__publicField$3(this,"_distance"),this._distance=e,this._colors=t,this._histogram=new ColorHistogram$1(r,t),this._initialDistance=.01,this._distanceIncrement=.005}sample(e){this._histogram.sample(e)}*quantize(){const e=this._histogram.getImportanceSortedColorsIDXI32();if(0===e.length)throw new Error("No colors in image");yield*this._buildPalette(e)}*_buildPalette(e){const t=new Palette$1,r=t.getPointContainer().getPointArray(),n=new Array(e.length);for(let t=0;t<e.length;t++)r.push(Point$1.createByUint32(e[t])),n[t]=1;const i=r.length,a=[];let o=i,s=this._initialDistance;const u=new ProgressTracker$1(o-this._colors,99);for(;o>this._colors;){a.length=0;for(let e=0;e<i;e++){if(u.shouldNotify(i-o)&&(yield{progress:u.progress}),0===n[e])continue;const t=r[e];for(let u=e+1;u<i;u++){if(0===n[u])continue;const e=r[u],i=this._distance.calculateNormalized(t,e);i<s&&(a.push(new RemovedColor$1(u,e,i)),n[u]=0,o--)}}s+=o>3*this._colors?this._initialDistance:this._distanceIncrement}if(o<this._colors){stableSort$1(a,(e,t)=>t.distance-e.distance);let e=0;for(;o<this._colors&&e<a.length;)n[a[e].index]=1,o++,e++}let l=r.length;for(let e=l-1;e>=0;e--)0===n[e]&&(e!==l-1&&(r[e]=r[l-1]),--l);r.length=l,t.sort(),yield{palette:t,progress:100}}};function createArray1D$1(e){const t=[];for(let r=0;r<e;r++)t[r]=0;return t}function createArray4D$1(e,t,r,n){const i=new Array(e);for(let a=0;a<e;a++){i[a]=new Array(t);for(let e=0;e<t;e++){i[a][e]=new Array(r);for(let t=0;t<r;t++){i[a][e][t]=new Array(n);for(let r=0;r<n;r++)i[a][e][t][r]=0}}}return i}function createArray3D$1(e,t,r){const n=new Array(e);for(let i=0;i<e;i++){n[i]=new Array(t);for(let e=0;e<t;e++){n[i][e]=new Array(r);for(let t=0;t<r;t++)n[i][e][t]=0}}return n}function fillArray3D$1(e,t,r,n,i){for(let a=0;a<t;a++){e[a]=[];for(let t=0;t<r;t++){e[a][t]=[];for(let r=0;r<n;r++)e[a][t][r]=i}}}function fillArray1D$1(e,t,r){for(let n=0;n<t;n++)e[n]=r}var WuColorCube$1=class{constructor(){__publicField$3(this,"redMinimum"),__publicField$3(this,"redMaximum"),__publicField$3(this,"greenMinimum"),__publicField$3(this,"greenMaximum"),__publicField$3(this,"blueMinimum"),__publicField$3(this,"blueMaximum"),__publicField$3(this,"volume"),__publicField$3(this,"alphaMinimum"),__publicField$3(this,"alphaMaximum")}},_WuQuant$1=class extends AbstractPaletteQuantizer$1{constructor(e,t=256,r=5){super(),__publicField$3(this,"_reds"),__publicField$3(this,"_greens"),__publicField$3(this,"_blues"),__publicField$3(this,"_alphas"),__publicField$3(this,"_sums"),__publicField$3(this,"_weights"),__publicField$3(this,"_momentsRed"),__publicField$3(this,"_momentsGreen"),__publicField$3(this,"_momentsBlue"),__publicField$3(this,"_momentsAlpha"),__publicField$3(this,"_moments"),__publicField$3(this,"_table"),__publicField$3(this,"_pixels"),__publicField$3(this,"_cubes"),__publicField$3(this,"_colors"),__publicField$3(this,"_significantBitsPerChannel"),__publicField$3(this,"_maxSideIndex"),__publicField$3(this,"_alphaMaxSideIndex"),__publicField$3(this,"_sideSize"),__publicField$3(this,"_alphaSideSize"),__publicField$3(this,"_distance"),this._distance=e,this._setQuality(r),this._initialize(t)}sample(e){const t=e.getPointArray();for(let e=0,r=t.length;e<r;e++)this._addColor(t[e]);this._pixels=this._pixels.concat(t)}*quantize(){yield*this._preparePalette();const e=new Palette$1;for(let t=0;t<this._colors;t++)if(this._sums[t]>0){const r=this._sums[t],n=this._reds[t]/r,i=this._greens[t]/r,a=this._blues[t]/r,o=this._alphas[t]/r,s=Point$1.createByRGBA(0|n,0|i,0|a,0|o);e.add(s)}e.sort(),yield{palette:e,progress:100}}*_preparePalette(){yield*this._calculateMoments();let e=0;const t=createArray1D$1(this._colors);for(let r=1;r<this._colors;++r){this._cut(this._cubes[e],this._cubes[r])?(t[e]=this._cubes[e].volume>1?this._calculateVariance(this._cubes[e]):0,t[r]=this._cubes[r].volume>1?this._calculateVariance(this._cubes[r]):0):(t[e]=0,r--),e=0;let n=t[0];for(let i=1;i<=r;++i)t[i]>n&&(n=t[i],e=i);if(n<=0){this._colors=r+1;break}}const r=[],n=[],i=[],a=[];for(let e=0;e<this._colors;++e){const t=_WuQuant$1._volume(this._cubes[e],this._weights);t>0?(r[e]=_WuQuant$1._volume(this._cubes[e],this._momentsRed)/t|0,n[e]=_WuQuant$1._volume(this._cubes[e],this._momentsGreen)/t|0,i[e]=_WuQuant$1._volume(this._cubes[e],this._momentsBlue)/t|0,a[e]=_WuQuant$1._volume(this._cubes[e],this._momentsAlpha)/t|0):(r[e]=0,n[e]=0,i[e]=0,a[e]=0)}this._reds=createArray1D$1(this._colors+1),this._greens=createArray1D$1(this._colors+1),this._blues=createArray1D$1(this._colors+1),this._alphas=createArray1D$1(this._colors+1),this._sums=createArray1D$1(this._colors+1);for(let e=0,t=this._pixels.length;e<t;e++){const t=this._pixels[e];let o=-1,s=Number.MAX_VALUE;for(let e=0;e<this._colors;e++){const u=r[e],l=n[e],c=i[e],f=a[e],h=this._distance.calculateRaw(u,l,c,f,t.r,t.g,t.b,t.a);h<s&&(s=h,o=e)}this._reds[o]+=t.r,this._greens[o]+=t.g,this._blues[o]+=t.b,this._alphas[o]+=t.a,this._sums[o]++}}_addColor(e){const t=8-this._significantBitsPerChannel,r=1+(e.r>>t),n=1+(e.g>>t),i=1+(e.b>>t),a=1+(e.a>>t);this._weights[a][r][n][i]++,this._momentsRed[a][r][n][i]+=e.r,this._momentsGreen[a][r][n][i]+=e.g,this._momentsBlue[a][r][n][i]+=e.b,this._momentsAlpha[a][r][n][i]+=e.a,this._moments[a][r][n][i]+=this._table[e.r]+this._table[e.g]+this._table[e.b]+this._table[e.a]}*_calculateMoments(){const e=[],t=[],r=[],n=[],i=[],a=[],o=createArray3D$1(this._sideSize,this._sideSize,this._sideSize),s=createArray3D$1(this._sideSize,this._sideSize,this._sideSize),u=createArray3D$1(this._sideSize,this._sideSize,this._sideSize),l=createArray3D$1(this._sideSize,this._sideSize,this._sideSize),c=createArray3D$1(this._sideSize,this._sideSize,this._sideSize),f=createArray3D$1(this._sideSize,this._sideSize,this._sideSize);let h=0;const d=new ProgressTracker$1(this._alphaMaxSideIndex*this._maxSideIndex,99);for(let p=1;p<=this._alphaMaxSideIndex;++p){fillArray3D$1(o,this._sideSize,this._sideSize,this._sideSize,0),fillArray3D$1(s,this._sideSize,this._sideSize,this._sideSize,0),fillArray3D$1(u,this._sideSize,this._sideSize,this._sideSize,0),fillArray3D$1(l,this._sideSize,this._sideSize,this._sideSize,0),fillArray3D$1(c,this._sideSize,this._sideSize,this._sideSize,0),fillArray3D$1(f,this._sideSize,this._sideSize,this._sideSize,0);for(let m=1;m<=this._maxSideIndex;++m,++h){d.shouldNotify(h)&&(yield{progress:d.progress}),fillArray1D$1(e,this._sideSize,0),fillArray1D$1(t,this._sideSize,0),fillArray1D$1(r,this._sideSize,0),fillArray1D$1(n,this._sideSize,0),fillArray1D$1(i,this._sideSize,0),fillArray1D$1(a,this._sideSize,0);for(let h=1;h<=this._maxSideIndex;++h){let d=0,g=0,b=0,y=0,_=0,v=0;for(let w=1;w<=this._maxSideIndex;++w)d+=this._weights[p][m][h][w],g+=this._momentsRed[p][m][h][w],b+=this._momentsGreen[p][m][h][w],y+=this._momentsBlue[p][m][h][w],_+=this._momentsAlpha[p][m][h][w],v+=this._moments[p][m][h][w],e[w]+=d,t[w]+=g,r[w]+=b,n[w]+=y,i[w]+=_,a[w]+=v,o[m][h][w]=o[m-1][h][w]+e[w],s[m][h][w]=s[m-1][h][w]+t[w],u[m][h][w]=u[m-1][h][w]+r[w],l[m][h][w]=l[m-1][h][w]+n[w],c[m][h][w]=c[m-1][h][w]+i[w],f[m][h][w]=f[m-1][h][w]+a[w],this._weights[p][m][h][w]=this._weights[p-1][m][h][w]+o[m][h][w],this._momentsRed[p][m][h][w]=this._momentsRed[p-1][m][h][w]+s[m][h][w],this._momentsGreen[p][m][h][w]=this._momentsGreen[p-1][m][h][w]+u[m][h][w],this._momentsBlue[p][m][h][w]=this._momentsBlue[p-1][m][h][w]+l[m][h][w],this._momentsAlpha[p][m][h][w]=this._momentsAlpha[p-1][m][h][w]+c[m][h][w],this._moments[p][m][h][w]=this._moments[p-1][m][h][w]+f[m][h][w]}}}}static _volumeFloat(e,t){return t[e.alphaMaximum][e.redMaximum][e.greenMaximum][e.blueMaximum]-t[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMaximum]-t[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMaximum]+t[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMaximum]-t[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMaximum]+t[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMaximum]+t[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMaximum]-t[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMaximum]-(t[e.alphaMaximum][e.redMaximum][e.greenMaximum][e.blueMinimum]-t[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMinimum]-t[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMinimum]+t[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMinimum]-t[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMinimum]+t[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMinimum]+t[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMinimum]-t[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum])}static _volume(e,t){return 0|_WuQuant$1._volumeFloat(e,t)}static _top(e,t,r,n){let i;switch(t){case _WuQuant$1._alpha:i=n[r][e.redMaximum][e.greenMaximum][e.blueMaximum]-n[r][e.redMaximum][e.greenMinimum][e.blueMaximum]-n[r][e.redMinimum][e.greenMaximum][e.blueMaximum]+n[r][e.redMinimum][e.greenMinimum][e.blueMaximum]-(n[r][e.redMaximum][e.greenMaximum][e.blueMinimum]-n[r][e.redMaximum][e.greenMinimum][e.blueMinimum]-n[r][e.redMinimum][e.greenMaximum][e.blueMinimum]+n[r][e.redMinimum][e.greenMinimum][e.blueMinimum]);break;case _WuQuant$1._red:i=n[e.alphaMaximum][r][e.greenMaximum][e.blueMaximum]-n[e.alphaMaximum][r][e.greenMinimum][e.blueMaximum]-n[e.alphaMinimum][r][e.greenMaximum][e.blueMaximum]+n[e.alphaMinimum][r][e.greenMinimum][e.blueMaximum]-(n[e.alphaMaximum][r][e.greenMaximum][e.blueMinimum]-n[e.alphaMaximum][r][e.greenMinimum][e.blueMinimum]-n[e.alphaMinimum][r][e.greenMaximum][e.blueMinimum]+n[e.alphaMinimum][r][e.greenMinimum][e.blueMinimum]);break;case _WuQuant$1._green:i=n[e.alphaMaximum][e.redMaximum][r][e.blueMaximum]-n[e.alphaMaximum][e.redMinimum][r][e.blueMaximum]-n[e.alphaMinimum][e.redMaximum][r][e.blueMaximum]+n[e.alphaMinimum][e.redMinimum][r][e.blueMaximum]-(n[e.alphaMaximum][e.redMaximum][r][e.blueMinimum]-n[e.alphaMaximum][e.redMinimum][r][e.blueMinimum]-n[e.alphaMinimum][e.redMaximum][r][e.blueMinimum]+n[e.alphaMinimum][e.redMinimum][r][e.blueMinimum]);break;case _WuQuant$1._blue:i=n[e.alphaMaximum][e.redMaximum][e.greenMaximum][r]-n[e.alphaMaximum][e.redMaximum][e.greenMinimum][r]-n[e.alphaMaximum][e.redMinimum][e.greenMaximum][r]+n[e.alphaMaximum][e.redMinimum][e.greenMinimum][r]-(n[e.alphaMinimum][e.redMaximum][e.greenMaximum][r]-n[e.alphaMinimum][e.redMaximum][e.greenMinimum][r]-n[e.alphaMinimum][e.redMinimum][e.greenMaximum][r]+n[e.alphaMinimum][e.redMinimum][e.greenMinimum][r]);break;default:throw new Error("impossible")}return 0|i}static _bottom(e,t,r){switch(t){case _WuQuant$1._alpha:return-r[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMaximum]+r[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMaximum]+r[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMaximum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMaximum]-(-r[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMinimum]+r[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMinimum]+r[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMinimum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum]);case _WuQuant$1._red:return-r[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMaximum]+r[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMaximum]+r[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMaximum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMaximum]-(-r[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMinimum]+r[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMinimum]+r[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMinimum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum]);case _WuQuant$1._green:return-r[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMaximum]+r[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMaximum]+r[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMaximum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMaximum]-(-r[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMinimum]+r[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMinimum]+r[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMinimum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum]);case _WuQuant$1._blue:return-r[e.alphaMaximum][e.redMaximum][e.greenMaximum][e.blueMinimum]+r[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMinimum]+r[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMinimum]-r[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMinimum]-(-r[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMinimum]+r[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMinimum]+r[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMinimum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum]);default:return 0}}_calculateVariance(e){const t=_WuQuant$1._volume(e,this._momentsRed),r=_WuQuant$1._volume(e,this._momentsGreen),n=_WuQuant$1._volume(e,this._momentsBlue),i=_WuQuant$1._volume(e,this._momentsAlpha);return _WuQuant$1._volumeFloat(e,this._moments)-(t*t+r*r+n*n+i*i)/_WuQuant$1._volume(e,this._weights)}_maximize(e,t,r,n,i,a,o,s,u){const l=0|_WuQuant$1._bottom(e,t,this._momentsRed),c=0|_WuQuant$1._bottom(e,t,this._momentsGreen),f=0|_WuQuant$1._bottom(e,t,this._momentsBlue),h=0|_WuQuant$1._bottom(e,t,this._momentsAlpha),d=0|_WuQuant$1._bottom(e,t,this._weights);let p=0,m=-1;for(let g=r;g<n;++g){let r=l+_WuQuant$1._top(e,t,g,this._momentsRed),n=c+_WuQuant$1._top(e,t,g,this._momentsGreen),b=f+_WuQuant$1._top(e,t,g,this._momentsBlue),y=h+_WuQuant$1._top(e,t,g,this._momentsAlpha),_=d+_WuQuant$1._top(e,t,g,this._weights);if(0!==_){let e=r*r+n*n+b*b+y*y,t=e/_;r=i-r,n=a-n,b=o-b,y=s-y,_=u-_,0!==_&&(e=r*r+n*n+b*b+y*y,t+=e/_,t>p&&(p=t,m=g))}}return{max:p,position:m}}_cut(e,t){let r;const n=_WuQuant$1._volume(e,this._momentsRed),i=_WuQuant$1._volume(e,this._momentsGreen),a=_WuQuant$1._volume(e,this._momentsBlue),o=_WuQuant$1._volume(e,this._momentsAlpha),s=_WuQuant$1._volume(e,this._weights),u=this._maximize(e,_WuQuant$1._red,e.redMinimum+1,e.redMaximum,n,i,a,o,s),l=this._maximize(e,_WuQuant$1._green,e.greenMinimum+1,e.greenMaximum,n,i,a,o,s),c=this._maximize(e,_WuQuant$1._blue,e.blueMinimum+1,e.blueMaximum,n,i,a,o,s),f=this._maximize(e,_WuQuant$1._alpha,e.alphaMinimum+1,e.alphaMaximum,n,i,a,o,s);if(f.max>=u.max&&f.max>=l.max&&f.max>=c.max){if(r=_WuQuant$1._alpha,f.position<0)return!1}else r=u.max>=f.max&&u.max>=l.max&&u.max>=c.max?_WuQuant$1._red:l.max>=f.max&&l.max>=u.max&&l.max>=c.max?_WuQuant$1._green:_WuQuant$1._blue;switch(t.redMaximum=e.redMaximum,t.greenMaximum=e.greenMaximum,t.blueMaximum=e.blueMaximum,t.alphaMaximum=e.alphaMaximum,r){case _WuQuant$1._red:t.redMinimum=e.redMaximum=u.position,t.greenMinimum=e.greenMinimum,t.blueMinimum=e.blueMinimum,t.alphaMinimum=e.alphaMinimum;break;case _WuQuant$1._green:t.greenMinimum=e.greenMaximum=l.position,t.redMinimum=e.redMinimum,t.blueMinimum=e.blueMinimum,t.alphaMinimum=e.alphaMinimum;break;case _WuQuant$1._blue:t.blueMinimum=e.blueMaximum=c.position,t.redMinimum=e.redMinimum,t.greenMinimum=e.greenMinimum,t.alphaMinimum=e.alphaMinimum;break;case _WuQuant$1._alpha:t.alphaMinimum=e.alphaMaximum=f.position,t.blueMinimum=e.blueMinimum,t.redMinimum=e.redMinimum,t.greenMinimum=e.greenMinimum}return e.volume=(e.redMaximum-e.redMinimum)*(e.greenMaximum-e.greenMinimum)*(e.blueMaximum-e.blueMinimum)*(e.alphaMaximum-e.alphaMinimum),t.volume=(t.redMaximum-t.redMinimum)*(t.greenMaximum-t.greenMinimum)*(t.blueMaximum-t.blueMinimum)*(t.alphaMaximum-t.alphaMinimum),!0}_initialize(e){this._colors=e,this._cubes=[];for(let t=0;t<e;t++)this._cubes[t]=new WuColorCube$1;this._cubes[0].redMinimum=0,this._cubes[0].greenMinimum=0,this._cubes[0].blueMinimum=0,this._cubes[0].alphaMinimum=0,this._cubes[0].redMaximum=this._maxSideIndex,this._cubes[0].greenMaximum=this._maxSideIndex,this._cubes[0].blueMaximum=this._maxSideIndex,this._cubes[0].alphaMaximum=this._alphaMaxSideIndex,this._weights=createArray4D$1(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._momentsRed=createArray4D$1(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._momentsGreen=createArray4D$1(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._momentsBlue=createArray4D$1(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._momentsAlpha=createArray4D$1(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._moments=createArray4D$1(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._table=[];for(let e=0;e<256;++e)this._table[e]=e*e;this._pixels=[]}_setQuality(e=5){this._significantBitsPerChannel=e,this._maxSideIndex=1<<this._significantBitsPerChannel,this._alphaMaxSideIndex=this._maxSideIndex,this._sideSize=this._maxSideIndex+1,this._alphaSideSize=this._alphaMaxSideIndex+1}},WuQuant$1=_WuQuant$1;__publicField$3(WuQuant$1,"_alpha",3),__publicField$3(WuQuant$1,"_red",2),__publicField$3(WuQuant$1,"_green",1),__publicField$3(WuQuant$1,"_blue",0);var image_exports$1={};__export$1(image_exports$1,{AbstractImageQuantizer:()=>AbstractImageQuantizer$1,ErrorDiffusionArray:()=>ErrorDiffusionArray$1,ErrorDiffusionArrayKernel:()=>ErrorDiffusionArrayKernel$1,ErrorDiffusionRiemersma:()=>ErrorDiffusionRiemersma$1,NearestColor:()=>NearestColor$1});var AbstractImageQuantizer$1=class{quantizeSync(e,t){for(const r of this.quantize(e,t))if(r.pointContainer)return r.pointContainer;throw new Error("unreachable")}},NearestColor$1=class extends AbstractImageQuantizer$1{constructor(e){super(),__publicField$3(this,"_distance"),this._distance=e}*quantize(e,t){const r=e.getPointArray(),n=e.getWidth(),i=e.getHeight(),a=new ProgressTracker$1(i,99);for(let e=0;e<i;e++){a.shouldNotify(e)&&(yield{progress:a.progress});for(let i=0,a=e*n;i<n;i++,a++){const e=r[a];e.from(t.getNearestColor(this._distance,e))}}yield{pointContainer:e,progress:100}}},ErrorDiffusionArrayKernel$1=(e=>(e[e.FloydSteinberg=0]="FloydSteinberg",e[e.FalseFloydSteinberg=1]="FalseFloydSteinberg",e[e.Stucki=2]="Stucki",e[e.Atkinson=3]="Atkinson",e[e.Jarvis=4]="Jarvis",e[e.Burkes=5]="Burkes",e[e.Sierra=6]="Sierra",e[e.TwoSierra=7]="TwoSierra",e[e.SierraLite=8]="SierraLite",e))(ErrorDiffusionArrayKernel$1||{}),ErrorDiffusionArray$1=class extends AbstractImageQuantizer$1{constructor(e,t,r=!0,n=0,i=!1){super(),__publicField$3(this,"_minColorDistance"),__publicField$3(this,"_serpentine"),__publicField$3(this,"_kernel"),__publicField$3(this,"_calculateErrorLikeGIMP"),__publicField$3(this,"_distance"),this._setKernel(t),this._distance=e,this._minColorDistance=n,this._serpentine=r,this._calculateErrorLikeGIMP=i}*quantize(e,t){const r=e.getPointArray(),n=new Point$1,i=e.getWidth(),a=e.getHeight(),o=[];let s=1,u=1;for(const e of this._kernel){const t=e[2]+1;u<t&&(u=t)}for(let e=0;e<u;e++)this._fillErrorLine(o[e]=[],i);const l=new ProgressTracker$1(a,99);for(let e=0;e<a;e++){l.shouldNotify(e)&&(yield{progress:l.progress}),this._serpentine&&(s*=-1);const u=e*i,c=1===s?0:i-1,f=1===s?i:-1;this._fillErrorLine(o[0],i),o.push(o.shift());const h=o[0];for(let l=c,d=u+c;l!==f;l+=s,d+=s){const u=r[d],c=h[l];n.from(u);const f=Point$1.createByRGBA(inRange0to255Rounded$1(u.r+c[0]),inRange0to255Rounded$1(u.g+c[1]),inRange0to255Rounded$1(u.b+c[2]),inRange0to255Rounded$1(u.a+c[3])),p=t.getNearestColor(this._distance,f);if(u.from(p),this._minColorDistance&&this._distance.calculateNormalized(n,p)<this._minColorDistance)continue;let m,g,b,y;this._calculateErrorLikeGIMP?(m=f.r-p.r,g=f.g-p.g,b=f.b-p.b,y=f.a-p.a):(m=n.r-p.r,g=n.g-p.g,b=n.b-p.b,y=n.a-p.a);const _=1===s?0:this._kernel.length-1,v=1===s?this._kernel.length:-1;for(let t=_;t!==v;t+=s){const r=this._kernel[t][1]*s,n=this._kernel[t][2];if(r+l>=0&&r+l<i&&n+e>=0&&n+e<a){const e=this._kernel[t][0],i=o[n][r+l];i[0]+=m*e,i[1]+=g*e,i[2]+=b*e,i[3]+=y*e}}}}yield{pointContainer:e,progress:100}}_fillErrorLine(e,t){e.length>t&&(e.length=t);const r=e.length;for(let t=0;t<r;t++){const r=e[t];r[0]=r[1]=r[2]=r[3]=0}for(let n=r;n<t;n++)e[n]=[0,0,0,0]}_setKernel(e){switch(e){case 0:this._kernel=[[7/16,1,0],[3/16,-1,1],[5/16,0,1],[1/16,1,1]];break;case 1:this._kernel=[[3/8,1,0],[3/8,0,1],[2/8,1,1]];break;case 2:this._kernel=[[8/42,1,0],[4/42,2,0],[2/42,-2,1],[4/42,-1,1],[8/42,0,1],[4/42,1,1],[2/42,2,1],[1/42,-2,2],[2/42,-1,2],[4/42,0,2],[2/42,1,2],[1/42,2,2]];break;case 3:this._kernel=[[1/8,1,0],[1/8,2,0],[1/8,-1,1],[1/8,0,1],[1/8,1,1],[1/8,0,2]];break;case 4:this._kernel=[[7/48,1,0],[5/48,2,0],[3/48,-2,1],[5/48,-1,1],[7/48,0,1],[5/48,1,1],[3/48,2,1],[1/48,-2,2],[3/48,-1,2],[5/48,0,2],[3/48,1,2],[1/48,2,2]];break;case 5:this._kernel=[[.25,1,0],[4/32,2,0],[2/32,-2,1],[4/32,-1,1],[.25,0,1],[4/32,1,1],[2/32,2,1]];break;case 6:this._kernel=[[5/32,1,0],[3/32,2,0],[2/32,-2,1],[4/32,-1,1],[5/32,0,1],[4/32,1,1],[2/32,2,1],[2/32,-1,2],[3/32,0,2],[2/32,1,2]];break;case 7:this._kernel=[[.25,1,0],[3/16,2,0],[1/16,-2,1],[2/16,-1,1],[3/16,0,1],[2/16,1,1],[1/16,2,1]];break;case 8:this._kernel=[[.5,1,0],[1/4,-1,1],[1/4,0,1]];break;default:throw new Error(`ErrorDiffusionArray: unknown kernel = ${e}`)}}};function*hilbertCurve$1(e,t,r){const n=Math.max(e,t),i={width:e,height:t,level:Math.floor(Math.log(n)/Math.log(2)+1),callback:r,tracker:new ProgressTracker$1(e*t,99),index:0,x:0,y:0};yield*walkHilbert$1(i,1),visit$1(i,0)}function*walkHilbert$1(e,t){if(!(e.level<1)){switch(e.tracker.shouldNotify(e.index)&&(yield{progress:e.tracker.progress}),e.level--,t){case 2:yield*walkHilbert$1(e,1),visit$1(e,3),yield*walkHilbert$1(e,2),visit$1(e,4),yield*walkHilbert$1(e,2),visit$1(e,2),yield*walkHilbert$1(e,4);break;case 3:yield*walkHilbert$1(e,4),visit$1(e,2),yield*walkHilbert$1(e,3),visit$1(e,1),yield*walkHilbert$1(e,3),visit$1(e,3),yield*walkHilbert$1(e,1);break;case 1:yield*walkHilbert$1(e,2),visit$1(e,4),yield*walkHilbert$1(e,1),visit$1(e,3),yield*walkHilbert$1(e,1),visit$1(e,1),yield*walkHilbert$1(e,3);break;case 4:yield*walkHilbert$1(e,3),visit$1(e,1),yield*walkHilbert$1(e,4),visit$1(e,2),yield*walkHilbert$1(e,4),visit$1(e,4),yield*walkHilbert$1(e,2)}e.level++}}function visit$1(e,t){switch(e.x>=0&&e.x<e.width&&e.y>=0&&e.y<e.height&&(e.callback(e.x,e.y),e.index++),t){case 2:e.x--;break;case 3:e.x++;break;case 1:e.y--;break;case 4:e.y++}}var ErrorDiffusionRiemersma$1=class extends AbstractImageQuantizer$1{constructor(e,t=16,r=1){super(),__publicField$3(this,"_distance"),__publicField$3(this,"_weights"),__publicField$3(this,"_errorQueueSize"),this._distance=e,this._errorQueueSize=t,this._weights=ErrorDiffusionRiemersma$1._createWeights(r,t)}*quantize(e,t){const r=e.getPointArray(),n=e.getWidth(),i=e.getHeight(),a=[];let o=0;for(let e=0;e<this._errorQueueSize;e++)a[e]={r:0,g:0,b:0,a:0};yield*hilbertCurve$1(n,i,(e,i)=>{const s=r[e+i*n];let{r:u,g:l,b:c,a:f}=s;for(let e=0;e<this._errorQueueSize;e++){const t=this._weights[e],r=a[(e+o)%this._errorQueueSize];u+=r.r*t,l+=r.g*t,c+=r.b*t,f+=r.a*t}const h=Point$1.createByRGBA(inRange0to255Rounded$1(u),inRange0to255Rounded$1(l),inRange0to255Rounded$1(c),inRange0to255Rounded$1(f)),d=t.getNearestColor(this._distance,h);o=(o+1)%this._errorQueueSize;const p=(o+this._errorQueueSize-1)%this._errorQueueSize;a[p].r=s.r-d.r,a[p].g=s.g-d.g,a[p].b=s.b-d.b,a[p].a=s.a-d.a,s.from(d)}),yield{pointContainer:e,progress:100}}static _createWeights(e,t){const r=[],n=Math.exp(Math.log(t)/(t-1));for(let i=0,a=1;i<t;i++)r[i]=(a+.5|0)/t*e,a*=n;return r}},quality_exports$1={};__export$1(quality_exports$1,{ssim:()=>ssim$1});var K1$1=.01,K2$1=.03;function ssim$1(e,t){if(e.getHeight()!==t.getHeight()||e.getWidth()!==t.getWidth())throw new Error("Images have different sizes!");const r=(255*K1$1)**2,n=(255*K2$1)**2;let i=0,a=0;return iterate$1(e,t,(e,t,o,s)=>{let u=0,l=0,c=0;for(let r=0;r<e.length;r++)l+=(e[r]-o)**2,c+=(t[r]-s)**2,u+=(e[r]-o)*(t[r]-s);const f=e.length-1;l/=f,c/=f,u/=f,a+=(2*o*s+r)*(2*u+n)/((o**2+s**2+r)*(l+c+n)),i++}),a/i}function iterate$1(e,t,r){const n=e.getWidth(),i=e.getHeight();for(let a=0;a<i;a+=8)for(let o=0;o<n;o+=8){const s=Math.min(8,n-o),u=Math.min(8,i-a),l=calculateLumaValuesForWindow$1(e,o,a,s,u),c=calculateLumaValuesForWindow$1(t,o,a,s,u);r(l,c,calculateAverageLuma$1(l),calculateAverageLuma$1(c))}}function calculateLumaValuesForWindow$1(e,t,r,n,i){const a=e.getPointArray(),o=[];let s=0;for(let u=r;u<r+i;u++){const r=u*e.getWidth();for(let e=t;e<t+n;e++){const t=a[r+e];o[s]=.2126*t.r+.7152*t.g+.0722*t.b,s++}}return o}function calculateAverageLuma$1(e){let t=0;for(const r of e)t+=r;return t/e.length}var setImmediateImpl="function"==typeof setImmediate?setImmediate:void 0!==process&&"function"==typeof(null==process?void 0:process.nextTick)?e=>process.nextTick(e):e=>setTimeout(e,0);function buildPaletteSync$1(e,{colorDistanceFormula:t,paletteQuantization:r,colors:n}={}){const i=paletteQuantizationToPaletteQuantizer$1(colorDistanceFormulaToColorDistance$1(t),r,n);return e.forEach(e=>i.sample(e)),i.quantizeSync()}async function buildPalette(e,{colorDistanceFormula:t,paletteQuantization:r,colors:n,onProgress:i}={}){return new Promise((a,o)=>{const s=paletteQuantizationToPaletteQuantizer$1(colorDistanceFormulaToColorDistance$1(t),r,n);let u;e.forEach(e=>s.sample(e));const l=s.quantize(),c=()=>{try{const e=l.next();e.done?a(u):(e.value.palette&&(u=e.value.palette),i&&i(e.value.progress),setImmediateImpl(c))}catch(e){o(e)}};setImmediateImpl(c)})}function applyPaletteSync$1(e,t,{colorDistanceFormula:r,imageQuantization:n}={}){return imageQuantizationToImageQuantizer$1(colorDistanceFormulaToColorDistance$1(r),n).quantizeSync(e,t)}async function applyPalette(e,t,{colorDistanceFormula:r,imageQuantization:n,onProgress:i}={}){return new Promise((a,o)=>{let s;const u=imageQuantizationToImageQuantizer$1(colorDistanceFormulaToColorDistance$1(r),n).quantize(e,t),l=()=>{try{const e=u.next();e.done?a(s):(e.value.pointContainer&&(s=e.value.pointContainer),i&&i(e.value.progress),setImmediateImpl(l))}catch(e){o(e)}};setImmediateImpl(l)})}function colorDistanceFormulaToColorDistance$1(e="euclidean-bt709"){switch(e){case"cie94-graphic-arts":return new CIE94GraphicArts$1;case"cie94-textiles":return new CIE94Textiles$1;case"ciede2000":return new CIEDE2000$1;case"color-metric":return new CMetric$1;case"euclidean":return new Euclidean$1;case"euclidean-bt709":return new EuclideanBT709$1;case"euclidean-bt709-noalpha":return new EuclideanBT709NoAlpha$1;case"manhattan":return new Manhattan$1;case"manhattan-bt709":return new ManhattanBT709$1;case"manhattan-nommyde":return new ManhattanNommyde$1;case"pngquant":return new PNGQuant$1;default:throw new Error(`Unknown colorDistanceFormula ${e}`)}}function imageQuantizationToImageQuantizer$1(e,t="floyd-steinberg"){switch(t){case"nearest":return new NearestColor$1(e);case"riemersma":return new ErrorDiffusionRiemersma$1(e);case"floyd-steinberg":return new ErrorDiffusionArray$1(e,0);case"false-floyd-steinberg":return new ErrorDiffusionArray$1(e,1);case"stucki":return new ErrorDiffusionArray$1(e,2);case"atkinson":return new ErrorDiffusionArray$1(e,3);case"jarvis":return new ErrorDiffusionArray$1(e,4);case"burkes":return new ErrorDiffusionArray$1(e,5);case"sierra":return new ErrorDiffusionArray$1(e,6);case"two-sierra":return new ErrorDiffusionArray$1(e,7);case"sierra-lite":return new ErrorDiffusionArray$1(e,8);default:throw new Error(`Unknown imageQuantization ${t}`)}}function paletteQuantizationToPaletteQuantizer$1(e,t="wuquant",r=256){switch(t){case"neuquant":return new NeuQuant$1(e,r);case"rgbquant":return new RGBQuant$1(e,r);case"wuquant":return new WuQuant$1(e,r);case"neuquant-float":return new NeuQuantFloat$1(e,r);default:throw new Error(`Unknown paletteQuantization ${t}`)}}var imageQ=__toCommonJS(src_exports),gifframe={};const BitmapImage$1=bitmapimage;let GifFrame$1=class e extends BitmapImage$1{constructor(...t){if(super(...t),t[0]instanceof e){const e=t[0];this.xOffset=e.xOffset,this.yOffset=e.yOffset,this.disposalMethod=e.disposalMethod,this.delayCentisecs=e.delayCentisecs,this.interlaced=e.interlaced}else{const r=t[t.length-1];let n={};"object"!=typeof r||r instanceof BitmapImage$1||(n=r),this.xOffset=n.xOffset||0,this.yOffset=n.yOffset||0,this.disposalMethod=void 0!==n.disposalMethod?n.disposalMethod:e.DisposeToBackgroundColor,this.delayCentisecs=n.delayCentisecs||8,this.interlaced=n.interlaced||!1}}getPalette(){const e=new Set,t=this.bitmap.data;let r=0,n=!1;for(;r<t.length;){if(0===t[r+3])n=!0;else{const n=t.readUInt32BE(r,!0)>>8&16777215;e.add(n)}r+=4}const i=new Array(e.size),a=e.values();for(r=0;r<i.length;++r)i[r]=a.next().value;i.sort((e,t)=>e-t);let o=i.length;return n&&++o,{colors:i,usesTransparency:n,indexCount:o}}};var hasRequiredGifutil,hasRequiredGifcodec;function requireGifutil(){return hasRequiredGifutil||(hasRequiredGifutil=1,function(e){const t=require$$0,r=imageQ,n=bitmapimage,{GifFrame:i}=gifframe,{GifError:a}=gif$1,{GifCodec:o}=requireGifcodec(),s=[".jpg",".jpeg",".png",".bmp"],u=new o;function l(e,t,n,i,a){const o=Array.isArray(e)?e:[e];if(a){if(["FloydSteinberg","FalseFloydSteinberg","Stucki","Atkinson","Jarvis","Burkes","Sierra","TwoSierra","SierraLite"].indexOf(a.ditherAlgorithm)<0)throw new Error(`Invalid ditherAlgorithm '${a.ditherAlgorithm}'`);void 0===a.serpentine&&(a.serpentine=!0),void 0===a.minimumColorDistanceToDither&&(a.minimumColorDistanceToDither=0),void 0===a.calculateErrorLikeGIMP&&(a.calculateErrorLikeGIMP=!1)}const s=new r.distance.Euclidean,u=new r.palette[t](s,n,i);let l;l=a?new r.image.ErrorDiffusionArray(s,r.image.ErrorDiffusionArrayKernel[a.ditherAlgorithm],a.serpentine,a.minimumColorDistanceToDither,a.calculateErrorLikeGIMP):new r.image.NearestColor(s);const c=[];o.forEach(e=>{const t=e.bitmap.data,n=new ArrayBuffer(t.length),i=new Uint32Array(n);for(let e=0,r=0;e<t.length;e+=4,++r)i[r]=t.readUInt32LE(e,!0);const a=r.utils.PointContainer.fromUint32Array(i,e.bitmap.width,e.bitmap.height);u.sample(a),c.push(a)});const f=u.quantizeSync();for(let e=0;e<o.length;++e){const t=o[e].bitmap.data,r=l.quantizeSync(c[e],f).toUint32Array();for(let e=0,n=0;e<t.length;e+=4,++n)t.writeUInt32LE(r[n],e)}}e.cloneFrames=function(e){let t=[];return e.forEach(e=>{t.push(new i(e))}),t},e.getColorInfo=function(e,t){let r=!1;const n=[];for(let t=0;t<e.length;++t){let i=e[t].getPalette();if(i.usesTransparency&&(r=!0),i.indexCount>256)throw new a(`Frame ${t} uses more than 256 color indexes`);n.push(i)}if(0===t)return{usesTransparency:r,palettes:n};const i=new Set;n.forEach(e=>{e.colors.forEach(e=>{i.add(e)})});let o=i.size;if(r&&++o,t&&o>t)return{usesTransparency:r,palettes:n};const s=new Array(i.size),u=i.values();for(let e=0;e<s.length;++e)s[e]=u.next().value;return s.sort((e,t)=>e-t),{colors:s,indexCount:o,usesTransparency:r,palettes:n}},e.copyAsJimp=function(t,r){return e.shareAsJimp(t,new n(r))},e.getMaxDimensions=function(e){let t=0,r=0;return e.forEach(e=>{const n=e.xOffset+e.bitmap.width;n>t&&(t=n);const i=e.yOffset+e.bitmap.height;i>r&&(r=i)}),{maxWidth:t,maxHeight:r}},e.quantizeDekker=function(e,t,r){l(e,"NeuQuantFloat",t=t||256,0,r)},e.quantizeSorokin=function(e,t,r,n){let i;switch(t=t||256,r=r||"min-pop"){case"min-pop":i=2;break;case"top-pop":i=1;break;default:throw new Error(`Invalid quantizeSorokin histogram '${r}'`)}l(e,"RGBQuant",t,i,n)},e.quantizeWu=function(e,t,r,n){if(t=t||256,(r=r||5)<1||r>8)throw new Error("Invalid quantization quality");l(e,"WuQuant",t,r,n)},e.read=function(e,r){return r=r||u,Buffer.isBuffer(e)?r.decodeGif(e):function(e){return new Promise((r,n)=>{t.readFile(e,(e,t)=>e?n(e):r(t))})}(e).then(e=>r.decodeGif(e))},e.shareAsJimp=function(e,t){const r=new e(t.bitmap.width,t.bitmap.height,0);return r.bitmap.data=t.bitmap.data,r},e.write=function(e,r,n,i){i=i||u;const a=e.match(/\.[a-zA-Z]+$/);if(null!==a&&s.includes(a[0].toLowerCase()))throw new Error(`GIF '${e}' has an unexpected suffix`);return i.encodeGif(r,n).then(r=>function(e,r){return new Promise((n,i)=>{t.writeFile(e,r,e=>e?i(e):n())})}(e,r.buffer).then(()=>r))}}(gifutil)),gifutil}function requireGifcodec(){if(hasRequiredGifcodec)return gifcodec;hasRequiredGifcodec=1;const e=omggif,{Gif:t,GifError:r}=gif$1;function n(){const e=requireGifutil();return n=function(){return e},e}const{GifFrame:i}=gifframe;function a(e,t){const r=e.indexOf(t);return-1===r?null:r}function o(e,t){for(var r,n=0,i=e.length-1;n<=i;)if(e[r=Math.floor((n+i)/2)]>t)i=r-1;else{if(!(e[r]<t))return r;n=r+1}return null}function s(e){const t=e.colors;e.usesTransparency&&t.push(0);const r=t.length;let n=2;for(;r>n;)n<<=1;t.length=n,t.fill(0,r)}function u(e,t){let r=e.bitmap.width*e.bitmap.height;return r=Math.ceil(r*t/8),r+=Math.ceil(r/255),100+r+768}function l(e){let t=e.indexCount,r=0;for(--t;t;)++r,t>>=1;return r>0?r:1}function c(e,t,n,i,u){if(n.interlaced)throw new r("writing interlaced GIFs is not supported");const l=function(e,t,n){const i=n.colors,s=i.length<=8?a:o,u=t.bitmap.data,l=new Buffer(u.length/4);let c=i.length,f=0,h=0;for(;f<u.length;){if(0!==u[f+3]){const e=u.readUInt32BE(f,!0)>>8&16777215;l[h]=s(i,e)}else l[h]=c;f+=4,++h}if(n.usesTransparency){if(256===c)throw new r(`Frame ${e} already has 256 colorsand so can't use transparency`)}else c=null;return{buffer:l,transparentIndex:c}}(t,n,i),c={delay:n.delayCentisecs,disposal:n.disposalMethod,transparent:l.transparentIndex};u&&(s(i),c.palette=i.colors);try{let t,r=e.getOutputBuffer(),i=e.getOutputBufferPosition(),a=!0;for(;a;)if(t=e.addFrame(n.xOffset,n.yOffset,n.bitmap.width,n.bitmap.height,l.buffer,c),a=!1,t>=r.length-1){const t=new Buffer(1.5*r.length);r.copy(t),e.setOutputBuffer(t),e.setOutputBufferPosition(i),r=t,a=!0}return r}catch(e){throw new r(e)}}return gifcodec.GifCodec=class{constructor(e={}){this._transparentRGB=null,"number"==typeof e.transparentRGB&&0!==e.transparentRGB&&(this._transparentRGBA=256*e.transparentRGB),this._testInitialBufferSize=0}decodeGif(n){try{let i;try{i=new e.GifReader(n)}catch(e){throw new r(e)}const a=i.numFrames(),o=[],s={width:i.width,height:i.height,loops:i.loopCount(),usesTransparency:!1};for(let e=0;e<a;++e){const t=this._decodeFrame(i,e,s.usesTransparency);o.push(t.frame),t.usesTransparency&&(s.usesTransparency=!0)}return Promise.resolve(new t(n,o,s))}catch(e){return Promise.reject(e)}}encodeGif(e,i={}){try{if(null===e||0===e.length)throw new r("there are no frames");const a=n().getMaxDimensions(e);return(i=Object.assign({},i)).width=a.maxWidth,i.height=a.maxHeight,void 0===i.loops&&(i.loops=0),i.colorScope=i.colorScope||t.GlobalColorsPreferred,Promise.resolve(this._encodeGif(e,i))}catch(e){return Promise.reject(e)}}_decodeFrame(e,t,n){let a,o;try{if(a=e.frameInfo(t),o=new Buffer(e.width*e.height*4),e.decodeAndBlitFrameRGBA(t,o),a.width!==e.width||a.height!==e.height){if(a.y&&(o=o.slice(a.y*e.width*4)),e.width>a.width)for(let t=0;t<a.height;++t)o.copy(o,t*a.width*4,4*(a.x+t*e.width),4*(a.x+t*e.width)+4*a.width);o=o.slice(0,a.width*a.height*4)}}catch(e){throw new r(e)}let s=!1;if(null===this._transparentRGBA){if(!n)for(let e=3;e<o.length;e+=4)0===o[e]&&(s=!0,e=o.length)}else for(let e=3;e<o.length;e+=4)0===o[e]&&(o.writeUInt32BE(this._transparentRGBA,e-3),s=!0);return{frame:new i(a.width,a.height,o,{xOffset:a.x,yOffset:a.y,disposalMethod:a.disposal,interlaced:a.interlaced,delayCentisecs:a.delay}),usesTransparency:s}}_encodeGif(i,a){let o;if(a.colorScope===t.LocalColorsOnly)o=n().getColorInfo(i,0);else if(o=n().getColorInfo(i,256),!o.colors){if(a.colorScope===t.GlobalColorsOnly)throw new r("Too many color indexes for global color table");a.colorScope=t.LocalColorsOnly}a.usesTransparency=o.usesTransparency;const u=o.palettes;return a.colorScope===t.LocalColorsOnly?function(n,i,a,o){const s={loop:i.loops};let u,l=new Buffer(2e3);try{u=new e.GifWriter(l,i.width,i.height,s)}catch(e){throw new r(e)}for(let e=0;e<n.length;++e)l=c(u,e,n[e],o[e],!0);return new t(l.slice(0,u.end()),n,i)}(i,a,0,u):function(n,i,a,o){const u={colors:o.colors.slice(),usesTransparency:o.usesTransparency};s(u);const l={palette:u.colors,loop:i.loops};let f,h=new Buffer(2e3);try{f=new e.GifWriter(h,i.width,i.height,l)}catch(e){throw new r(e)}for(let e=0;e<n.length;++e)h=c(f,e,n[e],o,!1);return new t(h.slice(0,f.end()),n,i)}(i,a,0,o)}_getSizeEstimateGlobal(e,t){if(this._testInitialBufferSize>0)return this._testInitialBufferSize;let r=968;const n=l(e);return t.forEach(e=>{r+=u(e,n)}),r}_getSizeEstimateLocal(e,t){if(this._testInitialBufferSize>0)return this._testInitialBufferSize;let r=200;for(let n=0;n<t.length;++n){const i=l(e[n]);r+=u(t[n],i)}return r}},gifcodec}GifFrame$1.DisposeToAnything=0,GifFrame$1.DisposeNothing=1,GifFrame$1.DisposeToBackgroundColor=2,GifFrame$1.DisposeToPrevious=3,gifframe.GifFrame=GifFrame$1;const BitmapImage=bitmapimage,{Gif,GifError:GifError$1}=gif$1,{GifCodec}=requireGifcodec(),{GifFrame}=gifframe,GifUtil=requireGifutil();var src={BitmapImage,Gif,GifCodec,GifFrame,GifUtil,GifError:GifError$1};function gif(){return{mime:"image/gif",encode:async e=>{const t=new src.BitmapImage(e);src.GifUtil.quantizeDekker(t,256);const r=new src.GifFrame(e),n=new src.GifCodec;return(await n.encodeGif([r],{})).buffer},decode:e=>{const t=new omggif.GifReader(e),r=Buffer.alloc(t.width*t.height*4);return t.decodeAndBlitFrameRGBA(0,r),{data:r,width:t.width,height:t.height}}}}var encoder={exports:{}};!function(e){function t(e){var t,r,n,i,a,o=Math.floor,s=new Array(64),u=new Array(64),l=new Array(64),c=new Array(64),f=new Array(65535),h=new Array(65535),d=new Array(64),p=new Array(64),m=[],g=0,b=7,y=new Array(64),_=new Array(64),v=new Array(64),w=new Array(256),x=new Array(2048),k=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],B=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],E=[0,1,2,3,4,5,6,7,8,9,10,11],S=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],A=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],C=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],I=[0,1,2,3,4,5,6,7,8,9,10,11],P=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],T=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function M(e,t){for(var r=0,n=0,i=new Array,a=1;a<=16;a++){for(var o=1;o<=e[a];o++)i[t[n]]=[],i[t[n]][0]=r,i[t[n]][1]=a,n++,r++;r*=2}return i}function R(e){for(var t=e[0],r=e[1]-1;r>=0;)t&1<<r&&(g|=1<<b),r--,--b<0&&(255==g?(F(255),F(0)):F(g),b=7,g=0)}function F(e){m.push(e)}function O(e){F(e>>8&255),F(255&e)}function N(e,t,r,n,i){for(var a,o=i[0],s=i[240],u=function(e,t){var r,n,i,a,o,s,u,l,c,f,h=0;for(c=0;c<8;++c){r=e[h],n=e[h+1],i=e[h+2],a=e[h+3],o=e[h+4],s=e[h+5],u=e[h+6];var p=r+(l=e[h+7]),m=r-l,g=n+u,b=n-u,y=i+s,_=i-s,v=a+o,w=a-o,x=p+v,k=p-v,B=g+y,E=g-y;e[h]=x+B,e[h+4]=x-B;var S=.707106781*(E+k);e[h+2]=k+S,e[h+6]=k-S;var A=.382683433*((x=w+_)-(E=b+m)),C=.5411961*x+A,I=1.306562965*E+A,P=.707106781*(B=_+b),T=m+P,M=m-P;e[h+5]=M+C,e[h+3]=M-C,e[h+1]=T+I,e[h+7]=T-I,h+=8}for(h=0,c=0;c<8;++c){r=e[h],n=e[h+8],i=e[h+16],a=e[h+24],o=e[h+32],s=e[h+40],u=e[h+48];var R=r+(l=e[h+56]),F=r-l,O=n+u,N=n-u,L=i+s,D=i-s,z=a+o,U=a-o,$=R+z,j=R-z,Z=O+L,G=O-L;e[h]=$+Z,e[h+32]=$-Z;var W=.707106781*(G+j);e[h+16]=j+W,e[h+48]=j-W;var H=.382683433*(($=U+D)-(G=N+F)),q=.5411961*$+H,Q=1.306562965*G+H,V=.707106781*(Z=D+N),Y=F+V,K=F-V;e[h+40]=K+q,e[h+24]=K-q,e[h+8]=Y+Q,e[h+56]=Y-Q,h++}for(c=0;c<64;++c)f=e[c]*t[c],d[c]=f>0?f+.5|0:f-.5|0;return d}(e,t),l=0;l<64;++l)p[k[l]]=u[l];var c=p[0]-r;r=p[0],0==c?R(n[0]):(R(n[h[a=32767+c]]),R(f[a]));for(var m=63;m>0&&0==p[m];m--);if(0==m)return R(o),r;for(var g,b=1;b<=m;){for(var y=b;0==p[b]&&b<=m;++b);var _=b-y;if(_>=16){g=_>>4;for(var v=1;v<=g;++v)R(s);_&=15}a=32767+p[b],R(i[(_<<4)+h[a]]),R(f[a]),b++}return 63!=m&&R(o),r}function L(e){e<=0&&(e=1),e>100&&(e=100),a!=e&&(function(e){for(var t=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],r=0;r<64;r++){var n=o((t[r]*e+50)/100);n<1?n=1:n>255&&(n=255),s[k[r]]=n}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],a=0;a<64;a++){var f=o((i[a]*e+50)/100);f<1?f=1:f>255&&(f=255),u[k[a]]=f}for(var h=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],d=0,p=0;p<8;p++)for(var m=0;m<8;m++)l[d]=1/(s[k[d]]*h[p]*h[m]*8),c[d]=1/(u[k[d]]*h[p]*h[m]*8),d++}(e<50?Math.floor(5e3/e):Math.floor(200-2*e)),a=e)}this.encode=function(e,a){var o;(new Date).getTime(),a&&L(a),m=new Array,g=0,b=7,O(65496),O(65504),O(16),F(74),F(70),F(73),F(70),F(0),F(1),F(1),F(0),O(1),O(1),F(0),F(0),void 0!==(o=e.comments)&&o.constructor===Array&&o.forEach(e=>{if("string"==typeof e){O(65534);var t,r=e.length;for(O(r+2),t=0;t<r;t++)F(e.charCodeAt(t))}}),function(e){if(e){O(65505),69===e[0]&&120===e[1]&&105===e[2]&&102===e[3]?O(e.length+2):(O(e.length+5+2),F(69),F(120),F(105),F(102),F(0));for(var t=0;t<e.length;t++)F(e[t])}}(e.exifBuffer),function(){O(65499),O(132),F(0);for(var e=0;e<64;e++)F(s[e]);F(1);for(var t=0;t<64;t++)F(u[t])}(),function(e,t){O(65472),O(17),F(8),O(t),O(e),F(3),F(1),F(17),F(0),F(2),F(17),F(1),F(3),F(17),F(1)}(e.width,e.height),function(){O(65476),O(418),F(0);for(var e=0;e<16;e++)F(B[e+1]);for(var t=0;t<=11;t++)F(E[t]);F(16);for(var r=0;r<16;r++)F(S[r+1]);for(var n=0;n<=161;n++)F(A[n]);F(1);for(var i=0;i<16;i++)F(C[i+1]);for(var a=0;a<=11;a++)F(I[a]);F(17);for(var o=0;o<16;o++)F(P[o+1]);for(var s=0;s<=161;s++)F(T[s])}(),O(65498),O(12),F(3),F(1),F(0),F(2),F(17),F(3),F(17),F(0),F(63),F(0);var f=0,h=0,d=0;g=0,b=7,this.encode.displayName="_encode_";for(var p,w,k,M,D,z,U,$,j,Z=e.data,G=e.width,W=e.height,H=4*G,q=0;q<W;){for(p=0;p<H;){for(z=D=H*q+p,U=-1,$=0,j=0;j<64;j++)z=D+($=j>>3)*H+(U=4*(7&j)),q+$>=W&&(z-=H*(q+1+$-W)),p+U>=H&&(z-=p+U-H+4),w=Z[z++],k=Z[z++],M=Z[z++],y[j]=(x[w]+x[k+256|0]+x[M+512|0]>>16)-128,_[j]=(x[w+768|0]+x[k+1024|0]+x[M+1280|0]>>16)-128,v[j]=(x[w+1280|0]+x[k+1536|0]+x[M+1792|0]>>16)-128;f=N(y,l,f,t,n),h=N(_,c,h,r,i),d=N(v,c,d,r,i),p+=32}q+=8}if(b>=0){var Q=[];Q[1]=b+1,Q[0]=(1<<b+1)-1,R(Q)}return O(65497),Buffer.from(m)},(new Date).getTime(),e||(e=50),function(){for(var e=String.fromCharCode,t=0;t<256;t++)w[t]=e(t)}(),t=M(B,E),r=M(C,I),n=M(S,A),i=M(P,T),function(){for(var e=1,t=2,r=1;r<=15;r++){for(var n=e;n<t;n++)h[32767+n]=r,f[32767+n]=[],f[32767+n][1]=r,f[32767+n][0]=n;for(var i=-(t-1);i<=-e;i++)h[32767+i]=r,f[32767+i]=[],f[32767+i][1]=r,f[32767+i][0]=t-1+i;e<<=1,t<<=1}}(),function(){for(var e=0;e<256;e++)x[e]=19595*e,x[e+256|0]=38470*e,x[e+512|0]=7471*e+32768,x[e+768|0]=-11059*e,x[e+1024|0]=-21709*e,x[e+1280|0]=32768*e+8421375,x[e+1536|0]=-27439*e,x[e+1792|0]=-5329*e}(),L(e),(new Date).getTime()}encoder.exports=function(e,r){return void 0===r&&(r=50),{data:new t(r).encode(e,r),width:e.width,height:e.height}}}();var encoderExports=encoder.exports,decoder={exports:{}},module,JpegImage;module=decoder,JpegImage=function(){var e=new Int32Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),t=4017,r=799,n=3406,i=2276,a=1567,o=3784,s=5793,u=2896;function l(){}function c(e,t){for(var r,n,i=0,a=[],o=16;o>0&&!e[o-1];)o--;a.push({children:[],index:0});var s,u=a[0];for(r=0;r<o;r++){for(n=0;n<e[r];n++){for((u=a.pop()).children[u.index]=t[i];u.index>0;){if(0===a.length)throw new Error("Could not recreate Huffman Table");u=a.pop()}for(u.index++,a.push(u);a.length<=r;)a.push(s={children:[],index:0}),u.children[u.index]=s.children,u=s;i++}r+1<o&&(a.push(s={children:[],index:0}),u.children[u.index]=s.children,u=s)}return a[0].children}function f(t,r,n,i,a,o,s,u,l,c){n.precision,n.samplesPerLine,n.scanLines;var f=n.mcusPerLine,h=n.progressive;n.maxH,n.maxV;var d=r,p=0,m=0;function g(){if(m>0)return m--,p>>m&1;if(255==(p=t[r++])){var e=t[r++];if(e)throw new Error("unexpected marker: "+(p<<8|e).toString(16))}return m=7,p>>>7}function b(e){for(var t,r=e;null!==(t=g());){if("number"==typeof(r=r[t]))return r;if("object"!=typeof r)throw new Error("invalid huffman sequence")}return null}function y(e){for(var t=0;e>0;){var r=g();if(null===r)return;t=t<<1|r,e--}return t}function _(e){var t=y(e);return t>=1<<e-1?t:t+(-1<<e)+1}var v,w=0,x=0;function k(e,t,r,n,i){var a=r%f,o=(r/f|0)*e.v+n,s=a*e.h+i;void 0===e.blocks[o]&&c.tolerantDecoding||t(e,e.blocks[o][s])}function B(e,t,r){var n=r/e.blocksPerLine|0,i=r%e.blocksPerLine;void 0===e.blocks[n]&&c.tolerantDecoding||t(e,e.blocks[n][i])}var E,S,A,C,I,P,T=i.length;P=h?0===o?0===u?function(e,t){var r=b(e.huffmanTableDC),n=0===r?0:_(r)<<l;t[0]=e.pred+=n}:function(e,t){t[0]|=g()<<l}:0===u?function(t,r){if(w>0)w--;else for(var n=o,i=s;n<=i;){var a=b(t.huffmanTableAC),u=15&a,c=a>>4;if(0!==u)r[e[n+=c]]=_(u)*(1<<l),n++;else{if(c<15){w=y(c)+(1<<c)-1;break}n+=16}}}:function(t,r){for(var n=o,i=s,a=0;n<=i;){var u=e[n],c=r[u]<0?-1:1;switch(x){case 0:var f=b(t.huffmanTableAC),h=15&f;if(a=f>>4,0===h)a<15?(w=y(a)+(1<<a),x=4):(a=16,x=1);else{if(1!==h)throw new Error("invalid ACn encoding");v=_(h),x=a?2:3}continue;case 1:case 2:r[u]?r[u]+=(g()<<l)*c:0==--a&&(x=2==x?3:0);break;case 3:r[u]?r[u]+=(g()<<l)*c:(r[u]=v<<l,x=0);break;case 4:r[u]&&(r[u]+=(g()<<l)*c)}n++}4===x&&0==--w&&(x=0)}:function(t,r){var n=b(t.huffmanTableDC),i=0===n?0:_(n);r[0]=t.pred+=i;for(var a=1;a<64;){var o=b(t.huffmanTableAC),s=15&o,u=o>>4;if(0!==s)r[e[a+=u]]=_(s),a++;else{if(u<15)break;a+=16}}};var M,R,F,O,N=0;for(R=1==T?i[0].blocksPerLine*i[0].blocksPerColumn:f*n.mcusPerColumn,a||(a=R);N<R;){for(S=0;S<T;S++)i[S].pred=0;if(w=0,1==T)for(E=i[0],I=0;I<a;I++)B(E,P,N),N++;else for(I=0;I<a;I++){for(S=0;S<T;S++)for(F=(E=i[S]).h,O=E.v,A=0;A<O;A++)for(C=0;C<F;C++)k(E,P,N,A,C);if(++N===R)break}if(N===R)do{if(255===t[r]&&0!==t[r+1])break;r+=1}while(r<t.length-2);if(m=0,(M=t[r]<<8|t[r+1])<65280)throw new Error("marker was not found");if(!(M>=65488&&M<=65495))break;r+=2}return r-d}function h(e,l){var c,f,h=[],d=l.blocksPerLine,p=l.blocksPerColumn,m=d<<3,b=new Int32Array(64),y=new Uint8Array(64);function _(e,c,f){var h,d,p,m,g,b,y,_,v,w,x=l.quantizationTable,k=f;for(w=0;w<64;w++)k[w]=e[w]*x[w];for(w=0;w<8;++w){var B=8*w;0!=k[1+B]||0!=k[2+B]||0!=k[3+B]||0!=k[4+B]||0!=k[5+B]||0!=k[6+B]||0!=k[7+B]?(h=s*k[0+B]+128>>8,d=s*k[4+B]+128>>8,p=k[2+B],m=k[6+B],g=u*(k[1+B]-k[7+B])+128>>8,_=u*(k[1+B]+k[7+B])+128>>8,b=k[3+B]<<4,y=k[5+B]<<4,v=h-d+1>>1,h=h+d+1>>1,d=v,v=p*o+m*a+128>>8,p=p*a-m*o+128>>8,m=v,v=g-y+1>>1,g=g+y+1>>1,y=v,v=_+b+1>>1,b=_-b+1>>1,_=v,v=h-m+1>>1,h=h+m+1>>1,m=v,v=d-p+1>>1,d=d+p+1>>1,p=v,v=g*i+_*n+2048>>12,g=g*n-_*i+2048>>12,_=v,v=b*r+y*t+2048>>12,b=b*t-y*r+2048>>12,y=v,k[0+B]=h+_,k[7+B]=h-_,k[1+B]=d+y,k[6+B]=d-y,k[2+B]=p+b,k[5+B]=p-b,k[3+B]=m+g,k[4+B]=m-g):(v=s*k[0+B]+512>>10,k[0+B]=v,k[1+B]=v,k[2+B]=v,k[3+B]=v,k[4+B]=v,k[5+B]=v,k[6+B]=v,k[7+B]=v)}for(w=0;w<8;++w){var E=w;0!=k[8+E]||0!=k[16+E]||0!=k[24+E]||0!=k[32+E]||0!=k[40+E]||0!=k[48+E]||0!=k[56+E]?(h=s*k[0+E]+2048>>12,d=s*k[32+E]+2048>>12,p=k[16+E],m=k[48+E],g=u*(k[8+E]-k[56+E])+2048>>12,_=u*(k[8+E]+k[56+E])+2048>>12,b=k[24+E],y=k[40+E],v=h-d+1>>1,h=h+d+1>>1,d=v,v=p*o+m*a+2048>>12,p=p*a-m*o+2048>>12,m=v,v=g-y+1>>1,g=g+y+1>>1,y=v,v=_+b+1>>1,b=_-b+1>>1,_=v,v=h-m+1>>1,h=h+m+1>>1,m=v,v=d-p+1>>1,d=d+p+1>>1,p=v,v=g*i+_*n+2048>>12,g=g*n-_*i+2048>>12,_=v,v=b*r+y*t+2048>>12,b=b*t-y*r+2048>>12,y=v,k[0+E]=h+_,k[56+E]=h-_,k[8+E]=d+y,k[48+E]=d-y,k[16+E]=p+b,k[40+E]=p-b,k[24+E]=m+g,k[32+E]=m-g):(v=s*f[w+0]+8192>>14,k[0+E]=v,k[8+E]=v,k[16+E]=v,k[24+E]=v,k[32+E]=v,k[40+E]=v,k[48+E]=v,k[56+E]=v)}for(w=0;w<64;++w){var S=128+(k[w]+8>>4);c[w]=S<0?0:S>255?255:S}}g(m*p*8);for(var v=0;v<p;v++){var w=v<<3;for(c=0;c<8;c++)h.push(new Uint8Array(m));for(var x=0;x<d;x++){_(l.blocks[v][x],y,b);var k=0,B=x<<3;for(f=0;f<8;f++){var E=h[w+f];for(c=0;c<8;c++)E[B+c]=y[k++]}}}return h}function d(e){return e<0?0:e>255?255:e}l.prototype={load:function(e){var t=new XMLHttpRequest;t.open("GET",e,!0),t.responseType="arraybuffer",t.onload=function(){var e=new Uint8Array(t.response||t.mozResponseArrayBuffer);this.parse(e),this.onload&&this.onload()}.bind(this),t.send(null)},parse:function(t){var r=1e3*this.opts.maxResolutionInMP*1e3,n=0;function i(){var e=t[n]<<8|t[n+1];return n+=2,e}function a(e){var t,r,n=1,i=1;for(r in e.components)e.components.hasOwnProperty(r)&&(n<(t=e.components[r]).h&&(n=t.h),i<t.v&&(i=t.v));var a=Math.ceil(e.samplesPerLine/8/n),o=Math.ceil(e.scanLines/8/i);for(r in e.components)if(e.components.hasOwnProperty(r)){t=e.components[r];var s=Math.ceil(Math.ceil(e.samplesPerLine/8)*t.h/n),u=Math.ceil(Math.ceil(e.scanLines/8)*t.v/i),l=a*t.h,c=o*t.v,f=[];g(c*l*256);for(var h=0;h<c;h++){for(var d=[],p=0;p<l;p++)d.push(new Int32Array(64));f.push(d)}t.blocksPerLine=s,t.blocksPerColumn=u,t.blocks=f}e.maxH=n,e.maxV=i,e.mcusPerLine=a,e.mcusPerColumn=o}t.length;var o,s,u,l,d=null,p=null,m=[],b=[],y=[],_=[],v=i(),w=-1;if(this.comments=[],65496!=v)throw new Error("SOI not found");for(v=i();65497!=v;){switch(v){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var x=(u=i(),l=t.subarray(n,n+u-2),n+=l.length,l);if(65534===v){var k=String.fromCharCode.apply(null,x);this.comments.push(k)}65504===v&&74===x[0]&&70===x[1]&&73===x[2]&&70===x[3]&&0===x[4]&&(d={version:{major:x[5],minor:x[6]},densityUnits:x[7],xDensity:x[8]<<8|x[9],yDensity:x[10]<<8|x[11],thumbWidth:x[12],thumbHeight:x[13],thumbData:x.subarray(14,14+3*x[12]*x[13])}),65505===v&&69===x[0]&&120===x[1]&&105===x[2]&&102===x[3]&&0===x[4]&&(this.exifBuffer=x.subarray(5,x.length)),65518===v&&65===x[0]&&100===x[1]&&111===x[2]&&98===x[3]&&101===x[4]&&0===x[5]&&(p={version:x[6],flags0:x[7]<<8|x[8],flags1:x[9]<<8|x[10],transformCode:x[11]});break;case 65499:for(var B=i()+n-2;n<B;){var E=t[n++];g(256);var S=new Int32Array(64);if(E>>4){if(E>>4!=1)throw new Error("DQT: invalid table spec");for(Q=0;Q<64;Q++)S[e[Q]]=i()}else for(Q=0;Q<64;Q++)S[e[Q]]=t[n++];m[15&E]=S}break;case 65472:case 65473:case 65474:i(),(o={}).extended=65473===v,o.progressive=65474===v,o.precision=t[n++],o.scanLines=i(),o.samplesPerLine=i(),o.components={},o.componentsOrder=[];var A=o.scanLines*o.samplesPerLine;if(A>r){var C=Math.ceil((A-r)/1e6);throw new Error(`maxResolutionInMP limit exceeded by ${C}MP`)}var I,P=t[n++];for(H=0;H<P;H++){I=t[n];var T=t[n+1]>>4,M=15&t[n+1],R=t[n+2];if(T<=0||M<=0)throw new Error("Invalid sampling factor, expected values above 0");o.componentsOrder.push(I),o.components[I]={h:T,v:M,quantizationIdx:R},n+=3}a(o),b.push(o);break;case 65476:var F=i();for(H=2;H<F;){var O=t[n++],N=new Uint8Array(16),L=0;for(Q=0;Q<16;Q++,n++)L+=N[Q]=t[n];g(16+L);var D=new Uint8Array(L);for(Q=0;Q<L;Q++,n++)D[Q]=t[n];H+=17+L,(O>>4?y:_)[15&O]=c(N,D)}break;case 65501:i(),s=i();break;case 65500:i(),i();break;case 65498:i();var z=t[n++],U=[];for(H=0;H<z;H++){V=o.components[t[n++]];var $=t[n++];V.huffmanTableDC=_[$>>4],V.huffmanTableAC=y[15&$],U.push(V)}var j=t[n++],Z=t[n++],G=t[n++],W=f(t,n,o,U,s,j,Z,G>>4,15&G,this.opts);n+=W;break;case 65535:255!==t[n]&&n--;break;default:if(255==t[n-3]&&t[n-2]>=192&&t[n-2]<=254){n-=3;break}if(224===v||225==v){if(-1!==w)throw new Error(`first unknown JPEG marker at offset ${w.toString(16)}, second unknown JPEG marker ${v.toString(16)} at offset ${(n-1).toString(16)}`);w=n-1;const e=i();if(255===t[n+e-2]){n+=e-2;break}}throw new Error("unknown JPEG marker "+v.toString(16))}v=i()}if(1!=b.length)throw new Error("only single frame JPEGs supported");for(var H=0;H<b.length;H++){var q=b[H].components;for(var Q in q)q[Q].quantizationTable=m[q[Q].quantizationIdx],delete q[Q].quantizationIdx}for(this.width=o.samplesPerLine,this.height=o.scanLines,this.jfif=d,this.adobe=p,this.components=[],H=0;H<o.componentsOrder.length;H++){var V=o.components[o.componentsOrder[H]];this.components.push({lines:h(0,V),scaleX:V.h/o.maxH,scaleY:V.v/o.maxV})}},getData:function(e,t){var r,n,i,a,o,s,u,l,c,f,h,p,m,b,y,_,v,w,x,k,B,E=this.width/e,S=this.height/t,A=0,C=e*t*this.components.length;g(C);var I=new Uint8Array(C);switch(this.components.length){case 1:for(r=this.components[0],f=0;f<t;f++)for(o=r.lines[0|f*r.scaleY*S],c=0;c<e;c++)h=o[0|c*r.scaleX*E],I[A++]=h;break;case 2:for(r=this.components[0],n=this.components[1],f=0;f<t;f++)for(o=r.lines[0|f*r.scaleY*S],s=n.lines[0|f*n.scaleY*S],c=0;c<e;c++)h=o[0|c*r.scaleX*E],I[A++]=h,h=s[0|c*n.scaleX*E],I[A++]=h;break;case 3:for(B=!0,this.adobe&&this.adobe.transformCode?B=!0:void 0!==this.opts.colorTransform&&(B=!!this.opts.colorTransform),r=this.components[0],n=this.components[1],i=this.components[2],f=0;f<t;f++)for(o=r.lines[0|f*r.scaleY*S],s=n.lines[0|f*n.scaleY*S],u=i.lines[0|f*i.scaleY*S],c=0;c<e;c++)B?(h=o[0|c*r.scaleX*E],p=s[0|c*n.scaleX*E],w=d(h+1.402*((m=u[0|c*i.scaleX*E])-128)),x=d(h-.3441363*(p-128)-.71413636*(m-128)),k=d(h+1.772*(p-128))):(w=o[0|c*r.scaleX*E],x=s[0|c*n.scaleX*E],k=u[0|c*i.scaleX*E]),I[A++]=w,I[A++]=x,I[A++]=k;break;case 4:if(!this.adobe)throw new Error("Unsupported color mode (4 components)");for(B=!1,this.adobe&&this.adobe.transformCode?B=!0:void 0!==this.opts.colorTransform&&(B=!!this.opts.colorTransform),r=this.components[0],n=this.components[1],i=this.components[2],a=this.components[3],f=0;f<t;f++)for(o=r.lines[0|f*r.scaleY*S],s=n.lines[0|f*n.scaleY*S],u=i.lines[0|f*i.scaleY*S],l=a.lines[0|f*a.scaleY*S],c=0;c<e;c++)B?(h=o[0|c*r.scaleX*E],p=s[0|c*n.scaleX*E],m=u[0|c*i.scaleX*E],b=l[0|c*a.scaleX*E],y=255-d(h+1.402*(m-128)),_=255-d(h-.3441363*(p-128)-.71413636*(m-128)),v=255-d(h+1.772*(p-128))):(y=o[0|c*r.scaleX*E],_=s[0|c*n.scaleX*E],v=u[0|c*i.scaleX*E],b=l[0|c*a.scaleX*E]),I[A++]=255-y,I[A++]=255-_,I[A++]=255-v,I[A++]=255-b;break;default:throw new Error("Unsupported color mode")}return I},copyToImageData:function(e,t){var r,n,i,a,o,s,u,l,c,f=e.width,h=e.height,p=e.data,m=this.getData(f,h),g=0,b=0;switch(this.components.length){case 1:for(n=0;n<h;n++)for(r=0;r<f;r++)i=m[g++],p[b++]=i,p[b++]=i,p[b++]=i,t&&(p[b++]=255);break;case 3:for(n=0;n<h;n++)for(r=0;r<f;r++)u=m[g++],l=m[g++],c=m[g++],p[b++]=u,p[b++]=l,p[b++]=c,t&&(p[b++]=255);break;case 4:for(n=0;n<h;n++)for(r=0;r<f;r++)o=m[g++],s=m[g++],i=m[g++],u=255-d(o*(1-(a=m[g++])/255)+a),l=255-d(s*(1-a/255)+a),c=255-d(i*(1-a/255)+a),p[b++]=u,p[b++]=l,p[b++]=c,t&&(p[b++]=255);break;default:throw new Error("Unsupported color mode")}}};var p=0,m=0;function g(e=0){var t=p+e;if(t>m){var r=Math.ceil((t-m)/1024/1024);throw new Error(`maxMemoryUsageInMB limit exceeded by at least ${r}MB`)}p=t}return l.resetMaxMemoryUsage=function(e){p=0,m=e},l.getBytesAllocated=function(){return p},l.requestMemoryAllocation=g,l}(),module.exports=function(e,t={}){var r={colorTransform:void 0,useTArray:!1,formatAsRGBA:!0,tolerantDecoding:!0,maxResolutionInMP:100,maxMemoryUsageInMB:512,...t},n=new Uint8Array(e),i=new JpegImage;i.opts=r,JpegImage.resetMaxMemoryUsage(1024*r.maxMemoryUsageInMB*1024),i.parse(n);var a=r.formatAsRGBA?4:3,o=i.width*i.height*a;try{JpegImage.requestMemoryAllocation(o);var s={width:i.width,height:i.height,exifBuffer:i.exifBuffer,data:r.useTArray?new Uint8Array(o):Buffer.alloc(o)};i.comments.length>0&&(s.comments=i.comments)}catch(e){if(e instanceof RangeError)throw new Error("Could not allocate enough memory for the image. Required: "+o);if(e instanceof ReferenceError&&"Buffer is not defined"===e.message)throw new Error("Buffer is not globally defined in this environment. Consider setting useTArray to true");throw e}return i.copyToImageData(s,r.formatAsRGBA),s};var decoderExports=decoder.exports,encode=encoderExports,decode=decoderExports,jpegJs={encode,decode},JPEG=getDefaultExportFromCjs(jpegJs);function jpeg$2(){return{mime:"image/jpeg",encode:(e,{quality:t=100}={})=>JPEG.encode(e,t).data,decode:(e,t)=>JPEG.decode(e,t)}}function commonjsRequire(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var browser$1={exports:{}};browser$1.exports=function e(t,r,n){function i(o,s){if(!r[o]){if(!t[o]){var u="function"==typeof commonjsRequire&&commonjsRequire;if(!s&&u)return u(o,!0);if(a)return a(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[o]={exports:{}};t[o][0].call(c.exports,function(e){return i(t[o][1][e]||e)},c,c.exports,e,t,r,n)}return r[o].exports}for(var a="function"==typeof commonjsRequire&&commonjsRequire,o=0;o<n.length;o++)i(n[o]);return i}({1:[function(e,t,r){(function(t){(function(){let n=e("./interlace"),i=[function(){},function(e,t,r,n){if(n===t.length)throw new Error("Ran out of data");let i=t[n];e[r]=i,e[r+1]=i,e[r+2]=i,e[r+3]=255},function(e,t,r,n){if(n+1>=t.length)throw new Error("Ran out of data");let i=t[n];e[r]=i,e[r+1]=i,e[r+2]=i,e[r+3]=t[n+1]},function(e,t,r,n){if(n+2>=t.length)throw new Error("Ran out of data");e[r]=t[n],e[r+1]=t[n+1],e[r+2]=t[n+2],e[r+3]=255},function(e,t,r,n){if(n+3>=t.length)throw new Error("Ran out of data");e[r]=t[n],e[r+1]=t[n+1],e[r+2]=t[n+2],e[r+3]=t[n+3]}],a=[function(){},function(e,t,r,n){let i=t[0];e[r]=i,e[r+1]=i,e[r+2]=i,e[r+3]=n},function(e,t,r){let n=t[0];e[r]=n,e[r+1]=n,e[r+2]=n,e[r+3]=t[1]},function(e,t,r,n){e[r]=t[0],e[r+1]=t[1],e[r+2]=t[2],e[r+3]=n},function(e,t,r){e[r]=t[0],e[r+1]=t[1],e[r+2]=t[2],e[r+3]=t[3]}];function o(e,t,r,n,a,o){let s=e.width,u=e.height,l=e.index;for(let e=0;e<u;e++)for(let u=0;u<s;u++){let s=r(u,e,l);i[n](t,a,s,o),o+=n}return o}function s(e,t,r,n,i,o){let s=e.width,u=e.height,l=e.index;for(let e=0;e<u;e++){for(let u=0;u<s;u++){let s=i.get(n),c=r(u,e,l);a[n](t,s,c,o)}i.resetAfterLine()}}r.dataToBitMap=function(e,r){let i,a,u=r.width,l=r.height,c=r.depth,f=r.bpp,h=r.interlace;8!==c&&(i=function(e,t){let r=[],n=0;function i(){if(n===e.length)throw new Error("Ran out of data");let i,a,o,s,u,l,c,f,h=e[n];switch(n++,t){default:throw new Error("unrecognised depth");case 16:c=e[n],n++,r.push((h<<8)+c);break;case 4:c=15&h,f=h>>4,r.push(f,c);break;case 2:u=3&h,l=h>>2&3,c=h>>4&3,f=h>>6&3,r.push(f,c,l,u);break;case 1:i=1&h,a=h>>1&1,o=h>>2&1,s=h>>3&1,u=h>>4&1,l=h>>5&1,c=h>>6&1,f=h>>7&1,r.push(f,c,l,u,s,o,a,i)}}return{get:function(e){for(;r.length<e;)i();let t=r.slice(0,e);return r=r.slice(e),t},resetAfterLine:function(){r.length=0},end:function(){if(n!==e.length)throw new Error("extra data found")}}}(e,c)),a=c<=8?t.alloc(u*l*4):new Uint16Array(u*l*4);let d,p,m=Math.pow(2,c)-1,g=0;if(h)d=n.getImagePasses(u,l),p=n.getInterlaceIterator(u,l);else{let e=0;p=function(){let t=e;return e+=4,t},d=[{width:u,height:l}]}for(let t=0;t<d.length;t++)8===c?g=o(d[t],a,p,f,e,g):s(d[t],a,p,f,i,m);if(8===c){if(g!==e.length)throw new Error("extra data found")}else i.end();return a}}).call(this)}).call(this,e("buffer").Buffer)},{"./interlace":11,buffer:32}],2:[function(e,t,r){(function(r){(function(){let n=e("./constants");t.exports=function(e,t,i,a){let o=-1!==[n.COLORTYPE_COLOR_ALPHA,n.COLORTYPE_ALPHA].indexOf(a.colorType);if(a.colorType===a.inputColorType){let t=function(){let e=new ArrayBuffer(2);return new DataView(e).setInt16(0,256,!0),256!==new Int16Array(e)[0]}();if(8===a.bitDepth||16===a.bitDepth&&t)return e}let s=16!==a.bitDepth?e:new Uint16Array(e.buffer),u=255,l=n.COLORTYPE_TO_BPP_MAP[a.inputColorType];4!==l||a.inputHasAlpha||(l=3);let c=n.COLORTYPE_TO_BPP_MAP[a.colorType];16===a.bitDepth&&(u=65535,c*=2);let f=r.alloc(t*i*c),h=0,d=0,p=a.bgColor||{};function m(){let e,t,r,i=u;switch(a.inputColorType){case n.COLORTYPE_COLOR_ALPHA:i=s[h+3],e=s[h],t=s[h+1],r=s[h+2];break;case n.COLORTYPE_COLOR:e=s[h],t=s[h+1],r=s[h+2];break;case n.COLORTYPE_ALPHA:i=s[h+1],e=s[h],t=e,r=e;break;case n.COLORTYPE_GRAYSCALE:e=s[h],t=e,r=e;break;default:throw new Error("input color type:"+a.inputColorType+" is not supported at present")}return a.inputHasAlpha&&(o||(i/=u,e=Math.min(Math.max(Math.round((1-i)*p.red+i*e),0),u),t=Math.min(Math.max(Math.round((1-i)*p.green+i*t),0),u),r=Math.min(Math.max(Math.round((1-i)*p.blue+i*r),0),u))),{red:e,green:t,blue:r,alpha:i}}void 0===p.red&&(p.red=u),void 0===p.green&&(p.green=u),void 0===p.blue&&(p.blue=u);for(let e=0;e<i;e++)for(let e=0;e<t;e++){let e=m();switch(a.colorType){case n.COLORTYPE_COLOR_ALPHA:case n.COLORTYPE_COLOR:8===a.bitDepth?(f[d]=e.red,f[d+1]=e.green,f[d+2]=e.blue,o&&(f[d+3]=e.alpha)):(f.writeUInt16BE(e.red,d),f.writeUInt16BE(e.green,d+2),f.writeUInt16BE(e.blue,d+4),o&&f.writeUInt16BE(e.alpha,d+6));break;case n.COLORTYPE_ALPHA:case n.COLORTYPE_GRAYSCALE:{let t=(e.red+e.green+e.blue)/3;8===a.bitDepth?(f[d]=t,o&&(f[d+1]=e.alpha)):(f.writeUInt16BE(t,d),o&&f.writeUInt16BE(e.alpha,d+2));break}default:throw new Error("unrecognised color Type "+a.colorType)}h+=l,d+=c}return f}}).call(this)}).call(this,e("buffer").Buffer)},{"./constants":4,buffer:32}],3:[function(e,t,r){(function(r,n){(function(){let i=e("util"),a=e("stream"),o=t.exports=function(){a.call(this),this._buffers=[],this._buffered=0,this._reads=[],this._paused=!1,this._encoding="utf8",this.writable=!0};i.inherits(o,a),o.prototype.read=function(e,t){this._reads.push({length:Math.abs(e),allowLess:e<0,func:t}),r.nextTick(function(){this._process(),this._paused&&this._reads&&this._reads.length>0&&(this._paused=!1,this.emit("drain"))}.bind(this))},o.prototype.write=function(e,t){if(!this.writable)return this.emit("error",new Error("Stream not writable")),!1;let r;return r=n.isBuffer(e)?e:n.from(e,t||this._encoding),this._buffers.push(r),this._buffered+=r.length,this._process(),this._reads&&0===this._reads.length&&(this._paused=!0),this.writable&&!this._paused},o.prototype.end=function(e,t){e&&this.write(e,t),this.writable=!1,this._buffers&&(0===this._buffers.length?this._end():(this._buffers.push(null),this._process()))},o.prototype.destroySoon=o.prototype.end,o.prototype._end=function(){this._reads.length>0&&this.emit("error",new Error("Unexpected end of input")),this.destroy()},o.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))},o.prototype._processReadAllowingLess=function(e){this._reads.shift();let t=this._buffers[0];t.length>e.length?(this._buffered-=e.length,this._buffers[0]=t.slice(e.length),e.func.call(this,t.slice(0,e.length))):(this._buffered-=t.length,this._buffers.shift(),e.func.call(this,t))},o.prototype._processRead=function(e){this._reads.shift();let t=0,r=0,i=n.alloc(e.length);for(;t<e.length;){let n=this._buffers[r++],a=Math.min(n.length,e.length-t);n.copy(i,t,0,a),t+=a,a!==n.length&&(this._buffers[--r]=n.slice(a))}r>0&&this._buffers.splice(0,r),this._buffered-=e.length,e.func.call(this,i)},o.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let e=this._reads[0];if(e.allowLess)this._processReadAllowingLess(e);else{if(!(this._buffered>=e.length))break;this._processRead(e)}}this._buffers&&!this.writable&&this._end()}catch(e){this.emit("error",e)}}}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{_process:63,buffer:32,stream:65,util:84}],4:[function(e,t,r){t.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}},{}],5:[function(e,t,r){let n=[];!function(){for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)1&t?t=3988292384^t>>>1:t>>>=1;n[e]=t}}();let i=t.exports=function(){this._crc=-1};i.prototype.write=function(e){for(let t=0;t<e.length;t++)this._crc=n[255&(this._crc^e[t])]^this._crc>>>8;return!0},i.prototype.crc32=function(){return~this._crc},i.crc32=function(e){let t=-1;for(let r=0;r<e.length;r++)t=n[255&(t^e[r])]^t>>>8;return~t}},{}],6:[function(e,t,r){(function(r){(function(){let n=e("./paeth-predictor"),i={0:function(e,t,r,n,i){for(let a=0;a<r;a++)n[i+a]=e[t+a]},1:function(e,t,r,n,i,a){for(let o=0;o<r;o++){let r=o>=a?e[t+o-a]:0,s=e[t+o]-r;n[i+o]=s}},2:function(e,t,r,n,i){for(let a=0;a<r;a++){let o=t>0?e[t+a-r]:0,s=e[t+a]-o;n[i+a]=s}},3:function(e,t,r,n,i,a){for(let o=0;o<r;o++){let s=o>=a?e[t+o-a]:0,u=t>0?e[t+o-r]:0,l=e[t+o]-(s+u>>1);n[i+o]=l}},4:function(e,t,r,i,a,o){for(let s=0;s<r;s++){let u=s>=o?e[t+s-o]:0,l=t>0?e[t+s-r]:0,c=t>0&&s>=o?e[t+s-(r+o)]:0,f=e[t+s]-n(u,l,c);i[a+s]=f}}},a={0:function(e,t,r){let n=0,i=t+r;for(let r=t;r<i;r++)n+=Math.abs(e[r]);return n},1:function(e,t,r,n){let i=0;for(let a=0;a<r;a++){let r=a>=n?e[t+a-n]:0,o=e[t+a]-r;i+=Math.abs(o)}return i},2:function(e,t,r){let n=0,i=t+r;for(let a=t;a<i;a++){let i=t>0?e[a-r]:0,o=e[a]-i;n+=Math.abs(o)}return n},3:function(e,t,r,n){let i=0;for(let a=0;a<r;a++){let o=a>=n?e[t+a-n]:0,s=t>0?e[t+a-r]:0,u=e[t+a]-(o+s>>1);i+=Math.abs(u)}return i},4:function(e,t,r,i){let a=0;for(let o=0;o<r;o++){let s=o>=i?e[t+o-i]:0,u=t>0?e[t+o-r]:0,l=t>0&&o>=i?e[t+o-(r+i)]:0,c=e[t+o]-n(s,u,l);a+=Math.abs(c)}return a}};t.exports=function(e,t,n,o,s){let u;if("filterType"in o&&-1!==o.filterType){if("number"!=typeof o.filterType)throw new Error("unrecognised filter types");u=[o.filterType]}else u=[0,1,2,3,4];16===o.bitDepth&&(s*=2);let l=t*s,c=0,f=0,h=r.alloc((l+1)*n),d=u[0];for(let t=0;t<n;t++){if(u.length>1){let t=1/0;for(let r=0;r<u.length;r++){let n=a[u[r]](e,f,l,s);n<t&&(d=u[r],t=n)}}h[c]=d,c++,i[d](e,f,l,h,c,s),c+=l,f+=l}return h}}).call(this)}).call(this,e("buffer").Buffer)},{"./paeth-predictor":15,buffer:32}],7:[function(e,t,r){(function(r){(function(){let n=e("util"),i=e("./chunkstream"),a=e("./filter-parse"),o=t.exports=function(e){i.call(this);let t=[],n=this;this._filter=new a(e,{read:this.read.bind(this),write:function(e){t.push(e)},complete:function(){n.emit("complete",r.concat(t))}}),this._filter.start()};n.inherits(o,i)}).call(this)}).call(this,e("buffer").Buffer)},{"./chunkstream":3,"./filter-parse":9,buffer:32,util:84}],8:[function(e,t,r){(function(t){(function(){let n=e("./sync-reader"),i=e("./filter-parse");r.process=function(e,r){let a=[],o=new n(e);return new i(r,{read:o.read.bind(o),write:function(e){a.push(e)},complete:function(){}}).start(),o.process(),t.concat(a)}}).call(this)}).call(this,e("buffer").Buffer)},{"./filter-parse":9,"./sync-reader":22,buffer:32}],9:[function(e,t,r){(function(r){(function(){let n=e("./interlace"),i=e("./paeth-predictor");function a(e,t,r){let n=e*t;return 8!==r&&(n=Math.ceil(n/(8/r))),n}let o=t.exports=function(e,t){let r=e.width,i=e.height,o=e.interlace,s=e.bpp,u=e.depth;if(this.read=t.read,this.write=t.write,this.complete=t.complete,this._imageIndex=0,this._images=[],o){let e=n.getImagePasses(r,i);for(let t=0;t<e.length;t++)this._images.push({byteWidth:a(e[t].width,s,u),height:e[t].height,lineIndex:0})}else this._images.push({byteWidth:a(r,s,u),height:i,lineIndex:0});this._xComparison=8===u?s:16===u?2*s:1};o.prototype.start=function(){this.read(this._images[this._imageIndex].byteWidth+1,this._reverseFilterLine.bind(this))},o.prototype._unFilterType1=function(e,t,r){let n=this._xComparison,i=n-1;for(let a=0;a<r;a++){let r=e[1+a],o=a>i?t[a-n]:0;t[a]=r+o}},o.prototype._unFilterType2=function(e,t,r){let n=this._lastLine;for(let i=0;i<r;i++){let r=e[1+i],a=n?n[i]:0;t[i]=r+a}},o.prototype._unFilterType3=function(e,t,r){let n=this._xComparison,i=n-1,a=this._lastLine;for(let o=0;o<r;o++){let r=e[1+o],s=a?a[o]:0,u=o>i?t[o-n]:0,l=Math.floor((u+s)/2);t[o]=r+l}},o.prototype._unFilterType4=function(e,t,r){let n=this._xComparison,a=n-1,o=this._lastLine;for(let s=0;s<r;s++){let r=e[1+s],u=o?o[s]:0,l=s>a?t[s-n]:0,c=s>a&&o?o[s-n]:0,f=i(l,u,c);t[s]=r+f}},o.prototype._reverseFilterLine=function(e){let t,n=e[0],i=this._images[this._imageIndex],a=i.byteWidth;if(0===n)t=e.slice(1,a+1);else switch(t=r.alloc(a),n){case 1:this._unFilterType1(e,t,a);break;case 2:this._unFilterType2(e,t,a);break;case 3:this._unFilterType3(e,t,a);break;case 4:this._unFilterType4(e,t,a);break;default:throw new Error("Unrecognised filter type - "+n)}this.write(t),i.lineIndex++,i.lineIndex>=i.height?(this._lastLine=null,this._imageIndex++,i=this._images[this._imageIndex]):this._lastLine=t,i?this.read(i.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}}).call(this)}).call(this,e("buffer").Buffer)},{"./interlace":11,"./paeth-predictor":15,buffer:32}],10:[function(e,t,r){(function(e){(function(){t.exports=function(t,r,n=!1){let i=r.depth,a=r.width,o=r.height,s=r.colorType,u=r.transColor,l=r.palette,c=t;return 3===s?function(e,t,r,n,i){let a=0;for(let o=0;o<n;o++)for(let n=0;n<r;n++){let r=i[e[a]];if(!r)throw new Error("index "+e[a]+" not in palette");for(let e=0;e<4;e++)t[a+e]=r[e];a+=4}}(t,c,a,o,l):(u&&function(e,t,r,n,i){let a=0;for(let o=0;o<n;o++)for(let n=0;n<r;n++){let r=!1;if(1===i.length?i[0]===e[a]&&(r=!0):i[0]===e[a]&&i[1]===e[a+1]&&i[2]===e[a+2]&&(r=!0),r)for(let e=0;e<4;e++)t[a+e]=0;a+=4}}(t,c,a,o,u),8===i||n||(16===i&&(c=e.alloc(a*o*4)),function(e,t,r,n,i){let a=Math.pow(2,i)-1,o=0;for(let i=0;i<n;i++)for(let n=0;n<r;n++){for(let r=0;r<4;r++)t[o+r]=Math.floor(255*e[o+r]/a+.5);o+=4}}(t,c,a,o,i))),c}}).call(this)}).call(this,e("buffer").Buffer)},{buffer:32}],11:[function(e,t,r){let n=[{x:[0],y:[0]},{x:[4],y:[0]},{x:[0,4],y:[4]},{x:[2,6],y:[0,4]},{x:[0,2,4,6],y:[2,6]},{x:[1,3,5,7],y:[0,2,4,6]},{x:[0,1,2,3,4,5,6,7],y:[1,3,5,7]}];r.getImagePasses=function(e,t){let r=[],i=e%8,a=t%8,o=(e-i)/8,s=(t-a)/8;for(let e=0;e<n.length;e++){let t=n[e],u=o*t.x.length,l=s*t.y.length;for(let e=0;e<t.x.length&&t.x[e]<i;e++)u++;for(let e=0;e<t.y.length&&t.y[e]<a;e++)l++;u>0&&l>0&&r.push({width:u,height:l,index:e})}return r},r.getInterlaceIterator=function(e){return function(t,r,i){let a=t%n[i].x.length,o=(t-a)/n[i].x.length*8+n[i].x[a],s=r%n[i].y.length;return 4*o+((r-s)/n[i].y.length*8+n[i].y[s])*e*4}}},{}],12:[function(e,t,r){(function(r){(function(){let n=e("util"),i=e("stream"),a=e("./constants"),o=e("./packer"),s=t.exports=function(e){i.call(this);let t=e||{};this._packer=new o(t),this._deflate=this._packer.createDeflate(),this.readable=!0};n.inherits(s,i),s.prototype.pack=function(e,t,n,i){this.emit("data",r.from(a.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(t,n)),i&&this.emit("data",this._packer.packGAMA(i));let o=this._packer.filterData(e,t,n);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",function(e){this.emit("data",this._packer.packIDAT(e))}.bind(this)),this._deflate.on("end",function(){this.emit("data",this._packer.packIEND()),this.emit("end")}.bind(this)),this._deflate.end(o)}}).call(this)}).call(this,e("buffer").Buffer)},{"./constants":4,"./packer":14,buffer:32,stream:65,util:84}],13:[function(e,t,r){(function(r){(function(){let n=!0,i=e("zlib");i.deflateSync||(n=!1);let a=e("./constants"),o=e("./packer");t.exports=function(e,t){if(!n)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let s=new o(t||{}),u=[];u.push(r.from(a.PNG_SIGNATURE)),u.push(s.packIHDR(e.width,e.height)),e.gamma&&u.push(s.packGAMA(e.gamma));let l=s.filterData(e.data,e.width,e.height),c=i.deflateSync(l,s.getDeflateOptions());if(l=null,!c||!c.length)throw new Error("bad png - invalid compressed data response");return u.push(s.packIDAT(c)),u.push(s.packIEND()),r.concat(u)}}).call(this)}).call(this,e("buffer").Buffer)},{"./constants":4,"./packer":14,buffer:32,zlib:31}],14:[function(e,t,r){(function(r){(function(){let n=e("./constants"),i=e("./crc"),a=e("./bitpacker"),o=e("./filter-pack"),s=e("zlib"),u=t.exports=function(e){if(this._options=e,e.deflateChunkSize=e.deflateChunkSize||32768,e.deflateLevel=null!=e.deflateLevel?e.deflateLevel:9,e.deflateStrategy=null!=e.deflateStrategy?e.deflateStrategy:3,e.inputHasAlpha=null==e.inputHasAlpha||e.inputHasAlpha,e.deflateFactory=e.deflateFactory||s.createDeflate,e.bitDepth=e.bitDepth||8,e.colorType="number"==typeof e.colorType?e.colorType:n.COLORTYPE_COLOR_ALPHA,e.inputColorType="number"==typeof e.inputColorType?e.inputColorType:n.COLORTYPE_COLOR_ALPHA,-1===[n.COLORTYPE_GRAYSCALE,n.COLORTYPE_COLOR,n.COLORTYPE_COLOR_ALPHA,n.COLORTYPE_ALPHA].indexOf(e.colorType))throw new Error("option color type:"+e.colorType+" is not supported at present");if(-1===[n.COLORTYPE_GRAYSCALE,n.COLORTYPE_COLOR,n.COLORTYPE_COLOR_ALPHA,n.COLORTYPE_ALPHA].indexOf(e.inputColorType))throw new Error("option input color type:"+e.inputColorType+" is not supported at present");if(8!==e.bitDepth&&16!==e.bitDepth)throw new Error("option bit depth:"+e.bitDepth+" is not supported at present")};u.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}},u.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())},u.prototype.filterData=function(e,t,r){let i=a(e,t,r,this._options),s=n.COLORTYPE_TO_BPP_MAP[this._options.colorType];return o(i,t,r,this._options,s)},u.prototype._packChunk=function(e,t){let n=t?t.length:0,a=r.alloc(n+12);return a.writeUInt32BE(n,0),a.writeUInt32BE(e,4),t&&t.copy(a,8),a.writeInt32BE(i.crc32(a.slice(4,a.length-4)),a.length-4),a},u.prototype.packGAMA=function(e){let t=r.alloc(4);return t.writeUInt32BE(Math.floor(e*n.GAMMA_DIVISION),0),this._packChunk(n.TYPE_gAMA,t)},u.prototype.packIHDR=function(e,t){let i=r.alloc(13);return i.writeUInt32BE(e,0),i.writeUInt32BE(t,4),i[8]=this._options.bitDepth,i[9]=this._options.colorType,i[10]=0,i[11]=0,i[12]=0,this._packChunk(n.TYPE_IHDR,i)},u.prototype.packIDAT=function(e){return this._packChunk(n.TYPE_IDAT,e)},u.prototype.packIEND=function(){return this._packChunk(n.TYPE_IEND,null)}}).call(this)}).call(this,e("buffer").Buffer)},{"./bitpacker":2,"./constants":4,"./crc":5,"./filter-pack":6,buffer:32,zlib:31}],15:[function(e,t,r){t.exports=function(e,t,r){let n=e+t-r,i=Math.abs(n-e),a=Math.abs(n-t),o=Math.abs(n-r);return i<=a&&i<=o?e:a<=o?t:r}},{}],16:[function(e,t,r){let n=e("util"),i=e("zlib"),a=e("./chunkstream"),o=e("./filter-parse-async"),s=e("./parser"),u=e("./bitmapper"),l=e("./format-normaliser"),c=t.exports=function(e){a.call(this),this._parser=new s(e,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=e,this.writable=!0,this._parser.start()};n.inherits(c,a),c.prototype._handleError=function(e){this.emit("error",e),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",function(){})),this.errord=!0},c.prototype._inflateData=function(e){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=i.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let e=(1+(this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3))*this._bitmapInfo.height,t=Math.max(e,i.Z_MIN_CHUNK);this._inflate=i.createInflate({chunkSize:t});let r=e,n=this.emit.bind(this,"error");this._inflate.on("error",function(e){r&&n(e)}),this._filter.on("complete",this._complete.bind(this));let a=this._filter.write.bind(this._filter);this._inflate.on("data",function(e){r&&(e.length>r&&(e=e.slice(0,r)),r-=e.length,a(e))}),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(e)},c.prototype._handleMetaData=function(e){this._metaData=e,this._bitmapInfo=Object.create(e),this._filter=new o(this._bitmapInfo)},c.prototype._handleTransColor=function(e){this._bitmapInfo.transColor=e},c.prototype._handlePalette=function(e){this._bitmapInfo.palette=e},c.prototype._simpleTransparency=function(){this._metaData.alpha=!0},c.prototype._headersFinished=function(){this.emit("metadata",this._metaData)},c.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"))},c.prototype._complete=function(e){if(this.errord)return;let t;try{let r=u.dataToBitMap(e,this._bitmapInfo);t=l(r,this._bitmapInfo,this._options.skipRescale),r=null}catch(e){return void this._handleError(e)}this.emit("parsed",t)}},{"./bitmapper":1,"./chunkstream":3,"./filter-parse-async":7,"./format-normaliser":10,"./parser":18,util:84,zlib:31}],17:[function(e,t,r){(function(r){(function(){let n=!0,i=e("zlib"),a=e("./sync-inflate");i.deflateSync||(n=!1);let o=e("./sync-reader"),s=e("./filter-parse-sync"),u=e("./parser"),l=e("./bitmapper"),c=e("./format-normaliser");t.exports=function(e,t){if(!n)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let f,h,d,p=[],m=new o(e);if(new u(t,{read:m.read.bind(m),error:function(e){f=e},metadata:function(e){h=e},gamma:function(e){d=e},palette:function(e){h.palette=e},transColor:function(e){h.transColor=e},inflateData:function(e){p.push(e)},simpleTransparency:function(){h.alpha=!0}}).start(),m.process(),f)throw f;let g,b=r.concat(p);if(p.length=0,h.interlace)g=i.inflateSync(b);else{let e=(1+(h.width*h.bpp*h.depth+7>>3))*h.height;g=a(b,{chunkSize:e,maxLength:e})}if(b=null,!g||!g.length)throw new Error("bad png - invalid inflate data response");let y=s.process(g,h);b=null;let _=l.dataToBitMap(y,h);y=null;let v=c(_,h,t.skipRescale);return h.data=v,h.gamma=d||0,h}}).call(this)}).call(this,e("buffer").Buffer)},{"./bitmapper":1,"./filter-parse-sync":8,"./format-normaliser":10,"./parser":18,"./sync-inflate":21,"./sync-reader":22,buffer:32,zlib:31}],18:[function(e,t,r){(function(r){(function(){let n=e("./constants"),i=e("./crc"),a=t.exports=function(e,t){this._options=e,e.checkCRC=!1!==e.checkCRC,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[n.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[n.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[n.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[n.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[n.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[n.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=t.read,this.error=t.error,this.metadata=t.metadata,this.gamma=t.gamma,this.transColor=t.transColor,this.palette=t.palette,this.parsed=t.parsed,this.inflateData=t.inflateData,this.finished=t.finished,this.simpleTransparency=t.simpleTransparency,this.headersFinished=t.headersFinished||function(){}};a.prototype.start=function(){this.read(n.PNG_SIGNATURE.length,this._parseSignature.bind(this))},a.prototype._parseSignature=function(e){let t=n.PNG_SIGNATURE;for(let r=0;r<t.length;r++)if(e[r]!==t[r])return void this.error(new Error("Invalid file signature"));this.read(8,this._parseChunkBegin.bind(this))},a.prototype._parseChunkBegin=function(e){let t=e.readUInt32BE(0),a=e.readUInt32BE(4),o="";for(let t=4;t<8;t++)o+=String.fromCharCode(e[t]);let s=Boolean(32&e[4]);if(this._hasIHDR||a===n.TYPE_IHDR){if(this._crc=new i,this._crc.write(r.from(o)),this._chunks[a])return this._chunks[a](t);s?this.read(t+4,this._skipChunk.bind(this)):this.error(new Error("Unsupported critical chunk type "+o))}else this.error(new Error("Expected IHDR on beggining"))},a.prototype._skipChunk=function(){this.read(8,this._parseChunkBegin.bind(this))},a.prototype._handleChunkEnd=function(){this.read(4,this._parseChunkEnd.bind(this))},a.prototype._parseChunkEnd=function(e){let t=e.readInt32BE(0),r=this._crc.crc32();this._options.checkCRC&&r!==t?this.error(new Error("Crc error - "+t+" - "+r)):this._hasIEND||this.read(8,this._parseChunkBegin.bind(this))},a.prototype._handleIHDR=function(e){this.read(e,this._parseIHDR.bind(this))},a.prototype._parseIHDR=function(e){this._crc.write(e);let t=e.readUInt32BE(0),r=e.readUInt32BE(4),i=e[8],a=e[9],o=e[10],s=e[11],u=e[12];if(8!==i&&4!==i&&2!==i&&1!==i&&16!==i)return void this.error(new Error("Unsupported bit depth "+i));if(!(a in n.COLORTYPE_TO_BPP_MAP))return void this.error(new Error("Unsupported color type"));if(0!==o)return void this.error(new Error("Unsupported compression method"));if(0!==s)return void this.error(new Error("Unsupported filter method"));if(0!==u&&1!==u)return void this.error(new Error("Unsupported interlace method"));this._colorType=a;let l=n.COLORTYPE_TO_BPP_MAP[this._colorType];this._hasIHDR=!0,this.metadata({width:t,height:r,depth:i,interlace:Boolean(u),palette:Boolean(a&n.COLORTYPE_PALETTE),color:Boolean(a&n.COLORTYPE_COLOR),alpha:Boolean(a&n.COLORTYPE_ALPHA),bpp:l,colorType:a}),this._handleChunkEnd()},a.prototype._handlePLTE=function(e){this.read(e,this._parsePLTE.bind(this))},a.prototype._parsePLTE=function(e){this._crc.write(e);let t=Math.floor(e.length/3);for(let r=0;r<t;r++)this._palette.push([e[3*r],e[3*r+1],e[3*r+2],255]);this.palette(this._palette),this._handleChunkEnd()},a.prototype._handleTRNS=function(e){this.simpleTransparency(),this.read(e,this._parseTRNS.bind(this))},a.prototype._parseTRNS=function(e){if(this._crc.write(e),this._colorType===n.COLORTYPE_PALETTE_COLOR){if(0===this._palette.length)return void this.error(new Error("Transparency chunk must be after palette"));if(e.length>this._palette.length)return void this.error(new Error("More transparent colors than palette size"));for(let t=0;t<e.length;t++)this._palette[t][3]=e[t];this.palette(this._palette)}this._colorType===n.COLORTYPE_GRAYSCALE&&this.transColor([e.readUInt16BE(0)]),this._colorType===n.COLORTYPE_COLOR&&this.transColor([e.readUInt16BE(0),e.readUInt16BE(2),e.readUInt16BE(4)]),this._handleChunkEnd()},a.prototype._handleGAMA=function(e){this.read(e,this._parseGAMA.bind(this))},a.prototype._parseGAMA=function(e){this._crc.write(e),this.gamma(e.readUInt32BE(0)/n.GAMMA_DIVISION),this._handleChunkEnd()},a.prototype._handleIDAT=function(e){this._emittedHeadersFinished||(this._emittedHeadersFinished=!0,this.headersFinished()),this.read(-e,this._parseIDAT.bind(this,e))},a.prototype._parseIDAT=function(e,t){if(this._crc.write(t),this._colorType===n.COLORTYPE_PALETTE_COLOR&&0===this._palette.length)throw new Error("Expected palette not found");this.inflateData(t);let r=e-t.length;r>0?this._handleIDAT(r):this._handleChunkEnd()},a.prototype._handleIEND=function(e){this.read(e,this._parseIEND.bind(this))},a.prototype._parseIEND=function(e){this._crc.write(e),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}}).call(this)}).call(this,e("buffer").Buffer)},{"./constants":4,"./crc":5,buffer:32}],19:[function(e,t,r){let n=e("./parser-sync"),i=e("./packer-sync");r.read=function(e,t){return n(e,t||{})},r.write=function(e,t){return i(e,t)}},{"./packer-sync":13,"./parser-sync":17}],20:[function(e,t,r){(function(t,n){(function(){let i=e("util"),a=e("stream"),o=e("./parser-async"),s=e("./packer-async"),u=e("./png-sync"),l=r.PNG=function(e){a.call(this),e=e||{},this.width=0|e.width,this.height=0|e.height,this.data=this.width>0&&this.height>0?n.alloc(4*this.width*this.height):null,e.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new o(e),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",function(e){this.data=e,this.emit("parsed",e)}.bind(this)),this._packer=new s(e),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};i.inherits(l,a),l.sync=u,l.prototype.pack=function(){return this.data&&this.data.length?(t.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this):(this.emit("error","No data provided"),this)},l.prototype.parse=function(e,t){if(t){let e,r;e=function(e){this.removeListener("error",r),this.data=e,t(null,this)}.bind(this),r=function(r){this.removeListener("parsed",e),t(r,null)}.bind(this),this.once("parsed",e),this.once("error",r)}return this.end(e),this},l.prototype.write=function(e){return this._parser.write(e),!0},l.prototype.end=function(e){this._parser.end(e)},l.prototype._metadata=function(e){this.width=e.width,this.height=e.height,this.emit("metadata",e)},l.prototype._gamma=function(e){this.gamma=e},l.prototype._handleClose=function(){this._parser.writable||this._packer.readable||this.emit("close")},l.bitblt=function(e,t,r,n,i,a,o,s){if(n|=0,i|=0,a|=0,o|=0,s|=0,(r|=0)>e.width||n>e.height||r+i>e.width||n+a>e.height)throw new Error("bitblt reading outside image");if(o>t.width||s>t.height||o+i>t.width||s+a>t.height)throw new Error("bitblt writing outside image");for(let u=0;u<a;u++)e.data.copy(t.data,(s+u)*t.width+o<<2,(n+u)*e.width+r<<2,(n+u)*e.width+r+i<<2)},l.prototype.bitblt=function(e,t,r,n,i,a,o){return l.bitblt(this,e,t,r,n,i,a,o),this},l.adjustGamma=function(e){if(e.gamma){for(let t=0;t<e.height;t++)for(let r=0;r<e.width;r++){let n=e.width*t+r<<2;for(let t=0;t<3;t++){let r=e.data[n+t]/255;r=Math.pow(r,1/2.2/e.gamma),e.data[n+t]=Math.round(255*r)}}e.gamma=0}},l.prototype.adjustGamma=function(){l.adjustGamma(this)}}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{"./packer-async":12,"./parser-async":16,"./png-sync":19,_process:63,buffer:32,stream:65,util:84}],21:[function(e,t,r){(function(n,i){(function(){let n=e("assert").ok,a=e("zlib"),o=e("util"),s=e("buffer").kMaxLength;function u(e){if(!(this instanceof u))return new u(e);e&&e.chunkSize<a.Z_MIN_CHUNK&&(e.chunkSize=a.Z_MIN_CHUNK),a.Inflate.call(this,e),this._offset=void 0===this._offset?this._outOffset:this._offset,this._buffer=this._buffer||this._outBuffer,e&&null!=e.maxLength&&(this._maxLength=e.maxLength)}function l(e,t){e._handle&&(e._handle.close(),e._handle=null)}function c(e,t){return function(e,t){if("string"==typeof t&&(t=i.from(t)),!(t instanceof i))throw new TypeError("Not a string or buffer");let r=e._finishFlushFlag;return null==r&&(r=a.Z_FINISH),e._processChunk(t,r)}(new u(t),e)}u.prototype._processChunk=function(e,t,r){if("function"==typeof r)return a.Inflate._processChunk.call(this,e,t,r);let o,u,c=this,f=e&&e.length,h=this._chunkSize-this._offset,d=this._maxLength,p=0,m=[],g=0;function b(e,t){if(c._hadError)return;let r=h-t;if(n(r>=0,"have should not go down"),r>0){let e=c._buffer.slice(c._offset,c._offset+r);if(c._offset+=r,e.length>d&&(e=e.slice(0,d)),m.push(e),g+=e.length,d-=e.length,0===d)return!1}return(0===t||c._offset>=c._chunkSize)&&(h=c._chunkSize,c._offset=0,c._buffer=i.allocUnsafe(c._chunkSize)),0===t&&(p+=f-e,f=e,!0)}this.on("error",function(e){o=e}),n(this._handle,"zlib binding closed");do{u=this._handle.writeSync(t,e,p,f,this._buffer,this._offset,h),u=u||this._writeState}while(!this._hadError&&b(u[0],u[1]));if(this._hadError)throw o;if(g>=s)throw l(this),new RangeError("Cannot create final Buffer. It would be larger than 0x"+s.toString(16)+" bytes");let y=i.concat(m,g);return l(this),y},o.inherits(u,a.Inflate),t.exports=r=c,r.Inflate=u,r.createInflate=function(e){return new u(e)},r.inflateSync=c}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{_process:63,assert:23,buffer:32,util:84,zlib:31}],22:[function(e,t,r){let n=t.exports=function(e){this._buffer=e,this._reads=[]};n.prototype.read=function(e,t){this._reads.push({length:Math.abs(e),allowLess:e<0,func:t})},n.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let e=this._reads[0];if(!this._buffer.length||!(this._buffer.length>=e.length||e.allowLess))break;{this._reads.shift();let t=this._buffer;this._buffer=t.slice(e.length),e.func.call(this,t.slice(0,e.length))}}if(this._reads.length>0)throw new Error("There are some read requests waitng on finished stream");if(this._buffer.length>0)throw new Error("unrecognised content at end of stream")}},{}],23:[function(e,t,r){(function(r){(function(){var n=e("object-assign");function i(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0}function a(e){return r.Buffer&&"function"==typeof r.Buffer.isBuffer?r.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var o=e("util/"),s=Object.prototype.hasOwnProperty,u=Array.prototype.slice,l="foo"===function(){}.name;function c(e){return Object.prototype.toString.call(e)}function f(e){return!a(e)&&"function"==typeof r.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer)))}var h=t.exports=y,d=/\s*function\s+([^\(\s]*)\s*/;function p(e){if(o.isFunction(e)){if(l)return e.name;var t=e.toString().match(d);return t&&t[1]}}function m(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function g(e){if(l||!o.isFunction(e))return o.inspect(e);var t=p(e);return"[Function"+(t?": "+t:"")+"]"}function b(e,t,r,n,i){throw new h.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:i})}function y(e,t){e||b(e,!0,t,"==",h.ok)}function _(e,t,r,n){if(e===t)return!0;if(a(e)&&a(t))return 0===i(e,t);if(o.isDate(e)&&o.isDate(t))return e.getTime()===t.getTime();if(o.isRegExp(e)&&o.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(f(e)&&f(t)&&c(e)===c(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===i(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(a(e)!==a(t))return!1;var s=(n=n||{actual:[],expected:[]}).actual.indexOf(e);return-1!==s&&s===n.expected.indexOf(t)||(n.actual.push(e),n.expected.push(t),function(e,t,r,n){if(null==e||null==t)return!1;if(o.isPrimitive(e)||o.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var i=v(e),a=v(t);if(i&&!a||!i&&a)return!1;if(i)return _(e=u.call(e),t=u.call(t),r);var s,l,c=k(e),f=k(t);if(c.length!==f.length)return!1;for(c.sort(),f.sort(),l=c.length-1;l>=0;l--)if(c[l]!==f[l])return!1;for(l=c.length-1;l>=0;l--)if(!_(e[s=c[l]],t[s],r,n))return!1;return!0}(e,t,r,n))}return r?e===t:e==t}function v(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function w(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function x(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&b(i,r,"Missing expected exception"+n);var a="string"==typeof n,s=!e&&i&&!r;if((!e&&o.isError(i)&&a&&w(i,r)||s)&&b(i,r,"Got unwanted exception"+n),e&&i&&r&&!w(i,r)||!e&&i)throw i}h.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=function(e){return m(g(e.actual),128)+" "+e.operator+" "+m(g(e.expected),128)}(this),this.generatedMessage=!0);var t=e.stackStartFunction||b;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=p(t),a=n.indexOf("\n"+i);if(a>=0){var o=n.indexOf("\n",a+1);n=n.substring(o+1)}this.stack=n}}},o.inherits(h.AssertionError,Error),h.fail=b,h.ok=y,h.equal=function(e,t,r){e!=t&&b(e,t,r,"==",h.equal)},h.notEqual=function(e,t,r){e==t&&b(e,t,r,"!=",h.notEqual)},h.deepEqual=function(e,t,r){_(e,t,!1)||b(e,t,r,"deepEqual",h.deepEqual)},h.deepStrictEqual=function(e,t,r){_(e,t,!0)||b(e,t,r,"deepStrictEqual",h.deepStrictEqual)},h.notDeepEqual=function(e,t,r){_(e,t,!1)&&b(e,t,r,"notDeepEqual",h.notDeepEqual)},h.notDeepStrictEqual=function e(t,r,n){_(t,r,!0)&&b(t,r,n,"notDeepStrictEqual",e)},h.strictEqual=function(e,t,r){e!==t&&b(e,t,r,"===",h.strictEqual)},h.notStrictEqual=function(e,t,r){e===t&&b(e,t,r,"!==",h.notStrictEqual)},h.throws=function(e,t,r){x(!0,e,t,r)},h.doesNotThrow=function(e,t,r){x(!1,e,t,r)},h.ifError=function(e){if(e)throw e},h.strict=n(function e(t,r){t||b(t,!0,r,"==",e)},h,{equal:h.strictEqual,deepEqual:h.deepStrictEqual,notEqual:h.notStrictEqual,notDeepEqual:h.notDeepStrictEqual}),h.strict.strict=h.strict;var k=Object.keys||function(e){var t=[];for(var r in e)s.call(e,r)&&t.push(r);return t}}).call(this)}).call(this,void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"object-assign":51,"util/":26}],24:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},{}],25:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],26:[function(e,t,r){(function(t,n){(function(){var i=/%[sdj%]/g;r.format=function(e){if(!y(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(s(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,a=n.length,o=String(e).replace(i,function(e){if("%%"===e)return"%";if(r>=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),u=n[r];r<a;u=n[++r])g(u)||!w(u)?o+=" "+u:o+=" "+s(u);return o},r.deprecate=function(e,i){if(_(n.process))return function(){return r.deprecate(e,i).apply(this,arguments)};if(!0===t.noDeprecation)return e;var a=!1;return function(){if(!a){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation?console.trace(i):console.error(i),a=!0}return e.apply(this,arguments)}};var a,o={};function s(e,t){var n={seen:[],stylize:l};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(t)?n.showHidden=t:t&&r._extend(n,t),_(n.showHidden)&&(n.showHidden=!1),_(n.depth)&&(n.depth=2),_(n.colors)&&(n.colors=!1),_(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),c(n,e,n.depth)}function u(e,t){var r=s.styles[t];return r?"["+s.colors[r][0]+"m"+e+"["+s.colors[r][1]+"m":e}function l(e,t){return e}function c(e,t,n){if(e.customInspect&&t&&B(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return y(i)||(i=c(e,i,n)),i}var a=f(e,t);if(a)return a;var o=Object.keys(t),s=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),k(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return h(t);if(0===o.length){if(B(t)){var u=t.name?": "+t.name:"";return e.stylize("[Function"+u+"]","special")}if(v(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(x(t))return e.stylize(Date.prototype.toString.call(t),"date");if(k(t))return h(t)}var l,m="",g=!1,b=["{","}"];return p(t)&&(g=!0,b=["[","]"]),B(t)&&(m=" [Function"+(t.name?": "+t.name:"")+"]"),v(t)&&(m=" "+RegExp.prototype.toString.call(t)),x(t)&&(m=" "+Date.prototype.toUTCString.call(t)),k(t)&&(m=" "+h(t)),0!==o.length||g&&0!=t.length?n<0?v(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),l=g?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o<s;++o)C(t,String(o))?a.push(d(e,t,r,n,String(o),!0)):a.push("");return i.forEach(function(i){i.match(/^\d+$/)||a.push(d(e,t,r,n,i,!0))}),a}(e,t,n,s,o):o.map(function(r){return d(e,t,n,s,r,g)}),e.seen.pop(),function(e,t,r){return e.reduce(function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(l,m,b)):b[0]+m+b[1]}function f(e,t){if(_(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return b(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):g(t)?e.stylize("null","null"):void 0}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,i,a){var o,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),C(n,i)||(o="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=g(r)?c(e,u.value,null):c(e,u.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),_(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function p(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function g(e){return null===e}function b(e){return"number"==typeof e}function y(e){return"string"==typeof e}function _(e){return void 0===e}function v(e){return w(e)&&"[object RegExp]"===E(e)}function w(e){return"object"==typeof e&&null!==e}function x(e){return w(e)&&"[object Date]"===E(e)}function k(e){return w(e)&&("[object Error]"===E(e)||e instanceof Error)}function B(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function S(e){return e<10?"0"+e.toString(10):e.toString(10)}r.debuglog=function(e){if(_(a)&&(a=t.env.NODE_DEBUG||""),e=e.toUpperCase(),!o[e])if(new RegExp("\\b"+e+"\\b","i").test(a)){var n=t.pid;o[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else o[e]=function(){};return o[e]},r.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=p,r.isBoolean=m,r.isNull=g,r.isNullOrUndefined=function(e){return null==e},r.isNumber=b,r.isString=y,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=_,r.isRegExp=v,r.isObject=w,r.isDate=x,r.isError=k,r.isFunction=B,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer");var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){console.log("%s - %s",function(){var e=new Date,t=[S(e.getHours()),S(e.getMinutes()),S(e.getSeconds())].join(":");return[e.getDate(),A[e.getMonth()],t].join(" ")}(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this)}).call(this,e("_process"),void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":25,_process:63,inherits:24}],27:[function(e,t,r){(function(e){(function(){var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],n="undefined"==typeof globalThis?e:globalThis;t.exports=function(){for(var e=[],t=0;t<r.length;t++)"function"==typeof n[r[t]]&&(e[e.length]=r[t]);return e}}).call(this)}).call(this,void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],28:[function(e,t,r){r.byteLength=function(e){var t=u(e),r=t[0],n=t[1];return 3*(r+n)/4-n},r.toByteArray=function(e){var t,r,n=u(e),o=n[0],s=n[1],l=new a(function(e,t,r){return 3*(t+r)/4-r}(0,o,s)),c=0,f=s>0?o-4:o;for(r=0;r<f;r+=4)t=i[e.charCodeAt(r)]<<18|i[e.charCodeAt(r+1)]<<12|i[e.charCodeAt(r+2)]<<6|i[e.charCodeAt(r+3)],l[c++]=t>>16&255,l[c++]=t>>8&255,l[c++]=255&t;return 2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,l[c++]=255&t),1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t),l},r.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=16383,s=0,u=r-i;s<u;s+=o)a.push(c(e,s,s+o>u?u:s+o));return 1===i?(t=e[r-1],a.push(n[t>>2]+n[t<<4&63]+"==")):2===i&&(t=(e[r-2]<<8)+e[r-1],a.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),a.join("")};for(var n=[],i=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=o[s],i[o.charCodeAt(s)]=s;function u(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function l(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function c(e,t,r){for(var n,i=[],a=t;a<r;a+=3)n=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),i.push(l(n));return i.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],29:[function(e,t,r){},{}],30:[function(e,t,r){(function(t,n){(function(){var i=e("assert"),a=e("pako/lib/zlib/zstream"),o=e("pako/lib/zlib/deflate.js"),s=e("pako/lib/zlib/inflate.js"),u=e("pako/lib/zlib/constants");for(var l in u)r[l]=u[l];function c(e){if("number"!=typeof e||e<r.DEFLATE||e>r.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=e,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}r.NONE=0,r.DEFLATE=1,r.INFLATE=2,r.GZIP=3,r.GUNZIP=4,r.DEFLATERAW=5,r.INFLATERAW=6,r.UNZIP=7,c.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,i(this.init_done,"close before init"),i(this.mode<=r.UNZIP),this.mode===r.DEFLATE||this.mode===r.GZIP||this.mode===r.DEFLATERAW?o.deflateEnd(this.strm):this.mode!==r.INFLATE&&this.mode!==r.GUNZIP&&this.mode!==r.INFLATERAW&&this.mode!==r.UNZIP||s.inflateEnd(this.strm),this.mode=r.NONE,this.dictionary=null)},c.prototype.write=function(e,t,r,n,i,a,o){return this._write(!0,e,t,r,n,i,a,o)},c.prototype.writeSync=function(e,t,r,n,i,a,o){return this._write(!1,e,t,r,n,i,a,o)},c.prototype._write=function(e,a,o,s,u,l,c,f){if(i.equal(arguments.length,8),i(this.init_done,"write before init"),i(this.mode!==r.NONE,"already finalized"),i.equal(!1,this.write_in_progress,"write already in progress"),i.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,i.equal(!1,void 0===a,"must provide flush value"),this.write_in_progress=!0,a!==r.Z_NO_FLUSH&&a!==r.Z_PARTIAL_FLUSH&&a!==r.Z_SYNC_FLUSH&&a!==r.Z_FULL_FLUSH&&a!==r.Z_FINISH&&a!==r.Z_BLOCK)throw new Error("Invalid flush value");if(null==o&&(o=n.alloc(0),u=0,s=0),this.strm.avail_in=u,this.strm.input=o,this.strm.next_in=s,this.strm.avail_out=f,this.strm.output=l,this.strm.next_out=c,this.flush=a,!e)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 e=this.strm.avail_out,t=this.strm.avail_in;return this.write_in_progress=!1,[t,e]},c.prototype._process=function(){var e=null;switch(this.mode){case r.DEFLATE:case r.GZIP:case r.DEFLATERAW:this.err=o.deflate(this.strm,this.flush);break;case r.UNZIP:switch(this.strm.avail_in>0&&(e=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===e)break;if(31!==this.strm.input[e]){this.mode=r.INFLATE;break}if(this.gzip_id_bytes_read=1,e++,1===this.strm.avail_in)break;case 1:if(null===e)break;139===this.strm.input[e]?(this.gzip_id_bytes_read=2,this.mode=r.GUNZIP):this.mode=r.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case r.INFLATE:case r.GUNZIP:case r.INFLATERAW:for(this.err=s.inflate(this.strm,this.flush),this.err===r.Z_NEED_DICT&&this.dictionary&&(this.err=s.inflateSetDictionary(this.strm,this.dictionary),this.err===r.Z_OK?this.err=s.inflate(this.strm,this.flush):this.err===r.Z_DATA_ERROR&&(this.err=r.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===r.GUNZIP&&this.err===r.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 r.Z_OK:case r.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===r.Z_FINISH)return this._error("unexpected end of file"),!1;break;case r.Z_STREAM_END:break;case r.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 e=this.strm.avail_out,t=this.strm.avail_in;this.write_in_progress=!1,this.callback(t,e),this.pending_close&&this.close()}},c.prototype._error=function(e){this.strm.msg&&(e=this.strm.msg),this.onerror(e,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},c.prototype.init=function(e,t,n,a,o){i(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),i(e>=8&&e<=15,"invalid windowBits"),i(t>=-1&&t<=9,"invalid compression level"),i(n>=1&&n<=9,"invalid memlevel"),i(a===r.Z_FILTERED||a===r.Z_HUFFMAN_ONLY||a===r.Z_RLE||a===r.Z_FIXED||a===r.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(t,e,n,a,o),this._setDictionary()},c.prototype.params=function(){throw new Error("deflateParams Not supported")},c.prototype.reset=function(){this._reset(),this._setDictionary()},c.prototype._init=function(e,t,n,i,u){switch(this.level=e,this.windowBits=t,this.memLevel=n,this.strategy=i,this.flush=r.Z_NO_FLUSH,this.err=r.Z_OK,this.mode!==r.GZIP&&this.mode!==r.GUNZIP||(this.windowBits+=16),this.mode===r.UNZIP&&(this.windowBits+=32),this.mode!==r.DEFLATERAW&&this.mode!==r.INFLATERAW||(this.windowBits=-1*this.windowBits),this.strm=new a,this.mode){case r.DEFLATE:case r.GZIP:case r.DEFLATERAW:this.err=o.deflateInit2(this.strm,this.level,r.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case r.INFLATE:case r.GUNZIP:case r.INFLATERAW:case r.UNZIP:this.err=s.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==r.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=r.Z_OK,this.mode){case r.DEFLATE:case r.DEFLATERAW:this.err=o.deflateSetDictionary(this.strm,this.dictionary)}this.err!==r.Z_OK&&this._error("Failed to set dictionary")}},c.prototype._reset=function(){switch(this.err=r.Z_OK,this.mode){case r.DEFLATE:case r.DEFLATERAW:case r.GZIP:this.err=o.deflateReset(this.strm);break;case r.INFLATE:case r.INFLATERAW:case r.GUNZIP:this.err=s.inflateReset(this.strm)}this.err!==r.Z_OK&&this._error("Failed to reset stream")},r.Zlib=c}).call(this)}).call(this,e("_process"),e("buffer").Buffer)},{_process:63,assert:23,buffer:32,"pako/lib/zlib/constants":54,"pako/lib/zlib/deflate.js":56,"pako/lib/zlib/inflate.js":58,"pako/lib/zlib/zstream":62}],31:[function(e,t,r){(function(t){(function(){var n=e("buffer").Buffer,i=e("stream").Transform,a=e("./binding"),o=e("util"),s=e("assert").ok,u=e("buffer").kMaxLength,l="Cannot create final Buffer. It would be larger than 0x"+u.toString(16)+" bytes";a.Z_MIN_WINDOWBITS=8,a.Z_MAX_WINDOWBITS=15,a.Z_DEFAULT_WINDOWBITS=15,a.Z_MIN_CHUNK=64,a.Z_MAX_CHUNK=1/0,a.Z_DEFAULT_CHUNK=16384,a.Z_MIN_MEMLEVEL=1,a.Z_MAX_MEMLEVEL=9,a.Z_DEFAULT_MEMLEVEL=8,a.Z_MIN_LEVEL=-1,a.Z_MAX_LEVEL=9,a.Z_DEFAULT_LEVEL=a.Z_DEFAULT_COMPRESSION;for(var c=Object.keys(a),f=0;f<c.length;f++){var h=c[f];h.match(/^Z/)&&Object.defineProperty(r,h,{enumerable:!0,value:a[h],writable:!1})}for(var d={Z_OK:a.Z_OK,Z_STREAM_END:a.Z_STREAM_END,Z_NEED_DICT:a.Z_NEED_DICT,Z_ERRNO:a.Z_ERRNO,Z_STREAM_ERROR:a.Z_STREAM_ERROR,Z_DATA_ERROR:a.Z_DATA_ERROR,Z_MEM_ERROR:a.Z_MEM_ERROR,Z_BUF_ERROR:a.Z_BUF_ERROR,Z_VERSION_ERROR:a.Z_VERSION_ERROR},p=Object.keys(d),m=0;m<p.length;m++){var g=p[m];d[d[g]]=g}function b(e,t,r){var i=[],a=0;function o(){for(var t;null!==(t=e.read());)i.push(t),a+=t.length;e.once("readable",o)}function s(){var t,o=null;a>=u?o=new RangeError(l):t=n.concat(i,a),i=[],e.close(),r(o,t)}e.on("error",function(t){e.removeListener("end",s),e.removeListener("readable",o),r(t)}),e.on("end",s),e.end(t),o()}function y(e,t){if("string"==typeof t&&(t=n.from(t)),!n.isBuffer(t))throw new TypeError("Not a string or buffer");var r=e._finishFlushFlag;return e._processChunk(t,r)}function _(e){if(!(this instanceof _))return new _(e);A.call(this,e,a.DEFLATE)}function v(e){if(!(this instanceof v))return new v(e);A.call(this,e,a.INFLATE)}function w(e){if(!(this instanceof w))return new w(e);A.call(this,e,a.GZIP)}function x(e){if(!(this instanceof x))return new x(e);A.call(this,e,a.GUNZIP)}function k(e){if(!(this instanceof k))return new k(e);A.call(this,e,a.DEFLATERAW)}function B(e){if(!(this instanceof B))return new B(e);A.call(this,e,a.INFLATERAW)}function E(e){if(!(this instanceof E))return new E(e);A.call(this,e,a.UNZIP)}function S(e){return e===a.Z_NO_FLUSH||e===a.Z_PARTIAL_FLUSH||e===a.Z_SYNC_FLUSH||e===a.Z_FULL_FLUSH||e===a.Z_FINISH||e===a.Z_BLOCK}function A(e,t){var o=this;if(this._opts=e=e||{},this._chunkSize=e.chunkSize||r.Z_DEFAULT_CHUNK,i.call(this,e),e.flush&&!S(e.flush))throw new Error("Invalid flush flag: "+e.flush);if(e.finishFlush&&!S(e.finishFlush))throw new Error("Invalid flush flag: "+e.finishFlush);if(this._flushFlag=e.flush||a.Z_NO_FLUSH,this._finishFlushFlag=void 0!==e.finishFlush?e.finishFlush:a.Z_FINISH,e.chunkSize&&(e.chunkSize<r.Z_MIN_CHUNK||e.chunkSize>r.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBits<r.Z_MIN_WINDOWBITS||e.windowBits>r.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.level<r.Z_MIN_LEVEL||e.level>r.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevel<r.Z_MIN_MEMLEVEL||e.memLevel>r.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=r.Z_FILTERED&&e.strategy!=r.Z_HUFFMAN_ONLY&&e.strategy!=r.Z_RLE&&e.strategy!=r.Z_FIXED&&e.strategy!=r.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!n.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new a.Zlib(t);var s=this;this._hadError=!1,this._handle.onerror=function(e,t){C(s),s._hadError=!0;var n=new Error(e);n.errno=t,n.code=r.codes[t],s.emit("error",n)};var u=r.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(u=e.level);var l=r.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(l=e.strategy),this._handle.init(e.windowBits||r.Z_DEFAULT_WINDOWBITS,u,e.memLevel||r.Z_DEFAULT_MEMLEVEL,l,e.dictionary),this._buffer=n.allocUnsafe(this._chunkSize),this._offset=0,this._level=u,this._strategy=l,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!o._handle},configurable:!0,enumerable:!0})}function C(e,r){r&&t.nextTick(r),e._handle&&(e._handle.close(),e._handle=null)}function I(e){e.emit("close")}Object.defineProperty(r,"codes",{enumerable:!0,value:Object.freeze(d),writable:!1}),r.Deflate=_,r.Inflate=v,r.Gzip=w,r.Gunzip=x,r.DeflateRaw=k,r.InflateRaw=B,r.Unzip=E,r.createDeflate=function(e){return new _(e)},r.createInflate=function(e){return new v(e)},r.createDeflateRaw=function(e){return new k(e)},r.createInflateRaw=function(e){return new B(e)},r.createGzip=function(e){return new w(e)},r.createGunzip=function(e){return new x(e)},r.createUnzip=function(e){return new E(e)},r.deflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new _(t),e,r)},r.deflateSync=function(e,t){return y(new _(t),e)},r.gzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new w(t),e,r)},r.gzipSync=function(e,t){return y(new w(t),e)},r.deflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new k(t),e,r)},r.deflateRawSync=function(e,t){return y(new k(t),e)},r.unzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new E(t),e,r)},r.unzipSync=function(e,t){return y(new E(t),e)},r.inflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new v(t),e,r)},r.inflateSync=function(e,t){return y(new v(t),e)},r.gunzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new x(t),e,r)},r.gunzipSync=function(e,t){return y(new x(t),e)},r.inflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),b(new B(t),e,r)},r.inflateRawSync=function(e,t){return y(new B(t),e)},o.inherits(A,i),A.prototype.params=function(e,n,i){if(e<r.Z_MIN_LEVEL||e>r.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(n!=r.Z_FILTERED&&n!=r.Z_HUFFMAN_ONLY&&n!=r.Z_RLE&&n!=r.Z_FIXED&&n!=r.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+n);if(this._level!==e||this._strategy!==n){var o=this;this.flush(a.Z_SYNC_FLUSH,function(){s(o._handle,"zlib binding closed"),o._handle.params(e,n),o._hadError||(o._level=e,o._strategy=n,i&&i())})}else t.nextTick(i)},A.prototype.reset=function(){return s(this._handle,"zlib binding closed"),this._handle.reset()},A.prototype._flush=function(e){this._transform(n.alloc(0),"",e)},A.prototype.flush=function(e,r){var i=this,o=this._writableState;("function"==typeof e||void 0===e&&!r)&&(r=e,e=a.Z_FULL_FLUSH),o.ended?r&&t.nextTick(r):o.ending?r&&this.once("end",r):o.needDrain?r&&this.once("drain",function(){return i.flush(e,r)}):(this._flushFlag=e,this.write(n.alloc(0),"",r))},A.prototype.close=function(e){C(this,e),t.nextTick(I,this)},A.prototype._transform=function(e,t,r){var i,o=this._writableState,s=(o.ending||o.ended)&&(!e||o.length===e.length);return null===e||n.isBuffer(e)?this._handle?(s?i=this._finishFlushFlag:(i=this._flushFlag,e.length>=o.length&&(this._flushFlag=this._opts.flush||a.Z_NO_FLUSH)),void this._processChunk(e,i,r)):r(new Error("zlib binding closed")):r(new Error("invalid input"))},A.prototype._processChunk=function(e,t,r){var i=e&&e.length,a=this._chunkSize-this._offset,o=0,c=this,f="function"==typeof r;if(!f){var h,d=[],p=0;this.on("error",function(e){h=e}),s(this._handle,"zlib binding closed");do{var m=this._handle.writeSync(t,e,o,i,this._buffer,this._offset,a)}while(!this._hadError&&y(m[0],m[1]));if(this._hadError)throw h;if(p>=u)throw C(this),new RangeError(l);var g=n.concat(d,p);return C(this),g}s(this._handle,"zlib binding closed");var b=this._handle.write(t,e,o,i,this._buffer,this._offset,a);function y(u,l){if(this&&(this.buffer=null,this.callback=null),!c._hadError){var h=a-l;if(s(h>=0,"have should not go down"),h>0){var m=c._buffer.slice(c._offset,c._offset+h);c._offset+=h,f?c.push(m):(d.push(m),p+=m.length)}if((0===l||c._offset>=c._chunkSize)&&(a=c._chunkSize,c._offset=0,c._buffer=n.allocUnsafe(c._chunkSize)),0===l){if(o+=i-u,i=u,!f)return!0;var g=c._handle.write(t,e,o,i,c._buffer,c._offset,c._chunkSize);return g.callback=y,void(g.buffer=e)}if(!f)return!1;r()}}b.buffer=e,b.callback=y},o.inherits(_,A),o.inherits(v,A),o.inherits(w,A),o.inherits(x,A),o.inherits(k,A),o.inherits(B,A),o.inherits(E,A)}).call(this)}).call(this,e("_process"))},{"./binding":30,_process:63,assert:23,buffer:32,stream:65,util:84}],32:[function(e,t,r){(function(t){(function(){var t=e("base64-js"),n=e("ieee754");r.Buffer=o,r.SlowBuffer=function(e){return+e!=e&&(e=0),o.alloc(+e)},r.INSPECT_MAX_BYTES=50;var i=2147483647;function a(e){if(e>i)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return t.__proto__=o.prototype,t}function o(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return s(e,t,r)}function s(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!o.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var r=0|h(e,t),n=a(r),i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return c(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(U(e,ArrayBuffer)||e&&U(e.buffer,ArrayBuffer))return function(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r)).__proto__=o.prototype,n}(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return o.from(n,t,r);var i=function(e){if(o.isBuffer(e)){var t=0|f(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||$(e.length)?a(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return o.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return u(e),a(e<0?0:0|f(e))}function c(e){for(var t=e.length<0?0:0|f(e.length),r=a(t),n=0;n<t;n+=1)r[n]=255&e[n];return r}function f(e){if(e>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return 0|e}function h(e,t){if(o.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||U(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return L(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(e).length;default:if(i)return n?-1:L(e).length;t=(""+t).toLowerCase(),i=!0}}function d(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,t,r);case"utf8":case"utf-8":return B(this,t,r);case"ascii":return S(this,t,r);case"latin1":case"binary":return A(this,t,r);case"base64":return k(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function p(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),$(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function g(e,t,r,n,i){var a,o=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,r/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=r;a<s;a++)if(l(e,a)===l(t,-1===c?0:a-c)){if(-1===c&&(c=a),a-c+1===u)return c*o}else-1!==c&&(a-=a-c),c=-1}else for(r+u>s&&(r=s-u),a=r;a>=0;a--){for(var f=!0,h=0;h<u;h++)if(l(e,a+h)!==l(t,h)){f=!1;break}if(f)return a}return-1}function b(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=t.length;n>a/2&&(n=a/2);for(var o=0;o<n;++o){var s=parseInt(t.substr(2*o,2),16);if($(s))return o;e[r+o]=s}return o}function y(e,t,r,n){return z(L(t,e.length-r),e,r,n)}function _(e,t,r,n){return z(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function v(e,t,r,n){return _(e,t,r,n)}function w(e,t,r,n){return z(D(t),e,r,n)}function x(e,t,r,n){return z(function(e,t){for(var r,n,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function k(e,r,n){return 0===r&&n===e.length?t.fromByteArray(e):t.fromByteArray(e.slice(r,n))}function B(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var a,o,s,u,l=e[i],c=null,f=l>239?4:l>223?3:l>191?2:1;if(i+f<=r)switch(f){case 1:l<128&&(c=l);break;case 2:128==(192&(a=e[i+1]))&&(u=(31&l)<<6|63&a)>127&&(c=u);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(u=(15&l)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(u=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,f=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=f}return function(e){var t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=E));return r}(n)}r.kMaxLength=i,o.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),o.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(o.prototype,"parent",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.buffer}}),Object.defineProperty(o.prototype,"offset",{enumerable:!0,get:function(){if(o.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),o.poolSize=8192,o.from=function(e,t,r){return s(e,t,r)},o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,o.alloc=function(e,t,r){return function(e,t,r){return u(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},o.allocUnsafe=function(e){return l(e)},o.allocUnsafeSlow=function(e){return l(e)},o.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==o.prototype},o.compare=function(e,t){if(U(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),U(t,Uint8Array)&&(t=o.from(t,t.offset,t.byteLength)),!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i<a;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},o.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},o.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return o.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=o.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(U(a,Uint8Array)&&(a=o.from(a)),!o.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},o.byteLength=h,o.prototype._isBuffer=!0,o.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)p(this,t,t+1);return this},o.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)p(this,t,t+3),p(this,t+1,t+2);return this},o.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)p(this,t,t+7),p(this,t+1,t+6),p(this,t+2,t+5),p(this,t+3,t+4);return this},o.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?B(this,0,e):d.apply(this,arguments)},o.prototype.toLocaleString=o.prototype.toString,o.prototype.equals=function(e){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===o.compare(this,e)},o.prototype.inspect=function(){var e="",t=r.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},o.prototype.compare=function(e,t,r,n,i){if(U(e,Uint8Array)&&(e=o.from(e,e.offset,e.byteLength)),!o.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0),u=Math.min(a,s),l=this.slice(n,i),c=e.slice(t,r),f=0;f<u;++f)if(l[f]!==c[f]){a=l[f],s=c[f];break}return a<s?-1:s<a?1:0},o.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},o.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},o.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},o.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return b(this,e,t,r);case"utf8":case"utf-8":return y(this,e,t,r);case"ascii":return _(this,e,t,r);case"latin1":case"binary":return v(this,e,t,r);case"base64":return w(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var E=4096;function S(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function A(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function C(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",a=t;a<r;++a)i+=N(e[a]);return i}function I(e,t,r){for(var n=e.slice(t,r),i="",a=0;a<n.length;a+=2)i+=String.fromCharCode(n[a]+256*n[a+1]);return i}function P(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function T(e,t,r,n,i,a){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<a)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function M(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function R(e,t,r,i,a){return t=+t,r>>>=0,a||M(e,0,r,4),n.write(e,t,r,i,23,4),r+4}function F(e,t,r,i,a){return t=+t,r>>>=0,a||M(e,0,r,8),n.write(e,t,r,i,52,8),r+8}o.prototype.slice=function(e,t){var r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);var n=this.subarray(e,t);return n.__proto__=o.prototype,n},o.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n},o.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);for(var n=this[e],i=1,a=0;++a<t&&(i*=256);)n+=this[e+a]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},o.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},o.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return e>>>=0,t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),n.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),n.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),n.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),n.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||T(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a<r&&(i*=256);)this[t+a]=e/i&255;return t+r},o.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||T(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},o.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,1,255,0),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);T(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<r&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){var i=Math.pow(2,8*r-1);T(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||T(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},o.prototype.writeFloatLE=function(e,t,r){return R(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return R(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return F(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return F(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(!o.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i=n-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,r,n);else if(this===e&&r<t&&t<n)for(var a=i-1;a>=0;--a)e[a+t]=this[a+r];else Uint8Array.prototype.set.call(e,this.subarray(r,n),t);return i},o.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!o.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){var i=e.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(e=i)}}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var a;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a<r;++a)this[a]=e;else{var s=o.isBuffer(e)?e:o.from(e,n),u=s.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<r-t;++a)this[a+t]=s[a%u]}return this};var O=/[^+/0-9A-Za-z-_]/g;function N(e){return e<16?"0"+e.toString(16):e.toString(16)}function L(e,t){var r;t=t||1/0;for(var n=e.length,i=null,a=[],o=0;o<n;++o){if((r=e.charCodeAt(o))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function D(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(O,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function U(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function $(e){return e!=e}}).call(this)}).call(this,e("buffer").Buffer)},{"base64-js":28,buffer:32,ieee754:45}],33:[function(e,t,r){var n=e("get-intrinsic"),i=e("./"),a=i(n("String.prototype.indexOf"));t.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&a(e,".prototype.")>-1?i(r):r}},{"./":34,"get-intrinsic":39}],34:[function(e,t,r){var n=e("function-bind"),i=e("get-intrinsic"),a=i("%Function.prototype.apply%"),o=i("%Function.prototype.call%"),s=i("%Reflect.apply%",!0)||n.call(o,a),u=i("%Object.getOwnPropertyDescriptor%",!0),l=i("%Object.defineProperty%",!0),c=i("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}t.exports=function(e){var t=s(n,o,arguments);return u&&l&&u(t,"length").configurable&&l(t,"length",{value:1+c(0,e.length-(arguments.length-1))}),t};var f=function(){return s(n,a,arguments)};l?l(t.exports,"apply",{value:f}):t.exports.apply=f},{"function-bind":38,"get-intrinsic":39}],35:[function(e,t,r){var n,i="object"==typeof Reflect?Reflect:null,a=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};n=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var o=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}t.exports=s,t.exports.once=function(e,t){return new Promise(function(r,n){function i(r){e.removeListener(t,a),n(r)}function a(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}b(e,t,a,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&b(e,"error",t,{once:!0})}(e,i)})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var u=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function f(e,t,r,n){var i,a,o;if(l(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]),void 0===o)o=a[t]=r,++e._eventsCount;else if("function"==typeof o?o=a[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,function(e){console&&console.warn&&console.warn(e)}(s)}return e}function h(){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(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function p(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):g(i,i.length)}function m(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function g(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function b(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function i(a){n.once&&e.removeEventListener(t,i),r(a)})}}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");u=e}}),s.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},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||o(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,i=this._events;if(void 0!==i)n=n&&void 0===i.error;else if(!n)return!1;if(n){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var u=i[e];if(void 0===u)return!1;if("function"==typeof u)a(u,this,t);else{var l=u.length,c=g(u,l);for(r=0;r<l;++r)a(c[r],this,t)}return!0},s.prototype.addListener=function(e,t){return f(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return f(this,e,t,!0)},s.prototype.once=function(e,t){return l(t),this.on(e,d(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,d(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,n,i,a,o;if(l(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,a=r.length-1;a>=0;a--)if(r[a]===t||r[a].listener===t){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,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[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,a=Object.keys(r);for(n=0;n<a.length;++n)"removeListener"!==(i=a[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},s.prototype.listeners=function(e){return p(this,e,!0)},s.prototype.rawListeners=function(e){return p(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):m.call(e,t)},s.prototype.listenerCount=m,s.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}},{}],36:[function(e,t,r){var n=e("is-callable"),i=Object.prototype.toString,a=Object.prototype.hasOwnProperty,o=function(e,t,r){for(var n=0,i=e.length;n<i;n++)a.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))},s=function(e,t,r){for(var n in e)a.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))};t.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=r),"[object Array]"===i.call(e)?o(e,t,a):"string"==typeof e?function(e,t,r){for(var n=0,i=e.length;n<i;n++)null==r?t(e.charAt(n),n,e):t.call(r,e.charAt(n),n,e)}(e,t,a):s(e,t,a)}},{"is-callable":48}],37:[function(e,t,r){var n=Array.prototype.slice,i=Object.prototype.toString;t.exports=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==i.call(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var r,a=n.call(arguments,1),o=Math.max(0,t.length-a.length),s=[],u=0;u<o;u++)s.push("$"+u);if(r=Function("binder","return function ("+s.join(",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof r){var i=t.apply(this,a.concat(n.call(arguments)));return Object(i)===i?i:this}return t.apply(e,a.concat(n.call(arguments)))}),t.prototype){var l=function(){};l.prototype=t.prototype,r.prototype=new l,l.prototype=null}return r}},{}],38:[function(e,t,r){var n=e("./implementation");t.exports=Function.prototype.bind||n},{"./implementation":37}],39:[function(e,t,r){var n,i=SyntaxError,a=Function,o=TypeError,s=function(e){try{return a('"use strict"; return ('+e+").constructor;")()}catch(e){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(e){u=null}var l=function(){throw new o},c=u?function(){try{return l}catch(e){try{return u(arguments,"callee").get}catch(e){return l}}}():l,f=e("has-symbols")(),h=Object.getPrototypeOf||function(e){return e.__proto__},d={},p="undefined"==typeof Uint8Array?n:h(Uint8Array),m={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":f?h([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":a,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":f?h(h([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&f?h((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&f?h((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":f?h(""[Symbol.iterator]()):n,"%Symbol%":f?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":c,"%TypedArray%":p,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};try{null.error}catch(e){var g=h(h(e));m["%Error.prototype%"]=g}var b=function e(t){var r;if("%AsyncFunction%"===t)r=s("async function () {}");else if("%GeneratorFunction%"===t)r=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=s("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&(r=h(i.prototype))}return m[t]=r,r},y={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},_=e("function-bind"),v=e("has"),w=_.call(Function.call,Array.prototype.concat),x=_.call(Function.apply,Array.prototype.splice),k=_.call(Function.call,String.prototype.replace),B=_.call(Function.call,String.prototype.slice),E=_.call(Function.call,RegExp.prototype.exec),S=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,C=function(e,t){var r,n=e;if(v(y,n)&&(n="%"+(r=y[n])[0]+"%"),v(m,n)){var a=m[n];if(a===d&&(a=b(n)),void 0===a&&!t)throw new o("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:a}}throw new i("intrinsic "+e+" does not exist!")};t.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new o('"allowMissing" argument must be a boolean');if(null===E(/^%?[^%]*%?$/,e))throw new i("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=B(e,0,1),r=B(e,-1);if("%"===t&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return k(e,S,function(e,t,r,i){n[n.length]=r?k(i,A,"$1"):t||e}),n}(e),n=r.length>0?r[0]:"",a=C("%"+n+"%",t),s=a.name,l=a.value,c=!1,f=a.alias;f&&(n=f[0],x(r,w([0,1],f)));for(var h=1,d=!0;h<r.length;h+=1){var p=r[h],g=B(p,0,1),b=B(p,-1);if(('"'===g||"'"===g||"`"===g||'"'===b||"'"===b||"`"===b)&&g!==b)throw new i("property names with quotes must have matching quotes");if("constructor"!==p&&d||(c=!0),v(m,s="%"+(n+="."+p)+"%"))l=m[s];else if(null!=l){if(!(p in l)){if(!t)throw new o("base intrinsic for "+e+" exists, but the property is not available.");return}if(u&&h+1>=r.length){var y=u(l,p);l=(d=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:l[p]}else d=v(l,p),l=l[p];d&&!c&&(m[s]=l)}}return l}},{"function-bind":38,has:44,"has-symbols":41}],40:[function(e,t,r){var n=e("get-intrinsic")("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}t.exports=n},{"get-intrinsic":39}],41:[function(e,t,r){var n="undefined"!=typeof Symbol&&Symbol,i=e("./shams");t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},{"./shams":42}],42:[function(e,t,r){t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},{}],43:[function(e,t,r){var n=e("has-symbols/shams");t.exports=function(){return n()&&!!Symbol.toStringTag}},{"has-symbols/shams":42}],44:[function(e,t,r){var n=e("function-bind");t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":38}],45:[function(e,t,r){r.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,u=(1<<s)-1,l=u>>1,c=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=256*a+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+e[t+f],f+=h,c-=8);if(0===a)a=1-l;else{if(a===u)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=l}return(d?-1:1)*o*Math.pow(2,a-n)},r.write=function(e,t,r,n,i,a){var o,s,u,l=8*a-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*u-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[r+d]=255&o,d+=p,o/=256,l-=8);e[r+d-p]|=128*m}},{}],46:[function(e,t,r){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},{}],47:[function(e,t,r){var n=e("has-tostringtag/shams")(),i=e("call-bind/callBound")("Object.prototype.toString"),a=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===i(e)},o=function(e){return!!a(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"[object Function]"===i(e.callee)},s=function(){return a(arguments)}();a.isLegacyArguments=o,t.exports=s?a:o},{"call-bind/callBound":33,"has-tostringtag/shams":43}],48:[function(e,t,r){var n,i,a=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{n=Object.defineProperty({},"length",{get:function(){throw i}}),i={},o(function(){throw 42},null,n)}catch(e){e!==i&&(o=null)}else o=null;var s=/^\s*class\b/,u=function(e){try{var t=a.call(e);return s.test(t)}catch(e){return!1}},l=function(e){try{return!u(e)&&(a.call(e),!0)}catch(e){return!1}},c=Object.prototype.toString,f="function"==typeof Symbol&&!!Symbol.toStringTag,h=!(0 in[,]),d=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(d=function(e){if((h||!e)&&(void 0===e||"object"==typeof e))try{var t=c.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}t.exports=o?function(e){if(d(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,n)}catch(e){if(e!==i)return!1}return!u(e)&&l(e)}:function(e){if(d(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(f)return l(e);if(u(e))return!1;var t=c.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&l(e)}},{}],49:[function(e,t,r){var n,i=Object.prototype.toString,a=Function.prototype.toString,o=/^\s*(?:function)?\*/,s=e("has-tostringtag/shams")(),u=Object.getPrototypeOf;t.exports=function(e){if("function"!=typeof e)return!1;if(o.test(a.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===i.call(e);if(!u)return!1;if(void 0===n){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&u(t)}return u(e)===n}},{"has-tostringtag/shams":43}],50:[function(e,t,r){(function(r){(function(){var n=e("for-each"),i=e("available-typed-arrays"),a=e("call-bind/callBound"),o=a("Object.prototype.toString"),s=e("has-tostringtag/shams")(),u=e("gopd"),l="undefined"==typeof globalThis?r:globalThis,c=i(),f=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},h=a("String.prototype.slice"),d={},p=Object.getPrototypeOf;s&&u&&p&&n(c,function(e){var t=new l[e];if(Symbol.toStringTag in t){var r=p(t),n=u(r,Symbol.toStringTag);if(!n){var i=p(r);n=u(i,Symbol.toStringTag)}d[e]=n.get}}),t.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!s||!(Symbol.toStringTag in e)){var t=h(o(e),8,-1);return f(c,t)>-1}return!!u&&function(e){var t=!1;return n(d,function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}}),t}(e)}}).call(this)}).call(this,void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"available-typed-arrays":27,"call-bind/callBound":33,"for-each":36,gopd:40,"has-tostringtag/shams":43}],51:[function(e,t,r){var n=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==n.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(e){i[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var r,o,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u<arguments.length;u++){for(var l in r=Object(arguments[u]))i.call(r,l)&&(s[l]=r[l]);if(n){o=n(r);for(var c=0;c<o.length;c++)a.call(r,o[c])&&(s[o[c]]=r[o[c]])}}return s}},{}],52:[function(e,t,r){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(var n in r)i(r,n)&&(e[n]=r[n])}}return e},r.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var a={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var a=0;a<n;a++)e[i+a]=t[r+a]},flattenChunks:function(e){var t,r,n,i,a,o;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(o=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)a=e[t],o.set(a,i),i+=a.length;return o}},o={arraySet:function(e,t,r,n,i){for(var a=0;a<n;a++)e[i+a]=t[r+a]},flattenChunks:function(e){return[].concat.apply([],e)}};r.setTyped=function(e){e?(r.Buf8=Uint8Array,r.Buf16=Uint16Array,r.Buf32=Int32Array,r.assign(r,a)):(r.Buf8=Array,r.Buf16=Array,r.Buf32=Array,r.assign(r,o))},r.setTyped(n)},{}],53:[function(e,t,r){t.exports=function(e,t,r,n){for(var i=65535&e,a=e>>>16&65535,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{a=a+(i=i+t[n++]|0)|0}while(--o);i%=65521,a%=65521}return i|a<<16}},{}],54:[function(e,t,r){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}},{}],55:[function(e,t,r){var n=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();t.exports=function(e,t,r,i){var a=n,o=i+r;e^=-1;for(var s=i;s<o;s++)e=e>>>8^a[255&(e^t[s])];return~e}},{}],56:[function(e,t,r){var n,i=e("../utils/common"),a=e("./trees"),o=e("./adler32"),s=e("./crc32"),u=e("./messages"),l=-2,c=258,f=262,h=103,d=113,p=666;function m(e,t){return e.msg=u[t],t}function g(e){return(e<<1)-(e>4?9:0)}function b(e){for(var t=e.length;--t>=0;)e[t]=0}function y(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(i.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function _(e,t){a._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,y(e.strm)}function v(e,t){e.pending_buf[e.pending++]=t}function w(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function x(e,t,r,n){var a=e.avail_in;return a>n&&(a=n),0===a?0:(e.avail_in-=a,i.arraySet(t,e.input,e.next_in,a,r),1===e.state.wrap?e.adler=o(e.adler,t,a,r):2===e.state.wrap&&(e.adler=s(e.adler,t,a,r)),e.next_in+=a,e.total_in+=a,a)}function k(e,t){var r,n,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-f?e.strstart-(e.w_size-f):0,l=e.window,h=e.w_mask,d=e.prev,p=e.strstart+c,m=l[a+o-1],g=l[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(l[(r=t)+o]===g&&l[r+o-1]===m&&l[r]===l[a]&&l[++r]===l[a+1]){a+=2,r++;do{}while(l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&l[++a]===l[++r]&&a<p);if(n=c-(p-a),a=p-c,n>o){if(e.match_start=t,o=n,n>=s)break;m=l[a+o-1],g=l[a+o]}}}while((t=d[t&h])>u&&0!=--i);return o<=e.lookahead?o:e.lookahead}function B(e){var t,r,n,a,o,s=e.w_size;do{if(a=e.window_size-e.lookahead-e.strstart,e.strstart>=s+(s-f)){i.arraySet(e.window,e.window,s,s,0),e.match_start-=s,e.strstart-=s,e.block_start-=s,t=r=e.hash_size;do{n=e.head[--t],e.head[t]=n>=s?n-s:0}while(--r);t=r=s;do{n=e.prev[--t],e.prev[t]=n>=s?n-s:0}while(--r);a+=s}if(0===e.strm.avail_in)break;if(r=x(e.strm,e.window,e.strstart+e.lookahead,a),e.lookahead+=r,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+3-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<f&&0!==e.strm.avail_in)}function E(e,t){for(var r,n;;){if(e.lookahead<f){if(B(e),e.lookahead<f&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-f&&(e.match_length=k(e,r)),e.match_length>=3)if(n=a._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else n=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(_(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?1:2}function S(e,t){for(var r,n,i;;){if(e.lookahead<f){if(B(e),e.lookahead<f&&0===t)return 1;if(0===e.lookahead)break}if(r=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length<e.max_lazy_match&&e.strstart-r<=e.w_size-f&&(e.match_length=k(e,r),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-3,n=a._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(_(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((n=a._tr_tally(e,0,e.window[e.strstart-1]))&&_(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=a._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?1:2}function A(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function C(){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),b(this.dyn_ltree),b(this.dyn_dtree),b(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),b(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),b(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 I(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:d,e.adler=2===t.wrap?0:1,t.last_flush=0,a._tr_init(t),0):m(e,l)}function P(e){var t=I(e);return 0===t&&function(e){e.window_size=2*e.w_size,b(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}(e.state),t}function T(e,t,r,n,a,o){if(!e)return l;var s=1;if(-1===t&&(t=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),a<1||a>9||8!==r||n<8||n>15||t<0||t>9||o<0||o>4)return m(e,l);8===n&&(n=9);var u=new C;return e.state=u,u.strm=e,u.wrap=s,u.gzhead=null,u.w_bits=n,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=a+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<<a+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=t,u.strategy=o,u.method=r,P(e)}n=[new A(0,0,0,0,function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(B(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,_(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-f&&(_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(_(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(_(e,!1),e.strm.avail_out),1)}),new A(4,4,8,4,E),new A(4,5,16,8,E),new A(4,6,32,32,E),new A(4,4,16,16,S),new A(8,16,32,32,S),new A(8,16,128,128,S),new A(8,32,128,256,S),new A(32,128,258,1024,S),new A(32,258,258,4096,S)],r.deflateInit=function(e,t){return T(e,t,8,15,8,0)},r.deflateInit2=T,r.deflateReset=P,r.deflateResetKeep=I,r.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?l:(e.state.gzhead=t,0):l},r.deflate=function(e,t){var r,i,o,u;if(!e||!e.state||t>5||t<0)return e?m(e,l):l;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||i.status===p&&4!==t)return m(e,0===e.avail_out?-5:l);if(i.strm=e,r=i.last_flush,i.last_flush=t,42===i.status)if(2===i.wrap)e.adler=0,v(i,31),v(i,139),v(i,8),i.gzhead?(v(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)),v(i,255&i.gzhead.time),v(i,i.gzhead.time>>8&255),v(i,i.gzhead.time>>16&255),v(i,i.gzhead.time>>24&255),v(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),v(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(v(i,255&i.gzhead.extra.length),v(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(v(i,0),v(i,0),v(i,0),v(i,0),v(i,0),v(i,9===i.level?2:i.strategy>=2||i.level<2?4:0),v(i,3),i.status=d);else{var f=8+(i.w_bits-8<<4)<<8;f|=(i.strategy>=2||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(f|=32),f+=31-f%31,i.status=d,w(i,f),0!==i.strstart&&(w(i,e.adler>>>16),w(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(o=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),y(e),o=i.pending,i.pending!==i.pending_buf_size));)v(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),y(e),o=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,v(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){o=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),y(e),o=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,v(i,u)}while(0!==u);i.gzhead.hcrc&&i.pending>o&&(e.adler=s(e.adler,i.pending_buf,i.pending-o,o)),0===u&&(i.status=h)}else i.status=h;if(i.status===h&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&y(e),i.pending+2<=i.pending_buf_size&&(v(i,255&e.adler),v(i,e.adler>>8&255),e.adler=0,i.status=d)):i.status=d),0!==i.pending){if(y(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&g(t)<=g(r)&&4!==t)return m(e,-5);if(i.status===p&&0!==e.avail_in)return m(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&i.status!==p){var x=2===i.strategy?function(e,t){for(var r;;){if(0===e.lookahead&&(B(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var r,n,i,o,s=e.window;;){if(e.lookahead<=c){if(B(e),e.lookahead<=c&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(n=s[i=e.strstart-1])===s[++i]&&n===s[++i]&&n===s[++i]){o=e.strstart+c;do{}while(n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&n===s[++i]&&i<o);e.match_length=c-(o-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=a._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=a._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(_(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(_(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(_(e,!1),0===e.strm.avail_out)?1:2}(i,t):n[i.level].func(i,t);if(3!==x&&4!==x||(i.status=p),1===x||3===x)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===x&&(1===t?a._tr_align(i):5!==t&&(a._tr_stored_block(i,0,0,!1),3===t&&(b(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),y(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(v(i,255&e.adler),v(i,e.adler>>8&255),v(i,e.adler>>16&255),v(i,e.adler>>24&255),v(i,255&e.total_in),v(i,e.total_in>>8&255),v(i,e.total_in>>16&255),v(i,e.total_in>>24&255)):(w(i,e.adler>>>16),w(i,65535&e.adler)),y(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?0:1)},r.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==h&&t!==d&&t!==p?m(e,l):(e.state=null,t===d?m(e,-3):0):l},r.deflateSetDictionary=function(e,t){var r,n,a,s,u,c,f,h,d=t.length;if(!e||!e.state)return l;if(2===(s=(r=e.state).wrap)||1===s&&42!==r.status||r.lookahead)return l;for(1===s&&(e.adler=o(e.adler,t,d,0)),r.wrap=0,d>=r.w_size&&(0===s&&(b(r.head),r.strstart=0,r.block_start=0,r.insert=0),h=new i.Buf8(r.w_size),i.arraySet(h,t,d-r.w_size,r.w_size,0),t=h,d=r.w_size),u=e.avail_in,c=e.next_in,f=e.input,e.avail_in=d,e.next_in=0,e.input=t,B(r);r.lookahead>=3;){n=r.strstart,a=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(--a);r.strstart=n,r.lookahead=2,B(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,e.next_in=c,e.input=f,e.avail_in=u,r.wrap=s,0},r.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":52,"./adler32":53,"./crc32":55,"./messages":60,"./trees":61}],57:[function(e,t,r){t.exports=function(e,t){var r,n,i,a,o,s,u,l,c,f,h,d,p,m,g,b,y,_,v,w,x,k,B,E,S;r=e.state,n=e.next_in,E=e.input,i=n+(e.avail_in-5),a=e.next_out,S=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),u=r.dmax,l=r.wsize,c=r.whave,f=r.wnext,h=r.window,d=r.hold,p=r.bits,m=r.lencode,g=r.distcode,b=(1<<r.lenbits)-1,y=(1<<r.distbits)-1;e:do{p<15&&(d+=E[n++]<<p,p+=8,d+=E[n++]<<p,p+=8),_=m[d&b];t:for(;;){if(d>>>=v=_>>>24,p-=v,0==(v=_>>>16&255))S[a++]=65535&_;else{if(!(16&v)){if(64&v){if(32&v){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}_=m[(65535&_)+(d&(1<<v)-1)];continue t}for(w=65535&_,(v&=15)&&(p<v&&(d+=E[n++]<<p,p+=8),w+=d&(1<<v)-1,d>>>=v,p-=v),p<15&&(d+=E[n++]<<p,p+=8,d+=E[n++]<<p,p+=8),_=g[d&y];;){if(d>>>=v=_>>>24,p-=v,16&(v=_>>>16&255)){if(x=65535&_,p<(v&=15)&&(d+=E[n++]<<p,(p+=8)<v&&(d+=E[n++]<<p,p+=8)),(x+=d&(1<<v)-1)>u){e.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=v,p-=v,x>(v=a-o)){if((v=x-v)>c&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(k=0,B=h,0===f){if(k+=l-v,v<w){w-=v;do{S[a++]=h[k++]}while(--v);k=a-x,B=S}}else if(f<v){if(k+=l+f-v,(v-=f)<w){w-=v;do{S[a++]=h[k++]}while(--v);if(k=0,f<w){w-=v=f;do{S[a++]=h[k++]}while(--v);k=a-x,B=S}}}else if(k+=f-v,v<w){w-=v;do{S[a++]=h[k++]}while(--v);k=a-x,B=S}for(;w>2;)S[a++]=B[k++],S[a++]=B[k++],S[a++]=B[k++],w-=3;w&&(S[a++]=B[k++],w>1&&(S[a++]=B[k++]))}else{k=a-x;do{S[a++]=S[k++],S[a++]=S[k++],S[a++]=S[k++],w-=3}while(w>2);w&&(S[a++]=S[k++],w>1&&(S[a++]=S[k++]))}break}if(64&v){e.msg="invalid distance code",r.mode=30;break e}_=g[(65535&_)+(d&(1<<v)-1)]}}break}}while(n<i&&a<s);n-=w=p>>3,d&=(1<<(p-=w<<3))-1,e.next_in=n,e.next_out=a,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=a<s?s-a+257:257-(a-s),r.hold=d,r.bits=p}},{}],58:[function(e,t,r){var n=e("../utils/common"),i=e("./adler32"),a=e("./crc32"),o=e("./inffast"),s=e("./inftrees"),u=-2,l=12,c=30;function f(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function h(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new n.Buf16(320),this.work=new n.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function d(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new n.Buf32(852),t.distcode=t.distdyn=new n.Buf32(592),t.sane=1,t.back=-1,0):u}function p(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,d(e)):u}function m(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?u:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,p(e))):u}function g(e,t){var r,n;return e?(n=new h,e.state=n,n.window=null,0!==(r=m(e,t))&&(e.state=null),r):u}var b,y,_=!0;function v(e){if(_){var t;for(b=new n.Buf32(512),y=new n.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(s(1,e.lens,0,288,b,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;s(2,e.lens,0,32,y,0,e.work,{bits:5}),_=!1}e.lencode=b,e.lenbits=9,e.distcode=y,e.distbits=5}function w(e,t,r,i){var a,o=e.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new n.Buf8(o.wsize)),i>=o.wsize?(n.arraySet(o.window,t,r-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>i&&(a=i),n.arraySet(o.window,t,r-i,a,o.wnext),(i-=a)?(n.arraySet(o.window,t,r-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),0}r.inflateReset=p,r.inflateReset2=m,r.inflateResetKeep=d,r.inflateInit=function(e){return g(e,15)},r.inflateInit2=g,r.inflate=function(e,t){var r,h,d,p,m,g,b,y,_,x,k,B,E,S,A,C,I,P,T,M,R,F,O,N,L=0,D=new n.Buf8(4),z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return u;(r=e.state).mode===l&&(r.mode=13),m=e.next_out,d=e.output,b=e.avail_out,p=e.next_in,h=e.input,g=e.avail_in,y=r.hold,_=r.bits,x=g,k=b,F=0;e:for(;;)switch(r.mode){case 1:if(0===r.wrap){r.mode=13;break}for(;_<16;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}if(2&r.wrap&&35615===y){r.check=0,D[0]=255&y,D[1]=y>>>8&255,r.check=a(r.check,D,2,0),y=0,_=0,r.mode=2;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&y)<<8)+(y>>8))%31){e.msg="incorrect header check",r.mode=c;break}if(8!=(15&y)){e.msg="unknown compression method",r.mode=c;break}if(_-=4,R=8+(15&(y>>>=4)),0===r.wbits)r.wbits=R;else if(R>r.wbits){e.msg="invalid window size",r.mode=c;break}r.dmax=1<<R,e.adler=r.check=1,r.mode=512&y?10:l,y=0,_=0;break;case 2:for(;_<16;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}if(r.flags=y,8!=(255&r.flags)){e.msg="unknown compression method",r.mode=c;break}if(57344&r.flags){e.msg="unknown header flags set",r.mode=c;break}r.head&&(r.head.text=y>>8&1),512&r.flags&&(D[0]=255&y,D[1]=y>>>8&255,r.check=a(r.check,D,2,0)),y=0,_=0,r.mode=3;case 3:for(;_<32;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}r.head&&(r.head.time=y),512&r.flags&&(D[0]=255&y,D[1]=y>>>8&255,D[2]=y>>>16&255,D[3]=y>>>24&255,r.check=a(r.check,D,4,0)),y=0,_=0,r.mode=4;case 4:for(;_<16;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}r.head&&(r.head.xflags=255&y,r.head.os=y>>8),512&r.flags&&(D[0]=255&y,D[1]=y>>>8&255,r.check=a(r.check,D,2,0)),y=0,_=0,r.mode=5;case 5:if(1024&r.flags){for(;_<16;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}r.length=y,r.head&&(r.head.extra_len=y),512&r.flags&&(D[0]=255&y,D[1]=y>>>8&255,r.check=a(r.check,D,2,0)),y=0,_=0}else r.head&&(r.head.extra=null);r.mode=6;case 6:if(1024&r.flags&&((B=r.length)>g&&(B=g),B&&(r.head&&(R=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),n.arraySet(r.head.extra,h,p,B,R)),512&r.flags&&(r.check=a(r.check,h,B,p)),g-=B,p+=B,r.length-=B),r.length))break e;r.length=0,r.mode=7;case 7:if(2048&r.flags){if(0===g)break e;B=0;do{R=h[p+B++],r.head&&R&&r.length<65536&&(r.head.name+=String.fromCharCode(R))}while(R&&B<g);if(512&r.flags&&(r.check=a(r.check,h,B,p)),g-=B,p+=B,R)break e}else r.head&&(r.head.name=null);r.length=0,r.mode=8;case 8:if(4096&r.flags){if(0===g)break e;B=0;do{R=h[p+B++],r.head&&R&&r.length<65536&&(r.head.comment+=String.fromCharCode(R))}while(R&&B<g);if(512&r.flags&&(r.check=a(r.check,h,B,p)),g-=B,p+=B,R)break e}else r.head&&(r.head.comment=null);r.mode=9;case 9:if(512&r.flags){for(;_<16;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}if(y!==(65535&r.check)){e.msg="header crc mismatch",r.mode=c;break}y=0,_=0}r.head&&(r.head.hcrc=r.flags>>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=l;break;case 10:for(;_<32;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}e.adler=r.check=f(y),y=0,_=0,r.mode=11;case 11:if(0===r.havedict)return e.next_out=m,e.avail_out=b,e.next_in=p,e.avail_in=g,r.hold=y,r.bits=_,2;e.adler=r.check=1,r.mode=l;case l:if(5===t||6===t)break e;case 13:if(r.last){y>>>=7&_,_-=7&_,r.mode=27;break}for(;_<3;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}switch(r.last=1&y,_-=1,3&(y>>>=1)){case 0:r.mode=14;break;case 1:if(v(r),r.mode=20,6===t){y>>>=2,_-=2;break e}break;case 2:r.mode=17;break;case 3:e.msg="invalid block type",r.mode=c}y>>>=2,_-=2;break;case 14:for(y>>>=7&_,_-=7&_;_<32;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}if((65535&y)!=(y>>>16^65535)){e.msg="invalid stored block lengths",r.mode=c;break}if(r.length=65535&y,y=0,_=0,r.mode=15,6===t)break e;case 15:r.mode=16;case 16:if(B=r.length){if(B>g&&(B=g),B>b&&(B=b),0===B)break e;n.arraySet(d,h,p,B,m),g-=B,p+=B,b-=B,m+=B,r.length-=B;break}r.mode=l;break;case 17:for(;_<14;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}if(r.nlen=257+(31&y),y>>>=5,_-=5,r.ndist=1+(31&y),y>>>=5,_-=5,r.ncode=4+(15&y),y>>>=4,_-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=c;break}r.have=0,r.mode=18;case 18:for(;r.have<r.ncode;){for(;_<3;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}r.lens[z[r.have++]]=7&y,y>>>=3,_-=3}for(;r.have<19;)r.lens[z[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,O={bits:r.lenbits},F=s(0,r.lens,0,19,r.lencode,0,r.work,O),r.lenbits=O.bits,F){e.msg="invalid code lengths set",r.mode=c;break}r.have=0,r.mode=19;case 19:for(;r.have<r.nlen+r.ndist;){for(;C=(L=r.lencode[y&(1<<r.lenbits)-1])>>>16&255,I=65535&L,!((A=L>>>24)<=_);){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}if(I<16)y>>>=A,_-=A,r.lens[r.have++]=I;else{if(16===I){for(N=A+2;_<N;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}if(y>>>=A,_-=A,0===r.have){e.msg="invalid bit length repeat",r.mode=c;break}R=r.lens[r.have-1],B=3+(3&y),y>>>=2,_-=2}else if(17===I){for(N=A+3;_<N;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}_-=A,R=0,B=3+(7&(y>>>=A)),y>>>=3,_-=3}else{for(N=A+7;_<N;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}_-=A,R=0,B=11+(127&(y>>>=A)),y>>>=7,_-=7}if(r.have+B>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=c;break}for(;B--;)r.lens[r.have++]=R}}if(r.mode===c)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=c;break}if(r.lenbits=9,O={bits:r.lenbits},F=s(1,r.lens,0,r.nlen,r.lencode,0,r.work,O),r.lenbits=O.bits,F){e.msg="invalid literal/lengths set",r.mode=c;break}if(r.distbits=6,r.distcode=r.distdyn,O={bits:r.distbits},F=s(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,O),r.distbits=O.bits,F){e.msg="invalid distances set",r.mode=c;break}if(r.mode=20,6===t)break e;case 20:r.mode=21;case 21:if(g>=6&&b>=258){e.next_out=m,e.avail_out=b,e.next_in=p,e.avail_in=g,r.hold=y,r.bits=_,o(e,k),m=e.next_out,d=e.output,b=e.avail_out,p=e.next_in,h=e.input,g=e.avail_in,y=r.hold,_=r.bits,r.mode===l&&(r.back=-1);break}for(r.back=0;C=(L=r.lencode[y&(1<<r.lenbits)-1])>>>16&255,I=65535&L,!((A=L>>>24)<=_);){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}if(C&&!(240&C)){for(P=A,T=C,M=I;C=(L=r.lencode[M+((y&(1<<P+T)-1)>>P)])>>>16&255,I=65535&L,!(P+(A=L>>>24)<=_);){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}y>>>=P,_-=P,r.back+=P}if(y>>>=A,_-=A,r.back+=A,r.length=I,0===C){r.mode=26;break}if(32&C){r.back=-1,r.mode=l;break}if(64&C){e.msg="invalid literal/length code",r.mode=c;break}r.extra=15&C,r.mode=22;case 22:if(r.extra){for(N=r.extra;_<N;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}r.length+=y&(1<<r.extra)-1,y>>>=r.extra,_-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=23;case 23:for(;C=(L=r.distcode[y&(1<<r.distbits)-1])>>>16&255,I=65535&L,!((A=L>>>24)<=_);){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}if(!(240&C)){for(P=A,T=C,M=I;C=(L=r.distcode[M+((y&(1<<P+T)-1)>>P)])>>>16&255,I=65535&L,!(P+(A=L>>>24)<=_);){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}y>>>=P,_-=P,r.back+=P}if(y>>>=A,_-=A,r.back+=A,64&C){e.msg="invalid distance code",r.mode=c;break}r.offset=I,r.extra=15&C,r.mode=24;case 24:if(r.extra){for(N=r.extra;_<N;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}r.offset+=y&(1<<r.extra)-1,y>>>=r.extra,_-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=c;break}r.mode=25;case 25:if(0===b)break e;if(B=k-b,r.offset>B){if((B=r.offset-B)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=c;break}B>r.wnext?(B-=r.wnext,E=r.wsize-B):E=r.wnext-B,B>r.length&&(B=r.length),S=r.window}else S=d,E=m-r.offset,B=r.length;B>b&&(B=b),b-=B,r.length-=B;do{d[m++]=S[E++]}while(--B);0===r.length&&(r.mode=21);break;case 26:if(0===b)break e;d[m++]=r.length,b--,r.mode=21;break;case 27:if(r.wrap){for(;_<32;){if(0===g)break e;g--,y|=h[p++]<<_,_+=8}if(k-=b,e.total_out+=k,r.total+=k,k&&(e.adler=r.check=r.flags?a(r.check,d,k,m-k):i(r.check,d,k,m-k)),k=b,(r.flags?y:f(y))!==r.check){e.msg="incorrect data check",r.mode=c;break}y=0,_=0}r.mode=28;case 28:if(r.wrap&&r.flags){for(;_<32;){if(0===g)break e;g--,y+=h[p++]<<_,_+=8}if(y!==(4294967295&r.total)){e.msg="incorrect length check",r.mode=c;break}y=0,_=0}r.mode=29;case 29:F=1;break e;case c:F=-3;break e;case 31:return-4;default:return u}return e.next_out=m,e.avail_out=b,e.next_in=p,e.avail_in=g,r.hold=y,r.bits=_,(r.wsize||k!==e.avail_out&&r.mode<c&&(r.mode<27||4!==t))&&w(e,e.output,e.next_out,k-e.avail_out),x-=e.avail_in,k-=e.avail_out,e.total_in+=x,e.total_out+=k,r.total+=k,r.wrap&&k&&(e.adler=r.check=r.flags?a(r.check,d,k,e.next_out-k):i(r.check,d,k,e.next_out-k)),e.data_type=r.bits+(r.last?64:0)+(r.mode===l?128:0)+(20===r.mode||15===r.mode?256:0),(0===x&&0===k||4===t)&&0===F&&(F=-5),F},r.inflateEnd=function(e){if(!e||!e.state)return u;var t=e.state;return t.window&&(t.window=null),e.state=null,0},r.inflateGetHeader=function(e,t){var r;return e&&e.state&&2&(r=e.state).wrap?(r.head=t,t.done=!1,0):u},r.inflateSetDictionary=function(e,t){var r,n=t.length;return e&&e.state?0!==(r=e.state).wrap&&11!==r.mode?u:11===r.mode&&i(1,t,n,0)!==r.check?-3:w(e,t,n,n)?(r.mode=31,-4):(r.havedict=1,0):u},r.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":52,"./adler32":53,"./crc32":55,"./inffast":57,"./inftrees":59}],59:[function(e,t,r){var n=e("../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],a=[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],o=[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],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,r,u,l,c,f,h){var d,p,m,g,b,y,_,v,w,x=h.bits,k=0,B=0,E=0,S=0,A=0,C=0,I=0,P=0,T=0,M=0,R=null,F=0,O=new n.Buf16(16),N=new n.Buf16(16),L=null,D=0;for(k=0;k<=15;k++)O[k]=0;for(B=0;B<u;B++)O[t[r+B]]++;for(A=x,S=15;S>=1&&0===O[S];S--);if(A>S&&(A=S),0===S)return l[c++]=20971520,l[c++]=20971520,h.bits=1,0;for(E=1;E<S&&0===O[E];E++);for(A<E&&(A=E),P=1,k=1;k<=15;k++)if(P<<=1,(P-=O[k])<0)return-1;if(P>0&&(0===e||1!==S))return-1;for(N[1]=0,k=1;k<15;k++)N[k+1]=N[k]+O[k];for(B=0;B<u;B++)0!==t[r+B]&&(f[N[t[r+B]]++]=B);if(0===e?(R=L=f,y=19):1===e?(R=i,F-=257,L=a,D-=257,y=256):(R=o,L=s,y=-1),M=0,B=0,k=E,b=c,C=A,I=0,m=-1,g=(T=1<<A)-1,1===e&&T>852||2===e&&T>592)return 1;for(;;){_=k-I,f[B]<y?(v=0,w=f[B]):f[B]>y?(v=L[D+f[B]],w=R[F+f[B]]):(v=96,w=0),d=1<<k-I,E=p=1<<C;do{l[b+(M>>I)+(p-=d)]=_<<24|v<<16|w}while(0!==p);for(d=1<<k-1;M&d;)d>>=1;if(0!==d?(M&=d-1,M+=d):M=0,B++,0==--O[k]){if(k===S)break;k=t[r+f[B]]}if(k>A&&(M&g)!==m){for(0===I&&(I=A),b+=E,P=1<<(C=k-I);C+I<S&&!((P-=O[C+I])<=0);)C++,P<<=1;if(T+=1<<C,1===e&&T>852||2===e&&T>592)return 1;l[m=M&g]=A<<24|C<<16|b-c}}return 0!==M&&(l[b+M]=k-I<<24|64<<16),h.bits=A,0}},{"../utils/common":52}],60:[function(e,t,r){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"}},{}],61:[function(e,t,r){var n=e("../utils/common");function i(e){for(var t=e.length;--t>=0;)e[t]=0}var a=[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],o=[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],s=[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],l=new Array(576);i(l);var c=new Array(60);i(c);var f=new Array(512);i(f);var h=new Array(256);i(h);var d=new Array(29);i(d);var p,m,g,b=new Array(30);function y(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function _(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function v(e){return e<256?f[e]:f[256+(e>>>7)]}function w(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function x(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,w(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function k(e,t,r){x(e,r[2*t],r[2*t+1])}function B(e,t){var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function E(e,t,r){var n,i,a=new Array(16),o=0;for(n=1;n<=15;n++)a[n]=o=o+r[n-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=B(a[s]++,s))}}function S(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function A(e){e.bi_valid>8?w(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function C(e,t,r,i){A(e),w(e,r),w(e,~r),n.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function I(e,t,r,n){var i=2*t,a=2*r;return e[i]<e[a]||e[i]===e[a]&&n[t]<=n[r]}function P(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&I(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!I(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function T(e,t,r){var n,i,s,u,l=0;if(0!==e.last_lit)do{n=e.pending_buf[e.d_buf+2*l]<<8|e.pending_buf[e.d_buf+2*l+1],i=e.pending_buf[e.l_buf+l],l++,0===n?k(e,i,t):(k(e,(s=h[i])+256+1,t),0!==(u=a[s])&&x(e,i-=d[s],u),k(e,s=v(--n),r),0!==(u=o[s])&&x(e,n-=b[s],u))}while(l<e.last_lit);k(e,256,t)}function M(e,t){var r,n,i,a=t.dyn_tree,o=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<u;r++)0!==a[2*r]?(e.heap[++e.heap_len]=l=r,e.depth[r]=0):a[2*r+1]=0;for(;e.heap_len<2;)a[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=o[2*i+1]);for(t.max_code=l,r=e.heap_len>>1;r>=1;r--)P(e,a,r);i=u;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],P(e,a,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,a[2*i]=a[2*r]+a[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,a[2*r+1]=a[2*n+1]=i,e.heap[1]=i++,P(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,a,o,s,u=t.dyn_tree,l=t.max_code,c=t.stat_desc.static_tree,f=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(a=0;a<=15;a++)e.bl_count[a]=0;for(u[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(a=u[2*u[2*(n=e.heap[r])+1]+1]+1)>p&&(a=p,m++),u[2*n+1]=a,n>l||(e.bl_count[a]++,o=0,n>=d&&(o=h[n-d]),s=u[2*n],e.opt_len+=s*(a+o),f&&(e.static_len+=s*(c[2*n+1]+o)));if(0!==m){do{for(a=p-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[p]--,m-=2}while(m>0);for(a=p;0!==a;a--)for(n=e.bl_count[a];0!==n;)(i=e.heap[--r])>l||(u[2*i+1]!==a&&(e.opt_len+=(a-u[2*i+1])*u[2*i],u[2*i+1]=a),n--)}}(e,t),E(a,l,e.bl_count)}function R(e,t,r){var n,i,a=-1,o=t[1],s=0,u=7,l=4;for(0===o&&(u=138,l=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=t[2*(n+1)+1],++s<u&&i===o||(s<l?e.bl_tree[2*i]+=s:0!==i?(i!==a&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,a=i,0===o?(u=138,l=3):i===o?(u=6,l=3):(u=7,l=4))}function F(e,t,r){var n,i,a=-1,o=t[1],s=0,u=7,l=4;for(0===o&&(u=138,l=3),n=0;n<=r;n++)if(i=o,o=t[2*(n+1)+1],!(++s<u&&i===o)){if(s<l)do{k(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==a&&(k(e,i,e.bl_tree),s--),k(e,16,e.bl_tree),x(e,s-3,2)):s<=10?(k(e,17,e.bl_tree),x(e,s-3,3)):(k(e,18,e.bl_tree),x(e,s-11,7));s=0,a=i,0===o?(u=138,l=3):i===o?(u=6,l=3):(u=7,l=4)}}i(b);var O=!1;function N(e,t,r,n){x(e,0+(n?1:0),3),C(e,t,r)}r._tr_init=function(e){O||(function(){var e,t,r,n,i,u=new Array(16);for(r=0,n=0;n<28;n++)for(d[n]=r,e=0;e<1<<a[n];e++)h[r++]=n;for(h[r-1]=n,i=0,n=0;n<16;n++)for(b[n]=i,e=0;e<1<<o[n];e++)f[i++]=n;for(i>>=7;n<30;n++)for(b[n]=i<<7,e=0;e<1<<o[n]-7;e++)f[256+i++]=n;for(t=0;t<=15;t++)u[t]=0;for(e=0;e<=143;)l[2*e+1]=8,e++,u[8]++;for(;e<=255;)l[2*e+1]=9,e++,u[9]++;for(;e<=279;)l[2*e+1]=7,e++,u[7]++;for(;e<=287;)l[2*e+1]=8,e++,u[8]++;for(E(l,287,u),e=0;e<30;e++)c[2*e+1]=5,c[2*e]=B(e,5);p=new y(l,a,257,286,15),m=new y(c,o,0,30,15),g=new y(new Array(0),s,0,19,7)}(),O=!0),e.l_desc=new _(e.dyn_ltree,p),e.d_desc=new _(e.dyn_dtree,m),e.bl_desc=new _(e.bl_tree,g),e.bi_buf=0,e.bi_valid=0,S(e)},r._tr_stored_block=N,r._tr_flush_block=function(e,t,r,n){var i,a,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),M(e,e.l_desc),M(e,e.d_desc),o=function(e){var t;for(R(e,e.dyn_ltree,e.l_desc.max_code),R(e,e.dyn_dtree,e.d_desc.max_code),M(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*u[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(a=e.static_len+3+7>>>3)<=i&&(i=a)):i=a=r+5,r+4<=i&&-1!==t?N(e,t,r,n):4===e.strategy||a===i?(x(e,2+(n?1:0),3),T(e,l,c)):(x(e,4+(n?1:0),3),function(e,t,r,n){var i;for(x(e,t-257,5),x(e,r-1,5),x(e,n-4,4),i=0;i<n;i++)x(e,e.bl_tree[2*u[i]+1],3);F(e,e.dyn_ltree,t-1),F(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),T(e,e.dyn_ltree,e.dyn_dtree)),S(e),n&&A(e)},r._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(h[r]+256+1)]++,e.dyn_dtree[2*v(t)]++),e.last_lit===e.lit_bufsize-1},r._tr_align=function(e){x(e,2,3),k(e,256,l),function(e){16===e.bi_valid?(w(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":52}],62:[function(e,t,r){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}},{}],63:[function(e,t,r){var n,i,a=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function u(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var l,c=[],f=!1,h=-1;function d(){f&&l&&(f=!1,l.length?c=l.concat(c):h=-1,c.length&&p())}function p(){if(!f){var e=u(d);f=!0;for(var t=c.length;t;){for(l=c,c=[];++h<t;)l&&l[h].run();h=-1,t=c.length}l=null,f=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{return i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new m(e,t)),1!==c.length||f||u(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=g,a.addListener=g,a.once=g,a.off=g,a.removeListener=g,a.removeAllListeners=g,a.emit=g,a.prependListener=g,a.prependOnceListener=g,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],64:[function(e,t,r){var n=e("buffer"),i=n.Buffer;function a(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(a(n,r),r.Buffer=o),o.prototype=Object.create(i.prototype),a(i,o),o.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},o.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},o.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},o.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},{buffer:32}],65:[function(e,t,r){t.exports=i;var n=e("events").EventEmitter;function i(){n.call(this)}e("inherits")(i,n),i.Readable=e("readable-stream/lib/_stream_readable.js"),i.Writable=e("readable-stream/lib/_stream_writable.js"),i.Duplex=e("readable-stream/lib/_stream_duplex.js"),i.Transform=e("readable-stream/lib/_stream_transform.js"),i.PassThrough=e("readable-stream/lib/_stream_passthrough.js"),i.finished=e("readable-stream/lib/internal/streams/end-of-stream.js"),i.pipeline=e("readable-stream/lib/internal/streams/pipeline.js"),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function a(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",a),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",u));var o=!1;function s(){o||(o=!0,e.end())}function u(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(c(),0===n.listenerCount(this,"error"))throw e}function c(){r.removeListener("data",i),e.removeListener("drain",a),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",c),r.removeListener("close",c),e.removeListener("close",c)}return r.on("error",l),e.on("error",l),r.on("end",c),r.on("close",c),e.on("close",c),e.emit("pipe",r),e}},{events:35,inherits:46,"readable-stream/lib/_stream_duplex.js":67,"readable-stream/lib/_stream_passthrough.js":68,"readable-stream/lib/_stream_readable.js":69,"readable-stream/lib/_stream_transform.js":70,"readable-stream/lib/_stream_writable.js":71,"readable-stream/lib/internal/streams/end-of-stream.js":75,"readable-stream/lib/internal/streams/pipeline.js":77}],66:[function(e,t,r){var n={};function i(e,t,r){function i(e,r,n){return"string"==typeof t?t:t(e,r,n)}r||(r=Error);var a=function(e){function t(t,r,n){return e.call(this,i(t,r,n))||this}return function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}(t,e),t}(r);a.prototype.name=r.name,a.prototype.code=e,n[e]=a}function a(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(e){return String(e)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(e,t,r){var n,i;if("string"==typeof t&&function(e,t){return e.substr(0,4)===t}(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))i="The ".concat(e," ").concat(n," ").concat(a(t,"type"));else{var o=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+1>e.length)&&-1!==e.indexOf(".",r)}(e)?"property":"argument";i='The "'.concat(e,'" ').concat(o," ").concat(n," ").concat(a(t,"type"))}return i+". Received type ".concat(typeof r)},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" 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(e){return"Unknown encoding: "+e},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=n},{}],67:[function(e,t,r){(function(r){(function(){var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=l;var i=e("./_stream_readable"),a=e("./_stream_writable");e("inherits")(l,i);for(var o=n(a.prototype),s=0;s<o.length;s++){var u=o[s];l.prototype[u]||(l.prototype[u]=a.prototype[u])}function l(e){if(!(this instanceof l))return new l(e);i.call(this,e),a.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",c)))}function c(){this._writableState.ended||r.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this)}).call(this,e("_process"))},{"./_stream_readable":69,"./_stream_writable":71,_process:63,inherits:46}],68:[function(e,t,r){t.exports=i;var n=e("./_stream_transform");function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}e("inherits")(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},{"./_stream_transform":70,inherits:46}],69:[function(e,t,r){(function(r,n){(function(){var i;t.exports=E,E.ReadableState=B,e("events").EventEmitter;var a,o=function(e,t){return e.listeners(t).length},s=e("./internal/streams/stream"),u=e("buffer").Buffer,l=n.Uint8Array||function(){},c=e("util");a=c&&c.debuglog?c.debuglog("stream"):function(){};var f,h,d,p=e("./internal/streams/buffer_list"),m=e("./internal/streams/destroy"),g=e("./internal/streams/state").getHighWaterMark,b=e("../errors").codes,y=b.ERR_INVALID_ARG_TYPE,_=b.ERR_STREAM_PUSH_AFTER_EOF,v=b.ERR_METHOD_NOT_IMPLEMENTED,w=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e("inherits")(E,s);var x=m.errorOrDestroy,k=["error","close","destroy","pause","resume"];function B(t,r,n){i=i||e("./_stream_duplex"),t=t||{},"boolean"!=typeof n&&(n=r 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&&(f||(f=e("string_decoder/").StringDecoder),this.decoder=new f(t.encoding),this.encoding=t.encoding)}function E(t){if(i=i||e("./_stream_duplex"),!(this instanceof E))return new E(t);var r=this instanceof i;this._readableState=new B(t,this,r),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function S(e,t,r,n,i){a("readableAddChunk",t);var o,s=e._readableState;if(null===t)s.reading=!1,function(e,t){if(a("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?P(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,T(e)))}}(e,s);else if(i||(o=function(e,t){var r;return function(e){return u.isBuffer(e)||e instanceof l}(t)||"string"==typeof t||void 0===t||e.objectMode||(r=new y("chunk",["string","Buffer","Uint8Array"],t)),r}(s,t)),o)x(e,o);else if(s.objectMode||t&&t.length>0)if("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n)s.endEmitted?x(e,new w):A(e,s,t,!0);else if(s.ended)x(e,new _);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?A(e,s,t,!1):M(e,s)):A(e,s,t,!1)}else n||(s.reading=!1,M(e,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function A(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&P(e)),M(e,t)}Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),E.prototype.destroy=m.destroy,E.prototype._undestroy=m.undestroy,E.prototype._destroy=function(e,t){t(e)},E.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),S(this,e,t,!1,r)},E.prototype.unshift=function(e){return S(this,e,null,!0,!1)},E.prototype.isPaused=function(){return!1===this._readableState.flowing},E.prototype.setEncoding=function(t){f||(f=e("string_decoder/").StringDecoder);var r=new f(t);this._readableState.decoder=r,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=r.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var C=1073741824;function I(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=C?e=C:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function P(e){var t=e._readableState;a("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(a("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(T,e))}function T(e){var t=e._readableState;a("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,L(e)}function M(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(R,e,t))}function R(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(a("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function F(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function O(e){a("readable nexttick read 0"),e.read(0)}function N(e,t){a("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),L(e),t.flowing&&!t.reading&&e.read(0)}function L(e){var t=e._readableState;for(a("flow",t.flowing);t.flowing&&null!==e.read(););}function D(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function z(e){var t=e._readableState;a("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(U,t,e))}function U(e,t){if(a("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function $(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}E.prototype.read=function(e){a("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return a("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?z(this):P(this),null;if(0===(e=I(e,t))&&t.ended)return 0===t.length&&z(this),null;var n,i=t.needReadable;return a("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&a("length less than watermark",i=!0),t.ended||t.reading?a("reading or ended",i=!1):i&&(a("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=I(r,t))),null===(n=e>0?D(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&z(this)),null!==n&&this.emit("data",n),n},E.prototype._read=function(e){x(this,new v("_read()"))},E.prototype.pipe=function(e,t){var n=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=e;break;case 1:i.pipes=[i.pipes,e];break;default:i.pipes.push(e)}i.pipesCount+=1,a("pipe count=%d opts=%j",i.pipesCount,t);var s=t&&!1===t.end||e===r.stdout||e===r.stderr?b:l;function u(e,t){a("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,h())}function l(){a("onend"),e.end()}i.endEmitted?r.nextTick(s):n.once("end",s),e.on("unpipe",u);var c=function(e){return function(){var t=e._readableState;a("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,L(e))}}(n);e.on("drain",c);var f=!1;function h(){a("cleanup"),e.removeListener("close",m),e.removeListener("finish",g),e.removeListener("drain",c),e.removeListener("error",p),e.removeListener("unpipe",u),n.removeListener("end",l),n.removeListener("end",b),n.removeListener("data",d),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||c()}function d(t){a("ondata");var r=e.write(t);a("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==$(i.pipes,e))&&!f&&(a("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function p(t){a("onerror",t),b(),e.removeListener("error",p),0===o(e,"error")&&x(e,t)}function m(){e.removeListener("finish",g),b()}function g(){a("onfinish"),e.removeListener("close",m),b()}function b(){a("unpipe"),n.unpipe(e)}return n.on("data",d),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",p),e.once("close",m),e.once("finish",g),e.emit("pipe",n),i.flowing||(a("pipe resume"),n.resume()),e},E.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<i;a++)n[a].emit("unpipe",this,{hasUnpiped:!1});return this}var o=$(t.pipes,e);return-1===o||(t.pipes.splice(o,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},E.prototype.on=function(e,t){var n=s.prototype.on.call(this,e,t),i=this._readableState;return"data"===e?(i.readableListening=this.listenerCount("readable")>0,!1!==i.flowing&&this.resume()):"readable"===e&&(i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,a("on readable",i.length,i.reading),i.length?P(this):i.reading||r.nextTick(O,this))),n},E.prototype.addListener=E.prototype.on,E.prototype.removeListener=function(e,t){var n=s.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(F,this),n},E.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(F,this),t},E.prototype.resume=function(){var e=this._readableState;return e.flowing||(a("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick(N,e,t))}(this,e)),e.paused=!1,this},E.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},E.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",function(){if(a("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(i){a("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))}),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<k.length;o++)e.on(k[o],this.emit.bind(this,k[o]));return this._read=function(t){a("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(E.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=e("./internal/streams/async_iterator")),h(this)}),Object.defineProperty(E.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(E.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(E.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),E._fromList=D,Object.defineProperty(E.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(E.from=function(t,r){return void 0===d&&(d=e("./internal/streams/from")),d(E,t,r)})}).call(this)}).call(this,e("_process"),void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":66,"./_stream_duplex":67,"./internal/streams/async_iterator":72,"./internal/streams/buffer_list":73,"./internal/streams/destroy":74,"./internal/streams/from":76,"./internal/streams/state":78,"./internal/streams/stream":79,_process:63,buffer:32,events:35,inherits:46,"string_decoder/":80,util:29}],70:[function(e,t,r){t.exports=c;var n=e("../errors").codes,i=n.ERR_METHOD_NOT_IMPLEMENTED,a=n.ERR_MULTIPLE_CALLBACK,o=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=e("./_stream_duplex");function l(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new a);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function c(e){if(!(this instanceof c))return new c(e);u.call(this,e),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush(function(t,r){h(e,t,r)})}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new o;return e.push(null)}e("inherits")(c,u),c.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},c.prototype._transform=function(e,t,r){r(new i("_transform()"))},c.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},c.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},c.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,function(e){t(e)})}},{"../errors":66,"./_stream_duplex":67,inherits:46}],71:[function(e,t,r){(function(r,n){(function(){function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(void 0),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var a;t.exports=E,E.WritableState=B;var o,s={deprecate:e("util-deprecate")},u=e("./internal/streams/stream"),l=e("buffer").Buffer,c=n.Uint8Array||function(){},f=e("./internal/streams/destroy"),h=e("./internal/streams/state").getHighWaterMark,d=e("../errors").codes,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,b=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,_=d.ERR_STREAM_NULL_VALUES,v=d.ERR_STREAM_WRITE_AFTER_END,w=d.ERR_UNKNOWN_ENCODING,x=f.errorOrDestroy;function k(){}function B(t,r,n){a=a||e("./_stream_duplex"),t=t||{},"boolean"!=typeof n&&(n=r instanceof a),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=h(this,t,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===t.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){P(r,e)},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 E(t){var r=this instanceof(a=a||e("./_stream_duplex"));if(!r&&!o.call(E,this))return new E(t);this._writableState=new B(t,this,r),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)),u.call(this)}function S(e,t){var n=new v;x(e,n),r.nextTick(t,n)}function A(e,t,n,i){var a;return null===n?a=new _:"string"==typeof n||t.objectMode||(a=new p("chunk",["string","Buffer"],n)),!a||(x(e,a),r.nextTick(i,a),!1)}function C(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,r)),t}function I(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function P(e,t){var n=e._writableState,i=n.sync,a=n.writecb;if("function"!=typeof a)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,i,a){--t.pendingcb,n?(r.nextTick(a,i),r.nextTick(N,e,t),e._writableState.errorEmitted=!0,x(e,i)):(a(i),e._writableState.errorEmitted=!0,x(e,i),N(e,t))}(e,n,i,t,a);else{var o=R(n)||e.destroyed;o||n.corked||n.bufferProcessing||!n.bufferedRequest||M(e,n),i?r.nextTick(T,e,n,o,a):T(e,n,o,a)}}function T(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),N(e,t)}function M(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,a=new Array(n),o=t.corkedRequestsFree;o.entry=r;for(var s=0,u=!0;r;)a[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;a.allBuffers=u,I(e,t,!0,t.length,a,"",o.finish),t.pendingcb++,t.lastBufferedRequest=null,o.next?(t.corkedRequestsFree=o.next,o.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,c=r.encoding,f=r.callback;if(I(e,t,!1,t.objectMode?1:l.length,l,c,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function R(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function F(e,t){e._final(function(r){t.pendingcb--,r&&x(e,r),t.prefinished=!0,e.emit("prefinish"),N(e,t)})}function O(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(F,e,t)))}function N(e,t){var r=R(t);if(r&&(O(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}function L(e,t,n){t.ending=!0,N(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}e("inherits")(E,u),B.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(B.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(E,Symbol.hasInstance,{value:function(e){return!!o.call(this,e)||this===E&&e&&e._writableState instanceof B}})):o=function(e){return e instanceof this},E.prototype.pipe=function(){x(this,new b)},E.prototype.write=function(e,t,r){var n=this._writableState,i=!1,a=!n.objectMode&&function(e){return l.isBuffer(e)||e instanceof c}(e);return a&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),"function"!=typeof r&&(r=k),n.ending?S(this,r):(a||A(this,n,e,r))&&(n.pendingcb++,i=function(e,t,r,n,i,a){if(!r){var o=C(t,n,i);n!==o&&(r=!0,i="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:a,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else I(e,t,!1,s,n,i,a);return u}(this,n,a,e,t,r)),i},E.prototype.cork=function(){this._writableState.corked++},E.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||M(this,e))},E.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(E.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(E.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),E.prototype._write=function(e,t,r){r(new m("_write()"))},E.prototype._writev=null,E.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||L(this,n,r),this},Object.defineProperty(E.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(E.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),E.prototype.destroy=f.destroy,E.prototype._undestroy=f.undestroy,E.prototype._destroy=function(e,t){t(e)}}).call(this)}).call(this,e("_process"),void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":66,"./_stream_duplex":67,"./internal/streams/destroy":74,"./internal/streams/state":78,"./internal/streams/stream":79,_process:63,buffer:32,inherits:46,"util-deprecate":81}],72:[function(e,t,r){(function(r){(function(){var n;function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=e("./end-of-stream"),o=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),l=Symbol("ended"),c=Symbol("lastPromise"),f=Symbol("handlePromise"),h=Symbol("stream");function d(e,t){return{value:e,done:t}}function p(e){var t=e[o];if(null!==t){var r=e[h].read();null!==r&&(e[c]=null,e[o]=null,e[s]=null,t(d(r,!1)))}}function m(e){r.nextTick(p,e)}var g=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((n={get stream(){return this[h]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[l])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise(function(t,n){r.nextTick(function(){e[u]?n(e[u]):t(d(void 0,!0))})});var n,i=this[c];if(i)n=new Promise(function(e,t){return function(r,n){e.then(function(){t[l]?r(d(void 0,!0)):t[f](r,n)},n)}}(i,this));else{var a=this[h].read();if(null!==a)return Promise.resolve(d(a,!1));n=new Promise(this[f])}return this[c]=n,n}},i(n,Symbol.asyncIterator,function(){return this}),i(n,"return",function(){var e=this;return new Promise(function(t,r){e[h].destroy(null,function(e){e?r(e):t(d(void 0,!0))})})}),n),g);t.exports=function(e){var t,r=Object.create(b,(i(t={},h,{value:e,writable:!0}),i(t,o,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,l,{value:e._readableState.endEmitted,writable:!0}),i(t,f,{value:function(e,t){var n=r[h].read();n?(r[c]=null,r[o]=null,r[s]=null,e(d(n,!1))):(r[o]=e,r[s]=t)},writable:!0}),t));return r[c]=null,a(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[s];return null!==t&&(r[c]=null,r[o]=null,r[s]=null,t(e)),void(r[u]=e)}var n=r[o];null!==n&&(r[c]=null,r[o]=null,r[s]=null,n(d(void 0,!0))),r[l]=!0}),e.on("readable",m.bind(null,r)),r}}).call(this)}).call(this,e("_process"))},{"./end-of-stream":75,_process:63}],73:[function(e,t,r){function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var a=e("buffer").Buffer,o=e("util").inspect,s=o&&o.custom||"inspect";function u(e,t,r){a.prototype.copy.call(e,t,r)}t.exports=function(){function e(){(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,e),this.head=null,this.tail=null,this.length=0}return function(e,t){t&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t)}(e,[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t=a.allocUnsafe(e>>>0),r=this.head,n=0;r;)u(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,a=e>i.length?i.length:e;if(a===i.length?n+=i:n+=i.slice(0,e),0==(e-=a)){a===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0==(e-=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,t}},{key:s,value:function(e,t){return o(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},t,{depth:0,customInspect:!1}))}}]),e}()},{buffer:32,util:29}],74:[function(e,t,r){(function(e){(function(){function r(e,t){i(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}t.exports={destroy:function(t,a){var o=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?(a?a(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){!a&&t?o._writableState?o._writableState.errorEmitted?e.nextTick(n,o):(o._writableState.errorEmitted=!0,e.nextTick(r,o,t)):e.nextTick(r,o,t):a?(e.nextTick(n,o),a(t)):e.nextTick(n,o)}),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(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this)}).call(this,e("_process"))},{_process:63}],75:[function(e,t,r){var n=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function e(t,r,a){if("function"==typeof r)return e(t,null,r);r||(r={}),a=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(a||i);var o=r.readable||!1!==r.readable&&t.readable,s=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||c()},l=t._writableState&&t._writableState.finished,c=function(){s=!1,l=!0,o||a.call(t)},f=t._readableState&&t._readableState.endEmitted,h=function(){o=!1,f=!0,s||a.call(t)},d=function(e){a.call(t,e)},p=function(){var e;return o&&!f?(t._readableState&&t._readableState.ended||(e=new n),a.call(t,e)):s&&!l?(t._writableState&&t._writableState.ended||(e=new n),a.call(t,e)):void 0},m=function(){t.req.on("finish",c)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",c),t.on("abort",p),t.req?m():t.on("request",m)):s&&!t._writableState&&(t.on("end",u),t.on("close",u)),t.on("end",h),t.on("finish",c),!1!==r.error&&t.on("error",d),t.on("close",p),function(){t.removeListener("complete",c),t.removeListener("abort",p),t.removeListener("request",m),t.req&&t.req.removeListener("finish",c),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",c),t.removeListener("end",h),t.removeListener("error",d),t.removeListener("close",p)}}},{"../../../errors":66}],76:[function(e,t,r){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],77:[function(e,t,r){var n,i=e("../../../errors").codes,a=i.ERR_MISSING_ARGS,o=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(t,r,i,a){a=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(a);var s=!1;t.on("close",function(){s=!0}),void 0===n&&(n=e("./end-of-stream")),n(t,{readable:r,writable:i},function(e){if(e)return a(e);s=!0,a()});var u=!1;return function(e){if(!s&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void a(e||new o("pipe"))}}function l(e){e()}function c(e,t){return e.pipe(t)}t.exports=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=function(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new a("streams");var o=t.map(function(e,r){var a=r<t.length-1;return u(e,a,r>0,function(e){n||(n=e),e&&o.forEach(l),a||(o.forEach(l),i(n))})});return t.reduce(c)}},{"../../../errors":66,"./end-of-stream":75}],78:[function(e,t,r){var n=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,r,i){var a=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=a){if(!isFinite(a)||Math.floor(a)!==a||a<0)throw new n(i?r:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}},{"../../../errors":66}],79:[function(e,t,r){t.exports=e("events").EventEmitter},{events:35}],80:[function(e,t,r){var n=e("safe-buffer").Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.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 a(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=c,this.end=f,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function o(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"<22>";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"<22>";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"<22>"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function c(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}r.StringDecoder=a,a.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},a.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"<22>":t},a.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=o(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=o(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=o(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},a.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":64}],81:[function(e,t,r){(function(e){(function(){function r(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}}).call(this)}).call(this,void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],82:[function(e,t,r){arguments[4][25][0].apply(r,arguments)},{dup:25}],83:[function(e,t,r){var n=e("is-arguments"),i=e("is-generator-function"),a=e("which-typed-array"),o=e("is-typed-array");function s(e){return e.call.bind(e)}var u="undefined"!=typeof BigInt,l="undefined"!=typeof Symbol,c=s(Object.prototype.toString),f=s(Number.prototype.valueOf),h=s(String.prototype.valueOf),d=s(Boolean.prototype.valueOf);if(u)var p=s(BigInt.prototype.valueOf);if(l)var m=s(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function b(e){return"[object Map]"===c(e)}function y(e){return"[object Set]"===c(e)}function _(e){return"[object WeakMap]"===c(e)}function v(e){return"[object WeakSet]"===c(e)}function w(e){return"[object ArrayBuffer]"===c(e)}function x(e){return"undefined"!=typeof ArrayBuffer&&(w.working?w(e):e instanceof ArrayBuffer)}function k(e){return"[object DataView]"===c(e)}function B(e){return"undefined"!=typeof DataView&&(k.working?k(e):e instanceof DataView)}r.isArgumentsObject=n,r.isGeneratorFunction=i,r.isTypedArray=o,r.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},r.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):o(e)||B(e)},r.isUint8Array=function(e){return"Uint8Array"===a(e)},r.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===a(e)},r.isUint16Array=function(e){return"Uint16Array"===a(e)},r.isUint32Array=function(e){return"Uint32Array"===a(e)},r.isInt8Array=function(e){return"Int8Array"===a(e)},r.isInt16Array=function(e){return"Int16Array"===a(e)},r.isInt32Array=function(e){return"Int32Array"===a(e)},r.isFloat32Array=function(e){return"Float32Array"===a(e)},r.isFloat64Array=function(e){return"Float64Array"===a(e)},r.isBigInt64Array=function(e){return"BigInt64Array"===a(e)},r.isBigUint64Array=function(e){return"BigUint64Array"===a(e)},b.working="undefined"!=typeof Map&&b(new Map),r.isMap=function(e){return"undefined"!=typeof Map&&(b.working?b(e):e instanceof Map)},y.working="undefined"!=typeof Set&&y(new Set),r.isSet=function(e){return"undefined"!=typeof Set&&(y.working?y(e):e instanceof Set)},_.working="undefined"!=typeof WeakMap&&_(new WeakMap),r.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(_.working?_(e):e instanceof WeakMap)},v.working="undefined"!=typeof WeakSet&&v(new WeakSet),r.isWeakSet=function(e){return v(e)},w.working="undefined"!=typeof ArrayBuffer&&w(new ArrayBuffer),r.isArrayBuffer=x,k.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&k(new DataView(new ArrayBuffer(1),0,1)),r.isDataView=B;var E="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function S(e){return"[object SharedArrayBuffer]"===c(e)}function A(e){return void 0!==E&&(void 0===S.working&&(S.working=S(new E)),S.working?S(e):e instanceof E)}function C(e){return g(e,f)}function I(e){return g(e,h)}function P(e){return g(e,d)}function T(e){return u&&g(e,p)}function M(e){return l&&g(e,m)}r.isSharedArrayBuffer=A,r.isAsyncFunction=function(e){return"[object AsyncFunction]"===c(e)},r.isMapIterator=function(e){return"[object Map Iterator]"===c(e)},r.isSetIterator=function(e){return"[object Set Iterator]"===c(e)},r.isGeneratorObject=function(e){return"[object Generator]"===c(e)},r.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===c(e)},r.isNumberObject=C,r.isStringObject=I,r.isBooleanObject=P,r.isBigIntObject=T,r.isSymbolObject=M,r.isBoxedPrimitive=function(e){return C(e)||I(e)||P(e)||T(e)||M(e)},r.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(x(e)||A(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(r,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})},{"is-arguments":47,"is-generator-function":49,"is-typed-array":50,"which-typed-array":85}],84:[function(e,t,r){(function(t){(function(){var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},i=/%[sdj%]/g;r.format=function(e){if(!_(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(u(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,a=n.length,o=String(e).replace(i,function(e){if("%%"===e)return"%";if(r>=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),s=n[r];r<a;s=n[++r])b(s)||!x(s)?o+=" "+s:o+=" "+u(s);return o},r.deprecate=function(e,n){if(void 0!==t&&!0===t.noDeprecation)return e;if(void 0===t)return function(){return r.deprecate(e,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 e.apply(this,arguments)}};var a={},o=/^$/;if(t.env.NODE_DEBUG){var s=t.env.NODE_DEBUG;s=s.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),o=new RegExp("^"+s+"$","i")}function u(e,t){var n={seen:[],stylize:c};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(t)?n.showHidden=t:t&&r._extend(n,t),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=l),f(n,e,n.depth)}function l(e,t){var r=u.styles[t];return r?"["+u.colors[r][0]+"m"+e+"["+u.colors[r][1]+"m":e}function c(e,t){return e}function f(e,t,n){if(e.customInspect&&t&&E(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return _(i)||(i=f(e,i,n)),i}var a=h(e,t);if(a)return a;var o=Object.keys(t),s=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),B(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return d(t);if(0===o.length){if(E(t)){var u=t.name?": "+t.name:"";return e.stylize("[Function"+u+"]","special")}if(w(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(k(t))return e.stylize(Date.prototype.toString.call(t),"date");if(B(t))return d(t)}var l,c="",g=!1,b=["{","}"];return m(t)&&(g=!0,b=["[","]"]),E(t)&&(c=" [Function"+(t.name?": "+t.name:"")+"]"),w(t)&&(c=" "+RegExp.prototype.toString.call(t)),k(t)&&(c=" "+Date.prototype.toUTCString.call(t)),B(t)&&(c=" "+d(t)),0!==o.length||g&&0!=t.length?n<0?w(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),l=g?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o<s;++o)I(t,String(o))?a.push(p(e,t,r,n,String(o),!0)):a.push("");return i.forEach(function(i){i.match(/^\d+$/)||a.push(p(e,t,r,n,i,!0))}),a}(e,t,n,s,o):o.map(function(r){return p(e,t,n,s,r,g)}),e.seen.pop(),function(e,t,r){return e.reduce(function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}(l,c,b)):b[0]+c+b[1]}function h(e,t){if(v(t))return e.stylize("undefined","undefined");if(_(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return y(t)?e.stylize(""+t,"number"):g(t)?e.stylize(""+t,"boolean"):b(t)?e.stylize("null","null"):void 0}function d(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,i,a){var o,s,u;if((u=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(s=e.stylize("[Setter]","special")),I(n,i)||(o="["+i+"]"),s||(e.seen.indexOf(u.value)<0?(s=b(r)?f(e,u.value,null):f(e,u.value,r-1)).indexOf("\n")>-1&&(s=a?s.split("\n").map(function(e){return" "+e}).join("\n").slice(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n")):s=e.stylize("[Circular]","special")),v(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function m(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function b(e){return null===e}function y(e){return"number"==typeof e}function _(e){return"string"==typeof e}function v(e){return void 0===e}function w(e){return x(e)&&"[object RegExp]"===S(e)}function x(e){return"object"==typeof e&&null!==e}function k(e){return x(e)&&"[object Date]"===S(e)}function B(e){return x(e)&&("[object Error]"===S(e)||e instanceof Error)}function E(e){return"function"==typeof e}function S(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}r.debuglog=function(e){if(e=e.toUpperCase(),!a[e])if(o.test(e)){var n=t.pid;a[e]=function(){var t=r.format.apply(r,arguments);console.error("%s %d: %s",e,n,t)}}else a[e]=function(){};return a[e]},r.inspect=u,u.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]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.types=e("./support/types"),r.isArray=m,r.isBoolean=g,r.isNull=b,r.isNullOrUndefined=function(e){return null==e},r.isNumber=y,r.isString=_,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=v,r.isRegExp=w,r.types.isRegExp=w,r.isObject=x,r.isDate=k,r.types.isDate=k,r.isError=B,r.types.isNativeError=B,r.isFunction=E,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer");var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function I(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.log=function(){console.log("%s - %s",function(){var e=new Date,t=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":");return[e.getDate(),C[e.getMonth()],t].join(" ")}(),r.format.apply(r,arguments))},r.inherits=e("inherits"),r._extend=function(e,t){if(!t||!x(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var P="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function T(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}r.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(P&&e[P]){var t;if("function"!=typeof(t=e[P]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise(function(e,n){t=e,r=n}),i=[],a=0;a<arguments.length;a++)i.push(arguments[a]);i.push(function(e,n){e?r(e):t(n)});try{e.apply(this,i)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),P&&Object.defineProperty(t,P,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,n(e))},r.promisify.custom=P,r.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 a=this,o=function(){return i.apply(a,arguments)};e.apply(this,r).then(function(e){t.nextTick(o.bind(null,null,e))},function(e){t.nextTick(T.bind(null,e,o))})}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Object.defineProperties(r,n(e)),r}}).call(this)}).call(this,e("_process"))},{"./support/isBuffer":82,"./support/types":83,_process:63,inherits:46}],85:[function(e,t,r){(function(r){(function(){var n=e("for-each"),i=e("available-typed-arrays"),a=e("call-bind/callBound"),o=e("gopd"),s=a("Object.prototype.toString"),u=e("has-tostringtag/shams")(),l="undefined"==typeof globalThis?r:globalThis,c=i(),f=a("String.prototype.slice"),h={},d=Object.getPrototypeOf;u&&o&&d&&n(c,function(e){if("function"==typeof l[e]){var t=new l[e];if(Symbol.toStringTag in t){var r=d(t),n=o(r,Symbol.toStringTag);if(!n){var i=d(r);n=o(i,Symbol.toStringTag)}h[e]=n.get}}});var p=e("is-typed-array");t.exports=function(e){return!!p(e)&&(u&&Symbol.toStringTag in e?function(e){var t=!1;return n(h,function(r,n){if(!t)try{var i=r.call(e);i===n&&(t=i)}catch(e){}}),t}(e):f(s(e),8,-1))}}).call(this)}).call(this,void 0!==commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"available-typed-arrays":27,"call-bind/callBound":33,"for-each":36,gopd:40,"has-tostringtag/shams":43,"is-typed-array":50}]},{},[20])(20);var browserExports=browser$1.exports,PNGFilterType,PNGFilterType2,PNGColorType,PNGColorType2;function png(){return{mime:"image/png",hasAlpha:!0,encode:(e,{deflateLevel:t=9,deflateStrategy:r=3,filterType:n=PNGFilterType.AUTO,colorType:i,inputHasAlpha:a=!0,...o}={})=>{const s=new browserExports.PNG({width:e.width,height:e.height});return s.data=e.data,browserExports.PNG.sync.write(s,{...o,deflateLevel:t,deflateStrategy:r,filterType:n,colorType:void 0!==i?i:a?PNGColorType.COLOR_ALPHA:PNGColorType.COLOR,inputHasAlpha:a})},decode:(e,t)=>{const r=browserExports.PNG.sync.read(e,t);return{data:r.data,width:r.width,height:r.height}}}}PNGFilterType2=PNGFilterType||(PNGFilterType={}),PNGFilterType2[PNGFilterType2.AUTO=-1]="AUTO",PNGFilterType2[PNGFilterType2.NONE=0]="NONE",PNGFilterType2[PNGFilterType2.SUB=1]="SUB",PNGFilterType2[PNGFilterType2.UP=2]="UP",PNGFilterType2[PNGFilterType2.AVERAGE=3]="AVERAGE",PNGFilterType2[PNGFilterType2.PATH=4]="PATH",PNGColorType2=PNGColorType||(PNGColorType={}),PNGColorType2[PNGColorType2.GRAYSCALE=0]="GRAYSCALE",PNGColorType2[PNGColorType2.COLOR=2]="COLOR",PNGColorType2[PNGColorType2.GRAYSCALE_ALPHA=4]="GRAYSCALE_ALPHA",PNGColorType2[PNGColorType2.COLOR_ALPHA=6]="COLOR_ALPHA";var UTIF={exports:{}},common={},hasRequiredCommon;function requireCommon(){return hasRequiredCommon||(hasRequiredCommon=1,function(e){var t="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)r(n,i)&&(e[i]=n[i])}}return e},e.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var n={arraySet:function(e,t,r,n,i){if(t.subarray&&e.subarray)e.set(t.subarray(r,r+n),i);else for(var a=0;a<n;a++)e[i+a]=t[r+a]},flattenChunks:function(e){var t,r,n,i,a,o;for(n=0,t=0,r=e.length;t<r;t++)n+=e[t].length;for(o=new Uint8Array(n),i=0,t=0,r=e.length;t<r;t++)a=e[t],o.set(a,i),i+=a.length;return o}},i={arraySet:function(e,t,r,n,i){for(var a=0;a<n;a++)e[i+a]=t[r+a]},flattenChunks:function(e){return[].concat.apply([],e)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,n)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,i))},e.setTyped(t)}(common)),common}var deflate$1={},deflate={},trees={},hasRequiredTrees,adler32_1,hasRequiredAdler32,crc32_1,hasRequiredCrc32,messages,hasRequiredMessages,hasRequiredDeflate$1;function requireTrees(){if(hasRequiredTrees)return trees;hasRequiredTrees=1;var e=requireCommon();function t(e){for(var t=e.length;--t>=0;)e[t]=0}var r=[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],n=[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],i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],a=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],o=new Array(576);t(o);var s=new Array(60);t(s);var u=new Array(512);t(u);var l=new Array(256);t(l);var c=new Array(29);t(c);var f,h,d,p=new Array(30);function m(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function g(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function b(e){return e<256?u[e]:u[256+(e>>>7)]}function y(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function _(e,t,r){e.bi_valid>16-r?(e.bi_buf|=t<<e.bi_valid&65535,y(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=r)}function v(e,t,r){_(e,r[2*t],r[2*t+1])}function w(e,t){var r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1}function x(e,t,r){var n,i,a=new Array(16),o=0;for(n=1;n<=15;n++)a[n]=o=o+r[n-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=w(a[s]++,s))}}function k(e){var t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function B(e){e.bi_valid>8?y(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function E(e,t,r,n){var i=2*t,a=2*r;return e[i]<e[a]||e[i]===e[a]&&n[t]<=n[r]}function S(e,t,r){for(var n=e.heap[r],i=r<<1;i<=e.heap_len&&(i<e.heap_len&&E(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!E(t,n,e.heap[i],e.depth));)e.heap[r]=e.heap[i],r=i,i<<=1;e.heap[r]=n}function A(e,t,i){var a,o,s,u,f=0;if(0!==e.last_lit)do{a=e.pending_buf[e.d_buf+2*f]<<8|e.pending_buf[e.d_buf+2*f+1],o=e.pending_buf[e.l_buf+f],f++,0===a?v(e,o,t):(v(e,(s=l[o])+256+1,t),0!==(u=r[s])&&_(e,o-=c[s],u),v(e,s=b(--a),i),0!==(u=n[s])&&_(e,a-=p[s],u))}while(f<e.last_lit);v(e,256,t)}function C(e,t){var r,n,i,a=t.dyn_tree,o=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=573,r=0;r<u;r++)0!==a[2*r]?(e.heap[++e.heap_len]=l=r,e.depth[r]=0):a[2*r+1]=0;for(;e.heap_len<2;)a[2*(i=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=o[2*i+1]);for(t.max_code=l,r=e.heap_len>>1;r>=1;r--)S(e,a,r);i=u;do{r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],S(e,a,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,a[2*i]=a[2*r]+a[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,a[2*r+1]=a[2*n+1]=i,e.heap[1]=i++,S(e,a,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var r,n,i,a,o,s,u=t.dyn_tree,l=t.max_code,c=t.stat_desc.static_tree,f=t.stat_desc.has_stree,h=t.stat_desc.extra_bits,d=t.stat_desc.extra_base,p=t.stat_desc.max_length,m=0;for(a=0;a<=15;a++)e.bl_count[a]=0;for(u[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;r<573;r++)(a=u[2*u[2*(n=e.heap[r])+1]+1]+1)>p&&(a=p,m++),u[2*n+1]=a,n>l||(e.bl_count[a]++,o=0,n>=d&&(o=h[n-d]),s=u[2*n],e.opt_len+=s*(a+o),f&&(e.static_len+=s*(c[2*n+1]+o)));if(0!==m){do{for(a=p-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[p]--,m-=2}while(m>0);for(a=p;0!==a;a--)for(n=e.bl_count[a];0!==n;)(i=e.heap[--r])>l||(u[2*i+1]!==a&&(e.opt_len+=(a-u[2*i+1])*u[2*i],u[2*i+1]=a),n--)}}(e,t),x(a,l,e.bl_count)}function I(e,t,r){var n,i,a=-1,o=t[1],s=0,u=7,l=4;for(0===o&&(u=138,l=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=t[2*(n+1)+1],++s<u&&i===o||(s<l?e.bl_tree[2*i]+=s:0!==i?(i!==a&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,s=0,a=i,0===o?(u=138,l=3):i===o?(u=6,l=3):(u=7,l=4))}function P(e,t,r){var n,i,a=-1,o=t[1],s=0,u=7,l=4;for(0===o&&(u=138,l=3),n=0;n<=r;n++)if(i=o,o=t[2*(n+1)+1],!(++s<u&&i===o)){if(s<l)do{v(e,i,e.bl_tree)}while(0!=--s);else 0!==i?(i!==a&&(v(e,i,e.bl_tree),s--),v(e,16,e.bl_tree),_(e,s-3,2)):s<=10?(v(e,17,e.bl_tree),_(e,s-3,3)):(v(e,18,e.bl_tree),_(e,s-11,7));s=0,a=i,0===o?(u=138,l=3):i===o?(u=6,l=3):(u=7,l=4)}}t(p);var T=!1;function M(t,r,n,i){_(t,0+(i?1:0),3),function(t,r,n){B(t),y(t,n),y(t,~n),e.arraySet(t.pending_buf,t.window,r,n,t.pending),t.pending+=n}(t,r,n)}return trees._tr_init=function(e){T||(function(){var e,t,a,g,b,y=new Array(16);for(a=0,g=0;g<28;g++)for(c[g]=a,e=0;e<1<<r[g];e++)l[a++]=g;for(l[a-1]=g,b=0,g=0;g<16;g++)for(p[g]=b,e=0;e<1<<n[g];e++)u[b++]=g;for(b>>=7;g<30;g++)for(p[g]=b<<7,e=0;e<1<<n[g]-7;e++)u[256+b++]=g;for(t=0;t<=15;t++)y[t]=0;for(e=0;e<=143;)o[2*e+1]=8,e++,y[8]++;for(;e<=255;)o[2*e+1]=9,e++,y[9]++;for(;e<=279;)o[2*e+1]=7,e++,y[7]++;for(;e<=287;)o[2*e+1]=8,e++,y[8]++;for(x(o,287,y),e=0;e<30;e++)s[2*e+1]=5,s[2*e]=w(e,5);f=new m(o,r,257,286,15),h=new m(s,n,0,30,15),d=new m(new Array(0),i,0,19,7)}(),T=!0),e.l_desc=new g(e.dyn_ltree,f),e.d_desc=new g(e.dyn_dtree,h),e.bl_desc=new g(e.bl_tree,d),e.bi_buf=0,e.bi_valid=0,k(e)},trees._tr_stored_block=M,trees._tr_flush_block=function(e,t,r,n){var i,u,l=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=function(e){var t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),C(e,e.l_desc),C(e,e.d_desc),l=function(e){var t;for(I(e,e.dyn_ltree,e.l_desc.max_code),I(e,e.dyn_dtree,e.d_desc.max_code),C(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*a[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(u=e.static_len+3+7>>>3)<=i&&(i=u)):i=u=r+5,r+4<=i&&-1!==t?M(e,t,r,n):4===e.strategy||u===i?(_(e,2+(n?1:0),3),A(e,o,s)):(_(e,4+(n?1:0),3),function(e,t,r,n){var i;for(_(e,t-257,5),_(e,r-1,5),_(e,n-4,4),i=0;i<n;i++)_(e,e.bl_tree[2*a[i]+1],3);P(e,e.dyn_ltree,t-1),P(e,e.dyn_dtree,r-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,l+1),A(e,e.dyn_ltree,e.dyn_dtree)),k(e),n&&B(e)},trees._tr_tally=function(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(l[r]+256+1)]++,e.dyn_dtree[2*b(t)]++),e.last_lit===e.lit_bufsize-1},trees._tr_align=function(e){_(e,2,3),v(e,256,o),function(e){16===e.bi_valid?(y(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)},trees}function requireAdler32(){return hasRequiredAdler32||(hasRequiredAdler32=1,adler32_1=function(e,t,r,n){for(var i=65535&e,a=e>>>16&65535,o=0;0!==r;){r-=o=r>2e3?2e3:r;do{a=a+(i=i+t[n++]|0)|0}while(--o);i%=65521,a%=65521}return i|a<<16}),adler32_1}function requireCrc32(){if(hasRequiredCrc32)return crc32_1;hasRequiredCrc32=1;var e=function(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}();return crc32_1=function(t,r,n,i){var a=e,o=i+n;t^=-1;for(var s=i;s<o;s++)t=t>>>8^a[255&(t^r[s])];return~t},crc32_1}function requireMessages(){return hasRequiredMessages?messages:(hasRequiredMessages=1,messages={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 requireDeflate$1(){if(hasRequiredDeflate$1)return deflate;hasRequiredDeflate$1=1;var e,t=requireCommon(),r=requireTrees(),n=requireAdler32(),i=requireCrc32(),a=requireMessages(),o=-2,s=258,u=262,l=103,c=113,f=666;function h(e,t){return e.msg=a[t],t}function d(e){return(e<<1)-(e>4?9:0)}function p(e){for(var t=e.length;--t>=0;)e[t]=0}function m(e){var r=e.state,n=r.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(t.arraySet(e.output,r.pending_buf,r.pending_out,n,e.next_out),e.next_out+=n,r.pending_out+=n,e.total_out+=n,e.avail_out-=n,r.pending-=n,0===r.pending&&(r.pending_out=0))}function g(e,t){r._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,m(e.strm)}function b(e,t){e.pending_buf[e.pending++]=t}function y(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function _(e,t){var r,n,i=e.max_chain_length,a=e.strstart,o=e.prev_length,l=e.nice_match,c=e.strstart>e.w_size-u?e.strstart-(e.w_size-u):0,f=e.window,h=e.w_mask,d=e.prev,p=e.strstart+s,m=f[a+o-1],g=f[a+o];e.prev_length>=e.good_match&&(i>>=2),l>e.lookahead&&(l=e.lookahead);do{if(f[(r=t)+o]===g&&f[r+o-1]===m&&f[r]===f[a]&&f[++r]===f[a+1]){a+=2,r++;do{}while(f[++a]===f[++r]&&f[++a]===f[++r]&&f[++a]===f[++r]&&f[++a]===f[++r]&&f[++a]===f[++r]&&f[++a]===f[++r]&&f[++a]===f[++r]&&f[++a]===f[++r]&&a<p);if(n=s-(p-a),a=p-s,n>o){if(e.match_start=t,o=n,n>=l)break;m=f[a+o-1],g=f[a+o]}}}while((t=d[t&h])>c&&0!=--i);return o<=e.lookahead?o:e.lookahead}function v(e){var r,a,o,s,l,c,f,h,d,p,m=e.w_size;do{if(s=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-u)){t.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,r=a=e.hash_size;do{o=e.head[--r],e.head[r]=o>=m?o-m:0}while(--a);r=a=m;do{o=e.prev[--r],e.prev[r]=o>=m?o-m:0}while(--a);s+=m}if(0===e.strm.avail_in)break;if(c=e.strm,f=e.window,h=e.strstart+e.lookahead,d=s,p=void 0,(p=c.avail_in)>d&&(p=d),a=0===p?0:(c.avail_in-=p,t.arraySet(f,c.input,c.next_in,p,h),1===c.state.wrap?c.adler=n(c.adler,f,p,h):2===c.state.wrap&&(c.adler=i(c.adler,f,p,h)),c.next_in+=p,c.total_in+=p,p),e.lookahead+=a,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[l+3-1])&e.hash_mask,e.prev[l&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=l,l++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<u&&0!==e.strm.avail_in)}function w(e,t){for(var n,i;;){if(e.lookahead<u){if(v(e),e.lookahead<u&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-u&&(e.match_length=_(e,n)),e.match_length>=3)if(i=r._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else i=r._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(i&&(g(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(g(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(g(e,!1),0===e.strm.avail_out)?1:2}function x(e,t){for(var n,i,a;;){if(e.lookahead<u){if(v(e),e.lookahead<u&&0===t)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-u&&(e.match_length=_(e,n),e.match_length<=5&&(1===e.strategy||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-3,i=r._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,i&&(g(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((i=r._tr_tally(e,0,e.window[e.strstart-1]))&&g(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(i=r._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(g(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(g(e,!1),0===e.strm.avail_out)?1:2}function k(e,t,r,n,i){this.good_length=e,this.max_lazy=t,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 t.Buf16(1146),this.dyn_dtree=new t.Buf16(122),this.bl_tree=new t.Buf16(78),p(this.dyn_ltree),p(this.dyn_dtree),p(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new t.Buf16(16),this.heap=new t.Buf16(573),p(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new t.Buf16(573),p(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 E(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:c,e.adler=2===t.wrap?0:1,t.last_flush=0,r._tr_init(t),0):h(e,o)}function S(t){var r=E(t);return 0===r&&function(t){t.window_size=2*t.w_size,p(t.head),t.max_lazy_match=e[t.level].max_lazy,t.good_match=e[t.level].good_length,t.nice_match=e[t.level].nice_length,t.max_chain_length=e[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0}(t.state),r}function A(e,r,n,i,a,s){if(!e)return o;var u=1;if(-1===r&&(r=6),i<0?(u=0,i=-i):i>15&&(u=2,i-=16),a<1||a>9||8!==n||i<8||i>15||r<0||r>9||s<0||s>4)return h(e,o);8===i&&(i=9);var l=new B;return e.state=l,l.strm=e,l.wrap=u,l.gzhead=null,l.w_bits=i,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.hash_bits=a+7,l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+3-1)/3),l.window=new t.Buf8(2*l.w_size),l.head=new t.Buf16(l.hash_size),l.prev=new t.Buf16(l.w_size),l.lit_bufsize=1<<a+6,l.pending_buf_size=4*l.lit_bufsize,l.pending_buf=new t.Buf8(l.pending_buf_size),l.d_buf=1*l.lit_bufsize,l.l_buf=3*l.lit_bufsize,l.level=r,l.strategy=s,l.method=n,S(e)}return e=[new k(0,0,0,0,function(e,t){var r=65535;for(r>e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(v(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,g(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-u&&(g(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(g(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(g(e,!1),e.strm.avail_out),1)}),new k(4,4,8,4,w),new k(4,5,16,8,w),new k(4,6,32,32,w),new k(4,4,16,16,x),new k(8,16,32,32,x),new k(8,16,128,128,x),new k(8,32,128,256,x),new k(32,128,258,1024,x),new k(32,258,258,4096,x)],deflate.deflateInit=function(e,t){return A(e,t,8,15,8,0)},deflate.deflateInit2=A,deflate.deflateReset=S,deflate.deflateResetKeep=E,deflate.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?o:(e.state.gzhead=t,0):o},deflate.deflate=function(t,n){var a,u,_,w;if(!t||!t.state||n>5||n<0)return t?h(t,o):o;if(u=t.state,!t.output||!t.input&&0!==t.avail_in||u.status===f&&4!==n)return h(t,0===t.avail_out?-5:o);if(u.strm=t,a=u.last_flush,u.last_flush=n,42===u.status)if(2===u.wrap)t.adler=0,b(u,31),b(u,139),b(u,8),u.gzhead?(b(u,(u.gzhead.text?1:0)+(u.gzhead.hcrc?2:0)+(u.gzhead.extra?4:0)+(u.gzhead.name?8:0)+(u.gzhead.comment?16:0)),b(u,255&u.gzhead.time),b(u,u.gzhead.time>>8&255),b(u,u.gzhead.time>>16&255),b(u,u.gzhead.time>>24&255),b(u,9===u.level?2:u.strategy>=2||u.level<2?4:0),b(u,255&u.gzhead.os),u.gzhead.extra&&u.gzhead.extra.length&&(b(u,255&u.gzhead.extra.length),b(u,u.gzhead.extra.length>>8&255)),u.gzhead.hcrc&&(t.adler=i(t.adler,u.pending_buf,u.pending,0)),u.gzindex=0,u.status=69):(b(u,0),b(u,0),b(u,0),b(u,0),b(u,0),b(u,9===u.level?2:u.strategy>=2||u.level<2?4:0),b(u,3),u.status=c);else{var x=8+(u.w_bits-8<<4)<<8;x|=(u.strategy>=2||u.level<2?0:u.level<6?1:6===u.level?2:3)<<6,0!==u.strstart&&(x|=32),x+=31-x%31,u.status=c,y(u,x),0!==u.strstart&&(y(u,t.adler>>>16),y(u,65535&t.adler)),t.adler=1}if(69===u.status)if(u.gzhead.extra){for(_=u.pending;u.gzindex<(65535&u.gzhead.extra.length)&&(u.pending!==u.pending_buf_size||(u.gzhead.hcrc&&u.pending>_&&(t.adler=i(t.adler,u.pending_buf,u.pending-_,_)),m(t),_=u.pending,u.pending!==u.pending_buf_size));)b(u,255&u.gzhead.extra[u.gzindex]),u.gzindex++;u.gzhead.hcrc&&u.pending>_&&(t.adler=i(t.adler,u.pending_buf,u.pending-_,_)),u.gzindex===u.gzhead.extra.length&&(u.gzindex=0,u.status=73)}else u.status=73;if(73===u.status)if(u.gzhead.name){_=u.pending;do{if(u.pending===u.pending_buf_size&&(u.gzhead.hcrc&&u.pending>_&&(t.adler=i(t.adler,u.pending_buf,u.pending-_,_)),m(t),_=u.pending,u.pending===u.pending_buf_size)){w=1;break}w=u.gzindex<u.gzhead.name.length?255&u.gzhead.name.charCodeAt(u.gzindex++):0,b(u,w)}while(0!==w);u.gzhead.hcrc&&u.pending>_&&(t.adler=i(t.adler,u.pending_buf,u.pending-_,_)),0===w&&(u.gzindex=0,u.status=91)}else u.status=91;if(91===u.status)if(u.gzhead.comment){_=u.pending;do{if(u.pending===u.pending_buf_size&&(u.gzhead.hcrc&&u.pending>_&&(t.adler=i(t.adler,u.pending_buf,u.pending-_,_)),m(t),_=u.pending,u.pending===u.pending_buf_size)){w=1;break}w=u.gzindex<u.gzhead.comment.length?255&u.gzhead.comment.charCodeAt(u.gzindex++):0,b(u,w)}while(0!==w);u.gzhead.hcrc&&u.pending>_&&(t.adler=i(t.adler,u.pending_buf,u.pending-_,_)),0===w&&(u.status=l)}else u.status=l;if(u.status===l&&(u.gzhead.hcrc?(u.pending+2>u.pending_buf_size&&m(t),u.pending+2<=u.pending_buf_size&&(b(u,255&t.adler),b(u,t.adler>>8&255),t.adler=0,u.status=c)):u.status=c),0!==u.pending){if(m(t),0===t.avail_out)return u.last_flush=-1,0}else if(0===t.avail_in&&d(n)<=d(a)&&4!==n)return h(t,-5);if(u.status===f&&0!==t.avail_in)return h(t,-5);if(0!==t.avail_in||0!==u.lookahead||0!==n&&u.status!==f){var k=2===u.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(v(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=r._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(g(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(g(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(g(e,!1),0===e.strm.avail_out)?1:2}(u,n):3===u.strategy?function(e,t){for(var n,i,a,o,u=e.window;;){if(e.lookahead<=s){if(v(e),e.lookahead<=s&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(i=u[a=e.strstart-1])===u[++a]&&i===u[++a]&&i===u[++a]){o=e.strstart+s;do{}while(i===u[++a]&&i===u[++a]&&i===u[++a]&&i===u[++a]&&i===u[++a]&&i===u[++a]&&i===u[++a]&&i===u[++a]&&a<o);e.match_length=s-(o-a),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=r._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=r._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(g(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(g(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(g(e,!1),0===e.strm.avail_out)?1:2}(u,n):e[u.level].func(u,n);if(3!==k&&4!==k||(u.status=f),1===k||3===k)return 0===t.avail_out&&(u.last_flush=-1),0;if(2===k&&(1===n?r._tr_align(u):5!==n&&(r._tr_stored_block(u,0,0,!1),3===n&&(p(u.head),0===u.lookahead&&(u.strstart=0,u.block_start=0,u.insert=0))),m(t),0===t.avail_out))return u.last_flush=-1,0}return 4!==n?0:u.wrap<=0?1:(2===u.wrap?(b(u,255&t.adler),b(u,t.adler>>8&255),b(u,t.adler>>16&255),b(u,t.adler>>24&255),b(u,255&t.total_in),b(u,t.total_in>>8&255),b(u,t.total_in>>16&255),b(u,t.total_in>>24&255)):(y(u,t.adler>>>16),y(u,65535&t.adler)),m(t),u.wrap>0&&(u.wrap=-u.wrap),0!==u.pending?0:1)},deflate.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&t!==l&&t!==c&&t!==f?h(e,o):(e.state=null,t===c?h(e,-3):0):o},deflate.deflateSetDictionary=function(e,r){var i,a,s,u,l,c,f,h,d=r.length;if(!e||!e.state)return o;if(2===(u=(i=e.state).wrap)||1===u&&42!==i.status||i.lookahead)return o;for(1===u&&(e.adler=n(e.adler,r,d,0)),i.wrap=0,d>=i.w_size&&(0===u&&(p(i.head),i.strstart=0,i.block_start=0,i.insert=0),h=new t.Buf8(i.w_size),t.arraySet(h,r,d-i.w_size,i.w_size,0),r=h,d=i.w_size),l=e.avail_in,c=e.next_in,f=e.input,e.avail_in=d,e.next_in=0,e.input=r,v(i);i.lookahead>=3;){a=i.strstart,s=i.lookahead-2;do{i.ins_h=(i.ins_h<<i.hash_shift^i.window[a+3-1])&i.hash_mask,i.prev[a&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=a,a++}while(--s);i.strstart=a,i.lookahead=2,v(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,e.next_in=c,e.input=f,e.avail_in=l,i.wrap=u,0},deflate.deflateInfo="pako deflate (from Nodeca project)",deflate}var strings={},hasRequiredStrings,zstream,hasRequiredZstream,hasRequiredDeflate;function requireStrings(){if(hasRequiredStrings)return strings;hasRequiredStrings=1;var e=requireCommon(),t=!0,r=!0;try{String.fromCharCode.apply(null,[0])}catch(e){t=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){r=!1}for(var n=new e.Buf8(256),i=0;i<256;i++)n[i]=i>=252?6:i>=248?5:i>=240?4:i>=224?3:i>=192?2:1;function a(n,i){if(i<65534&&(n.subarray&&r||!n.subarray&&t))return String.fromCharCode.apply(null,e.shrinkBuf(n,i));for(var a="",o=0;o<i;o++)a+=String.fromCharCode(n[o]);return a}return n[254]=n[254]=1,strings.string2buf=function(t){var r,n,i,a,o,s=t.length,u=0;for(a=0;a<s;a++)55296==(64512&(n=t.charCodeAt(a)))&&a+1<s&&56320==(64512&(i=t.charCodeAt(a+1)))&&(n=65536+(n-55296<<10)+(i-56320),a++),u+=n<128?1:n<2048?2:n<65536?3:4;for(r=new e.Buf8(u),o=0,a=0;o<u;a++)55296==(64512&(n=t.charCodeAt(a)))&&a+1<s&&56320==(64512&(i=t.charCodeAt(a+1)))&&(n=65536+(n-55296<<10)+(i-56320),a++),n<128?r[o++]=n:n<2048?(r[o++]=192|n>>>6,r[o++]=128|63&n):n<65536?(r[o++]=224|n>>>12,r[o++]=128|n>>>6&63,r[o++]=128|63&n):(r[o++]=240|n>>>18,r[o++]=128|n>>>12&63,r[o++]=128|n>>>6&63,r[o++]=128|63&n);return r},strings.buf2binstring=function(e){return a(e,e.length)},strings.binstring2buf=function(t){for(var r=new e.Buf8(t.length),n=0,i=r.length;n<i;n++)r[n]=t.charCodeAt(n);return r},strings.buf2string=function(e,t){var r,i,o,s,u=t||e.length,l=new Array(2*u);for(i=0,r=0;r<u;)if((o=e[r++])<128)l[i++]=o;else if((s=n[o])>4)l[i++]=65533,r+=s-1;else{for(o&=2===s?31:3===s?15:7;s>1&&r<u;)o=o<<6|63&e[r++],s--;s>1?l[i++]=65533:o<65536?l[i++]=o:(o-=65536,l[i++]=55296|o>>10&1023,l[i++]=56320|1023&o)}return a(l,i)},strings.utf8border=function(e,t){var r;for((t=t||e.length)>e.length&&(t=e.length),r=t-1;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+n[e[r]]>t?r:t},strings}function requireZstream(){return hasRequiredZstream?zstream:(hasRequiredZstream=1,zstream=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 requireDeflate(){if(hasRequiredDeflate)return deflate$1;hasRequiredDeflate=1;var e=requireDeflate$1(),t=requireCommon(),r=requireStrings(),n=requireMessages(),i=requireZstream(),a=Object.prototype.toString;function o(s){if(!(this instanceof o))return new o(s);this.options=t.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},s||{});var u=this.options;u.raw&&u.windowBits>0?u.windowBits=-u.windowBits:u.gzip&&u.windowBits>0&&u.windowBits<16&&(u.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new i,this.strm.avail_out=0;var l=e.deflateInit2(this.strm,u.level,u.method,u.windowBits,u.memLevel,u.strategy);if(0!==l)throw new Error(n[l]);if(u.header&&e.deflateSetHeader(this.strm,u.header),u.dictionary){var c;if(c="string"==typeof u.dictionary?r.string2buf(u.dictionary):"[object ArrayBuffer]"===a.call(u.dictionary)?new Uint8Array(u.dictionary):u.dictionary,0!==(l=e.deflateSetDictionary(this.strm,c)))throw new Error(n[l]);this._dict_set=!0}}function s(e,t){var r=new o(t);if(r.push(e,!0),r.err)throw r.msg||n[r.err];return r.result}return o.prototype.push=function(n,i){var o,s,u=this.strm,l=this.options.chunkSize;if(this.ended)return!1;s=i===~~i?i:!0===i?4:0,"string"==typeof n?u.input=r.string2buf(n):"[object ArrayBuffer]"===a.call(n)?u.input=new Uint8Array(n):u.input=n,u.next_in=0,u.avail_in=u.input.length;do{if(0===u.avail_out&&(u.output=new t.Buf8(l),u.next_out=0,u.avail_out=l),1!==(o=e.deflate(u,s))&&0!==o)return this.onEnd(o),this.ended=!0,!1;0!==u.avail_out&&(0!==u.avail_in||4!==s&&2!==s)||("string"===this.options.to?this.onData(r.buf2binstring(t.shrinkBuf(u.output,u.next_out))):this.onData(t.shrinkBuf(u.output,u.next_out)))}while((u.avail_in>0||0===u.avail_out)&&1!==o);return 4===s?(o=e.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,0===o):2!==s||(this.onEnd(0),u.avail_out=0,!0)},o.prototype.onData=function(e){this.chunks.push(e)},o.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=t.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},deflate$1.Deflate=o,deflate$1.deflate=s,deflate$1.deflateRaw=function(e,t){return(t=t||{}).raw=!0,s(e,t)},deflate$1.gzip=function(e,t){return(t=t||{}).gzip=!0,s(e,t)},deflate$1}var inflate$1={},inflate={},inffast,hasRequiredInffast,inftrees,hasRequiredInftrees,hasRequiredInflate$1,constants,hasRequiredConstants,gzheader,hasRequiredGzheader,hasRequiredInflate,pako_1,hasRequiredPako;function requireInffast(){return hasRequiredInffast||(hasRequiredInffast=1,inffast=function(e,t){var r,n,i,a,o,s,u,l,c,f,h,d,p,m,g,b,y,_,v,w,x,k,B,E,S;r=e.state,n=e.next_in,E=e.input,i=n+(e.avail_in-5),a=e.next_out,S=e.output,o=a-(t-e.avail_out),s=a+(e.avail_out-257),u=r.dmax,l=r.wsize,c=r.whave,f=r.wnext,h=r.window,d=r.hold,p=r.bits,m=r.lencode,g=r.distcode,b=(1<<r.lenbits)-1,y=(1<<r.distbits)-1;e:do{p<15&&(d+=E[n++]<<p,p+=8,d+=E[n++]<<p,p+=8),_=m[d&b];t:for(;;){if(d>>>=v=_>>>24,p-=v,0==(v=_>>>16&255))S[a++]=65535&_;else{if(!(16&v)){if(64&v){if(32&v){r.mode=12;break e}e.msg="invalid literal/length code",r.mode=30;break e}_=m[(65535&_)+(d&(1<<v)-1)];continue t}for(w=65535&_,(v&=15)&&(p<v&&(d+=E[n++]<<p,p+=8),w+=d&(1<<v)-1,d>>>=v,p-=v),p<15&&(d+=E[n++]<<p,p+=8,d+=E[n++]<<p,p+=8),_=g[d&y];;){if(d>>>=v=_>>>24,p-=v,16&(v=_>>>16&255)){if(x=65535&_,p<(v&=15)&&(d+=E[n++]<<p,(p+=8)<v&&(d+=E[n++]<<p,p+=8)),(x+=d&(1<<v)-1)>u){e.msg="invalid distance too far back",r.mode=30;break e}if(d>>>=v,p-=v,x>(v=a-o)){if((v=x-v)>c&&r.sane){e.msg="invalid distance too far back",r.mode=30;break e}if(k=0,B=h,0===f){if(k+=l-v,v<w){w-=v;do{S[a++]=h[k++]}while(--v);k=a-x,B=S}}else if(f<v){if(k+=l+f-v,(v-=f)<w){w-=v;do{S[a++]=h[k++]}while(--v);if(k=0,f<w){w-=v=f;do{S[a++]=h[k++]}while(--v);k=a-x,B=S}}}else if(k+=f-v,v<w){w-=v;do{S[a++]=h[k++]}while(--v);k=a-x,B=S}for(;w>2;)S[a++]=B[k++],S[a++]=B[k++],S[a++]=B[k++],w-=3;w&&(S[a++]=B[k++],w>1&&(S[a++]=B[k++]))}else{k=a-x;do{S[a++]=S[k++],S[a++]=S[k++],S[a++]=S[k++],w-=3}while(w>2);w&&(S[a++]=S[k++],w>1&&(S[a++]=S[k++]))}break}if(64&v){e.msg="invalid distance code",r.mode=30;break e}_=g[(65535&_)+(d&(1<<v)-1)]}}break}}while(n<i&&a<s);n-=w=p>>3,d&=(1<<(p-=w<<3))-1,e.next_in=n,e.next_out=a,e.avail_in=n<i?i-n+5:5-(n-i),e.avail_out=a<s?s-a+257:257-(a-s),r.hold=d,r.bits=p}),inffast}function requireInftrees(){if(hasRequiredInftrees)return inftrees;hasRequiredInftrees=1;var e=requireCommon(),t=[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],r=[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],n=[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],i=[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];return inftrees=function(a,o,s,u,l,c,f,h){var d,p,m,g,b,y,_,v,w,x=h.bits,k=0,B=0,E=0,S=0,A=0,C=0,I=0,P=0,T=0,M=0,R=null,F=0,O=new e.Buf16(16),N=new e.Buf16(16),L=null,D=0;for(k=0;k<=15;k++)O[k]=0;for(B=0;B<u;B++)O[o[s+B]]++;for(A=x,S=15;S>=1&&0===O[S];S--);if(A>S&&(A=S),0===S)return l[c++]=20971520,l[c++]=20971520,h.bits=1,0;for(E=1;E<S&&0===O[E];E++);for(A<E&&(A=E),P=1,k=1;k<=15;k++)if(P<<=1,(P-=O[k])<0)return-1;if(P>0&&(0===a||1!==S))return-1;for(N[1]=0,k=1;k<15;k++)N[k+1]=N[k]+O[k];for(B=0;B<u;B++)0!==o[s+B]&&(f[N[o[s+B]]++]=B);if(0===a?(R=L=f,y=19):1===a?(R=t,F-=257,L=r,D-=257,y=256):(R=n,L=i,y=-1),M=0,B=0,k=E,b=c,C=A,I=0,m=-1,g=(T=1<<A)-1,1===a&&T>852||2===a&&T>592)return 1;for(;;){_=k-I,f[B]<y?(v=0,w=f[B]):f[B]>y?(v=L[D+f[B]],w=R[F+f[B]]):(v=96,w=0),d=1<<k-I,E=p=1<<C;do{l[b+(M>>I)+(p-=d)]=_<<24|v<<16|w}while(0!==p);for(d=1<<k-1;M&d;)d>>=1;if(0!==d?(M&=d-1,M+=d):M=0,B++,0==--O[k]){if(k===S)break;k=o[s+f[B]]}if(k>A&&(M&g)!==m){for(0===I&&(I=A),b+=E,P=1<<(C=k-I);C+I<S&&!((P-=O[C+I])<=0);)C++,P<<=1;if(T+=1<<C,1===a&&T>852||2===a&&T>592)return 1;l[m=M&g]=A<<24|C<<16|b-c}}return 0!==M&&(l[b+M]=k-I<<24|64<<16),h.bits=A,0}}function requireInflate$1(){if(hasRequiredInflate$1)return inflate;hasRequiredInflate$1=1;var e=requireCommon(),t=requireAdler32(),r=requireCrc32(),n=requireInffast(),i=requireInftrees(),a=-2,o=12,s=30;function u(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<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 e.Buf16(320),this.work=new e.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function c(t){var r;return t&&t.state?(r=t.state,t.total_in=t.total_out=r.total=0,t.msg="",r.wrap&&(t.adler=1&r.wrap),r.mode=1,r.last=0,r.havedict=0,r.dmax=32768,r.head=null,r.hold=0,r.bits=0,r.lencode=r.lendyn=new e.Buf32(852),r.distcode=r.distdyn=new e.Buf32(592),r.sane=1,r.back=-1,0):a}function f(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,c(e)):a}function h(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?a:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,f(e))):a}function d(e,t){var r,n;return e?(n=new l,e.state=n,n.window=null,0!==(r=h(e,t))&&(e.state=null),r):a}var p,m,g=!0;function b(t){if(g){var r;for(p=new e.Buf32(512),m=new e.Buf32(32),r=0;r<144;)t.lens[r++]=8;for(;r<256;)t.lens[r++]=9;for(;r<280;)t.lens[r++]=7;for(;r<288;)t.lens[r++]=8;for(i(1,t.lens,0,288,p,0,t.work,{bits:9}),r=0;r<32;)t.lens[r++]=5;i(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 y(t,r,n,i){var a,o=t.state;return null===o.window&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new e.Buf8(o.wsize)),i>=o.wsize?(e.arraySet(o.window,r,n-o.wsize,o.wsize,0),o.wnext=0,o.whave=o.wsize):((a=o.wsize-o.wnext)>i&&(a=i),e.arraySet(o.window,r,n-i,a,o.wnext),(i-=a)?(e.arraySet(o.window,r,n-i,i,0),o.wnext=i,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),0}return inflate.inflateReset=f,inflate.inflateReset2=h,inflate.inflateResetKeep=c,inflate.inflateInit=function(e){return d(e,15)},inflate.inflateInit2=d,inflate.inflate=function(l,c){var f,h,d,p,m,g,_,v,w,x,k,B,E,S,A,C,I,P,T,M,R,F,O,N,L=0,D=new e.Buf8(4),z=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!l||!l.state||!l.output||!l.input&&0!==l.avail_in)return a;(f=l.state).mode===o&&(f.mode=13),m=l.next_out,d=l.output,_=l.avail_out,p=l.next_in,h=l.input,g=l.avail_in,v=f.hold,w=f.bits,x=g,k=_,F=0;e:for(;;)switch(f.mode){case 1:if(0===f.wrap){f.mode=13;break}for(;w<16;){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}if(2&f.wrap&&35615===v){f.check=0,D[0]=255&v,D[1]=v>>>8&255,f.check=r(f.check,D,2,0),v=0,w=0,f.mode=2;break}if(f.flags=0,f.head&&(f.head.done=!1),!(1&f.wrap)||(((255&v)<<8)+(v>>8))%31){l.msg="incorrect header check",f.mode=s;break}if(8!=(15&v)){l.msg="unknown compression method",f.mode=s;break}if(w-=4,R=8+(15&(v>>>=4)),0===f.wbits)f.wbits=R;else if(R>f.wbits){l.msg="invalid window size",f.mode=s;break}f.dmax=1<<R,l.adler=f.check=1,f.mode=512&v?10:o,v=0,w=0;break;case 2:for(;w<16;){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}if(f.flags=v,8!=(255&f.flags)){l.msg="unknown compression method",f.mode=s;break}if(57344&f.flags){l.msg="unknown header flags set",f.mode=s;break}f.head&&(f.head.text=v>>8&1),512&f.flags&&(D[0]=255&v,D[1]=v>>>8&255,f.check=r(f.check,D,2,0)),v=0,w=0,f.mode=3;case 3:for(;w<32;){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}f.head&&(f.head.time=v),512&f.flags&&(D[0]=255&v,D[1]=v>>>8&255,D[2]=v>>>16&255,D[3]=v>>>24&255,f.check=r(f.check,D,4,0)),v=0,w=0,f.mode=4;case 4:for(;w<16;){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}f.head&&(f.head.xflags=255&v,f.head.os=v>>8),512&f.flags&&(D[0]=255&v,D[1]=v>>>8&255,f.check=r(f.check,D,2,0)),v=0,w=0,f.mode=5;case 5:if(1024&f.flags){for(;w<16;){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}f.length=v,f.head&&(f.head.extra_len=v),512&f.flags&&(D[0]=255&v,D[1]=v>>>8&255,f.check=r(f.check,D,2,0)),v=0,w=0}else f.head&&(f.head.extra=null);f.mode=6;case 6:if(1024&f.flags&&((B=f.length)>g&&(B=g),B&&(f.head&&(R=f.head.extra_len-f.length,f.head.extra||(f.head.extra=new Array(f.head.extra_len)),e.arraySet(f.head.extra,h,p,B,R)),512&f.flags&&(f.check=r(f.check,h,B,p)),g-=B,p+=B,f.length-=B),f.length))break e;f.length=0,f.mode=7;case 7:if(2048&f.flags){if(0===g)break e;B=0;do{R=h[p+B++],f.head&&R&&f.length<65536&&(f.head.name+=String.fromCharCode(R))}while(R&&B<g);if(512&f.flags&&(f.check=r(f.check,h,B,p)),g-=B,p+=B,R)break e}else f.head&&(f.head.name=null);f.length=0,f.mode=8;case 8:if(4096&f.flags){if(0===g)break e;B=0;do{R=h[p+B++],f.head&&R&&f.length<65536&&(f.head.comment+=String.fromCharCode(R))}while(R&&B<g);if(512&f.flags&&(f.check=r(f.check,h,B,p)),g-=B,p+=B,R)break e}else f.head&&(f.head.comment=null);f.mode=9;case 9:if(512&f.flags){for(;w<16;){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}if(v!==(65535&f.check)){l.msg="header crc mismatch",f.mode=s;break}v=0,w=0}f.head&&(f.head.hcrc=f.flags>>9&1,f.head.done=!0),l.adler=f.check=0,f.mode=o;break;case 10:for(;w<32;){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}l.adler=f.check=u(v),v=0,w=0,f.mode=11;case 11:if(0===f.havedict)return l.next_out=m,l.avail_out=_,l.next_in=p,l.avail_in=g,f.hold=v,f.bits=w,2;l.adler=f.check=1,f.mode=o;case o:if(5===c||6===c)break e;case 13:if(f.last){v>>>=7&w,w-=7&w,f.mode=27;break}for(;w<3;){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}switch(f.last=1&v,w-=1,3&(v>>>=1)){case 0:f.mode=14;break;case 1:if(b(f),f.mode=20,6===c){v>>>=2,w-=2;break e}break;case 2:f.mode=17;break;case 3:l.msg="invalid block type",f.mode=s}v>>>=2,w-=2;break;case 14:for(v>>>=7&w,w-=7&w;w<32;){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}if((65535&v)!=(v>>>16^65535)){l.msg="invalid stored block lengths",f.mode=s;break}if(f.length=65535&v,v=0,w=0,f.mode=15,6===c)break e;case 15:f.mode=16;case 16:if(B=f.length){if(B>g&&(B=g),B>_&&(B=_),0===B)break e;e.arraySet(d,h,p,B,m),g-=B,p+=B,_-=B,m+=B,f.length-=B;break}f.mode=o;break;case 17:for(;w<14;){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}if(f.nlen=257+(31&v),v>>>=5,w-=5,f.ndist=1+(31&v),v>>>=5,w-=5,f.ncode=4+(15&v),v>>>=4,w-=4,f.nlen>286||f.ndist>30){l.msg="too many length or distance symbols",f.mode=s;break}f.have=0,f.mode=18;case 18:for(;f.have<f.ncode;){for(;w<3;){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}f.lens[z[f.have++]]=7&v,v>>>=3,w-=3}for(;f.have<19;)f.lens[z[f.have++]]=0;if(f.lencode=f.lendyn,f.lenbits=7,O={bits:f.lenbits},F=i(0,f.lens,0,19,f.lencode,0,f.work,O),f.lenbits=O.bits,F){l.msg="invalid code lengths set",f.mode=s;break}f.have=0,f.mode=19;case 19:for(;f.have<f.nlen+f.ndist;){for(;C=(L=f.lencode[v&(1<<f.lenbits)-1])>>>16&255,I=65535&L,!((A=L>>>24)<=w);){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}if(I<16)v>>>=A,w-=A,f.lens[f.have++]=I;else{if(16===I){for(N=A+2;w<N;){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}if(v>>>=A,w-=A,0===f.have){l.msg="invalid bit length repeat",f.mode=s;break}R=f.lens[f.have-1],B=3+(3&v),v>>>=2,w-=2}else if(17===I){for(N=A+3;w<N;){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}w-=A,R=0,B=3+(7&(v>>>=A)),v>>>=3,w-=3}else{for(N=A+7;w<N;){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}w-=A,R=0,B=11+(127&(v>>>=A)),v>>>=7,w-=7}if(f.have+B>f.nlen+f.ndist){l.msg="invalid bit length repeat",f.mode=s;break}for(;B--;)f.lens[f.have++]=R}}if(f.mode===s)break;if(0===f.lens[256]){l.msg="invalid code -- missing end-of-block",f.mode=s;break}if(f.lenbits=9,O={bits:f.lenbits},F=i(1,f.lens,0,f.nlen,f.lencode,0,f.work,O),f.lenbits=O.bits,F){l.msg="invalid literal/lengths set",f.mode=s;break}if(f.distbits=6,f.distcode=f.distdyn,O={bits:f.distbits},F=i(2,f.lens,f.nlen,f.ndist,f.distcode,0,f.work,O),f.distbits=O.bits,F){l.msg="invalid distances set",f.mode=s;break}if(f.mode=20,6===c)break e;case 20:f.mode=21;case 21:if(g>=6&&_>=258){l.next_out=m,l.avail_out=_,l.next_in=p,l.avail_in=g,f.hold=v,f.bits=w,n(l,k),m=l.next_out,d=l.output,_=l.avail_out,p=l.next_in,h=l.input,g=l.avail_in,v=f.hold,w=f.bits,f.mode===o&&(f.back=-1);break}for(f.back=0;C=(L=f.lencode[v&(1<<f.lenbits)-1])>>>16&255,I=65535&L,!((A=L>>>24)<=w);){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}if(C&&!(240&C)){for(P=A,T=C,M=I;C=(L=f.lencode[M+((v&(1<<P+T)-1)>>P)])>>>16&255,I=65535&L,!(P+(A=L>>>24)<=w);){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}v>>>=P,w-=P,f.back+=P}if(v>>>=A,w-=A,f.back+=A,f.length=I,0===C){f.mode=26;break}if(32&C){f.back=-1,f.mode=o;break}if(64&C){l.msg="invalid literal/length code",f.mode=s;break}f.extra=15&C,f.mode=22;case 22:if(f.extra){for(N=f.extra;w<N;){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}f.length+=v&(1<<f.extra)-1,v>>>=f.extra,w-=f.extra,f.back+=f.extra}f.was=f.length,f.mode=23;case 23:for(;C=(L=f.distcode[v&(1<<f.distbits)-1])>>>16&255,I=65535&L,!((A=L>>>24)<=w);){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}if(!(240&C)){for(P=A,T=C,M=I;C=(L=f.distcode[M+((v&(1<<P+T)-1)>>P)])>>>16&255,I=65535&L,!(P+(A=L>>>24)<=w);){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}v>>>=P,w-=P,f.back+=P}if(v>>>=A,w-=A,f.back+=A,64&C){l.msg="invalid distance code",f.mode=s;break}f.offset=I,f.extra=15&C,f.mode=24;case 24:if(f.extra){for(N=f.extra;w<N;){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}f.offset+=v&(1<<f.extra)-1,v>>>=f.extra,w-=f.extra,f.back+=f.extra}if(f.offset>f.dmax){l.msg="invalid distance too far back",f.mode=s;break}f.mode=25;case 25:if(0===_)break e;if(B=k-_,f.offset>B){if((B=f.offset-B)>f.whave&&f.sane){l.msg="invalid distance too far back",f.mode=s;break}B>f.wnext?(B-=f.wnext,E=f.wsize-B):E=f.wnext-B,B>f.length&&(B=f.length),S=f.window}else S=d,E=m-f.offset,B=f.length;B>_&&(B=_),_-=B,f.length-=B;do{d[m++]=S[E++]}while(--B);0===f.length&&(f.mode=21);break;case 26:if(0===_)break e;d[m++]=f.length,_--,f.mode=21;break;case 27:if(f.wrap){for(;w<32;){if(0===g)break e;g--,v|=h[p++]<<w,w+=8}if(k-=_,l.total_out+=k,f.total+=k,k&&(l.adler=f.check=f.flags?r(f.check,d,k,m-k):t(f.check,d,k,m-k)),k=_,(f.flags?v:u(v))!==f.check){l.msg="incorrect data check",f.mode=s;break}v=0,w=0}f.mode=28;case 28:if(f.wrap&&f.flags){for(;w<32;){if(0===g)break e;g--,v+=h[p++]<<w,w+=8}if(v!==(4294967295&f.total)){l.msg="incorrect length check",f.mode=s;break}v=0,w=0}f.mode=29;case 29:F=1;break e;case s:F=-3;break e;case 31:return-4;default:return a}return l.next_out=m,l.avail_out=_,l.next_in=p,l.avail_in=g,f.hold=v,f.bits=w,(f.wsize||k!==l.avail_out&&f.mode<s&&(f.mode<27||4!==c))&&y(l,l.output,l.next_out,k-l.avail_out),x-=l.avail_in,k-=l.avail_out,l.total_in+=x,l.total_out+=k,f.total+=k,f.wrap&&k&&(l.adler=f.check=f.flags?r(f.check,d,k,l.next_out-k):t(f.check,d,k,l.next_out-k)),l.data_type=f.bits+(f.last?64:0)+(f.mode===o?128:0)+(20===f.mode||15===f.mode?256:0),(0===x&&0===k||4===c)&&0===F&&(F=-5),F},inflate.inflateEnd=function(e){if(!e||!e.state)return a;var t=e.state;return t.window&&(t.window=null),e.state=null,0},inflate.inflateGetHeader=function(e,t){var r;return e&&e.state&&2&(r=e.state).wrap?(r.head=t,t.done=!1,0):a},inflate.inflateSetDictionary=function(e,r){var n,i=r.length;return e&&e.state?0!==(n=e.state).wrap&&11!==n.mode?a:11===n.mode&&t(1,r,i,0)!==n.check?-3:y(e,r,i,i)?(n.mode=31,-4):(n.havedict=1,0):a},inflate.inflateInfo="pako inflate (from Nodeca project)",inflate}function requireConstants(){return hasRequiredConstants?constants:(hasRequiredConstants=1,constants={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 requireGzheader(){return hasRequiredGzheader?gzheader:(hasRequiredGzheader=1,gzheader=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})}function requireInflate(){if(hasRequiredInflate)return inflate$1;hasRequiredInflate=1;var e=requireInflate$1(),t=requireCommon(),r=requireStrings(),n=requireConstants(),i=requireMessages(),a=requireZstream(),o=requireGzheader(),s=Object.prototype.toString;function u(l){if(!(this instanceof u))return new u(l);this.options=t.assign({chunkSize:16384,windowBits:0,to:""},l||{});var c=this.options;c.raw&&c.windowBits>=0&&c.windowBits<16&&(c.windowBits=-c.windowBits,0===c.windowBits&&(c.windowBits=-15)),!(c.windowBits>=0&&c.windowBits<16)||l&&l.windowBits||(c.windowBits+=32),c.windowBits>15&&c.windowBits<48&&(15&c.windowBits||(c.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new a,this.strm.avail_out=0;var f=e.inflateInit2(this.strm,c.windowBits);if(f!==n.Z_OK)throw new Error(i[f]);if(this.header=new o,e.inflateGetHeader(this.strm,this.header),c.dictionary&&("string"==typeof c.dictionary?c.dictionary=r.string2buf(c.dictionary):"[object ArrayBuffer]"===s.call(c.dictionary)&&(c.dictionary=new Uint8Array(c.dictionary)),c.raw&&(f=e.inflateSetDictionary(this.strm,c.dictionary))!==n.Z_OK))throw new Error(i[f])}function l(e,t){var r=new u(t);if(r.push(e,!0),r.err)throw r.msg||i[r.err];return r.result}return u.prototype.push=function(i,a){var o,u,l,c,f,h=this.strm,d=this.options.chunkSize,p=this.options.dictionary,m=!1;if(this.ended)return!1;u=a===~~a?a:!0===a?n.Z_FINISH:n.Z_NO_FLUSH,"string"==typeof i?h.input=r.binstring2buf(i):"[object ArrayBuffer]"===s.call(i)?h.input=new Uint8Array(i):h.input=i,h.next_in=0,h.avail_in=h.input.length;do{if(0===h.avail_out&&(h.output=new t.Buf8(d),h.next_out=0,h.avail_out=d),(o=e.inflate(h,n.Z_NO_FLUSH))===n.Z_NEED_DICT&&p&&(o=e.inflateSetDictionary(this.strm,p)),o===n.Z_BUF_ERROR&&!0===m&&(o=n.Z_OK,m=!1),o!==n.Z_STREAM_END&&o!==n.Z_OK)return this.onEnd(o),this.ended=!0,!1;h.next_out&&(0!==h.avail_out&&o!==n.Z_STREAM_END&&(0!==h.avail_in||u!==n.Z_FINISH&&u!==n.Z_SYNC_FLUSH)||("string"===this.options.to?(l=r.utf8border(h.output,h.next_out),c=h.next_out-l,f=r.buf2string(h.output,l),h.next_out=c,h.avail_out=d-c,c&&t.arraySet(h.output,h.output,l,c,0),this.onData(f)):this.onData(t.shrinkBuf(h.output,h.next_out)))),0===h.avail_in&&0===h.avail_out&&(m=!0)}while((h.avail_in>0||0===h.avail_out)&&o!==n.Z_STREAM_END);return o===n.Z_STREAM_END&&(u=n.Z_FINISH),u===n.Z_FINISH?(o=e.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===n.Z_OK):u!==n.Z_SYNC_FLUSH||(this.onEnd(n.Z_OK),h.avail_out=0,!0)},u.prototype.onData=function(e){this.chunks.push(e)},u.prototype.onEnd=function(e){e===n.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=t.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},inflate$1.Inflate=u,inflate$1.inflate=l,inflate$1.inflateRaw=function(e,t){return(t=t||{}).raw=!0,l(e,t)},inflate$1.ungzip=l,inflate$1}function requirePako(){if(hasRequiredPako)return pako_1;hasRequiredPako=1;var e={};return(0,requireCommon().assign)(e,requireDeflate(),requireInflate(),requireConstants()),pako_1=e}!function(e){!function(){var t={};function r(){void 0!==process||console.log.apply(console,arguments)}e.exports=t,function(e,t){!function(){var t=function(){function e(e){this.message="JPEG error: "+e}return e.prototype=new Error,e.prototype.name="JpegError",e.constructor=e,e}(),r=function(){var e=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),r=4017,i=799,a=3406,o=2276,s=1567,u=3784,l=5793,c=2896;function f(e){null==e&&(e={}),null==e.w&&(e.w=-1),this.V=e.n,this.N=e.w}function h(e,t){for(var r,n,i,a=0,o=[],s=16;s>0&&!e[s-1];)s--;o.push({children:[],index:0});var u=o[0];for(r=0;r<s;r++){for(n=0;n<e[r];n++){for((u=o.pop()).children[u.index]=t[a];u.index>0;)u=o.pop();for(u.index++,o.push(u);o.length<=r;)o.push(i={children:[],index:0}),u.children[u.index]=i.children,u=i;a++}r+1<s&&(o.push(i={children:[],index:0}),u.children[u.index]=i.children,u=i)}return o[0].children}function d(e,t,r){return 64*((e.P+1)*t+r)}function p(r,i,a,o,s,u,l,c,f,h){null==h&&(h=!1);var p,m,g,y,_,v,w,x,k,B,E,S=a.m,A=a.Z,C=i,I=0,P=0,T=0,M=0,R=0,F=0;function O(){if(P>0)return P--,I>>P&1;if(255===(I=r[i++])){var e=r[i++];if(e){if(220===e&&h){var o=n(r,i+=2);if(i+=2,o>0&&o!==a.s)throw new DNLMarkerError("Found DNL marker (0xFFDC) while parsing scan data",o)}else if(217===e){if(h){var s=8*R;if(s>0&&s<a.s/10)throw new DNLMarkerError("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",s)}throw new EOIMarkerError("Found EOI marker (0xFFD9) while parsing scan data")}throw new t("unexpected marker")}}return P=7,I>>>7}function N(e){for(var r=e;;){switch(typeof(r=r[O()])){case"number":return r;case"object":continue}throw new t("invalid huffman sequence")}}function L(e){for(var t=0;e>0;)t=t<<1|O(),e--;return t}function D(e){if(1===e)return 1===O()?1:-1;var t=L(e);return t>=1<<e-1?t:t+(-1<<e)+1}function z(e,t,r,n,i){var a=r%S;R=(r/S|0)*e.A+n;var o=a*e.h+i;t(e,d(e,R,o))}function U(e,t,r){R=r/e.P|0;var n=r%e.P;t(e,d(e,R,n))}var $=o.length;for(w=A?0===u?0===c?function(e,t){var r=N(e.J),n=0===r?0:D(r)<<f;e.D[t]=e.Q+=n}:function(e,t){e.D[t]|=O()<<f}:0===c?function(t,r){if(T>0)T--;else for(var n=u,i=l;n<=i;){var a=N(t.i),o=15&a,s=a>>4;if(0!==o){var c=e[n+=s];t.D[r+c]=D(o)*(1<<f),n++}else{if(s<15){T=L(s)+(1<<s)-1;break}n+=16}}}:function(r,n){for(var i,a,o=u,s=l,c=0;o<=s;){var h=n+e[o],d=r.D[h]<0?-1:1;switch(M){case 0:if(c=(a=N(r.i))>>4,0==(i=15&a))c<15?(T=L(c)+(1<<c),M=4):(c=16,M=1);else{if(1!==i)throw new t("invalid ACn encoding");p=D(i),M=c?2:3}continue;case 1:case 2:r.D[h]?r.D[h]+=d*(O()<<f):0==--c&&(M=2===M?3:0);break;case 3:r.D[h]?r.D[h]+=d*(O()<<f):(r.D[h]=p<<f,M=0);break;case 4:r.D[h]&&(r.D[h]+=d*(O()<<f))}o++}4===M&&0==--T&&(M=0)}:function(t,r){var n=N(t.J),i=0===n?0:D(n),a=1;for(t.D[r]=t.Q+=i;a<64;){var o=N(t.i),s=15&o,u=o>>4;if(0!==s){var l=e[a+=u];t.D[r+l]=D(s),a++}else{if(u<15)break;a+=16}}},k=1===$?o[0].P*o[0].c:S*a.R;F<=k;){var j=s?Math.min(k-F,s):k;if(j>0){for(g=0;g<$;g++)o[g].Q=0;if(T=0,1===$)for(m=o[0],v=0;v<j;v++)U(m,w,F),F++;else for(v=0;v<j;v++){for(g=0;g<$;g++)for(B=(m=o[g]).h,E=m.A,y=0;y<E;y++)for(_=0;_<B;_++)z(m,w,F,y,_);F++}}if(P=0,!(x=b(r,i)))break;if(x.u&&(i=x.offset),!(x.M>=65488&&x.M<=65495))break;i+=2}return i-C}function m(e,n,f){var h,d,p,m,g,b,y,_,v,w,x,k,B,E,S,A,C,I=e.$,P=e.D;if(!I)throw new t("missing required Quantization Table.");for(var T=0;T<64;T+=8)v=P[n+T],w=P[n+T+1],x=P[n+T+2],k=P[n+T+3],B=P[n+T+4],E=P[n+T+5],S=P[n+T+6],A=P[n+T+7],v*=I[T],w|x|k|B|E|S|A?(w*=I[T+1],x*=I[T+2],k*=I[T+3],B*=I[T+4],E*=I[T+5],S*=I[T+6],A*=I[T+7],d=(h=(h=l*v+128>>8)+(d=l*B+128>>8)+1>>1)-d,C=(p=x)*u+(m=S)*s+128>>8,p=p*s-m*u+128>>8,y=(g=(g=c*(w-A)+128>>8)+(y=E<<4)+1>>1)-y,b=(_=(_=c*(w+A)+128>>8)+(b=k<<4)+1>>1)-b,m=(h=h+(m=C)+1>>1)-m,p=(d=d+p+1>>1)-p,C=g*o+_*a+2048>>12,g=g*a-_*o+2048>>12,_=C,C=b*i+y*r+2048>>12,b=b*r-y*i+2048>>12,y=C,f[T]=h+_,f[T+7]=h-_,f[T+1]=d+y,f[T+6]=d-y,f[T+2]=p+b,f[T+5]=p-b,f[T+3]=m+g,f[T+4]=m-g):(C=l*v+512>>10,f[T]=C,f[T+1]=C,f[T+2]=C,f[T+3]=C,f[T+4]=C,f[T+5]=C,f[T+6]=C,f[T+7]=C);for(var M=0;M<8;++M)v=f[M],(w=f[M+8])|(x=f[M+16])|(k=f[M+24])|(B=f[M+32])|(E=f[M+40])|(S=f[M+48])|(A=f[M+56])?(d=(h=4112+((h=l*v+2048>>12)+(d=l*B+2048>>12)+1>>1))-d,C=(p=x)*u+(m=S)*s+2048>>12,p=p*s-m*u+2048>>12,m=C,y=(g=(g=c*(w-A)+2048>>12)+(y=E)+1>>1)-y,b=(_=(_=c*(w+A)+2048>>12)+(b=k)+1>>1)-b,C=g*o+_*a+2048>>12,g=g*a-_*o+2048>>12,_=C,C=b*i+y*r+2048>>12,b=b*r-y*i+2048>>12,(v=(h=h+m+1>>1)+_)<16?v=0:v>=4080?v=255:v>>=4,(w=(d=d+p+1>>1)+(y=C))<16?w=0:w>=4080?w=255:w>>=4,(x=(p=d-p)+b)<16?x=0:x>=4080?x=255:x>>=4,(k=(m=h-m)+g)<16?k=0:k>=4080?k=255:k>>=4,(B=m-g)<16?B=0:B>=4080?B=255:B>>=4,(E=p-b)<16?E=0:E>=4080?E=255:E>>=4,(S=d-y)<16?S=0:S>=4080?S=255:S>>=4,(A=h-_)<16?A=0:A>=4080?A=255:A>>=4,P[n+M]=v,P[n+M+8]=w,P[n+M+16]=x,P[n+M+24]=k,P[n+M+32]=B,P[n+M+40]=E,P[n+M+48]=S,P[n+M+56]=A):(C=(C=l*v+8192>>14)<-2040?0:C>=2024?255:C+2056>>4,P[n+M]=C,P[n+M+8]=C,P[n+M+16]=C,P[n+M+24]=C,P[n+M+32]=C,P[n+M+40]=C,P[n+M+48]=C,P[n+M+56]=C)}function g(e,t){for(var r=t.P,n=t.c,i=new Int16Array(64),a=0;a<n;a++)for(var o=0;o<r;o++)m(t,d(t,a,o),i);return t.D}function b(e,t,r){null==r&&(r=t);var i=e.length-1,a=r<t?r:t;if(t>=i)return null;var o=n(e,t);if(o>=65472&&o<=65534)return{u:null,M:o,offset:t};for(var s=n(e,a);!(s>=65472&&s<=65534);){if(++a>=i)return null;s=n(e,a)}return{u:o.toString(16),M:s,offset:a}}return f.prototype={parse(r,i){null==i&&(i={});var a,o,s=i.F,u=0,l=null,c=null,f=0;function d(){var e=n(r,u),t=(u+=2)+e-2,i=b(r,t,u);i&&i.u&&(t=i.offset);var a=r.subarray(u,t);return u+=a.length,a}function m(e){for(var t=Math.ceil(e.o/8/e.X),r=Math.ceil(e.s/8/e.B),n=0;n<e.W.length;n++){j=e.W[n];var i=Math.ceil(Math.ceil(e.o/8)*j.h/e.X),a=Math.ceil(Math.ceil(e.s/8)*j.A/e.B),o=t*j.h,s=r*j.A*64*(o+1);j.D=new Int16Array(s),j.P=i,j.c=a}e.m=t,e.R=r}var y=[],_=[],v=[],w=n(r,u);if(u+=2,65496!==w)throw new t("SOI not found");w=n(r,u),u+=2;e:for(;65497!==w;){var x,k,B;switch(w){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var E=d();65504===w&&74===E[0]&&70===E[1]&&73===E[2]&&70===E[3]&&0===E[4]&&(l={version:{d:E[5],T:E[6]},K:E[7],j:E[8]<<8|E[9],H:E[10]<<8|E[11],S:E[12],I:E[13],C:E.subarray(14,14+3*E[12]*E[13])}),65518===w&&65===E[0]&&100===E[1]&&111===E[2]&&98===E[3]&&101===E[4]&&(c={version:E[5]<<8|E[6],k:E[7]<<8|E[8],q:E[9]<<8|E[10],a:E[11]});break;case 65499:for(var S=n(r,u)+(u+=2)-2;u<S;){var A=r[u++],C=new Uint16Array(64);if(A>>4){if(A>>4!=1)throw new t("DQT - invalid table spec");for(k=0;k<64;k++)C[e[k]]=n(r,u),u+=2}else for(k=0;k<64;k++)C[e[k]]=r[u++];y[15&A]=C}break;case 65472:case 65473:case 65474:if(a)throw new t("Only single frame JPEGs supported");u+=2,(a={}).G=65473===w,a.Z=65474===w,a.precision=r[u++];var I,P=n(r,u),T=0,M=0;u+=2,a.s=s||P,a.o=n(r,u),u+=2,a.W=[],a._={};var R=r[u++];for(x=0;x<R;x++){I=r[u];var F=r[u+1]>>4,O=15&r[u+1];T<F&&(T=F),M<O&&(M=O);var N=r[u+2];B=a.W.push({h:F,A:O,L:N,$:null}),a._[I]=B-1,u+=3}a.X=T,a.B=M,m(a);break;case 65476:var L=n(r,u);for(u+=2,x=2;x<L;){var D=r[u++],z=new Uint8Array(16),U=0;for(k=0;k<16;k++,u++)U+=z[k]=r[u];var $=new Uint8Array(U);for(k=0;k<U;k++,u++)$[k]=r[u];x+=17+U,(D>>4?_:v)[15&D]=h(z,$)}break;case 65501:o=n(r,u+=2),u+=2;break;case 65498:var j,Z=1==++f&&!s;u+=2;var G=r[u++],W=[];for(x=0;x<G;x++){var H=r[u++],q=a._[H];(j=a.W[q]).index=H;var Q=r[u++];j.J=v[Q>>4],j.i=_[15&Q],W.push(j)}var V=r[u++],Y=r[u++],K=r[u++];try{var X=p(r,u,a,W,o,V,Y,K>>4,15&K,Z);u+=X}catch(e){if(e instanceof DNLMarkerError)return this.parse(r,{F:e.s});if(e instanceof EOIMarkerError)break e;throw e}break;case 65500:u+=4;break;case 65535:255!==r[u]&&u--;break;default:var J=b(r,u-2,u-3);if(J&&J.u){u=J.offset;break}if(u>=r.length-1)break e;throw new t("JpegImage.parse - unknown marker: "+w.toString(16))}w=n(r,u),u+=2}for(this.width=a.o,this.height=a.s,this.g=l,this.b=c,this.W=[],x=0;x<a.W.length;x++){var ee=y[(j=a.W[x]).L];ee&&(j.$=ee),this.W.push({index:j.index,e:g(0,j),l:j.h/a.X,t:j.A/a.B,P:j.P,c:j.c})}this.p=this.W.length},Y(e,t,r){null==r&&(r=!1);var n,i,a,o,s,u,l,c,f,h,d,p,m=this.width/e,g=this.height/t,b=0,y=this.W.length,_=e*t*y,v=new Uint8ClampedArray(_),w=new Uint32Array(e),x=4294967288;for(l=0;l<y;l++){if(i=(n=this.W[l]).l*m,a=n.t*g,b=l,d=n.e,o=n.P+1<<3,i!==p){for(s=0;s<e;s++)c=0|s*i,w[s]=(c&x)<<3|7&c;p=i}for(u=0;u<t;u++)for(h=o*((c=0|u*a)&x)|(7&c)<<3,s=0;s<e;s++)v[b]=d[h+w[s]],b+=y}var k=this.V;if(r||4!==y||k||(k=new Int32Array([-256,255,-256,255,-256,255,-256,255])),k)for(l=0;l<_;)for(c=0,f=0;c<y;c++,l++,f+=2)v[l]=(v[l]*k[f]>>8)+k[f+1];return v},get f(){return this.b?!!this.b.a:3===this.p?0!==this.N&&(82!==this.W[0].index||71!==this.W[1].index||66!==this.W[2].index):1===this.N},z:function(e){for(var t,r,n,i=0,a=e.length;i<a;i+=3)t=e[i],r=e[i+1],n=e[i+2],e[i]=t-179.456+1.402*n,e[i+1]=t+135.459-.344*r-.714*n,e[i+2]=t-226.816+1.772*r;return e},O:function(e){for(var t,r,n,i,a=0,o=0,s=e.length;o<s;o+=4)t=e[o],r=e[o+1],n=e[o+2],i=e[o+3],e[a++]=r*(-660635669420364e-19*r+.000437130475926232*n-54080610064599e-18*t+.00048449797120281*i-.154362151871126)-122.67195406894+n*(-.000957964378445773*n+.000817076911346625*t-.00477271405408747*i+1.53380253221734)+t*(.000961250184130688*t-.00266257332283933*i+.48357088451265)+i*(-.000336197177618394*i+.484791561490776),e[a++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*n+.000659397001245577*t+.000426105652938837*i-.176491792462875)+n*(-.000778269941513683*n+.00130872261408275*t+.000770482631801132*i-.151051492775562)+t*(.00126935368114843*t-.00265090189010898*i+.25802910206845)+i*(-.000318913117588328*i-.213742400323665),e[a++]=r*(-.000570115196973677*r-263409051004589e-19*n+.0020741088115012*t-.00288260236853442*i+.814272968359295)-20.810012546947+n*(-153496057440975e-19*n-.000132689043961446*t+.000560833691242812*i-.195152027534049)+t*(.00174418132927582*t-.00255243321439347*i+.116935020465145)+i*(-.000343531996510555*i+.24165260232407);return e.subarray(0,a)},r:function(e){for(var t,r,n,i=0,a=e.length;i<a;i+=4)t=e[i],r=e[i+1],n=e[i+2],e[i]=434.456-t-1.402*n,e[i+1]=119.541-t+.344*r+.714*n,e[i+2]=481.816-t-1.772*r;return e},U:function(e){for(var t,r,n,i,a=0,o=0,s=e.length;o<s;o+=4)t=e[o],r=e[o+1],n=e[o+2],i=e[o+3],e[a++]=255+t*(-6747147073602441e-20*t+.0008379262121013727*r+.0002894718188643294*n+.003264231057537806*i-1.1185611867203937)+r*(26374107616089405e-21*r-8626949158638572e-20*n-.0002748769067499491*i-.02155688794978967)+n*(-3878099212869363e-20*n-.0003267808279485286*i+.0686742238595345)-i*(.0003361971776183937*i+.7430659151342254),e[a++]=255+t*(.00013596372813588848*t+.000924537132573585*r+.00010567359618683593*n+.0004791864687436512*i-.3109689587515875)+r*(-.00023545346108370344*r+.0002702845253534714*n+.0020200308977307156*i-.7488052167015494)+n*(6834815998235662e-20*n+.00015168452363460973*i-.09751927774728933)-i*(.0003189131175883281*i+.7364883807733168),e[a++]=255+t*(13598650411385307e-21*t+.00012423956175490851*r+.0004751985097583589*n-36729317476630422e-22*i-.05562186980264034)+r*(.00016141380598724676*r+.0009692239130725186*n+.0007782692450036253*i-.44015232367526463)+n*(5.068882914068769e-7*n+.0017778369011375071*i-.7591454649749609)-i*(.0003435319965105553*i+.7063770186160144);return e.subarray(0,a)},getData:function(e){var r=e.width,n=e.height,i=e.forceRGB,a=e.isSourcePDF;if(this.p>4)throw new t("Unsupported color mode");var o=this.Y(r,n,a);if(1===this.p&&i){for(var s=o.length,u=new Uint8ClampedArray(3*s),l=0,c=0;c<s;c++){var f=o[c];u[l++]=f,u[l++]=f,u[l++]=f}return u}if(3===this.p&&this.f)return this.z(o);if(4===this.p){if(this.f)return i?this.O(o):this.r(o);if(i)return this.U(o)}return o}},f}();function n(e,t){return e[t]<<8|e[t+1]}e.JpegDecoder=r}(),e.encodeImage=function(t,r,n,i){var a={t256:[r],t257:[n],t258:[8,8,8,8],t259:[1],t262:[2],t273:[1e3],t277:[4],t278:[n],t279:[r*n*4],t282:[[72,1]],t283:[[72,1]],t284:[1],t286:[[0,1]],t287:[[0,1]],t296:[1],t305:["Photopea (UTIF.js)"],t338:[1]};if(i)for(var o in i)a[o]=i[o];var s=new Uint8Array(e.encode([a])),u=new Uint8Array(t),l=new Uint8Array(1e3+r*n*4);for(o=0;o<s.length;o++)l[o]=s[o];for(o=0;o<u.length;o++)l[1e3+o]=u[o];return l.buffer},e.encode=function(t){var r=new Uint8Array(2e4),n=4,i=e._binBE;r[0]=r[1]=77,i.writeUshort(r,2,42);var a=8;i.writeUint(r,n,a),n+=4;for(var o=0;o<t.length;o++){var s=e._writeIFD(i,e._types.basic,r,a,t[o]);a=s[1],o<t.length-1&&(3&a&&(a+=4-(3&a)),i.writeUint(r,s[0],a))}return r.slice(0,a).buffer},e.decode=function(t,n){null==n&&(n={parseMN:!0,debug:!1});var i=new Uint8Array(t),a=0,o=e._binBE.readASCII(i,a,2);a+=2;var s="II"==o?e._binLE:e._binBE;s.readUshort(i,a),a+=2;var u=s.readUint(i,a);a+=4;for(var l=[];;){var c=s.readUshort(i,u),f=s.readUshort(i,u+4);if(0!=c&&(f<1||13<f)){r("error in TIFF");break}if(e._readIFD(s,i,u,l,0,n),0==(u=s.readUint(i,u+2+12*c)))break}return l},e.decodeImage=function(t,n,i){if(!n.data){var a=new Uint8Array(t),o=e._binBE.readASCII(a,0,2);if(null!=n.t256){n.isLE="II"==o,n.width=n.t256[0],n.height=n.t257[0];var s=n.t259?n.t259[0]:1,u=n.t266?n.t266[0]:1;n.t284&&2==n.t284[0]&&r("PlanarConfiguration 2 should not be used!"),7==s&&n.t258&&n.t258.length>3&&(n.t258=n.t258.slice(0,3));var l=n.t277?n.t277[0]:1,c=(n.t258?n.t258[0]:1)*l;1==s&&null!=n.t279&&n.t278&&32803==n.t262[0]&&(c=Math.round(8*n.t279[0]/(n.width*n.t278[0]))),n.t50885&&4==n.t50885[0]&&(c=3*n.t258[0]);var f=8*Math.ceil(n.width*c/8),h=n.t273;(null==h||n.t322)&&(h=n.t324);var d=n.t279;1==s&&1==h.length&&(d=[n.height*(f>>>3)]),(null==d||n.t322)&&(d=n.t325);var p=new Uint8Array(n.height*(f>>>3)),m=0;if(null!=n.t322){var g=n.t322[0],b=n.t323[0],y=Math.floor((n.width+g-1)/g),_=Math.floor((n.height+b-1)/b),v=new Uint8Array(0|Math.ceil(g*b*c/8));console.log("====",y,_);for(var w=0;w<_;w++)for(var x=0;x<y;x++){var k=w*y+x;v.fill(0),e.decode._decompress(n,i,a,h[k],d[k],s,v,0,u,g,b),6==s?p=v:e._copyTile(v,0|Math.ceil(g*c/8),b,p,0|Math.ceil(n.width*c/8),n.height,0|Math.ceil(x*g*c/8),w*b)}m=8*p.length}else{if(null==h)return;var B=n.t278?n.t278[0]:n.height;for(B=Math.min(B,n.height),k=0;k<h.length;k++)e.decode._decompress(n,i,a,h[k],d[k],s,p,0|Math.ceil(m/8),u,n.width,B),m+=f*B;m=Math.min(m,8*p.length)}n.data=new Uint8Array(p.buffer,0,0|Math.ceil(m/8))}}},e.decode._decompress=function(n,i,a,o,s,u,l,c,f,h,d){if(n.t271&&"Panasonic"==n.t271[0]&&n.t45&&6==n.t45[0]&&(u=34316),1==u)for(var p=0;p<s;p++)l[c+p]=a[o+p];else if(2==u)e.decode._decodeG2(a,o,s,l,c,h,f);else if(3==u)e.decode._decodeG3(a,o,s,l,c,h,f,!(!n.t292||1&~n.t292[0]));else if(4==u)e.decode._decodeG4(a,o,s,l,c,h,f);else if(5==u)e.decode._decodeLZW(a,o,s,l,c,8);else if(6==u)e.decode._decodeOldJPEG(n,a,o,s,l,c);else if(7==u||34892==u)e.decode._decodeNewJPEG(n,a,o,s,l,c);else if(8==u||32946==u){var m=new Uint8Array(a.buffer,o+2,s-6),g=t.inflateRaw(m);c+g.length<=l.length&&l.set(g,c)}else 9==u?e.decode._decodeVC5(a,o,s,l,c,n.t33422):32767==u?e.decode._decodeARW(n,a,o,s,l,c):32773==u?e.decode._decodePackBits(a,o,s,l,c):32809==u?e.decode._decodeThunder(a,o,s,l,c):34316==u?e.decode._decodePanasonic(n,a,o,s,l,c):34713==u?e.decode._decodeNikon(n,i,a,o,s,l,c):34676==u?e.decode._decodeLogLuv32(n,a,o,s,l,c):r("Unknown compression",u);var b=n.t258?Math.min(32,n.t258[0]):1,y=n.t277?n.t277[0]:1,_=b*y>>>3,v=Math.ceil(b*y*h/8);if(16==b&&!n.isLE&&null==n.t33422)for(var w=0;w<d;w++)for(var x=c+w*v,k=1;k<v;k+=2){var B=l[x+k];l[x+k]=l[x+k-1],l[x+k-1]=B}if(n.t317&&2==n.t317[0])for(w=0;w<d;w++){var E=c+w*v;if(16==b)for(p=_;p<v;p+=2){var S=(l[E+p+1]<<8|l[E+p])+(l[E+p-_+1]<<8|l[E+p-_]);l[E+p]=255&S,l[E+p+1]=S>>>8&255}else if(3==y)for(p=3;p<v;p+=3)l[E+p]=l[E+p]+l[E+p-3]&255,l[E+p+1]=l[E+p+1]+l[E+p-2]&255,l[E+p+2]=l[E+p+2]+l[E+p-1]&255;else for(p=_;p<v;p++)l[E+p]=l[E+p]+l[E+p-_]&255}},e.decode._decodePanasonic=function(e,t,r,n,i,a){var o,s,u,l,c,f,h,d,p=t.buffer,m=e.t2[0],g=e.t3[0],b=e.t10[0],y=e.t45[0],_=0,v=0,w=0,x=0,k=6==y?new Uint32Array(18):new Uint8Array(16),B=[0,0],E=[0,0],S=0,A=new Uint8Array(16384),C=new Uint16Array(i.buffer);function I(e){if(0==w){var t=new Uint8Array(p,r+v+8184,8200),n=new Uint8Array(p,r+v,8184);A.set(t),A.set(n,t.length),v+=16384}if(5!=y)return(A[x=(w=w-e&131071)>>3^16368]|A[x+1]<<8)>>(7&w)&~(-1<<e);for(o=0;o<16;o++)k[o]=A[w++],w&=16383}function P(e){return A[w+15-e]}function T(){B[0]=0,B[1]=0,E[0]=0,E[1]=0}if(7==y)throw y;if(6==y){var M=12==b,R=M?function(){k[0]=P(0)<<4|P(1)>>4,k[1]=4095&((15&P(1))<<8|P(2)),k[2]=P(3)>>6&3,k[3]=(63&P(3))<<2|P(4)>>6,k[4]=(63&P(4))<<2|P(5)>>6,k[5]=(63&P(5))<<2|P(6)>>6,k[6]=P(6)>>4&3,k[7]=(15&P(6))<<4|P(7)>>4,k[8]=(15&P(7))<<4|P(8)>>4,k[9]=(15&P(8))<<4|P(9)>>4,k[10]=P(9)>>2&3,k[11]=(3&P(9))<<6|P(10)>>2,k[12]=(3&P(10))<<6|P(11)>>2,k[13]=(3&P(11))<<6|P(12)>>2,k[14]=3&P(12),k[15]=P(13),k[16]=P(14),k[17]=P(15),w+=16,x=0}:function(){k[0]=P(0)<<6|P(1)>>2,k[1]=16383&((3&P(1))<<12|P(2)<<4|P(3)>>4),k[2]=P(3)>>2&3,k[3]=(3&P(3))<<8|P(4),k[4]=P(5)<<2|P(6)>>6,k[5]=(63&P(6))<<4|P(7)>>4,k[6]=P(7)>>2&3,k[7]=(3&P(7))<<8|P(8),k[8]=P(9)<<2&1020|P(10)>>6,k[9]=1023&(P(10)<<4|P(11)>>4),k[10]=P(11)>>2&3,k[11]=(3&P(11))<<8|P(12),k[12]=1023&(P(13)<<2&1020|P(14)>>6),k[13]=1023&(P(14)<<4|P(15)>>4),w+=16,x=0},F=M?14:11,O=M?128:512,N=M?2048:8192,L=M?16383:65535,D=M?4095:16383,z=m/F,U=16*z,$=M?18:14;for(f=0;f<g-15;f+=16){var j=Math.min(16,g-f),Z=U*j;for(A=new Uint8Array(p,r+_,Z),w=0,_+=Z,d=0,h=0;d<j;d++,h=0){S=(f+d)*m;for(var G=0;G<z;G++)for(R(),T(),u=0,c=0,o=0;o<F;o++){if(l=1&o,o%3==2){var W=x<$?k[x++]:0;3==W&&(W=4),c=O<<W,u=1<<W}var H=x<$?k[x++]:0;B[l]?(H*=u,c<N&&E[l]>c&&(H+=E[l]-c),E[l]=H):(B[l]=H,H?E[l]=H:H=E[l]),C[S+h++]=H-15<=L?H-15&L:H+2147483633>>31&D}}}}else if(5==y){var q=12==b?10:9;for(f=0;f<g;f++)for(h=0;h<m;h+=q)I(0),12==b?(C[S++]=((15&k[1])<<8)+k[0],C[S++]=16*k[2]+(k[1]>>4),C[S++]=((15&k[4])<<8)+k[3],C[S++]=16*k[5]+(k[4]>>4),C[S++]=((15&k[7])<<8)+k[6],C[S++]=16*k[8]+(k[7]>>4),C[S++]=((15&k[10])<<8)+k[9],C[S++]=16*k[11]+(k[10]>>4),C[S++]=((15&k[13])<<8)+k[12],C[S++]=16*k[14]+(k[13]>>4)):14==b&&(C[S++]=k[0]+((63&k[1])<<8),C[S++]=(k[1]>>6)+4*k[2]+((15&k[3])<<10),C[S++]=(k[3]>>4)+16*k[4]+((3&k[5])<<12),C[S++]=((252&k[5])>>2)+(k[6]<<6),C[S++]=k[7]+((63&k[8])<<8),C[S++]=(k[8]>>6)+4*k[9]+((15&k[10])<<10),C[S++]=(k[10]>>4)+16*k[11]+((3&k[12])<<12),C[S++]=((252&k[12])>>2)+(k[13]<<6),C[S++]=k[14]+((63&k[15])<<8))}else{if(4!=y)throw y;for(f=0;f<g;f++)for(h=0;h<m;h++)l=1&(o=h%14),0==o&&T(),o%3==2&&(u=4>>3-I(2)),E[l]?0!=(s=I(8))&&(B[l]-=128<<u,(B[l]<0||4==u)&&(B[l]&=~(-1<<u)),B[l]+=s<<u):(E[l]=I(8),(E[l]||o>11)&&(B[l]=E[l]<<4|I(4))),C[S++]=B[1&h]}},e.decode._decodeVC5=function(){var t,r,n,i=[1,0,1,0,2,2,1,1,3,7,1,2,5,25,1,3,6,48,1,4,6,54,1,5,7,111,1,8,7,99,1,6,7,105,12,0,7,107,1,7,8,209,20,0,8,212,1,9,8,220,1,10,9,393,1,11,9,394,32,0,9,416,1,12,9,427,1,13,10,887,1,18,10,784,1,14,10,790,1,15,10,835,60,0,10,852,1,16,10,885,1,17,11,1571,1,19,11,1668,1,20,11,1669,100,0,11,1707,1,21,11,1772,1,22,12,3547,1,29,12,3164,1,24,12,3166,1,25,12,3140,1,23,12,3413,1,26,12,3537,1,27,12,3539,1,28,13,7093,1,35,13,6283,1,30,13,6331,1,31,13,6335,180,0,13,6824,1,32,13,7072,1,33,13,7077,320,0,13,7076,1,34,14,12565,1,36,14,12661,1,37,14,12669,1,38,14,13651,1,39,14,14184,1,40,15,28295,1,46,15,28371,1,47,15,25320,1,42,15,25336,1,43,15,25128,1,41,15,27300,1,44,15,28293,1,45,16,50259,1,48,16,50643,1,49,16,50675,1,50,16,56740,1,53,16,56584,1,51,16,56588,1,52,17,113483,1,61,17,113482,1,60,17,101285,1,55,17,101349,1,56,17,109205,1,57,17,109207,1,58,17,100516,1,54,17,113171,1,59,18,202568,1,62,18,202696,1,63,18,218408,1,64,18,218412,1,65,18,226340,1,66,18,226356,1,67,18,226358,1,68,19,402068,1,69,19,405138,1,70,19,405394,1,71,19,436818,1,72,19,436826,1,73,19,452714,1,75,19,452718,1,76,19,452682,1,74,20,804138,1,77,20,810279,1,78,20,810790,1,79,20,873638,1,80,20,873654,1,81,20,905366,1,82,20,905430,1,83,20,905438,1,84,21,1608278,1,85,21,1620557,1,86,21,1621582,1,87,21,1621583,1,88,21,1747310,1,89,21,1810734,1,90,21,1810735,1,91,21,1810863,1,92,21,1810879,1,93,22,3621725,1,99,22,3621757,1,100,22,3241112,1,94,22,3494556,1,95,22,3494557,1,96,22,3494622,1,97,22,3494623,1,98,23,6482227,1,102,23,6433117,1,101,23,6989117,1,103,23,6989119,1,105,23,6989118,1,104,23,7243449,1,106,23,7243512,1,107,24,13978233,1,111,24,12964453,1,109,24,12866232,1,108,24,14486897,1,113,24,13978232,1,110,24,14486896,1,112,24,14487026,1,114,24,14487027,1,115,25,25732598,1,225,25,25732597,1,189,25,25732596,1,188,25,25732595,1,203,25,25732594,1,202,25,25732593,1,197,25,25732592,1,207,25,25732591,1,169,25,25732590,1,223,25,25732589,1,159,25,25732522,1,235,25,25732579,1,152,25,25732575,1,192,25,25732489,1,179,25,25732573,1,201,25,25732472,1,172,25,25732576,1,149,25,25732488,1,178,25,25732566,1,120,25,25732571,1,219,25,25732577,1,150,25,25732487,1,127,25,25732506,1,211,25,25732548,1,125,25,25732588,1,158,25,25732486,1,247,25,25732467,1,238,25,25732508,1,163,25,25732552,1,228,25,25732603,1,183,25,25732513,1,217,25,25732587,1,168,25,25732520,1,122,25,25732484,1,128,25,25732562,1,249,25,25732505,1,187,25,25732504,1,186,25,25732483,1,136,25,25928905,1,181,25,25732560,1,255,25,25732500,1,230,25,25732482,1,135,25,25732555,1,233,25,25732568,1,222,25,25732583,1,145,25,25732481,1,134,25,25732586,1,167,25,25732521,1,248,25,25732518,1,209,25,25732480,1,243,25,25732512,1,216,25,25732509,1,164,25,25732547,1,140,25,25732479,1,157,25,25732544,1,239,25,25732574,1,191,25,25732564,1,251,25,25732478,1,156,25,25732546,1,139,25,25732498,1,242,25,25732557,1,133,25,25732477,1,162,25,25732515,1,213,25,25732584,1,165,25,25732514,1,212,25,25732476,1,227,25,25732494,1,198,25,25732531,1,236,25,25732530,1,234,25,25732529,1,117,25,25732528,1,215,25,25732527,1,124,25,25732526,1,123,25,25732525,1,254,25,25732524,1,253,25,25732523,1,148,25,25732570,1,218,25,25732580,1,146,25,25732581,1,147,25,25732569,1,224,25,25732533,1,143,25,25732540,1,184,25,25732541,1,185,25,25732585,1,166,25,25732556,1,132,25,25732485,1,129,25,25732563,1,250,25,25732578,1,151,25,25732501,1,119,25,25732502,1,193,25,25732536,1,176,25,25732496,1,245,25,25732553,1,229,25,25732516,1,206,25,25732582,1,144,25,25732517,1,208,25,25732558,1,137,25,25732543,1,241,25,25732466,1,237,25,25732507,1,190,25,25732542,1,240,25,25732551,1,131,25,25732554,1,232,25,25732565,1,252,25,25732475,1,171,25,25732493,1,205,25,25732492,1,204,25,25732491,1,118,25,25732490,1,214,25,25928904,1,180,25,25732549,1,126,25,25732602,1,182,25,25732539,1,175,25,25732545,1,141,25,25732559,1,138,25,25732537,1,177,25,25732534,1,153,25,25732503,1,194,25,25732606,1,160,25,25732567,1,121,25,25732538,1,174,25,25732497,1,246,25,25732550,1,130,25,25732572,1,200,25,25732474,1,170,25,25732511,1,221,25,25732601,1,196,25,25732532,1,142,25,25732519,1,210,25,25732495,1,199,25,25732605,1,155,25,25732535,1,154,25,25732499,1,244,25,25732510,1,220,25,25732600,1,195,25,25732607,1,161,25,25732604,1,231,25,25732473,1,173,25,25732599,1,226,26,51465122,1,116,26,51465123,0,1],a=[3,3,3,3,2,2,2,1,1,1];function o(e){var t=e[1],r=e[0][t>>>3]>>>7-(7&t)&1;return e[1]++,r}function s(e,r){if(null==t){t={};for(var n=0;n<i.length;n+=4)t[i[n+1]]=i.slice(n,n+4)}for(var a=o(e),s=t[a];null==s;)a=a<<1|o(e),s=t[a];var u=s[3];0!=u&&(u=0==o(e)?u:-u),r[0]=s[2],r[1]=u}function u(e,t){for(var r=0;r<t;r++)1&~e||e++,e>>>=1;return e}function l(e,t){return e>>t}function c(e,t,r,n,i,a){t[r]=l(l(11*e[i]-4*e[i+a]+e[i+a+a]+4,3)+e[n],1),t[r+a]=l(l(5*e[i]+4*e[i+a]-e[i+a+a]+4,3)-e[n],1)}function f(e,t,r,n,i,a){var o=e[i-a]-e[i+a],s=e[i],u=e[n];t[r]=l(l(o+4,3)+s+u,1),t[r+a]=l(l(4-o,3)+s-u,1)}function h(e,t,r,n,i,a){t[r]=l(l(5*e[i]+4*e[i-a]-e[i-a-a]+4,3)+e[n],1),t[r+a]=l(l(11*e[i]-4*e[i-a]+e[i-a-a]+4,3)-e[n],1)}function d(e){return n[e=e<0?0:e>4095?4095:e]>>>2}return function(t,i,o,l,p,m){l=new Uint16Array(l.buffer);var g,b,y,_,v,w,x,k,B=Date.now(),E=e._binBE,S=i+o;i+=4;for(var A=1==m[0];i<S;){var C=E.readShort(t,i),I=E.readUshort(t,i+2);if(i+=4,12==C)N=I;else if(20==C)g=I;else if(21==C)b=I;else if(48==C)y=I;else if(53==C)_=I;else if(35==C);else if(62==C)v=I;else if(101==C);else if(109==C)w=I;else if(84==C);else if(106==C);else if(107==C);else if(108==C);else if(102==C);else if(104==C)re=I;else if(105==C);else{var P=C<0?-C:C,T=65280&P,M=0;if(24576&P&&(8192&P?(M=65535&I,M+=(255&P)<<16):M=65535&I),24576&~P){if(16388==P)i+=4*M;else if(8192!=T&&8448!=T&&9216!=T)throw P.toString(16)}else{if(null==x){x=[];for(var R=0;R<4;R++)x[R]=new Int16Array((g>>>1)*(b>>>1));for(k=new Int16Array((g>>>1)*(b>>>1)),r=new Int16Array(1024),R=0;R<1024;R++){var F=R-512,O=Math.abs(F),N=Math.floor(768*O*O*O/16581375)+O;r[R]=Math.sign(F)*N}for(n=new Uint16Array(4096),R=0;R<4096;R++){var L=R,D=65535*(Math.pow(113,L/4095)-1)/112;n[R]=Math.min(D,65535)}}var z=x[v],U=u(g,1+a[y]),$=u(b,1+a[y]);if(0==y)for(var j=0;j<$;j++)for(var Z=0;Z<U;Z++){var G=i+2*(j*U+Z);z[j*(g>>>1)+Z]=t[G]<<8|t[G+1]}else{var W=[t,8*i],H=[],q=0,Q=U*$,V=[0,0],Y=0;for(I=0;q<Q;)for(s(W,V),Y=V[0],I=V[1];Y>0;)H[q++]=I,Y--;var K=(y-1)%3,X=1!=K?U:0,J=0!=K?$:0;for(j=0;j<$;j++){var ee=(j+J)*(g>>>1)+X,te=j*U;for(Z=0;Z<U;Z++)z[ee+Z]=r[H[te+Z]+512]*_}if(2==K){var re=g>>>1,ne=2*U,ie=2*$;for(j=0;j<$;j++)for(Z=0;Z<ne;Z++){R=2*j*re+Z;var ae=$*re+(se=j*re+Z);0==j?c(z,k,R,ae,se,re):j==$-1?h(z,k,R,ae,se,re):f(z,k,R,ae,se,re)}var oe=z;for(z=k,k=oe,j=0;j<ie;j++)for(Z=0;Z<U;Z++){var se;R=j*re+2*Z,ae=U+(se=j*re+Z),0==Z?c(z,k,R,ae,se,1):Z==U-1?h(z,k,R,ae,se,1):f(z,k,R,ae,se,1)}oe=z,z=k,k=oe;for(var ue=[],le=2-~~((y-1)/3),ce=0;ce<3;ce++)ue[ce]=w>>14-2*ce&3;var fe=ue[le];if(0!=fe)for(j=0;j<ie;j++)for(Z=0;Z<ne;Z++)z[R=j*re+Z]=z[R]<<fe}}if(9==y&&3==v){var he=x[0],de=x[1],pe=x[2],me=x[3];for(j=0;j<b;j+=2)for(Z=0;Z<g;Z+=2){var ge=j*g+Z,be=he[G=(j>>>1)*(g>>>1)+(Z>>>1)],ye=de[G]-2048,_e=pe[G]-2048,ve=me[G]-2048,we=(ye<<1)+be,xe=(_e<<1)+be,ke=be+ve,Be=be-ve;A?(l[ge]=d(ke),l[ge+1]=d(xe),l[ge+g]=d(we),l[ge+g+1]=d(Be)):(l[ge]=d(we),l[ge+1]=d(ke),l[ge+g]=d(Be),l[ge+g+1]=d(xe))}}i+=4*M}}}console.log(Date.now()-B)}}(),e.decode._decodeLogLuv32=function(e,t,r,n,i,a){for(var o=e.width,s=4*o,u=0,l=new Uint8Array(s);u<n;){for(var c=0;c<s;){var f=t[r+u];if(u++,f<128){for(var h=0;h<f;h++)l[c+h]=t[r+u+h];c+=f,u+=f}else{for(f-=126,h=0;h<f;h++)l[c+h]=t[r+u];c+=f,u++}}for(var d=0;d<o;d++)i[a+0]=l[d],i[a+1]=l[d+o],i[a+2]=l[d+2*o],i[a+4]=l[d+3*o],a+=6}},e.decode._ljpeg_diff=function(t,r,n){var i,a,o=e.decode._getbithuff;return i=o(t,r,n[0],n),(a=o(t,r,i,0))&1<<i-1||(a-=(1<<i)-1),a},e.decode._decodeARW=function(t,r,n,i,a,o){var s=t.t256[0],u=t.t257[0],l=t.t258[0],c=t.isLE?e._binLE:e._binBE;if(s*u==i||s*u*1.5==i)if(s*u*1.5!=i){var f,h,d,p,m,g,b,y,_=new Uint16Array(16),v=new Uint8Array(s+1);for(C=0;C<u;C++){for(var w=0;w<s;w++)v[w]=r[n++];for(y=0,A=0;A<s-30;y+=16){for(h=2047&(f=c.readUint(v,y)),d=2047&f>>>11,p=15&f>>>22,m=15&f>>>26,g=0;g<4&&128<<g<=h-d;g++);for(b=30,x=0;x<16;x++)x==p?_[x]=h:x==m?_[x]=d:(_[x]=((c.readUshort(v,y+(b>>3))>>>(7&b)&127)<<g)+d,_[x]>2047&&(_[x]=2047),b+=7);for(x=0;x<16;x++,A+=2)N=_[x]<<1,e.decode._putsF(a,(C*s+A)*l,N<<16-l);A-=1&A?1:31}}}else for(var x=0;x<i;x+=3){var k=r[n+x+0],B=r[n+x+1],E=r[n+x+2];a[o+x]=B<<4|k>>>4,a[o+x+1]=k<<4|E>>>4,a[o+x+2]=E<<4|B>>>4}else{u+=8;var S,A,C,I=[n,0,0,0],P=new Uint16Array(32770),T=[3857,3856,3599,3342,3085,2828,2571,2314,2057,1800,1543,1286,1029,772,771,768,514,513],M=0,R=e.decode._ljpeg_diff;for(P[0]=15,S=x=0;x<18;x++)for(var F=32768>>>(T[x]>>>8),O=0;O<F;O++)P[++S]=T[x];for(A=s;A--;)for(C=0;C<u+1;C+=2)if(C==u&&(C=1),M+=R(r,I,P),C<u){var N=4095&M;e.decode._putsF(a,(C*s+A)*l,N<<16-l)}}},e.decode._decodeNikon=function(t,r,n,i,a,o,s){var u=[[0,0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0,5,4,3,6,2,7,1,0,8,9,11,10,12],[0,0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0,57,90,56,39,22,5,4,3,2,1,0,11,12,12],[0,0,1,4,2,3,1,2,0,0,0,0,0,0,0,0,0,5,4,6,3,7,2,8,1,9,0,10,11,12],[0,0,1,4,3,1,1,1,1,1,2,0,0,0,0,0,0,5,6,4,7,8,3,9,2,1,0,10,11,12,13,14],[0,0,1,5,1,1,1,1,1,1,1,2,0,0,0,0,0,8,92,75,58,41,7,6,5,4,3,2,1,0,13,14],[0,0,1,4,2,2,3,1,2,0,0,0,0,0,0,0,0,7,6,8,5,9,4,10,3,11,12,2,0,1,13,14]],l=t.t256[0],c=t.t257[0],f=t.t258[0],h=0,d=0,p=e.decode._make_decoder,m=e.decode._getbithuff,g=r[0].exifIFD.makerNote,b=g.t150?g.t150:g.t140,y=0,_=b[y++],v=b[y++];73!=_&&88!=v||(y+=2110),70==_&&(h=2),14==f&&(h+=3);for(var w=[[0,0],[0,0]],x=t.isLE?e._binLE:e._binBE,k=0;k<2;k++)for(var B=0;B<2;B++)w[k][B]=x.readShort(b,y),y+=2;var E,S,A,C,I,P=1<<f&32767,T=0,M=x.readShort(b,y);y+=2,M>1&&(T=Math.floor(P/(M-1))),68==_&&32==v&&T>0&&(d=x.readShort(b,562));var R=[0,0],F=p(u[h]),O=[i,0,0,0];for(E=0;E<c;E++)for(d&&E==d&&(F=p(u[h+1])),S=0;S<l;S++){k=m(n,O,F[0],F),(I=1+(m(n,O,(A=15&k)-(C=k>>>4),0)<<1)<<C>>>1)&1<<A-1||(I-=(1<<A)-(0==C?1:0)),S<2?R[S]=w[1&E][S]+=I:R[1&S]+=I;var N=Math.min(Math.max(R[1&S],0),(1<<f)-1),L=(E*l+S)*f;e.decode._putsF(o,L,N<<16-f)}},e.decode._putsF=function(e,t,r){r<<=8-(7&t);var n=t>>>3;e[n]|=r>>>16,e[n+1]|=r>>>8,e[n+2]|=r},e.decode._getbithuff=function(t,r,n,i){var a;e.decode._get_byte;var o=r[0],s=r[1],u=r[2],l=r[3];if(0==n||u<0)return 0;for(;!l&&u<n&&-1!=(a=t[o++])&&!(l=0);)s=(s<<8)+a,u+=8;if(a=s<<32-u>>>32-n,i?(u-=i[a+1]>>>8,a=255&i[a+1]):u-=n,u<0)throw"e";return r[0]=o,r[1]=s,r[2]=u,r[3]=l,a},e.decode._make_decoder=function(e){var t,r,n,i,a,o=[];for(t=16;0!=t&&!e[t];t--);var s=17;for(o[0]=t,n=r=1;r<=t;r++)for(i=0;i<e[r];i++,++s)for(a=0;a<1<<t-r;a++)n<=1<<t&&(o[n++]=r<<8|e[s]);return o},e.decode._decodeNewJPEG=function(t,r,n,i,a,o){i=Math.min(i,r.length-n);var s=t.t347,u=s?s.length:0,l=new Uint8Array(u+i);if(s){for(var c=0,f=0;f<u-1&&(255!=s[f]||217!=s[f+1]);f++)l[c++]=s[f];var h=r[n],d=r[n+1];for(255==h&&216==d||(l[c++]=h,l[c++]=d),f=2;f<i;f++)l[c++]=r[n+f]}else for(f=0;f<i;f++)l[f]=r[n+f];if(32803==t.t262[0]||7==t.t259[0]&&34892==t.t262[0]){var p=t.t258[0],m=e.LosslessJpegDecode(l),g=m.length;if(16==p)if(t.isLE)for(f=0;f<g;f++)a[o+(f<<1)]=255&m[f],a[o+(f<<1)+1]=m[f]>>>8;else for(f=0;f<g;f++)a[o+(f<<1)]=m[f]>>>8,a[o+(f<<1)+1]=255&m[f];else if(14==p||12==p||10==p){var b=16-p;for(f=0;f<g;f++)e.decode._putsF(a,f*p,m[f]<<b)}else{if(8!=p)throw new Error("unsupported bit depth "+p);for(f=0;f<g;f++)a[o+f]=m[f]}}else{var y=new e.JpegDecoder;y.parse(l);var _=y.getData({width:y.width,height:y.height,forceRGB:!0,isSourcePDF:!1});for(f=0;f<_.length;f++)a[o+f]=_[f]}6==t.t262[0]&&(t.t262[0]=2)},e.decode._decodeOldJPEGInit=function(e,t,n,i){var a,o,s,u,l,c=216,f=0,h=0,d=!1,p=e.t513,m=p?p[0]:0,g=e.t514,b=g?g[0]:0,y=e.t324||e.t273||p,_=e.t530,v=0,w=0,x=e.t277?e.t277[0]:1,k=e.t515;if(y&&(h=y[0],d=y.length>1),!d){if(255==t[n]&&t[n+1]==c)return{jpegOffset:n};if(null!=p&&(255==t[n+m]&&t[n+m+1]==c?f=n+m:r("JPEGInterchangeFormat does not point to SOI"),null==g?r("JPEGInterchangeFormatLength field is missing"):(m>=h||m+b<=h)&&r("JPEGInterchangeFormatLength field value is invalid"),null!=f))return{jpegOffset:f}}if(null!=_&&(v=_[0],w=_[1]),null!=p&&null!=g)if(b>=2&&m+b<=h){for(a=255==t[n+m+b-2]&&t[n+m+b-1]==c?new Uint8Array(b-2):new Uint8Array(b),s=0;s<a.length;s++)a[s]=t[n+m+s];r("Incorrect JPEG interchange format: using JPEGInterchangeFormat offset to derive tables")}else r("JPEGInterchangeFormat+JPEGInterchangeFormatLength > offset to first strip or tile");if(null==a){var B=0,E=[];E[B++]=255,E[B++]=c;var S=e.t519;if(null==S)throw new Error("JPEGQTables tag is missing");for(s=0;s<S.length;s++)for(E[B++]=255,E[B++]=219,E[B++]=0,E[B++]=67,E[B++]=s,u=0;u<64;u++)E[B++]=t[n+S[s]+u];for(l=0;l<2;l++){var A=e[0==l?"t520":"t521"];if(null==A)throw new Error((0==l?"JPEGDCTables":"JPEGACTables")+" tag is missing");for(s=0;s<A.length;s++){E[B++]=255,E[B++]=196;var C=19;for(u=0;u<16;u++)C+=t[n+A[s]+u];for(E[B++]=C>>>8,E[B++]=255&C,E[B++]=s|l<<4,u=0;u<16;u++)E[B++]=t[n+A[s]+u];for(u=0;u<C;u++)E[B++]=t[n+A[s]+16+u]}}if(E[B++]=255,E[B++]=192,E[B++]=0,E[B++]=8+3*x,E[B++]=8,E[B++]=e.height>>>8&255,E[B++]=255&e.height,E[B++]=e.width>>>8&255,E[B++]=255&e.width,E[B++]=x,1==x)E[B++]=1,E[B++]=17,E[B++]=0;else for(s=0;s<3;s++)E[B++]=s+1,E[B++]=0!=s?17:(15&v)<<4|15&w,E[B++]=s;null!=k&&0!=k[0]&&(E[B++]=255,E[B++]=221,E[B++]=0,E[B++]=4,E[B++]=k[0]>>>8&255,E[B++]=255&k[0]),a=new Uint8Array(E)}var I=-1;for(s=0;s<a.length-1;){if(255==a[s]&&192==a[s+1]){I=s;break}s++}if(-1==I){var P=new Uint8Array(a.length+10+3*x);P.set(a);var T=a.length;if(I=a.length,(a=P)[T++]=255,a[T++]=192,a[T++]=0,a[T++]=8+3*x,a[T++]=8,a[T++]=e.height>>>8&255,a[T++]=255&e.height,a[T++]=e.width>>>8&255,a[T++]=255&e.width,a[T++]=x,1==x)a[T++]=1,a[T++]=17,a[T++]=0;else for(s=0;s<3;s++)a[T++]=s+1,a[T++]=0!=s?17:(15&v)<<4|15&w,a[T++]=s}if(255==t[h]&&218==t[h+1]){var M=t[h+2]<<8|t[h+3];for((o=new Uint8Array(M+2))[0]=t[h],o[1]=t[h+1],o[2]=t[h+2],o[3]=t[h+3],s=0;s<M-2;s++)o[s+4]=t[h+s+4]}else{var R=0;if((o=new Uint8Array(8+2*x))[R++]=255,o[R++]=218,o[R++]=0,o[R++]=6+2*x,o[R++]=x,1==x)o[R++]=1,o[R++]=0;else for(s=0;s<3;s++)o[R++]=s+1,o[R++]=s<<4|s;o[R++]=0,o[R++]=63,o[R++]=0}return{jpegOffset:n,tables:a,sosMarker:o,sofPosition:I}},e.decode._decodeOldJPEG=function(t,r,n,i,a,o){var s,u,l,c,f=e.decode._decodeOldJPEGInit(t,r,n,i);if(null!=f.jpegOffset)for(s=n+i-f.jpegOffset,l=new Uint8Array(s),p=0;p<s;p++)l[p]=r[f.jpegOffset+p];else{for(u=f.tables.length,(l=new Uint8Array(u+f.sosMarker.length+i+2)).set(f.tables),c=u,l[f.sofPosition+5]=t.height>>>8&255,l[f.sofPosition+6]=255&t.height,l[f.sofPosition+7]=t.width>>>8&255,l[f.sofPosition+8]=255&t.width,255==r[n]&&r[n+1]==SOS||(l.set(f.sosMarker,c),c+=sosMarker.length),p=0;p<i;p++)l[c++]=r[n+p];l[c++]=255,l[c++]=EOI}var h=new e.JpegDecoder;h.parse(l);for(var d=h.getData({width:h.width,height:h.height,forceRGB:!0,isSourcePDF:!1}),p=0;p<d.length;p++)a[o+p]=d[p];t.t262&&6==t.t262[0]&&(t.t262[0]=2)},e.decode._decodePackBits=function(e,t,r,n,i){for(var a=new Int8Array(e.buffer),o=new Int8Array(n.buffer),s=t+r;t<s;){var u=a[t];if(t++,u>=0&&u<128)for(var l=0;l<u+1;l++)o[i]=a[t],i++,t++;if(u>=-127&&u<0){for(l=0;l<1-u;l++)o[i]=a[t],i++;t++}}return i},e.decode._decodeThunder=function(e,t,r,n,i){for(var a=[0,1,0,-1],o=[0,1,2,3,0,-3,-2,-1],s=t+r,u=2*i,l=0;t<s;){var c=e[t],f=c>>>6,h=63&c;if(t++,3==f&&(l=15&h,n[u>>>1]|=l<<4*(1-u&1),u++),0==f)for(var d=0;d<h;d++)n[u>>>1]|=l<<4*(1-u&1),u++;if(2==f)for(d=0;d<2;d++)4!=(p=h>>>3*(1-d)&7)&&(l+=o[p],n[u>>>1]|=l<<4*(1-u&1),u++);if(1==f)for(d=0;d<3;d++){var p;2!=(p=h>>>2*(2-d)&3)&&(l+=a[p],n[u>>>1]|=l<<4*(1-u&1),u++)}}},e.decode._dmap={1:0,"011":1,"000011":2,"0000011":3,"010":-1,"000010":-2,"0000010":-3},e.decode._lens=function(){var e=function(e,t,r,n){for(var i=0;i<t.length;i++)e[t[i]]=r+i*n},t="00110101,000111,0111,1000,1011,1100,1110,1111,10011,10100,00111,01000,001000,000011,110100,110101,101010,101011,0100111,0001100,0001000,0010111,0000011,0000100,0101000,0101011,0010011,0100100,0011000,00000010,00000011,00011010,00011011,00010010,00010011,00010100,00010101,00010110,00010111,00101000,00101001,00101010,00101011,00101100,00101101,00000100,00000101,00001010,00001011,01010010,01010011,01010100,01010101,00100100,00100101,01011000,01011001,01011010,01011011,01001010,01001011,00110010,00110011,00110100",r="0000110111,010,11,10,011,0011,0010,00011,000101,000100,0000100,0000101,0000111,00000100,00000111,000011000,0000010111,0000011000,0000001000,00001100111,00001101000,00001101100,00000110111,00000101000,00000010111,00000011000,000011001010,000011001011,000011001100,000011001101,000001101000,000001101001,000001101010,000001101011,000011010010,000011010011,000011010100,000011010101,000011010110,000011010111,000001101100,000001101101,000011011010,000011011011,000001010100,000001010101,000001010110,000001010111,000001100100,000001100101,000001010010,000001010011,000000100100,000000110111,000000111000,000000100111,000000101000,000001011000,000001011001,000000101011,000000101100,000001011010,000001100110,000001100111",n="11011,10010,010111,0110111,00110110,00110111,01100100,01100101,01101000,01100111,011001100,011001101,011010010,011010011,011010100,011010101,011010110,011010111,011011000,011011001,011011010,011011011,010011000,010011001,010011010,011000,010011011",i="0000001111,000011001000,000011001001,000001011011,000000110011,000000110100,000000110101,0000001101100,0000001101101,0000001001010,0000001001011,0000001001100,0000001001101,0000001110010,0000001110011,0000001110100,0000001110101,0000001110110,0000001110111,0000001010010,0000001010011,0000001010100,0000001010101,0000001011010,0000001011011,0000001100100,0000001100101",a="00000001000,00000001100,00000001101,000000010010,000000010011,000000010100,000000010101,000000010110,000000010111,000000011100,000000011101,000000011110,000000011111";t=t.split(","),r=r.split(","),n=n.split(","),i=i.split(","),a=a.split(",");var o={},s={};return e(o,t,0,1),e(o,n,64,64),e(o,a,1792,64),e(s,r,0,1),e(s,i,64,64),e(s,a,1792,64),[o,s]}(),e.decode._decodeG4=function(t,r,n,i,a,o,s){for(var u=e.decode,l=r<<3,c=0,f="",h=[],d=[],p=0;p<o;p++)d.push(0);d=u._makeDiff(d);for(var m=0,g=0,b=0,y=0,_=0,v=0,w="",x=0,k=8*Math.ceil(o/8);l>>>3<r+n;){b=u._findDiff(d,m+(0==m?0:1),1-_),y=u._findDiff(d,b,_);var B=0;if(1==s&&(B=t[l>>>3]>>>7-(7&l)&1),2==s&&(B=t[l>>>3]>>>(7&l)&1),l++,f+=B,"H"==w){if(null!=u._lens[_][f]){var E=u._lens[_][f];f="",c+=E,E<64&&(u._addNtimes(h,c,_),m+=c,_=1-_,c=0,0==--x&&(w=""))}}else"0001"==f&&(f="",u._addNtimes(h,y-m,_),m=y),"001"==f&&(f="",w="H",x=2),null!=u._dmap[f]&&(g=b+u._dmap[f],u._addNtimes(h,g-m,_),m=g,f="",_=1-_);h.length==o&&""==w&&(u._writeBits(h,i,8*a+v*k),_=0,v++,m=0,d=u._makeDiff(h),h=[])}},e.decode._findDiff=function(e,t,r){for(var n=0;n<e.length;n+=2)if(e[n]>=t&&e[n+1]==r)return e[n]},e.decode._makeDiff=function(e){var t=[];1==e[0]&&t.push(0,1);for(var r=1;r<e.length;r++)e[r-1]!=e[r]&&t.push(r,e[r]);return t.push(e.length,0,e.length,1),t},e.decode._decodeG2=function(t,r,n,i,a,o,s){for(var u=e.decode,l=r<<3,c=0,f="",h=[],d=0,p=0,m=8*Math.ceil(o/8);l>>>3<r+n;){var g=0;1==s&&(g=t[l>>>3]>>>7-(7&l)&1),2==s&&(g=t[l>>>3]>>>(7&l)&1),l++,f+=g,null!=(c=u._lens[d][f])&&(u._addNtimes(h,c,d),f="",c<64&&(d=1-d),h.length==o&&(u._writeBits(h,i,8*a+p*m),h=[],p++,d=0,7&l&&(l+=8-(7&l)),c>=64&&(l+=8)))}},e.decode._decodeG3=function(t,r,n,i,a,o,s,u){for(var l=e.decode,c=r<<3,f=0,h="",d=[],p=[],m=0;m<o;m++)d.push(0);for(var g=0,b=0,y=0,_=0,v=0,w=-1,x="",k=0,B=!0,E=8*Math.ceil(o/8);c>>>3<r+n;){y=l._findDiff(p,g+(0==g?0:1),1-v),_=l._findDiff(p,y,v);var S=0;if(1==s&&(S=t[c>>>3]>>>7-(7&c)&1),2==s&&(S=t[c>>>3]>>>(7&c)&1),c++,h+=S,B){if(null!=l._lens[v][h]){var A=l._lens[v][h];h="",f+=A,A<64&&(l._addNtimes(d,f,v),v=1-v,f=0)}}else"H"==x?null!=l._lens[v][h]&&(A=l._lens[v][h],h="",f+=A,A<64&&(l._addNtimes(d,f,v),g+=f,v=1-v,f=0,0==--k&&(x=""))):("0001"==h&&(h="",l._addNtimes(d,_-g,v),g=_),"001"==h&&(h="",x="H",k=2),null!=l._dmap[h]&&(b=y+l._dmap[h],l._addNtimes(d,b-g,v),g=b,h="",v=1-v));h.endsWith("000000000001")&&(w>=0&&l._writeBits(d,i,8*a+w*E),u&&(1==s&&(B=1==(t[c>>>3]>>>7-(7&c)&1)),2==s&&(B=1==(t[c>>>3]>>>(7&c)&1)),c++),h="",v=0,w++,g=0,p=l._makeDiff(d),d=[])}d.length==o&&l._writeBits(d,i,8*a+w*E)},e.decode._addNtimes=function(e,t,r){for(var n=0;n<t;n++)e.push(r)},e.decode._writeBits=function(e,t,r){for(var n=0;n<e.length;n++)t[r+n>>>3]|=e[n]<<7-(r+n&7)},e.decode._decodeLZW=e.decode._decodeLZW=function(){var e,t,r,n,i=0,a=0,o=0,s=0,u=function(){var r=e>>>3,n=(t[r]<<16|t[r+1]<<8|t[r+2])>>>24-(7&e)-a&(1<<a)-1;return e+=a,n},l=new Uint32Array(16384),c=0,f=function(e){a=e+1,i=s+1},h=function(e){for(var t=e<<2,i=l[t+2],a=n+i-1;65535!=t;)r[a--]=l[t],t=l[t+1];n+=i},d=function(e,t){var r=i<<2,n=e<<2;l[r]=l[3+(t<<2)],l[r+1]=n,l[r+2]=l[n+2]+1,l[r+3]=l[n+3],1+ ++i==1<<a&&12!=a&&a++};return function(a,p,m,g,b,y){e=p<<3,t=a,r=g,n=b;var _=p+m<<3,v=0,w=0;for(function(e){if(e!=c){c=e,s=1+(o=1<<e);for(var t=0;t<s+1;t++)l[4*t]=l[4*t+3]=t,l[4*t+1]=65535,l[4*t+2]=1}}(y),f(y);e<_&&(v=u())!=s;){if(v==o){if(f(y),(v=u())==s)break;h(v)}else v<i?(h(v),d(w,v)):(d(w,w),h(i-1));w=v}return n}}(),e.tags={},e._types=function(){var e=new Array(250);return e.fill(0),{basic:{main:e=e.concat([0,0,0,0,4,3,3,3,3,3,0,0,3,0,0,0,3,0,0,2,2,2,2,4,3,0,0,3,4,4,3,3,5,5,3,2,5,5,0,0,0,0,4,4,0,0,3,3,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,2,2,3,5,5,3,0,3,3,4,4,4,3,4,0,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),rest:{33432:2,33434:5,33437:5,34665:4,34850:3,34853:4,34855:3,34864:3,34866:4,36864:7,36867:2,36868:2,37121:7,37377:10,37378:5,37380:10,37381:5,37383:3,37384:3,37385:3,37386:5,37510:7,37520:2,37521:2,37522:2,40960:7,40961:3,40962:4,40963:4,40965:4,41486:5,41487:5,41488:3,41985:3,41986:3,41987:3,41988:5,41989:3,41990:3,41993:3,41994:3,41995:7,41996:3,42032:2,42033:2,42034:5,42036:2,42037:2,59932:7}},gps:{main:[1,2,5,2,5,1,5,5,0,9],rest:{18:2,29:2}}}}(),e._readIFD=function(t,n,i,a,o,s){var u=t.readUshort(n,i);i+=2;var l={};s.debug&&r(" ".repeat(o),a.length-1,">>>----------------");for(var c=0;c<u;c++){var f=t.readUshort(n,i);i+=2;var h=t.readUshort(n,i);i+=2;var d=t.readUint(n,i);i+=4;var p=t.readUint(n,i);i+=4;var m=[];if(1==h||7==h){var g=d<5?i-4:p;g+d>n.buffer.byteLength&&(d=n.buffer.byteLength-g),m=new Uint8Array(n.buffer,g,d)}if(2==h){var b=d<5?i-4:p,y=n[b],_=Math.max(0,Math.min(d-1,n.length-b));y<128||0==_?m.push(t.readASCII(n,b,_)):m=new Uint8Array(n.buffer,b,_)}if(3==h)for(var v=0;v<d;v++)m.push(t.readUshort(n,(d<3?i-4:p)+2*v));if(4==h||13==h)for(v=0;v<d;v++)m.push(t.readUint(n,(d<2?i-4:p)+4*v));if(5==h||10==h){var w=5==h?t.readUint:t.readInt;for(v=0;v<d;v++)m.push([w(n,p+8*v),w(n,p+8*v+4)])}if(8==h)for(v=0;v<d;v++)m.push(t.readShort(n,(d<3?i-4:p)+2*v));if(9==h)for(v=0;v<d;v++)m.push(t.readInt(n,(d<2?i-4:p)+4*v));if(11==h)for(v=0;v<d;v++)m.push(t.readFloat(n,p+4*v));if(12==h)for(v=0;v<d;v++)m.push(t.readDouble(n,p+8*v));if(0==d||0!=m.length){if(s.debug&&r(" ".repeat(o),f,h,e.tags[f],m),l["t"+f]=m,330==f&&l.t272&&"DSLR-A100"==l.t272[0]);else if(330==f||34665==f||34853==f||50740==f&&t.readUshort(n,t.readUint(m,0))<300||61440==f){var x=50740==f?[t.readUint(m,0)]:m,k=[];for(v=0;v<x.length;v++)e._readIFD(t,n,x[v],k,o+1,s);330==f&&(l.subIFD=k),34665==f&&(l.exifIFD=k[0]),34853==f&&(l.gpsiIFD=k[0]),50740==f&&(l.dngPrvt=k[0]),61440==f&&(l.fujiIFD=k[0])}if(37500==f&&s.parseMN){var B=m;if("Nikon"==t.readASCII(B,0,5))l.makerNote=e.decode(B.slice(10).buffer)[0];else if("OLYMP"==t.readASCII(B,0,5)||"OM SYSTEM"==t.readASCII(B,0,9)){var E=[8208,8224,8240,8256,8272],S=[];e._readIFD(t,B,77==B[1]?16:85==B[5]?12:8,S,o+1,s);var A=l.makerNote=S.pop();for(v=0;v<E.length;v++){var C="t"+E[v];null!=A[C]&&(e._readIFD(t,B,A[C][0],S,o+1,s),A[C]=S.pop())}A.t12288&&(e._readIFD(t,A.t12288,0,S,o+1,s),A.t12288=S.pop())}else t.readUshort(n,p)<300&&t.readUshort(n,p+4)<=12&&(S=[],e._readIFD(t,n,p,S,o+1,s),l.makerNote=S[0])}}else if(r(f,"unknown TIFF tag type: ",h,"num:",d),0==c)return}return a.push(l),s.debug&&r(" ".repeat(o),"<<<---------------"),i},e._writeIFD=function(t,r,n,i,a){var o=Object.keys(a),s=o.length;a.exifIFD&&s--,a.gpsiIFD&&s--,t.writeUshort(n,i,s);for(var u=(i+=2)+12*s+4,l=0;l<o.length;l++){var c=o[l];if("t34665"!=c&&"t34853"!=c){"exifIFD"==c&&(c="t34665"),"gpsiIFD"==c&&(c="t34853");var f=parseInt(c.slice(1)),h=r.main[f];if(null==h&&(h=r.rest[f]),null==h||0==h)throw new Error("unknown type of tag: "+f);var d=a[c];34665==f&&(d=[u],u=e._writeIFD(t,r,n,u,a.exifIFD)[1]),34853==f&&(d=[u],u=e._writeIFD(t,e._types.gps,n,u,a.gpsiIFD)[1]),2==h&&(d=d[0]+"\0");var p=d.length;t.writeUshort(n,i,f),i+=2,t.writeUshort(n,i,h),i+=2,t.writeUint(n,i,p);var m=[-1,1,1,2,4,8,0,1,0,4,8,0,8][h]*p,g=i+=4;if(m>4&&(t.writeUint(n,i,u),g=u),1==h||7==h)for(var b=0;b<p;b++)n[g+b]=d[b];else if(2==h)t.writeASCII(n,g,d);else if(3==h)for(b=0;b<p;b++)t.writeUshort(n,g+2*b,d[b]);else if(4==h)for(b=0;b<p;b++)t.writeUint(n,g+4*b,d[b]);else if(5==h||10==h){var y=5==h?t.writeUint:t.writeInt;for(b=0;b<p;b++){var _=d[b],v=_[0],w=_[1];if(null==v)throw"e";y(n,g+8*b,v),y(n,g+8*b+4,w)}}else if(9==h)for(b=0;b<p;b++)t.writeInt(n,g+4*b,d[b]);else{if(12!=h)throw h;for(b=0;b<p;b++)t.writeDouble(n,g+8*b,d[b])}m>4&&(u+=m+=1&m),i+=4}}return[i,u]},e.toRGBA8=function(e,t){function n(e){return e<.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055}var i=e.width,a=e.height,o=i*a,s=e.data,u=new Uint8Array(4*o),l=e.t262?e.t262[0]:2,c=e.t258?Math.min(32,e.t258[0]):1;null==e.t262&&1==c&&(l=0);var f=e.t277?e.t277[0]:e.t258?e.t258.length:[1,1,3,1,1,4,3][l],h=e.t339?e.t339[0]:null;if(1==l&&32==c&&3!=h)throw"e";var d=Math.ceil(f*c*i/8);if(0==l){t=1/256;for(var p=0;p<a;p++){var m=p*d,g=p*i;if(1==c)for(var b=0;b<i;b++){var y=g+b<<2,_=s[m+(b>>3)]>>7-(7&b)&1;u[y]=u[y+1]=u[y+2]=255*(1-_),u[y+3]=255}if(4==c)for(b=0;b<i;b++)y=g+b<<2,_=s[m+(b>>1)]>>4-4*(1&b)&15,u[y]=u[y+1]=u[y+2]=17*(15-_),u[y+3]=255;if(8==c)for(b=0;b<i;b++)y=g+b<<2,_=s[m+b],u[y]=u[y+1]=u[y+2]=255-_,u[y+3]=255;if(16==c)for(b=0;b<i;b++)y=g+b<<2,_=s[(w=m+2*b)+1]<<8|s[w],u[y]=u[y+1]=u[y+2]=Math.min(255,255-~~(_*t)),u[y+3]=255}}else if(1==l){null==t&&(t=1/256);var v=3&s.length?null:new Float32Array(s.buffer);for(p=0;p<a;p++){if(m=p*d,g=p*i,1==c)for(b=0;b<i;b++)y=g+b<<2,_=s[m+(b>>3)]>>7-(7&b)&1,u[y]=u[y+1]=u[y+2]=255*_,u[y+3]=255;if(2==c)for(b=0;b<i;b++)y=g+b<<2,_=s[m+(b>>2)]>>6-2*(3&b)&3,u[y]=u[y+1]=u[y+2]=85*_,u[y+3]=255;if(8==c)for(b=0;b<i;b++)y=g+b<<2,_=s[m+b*f],u[y]=u[y+1]=u[y+2]=_,u[y+3]=255;if(16==c)for(b=0;b<i;b++)y=g+b<<2,_=s[(w=m+2*b)+1]<<8|s[w],u[y]=u[y+1]=u[y+2]=Math.min(255,~~(_*t)),u[y+3]=255;if(32==c)for(b=0;b<i;b++){var w;y=g+b<<2,_=v[w=(m>>>2)+b],u[y]=u[y+1]=u[y+2]=~~(.5+255*_),u[y+3]=255}}}else if(2==l)if(8==c){if(1==f)for(b=0;b<o;b++)u[4*b]=u[4*b+1]=u[4*b+2]=s[b],u[4*b+3]=255;if(3==f)for(b=0;b<o;b++){var x=3*b;u[y=b<<2]=s[x],u[y+1]=s[x+1],u[y+2]=s[x+2],u[y+3]=255}if(f>=4)for(b=0;b<o;b++)x=b*f,u[y=b<<2]=s[x],u[y+1]=s[x+1],u[y+2]=s[x+2],u[y+3]=s[x+3]}else if(16==c){if(4==f)for(b=0;b<o;b++)x=8*b+1,u[y=b<<2]=s[x],u[y+1]=s[x+2],u[y+2]=s[x+4],u[y+3]=s[x+6];if(3==f)for(b=0;b<o;b++)x=6*b+1,u[y=b<<2]=s[x],u[y+1]=s[x+2],u[y+2]=s[x+4],u[y+3]=255}else{if(32!=c)throw c;var k=new Float32Array(s.buffer),B=0;for(b=0;b<k.length;b++)B=Math.min(B,k[b]);if(B<0)for(b=0;b<s.length;b+=4){var E=s[b];s[b]=s[b+3],s[b+3]=E,E=s[b+1],s[b+1]=s[b+2],s[b+2]=E}var S=[];for(b=0;b<65536;b++)S.push(n(b/65535));for(b=0;b<k.length;b++){var A=Math.max(0,Math.min(1,k[b]));k[b]=S[~~(.5+65535*A)]}if(3==f)for(b=0;b<o;b++)x=3*b,u[y=b<<2]=~~(.5+255*k[x]),u[y+1]=~~(.5+255*k[x+1]),u[y+2]=~~(.5+255*k[x+2]),u[y+3]=255;else{if(4!=f)throw f;for(b=0;b<o;b++)x=4*b,u[y=b<<2]=~~(.5+255*k[x]),u[y+1]=~~(.5+255*k[x+1]),u[y+2]=~~(.5+255*k[x+2]),u[y+3]=~~(.5+255*k[x+3])}}else if(3==l){var C=e.t320,I=1<<c,P=8==c&&f>1&&e.t338&&0!=e.t338[0];for(p=0;p<a;p++)for(var T=0;T<i;T++){y=(b=p*i+T)<<2;var M=0,R=p*d;if(1==c)M=s[R+(T>>>3)]>>>7-(7&T)&1;else if(2==c)M=s[R+(T>>>2)]>>>6-2*(3&T)&3;else if(4==c)M=s[R+(T>>>1)]>>>4-4*(1&T)&15;else{if(8!=c)throw c;M=s[R+T*f]}u[y]=C[M]>>8,u[y+1]=C[I+M]>>8,u[y+2]=C[I+I+M]>>8,u[y+3]=P?s[R+T*f+1]:255}}else if(5==l){var F=f>4?1:0;for(b=0;b<o;b++){y=b<<2;var O=b*f;if(window.UDOC){var N=s[O],L=s[O+1],D=s[O+2],z=s[O+3],U=UDOC.C.cmykToRgb([N*(1/255),L*(1/255),D*(1/255),z*(1/255)]);u[y]=~~(.5+255*U[0]),u[y+1]=~~(.5+255*U[1]),u[y+2]=~~(.5+255*U[2])}else N=255-s[O],L=255-s[O+1],D=255-s[O+2],z=(255-s[O+3])*(1/255),u[y]=~~(N*z+.5),u[y+1]=~~(L*z+.5),u[y+2]=~~(D*z+.5);u[y+3]=255*(1-F)+s[O+4]*F}}else if(6==l&&e.t278){var $=e.t278[0];for(p=0;p<a;p+=$){b=p*i;for(var j=$*i,Z=0;Z<j;Z++){y=4*(b+Z),D=s[(O=3*b+4*(Z>>>1))+(1&Z)];var G=s[O+2]-128,W=s[O+3]-128,H=D+((W>>2)+(W>>3)+(W>>5)),q=D-((G>>2)+(G>>4)+(G>>5))-((W>>1)+(W>>3)+(W>>4)+(W>>5)),Q=D+(G+(G>>1)+(G>>2)+(G>>6));u[y]=Math.max(0,Math.min(255,H)),u[y+1]=Math.max(0,Math.min(255,q)),u[y+2]=Math.max(0,Math.min(255,Q)),u[y+3]=255}}}else if(32845==l)for(p=0;p<a;p++)for(T=0;T<i;T++){y=4*(p*i+T);var V=s[1+(O=6*(p*i+T))]<<8|s[O],Y=(V=Math.pow(2,(V+.5)/256-64),(s[O+3]+.5)/410),K=(s[O+5]+.5)/410,X=9*Y/(6*Y-16*K+12),J=4*K/(6*Y-16*K+12),ee=X*V/J,te=(1-X-J)*V/J;H=2.69*ee-1.276*(D=V)-.414*te,q=-1.022*ee+1.978*D+.044*te,Q=.061*ee-.224*D+1.163*te,u[y]=255*n(Math.min(H,1)),u[y+1]=255*n(Math.min(q,1)),u[y+2]=255*n(Math.min(Q,1)),u[y+3]=255}else r("Unknown Photometric interpretation: "+l);return u},e.replaceIMG=function(t){null==t&&(t=document.getElementsByTagName("img"));for(var r=["tif","tiff","dng","cr2","nef"],n=0;n<t.length;n++){var i=t[n],a=i.getAttribute("src");if(null!=a){var o=a.split(".").pop().toLowerCase();if(-1!=r.indexOf(o)){var s=new XMLHttpRequest;e._xhrs.push(s),e._imgs.push(i),s.open("GET",a),s.responseType="arraybuffer",s.onload=e._imgLoaded,s.send()}}}},e._xhrs=[],e._imgs=[],e._imgLoaded=function(t){var r=e._xhrs.indexOf(t.target),n=e._imgs[r];e._xhrs.splice(r,1),e._imgs.splice(r,1),n.setAttribute("src",e.bufferToURI(t.target.response))},e.bufferToURI=function(t){var r=e.decode(t),n=r,i=0,a=n[0];r[0].subIFD&&(n=n.concat(r[0].subIFD));for(var o=0;o<n.length;o++){var s=n[o];if(!(null==s.t258||s.t258.length<3)){var u=s.t256*s.t257;u>i&&(i=u,a=s)}}e.decodeImage(t,a,r);var l=e.toRGBA8(a),c=a.width,f=a.height,h=document.createElement("canvas");h.width=c,h.height=f;var d=h.getContext("2d"),p=new ImageData(new Uint8ClampedArray(l.buffer),c,f);return d.putImageData(p,0,0),h.toDataURL()},e._binBE={nextZero:function(e,t){for(;0!=e[t];)t++;return t},readUshort:function(e,t){return e[t]<<8|e[t+1]},readShort:function(t,r){var n=e._binBE.ui8;return n[0]=t[r+1],n[1]=t[r+0],e._binBE.i16[0]},readInt:function(t,r){var n=e._binBE.ui8;return n[0]=t[r+3],n[1]=t[r+2],n[2]=t[r+1],n[3]=t[r+0],e._binBE.i32[0]},readUint:function(t,r){var n=e._binBE.ui8;return n[0]=t[r+3],n[1]=t[r+2],n[2]=t[r+1],n[3]=t[r+0],e._binBE.ui32[0]},readASCII:function(e,t,r){for(var n="",i=0;i<r;i++)n+=String.fromCharCode(e[t+i]);return n},readFloat:function(t,r){for(var n=e._binBE.ui8,i=0;i<4;i++)n[i]=t[r+3-i];return e._binBE.fl32[0]},readDouble:function(t,r){for(var n=e._binBE.ui8,i=0;i<8;i++)n[i]=t[r+7-i];return e._binBE.fl64[0]},writeUshort:function(e,t,r){e[t]=r>>8&255,e[t+1]=255&r},writeInt:function(t,r,n){var i=e._binBE.ui8;e._binBE.i32[0]=n,t[r+3]=i[0],t[r+2]=i[1],t[r+1]=i[2],t[r+0]=i[3]},writeUint:function(e,t,r){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r},writeASCII:function(e,t,r){for(var n=0;n<r.length;n++)e[t+n]=r.charCodeAt(n)},writeDouble:function(t,r,n){e._binBE.fl64[0]=n;for(var i=0;i<8;i++)t[r+i]=e._binBE.ui8[7-i]}},e._binBE.ui8=new Uint8Array(8),e._binBE.i16=new Int16Array(e._binBE.ui8.buffer),e._binBE.i32=new Int32Array(e._binBE.ui8.buffer),e._binBE.ui32=new Uint32Array(e._binBE.ui8.buffer),e._binBE.fl32=new Float32Array(e._binBE.ui8.buffer),e._binBE.fl64=new Float64Array(e._binBE.ui8.buffer),e._binLE={nextZero:e._binBE.nextZero,readUshort:function(e,t){return e[t+1]<<8|e[t]},readShort:function(t,r){var n=e._binBE.ui8;return n[0]=t[r+0],n[1]=t[r+1],e._binBE.i16[0]},readInt:function(t,r){var n=e._binBE.ui8;return n[0]=t[r+0],n[1]=t[r+1],n[2]=t[r+2],n[3]=t[r+3],e._binBE.i32[0]},readUint:function(t,r){var n=e._binBE.ui8;return n[0]=t[r+0],n[1]=t[r+1],n[2]=t[r+2],n[3]=t[r+3],e._binBE.ui32[0]},readASCII:e._binBE.readASCII,readFloat:function(t,r){for(var n=e._binBE.ui8,i=0;i<4;i++)n[i]=t[r+i];return e._binBE.fl32[0]},readDouble:function(t,r){for(var n=e._binBE.ui8,i=0;i<8;i++)n[i]=t[r+i];return e._binBE.fl64[0]},writeUshort:function(e,t,r){e[t]=255&r,e[t+1]=r>>8&255},writeInt:function(t,r,n){var i=e._binBE.ui8;e._binBE.i32[0]=n,t[r+0]=i[0],t[r+1]=i[1],t[r+2]=i[2],t[r+3]=i[3]},writeUint:function(e,t,r){e[t]=r>>>0&255,e[t+1]=r>>>8&255,e[t+2]=r>>>16&255,e[t+3]=r>>>24&255},writeASCII:e._binBE.writeASCII},e._copyTile=function(e,t,r,n,i,a,o,s){for(var u=Math.min(t,i-o),l=Math.min(r,a-s),c=0;c<l;c++)for(var f=(s+c)*i+o,h=c*t,d=0;d<u;d++)n[f+d]=e[h+d]},e.LosslessJpegDecode=function(){var e,t;function r(){return e[t++]}function n(){return e[t++]<<8|e[t++]}function i(e){for(var t=r(),n=[0,0,0,255],i=[],o=0;o<16;o++)i[o]=r();for(o=0;o<16;o++)for(var s=0;s<i[o];s++)n[a(n,0,o+1,1)+3]=r();var u=new Uint8Array(256);for(e[t]=[new Uint8Array(n),u],o=0;o<256;o++){for(var l=8,c=o,f=0;255==n[f+3]&&0!=l;)f=n[f+(c>>--l&1)];u[o]=f}}function a(e,t,r,n){if(255!=e[t+3])return 0;if(0==r)return t;for(var i=0;i<2;i++){0==e[t+i]&&(e[t+i]=e.length,e.push(0,0,n,255));var o=a(e,e[t+i],r-1,n+1);if(0!=o)return o}return 0}function o(e){for(var t=e.b,r=e.f;t<25&&e.a<e.d;){var n=e.data[e.a++];255!=n||e.c||e.a++,r=r<<8|n,t+=8}if(t<0)throw"e";e.b=t,e.f=r}function s(e,t){return t.b<e&&o(t),t.f>>(t.b-=e)&65535>>16-e}function u(e,t){var r=e[0],n=0,i=255;t.b<16&&o(t);var a=t.f>>t.b-8&255;for(i=r[(n=e[1][a])+3],t.b-=r[n+2];255==i;)i=r[(n=r[n+(t.f>>--t.b&1)])+3];return i}function l(e,t){return e<32768>>16-t&&(e+=1-(1<<t)),e}function c(e,t){var r=u(e,t);return 0==r?0:16==r?-32768:l(s(r,t),r)}function f(e,t,r,n,i,a){for(var o=0,s=0;s<a;s++){for(var u=s*t,l=0;l<t;l+=i){o++;for(var f=0;f<i;f++)e[u+l+f]=c(n[f],r)}if(0!=r.e&&o%r.e==0&&0!=s){for(var h=r.a,d=r.data;255!=d[h]||!(208<=d[h+1]&&d[h+1]<=215);)h--;r.a=h+2,r.f=0,r.b=0}}}function h(e,t){return l(s(e,t),e)}function d(e,t,r,n,i,a,o,s){for(var u=r*o,l=i;l<a;l++)e[l]+=1<<s-1;for(var c=o;c<u;c+=o)for(l=i;l<a;l++)e[c+l]+=e[c+l-o];for(var f=1;f<n;f++){var h=f*u;for(l=i;l<a;l++)e[h+l]+=e[h+l-u];for(c=o;c<u;c+=o)for(l=i;l<a;l++){var d=h+c+l,p=d-u,m=e[d-o],g=0;if(0==t)g=0;else if(1==t)g=m;else if(2==t)g=e[p];else if(3==t)g=e[p-o];else if(4==t)g=m+(e[p]-e[p-o]);else if(5==t)g=m+(e[p]-e[p-o]>>>1);else if(6==t)g=e[p]+(m-e[p-o]>>>1);else{if(7!=t)throw t;g=m+e[p]>>>1}e[d]+=g}}}return function(a){if(e=a,t=0,65496!=n())throw"e";for(var o=[],s=0,l=0,c=0,p=[],m=[],g=[],b=0,y=0,_=0;;){var v=n();if(65535!=v){var w=n();if(65475==v){l=r(),y=n(),_=n(),b=r();for(var x=0;x<b;x++){var k=r(),B=r();if(0!=r())throw"e";o[k]=[x,B>>4,15&B]}}else if(65476==v)for(var E=t+w-2;t<E;)i(m);else{if(65498==v){for(t++,x=0;x<b;x++){var S=o[r()];g[S[0]]=m[r()>>>4],p[S[0]]=S.slice(1)}s=r(),t+=2;break}65501==v?c=n():t+=w-2}}else t--}var A=new(l>8?Uint16Array:Uint8Array)(y*_*b),C={b:0,f:0,c:8==s,a:t,data:e,d:e.length,e:c};if(C.c)!function(r,n,i,a,o){for(var s=e.length-t,l=0;l<s;l+=4){var c=e[t+l];e[t+l]=e[t+l+3],e[t+l+3]=c,c=e[t+l+1],e[t+l+1]=e[t+l+2],e[t+l+2]=c}for(var f=0;f<o;f++)for(var d=32768,p=32768,m=0;m<n;m+=2){var g=u(a,i),b=u(a,i);0!=g&&(d+=h(g,i)),0!=b&&(p+=h(b,i)),r[f*n+m]=65535&d,r[f*n+m+1]=65535&p}}(A,_*b,C,g[0],y);else{var I=[],P=0,T=0;for(x=0;x<b;x++){var M=p[x];(j=M[0])>P&&(P=j),($=M[1])>T&&(T=$),I.push(j*$)}if(1!=P||1!=T){if(3!=b||1!=I[1]||1!=I[2])throw"e";if(2!=P||1!=T&&2!=T)throw"e";var R=[],F=0;for(x=0;x<b;x++){for(var O=0;O<I[x];O++)R.push(g[x]);F+=I[x]}var N=_/P,L=y/T,D=N*L;f(A,N*F,C,R,F,L),d(A,s,N,L,F-2,F,F,l);var z=new Uint16Array(D*I[0]);if(2==P&&2==T){for(x=0;x<D;x++)z[4*x]=A[6*x],z[4*x+1]=A[6*x+1],z[4*x+2]=A[6*x+2],z[4*x+3]=A[6*x+3];for(d(z,s,4*N,L,0,1,1,l),x=0;x<D;x++)A[6*x]=z[4*x],A[6*x+1]=z[4*x+1],A[6*x+2]=z[4*x+2],A[6*x+3]=z[4*x+3]}if(2==P&&1==T){for(x=0;x<D;x++)z[2*x]=A[4*x],z[2*x+1]=A[4*x+1];for(d(z,s,2*N,L,0,1,1,l),x=0;x<D;x++)A[4*x]=z[2*x],A[4*x+1]=z[2*x+1]}for(var U=A.slice(0),$=0;$<y;$++)if(2==T)for(var j=0;j<_;j++){var Z=(($>>>1)*N+(j>>>1))*F,G=2*(1&$)+(1&j);A[W=($*_+j)*b]=U[Z+G],A[W+1]=U[Z+4],A[W+2]=U[Z+5]}else for(j=0;j<_;j++){var W;Z=($*N+(j>>>1))*F,G=1&j,A[W=($*_+j)*b]=U[Z+G],A[W+1]=U[Z+2],A[W+2]=U[Z+3]}}else if(f(A,_*b,C,g,b,y),0==c)d(A,s,_,y,0,b,b,l);else{var H=Math.floor(c/_);for($=0;$<y;$+=H){var q=A.slice($*_*b,($+H)*_*b);d(q,s,_,H,0,b,b,l),A.set(q,$*_*b)}}}return A}}(),function(){var t=5,r=6,n=13,i=14;function a(e){for(var t=[[],[],[]],r=Math.max(2,e.w+32>>>6),n=0;n<3;n++)for(var i=0;i<41;i++)t[n][i]=[r,1];return t}function o(e,t){var r=0,n=8-e.a;if(e.j,e.a,t){if(t>=n)do{r<<=n,t-=n,r|=e[e.j]&(1<<n)-1,e.j++,n=8}while(t>=8);t&&(r<<=t,n-=t,r|=e[e.j]>>>n&(1<<t)-1),e.a=8-n}return r}function s(e,t,r,n,i,a,s,u){null==u&&(u=0);var l,c,f,h,d,p,m=a+1,g=m%2,b=0,y=n[i],_=n[i-1],v=n[i-2][m],w=_[m-1],x=_[m],k=_[m+1],B=y[m-1],E=y[m+1],S=Math.abs;if(g&&(f=S(k-x),h=S(v-x),d=S(w-x)),g){if(p=(p=f>d&&h<f?v+w:f<d&&h<d?v+k:k+w)+2*x>>>2,u)return void(y[m]=p);l=t.t*t.c[e.g+x-v]+t.c[e.g+w-x]}else p=x>w&&x>k||x<w&&x<k?E+B+2*x>>>2:B+E>>>1,l=t.t*t.c[e.g+x-w]+t.c[e.g+w-B];c=S(l);var A=function(e){for(var t=-1,r=0;!r;t++)r=e[e.j]>>>7-e.a&1,e.a++,e.a&=7,e.a||e.j++;return t}(r);if(A<e.n-t.v-1){var C=function(e,t){var r=0;if(t<e)for(;r<=14&&t<<++r<e;);return r}(s[c][0],s[c][1]);b=o(r,C)+(A<<C)}else b=o(r,t.v)+1;b=1&b?-1-(b>>>1):b>>>1,s[c][0]+=S(b),s[c][1]==e.f&&(s[c][0]>>>=1,s[c][1]>>>=1),s[c][1]++,p=l<0?p-b:p+b,e.i&&(p<0?p+=t.w:p>e.g&&(p-=t.w)),y[m]=p>=0?Math.min(p,e.g):0}function u(e,t,r){for(var n=e[0].length,i=t;i<=r;i++)e[i][0]=e[i-1][1],e[i][n-1]=e[i-1][n-2]}function l(e){u(e,7,12),u(e,2,4),u(e,15,17)}function c(e,t,r,i,a,o,u,c,f,h,d,p,m){for(var g=0,b=1,y=a<n&&a>4;b<e.m;)g<e.m&&(s(e,t,r,i,a,g,u[f],e.h&&(y&&h||!y&&(d||(g&p)==m))),s(e,t,r,i,o,g,u[f],e.h&&(!y&&h||y&&(d||(g&p)==m))),g+=2),g>8&&(s(e,t,r,i,a,b,c[f]),s(e,t,r,i,o,b,c[f]),b+=2);l(i)}function f(e,t,r,n,i,a){c(e,t,r,n,2,7,i,a,0,0,1,0,8),c(e,t,r,n,8,15,i,a,1,0,1,0,8),c(e,t,r,n,3,9,i,a,2,1,0,3,0),c(e,t,r,n,10,16,i,a,0,0,0,3,2),c(e,t,r,n,4,11,i,a,1,0,0,3,2),c(e,t,r,n,12,17,i,a,2,1,0,3,0)}function h(e,t,r,n,i,a){var o=a.length,s=e.l;i+1==e.s&&(s=e.e-i*e.l);for(var u=6*e.e*n+i*e.l,l=0;l<6;l++){for(var c=0;c<s;c++){var f,h=a[l%o][c%o];f=0==h?2+(l>>>1):2==h?15+(l>>>1):7+l;var d=e.h?(2*c/3&2147483646|c%3&1)+(c%3>>>1):c>>>1;t[u+c]=r[f][d+1]}u+=e.e}}e._decompressRAF=function(o,s){var u=function(t){var r=e._binBE.readUshort,n={b:r(t,0),i:t[2],C:t[3],u:t[4],q:r(t,5),k:r(t,7),e:r(t,9),l:r(t,11),s:t[13],d:r(t,14)};if(18771!=n.b||n.i>1||n.q<6||n.q%6||n.e<768||n.e%24||768!=n.l||n.k<n.l||n.k%n.l||n.k-n.e>=n.l||n.s>16||n.s!=n.k/n.l||n.s!=Math.ceil(n.e/n.l)||n.d!=n.q/6||12!=n.u&&14!=n.u&&16!=n.u||16!=n.C&&0!=n.C)throw"Invalid data";if(0==n.i)throw"Not implemented. We need this file!";return n.h=16==n.C,n.m=0|(n.h?2*n.l/3:n.l>>>1),n.A=n.m+2,n.f=64,n.g=(1<<n.u)-1,n.n=4*n.u,n}(o),c=function(t,r){var n=new Array(r.s),i=4*r.s,a=16+i;12&i&&(a+=16-(12&i));for(var o=0,s=16;o<r.s;s+=4){var u=e._binBE.readUint(t,s);n[o]=t.slice(a,a+u),n[o].j=0,n[o].a=0,a+=u,o++}if(a!=t.length)throw"Invalid data";return n}(o,u),d=function(e){var t={c:new Int8Array(2<<e.u)};return function(e,t,r){var n=[0,18,67,276,r];e.o=0,e.w=(n[4]+0)/1+1|0,e.v=Math.ceil(Math.log2(e.w)),e.t=9,function(e,t){for(var r=-t[4],n=0;r<=t[4];n++,r++)e[n]=r<=-t[3]?-4:r<=-t[2]?-3:r<=-t[1]?-2:r<-t[0]?-1:r<=t[0]?0:r<t[1]?1:r<t[2]?2:r<t[3]?3:4}(e.c,n)}(t,0,e.g),t}(u),p=new Int16Array(u.e*u.q);null==s&&(s=u.h?[[1,1,0,1,1,2],[1,1,2,1,1,0],[2,0,1,0,2,1],[1,1,2,1,1,0],[1,1,0,1,1,2],[0,2,1,2,0,1]]:[[0,1],[3,2]]);for(var m=[[0,3],[1,4],[t,11],[r,12],[n,16],[i,17]],g=[],b=0;b<18;b++)g[b]=new Uint16Array(u.A);for(var y=0;y<u.s;y++){var _=a(d),v=a(d);for(b=0;b<18;b++)for(var w=0;w<u.A;w++)g[b][w]=0;for(var x=0;x<u.d;x++){for(f(u,d,c[y],g,_,v),b=0;b<6;b++)for(w=0;w<u.A;w++)g[m[b][0]][w]=g[m[b][1]][w];for(h(u,p,g,x,y,s),b=2;b<18;b++)if(-1==[t,r,n,i].indexOf(b))for(w=0;w<u.A;w++)g[b][w]=0;l(g)}}return p}}()}(t,"function"==typeof commonjsRequire?requirePako():self.pako)}()}(UTIF);var UTIFExports=UTIF.exports,utif=getDefaultExportFromCjs(UTIFExports),util$1,objectUtil;function getDimensionValue(e){return"number"==typeof e?e:e instanceof Uint8Array?e[0]:"string"==typeof e[0]?parseInt(e[0]):e[0]}function tiff(){return{mime:"image/tiff",encode:e=>{const t=utif.encodeImage(e.data,e.width,e.height);return Buffer.from(t)},decode:e=>{const t=utif.decode(e),r=t[0];if(!r)throw new Error("No page found in TIFF");if(!r.t256)throw new Error("No image width found in TIFF");if(!r.t257)throw new Error("No image height found in TIFF");t.forEach(t=>{utif.decodeImage(e,t)});const n=utif.toRGBA8(r);return{data:Buffer.from(n),width:getDimensionValue(r.t256),height:getDimensionValue(r.t257)}}}}!function(e){e.assertEqual=e=>e,e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const r of e)t[r]=r;return t},e.getValidEnumValues=t=>{const r=e.objectKeys(t).filter(e=>"number"!=typeof t[t[e]]),n={};for(const e of r)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},e.find=(e,t)=>{for(const r of e)if(t(r))return r},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(util$1||(util$1={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(objectUtil||(objectUtil={}));const ZodParsedType=util$1.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),getParsedType=e=>{switch(typeof e){case"undefined":return ZodParsedType.undefined;case"string":return ZodParsedType.string;case"number":return isNaN(e)?ZodParsedType.nan:ZodParsedType.number;case"boolean":return ZodParsedType.boolean;case"function":return ZodParsedType.function;case"bigint":return ZodParsedType.bigint;case"symbol":return ZodParsedType.symbol;case"object":return Array.isArray(e)?ZodParsedType.array:null===e?ZodParsedType.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?ZodParsedType.promise:"undefined"!=typeof Map&&e instanceof Map?ZodParsedType.map:"undefined"!=typeof Set&&e instanceof Set?ZodParsedType.set:"undefined"!=typeof Date&&e instanceof Date?ZodParsedType.date:ZodParsedType.object;default:return ZodParsedType.unknown}},ZodIssueCode=util$1.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),quotelessJson=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class ZodError extends Error{constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(e){return e.message},r={_errors:[]},n=e=>{for(const i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(n);else if("invalid_return_type"===i.code)n(i.returnTypeError);else if("invalid_arguments"===i.code)n(i.argumentsError);else if(0===i.path.length)r._errors.push(t(i));else{let e=r,n=0;for(;n<i.path.length;){const r=i.path[n];n===i.path.length-1?(e[r]=e[r]||{_errors:[]},e[r]._errors.push(t(i))):e[r]=e[r]||{_errors:[]},e=e[r],n++}}};return n(this),r}static assert(e){if(!(e instanceof ZodError))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,util$1.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},r=[];for(const n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}ZodError.create=e=>new ZodError(e);const errorMap=(e,t)=>{let r;switch(e.code){case ZodIssueCode.invalid_type:r=e.received===ZodParsedType.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case ZodIssueCode.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,util$1.jsonStringifyReplacer)}`;break;case ZodIssueCode.unrecognized_keys:r=`Unrecognized key(s) in object: ${util$1.joinValues(e.keys,", ")}`;break;case ZodIssueCode.invalid_union:r="Invalid input";break;case ZodIssueCode.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${util$1.joinValues(e.options)}`;break;case ZodIssueCode.invalid_enum_value:r=`Invalid enum value. Expected ${util$1.joinValues(e.options)}, received '${e.received}'`;break;case ZodIssueCode.invalid_arguments:r="Invalid function arguments";break;case ZodIssueCode.invalid_return_type:r="Invalid function return type";break;case ZodIssueCode.invalid_date:r="Invalid date";break;case ZodIssueCode.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:util$1.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case ZodIssueCode.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case ZodIssueCode.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case ZodIssueCode.custom:r="Invalid input";break;case ZodIssueCode.invalid_intersection_types:r="Intersection results could not be merged";break;case ZodIssueCode.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case ZodIssueCode.not_finite:r="Number must be finite";break;default:r=t.defaultError,util$1.assertNever(e)}return{message:r}};let overrideErrorMap=errorMap;function setErrorMap(e){overrideErrorMap=e}function getErrorMap(){return overrideErrorMap}const makeIssue=e=>{const{data:t,path:r,errorMaps:n,issueData:i}=e,a=[...r,...i.path||[]],o={...i,path:a};if(void 0!==i.message)return{...i,path:a,message:i.message};let s="";const u=n.filter(e=>!!e).slice().reverse();for(const e of u)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},EMPTY_PATH=[];function addIssueToContext(e,t){const r=getErrorMap(),n=makeIssue({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===errorMap?void 0:errorMap].filter(e=>!!e)});e.common.issues.push(n)}class ParseStatus{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const n of t){if("aborted"===n.status)return INVALID;"dirty"===n.status&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const e of t){const t=await e.key,n=await e.value;r.push({key:t,value:n})}return ParseStatus.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const n of t){const{key:t,value:i}=n;if("aborted"===t.status)return INVALID;if("aborted"===i.status)return INVALID;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"===t.value||void 0===i.value&&!n.alwaysSet||(r[t.value]=i.value)}return{status:e.value,value:r}}}const INVALID=Object.freeze({status:"aborted"}),DIRTY=e=>({status:"dirty",value:e}),OK=e=>({status:"valid",value:e}),isAborted=e=>"aborted"===e.status,isDirty=e=>"dirty"===e.status,isValid=e=>"valid"===e.status,isAsync=e=>"undefined"!=typeof Promise&&e instanceof Promise;function __classPrivateFieldGet(e,t,r,n){if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function __classPrivateFieldSet(e,t,r,n,i){if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,r),r}var errorUtil,_ZodEnum_cache,_ZodNativeEnum_cache;"function"==typeof SuppressedError&&SuppressedError,function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:null==e?void 0:e.message}(errorUtil||(errorUtil={}));class ParseInputLazyPath{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const handleResult=(e,t)=>{if(isValid(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new ZodError(e.common.issues);return this._error=t,this._error}}};function processCreateParams(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{var a,o;const{message:s}=e;return"invalid_enum_value"===t.code?{message:null!=s?s:i.defaultError}:void 0===i.data?{message:null!==(a=null!=s?s:n)&&void 0!==a?a:i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:null!==(o=null!=s?s:r)&&void 0!==o?o:i.defaultError}},description:i}}class ZodType{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return getParsedType(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:getParsedType(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:getParsedType(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(isAsync(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){var r;const n={common:{issues:[],async:null!==(r=null==t?void 0:t.async)&&void 0!==r&&r,contextualErrorMap:null==t?void 0:t.errorMap},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:getParsedType(e)},i=this._parseSync({data:e,path:n.path,parent:n});return handleResult(n,i)}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:null==t?void 0:t.errorMap,async:!0},path:(null==t?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:getParsedType(e)},n=this._parse({data:e,path:r.path,parent:r}),i=await(isAsync(n)?n:Promise.resolve(n));return handleResult(r,i)}refine(e,t){const r=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,n)=>{const i=e(t),a=()=>n.addIssue({code:ZodIssueCode.custom,...r(t)});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(a(),!1)):!!i||(a(),!1)})}refinement(e,t){return this._refinement((r,n)=>!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1))}_refinement(e){return new ZodEffects({schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this,this._def)}promise(){return ZodPromise.create(this,this._def)}or(e){return ZodUnion.create([this,e],this._def)}and(e){return ZodIntersection.create(this,e,this._def)}transform(e){return new ZodEffects({...processCreateParams(this._def),schema:this,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new ZodDefault({...processCreateParams(this._def),innerType:this,defaultValue:t,typeName:ZodFirstPartyTypeKind.ZodDefault})}brand(){return new ZodBranded({typeName:ZodFirstPartyTypeKind.ZodBranded,type:this,...processCreateParams(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new ZodCatch({...processCreateParams(this._def),innerType:this,catchValue:t,typeName:ZodFirstPartyTypeKind.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return ZodPipeline.create(this,e)}readonly(){return ZodReadonly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const cuidRegex=/^c[^\s-]{8,}$/i,cuid2Regex=/^[0-9a-z]+$/,ulidRegex=/^[0-9A-HJKMNP-TV-Z]{26}$/,uuidRegex=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,nanoidRegex=/^[a-z0-9_-]{21}$/i,durationRegex=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,emailRegex=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_emojiRegex="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let emojiRegex;const ipv4Regex=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv6Regex=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,base64Regex=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dateRegexSource="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",dateRegex=new RegExp(`^${dateRegexSource}$`);function timeRegexSource(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),t}function timeRegex(e){return new RegExp(`^${timeRegexSource(e)}$`)}function datetimeRegex(e){let t=`${dateRegexSource}T${timeRegexSource(e)}`;const r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,new RegExp(`^${t}$`)}function isValidIP(e,t){return!("v4"!==t&&t||!ipv4Regex.test(e))||!("v6"!==t&&t||!ipv6Regex.test(e))}class ZodString extends ZodType{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ZodParsedType.string){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.string,received:t.parsedType}),INVALID}const t=new ParseStatus;let r;for(const n of this._def.checks)if("min"===n.kind)e.data.length<n.value&&(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),t.dirty());else if("max"===n.kind)e.data.length>n.value&&(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),t.dirty());else if("length"===n.kind){const i=e.data.length>n.value,a=e.data.length<n.value;(i||a)&&(r=this._getOrReturnCtx(e,r),i?addIssueToContext(r,{code:ZodIssueCode.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):a&&addIssueToContext(r,{code:ZodIssueCode.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),t.dirty())}else if("email"===n.kind)emailRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"email",code:ZodIssueCode.invalid_string,message:n.message}),t.dirty());else if("emoji"===n.kind)emojiRegex||(emojiRegex=new RegExp(_emojiRegex,"u")),emojiRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"emoji",code:ZodIssueCode.invalid_string,message:n.message}),t.dirty());else if("uuid"===n.kind)uuidRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"uuid",code:ZodIssueCode.invalid_string,message:n.message}),t.dirty());else if("nanoid"===n.kind)nanoidRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"nanoid",code:ZodIssueCode.invalid_string,message:n.message}),t.dirty());else if("cuid"===n.kind)cuidRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"cuid",code:ZodIssueCode.invalid_string,message:n.message}),t.dirty());else if("cuid2"===n.kind)cuid2Regex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"cuid2",code:ZodIssueCode.invalid_string,message:n.message}),t.dirty());else if("ulid"===n.kind)ulidRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"ulid",code:ZodIssueCode.invalid_string,message:n.message}),t.dirty());else if("url"===n.kind)try{new URL(e.data)}catch(i){r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"url",code:ZodIssueCode.invalid_string,message:n.message}),t.dirty()}else"regex"===n.kind?(n.regex.lastIndex=0,n.regex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"regex",code:ZodIssueCode.invalid_string,message:n.message}),t.dirty())):"trim"===n.kind?e.data=e.data.trim():"includes"===n.kind?e.data.includes(n.value,n.position)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),t.dirty()):"toLowerCase"===n.kind?e.data=e.data.toLowerCase():"toUpperCase"===n.kind?e.data=e.data.toUpperCase():"startsWith"===n.kind?e.data.startsWith(n.value)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.invalid_string,validation:{startsWith:n.value},message:n.message}),t.dirty()):"endsWith"===n.kind?e.data.endsWith(n.value)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.invalid_string,validation:{endsWith:n.value},message:n.message}),t.dirty()):"datetime"===n.kind?datetimeRegex(n).test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.invalid_string,validation:"datetime",message:n.message}),t.dirty()):"date"===n.kind?dateRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.invalid_string,validation:"date",message:n.message}),t.dirty()):"time"===n.kind?timeRegex(n).test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.invalid_string,validation:"time",message:n.message}),t.dirty()):"duration"===n.kind?durationRegex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"duration",code:ZodIssueCode.invalid_string,message:n.message}),t.dirty()):"ip"===n.kind?isValidIP(e.data,n.version)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"ip",code:ZodIssueCode.invalid_string,message:n.message}),t.dirty()):"base64"===n.kind?base64Regex.test(e.data)||(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{validation:"base64",code:ZodIssueCode.invalid_string,message:n.message}),t.dirty()):util$1.assertNever(n);return{status:t.value,value:e.data}}_regex(e,t,r){return this.refinement(t=>e.test(t),{validation:t,code:ZodIssueCode.invalid_string,...errorUtil.errToObj(r)})}_addCheck(e){return new ZodString({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...errorUtil.errToObj(e)})}datetime(e){var t,r;return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,offset:null!==(t=null==e?void 0:e.offset)&&void 0!==t&&t,local:null!==(r=null==e?void 0:e.local)&&void 0!==r&&r,...errorUtil.errToObj(null==e?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===(null==e?void 0:e.precision)?null:null==e?void 0:e.precision,...errorUtil.errToObj(null==e?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...errorUtil.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:null==t?void 0:t.position,...errorUtil.errToObj(null==t?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...errorUtil.errToObj(t)})}nonempty(e){return this.min(1,errorUtil.errToObj(e))}trim(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function floatSafeRemainder(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n;return parseInt(e.toFixed(i).replace(".",""))%parseInt(t.toFixed(i).replace(".",""))/Math.pow(10,i)}ZodString.create=e=>{var t;return new ZodString({checks:[],typeName:ZodFirstPartyTypeKind.ZodString,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...processCreateParams(e)})};class ZodNumber extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ZodParsedType.number){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.number,received:t.parsedType}),INVALID}let t;const r=new ParseStatus;for(const n of this._def.checks)"int"===n.kind?util$1.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:"integer",received:"float",message:n.message}),r.dirty()):"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"multipleOf"===n.kind?0!==floatSafeRemainder(e.data,n.value)&&(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.not_finite,message:n.message}),r.dirty()):util$1.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,errorUtil.toString(t))}setLimit(e,t,r,n){return new ZodNumber({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:errorUtil.toString(n)}]})}_addCheck(e){return new ZodNumber({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:errorUtil.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&util$1.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}ZodNumber.create=e=>new ZodNumber({checks:[],typeName:ZodFirstPartyTypeKind.ZodNumber,coerce:(null==e?void 0:e.coerce)||!1,...processCreateParams(e)});class ZodBigInt extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==ZodParsedType.bigint){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.bigint,received:t.parsedType}),INVALID}let t;const r=new ParseStatus;for(const n of this._def.checks)"min"===n.kind?(n.inclusive?e.data<n.value:e.data<=n.value)&&(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"max"===n.kind?(n.inclusive?e.data>n.value:e.data>=n.value)&&(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),addIssueToContext(t,{code:ZodIssueCode.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):util$1.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,errorUtil.toString(t))}setLimit(e,t,r,n){return new ZodBigInt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:errorUtil.toString(n)}]})}_addCheck(e){return new ZodBigInt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:errorUtil.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ZodBigInt.create=e=>{var t;return new ZodBigInt({checks:[],typeName:ZodFirstPartyTypeKind.ZodBigInt,coerce:null!==(t=null==e?void 0:e.coerce)&&void 0!==t&&t,...processCreateParams(e)})};class ZodBoolean extends ZodType{_parse(e){if(this._def.coerce&&(e.data=Boolean(e.data)),this._getType(e)!==ZodParsedType.boolean){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.boolean,received:t.parsedType}),INVALID}return OK(e.data)}}ZodBoolean.create=e=>new ZodBoolean({typeName:ZodFirstPartyTypeKind.ZodBoolean,coerce:(null==e?void 0:e.coerce)||!1,...processCreateParams(e)});class ZodDate extends ZodType{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ZodParsedType.date){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.date,received:t.parsedType}),INVALID}if(isNaN(e.data.getTime()))return addIssueToContext(this._getOrReturnCtx(e),{code:ZodIssueCode.invalid_date}),INVALID;const t=new ParseStatus;let r;for(const n of this._def.checks)"min"===n.kind?e.data.getTime()<n.value&&(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),t.dirty()):"max"===n.kind?e.data.getTime()>n.value&&(r=this._getOrReturnCtx(e,r),addIssueToContext(r,{code:ZodIssueCode.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),t.dirty()):util$1.assertNever(n);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ZodDate({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:errorUtil.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ZodDate.create=e=>new ZodDate({checks:[],coerce:(null==e?void 0:e.coerce)||!1,typeName:ZodFirstPartyTypeKind.ZodDate,...processCreateParams(e)});class ZodSymbol extends ZodType{_parse(e){if(this._getType(e)!==ZodParsedType.symbol){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.symbol,received:t.parsedType}),INVALID}return OK(e.data)}}ZodSymbol.create=e=>new ZodSymbol({typeName:ZodFirstPartyTypeKind.ZodSymbol,...processCreateParams(e)});class ZodUndefined extends ZodType{_parse(e){if(this._getType(e)!==ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.undefined,received:t.parsedType}),INVALID}return OK(e.data)}}ZodUndefined.create=e=>new ZodUndefined({typeName:ZodFirstPartyTypeKind.ZodUndefined,...processCreateParams(e)});class ZodNull extends ZodType{_parse(e){if(this._getType(e)!==ZodParsedType.null){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.null,received:t.parsedType}),INVALID}return OK(e.data)}}ZodNull.create=e=>new ZodNull({typeName:ZodFirstPartyTypeKind.ZodNull,...processCreateParams(e)});class ZodAny extends ZodType{constructor(){super(...arguments),this._any=!0}_parse(e){return OK(e.data)}}ZodAny.create=e=>new ZodAny({typeName:ZodFirstPartyTypeKind.ZodAny,...processCreateParams(e)});class ZodUnknown extends ZodType{constructor(){super(...arguments),this._unknown=!0}_parse(e){return OK(e.data)}}ZodUnknown.create=e=>new ZodUnknown({typeName:ZodFirstPartyTypeKind.ZodUnknown,...processCreateParams(e)});class ZodNever extends ZodType{_parse(e){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.never,received:t.parsedType}),INVALID}}ZodNever.create=e=>new ZodNever({typeName:ZodFirstPartyTypeKind.ZodNever,...processCreateParams(e)});class ZodVoid extends ZodType{_parse(e){if(this._getType(e)!==ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.void,received:t.parsedType}),INVALID}return OK(e.data)}}ZodVoid.create=e=>new ZodVoid({typeName:ZodFirstPartyTypeKind.ZodVoid,...processCreateParams(e)});class ZodArray extends ZodType{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==ZodParsedType.array)return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:t.parsedType}),INVALID;if(null!==n.exactLength){const e=t.data.length>n.exactLength.value,i=t.data.length<n.exactLength.value;(e||i)&&(addIssueToContext(t,{code:e?ZodIssueCode.too_big:ZodIssueCode.too_small,minimum:i?n.exactLength.value:void 0,maximum:e?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),r.dirty())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(addIssueToContext(t,{code:ZodIssueCode.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),r.dirty()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(addIssueToContext(t,{code:ZodIssueCode.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>n.type._parseAsync(new ParseInputLazyPath(t,e,t.path,r)))).then(e=>ParseStatus.mergeArray(r,e));const i=[...t.data].map((e,r)=>n.type._parseSync(new ParseInputLazyPath(t,e,t.path,r)));return ParseStatus.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new ZodArray({...this._def,minLength:{value:e,message:errorUtil.toString(t)}})}max(e,t){return new ZodArray({...this._def,maxLength:{value:e,message:errorUtil.toString(t)}})}length(e,t){return new ZodArray({...this._def,exactLength:{value:e,message:errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}}function deepPartialify(e){if(e instanceof ZodObject){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=ZodOptional.create(deepPartialify(n))}return new ZodObject({...e._def,shape:()=>t})}return e instanceof ZodArray?new ZodArray({...e._def,type:deepPartialify(e.element)}):e instanceof ZodOptional?ZodOptional.create(deepPartialify(e.unwrap())):e instanceof ZodNullable?ZodNullable.create(deepPartialify(e.unwrap())):e instanceof ZodTuple?ZodTuple.create(e.items.map(e=>deepPartialify(e))):e}ZodArray.create=(e,t)=>new ZodArray({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ZodFirstPartyTypeKind.ZodArray,...processCreateParams(t)});class ZodObject extends ZodType{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=util$1.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==ZodParsedType.object){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:t.parsedType}),INVALID}const{status:t,ctx:r}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof ZodNever&&"strip"===this._def.unknownKeys))for(const e in r.data)i.includes(e)||a.push(e);const o=[];for(const e of i){const t=n[e],i=r.data[e];o.push({key:{status:"valid",value:e},value:t._parse(new ParseInputLazyPath(r,i,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof ZodNever){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of a)o.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)a.length>0&&(addIssueToContext(r,{code:ZodIssueCode.unrecognized_keys,keys:a}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of a){const n=r.data[t];o.push({key:{status:"valid",value:t},value:e._parse(new ParseInputLazyPath(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{const e=[];for(const t of o){const r=await t.key,n=await t.value;e.push({key:r,value:n,alwaysSet:t.alwaysSet})}return e}).then(e=>ParseStatus.mergeObjectSync(t,e)):ParseStatus.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(e){return errorUtil.errToObj,new ZodObject({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{var n,i,a,o;const s=null!==(a=null===(i=(n=this._def).errorMap)||void 0===i?void 0:i.call(n,t,r).message)&&void 0!==a?a:r.defaultError;return"unrecognized_keys"===t.code?{message:null!==(o=errorUtil.errToObj(e).message)&&void 0!==o?o:s}:{message:s}}}:{}})}strip(){return new ZodObject({...this._def,unknownKeys:"strip"})}passthrough(){return new ZodObject({...this._def,unknownKeys:"passthrough"})}extend(e){return new ZodObject({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ZodObject({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ZodFirstPartyTypeKind.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ZodObject({...this._def,catchall:e})}pick(e){const t={};return util$1.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(t[r]=this.shape[r])}),new ZodObject({...this._def,shape:()=>t})}omit(e){const t={};return util$1.objectKeys(this.shape).forEach(r=>{e[r]||(t[r]=this.shape[r])}),new ZodObject({...this._def,shape:()=>t})}deepPartial(){return deepPartialify(this)}partial(e){const t={};return util$1.objectKeys(this.shape).forEach(r=>{const n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}),new ZodObject({...this._def,shape:()=>t})}required(e){const t={};return util$1.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof ZodOptional;)e=e._def.innerType;t[r]=e}}),new ZodObject({...this._def,shape:()=>t})}keyof(){return createZodEnum(util$1.objectKeys(this.shape))}}ZodObject.create=(e,t)=>new ZodObject({shape:()=>e,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(t)}),ZodObject.strictCreate=(e,t)=>new ZodObject({shape:()=>e,unknownKeys:"strict",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(t)}),ZodObject.lazycreate=(e,t)=>new ZodObject({shape:e,unknownKeys:"strip",catchall:ZodNever.create(),typeName:ZodFirstPartyTypeKind.ZodObject,...processCreateParams(t)});class ZodUnion extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{const r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;const r=e.map(e=>new ZodError(e.ctx.common.issues));return addIssueToContext(t,{code:ZodIssueCode.invalid_union,unionErrors:r}),INVALID});{let e;const n=[];for(const i of r){const r={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const i=n.map(e=>new ZodError(e));return addIssueToContext(t,{code:ZodIssueCode.invalid_union,unionErrors:i}),INVALID}}get options(){return this._def.options}}ZodUnion.create=(e,t)=>new ZodUnion({options:e,typeName:ZodFirstPartyTypeKind.ZodUnion,...processCreateParams(t)});const getDiscriminator=e=>e instanceof ZodLazy?getDiscriminator(e.schema):e instanceof ZodEffects?getDiscriminator(e.innerType()):e instanceof ZodLiteral?[e.value]:e instanceof ZodEnum?e.options:e instanceof ZodNativeEnum?util$1.objectValues(e.enum):e instanceof ZodDefault?getDiscriminator(e._def.innerType):e instanceof ZodUndefined?[void 0]:e instanceof ZodNull?[null]:e instanceof ZodOptional?[void 0,...getDiscriminator(e.unwrap())]:e instanceof ZodNullable?[null,...getDiscriminator(e.unwrap())]:e instanceof ZodBranded||e instanceof ZodReadonly?getDiscriminator(e.unwrap()):e instanceof ZodCatch?getDiscriminator(e._def.innerType):[];class ZodDiscriminatedUnion extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==ZodParsedType.object)return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:t.parsedType}),INVALID;const r=this.discriminator,n=t.data[r],i=this.optionsMap.get(n);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(addIssueToContext(t,{code:ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){const n=new Map;for(const r of t){const t=getDiscriminator(r.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const i of t){if(n.has(i))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);n.set(i,r)}}return new ZodDiscriminatedUnion({typeName:ZodFirstPartyTypeKind.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...processCreateParams(r)})}}function mergeValues(e,t){const r=getParsedType(e),n=getParsedType(t);if(e===t)return{valid:!0,data:e};if(r===ZodParsedType.object&&n===ZodParsedType.object){const r=util$1.objectKeys(t),n=util$1.objectKeys(e).filter(e=>-1!==r.indexOf(e)),i={...e,...t};for(const r of n){const n=mergeValues(e[r],t[r]);if(!n.valid)return{valid:!1};i[r]=n.data}return{valid:!0,data:i}}if(r===ZodParsedType.array&&n===ZodParsedType.array){if(e.length!==t.length)return{valid:!1};const r=[];for(let n=0;n<e.length;n++){const i=mergeValues(e[n],t[n]);if(!i.valid)return{valid:!1};r.push(i.data)}return{valid:!0,data:r}}return r===ZodParsedType.date&&n===ZodParsedType.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class ZodIntersection extends ZodType{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=(e,n)=>{if(isAborted(e)||isAborted(n))return INVALID;const i=mergeValues(e.value,n.value);return i.valid?((isDirty(e)||isDirty(n))&&t.dirty(),{status:t.value,value:i.data}):(addIssueToContext(r,{code:ZodIssueCode.invalid_intersection_types}),INVALID)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([e,t])=>n(e,t)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ZodIntersection.create=(e,t,r)=>new ZodIntersection({left:e,right:t,typeName:ZodFirstPartyTypeKind.ZodIntersection,...processCreateParams(r)});class ZodTuple extends ZodType{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ZodParsedType.array)return addIssueToContext(r,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.array,received:r.parsedType}),INVALID;if(r.data.length<this._def.items.length)return addIssueToContext(r,{code:ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),INVALID;!this._def.rest&&r.data.length>this._def.items.length&&(addIssueToContext(r,{code:ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...r.data].map((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new ParseInputLazyPath(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(n).then(e=>ParseStatus.mergeArray(t,e)):ParseStatus.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new ZodTuple({...this._def,rest:e})}}ZodTuple.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ZodTuple({items:e,typeName:ZodFirstPartyTypeKind.ZodTuple,rest:null,...processCreateParams(t)})};class ZodRecord extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ZodParsedType.object)return addIssueToContext(r,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.object,received:r.parsedType}),INVALID;const n=[],i=this._def.keyType,a=this._def.valueType;for(const e in r.data)n.push({key:i._parse(new ParseInputLazyPath(r,e,r.path,e)),value:a._parse(new ParseInputLazyPath(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?ParseStatus.mergeObjectAsync(t,n):ParseStatus.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return new ZodRecord(t instanceof ZodType?{keyType:e,valueType:t,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(r)}:{keyType:ZodString.create(),valueType:e,typeName:ZodFirstPartyTypeKind.ZodRecord,...processCreateParams(t)})}}class ZodMap extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ZodParsedType.map)return addIssueToContext(r,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.map,received:r.parsedType}),INVALID;const n=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([e,t],a)=>({key:n._parse(new ParseInputLazyPath(r,e,r.path,[a,"key"])),value:i._parse(new ParseInputLazyPath(r,t,r.path,[a,"value"]))}));if(r.common.async){const e=new Map;return Promise.resolve().then(async()=>{for(const r of a){const n=await r.key,i=await r.value;if("aborted"===n.status||"aborted"===i.status)return INVALID;"dirty"!==n.status&&"dirty"!==i.status||t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}})}{const e=new Map;for(const r of a){const n=r.key,i=r.value;if("aborted"===n.status||"aborted"===i.status)return INVALID;"dirty"!==n.status&&"dirty"!==i.status||t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}}}}ZodMap.create=(e,t,r)=>new ZodMap({valueType:t,keyType:e,typeName:ZodFirstPartyTypeKind.ZodMap,...processCreateParams(r)});class ZodSet extends ZodType{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==ZodParsedType.set)return addIssueToContext(r,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.set,received:r.parsedType}),INVALID;const n=this._def;null!==n.minSize&&r.data.size<n.minSize.value&&(addIssueToContext(r,{code:ZodIssueCode.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),t.dirty()),null!==n.maxSize&&r.data.size>n.maxSize.value&&(addIssueToContext(r,{code:ZodIssueCode.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());const i=this._def.valueType;function a(e){const r=new Set;for(const n of e){if("aborted"===n.status)return INVALID;"dirty"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}const o=[...r.data.values()].map((e,t)=>i._parse(new ParseInputLazyPath(r,e,r.path,t)));return r.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(e,t){return new ZodSet({...this._def,minSize:{value:e,message:errorUtil.toString(t)}})}max(e,t){return new ZodSet({...this._def,maxSize:{value:e,message:errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ZodSet.create=(e,t)=>new ZodSet({valueType:e,minSize:null,maxSize:null,typeName:ZodFirstPartyTypeKind.ZodSet,...processCreateParams(t)});class ZodFunction extends ZodType{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==ZodParsedType.function)return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.function,received:t.parsedType}),INVALID;function r(e,r){return makeIssue({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,getErrorMap(),errorMap].filter(e=>!!e),issueData:{code:ZodIssueCode.invalid_arguments,argumentsError:r}})}function n(e,r){return makeIssue({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,getErrorMap(),errorMap].filter(e=>!!e),issueData:{code:ZodIssueCode.invalid_return_type,returnTypeError:r}})}const i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof ZodPromise){const e=this;return OK(async function(...t){const o=new ZodError([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(r(t,e)),o}),u=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(u,i).catch(e=>{throw o.addIssue(n(u,e)),o})})}{const e=this;return OK(function(...t){const o=e._def.args.safeParse(t,i);if(!o.success)throw new ZodError([r(t,o.error)]);const s=Reflect.apply(a,this,o.data),u=e._def.returns.safeParse(s,i);if(!u.success)throw new ZodError([n(s,u.error)]);return u.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ZodFunction({...this._def,args:ZodTuple.create(e).rest(ZodUnknown.create())})}returns(e){return new ZodFunction({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new ZodFunction({args:e||ZodTuple.create([]).rest(ZodUnknown.create()),returns:t||ZodUnknown.create(),typeName:ZodFirstPartyTypeKind.ZodFunction,...processCreateParams(r)})}}class ZodLazy extends ZodType{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ZodLazy.create=(e,t)=>new ZodLazy({getter:e,typeName:ZodFirstPartyTypeKind.ZodLazy,...processCreateParams(t)});class ZodLiteral extends ZodType{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{received:t.data,code:ZodIssueCode.invalid_literal,expected:this._def.value}),INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}}function createZodEnum(e,t){return new ZodEnum({values:e,typeName:ZodFirstPartyTypeKind.ZodEnum,...processCreateParams(t)})}ZodLiteral.create=(e,t)=>new ZodLiteral({value:e,typeName:ZodFirstPartyTypeKind.ZodLiteral,...processCreateParams(t)});class ZodEnum extends ZodType{constructor(){super(...arguments),_ZodEnum_cache.set(this,void 0)}_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),r=this._def.values;return addIssueToContext(t,{expected:util$1.joinValues(r),received:t.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(__classPrivateFieldGet(this,_ZodEnum_cache)||__classPrivateFieldSet(this,_ZodEnum_cache,new Set(this._def.values)),!__classPrivateFieldGet(this,_ZodEnum_cache).has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return addIssueToContext(t,{received:t.data,code:ZodIssueCode.invalid_enum_value,options:r}),INVALID}return OK(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ZodEnum.create(e,{...this._def,...t})}exclude(e,t=this._def){return ZodEnum.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}_ZodEnum_cache=new WeakMap,ZodEnum.create=createZodEnum;class ZodNativeEnum extends ZodType{constructor(){super(...arguments),_ZodNativeEnum_cache.set(this,void 0)}_parse(e){const t=util$1.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==ZodParsedType.string&&r.parsedType!==ZodParsedType.number){const e=util$1.objectValues(t);return addIssueToContext(r,{expected:util$1.joinValues(e),received:r.parsedType,code:ZodIssueCode.invalid_type}),INVALID}if(__classPrivateFieldGet(this,_ZodNativeEnum_cache)||__classPrivateFieldSet(this,_ZodNativeEnum_cache,new Set(util$1.getValidEnumValues(this._def.values))),!__classPrivateFieldGet(this,_ZodNativeEnum_cache).has(e.data)){const e=util$1.objectValues(t);return addIssueToContext(r,{received:r.data,code:ZodIssueCode.invalid_enum_value,options:e}),INVALID}return OK(e.data)}get enum(){return this._def.values}}_ZodNativeEnum_cache=new WeakMap,ZodNativeEnum.create=(e,t)=>new ZodNativeEnum({values:e,typeName:ZodFirstPartyTypeKind.ZodNativeEnum,...processCreateParams(t)});class ZodPromise extends ZodType{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==ZodParsedType.promise&&!1===t.common.async)return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.promise,received:t.parsedType}),INVALID;const r=t.parsedType===ZodParsedType.promise?t.data:Promise.resolve(t.data);return OK(r.then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}ZodPromise.create=(e,t)=>new ZodPromise({type:e,typeName:ZodFirstPartyTypeKind.ZodPromise,...processCreateParams(t)});class ZodEffects extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ZodFirstPartyTypeKind.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,i={addIssue:e=>{addIssueToContext(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),"preprocess"===n.type){const e=n.transform(r.data,i);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return INVALID;const n=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===n.status?INVALID:"dirty"===n.status||"dirty"===t.value?DIRTY(n.value):n});{if("aborted"===t.value)return INVALID;const n=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===n.status?INVALID:"dirty"===n.status||"dirty"===t.value?DIRTY(n.value):n}}if("refinement"===n.type){const e=e=>{const t=n.refinement(e,i);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===r.common.async){const n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?INVALID:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?INVALID:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))))}if("transform"===n.type){if(!1===r.common.async){const e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!isValid(e))return e;const a=n.transform(e.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>isValid(e)?Promise.resolve(n.transform(e.value,i)).then(e=>({status:t.value,value:e})):e)}util$1.assertNever(n)}}ZodEffects.create=(e,t,r)=>new ZodEffects({schema:e,typeName:ZodFirstPartyTypeKind.ZodEffects,effect:t,...processCreateParams(r)}),ZodEffects.createWithPreprocess=(e,t,r)=>new ZodEffects({schema:t,effect:{type:"preprocess",transform:e},typeName:ZodFirstPartyTypeKind.ZodEffects,...processCreateParams(r)});class ZodOptional extends ZodType{_parse(e){return this._getType(e)===ZodParsedType.undefined?OK(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ZodOptional.create=(e,t)=>new ZodOptional({innerType:e,typeName:ZodFirstPartyTypeKind.ZodOptional,...processCreateParams(t)});class ZodNullable extends ZodType{_parse(e){return this._getType(e)===ZodParsedType.null?OK(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ZodNullable.create=(e,t)=>new ZodNullable({innerType:e,typeName:ZodFirstPartyTypeKind.ZodNullable,...processCreateParams(t)});class ZodDefault extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===ZodParsedType.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ZodDefault.create=(e,t)=>new ZodDefault({innerType:e,typeName:ZodFirstPartyTypeKind.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...processCreateParams(t)});class ZodCatch extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return isAsync(n)?n.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new ZodError(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new ZodError(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ZodCatch.create=(e,t)=>new ZodCatch({innerType:e,typeName:ZodFirstPartyTypeKind.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...processCreateParams(t)});class ZodNaN extends ZodType{_parse(e){if(this._getType(e)!==ZodParsedType.nan){const t=this._getOrReturnCtx(e);return addIssueToContext(t,{code:ZodIssueCode.invalid_type,expected:ZodParsedType.nan,received:t.parsedType}),INVALID}return{status:"valid",value:e.data}}}ZodNaN.create=e=>new ZodNaN({typeName:ZodFirstPartyTypeKind.ZodNaN,...processCreateParams(e)});const BRAND=Symbol("zod_brand");class ZodBranded extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class ZodPipeline extends ZodType{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?INVALID:"dirty"===e.status?(t.dirty(),DIRTY(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{const e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?INVALID:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new ZodPipeline({in:e,out:t,typeName:ZodFirstPartyTypeKind.ZodPipeline})}}class ZodReadonly extends ZodType{_parse(e){const t=this._def.innerType._parse(e),r=e=>(isValid(e)&&(e.value=Object.freeze(e.value)),e);return isAsync(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}function custom(e,t={},r){return e?ZodAny.create().superRefine((n,i)=>{var a,o;if(!e(n)){const e="function"==typeof t?t(n):"string"==typeof t?{message:t}:t,s=null===(o=null!==(a=e.fatal)&&void 0!==a?a:r)||void 0===o||o,u="string"==typeof e?{message:e}:e;i.addIssue({code:"custom",...u,fatal:s})}}):ZodAny.create()}ZodReadonly.create=(e,t)=>new ZodReadonly({innerType:e,typeName:ZodFirstPartyTypeKind.ZodReadonly,...processCreateParams(t)});const late={object:ZodObject.lazycreate};var ZodFirstPartyTypeKind;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(ZodFirstPartyTypeKind||(ZodFirstPartyTypeKind={}));const instanceOfType=(e,t={message:`Input not instance of ${e.name}`})=>custom(t=>t instanceof e,t),stringType=ZodString.create,numberType=ZodNumber.create,nanType=ZodNaN.create,bigIntType=ZodBigInt.create,booleanType=ZodBoolean.create,dateType=ZodDate.create,symbolType=ZodSymbol.create,undefinedType=ZodUndefined.create,nullType=ZodNull.create,anyType=ZodAny.create,unknownType=ZodUnknown.create,neverType=ZodNever.create,voidType=ZodVoid.create,arrayType=ZodArray.create,objectType=ZodObject.create,strictObjectType=ZodObject.strictCreate,unionType=ZodUnion.create,discriminatedUnionType=ZodDiscriminatedUnion.create,intersectionType=ZodIntersection.create,tupleType=ZodTuple.create,recordType=ZodRecord.create,mapType=ZodMap.create,setType=ZodSet.create,functionType=ZodFunction.create,lazyType=ZodLazy.create,literalType=ZodLiteral.create,enumType=ZodEnum.create,nativeEnumType=ZodNativeEnum.create,promiseType=ZodPromise.create,effectsType=ZodEffects.create,optionalType=ZodOptional.create,nullableType=ZodNullable.create,preprocessType=ZodEffects.createWithPreprocess,pipelineType=ZodPipeline.create,ostring=()=>stringType().optional(),onumber=()=>numberType().optional(),oboolean=()=>booleanType().optional(),coerce={string:e=>ZodString.create({...e,coerce:!0}),number:e=>ZodNumber.create({...e,coerce:!0}),boolean:e=>ZodBoolean.create({...e,coerce:!0}),bigint:e=>ZodBigInt.create({...e,coerce:!0}),date:e=>ZodDate.create({...e,coerce:!0})},NEVER=INVALID;var z=Object.freeze({__proto__:null,defaultErrorMap:errorMap,setErrorMap,getErrorMap,makeIssue,EMPTY_PATH,addIssueToContext,ParseStatus,INVALID,DIRTY,OK,isAborted,isDirty,isValid,isAsync,get util(){return util$1},get objectUtil(){return objectUtil},ZodParsedType,getParsedType,ZodType,datetimeRegex,ZodString,ZodNumber,ZodBigInt,ZodBoolean,ZodDate,ZodSymbol,ZodUndefined,ZodNull,ZodAny,ZodUnknown,ZodNever,ZodVoid,ZodArray,ZodObject,ZodUnion,ZodDiscriminatedUnion,ZodIntersection,ZodTuple,ZodRecord,ZodMap,ZodSet,ZodFunction,ZodLazy,ZodLiteral,ZodEnum,ZodNativeEnum,ZodPromise,ZodEffects,ZodTransformer:ZodEffects,ZodOptional,ZodNullable,ZodDefault,ZodCatch,ZodNaN,BRAND,ZodBranded,ZodPipeline,ZodReadonly,custom,Schema:ZodType,ZodSchema:ZodType,late,get ZodFirstPartyTypeKind(){return ZodFirstPartyTypeKind},coerce,any:anyType,array:arrayType,bigint:bigIntType,boolean:booleanType,date:dateType,discriminatedUnion:discriminatedUnionType,effect:effectsType,enum:enumType,function:functionType,instanceof:instanceOfType,intersection:intersectionType,lazy:lazyType,literal:literalType,map:mapType,nan:nanType,nativeEnum:nativeEnumType,never:neverType,null:nullType,nullable:nullableType,number:numberType,object:objectType,oboolean,onumber,optional:optionalType,ostring,pipeline:pipelineType,preprocess:preprocessType,promise:promiseType,record:recordType,set:setType,strictObject:strictObjectType,string:stringType,symbol:symbolType,transformer:effectsType,tuple:tupleType,undefined:undefinedType,union:unionType,unknown:unknownType,void:voidType,NEVER,ZodIssueCode,quotelessJson,ZodError}),Edge,Edge2;Edge2=Edge||(Edge={}),Edge2[Edge2.EXTEND=1]="EXTEND",Edge2[Edge2.WRAP=2]="WRAP",Edge2[Edge2.CROP=3]="CROP";const JimpClassSchema=z.object({bitmap:z.object({data:z.union([z.instanceof(Buffer),z.instanceof(Uint8Array)]),width:z.number(),height:z.number()})}),BlitOptionsSchemaComplex=z.object({src:JimpClassSchema,x:z.number().optional(),y:z.number().optional(),srcX:z.number().optional(),srcY:z.number().optional(),srcW:z.number().optional(),srcH:z.number().optional()}),BlitOptionsSchema=z.union([JimpClassSchema,BlitOptionsSchemaComplex]),methods$h={blit(e,t){const r=BlitOptionsSchema.parse(t);let{src:n,x:i=0,y:a=0,srcX:o=0,srcY:s=0,srcW:u=n.bitmap.width,srcH:l=n.bitmap.height}="bitmap"in r?{src:r}:r;if(!("bitmap"in n))throw new Error("The source must be a Jimp image");if("number"!=typeof i||"number"!=typeof a)throw new Error("x and y must be numbers");i=Math.round(i),a=Math.round(a),o=Math.round(o),s=Math.round(s),u=Math.round(u),l=Math.round(l);const c=e.bitmap.width,f=e.bitmap.height;return scan(n,o,s,u,l,function(t,r,u){const l=i+t-o,h=a+r-s;if(l>=0&&h>=0&&c-l>0&&f-h>0){const t=e.getPixelIndex(l,h),r={r:n.bitmap.data[u]||0,g:n.bitmap.data[u+1]||0,b:n.bitmap.data[u+2]||0,a:n.bitmap.data[u+3]||0},i={r:e.bitmap.data[t]||0,g:e.bitmap.data[t+1]||0,b:e.bitmap.data[t+2]||0,a:e.bitmap.data[t+3]||0};e.bitmap.data[t]=(r.a*(r.r-i.r)-i.r+255>>8)+i.r,e.bitmap.data[t+1]=(r.a*(r.g-i.g)-i.g+255>>8)+i.g,e.bitmap.data[t+2]=(r.a*(r.b-i.b)-i.b+255>>8)+i.b,e.bitmap.data[t+3]=limit255(i.a+r.a)}}),e}},mulTable=[1,57,41,21,203,34,97,73,227,91,149,62,105,45,39,137,241,107,3,173,39,71,65,238,219,101,187,87,81,151,141,133,249,117,221,209,197,187,177,169,5,153,73,139,133,127,243,233,223,107,103,99,191,23,177,171,165,159,77,149,9,139,135,131,253,245,119,231,224,109,211,103,25,195,189,23,45,175,171,83,81,79,155,151,147,9,141,137,67,131,129,251,123,30,235,115,113,221,217,53,13,51,50,49,193,189,185,91,179,175,43,169,83,163,5,79,155,19,75,147,145,143,35,69,17,67,33,65,255,251,247,243,239,59,29,229,113,111,219,27,213,105,207,51,201,199,49,193,191,47,93,183,181,179,11,87,43,85,167,165,163,161,159,157,155,77,19,75,37,73,145,143,141,35,138,137,135,67,33,131,129,255,63,250,247,61,121,239,237,117,29,229,227,225,111,55,109,216,213,211,209,207,205,203,201,199,197,195,193,48,190,47,93,185,183,181,179,178,176,175,173,171,85,21,167,165,41,163,161,5,79,157,78,154,153,19,75,149,74,147,73,144,143,71,141,140,139,137,17,135,134,133,66,131,65,129,1],shgTable=[0,9,10,10,14,12,14,14,16,15,16,15,16,15,15,17,18,17,12,18,16,17,17,19,19,18,19,18,18,19,19,19,20,19,20,20,20,20,20,20,15,20,19,20,20,20,21,21,21,20,20,20,21,18,21,21,21,21,20,21,17,21,21,21,22,22,21,22,22,21,22,21,19,22,22,19,20,22,22,21,21,21,22,22,22,18,22,22,21,22,22,23,22,20,23,22,22,23,23,21,19,21,21,21,23,23,23,22,23,23,21,23,22,23,18,22,23,20,22,23,23,23,21,22,20,22,21,22,24,24,24,24,24,22,21,24,23,23,24,21,24,23,24,22,24,24,22,24,24,22,23,24,24,24,20,23,22,23,24,24,24,24,24,24,24,23,21,23,22,23,24,24,24,22,24,24,24,23,22,24,24,25,23,25,25,23,24,25,25,24,22,25,25,25,24,23,24,25,25,25,25,25,25,25,25,25,25,25,25,23,25,23,24,25,25,25,25,25,25,25,25,25,24,22,25,25,23,25,25,20,24,25,24,25,25,22,24,25,24,25,24,25,25,24,25,25,25,25,22,25,25,25,24,25,24,25,18],methods$g={blur(e,t){if("number"!=typeof t)throw new Error("r must be a number");if(t<1)throw new Error("r must be greater than 0");let r,n,i,a,o,s,u,l,c,f,h,d,p;const m=e.bitmap.width-1,g=e.bitmap.height-1,b=t+1,y=mulTable[t],_=shgTable[t],v=[],w=[],x=[],k=[],B=[],E=[];let S=2;for(;S-- >0;){for(d=0,p=0,s=0;s<e.bitmap.height;s++){for(r=e.bitmap.data[p]*b,n=e.bitmap.data[p+1]*b,i=e.bitmap.data[p+2]*b,a=e.bitmap.data[p+3]*b,u=1;u<=t;u++)l=p+((u>m?m:u)<<2),r+=e.bitmap.data[l++],n+=e.bitmap.data[l++],i+=e.bitmap.data[l++],a+=e.bitmap.data[l];for(o=0;o<e.bitmap.width;o++)v[d]=r,w[d]=n,x[d]=i,k[d]=a,0===s&&(B[o]=((l=o+b)<m?l:m)<<2,E[o]=(l=o-t)>0?l<<2:0),c=p+B[o],f=p+E[o],r+=e.bitmap.data[c++]-e.bitmap.data[f++],n+=e.bitmap.data[c++]-e.bitmap.data[f++],i+=e.bitmap.data[c++]-e.bitmap.data[f++],a+=e.bitmap.data[c]-e.bitmap.data[f++],d++;p+=e.bitmap.width<<2}for(o=0;o<e.bitmap.width;o++){for(h=o,r=v[h]*b,n=w[h]*b,i=x[h]*b,a=k[h]*b,u=1;u<=t;u++)h+=u>g?0:e.bitmap.width,r+=v[h],n+=w[h],i+=x[h],a+=k[h];for(d=o<<2,s=0;s<e.bitmap.height;s++)e.bitmap.data[d]=limit255(r*y>>>_),e.bitmap.data[d+1]=limit255(n*y>>>_),e.bitmap.data[d+2]=limit255(i*y>>>_),e.bitmap.data[d+3]=limit255(a*y>>>_),0===o&&(B[s]=((l=s+b)<g?l:g)*e.bitmap.width,E[s]=(l=s-t)>0?l*e.bitmap.width:0),c=o+B[s],f=o+E[s],r+=v[c]-v[f],n+=w[c]-w[f],i+=x[c]-x[f],a+=k[c]-k[f],d+=e.bitmap.width<<2}}return e},gaussian(e,t){if("number"!=typeof t)throw new Error("r must be a number");if(t<1)throw new Error("r must be greater than 0");const r=Math.ceil(2.57*t),n=2*r+1,i=t*t*2,a=i*Math.PI,o=[];for(let e=0;e<n;e++){const t=[];for(let o=0;o<n;o++){const n=(o-r)**2+(e-r)**2;t[o]=Math.exp(-n/i)/a}o.push(t)}for(let t=0;t<e.bitmap.height;t++)for(let i=0;i<e.bitmap.width;i++){let a=0,s=0,u=0,l=0,c=0;for(let f=0;f<n;f++){for(let h=0;h<n;h++){const n=Math.min(e.bitmap.width-1,Math.max(0,h+i-r)),d=Math.min(e.bitmap.height-1,Math.max(0,f+t-r)),p=o[f][h],m=d*e.bitmap.width+n<<2;a+=e.bitmap.data[m]*p,s+=e.bitmap.data[m+1]*p,u+=e.bitmap.data[m+2]*p,l+=e.bitmap.data[m+3]*p,c+=p}const h=t*e.bitmap.width+i<<2;e.bitmap.data[h]=Math.round(a/c),e.bitmap.data[h+1]=Math.round(s/c),e.bitmap.data[h+2]=Math.round(u/c),e.bitmap.data[h+3]=Math.round(l/c)}}return e}},CircleOptionsSchema=z.object({x:z.number().optional(),y:z.number().optional(),radius:z.number().min(0).optional()}),methods$f={circle(e,t={}){const r=CircleOptionsSchema.parse(t),n=r.radius||(e.bitmap.width>e.bitmap.height?e.bitmap.height:e.bitmap.width)/2,i="number"==typeof r.x?r.x:e.bitmap.width/2,a="number"==typeof r.y?r.y:e.bitmap.height/2;return e.scan((t,r,o)=>{const s=Math.sqrt(Math.pow(t-i,2)+Math.pow(r-a,2));n-s<=0?e.bitmap.data[o+3]=0:n-s<1&&(e.bitmap.data[o+3]=255*(n-s))}),e}},ConvolutionMatrixSchema=z.array(z.number()).min(1).array(),ConvolutionComplexOptionsSchema=z.object({kernel:ConvolutionMatrixSchema,edgeHandling:z.nativeEnum(Edge).optional()}),ConvolutionOptionsSchema=z.union([ConvolutionMatrixSchema,ConvolutionComplexOptionsSchema]),ConvoluteComplexOptionsSchema=z.object({kernel:ConvolutionMatrixSchema,x:z.number().optional(),y:z.number().optional(),w:z.number().optional(),h:z.number().optional()}),ConvoluteOptionsSchema=z.union([ConvolutionMatrixSchema,ConvoluteComplexOptionsSchema]),PixelateSize=z.number().min(1).max(1/0),PixelateComplexOptionsSchema=z.object({size:PixelateSize,x:z.number().optional(),y:z.number().optional(),w:z.number().optional(),h:z.number().optional()}),PixelateOptionsSchema=z.union([PixelateSize,PixelateComplexOptionsSchema]);function applyKernel(e,t,r,n){const i=[0,0,0,0],a=(t.length-1)/2;for(let o=0;o<t.length;o+=1)for(let s=0;s<t[o].length;s+=1){const u=e.getPixelIndex(r+o-a,n+s-a);i[0]+=e.bitmap.data[u]*t[o][s],i[1]+=e.bitmap.data[u+1]*t[o][s],i[2]+=e.bitmap.data[u+2]*t[o][s],i[3]+=e.bitmap.data[u+3]*t[o][s]}return i}function mix(e,t,r=50){return{r:(t.r-e.r)*(r/100)+e.r,g:(t.g-e.g)*(r/100)+e.g,b:(t.b-e.b)*(r/100)+e.b}}const HueActionSchema=z.object({apply:z.literal("hue"),params:z.tuple([z.number().min(-360).max(360)])}),SpinActionSchema=z.object({apply:z.literal("spin"),params:z.tuple([z.number().min(-360).max(360)])}),LightenActionSchema=z.object({apply:z.literal("lighten"),params:z.tuple([z.number().min(0).max(100)]).optional()}),RGBColorSchema=z.object({r:z.number().min(0).max(255),g:z.number().min(0).max(255),b:z.number().min(0).max(255)}),MixActionSchema=z.object({apply:z.literal("mix"),params:z.union([z.tuple([RGBColorSchema]),z.tuple([RGBColorSchema,z.number().min(0).max(100)])])}),TintActionSchema=z.object({apply:z.literal("tint"),params:z.tuple([z.number().min(0).max(100)]).optional()}),ShadeActionSchema=z.object({apply:z.literal("shade"),params:z.tuple([z.number().min(0).max(100)]).optional()}),XorActionSchema=z.object({apply:z.literal("xor"),params:z.tuple([RGBColorSchema])}),RedActionSchema=z.object({apply:z.literal("red"),params:z.tuple([z.number().min(-255).max(255)])}),GreenActionSchema=z.object({apply:z.literal("green"),params:z.tuple([z.number().min(-255).max(255)])}),BlueActionSchema=z.object({apply:z.literal("blue"),params:z.tuple([z.number().min(-255).max(255)])}),BrightenActionSchema=z.object({apply:z.literal("brighten"),params:z.tuple([z.number().min(0).max(100)]).optional()}),DarkenActionSchema=z.object({apply:z.literal("darken"),params:z.tuple([z.number().min(0).max(100)]).optional()}),DesaturateActionSchema=z.object({apply:z.literal("desaturate"),params:z.tuple([z.number().min(0).max(100)]).optional()}),SaturateActionSchema=z.object({apply:z.literal("saturate"),params:z.tuple([z.number().min(0).max(100)]).optional()}),GrayscaleActionSchema=z.object({apply:z.literal("greyscale"),params:z.tuple([]).optional()}),ColorActionNameSchema=z.union([HueActionSchema,SpinActionSchema,LightenActionSchema,MixActionSchema,TintActionSchema,ShadeActionSchema,XorActionSchema,RedActionSchema,GreenActionSchema,BlueActionSchema,BrightenActionSchema,DarkenActionSchema,DesaturateActionSchema,SaturateActionSchema,GrayscaleActionSchema]);function histogram(e){const t={r:new Array(256).fill(0),g:new Array(256).fill(0),b:new Array(256).fill(0)};return e.scan((r,n,i)=>{t.r[e.bitmap.data[i+0]]++,t.g[e.bitmap.data[i+1]]++,t.b[e.bitmap.data[i+2]]++}),t}const normalizeValue=function(e,t,r){return 255*(e-t)/(r-t)},getBounds=function(e){return[e.findIndex(e=>e>0),255-e.slice().reverse().findIndex(e=>e>0)]},methods$e={normalize(e){const t=histogram(e),r={r:getBounds(t.r),g:getBounds(t.g),b:getBounds(t.b)};return e.scan((t,n,i)=>{const a=e.bitmap.data[i+0],o=e.bitmap.data[i+1],s=e.bitmap.data[i+2];e.bitmap.data[i+0]=normalizeValue(a,r.r[0],r.r[1]),e.bitmap.data[i+1]=normalizeValue(o,r.g[0],r.g[1]),e.bitmap.data[i+2]=normalizeValue(s,r.b[0],r.b[1])}),e},invert:e=>(e.scan((t,r,n)=>{e.bitmap.data[n]=255-e.bitmap.data[n],e.bitmap.data[n+1]=255-e.bitmap.data[n+1],e.bitmap.data[n+2]=255-e.bitmap.data[n+2]}),e),brightness(e,t){if("number"!=typeof t)throw new Error("val must be numbers");return e.scan((r,n,i)=>{e.bitmap.data[i]=limit255(e.bitmap.data[i]*t),e.bitmap.data[i+1]=limit255(e.bitmap.data[i+1]*t),e.bitmap.data[i+2]=limit255(e.bitmap.data[i+2]*t)}),e},contrast(e,t){if("number"!=typeof t)throw new Error("val must be numbers");if(t<-1||t>1)throw new Error("val must be a number between -1 and +1");const r=(t+1)/(1-t);function n(e){return(e=Math.floor(r*(e-127)+127))<0?0:e>255?255:e}return e.scan((t,r,i)=>{e.bitmap.data[i]=n(e.bitmap.data[i]),e.bitmap.data[i+1]=n(e.bitmap.data[i+1]),e.bitmap.data[i+2]=n(e.bitmap.data[i+2])}),e},posterize(e,t){if("number"!=typeof t)throw new Error("n must be numbers");return t<2&&(t=2),e.scan((r,n,i)=>{const a=e.bitmap.data[i],o=e.bitmap.data[i+1],s=e.bitmap.data[i+2];e.bitmap.data[i]=Math.floor(a/255*(t-1))/(t-1)*255,e.bitmap.data[i+1]=Math.floor(o/255*(t-1))/(t-1)*255,e.bitmap.data[i+2]=Math.floor(s/255*(t-1))/(t-1)*255}),e},greyscale:e=>(e.scan((t,r,n)=>{const i=.2126*e.bitmap.data[n]+.7152*e.bitmap.data[n+1]+.0722*e.bitmap.data[n+2];e.bitmap.data[n]=i,e.bitmap.data[n+1]=i,e.bitmap.data[n+2]=i}),e),opacity(e,t){if("number"!=typeof t)throw new Error("f must be a number");if(t<0||t>1)throw new Error("f must be a number from 0 to 1");return e.scan((r,n,i)=>{const a=e.bitmap.data[i+3]*t;e.bitmap.data[i+3]=a}),e},sepia:e=>(e.scan((t,r,n)=>{let i=e.bitmap.data[n],a=e.bitmap.data[n+1],o=e.bitmap.data[n+2];i=.393*i+.769*a+.189*o,a=.349*i+.686*a+.168*o,o=.272*i+.534*a+.131*o,e.bitmap.data[n]=i<255?i:255,e.bitmap.data[n+1]=a<255?a:255,e.bitmap.data[n+2]=o<255?o:255}),e),fade(e,t){if("number"!=typeof t)throw new Error("f must be a number");if(t<0||t>1)throw new Error("f must be a number from 0 to 1");return this.opacity(e,1-t)},convolution(e,t){const r=ConvolutionOptionsSchema.parse(t),{kernel:n,edgeHandling:i=Edge.EXTEND}="kernel"in r?r:{kernel:r,edgeHandling:void 0};if(!n[0])throw new Error("kernel must be a matrix");const a=Buffer.from(e.bitmap.data),o=n.length,s=n[0].length,u=Math.floor(o/2),l=Math.floor(s/2),c=-u,f=-l;let h,d,p,m,g,b,y,_,v,w;return e.scan((t,r,o)=>{m=0,p=0,d=0;for(let a=c;a<=u;a++)for(let o=f;o<=l;o++)_=t+o,v=r+a,h=n[a+u][o+l],w=e.getPixelIndex(_,v,i),-1===w?(y=0,b=0,g=0):(g=e.bitmap.data[w+0],b=e.bitmap.data[w+1],y=e.bitmap.data[w+2]),d+=h*g,p+=h*b,m+=h*y;d<0&&(d=0),p<0&&(p=0),m<0&&(m=0),d>255&&(d=255),p>255&&(p=255),m>255&&(m=255),a[o+0]=d,a[o+1]=p,a[o+2]=m}),e.bitmap.data=a,e},opaque:e=>(e.scan((t,r,n)=>{e.bitmap.data[n+3]=255}),e),pixelate(e,t){const r=PixelateOptionsSchema.parse(t),{size:n,x:i=0,y:a=0,w:o=e.bitmap.width-i,h:s=e.bitmap.height-a}="number"==typeof r?{size:r}:r,u=[[1/16,2/16,1/16],[2/16,.25,2/16],[1/16,2/16,1/16]],l=clone(e);return scan(l,i,a,o,s,(t,r,i)=>{t=n*Math.floor(t/n),r=n*Math.floor(r/n);const a=applyKernel(l,u,t,r);e.bitmap.data[i]=a[0],e.bitmap.data[i+1]=a[1],e.bitmap.data[i+2]=a[2],e.bitmap.data[i+3]=a[3]}),e},convolute(e,t){const r=ConvoluteOptionsSchema.parse(t),{kernel:n,x:i=0,y:a=0,w:o=e.bitmap.width-i,h:s=e.bitmap.height-a}="kernel"in r?r:{kernel:r},u=clone(e);return scan(u,i,a,o,s,(t,r,i)=>{const a=applyKernel(u,n,t,r);e.bitmap.data[i]=limit255(a[0]),e.bitmap.data[i+1]=limit255(a[1]),e.bitmap.data[i+2]=limit255(a[2]),e.bitmap.data[i+3]=limit255(a[3])}),e},color(e,t){if(!t||!Array.isArray(t))throw new Error("actions must be an array");return t.forEach(e=>ColorActionNameSchema.parse(e)),t=t.map(e=>("xor"!==e.apply&&"mix"!==e.apply||(e.params[0]=tinycolor(e.params[0]).toRgb()),e)),e.scan((r,n,i)=>{let a={r:e.bitmap.data[i],g:e.bitmap.data[i+1],b:e.bitmap.data[i+2]};const o=(e,t)=>limit255(a[e]+t);t.forEach(e=>{if("mix"===e.apply)a=mix(a,e.params[0],e.params[1]);else if("tint"===e.apply)a=mix(a,{r:255,g:255,b:255},e.params?.[0]);else if("shade"===e.apply)a=mix(a,{r:0,g:0,b:0},e.params?.[0]);else if("xor"===e.apply)a={r:a.r^e.params[0].r,g:a.g^e.params[0].g,b:a.b^e.params[0].b};else if("red"===e.apply)a.r=o("r",e.params[0]);else if("green"===e.apply)a.g=o("g",e.params[0]);else if("blue"===e.apply)a.b=o("b",e.params[0]);else{"hue"===e.apply&&(e.apply="spin");const t=tinycolor(a),r=t[e.apply].bind(t);if(!r)throw new Error("action "+e.apply+" not supported");a=r(...e.params||[]).toRgb()}}),e.bitmap.data[i]=a.r,e.bitmap.data[i+1]=a.g,e.bitmap.data[i+2]=a.b}),e}};var lib$1={},ieee754={read:function(e,t,r,n,i){var a,o,s=8*i-n-1,u=(1<<s)-1,l=u>>1,c=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,a=d&(1<<-c)-1,d>>=-c,c+=s;c>0;a=256*a+e[t+f],f+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+e[t+f],f+=h,c-=8);if(0===a)a=1-l;else{if(a===u)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=l}return(d?-1:1)*o*Math.pow(2,a-n)},write:function(e,t,r,n,i,a){var o,s,u,l=8*a-i-1,c=(1<<l)-1,f=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:a-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(o++,u/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*u-1)*Math.pow(2,i),o+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<<i|s,l+=i;l>0;e[r+d]=255&o,d+=p,o/=256,l-=8);e[r+d-p]|=128*m}};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AnsiStringType=e.StringType=e.BufferType=e.Uint8ArrayType=e.IgnoreType=e.Float80_LE=e.Float80_BE=e.Float64_LE=e.Float64_BE=e.Float32_LE=e.Float32_BE=e.Float16_LE=e.Float16_BE=e.INT64_BE=e.UINT64_BE=e.INT64_LE=e.UINT64_LE=e.INT32_LE=e.INT32_BE=e.INT24_BE=e.INT24_LE=e.INT16_LE=e.INT16_BE=e.INT8=e.UINT32_BE=e.UINT32_LE=e.UINT24_BE=e.UINT24_LE=e.UINT16_BE=e.UINT16_LE=e.UINT8=void 0;const t=ieee754;function r(e){return new DataView(e.buffer,e.byteOffset)}e.UINT8={len:1,get:(e,t)=>r(e).getUint8(t),put:(e,t,n)=>(r(e).setUint8(t,n),t+1)},e.UINT16_LE={len:2,get:(e,t)=>r(e).getUint16(t,!0),put:(e,t,n)=>(r(e).setUint16(t,n,!0),t+2)},e.UINT16_BE={len:2,get:(e,t)=>r(e).getUint16(t),put:(e,t,n)=>(r(e).setUint16(t,n),t+2)},e.UINT24_LE={len:3,get(e,t){const n=r(e);return n.getUint8(t)+(n.getUint16(t+1,!0)<<8)},put(e,t,n){const i=r(e);return i.setUint8(t,255&n),i.setUint16(t+1,n>>8,!0),t+3}},e.UINT24_BE={len:3,get(e,t){const n=r(e);return(n.getUint16(t)<<8)+n.getUint8(t+2)},put(e,t,n){const i=r(e);return i.setUint16(t,n>>8),i.setUint8(t+2,255&n),t+3}},e.UINT32_LE={len:4,get:(e,t)=>r(e).getUint32(t,!0),put:(e,t,n)=>(r(e).setUint32(t,n,!0),t+4)},e.UINT32_BE={len:4,get:(e,t)=>r(e).getUint32(t),put:(e,t,n)=>(r(e).setUint32(t,n),t+4)},e.INT8={len:1,get:(e,t)=>r(e).getInt8(t),put:(e,t,n)=>(r(e).setInt8(t,n),t+1)},e.INT16_BE={len:2,get:(e,t)=>r(e).getInt16(t),put:(e,t,n)=>(r(e).setInt16(t,n),t+2)},e.INT16_LE={len:2,get:(e,t)=>r(e).getInt16(t,!0),put:(e,t,n)=>(r(e).setInt16(t,n,!0),t+2)},e.INT24_LE={len:3,get(t,r){const n=e.UINT24_LE.get(t,r);return n>8388607?n-16777216:n},put(e,t,n){const i=r(e);return i.setUint8(t,255&n),i.setUint16(t+1,n>>8,!0),t+3}},e.INT24_BE={len:3,get(t,r){const n=e.UINT24_BE.get(t,r);return n>8388607?n-16777216:n},put(e,t,n){const i=r(e);return i.setUint16(t,n>>8),i.setUint8(t+2,255&n),t+3}},e.INT32_BE={len:4,get:(e,t)=>r(e).getInt32(t),put:(e,t,n)=>(r(e).setInt32(t,n),t+4)},e.INT32_LE={len:4,get:(e,t)=>r(e).getInt32(t,!0),put:(e,t,n)=>(r(e).setInt32(t,n,!0),t+4)},e.UINT64_LE={len:8,get:(e,t)=>r(e).getBigUint64(t,!0),put:(e,t,n)=>(r(e).setBigUint64(t,n,!0),t+8)},e.INT64_LE={len:8,get:(e,t)=>r(e).getBigInt64(t,!0),put:(e,t,n)=>(r(e).setBigInt64(t,n,!0),t+8)},e.UINT64_BE={len:8,get:(e,t)=>r(e).getBigUint64(t),put:(e,t,n)=>(r(e).setBigUint64(t,n),t+8)},e.INT64_BE={len:8,get:(e,t)=>r(e).getBigInt64(t),put:(e,t,n)=>(r(e).setBigInt64(t,n),t+8)},e.Float16_BE={len:2,get(e,r){return t.read(e,r,!1,10,this.len)},put(e,r,n){return t.write(e,n,r,!1,10,this.len),r+this.len}},e.Float16_LE={len:2,get(e,r){return t.read(e,r,!0,10,this.len)},put(e,r,n){return t.write(e,n,r,!0,10,this.len),r+this.len}},e.Float32_BE={len:4,get:(e,t)=>r(e).getFloat32(t),put:(e,t,n)=>(r(e).setFloat32(t,n),t+4)},e.Float32_LE={len:4,get:(e,t)=>r(e).getFloat32(t,!0),put:(e,t,n)=>(r(e).setFloat32(t,n,!0),t+4)},e.Float64_BE={len:8,get:(e,t)=>r(e).getFloat64(t),put:(e,t,n)=>(r(e).setFloat64(t,n),t+8)},e.Float64_LE={len:8,get:(e,t)=>r(e).getFloat64(t,!0),put:(e,t,n)=>(r(e).setFloat64(t,n,!0),t+8)},e.Float80_BE={len:10,get(e,r){return t.read(e,r,!1,63,this.len)},put(e,r,n){return t.write(e,n,r,!1,63,this.len),r+this.len}},e.Float80_LE={len:10,get(e,r){return t.read(e,r,!0,63,this.len)},put(e,r,n){return t.write(e,n,r,!0,63,this.len),r+this.len}},e.IgnoreType=class{constructor(e){this.len=e}get(e,t){}},e.Uint8ArrayType=class{constructor(e){this.len=e}get(e,t){return e.subarray(t,t+this.len)}},e.BufferType=class{constructor(e){this.len=e}get(e,t){return Buffer.from(e.subarray(t,t+this.len))}},e.StringType=class{constructor(e,t){this.len=e,this.encoding=t}get(e,t){return Buffer.from(e).toString(this.encoding,t,t+this.len)}};class n{constructor(e){this.len=e}static decode(e,t,r){let i="";for(let a=t;a<r;++a)i+=n.codePointToString(n.singleByteDecoder(e[a]));return i}static inRange(e,t,r){return t<=e&&e<=r}static codePointToString(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}static singleByteDecoder(e){if(n.inRange(e,0,127))return e;const t=n.windows1252[e-128];if(null===t)throw Error("invaliding encoding");return t}get(e,t=0){return n.decode(e,t,t+this.len)}}e.AnsiStringType=n,n.windows1252=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255]}(lib$1);var core$1={},ReadStreamTokenizer$1={},AbstractTokenizer$1={},lib={},EndOfFileStream={};!function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EndOfStreamError=e.defaultMessages=void 0,e.defaultMessages="End-Of-Stream";class t extends Error{constructor(){super(e.defaultMessages)}}e.EndOfStreamError=t}(EndOfFileStream);var StreamReader={},Deferred$1={};Object.defineProperty(Deferred$1,"__esModule",{value:!0}),Deferred$1.Deferred=void 0;class Deferred{constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise((e,t)=>{this.reject=t,this.resolve=e})}}Deferred$1.Deferred=Deferred,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StreamReader=e.EndOfStreamError=void 0;const t=EndOfFileStream,r=Deferred$1;var n=EndOfFileStream;Object.defineProperty(e,"EndOfStreamError",{enumerable:!0,get:function(){return n.EndOfStreamError}}),e.StreamReader=class{constructor(e){if(this.s=e,this.deferred=null,this.endOfStream=!1,this.peekQueue=[],!e.read||!e.once)throw new Error("Expected an instance of stream.Readable");this.s.once("end",()=>this.reject(new t.EndOfStreamError)),this.s.once("error",e=>this.reject(e)),this.s.once("close",()=>this.reject(new Error("Stream closed")))}async peek(e,t,r){const n=await this.read(e,t,r);return this.peekQueue.push(e.subarray(t,t+n)),n}async read(e,r,n){if(0===n)return 0;if(0===this.peekQueue.length&&this.endOfStream)throw new t.EndOfStreamError;let i=n,a=0;for(;this.peekQueue.length>0&&i>0;){const t=this.peekQueue.pop();if(!t)throw new Error("peekData should be defined");const n=Math.min(t.length,i);e.set(t.subarray(0,n),r+a),a+=n,i-=n,n<t.length&&this.peekQueue.push(t.subarray(n))}for(;i>0&&!this.endOfStream;){const t=Math.min(i,1048576),n=await this.readFromStream(e,r+a,t);if(a+=n,n<t)break;i-=n}return a}async readFromStream(e,t,n){const i=this.s.read(n);if(i)return e.set(i,t),i.length;{const i={buffer:e,offset:t,length:n,deferred:new r.Deferred};return this.deferred=i.deferred,this.s.once("readable",()=>{this.readDeferred(i)}),i.deferred.promise}}readDeferred(e){const t=this.s.read(e.length);t?(e.buffer.set(t,e.offset),e.deferred.resolve(t.length),this.deferred=null):this.s.once("readable",()=>{this.readDeferred(e)})}reject(e){this.endOfStream=!0,this.deferred&&(this.deferred.reject(e),this.deferred=null)}}}(StreamReader),function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.StreamReader=e.EndOfStreamError=void 0;var t=EndOfFileStream;Object.defineProperty(e,"EndOfStreamError",{enumerable:!0,get:function(){return t.EndOfStreamError}});var r=StreamReader;Object.defineProperty(e,"StreamReader",{enumerable:!0,get:function(){return r.StreamReader}})}(lib),Object.defineProperty(AbstractTokenizer$1,"__esModule",{value:!0}),AbstractTokenizer$1.AbstractTokenizer=void 0;const peek_readable_1$2=lib;class AbstractTokenizer{constructor(e){this.position=0,this.numBuffer=new Uint8Array(8),this.fileInfo=e||{}}async readToken(e,t=this.position){const r=Buffer.alloc(e.len);if(await this.readBuffer(r,{position:t})<e.len)throw new peek_readable_1$2.EndOfStreamError;return e.get(r,0)}async peekToken(e,t=this.position){const r=Buffer.alloc(e.len);if(await this.peekBuffer(r,{position:t})<e.len)throw new peek_readable_1$2.EndOfStreamError;return e.get(r,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})<e.len)throw new peek_readable_1$2.EndOfStreamError;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})<e.len)throw new peek_readable_1$2.EndOfStreamError;return e.get(this.numBuffer,0)}async ignore(e){if(void 0!==this.fileInfo.size){const t=this.fileInfo.size-this.position;if(e>t)return this.position+=t,t}return this.position+=e,e}async close(){}normalizeOptions(e,t){if(t&&void 0!==t.position&&t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");return t?{mayBeLess:!0===t.mayBeLess,offset:t.offset?t.offset:0,length:t.length?t.length:e.length-(t.offset?t.offset:0),position:t.position?t.position:this.position}:{mayBeLess:!1,offset:0,length:e.length,position:this.position}}}AbstractTokenizer$1.AbstractTokenizer=AbstractTokenizer,Object.defineProperty(ReadStreamTokenizer$1,"__esModule",{value:!0}),ReadStreamTokenizer$1.ReadStreamTokenizer=void 0;const AbstractTokenizer_1$1=AbstractTokenizer$1,peek_readable_1$1=lib,maxBufferSize=256e3;class ReadStreamTokenizer extends AbstractTokenizer_1$1.AbstractTokenizer{constructor(e,t){super(t),this.streamReader=new peek_readable_1$1.StreamReader(e)}async getFileInfo(){return this.fileInfo}async readBuffer(e,t){const r=this.normalizeOptions(e,t),n=r.position-this.position;if(n>0)return await this.ignore(n),this.readBuffer(e,t);if(n<0)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");if(0===r.length)return 0;const i=await this.streamReader.read(e,r.offset,r.length);if(this.position+=i,(!t||!t.mayBeLess)&&i<r.length)throw new peek_readable_1$1.EndOfStreamError;return i}async peekBuffer(e,t){const r=this.normalizeOptions(e,t);let n=0;if(r.position){const t=r.position-this.position;if(t>0){const i=new Uint8Array(r.length+t);return n=await this.peekBuffer(i,{mayBeLess:r.mayBeLess}),e.set(i.subarray(t),r.offset),n-t}if(t<0)throw new Error("Cannot peek from a negative offset in a stream")}if(r.length>0){try{n=await this.streamReader.peek(e,r.offset,r.length)}catch(e){if(t&&t.mayBeLess&&e instanceof peek_readable_1$1.EndOfStreamError)return 0;throw e}if(!r.mayBeLess&&n<r.length)throw new peek_readable_1$1.EndOfStreamError}return n}async ignore(e){const t=Math.min(maxBufferSize,e),r=new Uint8Array(t);let n=0;for(;n<e;){const i=e-n,a=await this.readBuffer(r,{length:Math.min(t,i)});if(a<0)return a;n+=a}return n}}ReadStreamTokenizer$1.ReadStreamTokenizer=ReadStreamTokenizer;var BufferTokenizer$1={};Object.defineProperty(BufferTokenizer$1,"__esModule",{value:!0}),BufferTokenizer$1.BufferTokenizer=void 0;const peek_readable_1=lib,AbstractTokenizer_1=AbstractTokenizer$1;class BufferTokenizer extends AbstractTokenizer_1.AbstractTokenizer{constructor(e,t){super(t),this.uint8Array=e,this.fileInfo.size=this.fileInfo.size?this.fileInfo.size:e.length}async readBuffer(e,t){if(t&&t.position){if(t.position<this.position)throw new Error("`options.position` must be equal or greater than `tokenizer.position`");this.position=t.position}const r=await this.peekBuffer(e,t);return this.position+=r,r}async peekBuffer(e,t){const r=this.normalizeOptions(e,t),n=Math.min(this.uint8Array.length-r.position,r.length);if(!r.mayBeLess&&n<r.length)throw new peek_readable_1.EndOfStreamError;return e.set(this.uint8Array.subarray(r.position,r.position+n),r.offset),n}async close(){}}BufferTokenizer$1.BufferTokenizer=BufferTokenizer,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.fromBuffer=e.fromStream=e.EndOfStreamError=void 0;const t=ReadStreamTokenizer$1,r=BufferTokenizer$1;var n=lib;Object.defineProperty(e,"EndOfStreamError",{enumerable:!0,get:function(){return n.EndOfStreamError}}),e.fromStream=function(e,r){return r=r||{},new t.ReadStreamTokenizer(e,r)},e.fromBuffer=function(e,t){return new r.BufferTokenizer(e,t)}}(core$1);var util={stringToBytes:e=>[...e].map(e=>e.charCodeAt(0)),tarHeaderChecksumMatches:(e,t=0)=>{const r=parseInt(e.toString("utf8",148,154).replace(/\0.*$/,"").trim(),8);if(isNaN(r))return!1;let n=256;for(let r=t;r<t+148;r++)n+=e[r];for(let r=t+156;r<t+512;r++)n+=e[r];return r===n},uint32SyncSafeToken:{get:(e,t)=>127&e[t+3]|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4}},supported$1={extensions:["jpg","png","apng","gif","webp","flif","xcf","cr2","cr3","orf","arw","dng","nef","rw2","raf","tif","bmp","icns","jxr","psd","indd","zip","tar","rar","gz","bz2","7z","dmg","mp4","mid","mkv","webm","mov","avi","mpg","mp2","mp3","m4a","oga","ogg","ogv","opus","flac","wav","spx","amr","pdf","epub","exe","swf","rtf","wasm","woff","woff2","eot","ttf","otf","ico","flv","ps","xz","sqlite","nes","crx","xpi","cab","deb","ar","rpm","Z","lz","cfb","mxf","mts","blend","bpg","docx","pptx","xlsx","3gp","3g2","jp2","jpm","jpx","mj2","aif","qcp","odt","ods","odp","xml","mobi","heic","cur","ktx","ape","wv","dcm","ics","glb","pcap","dsf","lnk","alias","voc","ac3","m4v","m4p","m4b","f4v","f4p","f4b","f4a","mie","asf","ogm","ogx","mpc","arrow","shp","aac","mp1","it","s3m","xm","ai","skp","avif","eps","lzh","pgp","asar","stl","chm","3mf","zst","jxl","vcf"],mimeTypes:["image/jpeg","image/png","image/gif","image/webp","image/flif","image/x-xcf","image/x-canon-cr2","image/x-canon-cr3","image/tiff","image/bmp","image/vnd.ms-photo","image/vnd.adobe.photoshop","application/x-indesign","application/epub+zip","application/x-xpinstall","application/vnd.oasis.opendocument.text","application/vnd.oasis.opendocument.spreadsheet","application/vnd.oasis.opendocument.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/zip","application/x-tar","application/x-rar-compressed","application/gzip","application/x-bzip2","application/x-7z-compressed","application/x-apple-diskimage","application/x-apache-arrow","video/mp4","audio/midi","video/x-matroska","video/webm","video/quicktime","video/vnd.avi","audio/vnd.wave","audio/qcelp","audio/x-ms-asf","video/x-ms-asf","application/vnd.ms-asf","video/mpeg","video/3gpp","audio/mpeg","audio/mp4","audio/opus","video/ogg","audio/ogg","application/ogg","audio/x-flac","audio/ape","audio/wavpack","audio/amr","application/pdf","application/x-msdownload","application/x-shockwave-flash","application/rtf","application/wasm","font/woff","font/woff2","application/vnd.ms-fontobject","font/ttf","font/otf","image/x-icon","video/x-flv","application/postscript","application/eps","application/x-xz","application/x-sqlite3","application/x-nintendo-nes-rom","application/x-google-chrome-extension","application/vnd.ms-cab-compressed","application/x-deb","application/x-unix-archive","application/x-rpm","application/x-compress","application/x-lzip","application/x-cfb","application/x-mie","application/mxf","video/mp2t","application/x-blender","image/bpg","image/jp2","image/jpx","image/jpm","image/mj2","audio/aiff","application/xml","application/x-mobipocket-ebook","image/heif","image/heif-sequence","image/heic","image/heic-sequence","image/icns","image/ktx","application/dicom","audio/x-musepack","text/calendar","text/vcard","model/gltf-binary","application/vnd.tcpdump.pcap","audio/x-dsf","application/x.ms.shortcut","application/x.apple.alias","audio/x-voc","audio/vnd.dolby.dd-raw","audio/x-m4a","image/apng","image/x-olympus-orf","image/x-sony-arw","image/x-adobe-dng","image/x-nikon-nef","image/x-panasonic-rw2","image/x-fujifilm-raf","video/x-m4v","video/3gpp2","application/x-esri-shape","audio/aac","audio/x-it","audio/x-s3m","audio/x-xm","video/MP1S","video/MP2P","application/vnd.sketchup.skp","image/avif","application/x-lzh-compressed","application/pgp-encrypted","application/x-asar","model/stl","application/vnd.ms-htmlhelp","model/3mf","image/jxl","application/zstd"]};const Token=lib$1,strtok3=core$1,{stringToBytes,tarHeaderChecksumMatches,uint32SyncSafeToken}=util,supported=supported$1,minimumBytes=4100;async function fromStream(e){const t=await strtok3.fromStream(e);try{return await fromTokenizer(t)}finally{await t.close()}}async function fromBuffer(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer||Buffer.isBuffer(e)))throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`Buffer\` or \`ArrayBuffer\`, got \`${typeof e}\``);const t=e instanceof Buffer?e:Buffer.from(e);if(t&&t.length>1)return fromTokenizer(strtok3.fromBuffer(t))}function _check(e,t,r){r={offset:0,...r};for(const[n,i]of t.entries())if(r.mask){if(i!==(r.mask[n]&e[n+r.offset]))return!1}else if(i!==e[n+r.offset])return!1;return!0}async function fromTokenizer(e){try{return _fromTokenizer(e)}catch(e){if(!(e instanceof strtok3.EndOfStreamError))throw e}}async function _fromTokenizer(e){let t=Buffer.alloc(minimumBytes);const r=(e,r)=>_check(t,e,r),n=(e,t)=>r(stringToBytes(e),t);if(e.fileInfo.size||(e.fileInfo.size=Number.MAX_SAFE_INTEGER),await e.peekBuffer(t,{length:12,mayBeLess:!0}),r([66,77]))return{ext:"bmp",mime:"image/bmp"};if(r([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(r([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(r([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(r([37,33]))return await e.peekBuffer(t,{length:24,mayBeLess:!0}),n("PS-Adobe-",{offset:2})&&n(" EPSF-",{offset:14})?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(r([31,160])||r([31,157]))return{ext:"Z",mime:"application/x-compress"};if(r([255,216,255]))return{ext:"jpg",mime:"image/jpeg"};if(r([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(r([31,139,8]))return{ext:"gz",mime:"application/gzip"};if(r([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(n("ID3")){await e.ignore(6);const i=await e.readToken(uint32SyncSafeToken);return e.position+i>e.fileInfo.size?{ext:"mp3",mime:"audio/mpeg"}:(await e.ignore(i),fromTokenizer(e))}if(n("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((67===t[0]||70===t[0])&&r([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(r([71,73,70]))return{ext:"gif",mime:"image/gif"};if(n("FLIF"))return{ext:"flif",mime:"image/flif"};if(n("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(n("WEBP",{offset:8}))return{ext:"webp",mime:"image/webp"};if(n("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(n("FORM"))return{ext:"aif",mime:"audio/aiff"};if(n("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(r([80,75,3,4])){try{for(;e.position+30<e.fileInfo.size;){await e.readBuffer(t,{length:30});const a={compressedSize:t.readUInt32LE(18),uncompressedSize:t.readUInt32LE(22),filenameLength:t.readUInt16LE(26),extraFieldLength:t.readUInt16LE(28)};if(a.filename=await e.readToken(new Token.StringType(a.filenameLength,"utf-8")),await e.ignore(a.extraFieldLength),"META-INF/mozilla.rsa"===a.filename)return{ext:"xpi",mime:"application/x-xpinstall"};if(a.filename.endsWith(".rels")||a.filename.endsWith(".xml"))switch(a.filename.split("/")[0]){case"_rels":default:break;case"word":return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};case"ppt":return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};case"xl":return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}}if(a.filename.startsWith("xl/"))return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if(a.filename.startsWith("3D/")&&a.filename.endsWith(".model"))return{ext:"3mf",mime:"model/3mf"};if("mimetype"===a.filename&&a.compressedSize===a.uncompressedSize)switch(await e.readToken(new Token.StringType(a.compressedSize,"utf-8"))){case"application/epub+zip":return{ext:"epub",mime:"application/epub+zip"};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:"application/vnd.oasis.opendocument.text"};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:"application/vnd.oasis.opendocument.spreadsheet"};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:"application/vnd.oasis.opendocument.presentation"}}if(0===a.compressedSize){let o=-1;for(;o<0&&e.position<e.fileInfo.size;)await e.peekBuffer(t,{mayBeLess:!0}),o=t.indexOf("504B0304",0,"hex"),await e.ignore(o>=0?o:t.length)}else await e.ignore(a.compressedSize)}}catch(s){if(!(s instanceof strtok3.EndOfStreamError))throw s}return{ext:"zip",mime:"application/zip"}}if(n("OggS")){await e.ignore(28);const u=Buffer.alloc(8);return await e.readBuffer(u),_check(u,[79,112,117,115,72,101,97,100])?{ext:"opus",mime:"audio/opus"}:_check(u,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:_check(u,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:_check(u,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:_check(u,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:_check(u,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(r([80,75])&&(3===t[2]||5===t[2]||7===t[2])&&(4===t[3]||6===t[3]||8===t[3]))return{ext:"zip",mime:"application/zip"};if(n("ftyp",{offset:4})&&96&t[8]){const l=t.toString("binary",8,12).replace("\0"," ").trim();switch(l){case"avif":return{ext:"avif",mime:"image/avif"};case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt":return{ext:"mov",mime:"video/quicktime"};case"M4V":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P":return{ext:"m4p",mime:"video/mp4"};case"M4B":return{ext:"m4b",mime:"audio/mp4"};case"M4A":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V":return{ext:"f4v",mime:"video/mp4"};case"F4P":return{ext:"f4p",mime:"video/mp4"};case"F4A":return{ext:"f4a",mime:"audio/mp4"};case"F4B":return{ext:"f4b",mime:"audio/mp4"};case"crx":return{ext:"cr3",mime:"image/x-canon-cr3"};default:return l.startsWith("3g")?l.startsWith("3g2")?{ext:"3g2",mime:"video/3gpp2"}:{ext:"3gp",mime:"video/3gpp"}:{ext:"mp4",mime:"video/mp4"}}}if(n("MThd"))return{ext:"mid",mime:"audio/midi"};if(n("wOFF")&&(r([0,1,0,0],{offset:4})||n("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(n("wOF2")&&(r([0,1,0,0],{offset:4})||n("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(r([212,195,178,161])||r([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(n("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(n("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(n("fLaC"))return{ext:"flac",mime:"audio/x-flac"};if(r([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(n("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(n("%PDF")){await e.ignore(1350);const c=10485760,f=Buffer.alloc(Math.min(c,e.fileInfo.size));return await e.readBuffer(f,{mayBeLess:!0}),f.includes(Buffer.from("AIPrivateData"))?{ext:"ai",mime:"application/postscript"}:{ext:"pdf",mime:"application/pdf"}}if(r([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(r([73,73,42,0]))return n("CR",{offset:8})?{ext:"cr2",mime:"image/x-canon-cr2"}:r([28,0,254,0],{offset:8})||r([31,0,11,0],{offset:8})?{ext:"nef",mime:"image/x-nikon-nef"}:r([8,0,0,0],{offset:4})&&(r([45,0,254,0],{offset:8})||r([39,0,254,0],{offset:8}))?{ext:"dng",mime:"image/x-adobe-dng"}:(t=Buffer.alloc(24),await e.peekBuffer(t),(r([16,251,134,1],{offset:4})||r([8,0,0,0],{offset:4}))&&r([0,254,0,4,0,1,0,0,0,1,0,0,0,3,1],{offset:9})?{ext:"arw",mime:"image/x-sony-arw"}:{ext:"tif",mime:"image/tiff"});if(r([77,77,0,42]))return{ext:"tif",mime:"image/tiff"};if(n("MAC "))return{ext:"ape",mime:"audio/ape"};if(r([26,69,223,163])){async function h(){const t=await e.peekNumber(Token.UINT8);let r=128,n=0;for(;!(t&r)&&0!==r;)++n,r>>=1;const i=Buffer.alloc(n+1);return await e.readBuffer(i),i}async function d(){const e=await h(),t=await h();t[0]^=128>>t.length-1;const r=Math.min(6,t.length);return{id:e.readUIntBE(0,e.length),len:t.readUIntBE(t.length-r,r)}}async function p(t,r){for(;r>0;){const t=await d();if(17026===t.id)return e.readToken(new Token.StringType(t.len,"utf-8"));await e.ignore(t.len),--r}}const m=await d();switch(await p(0,m.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/x-matroska"};default:return}}if(r([82,73,70,70])){if(r([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(r([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/vnd.wave"};if(r([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(n("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(r([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(n("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(n("MSCF")||n("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(r([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(r([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(r([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(r([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(n("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(n("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(r([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(n("IMPM"))return{ext:"it",mime:"audio/x-it"};if(n("-lh0-",{offset:2})||n("-lh1-",{offset:2})||n("-lh2-",{offset:2})||n("-lh3-",{offset:2})||n("-lh4-",{offset:2})||n("-lh5-",{offset:2})||n("-lh6-",{offset:2})||n("-lh7-",{offset:2})||n("-lzs-",{offset:2})||n("-lz4-",{offset:2})||n("-lz5-",{offset:2})||n("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(r([0,0,1,186])){if(r([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(r([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(n("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(r([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(n("<?xml "))return{ext:"xml",mime:"application/xml"};if(r([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(r([82,97,114,33,26,7])&&(0===t[6]||1===t[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(n("solid "))return{ext:"stl",mime:"model/stl"};if(n("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(n("!<arch>"))return await e.ignore(8),"debian-binary"===await e.readToken(new Token.StringType(13,"ascii"))?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(r([137,80,78,71,13,10,26,10])){async function g(){return{length:await e.readToken(Token.INT32_BE),type:await e.readToken(new Token.StringType(4,"binary"))}}await e.ignore(8);do{const b=await g();if(b.length<0)return;switch(b.type){case"IDAT":return{ext:"png",mime:"image/png"};case"acTL":return{ext:"apng",mime:"image/apng"};default:await e.ignore(b.length+4)}}while(e.position+8<e.fileInfo.size);return{ext:"png",mime:"image/png"}}if(r([65,82,82,79,87,49,0,0]))return{ext:"arrow",mime:"application/x-apache-arrow"};if(r([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(r([102,114,101,101],{offset:4})||r([109,100,97,116],{offset:4})||r([109,111,111,118],{offset:4})||r([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(r([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(n("gimp xcf "))return{ext:"xcf",mime:"image/x-xcf"};if(r([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-panasonic-rw2"};if(r([48,38,178,117,142,102,207,17,166,217])){async function y(){const t=Buffer.alloc(16);return await e.readBuffer(t),{id:t,size:Number(await e.readToken(Token.UINT64_LE))}}for(await e.ignore(30);e.position+24<e.fileInfo.size;){const _=await y();let v=_.size-24;if(_check(_.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){const w=Buffer.alloc(16);if(v-=await e.readBuffer(w),_check(w,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(_check(w,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}await e.ignore(v)}return{ext:"asf",mime:"application/vnd.ms-asf"}}if(r([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((r([126,16,4])||r([126,24,4]))&&r([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(r([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(r([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await e.ignore(20),await e.readToken(new Token.StringType(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(r([255,10])||r([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(r([0,0,1,186])||r([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(r([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(r([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(r([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(r([208,207,17,224,161,177,26,225]))return{ext:"cfb",mime:"application/x-cfb"};if(await e.peekBuffer(t,{length:Math.min(256,e.fileInfo.size),mayBeLess:!0}),n("BEGIN:")){if(n("VCARD",{offset:6}))return{ext:"vcf",mime:"text/vcard"};if(n("VCALENDAR",{offset:6}))return{ext:"ics",mime:"text/calendar"}}if(n("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(n("Extended Module:"))return{ext:"xm",mime:"audio/x-xm"};if(n("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(r([4,0,0,0])&&t.length>=16){const x=t.readUInt32LE(12);if(x>12&&t.length>=x+16)try{const k=t.slice(16,x+16).toString();if(JSON.parse(k).files)return{ext:"asar",mime:"application/x-asar"}}catch(B){}}if(r([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(n("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(r([71],{offset:4})&&(r([71],{offset:192})||r([71],{offset:196})))return{ext:"mts",mime:"video/mp2t"};if(r([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(r([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(r([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(r([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(r([76,80],{offset:34})&&(r([0,0,1],{offset:8})||r([1,0,2],{offset:8})||r([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(r([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(await e.peekBuffer(t,{length:Math.min(512,e.fileInfo.size),mayBeLess:!0}),tarHeaderChecksumMatches(t))return{ext:"tar",mime:"application/x-tar"};if(r([255,254,255,14,83,0,107,0,101,0,116,0,99,0,104,0,85,0,112,0,32,0,77,0,111,0,100,0,101,0,108,0]))return{ext:"skp",mime:"application/vnd.sketchup.skp"};if(n("-----BEGIN PGP MESSAGE-----"))return{ext:"pgp",mime:"application/pgp-encrypted"};if(t.length>=2&&r([255,224],{offset:0,mask:[255,224]})){if(r([16],{offset:1,mask:[22]}))return r([8],{offset:1,mask:[8]}),{ext:"aac",mime:"audio/aac"};if(r([2],{offset:1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(r([4],{offset:1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(r([6],{offset:1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}const stream=readableStream=>new Promise((resolve,reject)=>{const stream=eval("require")("stream");readableStream.on("error",reject),readableStream.once("readable",async()=>{const e=new stream.PassThrough;let t;t=stream.pipeline?stream.pipeline(readableStream,e,()=>{}):readableStream.pipe(e);const r=readableStream.read(minimumBytes)||readableStream.read()||Buffer.alloc(0);try{const t=await fromBuffer(r);e.fileType=t}catch(e){reject(e)}resolve(t)})}),fileType={fromStream,fromTokenizer,fromBuffer,stream};Object.defineProperty(fileType,"extensions",{get:()=>new Set(supported.extensions)}),Object.defineProperty(fileType,"mimeTypes",{get:()=>new Set(supported.mimeTypes)});var core=fileType,fileType$1=getDefaultExportFromCjs(core);function to(e,t){return e.then(function(e){return[null,e]}).catch(function(e){return[e,void 0]})}const writeFile=async()=>{throw new Error("Not supported")};function Mime$1(){this._types=Object.create(null),this._extensions=Object.create(null);for(let e=0;e<arguments.length;e++)this.define(arguments[e]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}Mime$1.prototype.define=function(e,t){for(let r in e){let n=e[r].map(function(e){return e.toLowerCase()});r=r.toLowerCase();for(let e=0;e<n.length;e++){const i=n[e];if("*"!==i[0]){if(!t&&i in this._types)throw new Error('Attempt to change mapping for "'+i+'" extension from "'+this._types[i]+'" to "'+r+'". Pass `force=true` to allow this, otherwise remove "'+i+'" from the list of extensions for "'+r+'".');this._types[i]=r}}if(t||!this._extensions[r]){const e=n[0];this._extensions[r]="*"!==e[0]?e:e.substr(1)}}},Mime$1.prototype.getType=function(e){let t=(e=String(e)).replace(/^.*[/\\]/,"").toLowerCase(),r=t.replace(/^.*\./,"").toLowerCase(),n=t.length<e.length;return(r.length<t.length-1||!n)&&this._types[r]||null},Mime$1.prototype.getExtension=function(e){return(e=/^\s*([^;\s]*)/.test(e)&&RegExp.$1)&&this._extensions[e.toLowerCase()]||null};var Mime_1=Mime$1,standard={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]};let Mime=Mime_1;var lite=new Mime(standard),mime=getDefaultExportFromCjs(lite),HorizontalAlign,HorizontalAlign2,VerticalAlign,VerticalAlign2,BlendMode,BlendMode2;function srcOver(e,t,r=1){e.a*=r;const n=t.a+e.a-t.a*e.a;return{r:(e.r*e.a+t.r*t.a*(1-e.a))/n,g:(e.g*e.a+t.g*t.a*(1-e.a))/n,b:(e.b*e.a+t.b*t.a*(1-e.a))/n,a:n}}function dstOver(e,t,r=1){e.a*=r;const n=t.a+e.a-t.a*e.a;return{r:(t.r*t.a+e.r*e.a*(1-t.a))/n,g:(t.g*t.a+e.g*e.a*(1-t.a))/n,b:(t.b*t.a+e.b*e.a*(1-t.a))/n,a:n}}function multiply(e,t,r=1){e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,a=e.g*e.a,o=e.b*e.a,s=t.r*t.a,u=t.g*t.a,l=t.b*t.a;return{r:(i*s+i*(1-t.a)+s*(1-e.a))/n,g:(a*u+a*(1-t.a)+u*(1-e.a))/n,b:(o*l+o*(1-t.a)+l*(1-e.a))/n,a:n}}function add(e,t,r=1){e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,a=e.g*e.a,o=e.b*e.a;return{r:(i+t.r*t.a)/n,g:(a+t.g*t.a)/n,b:(o+t.b*t.a)/n,a:n}}function screen(e,t,r=1){e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,a=e.g*e.a,o=e.b*e.a,s=t.r*t.a,u=t.g*t.a,l=t.b*t.a;return{r:(i*t.a+s*e.a-i*s+i*(1-t.a)+s*(1-e.a))/n,g:(a*t.a+u*e.a-a*u+a*(1-t.a)+u*(1-e.a))/n,b:(o*t.a+l*e.a-o*l+o*(1-t.a)+l*(1-e.a))/n,a:n}}function overlay(e,t,r=1){e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,a=e.g*e.a,o=e.b*e.a,s=t.r*t.a,u=t.g*t.a,l=t.b*t.a;return{r:(2*s<=t.a?2*i*s+i*(1-t.a)+s*(1-e.a):i*(1+t.a)+s*(1+e.a)-2*s*i-t.a*e.a)/n,g:(2*u<=t.a?2*a*u+a*(1-t.a)+u*(1-e.a):a*(1+t.a)+u*(1+e.a)-2*u*a-t.a*e.a)/n,b:(2*l<=t.a?2*o*l+o*(1-t.a)+l*(1-e.a):o*(1+t.a)+l*(1+e.a)-2*l*o-t.a*e.a)/n,a:n}}function darken(e,t,r=1){e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,a=e.g*e.a,o=e.b*e.a,s=t.r*t.a,u=t.g*t.a,l=t.b*t.a;return{r:(Math.min(i*t.a,s*e.a)+i*(1-t.a)+s*(1-e.a))/n,g:(Math.min(a*t.a,u*e.a)+a*(1-t.a)+u*(1-e.a))/n,b:(Math.min(o*t.a,l*e.a)+o*(1-t.a)+l*(1-e.a))/n,a:n}}function lighten(e,t,r=1){e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,a=e.g*e.a,o=e.b*e.a,s=t.r*t.a,u=t.g*t.a,l=t.b*t.a;return{r:(Math.max(i*t.a,s*e.a)+i*(1-t.a)+s*(1-e.a))/n,g:(Math.max(a*t.a,u*e.a)+a*(1-t.a)+u*(1-e.a))/n,b:(Math.max(o*t.a,l*e.a)+o*(1-t.a)+l*(1-e.a))/n,a:n}}function hardLight(e,t,r=1){e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,a=e.g*e.a,o=e.b*e.a,s=t.r*t.a,u=t.g*t.a,l=t.b*t.a;return{r:(2*i<=e.a?2*i*s+i*(1-t.a)+s*(1-e.a):i*(1+t.a)+s*(1+e.a)-2*s*i-t.a*e.a)/n,g:(2*a<=e.a?2*a*u+a*(1-t.a)+u*(1-e.a):a*(1+t.a)+u*(1+e.a)-2*u*a-t.a*e.a)/n,b:(2*o<=e.a?2*o*l+o*(1-t.a)+l*(1-e.a):o*(1+t.a)+l*(1+e.a)-2*l*o-t.a*e.a)/n,a:n}}function difference(e,t,r=1){e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,a=e.g*e.a,o=e.b*e.a,s=t.r*t.a,u=t.g*t.a,l=t.b*t.a;return{r:(i+s-2*Math.min(i*t.a,s*e.a))/n,g:(a+u-2*Math.min(a*t.a,u*e.a))/n,b:(o+l-2*Math.min(o*t.a,l*e.a))/n,a:n}}function exclusion(e,t,r=1){e.a*=r;const n=t.a+e.a-t.a*e.a,i=e.r*e.a,a=e.g*e.a,o=e.b*e.a,s=t.r*t.a,u=t.g*t.a,l=t.b*t.a;return{r:(i*t.a+s*e.a-2*i*s+i*(1-t.a)+s*(1-e.a))/n,g:(a*t.a+u*e.a-2*a*u+a*(1-t.a)+u*(1-e.a))/n,b:(o*t.a+l*e.a-2*o*l+o*(1-t.a)+l*(1-e.a))/n,a:n}}HorizontalAlign2=HorizontalAlign||(HorizontalAlign={}),HorizontalAlign2[HorizontalAlign2.LEFT=1]="LEFT",HorizontalAlign2[HorizontalAlign2.CENTER=2]="CENTER",HorizontalAlign2[HorizontalAlign2.RIGHT=4]="RIGHT",VerticalAlign2=VerticalAlign||(VerticalAlign={}),VerticalAlign2[VerticalAlign2.TOP=8]="TOP",VerticalAlign2[VerticalAlign2.MIDDLE=16]="MIDDLE",VerticalAlign2[VerticalAlign2.BOTTOM=32]="BOTTOM",BlendMode2=BlendMode||(BlendMode={}),BlendMode2.SRC_OVER="srcOver",BlendMode2.DST_OVER="dstOver",BlendMode2.MULTIPLY="multiply",BlendMode2.ADD="add",BlendMode2.SCREEN="screen",BlendMode2.OVERLAY="overlay",BlendMode2.DARKEN="darken",BlendMode2.LIGHTEN="lighten",BlendMode2.HARD_LIGHT="hardLight",BlendMode2.DIFFERENCE="difference",BlendMode2.EXCLUSION="exclusion";const names=[srcOver,dstOver,multiply,add,screen,overlay,darken,lighten,hardLight,difference,exclusion];var compositeModes=Object.freeze({__proto__:null,add,darken,difference,dstOver,exclusion,hardLight,lighten,multiply,names,overlay,screen,srcOver});function composite(e,t,r=0,n=0,i={}){if(!(t instanceof e.constructor))throw new Error("The source must be a Jimp image");if("number"!=typeof r||"number"!=typeof n)throw new Error("x and y must be numbers");const{mode:a=BlendMode.SRC_OVER}=i;let{opacitySource:o=1,opacityDest:s=1}=i;("number"!=typeof o||o<0||o>1)&&(o=1),("number"!=typeof s||s<0||s>1)&&(s=1);const u=compositeModes[a];return r=Math.round(r),n=Math.round(n),1!==s&&e.scan((t,r,n)=>{const i=e.bitmap.data[n+3]*s;e.bitmap.data[n+3]=i}),t.scan((i,a,s)=>{const l=e.getPixelIndex(r+i,n+a,Edge.CROP);if(-1===l)return;const c=u({r:t.bitmap.data[s+0]/255,g:t.bitmap.data[s+1]/255,b:t.bitmap.data[s+2]/255,a:t.bitmap.data[s+3]/255},{r:e.bitmap.data[l+0]/255,g:e.bitmap.data[l+1]/255,b:e.bitmap.data[l+2]/255,a:e.bitmap.data[l+3]/255},o);e.bitmap.data[l+0]=limit255(255*c.r),e.bitmap.data[l+1]=limit255(255*c.g),e.bitmap.data[l+2]=limit255(255*c.b),e.bitmap.data[l+3]=limit255(255*c.a)}),e}var jpeg$1={parseSections:function(e,t){var r,n;for(e.setBigEndian(!0);e.remainingLength()>0&&218!==n;){if(255!==e.nextUInt8())throw new Error("Invalid JPEG section offset");r=(n=e.nextUInt8())>=208&&n<=217||218===n?0:e.nextUInt16()-2,t(n,e.branch(0,r)),e.skip(r)}},getSizeFromSOFSection:function(e){return e.skip(1),{height:e.nextUInt16(),width:e.nextUInt16()}},getSectionName:function(e){var t,r;switch(e){case 216:t="SOI";break;case 196:t="DHT";break;case 219:t="DQT";break;case 221:t="DRI";break;case 218:t="SOS";break;case 254:t="COM";break;case 217:t="EOI";break;default:e>=224&&e<=239?(t="APP",r=e-224):e>=192&&e<=207&&196!==e&&200!==e&&204!==e?(t="SOF",r=e-192):e>=208&&e<=215&&(t="RST",r=e-208)}var n={name:t};return"number"==typeof r&&(n.index=r),n}};function readExifValue(e,t){switch(e){case 1:return t.nextUInt8();case 3:case 8:return t.nextUInt16();case 4:case 9:return t.nextUInt32();case 5:return[t.nextUInt32(),t.nextUInt32()];case 6:return t.nextInt8();case 10:return[t.nextInt32(),t.nextInt32()];case 11:return t.nextFloat();case 12:return t.nextDouble();default:throw new Error("Invalid format while decoding: "+e)}}function getBytesPerComponent(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}}function readExifTag(e,t){var r,n,i=t.nextUInt16(),a=t.nextUInt16(),o=getBytesPerComponent(a),s=t.nextUInt32(),u=o*s;if(u>4&&(t=e.openWithOffset(t.nextUInt32())),2===a){var l=(r=t.nextString(s)).indexOf("\0");-1!==l&&(r=r.substr(0,l))}else if(7===a)r=t.nextBuffer(s);else if(0!==a)for(r=[],n=0;n<s;++n)r.push(readExifValue(a,t));return u<4&&t.skip(4-u),[i,r,a]}function readIFDSection(e,t,r){var n,i,a=t.nextUInt16();for(i=0;i<a;++i)r((n=readExifTag(e,t))[0],n[1],n[2])}function readHeader(e){if("Exif\0\0"!==e.nextString(6))throw new Error("Invalid EXIF header");var t=e.mark(),r=e.nextUInt16();if(18761===r)e.setBigEndian(!1);else{if(19789!==r)throw new Error("Invalid TIFF header");e.setBigEndian(!0)}if(42!==e.nextUInt16())throw new Error("Invalid TIFF data");return t}var exif$2={IFD0:1,IFD1:2,GPSIFD:3,SubIFD:4,InteropIFD:5,parseTags:function(e,t){var r,n,i,a;try{r=readHeader(e)}catch(e){return!1}var o=r.openWithOffset(e.nextUInt32()),s=this.IFD0;readIFDSection(r,o,function(e,r,a){switch(e){case 34853:i=r[0];break;case 34665:n=r[0];break;default:t(s,e,r,a)}});var u=o.nextUInt32();if(0!==u){var l=r.openWithOffset(u);readIFDSection(r,l,t.bind(null,this.IFD1))}if(i){var c=r.openWithOffset(i);readIFDSection(r,c,t.bind(null,this.GPSIFD))}if(n){var f=r.openWithOffset(n),h=this.InteropIFD;readIFDSection(r,f,function(e,r,n){40965===e?a=r[0]:t(h,e,r,n)})}if(a){var d=r.openWithOffset(a);readIFDSection(r,d,t.bind(null,this.InteropIFD))}return!0}};function parseNumber(e){return parseInt(e,10)}var hours=3600,minutes=60;function parseDateTimeParts(e,t){e=e.map(parseNumber),t=t.map(parseNumber);var r=e[0],n=e[1]-1,i=e[2],a=t[0],o=t[1],s=t[2];return Date.UTC(r,n,i,a,o,s,0)/1e3}function parseDateWithTimezoneFormat(e){var t=e.substr(0,10).split("-"),r=e.substr(11,8).split(":"),n=e.substr(19,6).split(":").map(parseNumber),i=n[0]*hours+n[1]*minutes,a=parseDateTimeParts(t,r);if("number"==typeof(a-=i)&&!isNaN(a))return a}function parseDateWithSpecFormat(e){var t=e.split(" "),r=parseDateTimeParts(t[0].split(":"),t[1].split(":"));if("number"==typeof r&&!isNaN(r))return r}function parseExifDate(e){var t=19===e.length&&":"===e.charAt(4);return 25===e.length&&"T"===e.charAt(10)?parseDateWithTimezoneFormat(e):t?parseDateWithSpecFormat(e):void 0}var date$1={parseDateWithSpecFormat,parseDateWithTimezoneFormat,parseExifDate},exif$1=exif$2,date=date$1,degreeTags=[{section:exif$1.GPSIFD,type:2,name:"GPSLatitude",refType:1,refName:"GPSLatitudeRef",posVal:"N"},{section:exif$1.GPSIFD,type:4,name:"GPSLongitude",refType:3,refName:"GPSLongitudeRef",posVal:"E"}],dateTags=[{section:exif$1.SubIFD,type:306,name:"ModifyDate"},{section:exif$1.SubIFD,type:36867,name:"DateTimeOriginal"},{section:exif$1.SubIFD,type:36868,name:"CreateDate"},{section:exif$1.SubIFD,type:306,name:"ModifyDate"}],simplify$1={castDegreeValues:function(e,t){degreeTags.forEach(function(r){var n=e(r);if(n){var i=e({section:r.section,type:r.refType,name:r.refName})===r.posVal?1:-1,a=(n[0]+n[1]/60+n[2]/3600)*i;t(r,a)}})},castDateValues:function(e,t){dateTags.forEach(function(r){var n=e(r);if(n){var i=date.parseExifDate(n);void 0!==i&&t(r,i)}})},simplifyValue:function(e,t){return Array.isArray(e)&&1===(e=e.map(function(e){return 10===t||5===t?e[0]/e[1]:e})).length&&(e=e[0]),e}},exifTags,hasRequiredExifTags;function requireExifTags(){return hasRequiredExifTags?exifTags:(hasRequiredExifTags=1,exifTags={exif:{1:"InteropIndex",2:"InteropVersion",11:"ProcessingSoftware",254:"SubfileType",255:"OldSubfileType",256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:"Thresholding",264:"CellWidth",265:"CellLength",266:"FillOrder",269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",285:"PageName",286:"XPosition",287:"YPosition",288:"FreeOffsets",289:"FreeByteCounts",290:"GrayResponseUnit",291:"GrayResponseCurve",292:"T4Options",293:"T6Options",296:"ResolutionUnit",297:"PageNumber",300:"ColorResponseUnit",301:"TransferFunction",305:"Software",306:"ModifyDate",315:"Artist",316:"HostComputer",317:"Predictor",318:"WhitePoint",319:"PrimaryChromaticities",320:"ColorMap",321:"HalftoneHints",322:"TileWidth",323:"TileLength",324:"TileOffsets",325:"TileByteCounts",326:"BadFaxLines",327:"CleanFaxData",328:"ConsecutiveBadFaxLines",330:"SubIFD",332:"InkSet",333:"InkNames",334:"NumberofInks",336:"DotRange",337:"TargetPrinter",338:"ExtraSamples",339:"SampleFormat",340:"SMinSampleValue",341:"SMaxSampleValue",342:"TransferRange",343:"ClipPath",344:"XClipPathUnits",345:"YClipPathUnits",346:"Indexed",347:"JPEGTables",351:"OPIProxy",400:"GlobalParametersIFD",401:"ProfileType",402:"FaxProfile",403:"CodingMethods",404:"VersionYear",405:"ModeNumber",433:"Decode",434:"DefaultImageColor",435:"T82Options",437:"JPEGTables",512:"JPEGProc",513:"ThumbnailOffset",514:"ThumbnailLength",515:"JPEGRestartInterval",517:"JPEGLosslessPredictors",518:"JPEGPointTransforms",519:"JPEGQTables",520:"JPEGDCTables",521:"JPEGACTables",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite",559:"StripRowCounts",700:"ApplicationNotes",999:"USPTOMiscellaneous",4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight",18246:"Rating",18247:"XP_DIP_XML",18248:"StitchInfo",18249:"RatingPercent",32781:"ImageID",32931:"WangTag1",32932:"WangAnnotation",32933:"WangTag3",32934:"WangTag4",32995:"Matteing",32996:"DataType",32997:"ImageDepth",32998:"TileDepth",33405:"Model2",33421:"CFARepeatPatternDim",33422:"CFAPattern2",33423:"BatteryLevel",33424:"KodakIFD",33432:"Copyright",33434:"ExposureTime",33437:"FNumber",33445:"MDFileTag",33446:"MDScalePixel",33447:"MDColorTable",33448:"MDLabName",33449:"MDSampleInfo",33450:"MDPrepDate",33451:"MDPrepTime",33452:"MDFileUnits",33550:"PixelScale",33589:"AdventScale",33590:"AdventRevision",33628:"UIC1Tag",33629:"UIC2Tag",33630:"UIC3Tag",33631:"UIC4Tag",33723:"IPTC-NAA",33918:"IntergraphPacketData",33919:"IntergraphFlagRegisters",33920:"IntergraphMatrix",33921:"INGRReserved",33922:"ModelTiePoint",34016:"Site",34017:"ColorSequence",34018:"IT8Header",34019:"RasterPadding",34020:"BitsPerRunLength",34021:"BitsPerExtendedRunLength",34022:"ColorTable",34023:"ImageColorIndicator",34024:"BackgroundColorIndicator",34025:"ImageColorValue",34026:"BackgroundColorValue",34027:"PixelIntensityRange",34028:"TransparencyIndicator",34029:"ColorCharacterization",34030:"HCUsage",34031:"TrapIndicator",34032:"CMYKEquivalent",34118:"SEMInfo",34152:"AFCP_IPTC",34232:"PixelMagicJBIGOptions",34264:"ModelTransform",34306:"WB_GRGBLevels",34310:"LeafData",34377:"PhotoshopSettings",34665:"ExifOffset",34675:"ICC_Profile",34687:"TIFF_FXExtensions",34688:"MultiProfiles",34689:"SharedData",34690:"T88Options",34732:"ImageLayer",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34850:"ExposureProgram",34852:"SpectralSensitivity",34853:"GPSInfo",34855:"ISO",34856:"Opto-ElectricConvFactor",34857:"Interlace",34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:"SensitivityType",34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",34908:"FaxRecvParams",34909:"FaxSubAddress",34910:"FaxRecvTime",34954:"LeafSubIFD",36864:"ExifVersion",36867:"DateTimeOriginal",36868:"CreateDate",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureCompensation",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37386:"FocalLength",37387:"FlashEnergy",37388:"SpatialFrequencyResponse",37389:"Noise",37390:"FocalPlaneXResolution",37391:"FocalPlaneYResolution",37392:"FocalPlaneResolutionUnit",37393:"ImageNumber",37394:"SecurityClassification",37395:"ImageHistory",37396:"SubjectArea",37397:"ExposureIndex",37398:"TIFF-EPStandardID",37399:"SensingMethod",37434:"CIP3DataFile",37435:"CIP3Sheet",37436:"CIP3Side",37439:"StoNits",37500:"MakerNote",37510:"UserComment",37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37679:"MSDocumentText",37680:"MSPropertySetStorage",37681:"MSDocumentTextPosition",37724:"ImageSourceData",40091:"XPTitle",40092:"XPComment",40093:"XPAuthor",40094:"XPKeywords",40095:"XPSubject",40960:"FlashpixVersion",40961:"ColorSpace",40962:"ExifImageWidth",40963:"ExifImageHeight",40964:"RelatedSoundFile",40965:"InteropOffset",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41485:"Noise",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41489:"ImageNumber",41490:"SecurityClassification",41491:"ImageHistory",41492:"SubjectLocation",41493:"ExposureIndex",41494:"TIFF-EPStandardID",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRatio",41989:"FocalLengthIn35mmFormat",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",42016:"ImageUniqueID",42032:"OwnerName",42033:"SerialNumber",42034:"LensInfo",42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42112:"GDALMetadata",42113:"GDALNoData",42240:"Gamma",44992:"ExpandSoftware",44993:"ExpandLens",44994:"ExpandFilm",44995:"ExpandFilterLens",44996:"ExpandScanner",44997:"ExpandFlashLamp",48129:"PixelFormat",48130:"Transformation",48131:"Uncompressed",48132:"ImageType",48256:"ImageWidth",48257:"ImageHeight",48258:"WidthResolution",48259:"HeightResolution",48320:"ImageOffset",48321:"ImageByteCount",48322:"AlphaOffset",48323:"AlphaByteCount",48324:"ImageDataDiscard",48325:"AlphaDataDiscard",50215:"OceScanjobDesc",50216:"OceApplicationSelector",50217:"OceIDNumber",50218:"OceImageLogic",50255:"Annotations",50341:"PrintIM",50560:"USPTOOriginalContentType",50706:"DNGVersion",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50710:"CFAPlaneColor",50711:"CFALayout",50712:"LinearizationTable",50713:"BlackLevelRepeatDim",50714:"BlackLevel",50715:"BlackLevelDeltaH",50716:"BlackLevelDeltaV",50717:"WhiteLevel",50718:"DefaultScale",50719:"DefaultCropOrigin",50720:"DefaultCropSize",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50733:"BayerGreenSplit",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50737:"ChromaBlurRadius",50738:"AntiAliasStrength",50739:"ShadowScale",50740:"DNGPrivateData",50741:"MakerNoteSafety",50752:"RawImageSegmentation",50778:"CalibrationIlluminant1",50779:"CalibrationIlluminant2",50780:"BestQualityScale",50781:"RawDataUniqueID",50784:"AliasLayerMetadata",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50829:"ActiveArea",50830:"MaskedAreas",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"ColorimetricReference",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50935:"NoiseReductionApplied",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:"ProfileEmbedPolicy",50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:"PreviewColorSpace",50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50974:"SubTileBlockSize",50975:"RowInterleaveFactor",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51008:"OpcodeList1",51009:"OpcodeList2",51022:"OpcodeList3",51041:"NoiseProfile",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:"ProfileHueSatMapEncoding",51108:"ProfileLookTableEncoding",51109:"BaselineExposureOffset",51110:"DefaultBlackRender",51111:"NewRawImageDigest",51112:"RawToPreviewGain",51125:"DefaultUserCrop",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65024:"KDC_IFD",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"},gps:{0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential",31:"GPSHPositioningError"}})}var jpeg=jpeg$1,exif=exif$2,simplify=simplify$1;function ExifResult(e,t,r,n,i,a,o){this.startMarker=e,this.tags=t,this.imageSize=r,this.thumbnailOffset=n,this.thumbnailLength=i,this.thumbnailType=a,this.app1Offset=o}function Parser$1(e){this.stream=e,this.flags={readBinaryTags:!1,resolveTagNames:!0,simplifyValues:!0,imageSize:!0,hidePointers:!0,returnTags:!0}}ExifResult.prototype={hasThumbnail:function(e){return!(!this.thumbnailOffset||!this.thumbnailLength||"string"==typeof e&&("image/jpeg"===e.toLowerCase().trim()?6!==this.thumbnailType:"image/tiff"!==e.toLowerCase().trim()||1!==this.thumbnailType))},getThumbnailOffset:function(){return this.app1Offset+6+this.thumbnailOffset},getThumbnailLength:function(){return this.thumbnailLength},getThumbnailBuffer:function(){return this._getThumbnailStream().nextBuffer(this.thumbnailLength)},_getThumbnailStream:function(){return this.startMarker.openWithOffset(this.getThumbnailOffset())},getImageSize:function(){return this.imageSize},getThumbnailSize:function(){var e,t=this._getThumbnailStream();return jpeg.parseSections(t,function(t,r){"SOF"===jpeg.getSectionName(t).name&&(e=jpeg.getSizeFromSOFSection(r))}),e}},Parser$1.prototype={enableBinaryFields:function(e){return this.flags.readBinaryTags=!!e,this},enablePointers:function(e){return this.flags.hidePointers=!e,this},enableTagNames:function(e){return this.flags.resolveTagNames=!!e,this},enableImageSize:function(e){return this.flags.imageSize=!!e,this},enableReturnTags:function(e){return this.flags.returnTags=!!e,this},enableSimpleValues:function(e){return this.flags.simplifyValues=!!e,this},parse:function(){var e,t,r,n,i,a,o,s,u,l=this.stream.mark(),c=l.openWithOffset(0),f=this.flags;return f.resolveTagNames&&(o=requireExifTags()),f.resolveTagNames?(e={},s=function(t){return e[t.name]},u=function(t,r){e[t.name]=r}):(e=[],s=function(t){var r;for(r=0;r<e.length;++r)if(e[r].type===t.type&&e[r].section===t.section)return e.value},u=function(t,r){var n;for(n=0;n<e.length;++n)if(e[n].type===t.type&&e[n].section===t.section)return void(e.value=r)}),jpeg.parseSections(c,function(s,u){var c=u.offsetFrom(l);225===s?exif.parseTags(u,function(t,a,s,u){if(f.readBinaryTags||7!==u){if(513===a){if(r=s[0],f.hidePointers)return}else if(514===a){if(n=s[0],f.hidePointers)return}else if(259===a&&(i=s[0],f.hidePointers))return;if(f.returnTags)if(f.simplifyValues&&(s=simplify.simplifyValue(s,u)),f.resolveTagNames){var l=(t===exif.GPSIFD?o.gps:o.exif)[a];l||(l=o.exif[a]),e.hasOwnProperty(l)||(e[l]=s)}else e.push({section:t,type:a,value:s})}})&&(a=c):f.imageSize&&"SOF"===jpeg.getSectionName(s).name&&(t=jpeg.getSizeFromSOFSection(u))}),f.simplifyValues&&(simplify.castDegreeValues(s,u),simplify.castDateValues(s,u)),new ExifResult(l,e,t,r,n,i,a)}};var parser=Parser$1,domBufferstream,hasRequiredDomBufferstream,bufferstream,hasRequiredBufferstream;function requireDomBufferstream(){if(hasRequiredDomBufferstream)return domBufferstream;function e(e,t,r,n,i,a){this.global=i,t=t||0,r=r||e.byteLength-t,this.arrayBuffer=e.slice(t,t+r),this.view=new i.DataView(this.arrayBuffer,0,this.arrayBuffer.byteLength),this.setBigEndian(n),this.offset=0,this.parentOffset=(a||0)+t}return hasRequiredDomBufferstream=1,e.prototype={setBigEndian:function(e){this.littleEndian=!e},nextUInt8:function(){var e=this.view.getUint8(this.offset);return this.offset+=1,e},nextInt8:function(){var e=this.view.getInt8(this.offset);return this.offset+=1,e},nextUInt16:function(){var e=this.view.getUint16(this.offset,this.littleEndian);return this.offset+=2,e},nextUInt32:function(){var e=this.view.getUint32(this.offset,this.littleEndian);return this.offset+=4,e},nextInt16:function(){var e=this.view.getInt16(this.offset,this.littleEndian);return this.offset+=2,e},nextInt32:function(){var e=this.view.getInt32(this.offset,this.littleEndian);return this.offset+=4,e},nextFloat:function(){var e=this.view.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e},nextDouble:function(){var e=this.view.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e},nextBuffer:function(e){var t=this.arrayBuffer.slice(this.offset,this.offset+e);return this.offset+=e,t},remainingLength:function(){return this.arrayBuffer.byteLength-this.offset},nextString:function(e){var t=this.arrayBuffer.slice(this.offset,this.offset+e);return t=String.fromCharCode.apply(null,new this.global.Uint8Array(t)),this.offset+=e,t},mark:function(){var t=this;return{openWithOffset:function(r){return r=(r||0)+this.offset,new e(t.arrayBuffer,r,t.arrayBuffer.byteLength-r,!t.littleEndian,t.global,t.parentOffset)},offset:this.offset,getParentOffset:function(){return t.parentOffset}}},offsetFrom:function(e){return this.parentOffset+this.offset-(e.offset+e.getParentOffset())},skip:function(e){this.offset+=e},branch:function(t,r){return r="number"==typeof r?r:this.arrayBuffer.byteLength-(this.offset+t),new e(this.arrayBuffer,this.offset+t,r,!this.littleEndian,this.global,this.parentOffset)}},domBufferstream=e}function requireBufferstream(){if(hasRequiredBufferstream)return bufferstream;function e(e,t,r,n){this.buffer=e,this.offset=t||0,r="number"==typeof r?r:e.length,this.endPosition=this.offset+r,this.setBigEndian(n)}return hasRequiredBufferstream=1,e.prototype={setBigEndian:function(e){this.bigEndian=!!e},nextUInt8:function(){var e=this.buffer.readUInt8(this.offset);return this.offset+=1,e},nextInt8:function(){var e=this.buffer.readInt8(this.offset);return this.offset+=1,e},nextUInt16:function(){var e=this.bigEndian?this.buffer.readUInt16BE(this.offset):this.buffer.readUInt16LE(this.offset);return this.offset+=2,e},nextUInt32:function(){var e=this.bigEndian?this.buffer.readUInt32BE(this.offset):this.buffer.readUInt32LE(this.offset);return this.offset+=4,e},nextInt16:function(){var e=this.bigEndian?this.buffer.readInt16BE(this.offset):this.buffer.readInt16LE(this.offset);return this.offset+=2,e},nextInt32:function(){var e=this.bigEndian?this.buffer.readInt32BE(this.offset):this.buffer.readInt32LE(this.offset);return this.offset+=4,e},nextFloat:function(){var e=this.bigEndian?this.buffer.readFloatBE(this.offset):this.buffer.readFloatLE(this.offset);return this.offset+=4,e},nextDouble:function(){var e=this.bigEndian?this.buffer.readDoubleBE(this.offset):this.buffer.readDoubleLE(this.offset);return this.offset+=8,e},nextBuffer:function(e){var t=this.buffer.slice(this.offset,this.offset+e);return this.offset+=e,t},remainingLength:function(){return this.endPosition-this.offset},nextString:function(e){var t=this.buffer.toString("utf8",this.offset,this.offset+e);return this.offset+=e,t},mark:function(){var t=this;return{openWithOffset:function(r){return r=(r||0)+this.offset,new e(t.buffer,r,t.endPosition-r,t.bigEndian)},offset:this.offset}},offsetFrom:function(e){return this.offset-e.offset},skip:function(e){this.offset+=e},branch:function(t,r){return r="number"==typeof r?r:this.endPosition-(this.offset+t),new e(this.buffer,this.offset+t,r,this.bigEndian)}},bufferstream=e}var Parser=parser;function getGlobal(){return(0,eval)("this")}var exifParser={create:function(e,t){if(e instanceof(t=t||getGlobal()).ArrayBuffer){var r=requireDomBufferstream();return new Parser(new r(e,0,e.byteLength,!0,t))}var n=requireBufferstream();return new Parser(new n(e,0,e.length,!0))}},EXIFParser=getDefaultExportFromCjs(exifParser);function getExifOrientation(e){const t=e._exif;return t&&t.tags&&t.tags.Orientation||1}function getExifOrientationTransformation(e){const t=e.bitmap.width,r=e.bitmap.height;switch(getExifOrientation(e)){case 1:default:return null;case 2:return function(e,r){return[t-e-1,r]};case 3:return function(e,n){return[t-e-1,r-n-1]};case 4:return function(e,t){return[e,r-t-1]};case 5:return function(e,t){return[t,e]};case 6:return function(e,t){return[t,r-e-1]};case 7:return function(e,n){return[t-n-1,r-e-1]};case 8:return function(e,r){return[t-r-1,e]}}}function transformBitmap(e,t,r,n){const i=e.bitmap.data,a=e.bitmap.width,o=Buffer.alloc(i.length);for(let e=0;e<t;e++)for(let s=0;s<r;s++){const[r,u]=n(e,s),l=t*s+e<<2,c=a*u+r<<2,f=i.readUInt32BE(c);o.writeUInt32BE(f,l)}e.bitmap.data=o,e.bitmap.width=t,e.bitmap.height=r,e._exif.tags.Orientation=1}function exifRotate(e){if(getExifOrientation(e)<2)return;const t=getExifOrientationTransformation(e),r=getExifOrientation(e)>4,n=r?e.bitmap.height:e.bitmap.width,i=r?e.bitmap.width:e.bitmap.height;t&&transformBitmap(e,n,i,t)}async function attemptExifRotate(e,t){try{e._exif=EXIFParser.create(t).parse(),exifRotate(e)}catch{}}var __defProp$2=Object.defineProperty,__defNormalProp$2=(e,t,r)=>t in e?__defProp$2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField$2=(e,t,r)=>__defNormalProp$2(e,"symbol"!=typeof t?t+"":t,r);const emptyBitmap={data:Buffer.alloc(0),width:0,height:0};function bufferFromArrayBuffer(e){const t=Buffer.alloc(e.byteLength),r=new Uint8Array(e);for(let e=0;e<t.length;++e)t[e]=r[e];return t}function createJimp({plugins:e,formats:t}={}){const r=e||[],n=(t||[]).map(e=>e()),i=class{constructor(e=emptyBitmap){if(__publicField$2(this,"bitmap",emptyBitmap),__publicField$2(this,"background",0),__publicField$2(this,"formats",[]),__publicField$2(this,"mime"),this.formats=n,"data"in e)this.bitmap=e;else if(this.bitmap={data:Buffer.alloc(e.width*e.height*4),width:e.width,height:e.height},e.color){this.background="string"==typeof e.color?cssColorToHex(e.color):e.color;for(let e=0;e<this.bitmap.data.length;e+=4)this.bitmap.data.writeUInt32BE(this.background,e)}for(const e of r)for(const t in e)this[t]=(...r)=>{const n=e[t]?.(this,...r);return"object"==typeof n&&"bitmap"in n?(this.bitmap=n.bitmap,this):n}}static async read(e,t){if(Buffer.isBuffer(e)||e instanceof ArrayBuffer)return this.fromBuffer(e);const[r,n]=await to(fetch(e));if(r)throw new Error(`Could not load Buffer from URL: ${e}`);if(!n.ok)throw new Error(`HTTP Status ${n.status} for url ${e}`);const[i,a]=await to(n.arrayBuffer());if(i)throw new Error(`Could not load Buffer from ${e}`);const o=bufferFromArrayBuffer(a);return this.fromBuffer(o,t)}static fromBitmap(e){let t;if(e.data instanceof Buffer&&(t=Buffer.from(e.data)),(e.data instanceof Uint8Array||e.data instanceof Uint8ClampedArray)&&(t=Buffer.from(e.data.buffer)),Array.isArray(e.data)&&(t=Buffer.concat(e.data.map(e=>Buffer.from(e.toString(16).padStart(8,"0"),"hex")))),!t)throw new Error("data must be a Buffer");if("number"!=typeof e.height||"number"!=typeof e.width)throw new Error("bitmap must have width and height");return new i({height:e.height,width:e.width,data:t})}static async fromBuffer(e,t){const r=e instanceof ArrayBuffer?bufferFromArrayBuffer(e):e,a=await fileType$1.fromBuffer(r);if(!a||!a.mime)throw new Error("Could not find MIME for Buffer");const o=n.find(e=>e.mime===a.mime);if(!o||!o.decode)throw new Error(`Mime type ${a.mime} does not support decoding`);const s=new i(await o.decode(r,t?.[o.mime]));return s.mime=a.mime,attemptExifRotate(s,r),s}inspect(){return"<Jimp "+(this.bitmap===emptyBitmap?"pending...":this.bitmap.width+"x"+this.bitmap.height)+">"}toString(){return"[object Jimp]"}get width(){return this.bitmap.width}get height(){return this.bitmap.height}async getBuffer(e,t){const r=this.formats.find(t=>t.mime===e);if(!r||!r.encode)throw new Error(`Unsupported MIME type: ${e}`);let n;return r.hasAlpha?n=this:(n=new i({width:this.bitmap.width,height:this.bitmap.height,color:this.background}),composite(n,this)),r.encode(n.bitmap,t)}async getBase64(e,t){return"data:"+e+";base64,"+(await this.getBuffer(e,t)).toString("base64")}async write(e,t){const r=mime.getType(e);await writeFile(e,await this.getBuffer(r,t))}clone(){return new i({...this.bitmap,data:Buffer.from(this.bitmap.data)})}getPixelIndex(e,t,r){let n,i;if(r||(r=Edge.EXTEND),"number"!=typeof e||"number"!=typeof t)throw new Error("x and y must be numbers");n=e=Math.round(e),i=t=Math.round(t),r===Edge.EXTEND&&(e<0&&(n=0),e>=this.bitmap.width&&(n=this.bitmap.width-1),t<0&&(i=0),t>=this.bitmap.height&&(i=this.bitmap.height-1)),r===Edge.WRAP&&(e<0&&(n=this.bitmap.width+e),e>=this.bitmap.width&&(n=e%this.bitmap.width),t<0&&(i=this.bitmap.height+t),t>=this.bitmap.height&&(i=t%this.bitmap.height));let a=this.bitmap.width*i+n<<2;return(n<0||n>=this.bitmap.width)&&(a=-1),(i<0||i>=this.bitmap.height)&&(a=-1),a}getPixelColor(e,t){if("number"!=typeof e||"number"!=typeof t)throw new Error("x and y must be numbers");const r=this.getPixelIndex(e,t);return this.bitmap.data.readUInt32BE(r)}setPixelColor(e,t,r){if("number"!=typeof e||"number"!=typeof t||"number"!=typeof r)throw new Error("hex, x and y must be numbers");const n=this.getPixelIndex(t,r);return this.bitmap.data.writeUInt32BE(e,n),this}hasAlpha(){const{width:e,height:t,data:r}=this.bitmap,n=e*t<<2;for(let e=3;e<n;e+=4)if(255!==r[e])return!0;return!1}composite(e,t=0,r=0,n={}){return composite(this,e,t,r,n)}scan(e,t,r,n,i){return scan(this,e,t,r,n,i)}scanIterator(e=0,t=0,r=this.bitmap.width,n=this.bitmap.height){if("number"!=typeof e||"number"!=typeof t)throw new Error("x and y must be numbers");if("number"!=typeof r||"number"!=typeof n)throw new Error("w and h must be numbers");return scanIterator(this,e,t,r,n)}};return i}var ResizeStrategy,ResizeStrategy2;function Resize(e,t,r,n,i,a,o){this.widthOriginal=Math.abs(Math.floor(e)||0),this.heightOriginal=Math.abs(Math.floor(t)||0),this.targetWidth=Math.abs(Math.floor(r)||0),this.targetHeight=Math.abs(Math.floor(n)||0),this.colorChannels=i?4:3,this.interpolationPass=Boolean(a),this.resizeCallback="function"==typeof o?o:function(){},this.targetWidthMultipliedByChannels=this.targetWidth*this.colorChannels,this.originalWidthMultipliedByChannels=this.widthOriginal*this.colorChannels,this.originalHeightMultipliedByChannels=this.heightOriginal*this.colorChannels,this.widthPassResultSize=this.targetWidthMultipliedByChannels*this.heightOriginal,this.finalResultSize=this.targetWidthMultipliedByChannels*this.targetHeight,this.initialize()}ResizeStrategy2=ResizeStrategy||(ResizeStrategy={}),ResizeStrategy2.NEAREST_NEIGHBOR="nearestNeighbor",ResizeStrategy2.BILINEAR="bilinearInterpolation",ResizeStrategy2.BICUBIC="bicubicInterpolation",ResizeStrategy2.HERMITE="hermiteInterpolation",ResizeStrategy2.BEZIER="bezierInterpolation",Resize.prototype.initialize=function(){if(!(this.widthOriginal>0&&this.heightOriginal>0&&this.targetWidth>0&&this.targetHeight>0))throw console.log(this),new Error("Invalid settings specified for the resizer.");this.configurePasses()},Resize.prototype.configurePasses=function(){this.widthOriginal===this.targetWidth?this.resizeWidth=this.bypassResizer:(this.ratioWeightWidthPass=this.widthOriginal/this.targetWidth,this.ratioWeightWidthPass<1&&this.interpolationPass?(this.initializeFirstPassBuffers(!0),this.resizeWidth=4===this.colorChannels?this.resizeWidthInterpolatedRGBA:this.resizeWidthInterpolatedRGB):(this.initializeFirstPassBuffers(!1),this.resizeWidth=4===this.colorChannels?this.resizeWidthRGBA:this.resizeWidthRGB)),this.heightOriginal===this.targetHeight?this.resizeHeight=this.bypassResizer:(this.ratioWeightHeightPass=this.heightOriginal/this.targetHeight,this.ratioWeightHeightPass<1&&this.interpolationPass?(this.initializeSecondPassBuffers(!0),this.resizeHeight=this.resizeHeightInterpolated):(this.initializeSecondPassBuffers(!1),this.resizeHeight=4===this.colorChannels?this.resizeHeightRGBA:this.resizeHeightRGB))},Resize.prototype._resizeWidthInterpolatedRGBChannels=function(e,t){const r=t?4:3,n=this.ratioWeightWidthPass,i=this.widthBuffer;let a,o,s=0,u=0,l=0,c=0,f=0;for(a=0;s<1/3;a+=r,s+=n)for(u=a,l=0;u<this.widthPassResultSize;l+=this.originalWidthMultipliedByChannels,u+=this.targetWidthMultipliedByChannels)i[u]=e[l],i[u+1]=e[l+1],i[u+2]=e[l+2],t&&(i[u+3]=e[l+3]);for(s-=1/3,o=this.widthOriginal-1;s<o;a+=r,s+=n)for(f=s%1,c=1-f,u=a,l=Math.floor(s)*r;u<this.widthPassResultSize;l+=this.originalWidthMultipliedByChannels,u+=this.targetWidthMultipliedByChannels)i[u+0]=e[l+0]*c+e[l+r+0]*f,i[u+1]=e[l+1]*c+e[l+r+1]*f,i[u+2]=e[l+2]*c+e[l+r+2]*f,t&&(i[u+3]=e[l+3]*c+e[l+r+3]*f);for(o=this.originalWidthMultipliedByChannels-r;a<this.targetWidthMultipliedByChannels;a+=r)for(u=a,l=o;u<this.widthPassResultSize;l+=this.originalWidthMultipliedByChannels,u+=this.targetWidthMultipliedByChannels)i[u]=e[l],i[u+1]=e[l+1],i[u+2]=e[l+2],t&&(i[u+3]=e[l+3]);return i},Resize.prototype._resizeWidthRGBChannels=function(e,t){const r=t?4:3,n=this.ratioWeightWidthPass,i=1/n,a=this.originalWidthMultipliedByChannels-r+1,o=this.targetWidthMultipliedByChannels-r+1,s=this.outputWidthWorkBench,u=this.widthBuffer,l=this.outputWidthWorkBenchOpaquePixelsCount;let c=0,f=0,h=0,d=0,p=0,m=0,g=0,b=1,y=0,_=0,v=0,w=0;do{for(p=0;p<this.originalHeightMultipliedByChannels;)s[p++]=0,s[p++]=0,s[p++]=0,t&&(s[p++]=0,l[p/r-1]=0);c=n;do{for(f=1+h-d,b=Math.min(c,f),p=0,m=h;p<this.originalHeightMultipliedByChannels;m+=a)y=e[m],_=e[++m],v=e[++m],w=t?e[++m]:255,s[p++]+=(w?y:0)*b,s[p++]+=(w?_:0)*b,s[p++]+=(w?v:0)*b,t&&(s[p++]+=w*b,l[p/r-1]+=w?b:0);if(!(c>=f)){d+=c;break}h+=r,d=h,c-=f}while(c>0&&h<this.originalWidthMultipliedByChannels);for(p=0,m=g;p<this.originalHeightMultipliedByChannels;m+=o)c=t?l[p/r]:1,b=t?c?1/c:0:i,u[m]=s[p++]*b,u[++m]=s[p++]*b,u[++m]=s[p++]*b,t&&(u[++m]=s[p++]*i);g+=r}while(g<this.targetWidthMultipliedByChannels);return u},Resize.prototype._resizeHeightRGBChannels=function(e,t){const r=this.ratioWeightHeightPass,n=1/r,i=this.outputHeightWorkBench,a=this.heightBuffer,o=this.outputHeightWorkBenchOpaquePixelsCount;let s=0,u=0,l=0,c=0,f=0,h=0,d=0,p=1,m=0,g=0,b=0,y=0;do{for(f=0;f<this.targetWidthMultipliedByChannels;)i[f++]=0,i[f++]=0,i[f++]=0,t&&(i[f++]=0,o[f/4-1]=0);s=r;do{for(u=1+l-c,p=Math.min(s,u),d=l,f=0;f<this.targetWidthMultipliedByChannels;)m=e[d++],g=e[d++],b=e[d++],y=t?e[d++]:255,i[f++]+=(y?m:0)*p,i[f++]+=(y?g:0)*p,i[f++]+=(y?b:0)*p,t&&(i[f++]+=y*p,o[f/4-1]+=y?p:0);if(!(s>=u)){c+=s;break}l=d,c=l,s-=u}while(s>0&&l<this.widthPassResultSize);for(f=0;f<this.targetWidthMultipliedByChannels;)s=t?o[f/4]:1,p=t?s?1/s:0:n,a[h++]=Math.round(i[f++]*p),a[h++]=Math.round(i[f++]*p),a[h++]=Math.round(i[f++]*p),t&&(a[h++]=Math.round(i[f++]*n))}while(h<this.finalResultSize);return a},Resize.prototype.resizeWidthInterpolatedRGB=function(e){return this._resizeWidthInterpolatedRGBChannels(e,!1)},Resize.prototype.resizeWidthInterpolatedRGBA=function(e){return this._resizeWidthInterpolatedRGBChannels(e,!0)},Resize.prototype.resizeWidthRGB=function(e){return this._resizeWidthRGBChannels(e,!1)},Resize.prototype.resizeWidthRGBA=function(e){return this._resizeWidthRGBChannels(e,!0)},Resize.prototype.resizeHeightInterpolated=function(e){const t=this.ratioWeightHeightPass,r=this.heightBuffer;let n,i=0,a=0,o=0,s=0,u=0,l=0,c=0;for(;i<1/3;i+=t)for(o=0;o<this.targetWidthMultipliedByChannels;)r[a++]=Math.round(e[o++]);for(i-=1/3,n=this.heightOriginal-1;i<n;i+=t)for(c=i%1,l=1-c,s=Math.floor(i)*this.targetWidthMultipliedByChannels,u=s+this.targetWidthMultipliedByChannels,o=0;o<this.targetWidthMultipliedByChannels;++o)r[a++]=Math.round(e[s++]*l+e[u++]*c);for(;a<this.finalResultSize;)for(o=0,s=n*this.targetWidthMultipliedByChannels;o<this.targetWidthMultipliedByChannels;++o)r[a++]=Math.round(e[s++]);return r},Resize.prototype.resizeHeightRGB=function(e){return this._resizeHeightRGBChannels(e,!1)},Resize.prototype.resizeHeightRGBA=function(e){return this._resizeHeightRGBChannels(e,!0)},Resize.prototype.resize=function(e){this.resizeCallback(this.resizeHeight(this.resizeWidth(e)))},Resize.prototype.bypassResizer=function(e){return e},Resize.prototype.initializeFirstPassBuffers=function(e){this.widthBuffer=this.generateFloatBuffer(this.widthPassResultSize),e||(this.outputWidthWorkBench=this.generateFloatBuffer(this.originalHeightMultipliedByChannels),this.colorChannels>3&&(this.outputWidthWorkBenchOpaquePixelsCount=this.generateFloat64Buffer(this.heightOriginal)))},Resize.prototype.initializeSecondPassBuffers=function(e){this.heightBuffer=this.generateUint8Buffer(this.finalResultSize),e||(this.outputHeightWorkBench=this.generateFloatBuffer(this.targetWidthMultipliedByChannels),this.colorChannels>3&&(this.outputHeightWorkBenchOpaquePixelsCount=this.generateFloat64Buffer(this.targetWidth)))},Resize.prototype.generateFloatBuffer=function(e){try{return new Float32Array(e)}catch(e){return console.error(e),[]}},Resize.prototype.generateFloat64Buffer=function(e){try{return new Float64Array(e)}catch(e){return console.error(e),[]}},Resize.prototype.generateUint8Buffer=function(e){try{return new Uint8Array(e)}catch(e){return console.error(e),[]}};const operations={nearestNeighbor(e,t){const r=e.width,n=e.height,i=t.width,a=t.height,o=e.data,s=t.data;for(let e=0;e<a;e++)for(let t=0;t<i;t++){let u=4*(e*i+t),l=4*(Math.floor(e*n/a)*r+Math.floor(t*r/i));s[u++]=o[l++],s[u++]=o[l++],s[u++]=o[l++],s[u++]=o[l++]}},bilinearInterpolation(e,t){const r=e.width,n=e.height,i=t.width,a=t.height,o=e.data,s=t.data,u=function(e,t,r,n,i){return t===n?r:Math.round((e-t)*i+(n-e)*r)},l=function(e,t,n,i,a,l,c,f){let h=4*(c*r+i)+t,d=4*(c*r+a)+t;const p=u(n,i,o[h],a,o[d]);if(f===c)s[e+t]=p;else{h=4*(f*r+i)+t,d=4*(f*r+a)+t;const m=u(n,i,o[h],a,o[d]);s[e+t]=u(l,c,p,f,m)}};for(let e=0;e<a;e++)for(let t=0;t<i;t++){const o=4*(e*i+t),s=t*r/i,u=Math.floor(s),c=Math.min(Math.ceil(s),r-1),f=e*n/a,h=Math.floor(f),d=Math.min(Math.ceil(f),n-1);l(o,0,s,u,c,f,h,d),l(o,1,s,u,c,f,h,d),l(o,2,s,u,c,f,h,d),l(o,3,s,u,c,f,h,d)}},_interpolate2D(e,t,r,n){const i=e.data,a=t.data,o=e.width,s=e.height,u=t.width,l=t.height,c=Math.max(1,Math.floor(o/u)),f=u*c,h=Math.max(1,Math.floor(s/l)),d=l*h,p=Buffer.alloc(f*s*4);for(let e=0;e<s;e++)for(let t=0;t<f;t++){const r=t*(o-1)/f,a=Math.floor(r),s=r-a,u=4*(e*o+a),l=4*(e*f+t);for(let e=0;e<4;e++){const t=u+e,r=a>0?i[t-4]:2*i[t]-i[t+4],c=i[t],f=i[t+4],h=a<o-2?i[t+8]:2*i[t+4]-i[t];p[l+e]=n(r,c,f,h,s)}}const m=Buffer.alloc(f*d*4);for(let e=0;e<d;e++)for(let t=0;t<f;t++){const r=e*(s-1)/d,i=Math.floor(r),a=r-i,o=4*(i*f+t),u=4*(e*f+t);for(let e=0;e<4;e++){const t=o+e,r=i>0?p[t-4*f]:2*p[t]-p[t+4*f],l=p[t],c=p[t+4*f],h=i<s-2?p[t+8*f]:2*p[t+4*f]-p[t];m[u+e]=n(r,l,c,h,a)}}const g=c*h;if(g>1)for(let e=0;e<l;e++)for(let t=0;t<u;t++){let r=0,n=0,i=0,o=0,s=0;for(let a=0;a<h;a++){const u=e*h+a;for(let e=0;e<c;e++){const a=4*(u*f+(t*c+e)),l=m[a+3];l&&(r+=m[a],n+=m[a+1],i+=m[a+2],s++),o+=l}}const l=4*(e*u+t);a[l]=s?Math.round(r/s):0,a[l+1]=s?Math.round(n/s):0,a[l+2]=s?Math.round(i/s):0,a[l+3]=Math.round(o/g)}else t.data=m},bicubicInterpolation(e,t,r){return this._interpolate2D(e,t,r,function(e,t,r,n,i){const a=n-r-e+t,o=e-t-a,s=r-e,u=t;return Math.max(0,Math.min(255,a*(i*i*i)+o*(i*i)+s*i+u))})},hermiteInterpolation(e,t,r){return this._interpolate2D(e,t,r,function(e,t,r,n,i){const a=t,o=.5*(r-e),s=e-2.5*t+2*r-.5*n,u=.5*(n-e)+1.5*(t-r);return Math.max(0,Math.min(255,Math.round(((u*i+s)*i+o)*i+a)))})},bezierInterpolation(e,t,r){return this._interpolate2D(e,t,r,function(e,t,r,n,i){const a=1-i,o=t*a*a*a,s=3*(t+(r-e)/4)*a*a*i,u=3*(r-(n-t)/4)*a*i*i,l=r*i*i*i;return Math.max(0,Math.min(255,Math.round(o+s+u+l)))})}},ResizeOptionsSchema=z.union([z.object({w:z.number().min(0),h:z.number().min(0).optional(),mode:z.nativeEnum(ResizeStrategy).optional()}),z.object({w:z.number().min(0).optional(),h:z.number().min(0),mode:z.nativeEnum(ResizeStrategy).optional()})]),ScaleToFitOptionsSchema=z.object({w:z.number().min(0),h:z.number().min(0),mode:z.nativeEnum(ResizeStrategy).optional()}),ScaleComplexOptionsSchema=z.object({f:z.number().min(0),mode:z.nativeEnum(ResizeStrategy).optional()}),methods$d={resize(e,t){const{mode:r}=ResizeOptionsSchema.parse(t);let n,i;if("number"==typeof t.w)n=t.w,i=t.h??e.bitmap.height*(n/e.bitmap.width);else{if("number"!=typeof t.h)throw new Error("w must be a number");i=t.h,n=t.w??e.bitmap.width*(i/e.bitmap.height)}if(n=Math.round(n)||1,i=Math.round(i)||1,r&&"function"==typeof operations[r]){const t={data:Buffer.alloc(n*i*4),width:n,height:i};operations[r](e.bitmap,t),e.bitmap=t}else new Resize(e.bitmap.width,e.bitmap.height,n,i,!0,!0,t=>{e.bitmap.data=Buffer.from(t),e.bitmap.width=n,e.bitmap.height=i}).resize(e.bitmap.data);return e},scale(e,t){const{f:r,mode:n}="number"==typeof t?{f:t}:ScaleComplexOptionsSchema.parse(t),i=e.bitmap.width*r,a=e.bitmap.height*r;return this.resize(e,{w:i,h:a,mode:n})},scaleToFit(e,t){const{h:r,w:n,mode:i}=ScaleToFitOptionsSchema.parse(t),a=n/r>e.bitmap.width/e.bitmap.height?r/e.bitmap.height:n/e.bitmap.width;return this.scale(e,{f:a,mode:i})}},ContainOptionsSchema=z.object({w:z.number(),h:z.number(),align:z.number().optional(),mode:z.nativeEnum(ResizeStrategy).optional()}),methods$c={contain(e,t){const{w:r,h:n,align:i=HorizontalAlign.CENTER|VerticalAlign.MIDDLE,mode:a}=ContainOptionsSchema.parse(t),o=7&i,s=i>>3;if((0===o||o&o-1)&&(0===s||s&s-1))throw new Error("only use one flag per alignment direction");const u=o>>1,l=s>>1,c=r/n>e.bitmap.width/e.bitmap.height?n/e.bitmap.height:r/e.bitmap.width,f=methods$d.scale(clone(e),{f:c,mode:a});return(e=methods$d.resize(e,{w:r,h:n,mode:a})).scan((t,r,n)=>{e.bitmap.data.writeUInt32BE(e.background,n)}),e=methods$h.blit(e,{src:f,x:(e.bitmap.width-f.bitmap.width)/2*u,y:(e.bitmap.height-f.bitmap.height)/2*l})}},CropOptionsSchema=z.object({x:z.number(),y:z.number(),w:z.number(),h:z.number()}),AutocropComplexOptionsSchema=z.object({tolerance:z.number().min(0).max(1).optional(),cropOnlyFrames:z.boolean().optional(),cropSymmetric:z.boolean().optional(),leaveBorder:z.number().optional(),ignoreSides:z.object({north:z.boolean().optional(),south:z.boolean().optional(),east:z.boolean().optional(),west:z.boolean().optional()}).optional()}),methods$b={crop(e,t){let{x:r,y:n,w:i,h:a}=CropOptionsSchema.parse(t);if(r=Math.round(r),n=Math.round(n),i=Math.round(i),a=Math.round(a),0===r&&i===e.bitmap.width){const t=i*n+r<<2,o=t+(a*i<<2);e.bitmap.data=e.bitmap.data.slice(t,o)}else{const t=Buffer.allocUnsafe(i*a*4);let o=0;scan(e,r,n,i,a,function(r,n,i){const a=e.bitmap.data.readUInt32BE(i);t.writeUInt32BE(a,o),o+=4}),e.bitmap.data=t}return e.bitmap.width=i,e.bitmap.height=a,e},autocrop(e,t={}){const{tolerance:r=2e-4,cropOnlyFrames:n=!0,cropSymmetric:i=!1,leaveBorder:a=0,ignoreSides:o}="number"==typeof t?{tolerance:t}:AutocropComplexOptionsSchema.parse(t),s=e.bitmap.width,u=e.bitmap.height,l={north:!1,south:!1,east:!1,west:!1,...o};let c=e.getPixelColor(0,0);const f=intToRGBA$1(c);let h=0,d=0,p=0,m=0;if(c=e.getPixelColor(0,0),!l.north)e:for(let t=0;t<u-1;t++){for(let n=0;n<s;n++)if(colorDiff(f,intToRGBA$1(e.getPixelColor(n,t)))>r)break e;h++}if(c=e.getPixelColor(s,0),!l.west)e:for(let t=0;t<s-1;t++){for(let n=0+h;n<u;n++)if(colorDiff(f,intToRGBA$1(e.getPixelColor(t,n)))>r)break e;m++}if(c=e.getPixelColor(0,u),!l.south)e:for(let t=u-1;t>=h+1;t--){for(let n=s-d-1;n>=0;n--)if(colorDiff(f,intToRGBA$1(e.getPixelColor(n,t)))>r)break e;p++}if(c=e.getPixelColor(s,u),!l.east)e:for(let t=s-1;t>=0+m+1;t--){for(let n=u-1;n>=0+h;n--)if(colorDiff(f,intToRGBA$1(e.getPixelColor(t,n)))>r)break e;d++}let g=!1;if(m-=a,d-=a,h-=a,p-=a,i){const e=Math.min(d,m),t=Math.min(h,p);m=e,d=e,h=t,p=t}m=m>=0?m:0,d=d>=0?d:0,h=h>=0?h:0,p=p>=0?p:0;const b=s-(m+d),y=u-(p+h);return g=n?0!==d&&0!==h&&0!==m&&0!==p:0!==d||0!==h||0!==m||0!==p,g&&this.crop(e,{x:m,y:h,w:b,h:y}),e}},CoverOptionsSchema=z.object({w:z.number(),h:z.number(),align:z.number().optional(),mode:z.nativeEnum(ResizeStrategy).optional()}),methods$a={cover(e,t){const{w:r,h:n,align:i=HorizontalAlign.CENTER|VerticalAlign.MIDDLE,mode:a}=CoverOptionsSchema.parse(t),o=7&i,s=i>>3;if((0===o||o&o-1)&&(0===s||s&s-1))throw new Error("only use one flag per alignment direction");const u=o>>1,l=s>>1,c=r/n>e.bitmap.width/e.bitmap.height?r/e.bitmap.width:n/e.bitmap.height;return e=methods$d.scale(e,{f:c,mode:a}),methods$b.crop(e,{x:(e.bitmap.width-r)/2*u,y:(e.bitmap.height-n)/2*l,w:r,h:n})}},DisplaceOptionsSchema=z.object({map:JimpClassSchema,offset:z.number()}),methods$9={displace(e,t){const{map:r,offset:n}=DisplaceOptionsSchema.parse(t),i=clone(e);return e.scan((t,a,o)=>{let s=r.bitmap.data[o]/256*n;s=Math.round(s);const u=e.getPixelIndex(t+s,a);e.bitmap.data[u]=i.bitmap.data[o],e.bitmap.data[u+1]=i.bitmap.data[o+1],e.bitmap.data[u+2]=i.bitmap.data[o+2]}),e}},methods$8={dither(e){const t=[1,9,3,11,13,5,15,7,4,12,2,10,16,8,14,6];return e.scan((r,n,i)=>{const a=t[((3&n)<<2)+r%4];e.bitmap.data[i]=Math.min(e.bitmap.data[i]+a,255),e.bitmap.data[i+1]=Math.min(e.bitmap.data[i+1]+a,255),e.bitmap.data[i+2]=Math.min(e.bitmap.data[i+2]+a,255)}),e}},FisheyeOptionsSchema=z.object({radius:z.number().min(0).optional()}),methods$7={fisheye(e,t={}){const{radius:r=2.5}=FisheyeOptionsSchema.parse(t),n=clone(e),{width:i,height:a}=n.bitmap;return n.scan((t,o)=>{const s=t/i,u=o/a,l=Math.sqrt(Math.pow(s-.5,2)+Math.pow(u-.5,2)),c=2*Math.pow(l,r),f=(s-.5)/l,h=(u-.5)/l,d=Math.round((c*f+.5)*i),p=Math.round((c*h+.5)*a),m=n.getPixelColor(d,p);e.setPixelColor(m,t,o)}),e.setPixelColor(n.getPixelColor(i/2,a/2),i/2,a/2),e}},FlipOptionsSchema=z.object({horizontal:z.boolean().optional(),vertical:z.boolean().optional()}),methods$6={flip(e,t){const{horizontal:r,vertical:n}=FlipOptionsSchema.parse(t),i=Buffer.alloc(e.bitmap.data.length);return e.scan((t,a,o)=>{const s=r?e.bitmap.width-1-t:t,u=n?e.bitmap.height-1-a:a,l=e.bitmap.width*u+s<<2,c=e.bitmap.data.readUInt32BE(o);i.writeUInt32BE(c,l)}),e.bitmap.data=Buffer.from(i),e}};function Converter$1(e,t){if(!(e&&t&&e.length&&t.length))throw new Error("Bad alphabet");this.srcAlphabet=e,this.dstAlphabet=t}Converter$1.prototype.convert=function(e){var t,r,n,i={},a=this.srcAlphabet.length,o=this.dstAlphabet.length,s=e.length,u="string"==typeof e?"":[];if(!this.isValid(e))throw new Error('Number "'+e+'" contains of non-alphabetic digits ('+this.srcAlphabet+")");if(this.srcAlphabet===this.dstAlphabet)return e;for(t=0;t<s;t++)i[t]=this.srcAlphabet.indexOf(e[t]);do{for(r=0,n=0,t=0;t<s;t++)(r=r*a+i[t])>=o?(i[n++]=parseInt(r/o,10),r%=o):n>0&&(i[n++]=0);s=n,u=this.dstAlphabet.slice(r,r+1).concat(u)}while(0!==n);return u},Converter$1.prototype.isValid=function(e){for(var t=0;t<e.length;++t)if(-1===this.srcAlphabet.indexOf(e[t]))return!1;return!0};var converter=Converter$1,Converter=converter;function anyBase(e,t){var r=new Converter(e,t);return function(e){return r.convert(e)}}anyBase.BIN="01",anyBase.OCT="01234567",anyBase.DEC="0123456789",anyBase.HEX="0123456789abcdef";var anyBase_1=anyBase,anyBase$1=getDefaultExportFromCjs(anyBase_1),__defProp$1=Object.defineProperty,__defNormalProp$1=(e,t,r)=>t in e?__defProp$1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__publicField$1=(e,t,r)=>__defNormalProp$1(e,"symbol"!=typeof t?t+"":t,r);class ImagePHash{constructor(e,t){__publicField$1(this,"size"),__publicField$1(this,"smallerSize"),this.size=e||32,this.smallerSize=t||8,initCoefficients(this.size)}distance(e,t){let r=0;for(let n=0;n<e.length;n++)e[n]!==t[n]&&r++;return r/e.length}getHash(e){e=methods$d.resize(clone(e),{w:this.size,h:this.size}),e=methods$e.greyscale(e);const t=[];for(let r=0;r<e.bitmap.width;r++){const n=[];for(let t=0;t<e.bitmap.height;t++)n[t]=intToRGBA(e.getPixelColor(r,t)).b;t[r]=n}const r=applyDCT(t,this.size);let n=0;for(let e=0;e<this.smallerSize;e++)for(let t=0;t<this.smallerSize;t++)n+=r[e][t];const i=n/(this.smallerSize*this.smallerSize);let a="";for(let e=0;e<this.smallerSize;e++)for(let t=0;t<this.smallerSize;t++)a+=r[e][t]>i?"1":"0";return a}}function intToRGBA(e){const t=255&e,r=255&(e>>>=8),n=255&(e>>>=8);return{r:255&(e>>>=8),g:n,b:r,a:t}}const c$1=[];function initCoefficients(e){for(let t=1;t<e;t++)c$1[t]=1;c$1[0]=1/Math.sqrt(2)}function applyDCT(e,t){const r=t,n=[];for(let t=0;t<r;t++){const i=[];for(let a=0;a<r;a++){let o=0;for(let n=0;n<r;n++)for(let i=0;i<r;i++)o+=Math.cos((2*n+1)/(2*r)*t*Math.PI)*Math.cos((2*i+1)/(2*r)*a*Math.PI)*e[n][i];o*=c$1[t]*c$1[a]/4,i[a]=o,n[t]=i}}return n}const alphabet="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_",maxHashLength=[NaN,NaN];for(let e=2;e<65;e++){const t=anyBase$1(anyBase$1.BIN,alphabet.slice(0,e))(new Array(65).join("1"));maxHashLength.push(t.length)}const methods$5={pHash:e=>(new ImagePHash).getHash(e),hash(e,t=64){if(t<2||t>64)throw new Error("base must be a number between 2 and 64");const r=alphabet.slice(0,t),n=this.pHash(e),i=maxHashLength[t];return anyBase$1(anyBase$1.BIN,r)(n).padStart(i,"0")},distanceFromHash(e,t){const r=new ImagePHash,n=r.getHash(e);return r.distance(n,t)}};function distance(e,t){const r=new ImagePHash,n=r.getHash(e),i=r.getHash(t);return r.distance(n,i)}function compareHashes(e,t){return(new ImagePHash).distance(e,t)}const MaskOptionsObjectSchema=z.object({src:JimpClassSchema,x:z.number().optional(),y:z.number().optional()}),MaskOptionsSchema=z.union([JimpClassSchema,MaskOptionsObjectSchema]),methods$4={mask(e,t){let r,n,i;MaskOptionsSchema.parse(t),"bitmap"in t?(r=t,n=0,i=0):(r=t.src,n=t.x??0,i=t.y??0),n=Math.round(n),i=Math.round(i);const a=e.bitmap.width,o=e.bitmap.height;return r.scan(function(t,s,u){const l=n+t,c=i+s;if(l>=0&&c>=0&&l<a&&c<o){const t=e.getPixelIndex(l,c),{data:n}=r.bitmap,i=(n[u+0]+n[u+1]+n[u+2])/3;e.bitmap.data[t+3]*=i/255}}),e}};function measureText(e,t){let r=0;for(let n=0;n<t.length;n++){const i=t[n],a=e.chars[i];if(a){const o=e.kernings[i],s=t[n+1],u=o&&s&&o[s]&&o[s]||0;r+=(a.xadvance||0)+u}}return r}function splitLines(e,t,r){const n=t.replace(/[\r\n]+/g," \n").split(" "),i=[];let a=[],o=0;return n.forEach(t=>{if(measureText(e,t+(n.length>1?" ":""))>r){const n=t[Symbol.iterator]();let o="";for(const t of n){const n=[...a,o+t].join(" "),s=measureText(e,n);s<r?o+=t:s>r?(i.push([...a,o]),a=[],o=t):(i.push([...a,o+t]),a=[],o="")}return}const s=[...a,t].join(" "),u=measureText(e,s);u<=r&&!t.includes("\n")?(u>o&&(o=u),a.push(t)):(i.push(a),a=[t.replace("\n","")])}),i.push(a),{lines:i,longestLine:o}}function measureTextHeight(e,t,r){const{lines:n}=splitLines(e,t,r);return n.length*e.common.lineHeight}const PrintOptionsSchema=z.object({x:z.number(),y:z.number(),text:z.union([z.union([z.string(),z.number()]),z.object({text:z.union([z.string(),z.number()]),alignmentX:z.nativeEnum(HorizontalAlign).optional(),alignmentY:z.nativeEnum(VerticalAlign).optional()})]),maxWidth:z.number().optional(),maxHeight:z.number().optional(),cb:z.function(z.tuple([z.object({x:z.number(),y:z.number()})])).optional()});function xOffsetBasedOnAlignment(e,t,r,n){return n===HorizontalAlign.LEFT?0:n===HorizontalAlign.CENTER?(r-measureText(e,t))/2:r-measureText(e,t)}function drawCharacter(e,t,r,n,i){if(i.width>0&&i.height>0){const a=t.pages[i.page];a&&(e=methods$h.blit(e,{src:a,x:r+i.xoffset,y:n+i.yoffset,srcX:i.x,srcY:i.y,srcW:i.width,srcH:i.height}))}return e}function printText(e,t,r,n,i,a){for(let o=0;o<i.length;o++){const s=i[o];let u;u=t.chars[s]?s:/\s/.test(s)?"":"?";const l=t.chars[u]||{xadvance:void 0},c=t.kernings[u];l&&drawCharacter(e,t,r,n,l);const f=i[o+1];r+=(c&&f&&c[f]&&c[f]||0)+(l.xadvance||a)}}const methods$3={print(e,{font:t,...r}){let n,i,{x:a,y:o,text:s,maxWidth:u=1/0,maxHeight:l=1/0,cb:c=()=>{}}=PrintOptionsSchema.parse(r);"object"==typeof s&&null!==s.text&&void 0!==s.text?(n=s.alignmentX||HorizontalAlign.LEFT,i=s.alignmentY||VerticalAlign.TOP,({text:s}=s)):(n=HorizontalAlign.LEFT,i=VerticalAlign.TOP,s=s.toString()),"number"==typeof s&&(s=s.toString()),l!==1/0&&i===VerticalAlign.BOTTOM?o+=l-measureTextHeight(t,s,u):l!==1/0&&i===VerticalAlign.MIDDLE&&(o+=l/2-measureTextHeight(t,s,u)/2);const f=Object.entries(t.chars).find(e=>e[1].xadvance)?.[1].xadvance;if("number"!=typeof f)throw new Error("Could not find default character width");const{lines:h,longestLine:d}=splitLines(t,s,u);return h.forEach(r=>{const i=r.join(" "),s=xOffsetBasedOnAlignment(t,i,u,n);printText(e,t,a+s,o,i,f),o+=t.common.lineHeight}),c.bind(e)({x:a+d,y:o}),e}},RotateOptionsSchema=z.union([z.number(),z.object({deg:z.number(),mode:z.union([z.boolean(),z.nativeEnum(ResizeStrategy)]).optional()})]);function createIdxTranslationFunction(e){return function(t,r){return r*e+t<<2}}function matrixRotate(e,t){if(Math.abs(t)%90!=0)throw new Error("Unsupported matrix rotation degree");const r=e.bitmap.width,n=e.bitmap.height;let i;switch(t){case 90:case-270:i=90;break;case 180:case-180:i=180;break;case 270:case-90:i=-90;break;default:throw new Error("Unsupported matrix rotation degree")}const a=180===i?r:n,o=180===i?n:r,s=Buffer.alloc(e.bitmap.data.length),u=createIdxTranslationFunction(r),l=createIdxTranslationFunction(a);for(let t=0;t<r;t++)for(let a=0;a<n;a++){const o=u(t,a),c=e.bitmap.data.readUInt32BE(o);let f;switch(i){case 90:f=l(a,r-t-1);break;case-90:f=l(n-a-1,t);break;case 180:f=l(r-t-1,n-a-1);break;default:throw new Error("Unsupported matrix rotation angle")}s.writeUInt32BE(c,f)}e.bitmap.data=s,e.bitmap.width=a,e.bitmap.height=o}function createTranslationFunction(e,t){return function(r,n){return{x:r+e,y:n+t}}}function advancedRotate(e,t,r){const n=t*Math.PI/180,i=Math.cos(n),a=Math.sin(n);let o=e.bitmap.width,s=e.bitmap.height;if(!0===r||"string"==typeof r){o=Math.ceil(Math.abs(e.bitmap.width*i)+Math.abs(e.bitmap.height*a))+1,s=Math.ceil(Math.abs(e.bitmap.width*a)+Math.abs(e.bitmap.height*i))+1,o%2!=0&&o++,s%2!=0&&s++;const t=clone(e);e.scan((t,r,n)=>{e.bitmap.data.writeUInt32BE(e.background,n)});const n=Math.max(o,s,e.bitmap.width,e.bitmap.height);e=composite(e=methods$d.resize(e,{h:n,w:n,mode:!0===r?void 0:r}),t,e.bitmap.width/2-t.bitmap.width/2,e.bitmap.height/2-t.bitmap.height/2)}const u=e.bitmap.width,l=e.bitmap.height,c=Buffer.alloc(e.bitmap.data.length),f=createTranslationFunction(-u/2,-l/2),h=createTranslationFunction(u/2+.5,l/2+.5);for(let t=1;t<=l;t++)for(let r=1;r<=u;r++){const n=f(r,t),o=h(i*n.x-a*n.y,i*n.y+a*n.x),s=u*(t-1)+r-1<<2;if(o.x>=0&&o.x<u&&o.y>=0&&o.y<l){const t=u*(0|o.y)+o.x<<2,r=e.bitmap.data.readUInt32BE(t);c.writeUInt32BE(r,s)}else c.writeUInt32BE(e.background,s)}if(e.bitmap.data=c,!0===r||"string"==typeof r){const t=Math.max(u/2-o/2,0),r=Math.max(l/2-s/2,0);e=methods$b.crop(e,{x:t,y:r,w:o,h:s})}}const methods$2={rotate(e,t){const r=RotateOptionsSchema.parse(t),n="number"==typeof r?{deg:r}:r,{mode:i=!0}=n;let{deg:a}=n;return a%=360,a%360==0||(a%90!=0||!i&&e.bitmap.width!==e.bitmap.height&&a%180!=0?advancedRotate(e,a,i):matrixRotate(e,a)),e}},ThresholdOptionsSchema=z.object({max:z.number().min(0).max(255),replace:z.number().min(0).max(255).optional(),autoGreyscale:z.boolean().optional()}),methods$1={threshold(e,t){let{max:r,replace:n=255,autoGreyscale:i=!0}=ThresholdOptionsSchema.parse(t);return r=limit255(r),n=limit255(n),i&&methods$e.greyscale(e),e.scan((t,i,a)=>{const o=e.bitmap.data[a]<r?e.bitmap.data[a]:n;e.bitmap.data[a]=o,e.bitmap.data[a+1]=o,e.bitmap.data[a+2]=o}),e}};var __defProp=Object.defineProperty,__defNormalProp=(e,t,r)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,__export=(e,t)=>{for(var r in t)__defProp(e,r,{get:t[r],enumerable:!0})},__publicField=(e,t,r)=>(__defNormalProp(e,"symbol"!=typeof t?t+"":t,r),r),constants_exports={};__export(constants_exports,{bt709:()=>bt709_exports});var bt709_exports={};__export(bt709_exports,{Y:()=>Y,x:()=>x$1,y:()=>y$1});var Y=(e=>(e[e.RED=.2126]="RED",e[e.GREEN=.7152]="GREEN",e[e.BLUE=.0722]="BLUE",e[e.WHITE=1]="WHITE",e))(Y||{}),x$1=(e=>(e[e.RED=.64]="RED",e[e.GREEN=.3]="GREEN",e[e.BLUE=.15]="BLUE",e[e.WHITE=.3127]="WHITE",e))(x$1||{}),y$1=(e=>(e[e.RED=.33]="RED",e[e.GREEN=.6]="GREEN",e[e.BLUE=.06]="BLUE",e[e.WHITE=.329]="WHITE",e))(y$1||{}),conversion_exports={};function correctGamma(e){return e>.04045?((e+.055)/1.055)**2.4:e/12.92}function rgb2xyz(e,t,r){return{x:.4124*(e=correctGamma(e/255))+.3576*(t=correctGamma(t/255))+.1805*(r=correctGamma(r/255)),y:.2126*e+.7152*t+.0722*r,z:.0193*e+.1192*t+.9505*r}}__export(conversion_exports,{lab2rgb:()=>lab2rgb,lab2xyz:()=>lab2xyz,rgb2hsl:()=>rgb2hsl,rgb2lab:()=>rgb2lab,rgb2xyz:()=>rgb2xyz,xyz2lab:()=>xyz2lab,xyz2rgb:()=>xyz2rgb});var arithmetic_exports={};function degrees2radians(e){return e*(Math.PI/180)}function max3(e,t,r){let n=e;return n<t&&(n=t),n<r&&(n=r),n}function min3(e,t,r){let n=e;return n>t&&(n=t),n>r&&(n=r),n}function intInRange(e,t,r){return e>r&&(e=r),e<t&&(e=t),0|e}function inRange0to255Rounded(e){return(e=Math.round(e))>255?e=255:e<0&&(e=0),e}function inRange0to255(e){return e>255?e=255:e<0&&(e=0),e}function stableSort(e,t){const r=typeof e[0];let n;if("number"===r||"string"===r){const r=Object.create(null);for(let t=0,n=e.length;t<n;t++){const n=e[t];r[n]||0===r[n]||(r[n]=t)}n=e.sort((e,n)=>t(e,n)||r[e]-r[n])}else{const r=e.slice(0);n=e.sort((e,n)=>t(e,n)||r.indexOf(e)-r.indexOf(n))}return n}function rgb2hsl(e,t,r){const n=min3(e,t,r),i=max3(e,t,r),a=i-n,o=(n+i)/510;let s=0;o>0&&o<1&&(s=a/(o<.5?i+n:510-i-n));let u=0;return a>0&&(u=i===e?(t-r)/a:i===t?2+(r-e)/a:4+(e-t)/a,u*=60,u<0&&(u+=360)),{h:u,s,l:o}}__export(arithmetic_exports,{degrees2radians:()=>degrees2radians,inRange0to255:()=>inRange0to255,inRange0to255Rounded:()=>inRange0to255Rounded,intInRange:()=>intInRange,max3:()=>max3,min3:()=>min3,stableSort:()=>stableSort});var refX=.95047,refY=1,refZ=1.08883;function pivot(e){return e>.008856?e**(1/3):7.787*e+16/116}function xyz2lab(e,t,r){if(e=pivot(e/refX),t=pivot(t/refY),r=pivot(r/refZ),116*t-16<0)throw new Error("xxx");return{L:Math.max(0,116*t-16),a:500*(e-t),b:200*(t-r)}}function rgb2lab(e,t,r){const n=rgb2xyz(e,t,r);return xyz2lab(n.x,n.y,n.z)}var refX2=.95047,refY2=1,refZ2=1.08883;function pivot2(e){return e>.206893034?e**3:(e-16/116)/7.787}function lab2xyz(e,t,r){const n=(e+16)/116,i=n-r/200;return{x:refX2*pivot2(t/500+n),y:refY2*pivot2(n),z:refZ2*pivot2(i)}}function correctGamma2(e){return e>.0031308?1.055*e**(1/2.4)-.055:12.92*e}function xyz2rgb(e,t,r){const n=correctGamma2(3.2406*e+-1.5372*t+-.4986*r),i=correctGamma2(-.9689*e+1.8758*t+.0415*r),a=correctGamma2(.0557*e+-.204*t+1.057*r);return{r:inRange0to255Rounded(255*n),g:inRange0to255Rounded(255*i),b:inRange0to255Rounded(255*a)}}function lab2rgb(e,t,r){const n=lab2xyz(e,t,r);return xyz2rgb(n.x,n.y,n.z)}var distance_exports={};__export(distance_exports,{AbstractDistanceCalculator:()=>AbstractDistanceCalculator,AbstractEuclidean:()=>AbstractEuclidean,AbstractManhattan:()=>AbstractManhattan,CIE94GraphicArts:()=>CIE94GraphicArts,CIE94Textiles:()=>CIE94Textiles,CIEDE2000:()=>CIEDE2000,CMetric:()=>CMetric,Euclidean:()=>Euclidean,EuclideanBT709:()=>EuclideanBT709,EuclideanBT709NoAlpha:()=>EuclideanBT709NoAlpha,Manhattan:()=>Manhattan,ManhattanBT709:()=>ManhattanBT709,ManhattanNommyde:()=>ManhattanNommyde,PNGQuant:()=>PNGQuant});var AbstractDistanceCalculator=class{constructor(){__publicField(this,"_maxDistance"),__publicField(this,"_whitePoint"),this._setDefaults(),this.setWhitePoint(255,255,255,255)}setWhitePoint(e,t,r,n){this._whitePoint={r:e>0?255/e:0,g:t>0?255/t:0,b:r>0?255/r:0,a:n>0?255/n:0},this._maxDistance=this.calculateRaw(e,t,r,n,0,0,0,0)}calculateNormalized(e,t){return this.calculateRaw(e.r,e.g,e.b,e.a,t.r,t.g,t.b,t.a)/this._maxDistance}},AbstractCIE94=class extends AbstractDistanceCalculator{calculateRaw(e,t,r,n,i,a,o,s){const u=rgb2lab(inRange0to255(e*this._whitePoint.r),inRange0to255(t*this._whitePoint.g),inRange0to255(r*this._whitePoint.b)),l=rgb2lab(inRange0to255(i*this._whitePoint.r),inRange0to255(a*this._whitePoint.g),inRange0to255(o*this._whitePoint.b)),c=u.L-l.L,f=u.a-l.a,h=u.b-l.b,d=Math.sqrt(u.a*u.a+u.b*u.b),p=d-Math.sqrt(l.a*l.a+l.b*l.b);let m=f*f+h*h-p*p;m=m<0?0:Math.sqrt(m);const g=(s-n)*this._whitePoint.a*this._kA;return Math.sqrt((c/this._Kl)**2+(p/(1+this._K1*d))**2+(m/(1+this._K2*d))**2+g**2)}},CIE94Textiles=class extends AbstractCIE94{_setDefaults(){this._Kl=2,this._K1=.048,this._K2=.014,this._kA=12.5/255}},CIE94GraphicArts=class extends AbstractCIE94{_setDefaults(){this._Kl=1,this._K1=.045,this._K2=.015,this._kA=25/255}},_CIEDE2000=class extends AbstractDistanceCalculator{_setDefaults(){}static _calculatehp(e,t){const r=Math.atan2(e,t);return r>=0?r:r+_CIEDE2000._deg360InRad}static _calculateRT(e,t){const r=t**7,n=2*Math.sqrt(r/(r+_CIEDE2000._pow25to7)),i=_CIEDE2000._deg30InRad*Math.exp(-(((e-_CIEDE2000._deg275InRad)/_CIEDE2000._deg25InRad)**2));return-Math.sin(2*i)*n}static _calculateT(e){return 1-.17*Math.cos(e-_CIEDE2000._deg30InRad)+.24*Math.cos(2*e)+.32*Math.cos(3*e+_CIEDE2000._deg6InRad)-.2*Math.cos(4*e-_CIEDE2000._deg63InRad)}static _calculate_ahp(e,t,r,n){const i=r+n;return 0===e?i:t<=_CIEDE2000._deg180InRad?i/2:i<_CIEDE2000._deg360InRad?(i+_CIEDE2000._deg360InRad)/2:(i-_CIEDE2000._deg360InRad)/2}static _calculate_dHp(e,t,r,n){let i;return i=0===e?0:t<=_CIEDE2000._deg180InRad?r-n:r<=n?r-n+_CIEDE2000._deg360InRad:r-n-_CIEDE2000._deg360InRad,2*Math.sqrt(e)*Math.sin(i/2)}calculateRaw(e,t,r,n,i,a,o,s){const u=rgb2lab(inRange0to255(e*this._whitePoint.r),inRange0to255(t*this._whitePoint.g),inRange0to255(r*this._whitePoint.b)),l=rgb2lab(inRange0to255(i*this._whitePoint.r),inRange0to255(a*this._whitePoint.g),inRange0to255(o*this._whitePoint.b)),c=(s-n)*this._whitePoint.a*_CIEDE2000._kA,f=this.calculateRawInLab(u,l);return Math.sqrt(f+c*c)}calculateRawInLab(e,t){const r=e.L,n=e.a,i=e.b,a=t.L,o=t.a,s=t.b,u=((Math.sqrt(n*n+i*i)+Math.sqrt(o*o+s*s))/2)**7,l=.5*(1-Math.sqrt(u/(u+_CIEDE2000._pow25to7))),c=(1+l)*n,f=(1+l)*o,h=Math.sqrt(c*c+i*i),d=Math.sqrt(f*f+s*s),p=h*d,m=_CIEDE2000._calculatehp(i,c),g=_CIEDE2000._calculatehp(s,f),b=Math.abs(m-g),y=a-r,_=d-h,v=_CIEDE2000._calculate_dHp(p,b,g,m),w=_CIEDE2000._calculate_ahp(p,b,m,g),x=(h+d)/2,k=((r+a)/2-50)**2,B=_/(1+.045*x),E=v/(1+.015*_CIEDE2000._calculateT(w)*x);return(y/(1+.015*k/Math.sqrt(20+k)))**2+B**2+E**2+_CIEDE2000._calculateRT(w,x)*B*E}},CIEDE2000=_CIEDE2000;__publicField(CIEDE2000,"_kA",25/255),__publicField(CIEDE2000,"_pow25to7",25**7),__publicField(CIEDE2000,"_deg360InRad",degrees2radians(360)),__publicField(CIEDE2000,"_deg180InRad",degrees2radians(180)),__publicField(CIEDE2000,"_deg30InRad",degrees2radians(30)),__publicField(CIEDE2000,"_deg6InRad",degrees2radians(6)),__publicField(CIEDE2000,"_deg63InRad",degrees2radians(63)),__publicField(CIEDE2000,"_deg275InRad",degrees2radians(275)),__publicField(CIEDE2000,"_deg25InRad",degrees2radians(25));var CMetric=class extends AbstractDistanceCalculator{calculateRaw(e,t,r,n,i,a,o,s){const u=(e+i)/2*this._whitePoint.r,l=(e-i)*this._whitePoint.r,c=(t-a)*this._whitePoint.g,f=(r-o)*this._whitePoint.b,h=((512+u)*l*l>>8)+4*c*c+((767-u)*f*f>>8),d=(s-n)*this._whitePoint.a;return Math.sqrt(h+d*d)}_setDefaults(){}},AbstractEuclidean=class extends AbstractDistanceCalculator{calculateRaw(e,t,r,n,i,a,o,s){const u=i-e,l=a-t,c=o-r,f=s-n;return Math.sqrt(this._kR*u*u+this._kG*l*l+this._kB*c*c+this._kA*f*f)}},Euclidean=class extends AbstractEuclidean{_setDefaults(){this._kR=1,this._kG=1,this._kB=1,this._kA=1}},EuclideanBT709=class extends AbstractEuclidean{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=1}},EuclideanBT709NoAlpha=class extends AbstractEuclidean{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=0}},AbstractManhattan=class extends AbstractDistanceCalculator{calculateRaw(e,t,r,n,i,a,o,s){let u=i-e,l=a-t,c=o-r,f=s-n;return u<0&&(u=0-u),l<0&&(l=0-l),c<0&&(c=0-c),f<0&&(f=0-f),this._kR*u+this._kG*l+this._kB*c+this._kA*f}},Manhattan=class extends AbstractManhattan{_setDefaults(){this._kR=1,this._kG=1,this._kB=1,this._kA=1}},ManhattanNommyde=class extends AbstractManhattan{_setDefaults(){this._kR=.4984,this._kG=.8625,this._kB=.2979,this._kA=1}},ManhattanBT709=class extends AbstractManhattan{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=1}},PNGQuant=class extends AbstractDistanceCalculator{calculateRaw(e,t,r,n,i,a,o,s){const u=(s-n)*this._whitePoint.a;return this._colordifferenceCh(e*this._whitePoint.r,i*this._whitePoint.r,u)+this._colordifferenceCh(t*this._whitePoint.g,a*this._whitePoint.g,u)+this._colordifferenceCh(r*this._whitePoint.b,o*this._whitePoint.b,u)}_colordifferenceCh(e,t,r){const n=e-t,i=n+r;return n*n+i*i}_setDefaults(){}},palette_exports={};__export(palette_exports,{AbstractPaletteQuantizer:()=>AbstractPaletteQuantizer,ColorHistogram:()=>ColorHistogram,NeuQuant:()=>NeuQuant,NeuQuantFloat:()=>NeuQuantFloat,RGBQuant:()=>RGBQuant,WuColorCube:()=>WuColorCube,WuQuant:()=>WuQuant});var AbstractPaletteQuantizer=class{quantizeSync(){for(const e of this.quantize())if(e.palette)return e.palette;throw new Error("unreachable")}},Point=class{constructor(){__publicField(this,"r"),__publicField(this,"g"),__publicField(this,"b"),__publicField(this,"a"),__publicField(this,"uint32"),__publicField(this,"rgba"),this.uint32=-1>>>0,this.r=this.g=this.b=this.a=0,this.rgba=new Array(4),this.rgba[0]=0,this.rgba[1]=0,this.rgba[2]=0,this.rgba[3]=0}static createByQuadruplet(e){const t=new Point;return t.r=0|e[0],t.g=0|e[1],t.b=0|e[2],t.a=0|e[3],t._loadUINT32(),t._loadQuadruplet(),t}static createByRGBA(e,t,r,n){const i=new Point;return i.r=0|e,i.g=0|t,i.b=0|r,i.a=0|n,i._loadUINT32(),i._loadQuadruplet(),i}static createByUint32(e){const t=new Point;return t.uint32=e>>>0,t._loadRGBA(),t._loadQuadruplet(),t}from(e){this.r=e.r,this.g=e.g,this.b=e.b,this.a=e.a,this.uint32=e.uint32,this.rgba[0]=e.r,this.rgba[1]=e.g,this.rgba[2]=e.b,this.rgba[3]=e.a}getLuminosity(e){let t=this.r,r=this.g,n=this.b;return e&&(t=Math.min(255,255-this.a+this.a*t/255),r=Math.min(255,255-this.a+this.a*r/255),n=Math.min(255,255-this.a+this.a*n/255)),.2126*t+.7152*r+.0722*n}_loadUINT32(){this.uint32=(this.a<<24|this.b<<16|this.g<<8|this.r)>>>0}_loadRGBA(){this.r=255&this.uint32,this.g=this.uint32>>>8&255,this.b=this.uint32>>>16&255,this.a=this.uint32>>>24&255}_loadQuadruplet(){this.rgba[0]=this.r,this.rgba[1]=this.g,this.rgba[2]=this.b,this.rgba[3]=this.a}},PointContainer=class{constructor(){__publicField(this,"_pointArray"),__publicField(this,"_width"),__publicField(this,"_height"),this._width=0,this._height=0,this._pointArray=[]}getWidth(){return this._width}getHeight(){return this._height}setWidth(e){this._width=e}setHeight(e){this._height=e}getPointArray(){return this._pointArray}clone(){const e=new PointContainer;e._width=this._width,e._height=this._height;for(let t=0,r=this._pointArray.length;t<r;t++)e._pointArray[t]=Point.createByUint32(0|this._pointArray[t].uint32);return e}toUint32Array(){const e=this._pointArray.length,t=new Uint32Array(e);for(let r=0;r<e;r++)t[r]=this._pointArray[r].uint32;return t}toUint8Array(){return new Uint8Array(this.toUint32Array().buffer)}static fromHTMLImageElement(e){const t=e.naturalWidth,r=e.naturalHeight,n=document.createElement("canvas");return n.width=t,n.height=r,n.getContext("2d").drawImage(e,0,0,t,r,0,0,t,r),PointContainer.fromHTMLCanvasElement(n)}static fromHTMLCanvasElement(e){const t=e.width,r=e.height,n=e.getContext("2d").getImageData(0,0,t,r);return PointContainer.fromImageData(n)}static fromImageData(e){const t=e.width,r=e.height;return PointContainer.fromUint8Array(e.data,t,r)}static fromUint8Array(e,t,r){switch(Object.prototype.toString.call(e)){case"[object Uint8ClampedArray]":case"[object Uint8Array]":break;default:e=new Uint8Array(e)}const n=new Uint32Array(e.buffer);return PointContainer.fromUint32Array(n,t,r)}static fromUint32Array(e,t,r){const n=new PointContainer;n._width=t,n._height=r;for(let t=0,r=e.length;t<r;t++)n._pointArray[t]=Point.createByUint32(0|e[t]);return n}static fromBuffer(e,t,r){const n=new Uint32Array(e.buffer,e.byteOffset,e.byteLength/Uint32Array.BYTES_PER_ELEMENT);return PointContainer.fromUint32Array(n,t,r)}},hueGroups=10;function hueGroup(e,t){const r=360/t;for(let n=1,i=r-r/2;n<t;n++,i+=r)if(e>=i&&e<i+r)return n;return 0}var Palette=class{constructor(){__publicField(this,"_pointContainer"),__publicField(this,"_pointArray",[]),__publicField(this,"_i32idx",{}),this._pointContainer=new PointContainer,this._pointContainer.setHeight(1),this._pointArray=this._pointContainer.getPointArray()}add(e){this._pointArray.push(e),this._pointContainer.setWidth(this._pointArray.length)}has(e){for(let t=this._pointArray.length-1;t>=0;t--)if(e.uint32===this._pointArray[t].uint32)return!0;return!1}getNearestColor(e,t){return this._pointArray[0|this._getNearestIndex(e,t)]}getPointContainer(){return this._pointContainer}_nearestPointFromCache(e){return"number"==typeof this._i32idx[e]?this._i32idx[e]:-1}_getNearestIndex(e,t){let r=this._nearestPointFromCache(""+t.uint32);if(r>=0)return r;let n=Number.MAX_VALUE;r=0;for(let i=0,a=this._pointArray.length;i<a;i++){const a=this._pointArray[i],o=e.calculateRaw(t.r,t.g,t.b,t.a,a.r,a.g,a.b,a.a);o<n&&(n=o,r=i)}return this._i32idx[t.uint32]=r,r}sort(){this._i32idx={},this._pointArray.sort((e,t)=>{const r=rgb2hsl(e.r,e.g,e.b),n=rgb2hsl(t.r,t.g,t.b),i=e.r===e.g&&e.g===e.b?0:1+hueGroup(r.h,hueGroups),a=(t.r===t.g&&t.g===t.b?0:1+hueGroup(n.h,hueGroups))-i;if(a)return-a;const o=e.getLuminosity(!0),s=t.getLuminosity(!0);if(s-o!=0)return s-o;const u=(100*n.s|0)-(100*r.s|0);return u?-u:0})}},utils_exports={};__export(utils_exports,{HueStatistics:()=>HueStatistics,Palette:()=>Palette,Point:()=>Point,PointContainer:()=>PointContainer,ProgressTracker:()=>ProgressTracker,arithmetic:()=>arithmetic_exports});var HueGroup=class{constructor(){__publicField(this,"num",0),__publicField(this,"cols",[])}},HueStatistics=class{constructor(e,t){__publicField(this,"_numGroups"),__publicField(this,"_minCols"),__publicField(this,"_stats"),__publicField(this,"_groupsFull"),this._numGroups=e,this._minCols=t,this._stats=[];for(let t=0;t<=e;t++)this._stats[t]=new HueGroup;this._groupsFull=0}check(e){this._groupsFull===this._numGroups+1&&(this.check=()=>{});const t=255&e,r=e>>>8&255,n=e>>>16&255,i=t===r&&r===n?0:1+hueGroup(rgb2hsl(t,r,n).h,this._numGroups),a=this._stats[i],o=this._minCols;a.num++,a.num>o||(a.num===o&&this._groupsFull++,a.num<=o&&this._stats[i].cols.push(e))}injectIntoDictionary(e){for(let t=0;t<=this._numGroups;t++)this._stats[t].num<=this._minCols&&this._stats[t].cols.forEach(t=>{e[t]?e[t]++:e[t]=1})}injectIntoArray(e){for(let t=0;t<=this._numGroups;t++)this._stats[t].num<=this._minCols&&this._stats[t].cols.forEach(t=>{-1===e.indexOf(t)&&e.push(t)})}},_ProgressTracker=class{constructor(e,t){__publicField(this,"progress"),__publicField(this,"_step"),__publicField(this,"_range"),__publicField(this,"_last"),__publicField(this,"_progressRange"),this._range=e,this._progressRange=t,this._step=Math.max(1,this._range/(_ProgressTracker.steps+1)|0),this._last=-this._step,this.progress=0}shouldNotify(e){return e-this._last>=this._step&&(this._last=e,this.progress=Math.min(this._progressRange*this._last/this._range,this._progressRange),!0)}},ProgressTracker=_ProgressTracker;__publicField(ProgressTracker,"steps",100);var networkBiasShift=3,Neuron=class{constructor(e){__publicField(this,"r"),__publicField(this,"g"),__publicField(this,"b"),__publicField(this,"a"),this.r=this.g=this.b=this.a=e}toPoint(){return Point.createByRGBA(this.r>>networkBiasShift,this.g>>networkBiasShift,this.b>>networkBiasShift,this.a>>networkBiasShift)}subtract(e,t,r,n){this.r-=0|e,this.g-=0|t,this.b-=0|r,this.a-=0|n}},_NeuQuant=class extends AbstractPaletteQuantizer{constructor(e,t=256){super(),__publicField(this,"_pointArray"),__publicField(this,"_networkSize"),__publicField(this,"_network"),__publicField(this,"_sampleFactor"),__publicField(this,"_radPower"),__publicField(this,"_freq"),__publicField(this,"_bias"),__publicField(this,"_distance"),this._distance=e,this._pointArray=[],this._sampleFactor=1,this._networkSize=t,this._distance.setWhitePoint(255<<networkBiasShift,255<<networkBiasShift,255<<networkBiasShift,255<<networkBiasShift)}sample(e){this._pointArray=this._pointArray.concat(e.getPointArray())}*quantize(){this._init(),yield*this._learn(),yield{palette:this._buildPalette(),progress:100}}_init(){this._freq=[],this._bias=[],this._radPower=[],this._network=[];for(let e=0;e<this._networkSize;e++)this._network[e]=new Neuron((e<<networkBiasShift+8)/this._networkSize|0),this._freq[e]=_NeuQuant._initialBias/this._networkSize|0,this._bias[e]=0}*_learn(){let e=this._sampleFactor;const t=this._pointArray.length;t<_NeuQuant._minpicturebytes&&(e=1);const r=30+(e-1)/3|0,n=t/e|0;let i,a=n/_NeuQuant._nCycles|0,o=_NeuQuant._initAlpha,s=(this._networkSize>>3)*_NeuQuant._radiusBias,u=s>>_NeuQuant._radiusBiasShift;u<=1&&(u=0);for(let e=0;e<u;e++)this._radPower[e]=o*((u*u-e*e)*_NeuQuant._radBias/(u*u))>>>0;i=t<_NeuQuant._minpicturebytes?1:t%_NeuQuant._prime1!=0?_NeuQuant._prime1:t%_NeuQuant._prime2!=0?_NeuQuant._prime2:t%_NeuQuant._prime3!=0?_NeuQuant._prime3:_NeuQuant._prime4;const l=new ProgressTracker(n,99);for(let e=0,c=0;e<n;){l.shouldNotify(e)&&(yield{progress:l.progress});const n=this._pointArray[c],f=n.b<<networkBiasShift,h=n.g<<networkBiasShift,d=n.r<<networkBiasShift,p=n.a<<networkBiasShift,m=this._contest(f,h,d,p);if(this._alterSingle(o,m,f,h,d,p),0!==u&&this._alterNeighbour(u,m,f,h,d,p),c+=i,c>=t&&(c-=t),e++,0===a&&(a=1),e%a==0){o-=o/r|0,s-=s/_NeuQuant._radiusDecrease|0,u=s>>_NeuQuant._radiusBiasShift,u<=1&&(u=0);for(let e=0;e<u;e++)this._radPower[e]=o*((u*u-e*e)*_NeuQuant._radBias/(u*u))>>>0}}}_buildPalette(){const e=new Palette;return this._network.forEach(t=>{e.add(t.toPoint())}),e.sort(),e}_alterNeighbour(e,t,r,n,i,a){let o=t-e;o<-1&&(o=-1);let s=t+e;s>this._networkSize&&(s=this._networkSize);let u=t+1,l=t-1,c=1;for(;u<s||l>o;){const e=this._radPower[c++]/_NeuQuant._alphaRadBias;if(u<s){const t=this._network[u++];t.subtract(e*(t.r-i),e*(t.g-n),e*(t.b-r),e*(t.a-a))}if(l>o){const t=this._network[l--];t.subtract(e*(t.r-i),e*(t.g-n),e*(t.b-r),e*(t.a-a))}}}_alterSingle(e,t,r,n,i,a){e/=_NeuQuant._initAlpha;const o=this._network[t];o.subtract(e*(o.r-i),e*(o.g-n),e*(o.b-r),e*(o.a-a))}_contest(e,t,r,n){const i=1020<<networkBiasShift;let a=~(1<<31),o=a,s=-1,u=s;for(let l=0;l<this._networkSize;l++){const c=this._network[l],f=this._distance.calculateNormalized(c,{r,g:t,b:e,a:n})*i|0;f<a&&(a=f,s=l);const h=f-(this._bias[l]>>_NeuQuant._initialBiasShift-networkBiasShift);h<o&&(o=h,u=l);const d=this._freq[l]>>_NeuQuant._betaShift;this._freq[l]-=d,this._bias[l]+=d<<_NeuQuant._gammaShift}return this._freq[s]+=_NeuQuant._beta,this._bias[s]-=_NeuQuant._betaGamma,u}},NeuQuant=_NeuQuant;__publicField(NeuQuant,"_prime1",499),__publicField(NeuQuant,"_prime2",491),__publicField(NeuQuant,"_prime3",487),__publicField(NeuQuant,"_prime4",503),__publicField(NeuQuant,"_minpicturebytes",_NeuQuant._prime4),__publicField(NeuQuant,"_nCycles",100),__publicField(NeuQuant,"_initialBiasShift",16),__publicField(NeuQuant,"_initialBias",1<<_NeuQuant._initialBiasShift),__publicField(NeuQuant,"_gammaShift",10),__publicField(NeuQuant,"_betaShift",10),__publicField(NeuQuant,"_beta",_NeuQuant._initialBias>>_NeuQuant._betaShift),__publicField(NeuQuant,"_betaGamma",_NeuQuant._initialBias<<_NeuQuant._gammaShift-_NeuQuant._betaShift),__publicField(NeuQuant,"_radiusBiasShift",6),__publicField(NeuQuant,"_radiusBias",1<<_NeuQuant._radiusBiasShift),__publicField(NeuQuant,"_radiusDecrease",30),__publicField(NeuQuant,"_alphaBiasShift",10),__publicField(NeuQuant,"_initAlpha",1<<_NeuQuant._alphaBiasShift),__publicField(NeuQuant,"_radBiasShift",8),__publicField(NeuQuant,"_radBias",1<<_NeuQuant._radBiasShift),__publicField(NeuQuant,"_alphaRadBiasShift",_NeuQuant._alphaBiasShift+_NeuQuant._radBiasShift),__publicField(NeuQuant,"_alphaRadBias",1<<_NeuQuant._alphaRadBiasShift);var networkBiasShift2=3,NeuronFloat=class{constructor(e){__publicField(this,"r"),__publicField(this,"g"),__publicField(this,"b"),__publicField(this,"a"),this.r=this.g=this.b=this.a=e}toPoint(){return Point.createByRGBA(this.r>>networkBiasShift2,this.g>>networkBiasShift2,this.b>>networkBiasShift2,this.a>>networkBiasShift2)}subtract(e,t,r,n){this.r-=e,this.g-=t,this.b-=r,this.a-=n}},_NeuQuantFloat=class extends AbstractPaletteQuantizer{constructor(e,t=256){super(),__publicField(this,"_pointArray"),__publicField(this,"_networkSize"),__publicField(this,"_network"),__publicField(this,"_sampleFactor"),__publicField(this,"_radPower"),__publicField(this,"_freq"),__publicField(this,"_bias"),__publicField(this,"_distance"),this._distance=e,this._pointArray=[],this._sampleFactor=1,this._networkSize=t,this._distance.setWhitePoint(255<<networkBiasShift2,255<<networkBiasShift2,255<<networkBiasShift2,255<<networkBiasShift2)}sample(e){this._pointArray=this._pointArray.concat(e.getPointArray())}*quantize(){this._init(),yield*this._learn(),yield{palette:this._buildPalette(),progress:100}}_init(){this._freq=[],this._bias=[],this._radPower=[],this._network=[];for(let e=0;e<this._networkSize;e++)this._network[e]=new NeuronFloat((e<<networkBiasShift2+8)/this._networkSize),this._freq[e]=_NeuQuantFloat._initialBias/this._networkSize,this._bias[e]=0}*_learn(){let e=this._sampleFactor;const t=this._pointArray.length;t<_NeuQuantFloat._minpicturebytes&&(e=1);const r=30+(e-1)/3,n=t/e;let i,a=n/_NeuQuantFloat._nCycles|0,o=_NeuQuantFloat._initAlpha,s=(this._networkSize>>3)*_NeuQuantFloat._radiusBias,u=s>>_NeuQuantFloat._radiusBiasShift;u<=1&&(u=0);for(let e=0;e<u;e++)this._radPower[e]=o*((u*u-e*e)*_NeuQuantFloat._radBias/(u*u));i=t<_NeuQuantFloat._minpicturebytes?1:t%_NeuQuantFloat._prime1!=0?_NeuQuantFloat._prime1:t%_NeuQuantFloat._prime2!=0?_NeuQuantFloat._prime2:t%_NeuQuantFloat._prime3!=0?_NeuQuantFloat._prime3:_NeuQuantFloat._prime4;const l=new ProgressTracker(n,99);for(let e=0,c=0;e<n;){l.shouldNotify(e)&&(yield{progress:l.progress});const n=this._pointArray[c],f=n.b<<networkBiasShift2,h=n.g<<networkBiasShift2,d=n.r<<networkBiasShift2,p=n.a<<networkBiasShift2,m=this._contest(f,h,d,p);if(this._alterSingle(o,m,f,h,d,p),0!==u&&this._alterNeighbour(u,m,f,h,d,p),c+=i,c>=t&&(c-=t),e++,0===a&&(a=1),e%a==0){o-=o/r,s-=s/_NeuQuantFloat._radiusDecrease,u=s>>_NeuQuantFloat._radiusBiasShift,u<=1&&(u=0);for(let e=0;e<u;e++)this._radPower[e]=o*((u*u-e*e)*_NeuQuantFloat._radBias/(u*u))}}}_buildPalette(){const e=new Palette;return this._network.forEach(t=>{e.add(t.toPoint())}),e.sort(),e}_alterNeighbour(e,t,r,n,i,a){let o=t-e;o<-1&&(o=-1);let s=t+e;s>this._networkSize&&(s=this._networkSize);let u=t+1,l=t-1,c=1;for(;u<s||l>o;){const e=this._radPower[c++]/_NeuQuantFloat._alphaRadBias;if(u<s){const t=this._network[u++];t.subtract(e*(t.r-i),e*(t.g-n),e*(t.b-r),e*(t.a-a))}if(l>o){const t=this._network[l--];t.subtract(e*(t.r-i),e*(t.g-n),e*(t.b-r),e*(t.a-a))}}}_alterSingle(e,t,r,n,i,a){e/=_NeuQuantFloat._initAlpha;const o=this._network[t];o.subtract(e*(o.r-i),e*(o.g-n),e*(o.b-r),e*(o.a-a))}_contest(e,t,r,n){const i=1020<<networkBiasShift2;let a=~(1<<31),o=a,s=-1,u=s;for(let l=0;l<this._networkSize;l++){const c=this._network[l],f=this._distance.calculateNormalized(c,{r,g:t,b:e,a:n})*i;f<a&&(a=f,s=l);const h=f-(this._bias[l]>>_NeuQuantFloat._initialBiasShift-networkBiasShift2);h<o&&(o=h,u=l);const d=this._freq[l]>>_NeuQuantFloat._betaShift;this._freq[l]-=d,this._bias[l]+=d<<_NeuQuantFloat._gammaShift}return this._freq[s]+=_NeuQuantFloat._beta,this._bias[s]-=_NeuQuantFloat._betaGamma,u}},NeuQuantFloat=_NeuQuantFloat;__publicField(NeuQuantFloat,"_prime1",499),__publicField(NeuQuantFloat,"_prime2",491),__publicField(NeuQuantFloat,"_prime3",487),__publicField(NeuQuantFloat,"_prime4",503),__publicField(NeuQuantFloat,"_minpicturebytes",_NeuQuantFloat._prime4),__publicField(NeuQuantFloat,"_nCycles",100),__publicField(NeuQuantFloat,"_initialBiasShift",16),__publicField(NeuQuantFloat,"_initialBias",1<<_NeuQuantFloat._initialBiasShift),__publicField(NeuQuantFloat,"_gammaShift",10),__publicField(NeuQuantFloat,"_betaShift",10),__publicField(NeuQuantFloat,"_beta",_NeuQuantFloat._initialBias>>_NeuQuantFloat._betaShift),__publicField(NeuQuantFloat,"_betaGamma",_NeuQuantFloat._initialBias<<_NeuQuantFloat._gammaShift-_NeuQuantFloat._betaShift),__publicField(NeuQuantFloat,"_radiusBiasShift",6),__publicField(NeuQuantFloat,"_radiusBias",1<<_NeuQuantFloat._radiusBiasShift),__publicField(NeuQuantFloat,"_radiusDecrease",30),__publicField(NeuQuantFloat,"_alphaBiasShift",10),__publicField(NeuQuantFloat,"_initAlpha",1<<_NeuQuantFloat._alphaBiasShift),__publicField(NeuQuantFloat,"_radBiasShift",8),__publicField(NeuQuantFloat,"_radBias",1<<_NeuQuantFloat._radBiasShift),__publicField(NeuQuantFloat,"_alphaRadBiasShift",_NeuQuantFloat._alphaBiasShift+_NeuQuantFloat._radBiasShift),__publicField(NeuQuantFloat,"_alphaRadBias",1<<_NeuQuantFloat._alphaRadBiasShift);var _ColorHistogram=class{constructor(e,t){__publicField(this,"_method"),__publicField(this,"_hueStats"),__publicField(this,"_histogram"),__publicField(this,"_initColors"),__publicField(this,"_minHueCols"),this._method=e,this._minHueCols=t<<2,this._initColors=t<<2,this._hueStats=new HueStatistics(_ColorHistogram._hueGroups,this._minHueCols),this._histogram=Object.create(null)}sample(e){switch(this._method){case 1:this._colorStats1D(e);break;case 2:this._colorStats2D(e)}}getImportanceSortedColorsIDXI32(){const e=stableSort(Object.keys(this._histogram),(e,t)=>this._histogram[t]-this._histogram[e]);if(0===e.length)return[];let t;switch(this._method){case 1:const r=Math.min(e.length,this._initColors),n=e[r-1],i=this._histogram[n];t=e.slice(0,r);let a=r;const o=e.length;for(;a<o&&this._histogram[e[a]]===i;)t.push(e[a++]);this._hueStats.injectIntoArray(t);break;case 2:t=e;break;default:throw new Error("Incorrect method")}return t.map(e=>+e)}_colorStats1D(e){const t=this._histogram,r=e.getPointArray(),n=r.length;for(let e=0;e<n;e++){const n=r[e].uint32;this._hueStats.check(n),n in t?t[n]++:t[n]=1}}_colorStats2D(e){const t=e.getWidth(),r=e.getHeight(),n=e.getPointArray(),i=_ColorHistogram._boxSize[0],a=_ColorHistogram._boxSize[1],o=i*a,s=this._makeBoxes(t,r,i,a),u=this._histogram;s.forEach(e=>{let r=Math.round(e.w*e.h/o)*_ColorHistogram._boxPixels;r<2&&(r=2);const i={};this._iterateBox(e,t,e=>{const t=n[e].uint32;this._hueStats.check(t),t in u?u[t]++:t in i?++i[t]>=r&&(u[t]=i[t]):i[t]=1})}),this._hueStats.injectIntoDictionary(u)}_iterateBox(e,t,r){const n=e,i=n.y*t+n.x,a=(n.y+n.h-1)*t+(n.x+n.w-1),o=t-n.w+1;let s=0,u=i;do{r.call(this,u),u+=++s%n.w==0?o:1}while(u<=a)}_makeBoxes(e,t,r,n){const i=e%r,a=t%n,o=e-i,s=t-a,u=[];for(let l=0;l<t;l+=n)for(let t=0;t<e;t+=r)u.push({x:t,y:l,w:t===o?i:r,h:l===s?a:n});return u}},ColorHistogram=_ColorHistogram;__publicField(ColorHistogram,"_boxSize",[64,64]),__publicField(ColorHistogram,"_boxPixels",2),__publicField(ColorHistogram,"_hueGroups",10);var RemovedColor=class{constructor(e,t,r){__publicField(this,"index"),__publicField(this,"color"),__publicField(this,"distance"),this.index=e,this.color=t,this.distance=r}},RGBQuant=class extends AbstractPaletteQuantizer{constructor(e,t=256,r=2){super(),__publicField(this,"_colors"),__publicField(this,"_initialDistance"),__publicField(this,"_distanceIncrement"),__publicField(this,"_histogram"),__publicField(this,"_distance"),this._distance=e,this._colors=t,this._histogram=new ColorHistogram(r,t),this._initialDistance=.01,this._distanceIncrement=.005}sample(e){this._histogram.sample(e)}*quantize(){const e=this._histogram.getImportanceSortedColorsIDXI32();if(0===e.length)throw new Error("No colors in image");yield*this._buildPalette(e)}*_buildPalette(e){const t=new Palette,r=t.getPointContainer().getPointArray(),n=new Array(e.length);for(let t=0;t<e.length;t++)r.push(Point.createByUint32(e[t])),n[t]=1;const i=r.length,a=[];let o=i,s=this._initialDistance;const u=new ProgressTracker(o-this._colors,99);for(;o>this._colors;){a.length=0;for(let e=0;e<i;e++){if(u.shouldNotify(i-o)&&(yield{progress:u.progress}),0===n[e])continue;const t=r[e];for(let u=e+1;u<i;u++){if(0===n[u])continue;const e=r[u],i=this._distance.calculateNormalized(t,e);i<s&&(a.push(new RemovedColor(u,e,i)),n[u]=0,o--)}}s+=o>3*this._colors?this._initialDistance:this._distanceIncrement}if(o<this._colors){stableSort(a,(e,t)=>t.distance-e.distance);let e=0;for(;o<this._colors&&e<a.length;)n[a[e].index]=1,o++,e++}let l=r.length;for(let e=l-1;e>=0;e--)0===n[e]&&(e!==l-1&&(r[e]=r[l-1]),--l);r.length=l,t.sort(),yield{palette:t,progress:100}}};function createArray1D(e){const t=[];for(let r=0;r<e;r++)t[r]=0;return t}function createArray4D(e,t,r,n){const i=new Array(e);for(let a=0;a<e;a++){i[a]=new Array(t);for(let e=0;e<t;e++){i[a][e]=new Array(r);for(let t=0;t<r;t++){i[a][e][t]=new Array(n);for(let r=0;r<n;r++)i[a][e][t][r]=0}}}return i}function createArray3D(e,t,r){const n=new Array(e);for(let i=0;i<e;i++){n[i]=new Array(t);for(let e=0;e<t;e++){n[i][e]=new Array(r);for(let t=0;t<r;t++)n[i][e][t]=0}}return n}function fillArray3D(e,t,r,n,i){for(let a=0;a<t;a++){e[a]=[];for(let t=0;t<r;t++){e[a][t]=[];for(let r=0;r<n;r++)e[a][t][r]=i}}}function fillArray1D(e,t,r){for(let n=0;n<t;n++)e[n]=r}var WuColorCube=class{constructor(){__publicField(this,"redMinimum"),__publicField(this,"redMaximum"),__publicField(this,"greenMinimum"),__publicField(this,"greenMaximum"),__publicField(this,"blueMinimum"),__publicField(this,"blueMaximum"),__publicField(this,"volume"),__publicField(this,"alphaMinimum"),__publicField(this,"alphaMaximum")}},_WuQuant=class extends AbstractPaletteQuantizer{constructor(e,t=256,r=5){super(),__publicField(this,"_reds"),__publicField(this,"_greens"),__publicField(this,"_blues"),__publicField(this,"_alphas"),__publicField(this,"_sums"),__publicField(this,"_weights"),__publicField(this,"_momentsRed"),__publicField(this,"_momentsGreen"),__publicField(this,"_momentsBlue"),__publicField(this,"_momentsAlpha"),__publicField(this,"_moments"),__publicField(this,"_table"),__publicField(this,"_pixels"),__publicField(this,"_cubes"),__publicField(this,"_colors"),__publicField(this,"_significantBitsPerChannel"),__publicField(this,"_maxSideIndex"),__publicField(this,"_alphaMaxSideIndex"),__publicField(this,"_sideSize"),__publicField(this,"_alphaSideSize"),__publicField(this,"_distance"),this._distance=e,this._setQuality(r),this._initialize(t)}sample(e){const t=e.getPointArray();for(let e=0,r=t.length;e<r;e++)this._addColor(t[e]);this._pixels=this._pixels.concat(t)}*quantize(){yield*this._preparePalette();const e=new Palette;for(let t=0;t<this._colors;t++)if(this._sums[t]>0){const r=this._sums[t],n=this._reds[t]/r,i=this._greens[t]/r,a=this._blues[t]/r,o=this._alphas[t]/r,s=Point.createByRGBA(0|n,0|i,0|a,0|o);e.add(s)}e.sort(),yield{palette:e,progress:100}}*_preparePalette(){yield*this._calculateMoments();let e=0;const t=createArray1D(this._colors);for(let r=1;r<this._colors;++r){this._cut(this._cubes[e],this._cubes[r])?(t[e]=this._cubes[e].volume>1?this._calculateVariance(this._cubes[e]):0,t[r]=this._cubes[r].volume>1?this._calculateVariance(this._cubes[r]):0):(t[e]=0,r--),e=0;let n=t[0];for(let i=1;i<=r;++i)t[i]>n&&(n=t[i],e=i);if(n<=0){this._colors=r+1;break}}const r=[],n=[],i=[],a=[];for(let e=0;e<this._colors;++e){const t=_WuQuant._volume(this._cubes[e],this._weights);t>0?(r[e]=_WuQuant._volume(this._cubes[e],this._momentsRed)/t|0,n[e]=_WuQuant._volume(this._cubes[e],this._momentsGreen)/t|0,i[e]=_WuQuant._volume(this._cubes[e],this._momentsBlue)/t|0,a[e]=_WuQuant._volume(this._cubes[e],this._momentsAlpha)/t|0):(r[e]=0,n[e]=0,i[e]=0,a[e]=0)}this._reds=createArray1D(this._colors+1),this._greens=createArray1D(this._colors+1),this._blues=createArray1D(this._colors+1),this._alphas=createArray1D(this._colors+1),this._sums=createArray1D(this._colors+1);for(let e=0,t=this._pixels.length;e<t;e++){const t=this._pixels[e];let o=-1,s=Number.MAX_VALUE;for(let e=0;e<this._colors;e++){const u=r[e],l=n[e],c=i[e],f=a[e],h=this._distance.calculateRaw(u,l,c,f,t.r,t.g,t.b,t.a);h<s&&(s=h,o=e)}this._reds[o]+=t.r,this._greens[o]+=t.g,this._blues[o]+=t.b,this._alphas[o]+=t.a,this._sums[o]++}}_addColor(e){const t=8-this._significantBitsPerChannel,r=1+(e.r>>t),n=1+(e.g>>t),i=1+(e.b>>t),a=1+(e.a>>t);this._weights[a][r][n][i]++,this._momentsRed[a][r][n][i]+=e.r,this._momentsGreen[a][r][n][i]+=e.g,this._momentsBlue[a][r][n][i]+=e.b,this._momentsAlpha[a][r][n][i]+=e.a,this._moments[a][r][n][i]+=this._table[e.r]+this._table[e.g]+this._table[e.b]+this._table[e.a]}*_calculateMoments(){const e=[],t=[],r=[],n=[],i=[],a=[],o=createArray3D(this._sideSize,this._sideSize,this._sideSize),s=createArray3D(this._sideSize,this._sideSize,this._sideSize),u=createArray3D(this._sideSize,this._sideSize,this._sideSize),l=createArray3D(this._sideSize,this._sideSize,this._sideSize),c=createArray3D(this._sideSize,this._sideSize,this._sideSize),f=createArray3D(this._sideSize,this._sideSize,this._sideSize);let h=0;const d=new ProgressTracker(this._alphaMaxSideIndex*this._maxSideIndex,99);for(let p=1;p<=this._alphaMaxSideIndex;++p){fillArray3D(o,this._sideSize,this._sideSize,this._sideSize,0),fillArray3D(s,this._sideSize,this._sideSize,this._sideSize,0),fillArray3D(u,this._sideSize,this._sideSize,this._sideSize,0),fillArray3D(l,this._sideSize,this._sideSize,this._sideSize,0),fillArray3D(c,this._sideSize,this._sideSize,this._sideSize,0),fillArray3D(f,this._sideSize,this._sideSize,this._sideSize,0);for(let m=1;m<=this._maxSideIndex;++m,++h){d.shouldNotify(h)&&(yield{progress:d.progress}),fillArray1D(e,this._sideSize,0),fillArray1D(t,this._sideSize,0),fillArray1D(r,this._sideSize,0),fillArray1D(n,this._sideSize,0),fillArray1D(i,this._sideSize,0),fillArray1D(a,this._sideSize,0);for(let h=1;h<=this._maxSideIndex;++h){let d=0,g=0,b=0,y=0,_=0,v=0;for(let w=1;w<=this._maxSideIndex;++w)d+=this._weights[p][m][h][w],g+=this._momentsRed[p][m][h][w],b+=this._momentsGreen[p][m][h][w],y+=this._momentsBlue[p][m][h][w],_+=this._momentsAlpha[p][m][h][w],v+=this._moments[p][m][h][w],e[w]+=d,t[w]+=g,r[w]+=b,n[w]+=y,i[w]+=_,a[w]+=v,o[m][h][w]=o[m-1][h][w]+e[w],s[m][h][w]=s[m-1][h][w]+t[w],u[m][h][w]=u[m-1][h][w]+r[w],l[m][h][w]=l[m-1][h][w]+n[w],c[m][h][w]=c[m-1][h][w]+i[w],f[m][h][w]=f[m-1][h][w]+a[w],this._weights[p][m][h][w]=this._weights[p-1][m][h][w]+o[m][h][w],this._momentsRed[p][m][h][w]=this._momentsRed[p-1][m][h][w]+s[m][h][w],this._momentsGreen[p][m][h][w]=this._momentsGreen[p-1][m][h][w]+u[m][h][w],this._momentsBlue[p][m][h][w]=this._momentsBlue[p-1][m][h][w]+l[m][h][w],this._momentsAlpha[p][m][h][w]=this._momentsAlpha[p-1][m][h][w]+c[m][h][w],this._moments[p][m][h][w]=this._moments[p-1][m][h][w]+f[m][h][w]}}}}static _volumeFloat(e,t){return t[e.alphaMaximum][e.redMaximum][e.greenMaximum][e.blueMaximum]-t[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMaximum]-t[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMaximum]+t[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMaximum]-t[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMaximum]+t[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMaximum]+t[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMaximum]-t[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMaximum]-(t[e.alphaMaximum][e.redMaximum][e.greenMaximum][e.blueMinimum]-t[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMinimum]-t[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMinimum]+t[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMinimum]-t[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMinimum]+t[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMinimum]+t[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMinimum]-t[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum])}static _volume(e,t){return 0|_WuQuant._volumeFloat(e,t)}static _top(e,t,r,n){let i;switch(t){case _WuQuant._alpha:i=n[r][e.redMaximum][e.greenMaximum][e.blueMaximum]-n[r][e.redMaximum][e.greenMinimum][e.blueMaximum]-n[r][e.redMinimum][e.greenMaximum][e.blueMaximum]+n[r][e.redMinimum][e.greenMinimum][e.blueMaximum]-(n[r][e.redMaximum][e.greenMaximum][e.blueMinimum]-n[r][e.redMaximum][e.greenMinimum][e.blueMinimum]-n[r][e.redMinimum][e.greenMaximum][e.blueMinimum]+n[r][e.redMinimum][e.greenMinimum][e.blueMinimum]);break;case _WuQuant._red:i=n[e.alphaMaximum][r][e.greenMaximum][e.blueMaximum]-n[e.alphaMaximum][r][e.greenMinimum][e.blueMaximum]-n[e.alphaMinimum][r][e.greenMaximum][e.blueMaximum]+n[e.alphaMinimum][r][e.greenMinimum][e.blueMaximum]-(n[e.alphaMaximum][r][e.greenMaximum][e.blueMinimum]-n[e.alphaMaximum][r][e.greenMinimum][e.blueMinimum]-n[e.alphaMinimum][r][e.greenMaximum][e.blueMinimum]+n[e.alphaMinimum][r][e.greenMinimum][e.blueMinimum]);break;case _WuQuant._green:i=n[e.alphaMaximum][e.redMaximum][r][e.blueMaximum]-n[e.alphaMaximum][e.redMinimum][r][e.blueMaximum]-n[e.alphaMinimum][e.redMaximum][r][e.blueMaximum]+n[e.alphaMinimum][e.redMinimum][r][e.blueMaximum]-(n[e.alphaMaximum][e.redMaximum][r][e.blueMinimum]-n[e.alphaMaximum][e.redMinimum][r][e.blueMinimum]-n[e.alphaMinimum][e.redMaximum][r][e.blueMinimum]+n[e.alphaMinimum][e.redMinimum][r][e.blueMinimum]);break;case _WuQuant._blue:i=n[e.alphaMaximum][e.redMaximum][e.greenMaximum][r]-n[e.alphaMaximum][e.redMaximum][e.greenMinimum][r]-n[e.alphaMaximum][e.redMinimum][e.greenMaximum][r]+n[e.alphaMaximum][e.redMinimum][e.greenMinimum][r]-(n[e.alphaMinimum][e.redMaximum][e.greenMaximum][r]-n[e.alphaMinimum][e.redMaximum][e.greenMinimum][r]-n[e.alphaMinimum][e.redMinimum][e.greenMaximum][r]+n[e.alphaMinimum][e.redMinimum][e.greenMinimum][r]);break;default:throw new Error("impossible")}return 0|i}static _bottom(e,t,r){switch(t){case _WuQuant._alpha:return-r[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMaximum]+r[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMaximum]+r[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMaximum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMaximum]-(-r[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMinimum]+r[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMinimum]+r[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMinimum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum]);case _WuQuant._red:return-r[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMaximum]+r[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMaximum]+r[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMaximum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMaximum]-(-r[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMinimum]+r[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMinimum]+r[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMinimum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum]);case _WuQuant._green:return-r[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMaximum]+r[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMaximum]+r[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMaximum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMaximum]-(-r[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMinimum]+r[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMinimum]+r[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMinimum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum]);case _WuQuant._blue:return-r[e.alphaMaximum][e.redMaximum][e.greenMaximum][e.blueMinimum]+r[e.alphaMaximum][e.redMaximum][e.greenMinimum][e.blueMinimum]+r[e.alphaMaximum][e.redMinimum][e.greenMaximum][e.blueMinimum]-r[e.alphaMaximum][e.redMinimum][e.greenMinimum][e.blueMinimum]-(-r[e.alphaMinimum][e.redMaximum][e.greenMaximum][e.blueMinimum]+r[e.alphaMinimum][e.redMaximum][e.greenMinimum][e.blueMinimum]+r[e.alphaMinimum][e.redMinimum][e.greenMaximum][e.blueMinimum]-r[e.alphaMinimum][e.redMinimum][e.greenMinimum][e.blueMinimum]);default:return 0}}_calculateVariance(e){const t=_WuQuant._volume(e,this._momentsRed),r=_WuQuant._volume(e,this._momentsGreen),n=_WuQuant._volume(e,this._momentsBlue),i=_WuQuant._volume(e,this._momentsAlpha);return _WuQuant._volumeFloat(e,this._moments)-(t*t+r*r+n*n+i*i)/_WuQuant._volume(e,this._weights)}_maximize(e,t,r,n,i,a,o,s,u){const l=0|_WuQuant._bottom(e,t,this._momentsRed),c=0|_WuQuant._bottom(e,t,this._momentsGreen),f=0|_WuQuant._bottom(e,t,this._momentsBlue),h=0|_WuQuant._bottom(e,t,this._momentsAlpha),d=0|_WuQuant._bottom(e,t,this._weights);let p=0,m=-1;for(let g=r;g<n;++g){let r=l+_WuQuant._top(e,t,g,this._momentsRed),n=c+_WuQuant._top(e,t,g,this._momentsGreen),b=f+_WuQuant._top(e,t,g,this._momentsBlue),y=h+_WuQuant._top(e,t,g,this._momentsAlpha),_=d+_WuQuant._top(e,t,g,this._weights);if(0!==_){let e=r*r+n*n+b*b+y*y,t=e/_;r=i-r,n=a-n,b=o-b,y=s-y,_=u-_,0!==_&&(e=r*r+n*n+b*b+y*y,t+=e/_,t>p&&(p=t,m=g))}}return{max:p,position:m}}_cut(e,t){let r;const n=_WuQuant._volume(e,this._momentsRed),i=_WuQuant._volume(e,this._momentsGreen),a=_WuQuant._volume(e,this._momentsBlue),o=_WuQuant._volume(e,this._momentsAlpha),s=_WuQuant._volume(e,this._weights),u=this._maximize(e,_WuQuant._red,e.redMinimum+1,e.redMaximum,n,i,a,o,s),l=this._maximize(e,_WuQuant._green,e.greenMinimum+1,e.greenMaximum,n,i,a,o,s),c=this._maximize(e,_WuQuant._blue,e.blueMinimum+1,e.blueMaximum,n,i,a,o,s),f=this._maximize(e,_WuQuant._alpha,e.alphaMinimum+1,e.alphaMaximum,n,i,a,o,s);if(f.max>=u.max&&f.max>=l.max&&f.max>=c.max){if(r=_WuQuant._alpha,f.position<0)return!1}else r=u.max>=f.max&&u.max>=l.max&&u.max>=c.max?_WuQuant._red:l.max>=f.max&&l.max>=u.max&&l.max>=c.max?_WuQuant._green:_WuQuant._blue;switch(t.redMaximum=e.redMaximum,t.greenMaximum=e.greenMaximum,t.blueMaximum=e.blueMaximum,t.alphaMaximum=e.alphaMaximum,r){case _WuQuant._red:t.redMinimum=e.redMaximum=u.position,t.greenMinimum=e.greenMinimum,t.blueMinimum=e.blueMinimum,t.alphaMinimum=e.alphaMinimum;break;case _WuQuant._green:t.greenMinimum=e.greenMaximum=l.position,t.redMinimum=e.redMinimum,t.blueMinimum=e.blueMinimum,t.alphaMinimum=e.alphaMinimum;break;case _WuQuant._blue:t.blueMinimum=e.blueMaximum=c.position,t.redMinimum=e.redMinimum,t.greenMinimum=e.greenMinimum,t.alphaMinimum=e.alphaMinimum;break;case _WuQuant._alpha:t.alphaMinimum=e.alphaMaximum=f.position,t.blueMinimum=e.blueMinimum,t.redMinimum=e.redMinimum,t.greenMinimum=e.greenMinimum}return e.volume=(e.redMaximum-e.redMinimum)*(e.greenMaximum-e.greenMinimum)*(e.blueMaximum-e.blueMinimum)*(e.alphaMaximum-e.alphaMinimum),t.volume=(t.redMaximum-t.redMinimum)*(t.greenMaximum-t.greenMinimum)*(t.blueMaximum-t.blueMinimum)*(t.alphaMaximum-t.alphaMinimum),!0}_initialize(e){this._colors=e,this._cubes=[];for(let t=0;t<e;t++)this._cubes[t]=new WuColorCube;this._cubes[0].redMinimum=0,this._cubes[0].greenMinimum=0,this._cubes[0].blueMinimum=0,this._cubes[0].alphaMinimum=0,this._cubes[0].redMaximum=this._maxSideIndex,this._cubes[0].greenMaximum=this._maxSideIndex,this._cubes[0].blueMaximum=this._maxSideIndex,this._cubes[0].alphaMaximum=this._alphaMaxSideIndex,this._weights=createArray4D(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._momentsRed=createArray4D(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._momentsGreen=createArray4D(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._momentsBlue=createArray4D(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._momentsAlpha=createArray4D(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._moments=createArray4D(this._alphaSideSize,this._sideSize,this._sideSize,this._sideSize),this._table=[];for(let e=0;e<256;++e)this._table[e]=e*e;this._pixels=[]}_setQuality(e=5){this._significantBitsPerChannel=e,this._maxSideIndex=1<<this._significantBitsPerChannel,this._alphaMaxSideIndex=this._maxSideIndex,this._sideSize=this._maxSideIndex+1,this._alphaSideSize=this._alphaMaxSideIndex+1}},WuQuant=_WuQuant;__publicField(WuQuant,"_alpha",3),__publicField(WuQuant,"_red",2),__publicField(WuQuant,"_green",1),__publicField(WuQuant,"_blue",0);var image_exports={};__export(image_exports,{AbstractImageQuantizer:()=>AbstractImageQuantizer,ErrorDiffusionArray:()=>ErrorDiffusionArray,ErrorDiffusionArrayKernel:()=>ErrorDiffusionArrayKernel,ErrorDiffusionRiemersma:()=>ErrorDiffusionRiemersma,NearestColor:()=>NearestColor});var AbstractImageQuantizer=class{quantizeSync(e,t){for(const r of this.quantize(e,t))if(r.pointContainer)return r.pointContainer;throw new Error("unreachable")}},NearestColor=class extends AbstractImageQuantizer{constructor(e){super(),__publicField(this,"_distance"),this._distance=e}*quantize(e,t){const r=e.getPointArray(),n=e.getWidth(),i=e.getHeight(),a=new ProgressTracker(i,99);for(let e=0;e<i;e++){a.shouldNotify(e)&&(yield{progress:a.progress});for(let i=0,a=e*n;i<n;i++,a++){const e=r[a];e.from(t.getNearestColor(this._distance,e))}}yield{pointContainer:e,progress:100}}},ErrorDiffusionArrayKernel=(e=>(e[e.FloydSteinberg=0]="FloydSteinberg",e[e.FalseFloydSteinberg=1]="FalseFloydSteinberg",e[e.Stucki=2]="Stucki",e[e.Atkinson=3]="Atkinson",e[e.Jarvis=4]="Jarvis",e[e.Burkes=5]="Burkes",e[e.Sierra=6]="Sierra",e[e.TwoSierra=7]="TwoSierra",e[e.SierraLite=8]="SierraLite",e))(ErrorDiffusionArrayKernel||{}),ErrorDiffusionArray=class extends AbstractImageQuantizer{constructor(e,t,r=!0,n=0,i=!1){super(),__publicField(this,"_minColorDistance"),__publicField(this,"_serpentine"),__publicField(this,"_kernel"),__publicField(this,"_calculateErrorLikeGIMP"),__publicField(this,"_distance"),this._setKernel(t),this._distance=e,this._minColorDistance=n,this._serpentine=r,this._calculateErrorLikeGIMP=i}*quantize(e,t){const r=e.getPointArray(),n=new Point,i=e.getWidth(),a=e.getHeight(),o=[];let s=1,u=1;for(const e of this._kernel){const t=e[2]+1;u<t&&(u=t)}for(let e=0;e<u;e++)this._fillErrorLine(o[e]=[],i);const l=new ProgressTracker(a,99);for(let e=0;e<a;e++){l.shouldNotify(e)&&(yield{progress:l.progress}),this._serpentine&&(s*=-1);const u=e*i,c=1===s?0:i-1,f=1===s?i:-1;this._fillErrorLine(o[0],i),o.push(o.shift());const h=o[0];for(let l=c,d=u+c;l!==f;l+=s,d+=s){const u=r[d],c=h[l];n.from(u);const f=Point.createByRGBA(inRange0to255Rounded(u.r+c[0]),inRange0to255Rounded(u.g+c[1]),inRange0to255Rounded(u.b+c[2]),inRange0to255Rounded(u.a+c[3])),p=t.getNearestColor(this._distance,f);if(u.from(p),this._minColorDistance&&this._distance.calculateNormalized(n,p)<this._minColorDistance)continue;let m,g,b,y;this._calculateErrorLikeGIMP?(m=f.r-p.r,g=f.g-p.g,b=f.b-p.b,y=f.a-p.a):(m=n.r-p.r,g=n.g-p.g,b=n.b-p.b,y=n.a-p.a);const _=1===s?0:this._kernel.length-1,v=1===s?this._kernel.length:-1;for(let t=_;t!==v;t+=s){const r=this._kernel[t][1]*s,n=this._kernel[t][2];if(r+l>=0&&r+l<i&&n+e>=0&&n+e<a){const e=this._kernel[t][0],i=o[n][r+l];i[0]+=m*e,i[1]+=g*e,i[2]+=b*e,i[3]+=y*e}}}}yield{pointContainer:e,progress:100}}_fillErrorLine(e,t){e.length>t&&(e.length=t);const r=e.length;for(let t=0;t<r;t++){const r=e[t];r[0]=r[1]=r[2]=r[3]=0}for(let n=r;n<t;n++)e[n]=[0,0,0,0]}_setKernel(e){switch(e){case 0:this._kernel=[[7/16,1,0],[3/16,-1,1],[5/16,0,1],[1/16,1,1]];break;case 1:this._kernel=[[3/8,1,0],[3/8,0,1],[2/8,1,1]];break;case 2:this._kernel=[[8/42,1,0],[4/42,2,0],[2/42,-2,1],[4/42,-1,1],[8/42,0,1],[4/42,1,1],[2/42,2,1],[1/42,-2,2],[2/42,-1,2],[4/42,0,2],[2/42,1,2],[1/42,2,2]];break;case 3:this._kernel=[[1/8,1,0],[1/8,2,0],[1/8,-1,1],[1/8,0,1],[1/8,1,1],[1/8,0,2]];break;case 4:this._kernel=[[7/48,1,0],[5/48,2,0],[3/48,-2,1],[5/48,-1,1],[7/48,0,1],[5/48,1,1],[3/48,2,1],[1/48,-2,2],[3/48,-1,2],[5/48,0,2],[3/48,1,2],[1/48,2,2]];break;case 5:this._kernel=[[.25,1,0],[4/32,2,0],[2/32,-2,1],[4/32,-1,1],[.25,0,1],[4/32,1,1],[2/32,2,1]];break;case 6:this._kernel=[[5/32,1,0],[3/32,2,0],[2/32,-2,1],[4/32,-1,1],[5/32,0,1],[4/32,1,1],[2/32,2,1],[2/32,-1,2],[3/32,0,2],[2/32,1,2]];break;case 7:this._kernel=[[.25,1,0],[3/16,2,0],[1/16,-2,1],[2/16,-1,1],[3/16,0,1],[2/16,1,1],[1/16,2,1]];break;case 8:this._kernel=[[.5,1,0],[1/4,-1,1],[1/4,0,1]];break;default:throw new Error(`ErrorDiffusionArray: unknown kernel = ${e}`)}}};function*hilbertCurve(e,t,r){const n=Math.max(e,t),i={width:e,height:t,level:Math.floor(Math.log(n)/Math.log(2)+1),callback:r,tracker:new ProgressTracker(e*t,99),index:0,x:0,y:0};yield*walkHilbert(i,1),visit(i,0)}function*walkHilbert(e,t){if(!(e.level<1)){switch(e.tracker.shouldNotify(e.index)&&(yield{progress:e.tracker.progress}),e.level--,t){case 2:yield*walkHilbert(e,1),visit(e,3),yield*walkHilbert(e,2),visit(e,4),yield*walkHilbert(e,2),visit(e,2),yield*walkHilbert(e,4);break;case 3:yield*walkHilbert(e,4),visit(e,2),yield*walkHilbert(e,3),visit(e,1),yield*walkHilbert(e,3),visit(e,3),yield*walkHilbert(e,1);break;case 1:yield*walkHilbert(e,2),visit(e,4),yield*walkHilbert(e,1),visit(e,3),yield*walkHilbert(e,1),visit(e,1),yield*walkHilbert(e,3);break;case 4:yield*walkHilbert(e,3),visit(e,1),yield*walkHilbert(e,4),visit(e,2),yield*walkHilbert(e,4),visit(e,4),yield*walkHilbert(e,2)}e.level++}}function visit(e,t){switch(e.x>=0&&e.x<e.width&&e.y>=0&&e.y<e.height&&(e.callback(e.x,e.y),e.index++),t){case 2:e.x--;break;case 3:e.x++;break;case 1:e.y--;break;case 4:e.y++}}var ErrorDiffusionRiemersma=class extends AbstractImageQuantizer{constructor(e,t=16,r=1){super(),__publicField(this,"_distance"),__publicField(this,"_weights"),__publicField(this,"_errorQueueSize"),this._distance=e,this._errorQueueSize=t,this._weights=ErrorDiffusionRiemersma._createWeights(r,t)}*quantize(e,t){const r=e.getPointArray(),n=e.getWidth(),i=e.getHeight(),a=[];let o=0;for(let e=0;e<this._errorQueueSize;e++)a[e]={r:0,g:0,b:0,a:0};yield*hilbertCurve(n,i,(e,i)=>{const s=r[e+i*n];let{r:u,g:l,b:c,a:f}=s;for(let e=0;e<this._errorQueueSize;e++){const t=this._weights[e],r=a[(e+o)%this._errorQueueSize];u+=r.r*t,l+=r.g*t,c+=r.b*t,f+=r.a*t}const h=Point.createByRGBA(inRange0to255Rounded(u),inRange0to255Rounded(l),inRange0to255Rounded(c),inRange0to255Rounded(f)),d=t.getNearestColor(this._distance,h);o=(o+1)%this._errorQueueSize;const p=(o+this._errorQueueSize-1)%this._errorQueueSize;a[p].r=s.r-d.r,a[p].g=s.g-d.g,a[p].b=s.b-d.b,a[p].a=s.a-d.a,s.from(d)}),yield{pointContainer:e,progress:100}}static _createWeights(e,t){const r=[],n=Math.exp(Math.log(t)/(t-1));for(let i=0,a=1;i<t;i++)r[i]=(a+.5|0)/t*e,a*=n;return r}},quality_exports={};__export(quality_exports,{ssim:()=>ssim});var K1=.01,K2=.03;function ssim(e,t){if(e.getHeight()!==t.getHeight()||e.getWidth()!==t.getWidth())throw new Error("Images have different sizes!");const r=(255*K1)**2,n=(255*K2)**2;let i=0,a=0;return iterate(e,t,(e,t,o,s)=>{let u=0,l=0,c=0;for(let r=0;r<e.length;r++)l+=(e[r]-o)**2,c+=(t[r]-s)**2,u+=(e[r]-o)*(t[r]-s);const f=e.length-1;l/=f,c/=f,u/=f,a+=(2*o*s+r)*(2*u+n)/((o**2+s**2+r)*(l+c+n)),i++}),a/i}function iterate(e,t,r){const n=e.getWidth(),i=e.getHeight();for(let a=0;a<i;a+=8)for(let o=0;o<n;o+=8){const s=Math.min(8,n-o),u=Math.min(8,i-a),l=calculateLumaValuesForWindow(e,o,a,s,u),c=calculateLumaValuesForWindow(t,o,a,s,u);r(l,c,calculateAverageLuma(l),calculateAverageLuma(c))}}function calculateLumaValuesForWindow(e,t,r,n,i){const a=e.getPointArray(),o=[];let s=0;for(let u=r;u<r+i;u++){const r=u*e.getWidth();for(let e=t;e<t+n;e++){const t=a[r+e];o[s]=.2126*t.r+.7152*t.g+.0722*t.b,s++}}return o}function calculateAverageLuma(e){let t=0;for(const r of e)t+=r;return t/e.length}function buildPaletteSync(e,{colorDistanceFormula:t,paletteQuantization:r,colors:n}={}){const i=paletteQuantizationToPaletteQuantizer(colorDistanceFormulaToColorDistance(t),r,n);return e.forEach(e=>i.sample(e)),i.quantizeSync()}function applyPaletteSync(e,t,{colorDistanceFormula:r,imageQuantization:n}={}){return imageQuantizationToImageQuantizer(colorDistanceFormulaToColorDistance(r),n).quantizeSync(e,t)}function colorDistanceFormulaToColorDistance(e="euclidean-bt709"){switch(e){case"cie94-graphic-arts":return new CIE94GraphicArts;case"cie94-textiles":return new CIE94Textiles;case"ciede2000":return new CIEDE2000;case"color-metric":return new CMetric;case"euclidean":return new Euclidean;case"euclidean-bt709":return new EuclideanBT709;case"euclidean-bt709-noalpha":return new EuclideanBT709NoAlpha;case"manhattan":return new Manhattan;case"manhattan-bt709":return new ManhattanBT709;case"manhattan-nommyde":return new ManhattanNommyde;case"pngquant":return new PNGQuant;default:throw new Error(`Unknown colorDistanceFormula ${e}`)}}function imageQuantizationToImageQuantizer(e,t="floyd-steinberg"){switch(t){case"nearest":return new NearestColor(e);case"riemersma":return new ErrorDiffusionRiemersma(e);case"floyd-steinberg":return new ErrorDiffusionArray(e,0);case"false-floyd-steinberg":return new ErrorDiffusionArray(e,1);case"stucki":return new ErrorDiffusionArray(e,2);case"atkinson":return new ErrorDiffusionArray(e,3);case"jarvis":return new ErrorDiffusionArray(e,4);case"burkes":return new ErrorDiffusionArray(e,5);case"sierra":return new ErrorDiffusionArray(e,6);case"two-sierra":return new ErrorDiffusionArray(e,7);case"sierra-lite":return new ErrorDiffusionArray(e,8);default:throw new Error(`Unknown imageQuantization ${t}`)}}function paletteQuantizationToPaletteQuantizer(e,t="wuquant",r=256){switch(t){case"neuquant":return new NeuQuant(e,r);case"rgbquant":return new RGBQuant(e,r);case"wuquant":return new WuQuant(e,r);case"neuquant-float":return new NeuQuantFloat(e,r);default:throw new Error(`Unknown paletteQuantization ${t}`)}}"function"==typeof setImmediate?setImmediate:void 0!==process&&(null==process||process.nextTick);const QuantizeOptionsSchema=z.object({colors:z.number().optional(),colorDistanceFormula:z.union([z.literal("cie94-textiles"),z.literal("cie94-graphic-arts"),z.literal("ciede2000"),z.literal("color-metric"),z.literal("euclidean"),z.literal("euclidean-bt709-noalpha"),z.literal("euclidean-bt709"),z.literal("manhattan"),z.literal("manhattan-bt709"),z.literal("manhattan-nommyde"),z.literal("pngquant")]).optional(),paletteQuantization:z.union([z.literal("neuquant"),z.literal("neuquant-float"),z.literal("rgbquant"),z.literal("wuquant")]).optional(),imageQuantization:z.union([z.literal("nearest"),z.literal("riemersma"),z.literal("floyd-steinberg"),z.literal("false-floyd-steinberg"),z.literal("stucki"),z.literal("atkinson"),z.literal("jarvis"),z.literal("burkes"),z.literal("sierra"),z.literal("two-sierra"),z.literal("sierra-lite")]).optional()}),methods={quantize(e,t){const{colors:r,colorDistanceFormula:n,paletteQuantization:i,imageQuantization:a}=QuantizeOptionsSchema.parse(t),o=utils_exports.PointContainer.fromUint8Array(e.bitmap.data,e.bitmap.width,e.bitmap.height),s=applyPaletteSync(o,buildPaletteSync([o],{colors:r,colorDistanceFormula:n,paletteQuantization:i}),{colorDistanceFormula:n,imageQuantization:a});return e.bitmap.data=Buffer.from(s.toUint8Array()),e}};var parseBmfontAscii=function(e){if(!e)throw new Error("no data provided");var t={pages:[],chars:[],kernings:[]},r=(e=e.toString().trim()).split(/\r\n?|\n/g);if(0===r.length)throw new Error("no data in BMFont file");for(var n=0;n<r.length;n++){var i=splitLine(r[n],n);if(i)if("page"===i.key){if("number"!=typeof i.data.id)throw new Error("malformed file at line "+n+" -- needs page id=N");if("string"!=typeof i.data.file)throw new Error("malformed file at line "+n+' -- needs page file="path"');t.pages[i.data.id]=i.data.file}else"chars"===i.key||"kernings"===i.key||("char"===i.key?t.chars.push(i.data):"kerning"===i.key?t.kernings.push(i.data):t[i.key]=i.data)}return t};function splitLine(e,t){if(!(e=e.replace(/\t+/g," ").trim()))return null;var r=e.indexOf(" ");if(-1===r)throw new Error("no named row at line "+t);var n=e.substring(0,r);e=(e=(e=(e=e.substring(r+1)).replace(/letter=[\'\"]\S+[\'\"]/gi,"")).split("=")).map(function(e){return e.trim().match(/(".*?"|[^"\s]+)+(?=\s*|\s*$)/g)});for(var i=[],a=0;a<e.length;a++){var o=e[a];0===a?i.push({key:o[0],data:""}):a===e.length-1?i[i.length-1].data=parseData(o[0]):(i[i.length-1].data=parseData(o[0]),i.push({key:o[1],data:""}))}var s={key:n,data:{}};return i.forEach(function(e){s.data[e.key]=e.data}),s}function parseData(e){return e&&0!==e.length?0===e.indexOf('"')||0===e.indexOf("'")?e.substring(1,e.length-1):-1!==e.indexOf(",")?parseIntList$1(e):parseInt(e,10):""}function parseIntList$1(e){return e.split(",").map(function(e){return parseInt(e,10)})}var parseASCII=getDefaultExportFromCjs(parseBmfontAscii),GLYPH_DESIGNER_ERROR="chasrset",parseAttribs=function(e){for(var t in e=Object.assign({},e),GLYPH_DESIGNER_ERROR in e&&(e.charset=e[GLYPH_DESIGNER_ERROR],delete e[GLYPH_DESIGNER_ERROR]),e)"face"!==t&&"charset"!==t&&(e[t]="padding"===t||"spacing"===t?parseIntList(e[t]):parseInt(e[t],10));return e};function parseIntList(e){return e.split(",").map(function(e){return parseInt(e,10)})}var xmlParseFromString=void 0!==self.DOMParser?function(e){return(new self.DOMParser).parseFromString(e,"application/xml")}:void 0!==self.ActiveXObject&&new self.ActiveXObject("Microsoft.XMLDOM")?function(e){var t=new self.ActiveXObject("Microsoft.XMLDOM");return t.async="false",t.loadXML(e),t}:function(e){var t=document.createElement("div");return t.innerHTML=e,t},parseAttributes=parseAttribs,parseFromString=xmlParseFromString,NAME_MAP={scaleh:"scaleH",scalew:"scaleW",stretchh:"stretchH",lineheight:"lineHeight",alphachnl:"alphaChnl",redchnl:"redChnl",greenchnl:"greenChnl",bluechnl:"blueChnl"},browser=function(e){e=e.toString();var t=parseFromString(e),r={pages:[],chars:[],kernings:[]};["info","common"].forEach(function(e){var n=t.getElementsByTagName(e)[0];n&&(r[e]=parseAttributes(getAttribs(n)))});var n=t.getElementsByTagName("pages")[0];if(!n)throw new Error("malformed file -- no <pages> element");for(var i=n.getElementsByTagName("page"),a=0;a<i.length;a++){var o=i[a],s=parseInt(o.getAttribute("id"),10),u=o.getAttribute("file");if(isNaN(s))throw new Error('malformed file -- page "id" attribute is NaN');if(!u)throw new Error('malformed file -- needs page "file" attribute');r.pages[parseInt(s,10)]=u}return["chars","kernings"].forEach(function(e){var n=t.getElementsByTagName(e)[0];if(n)for(var i=e.substring(0,e.length-1),a=n.getElementsByTagName(i),o=0;o<a.length;o++){var s=a[o];r[e].push(parseAttributes(getAttribs(s)))}}),r};function getAttribs(e){return getAttribList(e).reduce(function(e,t){return e[mapName(t.nodeName)]=t.nodeValue,e},{})}function getAttribList(e){for(var t=[],r=0;r<e.attributes.length;r++)t.push(e.attributes[r]);return t}function mapName(e){return NAME_MAP[e.toLowerCase()]||e}var parseXML=getDefaultExportFromCjs(browser),HEADER$1=[66,77,70],parseBmfontBinary=function(e){if(e.length<6)throw new Error("invalid buffer length for BMFont");var t=HEADER$1.every(function(t,r){return e.readUInt8(r)===t});if(!t)throw new Error("BMFont missing BMF byte header");var r=3;if(e.readUInt8(r++)>3)throw new Error("Only supports BMFont Binary v3 (BMFont App v1.10)");for(var n={kernings:[],chars:[]},i=0;i<5;i++)r+=readBlock(n,e,r);return n};function readBlock(e,t,r){if(r>t.length-1)return 0;var n=t.readUInt8(r++),i=t.readInt32LE(r);switch(r+=4,n){case 1:e.info=readInfo(t,r);break;case 2:e.common=readCommon(t,r);break;case 3:e.pages=readPages(t,r,i);break;case 4:e.chars=readChars(t,r,i);break;case 5:e.kernings=readKernings(t,r,i)}return 5+i}function readInfo(e,t){var r={};r.size=e.readInt16LE(t);var n=e.readUInt8(t+2);return r.smooth=n>>7&1,r.unicode=n>>6&1,r.italic=n>>5&1,r.bold=n>>4&1,n>>3&1&&(r.fixedHeight=1),r.charset=e.readUInt8(t+3)||"",r.stretchH=e.readUInt16LE(t+4),r.aa=e.readUInt8(t+6),r.padding=[e.readInt8(t+7),e.readInt8(t+8),e.readInt8(t+9),e.readInt8(t+10)],r.spacing=[e.readInt8(t+11),e.readInt8(t+12)],r.outline=e.readUInt8(t+13),r.face=readStringNT(e,t+14),r}function readCommon(e,t){var r={};return r.lineHeight=e.readUInt16LE(t),r.base=e.readUInt16LE(t+2),r.scaleW=e.readUInt16LE(t+4),r.scaleH=e.readUInt16LE(t+6),r.pages=e.readUInt16LE(t+8),e.readUInt8(t+10),r.packed=0,r.alphaChnl=e.readUInt8(t+11),r.redChnl=e.readUInt8(t+12),r.greenChnl=e.readUInt8(t+13),r.blueChnl=e.readUInt8(t+14),r}function readPages(e,t,r){for(var n=[],i=readNameNT(e,t),a=i.length+1,o=r/a,s=0;s<o;s++)n[s]=e.slice(t,t+i.length).toString("utf8"),t+=a;return n}function readChars(e,t,r){for(var n=[],i=r/20,a=0;a<i;a++){var o={},s=20*a;o.id=e.readUInt32LE(t+0+s),o.x=e.readUInt16LE(t+4+s),o.y=e.readUInt16LE(t+6+s),o.width=e.readUInt16LE(t+8+s),o.height=e.readUInt16LE(t+10+s),o.xoffset=e.readInt16LE(t+12+s),o.yoffset=e.readInt16LE(t+14+s),o.xadvance=e.readInt16LE(t+16+s),o.page=e.readUInt8(t+18+s),o.chnl=e.readUInt8(t+19+s),n[a]=o}return n}function readKernings(e,t,r){for(var n=[],i=r/10,a=0;a<i;a++){var o={},s=10*a;o.first=e.readUInt32LE(t+0+s),o.second=e.readUInt32LE(t+4+s),o.amount=e.readInt16LE(t+8+s),n[a]=o}return n}function readNameNT(e,t){for(var r=t;r<e.length&&0!==e[r];r++);return e.slice(t,r)}function readStringNT(e,t){return readNameNT(e,t).toString("utf8")}var readBinary=getDefaultExportFromCjs(parseBmfontBinary);function normalizeArray(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,splitPath=function(e){return splitPathRe.exec(e).slice(1)};function resolve(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:"/";if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");n&&(e=n+"/"+e,t="/"===n.charAt(0))}return(t?"/":"")+(e=normalizeArray(filter(e.split("/"),function(e){return!!e}),!t).join("/"))||"."}function normalize(e){var t=isAbsolute(e),r="/"===substr(e,-1);return(e=normalizeArray(filter(e.split("/"),function(e){return!!e}),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e}function isAbsolute(e){return"/"===e.charAt(0)}function join(){return normalize(filter(Array.prototype.slice.call(arguments,0),function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))}function relative(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=resolve(e).substr(1),t=resolve(t).substr(1);for(var n=r(e.split("/")),i=r(t.split("/")),a=Math.min(n.length,i.length),o=a,s=0;s<a;s++)if(n[s]!==i[s]){o=s;break}var u=[];for(s=o;s<n.length;s++)u.push("..");return(u=u.concat(i.slice(o))).join("/")}var sep="/",delimiter=":";function dirname(e){var t=splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."}function basename(e,t){var r=splitPath(e)[2];return t&&r.substr(-1*t.length)===t&&(r=r.substr(0,r.length-t.length)),r}function extname(e){return splitPath(e)[3]}var path={extname,basename,dirname,sep,delimiter,relative,join,isAbsolute,normalize,resolve};function filter(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n<e.length;n++)t(e[n],n,e)&&r.push(e[n]);return r}var substr=function(e,t,r){return e.substr(t,r)};function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}const t=e=>{if(!e)return null;const n={};switch(e.type){case"ELEMENT":{let i={};const a=E(e.value.attributes),o=t(e.value.children);if(a&&(i=Object.assign(i,a)),o){const t=r(e.value.children);i=Object.assign(i,t)}n[e.value.type]=i;break}case"ATTRIBUTE":{const t=e.value;n[t.name]=t.value;break}case"CONTENT":return{content:e.value}}return n},r=e=>e&&Array.isArray(e)&&0!==e.length?n(e)?{content:e[0].value}:{children:e.map(t)}:null,n=e=>e&&Array.isArray(e)&&1===e.length&&"CONTENT"===e[0].type,E=e=>e&&Array.isArray(e)?e.map(t).reduce((e,t)=>Object.assign(e,t),{}):null;var s={convert:e=>t(e.value.children[0])},a={Token:(e,t)=>({type:e,value:t}),TOKEN_TYPE:{OPEN_BRACKET:"OPEN_BRACKET",ELEMENT_TYPE:"ELEMENT_TYPE",CLOSE_ELEMENT:"CLOSE_ELEMENT",ATTRIB_NAME:"ATTRIB_NAME",ATTRIB_VALUE:"ATTRIB_VALUE",ASSIGN:"ASSIGN",CLOSE_BRACKET:"CLOSE_BRACKET",CONTENT:"CONTENT",EOF:"EOF"}};const{Token:T,TOKEN_TYPE:u}=a,c=T("EOF"),l=e=>" "===e||"\n"===e||"\r"===e||"\t"===e,o=e=>e.replace(/'/g,'"');var N={createLexer:function(e){let t=null,r=(e=>{let t=0;for(;t<e.length&&l(e[t]);)t++;return((e,t)=>{if(e.startsWith("<?xml",t)){const r=e.length;for(;t<r;)if("?"!==e[t])t++;else{if(">"===e[t+1])return t+2;t++}}return t})(e,t)})(e),n=[];const i=()=>e[r],a=()=>t!==c&&r<e.length,s=e=>'"'===e||"'"===e,f=()=>{for(;a()&&l(e[r]);)r++},h=t=>{if(a()){if("<"===e[r]){let t="<";return r++,a()&&"/"===e[r]?(r++,t="</"):a()&&"!"===e[r]&&"-"===e[r+1]&&"-"===e[r+2]&&(r++,r++,r++,t="\x3c!--"),t}if("/"===i()){let e="/";return r++,a()&&">"===i()&&(r++,e="/>"),e}if("="===e[r]||">"===e[r]){const t=e[r];return r++,t}}return d(!!t)},d=t=>{const n=t?/[^>=<]/u:/[a-zA-Z0-9_:-]/;let i=r;for(;a()&&e[r].match(n);)r++;return o(e.substring(i,r))},p=()=>{const l=r;f();const m=r-l;if(a())if(t&&t.type===u.OPEN_BRACKET){f();const e=h(!1);t=T(u.ELEMENT_TYPE,e),n.push(e)}else if(t&&t.type===u.ASSIGN){a()&&s(i())&&r++;let n=r;for(;a()&&!s(i());)r++;const l=o(e.substring(n,r));r++,t=T(u.ATTRIB_VALUE,l)}else{f();let o=h(!0);switch(o){case"=":t=t.type===u.ATTRIB_NAME?T(u.ASSIGN):T(u.CONTENT,o);break;case"</":{const i=r;for(;">"!==e[r];)r++;t=T(u.CLOSE_ELEMENT,e.substring(i,r)),r++,n.pop();break}case"/>":{const e=n.pop();t=T(u.CLOSE_ELEMENT,e);break}case"\x3c!--":{const t=["!","-","-"];for(;a()&&(">"!==t[2]||"-"!==t[1]||"-"!==t[0]);)t.shift(),t.push(e[r]),r++;return p()}case">":t=T(u.CLOSE_BRACKET);break;case"<":t=T(u.OPEN_BRACKET);break;default:if(o&&o.length>0){if(t.type===u.CLOSE_BRACKET){let e="";"<"!==i()&&(e=d(!0)),t=T(u.CONTENT,o+e)}else if(t.type!==u.ATTRIB_NAME&&t.type!==u.CONTENT)t.type===u.CLOSE_ELEMENT?(o=" ".repeat(m)+o,t=T(u.CONTENT,o)):t=T(u.ATTRIB_NAME,o);else{const e=" ".repeat(m)+o;t=T(u.CONTENT,e)}break}{const t='Unknown Syntax : "'+e[r]+'"';throw new Error(t)}}}else t=c;return t};return{peek:i,next:p,hasNext:a}}};const{createLexer:i}=N,{Token:p,TOKEN_TYPE:O}=a,[A,f,C,h]=["ROOT","ELEMENT","ATTRIBUTE","CONTENT"],_=(e,t)=>({type:e,value:t}),L=e=>_(h,e),y=(e,t,r)=>_(f,{type:e,attributes:t,children:r}),v=(e,t)=>_(C,{name:e,value:t}),S=(e,t)=>{const r=[];for(;e.hasNext();){const n=e.next();switch(n.type){case O.OPEN_BRACKET:{const t=e.next(),[n,i]=R(e);let a=[];i.type!==O.CLOSE_ELEMENT&&(a=S(e,t)),a&&a.length>0&&a[0].type===O.CONTENT&&(a=b(a)),r.push(y(t.value,n,a));break}case O.CLOSE_ELEMENT:if(n.value===t.value)return r;break;case O.CONTENT:r.push(L(n.value));break;case O.EOF:return r;default:throw new Error(`Unknown Lexem type: ${n.type} "${n.value}, scoping element: ${t.value}"`)}}return r},R=e=>{const t=[];let r=e.peek();if(!e.hasNext()||r&&r.type===O.CLOSE_BRACKET||r&&r.type===O.CLOSE_ELEMENT)return[t,r];for(r=e.next();e.hasNext()&&r&&r.type!==O.CLOSE_BRACKET&&r.type!==O.CLOSE_ELEMENT;){const n=r;e.next();const i=e.next(),a=v(n.value,i.value);t.push(a),r=e.next()}return[t,r]};function b(e){let t=[],r="";return e.forEach(e=>{e.type===O.CONTENT?r+=e.value:(r.length&&(t.push(L(r)),r=""),t.push(e))}),r.length&&t.push(L(r)),t}var B={transpile:function(e,t){const r=(e=>_(A,{children:S(e,p(A,"ROOT"))}))(i(e));return t?t.convert(r):r},Node:_,ElementNode:y,AttribNode:v};const M=s,{transpile:x}=B;var k=e({convertXML:function(e,t){return x(e,t||M)},createAST:function(e){return x(e)}}),simpleXmlToJson_min=k,xmlPackage=getDefaultExportFromCjs(simpleXmlToJson_min);const{convertXML}=xmlPackage,isWebWorker="undefined"!=typeof self&&void 0===self.document,CharacterJimp=createJimp({formats:[png]}),HEADER=Buffer.from([66,77,70,3]);function isBinary(e){if("string"==typeof e)return"BMF"===e.substring(0,3);const t=e.slice(0,4);return e.length>4&&t[0]===HEADER[0]&&t[1]===HEADER[1]&&t[2]===HEADER[2]}function parseFont(e,t){return isBinary(t)?("string"==typeof t&&(t=Buffer.from(t,"binary")),readBinary(t)):(t=t.toString().trim(),/.json$/.test(e)||"{"===t.charAt(0)?JSON.parse(t):/.xml$/.test(e)||"<"===t.charAt(0)?parseXML(t):parseASCII(t))}function parseNumbersInObject(e){for(const t in e){try{e[t]=parseInt(e[t],10)}catch{}"object"==typeof e[t]&&parseNumbersInObject(e[t])}return e}async function loadBitmapFontData(e){if(isWebWorker&&"string"==typeof e){const t=await fetch(e),r=await t.text(),n=convertXML(r).font.children.reduce((e,t)=>({...e,...t}),{}),i=[],a=[],o=[];for(let e=0;e<n.pages.children.length;e++){const t=n.pages.children[e].page;i[parseInt(t.id,10)]=parseNumbersInObject(t.file)}for(let e=0;e<n.chars.children.length;e++)a.push(parseNumbersInObject(n.chars.children[e].char));for(let e=0;e<n.kernings.children.length;e++)o.push(parseNumbersInObject(n.kernings.children[e].kerning));return{info:n.info,common:n.common,pages:i,chars:a,kernings:o}}if("string"==typeof e){const t=await fetch(e);return parseFont(e,await t.text())}return parseFont("",e)}async function processBitmapFont(e,t){const r={},n={};for(let e=0;e<t.chars.length;e++){const n=t.chars[e];r[String.fromCharCode(n.id)]=n}for(let e=0;e<t.kernings.length;e++){const r=String.fromCharCode(t.kernings[e].first);n[r]=n[r]||{},n[r][String.fromCharCode(t.kernings[e].second)]=t.kernings[e].amount}return{...t,chars:r,kernings:n,pages:await Promise.all(t.pages.map(async t=>CharacterJimp.read(path.join(path.dirname(e),t))))}}async function loadFont(e){let t=e;if("undefined"==typeof window&&!isWebWorker){const{existsSync:r,promises:n}=await Promise.resolve().then(function(){return _polyfillNode_fs$1});r(e)&&(t=await n.readFile(e))}return processBitmapFont(e,await loadBitmapFontData(t))}var pixelmatch_1=pixelmatch;const defaultOptions={threshold:.1,includeAA:!1,alpha:.1,aaColor:[255,255,0],diffColor:[255,0,0],diffColorAlt:null,diffMask:!1};function pixelmatch(e,t,r,n,i,a){if(!isPixelData(e)||!isPixelData(t)||r&&!isPixelData(r))throw new Error("Image data: Uint8Array, Uint8ClampedArray or Buffer expected.");if(e.length!==t.length||r&&r.length!==e.length)throw new Error("Image sizes do not match.");if(e.length!==n*i*4)throw new Error("Image data size does not match width/height.");a=Object.assign({},defaultOptions,a);const o=n*i,s=new Uint32Array(e.buffer,e.byteOffset,o),u=new Uint32Array(t.buffer,t.byteOffset,o);let l=!0;for(let e=0;e<o;e++)if(s[e]!==u[e]){l=!1;break}if(l){if(r&&!a.diffMask)for(let t=0;t<o;t++)drawGrayPixel(e,4*t,a.alpha,r);return 0}const c=35215*a.threshold*a.threshold;let f=0;for(let o=0;o<i;o++)for(let s=0;s<n;s++){const u=4*(o*n+s),l=colorDelta(e,t,u,u);Math.abs(l)>c?a.includeAA||!antialiased(e,s,o,n,i,t)&&!antialiased(t,s,o,n,i,e)?(r&&drawPixel(r,u,...l<0&&a.diffColorAlt||a.diffColor),f++):r&&!a.diffMask&&drawPixel(r,u,...a.aaColor):r&&(a.diffMask||drawGrayPixel(e,u,a.alpha,r))}return f}function isPixelData(e){return ArrayBuffer.isView(e)&&1===e.constructor.BYTES_PER_ELEMENT}function antialiased(e,t,r,n,i,a){const o=Math.max(t-1,0),s=Math.max(r-1,0),u=Math.min(t+1,n-1),l=Math.min(r+1,i-1),c=4*(r*n+t);let f,h,d,p,m=t===o||t===u||r===s||r===l?1:0,g=0,b=0;for(let i=o;i<=u;i++)for(let a=s;a<=l;a++){if(i===t&&a===r)continue;const o=colorDelta(e,e,c,4*(a*n+i),!0);if(0===o){if(m++,m>2)return!1}else o<g?(g=o,f=i,h=a):o>b&&(b=o,d=i,p=a)}return 0!==g&&0!==b&&(hasManySiblings(e,f,h,n,i)&&hasManySiblings(a,f,h,n,i)||hasManySiblings(e,d,p,n,i)&&hasManySiblings(a,d,p,n,i))}function hasManySiblings(e,t,r,n,i){const a=Math.max(t-1,0),o=Math.max(r-1,0),s=Math.min(t+1,n-1),u=Math.min(r+1,i-1),l=4*(r*n+t);let c=t===a||t===s||r===o||r===u?1:0;for(let i=a;i<=s;i++)for(let a=o;a<=u;a++){if(i===t&&a===r)continue;const o=4*(a*n+i);if(e[l]===e[o]&&e[l+1]===e[o+1]&&e[l+2]===e[o+2]&&e[l+3]===e[o+3]&&c++,c>2)return!0}return!1}function colorDelta(e,t,r,n,i){let a=e[r+0],o=e[r+1],s=e[r+2],u=e[r+3],l=t[n+0],c=t[n+1],f=t[n+2],h=t[n+3];if(u===h&&a===l&&o===c&&s===f)return 0;u<255&&(u/=255,a=blend(a,u),o=blend(o,u),s=blend(s,u)),h<255&&(h/=255,l=blend(l,h),c=blend(c,h),f=blend(f,h));const d=rgb2y(a,o,s),p=rgb2y(l,c,f),m=d-p;if(i)return m;const g=rgb2i(a,o,s)-rgb2i(l,c,f),b=rgb2q(a,o,s)-rgb2q(l,c,f),y=.5053*m*m+.299*g*g+.1957*b*b;return d>p?-y:y}function rgb2y(e,t,r){return.29889531*e+.58662247*t+.11448223*r}function rgb2i(e,t,r){return.59597799*e-.2741761*t-.32180189*r}function rgb2q(e,t,r){return.21147017*e-.52261711*t+.31114694*r}function blend(e,t){return 255+(e-255)*t}function drawPixel(e,t,r,n,i){e[t+0]=r,e[t+1]=n,e[t+2]=i,e[t+3]=255}function drawGrayPixel(e,t,r,n){const i=blend(rgb2y(e[t+0],e[t+1],e[t+2]),r*e[t+3]/255);drawPixel(n,t,i,i,i)}var pixelMatch=getDefaultExportFromCjs(pixelmatch_1);function diff(e,t,r=.1){let n=e.bitmap,i=t.bitmap;if(n.width===i.width&&n.height===i.height||(n.width*n.height>i.width*i.height?n=methods$d.resize(clone(e),{w:i.width,h:i.height}).bitmap:i=methods$d.resize(clone(t),{w:n.width,h:n.height}).bitmap),"number"!=typeof r||r<0||r>1)throw new Error("threshold must be a number between 0 and 1");const a=new e.constructor({width:n.width,height:n.height,color:4294967295});return{percent:pixelMatch(n.data,i.data,a.bitmap.data,a.bitmap.width,a.bitmap.height,{threshold:r})/(a.bitmap.width*a.bitmap.height),image:a}}const defaultPlugins=[methods$h,methods$g,methods$f,methods$e,methods$c,methods$a,methods$b,methods$9,methods$8,methods$7,methods$6,methods$5,methods$4,methods$3,methods$d,methods$2,methods$1,methods],defaultFormats=[bmp,msBmp,gif,jpeg$2,png,tiff],JimpMime={bmp:bmp().mime,gif:gif().mime,jpeg:jpeg$2().mime,png:png().mime,tiff:tiff().mime},Jimp=createJimp({formats:defaultFormats,plugins:defaultPlugins})}},__webpack_module_cache__={},leafPrototypes,getProto;function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},getProto=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,__webpack_require__.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var r=Object.create(null);__webpack_require__.r(r);var n={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var i=2&t&&e;("object"==typeof i||"function"==typeof i)&&!~leafPrototypes.indexOf(i);i=getProto(i))Object.getOwnPropertyNames(i).forEach(t=>n[t]=()=>e[t]);return n.default=()=>e,__webpack_require__.d(r,n),r},__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.p="";var __webpack_exports__={};(()=>{"use strict";function e(e,t,r,n,i,a,o){try{var s=e[a](o),u=s.value}catch(e){return void r(e)}s.done?t(u):Promise.resolve(u).then(n,i)}function t(t){return function(){var r=this,n=arguments;return new Promise(function(i,a){var o=t.apply(r,n);function s(t){e(o,i,a,s,u,"next",t)}function u(t){e(o,i,a,s,u,"throw",t)}s(void 0)})}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i(n.key),n)}}function o(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function s(e,t){if(t&&("object"==n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function u(e){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},u(e)}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}var f=__webpack_require__(54756),h=__webpack_require__.n(f);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function p(e,t){if(e){if("string"==typeof e)return d(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function m(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var g=__webpack_require__(73065),b=__webpack_require__.n(g),y=__webpack_require__(90031),_=__webpack_require__.n(y);function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}function w(e){var t="function"==typeof Map?new Map:void 0;return w=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(v())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var i=new(e.bind.apply(e,n));return r&&l(i,r.prototype),i}(e,arguments,u(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),l(r,e)},w(e)}function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(x=function(){return!!e})()}const k=function(e){function t(){var e,n,i,a;r(this,t);for(var o=arguments.length,l=new Array(o),c=0;c<o;c++)l[c]=arguments[c];return n=this,i=t,a=[].concat(l),i=u(i),(e=s(n,x()?Reflect.construct(i,a||[],u(n).constructor):i.apply(n,a))).type="OperationError",Error.captureStackTrace&&Error.captureStackTrace(e,t),e}return c(t,e),o(t)}(w(Error));function B(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=";if(!e)return"";if("string"==typeof e&&(e=O.strToArrayBuffer(e)),e instanceof ArrayBuffer&&(e=new Uint8Array(e)),64!==(t=O.expandAlphRange(t).join("")).length&&65!==t.length)throw new k(`Invalid Base64 alphabet length (${t.length}): ${t}`);for(var r,n,i,a,o,s,u,l="",c=0;c<e.length;)a=(r=e[c++])>>2,o=(3&r)<<4|(n=e[c++])>>4,s=(15&n)<<2|(i=e[c++])>>6,u=63&i,isNaN(n)?s=u=64:isNaN(i)&&(u=64),l+=t.charAt(a)+t.charAt(o)+t.charAt(s)+t.charAt(u);return l}function E(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"A-Za-z0-9+/=",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"string",n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(!e)return"string"===r?"":[];if(t=t||"A-Za-z0-9+/=",64!==(t=O.expandAlphRange(t).join("")).length&&65!==t.length)throw new k(`Error: Base64 alphabet should be 64 characters long, or 65 with a padding character. Found ${t.length}: ${t}`);if(n){var a=new RegExp("[^"+t.replace(/[[\]\\\-^$]/g,"\\$&")+"]","g");e=e.replace(a,"")}if(i){if(e.length%4==1)throw new k(`Error: Invalid Base64 input length (${e.length}). Cannot be 4n+1, even without padding chars.`);if(65===t.length){var o=t.charAt(64),s=e.indexOf(o);if(s>=0){if(s<e.length-2||e.charAt(e.length-1)!==o)throw new k(`Error: Base64 padding character (${o}) not used in the correct place.`);if(e.length%4!=0)throw new k("Error: Base64 not padded to a multiple of 4.")}}}for(var u,l,c,f,h,d,p,m=[],g=0;g<e.length;){if(f=t.indexOf(e.charAt(g++)||null),h=t.indexOf(e.charAt(g++)||null),d=t.indexOf(e.charAt(g++)||null),p=t.indexOf(e.charAt(g++)||null),i&&(f<0||h<0||d<0||p<0))throw new k("Error: Base64 input contains non-alphabet char(s)");l=(15&h)<<4|d>>2,c=(3&d)<<6|p,(u=f<<2|h>>4)>=0&&u<256&&m.push(u),l>=0&&l<256&&64!==d&&m.push(l),c>=0&&c<256&&64!==p&&m.push(c)}return"string"===r?O.byteArrayToUtf8(m):m}function S(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Auto",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if(r<1||Math.round(r)!==r)throw new k("Byte length must be a positive integer");if("None"!==t){var n="Auto"===t?/[^a-f\d]|0x/gi:O.regexRep(t);e=e.split(n)}else e=[e];for(var i=[],a=0;a<e.length;a++)for(var o=0;o<e[a].length;o+=r)i.push(parseInt(e[a].substr(o,r),16));return i}function A(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Auto";t=O.charRep(t);var r=[],n=e.split(t);""===n[n.length-1]&&(n=n.slice(0,n.length-1));for(var i=0;i<n.length;i++)r[i]=parseInt(n[i],10);return r}function C(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Space",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8;if(r<1||Math.round(r)!==r)throw new k("Byte length must be a positive integer");var n=O.regexRep(t);e=e.replace(n,"");for(var i=[],a=0;a<e.length;a+=r)i.push(parseInt(e.substr(a,r),2));return i}["Auto"].concat(["Space","Percent","Comma","Semi-colon","Colon","Line feed","CRLF","0x","0x with comma","\\x","None"]);var I=__webpack_require__(48287).Buffer,P=__webpack_require__(65606),T=function(){function e(){r(this,e)}return o(e,null,[{key:"chr",value:function(e){if(e>65535){e-=65536;var t=String.fromCharCode(e>>>10&1023|55296);return e=56320|1023&e,t+String.fromCharCode(e)}return String.fromCharCode(e)}},{key:"ord",value:function(e){if(2===e.length){var t=e.charCodeAt(0),r=e.charCodeAt(1);if(t>=55296&&t<56320&&r>=56320&&r<57344)return 1024*(t-55296)+r-56320+65536}return e.charCodeAt(0)}},{key:"padBytesRight",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=new Array(t);return n.fill(r),m(e).forEach(function(e,t){n[t]=e}),n}},{key:"truncate",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return e.length>t&&(e=e.slice(0,t-r.length)+r),e}},{key:"hex",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return(t="string"==typeof t?e.ord(t):t).toString(16).padStart(r,"0")}},{key:"bin",value:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:8;return(t="string"==typeof t?e.ord(t):t).toString(2).padStart(r,"0")}},{key:"printable",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return arguments.length>2&&void 0!==arguments[2]&&arguments[2]?e.replace(/[^\x20-\x7e]/g,"."):(e=e.replace(/[\0-\x08\x0B-\x0C\x0E-\x1F\x7F-\x9F\xAD\u0378\u0379\u037F-\u0383\u038B\u038D\u03A2\u0528-\u0530\u0557\u0558\u0560\u0588\u058B-\u058E\u0590\u05C8-\u05CF\u05EB-\u05EF\u05F5-\u0605\u061C\u061D\u06DD\u070E\u070F\u074B\u074C\u07B2-\u07BF\u07FB-\u07FF\u082E\u082F\u083F\u085C\u085D\u085F-\u089F\u08A1\u08AD-\u08E3\u08FF\u0978\u0980\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09FC-\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF2-\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B55\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B78-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BFB-\u0C00\u0C04\u0C0D\u0C11\u0C29\u0C34\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5A-\u0C5F\u0C64\u0C65\u0C70-\u0C77\u0C80\u0C81\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0D01\u0D04\u0D0D\u0D11\u0D3B\u0D3C\u0D45\u0D49\u0D4F-\u0D56\u0D58-\u0D5F\u0D64\u0D65\u0D76-\u0D78\u0D80\u0D81\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DF1\u0DF5-\u0E00\u0E3B-\u0E3E\u0E5C-\u0E80\u0E83\u0E85\u0E86\u0E89\u0E8B\u0E8C\u0E8E-\u0E93\u0E98\u0EA0\u0EA4\u0EA6\u0EA8\u0EA9\u0EAC\u0EBA\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F48\u0F6D-\u0F70\u0F98\u0FBD\u0FCD\u0FDB-\u0FFF\u10C6\u10C8-\u10CC\u10CE\u10CF\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u137D-\u137F\u139A-\u139F\u13F5-\u13FF\u169D-\u169F\u16F1-\u16FF\u170D\u1715-\u171F\u1737-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17DE\u17DF\u17EA-\u17EF\u17FA-\u17FF\u180F\u181A-\u181F\u1878-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191D-\u191F\u192C-\u192F\u193C-\u193F\u1941-\u1943\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19DD\u1A1C\u1A1D\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1A9F\u1AAE-\u1AFF\u1B4C-\u1B4F\u1B7D-\u1B7F\u1BF4-\u1BFB\u1C38-\u1C3A\u1C4A-\u1C4C\u1C80-\u1CBF\u1CC8-\u1CCF\u1CF7-\u1CFF\u1DE7-\u1DFB\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FC5\u1FD4\u1FD5\u1FDC\u1FF0\u1FF1\u1FF5\u1FFF\u200B-\u200F\u202A-\u202E\u2060-\u206F\u2072\u2073\u208F\u209D-\u209F\u20BB-\u20CF\u20F1-\u20FF\u218A-\u218F\u23F4-\u23FF\u2427-\u243F\u244B-\u245F\u2700\u2B4D-\u2B4F\u2B5A-\u2BFF\u2C2F\u2C5F\u2CF4-\u2CF8\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D71-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E3C-\u2E7F\u2E9A\u2EF4-\u2EFF\u2FD6-\u2FEF\u2FFC-\u2FFF\u3040\u3097\u3098\u3100-\u3104\u312E-\u3130\u318F\u31BB-\u31BF\u31E4-\u31EF\u321F\u32FF\u4DB6-\u4DBF\u9FCD-\u9FFF\uA48D-\uA48F\uA4C7-\uA4CF\uA62C-\uA63F\uA698-\uA69E\uA6F8-\uA6FF\uA78F\uA794-\uA79F\uA7AB-\uA7F7\uA82C-\uA82F\uA83A-\uA83F\uA878-\uA87F\uA8C5-\uA8CD\uA8DA-\uA8DF\uA8FC-\uA8FF\uA954-\uA95E\uA97D-\uA97F\uA9CE\uA9DA-\uA9DD\uA9E0-\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A\uAA5B\uAA7C-\uAA7F\uAAC3-\uAADA\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F-\uABBF\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBC2-\uFBD2\uFD40-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFE\uFDFF\uFE1A-\uFE1F\uFE27-\uFE2F\uFE53\uFE67\uFE6C-\uFE6F\uFE75\uFEFD-\uFF00\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFDF\uFFE7\uFFEF-\uFFFB\uFFFE\uFFFF]/g,"."),t||(e=e.replace(/[\x09-\x10\u2028\u2029]/g,".")),e)}},{key:"escapeWhitespace",value:function(e){return e.replace(/[\x09-\x10]/g,function(e){return String.fromCharCode(57344+e.charCodeAt(0))})}},{key:"parseEscapedChars",value:function(e){return e.replace(/\\([abfnrtv'"]|[0-3][0-7]{2}|[0-7]{1,2}|x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]{1,6}\}|\\)/g,function(e,t){switch(t[0]){case"\\":return"\\";case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":return String.fromCharCode(parseInt(t,8));case"a":return String.fromCharCode(7);case"b":return"\b";case"t":return"\t";case"n":return"\n";case"v":return"\v";case"f":return"\f";case"r":return"\r";case'"':return'"';case"'":return"'";case"x":return String.fromCharCode(parseInt(t.substr(1),16));case"u":return"{"===t[1]?String.fromCodePoint(parseInt(t.slice(2,-1),16)):String.fromCharCode(parseInt(t.substr(1),16))}})}},{key:"escapeRegex",value:function(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}},{key:"expandAlphRange",value:function(t){for(var r=[],n=0;n<t.length;n++)if(n<t.length-2&&"-"===t[n+1]&&"\\"!==t[n]){for(var i=e.ord(t[n]),a=e.ord(t[n+2]),o=i;o<=a;o++)r.push(e.chr(o));n+=2}else n<t.length-2&&"\\"===t[n]&&"-"===t[n+1]?(r.push("-"),n++):r.push(t[n]);return r}},{key:"convertToByteArray",value:function(t,r){switch(r.toLowerCase()){case"binary":return C(t);case"hex":return S(t);case"decimal":return A(t);case"base64":return E(t,null,"byteArray");case"utf8":return e.strToUtf8ByteArray(t);default:return e.strToByteArray(t)}}},{key:"convertToByteString",value:function(t,r){switch(r.toLowerCase()){case"binary":return e.byteArrayToChars(C(t));case"hex":return e.byteArrayToChars(S(t));case"decimal":return e.byteArrayToChars(A(t));case"base64":return e.byteArrayToChars(E(t,null,"byteArray"));case"utf8":return _().encode(t);default:return t}}},{key:"byteArrayToInt",value:function(e,t){var r=0;if("big"===t)for(var n=0;n<e.length;n++)r=256*r+e[n];else for(var i=e.length-1;i>=0;i--)r=256*r+e[i];return r}},{key:"intToByteArray",value:function(e,t,r){var n=new Array(t);if("little"===r)for(var i=0;i<t;i++)n[i]=255&e,e>>>=8;else for(var a=t-1;a>=0;a--)n[a]=255&e,e>>>=8;return n}},{key:"strToArrayBuffer",value:function(t){if(b().debug(`Converting string[${null==t?void 0:t.length}] to array buffer`),!t)return new ArrayBuffer;for(var r,n=new Uint8Array(t.length),i=t.length;i--;)if(r=t.charCodeAt(i),n[i]=r,r>255)return e.strToUtf8ArrayBuffer(t);return n.buffer}},{key:"strToUtf8ArrayBuffer",value:function(e){if(b().debug(`Converting string[${null==e?void 0:e.length}] to UTF8 array buffer`),!e)return new ArrayBuffer;var t=new TextEncoder("utf-8").encode(e);return e.length!==t.length&&(F()&&self&&"function"==typeof self.setOption?self.setOption("attemptHighlight",!1):R()&&(window.app.options.attemptHighlight=!1)),t.buffer}},{key:"strToByteArray",value:function(t){if(b().debug(`Converting string[${null==t?void 0:t.length}] to byte array`),!t)return[];for(var r,n=new Array(t.length),i=t.length;i--;)if(r=t.charCodeAt(i),n[i]=r,r>255)return e.strToUtf8ByteArray(t);return n}},{key:"strToUtf8ByteArray",value:function(t){if(b().debug(`Converting string[${null==t?void 0:t.length}] to UTF8 byte array`),!t)return[];var r=_().encode(t);return t.length!==r.length&&(F()?self.setOption("attemptHighlight",!1):R()&&(window.app.options.attemptHighlight=!1)),e.strToByteArray(r)}},{key:"strToCharcode",value:function(t){if(b().debug(`Converting string[${null==t?void 0:t.length}] to charcode`),!t)return[];for(var r=[],n=0;n<t.length;n++){var i=t.charCodeAt(n);if(n<t.length-1&&i>=55296&&i<56320){var a=t[n+1].charCodeAt(0);a>=56320&&a<57344&&(i=e.ord(t[n]+t[++n]))}r.push(i)}return r}},{key:"byteArrayToUtf8",value:function(t){var r;if(b().debug(`Converting byte array[${null===(r=t)||void 0===r?void 0:r.length}] to UTF8`),!t||!t.length)return"";t instanceof Uint8Array||(t=new Uint8Array(t));try{var n=new TextDecoder("utf-8",{fatal:!0}).decode(t);return n.length!==t.length&&(F()?self.setOption("attemptHighlight",!1):R()&&(window.app.options.attemptHighlight=!1)),n}catch(r){return e.byteArrayToChars(t)}}},{key:"byteArrayToChars",value:function(e){if(b().debug(`Converting byte array[${null==e?void 0:e.length}] to chars`),!e||!e.length)return"";for(var t="",r=0;r<e.length;r+=2e4)t+=String.fromCharCode.apply(String,m(e.slice(r,r+2e4)));return t}},{key:"arrayBufferToStr",value:function(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(b().debug(`Converting array buffer[${null==t?void 0:t.byteLength}] to str`),!t||!t.byteLength)return"";var n=new Uint8Array(t);return r?e.byteArrayToUtf8(n):e.byteArrayToChars(n)}},{key:"calculateShannonEntropy",value:function(e){e instanceof ArrayBuffer&&(e=new Uint8Array(e));var t,r=[],n=new Array(256).fill(0);for(t=0;t<e.length;t++)n[e[t]]++;for(t=0;t<n.length;t++)n[t]>0&&r.push(n[t]/e.length);var i,a=0;for(t=0;t<r.length;t++)a+=(i=r[t])*Math.log(i)/Math.log(2);return-a}},{key:"parseCSV",value:function(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[","],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:["\n","\r"],a=!1,o=!1,s="",u=[],l=[];e.length&&"\ufeff"===e[0]&&(e=e.substr(1));for(var c=0;c<e.length;c++)t=e[c],r=e[c+1]||"",a?(s+=t,a=!1):'"'!==t||o?'"'===t&&o?'"'===r?a=!0:o=!1:!o&&n.indexOf(t)>=0?(u.push(s),s=""):!o&&i.indexOf(t)>=0?(u.push(s),s="",l.push(u),u=[],i.indexOf(r)>=0&&r!==t&&c++):s+=t:o=!0;return u.length&&(u.push(s),l.push(u)),l}},{key:"stripHtmlTags",value:function(e){function t(e,r){var n=r.replace(e,"");return n.length===r.length?n:t(e,n)}return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(e=t(/<script[^>]*>(\s|\S)*?<\/script[^>]*>/gi,e),e=t(/<style[^>]*>(\s|\S)*?<\/style[^>]*>/gi,e)),t(/<[^>]+>/g,e)}},{key:"escapeHtml",value:function(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","\0":""};return e?e.replace(/[&<>"'`\u0000]/g,function(e){return t[e]}):e}},{key:"unescapeHtml",value:function(e){var t={"&":"&","<":"<",">":">",""":'"',"'":"'","/":"/","`":"`","":"\0"};return e.replace(/(&#?x?[a-z0-9]{2,4};|\ue000)/gi,function(e){return t[e]||e})}},{key:"toTitleCase",value:function(e){return e.replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()})}},{key:"encodeURIFragment",value:function(e){var t={"%2D":"-","%2E":".","%5F":"_","%7E":"~","%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2C":",","%3B":";","%3A":":","%40":"@","%2F":"/","%3F":"?"};return(e=encodeURIComponent(e)).replace(/%[0-9A-F]{2}/g,function(e){return t[e]||e})}},{key:"generatePrettyRecipe",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r="",n="",i="",a="",o="";return e.forEach(function(e){n=e.op.replace(/ /g,"_"),i=JSON.stringify(e.args).slice(1,-1).replace(/'/g,"\\'").replace(/"((?:[^"\\]|\\.)*)"/g,"'$1'").replace(/\\"/g,'"'),a=e.disabled?"/disabled":"",o=e.breakpoint?"/breakpoint":"",r+=`${n}(${i}${a}${o})`,t&&(r+="\n")}),r}},{key:"parseRecipeConfig",value:function(e){if(0===(e=e.trim()).length)return[];if("["===e[0])return JSON.parse(e);var t,r;e=e.replace(/\n/g,"");for(var n=/([^(]+)\(((?:'[^'\\]*(?:\\.[^'\\]*)*'|[^)/'])*)(\/[^)]+)?\)/g,i=[];t=n.exec(e);){r="["+(r=t[2].replace(/"/g,'\\"').replace(/(^|,|{|:)'/g,'$1"').replace(/([^\\]|(?:\\\\)+)'(,|:|}|$)/g,'$1"$2').replace(/\\'/g,"'"))+"]";var a={op:t[1].replace(/_/g," "),args:JSON.parse(r)};t[3]&&t[3].indexOf("disabled")>0&&(a.disabled=!0),t[3]&&t[3].indexOf("breakpoint")>0&&(a.breakpoint=!0),i.push(a)}return i}},{key:"displayFilesAsHTML",value:(n=t(h().mark(function r(n){var i,a,o,s,u,l;return h().wrap(function(r){for(;;)switch(r.prev=r.next){case 0:i=function(t){return`<div class='card' style='white-space: normal;'>\n <div class='card-header'>\n <h6 class="mb-0">\n ${e.escapeHtml(t.name)}\n </h6>\n </div>\n </div>`},a=function(t,r){if(r.startsWith("image")){var n="data:";return n+=r+";","<img style='max-width: 100%;' src='"+(n+="base64,"+B(t))+"'>"}return`<pre>${e.escapeHtml(e.arrayBufferToStr(t.buffer))}</pre>`},o=function(){var r=t(h().mark(function t(r,n){var i,o,s,u;return h().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,e.readFile(r);case 1:return i=t.sent,o=new Blob([i],{type:r.type||"octet/stream"}),s=URL.createObjectURL(o),u=`<div class='card' style='white-space: normal;'>\n <div class='card-header' id='heading${n}'>\n <h6 class='mb-0'>\n <a class='collapsed'\n data-toggle='collapse'\n href='#collapse${n}'\n aria-expanded='false'\n aria-controls='collapse${n}'\n title="Show/hide contents of '${e.escapeHtml(r.name)}'">\n ${e.escapeHtml(r.name)}</a>\n <span class='float-right' style="margin-top: -3px">\n ${r.size.toLocaleString()} bytes\n <a title="Download ${e.escapeHtml(r.name)}"\n href="${s}"\n download="${e.escapeHtml(r.name)}"\n data-toggle="tooltip">\n <i class="material-icons" style="vertical-align: bottom">save</i>\n </a>\n <a title="Move to input"\n href="#"\n blob-url="${s}"\n file-name="${e.escapeHtml(r.name)}"\n class="extract-file"\n data-toggle="tooltip">\n <i class="material-icons" style="vertical-align: bottom">open_in_browser</i>\n </a>\n </span>\n </h6>\n </div>\n <div id='collapse${n}' class='collapse' aria-labelledby='heading${n}' data-parent="#files">\n <div class='card-body'>\n ${a(i,r.type)}\n </div>\n </div>\n </div>`,t.abrupt("return",u);case 2:case"end":return t.stop()}},t)}));return function(e,t){return r.apply(this,arguments)}}(),s=`<div style='padding: 5px; white-space: normal;'>\n ${n.length} file(s) found\n </div><div id="files" style="padding: 20px">`,u=0;case 1:if(!(u<n.length)){r.next=5;break}if(!n[u].name.endsWith("/")){r.next=2;break}s+=i(n[u]),r.next=4;break;case 2:return l=s,r.next=3,o(n[u],u);case 3:s=l+=r.sent;case 4:u++,r.next=1;break;case 5:return r.abrupt("return",s+="</div>");case 6:case"end":return r.stop()}},r)})),function(e){return n.apply(this,arguments)})},{key:"parseURIParams",value:function(e){if(""===e)return{};"?"!==e[0]&&"#"!==e[0]||(e=e.substr(1));for(var t=e.split("&"),r={},n=0;n<t.length;n++){var i=t[n].split("=");2!==i.length?r[t[n]]=!0:r[i[0]]=decodeURIComponent(i[1].replace(/\+/g," "))}return r}},{key:"readFile",value:function(e){return M()?I.from(e).buffer:new Promise(function(t,r){var n=new FileReader,i=new Uint8Array(e.size),a=0,o=10485760,s=function(){if(a>=e.size)t(i);else{var r=e.slice(a,a+o);n.readAsArrayBuffer(r)}};n.onload=function(e){i.set(new Uint8Array(n.result),a),a+=o,s()},n.onerror=function(e){r(n.error.message)},s()})}},{key:"readFileSync",value:function(e){if(!M())throw new TypeError("Browser environment cannot support readFileSync");return Uint8Array.from(e.data).buffer}},{key:"mod",value:function(e,t){return(e%t+t)%t}},{key:"gcd",value:function(t,r){return r?e.gcd(r,t%r):t}},{key:"modInv",value:function(e,t){e%=t;for(var r=1;r<t;r++)if(e*r%26==1)return r}},{key:"charRep",value:function(e){return{Space:" ",Percent:"%",Comma:",","Semi-colon":";",Colon:":",Tab:"\t","Line feed":"\n",CRLF:"\r\n","Forward slash":"/",Backslash:"\\","0x":"0x","\\x":"\\x","Nothing (separate chars)":"",None:""}[e]}},{key:"regexRep",value:function(e){return{Space:/\s+/g,Percent:/%/g,Comma:/,/g,"Semi-colon":/;/g,Colon:/:/g,"Line feed":/\n/g,CRLF:/\r\n/g,"Forward slash":/\//g,Backslash:/\\/g,"0x with comma":/,?0x/g,"0x":/0x/g,"\\x":/\\x/g,None:/\s+/g}[e]}},{key:"chunked",value:h().mark(function e(t,r){var n,i,a,o;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=t[Symbol.iterator]();case 1:i=[],a=0;case 2:if(!(a<r)){e.next=5;break}if(!(o=n.next()).done){e.next=3;break}return e.abrupt("continue",5);case 3:i.push(o.value);case 4:a++,e.next=2;break;case 5:if(!i.length){e.next=7;break}return e.next=6,i;case 6:e.next=8;break;case 7:return e.abrupt("return");case 8:e.next=1;break;case 9:case"end":return e.stop()}},e)})}]);var n}();function M(){return void 0!==P&&null!=P.versions&&null!=P.versions.node}function R(){return"object"==typeof window}function F(){return"function"==typeof importScripts}const O=T;function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(N=function(){return!!e})()}Array.prototype.unique=function(){for(var e={},t=[],r=0,n=this.length;r<n;r++)Object.prototype.hasOwnProperty.call(e,this[r])||(t.push(this[r]),e[this[r]]=1);return t},Array.prototype.max=function(){return Math.max.apply(null,this)},Array.prototype.min=function(){return Math.min.apply(null,this)},Array.prototype.sum=function(){return this.reduce(function(e,t){return e+t},0)},Array.prototype.equals=function(e){if(!e)return!1;var t=this.length;if(t!==e.length)return!1;for(;t--;)if(this[t]!==e[t])return!1;return!0},String.prototype.count=function(e){return this.split(e).length-1},String.prototype.padStart||(String.prototype.padStart=function(e,t){return e|=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),t.slice(0,e)+String(this))}),String.prototype.padEnd||(String.prototype.padEnd=function(e,t){return e|=0,t=String(void 0!==t?t:" "),this.length>e?String(this):((e-=this.length)>t.length&&(t+=t.repeat(e/t.length)),String(this)+t.slice(0,e))});const L=function(e){function t(){var e,n,i,a;r(this,t);for(var o=arguments.length,l=new Array(o),c=0;c<o;c++)l[c]=arguments[c];return n=this,i=t,a=[].concat(l),i=u(i),(e=s(n,N()?Reflect.construct(i,a||[],u(n).constructor):i.apply(n,a))).type="DishError",Error.captureStackTrace&&Error.captureStackTrace(e,t),e}return c(t,e),o(t)}(w(Error));var D=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,z=Math.ceil,U=Math.floor,$="[BigNumber Error] ",j=$+"Number primitive has more than 15 significant digits: ",Z=1e14,G=14,W=9007199254740991,H=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],q=1e7,Q=1e9;function V(e){var t=0|e;return e>0||e===t?t:t-1}function Y(e){for(var t,r,n=1,i=e.length,a=e[0]+"";n<i;){for(t=e[n++]+"",r=G-t.length;r--;t="0"+t);a+=t}for(i=a.length;48===a.charCodeAt(--i););return a.slice(0,i+1||1)}function K(e,t){var r,n,i=e.c,a=t.c,o=e.s,s=t.s,u=e.e,l=t.e;if(!o||!s)return null;if(r=i&&!i[0],n=a&&!a[0],r||n)return r?n?0:-s:o;if(o!=s)return o;if(r=o<0,n=u==l,!i||!a)return n?0:!i^r?1:-1;if(!n)return u>l^r?1:-1;for(s=(u=i.length)<(l=a.length)?u:l,o=0;o<s;o++)if(i[o]!=a[o])return i[o]>a[o]^r?1:-1;return u==l?0:u>l^r?1:-1}function X(e,t,r,n){if(e<t||e>r||e!==U(e))throw Error($+(n||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function J(e){var t=e.c.length-1;return V(e.e/G)==t&&e.c[t]%2!=0}function ee(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function te(e,t,r){var n,i;if(t<0){for(i=r+".";++t;i+=r);e=i+e}else if(++t>(n=e.length)){for(i=r,t-=n;--t;i+=r);e+=i}else t<n&&(e=e.slice(0,t)+"."+e.slice(t));return e}var re=function e(t){var r,n,i,a,o,s,u,l,c,f,h=S.prototype={constructor:S,toString:null,valueOf:null},d=new S(1),p=20,m=4,g=-7,b=21,y=-1e7,_=1e7,v=!1,w=1,x=0,k={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},B="0123456789abcdefghijklmnopqrstuvwxyz",E=!0;function S(e,t){var r,a,o,s,u,l,c,f,h=this;if(!(h instanceof S))return new S(e,t);if(null==t){if(e&&!0===e._isBigNumber)return h.s=e.s,void(!e.c||e.e>_?h.c=h.e=null:e.e<y?h.c=[h.e=0]:(h.e=e.e,h.c=e.c.slice()));if((l="number"==typeof e)&&0*e==0){if(h.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,u=e;u>=10;u/=10,s++);return void(s>_?h.c=h.e=null:(h.e=s,h.c=[e]))}f=String(e)}else{if(!D.test(f=String(e)))return i(h,f,l);h.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}(s=f.indexOf("."))>-1&&(f=f.replace(".","")),(u=f.search(/e/i))>0?(s<0&&(s=u),s+=+f.slice(u+1),f=f.substring(0,u)):s<0&&(s=f.length)}else{if(X(t,2,B.length,"Base"),10==t&&E)return P(h=new S(e),p+h.e+1,m);if(f=String(e),l="number"==typeof e){if(0*e!=0)return i(h,f,l,t);if(h.s=1/e<0?(f=f.slice(1),-1):1,S.DEBUG&&f.replace(/^0\.0*|\./,"").length>15)throw Error(j+e)}else h.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(r=B.slice(0,t),s=u=0,c=f.length;u<c;u++)if(r.indexOf(a=f.charAt(u))<0){if("."==a){if(u>s){s=c;continue}}else if(!o&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){o=!0,u=-1,s=0;continue}return i(h,String(e),l,t)}l=!1,(s=(f=n(f,t,10,h.s)).indexOf("."))>-1?f=f.replace(".",""):s=f.length}for(u=0;48===f.charCodeAt(u);u++);for(c=f.length;48===f.charCodeAt(--c););if(f=f.slice(u,++c)){if(c-=u,l&&S.DEBUG&&c>15&&(e>W||e!==U(e)))throw Error(j+h.s*e);if((s=s-u-1)>_)h.c=h.e=null;else if(s<y)h.c=[h.e=0];else{if(h.e=s,h.c=[],u=(s+1)%G,s<0&&(u+=G),u<c){for(u&&h.c.push(+f.slice(0,u)),c-=G;u<c;)h.c.push(+f.slice(u,u+=G));u=G-(f=f.slice(u)).length}else u-=c;for(;u--;f+="0");h.c.push(+f)}}else h.c=[h.e=0]}function A(e,t,r,n){var i,a,o,s,u;if(null==r?r=m:X(r,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)u=Y(e.c),u=1==n||2==n&&(o<=g||o>=b)?ee(u,o):te(u,o,"0");else if(a=(e=P(new S(e),t,r)).e,s=(u=Y(e.c)).length,1==n||2==n&&(t<=a||a<=g)){for(;s<t;u+="0",s++);u=ee(u,a)}else if(t-=o+(2===n&&a>o),u=te(u,a,"0"),a+1>s){if(--t>0)for(u+=".";t--;u+="0");}else if((t+=a-s)>0)for(a+1==s&&(u+=".");t--;u+="0");return e.s<0&&i?"-"+u:u}function C(e,t){for(var r,n,i=1,a=new S(e[0]);i<e.length;i++)(!(n=new S(e[i])).s||(r=K(a,n))===t||0===r&&a.s===t)&&(a=n);return a}function I(e,t,r){for(var n=1,i=t.length;!t[--i];t.pop());for(i=t[0];i>=10;i/=10,n++);return(r=n+r*G-1)>_?e.c=e.e=null:r<y?e.c=[e.e=0]:(e.e=r,e.c=t),e}function P(e,t,r,n){var i,a,o,s,u,l,c,f=e.c,h=H;if(f){e:{for(i=1,s=f[0];s>=10;s/=10,i++);if((a=t-i)<0)a+=G,o=t,u=f[l=0],c=U(u/h[i-o-1]%10);else if((l=z((a+1)/G))>=f.length){if(!n)break e;for(;f.length<=l;f.push(0));u=c=0,i=1,o=(a%=G)-G+1}else{for(u=s=f[l],i=1;s>=10;s/=10,i++);c=(o=(a%=G)-G+i)<0?0:U(u/h[i-o-1]%10)}if(n=n||t<0||null!=f[l+1]||(o<0?u:u%h[i-o-1]),n=r<4?(c||n)&&(0==r||r==(e.s<0?3:2)):c>5||5==c&&(4==r||n||6==r&&(a>0?o>0?u/h[i-o]:0:f[l-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,n?(t-=e.e+1,f[0]=h[(G-t%G)%G],e.e=-t||0):f[0]=e.e=0,e;if(0==a?(f.length=l,s=1,l--):(f.length=l+1,s=h[G-a],f[l]=o>0?U(u/h[i-o]%h[o])*s:0),n)for(;;){if(0==l){for(a=1,o=f[0];o>=10;o/=10,a++);for(o=f[0]+=s,s=1;o>=10;o/=10,s++);a!=s&&(e.e++,f[0]==Z&&(f[0]=1));break}if(f[l]+=s,f[l]!=Z)break;f[l--]=0,s=1}for(a=f.length;0===f[--a];f.pop());}e.e>_?e.c=e.e=null:e.e<y&&(e.c=[e.e=0])}return e}function T(e){var t,r=e.e;return null===r?e.toString():(t=Y(e.c),t=r<=g||r>=b?ee(t,r):te(t,r,"0"),e.s<0?"-"+t:t)}return S.clone=e,S.ROUND_UP=0,S.ROUND_DOWN=1,S.ROUND_CEIL=2,S.ROUND_FLOOR=3,S.ROUND_HALF_UP=4,S.ROUND_HALF_DOWN=5,S.ROUND_HALF_EVEN=6,S.ROUND_HALF_CEIL=7,S.ROUND_HALF_FLOOR=8,S.EUCLID=9,S.config=S.set=function(e){var t,r;if(null!=e){if("object"!=typeof e)throw Error($+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(X(r=e[t],0,Q,t),p=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(X(r=e[t],0,8,t),m=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(X(r[0],-Q,0,t),X(r[1],0,Q,t),g=r[0],b=r[1]):(X(r,-Q,Q,t),g=-(b=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)X(r[0],-Q,-1,t),X(r[1],1,Q,t),y=r[0],_=r[1];else{if(X(r,-Q,Q,t),!r)throw Error($+t+" cannot be zero: "+r);y=-(_=r<0?-r:r)}if(e.hasOwnProperty(t="CRYPTO")){if((r=e[t])!==!!r)throw Error($+t+" not true or false: "+r);if(r){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw v=!r,Error($+"crypto unavailable");v=r}else v=r}if(e.hasOwnProperty(t="MODULO_MODE")&&(X(r=e[t],0,9,t),w=r),e.hasOwnProperty(t="POW_PRECISION")&&(X(r=e[t],0,Q,t),x=r),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(r=e[t]))throw Error($+t+" not an object: "+r);k=r}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error($+t+" invalid: "+r);E="0123456789"==r.slice(0,10),B=r}}return{DECIMAL_PLACES:p,ROUNDING_MODE:m,EXPONENTIAL_AT:[g,b],RANGE:[y,_],CRYPTO:v,MODULO_MODE:w,POW_PRECISION:x,FORMAT:k,ALPHABET:B}},S.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!S.DEBUG)return!0;var t,r,n=e.c,i=e.e,a=e.s;e:if("[object Array]"=={}.toString.call(n)){if((1===a||-1===a)&&i>=-Q&&i<=Q&&i===U(i)){if(0===n[0]){if(0===i&&1===n.length)return!0;break e}if((t=(i+1)%G)<1&&(t+=G),String(n[0]).length==t){for(t=0;t<n.length;t++)if((r=n[t])<0||r>=Z||r!==U(r))break e;if(0!==r)return!0}}}else if(null===n&&null===i&&(null===a||1===a||-1===a))return!0;throw Error($+"Invalid BigNumber: "+e)},S.maximum=S.max=function(){return C(arguments,-1)},S.minimum=S.min=function(){return C(arguments,1)},S.random=(a=9007199254740992,o=Math.random()*a&2097151?function(){return U(Math.random()*a)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,r,n,i,a,s=0,u=[],l=new S(d);if(null==e?e=p:X(e,0,Q),i=z(e/G),v)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(i*=2));s<i;)(a=131072*t[s]+(t[s+1]>>>11))>=9e15?(r=crypto.getRandomValues(new Uint32Array(2)),t[s]=r[0],t[s+1]=r[1]):(u.push(a%1e14),s+=2);s=i/2}else{if(!crypto.randomBytes)throw v=!1,Error($+"crypto unavailable");for(t=crypto.randomBytes(i*=7);s<i;)(a=281474976710656*(31&t[s])+1099511627776*t[s+1]+4294967296*t[s+2]+16777216*t[s+3]+(t[s+4]<<16)+(t[s+5]<<8)+t[s+6])>=9e15?crypto.randomBytes(7).copy(t,s):(u.push(a%1e14),s+=7);s=i/7}if(!v)for(;s<i;)(a=o())<9e15&&(u[s++]=a%1e14);for(i=u[--s],e%=G,i&&e&&(a=H[G-e],u[s]=U(i/a)*a);0===u[s];u.pop(),s--);if(s<0)u=[n=0];else{for(n=-1;0===u[0];u.splice(0,1),n-=G);for(s=1,a=u[0];a>=10;a/=10,s++);s<G&&(n-=G-s)}return l.e=n,l.c=u,l}),S.sum=function(){for(var e=1,t=arguments,r=new S(t[0]);e<t.length;)r=r.plus(t[e++]);return r},n=function(){var e="0123456789";function t(e,t,r,n){for(var i,a,o=[0],s=0,u=e.length;s<u;){for(a=o.length;a--;o[a]*=t);for(o[0]+=n.indexOf(e.charAt(s++)),i=0;i<o.length;i++)o[i]>r-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/r|0,o[i]%=r)}return o.reverse()}return function(n,i,a,o,s){var u,l,c,f,h,d,g,b,y=n.indexOf("."),_=p,v=m;for(y>=0&&(f=x,x=0,n=n.replace(".",""),d=(b=new S(i)).pow(n.length-y),x=f,b.c=t(te(Y(d.c),d.e,"0"),10,a,e),b.e=b.c.length),c=f=(g=t(n,i,a,s?(u=B,e):(u=e,B))).length;0==g[--f];g.pop());if(!g[0])return u.charAt(0);if(y<0?--c:(d.c=g,d.e=c,d.s=o,g=(d=r(d,b,_,v,a)).c,h=d.r,c=d.e),y=g[l=c+_+1],f=a/2,h=h||l<0||null!=g[l+1],h=v<4?(null!=y||h)&&(0==v||v==(d.s<0?3:2)):y>f||y==f&&(4==v||h||6==v&&1&g[l-1]||v==(d.s<0?8:7)),l<1||!g[0])n=h?te(u.charAt(1),-_,u.charAt(0)):u.charAt(0);else{if(g.length=l,h)for(--a;++g[--l]>a;)g[l]=0,l||(++c,g=[1].concat(g));for(f=g.length;!g[--f];);for(y=0,n="";y<=f;n+=u.charAt(g[y++]));n=te(n,c,u.charAt(0))}return n}}(),r=function(){function e(e,t,r){var n,i,a,o,s=0,u=e.length,l=t%q,c=t/q|0;for(e=e.slice();u--;)s=((i=l*(a=e[u]%q)+(n=c*a+(o=e[u]/q|0)*l)%q*q+s)/r|0)+(n/q|0)+c*o,e[u]=i%r;return s&&(e=[s].concat(e)),e}function t(e,t,r,n){var i,a;if(r!=n)a=r>n?1:-1;else for(i=a=0;i<r;i++)if(e[i]!=t[i]){a=e[i]>t[i]?1:-1;break}return a}function r(e,t,r,n){for(var i=0;r--;)e[r]-=i,i=e[r]<t[r]?1:0,e[r]=i*n+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(n,i,a,o,s){var u,l,c,f,h,d,p,m,g,b,y,_,v,w,x,k,B,E=n.s==i.s?1:-1,A=n.c,C=i.c;if(!(A&&A[0]&&C&&C[0]))return new S(n.s&&i.s&&(A?!C||A[0]!=C[0]:C)?A&&0==A[0]||!C?0*E:E/0:NaN);for(g=(m=new S(E)).c=[],E=a+(l=n.e-i.e)+1,s||(s=Z,l=V(n.e/G)-V(i.e/G),E=E/G|0),c=0;C[c]==(A[c]||0);c++);if(C[c]>(A[c]||0)&&l--,E<0)g.push(1),f=!0;else{for(w=A.length,k=C.length,c=0,E+=2,(h=U(s/(C[0]+1)))>1&&(C=e(C,h,s),A=e(A,h,s),k=C.length,w=A.length),v=k,y=(b=A.slice(0,k)).length;y<k;b[y++]=0);B=C.slice(),B=[0].concat(B),x=C[0],C[1]>=s/2&&x++;do{if(h=0,(u=t(C,b,k,y))<0){if(_=b[0],k!=y&&(_=_*s+(b[1]||0)),(h=U(_/x))>1)for(h>=s&&(h=s-1),p=(d=e(C,h,s)).length,y=b.length;1==t(d,b,p,y);)h--,r(d,k<p?B:C,p,s),p=d.length,u=1;else 0==h&&(u=h=1),p=(d=C.slice()).length;if(p<y&&(d=[0].concat(d)),r(b,d,y,s),y=b.length,-1==u)for(;t(C,b,k,y)<1;)h++,r(b,k<y?B:C,y,s),y=b.length}else 0===u&&(h++,b=[0]);g[c++]=h,b[0]?b[y++]=A[v]||0:(b=[A[v]],y=1)}while((v++<w||null!=b[0])&&E--);f=null!=b[0],g[0]||g.splice(0,1)}if(s==Z){for(c=1,E=g[0];E>=10;E/=10,c++);P(m,a+(m.e=c+l*G-1)+1,o,f)}else m.e=l,m.r=+f;return m}}(),s=/^(-?)0([xbo])(?=\w[\w.]*$)/i,u=/^([^.]+)\.$/,l=/^\.([^.]+)$/,c=/^-?(Infinity|NaN)$/,f=/^\s*\+(?=[\w.])|^\s+|\s+$/g,i=function(e,t,r,n){var i,a=r?t:t.replace(f,"");if(c.test(a))e.s=isNaN(a)?null:a<0?-1:1;else{if(!r&&(a=a.replace(s,function(e,t,r){return i="x"==(r=r.toLowerCase())?16:"b"==r?2:8,n&&n!=i?e:t}),n&&(i=n,a=a.replace(u,"$1").replace(l,"0.$1")),t!=a))return new S(a,i);if(S.DEBUG)throw Error($+"Not a"+(n?" base "+n:"")+" number: "+t);e.s=null}e.c=e.e=null},h.absoluteValue=h.abs=function(){var e=new S(this);return e.s<0&&(e.s=1),e},h.comparedTo=function(e,t){return K(this,new S(e,t))},h.decimalPlaces=h.dp=function(e,t){var r,n,i,a=this;if(null!=e)return X(e,0,Q),null==t?t=m:X(t,0,8),P(new S(a),e+a.e+1,t);if(!(r=a.c))return null;if(n=((i=r.length-1)-V(this.e/G))*G,i=r[i])for(;i%10==0;i/=10,n--);return n<0&&(n=0),n},h.dividedBy=h.div=function(e,t){return r(this,new S(e,t),p,m)},h.dividedToIntegerBy=h.idiv=function(e,t){return r(this,new S(e,t),0,1)},h.exponentiatedBy=h.pow=function(e,t){var r,n,i,a,o,s,u,l,c=this;if((e=new S(e)).c&&!e.isInteger())throw Error($+"Exponent not an integer: "+T(e));if(null!=t&&(t=new S(t)),o=e.e>14,!c.c||!c.c[0]||1==c.c[0]&&!c.e&&1==c.c.length||!e.c||!e.c[0])return l=new S(Math.pow(+T(c),o?e.s*(2-J(e)):+T(e))),t?l.mod(t):l;if(s=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new S(NaN);(n=!s&&c.isInteger()&&t.isInteger())&&(c=c.mod(t))}else{if(e.e>9&&(c.e>0||c.e<-1||(0==c.e?c.c[0]>1||o&&c.c[1]>=24e7:c.c[0]<8e13||o&&c.c[0]<=9999975e7)))return a=c.s<0&&J(e)?-0:0,c.e>-1&&(a=1/a),new S(s?1/a:a);x&&(a=z(x/G+2))}for(o?(r=new S(.5),s&&(e.s=1),u=J(e)):u=(i=Math.abs(+T(e)))%2,l=new S(d);;){if(u){if(!(l=l.times(c)).c)break;a?l.c.length>a&&(l.c.length=a):n&&(l=l.mod(t))}if(i){if(0===(i=U(i/2)))break;u=i%2}else if(P(e=e.times(r),e.e+1,1),e.e>14)u=J(e);else{if(0===(i=+T(e)))break;u=i%2}c=c.times(c),a?c.c&&c.c.length>a&&(c.c.length=a):n&&(c=c.mod(t))}return n?l:(s&&(l=d.div(l)),t?l.mod(t):a?P(l,x,m,void 0):l)},h.integerValue=function(e){var t=new S(this);return null==e?e=m:X(e,0,8),P(t,t.e+1,e)},h.isEqualTo=h.eq=function(e,t){return 0===K(this,new S(e,t))},h.isFinite=function(){return!!this.c},h.isGreaterThan=h.gt=function(e,t){return K(this,new S(e,t))>0},h.isGreaterThanOrEqualTo=h.gte=function(e,t){return 1===(t=K(this,new S(e,t)))||0===t},h.isInteger=function(){return!!this.c&&V(this.e/G)>this.c.length-2},h.isLessThan=h.lt=function(e,t){return K(this,new S(e,t))<0},h.isLessThanOrEqualTo=h.lte=function(e,t){return-1===(t=K(this,new S(e,t)))||0===t},h.isNaN=function(){return!this.s},h.isNegative=function(){return this.s<0},h.isPositive=function(){return this.s>0},h.isZero=function(){return!!this.c&&0==this.c[0]},h.minus=function(e,t){var r,n,i,a,o=this,s=o.s;if(t=(e=new S(e,t)).s,!s||!t)return new S(NaN);if(s!=t)return e.s=-t,o.plus(e);var u=o.e/G,l=e.e/G,c=o.c,f=e.c;if(!u||!l){if(!c||!f)return c?(e.s=-t,e):new S(f?o:NaN);if(!c[0]||!f[0])return f[0]?(e.s=-t,e):new S(c[0]?o:3==m?-0:0)}if(u=V(u),l=V(l),c=c.slice(),s=u-l){for((a=s<0)?(s=-s,i=c):(l=u,i=f),i.reverse(),t=s;t--;i.push(0));i.reverse()}else for(n=(a=(s=c.length)<(t=f.length))?s:t,s=t=0;t<n;t++)if(c[t]!=f[t]){a=c[t]<f[t];break}if(a&&(i=c,c=f,f=i,e.s=-e.s),(t=(n=f.length)-(r=c.length))>0)for(;t--;c[r++]=0);for(t=Z-1;n>s;){if(c[--n]<f[n]){for(r=n;r&&!c[--r];c[r]=t);--c[r],c[n]+=Z}c[n]-=f[n]}for(;0==c[0];c.splice(0,1),--l);return c[0]?I(e,c,l):(e.s=3==m?-1:1,e.c=[e.e=0],e)},h.modulo=h.mod=function(e,t){var n,i,a=this;return e=new S(e,t),!a.c||!e.s||e.c&&!e.c[0]?new S(NaN):!e.c||a.c&&!a.c[0]?new S(a):(9==w?(i=e.s,e.s=1,n=r(a,e,0,3),e.s=i,n.s*=i):n=r(a,e,0,w),(e=a.minus(n.times(e))).c[0]||1!=w||(e.s=a.s),e)},h.multipliedBy=h.times=function(e,t){var r,n,i,a,o,s,u,l,c,f,h,d,p,m,g,b=this,y=b.c,_=(e=new S(e,t)).c;if(!(y&&_&&y[0]&&_[0]))return!b.s||!e.s||y&&!y[0]&&!_||_&&!_[0]&&!y?e.c=e.e=e.s=null:(e.s*=b.s,y&&_?(e.c=[0],e.e=0):e.c=e.e=null),e;for(n=V(b.e/G)+V(e.e/G),e.s*=b.s,(u=y.length)<(f=_.length)&&(p=y,y=_,_=p,i=u,u=f,f=i),i=u+f,p=[];i--;p.push(0));for(m=Z,g=q,i=f;--i>=0;){for(r=0,h=_[i]%g,d=_[i]/g|0,a=i+(o=u);a>i;)r=((l=h*(l=y[--o]%g)+(s=d*l+(c=y[o]/g|0)*h)%g*g+p[a]+r)/m|0)+(s/g|0)+d*c,p[a--]=l%m;p[a]=r}return r?++n:p.splice(0,1),I(e,p,n)},h.negated=function(){var e=new S(this);return e.s=-e.s||null,e},h.plus=function(e,t){var r,n=this,i=n.s;if(t=(e=new S(e,t)).s,!i||!t)return new S(NaN);if(i!=t)return e.s=-t,n.minus(e);var a=n.e/G,o=e.e/G,s=n.c,u=e.c;if(!a||!o){if(!s||!u)return new S(i/0);if(!s[0]||!u[0])return u[0]?e:new S(s[0]?n:0*i)}if(a=V(a),o=V(o),s=s.slice(),i=a-o){for(i>0?(o=a,r=u):(i=-i,r=s),r.reverse();i--;r.push(0));r.reverse()}for((i=s.length)-(t=u.length)<0&&(r=u,u=s,s=r,t=i),i=0;t;)i=(s[--t]=s[t]+u[t]+i)/Z|0,s[t]=Z===s[t]?0:s[t]%Z;return i&&(s=[i].concat(s),++o),I(e,s,o)},h.precision=h.sd=function(e,t){var r,n,i,a=this;if(null!=e&&e!==!!e)return X(e,1,Q),null==t?t=m:X(t,0,8),P(new S(a),e,t);if(!(r=a.c))return null;if(n=(i=r.length-1)*G+1,i=r[i]){for(;i%10==0;i/=10,n--);for(i=r[0];i>=10;i/=10,n++);}return e&&a.e+1>n&&(n=a.e+1),n},h.shiftedBy=function(e){return X(e,-9007199254740991,W),this.times("1e"+e)},h.squareRoot=h.sqrt=function(){var e,t,n,i,a,o=this,s=o.c,u=o.s,l=o.e,c=p+4,f=new S("0.5");if(1!==u||!s||!s[0])return new S(!u||u<0&&(!s||s[0])?NaN:s?o:1/0);if(0==(u=Math.sqrt(+T(o)))||u==1/0?(((t=Y(s)).length+l)%2==0&&(t+="0"),u=Math.sqrt(+t),l=V((l+1)/2)-(l<0||l%2),n=new S(t=u==1/0?"5e"+l:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+l)):n=new S(u+""),n.c[0])for((u=(l=n.e)+c)<3&&(u=0);;)if(a=n,n=f.times(a.plus(r(o,a,c,1))),Y(a.c).slice(0,u)===(t=Y(n.c)).slice(0,u)){if(n.e<l&&--u,"9999"!=(t=t.slice(u-3,u+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(P(n,n.e+p+2,1),e=!n.times(n).eq(o));break}if(!i&&(P(a,a.e+p+2,0),a.times(a).eq(o))){n=a;break}c+=4,u+=4,i=1}return P(n,n.e+p+1,m,e)},h.toExponential=function(e,t){return null!=e&&(X(e,0,Q),e++),A(this,e,t,1)},h.toFixed=function(e,t){return null!=e&&(X(e,0,Q),e=e+this.e+1),A(this,e,t)},h.toFormat=function(e,t,r){var n,i=this;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=k;else if("object"!=typeof r)throw Error($+"Argument not an object: "+r);if(n=i.toFixed(e,t),i.c){var a,o=n.split("."),s=+r.groupSize,u=+r.secondaryGroupSize,l=r.groupSeparator||"",c=o[0],f=o[1],h=i.s<0,d=h?c.slice(1):c,p=d.length;if(u&&(a=s,s=u,u=a,p-=a),s>0&&p>0){for(a=p%s||s,c=d.substr(0,a);a<p;a+=s)c+=l+d.substr(a,s);u>0&&(c+=l+d.slice(a)),h&&(c="-"+c)}n=f?c+(r.decimalSeparator||"")+((u=+r.fractionGroupSize)?f.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):f):c}return(r.prefix||"")+n+(r.suffix||"")},h.toFraction=function(e){var t,n,i,a,o,s,u,l,c,f,h,p,g=this,b=g.c;if(null!=e&&(!(u=new S(e)).isInteger()&&(u.c||1!==u.s)||u.lt(d)))throw Error($+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+T(u));if(!b)return new S(g);for(t=new S(d),c=n=new S(d),i=l=new S(d),p=Y(b),o=t.e=p.length-g.e-1,t.c[0]=H[(s=o%G)<0?G+s:s],e=!e||u.comparedTo(t)>0?o>0?t:c:u,s=_,_=1/0,u=new S(p),l.c[0]=0;f=r(u,t,0,1),1!=(a=n.plus(f.times(i))).comparedTo(e);)n=i,i=a,c=l.plus(f.times(a=c)),l=a,t=u.minus(f.times(a=t)),u=a;return a=r(e.minus(n),i,0,1),l=l.plus(a.times(c)),n=n.plus(a.times(i)),l.s=c.s=g.s,h=r(c,i,o*=2,m).minus(g).abs().comparedTo(r(l,n,o,m).minus(g).abs())<1?[c,i]:[l,n],_=s,h},h.toNumber=function(){return+T(this)},h.toPrecision=function(e,t){return null!=e&&X(e,1,Q),A(this,e,t,2)},h.toString=function(e){var t,r=this,i=r.s,a=r.e;return null===a?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=a<=g||a>=b?ee(Y(r.c),a):te(Y(r.c),a,"0"):10===e&&E?t=te(Y((r=P(new S(r),p+a+1,m)).c),r.e,"0"):(X(e,2,B.length,"Base"),t=n(te(Y(r.c),a,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},h.valueOf=h.toJSON=function(){return T(this)},h._isBigNumber=!0,h[Symbol.toStringTag]="BigNumber",h[Symbol.for("nodejs.util.inspect.custom")]=h.valueOf,null!=t&&S.set(t),S}();const ne=re;function ie(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],u=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);u=!0);}catch(e){l=!0,i=e}finally{try{if(!u&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ae=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;r(this,e),this.bytes=t,this.length=this.bytes.length,this.position=n,this.bitPos=i}return o(e,[{key:"clone",value:function(){return new e(this.bytes,this.position,this.bitPos)}},{key:"getBytes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!(this.position>this.length)){var t=null!==e?this.position+e:this.length,r=this.bytes.slice(this.position,t);return this.position=t,this.bitPos=0,r}}},{key:"readString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;if(!(this.position>this.length)){-1===e&&(e=this.length-this.position);for(var t="",r=this.position;r<this.position+e;r++){var n=this.bytes[r];if(0===n)break;t+=String.fromCharCode(n)}return this.position+=e,this.bitPos=0,t}}},{key:"readInt",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(!(this.position>this.length)){var r=0;if("be"===t)for(var n=this.position;n<this.position+e;n++)r<<=8,r|=this.bytes[n];else for(var i=this.position+e-1;i>=this.position;i--)r<<=8,r|=this.bytes[i];return this.position+=e,this.bitPos=0,r}}},{key:"readBits",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"be";if(!(this.position>this.length)){var r,n=0,i=0;for(n=this.bytes[this.position++]&(r=this.bitPos,"be"===t?(1<<8-r)-1:256-(1<<r)),"be"!==t&&(n>>>=this.bitPos),i=8-this.bitPos,this.bitPos=0;i<e;)"be"===t?n=n<<i|this.bytes[this.position++]:n|=this.bytes[this.position++]<<i,i+=8;if(i>e){var a=i-e;"be"===t?n>>>=a:n&=(1<<e)-1,i-=a,this.position--,this.bitPos=8-a}return n}}},{key:"continueUntil",value:function(e){if(!(this.position>this.length))if(this.bitPos=0,"number"!=typeof e){var t=e.length,r=e[t-1];this.position=t;for(var n,i=function(e,t){var r=new Array;return e.forEach(function(e,n){r[e]=t-n}),r}(e,t);this.position<this.length;){for(;this.position<this.length&&this.bytes[this.position++]!==r;);n=!0;for(var a=t-1;a>=0;a--)if(this.bytes[this.position-t+a]!==e[a]){n=!1,this.position+=i[e[a]];break}if(n){this.position-=t;break}}}else for(;++this.position<this.length&&this.bytes[this.position]!==e;);}},{key:"consumeWhile",value:function(e){for(;this.position<this.length&&this.bytes[this.position]===e;)this.position++;this.bitPos=0}},{key:"consumeIf",value:function(e){this.bytes[this.position]===e&&(this.position++,this.bitPos=0)}},{key:"moveForwardsBy",value:function(e){var t=this.position+e;if(t<0||t>this.length)throw new Error("Cannot move to position "+t+" in stream. Out of bounds.");this.position=t,this.bitPos=0}},{key:"moveBackwardsBy",value:function(e){var t=this.position-e;if(t<0||t>this.length)throw new Error("Cannot move to position "+t+" in stream. Out of bounds.");this.position=t,this.bitPos=0}},{key:"moveBackwardsByBits",value:function(e){if(e<=this.bitPos)this.bitPos-=e;else for(this.bitPos>0&&(e-=this.bitPos,this.bitPos=0);e>0;)this.moveBackwardsBy(1),this.bitPos=8,this.moveBackwardsByBits(e),e-=8}},{key:"moveTo",value:function(e){if(e<0||e>this.length)throw new Error("Cannot move to position "+e+" in stream. Out of bounds.");this.position=e,this.bitPos=0}},{key:"hasMore",value:function(){return this.position<this.length}},{key:"carve",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.position;return this.bitPos>0&&t++,this.bytes.slice(e,t)}}])}();function oe(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return se(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?se(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function se(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var ue={Images:[{name:"Joint Photographic Experts Group image",extension:"jpg,jpeg,jpe,thm,mpo",mime:"image/jpeg",description:"",signature:{0:255,1:216,2:255,3:[192,196,219,221,224,225,226,227,228,229,231,232,234,235,236,237,238,254]},extractor:function(e,t){for(var r=new ae(e.slice(t));r.hasMore();){var n=r.getBytes(2);if(255!==n[0])throw new Error(`Invalid marker while parsing JPEG at pos ${r.position}: ${n}`);var i=0;switch(n[1]){case 216:case 1:break;case 217:return r.carve();case 192:case 193:case 194:case 195:case 196:case 197:case 198:case 199:case 200:case 201:case 202:case 203:case 204:case 205:case 206:case 207:case 219:case 222:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:i=r.readInt(2,"be"),r.position+=i-2;break;case 223:r.position++;break;case 220:case 221:r.position+=2;break;case 218:i=r.readInt(2,"be"),r.position+=i-2,r.continueUntil(255);break;default:r.continueUntil(255)}}throw new Error("Unable to parse JPEG successfully")}},{name:"Graphics Interchange Format image",extension:"gif",mime:"image/gif",description:"",signature:{0:71,1:73,2:70,3:56,4:[55,57],5:97},extractor:function(e,t){var r=new ae(e.slice(t));for(r.continueUntil([33,255]),r.continueUntil([33,249]),r.moveForwardsBy(2);r.hasMore();){for(r.moveForwardsBy(r.readInt(1)+1),r.moveForwardsBy(11);!Array.from(r.getBytes(2)).equals([33,249])&&(r.moveBackwardsBy(2),r.moveForwardsBy(r.readInt(1)),r.readInt(1));)r.moveBackwardsBy(1);if(59===r.readInt(1))break;r.moveForwardsBy(1)}return r.carve()}},{name:"Portable Network Graphics image",extension:"png",mime:"image/png",description:"",signature:{0:137,1:80,2:78,3:71,4:13,5:10,6:26,7:10},extractor:function(e,t){var r=new ae(e.slice(t));r.moveForwardsBy(8);for(var n=0,i="";"IEND"!==i;)n=r.readInt(4,"be"),i=r.readString(4),r.moveForwardsBy(n+4);return r.carve()}},{name:"WEBP Image",extension:"webp",mime:"image/webp",description:"",signature:{8:87,9:69,10:66,11:80},extractor:function(e,t){var r=new ae(e.slice(t));r.moveForwardsBy(4);var n=r.readInt(4,"le");return r.moveForwardsBy(n),r.carve()}},{name:"High Efficiency Image File Format",extension:"heic,heif",mime:"image/heif",description:"",signature:{0:0,1:0,2:0,3:[36,24],4:102,5:116,6:121,7:112,8:104,9:101,10:105,11:99},extractor:null},{name:"Camera Image File Format",extension:"crw",mime:"image/x-canon-crw",description:"",signature:{6:72,7:69,8:65,9:80,10:67,11:67,12:68,13:82},extractor:null},{name:"Canon CR2 raw image",extension:"cr2",mime:"image/x-canon-cr2",description:"",signature:[{0:73,1:73,2:42,3:0,8:67,9:82},{0:77,1:77,2:0,3:42,8:67,9:82}],extractor:null},{name:"Tagged Image File Format image",extension:"tif",mime:"image/tiff",description:"",signature:[{0:73,1:73,2:42,3:0},{0:77,1:77,2:0,3:42}],extractor:null},{name:"Bitmap image",extension:"bmp",mime:"image/bmp",description:"",signature:{0:66,1:77,7:0,9:0,14:[12,40,56,64,108,124],15:0,16:0,17:0},extractor:function(e,t){var r=new ae(e.slice(t));r.moveForwardsBy(2);var n=r.readInt(4,"le");return r.moveForwardsBy(n-6),r.carve()}},{name:"JPEG Extended Range image",extension:"jxr",mime:"image/vnd.ms-photo",description:"",signature:{0:73,1:73,2:188},extractor:null},{name:"Photoshop image",extension:"psd",mime:"image/vnd.adobe.photoshop",description:"",signature:{0:56,1:66,2:80,3:83,4:0,5:1,6:0,7:0,8:0,9:0,10:0,11:0},extractor:null},{name:"Photoshop Large Document",extension:"psb",mime:"application/x-photoshop",description:"",signature:{0:56,1:66,2:80,3:83,4:0,5:2,6:0,7:0,8:0,9:0,10:0,11:0,12:0},extractor:null},{name:"Paint Shop Pro image",extension:"psp",mime:"image/psp",description:"",signature:[{0:80,1:97,2:105,3:110,4:116,5:32,6:83,7:104,8:111,9:112,10:32,11:80,12:114,13:111,14:32,15:73,16:109},{0:126,1:66,2:75,3:0}],extractor:null},{name:"The GIMP image",extension:"xcf",mime:"image/x-xcf",description:"",signature:{0:103,1:105,2:109,3:112,4:32,5:120,6:99,7:102,8:32,9:[102,118],10:[105,48],11:[108,48],12:[101,49,50,51]},extractor:null},{name:"Icon image",extension:"ico",mime:"image/x-icon",description:"",signature:{0:0,1:0,2:1,3:0,4:[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21],5:0,6:[16,32,48,64,128],7:[16,32,48,64,128],9:0,10:[0,1]},extractor:function(e,t){var r=new ae(e.slice(t));r.moveTo(4);var n=r.readInt(2,"le");r.moveForwardsBy(8+16*(n-1));var i=r.readInt(4,"le"),a=r.readInt(4,"le");return r.moveTo(a+i),r.carve()}},{name:"Radiance High Dynamic Range image",extension:"hdr",mime:"image/vnd.radiance",description:"",signature:{0:35,1:63,2:82,3:65,4:68,5:73,6:65,7:78,8:67,9:69,10:10},extractor:null},{name:"Sony ARW image",extension:"arw",mime:"image/x-raw",description:"",signature:{0:5,1:0,2:0,3:0,4:65,5:87,6:49,7:46},extractor:null},{name:"Fujifilm Raw Image",extension:"raf",mime:"image/x-raw",description:"",signature:{0:70,1:85,2:74,3:73,4:70,5:73,6:76,7:77,8:67,9:67,10:68,11:45,12:82,13:65,14:87},extractor:null},{name:"Minolta RAW image",extension:"mrw",mime:"image/x-raw",description:"",signature:{0:0,1:77,2:82,3:77},extractor:null},{name:"Adobe Bridge Thumbnail Cache",extension:"bct",mime:"application/octet-stream",description:"",signature:{0:108,1:110,2:98,3:116,4:2,5:0,6:0,7:0},extractor:null},{name:"Microsoft Document Imaging",extension:"mdi",mime:"image/vnd.ms-modi",description:"",signature:{0:69,1:80,2:42,3:0},extractor:null},{name:"Joint Photographic Experts Group image (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:47,1:57,2:106,3:47,4:52},extractor:null},{name:"Portable Network Graphics image (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:105,1:86,2:66,3:79,4:82,5:119,6:48},extractor:null},{name:"AutoCAD Drawing",extension:"dwg,123d",mime:"application/acad",description:"",signature:{0:65,1:67,2:49,3:48,4:[48,49],5:[48,49,50,51,52,53],6:0},extractor:null},{name:"AutoCAD Drawing",extension:"dwg,dwt",mime:"application/acad",description:"",signature:[{0:65,1:67,2:49,3:48,4:49,5:56,6:0},{0:65,1:67,2:49,3:48,4:50,5:52,6:0},{0:65,1:67,2:49,3:48,4:50,5:55,6:0}],extractor:null},{name:"Targa Image",extension:"tga",mime:"image/x-targa",description:"",signature:[{0:84,1:82,2:85,3:69,4:86,5:73,6:83,7:73,8:79,9:78,10:45,11:88,12:70,13:73,14:76,15:69,16:46}],extractor:function(e,t){var r=new ae(e);r.moveTo(t-8);var n=r.readInt(4,"le"),i=r.readInt(4,"le");function a(e,t){for(var n=0;n<e;n++){r.moveBackwardsBy(1);var i=r.readInt(t,"le")-1;if(r.moveBackwardsBy(t),i===n)break}}return r.moveBackwardsBy(8),n||i?n?(a(65535,2),r.moveBackwardsBy(n)):i&&(a(4294967295,4),r.moveBackwardsBy(6),r.moveBackwardsBy(i)):(function(){r.moveBackwardsBy(5);for(var e=0;e<1048576&&r.readInt(2,"le")*r.readInt(2,"le")*r.readInt(1)/8!=e-1;e++)r.moveBackwardsBy(6)}(),r.moveBackwardsBy(17)),r.carve(r.position,t+18)}}],Video:[{name:"Matroska Multimedia Container",extension:"mkv",mime:"video/x-matroska",description:"",signature:{31:109,32:97,33:116,34:114,35:111,36:115,37:107,38:97},extractor:null},{name:"WEBM video",extension:"webm",mime:"video/webm",description:"",signature:{0:26,1:69,2:223,3:163},extractor:null},{name:"Flash MP4 video",extension:"f4v",mime:"video/mp4",description:"",signature:{4:102,5:116,6:121,7:112,8:[102,70],9:52,10:[118,86],11:32},extractor:null},{name:"MPEG-4 video",extension:"mp4",mime:"video/mp4",description:"",signature:[{0:0,1:0,2:0,3:[24,32],4:102,5:116,6:121,7:112},{0:51,1:103,2:112,3:53},{0:0,1:0,2:0,3:28,4:102,5:116,6:121,7:112,8:109,9:112,10:52,11:50,16:109,17:112,18:52,19:49,20:109,21:112,22:52,23:50,24:105,25:115,26:111,27:109}],extractor:null},{name:"M4V video",extension:"m4v",mime:"video/x-m4v",description:"",signature:{0:0,1:0,2:0,3:28,4:102,5:116,6:121,7:112,8:77,9:52,10:86},extractor:null},{name:"Quicktime video",extension:"mov",mime:"video/quicktime",description:"",signature:{0:0,1:0,2:0,3:20,4:102,5:116,6:121,7:112},extractor:null},{name:"Audio Video Interleave",extension:"avi",mime:"video/x-msvideo",description:"",signature:{0:82,1:73,2:70,3:70,8:65,9:86,10:73},extractor:null},{name:"Windows Media Video",extension:"wmv",mime:"video/x-ms-wmv",description:"",signature:{0:48,1:38,2:178,3:117,4:142,5:102,6:207,7:17,8:166,9:217},extractor:null},{name:"MPEG video",extension:"mpg",mime:"video/mpeg",description:"",signature:{0:0,1:0,2:1,3:186},extractor:null},{name:"Flash Video",extension:"flv",mime:"video/x-flv",description:"",signature:{0:70,1:76,2:86,3:1},extractor:function(e,t){var r=new ae(e.slice(t));r.moveForwardsBy(5);var n=r.readInt(4,"be");r.moveForwardsBy(n-9);for(var i=-11;r.hasMore();){var a=r.readInt(4,"be"),o=r.readInt(1);if([8,9,18].indexOf(o)<0){r.moveBackwardsBy(1);break}if(a!==i+11){r.moveBackwardsBy(i+11+5);break}i=r.readInt(3,"be"),r.moveForwardsBy(7+i)}return r.carve()}},{name:"OGG Video",extension:"ogv,ogm,opus,ogx",mime:"video/ogg",description:"",signature:[{0:79,1:103,2:103,3:83,4:0,5:2,28:1,29:118,30:105,31:100,32:101,33:111},{0:79,1:103,2:103,3:83,4:0,5:2,28:128,29:116,30:104,31:101,32:111,33:114,34:97},{0:79,1:103,2:103,3:83,4:0,5:2,28:102,29:105,30:115,31:104,32:101,33:97,34:100}],extractor:null}],Audio:[{name:"Waveform Audio",extension:"wav",mime:"audio/x-wav",description:"",signature:{0:82,1:73,2:70,3:70,8:87,9:65,10:86,11:69},extractor:function(e,t){var r=new ae(e.slice(t));return r.moveTo(4),r.moveTo(r.readInt(4,"le")+8),r.carve()}},{name:"OGG audio",extension:"ogg",mime:"audio/ogg",description:"",signature:{0:79,1:103,2:103,3:83},extractor:null},{name:"Musical Instrument Digital Interface audio",extension:"midi",mime:"audio/midi",description:"",signature:{0:77,1:84,2:104,3:100},extractor:null},{name:"MPEG-3 audio",extension:"mp3",mime:"audio/mpeg",description:"",signature:[{0:73,1:68,2:51},{0:255,1:251}],extractor:function(e,t){var r=new ae(e.slice(t)),n=["free",32e3,4e4,48e3,56e3,64e3,8e4,96e3,112e3,128e3,16e4,192e3,224e3,256e3,32e4,"bad"],i=[44100,48e3,32e3,"reserved"];if(r.getBytes(3).toString()===[73,68,51].toString()){r.moveTo(6);var a=r.readInt(1)<<21|r.readInt(1)<<14|r.readInt(1)<<7|r.readInt(1);r.moveForwardsBy(a)}else r.moveTo(0);for(;r.hasMore();){if(r.getBytes(3)===[84,65,71].toString()){r.moveForwardsBy(125);break}if(r.getBytes(2).toString()!==[255,251].toString()){r.moveBackwardsBy(2);break}var o=r.readInt(1),s=n[o>>4],u=i[(15&o)>>2],l=(2&o)>>1;if("free"===s||"bad"===s||"reserved"===u){r.moveBackwardsBy(1);break}var c=Math.floor(144*s/u+l);if(r.position+c>r.length){r.moveTo(r.length);break}r.moveForwardsBy(c-3)}return r.carve()}},{name:"MPEG-4 Part 14 audio",extension:"m4a",mime:"audio/m4a",description:"",signature:[{4:102,5:116,6:121,7:112,8:77,9:52,10:65},{0:77,1:52,2:65,3:32}],extractor:null},{name:"Free Lossless Audio Codec",extension:"flac",mime:"audio/x-flac",description:"",signature:{0:102,1:76,2:97,3:67},extractor:null},{name:"Adaptive Multi-Rate audio codec",extension:"amr",mime:"audio/amr",description:"",signature:{0:35,1:33,2:65,3:77,4:82,5:10},extractor:null},{name:"Audacity",extension:"au",mime:"audio/x-au",description:"",signature:{0:100,1:110,2:115,3:46,24:65,25:117,26:100,27:97,28:99,29:105,30:116,31:121,32:66,33:108,34:111,35:99,36:107,37:70,38:105,39:108,40:101},extractor:null},{name:"Audacity Block",extension:"auf",mime:"application/octet-stream",description:"",signature:{0:65,1:117,2:100,3:97,4:99,5:105,6:116,7:121,8:66,9:108,10:111,11:99,12:107,13:70,14:105,15:108,16:101},extractor:null},{name:"Audio Interchange File",extension:"aif",mime:"audio/x-aiff",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:70},extractor:null},{name:"Audio Interchange File (compressed)",extension:"aifc",mime:"audio/x-aifc",description:"",signature:{0:70,1:79,2:82,3:77,8:65,9:73,10:70,11:67},extractor:null}],Documents:[{name:"Portable Document Format",extension:"pdf",mime:"application/pdf",description:"",signature:{0:37,1:80,2:68,3:70},extractor:function(e,t){var r=new ae(e.slice(t));return r.continueUntil([37,37,69,79,70]),r.moveForwardsBy(5),r.consumeIf(13),r.consumeIf(10),r.carve()}},{name:"Portable Document Format (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:65,1:74,2:86,3:66,4:69,5:82,6:105},extractor:null},{name:"Adobe PostScript",extension:"ps,eps,ai,pfa",mime:"application/postscript",description:"",signature:{0:37,1:33,2:80,3:83,4:45,5:65,6:100,7:111,8:98,9:101},extractor:null},{name:"PostScript",extension:"ps",mime:"application/postscript",description:"",signature:{0:37,1:33},extractor:null},{name:"Encapsulated PostScript",extension:"eps,ai",mime:"application/eps",description:"",signature:{0:197,1:208,2:211,3:198},extractor:null},{name:"Rich Text Format",extension:"rtf",mime:"application/rtf",description:"",signature:{0:123,1:92,2:114,3:116},extractor:function(e,t){var r=new ae(e.slice(t)),n=0;if(123!==r.readInt(1))throw new Error("Not a valid RTF file");for(n++;n>0&&r.hasMore();)switch(r.readInt(1)){case 123:n++;break;case 125:n--;break;case 92:r.consumeIf(92),r.position++}return r.carve()}},{name:"Microsoft Office document/OLE2",extension:"ole2,doc,xls,dot,ppt,xla,ppa,pps,pot,msi,sdw,db,vsd,msg",mime:"application/msword,application/vnd.ms-excel,application/vnd.ms-powerpoint",description:"Microsoft Office documents",signature:{0:208,1:207,2:17,3:224,4:161,5:177,6:26,7:225},extractor:null},{name:"Microsoft Office document/OLE2 (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:48,1:77,2:56,3:82,4:52,5:75,6:71,7:120},extractor:null},{name:"Microsoft Office 2007+ document",extension:"docx,xlsx,pptx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.openxmlformats-officedocument.presentationml.presentation",description:"",signature:{38:95,39:84,40:121,41:112,42:101,43:115,44:93,45:46,46:120,47:109,48:108},extractor:le},{name:"Microsoft Access database",extension:"mdb,mda,mde,mdt,fdb,psa",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:74,14:101,15:116},extractor:null},{name:"Microsoft Access 2007+ database",extension:"accdb,accde,accda,accdu",mime:"application/msaccess",description:"",signature:{0:0,1:1,2:0,3:0,4:83,5:116,6:97,7:110,8:100,9:97,10:114,11:100,12:32,13:65,14:67,15:69,16:32},extractor:null},{name:"Microsoft OneNote document",extension:"one",mime:"application/onenote",description:"",signature:{0:228,1:82,2:92,3:123,4:140,5:216,6:167,7:77,8:174,9:177,10:83,11:120,12:208,13:41,14:150,15:211},extractor:null},{name:"Outlook Express database",extension:"dbx",mime:"application/octet-stream",description:"",signature:{0:207,1:173,2:18,3:254,4:[48,197,198,199],11:17},extractor:null},{name:"Personal Storage Table (Outlook)",extension:"pst,ost,fdb,pab",mime:"application/octet-stream",description:"",signature:{0:33,1:66,2:68,3:78},extractor:null},{name:"Microsoft Exchange Database",extension:"edb",mime:"application/octet-stream",description:"",signature:{4:239,5:205,6:171,7:137,8:[32,35],9:6,10:0,11:0,12:[0,1],13:0,14:0,15:0},extractor:null},{name:"WordPerfect document",extension:"wpd,wp,wp5,wp6,wpp,bk!,wcm",mime:"application/wordperfect",description:"",signature:{0:255,1:87,2:80,3:67,7:[0,1,2],8:1,9:10},extractor:null},{name:"EPUB e-book",extension:"epub",mime:"application/epub+zip",description:"",signature:{0:80,1:75,2:3,3:4,30:109,31:105,32:109,33:101,34:116,35:121,36:112,37:101,38:97,39:112,40:112,41:108,42:105,43:99,44:97,45:116,46:105,47:111,48:110,49:47,50:101,51:112,52:117,53:98,54:43,55:122,56:105,57:112},extractor:le}],Applications:[{name:"Windows Portable Executable",extension:"exe,dll,drv,vxd,sys,ocx,vbx,com,fon,scr",mime:"application/vnd.microsoft.portable-executable",description:"",signature:{0:77,1:90,3:[0,1,2],5:[0,1,2]},extractor:function(e,t){var r=new ae(e.slice(t));r.moveTo(60);var n=r.readInt(4,"le");r.moveTo(n),r.moveForwardsBy(6);var i=r.readInt(2,"le");r.moveForwardsBy(16);var a=523===r.readInt(2,"le")?112:96;r.moveForwardsBy(a-2),r.moveForwardsBy(32);var o=r.readInt(4,"le"),s=r.readInt(4,"le");if(o>0)return r.moveTo(o+s),r.carve();r.moveForwardsBy(88),r.moveForwardsBy(40*(i-1)),r.moveForwardsBy(16);var u=r.readInt(4,"le"),l=r.readInt(4,"le");return r.moveTo(l+u),r.carve()}},{name:"Executable and Linkable Format",extension:"elf,bin,axf,o,prx,so",mime:"application/x-executable",description:"Executable and Linkable Format file. No standard file extension.",signature:{0:127,1:69,2:76,3:70},extractor:function(e,t){var r=new ae(e.slice(t));r.moveForwardsBy(4);var n=1===r.readInt(1),i=1===r.readInt(1)?"le":"be";r.moveForwardsBy(n?26:34);var a=n?r.readInt(4,i):r.readInt(8,i);r.moveForwardsBy(10);var o=r.readInt(2,i),s=r.readInt(2,i);return r.moveTo(a),r.moveForwardsBy(o*s),r.carve()}},{name:"MacOS Mach-O object",extension:"dylib",mime:"application/octet-stream",description:"",signature:[{0:202,1:254,2:186,3:190,4:0,5:0,6:0,7:[1,2,3]},{0:206,1:250,2:237,3:254,4:7,5:0,6:0,7:0,8:[1,2,3]}],extractor:ce},{name:"MacOS Mach-O 64-bit object",extension:"dylib",mime:"application/octet-stream",description:"",signature:{0:207,1:250,2:237,3:254},extractor:ce},{name:"Adobe Flash",extension:"swf",mime:"application/x-shockwave-flash",description:"",signature:{0:[67,70],1:87,2:83},extractor:null},{name:"Java Class",extension:"class",mime:"application/java-vm",description:"",signature:{0:202,1:254,2:186,3:190},extractor:null},{name:"Dalvik Executable",extension:"dex",mime:"application/octet-stream",description:"Dalvik Executable as used by Android",signature:{0:100,1:101,2:120,3:10,4:48,5:51,6:53,7:0},extractor:null},{name:"Google Chrome Extension",extension:"crx",mime:"application/crx",description:"Google Chrome extension or packaged app",signature:{0:67,1:114,2:50,3:52},extractor:null}],Archives:[{name:"PKZIP archive",extension:"zip",mime:"application/zip",description:"",signature:{0:80,1:75,2:[3,5,7],3:[4,6,8]},extractor:le},{name:"PKZIP archive (under Base64)",extension:"B64",mime:"application/octet-stream",description:"",signature:{0:85,1:69,2:115,3:68,4:66,5:66},extractor:null},{name:"TAR archive",extension:"tar",mime:"application/x-tar",description:"",signature:{257:117,258:115,259:116,260:97,261:114},extractor:function(e,t){for(var r=new ae(e.slice(t)),n=function(){if(r.moveForwardsBy(257),r.getBytes(5).join("")!==[117,115,116,97,114].join(""))return r.moveBackwardsBy(262),1;r.moveBackwardsBy(138);var e=0;r.getBytes(11).forEach(function(t,r){e+=(t-48).toString()}),e=512*Math.ceil(parseInt(e,8)/512),r.moveForwardsBy(e+377)};r.hasMore()&&!n(););return r.consumeWhile(0),r.carve()}},{name:"Roshal Archive",extension:"rar",mime:"application/x-rar-compressed",description:"",signature:{0:82,1:97,2:114,3:33,4:26,5:7,6:[0,1]},extractor:null},{name:"Gzip",extension:"gz",mime:"application/gzip",description:"",signature:{0:31,1:139,2:8},extractor:function(e,t){var r=new ae(e.slice(t));r.moveForwardsBy(3);var n=r.readInt(1);if(r.moveForwardsBy(4),r.readInt(1),r.moveForwardsBy(1),4&n){var i=r.readInt(2,"le");r.moveForwardsby(i)}return 8&n&&(r.continueUntil(0),r.moveForwardsBy(1)),16&n&&(r.continueUntil(0),r.moveForwardsBy(1)),2&n&&r.moveForwardsBy(2),ge(r),r.moveForwardsBy(8),r.carve()}},{name:"Bzip2",extension:"bz2",mime:"application/x-bzip2",description:"",signature:{0:66,1:90,2:104},extractor:function(e,t){for(var r=new ae(e.slice(t)),n=[[119,36,83,133,9],[238,72,167,10,18],[220,145,78,20,36],[185,34,156,40,72],[114,69,56,80,144],[187,146,41,194,132],[93,201,20,225,66],[46,228,138,112,161],[23,114,69,56,80]],i=0;i<n.length&&(r.continueUntil(n[i]),r.getBytes(5).join("")!==n[i].join(""));i++)r.moveTo(0);return r.moveForwardsBy(4),r.carve()}},{name:"7zip",extension:"7z",mime:"application/x-7z-compressed",description:"",signature:{0:55,1:122,2:188,3:175,4:39,5:28},extractor:null},{name:"Zlib Deflate",extension:"zlib",mime:"application/x-deflate",description:"",signature:{0:120,1:[1,156,218,94]},extractor:function(e,t){var r=new ae(e.slice(t));return r.moveForwardsBy(1),32&r.readInt(1)&&r.moveForwardsBy(4),ge(r),r.moveForwardsBy(4),r.carve()}},{name:"xz compression",extension:"xz",mime:"application/x-xz",description:"",signature:{0:253,1:55,2:122,3:88,4:90,5:0},extractor:function(e,t){var r=new ae(e.slice(t));return r.continueUntil([0,0,0,0,4,89,90]),r.moveForwardsBy(7),r.carve()}},{name:"Tarball",extension:"tar.z",mime:"application/x-gtar",description:"",signature:{0:31,1:[157,160]},extractor:null},{name:"ISO disk image",extension:"iso",mime:"application/octet-stream",description:"ISO 9660 CD/DVD image file",signature:[{32769:67,32770:68,32771:48,32772:48,32773:49},{34817:67,34818:68,34819:48,34820:48,34821:49},{36865:67,36866:68,36867:48,36868:48,36869:49}],extractor:null},{name:"Virtual Machine Disk",extension:"vmdk",mime:"application/vmdk,application/x-virtualbox-vmdk",description:"",signature:{0:75,1:68,2:77,3:86,5:0,6:0,7:0},extractor:null},{name:"Virtual Hard Drive",extension:"vhd",mime:"application/x-vhd",description:"",signature:{0:99,1:111,2:110,3:101,4:99,5:116,6:105,7:120},extractor:null},{name:"Macintosh disk image",extension:"dmf,dmg",mime:"application/octet-stream",description:"",signature:{0:120,1:1,2:115,3:13,4:98,5:98,6:96,7:96},extractor:null},{name:"ARJ Archive",extension:"arj",mime:"application/x-arj-compressed",description:"",signature:{0:96,1:234,8:[0,16,20],9:0,10:2},extractor:null},{name:"WinAce Archive",extension:"ace",mime:"application/x-ace-compressed",description:"",signature:{7:42,8:42,9:65,10:67,11:69,12:42,13:42},extractor:null},{name:"Macintosh BinHex Encoded File",extension:"hqx",mime:"application/mac-binhex",description:"",signature:{11:109,12:117,13:115,14:116,15:32,16:98,17:101,18:32,19:99,20:111,21:110,22:118,23:101,24:114,25:116,26:101,27:100,28:32,29:119,30:105,31:116,32:104,33:32,34:66,35:105,36:110,37:72,38:101,39:120},extractor:null},{name:"ALZip Archive",extension:"alz",mime:"application/octet-stream",description:"",signature:{0:65,1:76,2:90,3:1,4:10,5:0,6:0,7:0},extractor:null},{name:"KGB Compressed Archive",extension:"kgb",mime:"application/x-kgb-compressed",description:"",signature:{0:75,1:71,2:66,3:95,4:97,5:114,6:99,7:104,8:32,9:45},extractor:null},{name:"Microsoft Cabinet",extension:"cab",mime:"vnd.ms-cab-compressed",description:"",signature:{0:77,1:83,2:67,3:70,4:0,5:0,6:0,7:0},extractor:null},{name:"Jar Archive",extension:"jar",mime:"application/java-archive",description:"",signature:{0:95,1:39,2:168,3:137},extractor:null},{name:"Jar Archive",extension:"jar",mime:"application/java-archive",description:"",signature:{0:80,1:75,2:3,3:4,4:20,5:0,6:8,7:0,8:8,9:0},extractor:le},{name:"lzop compressed",extension:"lzop,lzo",mime:"application/x-lzop",description:"",signature:{0:137,1:76,2:90,3:79,4:0,5:13,6:10,7:26},extractor:function(e,t){var r=new ae(e.slice(t)),n=0,i=0;r.moveForwardsBy(9);var a=r.readInt(2,"be");r.moveForwardsBy(6);var o=r.readInt(4,"be");2048&a&&r.moveForwardsBy(4),2&o&&n++,512&o&&n++,1&o&&i++,256&o&&i++,r.moveForwardsBy(8),a>=2368&&r.moveForwardsBy(4);var s=r.readInt(1,"be");if(r.moveForwardsBy(s),64&o){var u=r.readInt(4,"be");r.moveForwardsBy(u)}for(r.moveForwardsBy(4);r.hasMore();){var l=r.readInt(4,"be");if(0===l)break;var c=r.readInt(4,"be"),f=l===c?i:i+n;r.moveForwardsBy(c+4*f)}return r.carve()}},{name:"Linux deb package",extension:"deb",mime:"application/vnd.debian.binary-package",description:"",signature:{0:33,1:60,2:97,3:114,4:99,5:104,6:62},extractor:function(e,t){var r=new ae(e.slice(t));for(r.moveForwardsBy(8);r.hasMore();){r.moveForwardsBy(48);var n,i="",a=oe(r.getBytes(10));try{for(a.s();!(n=a.n()).done;){var o=n.value;i+=String.fromCharCode(o)}}catch(e){a.e(e)}finally{a.f()}i=parseInt(i.trim(),10),r.moveForwardsBy(2),r.moveForwardsBy(i)}return r.carve()}},{name:"Apple Disk Image",extension:"dmg",mime:"application/x-apple-diskimage",description:"",signature:{0:120,1:1,2:115,3:13,4:98,5:98,6:96},extractor:null}],Miscellaneous:[{name:"UTF-8 text",extension:"txt",mime:"text/plain",description:"UTF-8 encoded Unicode byte order mark, commonly but not exclusively seen in text files.",signature:{0:239,1:187,2:191},extractor:null},{name:"UTF-32 LE text",extension:"utf32le",mime:"charset/utf32le",description:"Little-endian UTF-32 encoded Unicode byte order mark.",signature:{0:255,1:254,2:0,3:0},extractor:null},{name:"UTF-16 LE text",extension:"utf16le",mime:"charset/utf16le",description:"Little-endian UTF-16 encoded Unicode byte order mark.",signature:{0:255,1:254},extractor:null},{name:"Web Open Font Format",extension:"woff",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:70,4:0,5:1,6:0,7:0},extractor:null},{name:"Web Open Font Format 2",extension:"woff2",mime:"application/font-woff",description:"",signature:{0:119,1:79,2:70,3:50,4:0,5:1,6:0,7:0},extractor:null},{name:"Embedded OpenType font",extension:"eot",mime:"application/octet-stream",description:"",signature:[{8:2,9:0,10:1,34:76,35:80},{8:1,9:0,10:0,34:76,35:80},{8:2,9:0,10:2,34:76,35:80}],extractor:null},{name:"TrueType Font",extension:"ttf",mime:"application/font-sfnt",description:"",signature:{0:0,1:1,2:0,3:0,4:0},extractor:null},{name:"OpenType Font",extension:"otf",mime:"application/font-sfnt",description:"",signature:{0:79,1:84,2:84,3:79,4:0},extractor:null},{name:"SQLite",extension:"sqlite",mime:"application/x-sqlite3",description:"",signature:{0:83,1:81,2:76,3:105},extractor:function(e,t){var r=new ae(e.slice(t));r.moveTo(16);var n=r.readInt(2);r.moveTo(28);var i=r.readInt(4);return r.moveTo(n*i),r.carve()}},{name:"BitTorrent link",extension:"torrent",mime:"application/x-bittorrent",description:"",signature:[{0:100,1:56,2:58,3:97,4:110,5:110,6:111,7:117,8:110,9:99,10:101,11:35,12:35,13:58},{0:100,1:52,2:58,3:105,4:110,5:102,6:111,7:100,8:[52,53,54],9:58}],extractor:null},{name:"Cryptocurrency wallet",extension:"wallet",mime:"application/octet-stream",description:"",signature:{0:0,1:0,2:0,3:0,4:1,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:98,13:49,14:5,15:0},extractor:null},{name:"Registry fragment",extension:"hbin",mime:"application/octet-stream",description:"",signature:{0:104,1:98,2:105,3:110,4:0},extractor:null},{name:"Registry script",extension:"rgs",mime:"application/octet-stream",description:"",signature:{0:72,1:75,2:67,3:82,4:13,5:10,6:92,7:123},extractor:null},{name:"WinNT Registry Hive",extension:"registry",mime:"application/octet-stream",description:"",signature:{0:114,1:101,2:103,3:102},extractor:null},{name:"Windows Event Log",extension:"evt",mime:"application/octet-stream",description:"",signature:{0:48,1:0,2:0,3:0,4:76,5:102,6:76,7:101},extractor:function(e,t){var r=new ae(e.slice(t));r.moveTo(20);var n=r.readInt(4,"le");r.moveTo(n);var i=r.readInt(4,"le");return r.moveForwardsBy(i-4),r.carve()}},{name:"Windows Event Log",extension:"evtx",mime:"application/octet-stream",description:"",signature:{0:69,1:108,2:102,3:70,4:105,5:108,6:101},extractor:function(e,t){var r=new ae(e.slice(t));r.moveTo(40);var n=r.readInt(4,"le")-44;for(r.moveForwardsBy(n);r.hasMore()&&r.getBytes(7).join("")===[69,108,102,67,104,110,107].join("");)r.moveForwardsBy(65529);return r.consumeWhile(0),r.carve()}},{name:"Windows Pagedump",extension:"dmp",mime:"application/octet-stream",description:"",signature:{0:80,1:65,2:71,3:69,4:68,5:85,6:[77,54],7:[80,52]},extractor:function(e,t){var r=new ae(e.slice(t));return r.moveTo(112),r.moveTo(4096*(r.readInt(4,"le")+1)),r.carve()}},{name:"Windows Prefetch",extension:"pf",mime:"application/x-pf",description:"",signature:{0:[17,23,26],1:0,2:0,3:0,4:83,5:67,6:67,7:65},extractor:function(e,t){var r=new ae(e.slice(t));return r.moveTo(12),r.moveTo(r.readInt(4,"be")),r.carve()}},{name:"Windows Prefetch (Win 10)",extension:"pf",mime:"application/x-pf",description:"",signature:{0:77,1:65,2:77,3:4,7:0},extractor:function(e,t){var r=new ae(e.slice(t));return r.moveTo(r.readInt(4,"be")),r.carve()}},{name:"PList (XML)",extension:"plist",mime:"application/xml",description:"",signature:{39:60,40:33,41:68,42:79,43:67,44:84,45:89,46:80,47:69,48:32,49:112,50:108,51:105,52:115,53:116},extractor:function(e,t){var r=new ae(e.slice(t)),n=0;for(r.continueUntil([60,112,108,105,115,116]),r.moveForwardsBy(6),n++;n>0&&r.hasMore();)60===r.readInt(1)&&(r.getBytes(5).join("")===[112,108,105,115,116].join("")?n++:r.moveBackwardsBy(5),r.getBytes(7).join("")===[47,112,108,105,115,116,62].join("")?n--:r.moveBackwardsBy(7));return r.consumeIf(10),r.carve()}},{name:"PList (binary)",extension:"bplist,plist,ipmeta,abcdp,mdbackup,mdinfo,strings,nib,ichat,qtz,webbookmark,webhistory",mime:"application/x-plist",description:"",signature:{0:98,1:112,2:108,3:105,4:115,5:116,6:48,7:48},extractor:null},{name:"MacOS X Keychain",extension:"keychain",mime:"application/octet-stream",description:"",signature:{0:107,1:121,2:99,3:104,4:0,5:1},extractor:function(e,t){var r=new ae(e.slice(t));return r.moveTo(20),r.moveForwardsBy(r.readInt(4)),r.carve()}},{name:"TCP Packet",extension:"tcp",mime:"application/tcp",description:"",signature:{12:8,13:0,14:69,15:0,21:0,22:function(e){return e>=1&&e<=128},23:6},extractor:null},{name:"UDP Packet",extension:"udp",mime:"application/udp",description:"",signature:{12:8,13:0,14:69,15:0,16:[0,1,2,3,4,5],22:function(e){return e>=1&&e<=128},23:17},extractor:null},{name:"Compiled HTML",extension:"chm,chw,chi",mime:"application/vnd.ms-htmlhelp",description:"",signature:{0:73,1:84,2:83,3:70,4:3,5:0,6:0,7:0},extractor:null},{name:"Windows Password",extension:"pwl",mime:"application/octet-stream",description:"",signature:{0:227,1:130,2:133,3:150},extractor:null},{name:"Bitlocker recovery key",extension:"bitlocker",mime:"application/octet-stream",description:"",signature:{0:255,1:254,2:66,3:0,4:105,5:0,6:116,7:0,8:76,9:0,10:111,11:0,12:99,13:0,14:107,15:0,16:101,17:0,18:114,19:0,20:32,21:0},extractor:null},{name:"Certificate",extension:"cer,cat,p7b,p7c,p7m,p7s,swz,rsa,crl,crt,der",mime:"application/pkix-cert",description:"",signature:{0:48,1:130,4:[6,10,48]},extractor:null},{name:"Certificate",extension:"cat,swz,p7m",mime:"application/vnd.ms-pki.seccat",description:"",signature:{0:48,1:131,2:function(e){return 0!==e},5:6,6:9},extractor:null},{name:"PGP pubring",extension:"pkr,gpg",mime:"application/pgp-keys",description:"",signature:{0:153,1:1,2:[13,162],3:4},extractor:null},{name:"PGP secring",extension:"skr",mime:"application/pgp-keys",description:"",signature:[{0:149,1:1,2:207,3:4},{0:149,1:3,2:198,3:4},{0:149,1:5,2:134,3:4}],extractor:null},{name:"PGP Safe",extension:"pgd",mime:"application/pgp-keys",description:"",signature:{0:80,1:71,2:80,3:100,4:77,5:65,6:73,7:78,8:96,9:1,10:0},extractor:null},{name:"Task Scheduler",extension:"job",mime:"application/octet-stream",description:"",signature:{0:[0,1,2,3],1:[5,6],2:1,3:0,20:70,21:0},extractor:null},{name:"Windows Shortcut",extension:"lnk",mime:"application/x-ms-shortcut",description:"",signature:{0:76,1:0,2:0,3:0,4:1,5:20,6:2,7:0,8:0,9:0,10:0,11:0,12:192,13:0,14:0,15:0,16:0,17:0,18:0,19:70},extractor:function(e,t){var r=new ae(e.slice(t));return r.moveTo(52),r.moveTo(r.readInt(4,"le")),r.carve()}},{name:"Bash",extension:"bash",mime:"application/bash",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:98,8:97,9:115,10:104},extractor:null},{name:"Shell",extension:"sh",mime:"application/sh",description:"",signature:{0:35,1:33,2:47,3:98,4:105,5:110,6:47,7:115,8:104},extractor:null},{name:"Python",extension:"py,pyc,pyd,pyo,pyw,pyz",mime:"application/python",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:121,13:116,14:104,15:111,16:110,17:[50,51,10,13]},extractor:null},{name:"Ruby",extension:"rb",mime:"application/ruby",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:114,12:117,13:98,14:121},extractor:null},{name:"perl",extension:"pl,pm,t,pod",mime:"application/perl",description:"",signature:{0:35,1:33,2:47,3:117,4:115,5:114,6:47,7:98,8:105,9:110,10:47,11:112,12:101,13:114,14:108},extractor:null},{name:"php",extension:"php,phtml,php3,php4,php5,php7,phps,php-s,pht,phar",mime:"application/php",description:"",signature:{0:60,1:63,2:112,3:104,4:112},extractor:null},{name:"Smile",extension:"sml",mime:"\tapplication/x-jackson-smile",description:"",signature:{0:58,1:41,2:10},extractor:null},{name:"Lua Bytecode",extension:"luac",mime:"application/x-lua",description:"",signature:{0:27,1:76,2:117,3:97},extractor:null},{name:"WebAssembly binary",extension:"wasm",mime:"application/octet-stream",description:"",signature:{0:0,1:97,2:115,3:109},extractor:null}]};function le(e,t){var r=new ae(e.slice(t));r.continueUntil([80,75,5,6]),r.moveForwardsBy(20);var n=r.readInt(2,"le");return r.moveForwardsBy(n),r.carve()}function ce(e,t){var r="207250237254",n=new ae(e.slice(t)),i=n.getBytes(4).join("");return n.moveTo(function(e,t,r){var n=28;t&&(n+=4),e.moveTo(16);var i=e.readInt(4,r);return function(e,t,r,n){for(var i=0,a=0;a<n;a++){e.moveTo(t);var o=e.readInt(4,r);25===o?(e.moveTo(t+48),i+=e.readInt(8,r),e.moveTo(t+4),t+=e.readInt(4,r)):1===o&&(e.moveTo(t+36),i+=e.readInt(4,r),e.moveTo(t+4),t+=e.readInt(4,r))}return i}(e,n,r,i)}(n,function(e){return e===r||"254237250207"===e}(i),function(e){return"206250237254"===e||e===r}(i)?"le":"be")),n.carve()}for(var fe=new Array(288),he=0;he<fe.length;he++)fe[he]=he<=143?8:he<=255?9:he<=279?7:8;var de=ve(fe),pe=ve(new Array(30).fill(5)),me=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];function ge(e){for(var t=0;!t;){t=e.readBits(1,"le");var r=e.readBits(2,"le");if(0===r){e.moveForwardsBy(1);var n=e.readInt(2,"le");e.moveForwardsBy(2+n)}else if(1===r)_e(e,de,pe);else{if(2!==r)throw new Error(`Invalid block type while parsing DEFLATE stream at pos ${e.position}`);for(var i=e.readBits(5,"le")+257,a=e.readBits(5,"le")+1,o=e.readBits(4,"le")+4,s=new Uint8Array(me.length),u=0;u<o;u++)s[me[u]]=e.readBits(3,"le");for(var l=ve(s),c=new Uint8Array(i+a),f=void 0,h=void 0,d=void 0,p=0;p<i+a;)switch(f=we(e,l)){case 16:for(h=3+e.readBits(2,"le");h--;)c[p++]=d;break;case 17:for(h=3+e.readBits(3,"le");h--;)c[p++]=0;d=0;break;case 18:for(h=11+e.readBits(7,"le");h--;)c[p++]=0;d=0;break;default:c[p++]=f,d=f}_e(e,ve(c.subarray(0,i)),ve(c.subarray(i)))}}e.bitPos>0&&e.moveForwardsBy(1)}var be=[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,0,0],ye=[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];function _e(e,t,r){for(var n,i=0;(n=we(e,t))&&256!==n;){if(++i>1e4)throw new Error("Caught in probable infinite loop while parsing Huffman Block");n<256||(e.readBits(be[n-257],"le"),n=we(e,r),e.readBits(ye[n],"le"))}}function ve(e){for(var t=Math.max.apply(Math,e),r=Math.min.apply(Math,e),n=1<<t,i=new Uint32Array(n),a=1,o=0,s=2;a<=t;){for(var u=0;u<e.length;u++)if(e[u]===a){var l=void 0,c=void 0,f=void 0;for(l=0,c=o,f=0;f<a;f++)l=l<<1|1&c,c>>=1;for(var h=a<<16|u,d=l;d<n;d+=s)i[d]=h;o++}a++,o<<=1,s<<=1}return[i,t,r]}function we(e,t){var r=ie(t,2),n=r[0],i=r[1],a=n[e.readBits(i,"le")&(1<<i)-1],o=a>>>16;if(o>i)throw new Error(`Invalid Huffman Code length while parsing DEFLATE block at pos ${e.position}: ${o}`);return e.moveBackwardsByBits(i-o),65535&a}function xe(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(e.length){for(var n=0;n<e.length;n++)if(ke(e[n],t,r))return!0;return!1}return ke(e,t,r)}function ke(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;for(var n in e){var i=parseInt(n,10)+r;switch(typeof e[n]){case"number":if(t[i]!==e[n])return!1;break;case"object":if(e[n].indexOf(t[i])<0)return!1;break;case"function":if(!e[n](t[i]))return!1;break;default:throw new Error(`Unrecognised signature type at offset ${n}`)}}return!0}function Be(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.keys(ue);if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),!(e&&e.length>1))return[];var r=[],n={};for(var i in ue)t.includes(i)&&(n[i]=ue[i]);for(var a in n)n[a].forEach(function(t){xe(t.signature,e)&&r.push(t)});return r}function Ee(e){return function(e,t){var r=Be(t);return!!r.length&&r.reduce(function(t,r){var n=!!r.mime.startsWith(e)&&r.mime;return t||n},!1)}("image",e)}const Se=function(){return o(function e(){r(this,e)},null,[{key:"checkForValue",value:function(e){if(void 0===e)throw new Error("only use translation methods with .bind")}},{key:"toArrayBuffer",value:function(){throw new Error("toArrayBuffer has not been implemented")}},{key:"fromArrayBuffer",value:function(){throw new Error("fromArrayBuffer has not been implemented")}}])}();function Ae(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ae=function(){return!!e})()}const Ce=function(e){function t(){return r(this,t),e=this,i=arguments,n=u(n=t),s(e,Ae()?Reflect.construct(n,i||[],u(e).constructor):n.apply(e,i));var e,n,i}return c(t,e),o(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=new Uint8Array(this.value).buffer}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=Array.prototype.slice.call(new Uint8Array(this.value))}}])}(Se);function Ie(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ie=function(){return!!e})()}const Pe=function(e){function t(){return r(this,t),e=this,i=arguments,n=u(n=t),s(e,Ie()?Reflect.construct(n,i||[],u(e).constructor):n.apply(e,i));var e,n,i}return c(t,e),o(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=ne.isBigNumber(this.value)?O.strToArrayBuffer(this.value.toFixed()):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value);try{this.value=new ne(O.arrayBufferToStr(this.value))}catch(e){this.value=new ne(NaN)}}}])}(Se);function Te(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Te=function(){return!!e})()}const Me=function(e){function t(){return r(this,t),e=this,i=arguments,n=u(n=t),s(e,Te()?Reflect.construct(n,i||[],u(e).constructor):n.apply(e,i));var e,n,i}return c(t,e),o(t,null,[{key:"toArrayBuffer",value:function(){var e=this;if(t.checkForValue(this.value),!M())return new Promise(function(t,r){O.readFile(e.value).then(function(t){return e.value=t.buffer}).then(t).catch(r)});this.value=O.readFileSync(this.value)}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=new File(this.value,"unknown")}}])}(Se);function Re(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Re=function(){return!!e})()}const Fe=function(e){function t(){return r(this,t),e=this,i=arguments,n=u(n=t),s(e,Re()?Reflect.construct(n,i||[],u(e).constructor):n.apply(e,i));var e,n,i}return c(t,e),o(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=this.value?O.strToArrayBuffer(this.value):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=this.value?O.arrayBufferToStr(this.value):""}}])}(Se);function Oe(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Oe=function(){return!!e})()}const Ne=function(e){function t(){return r(this,t),e=this,i=arguments,n=u(n=t),s(e,Oe()?Reflect.construct(n,i||[],u(e).constructor):n.apply(e,i));var e,n,i}return c(t,e),o(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=this.value?O.strToArrayBuffer(O.unescapeHtml(O.stripHtmlTags(this.value,!0))):new ArrayBuffer}}])}(Fe);function Le(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Le=function(){return!!e})()}const De=function(e){function t(){return r(this,t),e=this,i=arguments,n=u(n=t),s(e,Le()?Reflect.construct(n,i||[],u(e).constructor):n.apply(e,i));var e,n,i}return c(t,e),o(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value=void 0!==this.value?O.strToArrayBuffer(JSON.stringify(this.value,null,4)):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=JSON.parse(O.arrayBufferToStr(this.value))}}])}(Se);function ze(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ze=function(){return!!e})()}const Ue=function(e){function n(){return r(this,n),e=this,i=arguments,t=u(t=n),s(e,ze()?Reflect.construct(t,i||[],u(e).constructor):t.apply(e,i));var e,t,i}return c(n,e),o(n,null,[{key:"toArrayBuffer",value:(a=t(h().mark(function e(){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n.checkForValue(this.value),!M()){e.next=1;break}this.value=this.value.map(function(e){return Uint8Array.from(e.data)}),e.next=3;break;case 1:return e.next=2,n.concatenateTypedArraysWithTypedElements.apply(n,m(this.value));case 2:this.value=e.sent;case 3:case"end":return e.stop()}},e,this)})),function(){return a.apply(this,arguments)})},{key:"fromArrayBuffer",value:function(){n.checkForValue(this.value),this.value=[new File(this.value,"unknown")]}},{key:"concatenateTypedArraysWithTypedElements",value:(i=t(h().mark(function e(){var t,r,n,i,a,o,s,u,l,c,f,d,p,m=arguments;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(t=0,r=m.length,n=new Array(r),i=0;i<r;i++)n[i]=m[i];for(a=0,o=n;a<o.length;a++)s=o[a],t+=s.size;u=new Uint8Array(t),l=0,c=0,f=n;case 1:if(!(c<f.length)){e.next=4;break}return d=f[c],e.next=2,O.readFile(d);case 2:p=e.sent,u.set(p,l),l+=p.length;case 3:c++,e.next=1;break;case 4:return e.abrupt("return",u);case 5:case"end":return e.stop()}},e)})),function(){return i.apply(this,arguments)})},{key:"concatenateTypedArrays",value:function(){for(var e=0,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];for(var i=0,a=r;i<a.length;i++)e+=a[i].length;for(var o=new Uint8Array(e),s=0,u=0,l=r;u<l.length;u++){var c=l[u];o.set(c,s),s+=c.length}return o}}]);var i,a}(Se);function $e(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($e=function(){return!!e})()}const je=function(e){function t(){return r(this,t),e=this,i=arguments,n=u(n=t),s(e,$e()?Reflect.construct(n,i||[],u(e).constructor):n.apply(e,i));var e,n,i}return c(t,e),o(t,null,[{key:"toArrayBuffer",value:function(){t.checkForValue(this.value),this.value="number"==typeof this.value?O.strToArrayBuffer(this.value.toString()):new ArrayBuffer}},{key:"fromArrayBuffer",value:function(){t.checkForValue(this.value),this.value=this.value?parseFloat(O.arrayBufferToStr(this.value)):0}}])}(Se);var Ze=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(r(this,e),this.value=new ArrayBuffer(0),this.type=e.ARRAY_BUFFER,t&&Object.prototype.hasOwnProperty.call(t,"value")&&Object.prototype.hasOwnProperty.call(t,"type"))this.set(t.value,t.type);else if(t&&null!==n)this.set(t,n);else if(t){var i=e.typeEnum(t.constructor.name);this.set(t,i)}}return o(e,[{key:"get",value:function(t){var r=this;return"string"==typeof t&&(t=e.typeEnum(t)),this.type!==t?M()?(this._translate(t),this.value):new Promise(function(e,n){r._translate(t).then(function(){e(r.value)}).catch(n)}):this.value}},{key:"set",value:function(t,r){if("string"==typeof r&&(r=e.typeEnum(r)),b().debug("Dish type: "+e.enumLookup(r)),this.value=t,this.type=r,!this.valid()){var n=O.truncate(JSON.stringify(this.value),25);throw new L(`Data is not a valid ${e.enumLookup(r)}: ${n}`)}}},{key:"presentAs",value:function(e){return this.clone().get(e)}},{key:"detectDishType",value:function(){var e=Be(new Uint8Array(this.value.slice(0,2048)));return e.length&&e[0].mime&&"text/plain"===e[0].mime?e[0].mime:null}},{key:"getTitle",value:(n=t(h().mark(function t(r){var n,i,a,o;return h().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n="",a=this.type,t.next=a===e.FILE?1:a===e.LIST_FILE?2:a===e.JSON?3:a===e.NUMBER||a===e.BIG_NUMBER?4:a===e.ARRAY_BUFFER||a===e.BYTE_ARRAY?5:6;break;case 1:return n=this.value.name,t.abrupt("continue",9);case 2:return n=`${this.value.length} file(s)`,t.abrupt("continue",9);case 3:return n="application/json",t.abrupt("continue",9);case 4:return n=this.value.toString(),t.abrupt("continue",9);case 5:if(null===(n=this.detectDishType())){t.next=6;break}return t.abrupt("continue",9);case 6:return t.prev=6,(i=this.clone()).value=i.value.slice(0,256),t.next=7,i.get(e.STRING);case 7:n=t.sent,t.next=9;break;case 8:t.prev=8,o=t.catch(6),b().error(`${e.enumLookup(this.type)} cannot be sliced. ${o}`);case 9:return t.abrupt("return",n.slice(0,r));case 10:case"end":return t.stop()}},t,this,[[6,8]])})),function(e){return n.apply(this,arguments)})},{key:"valid",value:function(){switch(this.type){case e.BYTE_ARRAY:if(!(this.value instanceof Uint8Array||this.value instanceof Array))return!1;for(var t=0;t<this.value.length;t++)if("number"!=typeof this.value[t]||this.value[t]<0||this.value[t]>255)return!1;return!0;case e.STRING:case e.HTML:return"string"==typeof this.value;case e.NUMBER:return"number"==typeof this.value;case e.ARRAY_BUFFER:return this.value instanceof ArrayBuffer;case e.BIG_NUMBER:if(ne.isBigNumber(this.value))return!0;if(Object.keys(this.value).sort().equals(["c","e","s"])){var r=new ne;return r.c=this.value.c,r.e=this.value.e,r.s=this.value.s,this.value=r,!0}return!1;case e.JSON:return!0;case e.FILE:return this.value instanceof File;case e.LIST_FILE:return this.value instanceof Array&&this.value.reduce(function(e,t){return e&&t instanceof File},!0);default:return!1}}},{key:"size",get:function(){switch(this.type){case e.BYTE_ARRAY:case e.STRING:case e.HTML:return this.value.length;case e.NUMBER:case e.BIG_NUMBER:return this.value.toString().length;case e.ARRAY_BUFFER:return this.value.byteLength;case e.JSON:return JSON.stringify(this.value).length;case e.FILE:return this.value.size;case e.LIST_FILE:return this.value.reduce(function(e,t){return e+t.size},0);default:return-1}}},{key:"clone",value:function(){var t=new e;switch(this.type){case e.STRING:case e.HTML:case e.NUMBER:case e.BIG_NUMBER:t.set(this.value,this.type);break;case e.BYTE_ARRAY:case e.JSON:t.set(JSON.parse(JSON.stringify(this.value)),this.type);break;case e.ARRAY_BUFFER:t.set(this.value.slice(0),this.type);break;case e.FILE:t.set(new File([this.value],this.value.name,{type:this.value.type,lastModified:this.value.lastModified}),this.type);break;case e.LIST_FILE:t.set(this.value.map(function(e){return new File([e],e.name,{type:e.type,lastModified:e.lastModified})}),this.type);break;default:throw new L("Cannot clone Dish, unknown type")}return t}},{key:"_translate",value:function(t){var r=this;if(b().debug(`Translating Dish from ${e.enumLookup(this.type)} to ${e.enumLookup(t)}`),!M())return new Promise(function(n,i){r._toArrayBuffer().then(function(){return r.type=e.ARRAY_BUFFER}).then(function(){r._fromArrayBuffer(t),n()}).catch(i)});this._toArrayBuffer(),this.type=e.ARRAY_BUFFER,this._fromArrayBuffer(t)}},{key:"_toArrayBuffer",value:function(){var t=this,r={browser:{[e.STRING]:function(){return Promise.resolve(Fe.toArrayBuffer.bind(t)())},[e.NUMBER]:function(){return Promise.resolve(je.toArrayBuffer.bind(t)())},[e.HTML]:function(){return Promise.resolve(Ne.toArrayBuffer.bind(t)())},[e.ARRAY_BUFFER]:function(){return Promise.resolve()},[e.BIG_NUMBER]:function(){return Promise.resolve(Pe.toArrayBuffer.bind(t)())},[e.JSON]:function(){return Promise.resolve(De.toArrayBuffer.bind(t)())},[e.FILE]:function(){return Me.toArrayBuffer.bind(t)()},[e.LIST_FILE]:function(){return Promise.resolve(Ue.toArrayBuffer.bind(t)())},[e.BYTE_ARRAY]:function(){return Promise.resolve(Ce.toArrayBuffer.bind(t)())}},node:{[e.STRING]:function(){return Fe.toArrayBuffer.bind(t)()},[e.NUMBER]:function(){return je.toArrayBuffer.bind(t)()},[e.HTML]:function(){return Ne.toArrayBuffer.bind(t)()},[e.ARRAY_BUFFER]:function(){},[e.BIG_NUMBER]:function(){return Pe.toArrayBuffer.bind(t)()},[e.JSON]:function(){return De.toArrayBuffer.bind(t)()},[e.FILE]:function(){return Me.toArrayBuffer.bind(t)()},[e.LIST_FILE]:function(){return Ue.toArrayBuffer.bind(t)()},[e.BYTE_ARRAY]:function(){return Ce.toArrayBuffer.bind(t)()}}};try{return r[M()?"node":"browser"][this.type]()}catch(t){throw new L(`Error translating from ${e.enumLookup(this.type)} to ArrayBuffer: ${t}`)}}},{key:"_fromArrayBuffer",value:function(t){var r=this,n={[e.STRING]:function(){return Fe.fromArrayBuffer.bind(r)()},[e.NUMBER]:function(){return je.fromArrayBuffer.bind(r)()},[e.HTML]:function(){return Ne.fromArrayBuffer.bind(r)()},[e.ARRAY_BUFFER]:function(){},[e.BIG_NUMBER]:function(){return Pe.fromArrayBuffer.bind(r)()},[e.JSON]:function(){return De.fromArrayBuffer.bind(r)()},[e.FILE]:function(){return Me.fromArrayBuffer.bind(r)()},[e.LIST_FILE]:function(){return Ue.fromArrayBuffer.bind(r)()},[e.BYTE_ARRAY]:function(){return Ce.fromArrayBuffer.bind(r)()}};try{n[t](),this.type=t}catch(r){throw new L(`Error translating from ArrayBuffer to ${e.enumLookup(t)}: ${r}`)}}}],[{key:"typeEnum",value:function(t){switch(t.toLowerCase()){case"bytearray":case"byte array":return e.BYTE_ARRAY;case"string":return e.STRING;case"number":return e.NUMBER;case"html":return e.HTML;case"arraybuffer":case"array buffer":return e.ARRAY_BUFFER;case"bignumber":case"big number":return e.BIG_NUMBER;case"json":case"object":return e.JSON;case"file":return e.FILE;case"list<file>":return e.LIST_FILE;default:throw new L("Invalid data type string. No matching enum.")}}},{key:"enumLookup",value:function(t){switch(t){case e.BYTE_ARRAY:return"byteArray";case e.STRING:return"string";case e.NUMBER:return"number";case e.HTML:return"html";case e.ARRAY_BUFFER:return"ArrayBuffer";case e.BIG_NUMBER:return"BigNumber";case e.JSON:return"JSON";case e.FILE:return"File";case e.LIST_FILE:return"List<File>";default:throw new L("Invalid data type enum. No matching type.")}}}]);var n}();Ze.BYTE_ARRAY=0,Ze.STRING=1,Ze.NUMBER=2,Ze.HTML=3,Ze.ARRAY_BUFFER=4,Ze.BIG_NUMBER=5,Ze.JSON=6,Ze.FILE=7,Ze.LIST_FILE=8;const Ge=Ze,We=function(){function e(t){r(this,e),this.name="",this.type="",this._value=null,this.disabled=!1,this.hint="",this.rows=0,this.toggleValues=[],this.target=null,this.defaultIndex=0,this.maxLength=null,this.min=null,this.max=null,this.step=1,t&&this._parseConfig(t)}return o(e,[{key:"_parseConfig",value:function(e){this.name=e.name,this.type=e.type,this.defaultValue=e.value,this.disabled=!!e.disabled,this.hint=e.hint||!1,this.rows=e.rows||!1,this.toggleValues=e.toggleValues,this.target=void 0!==e.target?e.target:null,this.defaultIndex=void 0!==e.defaultIndex?e.defaultIndex:0,this.maxLength=e.maxLength||null,this.min=e.min,this.max=e.max,this.step=e.step}},{key:"config",get:function(){return this._value}},{key:"value",get:function(){return this._value},set:function(t){this._value=e.prepare(t,this.type)}}],[{key:"prepare",value:function(e,t){var r;switch(t){case"binaryString":case"binaryShortString":case"editableOption":case"editableOptionShort":return O.parseEscapedChars(e);case"byteArray":return"string"==typeof e?S(e=e.replace(/\s+/g,"")):e;case"number":if(null===e)return e;if(r=parseFloat(e),isNaN(r))throw"Invalid ingredient value. Not a number: "+O.truncate(e.toString(),10);return r;default:return e}}}])}();var He=function(){return o(function e(){r(this,e),this._inputType=-1,this._outputType=-1,this._presentType=-1,this._breakpoint=!1,this._disabled=!1,this._flowControl=!1,this._manualBake=!1,this._ingList=[],this.name="",this.module="",this.description="",this.infoURL=null},[{key:"run",value:function(e,t){return e}},{key:"highlight",value:function(e,t){return!1}},{key:"highlightReverse",value:function(e,t){return!1}},{key:"present",value:function(e,t){return e}},{key:"inputType",get:function(){return Ge.enumLookup(this._inputType)},set:function(e){this._inputType=Ge.typeEnum(e)}},{key:"outputType",get:function(){return Ge.enumLookup(this._outputType)},set:function(e){this._outputType=Ge.typeEnum(e),this._presentType<0&&(this._presentType=this._outputType)}},{key:"presentType",get:function(){return Ge.enumLookup(this._presentType)},set:function(e){this._presentType=Ge.typeEnum(e)}},{key:"args",get:function(){return this._ingList.map(function(e){var t={name:e.name,type:e.type,value:e.defaultValue};return e.toggleValues&&(t.toggleValues=e.toggleValues),e.hint&&(t.hint=e.hint),e.rows&&(t.rows=e.rows),e.disabled&&(t.disabled=e.disabled),e.target&&(t.target=e.target),e.defaultIndex&&(t.defaultIndex=e.defaultIndex),e.maxLength&&(t.maxLength=e.maxLength),"number"==typeof e.min&&(t.min=e.min),"number"==typeof e.max&&(t.max=e.max),e.step&&(t.step=e.step),t})},set:function(e){var t=this;e.forEach(function(e){var r=new We(e);t.addIngredient(r)})}},{key:"config",get:function(){return{op:this.name,args:this._ingList.map(function(e){return e.config})}}},{key:"addIngredient",value:function(e){this._ingList.push(e)}},{key:"ingValues",get:function(){return this._ingList.map(function(e){return e.value})},set:function(e){var t=this;e.forEach(function(e,r){t._ingList[r].value=e})}},{key:"breakpoint",get:function(){return this._breakpoint},set:function(e){this._breakpoint=!!e}},{key:"disabled",get:function(){return this._disabled},set:function(e){this._disabled=!!e}},{key:"flowControl",get:function(){return this._flowControl},set:function(e){this._flowControl=!!e}},{key:"manualBake",get:function(){return this._manualBake},set:function(e){this._manualBake=!!e}}])}();const qe=He;var Qe=__webpack_require__(69962);function Ve(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ve=function(){return!!e})()}const Ye=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,Ve()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Add Text To Image",e.module="Image",e.description="Adds text onto an image.<br><br>Text can be horizontally or vertically aligned, or the position can be manually specified.<br>Variants of the Roboto font face are available in any size or colour.",e.infoURL="",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.presentType="html",e.args=[{name:"Text",type:"string",value:""},{name:"Horizontal align",type:"option",value:["None","Left","Center","Right"]},{name:"Vertical align",type:"option",value:["None","Top","Middle","Bottom"]},{name:"X position",type:"number",value:0},{name:"Y position",type:"number",value:0},{name:"Size",type:"number",value:32,min:8},{name:"Font face",type:"option",value:["Roboto","Roboto Black","Roboto Mono","Roboto Slab"]},{name:"Red",type:"number",value:255,min:0,max:255},{name:"Green",type:"number",value:255,min:0,max:255},{name:"Blue",type:"number",value:255,min:0,max:255},{name:"Alpha",type:"number",value:255,min:0,max:255}],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o,s,u,l,c,f,d,p,m,g,b,y,_,v,w,x,B,E,S,A,C,I,P;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r[0],i=r[1],a=r[2],o=r[5],s=r[6],u=r[7],l=r[8],c=r[9],f=r[10],d=r[3],p=r[4],Ee(t)){e.next=1;break}throw new k("Invalid file type.");case 1:return e.prev=1,e.next=2,Qe.dK.read(t);case 2:m=e.sent,e.next=4;break;case 3:throw e.prev=3,B=e.catch(1),new k(`Error loading image. (${B})`);case 4:return F()&&self.sendStatusMessage("Adding text to image..."),g={},e.prev=5,b=[Promise.resolve().then(__webpack_require__.t.bind(__webpack_require__,85966,17)),Promise.resolve().then(__webpack_require__.t.bind(__webpack_require__,60261,17)),Promise.resolve().then(__webpack_require__.t.bind(__webpack_require__,13773,17)),Promise.resolve().then(__webpack_require__.t.bind(__webpack_require__,6758,17))],e.next=6,Promise.all(b).then(function(e){g.Roboto=e[0],g["Roboto Black"]=e[1],g["Roboto Mono"]=e[2],g["Roboto Slab"]=e[3]});case 6:return e.next=7,Promise.all([Promise.resolve().then(__webpack_require__.t.bind(__webpack_require__,47707,17)),Promise.resolve().then(__webpack_require__.t.bind(__webpack_require__,25971,17)),Promise.resolve().then(__webpack_require__.t.bind(__webpack_require__,53968,17)),Promise.resolve().then(__webpack_require__.t.bind(__webpack_require__,55560,17))]);case 7:e.next=9;break;case 8:throw e.prev=8,E=e.catch(5),new k(`Error preparing fonts. (${E})`);case 9:return e.prev=9,_=g[s],e.next=10,(0,Qe.Al)(self.docURL+"/"+_.default);case 10:(y=e.sent).pages.forEach(function(e){if(e.bitmap)for(var t=e.bitmap.width,r=e.bitmap.height,n=0;n<t;n++)for(var i=0;i<r;i++){var a=i*t+n<<2,o=e.bitmap.data[a]-(255-u),s=e.bitmap.data[a+1]-(255-l),h=e.bitmap.data[a+2]-(255-c),d=e.bitmap.data[a+3]-(255-f);e.bitmap.data[a]=o>0?o:0,e.bitmap.data[a+1]=s>0?s:0,e.bitmap.data[a+2]=h>0?h:0,e.bitmap.data[a+3]=d>0?d:0}}),e.next=12;break;case 11:throw e.prev=11,S=e.catch(9),new k(`Error loading font. (${S})`);case 12:e.prev=12,(v=new Qe.dK({width:(0,Qe.kD)(y,n),height:(0,Qe.Rf)(y,n)})).print({font:y,x:0,y:0,text:n}),w=o/72,1!==o&&(o>1?v.scale({f:w,mode:Qe.od.BICUBIC}):v.scale({f:w,mode:Qe.od.BILINEAR})),A=i,e.next="Left"===A?13:"Center"===A?14:"Right"===A?15:16;break;case 13:return d=0,e.abrupt("continue",16);case 14:return d=m.width/2-v.width/2,e.abrupt("continue",16);case 15:return d=m.width-v.width,e.abrupt("continue",16);case 16:C=a,e.next="Top"===C?17:"Middle"===C?18:"Bottom"===C?19:20;break;case 17:return p=0,e.abrupt("continue",20);case 18:return p=m.height/2-v.height/2,e.abrupt("continue",20);case 19:return p=m.height-v.height,e.abrupt("continue",20);case 20:m.blit({src:v,x:d,y:p}),e.next=22;break;case 21:throw e.prev=21,I=e.catch(12),new k(`Error adding text to image. (${I})`);case 22:if(e.prev=22,"image/gif"!==m.mime){e.next=24;break}return e.next=23,m.getBuffer(Qe.pY.png);case 23:x=e.sent,e.next=26;break;case 24:return e.next=25,m.getBuffer(m.mime);case 25:x=e.sent;case 26:return e.abrupt("return",x.buffer);case 27:throw e.prev=27,P=e.catch(22),new k(`Error exporting image. (${P})`);case 28:case"end":return e.stop()}},e,null,[[1,3],[5,8],[9,11],[12,21],[22,27]])})),function(e,t){return i.apply(this,arguments)})},{key:"present",value:function(e){if(!e.byteLength)return"";var t=new Uint8Array(e),r=Ee(t);if(!r)throw new k("Invalid file type.");return`<img src="data:${r};base64,${B(t)}">`}}]);var i}(qe);function Ke(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ke=function(){return!!e})()}const Xe=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,Ke()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Blur Image",e.module="Image",e.description="Applies a blur effect to the image.<br><br>Gaussian blur is much slower than fast blur, but produces better results.",e.infoURL="https://wikipedia.org/wiki/Gaussian_blur",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.presentType="html",e.args=[{name:"Amount",type:"number",value:5,min:1},{name:"Type",type:"option",value:["Fast","Gaussian"]}],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o,s,u,l,c;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=ie(r,2),i=n[0],a=n[1],Ee(t)){e.next=1;break}throw new k("Invalid file type.");case 1:return e.prev=1,e.next=2,Qe.dK.read(t);case 2:o=e.sent,e.next=4;break;case 3:throw e.prev=3,u=e.catch(1),new k(`Error loading image. (${u})`);case 4:e.prev=4,l=a,e.next="Fast"===l?5:"Gaussian"===l?6:7;break;case 5:return F()&&self.sendStatusMessage("Fast blurring image..."),o.blur(i),e.abrupt("continue",7);case 6:return F()&&self.sendStatusMessage("Gaussian blurring image..."),o.gaussian(i),e.abrupt("continue",7);case 7:if("image/gif"!==o.mime){e.next=9;break}return e.next=8,o.getBuffer(Qe.pY.png);case 8:s=e.sent,e.next=11;break;case 9:return e.next=10,o.getBuffer(o.mime);case 10:s=e.sent;case 11:return e.abrupt("return",s.buffer);case 12:throw e.prev=12,c=e.catch(4),new k(`Error blurring image. (${c})`);case 13:case"end":return e.stop()}},e,null,[[1,3],[4,12]])})),function(e,t){return i.apply(this,arguments)})},{key:"present",value:function(e){if(!e.byteLength)return"";var t=new Uint8Array(e),r=Ee(t);if(!r)throw new k("Invalid file type.");return`<img src="data:${r};base64,${B(t)}">`}}]);var i}(qe);function Je(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Je=function(){return!!e})()}const et=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,Je()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Contain Image",e.module="Image",e.description="Scales an image to the specified width and height, maintaining the aspect ratio. The image may be letterboxed.",e.infoURL="",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.presentType="html",e.args=[{name:"Width",type:"number",value:100,min:1},{name:"Height",type:"number",value:100,min:1},{name:"Horizontal align",type:"option",value:["Left","Center","Right"],defaultIndex:1},{name:"Vertical align",type:"option",value:["Top","Middle","Bottom"],defaultIndex:1},{name:"Resizing algorithm",type:"option",value:["Nearest Neighbour","Bilinear","Bicubic","Hermite","Bezier"],defaultIndex:1},{name:"Opaque background",type:"boolean",value:!0}],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o,s,u,l,c,f,d,p,m,g,b,y;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=ie(r,6),i=n[0],a=n[1],o=n[2],s=n[3],u=n[4],l=n[5],c={"Nearest Neighbour":Qe.od.NEAREST_NEIGHBOR,Bilinear:Qe.od.BILINEAR,Bicubic:Qe.od.BICUBIC,Hermite:Qe.od.HERMITE,Bezier:Qe.od.BEZIER},f={Left:Qe.wq.LEFT,Center:Qe.wq.CENTER,Right:Qe.wq.RIGHT,Top:Qe.G4.TOP,Middle:Qe.G4.MIDDLE,Bottom:Qe.G4.BOTTOM},Ee(t)){e.next=1;break}throw new k("Invalid file type.");case 1:return e.prev=1,e.next=2,Qe.dK.read(t);case 2:d=e.sent,e.next=4;break;case 3:throw e.prev=3,b=e.catch(1),new k(`Error loading image. (${b})`);case 4:if(p=d.mime,e.prev=5,F()&&self.sendStatusMessage("Containing image..."),d.contain({w:i,h:a,align:f[o]|f[s],mode:c[u]}),l&&(m=new Qe.dK({width:i,height:a,color:255}),d=m.blit({src:d,x:0,y:0})),"image/gif"!==p){e.next=7;break}return e.next=6,d.getBuffer(Qe.pY.png);case 6:g=e.sent,e.next=9;break;case 7:return e.next=8,d.getBuffer(p);case 8:g=e.sent;case 9:return e.abrupt("return",g.buffer);case 10:throw e.prev=10,y=e.catch(5),new k(`Error containing image. (${y})`);case 11:case"end":return e.stop()}},e,null,[[1,3],[5,10]])})),function(e,t){return i.apply(this,arguments)})},{key:"present",value:function(e){if(!e.byteLength)return"";var t=new Uint8Array(e),r=Ee(t);if(!r)throw new k("Invalid file type.");return`<img src="data:${r};base64,${B(t)}">`}}]);var i}(qe);function tt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(tt=function(){return!!e})()}const rt=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,tt()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Convert Image Format",e.module="Image",e.description="Converts an image between different formats. Supported formats:<br><ul><li>Joint Photographic Experts Group (JPEG)</li><li>Portable Network Graphics (PNG)</li><li>Bitmap (BMP)</li><li>Tagged Image File Format (TIFF)</li></ul><br>Note: GIF files are supported for input, but cannot be outputted.",e.infoURL="https://wikipedia.org/wiki/Image_file_formats",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.presentType="html",e.args=[{name:"Output Format",type:"option",value:["JPEG","PNG","BMP","TIFF"]},{name:"JPEG Quality",type:"number",value:80,min:1,max:100},{name:"PNG Filter Type",type:"option",value:["Auto","None","Sub","Up","Average","Paeth"]},{name:"PNG Deflate Level",type:"number",value:9,min:0,max:9}],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o,s,u,l,c,f,d,p,m,g;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=ie(r,4),i=n[0],a=n[1],o=n[2],s=n[3],u={JPEG:Qe.pY.jpeg,PNG:Qe.pY.png,BMP:Qe.pY.bmp,TIFF:Qe.pY.tiff},l={Auto:Qe.ej.AUTO,None:Qe.ej.NONE,Sub:Qe.ej.SUB,Up:Qe.ej.UP,Average:Qe.ej.AVERAGE,Paeth:Qe.ej.PATH},c=u[i],Ee(t)){e.next=1;break}throw new k("Invalid file format.");case 1:return e.prev=1,e.next=2,Qe.dK.read(t);case 2:f=e.sent,e.next=4;break;case 3:throw e.prev=3,p=e.catch(1),new k(`Error opening image file. (${p})`);case 4:e.prev=4,m=c,e.next=m===Qe.pY.jpeg?5:m===Qe.pY.png?7:9;break;case 5:return e.next=6,f.getBuffer(c,{quality:a});case 6:case 8:case 10:return d=e.sent,e.abrupt("continue",11);case 7:return e.next=8,f.getBuffer(c,{filterType:l[o],deflateLevel:s});case 9:return e.next=10,f.getBuffer(c);case 11:return e.abrupt("return",d.buffer);case 12:throw e.prev=12,g=e.catch(4),new k(`Error converting image format. (${g})`);case 13:case"end":return e.stop()}},e,null,[[1,3],[4,12]])})),function(e,t){return i.apply(this,arguments)})},{key:"present",value:function(e){if(!e.byteLength)return"";var t=new Uint8Array(e),r=Ee(t);if(!r)throw new k("Invalid file type.");return`<img src="data:${r};base64,${B(t)}">`}}]);var i}(qe);function nt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(nt=function(){return!!e})()}const it=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,nt()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Cover Image",e.module="Image",e.description="Scales the image to the given width and height, keeping the aspect ratio. The image may be clipped.",e.infoURL="",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.presentType="html",e.args=[{name:"Width",type:"number",value:100,min:1},{name:"Height",type:"number",value:100,min:1},{name:"Horizontal align",type:"option",value:["Left","Center","Right"],defaultIndex:1},{name:"Vertical align",type:"option",value:["Top","Middle","Bottom"],defaultIndex:1},{name:"Resizing algorithm",type:"option",value:["Nearest Neighbour","Bilinear","Bicubic","Hermite","Bezier"],defaultIndex:1}],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o,s,u,l,c,f,d,p,m;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=ie(r,5),i=n[0],a=n[1],o=n[2],s=n[3],u=n[4],l={"Nearest Neighbour":Qe.od.NEAREST_NEIGHBOR,Bilinear:Qe.od.BILINEAR,Bicubic:Qe.od.BICUBIC,Hermite:Qe.od.HERMITE,Bezier:Qe.od.BEZIER},c={Left:Qe.wq.LEFT,Center:Qe.wq.CENTER,Right:Qe.wq.RIGHT,Top:Qe.G4.TOP,Middle:Qe.G4.MIDDLE,Bottom:Qe.G4.BOTTOM},Ee(t)){e.next=1;break}throw new k("Invalid file type.");case 1:return e.prev=1,e.next=2,Qe.dK.read(t);case 2:f=e.sent,e.next=4;break;case 3:throw e.prev=3,p=e.catch(1),new k(`Error loading image. (${p})`);case 4:if(e.prev=4,F()&&self.sendStatusMessage("Covering image..."),f.cover({w:i,h:a,align:c[o]|c[s],mode:l[u]}),"image/gif"!==f.mime){e.next=6;break}return e.next=5,f.getBuffer(Qe.pY.png);case 5:d=e.sent,e.next=8;break;case 6:return e.next=7,f.getBuffer(f.mime);case 7:d=e.sent;case 8:return e.abrupt("return",d.buffer);case 9:throw e.prev=9,m=e.catch(4),new k(`Error covering image. (${m})`);case 10:case"end":return e.stop()}},e,null,[[1,3],[4,9]])})),function(e,t){return i.apply(this,arguments)})},{key:"present",value:function(e){if(!e.byteLength)return"";var t=new Uint8Array(e),r=Ee(t);if(!r)throw new k("Invalid file type.");return`<img src="data:${r};base64,${B(t)}">`}}]);var i}(qe);function at(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(at=function(){return!!e})()}const ot=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,at()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Crop Image",e.module="Image",e.description="Crops an image to the specified region, or automatically crops edges.<br><br><b><u>Autocrop</u></b><br>Automatically crops same-colour borders from the image.<br><br><u>Autocrop tolerance</u><br>A percentage value for the tolerance of colour difference between pixels.<br><br><u>Only autocrop frames</u><br>Only crop real frames (all sides must have the same border)<br><br><u>Symmetric autocrop</u><br>Force autocrop to be symmetric (top/bottom and left/right are cropped by the same amount)<br><br><u>Autocrop keep border</u><br>The number of pixels of border to leave around the image.",e.infoURL="https://wikipedia.org/wiki/Cropping_(image)",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.presentType="html",e.args=[{name:"X Position",type:"number",value:0,min:0},{name:"Y Position",type:"number",value:0,min:0},{name:"Width",type:"number",value:10,min:1},{name:"Height",type:"number",value:10,min:1},{name:"Autocrop",type:"boolean",value:!1},{name:"Autocrop tolerance (%)",type:"number",value:.02,min:0,max:100,step:.01},{name:"Only autocrop frames",type:"boolean",value:!0},{name:"Symmetric autocrop",type:"boolean",value:!1},{name:"Autocrop keep border (px)",type:"number",value:0,min:0}],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o,s,u,l,c,f,d,p,m,g,b;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=ie(r,9),i=n[0],a=n[1],o=n[2],s=n[3],u=n[4],l=n[5],c=n[6],f=n[7],d=n[8],Ee(t)){e.next=1;break}throw new k("Invalid file type.");case 1:return e.prev=1,e.next=2,Qe.dK.read(t);case 2:p=e.sent,e.next=4;break;case 3:throw e.prev=3,g=e.catch(1),new k(`Error loading image. (${g})`);case 4:if(e.prev=4,F()&&self.sendStatusMessage("Cropping image..."),u?p.autocrop({tolerance:l/100,cropOnlyFrames:c,cropSymmetric:f,leaveBorder:d}):p.crop({x:i,y:a,w:o,h:s}),"image/gif"!==p.mime){e.next=6;break}return e.next=5,p.getBuffer(Qe.pY.png);case 5:m=e.sent,e.next=8;break;case 6:return e.next=7,p.getBuffer(p.mime);case 7:m=e.sent;case 8:return e.abrupt("return",m.buffer);case 9:throw e.prev=9,b=e.catch(4),new k(`Error cropping image. (${b})`);case 10:case"end":return e.stop()}},e,null,[[1,3],[4,9]])})),function(e,t){return i.apply(this,arguments)})},{key:"present",value:function(e){if(!e.byteLength)return"";var t=new Uint8Array(e),r=Ee(t);if(!r)throw new k("Invalid file type.");return`<img src="data:${r};base64,${B(t)}">`}}]);var i}(qe);function st(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(st=function(){return!!e})()}const ut=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,st()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Dither Image",e.module="Image",e.description="Apply a dither effect to an image.",e.infoURL="https://wikipedia.org/wiki/Dither",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.presentType="html",e.args=[],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(Ee(t)){e.next=1;break}throw new k("Invalid file type.");case 1:return e.prev=1,e.next=2,Qe.dK.read(t);case 2:n=e.sent,e.next=4;break;case 3:throw e.prev=3,a=e.catch(1),new k(`Error loading image. (${a})`);case 4:if(e.prev=4,F()&&self.sendStatusMessage("Applying dither to image..."),n.dither(),"image/gif"!==n.mime){e.next=6;break}return e.next=5,n.getBuffer(Qe.pY.png);case 5:i=e.sent,e.next=8;break;case 6:return e.next=7,n.getBuffer(n.mime);case 7:i=e.sent;case 8:return e.abrupt("return",i.buffer);case 9:throw e.prev=9,o=e.catch(4),new k(`Error applying dither to image. (${o})`);case 10:case"end":return e.stop()}},e,null,[[1,3],[4,9]])})),function(e,t){return i.apply(this,arguments)})},{key:"present",value:function(e){if(!e.byteLength)return"";var t=new Uint8Array(e),r=Ee(t);if(!r)throw new k("Invalid file type.");return`<img src="data:${r};base64,${B(t)}">`}}]);var i}(qe);var lt=__webpack_require__(87833),ct=__webpack_require__.n(lt);function ft(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ft=function(){return!!e})()}const ht=function(e){function t(){var e,n,i,a;return r(this,t),n=this,i=u(i=t),(e=s(n,ft()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="Extract EXIF",e.module="Image",e.description=["Extracts EXIF data from an image.","<br><br>","EXIF data is metadata embedded in images (JPEG, JPG, TIFF) and audio files.","<br><br>","EXIF data from photos usually contains information about the image file itself as well as the device used to create it."].join("\n"),e.infoURL="https://wikipedia.org/wiki/Exif",e.inputType="ArrayBuffer",e.outputType="string",e.args=[],e}return c(t,e),o(t,[{key:"run",value:function(e,t){try{var r=ct().create(e).parse(),n=[];for(var i in r.tags){var a=r.tags[i];n.push(`${i}: ${a}`)}var o=n.length;return n.unshift(`Found ${o} tags.\n`),n.join("\n")}catch(e){throw new k(`Could not extract EXIF data from image: ${e}`)}}}])}(qe);function dt(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return pt(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?pt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function pt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function mt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(mt=function(){return!!e})()}var gt=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,mt()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Extract LSB",e.module="Image",e.description="Extracts the Least Significant Bit data from each pixel in an image. This is a common way to hide data in Steganography.",e.infoURL="https://wikipedia.org/wiki/Bit_numbering#Least_significant_bit_in_digital_steganography",e.inputType="ArrayBuffer",e.outputType="byteArray",e.args=[{name:"Colour Pattern #1",type:"option",value:bt},{name:"Colour Pattern #2",type:"option",value:[""].concat(bt)},{name:"Colour Pattern #3",type:"option",value:[""].concat(bt)},{name:"Colour Pattern #4",type:"option",value:[""].concat(bt)},{name:"Pixel Order",type:"option",value:["Row","Column"]},{name:"Bit",type:"number",value:0}],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o,s,u,l,c,f,d,p,m,g,b,y,_,v,w,x;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(Ee(t)){e.next=1;break}throw new k("Please enter a valid image file.");case 1:return n=7-r.pop(),i=r.pop(),a=r.filter(function(e){return""!==e}).map(function(e){return bt.indexOf(e)}),e.next=2,Qe.dK.read(t);case 2:if(o=e.sent,s=o.bitmap.width,u=o.bitmap.height,l=o.bitmap.data,!(n<0||n>7)){e.next=3;break}throw new k("Error: Bit argument must be between 0 and 7");case 3:if(f="","Row"===i)for(c=0;c<l.length;c+=4){d=dt(a);try{for(d.s();!(p=d.n()).done;)m=p.value,f+=O.bin(l[c+m])[n]}catch(e){d.e(e)}finally{d.f()}}else for(b=4*s,y=0;y<s;y++)for(_=0;_<u;_++){g=_*b,v=dt(a);try{for(v.s();!(w=v.n()).done;)x=w.value,c=g+(y+4*x),f+=O.bin(l[c])[n]}catch(e){v.e(e)}finally{v.f()}}return e.abrupt("return",C(f));case 4:case"end":return e.stop()}},e)})),function(e,t){return i.apply(this,arguments)})}]);var i}(qe),bt=["R","G","B","A"];const yt=gt;var _t=[{name:"Comma",value:","},{name:"Space",value:" "},{name:"CRLF",value:"\\r\\n"},{name:"Line Feed",value:"\n"}];function vt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(vt=function(){return!!e})()}const wt=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,vt()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Extract RGBA",e.module="Image",e.description="Extracts each pixel's RGBA value in an image. These are sometimes used in Steganography to hide text or data.",e.infoURL="https://wikipedia.org/wiki/RGBA_color_space",e.inputType="ArrayBuffer",e.outputType="string",e.args=[{name:"Delimiter",type:"editableOption",value:_t},{name:"Include Alpha",type:"boolean",value:!0}],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(Ee(t)){e.next=1;break}throw new k("Please enter a valid image file.");case 1:return n=r[0],i=r[1],e.next=2,Qe.dK.read(t);case 2:return a=e.sent,o=a.bitmap.data,o=i?o:o.filter(function(e,t){return t%4!=3}),e.abrupt("return",o.join(n));case 3:case"end":return e.stop()}},e)})),function(e,t){return i.apply(this,arguments)})}]);var i}(qe);function xt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xt=function(){return!!e})()}const kt=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,xt()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Flip Image",e.module="Image",e.description="Flips an image along its X or Y axis.",e.infoURL="",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.presentType="html",e.args=[{name:"Axis",type:"option",value:["Horizontal","Vertical"]}],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o,s,u,l;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=ie(r,1),i=n[0],Ee(t)){e.next=1;break}throw new k("Invalid input file type.");case 1:return e.prev=1,e.next=2,Qe.dK.read(t);case 2:a=e.sent,e.next=4;break;case 3:throw e.prev=3,s=e.catch(1),new k(`Error loading image. (${s})`);case 4:e.prev=4,F()&&self.sendStatusMessage("Flipping image..."),u=i,e.next="Horizontal"===u?5:"Vertical"===u?6:7;break;case 5:return a.flip({horizontal:!0,vertical:!1}),e.abrupt("continue",7);case 6:return a.flip({horizontal:!1,vertical:!0}),e.abrupt("continue",7);case 7:if("image/gif"!==a.mime){e.next=9;break}return e.next=8,a.getBuffer(Qe.pY.png);case 8:o=e.sent,e.next=11;break;case 9:return e.next=10,a.getBuffer(a.mime);case 10:o=e.sent;case 11:return e.abrupt("return",o.buffer);case 12:throw e.prev=12,l=e.catch(4),new k(`Error flipping image. (${l})`);case 13:case"end":return e.stop()}},e,null,[[1,3],[4,12]])})),function(e,t){return i.apply(this,arguments)})},{key:"present",value:function(e){if(!e.byteLength)return"";var t=new Uint8Array(e),r=Ee(t);if(!r)throw new k("Invalid file type.");return`<img src="data:${r};base64,${B(t)}">`}}]);var i}(qe);function Bt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Bt=function(){return!!e})()}var Et=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,Bt()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Generate Image",e.module="Image",e.description="Generates an image using the input as pixel values.",e.infoURL="",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.presentType="html",e.args=[{name:"Mode",type:"option",value:["Greyscale","RG","RGB","RGBA","Bits"]},{name:"Pixel Scale Factor",type:"number",value:8},{name:"Pixels per row",type:"number",value:64}],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o,s,u,l,c,f,d,p,m,g,b,y,_,v,w,x,B,E,S,A,C,I,P,T,M;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=ie(r,3),i=n[0],a=n[1],o=n[2],t=new Uint8Array(t),!(a<=0)){e.next=1;break}throw new k("Pixel Scale Factor needs to be > 0");case 1:if(!(o<=0)){e.next=2;break}throw new k("Pixels per Row needs to be > 0");case 2:if(!((s={Greyscale:1,RG:2,RGB:3,RGBA:4,Bits:1/8}[i])>0&&t.length%s!==0)){e.next=3;break}throw new k(`Number of bytes is not a divisor of ${s}`);case 3:if(u=Math.ceil(t.length/s/o),l=new Qe.dK({width:o,height:u}),F()&&self.sendStatusMessage("Generating image from data..."),"Bits"!==i){e.next=4;break}for(c=0,f=0;f<t.length;f++)for(d=O.bin(t[f]),p=0;p<8;p++,c++)m=c%o,g=Math.floor(c/o),b="0"===d[p]?255:0,y=(0,Qe.rO)(b,b,b,255),l.setPixelColor(y,m,g);e.next=14;break;case 4:_=0;case 5:if(!(_<t.length)){e.next=14;break}w=(v=_/s)%o,x=Math.floor(v/o),B=0,E=0,S=0,A=255,P=i,e.next="Greyscale"===P?6:"RG"===P?7:"RGB"===P?8:"RGBA"===P?9:10;break;case 6:return B=E=S=t[_++],e.abrupt("continue",11);case 7:return B=t[_++],E=t[_++],e.abrupt("continue",11);case 8:return B=t[_++],E=t[_++],S=t[_++],e.abrupt("continue",11);case 9:return B=t[_++],E=t[_++],S=t[_++],A=t[_++],e.abrupt("continue",11);case 10:throw new k(`Unsupported Mode: (${i})`);case 11:e.prev=11,C=(0,Qe.rO)(B,E,S,A),l.setPixelColor(C,w,x),e.next=13;break;case 12:throw e.prev=12,T=e.catch(11),new k(`Error while generating image from pixel values. (${T})`);case 13:e.next=5;break;case 14:return 1!==a&&(F()&&self.sendStatusMessage("Scaling image..."),l.scaleToFit({w:o*a,h:u*a,mode:Qe.od.NEAREST_NEIGHBOR})),e.prev=15,e.next=16,l.getBuffer(Qe.pY.png);case 16:return I=e.sent,e.abrupt("return",I.buffer);case 17:throw e.prev=17,M=e.catch(15),new k(`Error generating image. (${M})`);case 18:case"end":return e.stop()}},e,null,[[11,12],[15,17]])})),function(e,t){return i.apply(this,arguments)})},{key:"present",value:function(e){if(!e.byteLength)return"";var t=new Uint8Array(e),r=Ee(t);if(!r)throw new k("Invalid file type.");return`<img src="data:${r};base64,${B(t)}">`}}]);var i}(qe);const St=Et;var At=__webpack_require__(66624),Ct=__webpack_require__.n(At),It=__webpack_require__(65235),Pt=__webpack_require__.n(It);function Tt(e,t){return Mt.apply(this,arguments)}function Mt(){return(Mt=t(h().mark(function e(t,r){var n,i,a,o,s;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=1,Qe.dK.read(t);case 1:n=e.sent,e.next=3;break;case 2:throw e.prev=2,a=e.catch(0),new k(`Error opening image. (${a})`);case 3:e.prev=3,r&&(n.greyscale(),n.normalize()),e.next=5;break;case 4:throw e.prev=4,o=e.catch(3),new k(`Error normalising image. (${o})`);case 5:return n.scan(function(e,t,r){0===n.bitmap.data[r+3]&&(n.bitmap.data[r+0]=255,n.bitmap.data[r+1]=255,n.bitmap.data[r+2]=255),n.bitmap.data[r+3]=255}),s=Qe.dK,e.next=6,n.getBuffer(Qe.pY.jpeg);case 6:return e.next=7,s.read.call(s,e.sent);case 7:if(n=e.sent,!(i=Ct()(new Uint8ClampedArray(n.bitmap.data),n.width,n.height))){e.next=8;break}return e.abrupt("return",i.data);case 8:throw new k("Could not read a QR code from the image.");case 9:case"end":return e.stop()}},e,null,[[0,2],[3,4]])}))).apply(this,arguments)}function Rt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Rt=function(){return!!e})()}const Ft=function(e){function t(){var e,n,i,a;return r(this,t),n=this,i=u(i=t),(e=s(n,Rt()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="Generate QR Code",e.module="Image",e.description="Generates a Quick Response (QR) code from the input text.<br><br>A QR code is a type of matrix barcode (or two-dimensional barcode) first designed in 1994 for the automotive industry in Japan. A barcode is a machine-readable optical label that contains information about the item to which it is attached.",e.infoURL="https://wikipedia.org/wiki/QR_code",e.inputType="string",e.outputType="ArrayBuffer",e.presentType="html",e.args=[{name:"Image Format",type:"option",value:["PNG","SVG","EPS","PDF"]},{name:"Module size (px)",type:"number",value:5,min:1},{name:"Margin (num modules)",type:"number",value:4,min:0},{name:"Error correction",type:"option",value:["Low","Medium","Quartile","High"],defaultIndex:1}],e}return c(t,e),o(t,[{key:"run",value:function(e,t){var r=ie(t,4);return function(e,t,r,n,i){var a;if(!["SVG","EPS","PDF","PNG"].includes(t.toUpperCase()))throw new k("Unsupported QR code format.");try{a=Pt().imageSync(e,{type:t,size:r,margin:n,ec_level:i.charAt(0).toUpperCase()})}catch(e){throw new k(`Error generating QR code. (${e})`)}if(!a)throw new k("Error generating QR code.");switch(t){case"SVG":case"EPS":case"PDF":return O.strToArrayBuffer(a);case"PNG":return a.buffer.slice(a.byteOffset,a.byteLength+a.byteOffset);default:throw new k("Unsupported QR code format.")}}(e,r[0],r[1],r[2],r[3])}},{key:"present",value:function(e,t){if(!e.byteLength&&!e.length)return"";var r=new Uint8Array(e);if("PNG"===ie(t,1)[0]){var n=Ee(r);if(!n)throw new k("Invalid file type.");return`<img src="data:${n};base64,${B(r)}">`}return O.arrayBufferToStr(e)}}])}(qe);function Ot(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ot=function(){return!!e})()}const Nt=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,Ot()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Image Brightness / Contrast",e.module="Image",e.description="Adjust the brightness or contrast of an image.",e.infoURL="",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.presentType="html",e.args=[{name:"Brightness",type:"number",value:0,min:-100,max:100},{name:"Contrast",type:"number",value:0,min:-100,max:100}],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o,s,u,l;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=ie(r,2),i=n[0],a=n[1],Ee(t)){e.next=1;break}throw new k("Invalid file type.");case 1:return e.prev=1,e.next=2,Qe.dK.read(t);case 2:o=e.sent,e.next=4;break;case 3:throw e.prev=3,u=e.catch(1),new k(`Error loading image. (${u})`);case 4:if(e.prev=4,0!==i&&(F()&&self.sendStatusMessage("Changing image brightness..."),o.brightness(i/100)),0!==a&&(F()&&self.sendStatusMessage("Changing image contrast..."),o.contrast(a/100)),"image/gif"!==o.mime){e.next=6;break}return e.next=5,o.getBuffer(Qe.pY.png);case 5:s=e.sent,e.next=8;break;case 6:return e.next=7,o.getBuffer(o.mime);case 7:s=e.sent;case 8:return e.abrupt("return",s.buffer);case 9:throw e.prev=9,l=e.catch(4),new k(`Error adjusting image brightness or contrast. (${l})`);case 10:case"end":return e.stop()}},e,null,[[1,3],[4,9]])})),function(e,t){return i.apply(this,arguments)})},{key:"present",value:function(e){if(!e.byteLength)return"";var t=new Uint8Array(e),r=Ee(t);if(!r)throw new k("Invalid file type.");return`<img src="data:${r};base64,${B(t)}">`}}]);var i}(qe);function Lt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Lt=function(){return!!e})()}const Dt=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,Lt()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Image Filter",e.module="Image",e.description="Applies a greyscale or sepia filter to an image.",e.infoURL="",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.presentType="html",e.args=[{name:"Filter type",type:"option",value:["Greyscale","Sepia"]}],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o,s,u;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=ie(r,1),i=n[0],Ee(t)){e.next=1;break}throw new k("Invalid file type.");case 1:return e.prev=1,e.next=2,Qe.dK.read(t);case 2:a=e.sent,e.next=4;break;case 3:throw e.prev=3,s=e.catch(1),new k(`Error loading image. (${s})`);case 4:if(e.prev=4,F()&&self.sendStatusMessage("Applying "+i.toLowerCase()+" filter to image..."),"Greyscale"===i?a.greyscale():a.sepia(),"image/gif"!==a.mime){e.next=6;break}return e.next=5,a.getBuffer(Qe.pY.png);case 5:o=e.sent,e.next=8;break;case 6:return e.next=7,a.getBuffer(a.mime);case 7:o=e.sent;case 8:return e.abrupt("return",o.buffer);case 9:throw e.prev=9,u=e.catch(4),new k(`Error applying filter to image. (${u})`);case 10:case"end":return e.stop()}},e,null,[[1,3],[4,9]])})),function(e,t){return i.apply(this,arguments)})},{key:"present",value:function(e){if(!e.byteLength)return"";var t=new Uint8Array(e),r=Ee(t);if(!r)throw new k("Invalid file type.");return`<img src="data:${r};base64,${B(t)}">`}}]);var i}(qe);function zt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(zt=function(){return!!e})()}const Ut=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,zt()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Image Hue/Saturation/Lightness",e.module="Image",e.description="Adjusts the hue / saturation / lightness (HSL) values of an image.",e.infoURL="",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.presentType="html",e.args=[{name:"Hue",type:"number",value:0,min:-360,max:360},{name:"Saturation",type:"number",value:0,min:-100,max:100},{name:"Lightness",type:"number",value:0,min:-100,max:100}],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o,s,u,l,c;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=ie(r,3),i=n[0],a=n[1],o=n[2],Ee(t)){e.next=1;break}throw new k("Invalid file type.");case 1:return e.prev=1,e.next=2,Qe.dK.read(t);case 2:s=e.sent,e.next=4;break;case 3:throw e.prev=3,l=e.catch(1),new k(`Error loading image. (${l})`);case 4:if(e.prev=4,0!==i&&(F()&&self.sendStatusMessage("Changing image hue..."),s.color([{apply:"hue",params:[i]}])),0!==a&&(F()&&self.sendStatusMessage("Changing image saturation..."),s.color([{apply:"saturate",params:[a]}])),0!==o&&(F()&&self.sendStatusMessage("Changing image lightness..."),s.color([{apply:"lighten",params:[o]}])),"image/gif"!==s.mime){e.next=6;break}return e.next=5,s.getBuffer(Qe.pY.png);case 5:u=e.sent,e.next=8;break;case 6:return e.next=7,s.getBuffer(s.mime);case 7:u=e.sent;case 8:return e.abrupt("return",u.buffer);case 9:throw e.prev=9,c=e.catch(4),new k(`Error adjusting image hue / saturation / lightness. (${c})`);case 10:case"end":return e.stop()}},e,null,[[1,3],[4,9]])})),function(e,t){return i.apply(this,arguments)})},{key:"present",value:function(e){if(!e.byteLength)return"";var t=new Uint8Array(e),r=Ee(t);if(!r)throw new k("Invalid file type.");return`<img src="data:${r};base64,${B(t)}">`}}]);var i}(qe);function $t(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($t=function(){return!!e})()}const jt=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,$t()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Image Opacity",e.module="Image",e.description="Adjust the opacity of an image.",e.infoURL="",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.presentType="html",e.args=[{name:"Opacity (%)",type:"number",value:100,min:0,max:100}],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o,s,u;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=ie(r,1),i=n[0],Ee(t)){e.next=1;break}throw new k("Invalid file type.");case 1:return e.prev=1,e.next=2,Qe.dK.read(t);case 2:a=e.sent,e.next=4;break;case 3:throw e.prev=3,s=e.catch(1),new k(`Error loading image. (${s})`);case 4:if(e.prev=4,F()&&self.sendStatusMessage("Changing image opacity..."),a.opacity(i/100),"image/gif"!==a.mime){e.next=6;break}return e.next=5,a.getBuffer(Qe.pY.png);case 5:o=e.sent,e.next=8;break;case 6:return e.next=7,a.getBuffer(a.mime);case 7:o=e.sent;case 8:return e.abrupt("return",o.buffer);case 9:throw e.prev=9,u=e.catch(4),new k(`Error changing image opacity. (${u})`);case 10:case"end":return e.stop()}},e,null,[[1,3],[4,9]])})),function(e,t){return i.apply(this,arguments)})},{key:"present",value:function(e){if(!e.byteLength)return"";var t=new Uint8Array(e),r=Ee(t);if(!r)throw new k("Invalid file type.");return`<img src="data:${r};base64,${B(t)}">`}}]);var i}(qe);function Zt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Zt=function(){return!!e})()}const Gt=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,Zt()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Invert Image",e.module="Image",e.description="Invert the colours of an image.",e.infoURL="",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.presentType="html",e.args=[],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(Ee(t)){e.next=1;break}throw new k("Invalid input file format.");case 1:return e.prev=1,e.next=2,Qe.dK.read(t);case 2:n=e.sent,e.next=4;break;case 3:throw e.prev=3,a=e.catch(1),new k(`Error loading image. (${a})`);case 4:if(e.prev=4,F()&&self.sendStatusMessage("Inverting image..."),n.invert(),"image/gif"!==n.mime){e.next=6;break}return e.next=5,n.getBuffer(Qe.pY.png);case 5:i=e.sent,e.next=8;break;case 6:return e.next=7,n.getBuffer(n.mime);case 7:i=e.sent;case 8:return e.abrupt("return",i.buffer);case 9:throw e.prev=9,o=e.catch(4),new k(`Error inverting image. (${o})`);case 10:case"end":return e.stop()}},e,null,[[1,3],[4,9]])})),function(e,t){return i.apply(this,arguments)})},{key:"present",value:function(e){if(!e.byteLength)return"";var t=new Uint8Array(e),r=Ee(t);if(!r)throw new k("Invalid file type.");return`<img src="data:${r};base64,${B(t)}">`}}]);var i}(qe);function Wt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Wt=function(){return!!e})()}const Ht=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,Wt()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Normalise Image",e.module="Image",e.description="Normalise the image colours.",e.infoURL="",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.presentType="html",e.args=[],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(Ee(t)){e.next=1;break}throw new k("Invalid file type.");case 1:return e.prev=1,e.next=2,Qe.dK.read(t);case 2:n=e.sent,e.next=4;break;case 3:throw e.prev=3,a=e.catch(1),new k(`Error opening image file. (${a})`);case 4:if(e.prev=4,n.normalize(),"image/gif"!==n.mime){e.next=6;break}return e.next=5,n.getBuffer(Qe.pY.png);case 5:i=e.sent,e.next=8;break;case 6:return e.next=7,n.getBuffer(n.mime);case 7:i=e.sent;case 8:return e.abrupt("return",i.buffer);case 9:throw e.prev=9,o=e.catch(4),new k(`Error normalising image. (${o})`);case 10:case"end":return e.stop()}},e,null,[[1,3],[4,9]])})),function(e,t){return i.apply(this,arguments)})},{key:"present",value:function(e){if(!e.byteLength)return"";var t=new Uint8Array(e),r=Ee(t);if(!r)throw new k("Invalid file type.");return`<img src="data:${r};base64,${B(t)}">`}}]);var i}(qe);function qt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(qt=function(){return!!e})()}const Qt=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,qt()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Parse QR Code",e.module="Image",e.description="Reads an image file and attempts to detect and read a Quick Response (QR) code from the image.<br><br><u>Normalise Image</u><br>Attempts to normalise the image before parsing it to improve detection of a QR code.",e.infoURL="https://wikipedia.org/wiki/QR_code",e.inputType="ArrayBuffer",e.outputType="string",e.args=[{name:"Normalise image",type:"boolean",value:!1}],e.checks=[{pattern:"^(?:\\xff\\xd8\\xff|\\x89\\x50\\x4e\\x47|\\x47\\x49\\x46|.{8}\\x57\\x45\\x42\\x50|\\x42\\x4d)",flags:"",args:[!1],useful:!0}],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=ie(r,1),i=n[0],Ee(t)){e.next=1;break}throw new k("Invalid file type.");case 1:return e.abrupt("return",Tt(t,i));case 2:case"end":return e.stop()}},e)})),function(e,t){return i.apply(this,arguments)})}]);var i}(qe);function Vt(){return Vt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},Vt.apply(null,arguments)}const Yt=function(){return o(function e(t){r(this,e),this.unitSize=4,this.unitOrder=0,this.blockSize=16,this.blockSizeInBytes=this.blockSize*this.unitSize,this.options=t||{},this.reset()},[{key:"reset",value:function(){this.state={},this.state.message="",this.state.length=0}},{key:"getState",value:function(){return JSON.parse(JSON.stringify(this.state))}},{key:"setState",value:function(e){this.state=e}},{key:"update",value:function(e){this.state.message+=e,this.state.length+=e.length,this.process()}},{key:"process",value:function(){}},{key:"finalize",value:function(){return""}},{key:"getStateHash",value:function(e){return""}},{key:"addPaddingPKCS7",value:function(e){this.state.message+=new Array(e+1).join(String.fromCharCode(e))}},{key:"addPaddingISO7816",value:function(e){this.state.message+=""+new Array(e).join("\0")}},{key:"addPaddingZero",value:function(e){this.state.message+=new Array(e+1).join("\0")}}])}();function Kt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Kt=function(){return!!e})()}var Xt=function(e){function t(e){var n,i,a,o;return r(this,t),i=this,o=[e],a=u(a=t),(n=s(i,Kt()?Reflect.construct(a,o||[],u(i).constructor):a.apply(i,o))).blockUnits=[],n}return c(t,e),o(t,[{key:"process",value:function(){for(;this.state.message.length>=this.blockSizeInBytes;){this.blockUnits=[];for(var e=0;e<this.blockSizeInBytes;e+=4)this.blockUnits.push(this.state.message.charCodeAt(e)|this.state.message.charCodeAt(e+1)<<8|this.state.message.charCodeAt(e+2)<<16|this.state.message.charCodeAt(e+3)<<24);this.state.message=this.state.message.substr(this.blockSizeInBytes),this.processBlock(this.blockUnits)}}},{key:"processBlock",value:function(e){}},{key:"getStateHash",value:function(e){e=e||this.state.hash.length;for(var t="",r=0;r<e;r++)t+=String.fromCharCode(255&this.state.hash[r])+String.fromCharCode(this.state.hash[r]>>8&255)+String.fromCharCode(this.state.hash[r]>>16&255)+String.fromCharCode(this.state.hash[r]>>24&255);return t}},{key:"addLengthBits",value:function(){this.state.message+=String.fromCharCode(this.state.length<<3&255)+String.fromCharCode(this.state.length>>5&255)+String.fromCharCode(this.state.length>>13&255)+String.fromCharCode(this.state.length>>21&255)+String.fromCharCode(this.state.length>>29&255)+"\0\0\0"}}])}(Yt);const Jt=Xt;function er(e,t){return e<<t|e>>>32-t}function tr(e,t){return e>>>t|e<<32-t}function rr(e,t,r){return 32===r?t:r>32?rr(t,e,r-32):4294967295&(e>>>r|t<<32-r)}function nr(e,t,r){return 32===r?e:r>32?nr(t,e,r-32):4294967295&(t>>>r|e<<32-r)}function ir(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(ir=function(){return!!e})()}var ar=[0,1518500249,1859775393,2400959708],or=[5,11,7,15,6,13,8,14,7,12,9,11,8,15,6,12,9,14,5,13],sr=[10,17,25,30],ur=[18,0,1,2,3,19,4,5,6,7,16,8,9,10,11,17,12,13,14,15,22,3,6,9,12,23,15,2,5,8,20,11,14,1,4,21,7,10,13,0,26,12,5,14,7,27,0,9,2,11,24,4,13,6,15,25,8,1,10,3,30,7,2,13,8,31,3,14,9,4,28,15,10,5,0,29,11,6,1,12],lr=function(e){function t(e){var n,i,a,o;return r(this,t),i=this,o=[e],a=u(a=t),(n=s(i,ir()?Reflect.construct(a,o||[],u(i).constructor):a.apply(i,o))).options.rounds=n.options.rounds||80,n.W=new Array(32),n}return c(t,e),o(t,[{key:"reset",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=Vt(u(1&3?e.prototype:e),"reset",r))?function(e){return n.apply(r,e)}:n)([]),this.state.hash=[1732584193,4023233417,2562383102,271733878,3285377520]}},{key:"processBlock",value:function(e){for(var t=0|this.state.hash[0],r=0|this.state.hash[1],n=0|this.state.hash[2],i=0|this.state.hash[3],a=0|this.state.hash[4],o=0;o<16;o++)this.W[o]=0|e[o];this.W[16]=this.W[0]^this.W[1]^this.W[2]^this.W[3]|0,this.W[17]=this.W[4]^this.W[5]^this.W[6]^this.W[7]|0,this.W[18]=this.W[8]^this.W[9]^this.W[10]^this.W[11]|0,this.W[19]=this.W[12]^this.W[13]^this.W[14]^this.W[15]|0,this.W[20]=this.W[3]^this.W[6]^this.W[9]^this.W[12]|0,this.W[21]=this.W[2]^this.W[5]^this.W[8]^this.W[15]|0,this.W[22]=this.W[1]^this.W[4]^this.W[11]^this.W[14]|0,this.W[23]=this.W[0]^this.W[7]^this.W[10]^this.W[13]|0,this.W[24]=this.W[5]^this.W[7]^this.W[12]^this.W[14]|0,this.W[25]=this.W[0]^this.W[2]^this.W[9]^this.W[11]|0,this.W[26]=this.W[4]^this.W[6]^this.W[13]^this.W[15]|0,this.W[27]=this.W[1]^this.W[3]^this.W[8]^this.W[10]|0,this.W[28]=this.W[2]^this.W[7]^this.W[8]^this.W[13]|0,this.W[29]=this.W[3]^this.W[4]^this.W[9]^this.W[14]|0,this.W[30]=this.W[0]^this.W[5]^this.W[10]^this.W[15]|0,this.W[31]=this.W[1]^this.W[6]^this.W[11]^this.W[12]|0;for(var s=0;s<this.options.rounds;s++){var u=er(t,or[s%20])+a+this.W[ur[s]]+ar[s/20|0]|0;u=s<20?u+(r&n|~r&i)|0:s<40?u+(r^n^i)|0:s<60?u+(n^(r|~i))|0:u+(r^n^i)|0,a=i,i=n,n=0|er(r,sr[s/20|0]),r=t,t=u}this.state.hash[0]=this.state.hash[0]+t|0,this.state.hash[1]=this.state.hash[1]+r|0,this.state.hash[2]=this.state.hash[2]+n|0,this.state.hash[3]=this.state.hash[3]+i|0,this.state.hash[4]=this.state.hash[4]+a|0}},{key:"finalize",value:function(){return this.addPaddingISO7816(this.state.message.length<56?56-this.state.message.length|0:120-this.state.message.length|0),this.addLengthBits(),this.process(),this.getStateHash()}}])}(Jt);const cr=lr;function fr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(fr=function(){return!!e})()}var hr=function(e){function t(e){var n,i,a,o;return r(this,t),i=this,o=[e],a=u(a=t),(n=s(i,fr()?Reflect.construct(a,o||[],u(i).constructor):a.apply(i,o))).unitSize=1,n.blockSizeInBytes=n.blockSize*n.unitSize,n.blockUnits=[],n}return c(t,e),o(t,[{key:"process",value:function(){for(;this.state.message.length>=this.blockSizeInBytes;){this.blockUnits=new Array(this.blockSizeInBytes);for(var e=0;e<this.blockSizeInBytes;e++)this.blockUnits[e]=0|this.state.message.charCodeAt(e);this.state.message=this.state.message.substr(this.blockSizeInBytes),this.processBlock(this.blockUnits)}}},{key:"processBlock",value:function(e){}},{key:"getStateHash",value:function(e){e=e||this.state.hash.length;for(var t="",r=0;r<e;r++)t+=String.fromCharCode(255&this.state.hash[r]);return t}}])}(Yt);function dr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(dr=function(){return!!e})()}var pr=[41,46,67,201,162,216,124,1,61,54,84,161,236,240,6,19,98,167,5,243,192,199,115,140,152,147,43,217,188,76,130,202,30,155,87,60,253,212,224,22,103,66,111,24,138,23,229,18,190,78,196,214,218,158,222,73,160,251,245,142,187,47,238,122,169,104,121,145,21,178,7,63,148,194,16,137,11,34,95,33,128,127,93,154,90,144,50,39,53,62,204,231,191,247,151,3,255,25,48,179,72,165,181,209,215,94,146,42,172,86,170,198,79,184,56,210,150,164,125,182,118,252,107,226,156,116,4,241,69,157,112,89,100,113,135,32,134,91,207,101,230,45,168,2,27,96,37,173,174,176,185,246,28,70,97,105,52,64,126,15,85,71,163,35,221,81,175,58,195,92,249,206,186,197,234,38,44,83,13,110,133,40,132,9,211,223,205,244,65,129,77,82,106,220,55,200,108,193,171,250,36,225,123,8,12,189,177,74,120,136,149,139,227,99,232,109,233,203,213,254,59,0,29,57,242,239,183,14,102,88,208,228,166,119,114,248,235,117,75,10,49,68,80,180,143,237,31,26,219,153,141,51,159,17,131,20],mr=function(e){function t(e){var n,i,a,o;return r(this,t),i=this,o=[e],a=u(a=t),(n=s(i,dr()?Reflect.construct(a,o||[],u(i).constructor):a.apply(i,o))).options.rounds=n.options.rounds||18,n}return c(t,e),o(t,[{key:"reset",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=Vt(u(1&3?e.prototype:e),"reset",r))?function(e){return n.apply(r,e)}:n)([]),this.state.hash=new Array(48),this.state.checksum=new Array(16)}},{key:"processBlock",value:function(e){for(var t=0;t<16;t++)this.state.hash[16+t]=0|e[t],this.state.hash[32+t]=e[t]^this.state.hash[t];for(var r=0,n=0;n<this.options.rounds;n++){for(var i=0;i<48;i++)r=this.state.hash[i]^=pr[r];r=r+n&255}r=255&this.state.checksum[15];for(var a=0;a<16;a++)r=this.state.checksum[a]^=pr[e[a]^r]}},{key:"finalize",value:function(){this.addPaddingPKCS7(16-(15&this.state.message.length)|0),this.process();for(var e=0;e<16;e++)this.state.message+=String.fromCharCode(this.state.checksum[e]);return this.process(),this.getStateHash(16)}}])}(hr);const gr=mr;function br(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(br=function(){return!!e})()}var yr=[[3,7,11,19],[3,5,9,13],[3,9,11,15]],_r=1518500249,vr=1859775393;const wr=function(e){function t(){return r(this,t),e=this,i=arguments,n=u(n=t),s(e,br()?Reflect.construct(n,i||[],u(e).constructor):n.apply(e,i));var e,n,i}return c(t,e),o(t,[{key:"reset",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=Vt(u(1&3?e.prototype:e),"reset",r))?function(e){return n.apply(r,e)}:n)([]),this.state.hash=[1732584193,-271733879,-1732584194,271733878]}},{key:"processBlock",value:function(e){var r=0|this.state.hash[0],n=0|this.state.hash[1],i=0|this.state.hash[2],a=0|this.state.hash[3];r=t.CC(t.FF,0,r,n,i,a,e[0],yr[0][0]),a=t.CC(t.FF,0,a,r,n,i,e[1],yr[0][1]),i=t.CC(t.FF,0,i,a,r,n,e[2],yr[0][2]),n=t.CC(t.FF,0,n,i,a,r,e[3],yr[0][3]),r=t.CC(t.FF,0,r,n,i,a,e[4],yr[0][0]),a=t.CC(t.FF,0,a,r,n,i,e[5],yr[0][1]),i=t.CC(t.FF,0,i,a,r,n,e[6],yr[0][2]),n=t.CC(t.FF,0,n,i,a,r,e[7],yr[0][3]),r=t.CC(t.FF,0,r,n,i,a,e[8],yr[0][0]),a=t.CC(t.FF,0,a,r,n,i,e[9],yr[0][1]),i=t.CC(t.FF,0,i,a,r,n,e[10],yr[0][2]),n=t.CC(t.FF,0,n,i,a,r,e[11],yr[0][3]),r=t.CC(t.FF,0,r,n,i,a,e[12],yr[0][0]),a=t.CC(t.FF,0,a,r,n,i,e[13],yr[0][1]),i=t.CC(t.FF,0,i,a,r,n,e[14],yr[0][2]),n=t.CC(t.FF,0,n,i,a,r,e[15],yr[0][3]),r=t.CC(t.GG,_r,r,n,i,a,e[0],yr[1][0]),a=t.CC(t.GG,_r,a,r,n,i,e[4],yr[1][1]),i=t.CC(t.GG,_r,i,a,r,n,e[8],yr[1][2]),n=t.CC(t.GG,_r,n,i,a,r,e[12],yr[1][3]),r=t.CC(t.GG,_r,r,n,i,a,e[1],yr[1][0]),a=t.CC(t.GG,_r,a,r,n,i,e[5],yr[1][1]),i=t.CC(t.GG,_r,i,a,r,n,e[9],yr[1][2]),n=t.CC(t.GG,_r,n,i,a,r,e[13],yr[1][3]),r=t.CC(t.GG,_r,r,n,i,a,e[2],yr[1][0]),a=t.CC(t.GG,_r,a,r,n,i,e[6],yr[1][1]),i=t.CC(t.GG,_r,i,a,r,n,e[10],yr[1][2]),n=t.CC(t.GG,_r,n,i,a,r,e[14],yr[1][3]),r=t.CC(t.GG,_r,r,n,i,a,e[3],yr[1][0]),a=t.CC(t.GG,_r,a,r,n,i,e[7],yr[1][1]),i=t.CC(t.GG,_r,i,a,r,n,e[11],yr[1][2]),n=t.CC(t.GG,_r,n,i,a,r,e[15],yr[1][3]),r=t.CC(t.HH,vr,r,n,i,a,e[0],yr[2][0]),a=t.CC(t.HH,vr,a,r,n,i,e[8],yr[2][1]),i=t.CC(t.HH,vr,i,a,r,n,e[4],yr[2][2]),n=t.CC(t.HH,vr,n,i,a,r,e[12],yr[2][3]),r=t.CC(t.HH,vr,r,n,i,a,e[2],yr[2][0]),a=t.CC(t.HH,vr,a,r,n,i,e[10],yr[2][1]),i=t.CC(t.HH,vr,i,a,r,n,e[6],yr[2][2]),n=t.CC(t.HH,vr,n,i,a,r,e[14],yr[2][3]),r=t.CC(t.HH,vr,r,n,i,a,e[1],yr[2][0]),a=t.CC(t.HH,vr,a,r,n,i,e[9],yr[2][1]),i=t.CC(t.HH,vr,i,a,r,n,e[5],yr[2][2]),n=t.CC(t.HH,vr,n,i,a,r,e[13],yr[2][3]),r=t.CC(t.HH,vr,r,n,i,a,e[3],yr[2][0]),a=t.CC(t.HH,vr,a,r,n,i,e[11],yr[2][1]),i=t.CC(t.HH,vr,i,a,r,n,e[7],yr[2][2]),n=t.CC(t.HH,vr,n,i,a,r,e[15],yr[2][3]),this.state.hash=[this.state.hash[0]+r|0,this.state.hash[1]+n|0,this.state.hash[2]+i|0,this.state.hash[3]+a|0]}},{key:"finalize",value:function(){return this.addPaddingISO7816(this.state.message.length<56?56-this.state.message.length|0:120-this.state.message.length|0),this.addLengthBits(),this.process(),this.getStateHash()}}],[{key:"FF",value:function(e,t,r){return e&t|~e&r}},{key:"GG",value:function(e,t,r){return e&t|e&r|t&r}},{key:"HH",value:function(e,t,r){return e^t^r}},{key:"CC",value:function(e,t,r,n,i,a,o,s){return 0|er(r+e(n,i,a)+o+t,s)}}])}(Jt);function xr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(xr=function(){return!!e})()}for(var kr=[[7,12,17,22],[5,9,14,20],[4,11,16,23],[6,10,15,21]],Br=new Array(64),Er=0;Er<64;Er++)Br[Er]=4294967296*Math.abs(Math.sin(Er+1))|0;const Sr=function(e){function t(){return r(this,t),e=this,i=arguments,n=u(n=t),s(e,xr()?Reflect.construct(n,i||[],u(e).constructor):n.apply(e,i));var e,n,i}return c(t,e),o(t,[{key:"reset",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=Vt(u(1&3?e.prototype:e),"reset",r))?function(e){return n.apply(r,e)}:n)([]),this.state.hash=[1732584193,-271733879,-1732584194,271733878]}},{key:"processBlock",value:function(e){var r=0|this.state.hash[0],n=0|this.state.hash[1],i=0|this.state.hash[2],a=0|this.state.hash[3];r=t.CC(t.FF,Br[0],r,n,i,a,e[0],kr[0][0]),a=t.CC(t.FF,Br[1],a,r,n,i,e[1],kr[0][1]),i=t.CC(t.FF,Br[2],i,a,r,n,e[2],kr[0][2]),n=t.CC(t.FF,Br[3],n,i,a,r,e[3],kr[0][3]),r=t.CC(t.FF,Br[4],r,n,i,a,e[4],kr[0][0]),a=t.CC(t.FF,Br[5],a,r,n,i,e[5],kr[0][1]),i=t.CC(t.FF,Br[6],i,a,r,n,e[6],kr[0][2]),n=t.CC(t.FF,Br[7],n,i,a,r,e[7],kr[0][3]),r=t.CC(t.FF,Br[8],r,n,i,a,e[8],kr[0][0]),a=t.CC(t.FF,Br[9],a,r,n,i,e[9],kr[0][1]),i=t.CC(t.FF,Br[10],i,a,r,n,e[10],kr[0][2]),n=t.CC(t.FF,Br[11],n,i,a,r,e[11],kr[0][3]),r=t.CC(t.FF,Br[12],r,n,i,a,e[12],kr[0][0]),a=t.CC(t.FF,Br[13],a,r,n,i,e[13],kr[0][1]),i=t.CC(t.FF,Br[14],i,a,r,n,e[14],kr[0][2]),n=t.CC(t.FF,Br[15],n,i,a,r,e[15],kr[0][3]),r=t.CC(t.GG,Br[16],r,n,i,a,e[1],kr[1][0]),a=t.CC(t.GG,Br[17],a,r,n,i,e[6],kr[1][1]),i=t.CC(t.GG,Br[18],i,a,r,n,e[11],kr[1][2]),n=t.CC(t.GG,Br[19],n,i,a,r,e[0],kr[1][3]),r=t.CC(t.GG,Br[20],r,n,i,a,e[5],kr[1][0]),a=t.CC(t.GG,Br[21],a,r,n,i,e[10],kr[1][1]),i=t.CC(t.GG,Br[22],i,a,r,n,e[15],kr[1][2]),n=t.CC(t.GG,Br[23],n,i,a,r,e[4],kr[1][3]),r=t.CC(t.GG,Br[24],r,n,i,a,e[9],kr[1][0]),a=t.CC(t.GG,Br[25],a,r,n,i,e[14],kr[1][1]),i=t.CC(t.GG,Br[26],i,a,r,n,e[3],kr[1][2]),n=t.CC(t.GG,Br[27],n,i,a,r,e[8],kr[1][3]),r=t.CC(t.GG,Br[28],r,n,i,a,e[13],kr[1][0]),a=t.CC(t.GG,Br[29],a,r,n,i,e[2],kr[1][1]),i=t.CC(t.GG,Br[30],i,a,r,n,e[7],kr[1][2]),n=t.CC(t.GG,Br[31],n,i,a,r,e[12],kr[1][3]),r=t.CC(t.HH,Br[32],r,n,i,a,e[5],kr[2][0]),a=t.CC(t.HH,Br[33],a,r,n,i,e[8],kr[2][1]),i=t.CC(t.HH,Br[34],i,a,r,n,e[11],kr[2][2]),n=t.CC(t.HH,Br[35],n,i,a,r,e[14],kr[2][3]),r=t.CC(t.HH,Br[36],r,n,i,a,e[1],kr[2][0]),a=t.CC(t.HH,Br[37],a,r,n,i,e[4],kr[2][1]),i=t.CC(t.HH,Br[38],i,a,r,n,e[7],kr[2][2]),n=t.CC(t.HH,Br[39],n,i,a,r,e[10],kr[2][3]),r=t.CC(t.HH,Br[40],r,n,i,a,e[13],kr[2][0]),a=t.CC(t.HH,Br[41],a,r,n,i,e[0],kr[2][1]),i=t.CC(t.HH,Br[42],i,a,r,n,e[3],kr[2][2]),n=t.CC(t.HH,Br[43],n,i,a,r,e[6],kr[2][3]),r=t.CC(t.HH,Br[44],r,n,i,a,e[9],kr[2][0]),a=t.CC(t.HH,Br[45],a,r,n,i,e[12],kr[2][1]),i=t.CC(t.HH,Br[46],i,a,r,n,e[15],kr[2][2]),n=t.CC(t.HH,Br[47],n,i,a,r,e[2],kr[2][3]),r=t.CC(t.II,Br[48],r,n,i,a,e[0],kr[3][0]),a=t.CC(t.II,Br[49],a,r,n,i,e[7],kr[3][1]),i=t.CC(t.II,Br[50],i,a,r,n,e[14],kr[3][2]),n=t.CC(t.II,Br[51],n,i,a,r,e[5],kr[3][3]),r=t.CC(t.II,Br[52],r,n,i,a,e[12],kr[3][0]),a=t.CC(t.II,Br[53],a,r,n,i,e[3],kr[3][1]),i=t.CC(t.II,Br[54],i,a,r,n,e[10],kr[3][2]),n=t.CC(t.II,Br[55],n,i,a,r,e[1],kr[3][3]),r=t.CC(t.II,Br[56],r,n,i,a,e[8],kr[3][0]),a=t.CC(t.II,Br[57],a,r,n,i,e[15],kr[3][1]),i=t.CC(t.II,Br[58],i,a,r,n,e[6],kr[3][2]),n=t.CC(t.II,Br[59],n,i,a,r,e[13],kr[3][3]),r=t.CC(t.II,Br[60],r,n,i,a,e[4],kr[3][0]),a=t.CC(t.II,Br[61],a,r,n,i,e[11],kr[3][1]),i=t.CC(t.II,Br[62],i,a,r,n,e[2],kr[3][2]),n=t.CC(t.II,Br[63],n,i,a,r,e[9],kr[3][3]),this.state.hash[0]=this.state.hash[0]+r|0,this.state.hash[1]=this.state.hash[1]+n|0,this.state.hash[2]=this.state.hash[2]+i|0,this.state.hash[3]=this.state.hash[3]+a|0}},{key:"finalize",value:function(){return this.addPaddingISO7816(this.state.message.length<56?56-this.state.message.length|0:120-this.state.message.length|0),this.addLengthBits(),this.process(),this.getStateHash()}}],[{key:"FF",value:function(e,t,r){return e&t|~e&r}},{key:"GG",value:function(e,t,r){return e&r|t&~r}},{key:"HH",value:function(e,t,r){return e^t^r}},{key:"II",value:function(e,t,r){return t^(e|~r)}},{key:"CC",value:function(e,t,r,n,i,a,o,s){return er(r+e(n,i,a)+o+t,s)+n|0}}])}(Jt);function Ar(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ar=function(){return!!e})()}var Cr=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],Ir=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],Pr=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],Tr=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],Mr=function(e){function t(e){return r(this,t),(e=e||{}).length=e.length||160,n=this,a=[e],i=u(i=t),s(n,Ar()?Reflect.construct(i,a||[],u(n).constructor):i.apply(n,a));var n,i,a}return c(t,e),o(t,[{key:"reset",value:function(){var e,r,n;switch((e=t,r=this,"function"==typeof(n=Vt(u(1&3?e.prototype:e),"reset",r))?function(e){return n.apply(r,e)}:n)([]),this.options.length){case 128:this.state.hash=[1732584193,4023233417,2562383102,271733878],this.processBlock=this.processBlock128;break;case 256:this.state.hash=[1732584193,4023233417,2562383102,271733878,1985229328,4275878552,2309737967,19088743],this.processBlock=this.processBlock256;break;case 320:this.state.hash=[1732584193,4023233417,2562383102,271733878,3285377520,1985229328,4275878552,2309737967,19088743,1009589775],this.processBlock=this.processBlock320;break;default:this.state.hash=[1732584193,4023233417,2562383102,271733878,3285377520],this.processBlock=this.processBlock160}}},{key:"processBlock128",value:function(e){for(var r=0|this.state.hash[0],n=0|this.state.hash[1],i=0|this.state.hash[2],a=0|this.state.hash[3],o=r,s=n,u=i,l=a,c=0;c<64;c++){var f=r+e[Cr[c]]|0;f=f+t.T(c,n,i,a)|0,r=a,a=i,i=n,n=f=er(f,Pr[c]),f=(f=o+e[Ir[c]]|0)+t.T64(c,s,u,l)|0,o=l,l=u,u=s,s=f=er(f,Tr[c])}var h=this.state.hash[1]+i+l|0;this.state.hash[1]=this.state.hash[2]+a+o|0,this.state.hash[2]=this.state.hash[3]+r+s|0,this.state.hash[3]=this.state.hash[0]+n+u|0,this.state.hash[0]=h}},{key:"processBlock160",value:function(e){for(var r=0|this.state.hash[0],n=0|this.state.hash[1],i=0|this.state.hash[2],a=0|this.state.hash[3],o=0|this.state.hash[4],s=r,u=n,l=i,c=a,f=o,h=0;h<80;h++){var d=r+e[Cr[h]]|0;d=(d=er(d=d+t.T(h,n,i,a)|0,Pr[h]))+o|0,r=o,o=a,a=er(i,10),i=n,n=d,d=(d=er(d=(d=s+e[Ir[h]]|0)+t.T80(h,u,l,c)|0,Tr[h]))+f|0,s=f,f=c,c=er(l,10),l=u,u=d}var p=this.state.hash[1]+i+c|0;this.state.hash[1]=this.state.hash[2]+a+f|0,this.state.hash[2]=this.state.hash[3]+o+s|0,this.state.hash[3]=this.state.hash[4]+r+u|0,this.state.hash[4]=this.state.hash[0]+n+l|0,this.state.hash[0]=p}},{key:"processBlock256",value:function(e){for(var r=0|this.state.hash[0],n=0|this.state.hash[1],i=0|this.state.hash[2],a=0|this.state.hash[3],o=0|this.state.hash[4],s=0|this.state.hash[5],u=0|this.state.hash[6],l=0|this.state.hash[7],c=0;c<64;c+=1){var f=r+e[Cr[c]]|0;switch(f=f+t.T(c,n,i,a)|0,r=a,a=i,i=n,n=f=er(f,Pr[c]),f=(f=o+e[Ir[c]]|0)+t.T64(c,s,u,l)|0,o=l,l=u,u=s,s=f=er(f,Tr[c]),c){case 15:f=r,r=o,o=f;break;case 31:f=n,n=s,s=f;break;case 47:f=i,i=u,u=f;break;case 63:f=a,a=l,l=f}}this.state.hash[0]=this.state.hash[0]+r|0,this.state.hash[1]=this.state.hash[1]+n|0,this.state.hash[2]=this.state.hash[2]+i|0,this.state.hash[3]=this.state.hash[3]+a|0,this.state.hash[4]=this.state.hash[4]+o|0,this.state.hash[5]=this.state.hash[5]+s|0,this.state.hash[6]=this.state.hash[6]+u|0,this.state.hash[7]=this.state.hash[7]+l|0}},{key:"processBlock320",value:function(e){for(var r=0|this.state.hash[0],n=0|this.state.hash[1],i=0|this.state.hash[2],a=0|this.state.hash[3],o=0|this.state.hash[4],s=0|this.state.hash[5],u=0|this.state.hash[6],l=0|this.state.hash[7],c=0|this.state.hash[8],f=0|this.state.hash[9],h=0;h<80;h+=1){var d=r+e[Cr[h]]|0;switch(d=(d=er(d=d+t.T(h,n,i,a)|0,Pr[h]))+o|0,r=o,o=a,a=er(i,10),i=n,n=d,d=(d=er(d=(d=s+e[Ir[h]]|0)+t.T80(h,u,l,c)|0,Tr[h]))+f|0,s=f,f=c,c=er(l,10),l=u,u=d,h){case 15:d=n,n=u,u=d;break;case 31:d=a,a=c,c=d;break;case 47:d=r,r=s,s=d;break;case 63:d=i,i=l,l=d;break;case 79:d=o,o=f,f=d}}this.state.hash[0]=this.state.hash[0]+r|0,this.state.hash[1]=this.state.hash[1]+n|0,this.state.hash[2]=this.state.hash[2]+i|0,this.state.hash[3]=this.state.hash[3]+a|0,this.state.hash[4]=this.state.hash[4]+o|0,this.state.hash[5]=this.state.hash[5]+s|0,this.state.hash[6]=this.state.hash[6]+u|0,this.state.hash[7]=this.state.hash[7]+l|0,this.state.hash[8]=this.state.hash[8]+c|0,this.state.hash[9]=this.state.hash[9]+f|0}},{key:"finalize",value:function(){return this.addPaddingISO7816(this.state.message.length<56?56-this.state.message.length|0:120-this.state.message.length|0),this.addLengthBits(),this.process(),this.getStateHash()}}],[{key:"F",value:function(e,t,r){return e^t^r}},{key:"G",value:function(e,t,r){return e&t|~e&r}},{key:"H",value:function(e,t,r){return(e|~t)^r}},{key:"I",value:function(e,t,r){return e&r|t&~r}},{key:"J",value:function(e,t,r){return e^(t|~r)}},{key:"T",value:function(e,t,r,n){return e<16?this.F(t,r,n):e<32?this.G(t,r,n)+1518500249|0:e<48?this.H(t,r,n)+1859775393|0:e<64?this.I(t,r,n)+2400959708|0:this.J(t,r,n)+2840853838|0}},{key:"T64",value:function(e,t,r,n){return e<16?this.I(t,r,n)+1352829926|0:e<32?this.H(t,r,n)+1548603684|0:e<48?this.G(t,r,n)+1836072691|0:this.F(t,r,n)}},{key:"T80",value:function(e,t,r,n){return e<16?this.J(t,r,n)+1352829926|0:e<32?this.I(t,r,n)+1548603684|0:e<48?this.H(t,r,n)+1836072691|0:e<64?this.G(t,r,n)+2053994217|0:this.F(t,r,n)}}])}(Jt);const Rr=Mr;function Fr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Fr=function(){return!!e})()}var Or=function(e){function t(e){var n,i,a,o;return r(this,t),i=this,o=[e],a=u(a=t),(n=s(i,Fr()?Reflect.construct(a,o||[],u(i).constructor):a.apply(i,o))).unitOrder=1,n.blockUnits=[],n}return c(t,e),o(t,[{key:"process",value:function(){for(;this.state.message.length>=this.blockSizeInBytes;){this.blockUnits=[];for(var e=0;e<this.blockSizeInBytes;e+=4)this.blockUnits.push(this.state.message.charCodeAt(e)<<24|this.state.message.charCodeAt(e+1)<<16|this.state.message.charCodeAt(e+2)<<8|this.state.message.charCodeAt(e+3));this.state.message=this.state.message.substr(this.blockSizeInBytes),this.processBlock(this.blockUnits)}}},{key:"processBlock",value:function(e){}},{key:"getStateHash",value:function(e){e=e||this.state.hash.length;for(var t="",r=0;r<e;r++)t+=String.fromCharCode(this.state.hash[r]>>24&255)+String.fromCharCode(this.state.hash[r]>>16&255)+String.fromCharCode(this.state.hash[r]>>8&255)+String.fromCharCode(255&this.state.hash[r]);return t}},{key:"addLengthBits",value:function(){this.state.message+="\0\0\0"+String.fromCharCode(this.state.length>>29&255)+String.fromCharCode(this.state.length>>21&255)+String.fromCharCode(this.state.length>>13&255)+String.fromCharCode(this.state.length>>5&255)+String.fromCharCode(this.state.length<<3&255)}}])}(Yt);const Nr=Or;function Lr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Lr=function(){return!!e})()}var Dr=[1518500249,1859775393,2400959708,3395469782],zr=function(e){function t(e){var n,i,a,o;return r(this,t),i=this,o=[e],a=u(a=t),(n=s(i,Lr()?Reflect.construct(a,o||[],u(i).constructor):a.apply(i,o))).options.rounds=n.options.rounds||80,n.W=new Array(80),n}return c(t,e),o(t,[{key:"reset",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=Vt(u(1&3?e.prototype:e),"reset",r))?function(e){return n.apply(r,e)}:n)([]),this.state.hash=[1732584193,-271733879,-1732584194,271733878,-1009589776]}},{key:"processBlock",value:function(e){for(var t=0|this.state.hash[0],r=0|this.state.hash[1],n=0|this.state.hash[2],i=0|this.state.hash[3],a=0|this.state.hash[4],o=0;o<this.options.rounds;o++){this.W[o]=o<16?0|e[o]:this.W[o-3]^this.W[o-8]^this.W[o-14]^this.W[o-16]|0;var s=er(t,5)+a+this.W[o]+Dr[o/20|0]|0;s=o<20?s+(r&n|~r&i)|0:o<40?s+(r^n^i)|0:o<60?s+(r&n|r&i|n&i)|0:s+(r^n^i)|0,a=i,i=n,n=0|er(r,30),r=t,t=s}this.state.hash[0]=this.state.hash[0]+t|0,this.state.hash[1]=this.state.hash[1]+r|0,this.state.hash[2]=this.state.hash[2]+n|0,this.state.hash[3]=this.state.hash[3]+i|0,this.state.hash[4]=this.state.hash[4]+a|0}},{key:"finalize",value:function(){return this.addPaddingISO7816(this.state.message.length<56?56-this.state.message.length|0:120-this.state.message.length|0),this.addLengthBits(),this.process(),this.getStateHash()}}])}(Nr);const Ur=zr;function $r(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return($r=function(){return!!e})()}var jr=[1518500249,1859775393,2400959708,3395469782],Zr=function(e){function t(e){var n,i,a,o;return r(this,t),i=this,o=[e],a=u(a=t),(n=s(i,$r()?Reflect.construct(a,o||[],u(i).constructor):a.apply(i,o))).options.rounds=n.options.rounds||80,n.W=new Array(80),n}return c(t,e),o(t,[{key:"reset",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=Vt(u(1&3?e.prototype:e),"reset",r))?function(e){return n.apply(r,e)}:n)([]),this.state.hash=[1732584193,-271733879,-1732584194,271733878,-1009589776]}},{key:"processBlock",value:function(e){for(var t=0|this.state.hash[0],r=0|this.state.hash[1],n=0|this.state.hash[2],i=0|this.state.hash[3],a=0|this.state.hash[4],o=0;o<this.options.rounds;o++){this.W[o]=o<16?0|e[o]:0|er(this.W[o-3]^this.W[o-8]^this.W[o-14]^this.W[o-16],1);var s=er(t,5)+a+this.W[o]+jr[o/20|0]|0;s=o<20?s+(r&n|~r&i)|0:o<40?s+(r^n^i)|0:o<60?s+(r&n|r&i|n&i)|0:s+(r^n^i)|0,a=i,i=n,n=0|er(r,30),r=t,t=s}this.state.hash[0]=this.state.hash[0]+t|0,this.state.hash[1]=this.state.hash[1]+r|0,this.state.hash[2]=this.state.hash[2]+n|0,this.state.hash[3]=this.state.hash[3]+i|0,this.state.hash[4]=this.state.hash[4]+a|0}},{key:"finalize",value:function(){return this.addPaddingISO7816(this.state.message.length<56?56-this.state.message.length|0:120-this.state.message.length|0),this.addLengthBits(),this.process(),this.getStateHash()}}])}(Nr);const Gr=Zr;function Wr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Wr=function(){return!!e})()}var Hr=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],qr=function(e){function t(e){var n,i,a,o;return r(this,t),(e=e||{}).length=e.length||256,e.rounds=e.rounds||64,i=this,o=[e],a=u(a=t),(n=s(i,Wr()?Reflect.construct(a,o||[],u(i).constructor):a.apply(i,o))).W=new Array(64),n}return c(t,e),o(t,[{key:"reset",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=Vt(u(1&3?e.prototype:e),"reset",r))?function(e){return n.apply(r,e)}:n)([]),224===this.options.length?this.state.hash=[-1056596264,914150663,812702999,-150054599,-4191439,1750603025,1694076839,-1090891868]:this.state.hash=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225]}},{key:"processBlock",value:function(e){for(var t=0|this.state.hash[0],r=0|this.state.hash[1],n=0|this.state.hash[2],i=0|this.state.hash[3],a=0|this.state.hash[4],o=0|this.state.hash[5],s=0|this.state.hash[6],u=0|this.state.hash[7],l=0;l<this.options.rounds;l++){this.W[l]=l<16?0|e[l]:this.W[l-16]+(tr(this.W[l-15],7)^tr(this.W[l-15],18)^this.W[l-15]>>>3)+this.W[l-7]+(tr(this.W[l-2],17)^tr(this.W[l-2],19)^this.W[l-2]>>>10)|0;var c=u+(tr(a,6)^tr(a,11)^tr(a,25))+(a&o^~a&s)+Hr[l]+this.W[l]|0,f=(tr(t,2)^tr(t,13)^tr(t,22))+(t&r^t&n^r&n)|0;u=s,s=o,o=a,a=i+c|0,i=n,n=r,r=t,t=c+f|0}this.state.hash[0]=this.state.hash[0]+t|0,this.state.hash[1]=this.state.hash[1]+r|0,this.state.hash[2]=this.state.hash[2]+n|0,this.state.hash[3]=this.state.hash[3]+i|0,this.state.hash[4]=this.state.hash[4]+a|0,this.state.hash[5]=this.state.hash[5]+o|0,this.state.hash[6]=this.state.hash[6]+s|0,this.state.hash[7]=this.state.hash[7]+u|0}},{key:"finalize",value:function(){return this.addPaddingISO7816(this.state.message.length<56?56-this.state.message.length|0:120-this.state.message.length|0),this.addLengthBits(),this.process(),this.getStateHash(this.options.length/32|0)}}])}(Nr);const Qr=qr;function Vr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Vr=function(){return!!e})()}var Yr=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],Kr=function(e){function t(e){var n,i,a,o;return r(this,t),(e=e||{}).length=e.length||512,e.rounds=e.rounds||160,i=this,o=[e],a=u(a=t),(n=s(i,Vr()?Reflect.construct(a,o||[],u(i).constructor):a.apply(i,o))).blockSize=32,n.blockSizeInBytes=n.blockSize*n.unitSize,n.W=new Array(160),n}return c(t,e),o(t,[{key:"reset",value:function(){var e,r,n;switch((e=t,r=this,"function"==typeof(n=Vt(u(1&3?e.prototype:e),"reset",r))?function(e){return n.apply(r,e)}:n)([]),this.options.length){case 384:this.state.hash=[-876896931,-1056596264,1654270250,914150663,-1856437926,812702999,355462360,-150054599,1731405415,-4191439,-1900787065,1750603025,-619958771,1694076839,1203062813,-1090891868];break;case 512:this.state.hash=[1779033703,-205731576,-1150833019,-2067093701,1013904242,-23791573,-1521486534,1595750129,1359893119,-1377402159,-1694144372,725511199,528734635,-79577749,1541459225,327033209];break;default:for(var i=new t,a=0;a<16;a++)i.state.hash[a]=2779096485^i.state.hash[a];i.update("SHA-512/"+this.options.length);var o=i.finalize();this.state.hash=[];for(var s=0;s<64;s+=4)this.state.hash.push(o.charCodeAt(s)<<24|o.charCodeAt(s+1)<<16|o.charCodeAt(s+2)<<8|o.charCodeAt(s+3))}}},{key:"processBlock",value:function(e){for(var t,r,n,i,a=this.state.hash[0],o=this.state.hash[1],s=this.state.hash[2],u=this.state.hash[3],l=this.state.hash[4],c=this.state.hash[5],f=this.state.hash[6],h=this.state.hash[7],d=this.state.hash[8],p=this.state.hash[9],m=this.state.hash[10],g=this.state.hash[11],b=this.state.hash[12],y=this.state.hash[13],_=this.state.hash[14],v=this.state.hash[15],w=0;w<this.options.rounds;w+=2){if(w<32)this.W[w]=e[w],this.W[w+1]=e[w+1];else{t=rr(this.W[w-30],this.W[w-29],1)^rr(this.W[w-30],this.W[w-29],8)^this.W[w-30]>>>7,r=nr(this.W[w-30],this.W[w-29],1)^nr(this.W[w-30],this.W[w-29],8)^(this.W[w-29]>>>7|this.W[w-30]<<25),n=rr(this.W[w-4],this.W[w-3],19)^rr(this.W[w-4],this.W[w-3],61)^this.W[w-4]>>>6,i=nr(this.W[w-4],this.W[w-3],19)^nr(this.W[w-4],this.W[w-3],61)^(this.W[w-3]>>>6|this.W[w-4]<<26);var x=(65535&this.W[w-13])+(65535&this.W[w-31])+(65535&r)+(65535&i)|0,k=(this.W[w-13]>>>16)+(this.W[w-31]>>>16)+(r>>>16)+(i>>>16)+(x>>>16)|0,B=(65535&this.W[w-14])+(65535&this.W[w-32])+(65535&t)+(65535&n)+(k>>>16)|0,E=(this.W[w-14]>>>16)+(this.W[w-32]>>>16)+(t>>>16)+(n>>>16)+(B>>>16)|0;this.W[w]=4294967295&(E<<16|65535&B),this.W[w+1]=4294967295&(k<<16|65535&x)}t=rr(a,o,28)^rr(a,o,34)^rr(a,o,39),r=nr(a,o,28)^nr(a,o,34)^nr(a,o,39),n=rr(d,p,14)^rr(d,p,18)^rr(d,p,41);var S=p&g^~p&y,A=a&s^a&l^s&l,C=o&u^o&c^u&c,I=v+(i=nr(d,p,14)^nr(d,p,18)^nr(d,p,41))|0,P=_+n+(I>>>0<v>>>0?1:0)|0;P=(P=P+(d&m^~d&b)+((I=I+S|0)>>>0<S>>>0?1:0)|0)+Yr[w]+((I=I+Yr[w+1]|0)>>>0<Yr[w+1]>>>0?1:0)|0,I=I+this.W[w+1]|0;var T=r+C|0;_=b,v=y,b=m,y=g,m=d,g=p,d=f+(P=P+this.W[w]+(I>>>0<this.W[w+1]>>>0?1:0)|0)+((p=h+I|0)>>>0<h>>>0?1:0)|0,f=l,h=c,l=s,c=u,s=a,u=o,a=P+(t+A+(T>>>0<r>>>0?1:0)|0)+((o=I+T|0)>>>0<I>>>0?1:0)|0}this.state.hash[1]=this.state.hash[1]+o|0,this.state.hash[0]=this.state.hash[0]+a+(this.state.hash[1]>>>0<o>>>0?1:0)|0,this.state.hash[3]=this.state.hash[3]+u|0,this.state.hash[2]=this.state.hash[2]+s+(this.state.hash[3]>>>0<u>>>0?1:0)|0,this.state.hash[5]=this.state.hash[5]+c|0,this.state.hash[4]=this.state.hash[4]+l+(this.state.hash[5]>>>0<c>>>0?1:0)|0,this.state.hash[7]=this.state.hash[7]+h|0,this.state.hash[6]=this.state.hash[6]+f+(this.state.hash[7]>>>0<h>>>0?1:0)|0,this.state.hash[9]=this.state.hash[9]+p|0,this.state.hash[8]=this.state.hash[8]+d+(this.state.hash[9]>>>0<p>>>0?1:0)|0,this.state.hash[11]=this.state.hash[11]+g|0,this.state.hash[10]=this.state.hash[10]+m+(this.state.hash[11]>>>0<g>>>0?1:0)|0,this.state.hash[13]=this.state.hash[13]+y|0,this.state.hash[12]=this.state.hash[12]+b+(this.state.hash[13]>>>0<y>>>0?1:0)|0,this.state.hash[15]=this.state.hash[15]+v|0,this.state.hash[14]=this.state.hash[14]+_+(this.state.hash[15]>>>0<v>>>0?1:0)|0}},{key:"finalize",value:function(){return this.addPaddingISO7816(this.state.message.length<112?112-this.state.message.length|0:240-this.state.message.length|0),this.state.message+="\0\0\0\0\0\0\0\0",this.addLengthBits(),this.process(),this.getStateHash(this.options.length/32|0)}}])}(Nr);const Xr=Kr;function Jr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Jr=function(){return!!e})()}var en=[10097,32533,76520,13586,34673,54876,80959,9117,39292,74945,37542,4805,64894,74296,24805,24037,20636,10402,822,91665,8422,68953,19645,9303,23209,2560,15953,34764,35080,33606,99019,2529,9376,70715,38311,31165,88676,74397,4436,27659,12807,99970,80157,36147,64032,36653,98951,16877,12171,76833,66065,74717,34072,76850,36697,36170,65813,39885,11199,29170,31060,10805,45571,82406,35303,42614,86799,7439,23403,9732,85269,77602,2051,65692,68665,74818,73053,85247,18623,88579,63573,32135,5325,47048,90553,57548,28468,28709,83491,25624,73796,45753,3529,64778,35808,34282,60935,20344,35273,88435,98520,17767,14905,68607,22109,40558,60970,93433,50500,73998,11805,5431,39808,27732,50725,68248,29405,24201,52775,67851,83452,99634,6288,98083,13746,70078,18475,40610,68711,77817,88685,40200,86507,58401,36766,67951,90364,76493,29609,11062,99594,67348,87517,64969,91826,8928,93785,61368,23478,34113,65481,17674,17468,50950,58047,76974,73039,57186,40218,16544,80124,35635,17727,8015,45318,22374,21115,78253,14385,53763,74350,99817,77402,77214,43236,210,45521,64237,96286,2655,69916,26803,66252,29148,36936,87203,76621,13990,94400,56418,9893,20505,14225,68514,46427,56788,96297,78822,54382,14598,91499,14523,68479,27686,46162,83554,94750,89923,37089,20048,80336,94598,26940,36858,70297,34135,53140,33340,42050,82341,44104,81949,85157,47954,32979,26575,57600,40881,22222,6413,12550,73742,11100,2040,12860,74697,96644,89439,28707,25815,63606,49329,16505,34484,40219,52563,43651,77082,7207,31790,61196,90446,26457,47774,51924,33729,65394,59593,42582,60527,15474,45266,95270,79953,59367,83848,82396,10118,33211,59466,94557,28573,67897,54387,54622,44431,91190,42592,92927,45973,42481,16213,97344,8721,16868,48767,3071,12059,25701,46670,23523,78317,73208,89837,68935,91416,26252,29663,5522,82562,4493,52494,75246,33824,45862,51025,61962,79335,65337,12472,549,97654,64051,88159,96119,63896,54692,82391,23287,29529,35963,15307,26898,9354,33351,35462,77974,50024,90103,39333,59808,8391,45427,26842,83609,49700,13021,24892,78565,20106,46058,85236,1390,92286,77281,44077,93910,83647,70617,42941,32179,597,87379,25241,5567,7007,86743,17157,85394,11838,69234,61406,20117,45204,15956,6e4,18743,92423,97118,96338,19565,41430,1758,75379,40419,21585,66674,36806,84962,85207,45155,14938,19476,7246,43667,94543,59047,90033,20826,69541,94864,31994,36168,10851,34888,81553,1540,35456,5014,51176,98086,24826,45240,28404,44999,8896,39094,73407,35441,31880,33185,16232,41941,50949,89435,48581,88695,41994,37548,73043,80951,406,96382,70774,20151,23387,25016,25298,94624,61171,79752,49140,71961,28296,69861,2591,74852,20539,387,59579,18633,32537,98145,6571,31010,24674,5455,61427,77938,91936,74029,43902,77557,32270,97790,17119,52527,58021,80814,51748,54178,45611,80993,37143,5335,12969,56127,19255,36040,90324,11664,49883,52079,84827,59381,71539,9973,33440,88461,23356,48324,77928,31249,64710,2295,36870,32307,57546,15020,9994,69074,94138,87637,91976,35584,4401,10518,21615,1848,76938,9188,20097,32825,39527,4220,86304,83389,87374,64278,58044,90045,85497,51981,50654,94938,81997,91870,76150,68476,64659,73189,50207,47677,26269,62290,64464,27124,67018,41361,82760,75768,76490,20971,87749,90429,12272,95375,5871,93823,43178,54016,44056,66281,31003,682,27398,20714,53295,7706,17813,8358,69910,78542,42785,13661,58873,4618,97553,31223,8420,28306,3264,81333,10591,40510,7893,32604,60475,94119,1840,53840,86233,81594,13628,51215,90290,28466,68795,77762,20791,91757,53741,61613,62269,50263,90212,55781,76514,83483,47055,89415,92694,397,58391,12607,17646,48949,72306,94541,37408,77513,3820,86864,29901,68414,82774,51908,13980,72893,55507,19502,37174,69979,20288,55210,29773,74287,75251,65344,67415,21818,59313,93278,81757,5686,73156,7082,85046,31853,38452,51474,66499,68107,23621,94049,91345,42836,9191,8007,45449,99559,68331,62535,24170,69777,12830,74819,78142,43860,72834,33713,48007,93584,72869,51926,64721,58303,29822,93174,93972,85274,86893,11303,22970,28834,34137,73515,90400,71148,43643,84133,89640,44035,52166,73852,70091,61222,60561,62327,18423,56732,16234,17395,96131,10123,91622,85496,57560,81604,18880,65138,56806,87648,85261,34313,65861,45875,21069,85644,47277,38001,2176,81719,11711,71602,92937,74219,64049,65584,49698,37402,96397,1304,77586,56271,10086,47324,62605,40030,37438,97125,40348,87083,31417,21815,39250,75237,62047,15501,29578,21826,41134,47143,34072,64638,85902,49139,6441,3856,54552,73135,42742,95719,9035,85794,74296,8789,88156,64691,19202,7638,77929,3061,18072,96207,44156,23821,99538,4713,66994,60528,83441,7954,19814,59175,20695,5533,52139,61212,6455,83596,35655,6958,92983,5128,9719,77433,53783,92301,50498,10850,62746,99599,10507,13499,6319,53075,71839,6410,19362,39820,98952,43622,63147,64421,80814,43800,9351,31024,73167,59580,6478,75569,78800,88835,54486,23768,6156,4111,8408,38508,7341,23793,48763,90822,97022,17719,4207,95954,49953,30692,70668,94688,16127,56196,80091,82067,63400,5462,69200,65443,95659,18288,27437,49632,24041,8337,65676,96299,90836,27267,50264,13192,72294,7477,44606,17985,48911,97341,30358,91307,6991,19072,24210,36699,53728,28825,35793,28976,66252,68434,94688,84473,13622,62126,98408,12843,82590,9815,93146,48908,15877,54745,24591,35700,4754,83824,52692,54130,55160,6913,45197,42672,78601,11883,9528,63011,98901,14974,40344,10455,16019,14210,33712,91342,37821,88325,80851,43667,70883,12883,97343,65027,61184,4285,1392,17974,15077,90712,26769,21778,30976,38807,36961,31649,42096,63281,2023,8816,47449,19523,59515,65122,59659,86283,68258,69572,13798,16435,91529,67245,52670,35583,16563,79246,86686,76463,34222,26655,90802,60584,47377,7500,37992,45134,26529,26760,83637,41326,44344,53853,41377,36066,94850,58838,73859,49364,73331,96240,43642,24637,38736,74384,89342,52623,7992,12369,18601,3742,83873,83080,12451,38992,22815,7759,51777,97377,27585,51972,37867,16444,24334,36151,99073,27493,70939,85130,32552,54846,54759,60790,18157,57178,65762,11161,78576,45819,52979,65130,4860,3991,10461,93716,16894,66083,24653,84609,58232,88618,19161,38555,95554,32886,59780,8355,60860,29735,47762,71299,23853,17546,73704,92052,46215,55121,29281,59076,7936,27954,58909,32643,52861,95819,6831,911,98936,76355,93779,80863,514,69572,68777,39510,35905,14060,40619,29549,69616,33564,60780,24122,66591,27699,6494,14845,46672,61958,77100,90899,75754,61196,30231,92962,61773,41839,55382,17267,70943,78038,70267,30532,21704,10274,12202,39685,23309,10061,68829,55986,66485,3788,97599,75867,20717,74416,53166,35208,33374,87539,8823,48228,63379,85783,47619,53152,67433,35663,52972,16818,60311,60365,94653,35075,33949,42614,29297,1918,28316,98953,73231,83799,42402,56623,34442,34994,41374,70071,14736,9958,18065,32960,7405,36409,83232,99385,41600,11133,7586,15917,6253,19322,53845,57620,52606,66497,68646,78138,66559,19640,99413,11220,94747,7399,37408,48509,23929,27482,45476,85244,35159,31751,57260,68980,5339,15470,48355,88651,22596,3152,19121,88492,99382,14454,4504,20094,98977,74843,93413,22109,78508,30934,47744,7481,83828,73788,6533,28597,20405,94205,20380,22888,48893,27499,98748,60530,45128,74022,84617,82037,10268,78212,16993,35902,91386,44372,15486,65741,14014,87481,37220,41849,84547,46850,52326,34677,58300,74910,64345,19325,81549,46352,33049,69248,93460,45305,7521,61318,31855,14413,70951,11087,96294,14013,31792,59747,67277,76503,34513,39663,77544,52701,8337,56303,87315,16520,69676,11654,99893,2181,68161,57275,36898,81304,48585,68652,27376,92852,55866,88448,3584,20857,73156,70284,24326,79375,95220,1159,63267,10622,48391,15633,84924,90415,93614,33521,26665,55823,47641,86225,31704,92694,48297,39904,2115,59589,49067,66821,41575,49767,4037,77613,19019,88152,80,20554,91409,96277,48257,50816,97616,38688,32486,45134,63545,59404,72059,43947,51680,43852,59693,25163,1889,70014,15021,41290,67312,71857,15957,68971,11403,65251,7629,37239,33295,5870,1119,92784,26340,18477,65622,36815,43625,18637,37509,82444,99005,4921,73701,14707,93997,64397,11692,5327,82162,20247,81759,45197,25332,83745,22567,4515,25624,95096,67946,48460,85558,15191,18782,16930,33361,83761,60873,43253,84145,60833,25983,1291,41349,20368,7126,14387,6345,80854,9279,43529,6318,38384,74761,41196,37480,51321,92246,80088,77074,88722,56736,66164,49431,66919,31678,72472,8,80890,18002,94813,31900,54155,83436,35352,54131,5466,55306,93128,18464,74457,90561,72848,11834,79982,68416,39528,72484,82474,25593,48545,35247,18619,13674,18611,19241,81616,18711,53342,44276,75122,11724,74627,73707,58319,15997,7586,16120,82641,22820,92904,13141,32392,19763,61199,67940,90767,4235,13574,17200,69902,63742,78464,22501,18627,90872,40188,28193,29593,88627,94972,11598,62095,36787,441,58997,34414,82157,86887,55087,19152,23,12302,80783,32624,68691,63439,75363,44989,16822,36024,867,76378,41605,65961,73488,67049,9070,93399,45547,94458,74284,5041,49807,20288,34060,79495,4146,52162,90286,54158,34243,46978,35482,59362,95938,91704,30552,4737,21031,75051,93029,47665,64382,99782,93478,94015,46874,32444,48277,59820,96163,64654,25843,41145,42820,74108,88222,88570,74015,25704,91035,1755,14750,48968,38603,62880,87873,95160,59221,22304,90314,72877,17334,39283,4149,11748,12102,80580,41867,17710,59621,6554,7850,73950,79552,17944,5600,60478,3343,25852,58905,57216,39618,49856,99326,66067,42792,95043,52680,46780,56487,9971,59481,37006,22186,54244,91030,45547,70818,59849,96169,61459,21647,87417,17198,30945,57589,31732,57260,47670,7654,46376,25366,94746,49580,69170,37403,86995,90307,94304,71803,26825,5511,12459,91314,8345,88975,35841,85771,8105,59987,87112,21476,14713,71181,27767,43584,85301,88977,29490,69714,73035,41207,74699,9310,13025,14338,54066,15243,47724,66733,47431,43905,31048,56699,80217,36292,98525,24335,24432,24896,43277,58874,11466,16082,10875,62004,90391,61105,57411,6368,53856,30743,8670,84741,54127,57326,26629,19087,24472,88779,30540,27886,61732,75454,60311,42824,37301,42678,45990,43242,17374,52003,70707,70214,49739,71484,92003,98086,76668,73209,59202,11973,2902,33250,78626,51594,16453,94614,39014,97066,83012,9832,25571,77628,66692,13986,99837,582,81232,44987,9504,96412,90193,79568,44071,28091,7362,97703,76447,42537,98524,97831,65704,9514,41468,85149,49554,17994,14924,39650,95294,556,70481,6905,94559,37559,49678,53119,70312,5682,66986,34099,74474,20740,41615,70360,64114,58660,90850,64618,80620,51790,11436,38072,50273,93113,41794,86861,24781,89683,55411,85667,77535,99892,41396,80504,90670,8289,40902,5069,95083,6783,28102,57816,25807,24260,71529,78920,72682,7385,90726,57166,98884,8583,6170,97965,88302,98041,21443,41808,68984,83620,89747,98882,60808,54444,74412,81105,1176,28838,36421,16489,18059,51061,80940,44893,10408,36222,80582,71944,92638,40333,67054,16067,19516,90120,46759,71643,13177,55292,21036,82808,77501,97427,49386,54480,23604,23554,21785,41101,91178,10174,29420,90438,6312,88940,15995,69321,47458,64809,98189,81851,29651,84215,60942,307,11897,92674,40405,68032,96717,54244,10701,41393,92329,98932,78284,46347,71209,92061,39448,93136,25722,8564,77936,63574,31384,51924,85561,29671,58137,17820,22751,36518,38101,77756,11657,13897,95889,57067,47648,13885,70669,93406,39641,69457,91339,22502,92613,89719,11947,56203,19324,20504,84054,40455,99396,63680,67667,60631,69181,96845,38525,11600,47468,3577,57649,63266,24700,71594,14004,23153,69249,5747,43321,31370,28977,23896,76479,68562,62342,7589,8899,5985,64281,61826,18555,64937,13173,33365,78851,16499,87064,13075,66847,70495,32350,2985,86716,38746,26313,77463,55387,72681,72461,33230,21529,53424,92581,2262,78438,66276,18396,73538,21032,91050,13058,16218,12470,56500,15292,76139,59526,52113,95362,67011,6651,16136,1016,857,55018,56374,35824,71708,49712,97380,10404,55452,34030,60726,75211,10271,36633,68424,58275,61764,97586,54716,50259,46345,87195,46092,26787,60939,89514,11788,68224,23417,73959,76145,30342,40277,11049,72049,15472,50669,48139,36732,46874,37088,73465,9819,58869,35220,12120,86124,51247,44302,60883,52109,21437,36786,49226,77837,19612,78430,11661,94770,77603,65669,86868,12665,30012,75989,39141,77400,28e3,64238,73258,71794,31340,26256,66453,37016,64756,80457,8747,12836,3469,50678,3274,43423,66677,82556,92901,51878,56441,22998,29718,38447,6453,25311,7565,53771,3551,90070,9483,94050,45938,18135,36908,43321,11073,51803,98884,66209,6830,53656,14663,56346,71430,4909,19818,5707,27369,86882,53473,7541,53633,70863,3748,12822,19360,49088,59066,75974,63335,20483,43514,37481,58278,26967,49325,43951,91647,93783,64169,49022,98588,9495,49829,59068,38831,4838,83605,92419,39542,7772,71568,75673,35185,89759,44901,74291,24895,88530,70774,35439,46758,70472,70207,92675,91623,61275,35720,26556,95596,20094,73750,85788,34264,1703,46833,65248,14141,53410,38649,6343,57256,61342,72709,75318,90379,37562,27416,75670,92176,72535,93119,56077,6886,18244,92344,31374,82071,7429,81007,47749,40744,56974,23336,88821,53841,10536,21445,82793,24831,93241,14199,76268,70883,68002,3829,17443,72513,76400,52225,92348,62308,98481,29744,33165,33141,61020,71479,45027,76160,57411,13780,13632,52308,77762,88874,33697,83210,51466,9088,50395,26743,5306,21706,70001,99439,80767,68749,95148,94897,78636,96750,9024,94538,91143,96693,61886,5184,75763,47075,88158,5313,53439,14908,8830,60096,21551,13651,62546,96892,25240,47511,58483,87342,78818,7855,39269,566,21220,292,24069,25072,29519,52548,54091,21282,21296,50958,17695,58072,68990,60329,95955,71586,63417,35947,67807,57621,64547,46850,37981,38527,9037,64756,3324,4986,83666,9282,25844,79139,78435,35428,43561,69799,63314,12991,93516,23394,94206,93432,37836,94919,26846,2555,74410,94915,48199,5280,37470,93622,4345,15092,19510,18094,16613,78234,50001,95491,97976,38306,32192,82639,54624,72434,92606,23191,74693,78521,104,18248,75583,90326,50785,54034,66251,35774,14692,96345,44579,85932,44053,75704,20840,86583,83944,52456,73766,77963,31151,32364,91691,47357,40338,23435,24065,8458,95366,7520,11294,23238,1748,41690,67328,54814,37777,10057,42332,38423,2309,70703,85736,46148,14258,29236,12152,5088,65825,2463,65533,21199,60555,33928,1817,7396,89215,30722,22102,15880,92261,17292,88190,61781,48898,92525,21283,88581,60098,71926,819,59144,224,30570,90194,18329,6999,26857,19238,64425,28108,16554,16016,42,83229,10333,36168,65617,94834,79782,23924,49440,30432,81077,31543,95216,64865,13658,51081,35337,74538,44553,64672,90960,41849,93865,44608,93176,34851,5249,29329,19715,94082,14738,86667,43708,66354,93692,25527,56463,99380,38793,85774,19056,13939,46062,27647,66146,63210,96296,33121,54196,34108,75814,85986,71171,15102,28992,63165,98380,36269,60014,7201,62448,46385,42175,88350,46182,49126,52567,64350,16315,53969,80395,81114,54358,64578,47269,15747,78498,90830,25955,99236,43286,91064,99969,95144,64424,77377,49553,24241,8150,89535,8703,91041,77323,81079,45127,93686,32151,7075,83155,10252,73100,88618,23891,87418,45417,20268,11314,50363,26860,27799,49416,83534,19187,8059,76677,2110,12364,71210,87052,50241,90785,97889,81399,58130,64439,5614,59467,58309,87834,57213,37510,33689,1259,62486,56320,46265,73452,17619,56421,40725,23439,41701,93223,41682,45026,47505,27635,56293,91700,4391,67317,89604,73020,69853,61517,51207,86040,2596,1655,9918,45161,222,54577,74821,47335,8582,52403,94255,26351,46527,68224,90183,85057,72310,34963,83462,49465,46581,61499,4844,94626,2963,41482,83879,44942,63915,94365,92560,12363,30246,2086,75036,88620,91088,67691,67762,34261,8769,91830,23313,18256,28850,37639,92748,57791,71328,37110,66538,39318,15626,44324,82827,8782,65960,58167,1305,83950,45424,72453,19444,68219,64733,94088,62006,89985,36936,61630,97966,76537,46467,30942,7479,67971,14558,22458,35148,1929,17165,12037,74558,16250,71750,55546,29693,94984,37782,41659,39098,23982,29899,71594,77979,54477,13764,17315,72893,32031,39608,75992,73445,1317,50525,87313,45191,30214,19769,90043,93478,58044,6949,31176,88370,50274,83987,45316,38551,79418,14322,91065,7841,36130,86602,10659,40859,964,71577,85447,61079,96910,72906,7361,84338,34114,52096,66715,51091,86219,81115,49625,48799,89485,24855,13684,68433,70595,70102,71712,88559,92476,32903,68009,58417,87962,11787,16644,72964,29776,63075,13270,84758,49560,10317,28778,23006,31036,84906,81488,17340,74154,42801,27917,89792,62604,62234,13124,76471,51667,37589,87147,24743,48023,6325,79794,35889,13255,4925,99004,70322,60832,76636,56907,56534,72615,46288,36788,93196,68656,66492,35933,52293,47953,95495,95304,50009,83464,28608,38074,74083,9337,7965,65047,36871,59015,21769,30398,44855,1020,80680,59328,8712,48190,45332,27284,31287,66011,9376,86379,74508,33579,77114,92955,23085,92824,3054,25242,16322,48498,9938,44420,13484,52319,58875,2012,88591,52500,95795,41800,95363,54142,17482,32705,60564,12505,40954,46174,64130,63026,96712,79883,39225,52653,69549,36693,59822,22684,31661,88298,15489,16030,42480,15372,38781,71995,77438,91161,10192,7839,62735,99218,25624,2547,27445,69187,55749,32322,15504,73298,51108,48717,92926,75705,89787,96114,99902,37749,96305,12829,70474,838,50385,91711,80370,56504,56857,80906,9018,76569,61072,48568,36491,22587,44363,39592,61546,90181,37348,41665,41339,62106,44203,6732,76111,79840,67999,32231,76869,58652,49983,1669,27464,79553,52855,25988,18087,38052,17529,13607,657,76173,43357,77334,24140,53860,2906,89863,44651,55715,26203,65933,51087,98234,40625,45545,63563,89148,82581,4110,66683,99001,9796,47349,65003,66524,81970,71262,14479,31300,8681,58068,44115,40064,77879,23965,69019,73985,19453,26225,97543,37044,7494,85778,35345,61115,92498,49737,64599,7158,82763,25072,38478,57782,75291,62155,52056,4786,11585,71251,25572,79771,93328,66927,54069,58752,26624,50463,77361,29991,96526,2820,91659,12818,96356,49499,1507,40223,9171,83642,21057,2677,9367,38097,16100,19355,6120,15378,56559,69167,30235,6767,66323,78294,14916,19124,88044,16673,66102,86018,29406,75415,22038,27056,26906,25867,14751,92380,30434,44114,6026,79553,55091,95385,41212,37882,46864,54717,97038,53805,64150,70915,63127,63695,41288,38192,72437,75075,18570,52065,8853,30104,79937,66913,53200,84570,78079,28970,53859,37632,80274,35240,32960,74859,7359,55176,3930,38984,35151,82576,82805,94031,12779,90879,24109,25367,77861,9541,85739,69023,64971,99321,7521,95909,43897,71724,92581,5471,64337,98949,3606,78236,78985,29212,57369,34857,67757,58019,58872,96526,28749,56592,37871,72905,70198,57319,54116,47014,18285,33692,72111,60958,96848,17893,40993,50445,14186,76877,87867,50335,9513,44346,26439,55293,6449,44301,63740,40158,72703,88321,85062,57345,66231,15409,3451,95261,43561,15673,28956,90303,62469,82517,43035,36850,15592,64098,59022,31752,4370,50486,11885,23085,41712,80692,48492,16495,99721,36912,28267,27882,16269,64483,11273,2680,1616,46138,54606,14761,5134,45144,63213,49666,27441,86989,29884,54334,6740,8368,80051,81020,17882,74973,74531,94994,24927,64894,22667,20466,82948,66831,47427,76033,31197,59817,20064,61135,28556,29695,80179,74058,18293,9963,35278,13062,83094,23373,90287,33477,48865,30348,70174,11468,25994,25343,22317,1587,30682,1,67814,59557,23362,13746,82244,42093,24671,79458,93730,45488,60234,67098,9899,25775,332,36636,57594,19958,85564,58977,12247,60774,66371,69442,20385,14486,91330,50332,46023,75768,59877,60081,92936,72302,75064,85727,52987,5750,19384,33684,78859,80458,69902,34870,88684,49762,40801,86291,18194,90366,82639,53844,96326,65728,48563,26027,52692,62406,76294,41848,63010,69841,29451,36170,21529,16525,64326,22086,24469,57407,96033,37771,31002,18311,93285,31948,14331,58335,15977,80336,81667,27286,24361,61638,57580,95270,46180,76990,53031,94366,2727,49944,19278,5756,51875,53445,33342,1965,7937,10054,97712,87693,58124,46064,39133,77385,9605,65359,70113,90563,86637,94282,12025,31926,24541,23854,58407,32131,92845,20714,27898,26917,50326,35145,50859,72119,95094,29441,42301,62460,75252,94267,38422,73047,24200,85349,72049,91723,97802,98496,12734,73432,10371,57213,53300,80847,46229,7099,72961,13767,65654,31102,82119,96946,65919,81083,3819,57888,57908,16849,77111,41429,92261,45263,1172,55926,78835,27697,48420,58865,41207,21406,8582,10785,36233,12237,7866,13706,92551,11021,63813,71512,65206,37768,94325,14721,20990,54235,71986,5345,56239,52028,1419,7215,55067,11669,21738,66605,69621,69827,8537,18638,60982,28151,98885,76431,25566,3085,23639,30849,63986,73287,26201,36174,14106,54102,57041,16141,64174,3591,90024,73332,31254,17288,59809,25061,51612,47951,16570,43330,79213,11354,55585,19646,99246,37564,32660,20632,21124,60597,69315,31312,57741,85108,21615,24365,27684,16124,33888,14966,35303,69921,15795,4020,67672,86816,63027,84470,45605,44887,26222,79888,58982,22466,98844,48353,60666,58256,31140,93507,69561,6256,88526,18655,865,75247,264,65957,98261,72706,36396,46065,85700,32121,99975,73627,78812,89638,86602,96758,65099,52777,46792,13790,55240,52002,10313,91933,71231,10053,78416,54563,96004,42215,30094,45958,48437,49591,50483,13422,69108,59952,27896,40450,79327,31962,46456,39260,51479,61882,48181,50691,64709,32902,10676,12083,35771,79656,56667,76783,3937,99859,10362,57411,40986,35045,2838,29255,64230,84418,34988,77644,39892,77327,74129,53444,35487,95803,38640,20383,55402,25793,14213,87082,42837,95030,97198,61608,97723,79390,35290,34683,81419,87133,70447,53127,97146,28299,56763,12868,1145,12147,58158,92124,60934,18414,97510,7056,54488,20719,53743,91037,44797,52110,8512,18991,20129,31441,51449,14661,71126,23180,68124,18807,70997,21913,19594,70355,73637,68266,60775,43164,52643,96363,77989,79332,39890,65379,20405,52935,43816,92740,95319,4538,60660,28982,15328,80475,34690,2293,19646,46524,96627,33159,42081,8816,74931,20674,8697,66169,46460,46326,39923,60625,28386,22919,19415,75766,43668,31626,70301,67053,3949,70082,2303,48642,38429,94053,38770,68137,68441,52928,70244,91954,17401,92693,98342,21451,84988,80487,33807,73797,49494,41878,76635,83227,76618,11946,13451,87591,78381,21407,90038,72638,69692,51599,86413,32019,64856,74730,41531,11064,1790,58817,86400,66213,92599,70905,78324,54326,43659,34206,63132,38837,40210,96346,16967,81619,96503,14881,89405,32205,49508,98425,2451,35423,56072,36810,30332,85998,49358,92748,84147,79835,94867,41224,61794,35066,82220,66684,20096,2754,41731,37068,32753,91059,13407,5607,69384,53329,95909,44968,11397,92973,50014,92997,80968,93761,57598,74703,7768,37978,73873,33475,9720,97852,98449,48722,84977,11271,11728,68318,22312,78792,87508,88466,72976,47099,84126,38595,85124,64405,90020,7492,52413,95111,34455,86311,68892,1074,60274,28136,19328,38161,57475,13771,63562,84207,94121,18901,52768,33801,82087,86091,59969,90398,56870,55756,78841,98450,54165,55106,50343,70519,14567,36780,55450,19606,83749,67562,64765,38543,16585,86841,73742,8766,39252,75678,75379,78760,37279,15280,13558,95916,89759,76686,76467,67147,63110,94008,8037,35263,53710,16667,79008,11231,29397,67136,18601,64502,90228,89109,72849,22711,65547,34542,26686,81678,87765,77654,23664,96352,14106,32938,28083,18633,80286,65507,46197,52722,75476,77816,47204,34876,45963,79262,90181,84041,3745,90041,30780,27226,92847,85572,15308,80688,5761,82638,13464,23683,81015,54214,64175,43701,86845,15569,50687,52679,87696,8285,97444,47599,94472,64150,87753,68652,60726,26213,17320,64553,81285,98126,12158,52095,64833,492,35817,55571,91300,97812,37507,4209,53515,64342,21223,16662,43265,68219,3529,43636,68417,53640,95326,93381,37113,80751,76469,96677,43054,22937,31954,13266,34140,27253,2734,99070,60077,57988,93211,92795,83795,57477,3941,39007,14619,38320,93449,31336,25279,97030,26245,47394,39475,90621,23820,29344,94859,91604,14033,41868,14816,4075,66644,87803,97815,99552,78666,3942,8175,22345,19983,76783,99044,20851,84981,59052,77178,72109,76475,21619,73017,6812,56633,50612,55289,4671,84419,94072,94446,80603,32188,93415,23464,43947,43728,74284,67177,57105,31059,10642,13803,69602,46961,66567,19359,84676,63918,40650,12923,15974,79732,20225,92525,71179,4859,91208,60430,5239,61458,24089,68852,60171,29603,42535,86365,93905,28237,45317,60718,82001,41679,20679,56304,70043,87568,21386,59049,78353,48696,77379,55309,23780,28391,5940,55583,81256,59418,97521,32846,70761,90115,45325,5490,65974,11186,15357,3568,450,96644,58976,36211,88240,92457,89200,94696,11370,91157,48487,59501,56983,89795,42789,69758,79701,29511,55968,41472,89474,84344,80517,7485,97523,17264,82840,59556,37119,30985,48866,60605,95719,70417,59083,95137,76538,44155,67286,57897,28262,4052,919,86207,79932,44236,10089,44373,65670,44285,6903,20834,49701,95735,21149,3425,17594,31427,14262,32252,68540,39427,44026,47257,45055,95091,8367,28381,57375,41562,83883,27715,10122,67745,46497,28626,87297,36568,39483,11385,63292,92305,78683,6146,81905,15038,38338,51206,65749,34119,71516,74068,51094,6665,91884,66762,11428,70908,21506,480,94183,78484,66507,75901,25728,52539,86806,69944,65036,27882,2530,4918,74351,65737,89178,8791,39342,94963,22581,56917,17541,83578,75376,65202,30935,79270,91986,99286,45236,44720,81915,70881,45886,43213,49789,97081,16075,20517,69980,25310,91953,1759,67635,88933,54558,18395,73375,62251,58871,9870,70538,48936,7757,90374,56631,88862,30487,38794,36079,32712,11130,55451,25137,38785,83558,31960,69473,45950,18225,9871,88502,75179,11551,75664,74321,67351,27703,83717,18913,42470,8816,37627,14288,62831,44047,67612,72738,26995,50933,63758,50003,43693,52661,55852,52372,59042,37595,4931,73622,68387,86478,40997,5245,75300,24902,59609,35653,15970,37681,69365,22236,86374,65550,343,98377,35354,65770,15365,41422,71356,16630,40044,19290,66449,53629,79452,71674,30260,97303,6487,62789,13005,70152,22501,49867,89294,59232,31776,54919,99851,5438,1096,72269,50486,16719,6144,82041,38332,64452,31840,99287,59928,25503,8407,46970,45907,99238,74547,19704,72035,26542,54600,79172,58779,35747,78956,11478,41195,58135,63856,33037,45753,60159,25193,71838,7526,7985,60714,88627,75790,38454,96110,39237,19792,34534,70169,24805,63215,38175,38784,38855,24826,50917,25147,17082,26997,32295,10894,21805,65245,85407,37926,69214,38579,84721,23544,88548,65626,75517,69737,55626,52175,21697,19453,16908,82841,24060,40285,19195,80281,89322,15232,70043,60691,86370,91949,19017,83846,77869,14321,95102,87073,71467,31305,64677,80358,52629,79419,22359,87867,48296,50141,46807,82184,95812,84665,74511,59914,4146,90417,58508,62875,17630,21868,9199,30322,33352,43374,25473,4119,63086,14147,14863,38020,44757,98628,57916,22199,11865,42911,62651,78290,9392,77294,63168,21043,17409,13786,27475,75979,89668,43596,74316,84489,54941,95992,45445,41059,55142,15214,42903,16799,88254,95984,48575,77822,21067,57238,35352,96779,89564,23797,99937,46379,27119,16060,30302,95327,12849,38111,97090,7598,78473,63079,18570,72803,70040,91385,96436,96263,17368,56188,85999,50026,36050,73736,13351,48321,28357,51718,65636,72903,21584,21060,39829,15564,4716,14594,22363,97639,65937,17802,31535,42767,98761,30987,57657,33398,63053,25926,20944,19306,81727,2695,97479,79172,72764,66446,78864,12698,15812,97209,38827,91016,91281,57875,45228,49211,69755,99224,43999,62879,8879,80015,74396,57146,64665,31159,6980,79069,37409,75037,69977,85919,42826,6974,61063,97640,13433,92528,91311,8440,38840,22362,93929,1836,36590,75052,89475,15437,65648,99012,70236,12307,83585,414,62851,48787,28447,21702,57033,29633,44760,34165,27548,37516,24343,63046,2081,20378,19510,42226,97134,68739,32982,56455,53129,77693,25022,55534,99375,30086,98001,7432,67126,76656,29347,28492,43108,64736,32278,84816,80440,30461,818,9136,1952,48442,91058,92590,10443,5195,34009,32141,62209,43740,54102,76895,98172,31583,4155,66492,58981,16591,11331,6838,3818,77063,12523,45570,68970,70055,77751,73743,71732,4704,61384,57343,66682,44500,89745,10436,67202,36455,42467,88801,91280,1056,27534,81619,79004,25824,66362,33280,20706,31929,57422,18730,96197,22101,47592,2180,18287,82310,60430,59627,26471,7794,60475,76713,45427,89654,14370,81674,41246,98416,8669,48883,77154,9806,94015,60347,20027,8405,33150,27368,53375,70171,59431,14534,34018,85665,77797,17944,49602,74391,48830,55029,10371,94261,16658,68400,44148,28150,40364,90913,73151,64463,50058,78191,84439,82478,62398,3113,17578,12830,6571,95934,9132,25287,78731,80683,67207,76597,42096,34934,76609,52553,47508,71561,8038,83011,72577,95790,40076,20292,32138,61197,95476,23123,26648,13611,48452,39963,85857,4855,27029,1542,72443,53688,82635,56264,7977,23090,93553,65434,12124,91087,87800,95675,99419,44659,30382,55263,82514,86800,16781,65977,65946,13033,93895,4056,75895,47878,91309,51233,81409,46773,69135,56906,84493,34530,84534,38312,54574,92933,77341,20839,36126,1143,35356,35459,7959,98335,53266,36146,78047,50607,22486,63308,8996,96056,39085,26567,6779,62663,30523,47881,41279,49864,82248,78333,29466,48151,41957,93235,53308,22682,90722,54478,7235,34306,15827,20121,96837,6283,80172,66109,92592,48238,76428,94546,45430,16288,74839,740,25553,83767,35900,5998,7493,46755,11449,88824,44906,33143,7454,56652,34755,63992,59674,65131,46358,12799,96988,51158,73176,1184,49925,63519,11785,29073,72850,47997,75172,55187,15313,40725,33225,56643,10465,38583,86440,97967,26401,17078,38765,33454,19136,57712,48446,98790,27315,71074,10157,57946,35582,49383,61324,26572,84503,3496,60449,17962,26017,65651,40400,83246,80056,75306,75147,41863,25581,87530,33193,43294,5065,99644,62771,75986,79005,44924,18703,40889,4403,5862,2571,82500,74200,36170,46836,74642,65471,26815,30937,64946,10160,15544,31962,54015,28853,66533,14573,79398,47391,73165,47805,77589,16881,13423,89452,76992,62509,9796,57540,13486,48855,25546,47589,21012,47388,78428,70196,84413,81026,87597,22445,83769,85937,38321,85485,87359,9839,67228,71179,94372,4446,62801,50775,96179,40646,44272,12417,47199,39701,30665,32775,66525,53558,78882,31939,67209,38906,34533,99914,27719,216,99225,96537,3843,90564,91110,51838,30300,9559,37795,94880,11325,44979,89696,28129,29931,89971,46292,92710,11036,74760,75307,12291,49618,16293,92408,67928,80823,32872,25460,66819,35374,4035,99087,61129,11341,39118,10891,37217,63638,75477,30068,42334,57570,6890,59353,89939,37692,15232,20033,32202,22348,2766,96791,58448,92248,5769,96684,67885,99295,47271,38655,59513,96960,31718,8974,16122,20535,52380,29769,70660,57425,50891,75044,84257,73315,38181,28673,93140,26307,82265,78382,19681,56585,8975,76764,39956,83450,84663,89963,71584,57696,30829,60527,64947,34899,28805,28397,91830,51842,99838,39839,66971,67177,74219,35637,35634,93581,81746,29991,81096,94279,2968,62561,2479,82126,25702,67953,88088,50293,83423,86206,39935,23253,43041,48941,85787,8388,6671,43574,84908,67295,33623,55060,28174,48415,2529,22009,24524,5283,30460,32399,80423,56929,40852,69969,88541,5979,91496,64730,57198,83145,39750,3568,54669,98679,4297,51047,31492,47734,31343,31180,232,19707,24823,75079,73943,17997,8446,91252,39879,58682,82972,18417,39203,36681,42895,8459,15618,17941,52594,43277,16530,40052,91100,87422,47230,95699,49794,50492,87439,86354,4546,65333,11057,77727,19748,38722,91821,18107,42125,89239,28847,54623,38783,47803,31414,38450,3697,89186,30579,44188,26532,8420,80723,48100,60748,76330,45832,8311,16051,4475,13400,48527,46073,17439,56498,94632,9021,16871,83366,14896,4219,38375,87890,90217,42370,61028,85101,76771,83715,94737,69973,74187,1958,59691,86712,86570,60984,76342,13648,85250,28323,48379,45141,36277,51845,29039,3553,5128,59866,51281,68124,17007,24729,29710,41439,40574,11774,86746,89698,56020,37810,88972,11361,95583,70786,589,74473,87513,17690,61427,72914,32517,1804,97910,6327,30246,33049,2622,41026,80875,41293,16752,84225,84414,37137,68956,8095,64981,28180,38629,76962,23840,17477,75268,48297,70340,57888,13938,38554,86836,2195,30270,55484,53364,54705,41380,56316,37723,234,21424,26664,63804,75139,36534,18579,9833,98849,72762,59767,52497,24227,83152,71794,21398,99456,89215,51632,54799,27973,68568,68465,98500,28681,18369,24279,96335,12874,82160,67202,85199,27908,67022,49810,77929,96212,81153,77884,7032,1671,53362,28119,56786,30883,28540,76029,3774,64611,19736,25589,46569,45206,48215,69523,17423,91807,90039,30393,58319,85098,66519,57571,24541,3562,14400,62731,82534,61477,89731,18421,29861,52829,838,78040,43350,74323,82892,84746,28302,13264,7595,134,12933,46831,24864,47275,20527,9110,28485,30326,99826,64005,99308,65779,42760,90066,3974,38688,39968,32604,11694,46262,73262,45405,43923,67397,88228,56405,17839,92073,57622,93328,15442,50186,7570,58001,31e3,8915,11467,14793,82691,51238,12485,51745,18192,5985,36826,89434,38669,91592,88799,65621,67237,59541,19657,93402,58705,73553,78280,69125,95591,81168,91927,25976,89077,71690,19404,64603,59752,74698,44233,67602,38615,31303,28650,53700,89819,7783,4351,77451,47350,21234,16016,41532,76508,23063,44993,43983,33356,61715,96485,22121,78004,6316,87896,99289,93981,37850,66128,92735,45064,50924,24204,58816,65290,34392,55567,66416,72353,45775,68590,85685,72683,60090,37149,85347,57414,72336,12979,5720,92754,76911,96883,74420,5220,85815,23557,80567,44365,70254,50864,36619,51479,23281,76428,18580,34240,59289,49076,18439,29522,42541,4024,84446,92434,90407,77241,19690,78143,65919,13699,91844,91241,38361,67171,90551,5709,3474,76025,97043,33834,44638,54040,82797,545,38159,16089,35870,89158,55864,98078,50563,36492,10994,85909,9018,19252,73887,67928,60045,70782,11937,4074,53814,46621,52577,94853,45968,73667,65062,73306,76045,78649,91654,53958,96537,95542,67622,54579,17279,67440,56441,20681,64011,52226,96618,32831,60664,67547,39523,2043,59748,1887,69229,94653,99271,98164,62155,9234,47367,13047,6364,35064,10073,6793,80248,29009,44969,11129,17139,79630,89772,26921,56949,23465,30036,17173,82459,96218,60768,76417,24405,18710,68887,82394,69729,82503,40873,41590,67255,30757,9657,91881,34578,9511,5417,58953,18532,10721,22029,48524,47778,881,83489,3464,57462,97459,86689,39755,39547,740,36666,7993,31671,86304,12970,73402,52849,31652,79655,11250,18463,57518,20306,25301,1374,51208,33298,87662,61849,60923,68685,69411,39266,80320,34844,89416,81569,83651,35795,40168,33501,1042,58931,3892,85188,74740,85476,23790,33842,89565,53359,25579,59049,62394,72435,12457,21904,18370,97035,57905,9581,91227,92754,37760,1411,7440,87175,88318,63242,85960,56690,12618,30493,11569,73723,7448,58830,157,65814,21118,22140,73793,57855,81830,6795,13183,12625,30635,56429,73216,12342,36722,83886,96828,82870,90954,97614,2370,42160,73370,11944,49067,59452,80495,43911,46712,17033,68037,41963,3874,44856,82985,57453,84358,16120,4454,76624,405,62369,55080,61880,51270,87807,10653,36894,70850,35660,234,14705,93418,94084,82856,25384,71555,56754,78315,18291,91656,98079,52384,43306,65205,75903,58701,99496,50048,33557,87793,90857,10143,46726,84284,43635,41213,83845,70986,91408,80220,5728,68890,46577,21152,43759,43301,93661,97252,50106,10099,13722,18572,44024,351,18173,23717,85114,85998,57782,63951,53723,86853,63851,79430,49181,46386,69666,55743,76162,71724,40028,94786,34457,16906,90040,30789,40281,94697,96584,81907,4055,53990,66397,80579,42517,78181,39251,9467,67097,95523,66568,63632,71048,15581,39904,75774,77495,75994,29911,65690,41178,47712,70355,16998,56025,5230,10093,71495,34784,70950,54680,57811,53782,39145,36829,85342,40406,35883,45668,3459,29870,78252,70088,70621,67153,5737,40933,91075,93335,86853,15860,81167,91259,16118,52401,83593,84474,2423,75608,39646,90871,70284,82100,96032,5115,63678,2225,88087,58581,44364,57468,21539,13042,64150,63754,5210,87644,54114,64013,63562,41388,32397,74152,23982,71982,71700,33026,66477,47838,46712,39848,35083,65927,97868,11067,76771,71799,43836,41014,97025,93225,8511,63096,26628,73012,12543,76269,99708,2629,49845,73677,19193,14924,57236,95564,15010,59667,73773,78515,2624,99744,13585,33746,58771,94785,62628,99585,11363,80832,59979,9444,78700,2596,85984,69438,16913,96475,93283,18625,77086,45911,39746,64722,39938,43930,54619,302,50384,2738,75714,75249,95439,80714,52555,47266,96190,78750,94973,83669,16479,53163,48071,28e3,45011,26733,67132,83362,84162,43028,8415,27236,52651,89059,64844,80910,1676,91752,57815,26264,3415,57532,29981,61200,96036,62600,20068,56530,38487,8432,89514,26883,69165,97237,22361,55276,39902,95927,82190,49269,27212,46095,37106,64254,27460,49572,51700,27679,12574,33891,3867,9925,6476,82018,45094,59014,67113,44192,75,23318,79895,70550,81717,28833,30271,15821,14999,88174,62617,57517,55256,50281,51583,96879,5225,42272,5339,20483,57596,41011,75937,22767,50120,95938,49753,63882,99616,69083,38721,73889,80236,99531,23053,71237,48861,59046,76283,60538,19732,93877,30345,64882,66660,17026,70364,45676,8039,96228,89936,59141,95585,89552,97247,59325,27848,80058,15950,61481,90906,40998,44137,16144,66300,44091,50018,81364,18211,60294,76559,20279,27414,10589,39860,23e3,31767,95618,56738,50332,16936,70342,92481,30702,76264,62619,68678,62284,83112,93032,55203,52614,36950,41796,45403,79262,2887,53596,61308,20738,34811,27099,90956,65448,3080,75795,29753,97699,80872,23830,85882,74427,99523,74904,28017,45898,57232,48525,7086,26805,74533,92470,18840,76011,93109,14344,55614,50284,15865,19458,35856,13464,53679,64603,51571,56124,79107,29596,89572,78198,57121,73649,8804,87977,87959,70859,40909,77295,87877,75158,62810,92074,23244,59516,50552,31602,41899,6347,27821,68370,48596,88577,30231,25267,84622,31449,12086,56461,22962,78213,62483,93966,60437,52239,58113,32526,38708,81607,57016,1695,90110,4649,59990,23979,3855,10297,46516,96092,82305,30760,78756,4967,82876,4773,86651,16648,53133,82439,78851,49766,24553,15273,36417,1901,33386,76979,25920,33372,2695,11982,40911,6230,91696,43907,17827,30332,89203,32215,91806,23080,49102,9174,11548,54590,75803,66108,73882,62324,26017,72716,33887,1285,31604,71039,24337,53514,58964,89901,22040,92751,12617,37007,5523,61672,62557,98540,26094,60284,19621,96230,38044,6545,9458,42988,2913,86345,67936,90174,40840,44991,24256,34989,74086,13652,68706,1363,4294,88008,78693,83068,94746,221,89299,53186,5930,61889,51341,45412,58860,72568,11381,59785,36887,10690,31347,93326,96267,86987,57565,86836,49071,90331,41248,34629,30240,27270,3864,84308,3035,61369,36902,51017,44409,17120,23823,36460,63359,8333,63173,19134,6493,303,18550,26191,19051,81502,66343,6737,90430,65478,58982,82484,16483,47704,44640,68322,44548,72787,2335,28749,39320,5436,98146,56596,812,51445,35533,35478,47573,38414,25542,38032,13442,42983,97207,77854,57806,81616,52828,79429,47389,96795,57764,19605,24767,63253,18809,65093,44449,22952,76872,30983,38948,9310,48336,87651,27110,84427,76209,56412,12760,16747,14551,82626,31224,98636,75100,84882,79479,83420,5347,6803,90063,4617,40257,79183,41766,71873,25242,12275,336,40798,42055,74066,69128,32547,76508,32530,42359,89207,49758,58984,92732,15779,7234,28884,28226,50011,35883,99606,45423,76224,75427,85747,33879,97978,57441,927,19164,74716,40702,19715,70917,60344,40236,9019,50577,15598,53136,57285,20536,7539,74832,89184,41501,39447,97422,97041,21913,40581,76081,13089,28776,54164,55736,36263,71841,34488,74988,55467,43322,9214,36746,67981,71877,81683,32461,84091,19422,88366,62054,85664,13409,8003,88276,6989,16607,33633,85349,5784,25950,97998,74110,16699,60184,92818,79705,10381,1474,18656,50434,18232,92132,66537,70141,42854,25120,39581,28249,14215,34810,19767,3409,11807,6566,66138,42997,41999,67504,87117,28961,5e3,29673,77726,73225,54753,69712,71576,92337,17713,63185,87923,91889,68351,17712,75532,93849,48280,62219,317,25290,29209,90927,92929,92762,60413,2018,31793,76290,73373,80777,60819,77375,57886,47291,99670,32605,29064,99476,80999,31217,35,91300,14892,73653,26593,25305,56797,12837,39560,27582,37253,38531,76489,49946,69108,58687,43092,73807,96282,6648,67431,87124,57694,21660,64002,6,33600,30245,60636,80164,9285,61426,4658,54130,14710,76553,1904,93668,63110,98618,5601,32199,74923,98049,49717,55539,35940,58545,43295,35810,45451,38735,42065,66769,69825,45461,83881,67372,67351,90612,79502,69460,23108,74421,82990,46821,40683,71603,55267,48192,50242,79738,96417,6664,19929,23644,41116,51056,219,45086,32747,49492,15399,24874,80825,95928,61457,45813,59037,16136,3953,83583,5910,12654,53630,92997,22168,93491,71897,74579,24022,6278,24049,71670,43044,8474,38572,77402,35800,7455,96177,41653,74493,20802,65843,73050,73349,2638,65813,96209,49196,45007,32207,14097,66059,46681,7534,71263,20582,10171,51514,52142,60961,57951,25637,37860,21683,86190,90434,94481,85697,95344,2606,74095,61133,7472,64777,94050,41482,975,23471,76052,82021,87676,91345,20196,2612,86299,44996,40312,65712,46079,88514,8610,3685,63197,9073,53105,86824,28112,99306,40706,66840,83003,51590,52755,32285,68454,85058,13645,23073,24724,52989,71880,21952,44144,74975,76715,7844,46447,86643,75579,29276,10864,83179,36721,19300,35066,29383,47478,56644,33354,31414,17643,92374,85085,88458,87191,85248,34963,76278,53230,13953,76985,70959,36663,5293,32658,56767,56997,76736,6558,64248,11907,29123,78458,17678,63805,89973,5076,39263,54404,4355,64957,74407,99838,18836,78098,6490,74888,73719,80675,86178,56283,33591,96957,38382,18772,74773,71229,2603,52673,44609,14843,58418,18060,95459,626,30914,13550,42195,44863,8871,89182,64446,78422,41140,15312,98274,48168,95651,35562,85386,56252,72136,85088,68761,78434,98143,61330,2446,64409,49406,99127,98626,55095,44808,13594,87370,89472,12833,98932,68064,58193,20225,5192,28425,23978,24542,80845,55858,4015,21454,37346,51007,17202,10242,12682,55933,96922,22280,75597,50227,70712,44236,20470,36320,49339,60536,80083,38880,93327,49522,93585,9918,55268,4671,57526,11457,48424,54610,7211,78610,9473,72923,27347,30057,76968,26177,59367,46172,88951,40229,34921,60405,88959,16779,29547,92231,61997,36002,21080,39795,77221,10012,49748,76900,15964,3803,40260,92351,92844,10288,57483,10881,70408,75688,16610,1638,93082,44282,66849,75702,69428,34047,84968,71281,72328,73143,88672,49802,50639,18129,93659,58389,49095,45971,34196,84609,59222,19332,17777,41004,47057,30688,16039,20906,41477,42915,60877,33864,75195,62294,3371,11672,1370,2486,35553,17907,90621,45136,9722,67635,12114,63055,16004,21625,24321,20491,26881,66259,94287,54751,36242,36557,5842,30687,65418,94608,24741,45887,78800,86912,42076,50287,9284,68891,76368,83094,96302,35997,30761,97081,9501,68887,32876,1705,34260,95065,45528,88241,30402,12318,52430,40139,96986,84900,72408,42027,31676,54382,73370,26184,14024,57444,57660,52173,30274,93448,63273,77681,74946,2099,69091,19372,66961,14595,58642,75760,52253,53148,26074,52293,65359,63971,4833,86492,1227,54505,19515,89889,46933,13364,33883,83389,36952,52505,67513,40071,31001,3105,87912,29610,75108,37363,28479,43546,89992,19550,54863,82633,19209,21548,35022,21960,57961,11815,95867,559,26428,69386,57453,70147,73538,49562,46806,64550,36653,25718,68792,31113,7607,48037,71020,22666,65957,11141,39227,7990,19849,65972,74528,40888,55386,95918,92088,91125,53648,66122,138,79933,71058,34826,97725,69513,22915,18246,52244,91161,40861,40374,13239,56162,4703,95851,22824,41271,28202,62852,84238,46625,20031,8524,20077,65817,21174,29279,57712,22401,67500,30980,74485,26480,21343,30031,61921,35744,57308,71196,1865,49234,62616,54021,29008,83672,85839,96836,45077,80900,66906,63526,93824,71820,11033,20183,85704,4683,63512,39144,56880,64424,95979,17709,94849,31771,5737,84286,16757,46256,24478,73180,59978,8254,78963,95437,86351,33824,32540,18357,2668,99260,21284,81351,70961,10255,6911,47394,72408,23827,59865,96395,30665,43699,3593,29165,23388,26628,92402,16731,86740,29493,9069,78653,90094,42735,33682,95041,89887,92369,57949,81585,50593,14698,4737,72551,57271,59433,156,33966,58773,59108,49578,18100,59836,73221,21110,1650,11058,47770,66141,84576,58388,40915,94507,32209,17272,65674,95552,25685,5345,36995,36302,7971,67001,62062,75939,36005,26739,56484,46885,66348,87666,78055,44485,82955,85936,9219,1847,92687,72579,45457,78252,98239,4e4,75563,92408,17175,78845,32638,26959,35406,59553,57852,7506,9,93172,77713,93880,40981,27924,9678,24538,52426,84852,83781,23712,82490,77890,22482,66668,55850,25644,44972,62275,78089,28894,98685,32998,98766,89119,34355,75127,69797,71419,62067,57990,96514,50603,79807,26135,29207,43632,32905,38513,18924,88872,20758,70232,60425,1116,24077,21369,93541,75329,78656,44251,42014,98154,42552,14575,30765,348,1134,71581,68420,78141,21105,63305,9718,54851,65867,8595,47390,39182,51174,41478,64433,59628,31945,87322,78667,95282,5622,26224,19972,97269,98376,14779,51138,49658,45345,4972,52794,15737,496,48939,63485,42780,16061,59631,37171,13483,56058,51093,62290,88227,17400,88433,67363,89507,26482,85964,71336,67799,28342,37747,61722,27180,78755,18603,42953,6606,23875,56766,1932,36113,62807,84012,21103,9685,69662,76755,13701,95168,13169,44726,15284,16702,89617,54397,52052,12835,37741,86434,22400,37947,95763,86337,35189,22756,47473,16618,42479,47405,14055,64262,66670,89692,54032,94591,44149,29854,76691,33263,62048,25116,88598,16119,62116,54517,31883,86707,18895,81790,71294,2684,15292,48107,14341,91416,75609,92564,39987,2283,89970,95855,80970,5432,89860,90293,99851,94648,5598,32171,28793,92305,64244,8277,93391,96717,34464,29838,10664,28050,60122,77934,10758,84922,92220,45071,97697,36368,17792,84792,76594,67319,51886,5665,45201,11348,9254,7510,51039,91683,84500,85338,5555,19633,3870,39576,41486,58524,54508,20707,58504,39642,22454,80069,83455,31043,90794,51934,3295,26582,16300,74990,22197,83310,69642,81113,58558,84833,17105,46659,25003,85749,44829,4103,67516,76458,52392,53546,70291,98846,67315,30686,18555,29755,5923,22732,19501,56181,85351,5023,4808,56911,16793,75336,49712,27723,96974,34321,5454,12862,71924,45928,95697,68664,58183,78104,42483,71204,99628,40642,56410,17350,13396,76724,87509,9158,83708,27298,92651,95086,38851,63558,89810,1580,32518,35795,26514,56322,78635,63731,91428,7247,66460,38671,26799,22549,47991,46064,80467,40083,17141,39152,99872,27561,75389,74778,94893,82935,99076,93419,10474,84436,47536,16719,60136,80566,28404,74525,74212,3704,65516,98197,34210,64140,22238,49939,99542,27481,21992,78181,90060,71365,66935,29578,14961,8569,9454,43308,66753,45972,93572,16382,87320,37183,25478,38164,31997,69856,60898,63968,62264,4799,17591,89937,73905,55890,88285,2448,40398,54180,65869,45155,43407,39105,339,51619,20203,21189,68245,76912,1222,76411,82679,7,66047,32043,42627,16638,27019,15248,66444,8249,18790,82150,54084,84469,3426,50226,99868,88894,43769,66384,8593,41414,2976,60053,51866,87904,74135,53842,59520,67482,16995,32328,29555,49067,2799,68851,41049,97190,53984,99755,46412,45885,64e3,21962,36438,71742,57223,66599,86071,31436,32667,98099,38399,47377,5171,2742,48803,17823,22093,9866,691,5514,25546,2114,5919,56181,96052,67211,61712,25995,3188,23833,38549,44775,55355,61548,55988,47309,23749,30667,70732,33299,16127,30842,78961,41072,9876,18903,30292,25275,61881,15939,72573,84502,92654,97226,53434,77025,63892,12421,33644,39445,30933,84218,13757,37719,84450,2697,60309,22402,80310,92771,45205,72792,95776,85945,74651,216,50842,47854,21916,61588,75405,10495,83083,60427,78495,99809,47890,22993,21508,9459,26845,98130,1184,46438,27698,40652,65654,98517,1096,6998,49133,57041,77983,58708,42176,67356,324,70063,10597,65205,25622,34336,16640,27896,26907,86760,48244,89650,44997,51609,28934,9171,97859,97213,19859,41037,64081,94781,27683,41521,52871,86935,26486,38744,25943,60617,6414,42292,46204,53262,30201,38776,88831,97253,67282,72860,18452,60927,81504,57713,30296,10896,39900,67135,42772,4631,55283,39253,25264,1809,12874,88035,88421,90491,83290,6884,15444,90113,20406,20796,40239,34431,15018,45600,17241,26611,9551,89126,65673,31708,91252,39647,63011,24193,58932,89326,33491,53217,27976,70151,37531,53576,23931,11789,73073,52171,89301,51718,15385,79487,66436,35771,34163,86540,42665,80748,77622,14679,40185,25030,42622,13162,17048,24243,59985,59807,60562,3595,10135,29199,69784,59796,38194,58432,50943,40422,63035,3208,81440,90749,88046,32218,88092,22224,2627,91576,16781,43948,57795,71073,27817,87077,82717,24473,42096,76920,88864,90537,14715,42551,45066,24316,37361,38582,21871,14672,93362,21727,57021,94313,39562,64985,94028,46094,43845,91838,79574,7597,3153,56783,18817,74711,6883,91061,31674,73729,99315,66183,57647,74484,68077,33224,397,56753,53158,71872,68153,9298,20961,49656,33407,95683,14328,44708,72952,27048,67887,28741,46752,88177,95894,40086,88534,87112,68614,83073,88794,96799,67588,75049,84603,83140,97347,87316,73087,77135,71883,98643,3808,8848,14133,60447,1366,72976,1868,51667,63279,60040,88264,79152,3474,61366,20523,21584,93712,83654,89761,90154,96345,37539,32556,74254,70603,97122,44978,78028,8943,13778,11080,34271,68276,85372,48410,94516,15427,75323,71685,70774,50342,33771,3678,42321,69788,41758,55004,30992,17402,63523,42328,87171,24751,15084,33884,83655,88345,69602,52606,57886,18034,3381,75796,35901,77480,28683,68324,66035,7223,14926,16128,13645,90370,31949,11057,98849,29499,21565,30786,83292,92392,37104,36899,49906,79368,43710,80365,88735,75275,21664,57965,19002,301,12658,94385,1717,96191,50404,80166,93965,24688,27839,10812,31715,92127,42588,93307,80834,11317,26583,25769,98227,14884,58462,29148,68662,26872,72927,79021,51622,29521,33355,45701,45996,33782,93424,16530,96086,17329,74020,11501,46660,5583,22277,77653,55430,84644,448,86828,58855,67451,95264,67386,82424,52611,60012,88620,72894,94716,22262,99813,69592,63464,33163,91857,47904,22209,78590,68615,52952,31441,41313,18550,72685,68825,4795,53971,14592,39634,23682,76630,2731,81481,86542,23727,54291,56045,61635,32186,9355,73416,63532,24340,18886,84832,30654,48543,18339,65024,91197,64624,74648,9660,27897,49771,11123,8732,49393,12911,72416,17834,18878,62754,85072,23727,56577,51257,83291,12329,16203,91681,68137,79959,43609,58987,2026,42969,59144,84349,75214,76972,22633,64104,53799,16851,99197,70476,77113,46320,88693,37711,96536,68156,7119,2104,49435,77706,18924,24957,92406,87148,70482,36491,42605,54440,7893,31618,35707,65130,30007,75706,77266,37100,9601,87681,42543,69847,81848,32034,49429,99434,62209,17125,55227,61634,52574,83649,28725,70119,62467,80676,21192,99584,21310,25292,72781,17186,10393,98390,19789,92931,36234,62627,23437,3885,58822,82941,43806,8172,23790,72295,36196,98200,2889,87619,13846,56197,27151,21238,48794,81100,62643,40001,39243,33213,78416,194,91369,79342,36404,52308,13741,24442,88610,12659,11574,70052,93039,79367,41792,61816,35435,47192,97596,28330,41145,16918,62865,9576,45857,68737,90124,16703,7071,48433,57222,34435,800,72496,16449,68187,28739,97672,86818,50768,40807,88681,64340,2224,19703,59245,90905,31239,84216,93942,97371,16842,92168,52692,16064,84686,89444,27938,98406,41365,4515,20494,18813,16242,10634,61566,18592,78057,8720,33739,78345,87693,30242,70545,55521,23687,9160,8655,38811,61768,7228,5567,5561,82071,85,50145,23113,97761,88441,14891,72188,85166,37189,75671,81377,92470,73645,93258,6610,12185,43065,26704,47922,56650,7527,18006,56948,51675,16658,66402,1047,81624,77395,62310,73262,66050,57275,32936,87641,51528,58183,21952,84098,28913,28622,18140,89796,41317,93954,67690,64667,57092,21315,4731,76115,77291,11204,8634,93034,27411,27149,13843,9817,9407,84492,28444,59901,14592,89654,66207,66232,80293,74502,36925,55515,10121,16768,4720,71502,40500,21406,571,87320,81683,42788,86367,44686,22159,67015,35892,49668,83991,72088,30210,74009,86370,97956,2132,93512,54819,26094,51409,21485,94764,85806,13393,48543,7042,76538,64224,47909,9994,23750,17351,52141,30486,60380,86546,66606,36913,58173,45709,83679,82617,23381,9603,61107,566,6572,64745,10614,86371,43244,97154,10397,50975,68006,20045,16942,25536,74031,31807,70133,78790,40341,68730,39635,39013,66841,44043,96215,21270,59427,25034,40645,84741,52083,54503,36861,27659,95463,53847,40921,70116,61536,56756,8967,31079,20097,76014,99818,16606,19713,66904,27106,24874,96701,73287,76772,6073,57343,51428,91171,28299,17520,64903,4177,36071,94952,59008,28543,11576,74547,13260,20688,41261,2780,6633,37536,8844,95774,49323,30448,14154,83379,71259,23302,68402,43750,88505,15575,44927,6584,29867,21541,65763,12154,86616,79877,73259,68626,98962,68548,86576,48046,51755,64995,3661,64585,81550,46798,49319,50206,22024,5175,12923,23427,55915,91723,55831,83784,81034,86779,34622,84570,18960,48798,42970,95789,39465,82353,68905,44234,18244,54345,5592,89361,14644,67924,66415,89349,88530,72096,44459,5258,48317,48866,56886,90458,75889,4514,37227,11302,4667,2129,80414,86289,15887,87380,50749,83220,50529,20619,11606,36531,23409,78122,19566,76564,33045,66703,30017,35347,35038,12952,13971,3922,98702,11786,38388,69556,76728,60535,59961,23634,42211,98387,34880,27755,93182,99040,96390,65989,38375,3652,59657,57431,24666,11061,64713,85185,72849,58611,31220,26657,77056,24553,24993,5210,89024,32054,46997,92652,28363,98992,22593,97710,47766,37646,93573,95502,33790,92973,27766,62671,89698,10877,73893,41004,96035,18795,48080,59666,30241,35233,87353,43647,13404,41982,19264,29229,61369,8309,39383,42305,25944,13577,51545,68990,69801,37145,79189,55897,57793,66816,21930,56771,79296,73793,21632,42301,23696,72641,56310,85576,3004,25669,69221,32996,23040,65782,23712,13414,10758,15590,97298,74246,51511,46900,36795,38292,3852,6384,84421,3446,91670,45312,27609,87034,6683,83891,88991,16533,9197,34427,60384,48525,90978,46107,21693,12956,21804,46558,37682,81207,85840,53238,35026,4835,53264,41376,17783,64756,39278,25403,33042,20954,31193,24247,45911,92453,25370,86602,48574,57865,26436,16122,76614,17028,21262,59718,77821,14036,31033,90563,45410,15158,90209,84089,38053,60780,54166,14255,33120,27171,71798,91214,80040,56699,12475,40193,59415,4769,75920,1036,2692,75862,16612,73670,61182,3305,90334,187,91659,28063,75684,50017,82643,9282,77376,85469,8164,5584,36623,82597,83859,3435,98460,70095,80257,4381,6501,8924,35514,14297,54373,71369,5172,15955,82441,4636,48215,6821,3385,17663,40107,55679,30366,42390,95895,16083,58499,17176,55993,51034,49296,4010,78974,35930,2019,96226,27167,68245,53109,59037,37843,79243,10262,58797,61490,82590,52411,54783,29447,94551,30026,97959,93939,73217,82573,62154,78291,33728,39102,11484,86210,43794,73553,87435,1110,77108,56521,78610,8254,1842,43068,70415,79195,26136,49786,47279,38471,20379,54704,86614,91138,51595,50818,80186,73087,17262,94735,4952,27935,4928,74862,51392,62388,9570,38485,30594,56278,47395,72762,94597,72279,16010,34697,54475,67874,78014,88381,4045,41494,55178,46054,24373,1824,55333,7525,97908,61178,84635,2199,35361,4803,21907,79414,66083,54782,58692,28332,41851,28198,55819,37313,67046,16147,90478,71230,34141,85002,44332,35906,429,39744,773,22909,19536,98986,90945,45209,85439,92265,25291,22775,60611,49159,95701,36113,53923,60824,84935,29656,50007,86624,61691,76150,32187,42765,60660,13859,10792,88210,29374,29563,45188,28811,19739,67649,73775,99247,48414,91067,68253,9452,90116,91737,73979,62370,69112,58791,20349,71480,56852,36919,87977,77609,68738,85159,4918,70076,46473,4122,57713,1426,50987,77910,66211,62546,77749,96462,34304,77441,12104,91805,10287,60943,49632,83116,25716,23113,22707,77770,31176,6759,46130,4739,55554,3843,31653,70834,72877,41561,36903,23010,6663,2266,16360,70118,91936,17098,77278,4880,23484,94970,41826,46733,93484,68350,38861,18134,32936,241,24803,13876,93278,5039,35873,44418,5305,28510,36115,46717,15238,78607,23464,68635,55712,55007,92411,65739,4858,67537,37041,67453,89801,45963,14800,14225,65655,80463,9716,77255,65136,11230,76323,81433,36445,86523,61058,59560,19380,40791,48073,29626,36661,87907,57369,41623,13705,3880,45088,55444,41003,27754,1450,75312,71801,99600,60719,54182,29245,63315,73758,42973,32702,10855,56363,14638,84424,27178,78195,3133,70865,48019,26117,7151,52107,85562,41347,50486,69457,86961,95482,11857,93587,45680,42145,13029,10043,5142,49213,54525,85761,42707,70754,33768,87671,85038,58900,88438,20004,63390,14815,38875,73417,82875,89481,55517,944,15773,61814,32915,27868,5510,21916,28426,89881,16680,88850,11056,51991,4230,39107,49216,40065,4523,75848,95349,56034,10724,9885,88232,42478,65702,95696,39746,66032,88082,86905,30007,75068,66629,7358,26706,90511,72843,67857,20061,98581,69682,38e3,14186,70,2290,17269,30909,69449,19997,13275,2444,84985,51290,97641,15092,69650,21920,19617,7418,49725,91090,20805,28627,80665,67192,34697,57667,99323,50101,40587,35081,14037,34414,19898,60779,83267,87499,29596,41852,15813,32419,72232,8322,39184,46525,13833,65743,94595,37363,4711,35386,96413,10627,62625,56555,12919,93218,25191,98380,51923,66181,5788,73491,1452,487,12277,45415,11884,61300,94528,9181,26616,11455,31514,63290,45035,42759,33804,85721,80979,46010,50975,72482,31231,3086,58941,46102,25773,89742,29788,96741,88523,14922,88262,76305,57676,93259,2396,69145,26074,30056,3853,75317,56639,66203,38923,48939,22813,91864,10934,6714,84099,25631,73223,95630,97552,45950,22197,42886,33764,1263,41856,82057,62349,94091,78028,62651,18911,5693,92561,97821,41994,92343,76785,22216,4203,5038,86151,23596,24338,77181,51761,97693,10955,98159,37568,58932,72128,27303,99608,31688,57557,91022,43036,93927,32869,53653,55205,33139,47271,31224,51650,36422,86857,73799,22068,43376,84760,44898,65776,42451,71480,38509,41673,44141,75918,95652,68981,83001,48815,98086,67950,27986,33175,43624,55274,71051,61124,51550,64967,31570,15748,19159,38174,51078,79811,39183,57527,96550,85168,28824,47466,56993,13151,96664,29735,70251,1079,4314,77714,11507,1440,48415,31984,99915,20282,26524,18057,4992,40521,98108,84045,91961,79256,72244,25788,5487,23595,73302,14205,8925,27625,64343,28821,37992,67156,83320,31106,10884,30735,15067,51091,15668,48777,50770,19169,76504,41165,29749,92812,8065,66782,26841,1411,95461,61134,18699,52261,60469,81373,44825,11448,73320,30151,56991,31372,6655,36472,86292,30247,30931,21029,53410,9859,37267,47514,3492,49008,94727,25234,40546,53417,36492,25723,76227,58456,15979,34876,9574,34392,3751,36933,83921,65108,63135,67572,40184,21098],tn=new Array(16),rn=[16,8,16,24],nn=4,an=0;function on(){return nn<0&&(nn=4,an++),en[an]%Math.pow(10,nn+1)/Math.pow(10,nn--)|0}function sn(e,t){var r=t-e+1,n=0,i=1;do{for(n=0,i=1;i<r;i*=10)n=10*n+on()}while(n>=(i/r|0)*r);return e+n%r|0}!function(){for(var e=0;e<16;e++){tn[e]=new Array(256);for(var t=0;t<256;t++)tn[e][t]=t|t<<8|t<<16|t<<24;for(var r=3;r>=0;r--)for(var n=0;n<255;n++){var i=255<<(r<<3),a=0|tn[e][n],o=sn(n,255);tn[e][n]=tn[e][n]&~i|tn[e][o]&i|0,tn[e][o]=tn[e][o]&~i|a&i|0}}}();var un=function(e){function t(e){var n,i,a,o;return r(this,t),(e=e||{}).length=e.length||128,e.rounds=e.rounds||8,i=this,o=[e],a=u(a=t),(n=s(i,Jr()?Reflect.construct(a,o||[],u(i).constructor):a.apply(i,o))).blockSize=16-n.state.hash.length,n.blockSizeInBytes=n.blockSize*n.unitSize,n.W=new Array(16),n}return c(t,e),o(t,[{key:"reset",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=Vt(u(1&3?e.prototype:e),"reset",r))?function(e){return n.apply(r,e)}:n)([]),this.state.hash=new Array(this.options.length/32|0);for(var i=0;i<this.state.hash.length;i++)this.state.hash[i]=0}},{key:"processBlock",value:function(e){for(var t=0;t<this.state.hash.length;t++)this.W[t]=0|this.state.hash[t];for(var r=this.state.hash.length;r<16;r++)this.W[r]=0|e[r-this.state.hash.length];for(var n=0;n<this.options.rounds<<1;n+=2)for(var i=0;i<4;i++){for(var a=0;a<16;a++){var o=0|tn[n+(a/2|0)%2][255&this.W[a]];this.W[a-1>>>0&15]^=o,this.W[a+1&15]^=o}for(var s=0;s<16;s++)this.W[s]=tr(this.W[s],rn[i])}for(var u=0;u<this.state.hash.length;u++)this.state.hash[u]=this.state.hash[u]^this.W[15-u]|0}},{key:"finalize",value:function(){return this.state.message.length>0&&this.addPaddingZero(this.blockSizeInBytes-this.state.message.length|0),this.addPaddingZero(this.blockSizeInBytes-8|0),this.addLengthBits(),this.process(),this.getStateHash()}}])}(Nr);const ln=un;function cn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(cn=function(){return!!e})()}var fn=new Array(256),hn=[104,208,235,43,72,157,106,228,227,163,86,129,125,241,133,158,44,142,120,202,23,169,97,213,93,11,140,60,119,81,34,66,63,84,65,128,204,134,179,24,46,87,6,98,244,54,209,107,27,101,117,16,218,73,38,249,203,102,231,186,174,80,82,171,5,240,13,115,59,4,32,254,221,245,180,95,10,181,192,160,113,165,45,96,114,147,57,8,131,33,92,135,177,224,0,195,18,145,138,2,28,230,69,194,196,253,191,68,161,76,51,197,132,35,124,176,37,21,53,105,255,148,77,112,162,175,205,214,108,183,248,9,243,103,164,234,236,182,212,210,20,30,225,36,56,198,219,75,122,58,222,94,223,149,252,170,215,206,7,15,61,88,154,152,156,242,167,17,126,139,67,3,226,220,229,178,78,199,109,233,39,64,216,55,146,143,1,29,83,62,89,193,79,50,22,250,116,251,99,159,52,26,42,90,141,201,207,246,144,40,136,155,49,14,189,74,232,150,166,12,200,121,188,190,239,110,70,151,91,237,25,217,172,153,168,41,100,31,173,85,19,187,247,111,185,71,47,238,184,123,137,48,211,127,118,130],dn=[1,11,9,12,13,6,15,3,14,8,7,4,10,2,5,0],pn=[7,12,11,13,14,4,9,15,6,3,8,10,2,5,1,0],mn=new Array(16),gn=[1,1,4,1,8,5,2,9],bn=[1,1,3,1,5,8,9,5],yn=new Array(512),_n=new Array(22),vn=new Array(512),wn=new Array(22),xn=new Array(512),kn=new Array(22);function Bn(e,t){for(var r=new Array(512),n=new Array(22),i=0;i<8;i++)r[i]=[];for(var a=0;a<256;a++){var o=new Array(10);o[1]=e[a],o[2]=o[1]<<1,o[2]>=256&&(o[2]^=285),o[3]=o[2]^o[1],o[4]=o[2]<<1,o[4]>=256&&(o[4]^=285),o[5]=o[4]^o[1],o[8]=o[4]<<1,o[8]>=256&&(o[8]^=285),o[9]=o[8]^o[1],r[0][2*a]=o[t[0]]<<24|o[t[1]]<<16|o[t[2]]<<8|o[t[3]],r[0][2*a+1]=o[t[4]]<<24|o[t[5]]<<16|o[t[6]]<<8|o[t[7]];for(var s=1;s<8;s++)r[s][2*a]=nr(r[0][2*a+1],r[0][2*a],s<<3),r[s][2*a+1]=rr(r[0][2*a+1],r[0][2*a],s<<3)}n[0]=0,n[1]=0;for(var u=1;u<=10;u++)n[2*u]=4278190080&r[0][16*u-16]^16711680&r[1][16*u-14]^65280&r[2][16*u-12]^255&r[3][16*u-10],n[2*u+1]=4278190080&r[4][16*u-7]^16711680&r[5][16*u-5]^65280&r[6][16*u-3]^255&r[7][16*u-1];return[r,n]}!function(){!function(){for(var e=0;e<16;e++)mn[dn[e]]=0|e;for(var t=0;t<256;t++){var r=dn[t>>4],n=mn[15&t],i=pn[r^n];fn[t]=dn[r^i]<<4|mn[n^i]}}();var e=Bn(hn,bn);vn=e[0],wn=e[1],e=Bn(fn,bn),xn=e[0],kn=e[1],e=Bn(fn,gn),yn=e[0],_n=e[1]}();var En=function(e){function t(e){var n,i,a,o;switch(r(this,t),(e=e||{}).type=e.type||"",e.rounds=e.rounds||10,i=this,o=[e],a=u(a=t),(n=s(i,cn()?Reflect.construct(a,o||[],u(i).constructor):a.apply(i,o))).options.type){case"0":case 0:n.C=vn,n.RC=wn;break;case"t":n.C=xn,n.RC=kn;break;default:n.C=yn,n.RC=_n}return n}return c(t,e),o(t,[{key:"reset",value:function(){var e,r,n;(e=t,r=this,"function"==typeof(n=Vt(u(1&3?e.prototype:e),"reset",r))?function(e){return n.apply(r,e)}:n)([]),this.state.hash=new Array(16);for(var i=0;i<16;i++)this.state.hash[i]=0}},{key:"processBlock",value:function(e){for(var t=new Array(16),r=[],n=0;n<16;n++)r[n]=e[n]^(t[n]=this.state.hash[n])|0;for(var i=[],a=1;a<=this.options.rounds;a++){for(var o=0;o<8;o++){i[2*o]=0,i[2*o+1]=0;for(var s=0,u=56,l=0;s<8;s++,l=(u-=8)<32?1:0)i[2*o]^=this.C[s][2*(t[2*(o-s&7)+l]>>>u%32&255)],i[2*o+1]^=this.C[s][2*(t[2*(o-s&7)+l]>>>u%32&255)+1]}for(var c=0;c<16;c++)t[c]=i[c];t[0]^=this.RC[2*a],t[1]^=this.RC[2*a+1];for(var f=0;f<8;f++){i[2*f]=t[2*f],i[2*f+1]=t[2*f+1];for(var h=0,d=56,p=0;h<8;h++,p=(d-=8)<32?1:0)i[2*f]^=this.C[h][2*(r[2*(f-h&7)+p]>>>d%32&255)],i[2*f+1]^=this.C[h][2*(r[2*(f-h&7)+p]>>>d%32&255)+1]}for(var m=0;m<16;m++)r[m]=i[m]}for(var g=0;g<16;g++)this.state.hash[g]^=r[g]^e[g]}},{key:"finalize",value:function(){return this.addPaddingISO7816(this.state.message.length<32?56-this.state.message.length|0:120-this.state.message.length|0),this.addLengthBits(),this.process(),this.getStateHash()}}])}(Nr);const Sn=En;function An(e){for(var t="",r=0,n=e.length;r<n;r++){var i=e.charCodeAt(r);i<128?t+=String.fromCharCode(i):i<2048?(t+=String.fromCharCode(192|i>>6),t+=String.fromCharCode(128|63&i)):i<55296||i>=57344?(t+=String.fromCharCode(224|i>>12),t+=String.fromCharCode(128|i>>6&63),t+=String.fromCharCode(128|63&i)):(r++,i=65536+((1023&i)<<10|1023&e.charCodeAt(r)),t+=String.fromCharCode(240|i>>18),t+=String.fromCharCode(128|i>>12&63),t+=String.fromCharCode(128|i>>6&63),t+=String.fromCharCode(128|63&i))}return t}function Cn(e){for(var t="",r=new Uint8Array(e),n=0;n<r.length;n++)t+=String.fromCharCode(r[n]);return t}function In(e){for(var t="",r=0,n=e.length;r<n;r++)t+=(e.charCodeAt(r)<16?"0":"")+e.charCodeAt(r).toString(16);return t}var Pn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function Tn(e){for(var t="",r=e.length-e.length%3|0,n=0,i=0;i<r;i+=3)n=e.charCodeAt(i)<<16|e.charCodeAt(i+1)<<8|e.charCodeAt(i+2),t+=Pn.charAt(n>>18)+Pn.charAt(n>>12&63)+Pn.charAt(n>>6&63)+Pn.charAt(63&n);return e.length-r===2?(n=e.charCodeAt(r)<<16|e.charCodeAt(r+1)<<8,t+=Pn.charAt(n>>18)+Pn.charAt(n>>12&63)+Pn.charAt(n>>6&63)+"="):e.length-r===1&&(n=e.charCodeAt(r)<<16,t+=Pn.charAt(n>>18)+Pn.charAt(n>>12&63)+"=="),t}var Mn=function(){return o(function e(t,n){r(this,e),t.length>n.blockSizeInBytes&&(n.update(t),t=n.finalize(),n.reset());for(var i=t.length;i<n.blockSizeInBytes;i++)t+="\0";this.oPad="";for(var a=0;a<t.length;a++)n.update(String.fromCharCode(54^t.charCodeAt(a))),this.oPad+=String.fromCharCode(92^t.charCodeAt(a));this.hasher=n},[{key:"update",value:function(e){this.hasher.update(e)}},{key:"finalize",value:function(){var e=this.hasher.finalize();return this.hasher.reset(),this.hasher.update(this.oPad),this.hasher.update(e),this.hasher.finalize()}}])}();const Rn=Mn;var Fn=function(){return o(function e(){r(this,e),this.encoder={},this.encoder.fromUtf=An,this.encoder.fromArrayBuffer=Cn,this.encoder.toHex=In,this.encoder.toBase64=Tn},[{key:"getHasher",value:function(e,t){switch(t=t||{},e){case"has160":return new cr(t);case"md2":return new gr(t);case"md4":return new wr(t);case"md5":return new Sr(t);case"ripemd128":return t=Object.assign({},{length:128},t),new Rr(t);case"ripemd":case"ripemd160":return t=Object.assign({},{length:160},t),new Rr(t);case"ripemd256":return t=Object.assign({},{length:256},t),new Rr(t);case"ripemd320":return t=Object.assign({},{length:320},t),new Rr(t);case"sha0":return new Ur(t);case"sha1":return new Gr(t);case"sha224":return t=Object.assign({},{length:224},t),new Qr(t);case"sha256":return t=Object.assign({},{length:256},t),new Qr(t);case"sha384":return t=Object.assign({},{length:384},t),new Xr(t);case"sha512":return t=Object.assign({},{length:512},t),new Xr(t);case"sha512/224":return t=Object.assign({},{length:224},t),new Xr(t);case"sha512/256":return t=Object.assign({},{length:256},t),new Xr(t);case"snefru":case"snefru128":case"snefru128/8":return t=Object.assign({},{length:128},t),new ln(t);case"snefru256":case"snefru256/8":return t=Object.assign({},{length:256},t),new ln(t);case"snefru128/2":return t=Object.assign({},{length:128,rounds:2},t),new ln(t);case"snefru256/4":return t=Object.assign({},{length:256,rounds:4},t),new ln(t);case"whirlpool":return new Sn(t);case"whirlpool-0":return t=Object.assign({},{type:"0"},t),new Sn(t);case"whirlpool-t":return t=Object.assign({},{type:"t"},t),new Sn(t)}}},{key:"hash",value:function(e,t,r){r=r||{};var n=this.getHasher(e,r);return n.update(An(t)),In(n.finalize())}},{key:"getHmac",value:function(e,t){return new Rn(e,t)}},{key:"hmac",value:function(e,t,r){var n=this.getHmac(An(e),r);return n.update(An(t)),In(n.finalize())}}])}();const On=Fn=new Fn;function Nn(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=O.arrayBufferToStr(t,!1),i=On.getHasher(e,r);return i.update(n),On.encoder.toHex(i.finalize())}function Ln(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Ln=function(){return!!e})()}const Dn=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,Ln()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Randomize Colour Palette",e.module="Image",e.description="Randomizes each colour in an image's colour palette. This can often reveal text or symbols that were previously a very similar colour to their surroundings, a technique sometimes used in Steganography.",e.infoURL="https://wikipedia.org/wiki/Indexed_color",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.presentType="html",e.args=[{name:"Seed",type:"string",value:""}],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o,s,u,l,c;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(Ee(t)){e.next=1;break}throw new k("Please enter a valid image file.");case 1:return n=r[0]||Math.random().toString().substr(2),e.next=2,Qe.dK.read(t);case 2:return i=e.sent,a=i.bitmap.width,o=i.bitmap.height,i.scan(0,0,a,o,function(e,t,r){s=this.bitmap.data.slice(r,r+3).join("."),u=Nn("md5",O.strToArrayBuffer(n+s)),l=u.substr(0,6)+"ff",i.setPixelColor(parseInt(l,16),e,t)}),e.next=3,i.getBuffer(i.mime);case 3:return c=e.sent,e.abrupt("return",new Uint8Array(c).buffer);case 4:case"end":return e.stop()}},e)})),function(e,t){return i.apply(this,arguments)})},{key:"present",value:function(e){return e.byteLength?`<img src="data:${Ee(e)};base64,${B(e)}">`:""}}]);var i}(qe);function zn(e,t){if("string"!=typeof t)throw"'unpack' error. Got invalid type argument.";for(var r,n=0,i=1;i<e.length;i++)if("b"==e[i].toLowerCase())n+=1;else if("h"==e[i].toLowerCase())n+=2;else{if("l"!=e[i].toLowerCase())throw"'unpack' error. Got invalid mark.";n+=4}if(n!=t.length)throw"'unpack' error. Mismatch between symbol and string length. "+n+":"+t.length;if("<"==e[0])r=!0;else{if(">"!=e[0])throw"'unpack' error.";r=!1}for(var a=[],o=0,s=1,u=null,l=null,c=null,f="";l=e[s];){if("b"==l.toLowerCase())c=1,u=(f=t.slice(o,o+c)).charCodeAt(0),"b"==l&&u>=128&&(u-=256);else if("H"==l)c=2,f=t.slice(o,o+c),r&&(f=f.split("").reverse().join("")),u=256*f.charCodeAt(0)+f.charCodeAt(1);else{if("l"!=l.toLowerCase())throw"'unpack' error. "+l;c=4,f=t.slice(o,o+c),r&&(f=f.split("").reverse().join("")),u=16777216*f.charCodeAt(0)+65536*f.charCodeAt(1)+256*f.charCodeAt(2)+f.charCodeAt(3),"l"==l&&u>=2147483648&&(u-=4294967296)}a.push(u),o+=c,s+=1}return a}function Un(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Un=function(){return!!e})()}const $n=function(e){function t(){var e,n,i,a;return r(this,t),n=this,i=u(i=t),(e=s(n,Un()?Reflect.construct(i,[],u(n).constructor):i.apply(n,a))).name="Remove EXIF",e.module="Image",e.description=["Removes EXIF data from a JPEG image.","<br><br>","EXIF data embedded in photos usually contains information about the image file itself as well as the device used to create it."].join("\n"),e.infoURL="https://wikipedia.org/wiki/Exif",e.inputType="ArrayBuffer",e.outputType="byteArray",e.args=[],e}return c(t,e),o(t,[{key:"run",value:function(e,t){if(0===(e=new Uint8Array(e)).length)return e;try{return function(e){if("ÿØ"!=(e=O.byteArrayToChars(e)).slice(0,2))throw"Given data is not jpeg.";var t=function(e){if("ÿØ"!=e.slice(0,2))throw"Given data isn't JPEG.";for(var t=2,r=["ÿØ"];;){if("ÿÚ"==e.slice(t,t+2)){r.push(e.slice(t));break}var n=t+zn(">H",e.slice(t+2,t+4))[0]+2;if(r.push(e.slice(t,n)),(t=n)>=e.length)throw"Wrong JPEG data."}return r}(e);if("ÿá"==t[1].slice(0,2)&&"Exif\0\0"==t[1].slice(4,10))t=[t[0]].concat(t.slice(2));else{if("ÿá"!=t[2].slice(0,2)||"Exif\0\0"!=t[2].slice(4,10))throw"Exif not found.";t=t.slice(0,2).concat(t.slice(3))}var r=t.join("");return O.strToCharcode(r)}(e)}catch(t){if("Exif not found."===t)return e;throw new k(`Could not remove EXIF data from image: ${t}`)}}}])}(qe);function jn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(jn=function(){return!!e})()}const Zn=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,jn()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Render Image",e.module="Image",e.description="Displays the input as an image. Supports the following formats:<br><br><ul><li>jpg/jpeg</li><li>png</li><li>gif</li><li>webp</li><li>bmp</li><li>ico</li></ul>",e.inputType="string",e.outputType="byteArray",e.presentType="html",e.args=[{name:"Input format",type:"option",value:["Raw","Base64","Hex"]}],e.checks=[{pattern:"^(?:\\xff\\xd8\\xff|\\x89\\x50\\x4e\\x47|\\x47\\x49\\x46|.{8}\\x57\\x45\\x42\\x50|\\x42\\x4d)",flags:"",args:["Raw"],useful:!0,output:{mime:"image"}}],e}return c(n,e),o(n,[{key:"run",value:function(e,t){var r=t[0];if(!e.length)return[];switch(r){case"Hex":e=S(e);break;case"Base64":e=E(e,void 0,"byteArray");break;default:e=O.strToByteArray(e)}if(!Ee(e))throw new k("Invalid file type");return e}},{key:"present",value:(i=t(h().mark(function e(t){var r,n;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length){e.next=1;break}return e.abrupt("return","");case 1:if(r="data:",!(n=Ee(t))){e.next=2;break}r+=n+";",e.next=3;break;case 2:throw new k("Invalid file type");case 3:return r+="base64,"+B(t),e.abrupt("return","<img src='"+r+"'>");case 4:case"end":return e.stop()}},e)})),function(e){return i.apply(this,arguments)})}]);var i}(qe);function Gn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Gn=function(){return!!e})()}const Wn=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,Gn()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Resize Image",e.module="Image",e.description="Resizes an image to the specified width and height values.",e.infoURL="https://wikipedia.org/wiki/Image_scaling",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.presentType="html",e.args=[{name:"Width",type:"number",value:100,min:1},{name:"Height",type:"number",value:100,min:1},{name:"Unit type",type:"option",value:["Pixels","Percent"]},{name:"Maintain aspect ratio",type:"boolean",value:!1},{name:"Resizing algorithm",type:"option",value:["Nearest Neighbour","Bilinear","Bicubic","Hermite","Bezier"],defaultIndex:1}],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o,s,u,l,c,f,d;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r[0],i=r[1],a=r[2],o=r[3],s=r[4],u={"Nearest Neighbour":Qe.od.NEAREST_NEIGHBOR,Bilinear:Qe.od.BILINEAR,Bicubic:Qe.od.BICUBIC,Hermite:Qe.od.HERMITE,Bezier:Qe.od.BEZIER},Ee(t)){e.next=1;break}throw new k("Invalid file type.");case 1:return e.prev=1,e.next=2,Qe.dK.read(t);case 2:l=e.sent,e.next=4;break;case 3:throw e.prev=3,f=e.catch(1),new k(`Error loading image. (${f})`);case 4:if(e.prev=4,"Percent"===a&&(n=l.width*(n/100),i=l.height*(i/100)),F()&&self.sendStatusMessage("Resizing image..."),o?l.scaleToFit({w:n,h:i,mode:u[s]}):l.resize({w:n,h:i,mode:u[s]}),"image/gif"!==l.mime){e.next=6;break}return e.next=5,l.getBuffer(Qe.pY.png);case 5:c=e.sent,e.next=8;break;case 6:return e.next=7,l.getBuffer(l.mime);case 7:c=e.sent;case 8:return e.abrupt("return",c.buffer);case 9:throw e.prev=9,d=e.catch(4),new k(`Error resizing image. (${d})`);case 10:case"end":return e.stop()}},e,null,[[1,3],[4,9]])})),function(e,t){return i.apply(this,arguments)})},{key:"present",value:function(e){if(!e.byteLength)return"";var t=new Uint8Array(e),r=Ee(t);if(!r)throw new k("Invalid file type.");return`<img src="data:${r};base64,${B(t)}">`}}]);var i}(qe);function Hn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Hn=function(){return!!e})()}const qn=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,Hn()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Rotate Image",e.module="Image",e.description="Rotates an image by the specified number of degrees.",e.infoURL="",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.presentType="html",e.args=[{name:"Rotation amount (degrees)",type:"number",value:90}],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o,s,u;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=ie(r,1),i=n[0],Ee(t)){e.next=1;break}throw new k("Invalid file type.");case 1:return e.prev=1,e.next=2,Qe.dK.read(t);case 2:a=e.sent,e.next=4;break;case 3:throw e.prev=3,s=e.catch(1),new k(`Error loading image. (${s})`);case 4:if(e.prev=4,F()&&self.sendStatusMessage("Rotating image..."),a.rotate(i),"image/gif"!==a.mime){e.next=6;break}return e.next=5,a.getBuffer(Qe.pY.png);case 5:o=e.sent,e.next=8;break;case 6:return e.next=7,a.getBuffer(a.mime);case 7:o=e.sent;case 8:return e.abrupt("return",o.buffer);case 9:throw e.prev=9,u=e.catch(4),new k(`Error rotating image. (${u})`);case 10:case"end":return e.stop()}},e,null,[[1,3],[4,9]])})),function(e,t){return i.apply(this,arguments)})},{key:"present",value:function(e){if(!e.byteLength)return"";var t=new Uint8Array(e),r=Ee(t);if(!r)throw new k("Invalid file type.");return`<img src="data:${r};base64,${B(t)}">`}}]);var i}(qe);function Qn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Qn=function(){return!!e})()}const Vn=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,Qn()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Sharpen Image",e.module="Image",e.description="Sharpens an image (Unsharp mask)",e.infoURL="https://wikipedia.org/wiki/Unsharp_masking",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.presentType="html",e.args=[{name:"Radius",type:"number",value:2,min:1},{name:"Amount",type:"number",value:1,min:0,step:.1},{name:"Threshold",type:"number",value:10,min:0,max:100}],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o,s,u,l,c,f,d;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=ie(r,3),i=n[0],a=n[1],o=n[2],Ee(t)){e.next=1;break}throw new k("Invalid file type.");case 1:return e.prev=1,e.next=2,Qe.dK.read(t);case 2:s=e.sent,e.next=4;break;case 3:throw e.prev=3,f=e.catch(1),new k(`Error loading image. (${f})`);case 4:if(e.prev=4,F()&&self.sendStatusMessage("Sharpening image... (Cloning image)"),u=s.clone(),F()&&self.sendStatusMessage("Sharpening image... (Blurring cloned image)"),l=s.clone().gaussian(i),F()&&self.sendStatusMessage("Sharpening image... (Creating unsharp mask)"),u.scan(0,0,u.bitmap.width,u.bitmap.height,function(e,t,r){var n=l.bitmap.data[r],i=l.bitmap.data[r+1],a=l.bitmap.data[r+2],o=this.bitmap.data[r],s=this.bitmap.data[r+1],u=this.bitmap.data[r+2];this.bitmap.data[r]=o>n?o-n:0,this.bitmap.data[r+1]=s>i?s-i:0,this.bitmap.data[r+2]=u>a?u-a:0}),F()&&self.sendStatusMessage("Sharpening image... (Merging with unsharp mask)"),s.scan(0,0,s.bitmap.width,s.bitmap.height,function(e,t,r){var n=u.bitmap.data[r],i=u.bitmap.data[r+1],s=u.bitmap.data[r+2],l=this.bitmap.data[r],c=this.bitmap.data[r+1],f=this.bitmap.data[r+2],h=.2126*n+.7152*i+.0722*s,d=.2126*l+.7152*c+.0722*f;n*=a,i*=a,s*=a,(h>d?h-d:d-h)/255*100>=o&&(this.bitmap.data[r]=l+n<=255?l+n:255,this.bitmap.data[r+1]=c+i<=255?c+i:255,this.bitmap.data[r+2]=f+s<=255?f+s:255)}),"image/gif"!==s.mime){e.next=6;break}return e.next=5,s.getBuffer(Qe.pY.png);case 5:c=e.sent,e.next=8;break;case 6:return e.next=7,s.getBuffer(s.mime);case 7:c=e.sent;case 8:return e.abrupt("return",c.buffer);case 9:throw e.prev=9,d=e.catch(4),new k(`Error sharpening image. (${d})`);case 10:case"end":return e.stop()}},e,null,[[1,3],[4,9]])})),function(e,t){return i.apply(this,arguments)})},{key:"present",value:function(e){if(!e.byteLength)return"";var t=new Uint8Array(e),r=Ee(t);if(!r)throw new k("Invalid file type.");return`<img src="data:${r};base64,${B(t)}">`}}]);var i}(qe);var Yn=__webpack_require__(48287).Buffer;function Kn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Kn=function(){return!!e})()}const Xn=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,Kn()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="Split Colour Channels",e.module="Image",e.description="Splits the given image into its red, green and blue colour channels.",e.infoURL="https://wikipedia.org/wiki/Channel_(digital_image)",e.inputType="ArrayBuffer",e.outputType="List<File>",e.presentType="html",e.args=[],e}return c(n,e),o(n,[{key:"run",value:(a=t(h().mark(function e(r,n){var i,a,o,s;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(Ee(r=new Uint8Array(r))){e.next=1;break}throw new k("Invalid file type.");case 1:return e.next=2,Qe.dK.read(Yn.from(r));case 2:return i=e.sent,a=new Promise(function(){var e=t(h().mark(function e(t,r){var n,a,o,s,u,l,c;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=i.clone().color([{apply:"blue",params:[-255]},{apply:"green",params:[-255]}]).getBuffer(Qe.pY.png),a=t,o=File,s=Uint8Array,e.next=1,n;case 1:u=e.sent.values(),l=new s(u),a(new o([l],"red.png",{type:"image/png"})),e.next=3;break;case 2:e.prev=2,c=e.catch(0),r(new k(`Could not split red channel: ${c}`));case 3:case"end":return e.stop()}},e,null,[[0,2]])}));return function(t,r){return e.apply(this,arguments)}}()),o=new Promise(function(){var e=t(h().mark(function e(t,r){var n,a,o,s,u,l,c;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=i.clone().color([{apply:"red",params:[-255]},{apply:"blue",params:[-255]}]).getBuffer(Qe.pY.png),a=t,o=File,s=Uint8Array,e.next=1,n;case 1:u=e.sent.values(),l=new s(u),a(new o([l],"green.png",{type:"image/png"})),e.next=3;break;case 2:e.prev=2,c=e.catch(0),r(new k(`Could not split green channel: ${c}`));case 3:case"end":return e.stop()}},e,null,[[0,2]])}));return function(t,r){return e.apply(this,arguments)}}()),s=new Promise(function(){var e=t(h().mark(function e(t,r){var n,a,o,s,u,l,c;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=i.color([{apply:"red",params:[-255]},{apply:"green",params:[-255]}]).getBuffer(Qe.pY.png),a=t,o=File,s=Uint8Array,e.next=1,n;case 1:u=e.sent.values(),l=new s(u),a(new o([l],"blue.png",{type:"image/png"})),e.next=3;break;case 2:e.prev=2,c=e.catch(0),r(new k(`Could not split blue channel: ${c}`));case 3:case"end":return e.stop()}},e,null,[[0,2]])}));return function(t,r){return e.apply(this,arguments)}}()),e.next=3,Promise.all([a,o,s]);case 3:return e.abrupt("return",e.sent);case 4:case"end":return e.stop()}},e)})),function(e,t){return a.apply(this,arguments)})},{key:"present",value:(i=t(h().mark(function e(t){return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,O.displayFilesAsHTML(t);case 1:return e.abrupt("return",e.sent);case 2:case"end":return e.stop()}},e)})),function(e){return i.apply(this,arguments)})}]);var i,a}(qe);function Jn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Jn=function(){return!!e})()}var ei=function(e){function n(){var e,t,i,a;return r(this,n),t=this,i=u(i=n),(e=s(t,Jn()?Reflect.construct(i,[],u(t).constructor):i.apply(t,a))).name="View Bit Plane",e.module="Image",e.description="Extracts and displays a bit plane of any given image. These show only a single bit from each pixel, and can be used to hide messages in Steganography.",e.infoURL="https://wikipedia.org/wiki/Bit_plane",e.inputType="ArrayBuffer",e.outputType="ArrayBuffer",e.presentType="html",e.args=[{name:"Colour",type:"option",value:ti},{name:"Bit",type:"number",value:0}],e}return c(n,e),o(n,[{key:"run",value:(i=t(h().mark(function e(t,r){var n,i,a,o,s,u,l,c,f,d,p,m;return h().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(Ee(t)){e.next=1;break}throw new k("Please enter a valid image file.");case 1:return n=ie(r,2),i=n[0],a=n[1],e.next=2,Qe.dK.read(t);case 2:if(o=e.sent,s=o.bitmap.width,u=o.bitmap.height,l=ti.indexOf(i),c=7-a,!(a<0||a>7)){e.next=3;break}throw new k("Error: Bit argument must be between 0 and 7");case 3:return o.scan(0,0,s,u,function(e,t,r){f=this.bitmap.data[r+l],d=O.bin(f),p=255,"1"===d.charAt(c)&&(p=0);for(var n=0;n<3;n++)this.bitmap.data[r+n]=p;this.bitmap.data[r+3]=255}),e.next=4,o.getBuffer(o.mime);case 4:return m=e.sent,e.abrupt("return",new Uint8Array(m).buffer);case 5:case"end":return e.stop()}},e)})),function(e,t){return i.apply(this,arguments)})},{key:"present",value:function(e){return e.byteLength?`<img src="data:${Ee(e)};base64,${B(e)}">`:""}}]);var i}(qe),ti=["Red","Green","Blue","Alpha"];const ri=ei;("undefined"==typeof self?{}:self.OpModules||{}).Image={"Add Text To Image":Ye,"Blur Image":Xe,"Contain Image":et,"Convert Image Format":rt,"Cover Image":it,"Crop Image":ot,"Dither Image":ut,"Extract EXIF":ht,"Extract LSB":yt,"Extract RGBA":wt,"Flip Image":kt,"Generate Image":St,"Generate QR Code":Ft,"Image Brightness / Contrast":Nt,"Image Filter":Dt,"Image Hue/Saturation/Lightness":Ut,"Image Opacity":jt,"Invert Image":Gt,"Normalise Image":Ht,"Parse QR Code":Qt,"Randomize Colour Palette":Dn,"Remove EXIF":$n,"Render Image":Zn,"Resize Image":Wn,"Rotate Image":qn,"Sharpen Image":Vn,"Split Colour Channels":Xn,"View Bit Plane":ri}})()})(); |