AutoPercenty3/browsers/extensions/1.1.100_0/static/js/background.js

3 lines
522 KiB
JavaScript

/*! For license information please see background.js.LICENSE.txt */
(()=>{var e={2009:(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,o=s(e),a=o[0],c=o[1],u=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,c)),f=0,d=c>0?a-4:a;for(r=0;r<d;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)],u[f++]=t>>16&255,u[f++]=t>>8&255,u[f++]=255&t;2===c&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[f++]=255&t);1===c&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[f++]=t>>8&255,u[f++]=255&t);return u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,u=n-i;s<u;s+=a)o.push(c(e,s,s+a>u?u:s+a));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!==typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;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 c(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},2940:function(e,t,r){!function(e){"use strict";var t="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof r.g?r.g:"undefined"!==typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function i(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}var o={},a={encrypt:function(e,t){return e._cipher.encryptBlock(t)},decrypt:function(e,t){return e._cipher.decryptBlock(t)}},s={},c="undefined"!==typeof r.g?r.g:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{},u=[],f=[],d="undefined"!==typeof Uint8Array?Uint8Array:Array,l=!1;function h(){l=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,r=e.length;t<r;++t)u[t]=e[t],f[e.charCodeAt(t)]=t;f["-".charCodeAt(0)]=62,f["_".charCodeAt(0)]=63}function p(e){var t,r,n,i,o,a;l||h();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===e[s-2]?2:"="===e[s-1]?1:0,a=new d(3*s/4-o),n=o>0?s-4:s;var c=0;for(t=0,r=0;t<n;t+=4,r+=3)i=f[e.charCodeAt(t)]<<18|f[e.charCodeAt(t+1)]<<12|f[e.charCodeAt(t+2)]<<6|f[e.charCodeAt(t+3)],a[c++]=i>>16&255,a[c++]=i>>8&255,a[c++]=255&i;return 2===o?(i=f[e.charCodeAt(t)]<<2|f[e.charCodeAt(t+1)]>>4,a[c++]=255&i):1===o&&(i=f[e.charCodeAt(t)]<<10|f[e.charCodeAt(t+1)]<<4|f[e.charCodeAt(t+2)]>>2,a[c++]=i>>8&255,a[c++]=255&i),a}function m(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function v(e,t,r){for(var n,i=[],o=t;o<r;o+=3)n=(e[o]<<16)+(e[o+1]<<8)+e[o+2],i.push(m(n));return i.join("")}function b(e){var t;l||h();for(var r=e.length,n=r%3,i="",o=[],a=16383,s=0,c=r-n;s<c;s+=a)o.push(v(e,s,s+a>c?c:s+a));return 1===n?(t=e[r-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),o.push(i),o.join("")}function g(e,t,r,n,i){var o,a,s=8*i-n-1,c=(1<<s)-1,u=c>>1,f=-7,d=r?i-1:0,l=r?-1:1,h=e[t+d];for(d+=l,o=h&(1<<-f)-1,h>>=-f,f+=s;f>0;o=256*o+e[t+d],d+=l,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+e[t+d],d+=l,f-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=u}return(h?-1:1)*a*Math.pow(2,o-n)}function y(e,t,r,n,i,o){var a,s,c,u=8*o-i-1,f=(1<<u)-1,d=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-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,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?l/c:l*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=f?(s=0,a=f):a+d>=1?(s=(t*c-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[r+h]=255&a,h+=p,a/=256,u-=8);e[r+h-p]|=128*m}var _={}.toString,w=Array.isArray||function(e){return"[object Array]"==_.call(e)},x=50;A.TYPED_ARRAY_SUPPORT=void 0===c.TYPED_ARRAY_SUPPORT||c.TYPED_ARRAY_SUPPORT;var E=S();function S(){return A.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function T(e,t){if(S()<t)throw new RangeError("Invalid typed array length");return A.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=A.prototype:(null===e&&(e=new A(t)),e.length=t),e}function A(e,t,r){if(!A.TYPED_ARRAY_SUPPORT&&!(this instanceof A))return new A(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 O(this,e)}return R(this,e,t,r)}function R(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?N(e,t,r,n):"string"===typeof t?C(e,t,r):k(e,t)}function M(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 I(e,t,r,n){return M(t),t<=0?T(e,t):void 0!==r?"string"===typeof n?T(e,t).fill(r,n):T(e,t).fill(r):T(e,t)}function O(e,t){if(M(t),e=T(e,t<0?0:0|U(t)),!A.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function C(e,t,r){if("string"===typeof r&&""!==r||(r="utf8"),!A.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|L(t,r),i=(e=T(e,n)).write(t,r);return i!==n&&(e=e.slice(0,i)),e}function P(e,t){var r=t.length<0?0:0|U(t.length);e=T(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function N(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),A.TYPED_ARRAY_SUPPORT?(e=t).__proto__=A.prototype:e=P(e,t),e}function k(e,t){if(D(t)){var r=0|U(t.length);return 0===(e=T(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||ye(t.length)?T(e,0):P(e,t);if("Buffer"===t.type&&w(t.data))return P(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function U(e){if(e>=S())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+S().toString(16)+" bytes");return 0|e}function B(e){return+e!=e&&(e=0),A.alloc(+e)}function D(e){return!(null==e||!e._isBuffer)}function L(e,t){if(D(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 pe(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return be(e).length;default:if(n)return pe(e).length;t=(""+t).toLowerCase(),n=!0}}function F(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 te(this,t,r);case"utf8":case"utf-8":return Q(this,t,r);case"ascii":return $(this,t,r);case"latin1":case"binary":return ee(this,t,r);case"base64":return K(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return re(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function j(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function z(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=A.from(t,n)),D(t))return 0===t.length?-1:H(e,t,r,n,i);if("number"===typeof t)return t&=255,A.TYPED_ARRAY_SUPPORT&&"function"===typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):H(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function H(e,t,r,n,i){var o,a=1,s=e.length,c=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;a=2,s/=2,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var f=-1;for(o=r;o<s;o++)if(u(e,o)===u(t,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===c)return f*a}else-1!==f&&(o-=o-f),f=-1}else for(r+c>s&&(r=s-c),o=r;o>=0;o--){for(var d=!0,l=0;l<c;l++)if(u(e,o+l)!==u(t,l)){d=!1;break}if(d)return o}return-1}function q(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function G(e,t,r,n){return ge(pe(t,e.length-r),e,r,n)}function W(e,t,r,n){return ge(me(t),e,r,n)}function Y(e,t,r,n){return W(e,t,r,n)}function V(e,t,r,n){return ge(be(t),e,r,n)}function X(e,t,r,n){return ge(ve(t,e.length-r),e,r,n)}function K(e,t,r){return 0===t&&r===e.length?b(e):b(e.slice(t,r))}function Q(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,c,u=e[i],f=null,d=u>239?4:u>223?3:u>191?2:1;if(i+d<=r)switch(d){case 1:u<128&&(f=u);break;case 2:128===(192&(o=e[i+1]))&&(c=(31&u)<<6|63&o)>127&&(f=c);break;case 3:o=e[i+1],a=e[i+2],128===(192&o)&&128===(192&a)&&(c=(15&u)<<12|(63&o)<<6|63&a)>2047&&(c<55296||c>57343)&&(f=c);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128===(192&o)&&128===(192&a)&&128===(192&s)&&(c=(15&u)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&c<1114112&&(f=c)}null===f?(f=65533,d=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=d}return Z(n)}A.poolSize=8192,A._augment=function(e){return e.__proto__=A.prototype,e},A.from=function(e,t,r){return R(null,e,t,r)},A.TYPED_ARRAY_SUPPORT&&(A.prototype.__proto__=Uint8Array.prototype,A.__proto__=Uint8Array,"undefined"!==typeof Symbol&&Symbol.species&&A[Symbol.species]),A.alloc=function(e,t,r){return I(null,e,t,r)},A.allocUnsafe=function(e){return O(null,e)},A.allocUnsafeSlow=function(e){return O(null,e)},A.isBuffer=_e,A.compare=function(e,t){if(!D(e)||!D(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},A.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}},A.concat=function(e,t){if(!w(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return A.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=A.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var o=e[r];if(!D(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},A.byteLength=L,A.prototype._isBuffer=!0,A.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)j(this,t,t+1);return this},A.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)j(this,t,t+3),j(this,t+1,t+2);return this},A.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)j(this,t,t+7),j(this,t+1,t+6),j(this,t+2,t+5),j(this,t+3,t+4);return this},A.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?Q(this,0,e):F.apply(this,arguments)},A.prototype.equals=function(e){if(!D(e))throw new TypeError("Argument must be a Buffer");return this===e||0===A.compare(this,e)},A.prototype.inspect=function(){var e="",t=x;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),"<Buffer "+e+">"},A.prototype.compare=function(e,t,r,n,i){if(!D(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 o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),u=e.slice(t,r),f=0;f<s;++f)if(c[f]!==u[f]){o=c[f],a=u[f];break}return o<a?-1:a<o?1:0},A.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},A.prototype.indexOf=function(e,t,r){return z(this,e,t,r,!0)},A.prototype.lastIndexOf=function(e,t,r){return z(this,e,t,r,!1)},A.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 o=!1;;)switch(n){case"hex":return q(this,e,t,r);case"utf8":case"utf-8":return G(this,e,t,r);case"ascii":return W(this,e,t,r);case"latin1":case"binary":return Y(this,e,t,r);case"base64":return V(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},A.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var J=4096;function Z(e){var t=e.length;if(t<=J)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=J));return r}function $(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 ee(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 te(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=he(e[o]);return i}function re(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function ne(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 ie(e,t,r,n,i,o){if(!D(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function oe(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function ae(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function se(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function ce(e,t,r,n,i){return i||se(e,t,r,4),y(e,t,r,n,23,4),r+4}function ue(e,t,r,n,i){return i||se(e,t,r,8),y(e,t,r,n,52,8),r+8}A.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),A.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=A.prototype;else{var i=t-e;r=new A(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},A.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||ne(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},A.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||ne(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},A.prototype.readUInt8=function(e,t){return t||ne(e,1,this.length),this[e]},A.prototype.readUInt16LE=function(e,t){return t||ne(e,2,this.length),this[e]|this[e+1]<<8},A.prototype.readUInt16BE=function(e,t){return t||ne(e,2,this.length),this[e]<<8|this[e+1]},A.prototype.readUInt32LE=function(e,t){return t||ne(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},A.prototype.readUInt32BE=function(e,t){return t||ne(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},A.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||ne(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},A.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||ne(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},A.prototype.readInt8=function(e,t){return t||ne(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},A.prototype.readInt16LE=function(e,t){t||ne(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},A.prototype.readInt16BE=function(e,t){t||ne(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},A.prototype.readInt32LE=function(e,t){return t||ne(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},A.prototype.readInt32BE=function(e,t){return t||ne(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},A.prototype.readFloatLE=function(e,t){return t||ne(e,4,this.length),g(this,e,!0,23,4)},A.prototype.readFloatBE=function(e,t){return t||ne(e,4,this.length),g(this,e,!1,23,4)},A.prototype.readDoubleLE=function(e,t){return t||ne(e,8,this.length),g(this,e,!0,52,8)},A.prototype.readDoubleBE=function(e,t){return t||ne(e,8,this.length),g(this,e,!1,52,8)},A.prototype.writeUIntLE=function(e,t,r,n){e=+e,t|=0,r|=0,n||ie(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},A.prototype.writeUIntBE=function(e,t,r,n){e=+e,t|=0,r|=0,n||ie(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},A.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||ie(this,e,t,1,255,0),A.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},A.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||ie(this,e,t,2,65535,0),A.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):oe(this,e,t,!0),t+2},A.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||ie(this,e,t,2,65535,0),A.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):oe(this,e,t,!1),t+2},A.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||ie(this,e,t,4,4294967295,0),A.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):ae(this,e,t,!0),t+4},A.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||ie(this,e,t,4,4294967295,0),A.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):ae(this,e,t,!1),t+4},A.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);ie(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},A.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);ie(this,e,t,r,i-1,-i)}var o=r-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},A.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||ie(this,e,t,1,127,-128),A.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},A.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||ie(this,e,t,2,32767,-32768),A.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):oe(this,e,t,!0),t+2},A.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||ie(this,e,t,2,32767,-32768),A.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):oe(this,e,t,!1),t+2},A.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||ie(this,e,t,4,2147483647,-2147483648),A.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):ae(this,e,t,!0),t+4},A.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||ie(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),A.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):ae(this,e,t,!1),t+4},A.prototype.writeFloatLE=function(e,t,r){return ce(this,e,t,!0,r)},A.prototype.writeFloatBE=function(e,t,r){return ce(this,e,t,!1,r)},A.prototype.writeDoubleLE=function(e,t,r){return ue(this,e,t,!0,r)},A.prototype.writeDoubleBE=function(e,t,r){return ue(this,e,t,!1,r)},A.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,o=n-r;if(this===e&&r<t&&t<n)for(i=o-1;i>=0;--i)e[i+t]=this[i+r];else if(o<1e3||!A.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},A.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&&!A.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 o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"===typeof e)for(o=t;o<r;++o)this[o]=e;else{var a=D(e)?e:pe(new A(e,n).toString()),s=a.length;for(o=0;o<r-t;++o)this[o+t]=a[o%s]}return this};var fe=/[^+\/0-9A-Za-z-_]/g;function de(e){if((e=le(e).replace(fe,"")).length<2)return"";for(;e.length%4!==0;)e+="=";return e}function le(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function he(e){return e<16?"0"+e.toString(16):e.toString(16)}function pe(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function me(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function ve(e,t){for(var r,n,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=(r=e.charCodeAt(a))>>8,i=r%256,o.push(i),o.push(n);return o}function be(e){return p(de(e))}function ge(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 ye(e){return e!==e}function _e(e){return null!=e&&(!!e._isBuffer||we(e)||xe(e))}function we(e){return!!e.constructor&&"function"===typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function xe(e){return"function"===typeof e.readFloatLE&&"function"===typeof e.slice&&we(e.slice(0,0))}var Ee=Object.freeze({__proto__:null,Buffer:A,INSPECT_MAX_BYTES:x,SlowBuffer:B,isBuffer:_e,kMaxLength:E}),Se=function(e,t){for(var r=Math.min(e.length,t.length),n=new A(r),i=0;i<r;++i)n[i]=e[i]^t[i];return n},Te=Se;s.encrypt=function(e,t){var r=Te(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},s.decrypt=function(e,t){var r=e._prev;e._prev=t;var n=e._cipher.decryptBlock(t);return Te(n,r)};var Ae={},Re={exports:{}},Me=i(Ee);!function(e,t){var r=Me,n=r.Buffer;function i(e,t){for(var r in e)t[r]=e[r]}function o(e,t,r){return n(e,t,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=o),o.prototype=Object.create(n.prototype),i(n,o),o.from=function(e,t,r){if("number"===typeof e)throw new TypeError("Argument must not be a number");return n(e,t,r)},o.alloc=function(e,t,r){if("number"!==typeof e)throw new TypeError("Argument must be a number");var i=n(e);return void 0!==t?"string"===typeof r?i.fill(t,r):i.fill(t):i.fill(0),i},o.allocUnsafe=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return n(e)},o.allocUnsafeSlow=function(e){if("number"!==typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}}(Re,Re.exports);var Ie=Re.exports,Oe=Ie.Buffer,Ce=Se;function Pe(e,t,r){var n=t.length,i=Ce(t,e._cache);return e._cache=e._cache.slice(n),e._prev=Oe.concat([e._prev,r?t:i]),i}Ae.encrypt=function(e,t,r){for(var n,i=Oe.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=Oe.allocUnsafe(0)),!(e._cache.length<=t.length)){i=Oe.concat([i,Pe(e,t,r)]);break}n=e._cache.length,i=Oe.concat([i,Pe(e,t.slice(0,n),r)]),t=t.slice(n)}return i};var Ne={},ke=Ie.Buffer;function Ue(e,t,r){var n=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=ke.concat([e._prev.slice(1),ke.from([r?t:n])]),n}Ne.encrypt=function(e,t,r){for(var n=t.length,i=ke.allocUnsafe(n),o=-1;++o<n;)i[o]=Ue(e,t[o],r);return i};var Be={},De=Ie.Buffer;function Le(e,t,r){for(var n,i,o=-1,a=8,s=0;++o<a;)n=t&1<<7-o?128:0,s+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>o%8,e._prev=Fe(e._prev,r?n:i);return s}function Fe(e,t){var r=e.length,n=-1,i=De.allocUnsafe(e.length);for(e=De.concat([e,De.from([t])]);++n<r;)i[n]=e[n]<<1|e[n+1]>>7;return i}Be.encrypt=function(e,t,r){for(var n=t.length,i=De.allocUnsafe(n),o=-1;++o<n;)i[o]=Le(e,t[o],r);return i};var je={},ze=Se;function He(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}je.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=A.concat([e._cache,He(e)]);var r=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),ze(t,r)};var qe={};function Ge(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}var We=Ge,Ye=Se,Ve=Ie.Buffer,Xe=We;function Ke(e){var t=e._cipher.encryptBlockRaw(e._prev);return Xe(e._prev),t}var Qe=16;qe.encrypt=function(e,t){var r=Math.ceil(t.length/Qe),n=e._cache.length;e._cache=Ve.concat([e._cache,Ve.allocUnsafe(r*Qe)]);for(var i=0;i<r;i++){var o=Ke(e),a=n+i*Qe;e._cache.writeUInt32BE(o[0],a+0),e._cache.writeUInt32BE(o[1],a+4),e._cache.writeUInt32BE(o[2],a+8),e._cache.writeUInt32BE(o[3],a+12)}var s=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),Ye(t,s)};var Je={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},Ze={ECB:a,CBC:s,CFB:Ae,CFB8:Ne,CFB1:Be,OFB:je,CTR:qe,GCM:qe},$e=Je;for(var et in $e)$e[et].module=Ze[$e[et].mode];var tt=$e,rt={},nt=Ie.Buffer;function it(e){nt.isBuffer(e)||(e=nt.from(e));for(var t=e.length/4|0,r=new Array(t),n=0;n<t;n++)r[n]=e.readUInt32BE(4*n);return r}function ot(e){for(var t=0;t<e.length;e++)e[t]=0}function at(e,t,r,n,i){for(var o,a,s,c,u=r[0],f=r[1],d=r[2],l=r[3],h=e[0]^t[0],p=e[1]^t[1],m=e[2]^t[2],v=e[3]^t[3],b=4,g=1;g<i;g++)o=u[h>>>24]^f[p>>>16&255]^d[m>>>8&255]^l[255&v]^t[b++],a=u[p>>>24]^f[m>>>16&255]^d[v>>>8&255]^l[255&h]^t[b++],s=u[m>>>24]^f[v>>>16&255]^d[h>>>8&255]^l[255&p]^t[b++],c=u[v>>>24]^f[h>>>16&255]^d[p>>>8&255]^l[255&m]^t[b++],h=o,p=a,m=s,v=c;return o=(n[h>>>24]<<24|n[p>>>16&255]<<16|n[m>>>8&255]<<8|n[255&v])^t[b++],a=(n[p>>>24]<<24|n[m>>>16&255]<<16|n[v>>>8&255]<<8|n[255&h])^t[b++],s=(n[m>>>24]<<24|n[v>>>16&255]<<16|n[h>>>8&255]<<8|n[255&p])^t[b++],c=(n[v>>>24]<<24|n[h>>>16&255]<<16|n[p>>>8&255]<<8|n[255&m])^t[b++],[o>>>=0,a>>>=0,s>>>=0,c>>>=0]}var st,ct=[0,1,2,4,8,16,32,64,128,27,54],ut=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,c=0;c<256;++c){var u=s^s<<1^s<<2^s<<3^s<<4;u=u>>>8^255&u^99,r[a]=u,n[u]=a;var f=e[a],d=e[f],l=e[d],h=257*e[u]^16843008*u;i[0][a]=h<<24|h>>>8,i[1][a]=h<<16|h>>>16,i[2][a]=h<<8|h>>>24,i[3][a]=h,h=16843009*l^65537*d^257*f^16843008*a,o[0][u]=h<<24|h>>>8,o[1][u]=h<<16|h>>>16,o[2][u]=h<<8|h>>>24,o[3][u]=h,0===a?a=s=1:(a=f^e[e[e[l^f]]],s^=e[e[s]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function ft(e){this._key=it(e),this._reset()}function dt(){}function lt(){lt.init.call(this)}function ht(e){return void 0===e._maxListeners?lt.defaultMaxListeners:e._maxListeners}function pt(e,t,r){if(t)e.call(r);else for(var n=e.length,i=St(e,n),o=0;o<n;++o)i[o].call(r)}function mt(e,t,r,n){if(t)e.call(r,n);else for(var i=e.length,o=St(e,i),a=0;a<i;++a)o[a].call(r,n)}function vt(e,t,r,n,i){if(t)e.call(r,n,i);else for(var o=e.length,a=St(e,o),s=0;s<o;++s)a[s].call(r,n,i)}function bt(e,t,r,n,i,o){if(t)e.call(r,n,i,o);else for(var a=e.length,s=St(e,a),c=0;c<a;++c)s[c].call(r,n,i,o)}function gt(e,t,r,n){if(t)e.apply(r,n);else for(var i=e.length,o=St(e,i),a=0;a<i;++a)o[a].apply(r,n)}function yt(e,t,r,n){var i,o,a;if("function"!==typeof r)throw new TypeError('"listener" argument must be a function');if((o=e._events)?(o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]):(o=e._events=new dt,e._eventsCount=0),a){if("function"===typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),!a.warned&&(i=ht(e))&&i>0&&a.length>i){a.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=a.length,_t(s)}}else a=o[t]=r,++e._eventsCount;return e}function _t(e){"function"===typeof console.warn?console.warn(e):console.log(e)}function wt(e,t,r){var n=!1;function i(){e.removeListener(t,i),n||(n=!0,r.apply(e,arguments))}return i.listener=r,i}function xt(e){var t=this._events;if(t){var r=t[e];if("function"===typeof r)return 1;if(r)return r.length}return 0}function Et(e,t){for(var r=t,n=r+1,i=e.length;n<i;r+=1,n+=1)e[r]=e[n];e.pop()}function St(e,t){for(var r=new Array(t);t--;)r[t]=e[t];return r}function Tt(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}ft.blockSize=16,ft.keySize=32,ft.prototype.blockSize=ft.blockSize,ft.prototype.keySize=ft.keySize,ft.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o<t;o++)i[o]=e[o];for(o=t;o<n;o++){var a=i[o-1];o%t===0?(a=a<<8|a>>>24,a=ut.SBOX[a>>>24]<<24|ut.SBOX[a>>>16&255]<<16|ut.SBOX[a>>>8&255]<<8|ut.SBOX[255&a],a^=ct[o/t|0]<<24):t>6&&o%t===4&&(a=ut.SBOX[a>>>24]<<24|ut.SBOX[a>>>16&255]<<16|ut.SBOX[a>>>8&255]<<8|ut.SBOX[255&a]),i[o]=i[o-t]^a}for(var s=[],c=0;c<n;c++){var u=n-c,f=i[u-(c%4?0:4)];s[c]=c<4||u<=4?f:ut.INV_SUB_MIX[0][ut.SBOX[f>>>24]]^ut.INV_SUB_MIX[1][ut.SBOX[f>>>16&255]]^ut.INV_SUB_MIX[2][ut.SBOX[f>>>8&255]]^ut.INV_SUB_MIX[3][ut.SBOX[255&f]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=s},ft.prototype.encryptBlockRaw=function(e){return at(e=it(e),this._keySchedule,ut.SUB_MIX,ut.SBOX,this._nRounds)},ft.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=nt.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},ft.prototype.decryptBlock=function(e){var t=(e=it(e))[1];e[1]=e[3],e[3]=t;var r=at(e,this._invKeySchedule,ut.INV_SUB_MIX,ut.INV_SBOX,this._nRounds),n=nt.allocUnsafe(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[3],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[1],12),n},ft.prototype.scrub=function(){ot(this._keySchedule),ot(this._invKeySchedule),ot(this._key)},rt.AES=ft,dt.prototype=Object.create(null),lt.EventEmitter=lt,lt.usingDomains=!1,lt.prototype.domain=void 0,lt.prototype._events=void 0,lt.prototype._maxListeners=void 0,lt.defaultMaxListeners=10,lt.init=function(){this.domain=null,lt.usingDomains&&st.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new dt,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},lt.prototype.setMaxListeners=function(e){if("number"!==typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},lt.prototype.getMaxListeners=function(){return ht(this)},lt.prototype.emit=function(e){var t,r,n,i,o,a,s,c="error"===e;if(a=this._events)c=c&&null==a.error;else if(!c)return!1;if(s=this.domain,c){if(t=arguments[1],!s){if(t instanceof Error)throw t;var u=new Error('Uncaught, unspecified "error" event. ('+t+")");throw u.context=t,u}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=s,t.domainThrown=!1,s.emit("error",t),!1}if(!(r=a[e]))return!1;var f="function"===typeof r;switch(n=arguments.length){case 1:pt(r,f,this);break;case 2:mt(r,f,this,arguments[1]);break;case 3:vt(r,f,this,arguments[1],arguments[2]);break;case 4:bt(r,f,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(n-1),o=1;o<n;o++)i[o-1]=arguments[o];gt(r,f,this,i)}return!0},lt.prototype.addListener=function(e,t){return yt(this,e,t,!1)},lt.prototype.on=lt.prototype.addListener,lt.prototype.prependListener=function(e,t){return yt(this,e,t,!0)},lt.prototype.once=function(e,t){if("function"!==typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,wt(this,e,t)),this},lt.prototype.prependOnceListener=function(e,t){if("function"!==typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,wt(this,e,t)),this},lt.prototype.removeListener=function(e,t){var r,n,i,o,a;if("function"!==typeof t)throw new TypeError('"listener" argument must be a function');if(!(n=this._events))return this;if(!(r=n[e]))return this;if(r===t||r.listener&&r.listener===t)0===--this._eventsCount?this._events=new dt:(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!==typeof r){for(i=-1,o=r.length;o-- >0;)if(r[o]===t||r[o].listener&&r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;if(1===r.length){if(r[0]=void 0,0===--this._eventsCount)return this._events=new dt,this;delete n[e]}else Et(r,i);n.removeListener&&this.emit("removeListener",e,a||t)}return this},lt.prototype.off=function(e,t){return this.removeListener(e,t)},lt.prototype.removeAllListeners=function(e){var t,r;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=new dt,this._eventsCount=0):r[e]&&(0===--this._eventsCount?this._events=new dt:delete r[e]),this;if(0===arguments.length){for(var n,i=Object.keys(r),o=0;o<i.length;++o)"removeListener"!==(n=i[o])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=new dt,this._eventsCount=0,this}if("function"===typeof(t=r[e]))this.removeListener(e,t);else if(t)do{this.removeListener(e,t[t.length-1])}while(t[0]);return this},lt.prototype.listeners=function(e){var t,r=this._events;return r&&(t=r[e])?"function"===typeof t?[t.listener||t]:Tt(t):[]},lt.listenerCount=function(e,t){return"function"===typeof e.listenerCount?e.listenerCount(t):xt.call(e,t)},lt.prototype.listenerCount=xt,lt.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]};var At=Object.freeze({__proto__:null,EventEmitter:lt,default:lt});function Rt(){throw new Error("setTimeout has not been defined")}function Mt(){throw new Error("clearTimeout has not been defined")}var It=Rt,Ot=Mt;function Ct(e){if(It===setTimeout)return setTimeout(e,0);if((It===Rt||!It)&&setTimeout)return It=setTimeout,setTimeout(e,0);try{return It(e,0)}catch(t){try{return It.call(null,e,0)}catch(t){return It.call(this,e,0)}}}function Pt(e){if(Ot===clearTimeout)return clearTimeout(e);if((Ot===Mt||!Ot)&&clearTimeout)return Ot=clearTimeout,clearTimeout(e);try{return Ot(e)}catch(t){try{return Ot.call(null,e)}catch(t){return Ot.call(this,e)}}}"function"===typeof c.setTimeout&&(It=setTimeout),"function"===typeof c.clearTimeout&&(Ot=clearTimeout);var Nt,kt=[],Ut=!1,Bt=-1;function Dt(){Ut&&Nt&&(Ut=!1,Nt.length?kt=Nt.concat(kt):Bt=-1,kt.length&&Lt())}function Lt(){if(!Ut){var e=Ct(Dt);Ut=!0;for(var t=kt.length;t;){for(Nt=kt,kt=[];++Bt<t;)Nt&&Nt[Bt].run();Bt=-1,t=kt.length}Nt=null,Ut=!1,Pt(e)}}function Ft(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];kt.push(new jt(e,t)),1!==kt.length||Ut||Ct(Lt)}function jt(e,t){this.fun=e,this.array=t}jt.prototype.run=function(){this.fun.apply(null,this.array)};var zt="browser",Ht="browser",qt=!0,Gt={},Wt=[],Yt="",Vt={},Xt={},Kt={};function Qt(){}var Jt=Qt,Zt=Qt,$t=Qt,er=Qt,tr=Qt,rr=Qt,nr=Qt;function ir(e){throw new Error("process.binding is not supported")}function or(){return"/"}function ar(e){throw new Error("process.chdir is not supported")}function sr(){return 0}var cr=c.performance||{},ur=cr.now||cr.mozNow||cr.msNow||cr.oNow||cr.webkitNow||function(){return(new Date).getTime()};function fr(e){var t=.001*ur.call(cr),r=Math.floor(t),n=Math.floor(t%1*1e9);return e&&(r-=e[0],(n-=e[1])<0&&(r--,n+=1e9)),[r,n]}var dr=new Date;function lr(){return(new Date-dr)/1e3}var hr={nextTick:Ft,title:zt,browser:qt,env:Gt,argv:Wt,version:Yt,versions:Vt,on:Jt,addListener:Zt,once:$t,off:er,removeListener:tr,removeAllListeners:rr,emit:nr,binding:ir,cwd:or,chdir:ar,umask:sr,hrtime:fr,platform:Ht,release:Xt,config:Kt,uptime:lr},pr="function"===typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e},mr=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},vr=/%[sdj%]/g;function br(e){if(!Dr(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(xr(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,i=n.length,o=String(e).replace(vr,(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(t){return"[Circular]"}default:return e}})),a=n[r];r<i;a=n[++r])kr(a)||!zr(a)?o+=" "+a:o+=" "+xr(a);return o}function gr(e,t){if(Fr(c.process))return function(){return gr(e,t).apply(this,arguments)};if(!0===hr.noDeprecation)return e;var r=!1;function n(){if(!r){if(hr.throwDeprecation)throw new Error(t);hr.traceDeprecation?console.trace(t):console.error(t),r=!0}return e.apply(this,arguments)}return n}var yr,_r={};function wr(e){if(Fr(yr)&&(yr=hr.env.NODE_DEBUG||""),e=e.toUpperCase(),!_r[e])if(new RegExp("\\b"+e+"\\b","i").test(yr)){var t=0;_r[e]=function(){var r=br.apply(null,arguments);console.error("%s %d: %s",e,t,r)}}else _r[e]=function(){};return _r[e]}function xr(e,t){var r={seen:[],stylize:Sr};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Nr(t)?r.showHidden=t:t&&Zr(r,t),Fr(r.showHidden)&&(r.showHidden=!1),Fr(r.depth)&&(r.depth=2),Fr(r.colors)&&(r.colors=!1),Fr(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=Er),Ar(r,e,r.depth)}function Er(e,t){var r=xr.styles[t];return r?"\x1b["+xr.colors[r][0]+"m"+e+"\x1b["+xr.colors[r][1]+"m":e}function Sr(e,t){return e}function Tr(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}function Ar(e,t,r){if(e.customInspect&&t&&Gr(t.inspect)&&t.inspect!==xr&&(!t.constructor||t.constructor.prototype!==t)){var n=t.inspect(r,e);return Dr(n)||(n=Ar(e,n,r)),n}var i=Rr(e,t);if(i)return i;var o=Object.keys(t),a=Tr(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),qr(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return Mr(t);if(0===o.length){if(Gr(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(jr(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(Hr(t))return e.stylize(Date.prototype.toString.call(t),"date");if(qr(t))return Mr(t)}var c,u="",f=!1,d=["{","}"];return Pr(t)&&(f=!0,d=["[","]"]),Gr(t)&&(u=" [Function"+(t.name?": "+t.name:"")+"]"),jr(t)&&(u=" "+RegExp.prototype.toString.call(t)),Hr(t)&&(u=" "+Date.prototype.toUTCString.call(t)),qr(t)&&(u=" "+Mr(t)),0!==o.length||f&&0!=t.length?r<0?jr(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),c=f?Ir(e,t,r,a,o):o.map((function(n){return Or(e,t,r,a,n,f)})),e.seen.pop(),Cr(c,u,d)):d[0]+u+d[1]}function Rr(e,t){if(Fr(t))return e.stylize("undefined","undefined");if(Dr(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return Br(t)?e.stylize(""+t,"number"):Nr(t)?e.stylize(""+t,"boolean"):kr(t)?e.stylize("null","null"):void 0}function Mr(e){return"["+Error.prototype.toString.call(e)+"]"}function Ir(e,t,r,n,i){for(var o=[],a=0,s=t.length;a<s;++a)$r(t,String(a))?o.push(Or(e,t,r,n,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(Or(e,t,r,n,i,!0))})),o}function Or(e,t,r,n,i,o){var a,s,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),$r(n,i)||(a="["+i+"]"),s||(e.seen.indexOf(c.value)<0?(s=kr(r)?Ar(e,c.value,null):Ar(e,c.value,r-1)).indexOf("\n")>-1&&(s=o?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")),Fr(a)){if(o&&i.match(/^\d+$/))return s;(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function Cr(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]}function Pr(e){return Array.isArray(e)}function Nr(e){return"boolean"===typeof e}function kr(e){return null===e}function Ur(e){return null==e}function Br(e){return"number"===typeof e}function Dr(e){return"string"===typeof e}function Lr(e){return"symbol"===typeof e}function Fr(e){return void 0===e}function jr(e){return zr(e)&&"[object RegExp]"===Vr(e)}function zr(e){return"object"===typeof e&&null!==e}function Hr(e){return zr(e)&&"[object Date]"===Vr(e)}function qr(e){return zr(e)&&("[object Error]"===Vr(e)||e instanceof Error)}function Gr(e){return"function"===typeof e}function Wr(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e}function Yr(e){return A.isBuffer(e)}function Vr(e){return Object.prototype.toString.call(e)}function Xr(e){return e<10?"0"+e.toString(10):e.toString(10)}xr.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]},xr.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var Kr=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Qr(){var e=new Date,t=[Xr(e.getHours()),Xr(e.getMinutes()),Xr(e.getSeconds())].join(":");return[e.getDate(),Kr[e.getMonth()],t].join(" ")}function Jr(){console.log("%s - %s",Qr(),br.apply(null,arguments))}function Zr(e,t){if(!t||!zr(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}function $r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var en="undefined"!==typeof Symbol?Symbol("util.promisify.custom"):void 0;function tn(e){if("function"!==typeof e)throw new TypeError('The "original" argument must be of type Function');if(en&&e[en]){var t;if("function"!==typeof(t=e[en]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,en,{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=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,i)}catch(a){r(a)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),en&&Object.defineProperty(t,en,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,mr(e))}function rn(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}function nn(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 n=t.pop();if("function"!==typeof n)throw new TypeError("The last argument must be of type Function");var i=this,o=function(){return n.apply(i,arguments)};e.apply(this,t).then((function(e){hr.nextTick(o.bind(null,null,e))}),(function(e){hr.nextTick(rn.bind(null,e,o))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,mr(e)),t}tn.custom=en;var on={inherits:pr,_extend:Zr,log:Jr,isBuffer:Yr,isPrimitive:Wr,isFunction:Gr,isError:qr,isDate:Hr,isObject:zr,isRegExp:jr,isUndefined:Fr,isSymbol:Lr,isString:Dr,isNumber:Br,isNullOrUndefined:Ur,isNull:kr,isBoolean:Nr,isArray:Pr,inspect:xr,deprecate:gr,format:br,debuglog:wr,promisify:tn,callbackify:nn},an=Object.freeze({__proto__:null,_extend:Zr,callbackify:nn,debuglog:wr,default:on,deprecate:gr,format:br,inherits:pr,inspect:xr,isArray:Pr,isBoolean:Nr,isBuffer:Yr,isDate:Hr,isError:qr,isFunction:Gr,isNull:kr,isNullOrUndefined:Ur,isNumber:Br,isObject:zr,isPrimitive:Wr,isRegExp:jr,isString:Dr,isSymbol:Lr,isUndefined:Fr,log:Jr,promisify:tn});function sn(){this.head=null,this.tail=null,this.length=0}sn.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},sn.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},sn.prototype.shift=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}},sn.prototype.clear=function(){this.head=this.tail=null,this.length=0},sn.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},sn.prototype.concat=function(e){if(0===this.length)return A.alloc(0);if(1===this.length)return this.head.data;for(var t=A.allocUnsafe(e>>>0),r=this.head,n=0;r;)r.data.copy(t,n),n+=r.data.length,r=r.next;return t};var cn=A.isEncoding||function(e){switch(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 un(e){if(e&&!cn(e))throw new Error("Unknown encoding: "+e)}function fn(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),un(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=ln;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=hn;break;default:return void(this.write=dn)}this.charBuffer=new A(6),this.charReceived=0,this.charLength=0}function dn(e){return e.toString(this.encoding)}function ln(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function hn(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}fn.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";if(e=e.slice(r,e.length),!((n=(t=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(t.length-1))>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var n,i=e.length;if(this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),i=(t+=e.toString(this.encoding,0,i)).length-1,(n=t.charCodeAt(i))>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),e.copy(this.charBuffer,0,0,o),t.substring(0,i)}return t},fn.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},fn.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t};var pn=Object.freeze({__proto__:null,StringDecoder:fn});yn.ReadableState=gn;var mn=wr("stream");function vn(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)}function bn(e,t){return e.listeners(t).length}function gn(e,t){e=e||{},this.objectMode=!!e.objectMode,t instanceof hi&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n,this.highWaterMark=~~this.highWaterMark,this.buffer=new sn,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.defaultEncoding=e.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(this.decoder=new fn(e.encoding),this.encoding=e.encoding)}function yn(e){if(!(this instanceof yn))return new yn(e);this._readableState=new gn(e,this),this.readable=!0,e&&"function"===typeof e.read&&(this._read=e.read),lt.call(this)}function _n(e,t,r,n,i){var o=Tn(t,r);if(o)e.emit("error",o);else if(null===r)t.reading=!1,An(e,t);else if(t.objectMode||r&&r.length>0)if(t.ended&&!i){var a=new Error("stream.push() after EOF");e.emit("error",a)}else if(t.endEmitted&&i){var s=new Error("stream.unshift() after end event");e.emit("error",s)}else{var c;!t.decoder||i||n||(r=t.decoder.write(r),c=!t.objectMode&&0===r.length),i||(t.reading=!1),c||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&Rn(e))),In(e,t)}else i||(t.reading=!1);return wn(t)}function wn(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}pr(yn,lt),yn.prototype.push=function(e,t){var r=this._readableState;return r.objectMode||"string"!==typeof e||(t=t||r.defaultEncoding)!==r.encoding&&(e=A.from(e,t),t=""),_n(this,r,e,t,!1)},yn.prototype.unshift=function(e){return _n(this,this._readableState,e,"",!0)},yn.prototype.isPaused=function(){return!1===this._readableState.flowing},yn.prototype.setEncoding=function(e){return this._readableState.decoder=new fn(e),this._readableState.encoding=e,this};var xn=8388608;function En(e){return e>=xn?e=xn:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function Sn(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=En(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function Tn(e,t){var r=null;return A.isBuffer(t)||"string"===typeof t||null===t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function An(e,t){if(!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,Rn(e)}}function Rn(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(mn("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?Ft(Mn,e):Mn(e))}function Mn(e){mn("emit readable"),e.emit("readable"),Un(e)}function In(e,t){t.readingMore||(t.readingMore=!0,Ft(On,e,t))}function On(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(mn("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function Cn(e){return function(){var t=e._readableState;mn("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&e.listeners("data").length&&(t.flowing=!0,Un(e))}}function Pn(e){mn("readable nexttick read 0"),e.read(0)}function Nn(e,t){t.resumeScheduled||(t.resumeScheduled=!0,Ft(kn,e,t))}function kn(e,t){t.reading||(mn("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),Un(e),t.flowing&&!t.reading&&e.read(0)}function Un(e){var t=e._readableState;for(mn("flow",t.flowing);t.flowing&&null!==e.read(););}function Bn(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.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=Dn(e,t.buffer,t.decoder),r);var r}function Dn(e,t,r){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?Ln(e,t):Fn(e,t),n}function Ln(e,t){var r=t.head,n=1,i=r.data;for(e-=i.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0===(e-=a)){a===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(a));break}++n}return t.length-=n,i}function Fn(e,t){var r=A.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,a),0===(e-=a)){a===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(a));break}++i}return t.length-=i,r}function jn(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,Ft(zn,t,e))}function zn(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function Hn(e,t){for(var r=0,n=e.length;r<n;r++)t(e[r],r)}function qn(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function Gn(){}function Wn(e,t,r){this.chunk=e,this.encoding=t,this.callback=r,this.next=null}function Yn(e,t){Object.defineProperty(this,"buffer",{get:gr((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")}),e=e||{},this.objectMode=!!e.objectMode,t instanceof hi&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,n=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var i=!1===e.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){ti(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new ui(this)}function Vn(e){if(!(this instanceof Vn)&&!(this instanceof hi))return new Vn(e);this._writableState=new Yn(e,this),this.writable=!0,e&&("function"===typeof e.write&&(this._write=e.write),"function"===typeof e.writev&&(this._writev=e.writev)),lt.call(this)}function Xn(e,t){var r=new Error("write after end");e.emit("error",r),Ft(t,r)}function Kn(e,t,r,n){var i=!0,o=!1;return null===r?o=new TypeError("May not write null values to stream"):A.isBuffer(r)||"string"===typeof r||void 0===r||t.objectMode||(o=new TypeError("Invalid non-string/buffer chunk")),o&&(e.emit("error",o),Ft(n,o),i=!1),i}function Qn(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=A.from(t,r)),t}function Jn(e,t,r,n,i){r=Qn(t,r,n),A.isBuffer(r)&&(n="buffer");var o=t.objectMode?1:r.length;t.length+=o;var a=t.length<t.highWaterMark;if(a||(t.needDrain=!0),t.writing||t.corked){var s=t.lastBufferedRequest;t.lastBufferedRequest=new Wn(r,n,i),s?s.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else Zn(e,t,!1,o,r,n,i);return a}function Zn(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function $n(e,t,r,n,i){--t.pendingcb,r?Ft(i,n):i(n),e._writableState.errorEmitted=!0,e.emit("error",n)}function ei(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function ti(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if(ei(r),t)$n(e,r,n,t,i);else{var o=oi(r);o||r.corked||r.bufferProcessing||!r.bufferedRequest||ii(e,r),n?Ft(ri,e,r,o,i):ri(e,r,o,i)}}function ri(e,t,r,n){r||ni(e,t),t.pendingcb--,n(),si(e,t)}function ni(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function ii(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 a=0;r;)i[a]=r,r=r.next,a+=1;Zn(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 ui(t)}else{for(;r;){var s=r.chunk,c=r.encoding,u=r.callback;if(Zn(e,t,!1,t.objectMode?1:s.length,s,c,u),r=r.next,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=r,t.bufferProcessing=!1}function oi(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function ai(e,t){t.prefinished||(t.prefinished=!0,e.emit("prefinish"))}function si(e,t){var r=oi(t);return r&&(0===t.pendingcb?(ai(e,t),t.finished=!0,e.emit("finish")):ai(e,t)),r}function ci(e,t,r){t.ending=!0,si(e,t),r&&(t.finished?Ft(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function ui(e){var t=this;this.next=null,this.entry=null,this.finish=function(r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}yn.prototype.read=function(e){mn("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return mn("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?jn(this):Rn(this),null;if(0===(e=Sn(e,t))&&t.ended)return 0===t.length&&jn(this),null;var n,i=t.needReadable;return mn("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&mn("length less than watermark",i=!0),t.ended||t.reading?mn("reading or ended",i=!1):i&&(mn("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=Sn(r,t))),null===(n=e>0?Bn(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&jn(this)),null!==n&&this.emit("data",n),n},yn.prototype._read=function(e){this.emit("error",new Error("not implemented"))},yn.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,mn("pipe count=%d opts=%j",n.pipesCount,t);var i=t&&!1===t.end?u:a;function o(e){mn("onunpipe"),e===r&&u()}function a(){mn("onend"),e.end()}n.endEmitted?Ft(i):r.once("end",i),e.on("unpipe",o);var s=Cn(r);e.on("drain",s);var c=!1;function u(){mn("cleanup"),e.removeListener("close",h),e.removeListener("finish",p),e.removeListener("drain",s),e.removeListener("error",l),e.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",u),r.removeListener("data",d),c=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||s()}var f=!1;function d(t){mn("ondata"),f=!1,!1!==e.write(t)||f||((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==qn(n.pipes,e))&&!c&&(mn("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,f=!0),r.pause())}function l(t){mn("onerror",t),m(),e.removeListener("error",l),0===bn(e,"error")&&e.emit("error",t)}function h(){e.removeListener("finish",p),m()}function p(){mn("onfinish"),e.removeListener("close",h),m()}function m(){mn("unpipe"),r.unpipe(e)}return r.on("data",d),vn(e,"error",l),e.once("close",h),e.once("finish",p),e.emit("pipe",r),n.flowing||(mn("pipe resume"),r.resume()),e},yn.prototype.unpipe=function(e){var t=this._readableState;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)),this;if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<n;i++)r[i].emit("unpipe",this);return this}var o=qn(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)),this},yn.prototype.on=function(e,t){var r=lt.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&Rn(this):Ft(Pn,this))}return r},yn.prototype.addListener=yn.prototype.on,yn.prototype.resume=function(){var e=this._readableState;return e.flowing||(mn("resume"),e.flowing=!0,Nn(this,e)),this},yn.prototype.pause=function(){return mn("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(mn("pause"),this._readableState.flowing=!1,this.emit("pause")),this},yn.prototype.wrap=function(e){var t=this._readableState,r=!1,n=this;for(var i in e.on("end",(function(){if(mn("wrapped end"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&n.push(e)}n.push(null)})),e.on("data",(function(i){mn("wrapped data"),t.decoder&&(i=t.decoder.write(i)),(!t.objectMode||null!==i&&void 0!==i)&&(t.objectMode||i&&i.length)&&(n.push(i)||(r=!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));return Hn(["error","close","destroy","pause","resume"],(function(t){e.on(t,n.emit.bind(n,t))})),n._read=function(t){mn("wrapped _read",t),r&&(r=!1,e.resume())},n},yn._fromList=Bn,Vn.WritableState=Yn,pr(Vn,lt),Yn.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},Vn.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},Vn.prototype.write=function(e,t,r){var n=this._writableState,i=!1;return"function"===typeof t&&(r=t,t=null),A.isBuffer(e)?t="buffer":t||(t=n.defaultEncoding),"function"!==typeof r&&(r=Gn),n.ended?Xn(this,r):Kn(this,n,e,r)&&(n.pendingcb++,i=Jn(this,n,e,t,r)),i},Vn.prototype.cork=function(){this._writableState.corked++},Vn.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||ii(this,e))},Vn.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 TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Vn.prototype._write=function(e,t,r){r(new Error("not implemented"))},Vn.prototype._writev=null,Vn.prototype.end=function(e,t,r){var n=this._writableState;"function"===typeof e?(r=e,e=null,t=null):"function"===typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||ci(this,n,r)},pr(hi,yn);for(var fi=Object.keys(Vn.prototype),di=0;di<fi.length;di++){var li=fi[di];hi.prototype[li]||(hi.prototype[li]=Vn.prototype[li])}function hi(e){if(!(this instanceof hi))return new hi(e);yn.call(this,e),Vn.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",pi)}function pi(){this.allowHalfOpen||this._writableState.ended||Ft(mi,this)}function mi(e){e.end()}function vi(e){this.afterTransform=function(t,r){return bi(e,t,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function bi(e,t,r){var n=e._transformState;n.transforming=!1;var i=n.writecb;if(!i)return e.emit("error",new Error("no writecb in Transform class"));n.writechunk=null,n.writecb=null,null!==r&&void 0!==r&&e.push(r),i(t);var o=e._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&e._read(o.highWaterMark)}function gi(e){if(!(this instanceof gi))return new gi(e);hi.call(this,e),this._transformState=new vi(this);var t=this;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.once("prefinish",(function(){"function"===typeof this._flush?this._flush((function(e){yi(t,e)})):yi(t)}))}function yi(e,t){if(t)return e.emit("error",t);var r=e._writableState,n=e._transformState;if(r.length)throw new Error("Calling transform done when ws.length != 0");if(n.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}function _i(e){if(!(this instanceof _i))return new _i(e);gi.call(this,e)}function wi(){lt.call(this)}pr(gi,hi),gi.prototype.push=function(e,t){return this._transformState.needTransform=!1,hi.prototype.push.call(this,e,t)},gi.prototype._transform=function(e,t,r){throw new Error("Not implemented")},gi.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)}},gi.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},pr(_i,gi),_i.prototype._transform=function(e,t,r){r(null,e)},pr(wi,lt),wi.Readable=yn,wi.Writable=Vn,wi.Duplex=hi,wi.Transform=gi,wi.PassThrough=_i,wi.Stream=wi,wi.prototype.pipe=function(e,t){var r=this;function n(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",n),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",s));var o=!1;function a(){o||(o=!0,e.end())}function s(){o||(o=!0,"function"===typeof e.destroy&&e.destroy())}function c(e){if(u(),0===lt.listenerCount(this,"error"))throw e}function u(){r.removeListener("data",n),e.removeListener("drain",i),r.removeListener("end",a),r.removeListener("close",s),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return r.on("error",c),e.on("error",c),r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e};var xi=i(Object.freeze({__proto__:null,Duplex:hi,PassThrough:_i,Readable:yn,Stream:wi,Transform:gi,Writable:Vn,default:wi})),Ei=i(pn),Si="function"===typeof Object.create?function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e},Ti=i(Object.freeze({__proto__:null,default:Si})),Ai=Ie.Buffer,Ri=xi.Transform,Mi=Ei.StringDecoder;function Ii(e){Ri.call(this),this.hashMode="string"===typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}Ti(Ii,Ri),Ii.prototype.update=function(e,t,r){"string"===typeof e&&(e=Ai.from(e,t));var n=this._update(e);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)},Ii.prototype.setAutoPadding=function(){},Ii.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},Ii.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},Ii.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},Ii.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(i){n=i}finally{r(n)}},Ii.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(r){t=r}e(t)},Ii.prototype._finalOrDigest=function(e){var t=this.__final()||Ai.alloc(0);return e&&(t=this._toString(t,e,!0)),t},Ii.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new Mi(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n};var Oi=Ii,Ci=Ie.Buffer,Pi=Ci.alloc(16,0);function Ni(e){return[e.readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)]}function ki(e){var t=Ci.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function Ui(e){this.h=e,this.state=Ci.alloc(16,0),this.cache=Ci.allocUnsafe(0)}Ui.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},Ui.prototype._multiply=function(){for(var e,t,r=Ni(this.h),n=[0,0,0,0],i=-1;++i<128;){for(0!==(this.state[~~(i/8)]&1<<7-i%8)&&(n[0]^=r[0],n[1]^=r[1],n[2]^=r[2],n[3]^=r[3]),t=0!==(1&r[3]),e=3;e>0;e--)r[e]=r[e]>>>1|(1&r[e-1])<<31;r[0]=r[0]>>>1,t&&(r[0]=r[0]^225<<24)}this.state=ki(n)},Ui.prototype.update=function(e){var t;for(this.cache=Ci.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},Ui.prototype.final=function(e,t){return this.cache.length&&this.ghash(Ci.concat([this.cache,Pi],16)),this.ghash(ki([0,e,0,t])),this.state};var Bi=Ui,Di=rt,Li=Ie.Buffer,Fi=Oi,ji=Bi,zi=Se,Hi=We;function qi(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i<n;++i)r+=e[i]^t[i];return r}function Gi(e,t,r){if(12===t.length)return e._finID=Li.concat([t,Li.from([0,0,0,1])]),Li.concat([t,Li.from([0,0,0,2])]);var n=new ji(r),i=t.length,o=i%16;n.update(t),o&&(o=16-o,n.update(Li.alloc(o,0))),n.update(Li.alloc(8,0));var a=8*i,s=Li.alloc(8);s.writeUIntBE(a,0,8),n.update(s),e._finID=n.state;var c=Li.from(e._finID);return Hi(c),c}function Wi(e,t,r,n){Fi.call(this);var i=Li.alloc(4,0);this._cipher=new Di.AES(t);var o=this._cipher.encryptBlock(i);this._ghash=new ji(o),r=Gi(this,r,o),this._prev=Li.from(r),this._cache=Li.allocUnsafe(0),this._secCache=Li.allocUnsafe(0),this._decrypt=n,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}Ti(Wi,Fi),Wi.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=Li.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},Wi.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=zi(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&qi(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},Wi.prototype.getAuthTag=function(){if(this._decrypt||!Li.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},Wi.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},Wi.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length};var Yi=Wi,Vi=rt,Xi=Ie.Buffer,Ki=Oi;function Qi(e,t,r,n){Ki.call(this),this._cipher=new Vi.AES(t),this._prev=Xi.from(r),this._cache=Xi.allocUnsafe(0),this._secCache=Xi.allocUnsafe(0),this._decrypt=n,this._mode=e}Ti(Qi,Ki),Qi.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},Qi.prototype._final=function(){this._cipher.scrub()};var Ji,Zi,$i=Qi,eo={exports:{}},to=i(At),ro=to.EventEmitter,no=i(an);function io(){if(Zi)return Ji;function e(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 t(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?e(Object(i),!0).forEach((function(e){r(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function r(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(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,a(n.key),n)}}function o(e,t,r){return t&&i(e.prototype,t),r&&i(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function a(e){var t=s(e,"string");return"symbol"===typeof t?t:String(t)}function s(e,t){if("object"!==typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Zi=1;var c=Me.Buffer,u=no.inspect,f=u&&u.custom||"inspect";function d(e,t,r){c.prototype.copy.call(e,t,r)}return Ji=function(){function e(){n(this,e),this.head=null,this.tail=null,this.length=0}return o(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 c.alloc(0);for(var t=c.allocUnsafe(e>>>0),r=this.head,n=0;r;)d(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,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0===(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=c.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:f,value:function(e,r){return u(this,t(t({},r),{},{depth:0,customInspect:!1}))}}]),e}(),Ji}function oo(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,hr.nextTick(uo,this,e)):hr.nextTick(uo,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?hr.nextTick(so,r):(r._writableState.errorEmitted=!0,hr.nextTick(ao,r,e)):hr.nextTick(ao,r,e):t?(hr.nextTick(so,r),t(e)):hr.nextTick(so,r)})),this)}function ao(e,t){uo(e,t),so(e)}function so(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function co(){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)}function uo(e,t){e.emit("error",t)}function fo(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}var lo={destroy:oo,undestroy:co,errorOrDestroy:fo},ho={};function po(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var mo={};function vo(e,t,r){function n(e,r,n){return"string"===typeof t?t:t(e,r,n)}r||(r=Error);var i=function(e){function t(t,r,i){return e.call(this,n(t,r,i))||this}return po(t,e),t}(r);i.prototype.name=r.name,i.prototype.code=e,mo[e]=i}function bo(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))}function go(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function yo(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function _o(e,t,r){return"number"!==typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}vo("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),vo("ERR_INVALID_ARG_TYPE",(function(e,t,r){var n,i;if("string"===typeof t&&go(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be",yo(e," argument"))i="The ".concat(e," ").concat(n," ").concat(bo(t,"type"));else{var o=_o(e,".")?"property":"argument";i='The "'.concat(e,'" ').concat(o," ").concat(n," ").concat(bo(t,"type"))}return i+=". Received type ".concat(typeof r)}),TypeError),vo("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),vo("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),vo("ERR_STREAM_PREMATURE_CLOSE","Premature close"),vo("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),vo("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),vo("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),vo("ERR_STREAM_WRITE_AFTER_END","write after end"),vo("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),vo("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),vo("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),ho.codes=mo;var wo=ho.codes.ERR_INVALID_OPT_VALUE;function xo(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}function Eo(e,t,r,n){var i=xo(t,n,r);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new wo(n?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}var So,To,Ao,Ro,Mo={getHighWaterMark:Eo},Io=Oo;function Oo(e,t){if(Co("noDeprecation"))return e;var r=!1;function n(){if(!r){if(Co("throwDeprecation"))throw new Error(t);Co("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function Co(e){try{if(!t.localStorage)return!1}catch(n){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}function Po(){if(To)return So;function e(e){var t=this;this.next=null,this.entry=null,this.finish=function(){z(t,e)}}var r;To=1,So=S,S.WritableState=E;var n={deprecate:Io},i=ro,o=Me.Buffer,a=("undefined"!==typeof t?t:"undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).Uint8Array||function(){};function s(e){return o.from(e)}function c(e){return o.isBuffer(e)||e instanceof a}var u,f=lo,d=Mo.getHighWaterMark,l=ho.codes,h=l.ERR_INVALID_ARG_TYPE,p=l.ERR_METHOD_NOT_IMPLEMENTED,m=l.ERR_MULTIPLE_CALLBACK,v=l.ERR_STREAM_CANNOT_PIPE,b=l.ERR_STREAM_DESTROYED,g=l.ERR_STREAM_NULL_VALUES,y=l.ERR_STREAM_WRITE_AFTER_END,_=l.ERR_UNKNOWN_ENCODING,w=f.errorOrDestroy;function x(){}function E(t,n,i){r=r||No(),t=t||{},"boolean"!==typeof i&&(i=n instanceof r),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=d(this,t,"writableHighWaterMark",i),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(n,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 e(this)}function S(e){var t=this instanceof(r=r||No());if(!t&&!u.call(S,this))return new S(e);this._writableState=new E(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)),i.call(this)}function T(e,t){var r=new y;w(e,r),hr.nextTick(t,r)}function A(e,t,r,n){var i;return null===r?i=new g:"string"===typeof r||t.objectMode||(i=new h("chunk",["string","Buffer"],r)),!i||(w(e,i),hr.nextTick(n,i),!1)}function R(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!==typeof t||(t=o.from(t,r)),t}function M(e,t,r,n,i,o){if(!r){var a=R(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var c=t.length<t.highWaterMark;if(c||(t.needDrain=!0),t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else I(e,t,!1,s,n,i,o);return c}function I(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new b("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function O(e,t,r,n,i){--t.pendingcb,r?(hr.nextTick(i,n),hr.nextTick(F,e,t),e._writableState.errorEmitted=!0,w(e,n)):(i(n),e._writableState.errorEmitted=!0,w(e,n),F(e,t))}function C(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function P(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!==typeof i)throw new m;if(C(r),t)O(e,r,n,t,i);else{var o=B(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||U(e,r),n?hr.nextTick(N,e,r,o,i):N(e,r,o,i)}}function N(e,t,r,n){r||k(e,t),t.pendingcb--,n(),F(e,t)}function k(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}function U(t,r){r.bufferProcessing=!0;var n=r.bufferedRequest;if(t._writev&&n&&n.next){var i=r.bufferedRequestCount,o=new Array(i),a=r.corkedRequestsFree;a.entry=n;for(var s=0,c=!0;n;)o[s]=n,n.isBuf||(c=!1),n=n.next,s+=1;o.allBuffers=c,I(t,r,!0,r.length,o,"",a.finish),r.pendingcb++,r.lastBufferedRequest=null,a.next?(r.corkedRequestsFree=a.next,a.next=null):r.corkedRequestsFree=new e(r),r.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,f=n.encoding,d=n.callback;if(I(t,r,!1,r.objectMode?1:u.length,u,f,d),n=n.next,r.bufferedRequestCount--,r.writing)break}null===n&&(r.lastBufferedRequest=null)}r.bufferedRequest=n,r.bufferProcessing=!1}function B(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function D(e,t){e._final((function(r){t.pendingcb--,r&&w(e,r),t.prefinished=!0,e.emit("prefinish"),F(e,t)}))}function L(e,t){t.prefinished||t.finalCalled||("function"!==typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,hr.nextTick(D,e,t)))}function F(e,t){var r=B(t);if(r&&(L(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 j(e,t,r){t.ending=!0,F(e,t),r&&(t.finished?hr.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}function z(e,t,r){var n=e.entry;for(e.entry=null;n;){var i=n.callback;t.pendingcb--,i(r),n=n.next}t.corkedRequestsFree.next=e}return Ti(S,i),E.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(E.prototype,"buffer",{get:n.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]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(S,Symbol.hasInstance,{value:function(e){return!!u.call(this,e)||this===S&&e&&e._writableState instanceof E}})):u=function(e){return e instanceof this},S.prototype.pipe=function(){w(this,new v)},S.prototype.write=function(e,t,r){var n=this._writableState,i=!1,a=!n.objectMode&&c(e);return a&&!o.isBuffer(e)&&(e=s(e)),"function"===typeof t&&(r=t,t=null),a?t="buffer":t||(t=n.defaultEncoding),"function"!==typeof r&&(r=x),n.ending?T(this,r):(a||A(this,n,e,r))&&(n.pendingcb++,i=M(this,n,a,e,t,r)),i},S.prototype.cork=function(){this._writableState.corked++},S.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||U(this,e))},S.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 _(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(S.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(S.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),S.prototype._write=function(e,t,r){r(new p("_write()"))},S.prototype._writev=null,S.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&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||j(this,n,r),this},Object.defineProperty(S.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(S.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),S.prototype.destroy=f.destroy,S.prototype._undestroy=f.undestroy,S.prototype._destroy=function(e,t){t(e)},So}function No(){if(Ro)return Ao;Ro=1;var e=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Ao=a;var t=Xo(),r=Po();Ti(a,t);for(var n=e(r.prototype),i=0;i<n.length;i++){var o=n[i];a.prototype[o]||(a.prototype[o]=r.prototype[o])}function a(e){if(!(this instanceof a))return new a(e);t.call(this,e),r.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",s)))}function s(){this._writableState.ended||hr.nextTick(c,this)}function c(e){e.end()}return Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(a.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)}}),Ao}var ko=ho.codes.ERR_STREAM_PREMATURE_CLOSE;function Uo(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)}}}function Bo(){}function Do(e){return e.setHeader&&"function"===typeof e.abort}function Lo(e,t,r){if("function"===typeof t)return Lo(e,null,t);t||(t={}),r=Uo(r||Bo);var n=t.readable||!1!==t.readable&&e.readable,i=t.writable||!1!==t.writable&&e.writable,o=function(){e.writable||s()},a=e._writableState&&e._writableState.finished,s=function(){i=!1,a=!0,n||r.call(e)},c=e._readableState&&e._readableState.endEmitted,u=function(){n=!1,c=!0,i||r.call(e)},f=function(t){r.call(e,t)},d=function(){var t;return n&&!c?(e._readableState&&e._readableState.ended||(t=new ko),r.call(e,t)):i&&!a?(e._writableState&&e._writableState.ended||(t=new ko),r.call(e,t)):void 0},l=function(){e.req.on("finish",s)};return Do(e)?(e.on("complete",s),e.on("abort",d),e.req?l():e.on("request",l)):i&&!e._writableState&&(e.on("end",o),e.on("close",o)),e.on("end",u),e.on("finish",s),!1!==t.error&&e.on("error",f),e.on("close",d),function(){e.removeListener("complete",s),e.removeListener("abort",d),e.removeListener("request",l),e.req&&e.req.removeListener("finish",s),e.removeListener("end",o),e.removeListener("close",o),e.removeListener("finish",s),e.removeListener("end",u),e.removeListener("error",f),e.removeListener("close",d)}}var Fo,jo,zo,Ho,qo,Go,Wo=Lo;function Yo(){if(jo)return Fo;var e;function t(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){var t=n(e,"string");return"symbol"===typeof t?t:String(t)}function n(e,t){if("object"!==typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!==typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}jo=1;var i=Wo,o=Symbol("lastResolve"),a=Symbol("lastReject"),s=Symbol("error"),c=Symbol("ended"),u=Symbol("lastPromise"),f=Symbol("handlePromise"),d=Symbol("stream");function l(e,t){return{value:e,done:t}}function h(e){var t=e[o];if(null!==t){var r=e[d].read();null!==r&&(e[u]=null,e[o]=null,e[a]=null,t(l(r,!1)))}}function p(e){hr.nextTick(h,e)}function m(e,t){return function(r,n){e.then((function(){t[c]?r(l(void 0,!0)):t[f](r,n)}),n)}}var v=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((t(e={get stream(){return this[d]},next:function(){var e=this,t=this[s];if(null!==t)return Promise.reject(t);if(this[c])return Promise.resolve(l(void 0,!0));if(this[d].destroyed)return new Promise((function(t,r){hr.nextTick((function(){e[s]?r(e[s]):t(l(void 0,!0))}))}));var r,n=this[u];if(n)r=new Promise(m(n,this));else{var i=this[d].read();if(null!==i)return Promise.resolve(l(i,!1));r=new Promise(this[f])}return this[u]=r,r}},Symbol.asyncIterator,(function(){return this})),t(e,"return",(function(){var e=this;return new Promise((function(t,r){e[d].destroy(null,(function(e){e?r(e):t(l(void 0,!0))}))}))})),e),v);return Fo=function(e){var r,n=Object.create(b,(t(r={},d,{value:e,writable:!0}),t(r,o,{value:null,writable:!0}),t(r,a,{value:null,writable:!0}),t(r,s,{value:null,writable:!0}),t(r,c,{value:e._readableState.endEmitted,writable:!0}),t(r,f,{value:function(e,t){var r=n[d].read();r?(n[u]=null,n[o]=null,n[a]=null,e(l(r,!1))):(n[o]=e,n[a]=t)},writable:!0}),r));return n[u]=null,i(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[a];return null!==t&&(n[u]=null,n[o]=null,n[a]=null,t(e)),void(n[s]=e)}var r=n[o];null!==r&&(n[u]=null,n[o]=null,n[a]=null,r(l(void 0,!0))),n[c]=!0})),e.on("readable",p.bind(null,n)),n}}function Vo(){return Ho?zo:(Ho=1,zo=function(){throw new Error("Readable.from is not available in the browser")})}function Xo(){if(Go)return qo;var e;Go=1,qo=T,T.ReadableState=S,to.EventEmitter;var r=function(e,t){return e.listeners(t).length},n=ro,i=Me.Buffer,o=("undefined"!==typeof t?t:"undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).Uint8Array||function(){};function a(e){return i.from(e)}function s(e){return i.isBuffer(e)||e instanceof o}var c,u=no;c=u&&u.debuglog?u.debuglog("stream"):function(){};var f,d,l,h=io(),p=lo,m=Mo.getHighWaterMark,v=ho.codes,b=v.ERR_INVALID_ARG_TYPE,g=v.ERR_STREAM_PUSH_AFTER_EOF,y=v.ERR_METHOD_NOT_IMPLEMENTED,_=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;Ti(T,n);var w=p.errorOrDestroy,x=["error","close","destroy","pause","resume"];function E(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)}function S(t,r,n){e=e||No(),t=t||{},"boolean"!==typeof n&&(n=r instanceof e),this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=m(this,t,"readableHighWaterMark",n),this.buffer=new h,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=Ei.StringDecoder),this.decoder=new f(t.encoding),this.encoding=t.encoding)}function T(t){if(e=e||No(),!(this instanceof T))return new T(t);var r=this instanceof e;this._readableState=new S(t,this,r),this.readable=!0,t&&("function"===typeof t.read&&(this._read=t.read),"function"===typeof t.destroy&&(this._destroy=t.destroy)),n.call(this)}function A(e,t,r,n,o){c("readableAddChunk",t);var s,u=e._readableState;if(null===t)u.reading=!1,P(e,u);else if(o||(s=M(u,t)),s)w(e,s);else if(u.objectMode||t&&t.length>0)if("string"===typeof t||u.objectMode||Object.getPrototypeOf(t)===i.prototype||(t=a(t)),n)u.endEmitted?w(e,new _):R(e,u,t,!0);else if(u.ended)w(e,new g);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!r?(t=u.decoder.write(t),u.objectMode||0!==t.length?R(e,u,t,!1):U(e,u)):R(e,u,t,!1)}else n||(u.reading=!1,U(e,u));return!u.ended&&(u.length<u.highWaterMark||0===u.length)}function R(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&&N(e)),U(e,t)}function M(e,t){var r;return s(t)||"string"===typeof t||void 0===t||e.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],t)),r}Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),T.prototype.destroy=p.destroy,T.prototype._undestroy=p.undestroy,T.prototype._destroy=function(e,t){t(e)},T.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=i.from(e,t),t=""),r=!0),A(this,e,t,!1,r)},T.prototype.unshift=function(e){return A(this,e,null,!0,!1)},T.prototype.isPaused=function(){return!1===this._readableState.flowing},T.prototype.setEncoding=function(e){f||(f=Ei.StringDecoder);var t=new f(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,n="";null!==r;)n+=t.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==n&&this._readableState.buffer.push(n),this._readableState.length=n.length,this};var I=1073741824;function O(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function C(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=O(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function P(e,t){if(c("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?N(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,k(e)))}}function N(e){var t=e._readableState;c("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(c("emitReadable",t.flowing),t.emittedReadable=!0,hr.nextTick(k,e))}function k(e){var t=e._readableState;c("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,H(e)}function U(e,t){t.readingMore||(t.readingMore=!0,hr.nextTick(B,e,t))}function B(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(c("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function D(e){return function(){var t=e._readableState;c("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&r(e,"data")&&(t.flowing=!0,H(e))}}function L(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 F(e){c("readable nexttick read 0"),e.read(0)}function j(e,t){t.resumeScheduled||(t.resumeScheduled=!0,hr.nextTick(z,e,t))}function z(e,t){c("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),H(e),t.flowing&&!t.reading&&e.read(0)}function H(e){var t=e._readableState;for(c("flow",t.flowing);t.flowing&&null!==e.read(););}function q(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 G(e){var t=e._readableState;c("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,hr.nextTick(W,t,e))}function W(e,t){if(c("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 Y(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}return T.prototype.read=function(e){c("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 c("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?G(this):N(this),null;if(0===(e=C(e,t))&&t.ended)return 0===t.length&&G(this),null;var n,i=t.needReadable;return c("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&c("length less than watermark",i=!0),t.ended||t.reading?c("reading or ended",i=!1):i&&(c("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=C(r,t))),null===(n=e>0?q(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&&G(this)),null!==n&&this.emit("data",n),n},T.prototype._read=function(e){w(this,new y("_read()"))},T.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,c("pipe count=%d opts=%j",i.pipesCount,t);var o=t&&!1===t.end||e===hr.stdout||e===hr.stderr?v:s;function a(e,t){c("onunpipe"),e===n&&t&&!1===t.hasUnpiped&&(t.hasUnpiped=!0,d())}function s(){c("onend"),e.end()}i.endEmitted?hr.nextTick(o):n.once("end",o),e.on("unpipe",a);var u=D(n);e.on("drain",u);var f=!1;function d(){c("cleanup"),e.removeListener("close",p),e.removeListener("finish",m),e.removeListener("drain",u),e.removeListener("error",h),e.removeListener("unpipe",a),n.removeListener("end",s),n.removeListener("end",v),n.removeListener("data",l),f=!0,!i.awaitDrain||e._writableState&&!e._writableState.needDrain||u()}function l(t){c("ondata");var r=e.write(t);c("dest.write",r),!1===r&&((1===i.pipesCount&&i.pipes===e||i.pipesCount>1&&-1!==Y(i.pipes,e))&&!f&&(c("false write response, pause",i.awaitDrain),i.awaitDrain++),n.pause())}function h(t){c("onerror",t),v(),e.removeListener("error",h),0===r(e,"error")&&w(e,t)}function p(){e.removeListener("finish",m),v()}function m(){c("onfinish"),e.removeListener("close",p),v()}function v(){c("unpipe"),n.unpipe(e)}return n.on("data",l),E(e,"error",h),e.once("close",p),e.once("finish",m),e.emit("pipe",n),i.flowing||(c("pipe resume"),n.resume()),e},T.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 o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=Y(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},T.prototype.on=function(e,t){var r=n.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,c("on readable",i.length,i.reading),i.length?N(this):i.reading||hr.nextTick(F,this))),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(e,t){var r=n.prototype.removeListener.call(this,e,t);return"readable"===e&&hr.nextTick(L,this),r},T.prototype.removeAllListeners=function(e){var t=n.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||hr.nextTick(L,this),t},T.prototype.resume=function(){var e=this._readableState;return e.flowing||(c("resume"),e.flowing=!e.readableListening,j(this,e)),e.paused=!1,this},T.prototype.pause=function(){return c("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(c("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(c("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){c("wrapped data"),r.decoder&&(i=r.decoder.write(i)),(!r.objectMode||null!==i&&void 0!==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<x.length;o++)e.on(x[o],this.emit.bind(this,x[o]));return this._read=function(t){c("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"===typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===d&&(d=Yo()),d(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),T._fromList=q,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"===typeof Symbol&&(T.from=function(e,t){return void 0===l&&(l=Vo()),l(T,e,t)}),qo}var Ko=na,Qo=ho.codes,Jo=Qo.ERR_METHOD_NOT_IMPLEMENTED,Zo=Qo.ERR_MULTIPLE_CALLBACK,$o=Qo.ERR_TRANSFORM_ALREADY_TRANSFORMING,ea=Qo.ERR_TRANSFORM_WITH_LENGTH_0,ta=No();function ra(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new Zo);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 na(e){if(!(this instanceof na))return new na(e);ta.call(this,e),this._transformState={afterTransform:ra.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",ia)}function ia(){var e=this;"function"!==typeof this._flush||this._readableState.destroyed?oa(this,null,null):this._flush((function(t,r){oa(e,t,r)}))}function oa(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new ea;if(e._transformState.transforming)throw new $o;return e.push(null)}Ti(na,ta),na.prototype.push=function(e,t){return this._transformState.needTransform=!1,ta.prototype.push.call(this,e,t)},na.prototype._transform=function(e,t,r){r(new Jo("_transform()"))},na.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)}},na.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))},na.prototype._destroy=function(e,t){ta.prototype._destroy.call(this,e,(function(e){t(e)}))};var aa,sa=ua,ca=Ko;function ua(e){if(!(this instanceof ua))return new ua(e);ca.call(this,e)}function fa(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}Ti(ua,ca),ua.prototype._transform=function(e,t,r){r(null,e)};var da=ho.codes,la=da.ERR_MISSING_ARGS,ha=da.ERR_STREAM_DESTROYED;function pa(e){if(e)throw e}function ma(e){return e.setHeader&&"function"===typeof e.abort}function va(e,t,r,n){n=fa(n);var i=!1;e.on("close",(function(){i=!0})),void 0===aa&&(aa=Wo),aa(e,{readable:t,writable:r},(function(e){if(e)return n(e);i=!0,n()}));var o=!1;return function(t){if(!i&&!o)return o=!0,ma(e)?e.abort():"function"===typeof e.destroy?e.destroy():void n(t||new ha("pipe"))}}function ba(e){e()}function ga(e,t){return e.pipe(t)}function ya(e){return e.length?"function"!==typeof e[e.length-1]?pa:e.pop():pa}function _a(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var n,i=ya(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new la("streams");var o=t.map((function(e,r){var a=r<t.length-1;return va(e,a,r>0,(function(e){n||(n=e),e&&o.forEach(ba),a||(o.forEach(ba),i(n))}))}));return t.reduce(ga)}var wa=_a;!function(e,t){(t=e.exports=Xo()).Stream=t,t.Readable=t,t.Writable=Po(),t.Duplex=No(),t.Transform=Ko,t.PassThrough=sa,t.finished=Wo,t.pipeline=wa}(eo,eo.exports);var xa=eo.exports,Ea=Ie.Buffer,Sa=xa.Transform;function Ta(e,t){if(!Ea.isBuffer(e)&&"string"!==typeof e)throw new TypeError(t+" must be a string or a buffer")}function Aa(e){Sa.call(this),this._block=Ea.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Ti(Aa,Sa),Aa.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(i){n=i}r(n)},Aa.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(r){t=r}e(t)},Aa.prototype.update=function(e,t){if(Ta(e,"Data"),this._finalized)throw new Error("Digest already called");Ea.isBuffer(e)||(e=Ea.from(e,t));for(var r=this._block,n=0;this._blockOffset+e.length-n>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)r[i++]=e[n++];this._update(),this._blockOffset=0}for(;n<e.length;)r[this._blockOffset++]=e[n++];for(var o=0,a=8*e.length;a>0;++o)this._length[o]+=a,(a=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*a);return this},Aa.prototype._update=function(){throw new Error("_update is not implemented")},Aa.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},Aa.prototype._digest=function(){throw new Error("_digest is not implemented")};var Ra=Aa,Ma=Ti,Ia=Ra,Oa=Ie.Buffer,Ca=new Array(16);function Pa(){Ia.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function Na(e,t){return e<<t|e>>>32-t}function ka(e,t,r,n,i,o,a){return Na(e+(t&r|~t&n)+i+o|0,a)+t|0}function Ua(e,t,r,n,i,o,a){return Na(e+(t&n|r&~n)+i+o|0,a)+t|0}function Ba(e,t,r,n,i,o,a){return Na(e+(t^r^n)+i+o|0,a)+t|0}function Da(e,t,r,n,i,o,a){return Na(e+(r^(t|~n))+i+o|0,a)+t|0}Ma(Pa,Ia),Pa.prototype._update=function(){for(var e=Ca,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=ka(r,n,i,o,e[0],3614090360,7),o=ka(o,r,n,i,e[1],3905402710,12),i=ka(i,o,r,n,e[2],606105819,17),n=ka(n,i,o,r,e[3],3250441966,22),r=ka(r,n,i,o,e[4],4118548399,7),o=ka(o,r,n,i,e[5],1200080426,12),i=ka(i,o,r,n,e[6],2821735955,17),n=ka(n,i,o,r,e[7],4249261313,22),r=ka(r,n,i,o,e[8],1770035416,7),o=ka(o,r,n,i,e[9],2336552879,12),i=ka(i,o,r,n,e[10],4294925233,17),n=ka(n,i,o,r,e[11],2304563134,22),r=ka(r,n,i,o,e[12],1804603682,7),o=ka(o,r,n,i,e[13],4254626195,12),i=ka(i,o,r,n,e[14],2792965006,17),r=Ua(r,n=ka(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=Ua(o,r,n,i,e[6],3225465664,9),i=Ua(i,o,r,n,e[11],643717713,14),n=Ua(n,i,o,r,e[0],3921069994,20),r=Ua(r,n,i,o,e[5],3593408605,5),o=Ua(o,r,n,i,e[10],38016083,9),i=Ua(i,o,r,n,e[15],3634488961,14),n=Ua(n,i,o,r,e[4],3889429448,20),r=Ua(r,n,i,o,e[9],568446438,5),o=Ua(o,r,n,i,e[14],3275163606,9),i=Ua(i,o,r,n,e[3],4107603335,14),n=Ua(n,i,o,r,e[8],1163531501,20),r=Ua(r,n,i,o,e[13],2850285829,5),o=Ua(o,r,n,i,e[2],4243563512,9),i=Ua(i,o,r,n,e[7],1735328473,14),r=Ba(r,n=Ua(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=Ba(o,r,n,i,e[8],2272392833,11),i=Ba(i,o,r,n,e[11],1839030562,16),n=Ba(n,i,o,r,e[14],4259657740,23),r=Ba(r,n,i,o,e[1],2763975236,4),o=Ba(o,r,n,i,e[4],1272893353,11),i=Ba(i,o,r,n,e[7],4139469664,16),n=Ba(n,i,o,r,e[10],3200236656,23),r=Ba(r,n,i,o,e[13],681279174,4),o=Ba(o,r,n,i,e[0],3936430074,11),i=Ba(i,o,r,n,e[3],3572445317,16),n=Ba(n,i,o,r,e[6],76029189,23),r=Ba(r,n,i,o,e[9],3654602809,4),o=Ba(o,r,n,i,e[12],3873151461,11),i=Ba(i,o,r,n,e[15],530742520,16),r=Da(r,n=Ba(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=Da(o,r,n,i,e[7],1126891415,10),i=Da(i,o,r,n,e[14],2878612391,15),n=Da(n,i,o,r,e[5],4237533241,21),r=Da(r,n,i,o,e[12],1700485571,6),o=Da(o,r,n,i,e[3],2399980690,10),i=Da(i,o,r,n,e[10],4293915773,15),n=Da(n,i,o,r,e[1],2240044497,21),r=Da(r,n,i,o,e[8],1873313359,6),o=Da(o,r,n,i,e[15],4264355552,10),i=Da(i,o,r,n,e[6],2734768916,15),n=Da(n,i,o,r,e[13],1309151649,21),r=Da(r,n,i,o,e[4],4149444226,6),o=Da(o,r,n,i,e[11],3174756917,10),i=Da(i,o,r,n,e[2],718787259,15),n=Da(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},Pa.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=Oa.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e};var La=Pa,Fa=Ie.Buffer,ja=La;function za(e,t,r,n){if(Fa.isBuffer(e)||(e=Fa.from(e,"binary")),t&&(Fa.isBuffer(t)||(t=Fa.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var i=r/8,o=Fa.alloc(i),a=Fa.alloc(n||0),s=Fa.alloc(0);i>0||n>0;){var c=new ja;c.update(s),c.update(e),t&&c.update(t),s=c.digest();var u=0;if(i>0){var f=o.length-i;u=Math.min(i,s.length),s.copy(o,f,0,u),i-=u}if(u<s.length&&n>0){var d=a.length-n,l=Math.min(n,s.length-u);s.copy(a,d,u,u+l),n-=l}}return s.fill(0),{key:o,iv:a}}var Ha=za,qa=tt,Ga=Yi,Wa=Ie.Buffer,Ya=$i,Va=Oi,Xa=rt,Ka=Ha;function Qa(e,t,r){Va.call(this),this._cache=new Za,this._cipher=new Xa.AES(t),this._prev=Wa.from(r),this._mode=e,this._autopadding=!0}Ti(Qa,Va),Qa.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return Wa.concat(n)};var Ja=Wa.alloc(16,16);function Za(){this.cache=Wa.allocUnsafe(0)}function $a(e,t,r){var n=qa[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"===typeof t&&(t=Wa.from(t)),t.length!==n.key/8)throw new TypeError("invalid key length "+t.length);if("string"===typeof r&&(r=Wa.from(r)),"GCM"!==n.mode&&r.length!==n.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===n.type?new Ya(n.module,t,r):"auth"===n.type?new Ga(n.module,t,r):new Qa(n.module,t,r)}function es(e,t){var r=qa[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=Ka(t,!1,r.key,r.iv);return $a(e,n.key,n.iv)}Qa.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(Ja))throw this._cipher.scrub(),new Error("data not multiple of block length")},Qa.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},Za.prototype.add=function(e){this.cache=Wa.concat([this.cache,e])},Za.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},Za.prototype.flush=function(){for(var e=16-this.cache.length,t=Wa.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return Wa.concat([this.cache,t])},o.createCipheriv=$a,o.createCipher=es;var ts={},rs=Yi,ns=Ie.Buffer,is=tt,os=$i,as=Oi,ss=rt,cs=Ha;function us(e,t,r){as.call(this),this._cache=new fs,this._last=void 0,this._cipher=new ss.AES(t),this._prev=ns.from(r),this._mode=e,this._autopadding=!0}function fs(){this.cache=ns.allocUnsafe(0)}function ds(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var r=-1;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}function ls(e,t,r){var n=is[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");if("string"===typeof r&&(r=ns.from(r)),"GCM"!==n.mode&&r.length!==n.iv)throw new TypeError("invalid iv length "+r.length);if("string"===typeof t&&(t=ns.from(t)),t.length!==n.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===n.type?new os(n.module,t,r,!0):"auth"===n.type?new rs(n.module,t,r,!0):new us(n.module,t,r)}function hs(e,t){var r=is[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=cs(t,!1,r.key,r.iv);return ls(e,n.key,n.iv)}Ti(us,as),us.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return ns.concat(n)},us.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return ds(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},us.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},fs.prototype.add=function(e){this.cache=ns.concat([this.cache,e])},fs.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},fs.prototype.flush=function(){if(this.cache.length)return this.cache},ts.createDecipher=hs,ts.createDecipheriv=ls,e.getCiphers=void 0;var ps=o,ms=ts,vs=Je;function bs(){return Object.keys(vs)}var gs=ps.createCipher,ys=ps.createCipheriv,_s=ms.createDecipher,ws=ms.createDecipheriv;e.getCiphers=bs;var xs={},Es={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny <fedor@indutny.com>",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}},Ss={},Ts={exports:{}};Ts.exports,function(e,t){function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function i(e,t,r){if(i.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var o;"object"===typeof e?e.exports=i:t.BN=i,i.BN=i,i.wordSize=26;try{o="undefined"!==typeof window&&"undefined"!==typeof window.Buffer?window.Buffer:Me.Buffer}catch(A){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),a=t;a<o;a++){var s=e.charCodeAt(a)-48;i*=n,i+=s>=49?s-49+10:s>=17?s-17+10:s}return i}i.isBN=function(e){return e instanceof i||null!==e&&"object"===typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,n){if("number"===typeof e)return this._initNumber(e,t,n);if("object"===typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),r(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,n):(this._parseBase(e,t,i),"le"===n&&this._initArray(this.toArray(),t,n)))},i.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},i.prototype._initArray=function(e,t,n){if(r("number"===typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,a,s=0;if("be"===n)for(i=e.length-1,o=0;i>=0;i-=3)a=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);else if("le"===n)for(i=0,o=0;i<e.length;i+=3)a=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=a<<s&67108863,this.words[o+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,o++);return this.strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,a=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=s(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;else for(n=(e.length-t)%2===0?t+1:t;n<e.length;n+=2)i=s(e,t,n)<<o,this.words[a]|=67108863&i,o>=18?(o-=18,a+=1,this.words[a]|=i>>>26):o+=8;this.strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,a=o%n,s=Math.min(o,o-a)+r,u=0,f=r;f<s;f+=n)u=c(e,f,f+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==a){var d=1;for(u=c(e,f,e.length,t),f=0;f<a;f++)d*=t;this.imuln(d),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},i.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},i.prototype.clone=function(){var e=new i(null);return this.copy(e),e},i.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},i.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function l(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}function h(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],a=i*o,s=67108863&a,c=a/67108864|0;r.words[0]=s;for(var u=1;u<n;u++){for(var f=c>>>26,d=67108863&c,l=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=l;h++){var p=u-h|0;f+=(a=(i=0|e.words[p])*(o=0|t.words[h])+d)/67108864|0,d=67108863&a}r.words[u]=0|d,c=0|f}return 0!==c?r.words[u]=0|c:r.length--,r.strip()}i.prototype.toString=function(e,t){var n;if(t=0|t||1,16===(e=e||10)||"hex"===e){n="";for(var i=0,o=0,a=0;a<this.length;a++){var s=this.words[a],c=(16777215&(s<<i|o)).toString(16);n=0!==(o=s>>>24-i&16777215)||a!==this.length-1?u[6-c.length]+c+n:c+n,(i+=2)>=26&&(i-=26,a--)}for(0!==o&&(n=o.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var l=f[e],h=d[e];n="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(e);n=(p=p.idivn(h)).isZero()?m+n:u[l-m.length]+m+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}r(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return r("undefined"!==typeof o),this.toArrayLike(o,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,n){var i=this.byteLength(),o=n||Math.max(1,i);r(i<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var a,s,c="le"===t,u=new e(o),f=this.clone();if(c){for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),u[s]=a;for(;s<o;s++)u[s]=0}else{for(s=0;s<o-i;s++)u[s]=0;for(s=0;!f.isZero();s++)a=f.andln(255),f.iushrn(8),u[o-s-1]=a}return u},Math.clz32?i.prototype._countBits=function(e){return 32-Math.clz32(e)}:i.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},i.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},i.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},i.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},i.prototype.isNeg=function(){return 0!==this.negative},i.prototype.neg=function(){return this.clone().ineg()},i.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},i.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},i.prototype.ior=function(e){return r(0===(this.negative|e.negative)),this.iuor(e)},i.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},i.prototype.iand=function(e){return r(0===(this.negative|e.negative)),this.iuand(e)},i.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},i.prototype.ixor=function(e){return r(0===(this.negative|e.negative)),this.iuxor(e)},i.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){r("number"===typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){r("number"===typeof e&&e>=0);var n=e/26|0,i=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<i:this.words[n]&~(1<<i),this.strip()},i.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},i.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,a=0;a<n.length;a++)o=(t=(0|r.words[a])-(0|n.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<r.length;a++)o=(t=(0|r.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<r.length&&r!==this)for(;a<r.length;a++)this.words[a]=r.words[a];return this.length=Math.max(this.length,a),r!==this&&(this.negative=1),this.strip()},i.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,o,a=e.words,s=t.words,c=r.words,u=0,f=0|a[0],d=8191&f,l=f>>>13,h=0|a[1],p=8191&h,m=h>>>13,v=0|a[2],b=8191&v,g=v>>>13,y=0|a[3],_=8191&y,w=y>>>13,x=0|a[4],E=8191&x,S=x>>>13,T=0|a[5],A=8191&T,R=T>>>13,M=0|a[6],I=8191&M,O=M>>>13,C=0|a[7],P=8191&C,N=C>>>13,k=0|a[8],U=8191&k,B=k>>>13,D=0|a[9],L=8191&D,F=D>>>13,j=0|s[0],z=8191&j,H=j>>>13,q=0|s[1],G=8191&q,W=q>>>13,Y=0|s[2],V=8191&Y,X=Y>>>13,K=0|s[3],Q=8191&K,J=K>>>13,Z=0|s[4],$=8191&Z,ee=Z>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],oe=8191&ie,ae=ie>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,fe=0|s[8],de=8191&fe,le=fe>>>13,he=0|s[9],pe=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19;var ve=(u+(n=Math.imul(d,z))|0)+((8191&(i=(i=Math.imul(d,H))+Math.imul(l,z)|0))<<13)|0;u=((o=Math.imul(l,H))+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(p,z),i=(i=Math.imul(p,H))+Math.imul(m,z)|0,o=Math.imul(m,H);var be=(u+(n=n+Math.imul(d,G)|0)|0)+((8191&(i=(i=i+Math.imul(d,W)|0)+Math.imul(l,G)|0))<<13)|0;u=((o=o+Math.imul(l,W)|0)+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(b,z),i=(i=Math.imul(b,H))+Math.imul(g,z)|0,o=Math.imul(g,H),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,W)|0;var ge=(u+(n=n+Math.imul(d,V)|0)|0)+((8191&(i=(i=i+Math.imul(d,X)|0)+Math.imul(l,V)|0))<<13)|0;u=((o=o+Math.imul(l,X)|0)+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(_,z),i=(i=Math.imul(_,H))+Math.imul(w,z)|0,o=Math.imul(w,H),n=n+Math.imul(b,G)|0,i=(i=i+Math.imul(b,W)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,W)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,X)|0;var ye=(u+(n=n+Math.imul(d,Q)|0)|0)+((8191&(i=(i=i+Math.imul(d,J)|0)+Math.imul(l,Q)|0))<<13)|0;u=((o=o+Math.imul(l,J)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(E,z),i=(i=Math.imul(E,H))+Math.imul(S,z)|0,o=Math.imul(S,H),n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(w,G)|0,o=o+Math.imul(w,W)|0,n=n+Math.imul(b,V)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,J)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,J)|0;var _e=(u+(n=n+Math.imul(d,$)|0)|0)+((8191&(i=(i=i+Math.imul(d,ee)|0)+Math.imul(l,$)|0))<<13)|0;u=((o=o+Math.imul(l,ee)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(A,z),i=(i=Math.imul(A,H))+Math.imul(R,z)|0,o=Math.imul(R,H),n=n+Math.imul(E,G)|0,i=(i=i+Math.imul(E,W)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(_,V)|0,i=(i=i+Math.imul(_,X)|0)+Math.imul(w,V)|0,o=o+Math.imul(w,X)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,J)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,J)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,ee)|0;var we=(u+(n=n+Math.imul(d,re)|0)|0)+((8191&(i=(i=i+Math.imul(d,ne)|0)+Math.imul(l,re)|0))<<13)|0;u=((o=o+Math.imul(l,ne)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(I,z),i=(i=Math.imul(I,H))+Math.imul(O,z)|0,o=Math.imul(O,H),n=n+Math.imul(A,G)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(R,G)|0,o=o+Math.imul(R,W)|0,n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,X)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,X)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,J)|0)+Math.imul(w,Q)|0,o=o+Math.imul(w,J)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(g,$)|0,o=o+Math.imul(g,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0;var xe=(u+(n=n+Math.imul(d,oe)|0)|0)+((8191&(i=(i=i+Math.imul(d,ae)|0)+Math.imul(l,oe)|0))<<13)|0;u=((o=o+Math.imul(l,ae)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(P,z),i=(i=Math.imul(P,H))+Math.imul(N,z)|0,o=Math.imul(N,H),n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(R,V)|0,o=o+Math.imul(R,X)|0,n=n+Math.imul(E,Q)|0,i=(i=i+Math.imul(E,J)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,J)|0,n=n+Math.imul(_,$)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(w,$)|0,o=o+Math.imul(w,ee)|0,n=n+Math.imul(b,re)|0,i=(i=i+Math.imul(b,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,ae)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,ae)|0;var Ee=(u+(n=n+Math.imul(d,ce)|0)|0)+((8191&(i=(i=i+Math.imul(d,ue)|0)+Math.imul(l,ce)|0))<<13)|0;u=((o=o+Math.imul(l,ue)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(U,z),i=(i=Math.imul(U,H))+Math.imul(B,z)|0,o=Math.imul(B,H),n=n+Math.imul(P,G)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(N,G)|0,o=o+Math.imul(N,W)|0,n=n+Math.imul(I,V)|0,i=(i=i+Math.imul(I,X)|0)+Math.imul(O,V)|0,o=o+Math.imul(O,X)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,J)|0)+Math.imul(R,Q)|0,o=o+Math.imul(R,J)|0,n=n+Math.imul(E,$)|0,i=(i=i+Math.imul(E,ee)|0)+Math.imul(S,$)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(w,re)|0,o=o+Math.imul(w,ne)|0,n=n+Math.imul(b,oe)|0,i=(i=i+Math.imul(b,ae)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,ae)|0,n=n+Math.imul(p,ce)|0,i=(i=i+Math.imul(p,ue)|0)+Math.imul(m,ce)|0,o=o+Math.imul(m,ue)|0;var Se=(u+(n=n+Math.imul(d,de)|0)|0)+((8191&(i=(i=i+Math.imul(d,le)|0)+Math.imul(l,de)|0))<<13)|0;u=((o=o+Math.imul(l,le)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(L,z),i=(i=Math.imul(L,H))+Math.imul(F,z)|0,o=Math.imul(F,H),n=n+Math.imul(U,G)|0,i=(i=i+Math.imul(U,W)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(N,V)|0,o=o+Math.imul(N,X)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,J)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,J)|0,n=n+Math.imul(A,$)|0,i=(i=i+Math.imul(A,ee)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,ee)|0,n=n+Math.imul(E,re)|0,i=(i=i+Math.imul(E,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,ae)|0)+Math.imul(w,oe)|0,o=o+Math.imul(w,ae)|0,n=n+Math.imul(b,ce)|0,i=(i=i+Math.imul(b,ue)|0)+Math.imul(g,ce)|0,o=o+Math.imul(g,ue)|0,n=n+Math.imul(p,de)|0,i=(i=i+Math.imul(p,le)|0)+Math.imul(m,de)|0,o=o+Math.imul(m,le)|0;var Te=(u+(n=n+Math.imul(d,pe)|0)|0)+((8191&(i=(i=i+Math.imul(d,me)|0)+Math.imul(l,pe)|0))<<13)|0;u=((o=o+Math.imul(l,me)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(L,G),i=(i=Math.imul(L,W))+Math.imul(F,G)|0,o=Math.imul(F,W),n=n+Math.imul(U,V)|0,i=(i=i+Math.imul(U,X)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,J)|0)+Math.imul(N,Q)|0,o=o+Math.imul(N,J)|0,n=n+Math.imul(I,$)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(A,re)|0,i=(i=i+Math.imul(A,ne)|0)+Math.imul(R,re)|0,o=o+Math.imul(R,ne)|0,n=n+Math.imul(E,oe)|0,i=(i=i+Math.imul(E,ae)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,ae)|0,n=n+Math.imul(_,ce)|0,i=(i=i+Math.imul(_,ue)|0)+Math.imul(w,ce)|0,o=o+Math.imul(w,ue)|0,n=n+Math.imul(b,de)|0,i=(i=i+Math.imul(b,le)|0)+Math.imul(g,de)|0,o=o+Math.imul(g,le)|0;var Ae=(u+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;u=((o=o+Math.imul(m,me)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,X))+Math.imul(F,V)|0,o=Math.imul(F,X),n=n+Math.imul(U,Q)|0,i=(i=i+Math.imul(U,J)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,J)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(N,$)|0,o=o+Math.imul(N,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(A,oe)|0,i=(i=i+Math.imul(A,ae)|0)+Math.imul(R,oe)|0,o=o+Math.imul(R,ae)|0,n=n+Math.imul(E,ce)|0,i=(i=i+Math.imul(E,ue)|0)+Math.imul(S,ce)|0,o=o+Math.imul(S,ue)|0,n=n+Math.imul(_,de)|0,i=(i=i+Math.imul(_,le)|0)+Math.imul(w,de)|0,o=o+Math.imul(w,le)|0;var Re=(u+(n=n+Math.imul(b,pe)|0)|0)+((8191&(i=(i=i+Math.imul(b,me)|0)+Math.imul(g,pe)|0))<<13)|0;u=((o=o+Math.imul(g,me)|0)+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,J))+Math.imul(F,Q)|0,o=Math.imul(F,J),n=n+Math.imul(U,$)|0,i=(i=i+Math.imul(U,ee)|0)+Math.imul(B,$)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(P,re)|0,i=(i=i+Math.imul(P,ne)|0)+Math.imul(N,re)|0,o=o+Math.imul(N,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,ae)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,ae)|0,n=n+Math.imul(A,ce)|0,i=(i=i+Math.imul(A,ue)|0)+Math.imul(R,ce)|0,o=o+Math.imul(R,ue)|0,n=n+Math.imul(E,de)|0,i=(i=i+Math.imul(E,le)|0)+Math.imul(S,de)|0,o=o+Math.imul(S,le)|0;var Me=(u+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,me)|0)+Math.imul(w,pe)|0))<<13)|0;u=((o=o+Math.imul(w,me)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,$),i=(i=Math.imul(L,ee))+Math.imul(F,$)|0,o=Math.imul(F,ee),n=n+Math.imul(U,re)|0,i=(i=i+Math.imul(U,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(P,oe)|0,i=(i=i+Math.imul(P,ae)|0)+Math.imul(N,oe)|0,o=o+Math.imul(N,ae)|0,n=n+Math.imul(I,ce)|0,i=(i=i+Math.imul(I,ue)|0)+Math.imul(O,ce)|0,o=o+Math.imul(O,ue)|0,n=n+Math.imul(A,de)|0,i=(i=i+Math.imul(A,le)|0)+Math.imul(R,de)|0,o=o+Math.imul(R,le)|0;var Ie=(u+(n=n+Math.imul(E,pe)|0)|0)+((8191&(i=(i=i+Math.imul(E,me)|0)+Math.imul(S,pe)|0))<<13)|0;u=((o=o+Math.imul(S,me)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(L,re),i=(i=Math.imul(L,ne))+Math.imul(F,re)|0,o=Math.imul(F,ne),n=n+Math.imul(U,oe)|0,i=(i=i+Math.imul(U,ae)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,ae)|0,n=n+Math.imul(P,ce)|0,i=(i=i+Math.imul(P,ue)|0)+Math.imul(N,ce)|0,o=o+Math.imul(N,ue)|0,n=n+Math.imul(I,de)|0,i=(i=i+Math.imul(I,le)|0)+Math.imul(O,de)|0,o=o+Math.imul(O,le)|0;var Oe=(u+(n=n+Math.imul(A,pe)|0)|0)+((8191&(i=(i=i+Math.imul(A,me)|0)+Math.imul(R,pe)|0))<<13)|0;u=((o=o+Math.imul(R,me)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(L,oe),i=(i=Math.imul(L,ae))+Math.imul(F,oe)|0,o=Math.imul(F,ae),n=n+Math.imul(U,ce)|0,i=(i=i+Math.imul(U,ue)|0)+Math.imul(B,ce)|0,o=o+Math.imul(B,ue)|0,n=n+Math.imul(P,de)|0,i=(i=i+Math.imul(P,le)|0)+Math.imul(N,de)|0,o=o+Math.imul(N,le)|0;var Ce=(u+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,me)|0)+Math.imul(O,pe)|0))<<13)|0;u=((o=o+Math.imul(O,me)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(L,ce),i=(i=Math.imul(L,ue))+Math.imul(F,ce)|0,o=Math.imul(F,ue),n=n+Math.imul(U,de)|0,i=(i=i+Math.imul(U,le)|0)+Math.imul(B,de)|0,o=o+Math.imul(B,le)|0;var Pe=(u+(n=n+Math.imul(P,pe)|0)|0)+((8191&(i=(i=i+Math.imul(P,me)|0)+Math.imul(N,pe)|0))<<13)|0;u=((o=o+Math.imul(N,me)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(L,de),i=(i=Math.imul(L,le))+Math.imul(F,de)|0,o=Math.imul(F,le);var Ne=(u+(n=n+Math.imul(U,pe)|0)|0)+((8191&(i=(i=i+Math.imul(U,me)|0)+Math.imul(B,pe)|0))<<13)|0;u=((o=o+Math.imul(B,me)|0)+(i>>>13)|0)+(Ne>>>26)|0,Ne&=67108863;var ke=(u+(n=Math.imul(L,pe))|0)+((8191&(i=(i=Math.imul(L,me))+Math.imul(F,pe)|0))<<13)|0;return u=((o=Math.imul(F,me))+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,c[0]=ve,c[1]=be,c[2]=ge,c[3]=ye,c[4]=_e,c[5]=we,c[6]=xe,c[7]=Ee,c[8]=Se,c[9]=Te,c[10]=Ae,c[11]=Re,c[12]=Me,c[13]=Ie,c[14]=Oe,c[15]=Ce,c[16]=Pe,c[17]=Ne,c[18]=ke,0!==u&&(c[19]=u,r.length++),r};function m(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var a=i;i=0;for(var s=67108863&n,c=Math.min(o,t.length-1),u=Math.max(0,o-e.length+1);u<=c;u++){var f=o-u,d=(0|e.words[f])*(0|t.words[u]),l=67108863&d;s=67108863&(l=l+s|0),i+=(a=(a=a+(d/67108864|0)|0)+(l>>>26)|0)>>>26,a&=67108863}r.words[o]=s,n=a,a=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}function v(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(p=h),i.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?h(this,e,t):r<1024?m(this,e,t):v(this,e,t)},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},b.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var a=0;a<o;a++)n[a]=t[e[a]],i[a]=r[e[a]]},b.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,c=Math.cos(2*Math.PI/s),u=Math.sin(2*Math.PI/s),f=0;f<i;f+=s)for(var d=c,l=u,h=0;h<a;h++){var p=r[f+h],m=n[f+h],v=r[f+h+a],b=n[f+h+a],g=d*v-l*b;b=d*b+l*v,v=g,r[f+h]=p+v,n[f+h]=m+b,r[f+h+a]=p-v,n[f+h+a]=m-b,h!==s&&(g=c*d-u*l,l=c*l+u*d,d=g)}},b.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},b.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},b.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},b.prototype.convert13b=function(e,t,n,i){for(var o=0,a=0;a<t;a++)o+=0|e[a],n[2*a]=8191&o,o>>>=13,n[2*a+1]=8191&o,o>>>=13;for(a=2*t;a<i;++a)n[a]=0;r(0===o),r(0===(-8192&o))},b.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},b.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),a=new Array(n),s=new Array(n),c=new Array(n),u=new Array(n),f=new Array(n),d=new Array(n),l=r.words;l.length=n,this.convert13b(e.words,e.length,a,n),this.convert13b(t.words,t.length,u,n),this.transform(a,o,s,c,n,i),this.transform(u,o,f,d,n,i);for(var h=0;h<n;h++){var p=s[h]*f[h]-c[h]*d[h];c[h]=s[h]*d[h]+c[h]*f[h],s[h]=p}return this.conjugate(s,c,n),this.transform(s,c,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},i.prototype.mul=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},i.prototype.mulf=function(e){var t=new i(null);return t.words=new Array(this.length+e.length),v(this,e,t)},i.prototype.imul=function(e){return this.clone().mulTo(e,this)},i.prototype.imuln=function(e){r("number"===typeof e),r(e<67108864);for(var t=0,n=0;n<this.length;n++){var i=(0|this.words[n])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[n]=67108863&o}return 0!==t&&(this.words[n]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=l(e);if(0===t.length)return new i(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var o=r.sqr();n<t.length;n++,o=o.sqr())0!==t[n]&&(r=r.mul(o));return r},i.prototype.iushln=function(e){r("number"===typeof e&&e>=0);var t,n=e%26,i=(e-n)/26,o=67108863>>>26-n<<26-n;if(0!==n){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&o,c=(0|this.words[t])-s<<n;this.words[t]=c|a,a=s>>>26-n}a&&(this.words[t]=a,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},i.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},i.prototype.iushrn=function(e,t,n){var i;r("number"===typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,a=Math.min((e-o)/26,this.length),s=67108863^67108863>>>o<<o,c=n;if(i-=a,i=Math.max(0,i),c){for(var u=0;u<a;u++)c.words[u]=this.words[u];c.length=a}if(0===a);else if(this.length>a)for(this.length-=a,u=0;u<this.length;u++)this.words[u]=this.words[u+a];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=i);u--){var d=0|this.words[u];this.words[u]=f<<26-o|d>>>o,f=d&s}return c&&0!==f&&(c.words[c.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26,i=1<<t;return!(this.length<=n)&&!!(this.words[n]&i)},i.prototype.imaskn=function(e){r("number"===typeof e&&e>=0);var t=e%26,n=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},i.prototype.maskn=function(e){return this.clone().imaskn(e)},i.prototype.iaddn=function(e){return r("number"===typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},i.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(r("number"===typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},i.prototype.addn=function(e){return this.clone().iaddn(e)},i.prototype.subn=function(e){return this.clone().isubn(e)},i.prototype.iabs=function(){return this.negative=0,this},i.prototype.abs=function(){return this.clone().iabs()},i.prototype._ishlnsubmul=function(e,t,n){var i,o,a=e.length+n;this._expand(a);var s=0;for(i=0;i<e.length;i++){o=(0|this.words[i+n])+s;var c=(0|e.words[i])*t;s=((o-=67108863&c)>>26)-(c/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)s=(o=(0|this.words[i+n])+s)>>26,this.words[i+n]=67108863&o;if(0===s)return this.strip();for(r(-1===s),s=0,i=0;i<this.length;i++)s=(o=-(0|this.words[i])+s)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),o=e,a=0|o.words[o.length-1];0!==(r=26-this._countBits(a))&&(o=o.ushln(r),n.iushln(r),a=0|o.words[o.length-1]);var s,c=n.length-o.length;if("mod"!==t){(s=new i(null)).length=c+1,s.words=new Array(s.length);for(var u=0;u<s.length;u++)s.words[u]=0}var f=n.clone()._ishlnsubmul(o,1,c);0===f.negative&&(n=f,s&&(s.words[c]=1));for(var d=c-1;d>=0;d--){var l=67108864*(0|n.words[o.length+d])+(0|n.words[o.length+d-1]);for(l=Math.min(l/a|0,67108863),n._ishlnsubmul(o,l,d);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(o,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=l)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),n&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){r(e<=67108863);for(var t=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(t*n+(0|this.words[i]))%e;return n},i.prototype.idivn=function(e){r(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var i=(0|this.words[n])+67108864*t;this.words[n]=i/e|0,t=i%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),s=new i(0),c=new i(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var f=n.clone(),d=t.clone();!t.isZero();){for(var l=0,h=1;0===(t.words[0]&h)&&l<26;++l,h<<=1);if(l>0)for(t.iushrn(l);l-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(f),a.isub(d)),o.iushrn(1),a.iushrn(1);for(var p=0,m=1;0===(n.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(n.iushrn(p);p-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(f),c.isub(d)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),o.isub(s),a.isub(c)):(n.isub(t),s.isub(o),c.isub(a))}return{a:s,b:c,gcd:n.iushln(u)}},i.prototype._invmp=function(e){r(0===e.negative),r(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),s=new i(0),c=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var u=0,f=1;0===(t.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(t.iushrn(u);u-- >0;)a.isOdd()&&a.iadd(c),a.iushrn(1);for(var d=0,l=1;0===(n.words[0]&l)&&d<26;++d,l<<=1);if(d>0)for(n.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(c),s.iushrn(1);t.cmp(n)>=0?(t.isub(n),a.isub(s)):(n.isub(t),s.isub(a))}return(o=0===t.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return 0===(1&this.words[0])},i.prototype.isOdd=function(){return 1===(1&this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){r("number"===typeof e);var t=e%26,n=(e-t)/26,i=1<<t;if(this.length<=n)return this._expand(n+1),this.words[n]|=i,this;for(var o=i,a=n;0!==o&&a<this.length;a++){var s=0|this.words[a];o=(s+=o)>>>26,s&=67108863,this.words[a]=s}return 0!==o&&(this.words[a]=o,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},i.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},i.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new S(e)},i.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var g={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function _(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"===typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function T(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},n(_,y),_.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var a=0|e.words[i];e.words[i-10]=(a&r)<<4|o>>>22,o=a}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},_.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},n(w,y),n(x,y),n(E,y),E.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(g[e])return g[e];var t;if("k256"===e)t=new _;else if("p224"===e)t=new w;else if("p192"===e)t=new x;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return g[e]=t,t},S.prototype._verify1=function(e){r(0===e.negative,"red works only with positives"),r(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){r(0===(e.negative|t.negative),"red works only with positives"),r(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(r(t%2===1),3===t){var n=this.m.add(new i(1)).iushrn(2);return this.pow(e,n)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);r(!o.isZero());var s=new i(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new i(2*f*f).toRed(this);0!==this.pow(f,u).cmp(c);)f.redIAdd(c);for(var d=this.pow(f,o),l=this.pow(e,o.addn(1).iushrn(1)),h=this.pow(e,o),p=a;0!==h.cmp(s);){for(var m=h,v=0;0!==m.cmp(s);v++)m=m.redSqr();r(v<p);var b=this.pow(d,new i(1).iushln(p-v-1));l=l.redMul(b),d=b.redSqr(),h=h.redMul(d),p=v}return l},S.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},S.prototype.pow=function(e,t){if(t.isZero())return new i(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=4,n=new Array(1<<r);n[0]=new i(1).toRed(this),n[1]=e;for(var o=2;o<n.length;o++)n[o]=this.mul(n[o-1],e);var a=n[0],s=0,c=0,u=t.bitLength()%26;for(0===u&&(u=26),o=t.length-1;o>=0;o--){for(var f=t.words[o],d=u-1;d>=0;d--){var l=f>>d&1;a!==n[0]&&(a=this.sqr(a)),0!==l||0!==s?(s<<=1,s|=l,(++c===r||0===o&&0===d)&&(a=this.mul(a,n[s]),c=0,s=0)):c=0}u=26}return a},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new T(e)},n(T,S),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(Ts,t);var As=Ts.exports,Rs=Ms;function Ms(e,t){if(!e)throw new Error(t||"Assertion failed")}Ms.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var Is={};(function(e){var t=e;function r(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!==typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16));else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,a=255&i;o?r.push(o,a):r.push(a)}return r}function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}t.toArray=r,t.zero2=n,t.toHex=i,t.encode=function(e,t){return"hex"===t?i(e):e}})(Is),function(e){var t=e,r=As,n=Rs,i=Is;function o(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var i=1<<t+1,o=e.clone(),a=0;a<n.length;a++){var s,c=o.andln(i-1);o.isOdd()?(s=c>(i>>1)-1?(i>>1)-c:c,o.isubn(s)):s=0,n[a]=s,o.iushrn(1)}return n}function a(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var a,s,c=e.andln(3)+i&3,u=t.andln(3)+o&3;3===c&&(c=-1),3===u&&(u=-1),a=0===(1&c)?0:3!==(n=e.andln(7)+i&7)&&5!==n||2!==u?c:-c,r[0].push(a),s=0===(1&u)?0:3!==(n=t.andln(7)+o&7)&&5!==n||2!==c?u:-u,r[1].push(s),2*i===a+1&&(i=1-i),2*o===s+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r}function s(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}}function c(e){return"string"===typeof e?t.toArray(e,"hex"):e}function u(e){return new r(e,"hex","le")}t.assert=n,t.toArray=i.toArray,t.zero2=i.zero2,t.toHex=i.toHex,t.encode=i.encode,t.getNAF=o,t.getJSF=a,t.cachedProperty=s,t.parseBytes=c,t.intFromLE=u}(Ss);var Os,Cs={exports:{}},Ps={},Ns=i(Object.freeze({__proto__:null,default:Ps}));function ks(e){this.rand=e}if(Cs.exports=function(e){return Os||(Os=new ks(null)),Os.generate(e)},Cs.exports.Rand=ks,ks.prototype.generate=function(e){return this._rand(e)},ks.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"===typeof self)self.crypto&&self.crypto.getRandomValues?ks.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?ks.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"===typeof window&&(ks.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var Us=Ns;if("function"!==typeof Us.randomBytes)throw new Error("Not supported");ks.prototype._rand=function(e){return Us.randomBytes(e)}}catch(ap){}var Bs=Cs.exports,Ds={},Ls=As,Fs=Ss,js=Fs.getNAF,zs=Fs.getJSF,Hs=Fs.assert;function qs(e,t){this.type=e,this.p=new Ls(t.p,16),this.red=t.prime?Ls.red(t.prime):Ls.mont(this.p),this.zero=new Ls(0).toRed(this.red),this.one=new Ls(1).toRed(this.red),this.two=new Ls(2).toRed(this.red),this.n=t.n&&new Ls(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Gs=qs;function Ws(e,t){this.curve=e,this.type=t,this.precomputed=null}qs.prototype.point=function(){throw new Error("Not implemented")},qs.prototype.validate=function(){throw new Error("Not implemented")},qs.prototype._fixedNafMul=function(e,t){Hs(e.precomputed);var r=e._getDoubles(),n=js(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2===0?2:1);i/=3;var o,a,s=[];for(o=0;o<n.length;o+=r.step){a=0;for(var c=o+r.step-1;c>=o;c--)a=(a<<1)+n[c];s.push(a)}for(var u=this.jpoint(null,null,null),f=this.jpoint(null,null,null),d=i;d>0;d--){for(o=0;o<s.length;o++)(a=s[o])===d?f=f.mixedAdd(r.points[o]):a===-d&&(f=f.mixedAdd(r.points[o].neg()));u=u.add(f)}return u.toP()},qs.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,o=js(t,r,this._bitLength),a=this.jpoint(null,null,null),s=o.length-1;s>=0;s--){for(var c=0;s>=0&&0===o[s];s--)c++;if(s>=0&&c++,a=a.dblp(c),s<0)break;var u=o[s];Hs(0!==u),a="affine"===e.type?u>0?a.mixedAdd(i[u-1>>1]):a.mixedAdd(i[-u-1>>1].neg()):u>0?a.add(i[u-1>>1]):a.add(i[-u-1>>1].neg())}return"affine"===e.type?a.toP():a},qs.prototype._wnafMulAdd=function(e,t,r,n,i){var o,a,s,c=this._wnafT1,u=this._wnafT2,f=this._wnafT3,d=0;for(o=0;o<n;o++){var l=(s=t[o])._getNAFPoints(e);c[o]=l.wnd,u[o]=l.points}for(o=n-1;o>=1;o-=2){var h=o-1,p=o;if(1===c[h]&&1===c[p]){var m=[t[h],null,null,t[p]];0===t[h].y.cmp(t[p].y)?(m[1]=t[h].add(t[p]),m[2]=t[h].toJ().mixedAdd(t[p].neg())):0===t[h].y.cmp(t[p].y.redNeg())?(m[1]=t[h].toJ().mixedAdd(t[p]),m[2]=t[h].add(t[p].neg())):(m[1]=t[h].toJ().mixedAdd(t[p]),m[2]=t[h].toJ().mixedAdd(t[p].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],b=zs(r[h],r[p]);for(d=Math.max(b[0].length,d),f[h]=new Array(d),f[p]=new Array(d),a=0;a<d;a++){var g=0|b[0][a],y=0|b[1][a];f[h][a]=v[3*(g+1)+(y+1)],f[p][a]=0,u[h]=m}}else f[h]=js(r[h],c[h],this._bitLength),f[p]=js(r[p],c[p],this._bitLength),d=Math.max(f[h].length,d),d=Math.max(f[p].length,d)}var _=this.jpoint(null,null,null),w=this._wnafT4;for(o=d;o>=0;o--){for(var x=0;o>=0;){var E=!0;for(a=0;a<n;a++)w[a]=0|f[a][o],0!==w[a]&&(E=!1);if(!E)break;x++,o--}if(o>=0&&x++,_=_.dblp(x),o<0)break;for(a=0;a<n;a++){var S=w[a];0!==S&&(S>0?s=u[a][S-1>>1]:S<0&&(s=u[a][-S-1>>1].neg()),_="affine"===s.type?_.mixedAdd(s):_.add(s))}}for(o=0;o<n;o++)u[o]=null;return i?_:_.toP()},qs.BasePoint=Ws,Ws.prototype.eq=function(){throw new Error("Not implemented")},Ws.prototype.validate=function(){return this.curve.validate(this)},qs.prototype.decodePoint=function(e,t){e=Fs.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1===2*r)return 6===e[0]?Hs(e[e.length-1]%2===0):7===e[0]&&Hs(e[e.length-1]%2===1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},Ws.prototype.encodeCompressed=function(e){return this.encode(e,!0)},Ws.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},Ws.prototype.encode=function(e,t){return Fs.encode(this._encode(t),e)},Ws.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},Ws.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},Ws.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)n=n.dbl();r.push(n)}return{step:e,points:r}},Ws.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},Ws.prototype._getBeta=function(){return null},Ws.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t};var Ys=As,Vs=Ti,Xs=Gs,Ks=Ss.assert;function Qs(e){Xs.call(this,"short",e),this.a=new Ys(e.a,16).toRed(this.red),this.b=new Ys(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}Vs(Qs,Xs);var Js=Qs;function Zs(e,t,r,n){Xs.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new Ys(t,16),this.y=new Ys(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function $s(e,t,r,n){Xs.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new Ys(0)):(this.x=new Ys(t,16),this.y=new Ys(r,16),this.z=new Ys(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}Qs.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new Ys(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new Ys(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],Ks(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new Ys(e.a,16),b:new Ys(e.b,16)}})):this._getEndoBasis(r)}}},Qs.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:Ys.mont(e),r=new Ys(2).toRed(t).redInvm(),n=r.redNeg(),i=new Ys(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(i).fromRed(),n.redSub(i).fromRed()]},Qs.prototype._getEndoBasis=function(e){for(var t,r,n,i,o,a,s,c,u,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),d=e,l=this.n.clone(),h=new Ys(1),p=new Ys(0),m=new Ys(0),v=new Ys(1),b=0;0!==d.cmpn(0);){var g=l.div(d);c=l.sub(g.mul(d)),u=m.sub(g.mul(h));var y=v.sub(g.mul(p));if(!n&&c.cmp(f)<0)t=s.neg(),r=h,n=c.neg(),i=u;else if(n&&2===++b)break;s=c,l=d,d=c,m=h,h=u,v=p,p=y}o=c.neg(),a=u;var _=n.sqr().add(i.sqr());return o.sqr().add(a.sqr()).cmp(_)>=0&&(o=t,a=r),n.negative&&(n=n.neg(),i=i.neg()),o.negative&&(o=o.neg(),a=a.neg()),[{a:n,b:i},{a:o,b:a}]},Qs.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),a=i.mul(r.a),s=o.mul(n.a),c=i.mul(r.b),u=o.mul(n.b);return{k1:e.sub(a).sub(s),k2:c.add(u).neg()}},Qs.prototype.pointFromX=function(e,t){(e=new Ys(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},Qs.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},Qs.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),s=e[o],c=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),c=c.neg(!0)),n[2*o]=s,n[2*o+1]=c,i[2*o]=a.k1,i[2*o+1]=a.k2}for(var u=this._wnafMulAdd(1,n,i,2*o,r),f=0;f<2*o;f++)n[f]=null,i[f]=null;return u},Vs(Zs,Xs.BasePoint),Qs.prototype.point=function(e,t,r){return new Zs(this,e,t,r)},Qs.prototype.pointFromJSON=function(e,t){return Zs.fromJSON(this,e,t)},Zs.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},Zs.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},Zs.fromJSON=function(e,t,r){"string"===typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var o=t[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},Zs.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},Zs.prototype.isInfinity=function(){return this.inf},Zs.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},Zs.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),a=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,a)},Zs.prototype.getX=function(){return this.x.fromRed()},Zs.prototype.getY=function(){return this.y.fromRed()},Zs.prototype.mul=function(e){return e=new Ys(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},Zs.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},Zs.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},Zs.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},Zs.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},Zs.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},Vs($s,Xs.BasePoint),Qs.prototype.jpoint=function(e,t,r){return new $s(this,e,t,r)},$s.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},$s.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},$s.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),c=o.redSub(a);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),f=u.redMul(s),d=n.redMul(u),l=c.redSqr().redIAdd(f).redISub(d).redISub(d),h=c.redMul(d.redISub(l)).redISub(o.redMul(f)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(l,h,p)},$s.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=i.redSub(o);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),u=c.redMul(a),f=r.redMul(c),d=s.redSqr().redIAdd(u).redISub(f).redISub(f),l=s.redMul(f.redISub(d)).redISub(i.redMul(u)),h=this.z.redMul(a);return this.curve.jpoint(d,l,h)},$s.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,c=s.redSqr().redSqr(),u=a.redAdd(a);for(t=0;t<e;t++){var f=o.redSqr(),d=u.redSqr(),l=d.redSqr(),h=f.redAdd(f).redIAdd(f).redIAdd(n.redMul(c)),p=o.redMul(d),m=h.redSqr().redISub(p.redAdd(p)),v=p.redISub(m),b=h.redMul(v);b=b.redIAdd(b).redISub(l);var g=u.redMul(s);t+1<e&&(c=c.redMul(l)),o=m,s=g,u=b}return this.curve.jpoint(o,u.redMul(i),s)},$s.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},$s.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n),c=s.redSqr().redISub(a).redISub(a),u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),e=c,t=s.redMul(a.redISub(c)).redISub(u),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),d=this.y.redSqr(),l=d.redSqr(),h=this.x.redAdd(d).redSqr().redISub(f).redISub(l);h=h.redIAdd(h);var p=f.redAdd(f).redIAdd(f),m=p.redSqr(),v=l.redIAdd(l);v=(v=v.redIAdd(v)).redIAdd(v),e=m.redISub(h).redISub(h),t=p.redMul(h.redISub(e)).redISub(v),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},$s.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),a=this.x.redAdd(i).redSqr().redISub(n).redISub(o);a=a.redIAdd(a);var s=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),c=s.redSqr().redISub(a).redISub(a);e=c;var u=o.redIAdd(o);u=(u=u.redIAdd(u)).redIAdd(u),t=s.redMul(a.redISub(c)).redISub(u),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),d=this.y.redSqr(),l=this.x.redMul(d),h=this.x.redSub(f).redMul(this.x.redAdd(f));h=h.redAdd(h).redIAdd(h);var p=l.redIAdd(l),m=(p=p.redIAdd(p)).redAdd(p);e=h.redSqr().redISub(m),r=this.y.redAdd(this.z).redSqr().redISub(d).redISub(f);var v=d.redSqr();v=(v=(v=v.redIAdd(v)).redIAdd(v)).redIAdd(v),t=h.redMul(p.redISub(e)).redISub(v)}return this.curve.jpoint(e,t,r)},$s.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),a=r.redSqr(),s=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),c=t.redAdd(t),u=(c=c.redIAdd(c)).redMul(a),f=s.redSqr().redISub(u.redAdd(u)),d=u.redISub(f),l=a.redSqr();l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var h=s.redMul(d).redISub(l),p=r.redAdd(r).redMul(n);return this.curve.jpoint(f,h,p)},$s.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(n),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr(),c=n.redIAdd(n);c=(c=(c=c.redIAdd(c)).redIAdd(c)).redIAdd(c);var u=i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(c),f=t.redMul(u);f=(f=f.redIAdd(f)).redIAdd(f);var d=this.x.redMul(s).redISub(f);d=(d=d.redIAdd(d)).redIAdd(d);var l=this.y.redMul(u.redMul(c.redISub(u)).redISub(a.redMul(s)));l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var h=this.z.redAdd(a).redSqr().redISub(r).redISub(s);return this.curve.jpoint(d,l,h)},$s.prototype.mul=function(e,t){return e=new Ys(e,t),this.curve._wnafMul(this,e)},$s.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},$s.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},$s.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},$s.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var ec=As,tc=Ti,rc=Gs,nc=Ss;function ic(e){rc.call(this,"mont",e),this.a=new ec(e.a,16).toRed(this.red),this.b=new ec(e.b,16).toRed(this.red),this.i4=new ec(4).toRed(this.red).redInvm(),this.two=new ec(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}tc(ic,rc);var oc=ic;function ac(e,t,r){rc.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new ec(t,16),this.z=new ec(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}ic.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},tc(ac,rc.BasePoint),ic.prototype.decodePoint=function(e,t){return this.point(nc.toArray(e,t),1)},ic.prototype.point=function(e,t){return new ac(this,e,t)},ic.prototype.pointFromJSON=function(e){return ac.fromJSON(this,e)},ac.prototype.precompute=function(){},ac.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},ac.fromJSON=function(e,t){return new ac(e,t[0],t[1]||e.one)},ac.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},ac.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},ac.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},ac.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},ac.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),a=i.redMul(n),s=t.z.redMul(o.redAdd(a).redSqr()),c=t.x.redMul(o.redISub(a).redSqr());return this.curve.point(s,c)},ac.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=this,o=[];0!==t.cmpn(0);t.iushrn(1))o.push(t.andln(1));for(var a=o.length-1;a>=0;a--)0===o[a]?(r=r.diffAdd(n,i),n=n.dbl()):(n=r.diffAdd(n,i),r=r.dbl());return n},ac.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},ac.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},ac.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},ac.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},ac.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var sc=As,cc=Ti,uc=Gs,fc=Ss.assert;function dc(e){this.twisted=1!==(0|e.a),this.mOneA=this.twisted&&-1===(0|e.a),this.extended=this.mOneA,uc.call(this,"edwards",e),this.a=new sc(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new sc(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new sc(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),fc(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1===(0|e.c)}cc(dc,uc);var lc=dc;function hc(e,t,r,n,i){uc.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new sc(t,16),this.y=new sc(r,16),this.z=n?new sc(n,16):this.curve.one,this.t=i&&new sc(i,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}dc.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},dc.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},dc.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},dc.prototype.pointFromX=function(e,t){(e=new sc(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),i=this.one.redSub(this.c2.redMul(this.d).redMul(r)),o=n.redMul(i.redInvm()),a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var s=a.fromRed().isOdd();return(t&&!s||!t&&s)&&(a=a.redNeg()),this.point(e,a)},dc.prototype.pointFromY=function(e,t){(e=new sc(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),i=r.redMul(this.d).redMul(this.c2).redSub(this.a),o=n.redMul(i.redInvm());if(0===o.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=o.redSqrt();if(0!==a.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},dc.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},cc(hc,uc.BasePoint),dc.prototype.pointFromJSON=function(e){return hc.fromJSON(this,e)},dc.prototype.point=function(e,t,r,n){return new hc(this,e,t,r,n)},hc.fromJSON=function(e,t){return new hc(e,t[0],t[1],t[2])},hc.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},hc.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},hc.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),a=o.redSub(r),s=n.redSub(t),c=i.redMul(a),u=o.redMul(s),f=i.redMul(s),d=a.redMul(o);return this.curve.point(c,u,d,f)},hc.prototype._projDbl=function(){var e,t,r,n,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),c=this.y.redSqr();if(this.curve.twisted){var u=(n=this.curve._mulA(s)).redAdd(c);this.zOne?(e=a.redSub(s).redSub(c).redMul(u.redSub(this.curve.two)),t=u.redMul(n.redSub(c)),r=u.redSqr().redSub(u).redSub(u)):(i=this.z.redSqr(),o=u.redSub(i).redISub(i),e=a.redSub(s).redISub(c).redMul(o),t=u.redMul(n.redSub(c)),r=u.redMul(o))}else n=s.redAdd(c),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(s.redISub(c)),r=n.redMul(o);return this.curve.point(e,t,r)},hc.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},hc.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),a=i.redSub(n),s=i.redAdd(n),c=r.redAdd(t),u=o.redMul(a),f=s.redMul(c),d=o.redMul(c),l=a.redMul(s);return this.curve.point(u,f,l,d)},hc.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(o).redMul(a),c=i.redSub(s),u=i.redAdd(s),f=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a),d=n.redMul(c).redMul(f);return this.curve.twisted?(t=n.redMul(u).redMul(a.redSub(this.curve._mulA(o))),r=c.redMul(u)):(t=n.redMul(u).redMul(a.redSub(o)),r=this.curve._mulC(c).redMul(u)),this.curve.point(d,t,r)},hc.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},hc.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},hc.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},hc.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},hc.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},hc.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},hc.prototype.getX=function(){return this.normalize(),this.x.fromRed()},hc.prototype.getY=function(){return this.normalize(),this.y.fromRed()},hc.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},hc.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},hc.prototype.toP=hc.prototype.normalize,hc.prototype.mixedAdd=hc.prototype.add,function(e){var t=e;t.base=Gs,t.short=Js,t.mont=oc,t.edwards=lc}(Ds);var pc={},mc={},vc={},bc=Rs,gc=Ti;function yc(e,t){return 55296===(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320===(64512&e.charCodeAt(t+1))}function _c(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"===typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!==0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var o=e.charCodeAt(i);o<128?r[n++]=o:o<2048?(r[n++]=o>>6|192,r[n++]=63&o|128):yc(e,i)?(o=65536+((1023&o)<<10)+(1023&e.charCodeAt(++i)),r[n++]=o>>18|240,r[n++]=o>>12&63|128,r[n++]=o>>6&63|128,r[n++]=63&o|128):(r[n++]=o>>12|224,r[n++]=o>>6&63|128,r[n++]=63&o|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r}function wc(e){for(var t="",r=0;r<e.length;r++)t+=Sc(e[r].toString(16));return t}function xc(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function Ec(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=xc(i)),r+=Tc(i.toString(16))}return r}function Sc(e){return 1===e.length?"0"+e:e}function Tc(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}function Ac(e,t,r,n){var i=r-t;bc(i%4===0);for(var o=new Array(i/4),a=0,s=t;a<o.length;a++,s+=4){var c;c="big"===n?e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3]:e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s],o[a]=c>>>0}return o}function Rc(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r}function Mc(e,t){return e>>>t|e<<32-t}function Ic(e,t){return e<<t|e>>>32-t}function Oc(e,t){return e+t>>>0}function Cc(e,t,r){return e+t+r>>>0}function Pc(e,t,r,n){return e+t+r+n>>>0}function Nc(e,t,r,n,i){return e+t+r+n+i>>>0}function kc(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o<n?1:0)+r+i;e[t]=a>>>0,e[t+1]=o}function Uc(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0}function Bc(e,t,r,n){return t+n>>>0}function Dc(e,t,r,n,i,o,a,s){var c=0,u=t;return c+=(u=u+n>>>0)<t?1:0,c+=(u=u+o>>>0)<o?1:0,e+r+i+a+(c+=(u=u+s>>>0)<s?1:0)>>>0}function Lc(e,t,r,n,i,o,a,s){return t+n+o+s>>>0}function Fc(e,t,r,n,i,o,a,s,c,u){var f=0,d=t;return f+=(d=d+n>>>0)<t?1:0,f+=(d=d+o>>>0)<o?1:0,f+=(d=d+s>>>0)<s?1:0,e+r+i+a+c+(f+=(d=d+u>>>0)<u?1:0)>>>0}function jc(e,t,r,n,i,o,a,s,c,u){return t+n+o+s+u>>>0}function zc(e,t,r){return(t<<32-r|e>>>r)>>>0}function Hc(e,t,r){return(e<<32-r|t>>>r)>>>0}function qc(e,t,r){return e>>>r}function Gc(e,t,r){return(e<<32-r|t>>>r)>>>0}vc.inherits=gc,vc.toArray=_c,vc.toHex=wc,vc.htonl=xc,vc.toHex32=Ec,vc.zero2=Sc,vc.zero8=Tc,vc.join32=Ac,vc.split32=Rc,vc.rotr32=Mc,vc.rotl32=Ic,vc.sum32=Oc,vc.sum32_3=Cc,vc.sum32_4=Pc,vc.sum32_5=Nc,vc.sum64=kc,vc.sum64_hi=Uc,vc.sum64_lo=Bc,vc.sum64_4_hi=Dc,vc.sum64_4_lo=Lc,vc.sum64_5_hi=Fc,vc.sum64_5_lo=jc,vc.rotr64_hi=zc,vc.rotr64_lo=Hc,vc.shr64_hi=qc,vc.shr64_lo=Gc;var Wc={},Yc=vc,Vc=Rs;function Xc(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Wc.BlockHash=Xc,Xc.prototype.update=function(e,t){if(e=Yc.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=Yc.join32(e,0,e.length-r,this.endian);for(var n=0;n<e.length;n+=this._delta32)this._update(e,n,n+this._delta32)}return this},Xc.prototype.digest=function(e){return this.update(this._pad()),Vc(null===this.pending),this._digest(e)},Xc.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n};var Kc={},Qc={},Jc=vc.rotr32;function Zc(e,t,r,n){return 0===e?$c(t,r,n):1===e||3===e?tu(t,r,n):2===e?eu(t,r,n):void 0}function $c(e,t,r){return e&t^~e&r}function eu(e,t,r){return e&t^e&r^t&r}function tu(e,t,r){return e^t^r}function ru(e){return Jc(e,2)^Jc(e,13)^Jc(e,22)}function nu(e){return Jc(e,6)^Jc(e,11)^Jc(e,25)}function iu(e){return Jc(e,7)^Jc(e,18)^e>>>3}function ou(e){return Jc(e,17)^Jc(e,19)^e>>>10}Qc.ft_1=Zc,Qc.ch32=$c,Qc.maj32=eu,Qc.p32=tu,Qc.s0_256=ru,Qc.s1_256=nu,Qc.g0_256=iu,Qc.g1_256=ou;var au=vc,su=Wc,cu=Qc,uu=au.rotl32,fu=au.sum32,du=au.sum32_5,lu=cu.ft_1,hu=su.BlockHash,pu=[1518500249,1859775393,2400959708,3395469782];function mu(){if(!(this instanceof mu))return new mu;hu.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}au.inherits(mu,hu);var vu=mu;mu.blockSize=512,mu.outSize=160,mu.hmacStrength=80,mu.padLength=64,mu.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=uu(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],c=this.h[4];for(n=0;n<r.length;n++){var u=~~(n/20),f=du(uu(i,5),lu(u,o,a,s),c,r[n],pu[u]);c=s,s=a,a=uu(o,30),o=i,i=f}this.h[0]=fu(this.h[0],i),this.h[1]=fu(this.h[1],o),this.h[2]=fu(this.h[2],a),this.h[3]=fu(this.h[3],s),this.h[4]=fu(this.h[4],c)},mu.prototype._digest=function(e){return"hex"===e?au.toHex32(this.h,"big"):au.split32(this.h,"big")};var bu=vc,gu=Wc,yu=Qc,_u=Rs,wu=bu.sum32,xu=bu.sum32_4,Eu=bu.sum32_5,Su=yu.ch32,Tu=yu.maj32,Au=yu.s0_256,Ru=yu.s1_256,Mu=yu.g0_256,Iu=yu.g1_256,Ou=gu.BlockHash,Cu=[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];function Pu(){if(!(this instanceof Pu))return new Pu;Ou.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=Cu,this.W=new Array(64)}bu.inherits(Pu,Ou);var Nu=Pu;Pu.blockSize=512,Pu.outSize=256,Pu.hmacStrength=192,Pu.padLength=64,Pu.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=xu(Iu(r[n-2]),r[n-7],Mu(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],a=this.h[2],s=this.h[3],c=this.h[4],u=this.h[5],f=this.h[6],d=this.h[7];for(_u(this.k.length===r.length),n=0;n<r.length;n++){var l=Eu(d,Ru(c),Su(c,u,f),this.k[n],r[n]),h=wu(Au(i),Tu(i,o,a));d=f,f=u,u=c,c=wu(s,l),s=a,a=o,o=i,i=wu(l,h)}this.h[0]=wu(this.h[0],i),this.h[1]=wu(this.h[1],o),this.h[2]=wu(this.h[2],a),this.h[3]=wu(this.h[3],s),this.h[4]=wu(this.h[4],c),this.h[5]=wu(this.h[5],u),this.h[6]=wu(this.h[6],f),this.h[7]=wu(this.h[7],d)},Pu.prototype._digest=function(e){return"hex"===e?bu.toHex32(this.h,"big"):bu.split32(this.h,"big")};var ku=vc,Uu=Nu;function Bu(){if(!(this instanceof Bu))return new Bu;Uu.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}ku.inherits(Bu,Uu);var Du=Bu;Bu.blockSize=512,Bu.outSize=224,Bu.hmacStrength=192,Bu.padLength=64,Bu.prototype._digest=function(e){return"hex"===e?ku.toHex32(this.h.slice(0,7),"big"):ku.split32(this.h.slice(0,7),"big")};var Lu=vc,Fu=Wc,ju=Rs,zu=Lu.rotr64_hi,Hu=Lu.rotr64_lo,qu=Lu.shr64_hi,Gu=Lu.shr64_lo,Wu=Lu.sum64,Yu=Lu.sum64_hi,Vu=Lu.sum64_lo,Xu=Lu.sum64_4_hi,Ku=Lu.sum64_4_lo,Qu=Lu.sum64_5_hi,Ju=Lu.sum64_5_lo,Zu=Fu.BlockHash,$u=[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];function ef(){if(!(this instanceof ef))return new ef;Zu.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=$u,this.W=new Array(160)}Lu.inherits(ef,Zu);var tf=ef;function rf(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function nf(e,t,r,n,i,o){var a=t&n^~t&o;return a<0&&(a+=4294967296),a}function of(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function af(e,t,r,n,i,o){var a=t&n^t&o^n&o;return a<0&&(a+=4294967296),a}function sf(e,t){var r=zu(e,t,28)^zu(t,e,2)^zu(t,e,7);return r<0&&(r+=4294967296),r}function cf(e,t){var r=Hu(e,t,28)^Hu(t,e,2)^Hu(t,e,7);return r<0&&(r+=4294967296),r}function uf(e,t){var r=zu(e,t,14)^zu(e,t,18)^zu(t,e,9);return r<0&&(r+=4294967296),r}function ff(e,t){var r=Hu(e,t,14)^Hu(e,t,18)^Hu(t,e,9);return r<0&&(r+=4294967296),r}function df(e,t){var r=zu(e,t,1)^zu(e,t,8)^qu(e,t,7);return r<0&&(r+=4294967296),r}function lf(e,t){var r=Hu(e,t,1)^Hu(e,t,8)^Gu(e,t,7);return r<0&&(r+=4294967296),r}function hf(e,t){var r=zu(e,t,19)^zu(t,e,29)^qu(e,t,6);return r<0&&(r+=4294967296),r}function pf(e,t){var r=Hu(e,t,19)^Hu(t,e,29)^Gu(e,t,6);return r<0&&(r+=4294967296),r}ef.blockSize=1024,ef.outSize=512,ef.hmacStrength=192,ef.padLength=128,ef.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=hf(r[n-4],r[n-3]),o=pf(r[n-4],r[n-3]),a=r[n-14],s=r[n-13],c=df(r[n-30],r[n-29]),u=lf(r[n-30],r[n-29]),f=r[n-32],d=r[n-31];r[n]=Xu(i,o,a,s,c,u,f,d),r[n+1]=Ku(i,o,a,s,c,u,f,d)}},ef.prototype._update=function(e,t){this._prepareBlock(e,t);var r=this.W,n=this.h[0],i=this.h[1],o=this.h[2],a=this.h[3],s=this.h[4],c=this.h[5],u=this.h[6],f=this.h[7],d=this.h[8],l=this.h[9],h=this.h[10],p=this.h[11],m=this.h[12],v=this.h[13],b=this.h[14],g=this.h[15];ju(this.k.length===r.length);for(var y=0;y<r.length;y+=2){var _=b,w=g,x=uf(d,l),E=ff(d,l),S=rf(d,l,h,p,m),T=nf(d,l,h,p,m,v),A=this.k[y],R=this.k[y+1],M=r[y],I=r[y+1],O=Qu(_,w,x,E,S,T,A,R,M,I),C=Ju(_,w,x,E,S,T,A,R,M,I);_=sf(n,i),w=cf(n,i),x=of(n,i,o,a,s),E=af(n,i,o,a,s,c);var P=Yu(_,w,x,E),N=Vu(_,w,x,E);b=m,g=v,m=h,v=p,h=d,p=l,d=Yu(u,f,O,C),l=Vu(f,f,O,C),u=s,f=c,s=o,c=a,o=n,a=i,n=Yu(O,C,P,N),i=Vu(O,C,P,N)}Wu(this.h,0,n,i),Wu(this.h,2,o,a),Wu(this.h,4,s,c),Wu(this.h,6,u,f),Wu(this.h,8,d,l),Wu(this.h,10,h,p),Wu(this.h,12,m,v),Wu(this.h,14,b,g)},ef.prototype._digest=function(e){return"hex"===e?Lu.toHex32(this.h,"big"):Lu.split32(this.h,"big")};var mf=vc,vf=tf;function bf(){if(!(this instanceof bf))return new bf;vf.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}mf.inherits(bf,vf);var gf=bf;bf.blockSize=1024,bf.outSize=384,bf.hmacStrength=192,bf.padLength=128,bf.prototype._digest=function(e){return"hex"===e?mf.toHex32(this.h.slice(0,12),"big"):mf.split32(this.h.slice(0,12),"big")},Kc.sha1=vu,Kc.sha224=Du,Kc.sha256=Nu,Kc.sha384=gf,Kc.sha512=tf;var yf={},_f=vc,wf=Wc,xf=_f.rotl32,Ef=_f.sum32,Sf=_f.sum32_3,Tf=_f.sum32_4,Af=wf.BlockHash;function Rf(){if(!(this instanceof Rf))return new Rf;Af.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function Mf(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function If(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function Of(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}_f.inherits(Rf,Af),yf.ripemd160=Rf,Rf.blockSize=512,Rf.outSize=160,Rf.hmacStrength=192,Rf.padLength=64,Rf.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],o=this.h[3],a=this.h[4],s=r,c=n,u=i,f=o,d=a,l=0;l<80;l++){var h=Ef(xf(Tf(r,Mf(l,n,i,o),e[Cf[l]+t],If(l)),Nf[l]),a);r=a,a=o,o=xf(i,10),i=n,n=h,h=Ef(xf(Tf(s,Mf(79-l,c,u,f),e[Pf[l]+t],Of(l)),kf[l]),d),s=d,d=f,f=xf(u,10),u=c,c=h}h=Sf(this.h[1],i,f),this.h[1]=Sf(this.h[2],o,d),this.h[2]=Sf(this.h[3],a,s),this.h[3]=Sf(this.h[4],r,c),this.h[4]=Sf(this.h[0],n,u),this.h[0]=h},Rf.prototype._digest=function(e){return"hex"===e?_f.toHex32(this.h,"little"):_f.split32(this.h,"little")};var Cf=[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],Pf=[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],Nf=[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],kf=[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],Uf=vc,Bf=Rs;function Df(e,t,r){if(!(this instanceof Df))return new Df(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(Uf.toArray(t,r))}var Lf,Ff,jf=Df;function zf(){return Ff?Lf:(Ff=1,Lf={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}})}Df.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),Bf(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},Df.prototype.update=function(e,t){return this.inner.update(e,t),this},Df.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)},function(e){var t=e;t.utils=vc,t.common=Wc,t.sha=Kc,t.ripemd=yf,t.hmac=jf,t.sha1=t.sha.sha1,t.sha256=t.sha.sha256,t.sha224=t.sha.sha224,t.sha384=t.sha.sha384,t.sha512=t.sha.sha512,t.ripemd160=t.ripemd.ripemd160}(mc),function(e){var t,r=e,n=mc,i=Ds,o=Ss.assert;function a(e){"short"===e.type?this.curve=new i.short(e):"edwards"===e.type?this.curve=new i.edwards(e):this.curve=new i.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var n=new a(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:n}),n}})}r.PresetCurve=a,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:n.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:n.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:n.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:n.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:n.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:n.sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:n.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{t=zf()}catch(ap){t=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:n.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",t]})}(pc);var Hf=mc,qf=Is,Gf=Rs;function Wf(e){if(!(this instanceof Wf))return new Wf(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=qf.toArray(e.entropy,e.entropyEnc||"hex"),r=qf.toArray(e.nonce,e.nonceEnc||"hex"),n=qf.toArray(e.pers,e.persEnc||"hex");Gf(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var Yf=Wf;Wf.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},Wf.prototype._hmac=function(){return new Hf.hmac(this.hash,this.K)},Wf.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},Wf.prototype.reseed=function(e,t,r,n){"string"!==typeof t&&(n=r,r=t,t=null),e=qf.toArray(e,t),r=qf.toArray(r,n),Gf(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},Wf.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!==typeof t&&(n=r,r=t,t=null),r&&(r=qf.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var o=i.slice(0,e);return this._update(r),this._reseed++,qf.encode(o,t)};var Vf=As,Xf=Ss.assert;function Kf(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var Qf=Kf;Kf.fromPublic=function(e,t,r){return t instanceof Kf?t:new Kf(e,{pub:t,pubEnc:r})},Kf.fromPrivate=function(e,t,r){return t instanceof Kf?t:new Kf(e,{priv:t,privEnc:r})},Kf.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},Kf.prototype.getPublic=function(e,t){return"string"===typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},Kf.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},Kf.prototype._importPrivate=function(e,t){this.priv=new Vf(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},Kf.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?Xf(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||Xf(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},Kf.prototype.derive=function(e){return e.validate()||Xf(e.validate(),"public point not validated"),e.mul(this.priv).getX()},Kf.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},Kf.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},Kf.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"};var Jf=As,Zf=Ss,$f=Zf.assert;function ed(e,t){if(e instanceof ed)return e;this._importDER(e,t)||($f(e.r&&e.s,"Signature without r or s"),this.r=new Jf(e.r,16),this.s=new Jf(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var td=ed;function rd(){this.place=0}function nd(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,a=t.place;o<n;o++,a++)i<<=8,i|=e[a],i>>>=0;return!(i<=127)&&(t.place=a,i)}function id(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function od(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}ed.prototype._importDER=function(e,t){e=Zf.toArray(e,t);var r=new rd;if(48!==e[r.place++])return!1;var n=nd(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=nd(e,r);if(!1===i)return!1;var o=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var a=nd(e,r);if(!1===a)return!1;if(e.length!==a+r.place)return!1;var s=e.slice(r.place,a+r.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new Jf(o),this.s=new Jf(s),this.recoveryParam=null,!0},ed.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=id(t),r=id(r);!r[0]&&!(128&r[1]);)r=r.slice(1);var n=[2];od(n,t.length),(n=n.concat(t)).push(2),od(n,r.length);var i=n.concat(r),o=[48];return od(o,i.length),o=o.concat(i),Zf.encode(o,e)};var ad=As,sd=Yf,cd=pc,ud=Bs,fd=Ss.assert,dd=Qf,ld=td;function hd(e){if(!(this instanceof hd))return new hd(e);"string"===typeof e&&(fd(Object.prototype.hasOwnProperty.call(cd,e),"Unknown curve "+e),e=cd[e]),e instanceof cd.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var pd=hd;hd.prototype.keyPair=function(e){return new dd(this,e)},hd.prototype.keyFromPrivate=function(e,t){return dd.fromPrivate(this,e,t)},hd.prototype.keyFromPublic=function(e,t){return dd.fromPublic(this,e,t)},hd.prototype.genKeyPair=function(e){e||(e={});for(var t=new sd({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||ud(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new ad(2));;){var i=new ad(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},hd.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},hd.prototype.sign=function(e,t,r,n){"object"===typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new ad(e,16));for(var i=this.n.byteLength(),o=t.getPrivate().toArray("be",i),a=e.toArray("be",i),s=new sd({hash:this.hash,entropy:o,nonce:a,pers:n.pers,persEnc:n.persEnc||"utf8"}),c=this.n.sub(new ad(1)),u=0;;u++){var f=n.k?n.k(u):new ad(s.generate(this.n.byteLength()));if(!((f=this._truncateToN(f,!0)).cmpn(1)<=0||f.cmp(c)>=0)){var d=this.g.mul(f);if(!d.isInfinity()){var l=d.getX(),h=l.umod(this.n);if(0!==h.cmpn(0)){var p=f.invm(this.n).mul(h.mul(t.getPrivate()).iadd(e));if(0!==(p=p.umod(this.n)).cmpn(0)){var m=(d.getY().isOdd()?1:0)|(0!==l.cmp(h)?2:0);return n.canonical&&p.cmp(this.nh)>0&&(p=this.n.sub(p),m^=1),new ld({r:h,s:p,recoveryParam:m})}}}}}},hd.prototype.verify=function(e,t,r,n){e=this._truncateToN(new ad(e,16)),r=this.keyFromPublic(r,n);var i=(t=new ld(t,"hex")).r,o=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var a,s=o.invm(this.n),c=s.mul(e).umod(this.n),u=s.mul(i).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(c,r.getPublic(),u)).isInfinity()&&a.eqXToP(i):!(a=this.g.mulAdd(c,r.getPublic(),u)).isInfinity()&&0===a.getX().umod(this.n).cmp(i)},hd.prototype.recoverPubKey=function(e,t,r,n){fd((3&r)===r,"The recovery param is more than two bits"),t=new ld(t,n);var i=this.n,o=new ad(e),a=t.r,s=t.s,c=1&r,u=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");a=u?this.curve.pointFromX(a.add(this.curve.n),c):this.curve.pointFromX(a,c);var f=t.r.invm(i),d=i.sub(o).mul(f).umod(i),l=s.mul(f).umod(i);return this.g.mulAdd(d,a,l)},hd.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new ld(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")};var md=Ss,vd=md.assert,bd=md.parseBytes,gd=md.cachedProperty;function yd(e,t){this.eddsa=e,this._secret=bd(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=bd(t.pub)}yd.fromPublic=function(e,t){return t instanceof yd?t:new yd(e,{pub:t})},yd.fromSecret=function(e,t){return t instanceof yd?t:new yd(e,{secret:t})},yd.prototype.secret=function(){return this._secret},gd(yd,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),gd(yd,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),gd(yd,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),gd(yd,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),gd(yd,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),gd(yd,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),yd.prototype.sign=function(e){return vd(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},yd.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},yd.prototype.getSecret=function(e){return vd(this._secret,"KeyPair is public only"),md.encode(this.secret(),e)},yd.prototype.getPublic=function(e){return md.encode(this.pubBytes(),e)};var _d=yd,wd=As,xd=Ss,Ed=xd.assert,Sd=xd.cachedProperty,Td=xd.parseBytes;function Ad(e,t){this.eddsa=e,"object"!==typeof t&&(t=Td(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),Ed(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof wd&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}Sd(Ad,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),Sd(Ad,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),Sd(Ad,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),Sd(Ad,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),Ad.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Ad.prototype.toHex=function(){return xd.encode(this.toBytes(),"hex").toUpperCase()};var Rd=Ad,Md=mc,Id=pc,Od=Ss,Cd=Od.assert,Pd=Od.parseBytes,Nd=_d,kd=Rd;function Ud(e){if(Cd("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof Ud))return new Ud(e);e=Id[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=Md.sha512}var Bd=Ud;Ud.prototype.sign=function(e,t){e=Pd(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),a=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),s=n.add(a).umod(this.curve.n);return this.makeSignature({R:i,S:s,Rencoded:o})},Ud.prototype.verify=function(e,t,r){e=Pd(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},Ud.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return Od.intFromLE(e.digest()).umod(this.curve.n)},Ud.prototype.keyFromPublic=function(e){return Nd.fromPublic(this,e)},Ud.prototype.keyFromSecret=function(e){return Nd.fromSecret(this,e)},Ud.prototype.makeSignature=function(e){return e instanceof kd?e:new kd(this,e)},Ud.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},Ud.prototype.decodePoint=function(e){var t=(e=Od.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=0!==(128&e[t]),i=Od.intFromLE(r);return this.curve.pointFromY(i,n)},Ud.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},Ud.prototype.decodeInt=function(e){return Od.intFromLE(e)},Ud.prototype.isPoint=function(e){return e instanceof this.pointClass},function(e){var t=e;t.version=Es.version,t.utils=Ss,t.rand=Bs,t.curve=Ds,t.curves=pc,t.ec=pd,t.eddsa=Bd}(xs);var Dd=xs,Ld=As,Fd=function(e){return new zd(e)},jd={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function zd(e){this.curveType=jd[e],this.curveType||(this.curveType={name:e}),this.curve=new Dd.ec(this.curveType.name),this.keys=void 0}function Hd(e,t,r){Array.isArray(e)||(e=e.toArray());var n=new A(e);if(r&&n.length<r){var i=new A(r-n.length);i.fill(0),n=A.concat([i,n])}return t?n.toString(t):n}jd.p224=jd.secp224r1,jd.p256=jd.secp256r1=jd.prime256v1,jd.p192=jd.secp192r1=jd.prime192v1,jd.p384=jd.secp384r1,jd.p521=jd.secp521r1,zd.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},zd.prototype.computeSecret=function(e,t,r){return t=t||"utf8",A.isBuffer(e)||(e=new A(e,t)),Hd(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},zd.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(r[r.length-1]%2?r[0]=7:r[0]=6),Hd(r,e)},zd.prototype.getPrivateKey=function(e){return Hd(this.keys.getPrivate(),e)},zd.prototype.setPublicKey=function(e,t){return t=t||"utf8",A.isBuffer(e)||(e=new A(e,t)),this.keys._importPublic(e),this},zd.prototype.setPrivateKey=function(e,t){t=t||"utf8",A.isBuffer(e)||(e=new A(e,t));var r=new Ld(e);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this};var qd=n(Fd),Gd=Math.pow(2,30)-1,Wd=function(e,t){if("number"!==typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!==typeof t)throw new TypeError("Key length not a number");if(t<0||t>Gd||t!==t)throw new TypeError("Bad key length")},Yd=t.process&&t.process.browser?"utf-8":t.process&&t.process.version?parseInt(hr.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",Vd=La,Xd=function(e){return(new Vd).update(e).digest()},Kd=Me.Buffer,Qd=Ti,Jd=Ra,Zd=new Array(16),$d=[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],el=[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],tl=[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],rl=[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],nl=[0,1518500249,1859775393,2400959708,2840853838],il=[1352829926,1548603684,1836072691,2053994217,0];function ol(){Jd.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function al(e,t){return e<<t|e>>>32-t}function sl(e,t,r,n,i,o,a,s){return al(e+(t^r^n)+o+a|0,s)+i|0}function cl(e,t,r,n,i,o,a,s){return al(e+(t&r|~t&n)+o+a|0,s)+i|0}function ul(e,t,r,n,i,o,a,s){return al(e+((t|~r)^n)+o+a|0,s)+i|0}function fl(e,t,r,n,i,o,a,s){return al(e+(t&n|r&~n)+o+a|0,s)+i|0}function dl(e,t,r,n,i,o,a,s){return al(e+(t^(r|~n))+o+a|0,s)+i|0}Qd(ol,Jd),ol.prototype._update=function(){for(var e=Zd,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,s=0|this._a,c=0|this._b,u=0|this._c,f=0|this._d,d=0|this._e,l=0;l<80;l+=1){var h,p;l<16?(h=sl(r,n,i,o,a,e[$d[l]],nl[0],tl[l]),p=dl(s,c,u,f,d,e[el[l]],il[0],rl[l])):l<32?(h=cl(r,n,i,o,a,e[$d[l]],nl[1],tl[l]),p=fl(s,c,u,f,d,e[el[l]],il[1],rl[l])):l<48?(h=ul(r,n,i,o,a,e[$d[l]],nl[2],tl[l]),p=ul(s,c,u,f,d,e[el[l]],il[2],rl[l])):l<64?(h=fl(r,n,i,o,a,e[$d[l]],nl[3],tl[l]),p=cl(s,c,u,f,d,e[el[l]],il[3],rl[l])):(h=dl(r,n,i,o,a,e[$d[l]],nl[4],tl[l]),p=sl(s,c,u,f,d,e[el[l]],il[4],rl[l])),r=a,a=o,o=al(i,10),i=n,n=h,s=d,d=f,f=al(u,10),u=c,c=p}var m=this._b+i+f|0;this._b=this._c+o+d|0,this._c=this._d+a+s|0,this._d=this._e+r+c|0,this._e=this._a+n+u|0,this._a=m},ol.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=Kd.alloc?Kd.alloc(20):new Kd(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e};var ll=ol,hl={exports:{}},pl=Ie.Buffer;function ml(e,t){this._block=pl.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}ml.prototype.update=function(e,t){"string"===typeof e&&(t=t||"utf8",e=pl.from(e,t));for(var r=this._block,n=this._blockSize,i=e.length,o=this._len,a=0;a<i;){for(var s=o%n,c=Math.min(i-a,n-s),u=0;u<c;u++)r[s+u]=e[a+u];a+=c,(o+=c)%n===0&&this._update(r)}return this._len+=i,this},ml.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},ml.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var vl=ml,bl=Ti,gl=vl,yl=Ie.Buffer,_l=[1518500249,1859775393,-1894007588,-899497514],wl=new Array(80);function xl(){this.init(),this._w=wl,gl.call(this,64,56)}function El(e){return e<<5|e>>>27}function Sl(e){return e<<30|e>>>2}function Tl(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}bl(xl,gl),xl.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},xl.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,s=0;s<16;++s)t[s]=e.readInt32BE(4*s);for(;s<80;++s)t[s]=t[s-3]^t[s-8]^t[s-14]^t[s-16];for(var c=0;c<80;++c){var u=~~(c/20),f=El(r)+Tl(u,n,i,o)+a+t[c]+_l[u]|0;a=o,o=i,i=Sl(n),n=r,r=f}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0},xl.prototype._hash=function(){var e=yl.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e};var Al=xl,Rl=Ti,Ml=vl,Il=Ie.Buffer,Ol=[1518500249,1859775393,-1894007588,-899497514],Cl=new Array(80);function Pl(){this.init(),this._w=Cl,Ml.call(this,64,56)}function Nl(e){return e<<1|e>>>31}function kl(e){return e<<5|e>>>27}function Ul(e){return e<<30|e>>>2}function Bl(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}Rl(Pl,Ml),Pl.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Pl.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,s=0;s<16;++s)t[s]=e.readInt32BE(4*s);for(;s<80;++s)t[s]=Nl(t[s-3]^t[s-8]^t[s-14]^t[s-16]);for(var c=0;c<80;++c){var u=~~(c/20),f=kl(r)+Bl(u,n,i,o)+a+t[c]+Ol[u]|0;a=o,o=i,i=Ul(n),n=r,r=f}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0},Pl.prototype._hash=function(){var e=Il.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e};var Dl=Pl,Ll=Ti,Fl=vl,jl=Ie.Buffer,zl=[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],Hl=new Array(64);function ql(){this.init(),this._w=Hl,Fl.call(this,64,56)}function Gl(e,t,r){return r^e&(t^r)}function Wl(e,t,r){return e&t|r&(e|t)}function Yl(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function Vl(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function Xl(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function Kl(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}Ll(ql,Fl),ql.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},ql.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,s=0|this._f,c=0|this._g,u=0|this._h,f=0;f<16;++f)t[f]=e.readInt32BE(4*f);for(;f<64;++f)t[f]=Kl(t[f-2])+t[f-7]+Xl(t[f-15])+t[f-16]|0;for(var d=0;d<64;++d){var l=u+Vl(a)+Gl(a,s,c)+zl[d]+t[d]|0,h=Yl(r)+Wl(r,n,i)|0;u=c,c=s,s=a,a=o+l|0,o=i,i=n,n=r,r=l+h|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0,this._f=s+this._f|0,this._g=c+this._g|0,this._h=u+this._h|0},ql.prototype._hash=function(){var e=jl.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e};var Ql=ql,Jl=Ti,Zl=Ql,$l=vl,eh=Ie.Buffer,th=new Array(64);function rh(){this.init(),this._w=th,$l.call(this,64,56)}Jl(rh,Zl),rh.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},rh.prototype._hash=function(){var e=eh.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e};var nh=rh,ih=Ti,oh=vl,ah=Ie.Buffer,sh=[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],ch=new Array(160);function uh(){this.init(),this._w=ch,oh.call(this,128,112)}function fh(e,t,r){return r^e&(t^r)}function dh(e,t,r){return e&t|r&(e|t)}function lh(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function hh(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function ph(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function mh(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function vh(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function bh(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function gh(e,t){return e>>>0<t>>>0?1:0}ih(uh,oh),uh.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},uh.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,s=0|this._fh,c=0|this._gh,u=0|this._hh,f=0|this._al,d=0|this._bl,l=0|this._cl,h=0|this._dl,p=0|this._el,m=0|this._fl,v=0|this._gl,b=0|this._hl,g=0;g<32;g+=2)t[g]=e.readInt32BE(4*g),t[g+1]=e.readInt32BE(4*g+4);for(;g<160;g+=2){var y=t[g-30],_=t[g-30+1],w=ph(y,_),x=mh(_,y),E=vh(y=t[g-4],_=t[g-4+1]),S=bh(_,y),T=t[g-14],A=t[g-14+1],R=t[g-32],M=t[g-32+1],I=x+A|0,O=w+T+gh(I,x)|0;O=(O=O+E+gh(I=I+S|0,S)|0)+R+gh(I=I+M|0,M)|0,t[g]=O,t[g+1]=I}for(var C=0;C<160;C+=2){O=t[C],I=t[C+1];var P=dh(r,n,i),N=dh(f,d,l),k=lh(r,f),U=lh(f,r),B=hh(a,p),D=hh(p,a),L=sh[C],F=sh[C+1],j=fh(a,s,c),z=fh(p,m,v),H=b+D|0,q=u+B+gh(H,b)|0;q=(q=(q=q+j+gh(H=H+z|0,z)|0)+L+gh(H=H+F|0,F)|0)+O+gh(H=H+I|0,I)|0;var G=U+N|0,W=k+P+gh(G,U)|0;u=c,b=v,c=s,v=m,s=a,m=p,a=o+q+gh(p=h+H|0,h)|0,o=i,h=l,i=n,l=d,n=r,d=f,r=q+W+gh(f=H+G|0,H)|0}this._al=this._al+f|0,this._bl=this._bl+d|0,this._cl=this._cl+l|0,this._dl=this._dl+h|0,this._el=this._el+p|0,this._fl=this._fl+m|0,this._gl=this._gl+v|0,this._hl=this._hl+b|0,this._ah=this._ah+r+gh(this._al,f)|0,this._bh=this._bh+n+gh(this._bl,d)|0,this._ch=this._ch+i+gh(this._cl,l)|0,this._dh=this._dh+o+gh(this._dl,h)|0,this._eh=this._eh+a+gh(this._el,p)|0,this._fh=this._fh+s+gh(this._fl,m)|0,this._gh=this._gh+c+gh(this._gl,v)|0,this._hh=this._hh+u+gh(this._hl,b)|0},uh.prototype._hash=function(){var e=ah.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e};var yh=uh,_h=Ti,wh=yh,xh=vl,Eh=Ie.Buffer,Sh=new Array(160);function Th(){this.init(),this._w=Sh,xh.call(this,128,112)}_h(Th,wh),Th.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},Th.prototype._hash=function(){var e=Eh.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e};var Ah=Th,Rh=hl.exports=function(e){e=e.toLowerCase();var t=Rh[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};Rh.sha=Al,Rh.sha1=Dl,Rh.sha224=nh,Rh.sha256=Ql,Rh.sha384=Ah,Rh.sha512=yh;var Mh=hl.exports,Ih=Ie.Buffer,Oh=function(e,t,r){if(Ih.isBuffer(e))return e;if("string"===typeof e)return Ih.from(e,t);if(ArrayBuffer.isView(e))return Ih.from(e.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")},Ch=Xd,Ph=ll,Nh=Mh,kh=Ie.Buffer,Uh=Wd,Bh=Yd,Dh=Oh,Lh=kh.alloc(128),Fh={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function jh(e,t,r){var n=zh(e),i="sha512"===e||"sha384"===e?128:64;t.length>i?t=n(t):t.length<i&&(t=kh.concat([t,Lh],i));for(var o=kh.allocUnsafe(i+Fh[e]),a=kh.allocUnsafe(i+Fh[e]),s=0;s<i;s++)o[s]=54^t[s],a[s]=92^t[s];var c=kh.allocUnsafe(i+r+4);o.copy(c,0,0,i),this.ipad1=c,this.ipad2=o,this.opad=a,this.alg=e,this.blocksize=i,this.hash=n,this.size=Fh[e]}function zh(e){function t(t){return Nh(e).update(t).digest()}function r(e){return(new Ph).update(e).digest()}return"rmd160"===e||"ripemd160"===e?r:"md5"===e?Ch:t}function Hh(e,t,r,n,i){Uh(r,n);var o=new jh(i=i||"sha1",e=Dh(e,Bh,"Password"),(t=Dh(t,Bh,"Salt")).length),a=kh.allocUnsafe(n),s=kh.allocUnsafe(t.length+4);t.copy(s,0,0,t.length);for(var c=0,u=Fh[i],f=Math.ceil(n/u),d=1;d<=f;d++){s.writeUInt32BE(d,t.length);for(var l=o.run(s,o.ipad1),h=l,p=1;p<r;p++){h=o.run(h,o.ipad2);for(var m=0;m<u;m++)l[m]^=h[m]}l.copy(a,c),c+=u}return a}jh.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)};var qh,Gh,Wh=Hh,Yh=Ie.Buffer,Vh=Wd,Xh=Yd,Kh=Wh,Qh=Oh,Jh=t.crypto&&t.crypto.subtle,Zh={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},$h=[];function ep(e){if(t.process&&!t.process.browser)return Promise.resolve(!1);if(!Jh||!Jh.importKey||!Jh.deriveBits)return Promise.resolve(!1);if(void 0!==$h[e])return $h[e];var r=rp(qh=qh||Yh.alloc(8),qh,10,128,e).then((function(){return!0})).catch((function(){return!1}));return $h[e]=r,r}function tp(){return Gh||(Gh=t.process&&t.process.nextTick?t.process.nextTick:t.queueMicrotask?t.queueMicrotask:t.setImmediate?t.setImmediate:t.setTimeout)}function rp(e,t,r,n,i){return Jh.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return Jh.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)})).then((function(e){return Yh.from(e)}))}function np(e,t){e.then((function(e){tp()((function(){t(null,e)}))}),(function(e){tp()((function(){t(e)}))}))}var ip=function(e,r,n,i,o,a){"function"===typeof o&&(a=o,o=void 0);var s=Zh[(o=o||"sha1").toLowerCase()];if(s&&"function"===typeof t.Promise){if(Vh(n,i),e=Qh(e,Xh,"Password"),r=Qh(r,Xh,"Salt"),"function"!==typeof a)throw new Error("No callback provided to pbkdf2");np(ep(s).then((function(t){return t?rp(e,r,n,i,s):Kh(e,r,n,i,o)})),a)}else tp()((function(){var t;try{t=Kh(e,r,n,i,o)}catch(ap){return a(ap)}a(null,t)}))},op=Wh;e.Buffer=A,e.createCipher=gs,e.createCipheriv=ys,e.createDecipher=_s,e.createDecipheriv=ws,e.createECDH=qd,e.pbkdf2=ip,e.pbkdf2Sync=op}(t)},9778:(e,t,r)=>{"use strict";const n=r(2009),i=r(4038),o="function"===typeof Symbol&&"function"===typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=c,t.h2=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(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 d(e)}return u(e,t,r)}function u(e,t,r){if("string"===typeof e)return function(e,t){"string"===typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=s(r);const i=n.write(e,t);i!==r&&(n=n.slice(0,i));return n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(K(e,Uint8Array)){const t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return l(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(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer))return h(e,t,r);if("undefined"!==typeof SharedArrayBuffer&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return h(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 c.from(n,t,r);const i=function(e){if(c.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}if(void 0!==e.length)return"number"!==typeof e.length||Q(e.length)?s(0):l(e);if("Buffer"===e.type&&Array.isArray(e.data))return l(e.data)}(e);if(i)return i;if("undefined"!==typeof Symbol&&null!=Symbol.toPrimitive&&"function"===typeof e[Symbol.toPrimitive])return c.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 f(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 d(e){return f(e),s(e<0?0:0|p(e))}function l(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 h(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,c.prototype),n}function p(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(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 Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(e).length;default:if(i)return n?-1:Y(e).length;t=(""+t).toLowerCase(),i=!0}}function v(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 O(this,t,r);case"utf8":case"utf-8":return A(this,t,r);case"ascii":return M(this,t,r);case"latin1":case"binary":return I(this,t,r);case"base64":return T(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(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 g(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),Q(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=c.from(t,n)),c.isBuffer(t))return 0===t.length?-1:y(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):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){let o,a=1,s=e.length,c=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;a=2,s/=2,c/=2,r/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;o<s;o++)if(u(e,o)===u(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===c)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(r+c>s&&(r=s-c),o=r;o>=0;o--){let r=!0;for(let n=0;n<c;n++)if(u(e,o+n)!==u(t,n)){r=!1;break}if(r)return o}return-1}function _(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(Q(n))return a;e[r+a]=n}return a}function w(e,t,r,n){return X(Y(t,e.length-r),e,r,n)}function x(e,t,r,n){return X(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 E(e,t,r,n){return X(V(t),e,r,n)}function S(e,t,r,n){return X(function(e,t){let r,n,i;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function T(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function A(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,c;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128===(192&r)&&(c=(31&t)<<6|63&r,c>127&&(o=c));break;case 3:r=e[i+1],n=e[i+2],128===(192&r)&&128===(192&n)&&(c=(15&t)<<12|(63&r)<<6|63&n,c>2047&&(c<55296||c>57343)&&(o=c));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128===(192&r)&&128===(192&n)&&128===(192&s)&&(c=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,c>65535&&c<1114112&&(o=c))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=R));return r}(n)}c.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}}(),c.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(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,r){return u(e,t,r)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,r){return function(e,t,r){return f(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)},c.allocUnsafe=function(e){return d(e)},c.allocUnsafeSlow=function(e){return d(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(K(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),K(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.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,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},c.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}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=c.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(K(t,Uint8Array))i+t.length>n.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},c.byteLength=m,c.prototype._isBuffer=!0,c.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},c.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},c.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},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?A(this,0,e):v.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const r=t.h2;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(c.prototype[o]=c.prototype.inspect),c.prototype.compare=function(e,t,r,n,i){if(K(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.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 o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),u=this.slice(n,i),f=e.slice(t,r);for(let c=0;c<s;++c)if(u[c]!==f[c]){o=u[c],a=f[c];break}return o<a?-1:a<o?1:0},c.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},c.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},c.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},c.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 o=!1;for(;;)switch(n){case"hex":return _(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 E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const R=4096;function M(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 O(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let o=t;o<r;++o)i+=J[e[o]];return i}function C(e,t,r){const n=e.slice(t,r);let i="";for(let o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+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 N(e,t,r,n,i,o){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function k(e,t,r,n,i){H(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function U(e,t,r,n,i){H(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function B(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function D(e,t,r,n,o){return t=+t,r>>>=0,o||B(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,o){return t=+t,r>>>=0,o||B(e,0,r,8),i.write(e,t,r,n,52,8),r+8}c.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,c.prototype),n},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||P(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.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]},c.prototype.readUint32BE=c.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])},c.prototype.readBigUInt64LE=Z((function(e){q(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))})),c.prototype.readBigUInt64BE=Z((function(e){q(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)})),c.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},c.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||P(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},c.prototype.readInt8=function(e,t){return e>>>=0,t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||P(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},c.prototype.readInt16BE=function(e,t){e>>>=0,t||P(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},c.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},c.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]},c.prototype.readBigInt64LE=Z((function(e){q(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)})),c.prototype.readBigInt64BE=Z((function(e){q(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)})),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||P(e,4,this.length),i.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||P(e,8,this.length),i.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){N(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){N(this,e,t,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(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},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(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},c.prototype.writeBigUInt64LE=Z((function(e){return k(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Z((function(e){return U(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},c.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},c.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(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},c.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(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},c.prototype.writeBigInt64LE=Z((function(e){return k(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Z((function(e){return U(this,e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,r){return D(this,e,t,!0,r)},c.prototype.writeFloatBE=function(e,t,r){return D(this,e,t,!1,r)},c.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},c.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},c.prototype.copy=function(e,t,r,n){if(!c.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},c.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&&!c.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 o=c.isBuffer(e)?e:c.from(e,n),a=o.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%a]}return this};const F={};function j(e,t,r){F[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name="".concat(this.name," [").concat(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"".concat(this.name," [").concat(e,"]: ").concat(this.message)}}}function z(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t="_".concat(e.slice(r-3,r)).concat(t);return"".concat(e.slice(0,r)).concat(t)}function H(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"===typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?">= 0".concat(n," and < 2").concat(n," ** ").concat(8*(o+1)).concat(n):">= -(2".concat(n," ** ").concat(8*(o+1)-1).concat(n,") and < 2 ** ")+"".concat(8*(o+1)-1).concat(n):">= ".concat(t).concat(n," and <= ").concat(r).concat(n),new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){q(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||G(t,e.length-(r+1))}(n,i,o)}function q(e,t){if("number"!==typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function G(e,t,r){if(Math.floor(e)!==e)throw q(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",">= ".concat(r?1:0," and <= ").concat(t),e)}j("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?"".concat(e," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"}),RangeError),j("ERR_INVALID_ARG_TYPE",(function(e,t){return'The "'.concat(e,'" argument must be of type number. Received type ').concat(typeof t)}),TypeError),j("ERR_OUT_OF_RANGE",(function(e,t,r){let n='The value of "'.concat(e,'" is out of range.'),i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=z(String(r)):"bigint"===typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=z(i)),i+="n"),n+=" It must be ".concat(t,". Received ").concat(i),n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function Y(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function V(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 X(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 K(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!==e}const J=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 Z(e){return"undefined"===typeof BigInt?$:e}function $(){throw new Error("BigInt not supported")}},4038:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,c=(1<<s)-1,u=c>>1,f=-7,d=r?i-1:0,l=r?-1:1,h=e[t+d];for(d+=l,o=h&(1<<-f)-1,h>>=-f,f+=s;f>0;o=256*o+e[t+d],d+=l,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+e[t+d],d+=l,f-=8);if(0===o)o=1-u;else{if(o===c)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),o-=u}return(h?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,c,u=8*o-i-1,f=(1<<u)-1,d=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:o-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,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?l/c:l*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=f?(s=0,a=f):a+d>=1?(s=(t*c-1)*Math.pow(2,i),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),a=0));i>=8;e[r+h]=255&s,h+=p,s/=256,i-=8);for(a=a<<i|s,u+=i;u>0;e[r+h]=255&a,h+=p,a/=256,u-=8);e[r+h-p]|=128*m}},763:function(e,t,r){var n;e=r.nmd(e),function(){var i,o="Expected a function",a="__lodash_hash_undefined__",s="__lodash_placeholder__",c=16,u=32,f=64,d=128,l=256,h=1/0,p=9007199254740991,m=NaN,v=4294967295,b=[["ary",d],["bind",1],["bindKey",2],["curry",8],["curryRight",c],["flip",512],["partial",u],["partialRight",f],["rearg",l]],g="[object Arguments]",y="[object Array]",_="[object Boolean]",w="[object Date]",x="[object Error]",E="[object Function]",S="[object GeneratorFunction]",T="[object Map]",A="[object Number]",R="[object Object]",M="[object Promise]",I="[object RegExp]",O="[object Set]",C="[object String]",P="[object Symbol]",N="[object WeakMap]",k="[object ArrayBuffer]",U="[object DataView]",B="[object Float32Array]",D="[object Float64Array]",L="[object Int8Array]",F="[object Int16Array]",j="[object Int32Array]",z="[object Uint8Array]",H="[object Uint8ClampedArray]",q="[object Uint16Array]",G="[object Uint32Array]",W=/\b__p \+= '';/g,Y=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,X=/&(?:amp|lt|gt|quot|#39);/g,K=/[&<>"']/g,Q=RegExp(X.source),J=RegExp(K.source),Z=/<%-([\s\S]+?)%>/g,$=/<%([\s\S]+?)%>/g,ee=/<%=([\s\S]+?)%>/g,te=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,re=/^\w*$/,ne=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ie=/[\\^$.*+?()[\]{}|]/g,oe=RegExp(ie.source),ae=/^\s+/,se=/\s/,ce=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ue=/\{\n\/\* \[wrapped with (.+)\] \*/,fe=/,? & /,de=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,le=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,pe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,me=/\w*$/,ve=/^[-+]0x[0-9a-f]+$/i,be=/^0b[01]+$/i,ge=/^\[object .+?Constructor\]$/,ye=/^0o[0-7]+$/i,_e=/^(?:0|[1-9]\d*)$/,we=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xe=/($^)/,Ee=/['\n\r\u2028\u2029\\]/g,Se="\\ud800-\\udfff",Te="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ae="\\u2700-\\u27bf",Re="a-z\\xdf-\\xf6\\xf8-\\xff",Me="A-Z\\xc0-\\xd6\\xd8-\\xde",Ie="\\ufe0e\\ufe0f",Oe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ce="['\u2019]",Pe="["+Se+"]",Ne="["+Oe+"]",ke="["+Te+"]",Ue="\\d+",Be="["+Ae+"]",De="["+Re+"]",Le="[^"+Se+Oe+Ue+Ae+Re+Me+"]",Fe="\\ud83c[\\udffb-\\udfff]",je="[^"+Se+"]",ze="(?:\\ud83c[\\udde6-\\uddff]){2}",He="[\\ud800-\\udbff][\\udc00-\\udfff]",qe="["+Me+"]",Ge="\\u200d",We="(?:"+De+"|"+Le+")",Ye="(?:"+qe+"|"+Le+")",Ve="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",Xe="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ke="(?:"+ke+"|"+Fe+")"+"?",Qe="["+Ie+"]?",Je=Qe+Ke+("(?:"+Ge+"(?:"+[je,ze,He].join("|")+")"+Qe+Ke+")*"),Ze="(?:"+[Be,ze,He].join("|")+")"+Je,$e="(?:"+[je+ke+"?",ke,ze,He,Pe].join("|")+")",et=RegExp(Ce,"g"),tt=RegExp(ke,"g"),rt=RegExp(Fe+"(?="+Fe+")|"+$e+Je,"g"),nt=RegExp([qe+"?"+De+"+"+Ve+"(?="+[Ne,qe,"$"].join("|")+")",Ye+"+"+Xe+"(?="+[Ne,qe+We,"$"].join("|")+")",qe+"?"+We+"+"+Ve,qe+"+"+Xe,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ue,Ze].join("|"),"g"),it=RegExp("["+Ge+Se+Te+Ie+"]"),ot=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,at=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],st=-1,ct={};ct[B]=ct[D]=ct[L]=ct[F]=ct[j]=ct[z]=ct[H]=ct[q]=ct[G]=!0,ct[g]=ct[y]=ct[k]=ct[_]=ct[U]=ct[w]=ct[x]=ct[E]=ct[T]=ct[A]=ct[R]=ct[I]=ct[O]=ct[C]=ct[N]=!1;var ut={};ut[g]=ut[y]=ut[k]=ut[U]=ut[_]=ut[w]=ut[B]=ut[D]=ut[L]=ut[F]=ut[j]=ut[T]=ut[A]=ut[R]=ut[I]=ut[O]=ut[C]=ut[P]=ut[z]=ut[H]=ut[q]=ut[G]=!0,ut[x]=ut[E]=ut[N]=!1;var ft={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},dt=parseFloat,lt=parseInt,ht="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,pt="object"==typeof self&&self&&self.Object===Object&&self,mt=ht||pt||Function("return this")(),vt=t&&!t.nodeType&&t,bt=vt&&e&&!e.nodeType&&e,gt=bt&&bt.exports===vt,yt=gt&&ht.process,_t=function(){try{var e=bt&&bt.require&&bt.require("util").types;return e||yt&&yt.binding&&yt.binding("util")}catch(t){}}(),wt=_t&&_t.isArrayBuffer,xt=_t&&_t.isDate,Et=_t&&_t.isMap,St=_t&&_t.isRegExp,Tt=_t&&_t.isSet,At=_t&&_t.isTypedArray;function Rt(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Mt(e,t,r,n){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(n,a,r(a),e)}return n}function It(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}function Ot(e,t){for(var r=null==e?0:e.length;r--&&!1!==t(e[r],r,e););return e}function Ct(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}function Pt(e,t){for(var r=-1,n=null==e?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}function Nt(e,t){return!!(null==e?0:e.length)&&qt(e,t,0)>-1}function kt(e,t,r){for(var n=-1,i=null==e?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}function Ut(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}function Bt(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}function Dt(e,t,r,n){var i=-1,o=null==e?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}function Lt(e,t,r,n){var i=null==e?0:e.length;for(n&&i&&(r=e[--i]);i--;)r=t(r,e[i],i,e);return r}function Ft(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var jt=Vt("length");function zt(e,t,r){var n;return r(e,(function(e,r,i){if(t(e,r,i))return n=r,!1})),n}function Ht(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function qt(e,t,r){return t===t?function(e,t,r){var n=r-1,i=e.length;for(;++n<i;)if(e[n]===t)return n;return-1}(e,t,r):Ht(e,Wt,r)}function Gt(e,t,r,n){for(var i=r-1,o=e.length;++i<o;)if(n(e[i],t))return i;return-1}function Wt(e){return e!==e}function Yt(e,t){var r=null==e?0:e.length;return r?Qt(e,t)/r:m}function Vt(e){return function(t){return null==t?i:t[e]}}function Xt(e){return function(t){return null==e?i:e[t]}}function Kt(e,t,r,n,i){return i(e,(function(e,i,o){r=n?(n=!1,e):t(r,e,i,o)})),r}function Qt(e,t){for(var r,n=-1,o=e.length;++n<o;){var a=t(e[n]);a!==i&&(r=r===i?a:r+a)}return r}function Jt(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}function Zt(e){return e?e.slice(0,mr(e)+1).replace(ae,""):e}function $t(e){return function(t){return e(t)}}function er(e,t){return Ut(t,(function(t){return e[t]}))}function tr(e,t){return e.has(t)}function rr(e,t){for(var r=-1,n=e.length;++r<n&&qt(t,e[r],0)>-1;);return r}function nr(e,t){for(var r=e.length;r--&&qt(t,e[r],0)>-1;);return r}var ir=Xt({"\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xc7":"C","\xe7":"c","\xd0":"D","\xf0":"d","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xd1":"N","\xf1":"n","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xdd":"Y","\xfd":"y","\xff":"y","\xc6":"Ae","\xe6":"ae","\xde":"Th","\xfe":"th","\xdf":"ss","\u0100":"A","\u0102":"A","\u0104":"A","\u0101":"a","\u0103":"a","\u0105":"a","\u0106":"C","\u0108":"C","\u010a":"C","\u010c":"C","\u0107":"c","\u0109":"c","\u010b":"c","\u010d":"c","\u010e":"D","\u0110":"D","\u010f":"d","\u0111":"d","\u0112":"E","\u0114":"E","\u0116":"E","\u0118":"E","\u011a":"E","\u0113":"e","\u0115":"e","\u0117":"e","\u0119":"e","\u011b":"e","\u011c":"G","\u011e":"G","\u0120":"G","\u0122":"G","\u011d":"g","\u011f":"g","\u0121":"g","\u0123":"g","\u0124":"H","\u0126":"H","\u0125":"h","\u0127":"h","\u0128":"I","\u012a":"I","\u012c":"I","\u012e":"I","\u0130":"I","\u0129":"i","\u012b":"i","\u012d":"i","\u012f":"i","\u0131":"i","\u0134":"J","\u0135":"j","\u0136":"K","\u0137":"k","\u0138":"k","\u0139":"L","\u013b":"L","\u013d":"L","\u013f":"L","\u0141":"L","\u013a":"l","\u013c":"l","\u013e":"l","\u0140":"l","\u0142":"l","\u0143":"N","\u0145":"N","\u0147":"N","\u014a":"N","\u0144":"n","\u0146":"n","\u0148":"n","\u014b":"n","\u014c":"O","\u014e":"O","\u0150":"O","\u014d":"o","\u014f":"o","\u0151":"o","\u0154":"R","\u0156":"R","\u0158":"R","\u0155":"r","\u0157":"r","\u0159":"r","\u015a":"S","\u015c":"S","\u015e":"S","\u0160":"S","\u015b":"s","\u015d":"s","\u015f":"s","\u0161":"s","\u0162":"T","\u0164":"T","\u0166":"T","\u0163":"t","\u0165":"t","\u0167":"t","\u0168":"U","\u016a":"U","\u016c":"U","\u016e":"U","\u0170":"U","\u0172":"U","\u0169":"u","\u016b":"u","\u016d":"u","\u016f":"u","\u0171":"u","\u0173":"u","\u0174":"W","\u0175":"w","\u0176":"Y","\u0177":"y","\u0178":"Y","\u0179":"Z","\u017b":"Z","\u017d":"Z","\u017a":"z","\u017c":"z","\u017e":"z","\u0132":"IJ","\u0133":"ij","\u0152":"Oe","\u0153":"oe","\u0149":"'n","\u017f":"s"}),or=Xt({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function ar(e){return"\\"+ft[e]}function sr(e){return it.test(e)}function cr(e){var t=-1,r=Array(e.size);return e.forEach((function(e,n){r[++t]=[n,e]})),r}function ur(e,t){return function(r){return e(t(r))}}function fr(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r];a!==t&&a!==s||(e[r]=s,o[i++]=r)}return o}function dr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=e})),r}function lr(e){var t=-1,r=Array(e.size);return e.forEach((function(e){r[++t]=[e,e]})),r}function hr(e){return sr(e)?function(e){var t=rt.lastIndex=0;for(;rt.test(e);)++t;return t}(e):jt(e)}function pr(e){return sr(e)?function(e){return e.match(rt)||[]}(e):function(e){return e.split("")}(e)}function mr(e){for(var t=e.length;t--&&se.test(e.charAt(t)););return t}var vr=Xt({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var br=function e(t){var r=(t=null==t?mt:br.defaults(mt.Object(),t,br.pick(mt,at))).Array,n=t.Date,se=t.Error,Se=t.Function,Te=t.Math,Ae=t.Object,Re=t.RegExp,Me=t.String,Ie=t.TypeError,Oe=r.prototype,Ce=Se.prototype,Pe=Ae.prototype,Ne=t["__core-js_shared__"],ke=Ce.toString,Ue=Pe.hasOwnProperty,Be=0,De=function(){var e=/[^.]+$/.exec(Ne&&Ne.keys&&Ne.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),Le=Pe.toString,Fe=ke.call(Ae),je=mt._,ze=Re("^"+ke.call(Ue).replace(ie,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),He=gt?t.Buffer:i,qe=t.Symbol,Ge=t.Uint8Array,We=He?He.allocUnsafe:i,Ye=ur(Ae.getPrototypeOf,Ae),Ve=Ae.create,Xe=Pe.propertyIsEnumerable,Ke=Oe.splice,Qe=qe?qe.isConcatSpreadable:i,Je=qe?qe.iterator:i,Ze=qe?qe.toStringTag:i,$e=function(){try{var e=lo(Ae,"defineProperty");return e({},"",{}),e}catch(t){}}(),rt=t.clearTimeout!==mt.clearTimeout&&t.clearTimeout,it=n&&n.now!==mt.Date.now&&n.now,ft=t.setTimeout!==mt.setTimeout&&t.setTimeout,ht=Te.ceil,pt=Te.floor,vt=Ae.getOwnPropertySymbols,bt=He?He.isBuffer:i,yt=t.isFinite,_t=Oe.join,jt=ur(Ae.keys,Ae),Xt=Te.max,gr=Te.min,yr=n.now,_r=t.parseInt,wr=Te.random,xr=Oe.reverse,Er=lo(t,"DataView"),Sr=lo(t,"Map"),Tr=lo(t,"Promise"),Ar=lo(t,"Set"),Rr=lo(t,"WeakMap"),Mr=lo(Ae,"create"),Ir=Rr&&new Rr,Or={},Cr=Lo(Er),Pr=Lo(Sr),Nr=Lo(Tr),kr=Lo(Ar),Ur=Lo(Rr),Br=qe?qe.prototype:i,Dr=Br?Br.valueOf:i,Lr=Br?Br.toString:i;function Fr(e){if(ts(e)&&!Ga(e)&&!(e instanceof qr)){if(e instanceof Hr)return e;if(Ue.call(e,"__wrapped__"))return Fo(e)}return new Hr(e)}var jr=function(){function e(){}return function(t){if(!es(t))return{};if(Ve)return Ve(t);e.prototype=t;var r=new e;return e.prototype=i,r}}();function zr(){}function Hr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=i}function qr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function Gr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Wr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Yr(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Vr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Yr;++t<r;)this.add(e[t])}function Xr(e){var t=this.__data__=new Wr(e);this.size=t.size}function Kr(e,t){var r=Ga(e),n=!r&&qa(e),i=!r&&!n&&Xa(e),o=!r&&!n&&!i&&us(e),a=r||n||i||o,s=a?Jt(e.length,Me):[],c=s.length;for(var u in e)!t&&!Ue.call(e,u)||a&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||yo(u,c))||s.push(u);return s}function Qr(e){var t=e.length;return t?e[Xn(0,t-1)]:i}function Jr(e,t){return Uo(Ii(e),sn(t,0,e.length))}function Zr(e){return Uo(Ii(e))}function $r(e,t,r){(r!==i&&!ja(e[t],r)||r===i&&!(t in e))&&on(e,t,r)}function en(e,t,r){var n=e[t];Ue.call(e,t)&&ja(n,r)&&(r!==i||t in e)||on(e,t,r)}function tn(e,t){for(var r=e.length;r--;)if(ja(e[r][0],t))return r;return-1}function rn(e,t,r,n){return ln(e,(function(e,i,o){t(n,e,r(e),o)})),n}function nn(e,t){return e&&Oi(t,Cs(t),e)}function on(e,t,r){"__proto__"==t&&$e?$e(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function an(e,t){for(var n=-1,o=t.length,a=r(o),s=null==e;++n<o;)a[n]=s?i:As(e,t[n]);return a}function sn(e,t,r){return e===e&&(r!==i&&(e=e<=r?e:r),t!==i&&(e=e>=t?e:t)),e}function cn(e,t,r,n,o,a){var s,c=1&t,u=2&t,f=4&t;if(r&&(s=o?r(e,n,o,a):r(e)),s!==i)return s;if(!es(e))return e;var d=Ga(e);if(d){if(s=function(e){var t=e.length,r=new e.constructor(t);t&&"string"==typeof e[0]&&Ue.call(e,"index")&&(r.index=e.index,r.input=e.input);return r}(e),!c)return Ii(e,s)}else{var l=mo(e),h=l==E||l==S;if(Xa(e))return Ei(e,c);if(l==R||l==g||h&&!o){if(s=u||h?{}:bo(e),!c)return u?function(e,t){return Oi(e,po(e),t)}(e,function(e,t){return e&&Oi(t,Ps(t),e)}(s,e)):function(e,t){return Oi(e,ho(e),t)}(e,nn(s,e))}else{if(!ut[l])return o?e:{};s=function(e,t,r){var n=e.constructor;switch(t){case k:return Si(e);case _:case w:return new n(+e);case U:return function(e,t){var r=t?Si(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}(e,r);case B:case D:case L:case F:case j:case z:case H:case q:case G:return Ti(e,r);case T:return new n;case A:case C:return new n(e);case I:return function(e){var t=new e.constructor(e.source,me.exec(e));return t.lastIndex=e.lastIndex,t}(e);case O:return new n;case P:return i=e,Dr?Ae(Dr.call(i)):{}}var i}(e,l,c)}}a||(a=new Xr);var p=a.get(e);if(p)return p;a.set(e,s),as(e)?e.forEach((function(n){s.add(cn(n,t,r,n,e,a))})):rs(e)&&e.forEach((function(n,i){s.set(i,cn(n,t,r,i,e,a))}));var m=d?i:(f?u?io:no:u?Ps:Cs)(e);return It(m||e,(function(n,i){m&&(n=e[i=n]),en(s,i,cn(n,t,r,i,e,a))})),s}function un(e,t,r){var n=r.length;if(null==e)return!n;for(e=Ae(e);n--;){var o=r[n],a=t[o],s=e[o];if(s===i&&!(o in e)||!a(s))return!1}return!0}function fn(e,t,r){if("function"!=typeof e)throw new Ie(o);return Co((function(){e.apply(i,r)}),t)}function dn(e,t,r,n){var i=-1,o=Nt,a=!0,s=e.length,c=[],u=t.length;if(!s)return c;r&&(t=Ut(t,$t(r))),n?(o=kt,a=!1):t.length>=200&&(o=tr,a=!1,t=new Vr(t));e:for(;++i<s;){var f=e[i],d=null==r?f:r(f);if(f=n||0!==f?f:0,a&&d===d){for(var l=u;l--;)if(t[l]===d)continue e;c.push(f)}else o(t,d,n)||c.push(f)}return c}Fr.templateSettings={escape:Z,evaluate:$,interpolate:ee,variable:"",imports:{_:Fr}},Fr.prototype=zr.prototype,Fr.prototype.constructor=Fr,Hr.prototype=jr(zr.prototype),Hr.prototype.constructor=Hr,qr.prototype=jr(zr.prototype),qr.prototype.constructor=qr,Gr.prototype.clear=function(){this.__data__=Mr?Mr(null):{},this.size=0},Gr.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Gr.prototype.get=function(e){var t=this.__data__;if(Mr){var r=t[e];return r===a?i:r}return Ue.call(t,e)?t[e]:i},Gr.prototype.has=function(e){var t=this.__data__;return Mr?t[e]!==i:Ue.call(t,e)},Gr.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Mr&&t===i?a:t,this},Wr.prototype.clear=function(){this.__data__=[],this.size=0},Wr.prototype.delete=function(e){var t=this.__data__,r=tn(t,e);return!(r<0)&&(r==t.length-1?t.pop():Ke.call(t,r,1),--this.size,!0)},Wr.prototype.get=function(e){var t=this.__data__,r=tn(t,e);return r<0?i:t[r][1]},Wr.prototype.has=function(e){return tn(this.__data__,e)>-1},Wr.prototype.set=function(e,t){var r=this.__data__,n=tn(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},Yr.prototype.clear=function(){this.size=0,this.__data__={hash:new Gr,map:new(Sr||Wr),string:new Gr}},Yr.prototype.delete=function(e){var t=uo(this,e).delete(e);return this.size-=t?1:0,t},Yr.prototype.get=function(e){return uo(this,e).get(e)},Yr.prototype.has=function(e){return uo(this,e).has(e)},Yr.prototype.set=function(e,t){var r=uo(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},Vr.prototype.add=Vr.prototype.push=function(e){return this.__data__.set(e,a),this},Vr.prototype.has=function(e){return this.__data__.has(e)},Xr.prototype.clear=function(){this.__data__=new Wr,this.size=0},Xr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},Xr.prototype.get=function(e){return this.__data__.get(e)},Xr.prototype.has=function(e){return this.__data__.has(e)},Xr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof Wr){var n=r.__data__;if(!Sr||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Yr(n)}return r.set(e,t),this.size=r.size,this};var ln=Ni(_n),hn=Ni(wn,!0);function pn(e,t){var r=!0;return ln(e,(function(e,n,i){return r=!!t(e,n,i)})),r}function mn(e,t,r){for(var n=-1,o=e.length;++n<o;){var a=e[n],s=t(a);if(null!=s&&(c===i?s===s&&!cs(s):r(s,c)))var c=s,u=a}return u}function vn(e,t){var r=[];return ln(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function bn(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=go),i||(i=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?bn(s,t-1,r,n,i):Bt(i,s):n||(i[i.length]=s)}return i}var gn=ki(),yn=ki(!0);function _n(e,t){return e&&gn(e,t,Cs)}function wn(e,t){return e&&yn(e,t,Cs)}function xn(e,t){return Pt(t,(function(t){return Ja(e[t])}))}function En(e,t){for(var r=0,n=(t=yi(t,e)).length;null!=e&&r<n;)e=e[Do(t[r++])];return r&&r==n?e:i}function Sn(e,t,r){var n=t(e);return Ga(e)?n:Bt(n,r(e))}function Tn(e){return null==e?e===i?"[object Undefined]":"[object Null]":Ze&&Ze in Ae(e)?function(e){var t=Ue.call(e,Ze),r=e[Ze];try{e[Ze]=i;var n=!0}catch(a){}var o=Le.call(e);n&&(t?e[Ze]=r:delete e[Ze]);return o}(e):function(e){return Le.call(e)}(e)}function An(e,t){return e>t}function Rn(e,t){return null!=e&&Ue.call(e,t)}function Mn(e,t){return null!=e&&t in Ae(e)}function In(e,t,n){for(var o=n?kt:Nt,a=e[0].length,s=e.length,c=s,u=r(s),f=1/0,d=[];c--;){var l=e[c];c&&t&&(l=Ut(l,$t(t))),f=gr(l.length,f),u[c]=!n&&(t||a>=120&&l.length>=120)?new Vr(c&&l):i}l=e[0];var h=-1,p=u[0];e:for(;++h<a&&d.length<f;){var m=l[h],v=t?t(m):m;if(m=n||0!==m?m:0,!(p?tr(p,v):o(d,v,n))){for(c=s;--c;){var b=u[c];if(!(b?tr(b,v):o(e[c],v,n)))continue e}p&&p.push(v),d.push(m)}}return d}function On(e,t,r){var n=null==(e=Mo(e,t=yi(t,e)))?e:e[Do(Qo(t))];return null==n?i:Rt(n,e,r)}function Cn(e){return ts(e)&&Tn(e)==g}function Pn(e,t,r,n,o){return e===t||(null==e||null==t||!ts(e)&&!ts(t)?e!==e&&t!==t:function(e,t,r,n,o,a){var s=Ga(e),c=Ga(t),u=s?y:mo(e),f=c?y:mo(t),d=(u=u==g?R:u)==R,l=(f=f==g?R:f)==R,h=u==f;if(h&&Xa(e)){if(!Xa(t))return!1;s=!0,d=!1}if(h&&!d)return a||(a=new Xr),s||us(e)?to(e,t,r,n,o,a):function(e,t,r,n,i,o,a){switch(r){case U:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!o(new Ge(e),new Ge(t)));case _:case w:case A:return ja(+e,+t);case x:return e.name==t.name&&e.message==t.message;case I:case C:return e==t+"";case T:var s=cr;case O:var c=1&n;if(s||(s=dr),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;n|=2,a.set(e,t);var f=to(s(e),s(t),n,i,o,a);return a.delete(e),f;case P:if(Dr)return Dr.call(e)==Dr.call(t)}return!1}(e,t,u,r,n,o,a);if(!(1&r)){var p=d&&Ue.call(e,"__wrapped__"),m=l&&Ue.call(t,"__wrapped__");if(p||m){var v=p?e.value():e,b=m?t.value():t;return a||(a=new Xr),o(v,b,r,n,a)}}if(!h)return!1;return a||(a=new Xr),function(e,t,r,n,o,a){var s=1&r,c=no(e),u=c.length,f=no(t),d=f.length;if(u!=d&&!s)return!1;var l=u;for(;l--;){var h=c[l];if(!(s?h in t:Ue.call(t,h)))return!1}var p=a.get(e),m=a.get(t);if(p&&m)return p==t&&m==e;var v=!0;a.set(e,t),a.set(t,e);var b=s;for(;++l<u;){var g=e[h=c[l]],y=t[h];if(n)var _=s?n(y,g,h,t,e,a):n(g,y,h,e,t,a);if(!(_===i?g===y||o(g,y,r,n,a):_)){v=!1;break}b||(b="constructor"==h)}if(v&&!b){var w=e.constructor,x=t.constructor;w==x||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof x&&x instanceof x||(v=!1)}return a.delete(e),a.delete(t),v}(e,t,r,n,o,a)}(e,t,r,n,Pn,o))}function Nn(e,t,r,n){var o=r.length,a=o,s=!n;if(null==e)return!a;for(e=Ae(e);o--;){var c=r[o];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++o<a;){var u=(c=r[o])[0],f=e[u],d=c[1];if(s&&c[2]){if(f===i&&!(u in e))return!1}else{var l=new Xr;if(n)var h=n(f,d,u,e,t,l);if(!(h===i?Pn(d,f,3,n,l):h))return!1}}return!0}function kn(e){return!(!es(e)||(t=e,De&&De in t))&&(Ja(e)?ze:ge).test(Lo(e));var t}function Un(e){return"function"==typeof e?e:null==e?nc:"object"==typeof e?Ga(e)?zn(e[0],e[1]):jn(e):lc(e)}function Bn(e){if(!So(e))return jt(e);var t=[];for(var r in Ae(e))Ue.call(e,r)&&"constructor"!=r&&t.push(r);return t}function Dn(e){if(!es(e))return function(e){var t=[];if(null!=e)for(var r in Ae(e))t.push(r);return t}(e);var t=So(e),r=[];for(var n in e)("constructor"!=n||!t&&Ue.call(e,n))&&r.push(n);return r}function Ln(e,t){return e<t}function Fn(e,t){var n=-1,i=Ya(e)?r(e.length):[];return ln(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}function jn(e){var t=fo(e);return 1==t.length&&t[0][2]?Ao(t[0][0],t[0][1]):function(r){return r===e||Nn(r,e,t)}}function zn(e,t){return wo(e)&&To(t)?Ao(Do(e),t):function(r){var n=As(r,e);return n===i&&n===t?Rs(r,e):Pn(t,n,3)}}function Hn(e,t,r,n,o){e!==t&&gn(t,(function(a,s){if(o||(o=new Xr),es(a))!function(e,t,r,n,o,a,s){var c=Io(e,r),u=Io(t,r),f=s.get(u);if(f)return void $r(e,r,f);var d=a?a(c,u,r+"",e,t,s):i,l=d===i;if(l){var h=Ga(u),p=!h&&Xa(u),m=!h&&!p&&us(u);d=u,h||p||m?Ga(c)?d=c:Va(c)?d=Ii(c):p?(l=!1,d=Ei(u,!0)):m?(l=!1,d=Ti(u,!0)):d=[]:is(u)||qa(u)?(d=c,qa(c)?d=bs(c):es(c)&&!Ja(c)||(d=bo(u))):l=!1}l&&(s.set(u,d),o(d,u,n,a,s),s.delete(u));$r(e,r,d)}(e,t,s,r,Hn,n,o);else{var c=n?n(Io(e,s),a,s+"",e,t,o):i;c===i&&(c=a),$r(e,s,c)}}),Ps)}function qn(e,t){var r=e.length;if(r)return yo(t+=t<0?r:0,r)?e[t]:i}function Gn(e,t,r){t=t.length?Ut(t,(function(e){return Ga(e)?function(t){return En(t,1===e.length?e[0]:e)}:e})):[nc];var n=-1;t=Ut(t,$t(co()));var i=Fn(e,(function(e,r,i){var o=Ut(t,(function(t){return t(e)}));return{criteria:o,index:++n,value:e}}));return function(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}(i,(function(e,t){return function(e,t,r){var n=-1,i=e.criteria,o=t.criteria,a=i.length,s=r.length;for(;++n<a;){var c=Ai(i[n],o[n]);if(c)return n>=s?c:c*("desc"==r[n]?-1:1)}return e.index-t.index}(e,t,r)}))}function Wn(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var a=t[n],s=En(e,a);r(s,a)&&$n(o,yi(a,e),s)}return o}function Yn(e,t,r,n){var i=n?Gt:qt,o=-1,a=t.length,s=e;for(e===t&&(t=Ii(t)),r&&(s=Ut(e,$t(r)));++o<a;)for(var c=0,u=t[o],f=r?r(u):u;(c=i(s,f,c,n))>-1;)s!==e&&Ke.call(s,c,1),Ke.call(e,c,1);return e}function Vn(e,t){for(var r=e?t.length:0,n=r-1;r--;){var i=t[r];if(r==n||i!==o){var o=i;yo(i)?Ke.call(e,i,1):di(e,i)}}return e}function Xn(e,t){return e+pt(wr()*(t-e+1))}function Kn(e,t){var r="";if(!e||t<1||t>p)return r;do{t%2&&(r+=e),(t=pt(t/2))&&(e+=e)}while(t);return r}function Qn(e,t){return Po(Ro(e,t,nc),e+"")}function Jn(e){return Qr(js(e))}function Zn(e,t){var r=js(e);return Uo(r,sn(t,0,r.length))}function $n(e,t,r,n){if(!es(e))return e;for(var o=-1,a=(t=yi(t,e)).length,s=a-1,c=e;null!=c&&++o<a;){var u=Do(t[o]),f=r;if("__proto__"===u||"constructor"===u||"prototype"===u)return e;if(o!=s){var d=c[u];(f=n?n(d,u,c):i)===i&&(f=es(d)?d:yo(t[o+1])?[]:{})}en(c,u,f),c=c[u]}return e}var ei=Ir?function(e,t){return Ir.set(e,t),e}:nc,ti=$e?function(e,t){return $e(e,"toString",{configurable:!0,enumerable:!1,value:ec(t),writable:!0})}:nc;function ri(e){return Uo(js(e))}function ni(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=r(o);++i<o;)a[i]=e[i+t];return a}function ii(e,t){var r;return ln(e,(function(e,n,i){return!(r=t(e,n,i))})),!!r}function oi(e,t,r){var n=0,i=null==e?n:e.length;if("number"==typeof t&&t===t&&i<=2147483647){for(;n<i;){var o=n+i>>>1,a=e[o];null!==a&&!cs(a)&&(r?a<=t:a<t)?n=o+1:i=o}return i}return ai(e,t,nc,r)}function ai(e,t,r,n){var o=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=r(t))!==t,c=null===t,u=cs(t),f=t===i;o<a;){var d=pt((o+a)/2),l=r(e[d]),h=l!==i,p=null===l,m=l===l,v=cs(l);if(s)var b=n||m;else b=f?m&&(n||h):c?m&&h&&(n||!p):u?m&&h&&!p&&(n||!v):!p&&!v&&(n?l<=t:l<t);b?o=d+1:a=d}return gr(a,4294967294)}function si(e,t){for(var r=-1,n=e.length,i=0,o=[];++r<n;){var a=e[r],s=t?t(a):a;if(!r||!ja(s,c)){var c=s;o[i++]=0===a?0:a}}return o}function ci(e){return"number"==typeof e?e:cs(e)?m:+e}function ui(e){if("string"==typeof e)return e;if(Ga(e))return Ut(e,ui)+"";if(cs(e))return Lr?Lr.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function fi(e,t,r){var n=-1,i=Nt,o=e.length,a=!0,s=[],c=s;if(r)a=!1,i=kt;else if(o>=200){var u=t?null:Ki(e);if(u)return dr(u);a=!1,i=tr,c=new Vr}else c=t?[]:s;e:for(;++n<o;){var f=e[n],d=t?t(f):f;if(f=r||0!==f?f:0,a&&d===d){for(var l=c.length;l--;)if(c[l]===d)continue e;t&&c.push(d),s.push(f)}else i(c,d,r)||(c!==s&&c.push(d),s.push(f))}return s}function di(e,t){return null==(e=Mo(e,t=yi(t,e)))||delete e[Do(Qo(t))]}function li(e,t,r,n){return $n(e,t,r(En(e,t)),n)}function hi(e,t,r,n){for(var i=e.length,o=n?i:-1;(n?o--:++o<i)&&t(e[o],o,e););return r?ni(e,n?0:o,n?o+1:i):ni(e,n?o+1:0,n?i:o)}function pi(e,t){var r=e;return r instanceof qr&&(r=r.value()),Dt(t,(function(e,t){return t.func.apply(t.thisArg,Bt([e],t.args))}),r)}function mi(e,t,n){var i=e.length;if(i<2)return i?fi(e[0]):[];for(var o=-1,a=r(i);++o<i;)for(var s=e[o],c=-1;++c<i;)c!=o&&(a[o]=dn(a[o]||s,e[c],t,n));return fi(bn(a,1),t,n)}function vi(e,t,r){for(var n=-1,o=e.length,a=t.length,s={};++n<o;){var c=n<a?t[n]:i;r(s,e[n],c)}return s}function bi(e){return Va(e)?e:[]}function gi(e){return"function"==typeof e?e:nc}function yi(e,t){return Ga(e)?e:wo(e,t)?[e]:Bo(gs(e))}var _i=Qn;function wi(e,t,r){var n=e.length;return r=r===i?n:r,!t&&r>=n?e:ni(e,t,r)}var xi=rt||function(e){return mt.clearTimeout(e)};function Ei(e,t){if(t)return e.slice();var r=e.length,n=We?We(r):new e.constructor(r);return e.copy(n),n}function Si(e){var t=new e.constructor(e.byteLength);return new Ge(t).set(new Ge(e)),t}function Ti(e,t){var r=t?Si(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Ai(e,t){if(e!==t){var r=e!==i,n=null===e,o=e===e,a=cs(e),s=t!==i,c=null===t,u=t===t,f=cs(t);if(!c&&!f&&!a&&e>t||a&&s&&u&&!c&&!f||n&&s&&u||!r&&u||!o)return 1;if(!n&&!a&&!f&&e<t||f&&r&&o&&!n&&!a||c&&r&&o||!s&&o||!u)return-1}return 0}function Ri(e,t,n,i){for(var o=-1,a=e.length,s=n.length,c=-1,u=t.length,f=Xt(a-s,0),d=r(u+f),l=!i;++c<u;)d[c]=t[c];for(;++o<s;)(l||o<a)&&(d[n[o]]=e[o]);for(;f--;)d[c++]=e[o++];return d}function Mi(e,t,n,i){for(var o=-1,a=e.length,s=-1,c=n.length,u=-1,f=t.length,d=Xt(a-c,0),l=r(d+f),h=!i;++o<d;)l[o]=e[o];for(var p=o;++u<f;)l[p+u]=t[u];for(;++s<c;)(h||o<a)&&(l[p+n[s]]=e[o++]);return l}function Ii(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function Oi(e,t,r,n){var o=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var c=t[a],u=n?n(r[c],e[c],c,r,e):i;u===i&&(u=e[c]),o?on(r,c,u):en(r,c,u)}return r}function Ci(e,t){return function(r,n){var i=Ga(r)?Mt:rn,o=t?t():{};return i(r,e,co(n,2),o)}}function Pi(e){return Qn((function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:i,s=o>2?r[2]:i;for(a=e.length>3&&"function"==typeof a?(o--,a):i,s&&_o(r[0],r[1],s)&&(a=o<3?i:a,o=1),t=Ae(t);++n<o;){var c=r[n];c&&e(t,c,n,a)}return t}))}function Ni(e,t){return function(r,n){if(null==r)return r;if(!Ya(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=Ae(r);(t?o--:++o<i)&&!1!==n(a[o],o,a););return r}}function ki(e){return function(t,r,n){for(var i=-1,o=Ae(t),a=n(t),s=a.length;s--;){var c=a[e?s:++i];if(!1===r(o[c],c,o))break}return t}}function Ui(e){return function(t){var r=sr(t=gs(t))?pr(t):i,n=r?r[0]:t.charAt(0),o=r?wi(r,1).join(""):t.slice(1);return n[e]()+o}}function Bi(e){return function(t){return Dt(Js(qs(t).replace(et,"")),e,"")}}function Di(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=jr(e.prototype),n=e.apply(r,t);return es(n)?n:r}}function Li(e){return function(t,r,n){var o=Ae(t);if(!Ya(t)){var a=co(r,3);t=Cs(t),r=function(e){return a(o[e],e,o)}}var s=e(t,r,n);return s>-1?o[a?t[s]:s]:i}}function Fi(e){return ro((function(t){var r=t.length,n=r,a=Hr.prototype.thru;for(e&&t.reverse();n--;){var s=t[n];if("function"!=typeof s)throw new Ie(o);if(a&&!c&&"wrapper"==ao(s))var c=new Hr([],!0)}for(n=c?n:r;++n<r;){var u=ao(s=t[n]),f="wrapper"==u?oo(s):i;c=f&&xo(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?c[ao(f[0])].apply(c,f[3]):1==s.length&&xo(s)?c[u]():c.thru(s)}return function(){var e=arguments,n=e[0];if(c&&1==e.length&&Ga(n))return c.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}}))}function ji(e,t,n,o,a,s,c,u,f,l){var h=t&d,p=1&t,m=2&t,v=24&t,b=512&t,g=m?i:Di(e);return function d(){for(var y=arguments.length,_=r(y),w=y;w--;)_[w]=arguments[w];if(v)var x=so(d),E=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}(_,x);if(o&&(_=Ri(_,o,a,v)),s&&(_=Mi(_,s,c,v)),y-=E,v&&y<l){var S=fr(_,x);return Vi(e,t,ji,d.placeholder,n,_,S,u,f,l-y)}var T=p?n:this,A=m?T[e]:e;return y=_.length,u?_=function(e,t){var r=e.length,n=gr(t.length,r),o=Ii(e);for(;n--;){var a=t[n];e[n]=yo(a,r)?o[a]:i}return e}(_,u):b&&y>1&&_.reverse(),h&&f<y&&(_.length=f),this&&this!==mt&&this instanceof d&&(A=g||Di(A)),A.apply(T,_)}}function zi(e,t){return function(r,n){return function(e,t,r,n){return _n(e,(function(e,i,o){t(n,r(e),i,o)})),n}(r,e,t(n),{})}}function Hi(e,t){return function(r,n){var o;if(r===i&&n===i)return t;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=ui(r),n=ui(n)):(r=ci(r),n=ci(n)),o=e(r,n)}return o}}function qi(e){return ro((function(t){return t=Ut(t,$t(co())),Qn((function(r){var n=this;return e(t,(function(e){return Rt(e,n,r)}))}))}))}function Gi(e,t){var r=(t=t===i?" ":ui(t)).length;if(r<2)return r?Kn(t,e):t;var n=Kn(t,ht(e/hr(t)));return sr(t)?wi(pr(n),0,e).join(""):n.slice(0,e)}function Wi(e){return function(t,n,o){return o&&"number"!=typeof o&&_o(t,n,o)&&(n=o=i),t=hs(t),n===i?(n=t,t=0):n=hs(n),function(e,t,n,i){for(var o=-1,a=Xt(ht((t-e)/(n||1)),0),s=r(a);a--;)s[i?a:++o]=e,e+=n;return s}(t,n,o=o===i?t<n?1:-1:hs(o),e)}}function Yi(e){return function(t,r){return"string"==typeof t&&"string"==typeof r||(t=vs(t),r=vs(r)),e(t,r)}}function Vi(e,t,r,n,o,a,s,c,d,l){var h=8&t;t|=h?u:f,4&(t&=~(h?f:u))||(t&=-4);var p=[e,t,o,h?a:i,h?s:i,h?i:a,h?i:s,c,d,l],m=r.apply(i,p);return xo(e)&&Oo(m,p),m.placeholder=n,No(m,e,t)}function Xi(e){var t=Te[e];return function(e,r){if(e=vs(e),(r=null==r?0:gr(ps(r),292))&&yt(e)){var n=(gs(e)+"e").split("e");return+((n=(gs(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}var Ki=Ar&&1/dr(new Ar([,-0]))[1]==h?function(e){return new Ar(e)}:cc;function Qi(e){return function(t){var r=mo(t);return r==T?cr(t):r==O?lr(t):function(e,t){return Ut(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Ji(e,t,n,a,h,p,m,v){var b=2&t;if(!b&&"function"!=typeof e)throw new Ie(o);var g=a?a.length:0;if(g||(t&=-97,a=h=i),m=m===i?m:Xt(ps(m),0),v=v===i?v:ps(v),g-=h?h.length:0,t&f){var y=a,_=h;a=h=i}var w=b?i:oo(e),x=[e,t,n,a,h,y,_,p,m,v];if(w&&function(e,t){var r=e[1],n=t[1],i=r|n,o=i<131,a=n==d&&8==r||n==d&&r==l&&e[7].length<=t[8]||384==n&&t[7].length<=t[8]&&8==r;if(!o&&!a)return e;1&n&&(e[2]=t[2],i|=1&r?0:4);var c=t[3];if(c){var u=e[3];e[3]=u?Ri(u,c,t[4]):c,e[4]=u?fr(e[3],s):t[4]}(c=t[5])&&(u=e[5],e[5]=u?Mi(u,c,t[6]):c,e[6]=u?fr(e[5],s):t[6]);(c=t[7])&&(e[7]=c);n&d&&(e[8]=null==e[8]?t[8]:gr(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(x,w),e=x[0],t=x[1],n=x[2],a=x[3],h=x[4],!(v=x[9]=x[9]===i?b?0:e.length:Xt(x[9]-g,0))&&24&t&&(t&=-25),t&&1!=t)E=8==t||t==c?function(e,t,n){var o=Di(e);return function a(){for(var s=arguments.length,c=r(s),u=s,f=so(a);u--;)c[u]=arguments[u];var d=s<3&&c[0]!==f&&c[s-1]!==f?[]:fr(c,f);return(s-=d.length)<n?Vi(e,t,ji,a.placeholder,i,c,d,i,i,n-s):Rt(this&&this!==mt&&this instanceof a?o:e,this,c)}}(e,t,v):t!=u&&33!=t||h.length?ji.apply(i,x):function(e,t,n,i){var o=1&t,a=Di(e);return function t(){for(var s=-1,c=arguments.length,u=-1,f=i.length,d=r(f+c),l=this&&this!==mt&&this instanceof t?a:e;++u<f;)d[u]=i[u];for(;c--;)d[u++]=arguments[++s];return Rt(l,o?n:this,d)}}(e,t,n,a);else var E=function(e,t,r){var n=1&t,i=Di(e);return function t(){return(this&&this!==mt&&this instanceof t?i:e).apply(n?r:this,arguments)}}(e,t,n);return No((w?ei:Oo)(E,x),e,t)}function Zi(e,t,r,n){return e===i||ja(e,Pe[r])&&!Ue.call(n,r)?t:e}function $i(e,t,r,n,o,a){return es(e)&&es(t)&&(a.set(t,e),Hn(e,t,i,$i,a),a.delete(t)),e}function eo(e){return is(e)?i:e}function to(e,t,r,n,o,a){var s=1&r,c=e.length,u=t.length;if(c!=u&&!(s&&u>c))return!1;var f=a.get(e),d=a.get(t);if(f&&d)return f==t&&d==e;var l=-1,h=!0,p=2&r?new Vr:i;for(a.set(e,t),a.set(t,e);++l<c;){var m=e[l],v=t[l];if(n)var b=s?n(v,m,l,t,e,a):n(m,v,l,e,t,a);if(b!==i){if(b)continue;h=!1;break}if(p){if(!Ft(t,(function(e,t){if(!tr(p,t)&&(m===e||o(m,e,r,n,a)))return p.push(t)}))){h=!1;break}}else if(m!==v&&!o(m,v,r,n,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function ro(e){return Po(Ro(e,i,Wo),e+"")}function no(e){return Sn(e,Cs,ho)}function io(e){return Sn(e,Ps,po)}var oo=Ir?function(e){return Ir.get(e)}:cc;function ao(e){for(var t=e.name+"",r=Or[t],n=Ue.call(Or,t)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==e)return i.name}return t}function so(e){return(Ue.call(Fr,"placeholder")?Fr:e).placeholder}function co(){var e=Fr.iteratee||ic;return e=e===ic?Un:e,arguments.length?e(arguments[0],arguments[1]):e}function uo(e,t){var r=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function fo(e){for(var t=Cs(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,To(i)]}return t}function lo(e,t){var r=function(e,t){return null==e?i:e[t]}(e,t);return kn(r)?r:i}var ho=vt?function(e){return null==e?[]:(e=Ae(e),Pt(vt(e),(function(t){return Xe.call(e,t)})))}:mc,po=vt?function(e){for(var t=[];e;)Bt(t,ho(e)),e=Ye(e);return t}:mc,mo=Tn;function vo(e,t,r){for(var n=-1,i=(t=yi(t,e)).length,o=!1;++n<i;){var a=Do(t[n]);if(!(o=null!=e&&r(e,a)))break;e=e[a]}return o||++n!=i?o:!!(i=null==e?0:e.length)&&$a(i)&&yo(a,i)&&(Ga(e)||qa(e))}function bo(e){return"function"!=typeof e.constructor||So(e)?{}:jr(Ye(e))}function go(e){return Ga(e)||qa(e)||!!(Qe&&e&&e[Qe])}function yo(e,t){var r=typeof e;return!!(t=null==t?p:t)&&("number"==r||"symbol"!=r&&_e.test(e))&&e>-1&&e%1==0&&e<t}function _o(e,t,r){if(!es(r))return!1;var n=typeof t;return!!("number"==n?Ya(r)&&yo(t,r.length):"string"==n&&t in r)&&ja(r[t],e)}function wo(e,t){if(Ga(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!cs(e))||(re.test(e)||!te.test(e)||null!=t&&e in Ae(t))}function xo(e){var t=ao(e),r=Fr[t];if("function"!=typeof r||!(t in qr.prototype))return!1;if(e===r)return!0;var n=oo(r);return!!n&&e===n[0]}(Er&&mo(new Er(new ArrayBuffer(1)))!=U||Sr&&mo(new Sr)!=T||Tr&&mo(Tr.resolve())!=M||Ar&&mo(new Ar)!=O||Rr&&mo(new Rr)!=N)&&(mo=function(e){var t=Tn(e),r=t==R?e.constructor:i,n=r?Lo(r):"";if(n)switch(n){case Cr:return U;case Pr:return T;case Nr:return M;case kr:return O;case Ur:return N}return t});var Eo=Ne?Ja:vc;function So(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Pe)}function To(e){return e===e&&!es(e)}function Ao(e,t){return function(r){return null!=r&&(r[e]===t&&(t!==i||e in Ae(r)))}}function Ro(e,t,n){return t=Xt(t===i?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=Xt(i.length-t,0),s=r(a);++o<a;)s[o]=i[t+o];o=-1;for(var c=r(t+1);++o<t;)c[o]=i[o];return c[t]=n(s),Rt(e,this,c)}}function Mo(e,t){return t.length<2?e:En(e,ni(t,0,-1))}function Io(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}var Oo=ko(ei),Co=ft||function(e,t){return mt.setTimeout(e,t)},Po=ko(ti);function No(e,t,r){var n=t+"";return Po(e,function(e,t){var r=t.length;if(!r)return e;var n=r-1;return t[n]=(r>1?"& ":"")+t[n],t=t.join(r>2?", ":" "),e.replace(ce,"{\n/* [wrapped with "+t+"] */\n")}(n,function(e,t){return It(b,(function(r){var n="_."+r[0];t&r[1]&&!Nt(e,n)&&e.push(n)})),e.sort()}(function(e){var t=e.match(ue);return t?t[1].split(fe):[]}(n),r)))}function ko(e){var t=0,r=0;return function(){var n=yr(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(i,arguments)}}function Uo(e,t){var r=-1,n=e.length,o=n-1;for(t=t===i?n:t;++r<t;){var a=Xn(r,o),s=e[a];e[a]=e[r],e[r]=s}return e.length=t,e}var Bo=function(e){var t=ka(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ne,(function(e,r,n,i){t.push(n?i.replace(he,"$1"):r||e)})),t}));function Do(e){if("string"==typeof e||cs(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Lo(e){if(null!=e){try{return ke.call(e)}catch(t){}try{return e+""}catch(t){}}return""}function Fo(e){if(e instanceof qr)return e.clone();var t=new Hr(e.__wrapped__,e.__chain__);return t.__actions__=Ii(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var jo=Qn((function(e,t){return Va(e)?dn(e,bn(t,1,Va,!0)):[]})),zo=Qn((function(e,t){var r=Qo(t);return Va(r)&&(r=i),Va(e)?dn(e,bn(t,1,Va,!0),co(r,2)):[]})),Ho=Qn((function(e,t){var r=Qo(t);return Va(r)&&(r=i),Va(e)?dn(e,bn(t,1,Va,!0),i,r):[]}));function qo(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ps(r);return i<0&&(i=Xt(n+i,0)),Ht(e,co(t,3),i)}function Go(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n-1;return r!==i&&(o=ps(r),o=r<0?Xt(n+o,0):gr(o,n-1)),Ht(e,co(t,3),o,!0)}function Wo(e){return(null==e?0:e.length)?bn(e,1):[]}function Yo(e){return e&&e.length?e[0]:i}var Vo=Qn((function(e){var t=Ut(e,bi);return t.length&&t[0]===e[0]?In(t):[]})),Xo=Qn((function(e){var t=Qo(e),r=Ut(e,bi);return t===Qo(r)?t=i:r.pop(),r.length&&r[0]===e[0]?In(r,co(t,2)):[]})),Ko=Qn((function(e){var t=Qo(e),r=Ut(e,bi);return(t="function"==typeof t?t:i)&&r.pop(),r.length&&r[0]===e[0]?In(r,i,t):[]}));function Qo(e){var t=null==e?0:e.length;return t?e[t-1]:i}var Jo=Qn(Zo);function Zo(e,t){return e&&e.length&&t&&t.length?Yn(e,t):e}var $o=ro((function(e,t){var r=null==e?0:e.length,n=an(e,t);return Vn(e,Ut(t,(function(e){return yo(e,r)?+e:e})).sort(Ai)),n}));function ea(e){return null==e?e:xr.call(e)}var ta=Qn((function(e){return fi(bn(e,1,Va,!0))})),ra=Qn((function(e){var t=Qo(e);return Va(t)&&(t=i),fi(bn(e,1,Va,!0),co(t,2))})),na=Qn((function(e){var t=Qo(e);return t="function"==typeof t?t:i,fi(bn(e,1,Va,!0),i,t)}));function ia(e){if(!e||!e.length)return[];var t=0;return e=Pt(e,(function(e){if(Va(e))return t=Xt(e.length,t),!0})),Jt(t,(function(t){return Ut(e,Vt(t))}))}function oa(e,t){if(!e||!e.length)return[];var r=ia(e);return null==t?r:Ut(r,(function(e){return Rt(t,i,e)}))}var aa=Qn((function(e,t){return Va(e)?dn(e,t):[]})),sa=Qn((function(e){return mi(Pt(e,Va))})),ca=Qn((function(e){var t=Qo(e);return Va(t)&&(t=i),mi(Pt(e,Va),co(t,2))})),ua=Qn((function(e){var t=Qo(e);return t="function"==typeof t?t:i,mi(Pt(e,Va),i,t)})),fa=Qn(ia);var da=Qn((function(e){var t=e.length,r=t>1?e[t-1]:i;return r="function"==typeof r?(e.pop(),r):i,oa(e,r)}));function la(e){var t=Fr(e);return t.__chain__=!0,t}function ha(e,t){return t(e)}var pa=ro((function(e){var t=e.length,r=t?e[0]:0,n=this.__wrapped__,o=function(t){return an(t,e)};return!(t>1||this.__actions__.length)&&n instanceof qr&&yo(r)?((n=n.slice(r,+r+(t?1:0))).__actions__.push({func:ha,args:[o],thisArg:i}),new Hr(n,this.__chain__).thru((function(e){return t&&!e.length&&e.push(i),e}))):this.thru(o)}));var ma=Ci((function(e,t,r){Ue.call(e,r)?++e[r]:on(e,r,1)}));var va=Li(qo),ba=Li(Go);function ga(e,t){return(Ga(e)?It:ln)(e,co(t,3))}function ya(e,t){return(Ga(e)?Ot:hn)(e,co(t,3))}var _a=Ci((function(e,t,r){Ue.call(e,r)?e[r].push(t):on(e,r,[t])}));var wa=Qn((function(e,t,n){var i=-1,o="function"==typeof t,a=Ya(e)?r(e.length):[];return ln(e,(function(e){a[++i]=o?Rt(t,e,n):On(e,t,n)})),a})),xa=Ci((function(e,t,r){on(e,r,t)}));function Ea(e,t){return(Ga(e)?Ut:Fn)(e,co(t,3))}var Sa=Ci((function(e,t,r){e[r?0:1].push(t)}),(function(){return[[],[]]}));var Ta=Qn((function(e,t){if(null==e)return[];var r=t.length;return r>1&&_o(e,t[0],t[1])?t=[]:r>2&&_o(t[0],t[1],t[2])&&(t=[t[0]]),Gn(e,bn(t,1),[])})),Aa=it||function(){return mt.Date.now()};function Ra(e,t,r){return t=r?i:t,t=e&&null==t?e.length:t,Ji(e,d,i,i,i,i,t)}function Ma(e,t){var r;if("function"!=typeof t)throw new Ie(o);return e=ps(e),function(){return--e>0&&(r=t.apply(this,arguments)),e<=1&&(t=i),r}}var Ia=Qn((function(e,t,r){var n=1;if(r.length){var i=fr(r,so(Ia));n|=u}return Ji(e,n,t,r,i)})),Oa=Qn((function(e,t,r){var n=3;if(r.length){var i=fr(r,so(Oa));n|=u}return Ji(t,n,e,r,i)}));function Ca(e,t,r){var n,a,s,c,u,f,d=0,l=!1,h=!1,p=!0;if("function"!=typeof e)throw new Ie(o);function m(t){var r=n,o=a;return n=a=i,d=t,c=e.apply(o,r)}function v(e){var r=e-f;return f===i||r>=t||r<0||h&&e-d>=s}function b(){var e=Aa();if(v(e))return g(e);u=Co(b,function(e){var r=t-(e-f);return h?gr(r,s-(e-d)):r}(e))}function g(e){return u=i,p&&n?m(e):(n=a=i,c)}function y(){var e=Aa(),r=v(e);if(n=arguments,a=this,f=e,r){if(u===i)return function(e){return d=e,u=Co(b,t),l?m(e):c}(f);if(h)return xi(u),u=Co(b,t),m(f)}return u===i&&(u=Co(b,t)),c}return t=vs(t)||0,es(r)&&(l=!!r.leading,s=(h="maxWait"in r)?Xt(vs(r.maxWait)||0,t):s,p="trailing"in r?!!r.trailing:p),y.cancel=function(){u!==i&&xi(u),d=0,n=f=a=u=i},y.flush=function(){return u===i?c:g(Aa())},y}var Pa=Qn((function(e,t){return fn(e,1,t)})),Na=Qn((function(e,t,r){return fn(e,vs(t)||0,r)}));function ka(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ie(o);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(ka.Cache||Yr),r}function Ua(e){if("function"!=typeof e)throw new Ie(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ka.Cache=Yr;var Ba=_i((function(e,t){var r=(t=1==t.length&&Ga(t[0])?Ut(t[0],$t(co())):Ut(bn(t,1),$t(co()))).length;return Qn((function(n){for(var i=-1,o=gr(n.length,r);++i<o;)n[i]=t[i].call(this,n[i]);return Rt(e,this,n)}))})),Da=Qn((function(e,t){var r=fr(t,so(Da));return Ji(e,u,i,t,r)})),La=Qn((function(e,t){var r=fr(t,so(La));return Ji(e,f,i,t,r)})),Fa=ro((function(e,t){return Ji(e,l,i,i,i,t)}));function ja(e,t){return e===t||e!==e&&t!==t}var za=Yi(An),Ha=Yi((function(e,t){return e>=t})),qa=Cn(function(){return arguments}())?Cn:function(e){return ts(e)&&Ue.call(e,"callee")&&!Xe.call(e,"callee")},Ga=r.isArray,Wa=wt?$t(wt):function(e){return ts(e)&&Tn(e)==k};function Ya(e){return null!=e&&$a(e.length)&&!Ja(e)}function Va(e){return ts(e)&&Ya(e)}var Xa=bt||vc,Ka=xt?$t(xt):function(e){return ts(e)&&Tn(e)==w};function Qa(e){if(!ts(e))return!1;var t=Tn(e);return t==x||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!is(e)}function Ja(e){if(!es(e))return!1;var t=Tn(e);return t==E||t==S||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Za(e){return"number"==typeof e&&e==ps(e)}function $a(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=p}function es(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ts(e){return null!=e&&"object"==typeof e}var rs=Et?$t(Et):function(e){return ts(e)&&mo(e)==T};function ns(e){return"number"==typeof e||ts(e)&&Tn(e)==A}function is(e){if(!ts(e)||Tn(e)!=R)return!1;var t=Ye(e);if(null===t)return!0;var r=Ue.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ke.call(r)==Fe}var os=St?$t(St):function(e){return ts(e)&&Tn(e)==I};var as=Tt?$t(Tt):function(e){return ts(e)&&mo(e)==O};function ss(e){return"string"==typeof e||!Ga(e)&&ts(e)&&Tn(e)==C}function cs(e){return"symbol"==typeof e||ts(e)&&Tn(e)==P}var us=At?$t(At):function(e){return ts(e)&&$a(e.length)&&!!ct[Tn(e)]};var fs=Yi(Ln),ds=Yi((function(e,t){return e<=t}));function ls(e){if(!e)return[];if(Ya(e))return ss(e)?pr(e):Ii(e);if(Je&&e[Je])return function(e){for(var t,r=[];!(t=e.next()).done;)r.push(t.value);return r}(e[Je]());var t=mo(e);return(t==T?cr:t==O?dr:js)(e)}function hs(e){return e?(e=vs(e))===h||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}function ps(e){var t=hs(e),r=t%1;return t===t?r?t-r:t:0}function ms(e){return e?sn(ps(e),0,v):0}function vs(e){if("number"==typeof e)return e;if(cs(e))return m;if(es(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=es(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Zt(e);var r=be.test(e);return r||ye.test(e)?lt(e.slice(2),r?2:8):ve.test(e)?m:+e}function bs(e){return Oi(e,Ps(e))}function gs(e){return null==e?"":ui(e)}var ys=Pi((function(e,t){if(So(t)||Ya(t))Oi(t,Cs(t),e);else for(var r in t)Ue.call(t,r)&&en(e,r,t[r])})),_s=Pi((function(e,t){Oi(t,Ps(t),e)})),ws=Pi((function(e,t,r,n){Oi(t,Ps(t),e,n)})),xs=Pi((function(e,t,r,n){Oi(t,Cs(t),e,n)})),Es=ro(an);var Ss=Qn((function(e,t){e=Ae(e);var r=-1,n=t.length,o=n>2?t[2]:i;for(o&&_o(t[0],t[1],o)&&(n=1);++r<n;)for(var a=t[r],s=Ps(a),c=-1,u=s.length;++c<u;){var f=s[c],d=e[f];(d===i||ja(d,Pe[f])&&!Ue.call(e,f))&&(e[f]=a[f])}return e})),Ts=Qn((function(e){return e.push(i,$i),Rt(ks,i,e)}));function As(e,t,r){var n=null==e?i:En(e,t);return n===i?r:n}function Rs(e,t){return null!=e&&vo(e,t,Mn)}var Ms=zi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),e[t]=r}),ec(nc)),Is=zi((function(e,t,r){null!=t&&"function"!=typeof t.toString&&(t=Le.call(t)),Ue.call(e,t)?e[t].push(r):e[t]=[r]}),co),Os=Qn(On);function Cs(e){return Ya(e)?Kr(e):Bn(e)}function Ps(e){return Ya(e)?Kr(e,!0):Dn(e)}var Ns=Pi((function(e,t,r){Hn(e,t,r)})),ks=Pi((function(e,t,r,n){Hn(e,t,r,n)})),Us=ro((function(e,t){var r={};if(null==e)return r;var n=!1;t=Ut(t,(function(t){return t=yi(t,e),n||(n=t.length>1),t})),Oi(e,io(e),r),n&&(r=cn(r,7,eo));for(var i=t.length;i--;)di(r,t[i]);return r}));var Bs=ro((function(e,t){return null==e?{}:function(e,t){return Wn(e,t,(function(t,r){return Rs(e,r)}))}(e,t)}));function Ds(e,t){if(null==e)return{};var r=Ut(io(e),(function(e){return[e]}));return t=co(t),Wn(e,r,(function(e,r){return t(e,r[0])}))}var Ls=Qi(Cs),Fs=Qi(Ps);function js(e){return null==e?[]:er(e,Cs(e))}var zs=Bi((function(e,t,r){return t=t.toLowerCase(),e+(r?Hs(t):t)}));function Hs(e){return Qs(gs(e).toLowerCase())}function qs(e){return(e=gs(e))&&e.replace(we,ir).replace(tt,"")}var Gs=Bi((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()})),Ws=Bi((function(e,t,r){return e+(r?" ":"")+t.toLowerCase()})),Ys=Ui("toLowerCase");var Vs=Bi((function(e,t,r){return e+(r?"_":"")+t.toLowerCase()}));var Xs=Bi((function(e,t,r){return e+(r?" ":"")+Qs(t)}));var Ks=Bi((function(e,t,r){return e+(r?" ":"")+t.toUpperCase()})),Qs=Ui("toUpperCase");function Js(e,t,r){return e=gs(e),(t=r?i:t)===i?function(e){return ot.test(e)}(e)?function(e){return e.match(nt)||[]}(e):function(e){return e.match(de)||[]}(e):e.match(t)||[]}var Zs=Qn((function(e,t){try{return Rt(e,i,t)}catch(r){return Qa(r)?r:new se(r)}})),$s=ro((function(e,t){return It(t,(function(t){t=Do(t),on(e,t,Ia(e[t],e))})),e}));function ec(e){return function(){return e}}var tc=Fi(),rc=Fi(!0);function nc(e){return e}function ic(e){return Un("function"==typeof e?e:cn(e,1))}var oc=Qn((function(e,t){return function(r){return On(r,e,t)}})),ac=Qn((function(e,t){return function(r){return On(e,r,t)}}));function sc(e,t,r){var n=Cs(t),i=xn(t,n);null!=r||es(t)&&(i.length||!n.length)||(r=t,t=e,e=this,i=xn(t,Cs(t)));var o=!(es(r)&&"chain"in r)||!!r.chain,a=Ja(e);return It(i,(function(r){var n=t[r];e[r]=n,a&&(e.prototype[r]=function(){var t=this.__chain__;if(o||t){var r=e(this.__wrapped__);return(r.__actions__=Ii(this.__actions__)).push({func:n,args:arguments,thisArg:e}),r.__chain__=t,r}return n.apply(e,Bt([this.value()],arguments))})})),e}function cc(){}var uc=qi(Ut),fc=qi(Ct),dc=qi(Ft);function lc(e){return wo(e)?Vt(Do(e)):function(e){return function(t){return En(t,e)}}(e)}var hc=Wi(),pc=Wi(!0);function mc(){return[]}function vc(){return!1}var bc=Hi((function(e,t){return e+t}),0),gc=Xi("ceil"),yc=Hi((function(e,t){return e/t}),1),_c=Xi("floor");var wc=Hi((function(e,t){return e*t}),1),xc=Xi("round"),Ec=Hi((function(e,t){return e-t}),0);return Fr.after=function(e,t){if("function"!=typeof t)throw new Ie(o);return e=ps(e),function(){if(--e<1)return t.apply(this,arguments)}},Fr.ary=Ra,Fr.assign=ys,Fr.assignIn=_s,Fr.assignInWith=ws,Fr.assignWith=xs,Fr.at=Es,Fr.before=Ma,Fr.bind=Ia,Fr.bindAll=$s,Fr.bindKey=Oa,Fr.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ga(e)?e:[e]},Fr.chain=la,Fr.chunk=function(e,t,n){t=(n?_o(e,t,n):t===i)?1:Xt(ps(t),0);var o=null==e?0:e.length;if(!o||t<1)return[];for(var a=0,s=0,c=r(ht(o/t));a<o;)c[s++]=ni(e,a,a+=t);return c},Fr.compact=function(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t<r;){var o=e[t];o&&(i[n++]=o)}return i},Fr.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return Bt(Ga(n)?Ii(n):[n],bn(t,1))},Fr.cond=function(e){var t=null==e?0:e.length,r=co();return e=t?Ut(e,(function(e){if("function"!=typeof e[1])throw new Ie(o);return[r(e[0]),e[1]]})):[],Qn((function(r){for(var n=-1;++n<t;){var i=e[n];if(Rt(i[0],this,r))return Rt(i[1],this,r)}}))},Fr.conforms=function(e){return function(e){var t=Cs(e);return function(r){return un(r,e,t)}}(cn(e,1))},Fr.constant=ec,Fr.countBy=ma,Fr.create=function(e,t){var r=jr(e);return null==t?r:nn(r,t)},Fr.curry=function e(t,r,n){var o=Ji(t,8,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},Fr.curryRight=function e(t,r,n){var o=Ji(t,c,i,i,i,i,i,r=n?i:r);return o.placeholder=e.placeholder,o},Fr.debounce=Ca,Fr.defaults=Ss,Fr.defaultsDeep=Ts,Fr.defer=Pa,Fr.delay=Na,Fr.difference=jo,Fr.differenceBy=zo,Fr.differenceWith=Ho,Fr.drop=function(e,t,r){var n=null==e?0:e.length;return n?ni(e,(t=r||t===i?1:ps(t))<0?0:t,n):[]},Fr.dropRight=function(e,t,r){var n=null==e?0:e.length;return n?ni(e,0,(t=n-(t=r||t===i?1:ps(t)))<0?0:t):[]},Fr.dropRightWhile=function(e,t){return e&&e.length?hi(e,co(t,3),!0,!0):[]},Fr.dropWhile=function(e,t){return e&&e.length?hi(e,co(t,3),!0):[]},Fr.fill=function(e,t,r,n){var o=null==e?0:e.length;return o?(r&&"number"!=typeof r&&_o(e,t,r)&&(r=0,n=o),function(e,t,r,n){var o=e.length;for((r=ps(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:ps(n))<0&&(n+=o),n=r>n?0:ms(n);r<n;)e[r++]=t;return e}(e,t,r,n)):[]},Fr.filter=function(e,t){return(Ga(e)?Pt:vn)(e,co(t,3))},Fr.flatMap=function(e,t){return bn(Ea(e,t),1)},Fr.flatMapDeep=function(e,t){return bn(Ea(e,t),h)},Fr.flatMapDepth=function(e,t,r){return r=r===i?1:ps(r),bn(Ea(e,t),r)},Fr.flatten=Wo,Fr.flattenDeep=function(e){return(null==e?0:e.length)?bn(e,h):[]},Fr.flattenDepth=function(e,t){return(null==e?0:e.length)?bn(e,t=t===i?1:ps(t)):[]},Fr.flip=function(e){return Ji(e,512)},Fr.flow=tc,Fr.flowRight=rc,Fr.fromPairs=function(e){for(var t=-1,r=null==e?0:e.length,n={};++t<r;){var i=e[t];n[i[0]]=i[1]}return n},Fr.functions=function(e){return null==e?[]:xn(e,Cs(e))},Fr.functionsIn=function(e){return null==e?[]:xn(e,Ps(e))},Fr.groupBy=_a,Fr.initial=function(e){return(null==e?0:e.length)?ni(e,0,-1):[]},Fr.intersection=Vo,Fr.intersectionBy=Xo,Fr.intersectionWith=Ko,Fr.invert=Ms,Fr.invertBy=Is,Fr.invokeMap=wa,Fr.iteratee=ic,Fr.keyBy=xa,Fr.keys=Cs,Fr.keysIn=Ps,Fr.map=Ea,Fr.mapKeys=function(e,t){var r={};return t=co(t,3),_n(e,(function(e,n,i){on(r,t(e,n,i),e)})),r},Fr.mapValues=function(e,t){var r={};return t=co(t,3),_n(e,(function(e,n,i){on(r,n,t(e,n,i))})),r},Fr.matches=function(e){return jn(cn(e,1))},Fr.matchesProperty=function(e,t){return zn(e,cn(t,1))},Fr.memoize=ka,Fr.merge=Ns,Fr.mergeWith=ks,Fr.method=oc,Fr.methodOf=ac,Fr.mixin=sc,Fr.negate=Ua,Fr.nthArg=function(e){return e=ps(e),Qn((function(t){return qn(t,e)}))},Fr.omit=Us,Fr.omitBy=function(e,t){return Ds(e,Ua(co(t)))},Fr.once=function(e){return Ma(2,e)},Fr.orderBy=function(e,t,r,n){return null==e?[]:(Ga(t)||(t=null==t?[]:[t]),Ga(r=n?i:r)||(r=null==r?[]:[r]),Gn(e,t,r))},Fr.over=uc,Fr.overArgs=Ba,Fr.overEvery=fc,Fr.overSome=dc,Fr.partial=Da,Fr.partialRight=La,Fr.partition=Sa,Fr.pick=Bs,Fr.pickBy=Ds,Fr.property=lc,Fr.propertyOf=function(e){return function(t){return null==e?i:En(e,t)}},Fr.pull=Jo,Fr.pullAll=Zo,Fr.pullAllBy=function(e,t,r){return e&&e.length&&t&&t.length?Yn(e,t,co(r,2)):e},Fr.pullAllWith=function(e,t,r){return e&&e.length&&t&&t.length?Yn(e,t,i,r):e},Fr.pullAt=$o,Fr.range=hc,Fr.rangeRight=pc,Fr.rearg=Fa,Fr.reject=function(e,t){return(Ga(e)?Pt:vn)(e,Ua(co(t,3)))},Fr.remove=function(e,t){var r=[];if(!e||!e.length)return r;var n=-1,i=[],o=e.length;for(t=co(t,3);++n<o;){var a=e[n];t(a,n,e)&&(r.push(a),i.push(n))}return Vn(e,i),r},Fr.rest=function(e,t){if("function"!=typeof e)throw new Ie(o);return Qn(e,t=t===i?t:ps(t))},Fr.reverse=ea,Fr.sampleSize=function(e,t,r){return t=(r?_o(e,t,r):t===i)?1:ps(t),(Ga(e)?Jr:Zn)(e,t)},Fr.set=function(e,t,r){return null==e?e:$n(e,t,r)},Fr.setWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:$n(e,t,r,n)},Fr.shuffle=function(e){return(Ga(e)?Zr:ri)(e)},Fr.slice=function(e,t,r){var n=null==e?0:e.length;return n?(r&&"number"!=typeof r&&_o(e,t,r)?(t=0,r=n):(t=null==t?0:ps(t),r=r===i?n:ps(r)),ni(e,t,r)):[]},Fr.sortBy=Ta,Fr.sortedUniq=function(e){return e&&e.length?si(e):[]},Fr.sortedUniqBy=function(e,t){return e&&e.length?si(e,co(t,2)):[]},Fr.split=function(e,t,r){return r&&"number"!=typeof r&&_o(e,t,r)&&(t=r=i),(r=r===i?v:r>>>0)?(e=gs(e))&&("string"==typeof t||null!=t&&!os(t))&&!(t=ui(t))&&sr(e)?wi(pr(e),0,r):e.split(t,r):[]},Fr.spread=function(e,t){if("function"!=typeof e)throw new Ie(o);return t=null==t?0:Xt(ps(t),0),Qn((function(r){var n=r[t],i=wi(r,0,t);return n&&Bt(i,n),Rt(e,this,i)}))},Fr.tail=function(e){var t=null==e?0:e.length;return t?ni(e,1,t):[]},Fr.take=function(e,t,r){return e&&e.length?ni(e,0,(t=r||t===i?1:ps(t))<0?0:t):[]},Fr.takeRight=function(e,t,r){var n=null==e?0:e.length;return n?ni(e,(t=n-(t=r||t===i?1:ps(t)))<0?0:t,n):[]},Fr.takeRightWhile=function(e,t){return e&&e.length?hi(e,co(t,3),!1,!0):[]},Fr.takeWhile=function(e,t){return e&&e.length?hi(e,co(t,3)):[]},Fr.tap=function(e,t){return t(e),e},Fr.throttle=function(e,t,r){var n=!0,i=!0;if("function"!=typeof e)throw new Ie(o);return es(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Ca(e,t,{leading:n,maxWait:t,trailing:i})},Fr.thru=ha,Fr.toArray=ls,Fr.toPairs=Ls,Fr.toPairsIn=Fs,Fr.toPath=function(e){return Ga(e)?Ut(e,Do):cs(e)?[e]:Ii(Bo(gs(e)))},Fr.toPlainObject=bs,Fr.transform=function(e,t,r){var n=Ga(e),i=n||Xa(e)||us(e);if(t=co(t,4),null==r){var o=e&&e.constructor;r=i?n?new o:[]:es(e)&&Ja(o)?jr(Ye(e)):{}}return(i?It:_n)(e,(function(e,n,i){return t(r,e,n,i)})),r},Fr.unary=function(e){return Ra(e,1)},Fr.union=ta,Fr.unionBy=ra,Fr.unionWith=na,Fr.uniq=function(e){return e&&e.length?fi(e):[]},Fr.uniqBy=function(e,t){return e&&e.length?fi(e,co(t,2)):[]},Fr.uniqWith=function(e,t){return t="function"==typeof t?t:i,e&&e.length?fi(e,i,t):[]},Fr.unset=function(e,t){return null==e||di(e,t)},Fr.unzip=ia,Fr.unzipWith=oa,Fr.update=function(e,t,r){return null==e?e:li(e,t,gi(r))},Fr.updateWith=function(e,t,r,n){return n="function"==typeof n?n:i,null==e?e:li(e,t,gi(r),n)},Fr.values=js,Fr.valuesIn=function(e){return null==e?[]:er(e,Ps(e))},Fr.without=aa,Fr.words=Js,Fr.wrap=function(e,t){return Da(gi(t),e)},Fr.xor=sa,Fr.xorBy=ca,Fr.xorWith=ua,Fr.zip=fa,Fr.zipObject=function(e,t){return vi(e||[],t||[],en)},Fr.zipObjectDeep=function(e,t){return vi(e||[],t||[],$n)},Fr.zipWith=da,Fr.entries=Ls,Fr.entriesIn=Fs,Fr.extend=_s,Fr.extendWith=ws,sc(Fr,Fr),Fr.add=bc,Fr.attempt=Zs,Fr.camelCase=zs,Fr.capitalize=Hs,Fr.ceil=gc,Fr.clamp=function(e,t,r){return r===i&&(r=t,t=i),r!==i&&(r=(r=vs(r))===r?r:0),t!==i&&(t=(t=vs(t))===t?t:0),sn(vs(e),t,r)},Fr.clone=function(e){return cn(e,4)},Fr.cloneDeep=function(e){return cn(e,5)},Fr.cloneDeepWith=function(e,t){return cn(e,5,t="function"==typeof t?t:i)},Fr.cloneWith=function(e,t){return cn(e,4,t="function"==typeof t?t:i)},Fr.conformsTo=function(e,t){return null==t||un(e,t,Cs(t))},Fr.deburr=qs,Fr.defaultTo=function(e,t){return null==e||e!==e?t:e},Fr.divide=yc,Fr.endsWith=function(e,t,r){e=gs(e),t=ui(t);var n=e.length,o=r=r===i?n:sn(ps(r),0,n);return(r-=t.length)>=0&&e.slice(r,o)==t},Fr.eq=ja,Fr.escape=function(e){return(e=gs(e))&&J.test(e)?e.replace(K,or):e},Fr.escapeRegExp=function(e){return(e=gs(e))&&oe.test(e)?e.replace(ie,"\\$&"):e},Fr.every=function(e,t,r){var n=Ga(e)?Ct:pn;return r&&_o(e,t,r)&&(t=i),n(e,co(t,3))},Fr.find=va,Fr.findIndex=qo,Fr.findKey=function(e,t){return zt(e,co(t,3),_n)},Fr.findLast=ba,Fr.findLastIndex=Go,Fr.findLastKey=function(e,t){return zt(e,co(t,3),wn)},Fr.floor=_c,Fr.forEach=ga,Fr.forEachRight=ya,Fr.forIn=function(e,t){return null==e?e:gn(e,co(t,3),Ps)},Fr.forInRight=function(e,t){return null==e?e:yn(e,co(t,3),Ps)},Fr.forOwn=function(e,t){return e&&_n(e,co(t,3))},Fr.forOwnRight=function(e,t){return e&&wn(e,co(t,3))},Fr.get=As,Fr.gt=za,Fr.gte=Ha,Fr.has=function(e,t){return null!=e&&vo(e,t,Rn)},Fr.hasIn=Rs,Fr.head=Yo,Fr.identity=nc,Fr.includes=function(e,t,r,n){e=Ya(e)?e:js(e),r=r&&!n?ps(r):0;var i=e.length;return r<0&&(r=Xt(i+r,0)),ss(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&qt(e,t,r)>-1},Fr.indexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var i=null==r?0:ps(r);return i<0&&(i=Xt(n+i,0)),qt(e,t,i)},Fr.inRange=function(e,t,r){return t=hs(t),r===i?(r=t,t=0):r=hs(r),function(e,t,r){return e>=gr(t,r)&&e<Xt(t,r)}(e=vs(e),t,r)},Fr.invoke=Os,Fr.isArguments=qa,Fr.isArray=Ga,Fr.isArrayBuffer=Wa,Fr.isArrayLike=Ya,Fr.isArrayLikeObject=Va,Fr.isBoolean=function(e){return!0===e||!1===e||ts(e)&&Tn(e)==_},Fr.isBuffer=Xa,Fr.isDate=Ka,Fr.isElement=function(e){return ts(e)&&1===e.nodeType&&!is(e)},Fr.isEmpty=function(e){if(null==e)return!0;if(Ya(e)&&(Ga(e)||"string"==typeof e||"function"==typeof e.splice||Xa(e)||us(e)||qa(e)))return!e.length;var t=mo(e);if(t==T||t==O)return!e.size;if(So(e))return!Bn(e).length;for(var r in e)if(Ue.call(e,r))return!1;return!0},Fr.isEqual=function(e,t){return Pn(e,t)},Fr.isEqualWith=function(e,t,r){var n=(r="function"==typeof r?r:i)?r(e,t):i;return n===i?Pn(e,t,i,r):!!n},Fr.isError=Qa,Fr.isFinite=function(e){return"number"==typeof e&&yt(e)},Fr.isFunction=Ja,Fr.isInteger=Za,Fr.isLength=$a,Fr.isMap=rs,Fr.isMatch=function(e,t){return e===t||Nn(e,t,fo(t))},Fr.isMatchWith=function(e,t,r){return r="function"==typeof r?r:i,Nn(e,t,fo(t),r)},Fr.isNaN=function(e){return ns(e)&&e!=+e},Fr.isNative=function(e){if(Eo(e))throw new se("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return kn(e)},Fr.isNil=function(e){return null==e},Fr.isNull=function(e){return null===e},Fr.isNumber=ns,Fr.isObject=es,Fr.isObjectLike=ts,Fr.isPlainObject=is,Fr.isRegExp=os,Fr.isSafeInteger=function(e){return Za(e)&&e>=-9007199254740991&&e<=p},Fr.isSet=as,Fr.isString=ss,Fr.isSymbol=cs,Fr.isTypedArray=us,Fr.isUndefined=function(e){return e===i},Fr.isWeakMap=function(e){return ts(e)&&mo(e)==N},Fr.isWeakSet=function(e){return ts(e)&&"[object WeakSet]"==Tn(e)},Fr.join=function(e,t){return null==e?"":_t.call(e,t)},Fr.kebabCase=Gs,Fr.last=Qo,Fr.lastIndexOf=function(e,t,r){var n=null==e?0:e.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=ps(r))<0?Xt(n+o,0):gr(o,n-1)),t===t?function(e,t,r){for(var n=r+1;n--;)if(e[n]===t)return n;return n}(e,t,o):Ht(e,Wt,o,!0)},Fr.lowerCase=Ws,Fr.lowerFirst=Ys,Fr.lt=fs,Fr.lte=ds,Fr.max=function(e){return e&&e.length?mn(e,nc,An):i},Fr.maxBy=function(e,t){return e&&e.length?mn(e,co(t,2),An):i},Fr.mean=function(e){return Yt(e,nc)},Fr.meanBy=function(e,t){return Yt(e,co(t,2))},Fr.min=function(e){return e&&e.length?mn(e,nc,Ln):i},Fr.minBy=function(e,t){return e&&e.length?mn(e,co(t,2),Ln):i},Fr.stubArray=mc,Fr.stubFalse=vc,Fr.stubObject=function(){return{}},Fr.stubString=function(){return""},Fr.stubTrue=function(){return!0},Fr.multiply=wc,Fr.nth=function(e,t){return e&&e.length?qn(e,ps(t)):i},Fr.noConflict=function(){return mt._===this&&(mt._=je),this},Fr.noop=cc,Fr.now=Aa,Fr.pad=function(e,t,r){e=gs(e);var n=(t=ps(t))?hr(e):0;if(!t||n>=t)return e;var i=(t-n)/2;return Gi(pt(i),r)+e+Gi(ht(i),r)},Fr.padEnd=function(e,t,r){e=gs(e);var n=(t=ps(t))?hr(e):0;return t&&n<t?e+Gi(t-n,r):e},Fr.padStart=function(e,t,r){e=gs(e);var n=(t=ps(t))?hr(e):0;return t&&n<t?Gi(t-n,r)+e:e},Fr.parseInt=function(e,t,r){return r||null==t?t=0:t&&(t=+t),_r(gs(e).replace(ae,""),t||0)},Fr.random=function(e,t,r){if(r&&"boolean"!=typeof r&&_o(e,t,r)&&(t=r=i),r===i&&("boolean"==typeof t?(r=t,t=i):"boolean"==typeof e&&(r=e,e=i)),e===i&&t===i?(e=0,t=1):(e=hs(e),t===i?(t=e,e=0):t=hs(t)),e>t){var n=e;e=t,t=n}if(r||e%1||t%1){var o=wr();return gr(e+o*(t-e+dt("1e-"+((o+"").length-1))),t)}return Xn(e,t)},Fr.reduce=function(e,t,r){var n=Ga(e)?Dt:Kt,i=arguments.length<3;return n(e,co(t,4),r,i,ln)},Fr.reduceRight=function(e,t,r){var n=Ga(e)?Lt:Kt,i=arguments.length<3;return n(e,co(t,4),r,i,hn)},Fr.repeat=function(e,t,r){return t=(r?_o(e,t,r):t===i)?1:ps(t),Kn(gs(e),t)},Fr.replace=function(){var e=arguments,t=gs(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Fr.result=function(e,t,r){var n=-1,o=(t=yi(t,e)).length;for(o||(o=1,e=i);++n<o;){var a=null==e?i:e[Do(t[n])];a===i&&(n=o,a=r),e=Ja(a)?a.call(e):a}return e},Fr.round=xc,Fr.runInContext=e,Fr.sample=function(e){return(Ga(e)?Qr:Jn)(e)},Fr.size=function(e){if(null==e)return 0;if(Ya(e))return ss(e)?hr(e):e.length;var t=mo(e);return t==T||t==O?e.size:Bn(e).length},Fr.snakeCase=Vs,Fr.some=function(e,t,r){var n=Ga(e)?Ft:ii;return r&&_o(e,t,r)&&(t=i),n(e,co(t,3))},Fr.sortedIndex=function(e,t){return oi(e,t)},Fr.sortedIndexBy=function(e,t,r){return ai(e,t,co(r,2))},Fr.sortedIndexOf=function(e,t){var r=null==e?0:e.length;if(r){var n=oi(e,t);if(n<r&&ja(e[n],t))return n}return-1},Fr.sortedLastIndex=function(e,t){return oi(e,t,!0)},Fr.sortedLastIndexBy=function(e,t,r){return ai(e,t,co(r,2),!0)},Fr.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var r=oi(e,t,!0)-1;if(ja(e[r],t))return r}return-1},Fr.startCase=Xs,Fr.startsWith=function(e,t,r){return e=gs(e),r=null==r?0:sn(ps(r),0,e.length),t=ui(t),e.slice(r,r+t.length)==t},Fr.subtract=Ec,Fr.sum=function(e){return e&&e.length?Qt(e,nc):0},Fr.sumBy=function(e,t){return e&&e.length?Qt(e,co(t,2)):0},Fr.template=function(e,t,r){var n=Fr.templateSettings;r&&_o(e,t,r)&&(t=i),e=gs(e),t=ws({},t,n,Zi);var o,a,s=ws({},t.imports,n.imports,Zi),c=Cs(s),u=er(s,c),f=0,d=t.interpolate||xe,l="__p += '",h=Re((t.escape||xe).source+"|"+d.source+"|"+(d===ee?pe:xe).source+"|"+(t.evaluate||xe).source+"|$","g"),p="//# sourceURL="+(Ue.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++st+"]")+"\n";e.replace(h,(function(t,r,n,i,s,c){return n||(n=i),l+=e.slice(f,c).replace(Ee,ar),r&&(o=!0,l+="' +\n__e("+r+") +\n'"),s&&(a=!0,l+="';\n"+s+";\n__p += '"),n&&(l+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),f=c+t.length,t})),l+="';\n";var m=Ue.call(t,"variable")&&t.variable;if(m){if(le.test(m))throw new se("Invalid `variable` option passed into `_.template`")}else l="with (obj) {\n"+l+"\n}\n";l=(a?l.replace(W,""):l).replace(Y,"$1").replace(V,"$1;"),l="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var v=Zs((function(){return Se(c,p+"return "+l).apply(i,u)}));if(v.source=l,Qa(v))throw v;return v},Fr.times=function(e,t){if((e=ps(e))<1||e>p)return[];var r=v,n=gr(e,v);t=co(t),e-=v;for(var i=Jt(n,t);++r<e;)t(r);return i},Fr.toFinite=hs,Fr.toInteger=ps,Fr.toLength=ms,Fr.toLower=function(e){return gs(e).toLowerCase()},Fr.toNumber=vs,Fr.toSafeInteger=function(e){return e?sn(ps(e),-9007199254740991,p):0===e?e:0},Fr.toString=gs,Fr.toUpper=function(e){return gs(e).toUpperCase()},Fr.trim=function(e,t,r){if((e=gs(e))&&(r||t===i))return Zt(e);if(!e||!(t=ui(t)))return e;var n=pr(e),o=pr(t);return wi(n,rr(n,o),nr(n,o)+1).join("")},Fr.trimEnd=function(e,t,r){if((e=gs(e))&&(r||t===i))return e.slice(0,mr(e)+1);if(!e||!(t=ui(t)))return e;var n=pr(e);return wi(n,0,nr(n,pr(t))+1).join("")},Fr.trimStart=function(e,t,r){if((e=gs(e))&&(r||t===i))return e.replace(ae,"");if(!e||!(t=ui(t)))return e;var n=pr(e);return wi(n,rr(n,pr(t))).join("")},Fr.truncate=function(e,t){var r=30,n="...";if(es(t)){var o="separator"in t?t.separator:o;r="length"in t?ps(t.length):r,n="omission"in t?ui(t.omission):n}var a=(e=gs(e)).length;if(sr(e)){var s=pr(e);a=s.length}if(r>=a)return e;var c=r-hr(n);if(c<1)return n;var u=s?wi(s,0,c).join(""):e.slice(0,c);if(o===i)return u+n;if(s&&(c+=u.length-c),os(o)){if(e.slice(c).search(o)){var f,d=u;for(o.global||(o=Re(o.source,gs(me.exec(o))+"g")),o.lastIndex=0;f=o.exec(d);)var l=f.index;u=u.slice(0,l===i?c:l)}}else if(e.indexOf(ui(o),c)!=c){var h=u.lastIndexOf(o);h>-1&&(u=u.slice(0,h))}return u+n},Fr.unescape=function(e){return(e=gs(e))&&Q.test(e)?e.replace(X,vr):e},Fr.uniqueId=function(e){var t=++Be;return gs(e)+t},Fr.upperCase=Ks,Fr.upperFirst=Qs,Fr.each=ga,Fr.eachRight=ya,Fr.first=Yo,sc(Fr,function(){var e={};return _n(Fr,(function(t,r){Ue.call(Fr.prototype,r)||(e[r]=t)})),e}(),{chain:!1}),Fr.VERSION="4.17.21",It(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Fr[e].placeholder=Fr})),It(["drop","take"],(function(e,t){qr.prototype[e]=function(r){r=r===i?1:Xt(ps(r),0);var n=this.__filtered__&&!t?new qr(this):this.clone();return n.__filtered__?n.__takeCount__=gr(r,n.__takeCount__):n.__views__.push({size:gr(r,v),type:e+(n.__dir__<0?"Right":"")}),n},qr.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),It(["filter","map","takeWhile"],(function(e,t){var r=t+1,n=1==r||3==r;qr.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:co(e,3),type:r}),t.__filtered__=t.__filtered__||n,t}})),It(["head","last"],(function(e,t){var r="take"+(t?"Right":"");qr.prototype[e]=function(){return this[r](1).value()[0]}})),It(["initial","tail"],(function(e,t){var r="drop"+(t?"":"Right");qr.prototype[e]=function(){return this.__filtered__?new qr(this):this[r](1)}})),qr.prototype.compact=function(){return this.filter(nc)},qr.prototype.find=function(e){return this.filter(e).head()},qr.prototype.findLast=function(e){return this.reverse().find(e)},qr.prototype.invokeMap=Qn((function(e,t){return"function"==typeof e?new qr(this):this.map((function(r){return On(r,e,t)}))})),qr.prototype.reject=function(e){return this.filter(Ua(co(e)))},qr.prototype.slice=function(e,t){e=ps(e);var r=this;return r.__filtered__&&(e>0||t<0)?new qr(r):(e<0?r=r.takeRight(-e):e&&(r=r.drop(e)),t!==i&&(r=(t=ps(t))<0?r.dropRight(-t):r.take(t-e)),r)},qr.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},qr.prototype.toArray=function(){return this.take(v)},_n(qr.prototype,(function(e,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),n=/^(?:head|last)$/.test(t),o=Fr[n?"take"+("last"==t?"Right":""):t],a=n||/^find/.test(t);o&&(Fr.prototype[t]=function(){var t=this.__wrapped__,s=n?[1]:arguments,c=t instanceof qr,u=s[0],f=c||Ga(t),d=function(e){var t=o.apply(Fr,Bt([e],s));return n&&l?t[0]:t};f&&r&&"function"==typeof u&&1!=u.length&&(c=f=!1);var l=this.__chain__,h=!!this.__actions__.length,p=a&&!l,m=c&&!h;if(!a&&f){t=m?t:new qr(this);var v=e.apply(t,s);return v.__actions__.push({func:ha,args:[d],thisArg:i}),new Hr(v,l)}return p&&m?e.apply(this,s):(v=this.thru(d),p?n?v.value()[0]:v.value():v)})})),It(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Oe[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",n=/^(?:pop|shift)$/.test(e);Fr.prototype[e]=function(){var e=arguments;if(n&&!this.__chain__){var i=this.value();return t.apply(Ga(i)?i:[],e)}return this[r]((function(r){return t.apply(Ga(r)?r:[],e)}))}})),_n(qr.prototype,(function(e,t){var r=Fr[t];if(r){var n=r.name+"";Ue.call(Or,n)||(Or[n]=[]),Or[n].push({name:t,func:r})}})),Or[ji(i,2).name]=[{name:"wrapper",func:i}],qr.prototype.clone=function(){var e=new qr(this.__wrapped__);return e.__actions__=Ii(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=Ii(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=Ii(this.__views__),e},qr.prototype.reverse=function(){if(this.__filtered__){var e=new qr(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},qr.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,r=Ga(e),n=t<0,i=r?e.length:0,o=function(e,t,r){var n=-1,i=r.length;for(;++n<i;){var o=r[n],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=gr(t,e+a);break;case"takeRight":e=Xt(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=o.end,c=s-a,u=n?s:a-1,f=this.__iteratees__,d=f.length,l=0,h=gr(c,this.__takeCount__);if(!r||!n&&i==c&&h==c)return pi(e,this.__actions__);var p=[];e:for(;c--&&l<h;){for(var m=-1,v=e[u+=t];++m<d;){var b=f[m],g=b.iteratee,y=b.type,_=g(v);if(2==y)v=_;else if(!_){if(1==y)continue e;break e}}p[l++]=v}return p},Fr.prototype.at=pa,Fr.prototype.chain=function(){return la(this)},Fr.prototype.commit=function(){return new Hr(this.value(),this.__chain__)},Fr.prototype.next=function(){this.__values__===i&&(this.__values__=ls(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?i:this.__values__[this.__index__++]}},Fr.prototype.plant=function(e){for(var t,r=this;r instanceof zr;){var n=Fo(r);n.__index__=0,n.__values__=i,t?o.__wrapped__=n:t=n;var o=n;r=r.__wrapped__}return o.__wrapped__=e,t},Fr.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof qr){var t=e;return this.__actions__.length&&(t=new qr(this)),(t=t.reverse()).__actions__.push({func:ha,args:[ea],thisArg:i}),new Hr(t,this.__chain__)}return this.thru(ea)},Fr.prototype.toJSON=Fr.prototype.valueOf=Fr.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},Fr.prototype.first=Fr.prototype.head,Je&&(Fr.prototype[Je]=function(){return this}),Fr}();mt._=br,(n=function(){return br}.call(t,r,t,e))===i||(e.exports=n)}.call(this)},566:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.filetypeextension=t.filetypemime=t.filetypename=t.filetypeinfo=void 0;const i=n(r(1)),o=r(2684),a=i.default();t.filetypeinfo=e=>{let t=a;for(const r of Object.keys(t.offset)){const t=o.fromHex(r);if(t>=e.length)continue;const n=a.offset[r],i=s(t,e,n);if(i.length>0)return i}return null===t.noOffset?[]:s(0,e,t.noOffset)};const s=(e,t,r)=>{let n=r,i=[];for(;;){const r=o.toHex(t[e]);if(n=n.bytes["?"]&&!n.bytes[r]?n.bytes["?"]:n.bytes[r],!n)return i;n&&n.matches&&(i=n.matches.slice(0)),e+=1}};t.default=t.filetypeinfo;t.filetypename=e=>t.filetypeinfo(e).map((e=>e.typename));t.filetypemime=e=>t.filetypeinfo(e).map((e=>e.mime?e.mime:null)).filter((e=>null!==e));t.filetypeextension=e=>t.filetypeinfo(e).map((e=>e.extension?e.extension:null)).filter((e=>null!==e))},1:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(2684),i=r(2674);let o={noOffset:null,offset:{}};const a=(e,t,r,a)=>{if(a){const s=o.offset[n.toHex(a)];if(s){const c=i.merge(i.createNode(e,t.map((e=>e.toLowerCase())),r),{...s});o.offset[n.toHex(a)]=c}else o.offset[n.toHex(a)]=i.createComplexNode(e,t.map((e=>e.toLowerCase())),r)}else null===o.noOffset?o.noOffset=i.createComplexNode(e,t.map((e=>e.toLowerCase())),r):o.noOffset=i.merge(i.createNode(e,t.map((e=>e.toLowerCase())),r),o.noOffset)};a("gif",["0x47","0x49","0x46","0x38","0x37","0x61"],{mime:"image/gif",extension:"gif"}),a("gif",["0x47","0x49","0x46","0x38","0x39","0x61"],{mime:"image/gif",extension:"gif"}),a("jpg",["0xFF","0xD8","0xFF","0xDB"],{mime:"image/jpeg",extension:"jpeg"}),a("jpg",["0xFF","0xD8","0xFF","0xE0","?","?","0x4A","0x46","0x49","0x46","0x00","0x01"],{mime:"image/jpeg",extension:"jpeg"}),a("jpg",["0xFF","0xD8","0xFF","0xE1","?","?","0x45","0x78","0x69","0x66","0x00","0x00"],{mime:"image/jpeg",extension:"jpeg"}),a("webp",["0x52","0x49","0x46","0x46","?","?","?","?","0x57","0x45","0x42","0x50"],{mime:"image/webp",extension:"webp"}),a("heif",["0x66","0x74","0x79","0x70","0x6D","0x69","0x66","0x31"],{mime:"image/heif",extension:"heif"},4),a("heif",["0x66","0x74","0x79","0x70","0x68","0x65","0x69","0x63"],{mime:"image/heif",extension:"heic"},4),a("rpm",["0xed","0xab","0xee","0xdb"]),a("bin",["0x53","0x50","0x30","0x31"],{mime:"application/octet-stream",extension:"bin"}),a("pic",["0x00"]),a("pif",["0x00"]),a("sea",["0x00"]),a("ytr",["0x00"]),a("mp4",["0x66","0x74","0x79","0x70"],{mime:"video/mp4",extension:"mp4"},4),a("ttf",["0x00","0x01","0x00","0x00","0x00"],{mime:"font/ttf",extension:"ttf"}),a("otf",["0x4F","0x54","0x54","0x4F"],{mime:"font/otf",extension:"otf"}),a("eot",["0x50","0x4C"],{mime:"application/vnd.ms-fontobject",extension:"eot"}),a("woff",["0x77","0x4F","0x46","0x46"],{mime:"font/woff",extension:"woff"}),a("woff2",["0x77","0x4F","0x46","0x32"],{mime:"font/woff2",extension:"woff2"}),a("pdb",["0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00"]),a("dba",["0xBE","0xBA","0xFE","0xCA"]),a("dba2",["0x00","0x01","0x42","0x44"]),a("tda",["0x00","0x01","0x44","0x54"]),a("tda2",["0x00","0x01","0x00","0x00"]),a("ico",["0x00","0x00","0x01","0x00"],{mime:"image/x-icon",extension:"ico"}),a("3gp",["0x66","0x74","0x79","0x70","0x33","0x67"]),a("z",["0x1F","0x9D"]),a("tar.z",["0x1F","0xA0"]),a("bac",["0x42","0x41","0x43","0x4B","0x4D","0x49","0x4B","0x45","0x44","0x49","0x53","0x4B"]),a("bz2",["0x42","0x5A","0x68"],{mime:"application/x-bzip2",extension:"bz2"}),a("tif",["0x49","0x49","0x2A","0x00"],{mime:"image/tiff",extension:"tif"}),a("tiff",["0x4D","0x4D","0x00","0x2A"],{mime:"image/tiff",extension:"tiff"}),a("cr2",["0x49","0x49","0x2A","0x00","0x10","0x00","0x00","0x00","0x43","0x52"]),a("cin",["0x80","0x2A","0x5F","0xD7"]),a("cin1",["0x52","0x4E","0x43","0x01"]),a("cin2",["0x52","0x4E","0x43","0x02"]),a("dpx",["0x53","0x44","0x50","0x58"]),a("dpx2",["0x58","0x50","0x44","0x53"]),a("exr",["0x76","0x2F","0x31","0x01"]),a("bpg",["0x42","0x50","0x47","0xFB"]),a("ilbm",["0x46","0x4F","0x52","0x4D","?","?","?","?","0x49","0x4C","0x42","0x4D"]),a("8svx",["0x46","0x4F","0x52","0x4D","?","?","?","?","0x38","0x53","0x56","0x58"]),a("acbm",["0x46","0x4F","0x52","0x4D","?","?","?","?","0x41","0x43","0x42","0x4D"]),a("anbm",["0x46","0x4F","0x52","0x4D","?","?","?","?","0x41","0x4E","0x42","0x4D"]),a("anim",["0x46","0x4F","0x52","0x4D","?","?","?","?","0x41","0x4E","0x49","0x4D"]),a("faxx",["0x46","0x4F","0x52","0x4D","?","?","?","?","0x46","0x41","0x58","0x58"]),a("ftxt",["0x46","0x4F","0x52","0x4D","?","?","?","?","0x46","0x54","0x58","0x54"]),a("smus",["0x46","0x4F","0x52","0x4D","?","?","?","?","0x53","0x4D","0x55","0x53"]),a("cmus",["0x46","0x4F","0x52","0x4D","?","?","?","?","0x43","0x4D","0x55","0x53"]),a("yuvn",["0x46","0x4F","0x52","0x4D","?","?","?","?","0x59","0x55","0x56","0x4E"]),a("iff",["0x46","0x4F","0x52","0x4D","?","?","?","?","0x46","0x41","0x4E","0x54"]),a("aiff",["0x46","0x4F","0x52","0x4D","?","?","?","?","0x41","0x49","0x46","0x46"],{mime:"audio/x-aiff",extension:"aiff"}),a("idx",["0x49","0x4E","0x44","0x58"]),a("lz",["0x4C","0x5A","0x49","0x50"]),a("exe",["0x4D","0x5A"]),a("zip",["0x50","0x4B","0x03","0x04"],{mime:"application/zip",extension:"zip"}),a("zip",["0x50","0x4B","0x05","0x06"],{mime:"application/zip",extension:"zip"}),a("zip",["0x50","0x4B","0x07","0x08"],{mime:"application/zip",extension:"zip"}),a("jar",["0x50","0x4B","0x03","0x04"],{mime:"application/java-archive",extension:"jar"}),a("jar",["0x50","0x4B","0x05","0x06"],{mime:"application/java-archive",extension:"jar"}),a("jar",["0x50","0x4B","0x07","0x08"],{mime:"application/java-archive",extension:"jar"}),a("odt",["0x50","0x4B","0x03","0x04"],{mime:"application/vnd.oasis.opendocument.text",extension:"odt"}),a("odt",["0x50","0x4B","0x05","0x06"],{mime:"application/vnd.oasis.opendocument.text",extension:"odt"}),a("odt",["0x50","0x4B","0x07","0x08"],{mime:"application/vnd.oasis.opendocument.text",extension:"odt"}),a("ods",["0x50","0x4B","0x03","0x04"],{mime:"application/vnd.oasis.opendocument.spreadsheet",extension:"ods"}),a("ods",["0x50","0x4B","0x05","0x06"],{mime:"application/vnd.oasis.opendocument.spreadsheet",extension:"ods"}),a("ods",["0x50","0x4B","0x07","0x08"],{mime:"application/vnd.oasis.opendocument.spreadsheet",extension:"ods"}),a("odp",["0x50","0x4B","0x03","0x04"],{mime:"application/vnd.oasis.opendocument.presentation",extension:"odp"}),a("odp",["0x50","0x4B","0x05","0x06"],{mime:"application/vnd.oasis.opendocument.presentation",extension:"odp"}),a("odp",["0x50","0x4B","0x07","0x08"],{mime:"application/vnd.oasis.opendocument.presentation",extension:"odp"}),a("docx",["0x50","0x4B","0x03","0x04"],{mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",extension:"docx"}),a("docx",["0x50","0x4B","0x05","0x06"],{mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",extension:"docx"}),a("docx",["0x50","0x4B","0x07","0x08"],{mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",extension:"docx"}),a("xlsx",["0x50","0x4B","0x03","0x04"],{mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",extension:"xlsx"}),a("xlsx",["0x50","0x4B","0x05","0x06"],{mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",extension:"xlsx"}),a("xlsx",["0x50","0x4B","0x07","0x08"],{mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",extension:"xlsx"}),a("pptx",["0x50","0x4B","0x03","0x04"],{mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation",extension:"pptx"}),a("pptx",["0x50","0x4B","0x05","0x06"],{mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation",extension:"pptx"}),a("pptx",["0x50","0x4B","0x07","0x08"],{mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation",extension:"pptx"}),a("vsdx",["0x50","0x4B","0x03","0x04"],{mime:"application/vnd.ms-visio.drawing",extension:"vsdx"}),a("vsdx",["0x50","0x4B","0x05","0x06"],{mime:"application/vnd.ms-visio.drawing",extension:"vsdx"}),a("vsdx",["0x50","0x4B","0x07","0x08"],{mime:"application/vnd.ms-visio.drawing",extension:"vsdx"}),a("apk",["0x50","0x4B","0x03","0x04"],{mime:"application/vnd.android.package-archive",extension:"apk"}),a("apk",["0x50","0x4B","0x05","0x06"],{mime:"application/vnd.android.package-archive",extension:"apk"}),a("apk",["0x50","0x4B","0x07","0x08"],{mime:"application/vnd.android.package-archive",extension:"apk"}),a("aar",["0x50","0x4B","0x03","0x04"],{mime:"application/vnd.android.package-archive",extension:"aar"}),a("aar",["0x50","0x4B","0x05","0x06"],{mime:"application/vnd.android.package-archive",extension:"aar"}),a("aar",["0x50","0x4B","0x07","0x08"],{mime:"application/vnd.android.package-archive",extension:"aar"}),a("rar",["0x52","0x61","0x72","0x21","0x1A","0x07","0x00"],{mime:"application/vnd.rar",extension:"rar"}),a("rar",["0x52","0x61","0x72","0x21","0x1A","0x07","0x01","0x00"],{mime:"application/vnd.rar",extension:"rar"}),a("rar",["0x7F","0x45","0x4C","0x46"],{mime:"application/vnd.rar",extension:"rar"}),a("png",["0x89","0x50","0x4E","0x47","0x0D","0x0A","0x1A","0x0A"],{mime:"image/png",extension:"png"}),a("apng",["0x89","0x50","0x4E","0x47","0x0D","0x0A","0x1A","0x0A"],{mime:"image/apng",extension:"apng"}),a("class",["0xCA","0xFE","0xBA","0xBE"]),a("class",["0xEF","0xBB","0xBF"]),a("class",["0xFE","0xed","0xFA","0xCE"],void 0,4096),a("class",["0xFE","0xed","0xFA","0xCF"],void 0,4096),a("class",["0xCE","0xFA","0xed","0xFE"]),a("class",["0xCF","0xFA","0xed","0xFE"]),a("class",["0xFF","0xFE"]),a("class",["0xFF","0xFE"]),a("class",["0xFF","0xFE","0x00","0x00"]),a("ps",["0x25","0x21","0x50","0x53"]),a("pdf",["0x25","0x50","0x44","0x46"],{mime:"application/pdf",extension:"pdf"}),a("asf",["0x30","0x26","0xB2","0x75","0x8E","0x66","0xCF","0x11","0xA6","0xD9","0x00","0xAA","0x00","0x62","0xCE","0x6C"]),a("wma",["0x30","0x26","0xB2","0x75","0x8E","0x66","0xCF","0x11","0xA6","0xD9","0x00","0xAA","0x00","0x62","0xCE","0x6C"]),a("wmv",["0x30","0x26","0xB2","0x75","0x8E","0x66","0xCF","0x11","0xA6","0xD9","0x00","0xAA","0x00","0x62","0xCE","0x6C"]),a("deploymentimage",["0x24","0x53","0x44","0x49","0x30","0x30","0x30","0x31"]),a("ogv",["0x4F","0x67","0x67","0x53","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","0x80","0x74","0x68","0x65","0x6F","0x72","0x61"],{mime:"video/ogg",extension:"ogv"}),a("ogm",["0x4F","0x67","0x67","0x53","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","0x01","0x76","0x69","0x64","0x65","0x6F","0x00"],{mime:"video/ogg",extension:"ogm"}),a("oga",["0x4F","0x67","0x67","0x53","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","0x7F","0x46","0x4C","0x41","0x43"],{mime:"audio/ogg",extension:"oga"}),a("spx",["0x4F","0x67","0x67","0x53","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","0x53","0x70","0x65","0x65","0x78","0x20","0x20"],{mime:"audio/ogg",extension:"spx"}),a("ogg",["0x4F","0x67","0x67","0x53","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","0x01","0x76","0x6F","0x72","0x62","0x69","0x73"],{mime:"audio/ogg",extension:"ogg"}),a("ogx",["0x4F","0x67","0x67","0x53"],{mime:"application/ogg",extension:"ogx"}),a("psd",["0x38","0x42","0x50","0x53"],{mime:"application/x-photoshop",extension:"psd"}),a("clip",["0x43","0x53","0x46","0x43","0x48","0x55","0x4e","0x4b"]),a("wav",["0x52","0x49","0x46","0x46","?","?","?","?","0x57","0x41","0x56","0x45"],{mime:"audio/x-wav",extension:"wav"}),a("avi",["0x52","0x49","0x46","0x46","?","?","?","?","0x41","0x56","0x49","0x20"],{mime:"video/x-msvideo",extension:"avi"}),a("mp3",["0xFF","0xFB"],{mime:"audio/mpeg",extension:"mp3"}),a("mp3",["0xFF","0xF3"],{mime:"audio/mpeg",extension:"mp3"}),a("mp3",["0xFF","0xF2"],{mime:"audio/mpeg",extension:"mp3"}),a("mp3",["0x49","0x44","0x33"],{mime:"audio/mpeg",extension:"mp3"}),a("bmp",["0x42","0x4D"],{mime:"image/bmp",extension:"bmp"}),a("iso",["0x43","0x44","0x30","0x30","0x31"]),a("flac",["0x66","0x4C","0x61","0x43"]),a("mid",["0x4D","0x54","0x68","0x64"],{mime:"audio/midi",extension:"mid"}),a("midi",["0x4D","0x54","0x68","0x64"],{mime:"audio/midi",extension:"midi"}),a("doc",["0xD0","0xCF","0x11","0xE0","0xA1","0xB1","0x1A","0xE1"],{mime:"application/msword",extension:"doc"}),a("xls",["0xD0","0xCF","0x11","0xE0","0xA1","0xB1","0x1A","0xE1"],{mime:"application/vnd.ms-excel",extension:"xls"}),a("ppt",["0xD0","0xCF","0x11","0xE0","0xA1","0xB1","0x1A","0xE1"],{mime:"application/vnd.ms-powerpoint",extension:"ppt"}),a("msg",["0xD0","0xCF","0x11","0xE0","0xA1","0xB1","0x1A","0xE1"]),a("dex",["0x64","0x65","0x78","0x0A","0x30","0x33","0x35","0x00"]),a("vmdk",["0x4B","0x44","0x4D"]),a("crx",["0x43","0x72","0x32","0x34"]),a("fh8",["0x41","0x47","0x44","0x33"]),a("cwk",["0x05","0x07","0x00","0x00","0x42","0x4F","0x42","0x4F","0x05","0x07","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x01"]),a("cwk",["0x06","0x07","0xE1","0x00","0x42","0x4F","0x42","0x4F","0x06","0x07","0xE1","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x00","0x01"]),a("toast",["0x45","0x52","0x02","0x00","0x00","0x00"]),a("toast",["0x8B","0x45","0x52","0x02","0x00","0x00","0x00"]),a("dmg",["0x78","0x01","0x73","0x0D","0x62","0x62","0x60"]),a("xar",["0x78","0x61","0x72","0x21"]),a("dat",["0x50","0x4D","0x4F","0x43","0x43","0x4D","0x4F","0x43"]),a("nes",["0x4E","0x45","0x53","0x1A"]),a("tar",["0x75","0x73","0x74","0x61","0x72","0x00","0x30","0x30"],void 0,257),a("tar",["0x75","0x73","0x74","0x61","0x72","0x20","0x20","0x00"],void 0,257),a("tox",["0x74","0x6F","0x78","0x33"]),a("mlv",["0x4D","0x4C","0x56","0x49"]),a("windowsupdate",["0x44","0x43","0x4D","0x01","0x50","0x41","0x33","0x30"]),a("7z",["0x37","0x7A","0xBC","0xAF","0x27","0x1C"],{mime:"application/x-7z-compressed",extension:"7z"}),a("gz",["0x1F","0x8B"],{mime:"application/gzip",extension:"gz"}),a("tar.gz",["0x1F","0x8B"],{mime:"application/gzip",extension:"tar.gz"}),a("xz",["0xFD","0x37","0x7A","0x58","0x5A","0x00","0x00"],{mime:"application/gzip",extension:"xz"}),a("tar.xz",["0xFD","0x37","0x7A","0x58","0x5A","0x00","0x00"],{mime:"application/gzip",extension:"tar.xz"}),a("lz2",["0x04","0x22","0x4D","0x18"]),a("cab",["0x4D","0x53","0x43","0x46"]),a("mkv",["0x1A","0x45","0xDF","0xA3"],{mime:"video/x-matroska",extension:"mkv"}),a("mka",["0x1A","0x45","0xDF","0xA3"],{mime:"audio/x-matroska",extension:"mka"}),a("mks",["0x1A","0x45","0xDF","0xA3"],{mime:"video/x-matroska",extension:"mks"}),a("mk3d",["0x1A","0x45","0xDF","0xA3"]),a("webm",["0x1A","0x45","0xDF","0xA3"],{mime:"audio/webm",extension:"webm"}),a("dcm",["0x44","0x49","0x43","0x4D"],void 0,128),a("xml",["0x3C","0x3f","0x78","0x6d","0x6C","0x20"],{mime:"application/xml",extension:"xml"}),a("wasm",["0x00","0x61","0x73","0x6d"],{mime:"application/wasm",extension:"wasm"}),a("lep",["0xCF","0x84","0x01"]),a("swf",["0x43","0x57","0x53"],{mime:"application/x-shockwave-flash",extension:"swf"}),a("swf",["0x46","0x57","0x53"],{mime:"application/x-shockwave-flash",extension:"swf"}),a("deb",["0x21","0x3C","0x61","0x72","0x63","0x68","0x3E"]),a("rtf",["0x7B","0x5C","0x72","0x74","0x66","0x31"],{mime:"application/rtf",extension:"rtf"}),a("m2p",["0x00","0x00","0x01","0xBA"]),a("vob",["0x00","0x00","0x01","0xBA"]),a("mpg",["0x00","0x00","0x01","0xBA"],{mime:"video/mpeg",extension:"mpg"}),a("mpeg",["0x00","0x00","0x01","0xBA"],{mime:"video/mpeg",extension:"mpeg"}),a("mpeg",["0x47"],{mime:"video/mpeg",extension:"mpeg"}),a("mpeg",["0x00","0x00","0x01","0xB3"],{mime:"video/mpeg",extension:"mpeg"}),a("mov",["0x66","0x72","0x65","0x65"],{mime:"video/quicktime",extension:"mov"},4),a("mov",["0x6D","0x64","0x61","0x74"],{mime:"video/quicktime",extension:"mov"},4),a("mov",["0x6D","0x6F","0x6F","0x76"],{mime:"video/quicktime",extension:"mov"},4),a("mov",["0x77","0x69","0x64","0x65"],{mime:"video/quicktime",extension:"mov"},4),a("mov",["0x66","0x74","0x79","0x70","0x71","0x74"],{mime:"video/quicktime",extension:"mov"},4),a("hl2demo",["0x48","0x4C","0x32","0x44","0x45","0x4D","0x4F"]),a("txt",["0xEF","0xBB","0xBF"],{mime:"text/plain; charset=UTF-8",extension:"txt"}),a("txt",["0xFF","0xFE"],{mime:"text/plain; charset=UTF-16LE",extension:"txt"}),a("txt",["0xFE","0xFF"],{mime:"text/plain; charset=UTF-16BE",extension:"txt"}),a("txt",["0xFF","0xFE","0x00","0x00"],{mime:"text/plain; charset=UTF-32LE",extension:"txt"}),a("txt",["0x00","0x00","0xFE","0xFF"],{mime:"text/plain; charset=UTF-32BE",extension:"txt"}),a("SubRip",["0x31","0x0D","0x0A","0x30","0x30","0x3A"],{mime:"application/x-subrip",extension:"srt"}),a("WebVTT",["0xEF","0xBB","0xBF","0x57","0x45","0x42","0x56","0x54","0x54","0x0A"],{mime:"text/vtt",extension:"vtt"}),a("WebVTT",["0xEF","0xBB","0xBF","0x57","0x45","0x42","0x56","0x54","0x54","0x0D"],{mime:"text/vtt",extension:"vtt"}),a("WebVTT",["0xEF","0xBB","0xBF","0x57","0x45","0x42","0x56","0x54","0x54","0x20"],{mime:"text/vtt",extension:"vtt"}),a("WebVTT",["0xEF","0xBB","0xBF","0x57","0x45","0x42","0x56","0x54","0x54","0x09"],{mime:"text/vtt",extension:"vtt"}),a("WebVTT",["0x57","0x45","0x42","0x56","0x54","0x54","0x0A"],{mime:"text/vtt",extension:"vtt"}),a("WebVTT",["0x57","0x45","0x42","0x56","0x54","0x54","0x0D"],{mime:"text/vtt",extension:"vtt"}),a("WebVTT",["0x57","0x45","0x42","0x56","0x54","0x54","0x20"],{mime:"text/vtt",extension:"vtt"}),a("WebVTT",["0x57","0x45","0x42","0x56","0x54","0x54","0x09"],{mime:"text/vtt",extension:"vtt"}),a("Json",["0x7B"],{mime:"application/json",extension:".json"}),a("Json",["0x5B"],{mime:"application/json",extension:".json"}),a("ELF",["0x7F","0x45","0x4C","0x46"],{mime:"application/x-executable",extension:".elf"}),a("Mach-O",["0xFE","0xED","0xFA","0xC"],{mime:"application/x-mach-binary",extension:".o"}),a("Mach-O",["0xFE","0xED","0xFA","0xCF"],{mime:"application/x-executable",extension:"elf"}),a("EML",["0x52","0x65","0x63","0x65","0x69","0x76","0x65","0x64","0x3A"],{mime:"message/rfc822",extension:".eml"}),t.default=()=>o},2684:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromHex=t.toHex=void 0;const r=e=>new Number(e).toString(16).toLowerCase();t.toHex=e=>"0x".concat(1===r(e).length?"0"+r(e):r(e));t.fromHex=e=>new Number(e)},2674:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createComplexNode=t.createNode=t.merge=void 0;const r=e=>({typename:e.typename,mime:e.info.mime,extension:e.info.extension}),n=e=>e[0],i=e=>e.slice(1,e.length);t.merge=(e,o)=>{if(0===e.bytes.length)return o;const a=n(e.bytes),s=i(e.bytes);if(((e,t)=>e&&0===t.length)(o.bytes[a],s)){const t=o.bytes[a];return o.bytes[a]={...t,matches:[...t.matches?t.matches:[],r(e)]},o}return o.bytes[a]?(o.bytes[a]=t.merge(t.createNode(e.typename,s,e.info),o.bytes[a]),o):(o.bytes[a]||(o.bytes[a]={...o.bytes[a],...t.createComplexNode(e.typename,s,e.info)}),o)};t.createNode=(e,t,r)=>({typename:e,bytes:t,info:r||{}});t.createComplexNode=(e,o,a)=>{let s={bytes:{},matches:void 0};const c=n(o),u=i(o);return 0===o.length?{matches:[r({typename:e,info:a?{extension:a.extension,mime:a.mime}:{}})],bytes:{}}:(s.bytes[c]=t.createComplexNode(e,u,a),s)}},6962:(e,t)=>{"use strict";var r=Object.prototype.hasOwnProperty;function n(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return null}}function i(e){try{return encodeURIComponent(e)}catch(t){return null}}t.stringify=function(e,t){t=t||"";var n,o,a=[];for(o in"string"!==typeof t&&(t="?"),e)if(r.call(e,o)){if((n=e[o])||null!==n&&undefined!==n&&!isNaN(n)||(n=""),o=i(o),n=i(n),null===o||null===n)continue;a.push(o+"="+n)}return a.length?t+a.join("&"):""},t.parse=function(e){for(var t,r=/([^=?#&]+)=?([^&]*)/g,i={};t=r.exec(e);){var o=n(t[1]),a=n(t[2]);null===o||null===a||o in i||(i[o]=a)}return i}},3841:e=>{"use strict";e.exports=function(e,t){if(t=t.split(":")[0],!(e=+e))return!1;switch(t){case"http":case"ws":return 80!==e;case"https":case"wss":return 443!==e;case"ftp":return 21!==e;case"gopher":return 70!==e;case"file":return!1}return 0!==e}},5915:(e,t,r)=>{"use strict";var n=r(3841),i=r(6962),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,u=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,f=/^[a-zA-Z]:/;function d(e){return(e||"").toString().replace(o,"")}var l=[["#","hash"],["?","query"],function(e,t){return m(t.protocol)?e.replace(/\\/g,"/"):e},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],h={hash:1,query:1};function p(e){var t,n=("undefined"!==typeof window?window:"undefined"!==typeof r.g?r.g:"undefined"!==typeof self?self:{}).location||{},i={},o=typeof(e=e||n);if("blob:"===e.protocol)i=new b(unescape(e.pathname),{});else if("string"===o)for(t in i=new b(e,{}),h)delete i[t];else if("object"===o){for(t in e)t in h||(i[t]=e[t]);void 0===i.slashes&&(i.slashes=s.test(e.href))}return i}function m(e){return"file:"===e||"ftp:"===e||"http:"===e||"https:"===e||"ws:"===e||"wss:"===e}function v(e,t){e=(e=d(e)).replace(a,""),t=t||{};var r,n=u.exec(e),i=n[1]?n[1].toLowerCase():"",o=!!n[2],s=!!n[3],c=0;return o?s?(r=n[2]+n[3]+n[4],c=n[2].length+n[3].length):(r=n[2]+n[4],c=n[2].length):s?(r=n[3]+n[4],c=n[3].length):r=n[4],"file:"===i?c>=2&&(r=r.slice(2)):m(i)?r=n[4]:i?o&&(r=r.slice(2)):c>=2&&m(t.protocol)&&(r=n[4]),{protocol:i,slashes:o||m(i),slashesCount:c,rest:r}}function b(e,t,r){if(e=(e=d(e)).replace(a,""),!(this instanceof b))return new b(e,t,r);var o,s,c,u,h,g,y=l.slice(),_=typeof t,w=this,x=0;for("object"!==_&&"string"!==_&&(r=t,t=null),r&&"function"!==typeof r&&(r=i.parse),o=!(s=v(e||"",t=p(t))).protocol&&!s.slashes,w.slashes=s.slashes||o&&t.slashes,w.protocol=s.protocol||t.protocol||"",e=s.rest,("file:"===s.protocol&&(2!==s.slashesCount||f.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!m(w.protocol)))&&(y[3]=[/(.*)/,"pathname"]);x<y.length;x++)"function"!==typeof(u=y[x])?(c=u[0],g=u[1],c!==c?w[g]=e:"string"===typeof c?~(h="@"===c?e.lastIndexOf(c):e.indexOf(c))&&("number"===typeof u[2]?(w[g]=e.slice(0,h),e=e.slice(h+u[2])):(w[g]=e.slice(h),e=e.slice(0,h))):(h=c.exec(e))&&(w[g]=h[1],e=e.slice(0,h.index)),w[g]=w[g]||o&&u[3]&&t[g]||"",u[4]&&(w[g]=w[g].toLowerCase())):e=u(e,w);r&&(w.query=r(w.query)),o&&t.slashes&&"/"!==w.pathname.charAt(0)&&(""!==w.pathname||""!==t.pathname)&&(w.pathname=function(e,t){if(""===e)return t;for(var r=(t||"/").split("/").slice(0,-1).concat(e.split("/")),n=r.length,i=r[n-1],o=!1,a=0;n--;)"."===r[n]?r.splice(n,1):".."===r[n]?(r.splice(n,1),a++):a&&(0===n&&(o=!0),r.splice(n,1),a--);return o&&r.unshift(""),"."!==i&&".."!==i||r.push(""),r.join("/")}(w.pathname,t.pathname)),"/"!==w.pathname.charAt(0)&&m(w.protocol)&&(w.pathname="/"+w.pathname),n(w.port,w.protocol)||(w.host=w.hostname,w.port=""),w.username=w.password="",w.auth&&(~(h=w.auth.indexOf(":"))?(w.username=w.auth.slice(0,h),w.username=encodeURIComponent(decodeURIComponent(w.username)),w.password=w.auth.slice(h+1),w.password=encodeURIComponent(decodeURIComponent(w.password))):w.username=encodeURIComponent(decodeURIComponent(w.auth)),w.auth=w.password?w.username+":"+w.password:w.username),w.origin="file:"!==w.protocol&&m(w.protocol)&&w.host?w.protocol+"//"+w.host:"null",w.href=w.toString()}b.prototype={set:function(e,t,r){var o=this;switch(e){case"query":"string"===typeof t&&t.length&&(t=(r||i.parse)(t)),o[e]=t;break;case"port":o[e]=t,n(t,o.protocol)?t&&(o.host=o.hostname+":"+t):(o.host=o.hostname,o[e]="");break;case"hostname":o[e]=t,o.port&&(t+=":"+o.port),o.host=t;break;case"host":o[e]=t,c.test(t)?(t=t.split(":"),o.port=t.pop(),o.hostname=t.join(":")):(o.hostname=t,o.port="");break;case"protocol":o.protocol=t.toLowerCase(),o.slashes=!r;break;case"pathname":case"hash":if(t){var a="pathname"===e?"/":"#";o[e]=t.charAt(0)!==a?a+t:t}else o[e]=t;break;case"username":case"password":o[e]=encodeURIComponent(t);break;case"auth":var s=t.indexOf(":");~s?(o.username=t.slice(0,s),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=t.slice(s+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(t))}for(var u=0;u<l.length;u++){var f=l[u];f[4]&&(o[f[1]]=o[f[1]].toLowerCase())}return o.auth=o.password?o.username+":"+o.password:o.username,o.origin="file:"!==o.protocol&&m(o.protocol)&&o.host?o.protocol+"//"+o.host:"null",o.href=o.toString(),o},toString:function(e){e&&"function"===typeof e||(e=i.stringify);var t,r=this,n=r.host,o=r.protocol;o&&":"!==o.charAt(o.length-1)&&(o+=":");var a=o+(r.protocol&&r.slashes||m(r.protocol)?"//":"");return r.username?(a+=r.username,r.password&&(a+=":"+r.password),a+="@"):r.password?(a+=":"+r.password,a+="@"):"file:"!==r.protocol&&m(r.protocol)&&!n&&"/"!==r.pathname&&(a+="@"),(":"===n[n.length-1]||c.test(r.hostname)&&!r.port)&&(n+=":"),a+=n+r.pathname,(t="object"===typeof r.query?e(r.query):r.query)&&(a+="?"!==t.charAt(0)?"?"+t:t),r.hash&&(a+=r.hash),a}},b.extractProtocol=v,b.location=p,b.trimLeft=d,b.qs=i,e.exports=b}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,loaded:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";let e=function(e){return e.TO_CONTENT_SCRAP_AUTO_BY_URL="TO_CONTENT_SCRAP_AUTO_BY_URL",e.TO_BACKGROUND_SET_1688_QUERY="TO_BACKGROUND_SET_1688_QUERY",e.GET_PERCENTY_TOKEN="GET_PERCENTY_TOKEN",e.INJECT_RESULT="INJECT_RESULT",e.OPEN_TAB_AND_SCRAP="OPEN_TAB_AND_SCRAP",e.OPEN_TAB_AND_SCRAP_FINISH="OPEN_TAB_AND_SCRAP_FINISH",e.SCRAP_AUTO="SCRAP_AUTO",e.SCRAP_AUTO_FINISH="SCRAP_AUTO_FINISH",e.SCRAP_AUTO_FINISH_TO_LIST_PAGE="SCRAP_AUTO_FINISH_TO_LIST_PAGE",e.OPEN_PERCENTY_TAB="OPEN_PERCENTY_TAB",e.GET_CURRENT_TAB_ID_FROM_CONTENTS_SCRIPT="GET_CURRENT_TAB_ID_FROM_CONTENTS_SCRIPT",e.CLOSE_TAB="CLOSE_TAB",e.SCRAP_SUCCESS_TO_PERCENTY_WEB="SCRAP_SUCCESS_TO_PERCENTY_WEB",e.SCRAP_SUCCESS_TO_PERCENTY_WEB_TAB="SCRAP_SUCCESS_TO_PERCENTY_WEB_TAB",e.EXTENSION_INSTALLED_TO_PERCENTY_WEB_TAB="EXTENSION_INSTALLED_TO_PERCENTY_WEB_TAB",e.FETCH_RAW="FETCH_RAW",e.GET_NAVER_SHOPPING_LENS="GET_NAVER_SHOPPING_LENS",e.IMG_SEARCH="IMG_SEARCH",e.IMG_SEARCH_TAB="IMG_SEARCH_TAB",e.IMG_SEARCH_RESULT="IMG_SEARCH_RESULT",e.IMAGE_SEARCH_POSITION="IMAGE_SEARCH_POSITION",e.IMAGE_SEARCH_BTN_POSITION="IMAGE_SEARCH_BTN_POSITION",e.IMAGE_SEARCH_RESULT="IMAGE_SEARCH_RESULT",e.IMAGE_SEARCH_MODAL_OPEN="IMAGE_SEARCH_MODAL_OPEN",e.UPDATE_DECLARATIVE_NET_REQUEST_RULES="UPDATE_DECLARATIVE_NET_REQUEST_RULES",e.GET_SHEIN_THUMBNAIL_IMGS="GET_SHEIN_THUMBNAIL_IMGS",e.GET_IMG_BLOB_URL="GET_IMG_BLOB_URL",e.TO_DELETE_COOKIES="TO_DELETE_COOKIES",e.HEALTH_CHECK="HEALTH_CHECK",e.OPEN_SMART_STORE_LOGIN_EXTERNAL="OPEN_SMART_STORE_LOGIN_EXTERNAL",e.UPLOAD_SMART_STORE_EXTERNAL="UPLOAD_SMART_STORE_EXTERNAL",e.EDIT_SMART_STORE_EXTERNAL="EDIT_SMART_STORE_EXTERNAL",e.GET_CURRENT_LOGGED_IN_SMART_STORE_CHANNEL_EXTERNAL="GET_CURRENT_LOGGED_IN_SMART_STORE_CHANNEL_EXTERNAL",e.GET_CHROME_EXTENSION_VERSION_EXTERNAL="GET_CHROME_EXTENSION_VERSION_EXTERNAL",e.DELETE_SMART_STORE_PRODUCT_EXTERNAL="DELETE_SMART_STORE_PRODUCT_EXTERNAL",e.UPDATE_SMART_STORE_PRODUCT_STATE_EXTERNAL="UPDATE_SMART_STORE_PRODUCT_STATE_EXTERNAL",e.GET_SMART_STORE_PRODUCT_EXTERNAL="GET_SMART_STORE_PRODUCT_EXTERNAL",e.FETCH_RAW_EXTERNAL="FETCH_RAW_EXTERNAL",e.UPDATE_DECLARATIVE_NET_REQUEST_RULES_EXTERNAL="UPDATE_DECLARATIVE_NET_REQUEST_RULES_EXTERNAL",e.GET_DECLARATIVE_NET_REQUEST_RULES_EXTERNAL="GET_DECLARATIVE_NET_REQUEST_RULES_EXTERNAL",e.SCRAP_START_EXTERNAL="SCRAP_START_EXTERNAL",e.REQUEST_AI_SOURCING="REQUEST_AI_SOURCING",e.REQUEST_NAVER_SHOPPING_POPULAR_TERMS="REQUEST_NAVER_SHOPPING_POPULAR_TERMS",e.REQUEST_TAOBAO_IMG_SEARCH_EXTERNAL="REQUEST_TAOBAO_IMG_SEARCH_EXTERNAL",e.SCRAP_SUCCESS_FROM_EXT="SCRAP_SUCCESS_FROM_EXT",e.CHROME_EXTENSION_INSTALLED_FROM_EXT="CHROME_EXTENSION_INSTALLED_FROM_EXT",e.NAVER_SHOPPING_LENS_FROM_EXT="NAVER_SHOPPING_LENS_FROM_EXT",e}({});const t={getCookie:async function(e,t){var r;const n=await chrome.cookies.get({url:e,name:t});return null!==(r=null===n||void 0===n?void 0:n.value)&&void 0!==r?r:""},getLocalStorage:async function(e){return new Promise(((t,r)=>{try{chrome.storage.sync.get(e,(r=>{t(null===r||void 0===r?void 0:r[e])}))}catch(n){console.error(n),r(n)}}))},setLocalStorage:async function(e,t){return new Promise(((r,i)=>{try{chrome.storage.sync.set({[e]:t},(()=>r()))}catch(n){console.error(n),i(n)}}))},getBytesInUse:async function(){return new Promise(((e,t)=>{chrome.storage.sync.getBytesInUse((t=>{e(t)}))}))}};function n(e){this.message=e}n.prototype=new Error,n.prototype.name="InvalidCharacterError";var i="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new n("'atob' failed: The string to be decoded is not correctly encoded.");for(var r,i,o=0,a=0,s="";i=t.charAt(a++);~i&&(r=o%4?64*r+i:i,o++%4)?s+=String.fromCharCode(255&r>>(-2*o&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return s};function o(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(i(e).replace(/(.)/g,(function(e,t){var r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(t)}catch(e){return i(t)}}function a(e){this.message=e}a.prototype=new Error,a.prototype.name="InvalidTokenError";const s=function(e,t){if("string"!=typeof e)throw new a("Invalid token specified");var r=!0===(t=t||{}).header?0:1;try{return JSON.parse(o(e.split(".")[r]))}catch(e){throw new a("Invalid token specified: "+e.message)}},c="_jg_tk";async function u(){return t.getLocalStorage(c).then((e=>null!==e&&void 0!==e?e:""))}const f={getToken:u,setToken:async function(e){return t.setLocalStorage(c,e)},isTokenValid:async function(){try{const e=await u();if(!e)return!1;const t=s(null!==e&&void 0!==e?e:"");if(null!==t&&void 0!==t&&t.exp&&t.exp>Date.now()/1e3)return!0}catch(n){console.error(n)}return!1},getStagedRolloutNumber:async function(){try{const e=await u();if(!e)return 0;return s(null!==e&&void 0!==e?e:"").sub.split("").reduce(((e,t)=>e+t.charCodeAt(0)),0)%100}catch(n){return console.error(n),0}},getUserId:async function(){try{const e=await u();if(!e)return"";return s(null!==e&&void 0!==e?e:"").sub}catch(n){return console.error(n),""}}},d="IS_EXTENSION_DEBUG_MODE";const l={initDebugMode:function(){chrome.management.getSelf().then((e=>t.setLocalStorage(d,String("development"===e.installType))))},isDebug:async function(){return"true"===await t.getLocalStorage(d)}},h={endpointUrlTest:"",endpointUrlProd:"https://api.percenty.co.kr",percentyWebProd:"https://www.percenty.co.kr",percentyWebTest:"",siteConfigProd:"https://typebinc.github.io/chrome_extension/siteconfig.json",siteConfigTest:"https://typebinc.github.io/chrome_extension/siteconfig_test.json",remoteConfigProd:"https://typebinc.github.io/chrome_extension/remoteconfig.json",remoteConfigTest:"https://typebinc.github.io/chrome_extension/remoteconfig_test.json",tmallConfigProd:"https://typebinc.github.io/chrome_extension/tmallconfig.json",tmallConfigTest:"https://typebinc.github.io/chrome_extension/tmallconfig_test.json",fileUrlProd:"https://file.percenty.co.kr",fileUrlTest:"https://file-test.percenty.co.kr",parsingEndpointUrlProd:"https://parsing.percenty.co.kr",gaApiSecret:"6F_X_cGYRW2K2Xz_wNbf5Q",gaEndPoint:"https://www.google-analytics.com/mp/collect",gaMeasurementId:"G-PT1DCF1CNY",smartStoreLoginUrl:"https://sell.smartstore.naver.com/#/login",smartStoreProductCreate:"https://sell.smartstore.naver.com/api/products?_action=create",mixpanelToken:"0eaaabb8d460388c88440ca704e72d8d"};function p(e){return e?h.endpointUrlTest:h.endpointUrlProd}function m(e){return e?h.fileUrlTest:h.fileUrlProd}function v(e){return e?h.endpointUrlTest:h.parsingEndpointUrlProd}const b=h;async function g(e){const t=[],r=[],n=await Promise.allSettled(e);for(const i of n)"fulfilled"===i.status?t.push(i.value):"rejected"===i.status&&r.push(i.reason);return{fulfilled:t,rejected:r}}const y={delay:function(e){return new Promise(((t,r)=>{setTimeout((()=>{t()}),e)}))},debounce:function(e,t){let r;return n=>{clearTimeout(r),r=setTimeout((()=>{e(n)}),t)}},startInterval:function(e,t){let r=0,n=setInterval((()=>{e(++r)||clearInterval(n)}),t)},startIntervalAsync:function(e,t){const r=[];let i=0;const o=async()=>{try{await e(++i)?r.push(setTimeout(o,t)):r.forEach((e=>clearTimeout(e)))}catch(n){r.forEach((e=>clearTimeout(e))),console.error(n)}};o()}},_="PENDING_MESSAGE_KEY";async function w(e){return new Promise(((t,r)=>{chrome.tabs.sendMessage(e.targetTabId,e,(e=>{chrome.runtime.lastError?t("CONNECTION_ERROR"):t(e)}))}))}const x={addPendingMessage:async function(e){var r;const n=null!==(r=await t.getLocalStorage(_))&&void 0!==r?r:Array(),i=Date.now(),o=n.filter((e=>e.expirationAt>=i));o.push({...e}),await t.setLocalStorage(_,o)},consumePendingMessage:async function(e){var r;return(null!==(r=await t.getLocalStorage(_))&&void 0!==r?r:Array()).find((t=>(null===t||void 0===t?void 0:t.receiverName)===e))},sendRuntimeMessage:function(e,t){chrome.runtime.sendMessage(e,(e=>{null===t||void 0===t||t(null!==e&&void 0!==e?e:void 0)}))},sendRuntimeMessageAsync:async function(e){return new Promise(((t,r)=>{chrome.runtime.sendMessage(e,(e=>{t(e)}))}))},sendTabsMessage:function(e,t){chrome.tabs.sendMessage(e.targetTabId,e,(e=>{null===t||void 0===t||t(null!==e&&void 0!==e?e:void 0)}))},sendTabsMessageAsync:w,sendTabMessageAsyncUntilConnect:async function(e,t){return new Promise(((r,n)=>{y.startIntervalAsync((async n=>{const i=await w(e);return"CONNECTION_ERROR"===i&&n<=t||(r("CONNECTION_ERROR"===i&&n>t?"CONNECTION_ERROR":i),!1)}),1e3)}))},addMessageListener:function(e){chrome.runtime.onMessage.addListener(((t,r,n)=>e(t,r,n)))}};var E,S=new Uint8Array(16);function T(){if(!E&&!(E="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!==typeof msCrypto&&"function"===typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return E(S)}const A=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const R=function(e){return"string"===typeof e&&A.test(e)};for(var M=[],I=0;I<256;++I)M.push((I+256).toString(16).substr(1));const O=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(M[e[t+0]]+M[e[t+1]]+M[e[t+2]]+M[e[t+3]]+"-"+M[e[t+4]]+M[e[t+5]]+"-"+M[e[t+6]]+M[e[t+7]]+"-"+M[e[t+8]]+M[e[t+9]]+"-"+M[e[t+10]]+M[e[t+11]]+M[e[t+12]]+M[e[t+13]]+M[e[t+14]]+M[e[t+15]]).toLowerCase();if(!R(r))throw TypeError("Stringified UUID is invalid");return r};const C=function(e,t,r){var n=(e=e||{}).random||(e.rng||T)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return O(n)};const P={getRandomUUID:function(){return arguments.length>0&&void 0!==arguments[0]&&arguments[0]?C().replace(/-/g,""):C()},getByteSize:function(e){return e?new Blob([e]).size:0},isVersionLowEqual:function(e,t){if(!e||!t)return!1;const r=e.split("."),n=t.split(".");for(let i=0;i<r.length;i++){const e=parseInt(r[i]),t=parseInt(n[i]);if(e<t)return!0;if(e>t)return!1}return!0}};var N=r(566),k=r.n(N),U=r(9778);const B={encodeBase64:function(e,t){if(!e)return"";const r=U.lW.from(e,"utf8").toString("base64");return t?r.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""):r},decodeBase64:function(e,t){return e?t?((e=e.replace(/-/g,"+").replace(/_/g,"/")).length%4!==0&&(e+="===".slice(0,4-e.length%4)),U.lW.from(e,"base64").toString("utf8")):U.lW.from(e,"base64").toString("utf8"):""},encodeURL:function(e){return encodeURIComponent(e)},decodeURL:function(e){return decodeURIComponent(e)},createNaverSearchAdSignature:async function(e,t,r,n){const i=new TextEncoder,o=i.encode("".concat(t,".").concat(r,".").concat(n)),a=await crypto.subtle.importKey("raw",i.encode(e),{name:"HMAC",hash:"SHA-256"},!1,["sign"]),s=await crypto.subtle.sign("HMAC",a,o);return btoa(String.fromCharCode(...new Uint8Array(s)))}};class D{constructor(e,t,r){this.typename=e,this.mime=t,this.extension=r}}function L(e){return new Promise(((t,r)=>{if(!e)return t("");const n=new FileReader;n.onload=()=>{var e,r;return t(null!==(e=null===(r=n.result)||void 0===r?void 0:r.toString())&&void 0!==e?e:"")},n.onerror=()=>r("file read error"),n.readAsDataURL(e)}))}function F(e){var t,r;if(!e)return;let n=e.split(","),i=null===(t=n[0])||void 0===t||null===(r=t.match(/:(.*?);/))||void 0===r?void 0:r[1],o=atob(n[1]),a=o.length,s=new Uint8Array(a);for(;a--;)s[a]=o.charCodeAt(a);return new Blob([s],{type:i})}async function j(e){return new Promise(((t,r)=>{try{const n=new FileReader;n.onloadend=async function(n){var i,o;if(null===(i=n.target)||void 0===i||!i.result)return void r("");const a=new Uint8Array(null===(o=n.target)||void 0===o?void 0:o.result);let s=[];a.forEach((e=>{s.push(e.toString(16))}));const c=s.join("").toUpperCase();var u;let f=z((u=c).startsWith("89504E47")?"image/png":u.startsWith("47494638")?"image/gif":u.startsWith("25504446")?"application/pdf":u.startsWith("FFD8FFDB")||u.startsWith("FFD8FFE0")||u.startsWith("FFD8FFE1")?"image/jpeg":u.startsWith("504B0304")?"application/zip":u.startsWith("424D")?"image/bmp":"");0===f.length&&(f=z(e.type)),t(f)},n.readAsArrayBuffer(e.slice(0,4))}catch(n){console.error(n),t("")}}))}function z(e){switch(e){case"audio/aac":return"aac";case"application/octet-stream":return"bin";case"application/x-bzip":return"bz";case"application/x-bzip2":return"bz2";case"text/css":return"css";case"text/csv":return"csv";case"application/msword":return"doc";case"image/gif":return"gif";case"text/html":return"html";case"image/x-icon":return"ico";case"application/java-archive":return"jar";case"image/jpeg":return"jpeg";case"image/png":return"png";case"image/bmp":return"bmp";case"image/svg+xml":return"svg";case"image/webp":return"webp";case"application/js":return"js";case"application/json":return"json";case"audio/midi":return"midi";case"video/mpeg":return"mpeg";case"application/vnd.oasis.opendocument.presentation":return"odp";case"application/vnd.oasis.opendocument.spreadsheet":return"ods";case"application/vnd.oasis.opendocument.text":return"odt";case"audio/ogg":return"oga";case"video/ogg":return"ogv";case"application/ogg":return"ogx";case"application/pdf":return"pdf";case"application/vnd.ms-powerpoint":return"ppt";case"application/x-rar-compressed":return"rar";case"application/rtf":return"rtf";case"application/x-sh":return"sh";case"application/x-shockwave-flash":return"swf";case"application/x-tar":return"tar";case"image/tiff":return"tiff";case"application/x-font-ttf":return"ttf";case"application/vnd.visio":return"vsd";case"audio/x-wav":return"wav";case"audio/webm":return"weba";case"video/webm":return"webm";case"application/x-font-woff":return"woff";case"application/xhtml+xml":return"xhtml";case"application/vnd.ms-excel":return"xls";case"application/xml":return"xml";case"application/vnd.mozilla.xul+xml":return"xul";case"application/zip":return"zip";case"video/3gpp":case"audio/3gpp":return"3gp";case"video/3gpp2":case"audio/3gpp2":return"3g2";case"application/x-7z-compressed":return"7z";default:return""}}const H={fileToBlob:async function(e){return L(e).then((e=>F(e)))},fileReader:L,dataURLtoBlob:F,getRandomFileName:async function(e,t){let r=await j(e);return!r&&t&&(r=t),P.getRandomUUID()+"."+r},blobToFile:function(e,t){return new File([e],t,{type:e.type})},getFileExtension:j,getExtensionFromUri:function(e){var t;return e&&null!==(t=e.split(".").pop())&&void 0!==t?t:""},getFileInfo:async function(e){return new Promise((t=>{try{const r=new FileReader;r.onloadend=async function(e){var r,i;if(null===(r=e.target)||void 0===r||!r.result)return void t(void 0);const o=new Uint8Array(null===(i=e.target)||void 0===i?void 0:i.result);t(function(e){try{const t=k()(e);if(t.length>0)return new D(t[0].typename,t[0].mime,t[0].extension)}catch(n){console.error(n)}}(o))},r.readAsArrayBuffer(e.slice(0,e.size>=100?100:e.size))}catch(n){console.error(n),t(void 0)}}))},downloadBlobToLocal:function(e,t){if(!e)return;const r=URL.createObjectURL(e),n=document.createElement("a");n.href=r,n.download=null!==t&&void 0!==t?t:"test",n.click(),URL.revokeObjectURL(r)},getImageMeta:async function(e){return new Promise((t=>{const r=new Image;r.onload=r=>{try{const n=r.target.naturalWidth,i=r.target.naturalHeight;t({width:n,height:i,fileSize:e.size})}catch(n){console.error(n),t({width:0,height:0,fileSize:0})}},r.onerror=()=>{console.error("fileUtil image load error"),t({width:0,height:0,fileSize:0})},"image/svg+xml"===e.type||"application/xml"===e.type?e.text().then((e=>{var n;const i=null===(n=e.match(/<svg.+svg>/gi))||void 0===n?void 0:n[0];i?r.src="data:image/svg+xml;base64, ".concat(B.encodeBase64(i)):t({width:0,height:0,fileSize:0})})).catch((e=>{console.error(e),t({width:0,height:0,fileSize:0})})):r.src=URL.createObjectURL(e)}))},encodeFileToBase64:async function(e){return new Promise(((t,r)=>{const n=new FileReader;n.onload=()=>{const e=n.result;"string"===typeof e?t(e):r(new Error("[encodeFileToBase64] onload ERROR"))},n.onerror=e=>{r(new Error("[encodeFileToBase64] ".concat(e)))},n.readAsDataURL(e)}))}};let q=function(e){return e.GET="GET",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE",e}({});class G{constructor(e,t,r,n){this.message=e,this.code=t,this.data=r,this.originalError=n}}let W="";async function Y(e,t,r,n,i){const o={"Accept-Language":"ko",Accept:"application/json","Content-Type":"application/json;charset=utf-8","X-AUTH-TOKEN":await f.getToken()};if(!W){const e=await l.isDebug();W=p(e)}const a=new URLSearchParams(r).toString();return fetch(W+t+"?".concat(a),{method:e,headers:o,body:JSON.stringify(n),...i}).then((e=>e.json())).then((e=>{var t,r;if(!e.success)throw new G(null!==(t=e.msg)&&void 0!==t?t:"",null!==(r=e.code)&&void 0!==r?r:"-1");return e})).catch((e=>{var t,r,n;throw new G(null!==(t=null!==(r=e.msg)&&void 0!==r?r:e.message)&&void 0!==t?t:"",null!==(n=e.code)&&void 0!==n?n:"-1")}))}async function V(e,t){return await fetch(e,t).then((e=>{if(e.ok)return e.blob();throw new G("File download failed","-1")}))}var X=r(5915),K=r.n(X),Q=r(763),J=r.n(Q);function Z(e){return!Number.isNaN(parseFloat(String(e)))}function $(e){return!e||(J().isString(e)?0===e.length||!e.trim():0===e.length)}const ee={toInt:function(e,t){var r;return void 0!==t?null!==(r=J().toSafeInteger(e))&&void 0!==r?r:t:J().toSafeInteger(e)},toFloat:function(e,t){try{return Z(e)?parseFloat(String(e)):null!==t&&void 0!==t?t:0}catch(n){return null!==t&&void 0!==t?t:0}},isNumber:Z,mergeObjects:function(e,t,r,n){return J().merge({},e,t,r,n)},every:function(e,t){return J().every(e,(e=>t(e)))},getProperty:function(e,t){if(e)return J().get(e,t)},setProperty:function(e,t,r){if(e)return J().set(e,t,r)},isEmpty:function(e){return J().isEmpty(e)},isBlank:$,isNotBlank:function(e){return!$(e)},range:function(e,t,r){return J().range(e,t,r)},mapToRecord:function(e){const t={};return e.forEach(((e,r)=>{t[r]=e})),t},convertKeysToCamelCase:function e(t){return null===t||"object"!==typeof t?t:Array.isArray(t)?t.map((t=>e(t))):Object.keys(t).reduce(((r,n)=>(r[n.replace(/_([a-z])/g,((e,t)=>t.toUpperCase()))]=e(t[n]),r)),{})},chunk:function(e,t){const r=[];for(let n=0;n<e.length;n+=t)r.push(e.slice(n,n+t));return r}};class te{constructor(e,t,r,n,i){this.url=e,this.protocol=t,this.host=r,this.pathList=n,this.queryMap=i}buildUrl(){if(!this.host)return"";let e="";return e+="".concat(this.protocol||"https:","//"),e+="".concat(this.host,"/"),e+="".concat(this.pathList.join("/")),e+="".concat(this.queryMap.size>0?"?":""),e+="".concat(new URLSearchParams(ee.mapToRecord(this.queryMap)).toString()),e}}function re(e,t){return e.includes(":")?e:"".concat(null!==t&&void 0!==t?t:"http","://").concat(e.replace(RegExp("^[/]+"),""))}const ne={setSchemeToUri:re,parseURL:function(e){if(!e)return new te("","","",[],new Map);const t=new(K())(e),r=t.pathname.split("/").filter((e=>e.length>0)),n=t.query.replace("?","").split("&").map((e=>{var t,r;const n=e.split("=");return{key:null!==(t=null===n||void 0===n?void 0:n[0])&&void 0!==t?t:"",value:null!==(r=null===n||void 0===n?void 0:n[1])&&void 0!==r?r:""}})),i=new Map;for(const o of n)o.key&&i.set(o.key,o.value);return new te(e,t.protocol,t.host,r,i)},getChromeExtensionUrl:function(e){return chrome.runtime.getURL(e)},matchUrlWithAsteriskPattern:function(e,t){return!(!e||!t)&&new RegExp("^".concat(t.replace(/\*/g,".*"),"$")).test(e)},appendQueryParam:function(e,t,r){if(!e)return"";const n=new URL(re(e,"https")),i=new URLSearchParams(n.search);return i.set(t,r),n.search=i.toString(),n.toString()},objectToQueryString:function(e){if(!e)return"";const t=new URLSearchParams;for(const r in e)e[r]&&t.set(r,e[r]);return t.toString()},getURLQuery:function(e,t){const r=new URL(e);return new URLSearchParams(r.search).get(t)}},ie={SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:864e5,WEEK:6048e5,YEAR:31536e6,BIT_1MB:8388608,BYTE_1MB:1048576,KILOBYTE_1MB:1024,P_SITE_CONFIG:"tmmy_p_conf_sit",P_TMALL_CONFIG:"tmmy_p_conf_tmall",P_CORS_TMALL_NET_REQUEST_QUERY_NAME:"pdirkr0s83o0fosdk2ch14",P_CORS_TMALL_NET_REQUEST_QUERY_VALUE:"pretu35njx5lwqx231mc8iwo5fl4dx3j2fg7qpxlfjd",P_CORS_TMALL_CHAOSHI_NET_REQUEST_QUERY_VALUE:"sdfw843eldfogor28rgjvxlow28403lfllsk21adds",P_REMOVE_ORIGIN_NET_REQUEST_QUERY_NAME:"thoxmfo305z4lhou547",P_REMOVE_ORIGIN_NET_REQUEST_QUERY_VALUE:"fgk40kxjsd2kwlakghfzncmbiqpx",P_REMOVE_ORIGIN_NET_REQUEST_STRING:"fgk40kxjsd2kwlakghfzncmbiqpx",P_ADD_NAVER_SHOPPING_REFERER:"pqQ7SSVhjhsvHsSpr6PqsP88vDhR3TtdQH5HP1Jp6IiV",P_RAKUTEN_IFRAME_GALLERY_ELEMENT_ID:"p_rakuten_gallery_images"};async function oe(e){return fetch(e).then((e=>e.json()))}async function ae(e){try{return await async function(e){return V(e)}((t=e,t.includes("video.aliexpress-media.com")?ne.appendQueryParam(t,ie.P_REMOVE_ORIGIN_NET_REQUEST_QUERY_NAME,ie.P_REMOVE_ORIGIN_NET_REQUEST_QUERY_VALUE):t))}catch(n){return console.error(n),await async function(e){let t=W;if(!t){t=p(await l.isDebug())}return V("".concat(t,"/download-thirdparty?url=").concat(e),{headers:{"X-AUTH-TOKEN":await f.getToken()}})}(e)}var t}const se={loadAssetFile:oe,loadSmartStoreLeafCategories:async function(){return oe(chrome.runtime.getURL("./SmartStoreLeafCategory.json"))},downloadFile:ae,batchDownloadFile:async function(e){const t=e.map((e=>ae(e))),r=await g(t);return r.rejected.length>0&&console.error("File download failed",r.rejected),r.fulfilled},downloadFromPercenty:async function(e){const t=await l.isDebug(),r={"Accept-Language":"ko",Accept:"application/json","Content-Type":"application/json;charset=utf-8","X-AUTH-TOKEN":await f.getToken()};return V(p(t)+"/download?url="+e,{method:q.GET,headers:r})},uploadImageToPercenty:async function(e,t){var r,n,i,o;const a=await l.isDebug(),s=v(a);return await async function(e,t,r,n){var i;if(!W){const e=await l.isDebug();W=p(e)}const o=new FormData;o.append("file",null!==t&&void 0!==t?t:"",r),o.append("data",JSON.stringify(e));const a={"Accept-Language":"ko",Accept:"application/json","X-AUTH-TOKEN":null!==(i=await f.getToken())&&void 0!==i?i:""};return fetch((null!==n&&void 0!==n?n:W)+"/files",{method:q.POST,headers:a,body:o})}({isPublic:!0,noChangeFilename:!1,isCreateThumbnail:!1,filePath:null!==t&&void 0!==t&&t.path?t.path:null,isResize:null!==(r=null===t||void 0===t?void 0:t.isResize)&&void 0!==r&&r,resizeByWidth:null!==(n=null===t||void 0===t?void 0:t.resizeByWidth)&&void 0!==n&&n,isImage:void 0===(null===t||void 0===t?void 0:t.isImage)||t.isImage,isTemp:null!==(i=null===t||void 0===t?void 0:t.isTemp)&&void 0!==i&&i},e,null!==(o=null===t||void 0===t?void 0:t.fileName)&&void 0!==o?o:P.getRandomUUID(),s).then((e=>e.json())).then((e=>{if(!e.data)throw new Error("image upload failed");return m(a)+"/"+e.data}))},uploadImageToPercentyWithoutToken:async(e,t)=>{const r=v(await l.isDebug()),n=new FormData;return n.append("file",null!==e&&void 0!==e?e:"",t),fetch((null!==r&&void 0!==r?r:W)+"/ejrlkwjer",{method:q.POST,body:n}).then((e=>e.json())).then((e=>e.data))}};const ce={crawlerProduct:async function(e){return await Y(q.POST,"/products/crawling",void 0,e)},crawlerProductNew:async function(e){return await Y(q.POST,"/products/crawling",void 0,e)},fetchProductList:async function(){return await Y(q.GET,"/products")},fetchProduct:async function(e){return await Y(q.GET,"/products/".concat(e))},errorProduct:async function(e,t){return await Y(q.POST,"/smartstore/products/".concat(e,"/error"),void 0,t)},fetchProductForSmartStore:async function(e){return await Y(q.GET,"/smartstore/products/".concat(e))},updateProductStateToSale:async function(e,t,r,n){return await Y(q.POST,"/smartstore/products/".concat(e,"/stores/").concat(t,"/").concat(r,"/").concat(n))},updateProductState:async function(e,t){return await Y(q.PUT,"/smartstore/products/".concat(e,"/state/").concat(t))}},ue=/[^\s\uac00-\ud7a3\u3131-\u314e\u314f-\u3163a-zA-Z0-9\u4e00-\u9faf\u3041-\u3093\u30a1-\u30f3!@#$%^&\u20a9~()[\]{},.;:/|_\-'=+\u318D\u119E\u11A2\u2022\u2025\u00B7\uFE55]/gi,fe=/\D+/gi;const de={removeSmartStoreSpecialCharacter:function(e){var t;return null!==(t=null===e||void 0===e?void 0:e.replace(ue,""))&&void 0!==t?t:""},removeNonDigit:function(e){return e.replace(fe,"")},getSmartStoreOptionPriceRangeFromErrorMessage:function(e){try{const t=/(-*\d+\uc6d0)/gi;if(!e)return;const r=e.replace(/,/gi,""),n=[];let i;for(;i=t.exec(r);)n.push(parseInt(i[1].replace("\uc6d0","")));if(2===n.length)return n}catch(n){console.error(n)}},getSmartStoreOptionNumberFromErrorMessage:function(e){try{var t;if(!e)return;const r=/(\d+\ubc88\uc9f8)/gi.exec(e),n=null===r||void 0===r||null===(t=r[1])||void 0===t?void 0:t.replace("\ubc88\uc9f8","");if(n)return parseInt(n)}catch(n){console.error(n)}},hasSpecialCharacter:function(e){const t=/[^\uac00-\ud7a3\u3131-\u314e\u314f-\u3163a-zA-Z0-9\u4e00-\u9faf\u3041-\u3093\u30a1-\u30f3]/gi.exec(e);return!!t&&t.length>0},removeEncodedHtmlTags:function(e){return e.replace(/&lt;[^&]+&gt;/g,"").replace(/&amp;/g,"&").replace(/&nbsp;/g," ").replace(/&quot;/g,'"').replace(/&apos;/g,"'")}};let le=function(e){return e.SMART_STORE_ERROR="SMART_STORE_ERROR",e.SMART_STORE_UPLOAD_ERROR="SMART_STORE_UPLOAD_ERROR",e.SMART_STORE_LOGIN_NEED="SMART_STORE_LOGIN_NEED",e.SMART_STORE_EMPTY_PRODUCT_NAME="SMART_STORE_EMPTY_PRODUCT_NAME",e.SMART_STORE_PRODUCT_NAME_SPECIAL_CHARACTER="SMART_STORE_PRODUCT_NAME_SPECIAL_CHARACTER",e.SMART_STORE_OPTION_PRICE_RANGE_OVER="SMART_STORE_OPTION_PRICE_RANGE_OVER",e.SMART_STORE_DUPLICATED_OPTION_NAME="SMART_STORE_DUPLICATED_OPTION_NAME",e.SMART_STORE_EMPTY_OPTION="SMART_STORE_EMPTY_OPTION",e.SMART_STORE_EMPTY_OPTION_STOCK="SMART_STORE_EMPTY_OPTION_STOCK",e.SMART_STORE_UPLOAD_PRODUCT_BAD_REQUEST="SMART_STORE_UPLOAD_PRODUCT_BAD_REQUEST",e.SMART_STORE_EDIT_PRODUCT_BAD_REQUEST="SMART_STORE_EDIT_PRODUCT_BAD_REQUEST",e.SMART_STORE_UPLOAD_PHOTO_BAD_REQUEST="SMART_STORE_UPLOAD_PHOTO_BAD_REQUEST",e.SMART_STORE_EMPTY_MARKET_PROFILE="SMART_STORE_EMPTY_MARKET_PROFILE",e.SMART_STORE_PRODUCT_NOT_EXIST="SMART_STORE_PRODUCT_NOT_EXIST",e.SMART_STORE_PRODUCT_ALREADY_DELETED="SMART_STORE_PRODUCT_ALREADY_DELETED",e.SMART_STORE_VIDEO_UPLOAD_FAIL="SMART_STORE_VIDEO_UPLOAD_FAIL",e.SMART_STORE_CANNOT_CHANGE_PRODUCT_STATE="SMART_STORE_CANNOT_CHANGE_PRODUCT_STATE",e.SMART_STORE_ALREADY_UPLOADING="SMART_STORE_ALREADY_UPLOADING",e.SCRAP_AUTO_BY_URL_FAIL="SCRAP_AUTO_BY_URL_FAIL",e.SCRAP_AUTO_BY_URL_FAIL_CAPTCHA="SCRAP_AUTO_BY_URL_FAIL_CAPTCHA",e.AI_SOURCING_MISSING_PARAMS="AI_SOURCING_MISSING_PARAMS",e.AI_SOURCING_NAVER_FETCH_ERROR="AI_SOURCING_NAVER_FETCH_ERROR",e.AI_NAVER_SHOPPING_POPULAR_TERMS_ERROR="AI_NAVER_SHOPPING_POPULAR_TERMS_ERROR",e.AI_NAVER_SHOPPING_POPULAR_TERMS_MISSING_BODY="AI_NAVER_SHOPPING_POPULAR_TERMS_MISSING_BODY",e.AI_SOURCING_API_ERROR="AI_SOURCING_API_ERROR",e.AI_SOURCING_NOT_FOUND_TAB="AI_SOURCING_NOT_FOUND_TAB",e.TAOBAO_COOKIE_NONE="TAOBAO_COOKIE_NONE",e}({});const he={getOptionInfo:function(e,t){const r=[];let n=t.split(";");const i=e.flatMap((e=>e.infos));return n.forEach((e=>{const t=i.find((t=>e===t.path));t&&r.push({optionName:t.name.transMap.ko,imageUrl:t.img})})),r},createHtml:function(e,t){let r="";return e.htmlWithTopBottom&&e.userOption.topImg&&(r=r.concat('<img src="'.concat(e.userOption.topImg,'" style="width:100%;">'))),r=r.concat(t),e.htmlWithOptions&&e.infos.forEach((e=>{const t=e.title.transMap.ko;e.infos.forEach((e=>{e.img&&e.name.transMap.ko&&(r=r.concat('<div style="font-size:2em;padding:2em 0.5em 0.5em 0.5em;font-weight:bold;text-align:center;line-height:1em;">['.concat(t,"]</div>")),r=r.concat('<div style="font-size:2em;padding:0 0.5em 0.5em 0.5em;font-weight:bold;text-align:center;line-height:1em;">'.concat(e.name.transMap.ko,"</div>")),r=r.concat('<img src="'.concat(e.img,'" style="width:100%;">')))}))})),e.htmlWithTopBottom&&e.userOption.bottomImg&&(r=r.concat('<img src="'.concat(e.userOption.bottomImg,'" style="width:100%;">'))),r},getDeliveryFeeType:function(e){var t;const r=e.userOption;return 0===r.deliveryCharge?"FREE":r.deliveryCharge>0&&r.freeShipOverAmount>0?"CONDITIONAL_FREE":null!==(t=e.storeProfileMap.ss)&&void 0!==t&&t.deliveryChargePerCnt&&e.storeProfileMap.ss.deliveryChargePerCnt>0?"UNIT_QUANTITY_PAID":"PAID"}};let pe=function(e){return e.AbrHls="AbrHls",e.Thumbnails="Thumbnails",e.Hls="Hls",e.VideoHashCode="VideoHashCode",e.Encoding="Encoding",e.Ingest="Ingest",e.VideoHeader="VideoHeader",e}({});function me(e){return me="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},me(e)}function ve(e,t){if(t.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function be(e){ve(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===me(e)&&"[object Date]"===t?new Date(e.getTime()):"number"===typeof e||"[object Number]"===t?new Date(e):("string"!==typeof e&&"[object String]"!==t||"undefined"===typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function ge(e){if(ve(1,arguments),!function(e){return ve(1,arguments),e instanceof Date||"object"===me(e)&&"[object Date]"===Object.prototype.toString.call(e)}(e)&&"number"!==typeof e)return!1;var t=be(e);return!isNaN(Number(t))}function ye(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function _e(e,t){return ve(2,arguments),function(e,t){ve(2,arguments);var r=be(e).getTime(),n=ye(t);return new Date(r+n)}(e,-ye(t))}function we(e){ve(1,arguments);var t=be(e),r=t.getUTCDay(),n=(r<1?7:0)+r-1;return t.setUTCDate(t.getUTCDate()-n),t.setUTCHours(0,0,0,0),t}function xe(e){ve(1,arguments);var t=be(e),r=t.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var i=we(n),o=new Date(0);o.setUTCFullYear(r,0,4),o.setUTCHours(0,0,0,0);var a=we(o);return t.getTime()>=i.getTime()?r+1:t.getTime()>=a.getTime()?r:r-1}function Ee(e){ve(1,arguments);var t=be(e),r=we(t).getTime()-function(e){ve(1,arguments);var t=xe(e),r=new Date(0);return r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0),we(r)}(t).getTime();return Math.round(r/6048e5)+1}var Se={};function Te(){return Se}function Ae(e,t){var r,n,i,o,a,s,c,u;ve(1,arguments);var f=Te(),d=ye(null!==(r=null!==(n=null!==(i=null!==(o=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==o?o:null===t||void 0===t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.weekStartsOn)&&void 0!==i?i:f.weekStartsOn)&&void 0!==n?n:null===(c=f.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==r?r:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=be(e),h=l.getUTCDay(),p=(h<d?7:0)+h-d;return l.setUTCDate(l.getUTCDate()-p),l.setUTCHours(0,0,0,0),l}function Re(e,t){var r,n,i,o,a,s,c,u;ve(1,arguments);var f=be(e),d=f.getUTCFullYear(),l=Te(),h=ye(null!==(r=null!==(n=null!==(i=null!==(o=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null===t||void 0===t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:l.firstWeekContainsDate)&&void 0!==n?n:null===(c=l.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==r?r:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(d+1,0,h),p.setUTCHours(0,0,0,0);var m=Ae(p,t),v=new Date(0);v.setUTCFullYear(d,0,h),v.setUTCHours(0,0,0,0);var b=Ae(v,t);return f.getTime()>=m.getTime()?d+1:f.getTime()>=b.getTime()?d:d-1}function Me(e,t){ve(1,arguments);var r=be(e),n=Ae(r,t).getTime()-function(e,t){var r,n,i,o,a,s,c,u;ve(1,arguments);var f=Te(),d=ye(null!==(r=null!==(n=null!==(i=null!==(o=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==o?o:null===t||void 0===t||null===(a=t.locale)||void 0===a||null===(s=a.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==i?i:f.firstWeekContainsDate)&&void 0!==n?n:null===(c=f.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==r?r:1),l=Re(e,t),h=new Date(0);return h.setUTCFullYear(l,0,d),h.setUTCHours(0,0,0,0),Ae(h,t)}(r,t).getTime();return Math.round(n/6048e5)+1}function Ie(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<t;)n="0"+n;return r+n}const Oe={y:function(e,t){var r=e.getUTCFullYear(),n=r>0?r:1-r;return Ie("yy"===t?n%100:n,t.length)},M:function(e,t){var r=e.getUTCMonth();return"M"===t?String(r+1):Ie(r+1,2)},d:function(e,t){return Ie(e.getUTCDate(),t.length)},a:function(e,t){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];default:return"am"===r?"a.m.":"p.m."}},h:function(e,t){return Ie(e.getUTCHours()%12||12,t.length)},H:function(e,t){return Ie(e.getUTCHours(),t.length)},m:function(e,t){return Ie(e.getUTCMinutes(),t.length)},s:function(e,t){return Ie(e.getUTCSeconds(),t.length)},S:function(e,t){var r=t.length,n=e.getUTCMilliseconds();return Ie(Math.floor(n*Math.pow(10,r-3)),t.length)}};var Ce="midnight",Pe="noon",Ne="morning",ke="afternoon",Ue="evening",Be="night",De={G:function(e,t,r){var n=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if("yo"===t){var n=e.getUTCFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return Oe.y(e,t)},Y:function(e,t,r,n){var i=Re(e,n),o=i>0?i:1-i;return"YY"===t?Ie(o%100,2):"Yo"===t?r.ordinalNumber(o,{unit:"year"}):Ie(o,t.length)},R:function(e,t){return Ie(xe(e),t.length)},u:function(e,t){return Ie(e.getUTCFullYear(),t.length)},Q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return Ie(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return Ie(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){var n=e.getUTCMonth();switch(t){case"M":case"MM":return Oe.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){var n=e.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return Ie(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){var i=Me(e,n);return"wo"===t?r.ordinalNumber(i,{unit:"week"}):Ie(i,t.length)},I:function(e,t,r){var n=Ee(e);return"Io"===t?r.ordinalNumber(n,{unit:"week"}):Ie(n,t.length)},d:function(e,t,r){return"do"===t?r.ordinalNumber(e.getUTCDate(),{unit:"date"}):Oe.d(e,t)},D:function(e,t,r){var n=function(e){ve(1,arguments);var t=be(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=r-t.getTime();return Math.floor(n/864e5)+1}(e);return"Do"===t?r.ordinalNumber(n,{unit:"dayOfYear"}):Ie(n,t.length)},E:function(e,t,r){var n=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){var i=e.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Ie(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){var i=e.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Ie(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){var n=e.getUTCDay(),i=0===n?7:n;switch(t){case"i":return String(i);case"ii":return Ie(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},b:function(e,t,r){var n,i=e.getUTCHours();switch(n=12===i?Pe:0===i?Ce:i/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},B:function(e,t,r){var n,i=e.getUTCHours();switch(n=i>=17?Ue:i>=12?ke:i>=4?Ne:Be,t){case"B":case"BB":case"BBB":return r.dayPeriod(n,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(n,{width:"narrow",context:"formatting"});default:return r.dayPeriod(n,{width:"wide",context:"formatting"})}},h:function(e,t,r){if("ho"===t){var n=e.getUTCHours()%12;return 0===n&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return Oe.h(e,t)},H:function(e,t,r){return"Ho"===t?r.ordinalNumber(e.getUTCHours(),{unit:"hour"}):Oe.H(e,t)},K:function(e,t,r){var n=e.getUTCHours()%12;return"Ko"===t?r.ordinalNumber(n,{unit:"hour"}):Ie(n,t.length)},k:function(e,t,r){var n=e.getUTCHours();return 0===n&&(n=24),"ko"===t?r.ordinalNumber(n,{unit:"hour"}):Ie(n,t.length)},m:function(e,t,r){return"mo"===t?r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):Oe.m(e,t)},s:function(e,t,r){return"so"===t?r.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):Oe.s(e,t)},S:function(e,t){return Oe.S(e,t)},X:function(e,t,r,n){var i=(n._originalDate||e).getTimezoneOffset();if(0===i)return"Z";switch(t){case"X":return Fe(i);case"XXXX":case"XX":return je(i);default:return je(i,":")}},x:function(e,t,r,n){var i=(n._originalDate||e).getTimezoneOffset();switch(t){case"x":return Fe(i);case"xxxx":case"xx":return je(i);default:return je(i,":")}},O:function(e,t,r,n){var i=(n._originalDate||e).getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Le(i,":");default:return"GMT"+je(i,":")}},z:function(e,t,r,n){var i=(n._originalDate||e).getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Le(i,":");default:return"GMT"+je(i,":")}},t:function(e,t,r,n){var i=n._originalDate||e;return Ie(Math.floor(i.getTime()/1e3),t.length)},T:function(e,t,r,n){return Ie((n._originalDate||e).getTime(),t.length)}};function Le(e,t){var r=e>0?"-":"+",n=Math.abs(e),i=Math.floor(n/60),o=n%60;if(0===o)return r+String(i);var a=t||"";return r+String(i)+a+Ie(o,2)}function Fe(e,t){return e%60===0?(e>0?"-":"+")+Ie(Math.abs(e)/60,2):je(e,t)}function je(e,t){var r=t||"",n=e>0?"-":"+",i=Math.abs(e);return n+Ie(Math.floor(i/60),2)+r+Ie(i%60,2)}const ze=De;var He=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},qe=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},Ge={p:qe,P:function(e,t){var r,n=e.match(/(P+)(p+)?/)||[],i=n[1],o=n[2];if(!o)return He(e,t);switch(i){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",He(i,t)).replace("{{time}}",qe(o,t))}};const We=Ge;var Ye=["D","DD"],Ve=["YY","YYYY"];function Xe(e,t,r){if("YYYY"===e)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===e)throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===e)throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===e)throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Ke={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};const Qe=function(e,t,r){var n,i=Ke[e];return n="string"===typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!==r&&void 0!==r&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function Je(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}var Ze={date:Je({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Je({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Je({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};var $e={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function et(e){return function(t,r){var n;if("formatting"===(null!==r&&void 0!==r&&r.context?String(r.context):"standalone")&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=null!==r&&void 0!==r&&r.width?String(r.width):i;n=e.formattingValues[o]||e.formattingValues[i]}else{var a=e.defaultWidth,s=null!==r&&void 0!==r&&r.width?String(r.width):e.defaultWidth;n=e.values[s]||e.values[a]}return n[e.argumentCallback?e.argumentCallback(t):t]}}function tt(e){return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;var a,s=o[0],c=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(c)?function(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return r;return}(c,(function(e){return e.test(s)})):function(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r;return}(c,(function(e){return e.test(s)}));return a=e.valueCallback?e.valueCallback(u):u,{value:a=r.valueCallback?r.valueCallback(a):a,rest:t.slice(s.length)}}}var rt;const nt={code:"en-US",formatDistance:Qe,formatLong:Ze,formatRelative:function(e,t,r,n){return $e[e]},localize:{ordinalNumber:function(e,t){var r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:et({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:et({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:et({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:et({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:et({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(rt={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(e){return parseInt(e,10)}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.match(rt.matchPattern);if(!r)return null;var n=r[0],i=e.match(rt.parsePattern);if(!i)return null;var o=rt.valueCallback?rt.valueCallback(i[0]):i[0];return{value:o=t.valueCallback?t.valueCallback(o):o,rest:e.slice(n.length)}}),era:tt({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:tt({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:tt({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:tt({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:tt({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var it=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ot=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,at=/^'([^]*?)'?$/,st=/''/g,ct=/[a-zA-Z]/;function ut(e,t,r){var n,i,o,a,s,c,u,f,d,l,h,p,m,v,b,g,y,_;ve(2,arguments);var w=String(t),x=Te(),E=null!==(n=null!==(i=null===r||void 0===r?void 0:r.locale)&&void 0!==i?i:x.locale)&&void 0!==n?n:nt,S=ye(null!==(o=null!==(a=null!==(s=null!==(c=null===r||void 0===r?void 0:r.firstWeekContainsDate)&&void 0!==c?c:null===r||void 0===r||null===(u=r.locale)||void 0===u||null===(f=u.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==s?s:x.firstWeekContainsDate)&&void 0!==a?a:null===(d=x.locale)||void 0===d||null===(l=d.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==o?o:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var T=ye(null!==(h=null!==(p=null!==(m=null!==(v=null===r||void 0===r?void 0:r.weekStartsOn)&&void 0!==v?v:null===r||void 0===r||null===(b=r.locale)||void 0===b||null===(g=b.options)||void 0===g?void 0:g.weekStartsOn)&&void 0!==m?m:x.weekStartsOn)&&void 0!==p?p:null===(y=x.locale)||void 0===y||null===(_=y.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==h?h:0);if(!(T>=0&&T<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!E.localize)throw new RangeError("locale must contain localize property");if(!E.formatLong)throw new RangeError("locale must contain formatLong property");var A=be(e);if(!ge(A))throw new RangeError("Invalid time value");var R=function(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}(A),M=_e(A,R),I={firstWeekContainsDate:S,weekStartsOn:T,locale:E,_originalDate:A};return w.match(ot).map((function(e){var t=e[0];return"p"===t||"P"===t?(0,We[t])(e,E.formatLong):e})).join("").match(it).map((function(n){if("''"===n)return"'";var i=n[0];if("'"===i)return function(e){var t=e.match(at);if(!t)return e;return t[1].replace(st,"'")}(n);var o,a=ze[i];if(a)return null!==r&&void 0!==r&&r.useAdditionalWeekYearTokens||(o=n,-1===Ve.indexOf(o))||Xe(n,t,String(e)),null!==r&&void 0!==r&&r.useAdditionalDayOfYearTokens||!function(e){return-1!==Ye.indexOf(e)}(n)||Xe(n,t,String(e)),a(M,n,E.localize,I);if(i.match(ct))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");return n})).join("")}function ft(e,t){return ve(2,arguments),function(e,t){ve(2,arguments);var r=be(e),n=ye(t);return isNaN(n)?new Date(NaN):n?(r.setDate(r.getDate()+n),r):r}(e,-ye(t))}const dt=864e5;function lt(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!e)return"";const n=e instanceof Date?e:new Date(e),i=n.getTimezoneOffset();let o=n.valueOf();switch(r&&0!==i&&(o+=60*i*1e3),t){case"ISO8601_UTC0":return ut(o,"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");case"ISO8601":return ut(o,"yyyy-MM-dd'T'HH:mm:ss.SSSXXX");default:return ut(o,t)}}const ht={SECOND:1e3,MINUTE:6e4,HOUR:36e5,DAY:dt,WEEK:6048e5,YEAR:31536e6,FORMAT_yyyy_MM_DD_HHmm:"yyyy/MM/dd HH:mm",FORMAT_yyyy_MM_DD:"yyyy/MM/dd",FORMAT_YY_MM_DD:"YY/MM/dd",MM_DD:"MM.dd",FORMAT_yyyyMMdd:"yyyyMMdd",FORMAT_yyyyDashMMDashDD:"yyyy-MM-dd",now:function(){return Date.now()},addDays:function(e,t){const r=e instanceof Date?e.getTime():e;return new Date(r+t*dt)},addMonths:function(e,t){const r=e instanceof Date?e:new Date(e);return new Date(r.setMonth(r.getMonth()+t))},subtractDays:function(e,t){return ft(e instanceof Date?e:new Date(e),t)},format:lt,changeFormat:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e?lt(new Date(e),t,r):""},startOf:function(e,t){switch(e){case"year":return function(e){ve(1,arguments);var t=be(e),r=new Date(0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}(t);case"month":return function(e){ve(1,arguments);var t=be(e);return t.setDate(1),t.setHours(0,0,0,0),t}(t);case"day":return function(e){ve(1,arguments);var t=be(e);return t.setHours(0,0,0,0),t}(t);case"hour":return function(e){ve(1,arguments);var t=be(e);return t.setMinutes(0,0,0),t}(t);case"minute":return function(e){ve(1,arguments);var t=be(e);return t.setSeconds(0,0),t}(t);case"second":return function(e){ve(1,arguments);var t=be(e);return t.setMilliseconds(0),t}(t)}},endOf:function(e,t){switch(e){case"year":return function(e){ve(1,arguments);var t=be(e),r=t.getFullYear();return t.setFullYear(r+1,0,0),t.setHours(23,59,59,999),t}(t);case"month":return function(e){ve(1,arguments);var t=be(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}(t);case"day":return function(e){ve(1,arguments);var t=be(e);return t.setHours(23,59,59,999),t}(t);case"hour":return function(e){ve(1,arguments);var t=be(e);return t.setMinutes(59,59,999),t}(t);case"minute":return function(e){ve(1,arguments);var t=be(e);return t.setSeconds(59,999),t}(t);case"second":return function(e){ve(1,arguments);var t=be(e);return t.setMilliseconds(999),t}(t)}}},pt="CACHED_SS_SHIPMENT_LIST_KEY";const mt={getShipmentList:async function(){try{var e,r;const n=Date.now(),i=await t.getLocalStorage(pt);if(null!==i&&void 0!==i&&i.expireAt&&i.expireAt>n&&i.list&&i.list.length>0)return i.list;const o=await Y(q.GET,"/smartstore/shipments");return o.list&&o.list.length>0&&t.setLocalStorage(pt,{expireAt:n+ht.DAY,list:o.list}),null!==(e=null!==(r=o.list)&&void 0!==r?r:null===i||void 0===i?void 0:i.list)&&void 0!==e?e:[]}catch(n){return console.error(n),[]}}};async function vt(e){const t=e.map((e=>e.replace(/\s+/gi,""))).filter((e=>{const t=P.getByteSize(e);return t>0&&t<=30})).filter((e=>!de.hasSpecialCharacter(e))).filter(((e,t,r)=>r.indexOf(e)===t)),r=[];try{const e=[];for await(const r of t)e.push(Bt.checkRestrictedTag(r).then((e=>({tag:r,...e}))));const n=await Promise.all(e);for(const t of n)t.restricted||r.push({text:t.tag})}catch(n){console.error(n)}const i=[],o=await Bt.checkSearchableTags(r.map((e=>e.text))).catch((e=>{}));return o&&o.length>0?(i.push(...o.filter((e=>e.searchable)).map((e=>({text:e.tag})))),i.push(...o.filter((e=>!e.searchable)).map((e=>({text:e.tag}))))):i.push(...r),i.slice(0,10)}async function bt(e){var t,r;const n=await mt.getShipmentList(),i=null===(t=e.storeProfileMap)||void 0===t||null===(r=t.ss)||void 0===r?void 0:r.shipmentCode;return null===n||void 0===n?void 0:n.find((e=>e.id===i))}function gt(e){try{const t=e=>{let t="";for(let r=1;r<=100;r++){const n=e["optionName".concat(r)];if(!n)break;t=t.concat(n)}return t};let r=!1;const n=[];for(const i of e){const e=t(i);if(!(e.length<=0)){if(n.includes(e)){r=!0;break}n.push(e)}}if(r){const t=new Map,r=new Map;for(let e=0;e<=100;e++)r.set(e,1);e.forEach((e=>{var n,i,o;const a=null!==(n=null===(i=e.paths)||void 0===i||null===(o=i.split(";"))||void 0===o?void 0:o.filter((e=>!!e)))&&void 0!==n?n:[];a.length>0&&a.forEach(((e,n)=>{if(!t.has(e)){const i=r.get(n);t.set(e,i),r.set(n,i+1)}}))})),e.forEach(((e,r)=>{var n,i,o;const a=null!==(n=null===(i=e.paths)||void 0===i||null===(o=i.split(";"))||void 0===o?void 0:o.filter((e=>!!e)))&&void 0!==n?n:[];if(a.length>0)for(let c=0;c<a.length;c++){var s;if(e["optionName".concat(c+1)])e["optionName".concat(c+1)]="".concat(null!==(s=t.get(a[c]))&&void 0!==s?s:"",". ").concat(e["optionName".concat(c+1)])}}))}}catch(n){console.error(n)}}function yt(e){let t="";for(const r of e)t.length>0&&(t=t.concat(", ")),t=t.concat('"'.concat(r,'"'));return t}function _t(e){let t="\n";for(const r of e)switch(r){case pe.AbrHls:t=t.concat("...abrHls\n");break;case pe.Encoding:t=t.concat("...encoding\n");break;case pe.Hls:t=t.concat("...hls\n");break;case pe.VideoHashCode:t=t.concat("...videoHashCode\n");break;case pe.Thumbnails:t=t.concat("...thumbnails\n");break;case pe.Ingest:t=t.concat("...ingest\n");break;case pe.VideoHeader:t=t.concat("...videoHeader\n")}return t}function wt(e){let t="";for(const r of e)switch(r){case pe.AbrHls:t=t.concat("\nfragment abrHls on AbrHls {\n status\n }");break;case pe.Encoding:t=t.concat("\nfragment encoding on Encoding {\n encoding\n complete\n percentage\n totalFrames\n qualityId\n }");break;case pe.Hls:t=t.concat("\nfragment hls on Hls {\n status\n qualityId\n }");break;case pe.VideoHashCode:t=t.concat("\nfragment videoHashCode on VideoHashCode {\n videoMD5\n videoSHA256\n }");break;case pe.Thumbnails:t=t.concat("\nfragment thumbnails on Thumbnails {\n type\n path\n timeMark\n }");break;case pe.Ingest:t=t.concat("\nfragment ingest on Ingest {\n videoId\n encodeType\n }");break;case pe.VideoHeader:t=t.concat("\nfragment videoHeader on VideoHeader {\n videoCodec\n videoBitrate\n audioCodec\n audioBitrate\n audioSamplingRate\n audioChannel\n audioSamplingBit\n duration\n width\n height\n fps\n rotation\n fileSize\n }")}return t}function xt(e){var t,r,n,i,o,a,s,c,u,f;return!!(null!==e&&void 0!==e&&null!==(t=e.storeProfileMap)&&void 0!==t&&null!==(r=t.ss)&&void 0!==r&&r.rvpAftMtPav||null!==e&&void 0!==e&&null!==(n=e.storeProfileMap)&&void 0!==n&&null!==(i=n.ss)&&void 0!==i&&i.rvpAftMtTxt||null!==e&&void 0!==e&&null!==(o=e.storeProfileMap)&&void 0!==o&&null!==(a=o.ss)&&void 0!==a&&a.rvpPav||null!==e&&void 0!==e&&null!==(s=e.storeProfileMap)&&void 0!==s&&null!==(c=s.ss)&&void 0!==c&&c.rvpAgr||null!==e&&void 0!==e&&null!==(u=e.storeProfileMap)&&void 0!==u&&null!==(f=u.ss)&&void 0!==f&&f.rvpTxt)}const Et={listenSmartStoreLoginSuccess:async function(e){const t=new Array(100).fill(0,0,100);for await(const s of t){var r,i;if(await y.delay(1e3),null!==(r=e.tabs)&&void 0!==r&&null!==(i=r[0])&&void 0!==i&&i.id){let t;try{var o,a;if(t=await chrome.tabs.get(e.tabs[0].id),null===(o=t)||void 0===o||!o.url||null!==(a=t)&&void 0!==a&&a.url.includes("login"))continue}catch(n){return void console.error(n)}try{const e=await Bt.fetchStoreCreateView();if(null!==e&&void 0!==e&&e.simpleAccountInfo)return e.simpleAccountInfo}catch(n){console.error(n)}}}},createUploadProduct:async function(e,t,r,n,i,o){var a,s,c,u,f,d,l,h,p,m,v,b,g,y,_,w,x,E,S,T,A,R,M,I,O,C,P,N,k,U,B,D,L,F,j,z,H,q,G,W,Y,V,X,K,Q,J,Z,$,te,re,ne,ie,oe,ae,ce,ue,fe,de,le,pe,me,ve,be,ge,ye,_e,we,xe,Ee,Se,Te,Ae,Re,Me,Ie,Oe,Ce,Pe,Ne,ke;const Ue=(new Date).toISOString(),Be=e.salePrice.transMap.ko,De=e.infos.map((e=>({groupName:e.title.transMap.ko.substring(0,25),usable:!0,optionType:"COMBINATION",sortType:"CREATE"}))),Le=e.options.filter((e=>e.isExpose)).map(((t,r)=>({usable:t.isExpose,stockQuantity:t.stock,price:t.salePrice.transMap.ko-Be,optionType:"COMBINATION",sortType:"CREATE",paths:t.path,...he.getOptionInfo(e.infos,t.path).reduce(((e,t,r)=>Object.assign(e,{["optionName".concat(r+1)]:t.optionName.substring(0,25)})),{})})));gt(Le);const Fe=r.map(((e,t)=>({imageType:0===t?"REPRESENTATIVE":"OPTIONAL",order:0===t||1===t?1:t,fileSize:e.fileSize,height:e.height,width:e.width,imageUrl:e.imageUrl}))),je=null===(a=e.optionMap)||void 0===a||null===(s=a.ss)||void 0===s||null===(c=s.category)||void 0===c?void 0:c.code,ze=(await se.loadSmartStoreLeafCategories()).find((e=>e.id===je));let He={};if(ze){var qe,Ge,We,Ye,Ve,Xe,Ke;const e=null!==(qe=null===(Ge=ze.wholeCategoryId)||void 0===Ge?void 0:Ge.split(">"))&&void 0!==qe?qe:[],t=null!==(We=null===(Ye=ze.wholeCategoryName)||void 0===Ye?void 0:Ye.split(">"))&&void 0!==We?We:[];e.reduce(((e,t,r)=>Object.assign(e,{["category".concat(r+1,"Id")]:t})),He),Object.assign(He,{category:{deleted:!1,id:ze.id,impossibleByCredit:!1,largeCategoryName:null!==(Ve=null===t||void 0===t?void 0:t[0])&&void 0!==Ve?Ve:void 0,middleCategoryName:null!==(Xe=null===t||void 0===t?void 0:t[1])&&void 0!==Xe?Xe:void 0,smallCategoryName:null!==(Ke=null===t||void 0===t?void 0:t[2])&&void 0!==Ke?Ke:void 0,detailCategoryName:ze.name,lastLevel:!0,level:e.length,name:ze.name,parentId:null===e||void 0===e?void 0:e[(null===e||void 0===e?void 0:e.length)-2],sellBlogUse:ze.sellBlogUse,sellBlogUseYn:ze.sellBlogUse,serviceUse:!0,sortOrder:ze.sortOrder,wholeCategoryId:ze.wholeCategoryId,wholeCategoryName:ze.wholeCategoryName,juvenileHarmful:!1}})}const Qe=await vt(null!==(u=e.keywords)&&void 0!==u?u:[]),Je=await bt(e);let Ze={accountNo:null!==(f=null!==(d=null===(l=t.product)||void 0===l||null===(h=l.deliveryInfo)||void 0===h?void 0:h.accountNo)&&void 0!==d?d:null===(p=t.simpleAccountInfo)||void 0===p?void 0:p.accountNo)&&void 0!==f?f:0,name:e.name.transMap.ko.substring(0,100),salePrice:Be,stockQuantity:e.options.reduce(((e,t)=>e+t.stock),0),saleType:"NEW",excludeAdminDiscount:!1,excludeGivePresent:!1,payExposure:!0,...He,images:Fe,videos:n?[n]:[],modAuditInfo:null===(m=t.product)||void 0===m||null===(v=m.deliveryInfo)||void 0===v||null===(b=v.claimDeliveryInfo)||void 0===b||null===(g=b.returnDeliveryCompany)||void 0===g?void 0:g.modAuditInfo,modDate:Ue,regAuditInfo:null===(y=t.product)||void 0===y||null===(_=y.deliveryInfo)||void 0===_||null===(w=_.claimDeliveryInfo)||void 0===w||null===(x=w.returnDeliveryCompany)||void 0===x?void 0:x.regAuditInfo,regDate:null===(E=t.product)||void 0===E||null===(S=E.deliveryInfo)||void 0===S||null===(T=S.claimDeliveryInfo)||void 0===T||null===(A=T.returnDeliveryCompany)||void 0===A?void 0:A.regDate,videoRegisterYn:!!n,detailAttribute:{naverShoppingSearchInfo:{manufacturerName:"",modelName:"",brandName:"",brandId:"",modelId:""},afterServiceInfo:{afterServiceTelephoneNumber:null===(R=e.userOption)||void 0===R?void 0:R.asNumber,afterServiceGuideContent:null===(M=e.userOption)||void 0===M?void 0:M.asDesc},originAreaInfo:{type:"INCLUDE_IN_DETAILS",originArea:{code:"03"},content:""},sellerCodeInfo:{sellerManagementCode:e._id,sellerBarcode:"",sellerCustomCode1:"",sellerCustomCode2:""},seoInfo:{pageTitle:"",metaDescription:"",sellerTags:Qe},optionInfo:{optionUsable:!0,useStockManagement:!0,options:De,optionCombinations:Le,optionStandards:[],optionDeliveryAttributes:[],useDispatchPolicyManagement:!1},supplementProductInfo:{sortType:"CREATE",count:0,usable:!1,supplementProducts:[]},purchaseReviewInfo:{purchaseReviewExposure:!0,reviewUnExposeReason:""},customMadeInfo:{customMade:!1},taxType:e.userOption.isTax?"TAX":"DUTYFREE",productCertificationInfos:[],certification:!1,certificationTargetExcludeContent:{kcYn:"KC_EXEMPTION_OBJECT",kcExemption:"OVERSEAS"},consumptionTax:"TEN",minorPurchasable:!(null!==(I=e.optionMap)&&void 0!==I&&null!==(O=I.ss)&&void 0!==O&&null!==(C=O.category)&&void 0!==C&&C.onlyAdult),productInfoProvidedNotice:{productInfoProvidedNoticeType:"ETC",productInfoProvidedNoticeContent:{templateType:"PRODUCT_INFO_PROVIDED_NOTICE",productInfoProvidedNoticeType:"ETC",returnCostReason:"0",noRefundReason:"0",qualityAssuranceStandard:"0",compensationProcedure:"0",troubleShootingContents:"0",itemName:"\uc0c1\ud488\uc0c1\uc138 \ucc38\uc870",modelName:"\uc0c1\ud488\uc0c1\uc138 \ucc38\uc870",certificateDetails:"\ud574\ub2f9\uc0ac\ud56d \uc5c6\uc74c",manufacturer:"\uc0c1\ud488\uc0c1\uc138 \ucc38\uc870",customerServicePhoneNumber:e.userOption.asNumber}},productAttributes:[],productAttributeUsable:!1,useReturnCancelNotification:!1,editorType:"NONE",bookInfo:{authors:[],illustrators:[],translators:[]},detailContentTextInfo:{excessDetailContentText:!1},itselfProductionProductYn:!1,naverShoppingDisplayStatusType:"ON",purchaseQuantityInfo:{maxPurchaseQuantityPerOrder:String(null!==(P=e.userOption.maxPCnt)&&void 0!==P?P:1e3)}},detailContent:{productDetailInfoContent:e.htmlSrc,editorType:"NONE",editorTypeForEditor:"NONE",existsRemoveTags:!1,mobileDetailType:"PREVIEW",mobileProductDetailPreviewType:"SNAP"},deliveryInfo:{deliveryType:"DELIVERY",deliveryAttributeType:"NORMAL",deliveryCompany:Je,deliveryCompanyId:null===Je||void 0===Je?void 0:Je.id,deliveryFee:{deliveryFeeType:he.getDeliveryFeeType(e),baseFee:String(e.userOption.deliveryCharge),deliveryFeePayType:"PREPAID",deliveryFeeByArea:null!==(N=e.storeProfileMap.ss)&&void 0!==N&&N.jejuDlvCst&&null!==(k=e.storeProfileMap.ss)&&void 0!==k&&k.islandDlvCst?{deliveryAreaType:"AREA_3",area2extraFee:null!==(U=null===(B=e.storeProfileMap.ss)||void 0===B||null===(D=B.jejuDlvCst)||void 0===D?void 0:D.toString())&&void 0!==U?U:0,area3extraFee:null!==(L=null===(F=e.storeProfileMap.ss)||void 0===F||null===(j=F.islandDlvCst)||void 0===j?void 0:j.toString())&&void 0!==L?L:0}:void 0,freeConditionalAmount:"CONDITIONAL_FREE"===he.getDeliveryFeeType(e)?String(e.userOption.freeShipOverAmount):void 0,repeatQuantity:"UNIT_QUANTITY_PAID"===he.getDeliveryFeeType(e)?null===(z=e.storeProfileMap.ss)||void 0===z||null===(H=z.deliveryChargePerCnt)||void 0===H?void 0:H.toString():void 0},claimDeliveryInfo:{returnDeliveryCompany:null===(q=t.deliveryBaseInfoVO)||void 0===q||null===(G=q.returnDeliveryCompanies)||void 0===G?void 0:G.find((e=>"PRIMARY"===e.returnDeliveryCompanyPriorityType)),returnDeliveryCompanySeq:null===(W=t.deliveryBaseInfoVO)||void 0===W||null===(Y=W.returnDeliveryCompanies)||void 0===Y||null===(V=Y.find((e=>"PRIMARY"===e.returnDeliveryCompanyPriorityType)))||void 0===V?void 0:V.id,returnDeliveryFee:e.userOption.returnCharge,exchangeDeliveryFee:e.userOption.exchangeCharge,shippingAddress:null===(X=t.deliveryBaseInfoVO)||void 0===X?void 0:X.baseShippingAddress,shippingAddressId:null===(K=t.deliveryBaseInfoVO)||void 0===K||null===(Q=K.baseShippingAddress)||void 0===Q?void 0:Q.id,returnAddress:null===(J=t.deliveryBaseInfoVO)||void 0===J?void 0:J.baseReturnAddress,returnAddressId:null===(Z=t.deliveryBaseInfoVO)||void 0===Z||null===($=Z.baseReturnAddress)||void 0===$?void 0:$.id,freeReturnInsuranceYn:!1},installationFee:!1,expectedDeliveryPeriodDirectInput:"",accountNo:null!==(te=null!==(re=null===(ne=t.product)||void 0===ne||null===(ie=ne.deliveryInfo)||void 0===ie?void 0:ie.accountNo)&&void 0!==re?re:null===(oe=t.simpleAccountInfo)||void 0===oe?void 0:oe.accountNo)&&void 0!==te?te:0,cloneDeliveryAttributeType:"NORMAL",customMadeDirectInputYn:!1,expectedDeliveryPeriodType:"",freeReturnInsuranceYn:!1},productStats:{},representImageUrl:null!==(ae=null===r||void 0===r||null===(ce=r[0])||void 0===ce?void 0:ce.imageUrl)&&void 0!==ae?ae:"",useSalePeriod:!1};const $e=e.oriPrice.transMap.ko;if($e-Be>=10){var et,tt,rt,nt,it,ot,at,st,ct,ut,ft,dt,lt,ht,pt;const t=$e-Be;Ze.salePrice=$e,Ze.customerBenefit={reviewPointPolicy:xt(e)?{afterUsePhotoVideoReviewPoint:null===(et=e.storeProfileMap)||void 0===et||null===(tt=et.ss)||void 0===tt||null===(rt=tt.rvpAftMtPav)||void 0===rt?void 0:rt.toString(),afterUseTextReviewPoint:null===(nt=e.storeProfileMap)||void 0===nt||null===(it=nt.ss)||void 0===it||null===(ot=it.rvpAftMtTxt)||void 0===ot?void 0:ot.toString(),photoVideoReviewPoint:null===(at=e.storeProfileMap)||void 0===at||null===(st=at.ss)||void 0===st||null===(ct=st.rvpPav)||void 0===ct?void 0:ct.toString(),storeMemberReviewPoint:null===(ut=e.storeProfileMap)||void 0===ut||null===(ft=ut.ss)||void 0===ft||null===(dt=ft.rvpAgr)||void 0===dt?void 0:dt.toString(),textReviewPoint:null===(lt=e.storeProfileMap)||void 0===lt||null===(ht=lt.ss)||void 0===ht||null===(pt=ht.rvpTxt)||void 0===pt?void 0:pt.toString()}:void 0,immediateDiscountPolicy:{discountMethod:{discountUnitType:"WON",value:t},mobileDiscountMethod:{discountUnitType:"WON",value:t}}}}var mt;return i&&(Ze=ee.mergeObjects(Ze,i),Ze.detailAttribute&&null!==(mt=i.detailAttribute)&&void 0!==mt&&mt.productInfoProvidedNotice&&(Ze.detailAttribute.productInfoProvidedNotice=i.detailAttribute.productInfoProvidedNotice),o&&o.forEach((e=>{"DELETE"===e.action?void 0!==ee.getProperty(Ze,e.path)&&ee.setProperty(Ze,e.path,void 0):"SET"===e.action&&ee.setProperty(Ze,e.path,e.value)}))),{product:Ze,singleChannelProductMap:{STOREFARM:{selfProductNameUsable:!1,channelProductName:"",channelServiceType:"STOREFARM",channelProductType:"SINGLE",channel:null,epInfo:{naverShoppingRegistration:null!==(ue=null===(fe=t.simpleAccountInfo)||void 0===fe?void 0:fe.epNaverShoppingOperable)&&void 0!==ue&&ue,enuriRegistration:null!==(de=null===(le=t.simpleAccountInfo)||void 0===le?void 0:le.epEnuriOperable)&&void 0!==de&&de,danawaRegistration:null!==(pe=null===(me=t.simpleAccountInfo)||void 0===me?void 0:me.epDanawaOperable)&&void 0!==pe&&pe,naverDisabled:!(null!==(ve=t.simpleAccountInfo)&&void 0!==ve&&ve.epNaverShoppingOperable),enuriDisabled:!(null!==(be=t.simpleAccountInfo)&&void 0!==be&&be.epEnuriOperable),danawaDisabled:!(null!==(ge=t.simpleAccountInfo)&&void 0!==ge&&ge.epDanawaOperable),disabledAll:!(null!==(ye=t.simpleAccountInfo)&&void 0!==ye&&ye.epNaverShoppingOperable)&&!(null!==(_e=t.simpleAccountInfo)&&void 0!==_e&&_e.epEnuriOperable)&&!(null!==(we=t.simpleAccountInfo)&&void 0!==we&&we.epDanawaOperable)},channelProductDisplayStatusType:"ON",channelProductStatusType:"NORMAL",storeKeepExclusiveProduct:!1,orderRequestUsable:!1,best:!1,bbsConfig:!1,materialImages:[],images:[],modAuditInfo:null===(xe=t.product)||void 0===xe||null===(Ee=xe.deliveryInfo)||void 0===Ee||null===(Se=Ee.claimDeliveryInfo)||void 0===Se||null===(Te=Se.returnDeliveryCompany)||void 0===Te?void 0:Te.modAuditInfo,modDate:Ue,regAuditInfo:null===(Ae=t.product)||void 0===Ae||null===(Re=Ae.deliveryInfo)||void 0===Re||null===(Me=Re.claimDeliveryInfo)||void 0===Me||null===(Ie=Me.returnDeliveryCompany)||void 0===Ie?void 0:Ie.regAuditInfo,regDate:null===(Oe=t.product)||void 0===Oe||null===(Ce=Oe.deliveryInfo)||void 0===Ce||null===(Pe=Ce.claimDeliveryInfo)||void 0===Pe||null===(Ne=Pe.returnDeliveryCompany)||void 0===Ne?void 0:Ne.regDate,tagImages:[],barcodeImage:null,affiliateInfo:{affiliateYn:!1},channelNo:null===(ke=t.simpleAccountInfo)||void 0===ke?void 0:ke.defaultChannelNo,channelProductSupplyType:"OWNER",videos:[],videoRegisterYn:!1,productAttributeUsable:!1,productAttributes:[],naverShoppingSearchInfo:{},representImageUrl:"",product:Ze}},...t.simpleAccountInfo}},createEditProduct:async function(e,t,r,n,i,o){var a,s,c,u,f,d,l,h,p;const m=(new Date).toISOString(),v=e.salePrice.transMap.ko,b=e.infos.map((e=>({groupName:e.title.transMap.ko.substring(0,25),usable:!0,optionType:"COMBINATION",sortType:"CREATE"}))),g=e.options.filter((e=>e.isExpose)).map(((t,r)=>({usable:t.isExpose,stockQuantity:t.stock,price:t.salePrice.transMap.ko-v,optionType:"COMBINATION",sortType:"CREATE",paths:t.path,...he.getOptionInfo(e.infos,t.path).reduce(((e,t,r)=>Object.assign(e,{["optionName".concat(r+1)]:t.optionName.substring(0,25)})),{})})));gt(g);const y=r.map(((e,t)=>({imageType:0===t?"REPRESENTATIVE":"OPTIONAL",order:0===t||1===t?1:t,fileSize:e.fileSize,height:e.height,width:e.width,imageUrl:e.imageUrl}))),_=null===(a=e.optionMap)||void 0===a||null===(s=a.ss)||void 0===s||null===(c=s.category)||void 0===c?void 0:c.code,w=(await se.loadSmartStoreLeafCategories()).find((e=>e.id===_));let x={};if(w){var E,S,T,A,R,M,I;const e=null!==(E=null===(S=w.wholeCategoryId)||void 0===S?void 0:S.split(">"))&&void 0!==E?E:[],t=null!==(T=null===(A=w.wholeCategoryName)||void 0===A?void 0:A.split(">"))&&void 0!==T?T:[];e.reduce(((e,t,r)=>Object.assign(e,{["category".concat(r+1,"Id")]:t})),x),Object.assign(x,{category:{deleted:!1,id:w.id,impossibleByCredit:!1,largeCategoryName:null!==(R=null===t||void 0===t?void 0:t[0])&&void 0!==R?R:void 0,middleCategoryName:null!==(M=null===t||void 0===t?void 0:t[1])&&void 0!==M?M:void 0,smallCategoryName:null!==(I=null===t||void 0===t?void 0:t[2])&&void 0!==I?I:void 0,detailCategoryName:w.name,lastLevel:!0,level:e.length,name:w.name,parentId:null===e||void 0===e?void 0:e[(null===e||void 0===e?void 0:e.length)-2],sellBlogUse:w.sellBlogUse,sellBlogUseYn:w.sellBlogUse,serviceUse:!0,sortOrder:w.sortOrder,wholeCategoryId:w.wholeCategoryId,wholeCategoryName:w.wholeCategoryName,juvenileHarmful:!1}})}const O=await vt(null!==(u=e.keywords)&&void 0!==u?u:[]),C=await bt(e);var P,N;if(t.product&&(t.product.name=e.name.transMap.ko.substring(0,100),t.product.stockQuantity=e.options.reduce(((e,t)=>e+t.stock),0),t.product.salePrice=v,t.product.images=y,t.product.representImageUrl=null!==(P=null===r||void 0===r||null===(N=r[0])||void 0===N?void 0:N.imageUrl)&&void 0!==P?P:"",t.product.modDate=m,n&&("add"===n.action&&n.video?(t.product.videos=[n.video],t.product.videoRegisterYn=!0):"remove"===n.action&&(t.product.videos=[],t.product.videoRegisterYn=!1)),x.category1Id===t.product.category1Id&&Object.assign(t.product,{...x})),null!==(f=t.product)&&void 0!==f&&f.detailAttribute){var k,U,B,D,L,F,j,z,H,q,G,W,Y,V,X,K,Q,J;if(t.product.detailAttribute.taxType=e.userOption.isTax?"TAX":"DUTYFREE",t.product.detailAttribute.minorPurchasable=!(null!==(k=e.optionMap)&&void 0!==k&&null!==(U=k.ss)&&void 0!==U&&null!==(B=U.category)&&void 0!==B&&B.onlyAdult),null!==(D=t.product)&&void 0!==D&&null!==(L=D.detailAttribute)&&void 0!==L&&L.optionInfo&&(t.product.detailAttribute.optionInfo.options=b),null!==(F=t.product)&&void 0!==F&&null!==(j=F.detailAttribute)&&void 0!==j&&j.optionInfo&&(t.product.detailAttribute.optionInfo.optionCombinations=g),null!==(z=t.product)&&void 0!==z&&null!==(H=z.detailAttribute)&&void 0!==H&&null!==(q=H.productInfoProvidedNotice)&&void 0!==q&&q.productInfoProvidedNoticeContent&&(t.product.detailAttribute.productInfoProvidedNotice.productInfoProvidedNoticeContent.customerServicePhoneNumber=e.userOption.asNumber),null!==(G=t.product)&&void 0!==G&&null!==(W=G.detailAttribute)&&void 0!==W&&W.sellerCodeInfo&&(t.product.detailAttribute.sellerCodeInfo.sellerManagementCode=e._id),null!==(Y=t.product)&&void 0!==Y&&null!==(V=Y.detailAttribute)&&void 0!==V&&V.afterServiceInfo)t.product.detailAttribute.afterServiceInfo.afterServiceTelephoneNumber=null===(Q=e.userOption)||void 0===Q?void 0:Q.asNumber,t.product.detailAttribute.afterServiceInfo.afterServiceGuideContent=null===(J=e.userOption)||void 0===J?void 0:J.asDesc;null!==(X=t.product)&&void 0!==X&&null!==(K=X.detailAttribute)&&void 0!==K&&K.seoInfo&&(t.product.detailAttribute.seoInfo={pageTitle:"",metaDescription:"",sellerTags:O})}if(null!==(d=t.product)&&void 0!==d&&d.detailContent&&(t.product.detailContent.productDetailInfoContent=e.htmlSrc),null!==(l=t.product)&&void 0!==l&&l.deliveryInfo){var Z,$,te,re,ne,ie,oe,ae,ce,ue;if(t.product.deliveryInfo.deliveryCompany=C,t.product.deliveryInfo.deliveryCompanyId=null===C||void 0===C?void 0:C.id,t.product.deliveryInfo.deliveryFee)t.product.deliveryInfo.deliveryFee.deliveryFeeType=he.getDeliveryFeeType(e),t.product.deliveryInfo.deliveryFee.baseFee=String(e.userOption.deliveryCharge),t.product.deliveryInfo.deliveryFee.deliveryFeePayType="PREPAID",t.product.deliveryInfo.deliveryFee.deliveryFeeByArea=null!==(Z=e.storeProfileMap.ss)&&void 0!==Z&&Z.jejuDlvCst&&null!==($=e.storeProfileMap.ss)&&void 0!==$&&$.islandDlvCst?{deliveryAreaType:"AREA_3",area2extraFee:null!==(te=null===(re=e.storeProfileMap.ss)||void 0===re||null===(ne=re.jejuDlvCst)||void 0===ne?void 0:ne.toString())&&void 0!==te?te:0,area3extraFee:null!==(ie=null===(oe=e.storeProfileMap.ss)||void 0===oe||null===(ae=oe.islandDlvCst)||void 0===ae?void 0:ae.toString())&&void 0!==ie?ie:0}:void 0,t.product.deliveryInfo.deliveryFee.freeConditionalAmount="CONDITIONAL_FREE"===he.getDeliveryFeeType(e)?String(e.userOption.freeShipOverAmount):void 0,t.product.deliveryInfo.deliveryFee.repeatQuantity="UNIT_QUANTITY_PAID"===he.getDeliveryFeeType(e)?null===(ce=e.storeProfileMap.ss)||void 0===ce||null===(ue=ce.deliveryChargePerCnt)||void 0===ue?void 0:ue.toString():void 0;t.product.deliveryInfo.claimDeliveryInfo&&(t.product.deliveryInfo.claimDeliveryInfo.returnDeliveryFee=e.userOption.returnCharge,t.product.deliveryInfo.claimDeliveryInfo.exchangeDeliveryFee=e.userOption.exchangeCharge)}const fe=e.oriPrice.transMap.ko;if(t.product)if(fe-v>=10){var de,le,pe,me,ve,be,ge,ye,_e,we,xe,Ee,Se,Te,Ae;const r=fe-v;t.product.salePrice=fe,t.product.customerBenefit={reviewPointPolicy:xt(e)?{afterUsePhotoVideoReviewPoint:null===(de=e.storeProfileMap)||void 0===de||null===(le=de.ss)||void 0===le||null===(pe=le.rvpAftMtPav)||void 0===pe?void 0:pe.toString(),afterUseTextReviewPoint:null===(me=e.storeProfileMap)||void 0===me||null===(ve=me.ss)||void 0===ve||null===(be=ve.rvpAftMtTxt)||void 0===be?void 0:be.toString(),photoVideoReviewPoint:null===(ge=e.storeProfileMap)||void 0===ge||null===(ye=ge.ss)||void 0===ye||null===(_e=ye.rvpPav)||void 0===_e?void 0:_e.toString(),storeMemberReviewPoint:null===(we=e.storeProfileMap)||void 0===we||null===(xe=we.ss)||void 0===xe||null===(Ee=xe.rvpAgr)||void 0===Ee?void 0:Ee.toString(),textReviewPoint:null===(Se=e.storeProfileMap)||void 0===Se||null===(Te=Se.ss)||void 0===Te||null===(Ae=Te.rvpTxt)||void 0===Ae?void 0:Ae.toString()}:void 0,immediateDiscountPolicy:{discountMethod:{discountUnitType:"WON",value:r},mobileDiscountMethod:{discountUnitType:"WON",value:r}}}}else t.product.salePrice=v,t.product.customerBenefit=void 0;var Re;return i&&t.product&&(t.product=ee.mergeObjects(t.product,i),t.product.detailAttribute&&null!==(Re=i.detailAttribute)&&void 0!==Re&&Re.productInfoProvidedNotice&&(t.product.detailAttribute.productInfoProvidedNotice=i.detailAttribute.productInfoProvidedNotice),o&&o.forEach((e=>{"DELETE"===e.action?void 0!==ee.getProperty(t.product,e.path)&&ee.setProperty(t.product,e.path,void 0):"SET"===e.action&&ee.setProperty(t.product,e.path,e.value)}))),null!==(h=t.singleChannelProductMap)&&void 0!==h&&h.STOREFARM&&(t.singleChannelProductMap.STOREFARM.product=t.product),{product:t.product,singleChannelProductMap:{STOREFARM:null===(p=t.singleChannelProductMap)||void 0===p?void 0:p.STOREFARM}}},findTargetStoreFarmChannelFromCreateView:function(e){var t,r,n,i,o,a;const s=null===(t=e.simpleAccountInfo)||void 0===t?void 0:t.defaultChannelNo;if(s)return null!==(r=null===(n=e.simpleAccountInfo)||void 0===n||null===(i=n.ownerChannelInfoList)||void 0===i?void 0:i.find((e=>e.id===s)))&&void 0!==r?r:null===(o=e.simpleAccountInfo)||void 0===o||null===(a=o.ownerChannelInfoList)||void 0===a?void 0:a[0]},findTargetStoreFarmChannelFromProduct:function(e){var t,r,n,i;const o=null===(t=e.singleChannelProductMap)||void 0===t||null===(r=t.STOREFARM)||void 0===r?void 0:r.id;if(o)return null===(n=e.simpleAccountInfo)||void 0===n||null===(i=n.ownerChannelInfoList)||void 0===i?void 0:i.find((e=>{var t;return(null===(t=e.id)||void 0===t?void 0:t.toString())===o}))},makeFileMetaRequestBody:function(e,t){return{query:'{\n _0_0: video(id: "'.concat(e,'", type: [').concat(yt(t),"]) {\n type\n status\n data {").concat(_t(t),"}\n errors {\n code\n message\n }\n }\n}\n").concat(wt(t),"\n")}}};let St=function(e){return e.NONE="none",e.SALE="sale",e.STOP="stop",e.DELETE="delete",e.ERROR="error",e.UPLOADING="uploading",e}({}),Tt=function(e){return e.SALE="SALE",e.SUSPENSION="SUSPENSION",e}({});const At={percentyStateToSmartStoreState:function(e){switch(e){case St.SALE:return Tt.SALE;case St.STOP:return Tt.SUSPENSION;default:return}}};async function Rt(){try{const e=await Ot();return Et.findTargetStoreFarmChannelFromCreateView(e)}catch(n){if("401"===n.code)throw new G("\uc2a4\ub9c8\ud2b8\uc2a4\ud1a0\uc5b4 \ub85c\uadf8\uc778\uc774 \ud544\uc694\ud569\ub2c8\ub2e4.",le.SMART_STORE_LOGIN_NEED);throw n}}async function Mt(e,t,r,i){var o,a,s,c,u,f,d,l,h;let p;try{p=await Ot()}catch(n){if("401"===n.code)throw new G("\uc2a4\ub9c8\ud2b8\uc2a4\ud1a0\uc5b4 \ub85c\uadf8\uc778\uc774 \ud544\uc694\ud569\ub2c8\ub2e4.",le.SMART_STORE_LOGIN_NEED);throw n}await kt().catch((e=>!1));const m=await se.batchDownloadFile(e.imgs.filter((e=>!!e))),v=await Ct(m,!0).catch((e=>[]));if(t&&t.length>0){const e=await se.downloadFile(ne.setSchemeToUri(t)).catch((e=>{}));if(e){const t=await Ct([e],!1);t&&t.length>0&&(v[0]=t[0])}}let b;if(e.videoUrl)try{b=await Pt(e.videoUrl)}catch(n){console.error(n)}const g=await Et.createUploadProduct(e,p,v,b,r,i);Ut(g,e,v);const y=await async function(e){return fetch("https://sell.smartstore.naver.com/api/products",{method:"POST",credentials:"include",cache:"no-cache",referrer:"https://sell.smartstore.naver.com/",headers:{"Content-Type":"application/json;charset=UTF-8","x-current-state":"https://sell.smartstore.naver.com/#/products/create","x-current-statename":"main.product.create","x-to-statename":"main.product.create"},mode:"cors",body:JSON.stringify(e)}).then((t=>t.ok?t.json():t.json().then((t=>{var r;const n=null===t||void 0===t||null===(r=t.invalidInputs)||void 0===r?void 0:r.map((t=>{if("NumberRangePrice"===t.type){var r;const n=de.getSmartStoreOptionPriceRangeFromErrorMessage(t.message),i=de.getSmartStoreOptionNumberFromErrorMessage(t.message);if(n&&i&&null!==(r=e.product)&&void 0!==r&&r.salePrice)return new G("".concat(i,"\ubc88\uc9f8 \uc635\uc158\uc758 \uc635\uc158\uac00\ub294 \ucd5c\uc800 ").concat(n[0]+e.product.salePrice,"\uc6d0\uc5d0\uc11c ").concat(n[1]+e.product.salePrice,"\uc6d0\uae4c\uc9c0 \uc785\ub825\ud574 \uc8fc\uc138\uc694."),le.SMART_STORE_UPLOAD_PRODUCT_BAD_REQUEST)}return new G(t.message,le.SMART_STORE_UPLOAD_PRODUCT_BAD_REQUEST)}));throw new G("\uc2a4\ub9c8\ud2b8\uc2a4\ud1a0\uc5b4 \uc5c5\ub85c\ub4dc \uc2e4\ud328",le.SMART_STORE_UPLOAD_ERROR,n,t)}))))}(g);return{storeProductRootId:String(null!==(o=y.productId)&&void 0!==o?o:""),storefarmProductId:String(null!==(a=null===(s=y.singleChannelProductMap)||void 0===s||null===(c=s.STOREFARM)||void 0===c?void 0:c.id)&&void 0!==a?a:""),storefarmUrlId:null!==(u=null===(f=ne.parseURL(null!==(d=y.storefarmProductDirectUrl)&&void 0!==d?d:"").pathList)||void 0===f?void 0:f[0])&&void 0!==u?u:"",storefarmProductDirectUrl:null!==(l=y.storefarmProductDirectUrl)&&void 0!==l?l:"",mobileStorefarmProductDirectUrl:null!==(h=y.mobileStorefarmProductDirectUrl)&&void 0!==h?h:""}}async function It(e,t,r,i){var o,a,s,c,u,f,d,l,h,p,m,v,b;const g=null===(o=e.optionMap)||void 0===o||null===(a=o.ss)||void 0===a?void 0:a.storeId;if(!g)throw new G("\uc2a4\ub9c8\ud2b8\uc2a4\ud1a0\uc5b4\uc5d0 \ub4f1\ub85d\ub418\uc9c0 \uc54a\uc740 \uc0c1\ud488\uc785\ub2c8\ub2e4.",le.SMART_STORE_PRODUCT_NOT_EXIST);const y=await Nt(g),_=(await kt().catch((e=>!1)),await se.batchDownloadFile(e.imgs.filter((e=>!!e)))),w=await Ct(_,!0).catch((e=>[]));if(t&&t.length>0){const e=await se.downloadFile(ne.setSchemeToUri(t)).catch((e=>{}));if(e){const t=await Ct([e],!1);t&&t.length>0&&(w[0]=t[0])}}let x;if(null!==(s=y.product)&&void 0!==s&&s.videos&&y.product.videos.length>0&&!e.videoUrl)x={action:"remove"};else if((null===(c=y.product)||void 0===c||!c.videos||y.product.videos.length<=0)&&e.videoUrl)try{x={action:"add",video:await Pt(e.videoUrl)}}catch(n){console.error(n)}const E=await Et.createEditProduct(e,y,w,x,r,i);Ut(E,e,w);const S=await async function(e){var t;return fetch("https://sell.smartstore.naver.com/api/products",{method:"PATCH",credentials:"include",cache:"no-cache",referrer:"https://sell.smartstore.naver.com/",headers:{"Content-Type":"application/json;charset=UTF-8","x-current-state":"https://sell.smartstore.naver.com/#/products/edit/".concat(null===(t=e.product)||void 0===t?void 0:t.id),"x-current-statename":"main.product.edit","x-to-statename":"main.product.edit"},mode:"cors",body:JSON.stringify(e)}).then((t=>t.ok?t.json():t.json().then((t=>{var r;const n=null===t||void 0===t||null===(r=t.invalidInputs)||void 0===r?void 0:r.map((t=>{if("NumberRangePrice"===t.type){var r;const n=de.getSmartStoreOptionPriceRangeFromErrorMessage(t.message),i=de.getSmartStoreOptionNumberFromErrorMessage(t.message);if(n&&i&&null!==(r=e.product)&&void 0!==r&&r.salePrice)return new G("".concat(i,"\ubc88\uc9f8 \uc635\uc158\uc758 \uc635\uc158\uac00\ub294 \ucd5c\uc800 ").concat(n[0]+e.product.salePrice,"\uc6d0\uc5d0\uc11c ").concat(n[1]+e.product.salePrice,"\uc6d0\uae4c\uc9c0 \uc785\ub825\ud574 \uc8fc\uc138\uc694."),le.SMART_STORE_UPLOAD_PRODUCT_BAD_REQUEST)}return new G(t.message,le.SMART_STORE_UPLOAD_PRODUCT_BAD_REQUEST)}));throw new G("\uc2a4\ub9c8\ud2b8\uc2a4\ud1a0\uc5b4 \uc218\uc815 \uc2e4\ud328",le.SMART_STORE_UPLOAD_ERROR,n,t)}))))}(E);return{storeProductRootId:String(null!==(u=S.productId)&&void 0!==u?u:""),storefarmProductId:String(null!==(f=null===(d=S.singleChannelProductMap)||void 0===d||null===(l=d.STOREFARM)||void 0===l?void 0:l.id)&&void 0!==f?f:""),storefarmUrlId:null!==(h=null===(p=ne.parseURL(null!==(m=S.storefarmProductDirectUrl)&&void 0!==m?m:"").pathList)||void 0===p?void 0:p[0])&&void 0!==h?h:"",storefarmProductDirectUrl:null!==(v=S.storefarmProductDirectUrl)&&void 0!==v?v:"",mobileStorefarmProductDirectUrl:null!==(b=S.mobileStorefarmProductDirectUrl)&&void 0!==b?b:""}}async function Ot(){return fetch("https://sell.smartstore.naver.com/api/products?_action=create",{method:"GET",credentials:"include",cache:"no-cache",referrer:"https://sell.smartstore.naver.com/",headers:{"x-current-state":"https://sell.smartstore.naver.com/#/products/create","x-current-statename":"","x-to-statename":"main.product.create"},mode:"cors"}).then((e=>{if(e.ok)return e.json();throw new G("Error: Product View \ub85c\ub529 \uc2e4\ud328",e.status.toString())}))}async function Ct(e,t){if(!e||0===e.length)return[];const r=new FormData;let i=0;for await(const n of e){const e=await H.getRandomFileName(n,"jpeg");r.append("files[".concat(i++,"]"),n,e)}try{const e=await fetch("https://sell.smartstore.naver.com/api/v2/product-photos/uploads?acceptedPatterns=image%2Fjpeg,image%2Fgif,image%2Fpng,image%2Fbmp",{method:"POST",credentials:"include",cache:"no-cache",referrer:"https://sell.smartstore.naver.com/",headers:{"x-current-state":"https://sell.smartstore.naver.com/#/products/create","x-current-statename":"main.product.create","x-to-statename":"main.product.create"},mode:"cors",body:r});if(e.ok)return await e.json();{var o;const t=await e.json(),r=null===t||void 0===t||null===(o=t.invalidInputs)||void 0===o?void 0:o.map((e=>new G(e.message,le.SMART_STORE_UPLOAD_PHOTO_BAD_REQUEST)));throw new G("\uc2a4\ub9c8\ud2b8\uc2a4\ud1a0\uc5b4 \ud30c\uc77c \uc5c5\ub85c\ub4dc \uc2e4\ud328",le.SMART_STORE_ERROR,r)}}catch(n){console.error(n)}if(!t||e.length<2)return[];console.log("file upload retry each");const a=[];for await(const n of e){const e=await Ct([n],!1);e.length>0&&a.push(e[0])}return a}async function Pt(e){var t,r,n,i;const o=await se.downloadFile(e).catch((e=>{}));if(!o)throw new G("Video download failed",le.SMART_STORE_VIDEO_UPLOAD_FAIL);if(o.size>200*ie.BYTE_1MB)throw new G("Video size too large",le.SMART_STORE_VIDEO_UPLOAD_FAIL);const a=await H.getRandomFileName(o,H.getExtensionFromUri(e)),s=await fetch("https://sell.smartstore.naver.com/api/videoinfra/SELLER/bypass/token?durationLimit=900&fileSizeLimit=1073741824",{method:"GET",credentials:"include",cache:"no-cache",referrer:"https://sell.smartstore.naver.com/",mode:"cors"}).then((e=>e.json())),c=await fetch("https://sell.smartstore.naver.com/api/videoinfra/SELLER/videoId",{method:"GET",credentials:"include",cache:"no-cache",referrer:"https://sell.smartstore.naver.com/",mode:"cors"}).then((e=>e.json())),u=await fetch("https://nexus.vod.naver.com/warp/21/upload/v4/".concat(c.videoId,"/sessions"),{method:"POST",credentials:"include",cache:"no-cache",referrer:"https://sell.smartstore.naver.com/",mode:"cors",body:JSON.stringify({chunkSize:5242880,chunkUpload:!0,delayIngestion:"additional",fileName:a,fileSize:o.size,serviceId:21,token:s.token,userId:s.data.userId})}).then((e=>e.json())),f=[];let d=1;for(let y=0;y<o.size;){let e=y+u.chunkSize;o.size-e<0&&(e=o.size);const t=new FormData;t.append("key",u.key),t.append("fileName",a),t.append("fileSize",o.size.toString()),t.append("chunkIndex",d.toString()),t.append("chunkSize",u.chunkSize.toString()),t.append("currentChunkSize",(e-y).toString()),t.append("chunkUpload","true"),t.append("file",o.slice(y,e),a),f.push(t),d++,y=e}const l=f.map((e=>{var t;return fetch("https://".concat(null===(t=u.servers)||void 0===t?void 0:t[0],"/upload/v2/files"),{method:"POST",credentials:"include",cache:"no-cache",mode:"cors",body:e}).then((e=>e.json()))}));await Promise.all(l),await fetch("https://nexus.vod.naver.com/warp/21/upload/v4/files/".concat(c.videoId,"/additionalInfo"),{method:"POST",cache:"no-cache",referrer:"https://sell.smartstore.naver.com/",headers:{"Content-Type":"application/json;charset=UTF-8"},mode:"cors",body:JSON.stringify({channel:null,encodeType:"normal",logoId:null,trailer:{aniGif:{startTime:0,fps:10,endTime:1e4},manualMp4s:[{startTime:0,endTime:3e4,hasSound:!0,resolutionCode:720}]}})}).then((e=>e.json()));const h=async e=>await fetch("https://nexus.vod.naver.com/api/v1/files",{method:"POST",cache:"no-cache",keepalive:!0,referrer:"https://sell.smartstore.naver.com/",body:JSON.stringify(e)}).then((e=>e.json()));let p,m,v,b,g,_,w;for await(const L of[1,2,3,4,5,6,7,8,9,10]){let e=[];if(p&&m){if(v&&b&&g&&_&&w)break;{var x,E,S,T,A,R,M,I,O,C;e=[],_||e.push(pe.VideoHashCode),b||e.push(pe.Thumbnails),w||e.push(pe.Encoding),g||e.push(pe.Hls),v||e.push(pe.AbrHls);const t=await h(Et.makeFileMetaRequestBody(u.key,e));v||(v=null===(x=t.data)||void 0===x||null===(E=x._0_0)||void 0===E?void 0:E.find((e=>e.type===pe.AbrHls&&"done"===e.status))),b||(b=null===(S=t.data)||void 0===S||null===(T=S._0_0)||void 0===T?void 0:T.find((e=>e.type===pe.Thumbnails&&"done"===e.status))),g||(g=null===(A=t.data)||void 0===A||null===(R=A._0_0)||void 0===R?void 0:R.find((e=>e.type===pe.Hls&&"done"===e.status))),_||(_=null===(M=t.data)||void 0===M||null===(I=M._0_0)||void 0===I?void 0:I.find((e=>e.type===pe.VideoHashCode&&"done"===e.status))),w||(w=null===(O=t.data)||void 0===O||null===(C=O._0_0)||void 0===C?void 0:C.find((e=>e.type===pe.Encoding&&"done"===e.status)))}}else{var P,N,k,U;p||e.push(pe.Ingest),m||e.push(pe.VideoHeader);const t=await h(Et.makeFileMetaRequestBody(u.key,e));p||(p=null===(P=t.data)||void 0===P||null===(N=P._0_0)||void 0===N?void 0:N.find((e=>e.type===pe.Ingest&&"done"===e.status))),m||(m=null===(k=t.data)||void 0===k||null===(U=k._0_0)||void 0===U?void 0:U.find((e=>e.type===pe.VideoHeader&&"done"===e.status)))}await y.delay(5e3)}if(!p||null===(t=m)||void 0===t||null===(r=t.data)||void 0===r||!r[0]||!v||null===(n=b)||void 0===n||null===(i=n.data)||void 0===i||!i[0]||!g||!_||!w)throw new G("\ube44\ub514\uc624 \uc5c5\ub85c\ub4dc\uc5d0 \uc2e4\ud328\ud588\uc2b5\ub2c8\ub2e4. [fetching meta fail]",le.SMART_STORE_VIDEO_UPLOAD_FAIL);const B=await fetch("https://sell.smartstore.naver.com/api/file/photoinfra/uploadUrl",{method:"POST",credentials:"include",cache:"no-cache",referrer:"https://sell.smartstore.naver.com/",headers:{"Content-Type":"application/json;charset=UTF-8","x-current-state":"https://sell.smartstore.naver.com/#/products/create","x-current-statename":"main.product.create","x-to-statename":"main.product.create"},mode:"cors",body:JSON.stringify({url:b.data[0].path})}).then((e=>e.json())),D=await fetch("https://sell.smartstore.naver.com/api/videoinfra/SELLER/".concat(c.videoId,"/animated-gif"),{method:"GET",credentials:"include",cache:"no-cache",referrer:"https://sell.smartstore.naver.com/",headers:{"x-current-state":"https://sell.smartstore.naver.com/#/products/create","x-current-statename":"main.product.create","x-to-statename":"main.product.create"},mode:"cors"}).then((e=>e.json()));return{videoId:c.videoId,thumbnailUrl:B.imageUrl,thumbnailWidth:B.width,thumbnailHeight:B.height,encodeStatusType:"COMPLETE",trailerStatusType:"WAIT",order:1,gifThumbnailInfo:{gifThumbnailStatusType:"COMPLETE",gifThumbnailUrl:D.imageUrl,gifThumbnailWidth:D.width,gifThumbnailHeight:D.height},detailInfo:{error:!1,...m.data[0]}}}async function Nt(e){try{const t=await fetch("https://sell.smartstore.naver.com/api/products/".concat(e),{method:"GET",credentials:"include",cache:"no-cache",referrer:"https://sell.smartstore.naver.com/",headers:{"x-current-state":"https://sell.smartstore.naver.com/#/products/origin-list","x-current-statename":"main.product.origin-list","x-to-statename":"main.product.edit"},mode:"cors"}).then((e=>{if(e.ok)return e.json();throw new G("\uc2a4\ub9c8\ud2b8\uc2a4\ud1a0\uc5b4\uc5d0 \ub4f1\ub85d\ub418\uc9c0 \uc54a\uc740 \uc0c1\ud488\uc785\ub2c8\ub2e4.",le.SMART_STORE_PRODUCT_NOT_EXIST,void 0,e)}));if(null===t||void 0===t||!t.product)throw new G("\uc2a4\ub9c8\ud2b8\uc2a4\ud1a0\uc5b4\uc5d0 \ub4f1\ub85d\ub418\uc9c0 \uc54a\uc740 \uc0c1\ud488\uc785\ub2c8\ub2e4.",le.SMART_STORE_PRODUCT_NOT_EXIST);return t}catch(n){throw"401"===n.code?new G("\uc2a4\ub9c8\ud2b8\uc2a4\ud1a0\uc5b4 \ub85c\uadf8\uc778\uc774 \ud544\uc694\ud569\ub2c8\ub2e4.",le.SMART_STORE_LOGIN_NEED):n}}async function kt(){return await fetch("https://sell.smartstore.naver.com/api/login/check-neoid-session",{method:"GET",credentials:"include",cache:"no-cache",referrer:"https://sell.smartstore.naver.com/",headers:{"x-current-state":"https://sell.smartstore.naver.com/#/products/create","x-current-statename":"main.product.create","x-to-statename":"main.product.create"},mode:"cors"}).then((e=>e.ok?e.json():{existNeoIdSession:!1})).then((e=>e.existNeoIdSession)).catch((e=>!1))}function Ut(e,t,r){var n;const i=[];if(null!==(n=t.storeProfileMap)&&void 0!==n&&n.ss||i.push(new G("\uc2a4\ub9c8\ud2b8\uc2a4\ud1a0\uc5b4 \ub9c8\ucf13 \uc124\uc815\uc744 \ud574\uc8fc\uc138\uc694",le.SMART_STORE_EMPTY_MARKET_PROFILE)),t.name.transMap.ko||i.push(new G("\uc0c1\ud488\uba85\uc744 \uc785\ub825\ud574\uc8fc\uc138\uc694",le.SMART_STORE_EMPTY_PRODUCT_NAME)),t.options.some((e=>e.isExpose))||i.push(new G("\ubaa8\ub4e0 \uc635\uc158\uc774 \uc5c5\ub85c\ub4dc \uc81c\uc678\ub418\uc5b4\uc788\uc2b5\ub2c8\ub2e4",le.SMART_STORE_EMPTY_OPTION)),t.options.some((e=>e.stock>0))||i.push(new G("\ubaa8\ub4e0 \uc635\uc158\uc758 \uc7ac\uace0\uc218\ub7c9\uc774 0 \uc785\ub2c8\ub2e4",le.SMART_STORE_EMPTY_OPTION_STOCK)),i.length>0)throw new G("\uc2a4\ub9c8\ud2b8\uc2a4\ud1a0\uc5b4 \ub370\uc774\ud130 \uc624\ub958",le.SMART_STORE_ERROR,i)}const Bt={uploadSmartStoreWithRetry:async function(e,t,r,i){const o=(await ce.fetchProductForSmartStore(e)).data;try{const a=await Mt(o,t,r,i);try{await ce.updateProductStateToSale(e,a.storefarmUrlId,a.storeProductRootId,a.storefarmProductId)}catch(n){console.error(n)}return a}catch(n){if(n instanceof G&&n.code===le.SMART_STORE_UPLOAD_ERROR){let a="[".concat(n.message,"] ");n.data&&Array.isArray(n.data)&&(a=a.concat(n.data.map((e=>"[".concat(e.message,"]"))).join(" ")));const s=(await ce.errorProduct(e,{errorMsg:a,additionalInfo:n.originalError})).data;if(s){const o=await Mt(s,t,r,i);try{await ce.updateProductStateToSale(e,o.storefarmUrlId,o.storeProductRootId,o.storefarmProductId)}catch(n){console.error(n)}return o}throw n}throw n}},editSmartStoreWithRetry:async function(e,t,r,i){const o=(await ce.fetchProductForSmartStore(e)).data;try{return await It(o,t,r,i)}catch(n){if(n instanceof G&&n.code===le.SMART_STORE_UPLOAD_ERROR){let a="[".concat(n.message,"] ");n.data&&Array.isArray(n.data)&&(a=a.concat(n.data.map((e=>"[".concat(e.message,"]"))).join(" ")));const s=(await ce.errorProduct(e,{errorMsg:a,additionalInfo:n.originalError})).data;if(s)return await It(s,t,r,i);throw n}throw n}},deleteSmartStore:async function(e){var t,r;let i;i=(await ce.fetchProductForSmartStore(e)).data;const o=null===(t=i.optionMap)||void 0===t||null===(r=t.ss)||void 0===r?void 0:r.storeId;if(!o)throw new G("\uc2a4\ub9c8\ud2b8\uc2a4\ud1a0\uc5b4\uc5d0 \ub4f1\ub85d\ub418\uc9c0 \uc54a\uc740 \uc0c1\ud488\uc785\ub2c8\ub2e4.",le.SMART_STORE_PRODUCT_NOT_EXIST);let a;try{var s,c;a=null===(s=await Nt(o))||void 0===s||null===(c=s.product)||void 0===c?void 0:c.id}catch(n){if(n instanceof G&&n.code===le.SMART_STORE_PRODUCT_NOT_EXIST){var u,f;const t=await Rt();if(null!==t&&void 0!==t&&t.url&&(null===(u=i.optionMap)||void 0===u||null===(f=u.ss)||void 0===f?void 0:f.storeName)===t.url)return await ce.updateProductState(e,St.DELETE),!0}throw n}const d=await fetch("https://sell.smartstore.naver.com/api/products/".concat(a),{method:"DELETE",credentials:"include",cache:"no-cache",referrer:"https://sell.smartstore.naver.com/",headers:{"x-current-state":"https://sell.smartstore.naver.com/#/products/edit/".concat(a),"x-current-statename":"main.product.edit","x-to-statename":"main.product.edit"},mode:"cors"}).then((e=>{if(e.ok)return!0;throw new G("\uc0c1\ud488 \uc0ad\uc81c \uc2e4\ud328",e.status.toString())}));try{await ce.updateProductState(e,St.DELETE)}catch(n){console.error(n)}return d},updateProductState:async function(e,t){var r,i;const o=null===(r=(await ce.fetchProductForSmartStore(e)).data.optionMap)||void 0===r||null===(i=r.ss)||void 0===i?void 0:i.storeId;if(!o)throw new G("\uc2a4\ub9c8\ud2b8\uc2a4\ud1a0\uc5b4\uc5d0 \ub4f1\ub85d\ub418\uc9c0 \uc54a\uc740 \uc0c1\ud488\uc785\ub2c8\ub2e4.",le.SMART_STORE_PRODUCT_NOT_EXIST);const a=parseInt(o),s=At.percentyStateToSmartStoreState(t);if(!s)throw new G("\ubcc0\uacbd\ud560 \uc218 \uc5c6\ub294 \uc0c1\ud0dc\uc785\ub2c8\ub2e4.",le.SMART_STORE_CANNOT_CHANGE_PRODUCT_STATE);const c={productBulkUpdateType:s,productStatusType:s,productNos:[a]};await fetch("https://sell.smartstore.naver.com/api/products/bulk-update?_action=updateProductStatusType",{method:"PATCH",credentials:"include",cache:"no-cache",referrer:"https://sell.smartstore.naver.com/",headers:{"x-current-state":"https://sell.smartstore.naver.com/#/products/origin-list","x-current-statename":"main.product.origin-list","x-to-statename":"main.product.origin-list"},mode:"cors",body:JSON.stringify(c)});for await(const h of[1,2,3,4,5]){var u,f,d,l;await y.delay(500);const r=await fetch("https://sell.smartstore.naver.com/api/products/bulk-update?_action=getBulkUpdateProgressResult",{method:"GET",credentials:"include",cache:"no-cache",referrer:"https://sell.smartstore.naver.com/",headers:{"x-current-state":"https://sell.smartstore.naver.com/#/products/origin-list","x-current-statename":"main.product.origin-list","x-to-statename":"main.product.origin-list"},mode:"cors"}).then((e=>{if(e.ok)return e.json();throw new G("\uc2a4\ub9c8\ud2b8\uc2a4\ud1a0\uc5b4 \uc0c1\ud0dc\ubcc0\uacbd \uc2e4\ud328",e.status.toString())}));if((null===r||void 0===r||null===(u=r.productBulkUpdateResultVO)||void 0===u?void 0:u.bulkUpdateType)===s&&null!==r&&void 0!==r&&null!==(f=r.productBulkUpdateResultVO)&&void 0!==f&&null!==(d=f.successIds)&&void 0!==d&&d.includes(a)){try{await ce.updateProductState(e,t)}catch(n){console.error(n)}return!0}if(null!==r&&void 0!==r&&null!==(l=r.productBulkUpdateResultVO)&&void 0!==l&&l.resultMessage){const e=Object.values(r.productBulkUpdateResultVO.resultMessage).filter((e=>!!e)).join(", ");if(e.includes("\uc0ad\uc81c\ub41c \uc0c1\ud488"))throw new G(e,le.SMART_STORE_PRODUCT_ALREADY_DELETED)}}return!1},fetchSmartStoreProduct:async function(e){var t,r;const n=null===(t=(await ce.fetchProductForSmartStore(e)).data.optionMap)||void 0===t||null===(r=t.ss)||void 0===r?void 0:r.storeId;if(!n)throw new G("\uc2a4\ub9c8\ud2b8\uc2a4\ud1a0\uc5b4\uc5d0 \ub4f1\ub85d\ub418\uc9c0 \uc54a\uc740 \uc0c1\ud488\uc785\ub2c8\ub2e4.",le.SMART_STORE_PRODUCT_NOT_EXIST);return await Nt(n)},getCurrentLoggedInChannel:Rt,fetchStoreCreateView:Ot,checkRestrictedTag:async function(e){return fetch("https://sell.smartstore.naver.com/api/product/shared/is-restrict-tag?_action=isRestrictTag&tag=".concat(e),{method:"GET",credentials:"include",cache:"no-cache",referrer:"https://sell.smartstore.naver.com/",headers:{"x-current-state":"https://sell.smartstore.naver.com/#/products/create","x-current-statename":"","x-to-statename":"main.product.create"},mode:"cors"}).then((e=>{if(e.ok)return e.json();throw new G("\uc2a4\ub9c8\ud2b8\uc2a4\ud1a0\uc5b4 TAG \uccb4\ud06c \uc2e4\ud328",e.status.toString())}))},checkNeoIdSession:kt,fetchCategories:async function(){const e=async e=>fetch("https://sell.smartstore.naver.com/api/category-search/".concat(e,"?_action=getChild&isValid=true"),{method:"GET",credentials:"include",cache:"no-cache",referrer:"https://sell.smartstore.naver.com/",headers:{"x-current-state":"https://sell.smartstore.naver.com/#/products/create","x-current-statename":"main.product.create","x-to-statename":"main.product.create"},mode:"cors"}).then((e=>e.text())).then((e=>e?JSON.parse(e):[])),t=await e("root");for await(const o of t){var r;o.children=null!==(r=await e(o.id))&&void 0!==r?r:[]}for await(const o of t.flatMap((e=>e.children))){var n;o&&(o.children=null!==(n=await e(o.id))&&void 0!==n?n:[])}for await(const o of t.flatMap((e=>e.children)).flatMap((e=>null===e||void 0===e?void 0:e.children))){var i;o&&(o.children=null!==(i=await e(o.id))&&void 0!==i?i:[])}return t},fetchNaverShoppingResultPage:async function(e){try{const r=await fetch((t=e,"".concat(t,"&").concat(ie.P_REMOVE_ORIGIN_NET_REQUEST_STRING)),{method:"GET",cache:"no-cache",credentials:"include",mode:"cors"});return await r.text()}catch(n){throw new G("\uc0c1\ud488 \uc815\ubcf4\ub97c \ubd88\ub7ec\uc62c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc7a0\uc2dc \ud6c4 \ub2e4\uc2dc \uc2dc\ub3c4\ud574\uc8fc\uc138\uc694",le.AI_SOURCING_NAVER_FETCH_ERROR,void 0,n)}var t},checkSearchableTags:async function(e){const t=e.map((e=>"tags=".concat(encodeURIComponent(e)))).join("&");return fetch("https://sell.smartstore.naver.com/api/product/shared/check-searchable-tags?_action=checkSearchableTags&".concat(t),{method:"GET",credentials:"include",cache:"no-cache",referrer:"https://sell.smartstore.naver.com/",headers:{"x-current-state":"https://sell.smartstore.naver.com/#/products/create","x-current-statename":"main.product.create","x-to-statename":"main.product.create"},mode:"cors"}).then((e=>{if(e.ok)return e.json();throw new G("\uc2a4\ub9c8\ud2b8\uc2a4\ud1a0\uc5b4 \uac80\uc0c9\uac00\ub2a5 TAG \uccb4\ud06c \uc2e4\ud328",e.status.toString())})).then((t=>e.map((e=>{const r=t.find((t=>t.tag===e));return{tag:e,count:null===r||void 0===r?void 0:r.count,id:null===r||void 0===r?void 0:r.id,searchable:!!r}}))))},fetchNaverShoppingPopularTermsByCategory:async function(e){try{const r=await fetch((t="https://datalab.naver.com/shoppingInsight/getCategoryKeywordRank.naver","".concat(t,"?").concat(ie.P_ADD_NAVER_SHOPPING_REFERER)),{method:"POST",cache:"no-cache",credentials:"omit",mode:"cors",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},body:new URLSearchParams(e)});return await r.json()}catch(n){throw new G("\uc778\uae30 \uac80\uc0c9\uc5b4 \uc815\ubcf4\ub97c \ubd88\ub7ec\uc62c \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc7a0\uc2dc \ud6c4 \ub2e4\uc2dc \uc2dc\ub3c4\ud574\uc8fc\uc138\uc694",le.AI_NAVER_SHOPPING_POPULAR_TERMS_ERROR,void 0,n)}var t}};class Dt{constructor(e,t){this.tabId=e,this.url=t}}class Lt{constructor(e){this.percentyToken=e}}class Ft{constructor(t,r,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.senderTabId=t,this.targetProductId=n,this.ignoreDuplicatedScrap=i,this.type=void 0,this.receiverName=void 0,this.expirationAt=void 0,this.type=e.SCRAP_AUTO,this.receiverName=String(r),this.expirationAt=Date.now()+1e4}}class jt{constructor(e,t){this.type=e,this.targetTabId=t}}class zt extends jt{constructor(t,r,n){super(e.SCRAP_AUTO_FINISH_TO_LIST_PAGE,t),this.targetTabId=t,this.targetProductId=r,this.scrapState=n}}class Ht extends jt{constructor(t,r,n){super(e.SCRAP_SUCCESS_TO_PERCENTY_WEB_TAB,t),this.tabUrl=r,this.percentyProductId=n}}class qt extends jt{constructor(t){super(e.EXTENSION_INSTALLED_TO_PERCENTY_WEB_TAB,t)}}const Gt={requestRaw:async function(e,t,r,n){if("FormData"===(null===r||void 0===r?void 0:r.type)&&r.formData){const e=new FormData;for await(const t of r.formData)if("File"===t.dataType){let r=await fetch(t.value),n=await r.blob();e.append(t.name,n,t.fileName)}else e.append(t.name,t.value,t.fileName);t&&(t.body=e)}else"Normal"===(null===r||void 0===r?void 0:r.type)&&r.normalData&&t&&(t.body=r.normalData);const i=await fetch(e,t);let o;if(i.ok)switch(n){case"json":default:o=await i.json();break;case"text":o=await i.text();break;case"blob":o=await i.blob();break;case"formdata":o=await i.formData();break;case"arraybuffer":o=await i.arrayBuffer()}else o=await i.json();return{success:i.ok,data:o}}};chrome.declarativeNetRequest.ResourceType;const Wt=Object.values(chrome.declarativeNetRequest.ResourceType),Yt=[{id:1,priority:1,action:{type:chrome.declarativeNetRequest.RuleActionType.MODIFY_HEADERS,requestHeaders:[{operation:chrome.declarativeNetRequest.HeaderOperation.SET,header:"origin",value:"https://sell.smartstore.naver.com"}]},condition:{urlFilter:"https://sell.smartstore.naver.com/api/*",resourceTypes:Wt}},{id:2,priority:1,action:{type:chrome.declarativeNetRequest.RuleActionType.MODIFY_HEADERS,responseHeaders:[{operation:chrome.declarativeNetRequest.HeaderOperation.SET,header:"Access-Control-Allow-Origin",value:"https://detail.tmall.com"}]},condition:{urlFilter:"*^pretu35njx5lwqx231mc8iwo5fl4dx3j2fg7qpxlfjd|",resourceTypes:Wt}},{id:3,priority:1,action:{type:chrome.declarativeNetRequest.RuleActionType.MODIFY_HEADERS,responseHeaders:[{operation:chrome.declarativeNetRequest.HeaderOperation.SET,header:"Access-Control-Allow-Origin",value:"https://chaoshi.detail.tmall.com"}]},condition:{urlFilter:"*^sdfw843eldfogor28rgjvxlow28403lfllsk21adds|",resourceTypes:Wt}},{id:4,priority:1,action:{type:chrome.declarativeNetRequest.RuleActionType.MODIFY_HEADERS,requestHeaders:[{operation:chrome.declarativeNetRequest.HeaderOperation.REMOVE,header:"origin"}]},condition:{urlFilter:"*^".concat(ie.P_REMOVE_ORIGIN_NET_REQUEST_STRING,"|"),resourceTypes:Wt}},{id:5,priority:1,action:{type:chrome.declarativeNetRequest.RuleActionType.MODIFY_HEADERS,requestHeaders:[{operation:chrome.declarativeNetRequest.HeaderOperation.SET,header:"Referer",value:"https://datalab.naver.com/shoppingInsight/sCategory.naver"},{operation:chrome.declarativeNetRequest.HeaderOperation.SET,header:"Origin",value:"https://datalab.naver.com"}]},condition:{urlFilter:"*^".concat(ie.P_ADD_NAVER_SHOPPING_REFERER,"|"),resourceTypes:Wt}}];class Vt extends jt{constructor(t,r,n){super(e.TO_CONTENT_SCRAP_AUTO_BY_URL,t),this.targetTabId=t,this.scrapTarget=r,this.allowDuplicateScrap=n,this.type=e.TO_CONTENT_SCRAP_AUTO_BY_URL}}class Xt{constructor(e,t,r,n){this.chromeExtensionVersion=e,this.success=t,this.data=r,this.error=n}}var Kt=r(2940);const Qt=async(e,t)=>{const r=()=>{const e="sb".concat((new Date).toUTCString(),"th"),t=(0,Kt.createCipheriv)("aes-256-cbc","12501986019234170293715203984170","6269036102394823"),r=Kt.Buffer.concat([Kt.Buffer.from(e),Kt.Buffer.from("utf8"),Kt.Buffer.from("hex")]),n=Kt.Buffer.concat([t.update(r),t.final()]);return Array.from(n).map((e=>e.toString(16).padStart(2,"0"))).join("")},n=7339288,i=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new Promise((r=>{chrome.cookies.getAll({domain:e,partitionKey:{topLevelSite:null}},(e=>{const n=e.reduce(((e,t)=>(e.set(t.name,t.value),e)),new Map);e.map((e=>{var r;(null==(r=e.partitionKey)?void 0:r.topLevelSite)===t&&n.set(e.name,e.value)}));const i=Array.from(n.entries()).reduce(((e,t)=>{let[r,n]=t;return e+"".concat(r,"=").concat(n,"; ")}),"");r(i)}))}))};try{const o=await(async()=>await new Promise((async(t,r)=>{try{let n="";if(n||(n=p(await l.isDebug())),"string"!==typeof e)return r("[UPLOAD FILE API FAIL] type is not string");const i=await fetch(e).then((e=>e.blob()));await H.getRandomFileName(i,"jpeg").then((async e=>{await se.uploadImageToPercentyWithoutToken(i,e).then((e=>{t(e)}))}))}catch(n){r(n)}finally{chrome.declarativeNetRequest.updateSessionRules({removeRuleIds:[2931199]})}})))(),a=await l.isDebug(),s=btoa("".concat(m(a),"/").concat(o)),c="https://msearch.shopping.naver.com/search/image?id=".concat(s),u="".concat("https://msearch.shopping.naver.com/api/search/image/crop","?").concat(new URLSearchParams({from:"shoppinglensid",height:String(600),id:s,width:String(600),x:String(0),y:String(0)}));await(async(e,t)=>{var r,o,a,s,c,u;const f=await i(".naver.com"),d=await i(".shopping.naver.com");await chrome.declarativeNetRequest.updateSessionRules({removeRuleIds:[n],addRules:[{id:n,priority:1,action:{type:chrome.declarativeNetRequest.RuleActionType.MODIFY_HEADERS,requestHeaders:[{header:"cookie",operation:chrome.declarativeNetRequest.HeaderOperation.SET,value:"string"!==typeof f||"string"!==typeof d?"NNB=RB3JOK3TS75GK; SHP_BUCKET_ID=8; spage_uid=":f+d},{header:"origin",operation:chrome.declarativeNetRequest.HeaderOperation.SET,value:"https://msearch.shopping.naver.com"},{header:"referer",operation:chrome.declarativeNetRequest.HeaderOperation.SET,value:e},{header:"sec-ch-ua",operation:chrome.declarativeNetRequest.HeaderOperation.SET,value:t?null===(r=t.userAgentData)||void 0===r||null===(o=r.brands)||void 0===o?void 0:o.map((e=>'"'.concat(e.brand,'";v="').concat(e.version,'"'))).join(","):'"Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"'},{header:"sec-ch-ua-arch",operation:chrome.declarativeNetRequest.HeaderOperation.SET,value:'""'},{header:"sec-ch-ua-bitness",operation:chrome.declarativeNetRequest.HeaderOperation.SET,value:'"64"'},{header:"sec-ch-ua-full-version-list",operation:chrome.declarativeNetRequest.HeaderOperation.SET,value:t?null===(a=t.userAgentData)||void 0===a||null===(s=a.brands)||void 0===s?void 0:s.map((e=>'"'.concat(e.brand,'";v="').concat(e.version,'"'))).join(","):'"Google Chrome";v="123.0.6312.87", "Not:A-Brand";v="8.0.0.0", "Chromium";v="123.0.6312.87"'},{header:"sec-ch-ua-mobile",operation:chrome.declarativeNetRequest.HeaderOperation.SET,value:t?null!==t&&void 0!==t&&null!==(c=t.userAgentData)&&void 0!==c&&c.mobile?"?1":"?0":"?1"},{header:"sec-ch-ua-model",operation:chrome.declarativeNetRequest.HeaderOperation.SET,value:'"Nexus 5"'},{header:"sec-ch-ua-platform",operation:chrome.declarativeNetRequest.HeaderOperation.SET,value:t?null===t||void 0===t||null===(u=t.userAgentData)||void 0===u?void 0:u.platform:'"Android"'},{header:"sec-ch-ua-platform-version",operation:chrome.declarativeNetRequest.HeaderOperation.SET,value:'"6.0"'},{header:"sec-ch-ua-wow64",operation:chrome.declarativeNetRequest.HeaderOperation.SET,value:'"?0"'}]},condition:{regexFilter:"^https://msearch.shopping.naver.com/*",resourceTypes:[chrome.declarativeNetRequest.ResourceType.XMLHTTPREQUEST]}}]})})(c,t);const f=await fetch(u,{headers:{accept:"application/json, text/plain, */*","accept-language":"ko-KR,ko;q=0.9,en-US;q=0.8,en;q=0.7",sbth:r(),"sec-fetch-dest":"empty","sec-fetch-mode":"cors","sec-fetch-site":"same-origin","Referrer-Policy":"unsafe-url"}});return(e=>{var t,r;return(null!=(r=null==(t=null==e?void 0:e.searchResponse)?void 0:t.similarImages)?r:[]).map((e=>{const{productTitle:t,imageUrl:r,price:n,purchaseCnt:i=0,reviewCount:o=0,score:a=0,openDate:s,rank:c,link:u,mallProductUrl:f,category1Name:d,category2Name:l,category3Name:h,category4Name:p,category1Id:m,category2Id:v,category3Id:b,category4Id:g,relevance:y=0}=e;return{productTitle:t,imageUrl:r,price:Number(n),purchaseCnt:Number(i),reviewCount:Number(o),score:Number(a),openDate:s,link:u,mallProductUrl:f,rank:Number(c),category1Name:d,category2Name:l,category3Name:h,category4Name:p,category1Id:m,category2Id:v,category3Id:b,category4Id:g,relevance:Number(y)}}))})(await f.json())}catch(o){throw new Error("handleNaverImageSearch : ".concat(o))}finally{chrome.declarativeNetRequest.updateSessionRules({removeRuleIds:[n]})}},Jt="SMART_STORE_SEMAPHORE_KEY";const Zt={canUploadSmartStore:async function(e){try{var r;const n=null!==(r=await t.getLocalStorage(Jt))&&void 0!==r?r:[],i=Date.now();return!n.filter((e=>e.expireAt>i)).find((t=>t.percentyProductId===e))}catch(n){return console.error(n),!0}},setSmartStoreUploading:async function(e){try{var r;const n=null!==(r=await t.getLocalStorage(Jt))&&void 0!==r?r:[],i=Date.now(),o=n.filter((t=>t.expireAt>i&&t.percentyProductId!==e));o.push({percentyProductId:e,expireAt:i+10*ie.MINUTE}),await t.setLocalStorage(Jt,o)}catch(n){console.error(n)}},setSmartStoreUploadFinish:async function(e){try{var r;const n=null!==(r=await t.getLocalStorage(Jt))&&void 0!==r?r:[],i=Date.now(),o=n.filter((e=>e.expireAt>i)),a=o.find((t=>t.percentyProductId===e));a&&(a.expireAt=i+10*ie.SECOND),await t.setLocalStorage(Jt,o)}catch(n){console.error(n)}}},$t=331128332;let er=5;const tr=async(e,t,r)=>{e.map((e=>{chrome.cookies.getAll({domain:e,name:t},(t=>{if(t.length>0){const r=new Date;r.setTime(r.getTime()+6048e5),t.forEach((t=>{chrome.cookies.set({url:e,name:t.name,value:t.value,domain:e,path:t.path,secure:t.secure,httpOnly:t.httpOnly,expirationDate:Math.floor(r.getTime()/1e3)})}))}}))}));const n=e.map((e=>new Promise(((r,n)=>{chrome.cookies.getAll({domain:e,name:t},(e=>{if(0===e.length)return void n(new G("[ERROR] Cookies not found",le.TAOBAO_COOKIE_NONE));const t=e.filter((e=>e.value)).map((e=>e.value));t.length>0?r(t):n(new G("[ERROR] Cookies not found",le.TAOBAO_COOKIE_NONE))}))})))),i=(await Promise.allSettled(n)).filter((e=>"fulfilled"===e.status)).map((e=>e.value));if(0===i.length)throw new G("[ERROR] Cookies not found",le.TAOBAO_COOKIE_NONE);return i.flat()[0]},rr=async()=>{const e=[".taobao.com",".tmall.com"];return{mh5tkCookie:await tr(e,"_m_h5_tk").catch((e=>{})),mh5tkencCookie:await tr(e,"_m_h5_tk_enc").catch((e=>{}))}};async function nr(e){try{var t,r;const n="12574478",i=(new Date).getTime(),o=await async function(e){return{appId:"34850",params:JSON.stringify({pcGraphSearch:!0,region:"",strimg:e.replace(/^data:image\/[a-z]+;base64,/,""),sortOrder:"0",ttid:"600000@taobao_android_10.16.10",tab:"all",sversion:15.8,vm:"nw"})}}(e),a=function(e){const t=JSON.stringify(e);return"data=".concat(encodeURIComponent(t))}(o),s=await rr();!s||s.mh5tkCookie&&s.mh5tkencCookie||(er<=0?er=5:er--),0===er&&(er=5),await async function(e){try{const t=await function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return new Promise((r=>{chrome.cookies.getAll({domain:e,partitionKey:{topLevelSite:null}},(e=>{const n=e.reduce(((e,t)=>(e.set(t.name,t.value),e)),new Map);e.map((e=>{let r;(null==(r=e.partitionKey)?void 0:r.topLevelSite)===t&&n.set(e.name,e.value)}));const i=Array.from(n.entries()).reduce(((e,t)=>{let[r,n]=t;return e+"".concat(r,"=").concat(n,"; ")}),"");r(i)}))}))}(".taobao.com","https://taobao.com");let r=t.replace(/_m_h5_tk=[^;]+/,"_m_h5_tk=".concat(e.mh5tkCookie));r=t.replace(/_m_h5_tk_enc=[^;]+/,"_m_h5_tk_enc=".concat(e.mh5tkencCookie)),chrome.declarativeNetRequest.updateSessionRules({removeRuleIds:[$t],addRules:[{id:$t,priority:1,action:{type:chrome.declarativeNetRequest.RuleActionType.MODIFY_HEADERS,requestHeaders:[{header:"cookie",operation:chrome.declarativeNetRequest.HeaderOperation.SET,value:r},{header:"origin",operation:chrome.declarativeNetRequest.HeaderOperation.SET,value:"https://world.taobao.com"},{header:"referer",operation:chrome.declarativeNetRequest.HeaderOperation.SET,value:"https://world.taobao.com"}]},condition:{regexFilter:"^https://h5api.m.taobao.com/h5/mtop.relationrecommend.wirelessrecommend.recommend/2.0/*",resourceTypes:[chrome.declarativeNetRequest.ResourceType.XMLHTTPREQUEST]}}]})}catch(t){console.error("[MODIFY TAOBAO COOKIE ERROR]",t)}}(s);const c=await async function(e){const{bodyData:t,appKey:r,mh5tkCookie:n,nowTime:i}=e,o=n.split("_").concat([""])[0].trim();return await async function(e){function t(e,t){return e<<t|e>>>32-t}function r(e,t){let r,n,i,o,a;return i=2147483648&e,o=2147483648&t,a=(1073741823&e)+(1073741823&t),(r=1073741824&e)&(n=1073741824&t)?2147483648^a^i^o:r|n?1073741824&a?3221225472^a^i^o:1073741824^a^i^o:a^i^o}function n(e,n,i,o,a,s,c){return e=r(e,r(r((u=n)&i|~u&o,a),c)),r(t(e,s),n);var u}function i(e,n,i,o,a,s,c){return e=r(e,r(r(n&(u=o)|i&~u,a),c)),r(t(e,s),n);var u}function o(e,n,i,o,a,s,c){return e=r(e,r(r(n^i^o,a),c)),r(t(e,s),n)}function a(e,n,i,o,a,s,c){return e=r(e,r(r(i^(n|~o),a),c)),r(t(e,s),n)}function s(e){let t,r="",n="";for(t=0;3>=t;t++)r+=(n="0"+(e>>>8*t&255).toString(16)).substr(n.length-2,2);return r}let c,u,f,d,l,h,p,m,v,b;for(b=function(e){for(var t,r=e.length,n=r+8,i=16*((n-n%64)/64+1),o=new Array(i-1),a=0,s=0;r>s;)a=s%4*8,o[t=(s-s%4)/4]=o[t]|e.charCodeAt(s)<<a,s++;return a=s%4*8,o[t=(s-s%4)/4]=o[t]|128<<a,o[i-2]=r<<3,o[i-1]=r>>>29,o}(e=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",r=0;r<e.length;r++){const n=e.charCodeAt(r);128>n?t+=String.fromCharCode(n):n>127&&2048>n?(t+=String.fromCharCode(n>>6|192),t+=String.fromCharCode(63&n|128)):(t+=String.fromCharCode(n>>12|224),t+=String.fromCharCode(n>>6&63|128),t+=String.fromCharCode(63&n|128))}return t}(e)),h=1732584193,p=4023233417,m=2562383102,v=271733878,c=0;c<b.length;c+=16)u=h,f=p,d=m,l=v,h=n(h,p,m,v,b[c+0],7,3614090360),v=n(v,h,p,m,b[c+1],12,3905402710),m=n(m,v,h,p,b[c+2],17,606105819),p=n(p,m,v,h,b[c+3],22,3250441966),h=n(h,p,m,v,b[c+4],7,4118548399),v=n(v,h,p,m,b[c+5],12,1200080426),m=n(m,v,h,p,b[c+6],17,2821735955),p=n(p,m,v,h,b[c+7],22,4249261313),h=n(h,p,m,v,b[c+8],7,1770035416),v=n(v,h,p,m,b[c+9],12,2336552879),m=n(m,v,h,p,b[c+10],17,4294925233),p=n(p,m,v,h,b[c+11],22,2304563134),h=n(h,p,m,v,b[c+12],7,1804603682),v=n(v,h,p,m,b[c+13],12,4254626195),m=n(m,v,h,p,b[c+14],17,2792965006),h=i(h,p=n(p,m,v,h,b[c+15],22,1236535329),m,v,b[c+1],5,4129170786),v=i(v,h,p,m,b[c+6],9,3225465664),m=i(m,v,h,p,b[c+11],14,643717713),p=i(p,m,v,h,b[c+0],20,3921069994),h=i(h,p,m,v,b[c+5],5,3593408605),v=i(v,h,p,m,b[c+10],9,38016083),m=i(m,v,h,p,b[c+15],14,3634488961),p=i(p,m,v,h,b[c+4],20,3889429448),h=i(h,p,m,v,b[c+9],5,568446438),v=i(v,h,p,m,b[c+14],9,3275163606),m=i(m,v,h,p,b[c+3],14,4107603335),p=i(p,m,v,h,b[c+8],20,1163531501),h=i(h,p,m,v,b[c+13],5,2850285829),v=i(v,h,p,m,b[c+2],9,4243563512),m=i(m,v,h,p,b[c+7],14,1735328473),h=o(h,p=i(p,m,v,h,b[c+12],20,2368359562),m,v,b[c+5],4,4294588738),v=o(v,h,p,m,b[c+8],11,2272392833),m=o(m,v,h,p,b[c+11],16,1839030562),p=o(p,m,v,h,b[c+14],23,4259657740),h=o(h,p,m,v,b[c+1],4,2763975236),v=o(v,h,p,m,b[c+4],11,1272893353),m=o(m,v,h,p,b[c+7],16,4139469664),p=o(p,m,v,h,b[c+10],23,3200236656),h=o(h,p,m,v,b[c+13],4,681279174),v=o(v,h,p,m,b[c+0],11,3936430074),m=o(m,v,h,p,b[c+3],16,3572445317),p=o(p,m,v,h,b[c+6],23,76029189),h=o(h,p,m,v,b[c+9],4,3654602809),v=o(v,h,p,m,b[c+12],11,3873151461),m=o(m,v,h,p,b[c+15],16,530742520),h=a(h,p=o(p,m,v,h,b[c+2],23,3299628645),m,v,b[c+0],6,4096336452),v=a(v,h,p,m,b[c+7],10,1126891415),m=a(m,v,h,p,b[c+14],15,2878612391),p=a(p,m,v,h,b[c+5],21,4237533241),h=a(h,p,m,v,b[c+12],6,1700485571),v=a(v,h,p,m,b[c+3],10,2399980690),m=a(m,v,h,p,b[c+10],15,4293915773),p=a(p,m,v,h,b[c+1],21,2240044497),h=a(h,p,m,v,b[c+8],6,1873313359),v=a(v,h,p,m,b[c+15],10,4264355552),m=a(m,v,h,p,b[c+6],15,2734768916),p=a(p,m,v,h,b[c+13],21,1309151649),h=a(h,p,m,v,b[c+4],6,4149444226),v=a(v,h,p,m,b[c+11],10,3174756917),m=a(m,v,h,p,b[c+2],15,718787259),p=a(p,m,v,h,b[c+9],21,3951481745),h=r(h,u),p=r(p,f),m=r(m,d),v=r(v,l);return(s(h)+s(p)+s(m)+s(v)).toLowerCase()}("".concat(o,"&").concat(i,"&").concat(r,"&").concat(JSON.stringify(t)))}({bodyData:o,mh5tkCookie:null!==(t=null===s||void 0===s?void 0:s.mh5tkCookie)&&void 0!==t?t:"",appKey:n,nowTime:i}),u=await fetch(function(e,t,r){return function(e,t){const r=new URL("https://h5api.m.taobao.com/h5/mtop.relationrecommend.wirelessrecommend.recommend/2.0/");for(const[n,i]of Object.entries(t))r.searchParams.set(n,String(i));return r.toString()}(0,{jsv:"2.7.2",appKey:t,t:String(r),sign:e,api:"mtop.relationrecommend.WirelessRecommend.recommend",v:"2.0",type:"originaljson",isSec:"1",dataType:"jsonp"})}(c,n,i),{method:"POST",headers:{accept:"application/json","content-type":"application/x-www-form-urlencoded"},body:a}).then((e=>e.json())),f=null===(r=u.ret)||void 0===r?void 0:r[0];if(0===er)er=5;else{if(f.includes("FAIL_SYS_ILLEGAL_ACCESS")||f.includes("FAIL_SYS_TOKEN_ILLEGAL::\u975e\u6cd5\u4ee4\u724c")||f.includes("FAILSYS::trace")||f.includes("FAIL_SYS_USER_VALIDATE")||f.includes("RGV587_ERROR::SM::\u54ce\u54df\u5582,\u88ab\u6324\u7206\u5566,\u8bf7\u7a0d\u540e\u91cd\u8bd5!"))throw er<=0?er=5:er--,new G(f,le.TAOBAO_COOKIE_NONE,u.data.url);er=5}const d=u.data.itemsArray?u.data.itemsArray.map((async e=>{const t=e.pics.mainPic;return{...e,pics:{...e.pics,mainPic:t.replace(/(http:\/\/).*(\.alicdn)/,"$1img$2")}}})):[];return await Promise.all(d).then((e=>e))}finally{chrome.declarativeNetRequest.updateSessionRules({removeRuleIds:[$t]})}}const ir=async function(e){const t=await async function(e){const t=await fetch(e,{mode:"no-cors"}),r=await t.blob();return new File([r],e,{type:r.type})}(e),r=await H.encodeFileToBase64(t);return await nr(r)};class or extends jt{constructor(t,r,n,i){super(e.IMAGE_SEARCH_BTN_POSITION,t),this.targetTabId=t,this.imgUrl=r,this.left=n,this.top=i}}class ar extends jt{constructor(t,r,n){super(e.IMAGE_SEARCH_MODAL_OPEN,t),this.targetTabId=t,this.isOpen=r,this.imgUrl=n}}const sr=async e=>{const t=await l.isDebug(),r=t?"":"".concat(h.gaEndPoint,"?measurement_id=").concat(h.gaMeasurementId,"&api_secret=").concat(h.gaApiSecret,"&endpoint_secret");if(""!==r){var n;const t=null!==(n=await f.getUserId())&&void 0!==n?n:"None User",i=async()=>{let e=(await chrome.storage.local.get("clientId")).clientId;return e||(e=P.getRandomUUID(),await chrome.storage.local.set({clientId:e})),e};await fetch(r,{method:"POST",body:JSON.stringify({client_id:await i(),events:e.map((e=>({...e,name:e.name,params:{...e.params,percenty_id:t}})))})})}};let cr=function(e){return e.EXT_IMGSEARCH_TAOBAO_BTN_CLICK="ext_imgsearch_taobao_btn_click",e.EXT_IMGSEARCH_TAOBAO_OVERSEAS_BTN_CLICK="ext_imgsearch_taobao_overseas_btn_click",e.EXT_IMGSEARCH_1688_BTN_CLICK="ext_imgsearch_1688_btn_click",e.EXT_IMGSEARCH_TAOBAODETAIL_CLICK="ext_imgsearch_taobaodetail_click",e.EXT_IMGSEARCH_TAOBAO_OVERSEASDETAIL_CLICK="ext_imgsearch_taobao_overseasdetail_click",e.EXT_IMGSEARCH_1688DETAIL_CLICK="ext_imgsearch_1688detail_click",e.EXT_IMGSEARCH_NAVERDETAIL_CLICK="ext_imgsearch_naverdetail_click",e.EXT_IMGSEARCH_NAVERDETAILITEM_CLICK="ext_imgsearch_naverdetailitem_click",e.EXT_IMGSEARCH_CONTEXT_MENU_TAOBAO_BTN_CLICK="ext_imgsearch_context_menu_taobao_btn_click",e.EXT_IMGSEARCH_CONTEXT_MENU_TAOBAO_OVERSEAS_BTN_CLICK="ext_imgsearch_context_menu_taobao_overseas_btn_click",e.EXT_IMGSEARCH_CONTEXT_MENU_1688_BTN_CLICK="ext_imgsearch_context_menu_1688_btn_click",e.EXT_IMGSEARCH_TAOBAO_REFRESH_CLICK="ext_imgsearch_taobao_refresh_click",e.EXT_IMGSEARCH_TAOBAO_OVERSEAS_REFRESH_CLICK="ext_imgsearch_taobao_overseas_refresh_click",e.EXT_IMGSEARCH_REFRESH_1688_CLICK="ext_imgsearch_refresh_1688_click",e.EXT_IMGSEARCH_NAVERDETAIL_REFRESH_CLICK="ext_imgsearch_naverdetailitem_refresh_click",e.EXT_IMGSEARCH_REDRIECT_PERCENTY_SITE="ext_imgsearch_redriect_percenty_site",e.EXT_IMGSEARCH_TAOBAO_TAB_BTN_CLICK="ext_imgsearch_taobao_tab_btn_click",e.EXT_IMGSEARCH_TAOBAO_OVERSEAS_TAB_BTN_CLICK="ext_imgsearch_taobao_overseas_tab_btn_click",e.EXT_IMGSEARCH_1688_TAB_BTN_CLICK="ext_imgsearch_1688_tab_btn_click",e}({});const ur="REMOTE_CONFIG_KEY";const fr={getRemoteConfig:async function(){const e=await t.getLocalStorage(ur).catch((e=>{}));if(e&&e.expireAt&&e.config&&e.expireAt>ht.now())return e.config;const r=await l.isDebug()?h.remoteConfigTest:h.remoteConfigProd;return await fetch(r,{method:"GET"}).then((e=>e.json())).then((e=>(t.setLocalStorage(ur,{expireAt:ht.now()+10*ht.MINUTE,config:e}),e)))}};class dr{constructor(e){this.type=e}}class lr extends dr{constructor(t,r,n,i){super(e.IMG_SEARCH),this.imgUrl=t,this.targetTabId=r,this.imgDataUrl=n,this.market=i}}class hr extends jt{constructor(t,r,n,i,o,a){super(e.IMAGE_SEARCH_RESULT,t),this.targetTabId=t,this.imgUrl=r,this.imgErr=n,this.imgData=i,this.cny=o,this.marketType=a}}const pr=async(e,t)=>{const r={from:t,imgUrls:[e]},n=await l.isDebug();return await fetch("".concat(p(n),"/sourcing/products"),{method:"POST",headers:{"Content-Type":"application/json","X-AUTH-TOKEN":await f.getToken()},body:JSON.stringify(r)})};let mr=function(e){return e.KO="ko",e.CN="cn",e.EN="en",e.GB="gb",e.DE="de",e.FR="fr",e.JA="ja",e.IT="it",e.ES="es",e.IN="in",e.USD="USD",e.CAD="CAD",e.EUR="EUR",e.JPY="JPY",e.INR="INR",e.MXN="MXN",e.GBP="GBP",e.CNY="CNY",e.KRW="KRW",e}({});Object.values(mr).reduce(((e,t)=>(e[t]=void 0,e)),{});const vr=async e=>await fetch("https://api.coinbase.com/v2/exchange-rates?currency=".concat(e),{method:"GET"}).then((e=>e.json())).then((e=>e.data.rates.KRW)),br=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"tb";return t.setLocalStorage("searchImgMarketName",e)},gr=async function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;switch(e.market){case"osee":await pr(e.imgUrl,e.market).then((e=>vr(mr.CNY).then((t=>({err:null,data:e.json(),cny:t}))))).then((r=>{let{data:n,cny:i}=r;n.then((r=>{const n=r.data.list.map((e=>{var t,r;return{imgSrc:null!==(t=null===e||void 0===e?void 0:e.imgUrl)&&void 0!==t?t:"",auctionUrl:e.id?"https://detail.1688.com/offer/".concat(e.id,".html"):"",price:null!==(r=e.price)&&void 0!==r?r:0,monetaryUnit:"\xa5",sale:"0",review:0}}));x.sendTabsMessage(new hr(t,e.imgUrl,null,n,String(i),"osee"))}))})).catch((r=>{x.sendTabsMessage(new hr(t,e.imgUrl,r,void 0))}));break;case"tb_overseas":await pr(e.imgUrl,"tb").then((e=>vr(mr.CNY).then((t=>({err:null,data:e.json(),cny:t}))))).then((r=>{let{data:n,cny:i}=r;n.then((r=>{const n=r.data.list.map((e=>{var t,r;return{imgSrc:null!==(t=null===e||void 0===e?void 0:e.imgUrl)&&void 0!==t?t:"",auctionUrl:null!==e&&void 0!==e&&e.id?"https://detail.tmall.com/item.htm?id=".concat(e.id):"",price:null!==(r=e.price)&&void 0!==r?r:0,monetaryUnit:"\xa5",sale:"0",review:0}}));x.sendTabsMessage(new hr(t,e.imgUrl,null,n,String(i),"tb_overseas"))}))})).catch((r=>{x.sendTabsMessage(new hr(t,e.imgUrl,r,void 0))}));break;default:await ir(e.imgUrl).then((e=>vr(mr.CNY).then((t=>({err:null,data:e,cny:t}))))).then((n=>{const i=n.data.map((e=>{var t,r,n,i,o,a,s,c,u,f,d;return{imgSrc:null!==(t=null===e||void 0===e||null===(r=e.pics)||void 0===r?void 0:r.mainPic)&&void 0!==t?t:"",auctionUrl:null!==(n=e.auctionUrl)&&void 0!==n?n:"",price:null!==(i=null===e||void 0===e||null===(o=e.priceInfo)||void 0===o?void 0:o.pcFinalPrice)&&void 0!==i?i:0,monetaryUnit:null!==(a=null===e||void 0===e||null===(s=e.priceInfo)||void 0===s?void 0:s.monetaryUnit)&&void 0!==a?a:"\xa5",sale:null!==(c=null===e||void 0===e||null===(u=e.salesInfo)||void 0===u?void 0:u.totalSale)&&void 0!==c?c:"",review:null!==(f=null===e||void 0===e||null===(d=e.comments)||void 0===d?void 0:d.nums)&&void 0!==f?f:0}}));i.length<=0?(console.count("[RESTART GET TAOBAO IMG SEARCH API]: ".concat(r)),r--,gr(e,t,r)):(x.sendTabsMessage(new hr(t,e.imgUrl,n.err,i,String(n.cny),"tb")),r=5)})).catch((n=>{r>0?(console.count("[RESTART GET TAOBAO IMG SEARCH API]: ".concat(r)),r--,gr(e,t,r)):(x.sendTabsMessage(new hr(t,e.imgUrl,n,void 0)),r=5)}))}},yr={tabItemName:e=>"osee"===e?"1688.com":"\ud0c0\uc624\ubc14\uc624",getCurrentMarketTabId:()=>t.getLocalStorage("searchImgMarketName").catch((()=>"tb")),setCurrentMarketTabId:br,getImgSearch:async function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];switch(e){case"osee":const i=r?n?cr.EXT_IMGSEARCH_1688_TAB_BTN_CLICK:cr.EXT_IMGSEARCH_REFRESH_1688_CLICK:cr.EXT_IMGSEARCH_1688_BTN_CLICK;sr([{name:i,params:{site_url:window.location.host}}]).catch((e=>console.error("[GA 1688 BTN CLICK ERROR]",e))),x.sendRuntimeMessage(new lr(t,void 0,void 0,"osee")),br("osee");break;case"tb_overseas":const o=r?n?cr.EXT_IMGSEARCH_TAOBAO_OVERSEAS_TAB_BTN_CLICK:cr.EXT_IMGSEARCH_TAOBAO_OVERSEAS_REFRESH_CLICK:cr.EXT_IMGSEARCH_TAOBAO_OVERSEAS_BTN_CLICK;sr([{name:o,params:{site_url:window.location.host}}]).catch((e=>console.error("[GA 1688 BTN CLICK ERROR]",e))),x.sendRuntimeMessage(new lr(t,void 0,void 0,e)),br(e);break;default:const a=r?n?cr.EXT_IMGSEARCH_TAOBAO_TAB_BTN_CLICK:cr.EXT_IMGSEARCH_TAOBAO_REFRESH_CLICK:cr.EXT_IMGSEARCH_TAOBAO_BTN_CLICK;sr([{name:a,params:{site_url:window.location.host}}]).catch((e=>console.error("[GA TAOBAO BTN CLICK ERROR]",e))),x.sendRuntimeMessage(new lr(t,void 0,void 0,"tb")),br("tb")}},getImgSearchApi:gr},_r="background:";async function wr(){if(await l.isDebug()){const e=(await chrome.tabs.query({url:"http://localhost/"})).filter((e=>!!e.id&&!!e.url)),t=(await chrome.tabs.query({url:b.percentyWebTest+"/"})).filter((e=>!!e.id&&!!e.url)),r=[];return e&&r.push(...e),t&&r.push(...t),r}return(await chrome.tabs.query({url:b.percentyWebProd+"/"})).filter((e=>!!e.id&&!!e.url))}function xr(){return chrome.runtime.getManifest().version}async function Er(e,t){return await chrome.declarativeNetRequest.updateDynamicRules({removeRuleIds:e,addRules:t})}l.initDebugMode(),chrome.action.onClicked.addListener((e=>{l.isDebug().then((e=>{}))})),chrome.runtime.onMessage.addListener((function(r,n,i){var o,a,s,c,u,d,h,p,m,v,g;switch(console.log("".concat(_r," onMessage ").concat(null===r||void 0===r?void 0:r.type)),r.type){case e.GET_PERCENTY_TOKEN:const w=r;return async function(e,r,n){if(!e||!r)return;const i=await t.getCookie(e,r);if(!i)return;await f.getToken()!==i&&(await f.setToken(i),n(new Lt(i)))}(null!==(o=w.percentyUrl)&&void 0!==o?o:"",null!==(a=w.tokenKey)&&void 0!==a?a:"",i),!0;case e.OPEN_TAB_AND_SCRAP:const E=r;chrome.tabs.create({url:r.url,active:!1},(e=>{var t;x.addPendingMessage(new Ft(E.callerTabId,null!==(t=e.id)&&void 0!==t?t:-1,E.targetProductId,E.ignoreDuplicatedScrap))}));break;case e.OPEN_PERCENTY_TAB:l.isDebug().then((e=>{let t;t=e?b.percentyWebTest:b.percentyWebProd,chrome.tabs.create({url:t,active:!0},(e=>{}))}));break;case e.GET_CURRENT_TAB_ID_FROM_CONTENTS_SCRIPT:i(new Dt(null!==(s=null===(c=n.tab)||void 0===c?void 0:c.id)&&void 0!==s?s:-1,null!==(u=null===(d=n.tab)||void 0===d?void 0:d.url)&&void 0!==u?u:""));break;case e.CLOSE_TAB:const S=r;S.tabId&&S.tabId>=0&&chrome.tabs.remove(S.tabId);break;case e.SCRAP_AUTO_FINISH:const T=r;chrome.tabs.get(T.targetTabId).then((e=>{x.sendTabsMessage(new zt(T.targetTabId,T.targetProductId,T.scrapState))}));break;case e.SCRAP_SUCCESS_TO_PERCENTY_WEB:const A=r;wr().then((e=>{for(const t of e)x.sendTabsMessage(new Ht(t.id,t.url,A.percentyProductId))}));break;case e.FETCH_RAW:const R=r;return Gt.requestRaw(R.url,R.requestInit,R.bodyData,R.responseType).then((e=>{i({success:e.success,data:e.data})})).catch((e=>i({success:!1,error:e}))),!0;case e.GET_NAVER_SHOPPING_LENS:const M=r;return Qt(M.imgUrl,M.navigator).then((e=>i(e))),!0;case e.IMG_SEARCH:const I=r,O=null!==(h=null===(p=n.tab)||void 0===p?void 0:p.id)&&void 0!==h?h:0;return x.sendTabsMessage(new ar(O,!0,I.imgUrl),(async()=>await yr.getImgSearchApi(I,O))),!0;case e.IMAGE_SEARCH_POSITION:const C=r,P=null!==(m=null===(v=n.tab)||void 0===v?void 0:v.id)&&void 0!==m?m:0;return x.sendTabsMessage(new or(P,null!==(g=C.imgUrl)&&void 0!==g?g:"",C.left,C.top)),!1;case e.GET_IMG_BLOB_URL:const N=r;return(async()=>{try{const e=await fetch(N.imgUrl,{mode:"no-cors"}),t=await e.blob(),r=new FileReader;r.onloadend=()=>i(r.result),r.onerror=e=>i(void 0),r.readAsDataURL(t)}catch(e){i(void 0)}})(),!0;case e.UPDATE_DECLARATIVE_NET_REQUEST_RULES:{var y,_;const e=r;return Er(null!==(y=e.removeRuleIds)&&void 0!==y?y:[],null!==(_=e.addRules)&&void 0!==_?_:[]).then((e=>{i({success:!0})})).catch((e=>i({success:!1,error:e}))),!0}case e.TO_BACKGROUND_SET_1688_QUERY:{const e=r;if(!e.tabId||!e.url)return;const t=e.addQuery;let n=e.url;return t.forEach((e=>{n=ne.appendQueryParam(n,e.key,e.value)})),chrome.tabs.update(e.tabId,{url:n}).catch((e=>console.error(e))),!1}case e.TO_DELETE_COOKIES:{const e=r;if(!e.url||!e.domainList)return;return chrome.tabs.create({url:e.url},(()=>{e.domainList.forEach((e=>{chrome.cookies.getAll({domain:e},(e=>{for(var t=0;t<e.length;t++)chrome.cookies.remove({url:"https://"+e[t].domain+e[t].path,name:e[t].name})}))}))})),!0}}})),chrome.runtime.onMessageExternal.addListener(((t,r,n)=>{var i,o,a;switch(console.error("".concat(_r," onMessageExternal ").concat(t.type)),t.type){case e.OPEN_SMART_STORE_LOGIN_EXTERNAL:return function(e,t,r){chrome.windows.create({url:"https://sell.smartstore.naver.com/#/login",type:"popup",width:970,height:700}).then((e=>Et.listenSmartStoreLoginSuccess(e).then((t=>({win:e,account:t}))))).then((e=>e.win.id&&e.account?chrome.windows.remove(e.win.id).then((t=>e)).catch((t=>e)):e)).then((e=>{null===r||void 0===r||r({chromeExtensionVersion:xr(),success:!!e.account,...e.account})})).catch((e=>{null===r||void 0===r||r({chromeExtensionVersion:xr(),success:!1}),console.error(e)}))}(0,0,n),!0;case e.UPLOAD_SMART_STORE_EXTERNAL:if(!t.productId)return;return Zt.canUploadSmartStore(t.productId).then((e=>{if(e)return Zt.setSmartStoreUploading(t.productId),Bt.uploadSmartStoreWithRetry(t.productId,t.mainImageUrl,t.additionalProductData,t.additionalProductDataAction);throw new G("\uc774\ubbf8 \uc5c5\ub85c\ub4dc \uc911\uc785\ub2c8\ub2e4.",le.SMART_STORE_ALREADY_UPLOADING)})).then((e=>{Zt.setSmartStoreUploadFinish(t.productId),n({chromeExtensionVersion:xr(),success:!0,storeProductId:e.storeProductRootId,storefarmProductId:e.storefarmProductId,storefarmUrlId:e.storefarmUrlId,storefarmProductDirectUrl:e.storefarmProductDirectUrl,mobileStorefarmProductDirectUrl:e.mobileStorefarmProductDirectUrl})})).catch((e=>{Zt.setSmartStoreUploadFinish(t.productId),n({chromeExtensionVersion:xr(),success:!1,error:e})})),!0;case e.EDIT_SMART_STORE_EXTERNAL:if(!t.productId)return;return Bt.editSmartStoreWithRetry(t.productId,t.mainImageUrl,t.additionalProductData,t.additionalProductDataAction).then((e=>n({chromeExtensionVersion:xr(),success:!0,storeProductId:e.storeProductRootId,storefarmProductId:e.storefarmProductId,storefarmUrlId:e.storefarmUrlId,storefarmProductDirectUrl:e.storefarmProductDirectUrl,mobileStorefarmProductDirectUrl:e.mobileStorefarmProductDirectUrl}))).catch((e=>n({chromeExtensionVersion:xr(),success:!1,error:e}))),!0;case e.GET_CURRENT_LOGGED_IN_SMART_STORE_CHANNEL_EXTERNAL:return Bt.getCurrentLoggedInChannel().then((e=>n({chromeExtensionVersion:xr(),success:!0,...e}))).catch((e=>n({chromeExtensionVersion:xr(),success:!1,error:e}))),!0;case e.GET_CHROME_EXTENSION_VERSION_EXTERNAL:return n({chromeExtensionVersion:xr()}),!0;case e.REQUEST_AI_SOURCING:{const{requestUrl:e}=t;return e?(Bt.fetchNaverShoppingResultPage(e).then((e=>{n({chromeExtensionVersion:xr(),success:!0,data:e})})).catch((e=>{n({chromeExtensionVersion:xr(),success:!1,error:e})})),!0):n({chromeExtensionVersion:xr(),success:!1,error:new G("\uc694\uccad \uc8fc\uc18c\uac00 \ub204\ub77d\ub410\uc2b5\ub2c8\ub2e4",le.AI_SOURCING_MISSING_PARAMS)})}case e.REQUEST_NAVER_SHOPPING_POPULAR_TERMS:{const{requestBody:e}=t;return e?(Bt.fetchNaverShoppingPopularTermsByCategory(e).then((e=>{n({chromeExtensionVersion:xr(),success:!0,data:e})})).catch((e=>{n({chromeExtensionVersion:xr(),success:!1,error:e})})),!0):n({chromeExtensionVersion:xr(),success:!1,error:new G("\uc694\uccad \ubc14\ub514\uac00 \ub204\ub77d\ub410\uc2b5\ub2c8\ub2e4",le.AI_NAVER_SHOPPING_POPULAR_TERMS_MISSING_BODY)})}case e.GET_SMART_STORE_PRODUCT_EXTERNAL:if(!t.productId)return;return Bt.fetchSmartStoreProduct(t.productId).then((e=>{n({chromeExtensionVersion:xr(),success:!0,smartStoreProduct:e})})).catch((e=>n({chromeExtensionVersion:xr(),success:!1,error:e}))),!0;case e.DELETE_SMART_STORE_PRODUCT_EXTERNAL:if(!t.productId)return;return Bt.deleteSmartStore(t.productId).then((e=>{n({chromeExtensionVersion:xr(),success:e})})).catch((e=>n({chromeExtensionVersion:xr(),success:!1,error:e}))),!0;case e.UPDATE_SMART_STORE_PRODUCT_STATE_EXTERNAL:if(!t.productId||!t.state)return;return Bt.updateProductState(t.productId,t.state).then((e=>{n({chromeExtensionVersion:xr(),success:e})})).catch((e=>n({chromeExtensionVersion:xr(),success:!1,error:e}))),!0;case e.SCRAP_START_EXTERNAL:const r=t;return null!==r&&void 0!==r&&null!==(i=r.scrapTarget)&&void 0!==i&&i.url?(chrome.tabs.create({url:r.scrapTarget.url,active:!1},(e=>{const t=e.id;t&&x.sendTabMessageAsyncUntilConnect(new Vt(t,r.scrapTarget,r.allowDuplicateScrap),30).then((e=>{var i;"CONNECTION_ERROR"===e?(n(new Xt(xr(),!1,void 0,new G("URL \ub85c\ub529 \uc2e4\ud328",le.SCRAP_AUTO_BY_URL_FAIL))),chrome.tabs.remove(t)):(n(new Xt(xr(),!(null===e||void 0===e||!e.success),null===e||void 0===e?void 0:e.successData,null===e||void 0===e?void 0:e.error)),r.keepCaptchaTabOpen&&(null===e||void 0===e||null===(i=e.error)||void 0===i?void 0:i.code)===le.SCRAP_AUTO_BY_URL_FAIL_CAPTCHA?chrome.tabs.update(t,{active:!0}):chrome.tabs.remove(t))}))})),!0):void n({chromeExtensionVersion:xr(),success:!1,error:"scrapTarget is not exist"});case e.FETCH_RAW_EXTERNAL:if(!t.url)return;return Gt.requestRaw(t.url,t.requestInit,t.bodyData,t.responseType).then((e=>{n({chromeExtensionVersion:xr(),success:e.success,data:e.data})})).catch((e=>n({chromeExtensionVersion:xr(),success:!1,error:e}))),!0;case e.UPDATE_DECLARATIVE_NET_REQUEST_RULES_EXTERNAL:return Er(null!==(o=t.removeRuleIds)&&void 0!==o?o:[],null!==(a=t.addRules)&&void 0!==a?a:[]).then((e=>{n({chromeExtensionVersion:xr(),success:!0})})).catch((e=>n({chromeExtensionVersion:xr(),success:!1,error:e}))),!0;case e.GET_DECLARATIVE_NET_REQUEST_RULES_EXTERNAL:return async function(){return await chrome.declarativeNetRequest.getDynamicRules()}().then((e=>{n({chromeExtensionVersion:xr(),success:!0,data:e})})).catch((e=>n({chromeExtensionVersion:xr(),success:!1,error:e}))),!0;case e.HEALTH_CHECK:return y.delay(100).then((e=>{n({chromeExtensionVersion:xr(),success:!0})})).catch((e=>n({chromeExtensionVersion:xr(),success:!1,error:e}))),!0;case e.REQUEST_TAOBAO_IMG_SEARCH_EXTERNAL:return ir(t.imgUrl).then((e=>{n({chromeExtensionVersion:xr(),success:!1,data:e})})).catch((e=>{n({chromeExtensionVersion:xr(),success:!1,error:e})})),!0}})),chrome.runtime.onInstalled.addListener((e=>{switch(e.reason){case chrome.runtime.OnInstalledReason.INSTALL:(async function(){const e=await wr();if(0===e.length)return!1;const t=[];for(const r of e)t.push(chrome.tabs.reload(r.id));return await Promise.all(t),!0})().then((e=>y.delay(1e4))).then((e=>wr())).then((e=>{for(const t of e)x.sendTabsMessage(new qt(t.id))}));case chrome.runtime.OnInstalledReason.UPDATE:case chrome.runtime.OnInstalledReason.CHROME_UPDATE:case chrome.runtime.OnInstalledReason.SHARED_MODULE_UPDATE:}chrome.contextMenus.create({title:"\ud37c\uc13c\ud2f0 \uc774\ubbf8\uc9c0 \uac80\uc0c9",id:"percenty_imgsearch_contextmenu",contexts:["image"]})})),Er(Yt.map((e=>e.id)),Yt),async function(){try{var e,t;const r=await fr.getRemoteConfig();if(!r.decNetReq||!r.decNetReq.removeRuleIds&&!r.decNetReq.addRules)return;await Er(null!==(e=r.decNetReq.removeRuleIds)&&void 0!==e?e:[],null!==(t=r.decNetReq.addRules)&&void 0!==t?t:[])}catch(n){console.error(n)}}(),chrome.contextMenus.onClicked.addListener((async(e,t)=>{var r;const n=e.srcUrl,i=null===t||void 0===t?void 0:t.id,o=new URL(null!==(r=null===t||void 0===t?void 0:t.url)&&void 0!==r?r:"").host;if("percenty_imgsearch_contextmenu"===e.menuItemId&&n&&i){const e=await yr.getCurrentMarketTabId();x.sendTabsMessage(new ar(i,!0,n),(async()=>{const t={imgUrl:n,market:null!==e&&void 0!==e?e:"tb"};yr.getImgSearchApi(t,i)}));let t=cr.EXT_IMGSEARCH_CONTEXT_MENU_TAOBAO_BTN_CLICK;switch(e){case"osee":t=cr.EXT_IMGSEARCH_CONTEXT_MENU_1688_BTN_CLICK;break;case"tb_overseas":t=cr.EXT_IMGSEARCH_CONTEXT_MENU_TAOBAO_OVERSEAS_BTN_CLICK;break;default:t=cr.EXT_IMGSEARCH_CONTEXT_MENU_TAOBAO_BTN_CLICK}return sr([{name:t,params:{site_url:o}}]).catch((e=>console.error("[GA TAOBAO CONTEXT MENU CLICK ERROR]",e))),!0}}))})()})();
//# sourceMappingURL=background.js.map