@memori.ai/memori-webcomponent 1.2.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -47,7 +47,7 @@ var r,o,i,a,s,l,c,u,d,f,h,p,m,g,v,b,y,w,x,S,M,_,E;if(e(t.exports,"unstable_now",
47
47
  * @author Feross Aboukhadijeh <https://feross.org>
48
48
  * @license MIT
49
49
  */var r,o,i,s;e(t.exports,"Buffer",(()=>r),(e=>r=e)),e(t.exports,"SlowBuffer",(()=>o),(e=>o=e)),e(t.exports,"INSPECT_MAX_BYTES",(()=>i),(e=>i=e)),e(t.exports,"kMaxLength",(()=>s),(e=>s=e));var l=a("9Et26"),c=a("bDLoS"),u="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;r=h,o=function(e){+e!=e&&(e=0);return h.alloc(+e)},i=50;var d=2147483647;function f(e){if(e>d)throw new RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,h.prototype),t}function h(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return g(e)}return p(e,t,n)}function p(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!h.isEncoding(t))throw new TypeError("Unknown encoding: "+t);var n=0|w(e,t),r=f(n),o=r.write(e,t);o!==n&&(r=r.slice(0,o));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(q(e,Uint8Array)){var t=new Uint8Array(e);return b(t.buffer,t.byteOffset,t.byteLength)}return v(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(q(e,ArrayBuffer)||e&&q(e.buffer,ArrayBuffer))return b(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(q(e,SharedArrayBuffer)||e&&q(e.buffer,SharedArrayBuffer)))return b(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return h.from(r,t,n);var o=function(e){if(h.isBuffer(e)){var t=0|y(e.length),n=f(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||K(e.length)?f(0):v(e);if("Buffer"===e.type&&Array.isArray(e.data))return v(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return h.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function m(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 g(e){return m(e),f(e<0?0:0|y(e))}function v(e){for(var t=e.length<0?0:0|y(e.length),n=f(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function b(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');var r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,h.prototype),r}function y(e){if(e>=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return 0|e}function w(e,t){if(h.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||q(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(e).length;default:if(o)return r?-1:G(e).length;t=(""+t).toLowerCase(),o=!0}}function x(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,n);case"utf8":case"utf-8":return O(this,t,n);case"ascii":return P(this,t,n);case"latin1":case"binary":return N(this,t,n);case"base64":return I(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function S(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function M(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),K(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=h.from(t,r)),h.isBuffer(t))return 0===t.length?-1:_(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):_(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function _(e,t,n,r,o){var i,a=1,s=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){var u=-1;for(i=n;i<s;i++)if(c(e,i)===c(t,-1===u?0:i-u)){if(-1===u&&(u=i),i-u+1===l)return u*a}else-1!==u&&(i-=i-u),u=-1}else for(n+l>s&&(n=s-l),i=n;i>=0;i--){for(var d=!0,f=0;f<l;f++)if(c(e,i+f)!==c(t,f)){d=!1;break}if(d)return i}return-1}function E(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var i=t.length;r>i/2&&(r=i/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(K(s))return a;e[n+a]=s}return a}function A(e,t,n,r){return V(G(t,e.length-n),e,n,r)}function C(e,t,n,r){return V(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function k(e,t,n,r){return V(W(t),e,n,r)}function T(e,t,n,r){return V(function(e,t){for(var n,r,o,i=[],a=0;a<e.length&&!((t-=2)<0);++a)r=(n=e.charCodeAt(a))>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function I(e,t,n){return 0===t&&n===e.length?l.fromByteArray(e):l.fromByteArray(e.slice(t,n))}function O(e,t,n){n=Math.min(e.length,n);for(var r=[],o=t;o<n;){var i,a,s,l,c=e[o],u=null,d=c>239?4:c>223?3:c>191?2:1;if(o+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(i=e[o+1]))&&(l=(31&c)<<6|63&i)>127&&(u=l);break;case 3:i=e[o+1],a=e[o+2],128==(192&i)&&128==(192&a)&&(l=(15&c)<<12|(63&i)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:i=e[o+1],a=e[o+2],s=e[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),o+=d}return function(e){var t=e.length;if(t<=R)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=R));return n}(r)}s=d,h.TYPED_ARRAY_SUPPORT=function(){try{var 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}}(),h.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(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}}),h.poolSize=8192,h.from=function(e,t,n){return p(e,t,n)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array),h.alloc=function(e,t,n){return function(e,t,n){return m(e),e<=0?f(e):void 0!==t?"string"==typeof n?f(e).fill(t,n):f(e).fill(t):f(e)}(e,t,n)},h.allocUnsafe=function(e){return g(e)},h.allocUnsafeSlow=function(e){return g(e)},h.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==h.prototype},h.compare=function(e,t){if(q(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),q(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(e)||!h.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var n=e.length,r=t.length,o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},h.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}},h.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return h.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=h.allocUnsafe(t),o=0;for(n=0;n<e.length;++n){var i=e[n];if(q(i,Uint8Array))o+i.length>r.length?h.from(i).copy(r,o):Uint8Array.prototype.set.call(r,i,o);else{if(!h.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(r,o)}o+=i.length}return r},h.byteLength=w,h.prototype._isBuffer=!0,h.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)S(this,t,t+1);return this},h.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)S(this,t,t+3),S(this,t+1,t+2);return this},h.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)S(this,t,t+7),S(this,t+1,t+6),S(this,t+2,t+5),S(this,t+3,t+4);return this},h.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?O(this,0,e):x.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(e){if(!h.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===h.compare(this,e)},h.prototype.inspect=function(){var e="",t=i;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},u&&(h.prototype[u]=h.prototype.inspect),h.prototype.compare=function(e,t,n,r,o){if(q(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),!h.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===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(i,a),l=this.slice(r,o),c=e.slice(t,n),u=0;u<s;++u)if(l[u]!==c[u]){i=l[u],a=c[u];break}return i<a?-1:a<i?1:0},h.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},h.prototype.indexOf=function(e,t,n){return M(this,e,t,n,!0)},h.prototype.lastIndexOf=function(e,t,n){return M(this,e,t,n,!1)},h.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return E(this,e,t,n);case"utf8":case"utf-8":return A(this,e,t,n);case"ascii":case"latin1":case"binary":return C(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var R=4096;function P(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function N(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function L(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=$[e[i]];return o}function B(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length-1;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function D(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,n,r,o,i){if(!h.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function F(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(e,t,n,r,o){return t=+t,n>>>=0,o||F(e,0,n,4),c.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,o){return t=+t,n>>>=0,o||F(e,0,n,8),c.write(e,t,n,r,52,8),n+8}h.prototype.slice=function(e,t){var n=this.length;(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);var r=this.subarray(e,t);return Object.setPrototypeOf(r,h.prototype),r},h.prototype.readUintLE=h.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},h.prototype.readUintBE=h.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},h.prototype.readUint8=h.prototype.readUInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),this[e]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]|this[e+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(e,t){return e>>>=0,t||D(e,2,this.length),this[e]<<8|this[e+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},h.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},h.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||D(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},h.prototype.readInt8=function(e,t){return e>>>=0,t||D(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},h.prototype.readInt16LE=function(e,t){e>>>=0,t||D(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt16BE=function(e,t){e>>>=0,t||D(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt32LE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},h.prototype.readInt32BE=function(e,t){return e>>>=0,t||D(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},h.prototype.readFloatLE=function(e,t){return e>>>=0,t||D(e,4,this.length),c.read(this,e,!0,23,4)},h.prototype.readFloatBE=function(e,t){return e>>>=0,t||D(e,4,this.length),c.read(this,e,!1,23,4)},h.prototype.readDoubleLE=function(e,t){return e>>>=0,t||D(e,8,this.length),c.read(this,e,!0,52,8)},h.prototype.readDoubleBE=function(e,t){return e>>>=0,t||D(e,8,this.length),c.read(this,e,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||j(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t>>>=0,n>>>=0,r)||j(this,e,t,n,Math.pow(2,8*n)-1,0);var o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},h.prototype.writeUint8=h.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,1,255,0),this[t]=255&e,t+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||j(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},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||j(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},h.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);j(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i<n&&(a*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},h.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){var o=Math.pow(2,8*n-1);j(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},h.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},h.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},h.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||j(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},h.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||j(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},h.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||j(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},h.prototype.writeFloatLE=function(e,t,n){return z(this,e,t,!0,n)},h.prototype.writeFloatBE=function(e,t,n){return z(this,e,t,!1,n)},h.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},h.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},h.prototype.copy=function(e,t,n,r){if(!h.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var o=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),o},h.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!h.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){var o=e.charCodeAt(0);("utf8"===r&&o<128||"latin1"===r)&&(e=o)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var a=h.isBuffer(e)?e:h.from(e,r),s=a.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<n-t;++i)this[i+t]=a[i%s]}return this};var H=/[^+/0-9A-Za-z-_]/g;function G(e,t){var n;t=t||1/0;for(var r=e.length,o=null,i=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function W(e){return l.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,n,r){for(var o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function q(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function K(e){return e!=e}var $=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var r=16*n,o=0;o<16;++o)t[r+o]=e[n]+e[o];return t}()})),a.register("9Et26",(function(t,n){var r,o;e(t.exports,"toByteArray",(()=>r),(e=>r=e)),e(t.exports,"fromByteArray",(()=>o),(e=>o=e)),r=function(e){var t,n,r=d(e),o=r[0],i=r[1],l=new s(function(e,t,n){return 3*(t+n)/4-n}(0,o,i)),c=0,u=i>0?o-4:o;for(n=0;n<u;n+=4)t=a[e.charCodeAt(n)]<<18|a[e.charCodeAt(n+1)]<<12|a[e.charCodeAt(n+2)]<<6|a[e.charCodeAt(n+3)],l[c++]=t>>16&255,l[c++]=t>>8&255,l[c++]=255&t;2===i&&(t=a[e.charCodeAt(n)]<<2|a[e.charCodeAt(n+1)]>>4,l[c++]=255&t);1===i&&(t=a[e.charCodeAt(n)]<<10|a[e.charCodeAt(n+1)]<<4|a[e.charCodeAt(n+2)]>>2,l[c++]=t>>8&255,l[c++]=255&t);return l},o=function(e){for(var t,n=e.length,r=n%3,o=[],a=16383,s=0,l=n-r;s<l;s+=a)o.push(f(e,s,s+a>l?l:s+a));1===r?(t=e[n-1],o.push(i[t>>2]+i[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(i[t>>10]+i[t>>4&63]+i[t<<2&63]+"="));return o.join("")};for(var i=[],a=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,u=l.length;c<u;++c)i[c]=l[c],a[l.charCodeAt(c)]=c;function d(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function f(e,t,n){for(var r,o,a=[],s=t;s<n;s+=3)r=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(i[(o=r)>>18&63]+i[o>>12&63]+i[o>>6&63]+i[63&o]);return a.join("")}a["-".charCodeAt(0)]=62,a["_".charCodeAt(0)]=63})),a.register("bDLoS",(function(t,n){
50
- /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var r,o;e(t.exports,"read",(()=>r),(e=>r=e)),e(t.exports,"write",(()=>o),(e=>o=e)),r=function(e,t,n,r,o){var i,a,s=8*o-r-1,l=(1<<s)-1,c=l>>1,u=-7,d=n?o-1:0,f=n?-1:1,h=e[t+d];for(d+=f,i=h&(1<<-u)-1,h>>=-u,u+=s;u>0;i=256*i+e[t+d],d+=f,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=r;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===i)i=1-c;else{if(i===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),i-=c}return(h?-1:1)*a*Math.pow(2,i-r)},o=function(e,t,n,r,o,i){var a,s,l,c=8*i-o-1,u=(1<<c)-1,d=u>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?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=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,o),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[n+h]=255&s,h+=p,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[n+h]=255&a,h+=p,a/=256,c-=8);e[n+h-p]|=128*m}})),a.register("9gzJO",(function(e,t){var n=a("ePtPP"),r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},o=/%[sdj%]/g;e.exports.format=function(e){if(!b(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(l(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,a=String(e).replace(o,(function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),s=r[n];n<i;s=r[++n])g(s)||!x(s)?a+=" "+s:a+=" "+l(s);return a},e.exports.deprecate=function(t,r){if(void 0!==n&&!0===n.noDeprecation)return t;if(void 0===n)return function(){return e.exports.deprecate(t,r).apply(this,arguments)};var o=!1;return function(){if(!o){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),o=!0}return t.apply(this,arguments)}};var i={},s=/^$/;function l(t,n){var r={seen:[],stylize:u};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(n)?r.showHidden=n:n&&e.exports._extend(r,n),y(r.showHidden)&&(r.showHidden=!1),y(r.depth)&&(r.depth=2),y(r.colors)&&(r.colors=!1),y(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=c),d(r,t,r.depth)}function c(e,t){var n=l.styles[t];return n?"["+l.colors[n][0]+"m"+e+"["+l.colors[n][1]+"m":e}function u(e,t){return e}function d(t,n,r){if(t.customInspect&&n&&_(n.inspect)&&n.inspect!==e.exports.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,t);return b(o)||(o=d(t,o,r)),o}var i=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(v(t))return e.stylize(""+t,"number");if(m(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(t,n);if(i)return i;var a=Object.keys(n),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),M(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(_(n)){var l=n.name?": "+n.name:"";return t.stylize("[Function"+l+"]","special")}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(S(n))return t.stylize(Date.prototype.toString.call(n),"date");if(M(n))return f(n)}var c,u="",x=!1,E=["{","}"];(p(n)&&(x=!0,E=["[","]"]),_(n))&&(u=" [Function"+(n.name?": "+n.name:"")+"]");return w(n)&&(u=" "+RegExp.prototype.toString.call(n)),S(n)&&(u=" "+Date.prototype.toUTCString.call(n)),M(n)&&(u=" "+f(n)),0!==a.length||x&&0!=n.length?r<0?w(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),c=x?function(e,t,n,r,o){for(var i=[],a=0,s=t.length;a<s;++a)T(t,String(a))?i.push(h(e,t,n,r,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(h(e,t,n,r,o,!0))})),i}(t,n,r,s,a):a.map((function(e){return h(t,n,r,s,e,x)})),t.seen.pop(),function(e,t,n){var r=e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);return r>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(c,u,E)):E[0]+u+E[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,o,i){var a,s,l;if((l=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),T(r,o)||(a="["+o+"]"),s||(e.seen.indexOf(l.value)<0?(s=g(n)?d(e,l.value,null):d(e,l.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),y(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function g(e){return null===e}function v(e){return"number"==typeof e}function b(e){return"string"==typeof e}function y(e){return void 0===e}function w(e){return x(e)&&"[object RegExp]"===E(e)}function x(e){return"object"==typeof e&&null!==e}function S(e){return x(e)&&"[object Date]"===E(e)}function M(e){return x(e)&&("[object Error]"===E(e)||e instanceof Error)}function _(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}e.exports.debuglog=function(t){if(t=t.toUpperCase(),!i[t])if(s.test(t)){var r=n.pid;i[t]=function(){var n=e.exports.format.apply(e.exports,arguments);console.error("%s %d: %s",t,r,n)}}else i[t]=function(){};return i[t]},e.exports.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.exports.types=a("bM5Oe"),e.exports.isArray=p,e.exports.isBoolean=m,e.exports.isNull=g,e.exports.isNullOrUndefined=function(e){return null==e},e.exports.isNumber=v,e.exports.isString=b,e.exports.isSymbol=function(e){return"symbol"==typeof e},e.exports.isUndefined=y,e.exports.isRegExp=w,e.exports.types.isRegExp=w,e.exports.isObject=x,e.exports.isDate=S,e.exports.types.isDate=S,e.exports.isError=M,e.exports.types.isNativeError=M,e.exports.isFunction=_,e.exports.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},e.exports.isBuffer=a("jPRhY");var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(){var e=new Date,t=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":");return[e.getDate(),C[e.getMonth()],t].join(" ")}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports.log=function(){console.log("%s - %s",k(),e.exports.format.apply(e.exports,arguments))},e.exports.inherits=a("5jAh8"),e.exports._extend=function(e,t){if(!t||!x(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var I="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function O(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}e.exports.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(I&&e[I]){var t;if("function"!=typeof(t=e[I]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,I,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(e,r){e?n(e):t(r)}));try{e.apply(this,o)}catch(e){n(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),I&&Object.defineProperty(t,I,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,r(e))},e.exports.promisify.custom=I,e.exports.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var o=t.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};e.apply(this,t).then((function(e){n.nextTick(a.bind(null,null,e))}),(function(e){n.nextTick(O.bind(null,e,a))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,r(e)),t}})),a.register("ePtPP",(function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,c=[],u=!1,d=-1;function f(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&h())}function h(){if(!u){var e=s(f);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||u||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}})),a.register("bM5Oe",(function(e,t){"use strict";var n=a("3vY4Y"),r=a("jgq2W"),o=a("8yoeR"),i=a("doLxT");function s(e){return e.call.bind(e)}var l="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,u=s(Object.prototype.toString),d=s(Number.prototype.valueOf),f=s(String.prototype.valueOf),h=s(Boolean.prototype.valueOf);if(l)var p=s(BigInt.prototype.valueOf);if(c)var m=s(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function v(e){return"[object Map]"===u(e)}function b(e){return"[object Set]"===u(e)}function y(e){return"[object WeakMap]"===u(e)}function w(e){return"[object WeakSet]"===u(e)}function x(e){return"[object ArrayBuffer]"===u(e)}function S(e){return"undefined"!=typeof ArrayBuffer&&(x.working?x(e):e instanceof ArrayBuffer)}function M(e){return"[object DataView]"===u(e)}function _(e){return"undefined"!=typeof DataView&&(M.working?M(e):e instanceof DataView)}e.exports.isArgumentsObject=n,e.exports.isGeneratorFunction=r,e.exports.isTypedArray=i,e.exports.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},e.exports.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):i(e)||_(e)},e.exports.isUint8Array=function(e){return"Uint8Array"===o(e)},e.exports.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===o(e)},e.exports.isUint16Array=function(e){return"Uint16Array"===o(e)},e.exports.isUint32Array=function(e){return"Uint32Array"===o(e)},e.exports.isInt8Array=function(e){return"Int8Array"===o(e)},e.exports.isInt16Array=function(e){return"Int16Array"===o(e)},e.exports.isInt32Array=function(e){return"Int32Array"===o(e)},e.exports.isFloat32Array=function(e){return"Float32Array"===o(e)},e.exports.isFloat64Array=function(e){return"Float64Array"===o(e)},e.exports.isBigInt64Array=function(e){return"BigInt64Array"===o(e)},e.exports.isBigUint64Array=function(e){return"BigUint64Array"===o(e)},v.working="undefined"!=typeof Map&&v(new Map),e.exports.isMap=function(e){return"undefined"!=typeof Map&&(v.working?v(e):e instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),e.exports.isSet=function(e){return"undefined"!=typeof Set&&(b.working?b(e):e instanceof Set)},y.working="undefined"!=typeof WeakMap&&y(new WeakMap),e.exports.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(y.working?y(e):e instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),e.exports.isWeakSet=function(e){return w(e)},x.working="undefined"!=typeof ArrayBuffer&&x(new ArrayBuffer),e.exports.isArrayBuffer=S,M.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&M(new DataView(new ArrayBuffer(1),0,1)),e.exports.isDataView=_;var E="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function A(e){return"[object SharedArrayBuffer]"===u(e)}function C(e){return void 0!==E&&(void 0===A.working&&(A.working=A(new E)),A.working?A(e):e instanceof E)}function k(e){return g(e,d)}function T(e){return g(e,f)}function I(e){return g(e,h)}function O(e){return l&&g(e,p)}function R(e){return c&&g(e,m)}e.exports.isSharedArrayBuffer=C,e.exports.isAsyncFunction=function(e){return"[object AsyncFunction]"===u(e)},e.exports.isMapIterator=function(e){return"[object Map Iterator]"===u(e)},e.exports.isSetIterator=function(e){return"[object Set Iterator]"===u(e)},e.exports.isGeneratorObject=function(e){return"[object Generator]"===u(e)},e.exports.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===u(e)},e.exports.isNumberObject=k,e.exports.isStringObject=T,e.exports.isBooleanObject=I,e.exports.isBigIntObject=O,e.exports.isSymbolObject=R,e.exports.isBoxedPrimitive=function(e){return k(e)||T(e)||I(e)||O(e)||R(e)},e.exports.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(S(e)||C(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e.exports,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))})),a.register("3vY4Y",(function(e,t){"use strict";var n=a("gp4q4")(),r=a("6pFFa")("Object.prototype.toString"),o=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===r(e)},i=function(e){return!!o(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==r(e)&&"[object Function]"===r(e.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=i,e.exports=s?o:i})),a.register("gp4q4",(function(e,t){"use strict";var n=a("fPlzF");e.exports=function(){return n()&&!!Symbol.toStringTag}})),a.register("fPlzF",(function(e,t){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}})),a.register("6pFFa",(function(e,t){"use strict";var n=a("3kYrO"),r=a("1Mwz1"),o=r(n("String.prototype.indexOf"));e.exports=function(e,t){var i=n(e,!!t);return"function"==typeof i&&o(e,".prototype.")>-1?r(i):i}})),a.register("3kYrO",(function(e,t){"use strict";var n,r=SyntaxError,o=Function,i=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(e){l=null}var c=function(){throw new i},u=l?function(){try{return c}catch(e){try{return l(arguments,"callee").get}catch(e){return c}}}():c,d=a("l5rv7")(),f=Object.getPrototypeOf||function(e){return e.__proto__},h={},p="undefined"==typeof Uint8Array?n:f(Uint8Array),m={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":d?f([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d?f(f([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&d?f((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&d?f((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d?f(""[Symbol.iterator]()):n,"%Symbol%":d?Symbol:n,"%SyntaxError%":r,"%ThrowTypeError%":u,"%TypedArray%":p,"%TypeError%":i,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},g=function e(t){var n;if("%AsyncFunction%"===t)n=s("async function () {}");else if("%GeneratorFunction%"===t)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=s("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(n=f(o.prototype))}return m[t]=n,n},v={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=a("2JiOr"),y=a("c5f2w"),w=b.call(Function.call,Array.prototype.concat),x=b.call(Function.apply,Array.prototype.splice),S=b.call(Function.call,String.prototype.replace),M=b.call(Function.call,String.prototype.slice),_=b.call(Function.call,RegExp.prototype.exec),E=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,C=function(e){var t=M(e,0,1),n=M(e,-1);if("%"===t&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new r("invalid intrinsic syntax, expected opening `%`");var o=[];return S(e,E,(function(e,t,n,r){o[o.length]=n?S(r,A,"$1"):t||e})),o},k=function(e,t){var n,o=e;if(y(v,o)&&(o="%"+(n=v[o])[0]+"%"),y(m,o)){var a=m[o];if(a===h&&(a=g(o)),void 0===a&&!t)throw new i("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:o,value:a}}throw new r("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new i('"allowMissing" argument must be a boolean');if(null===_(/^%?[^%]*%?$/,e))throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=C(e),o=n.length>0?n[0]:"",a=k("%"+o+"%",t),s=a.name,c=a.value,u=!1,d=a.alias;d&&(o=d[0],x(n,w([0,1],d)));for(var f=1,h=!0;f<n.length;f+=1){var p=n[f],g=M(p,0,1),v=M(p,-1);if(('"'===g||"'"===g||"`"===g||'"'===v||"'"===v||"`"===v)&&g!==v)throw new r("property names with quotes must have matching quotes");if("constructor"!==p&&h||(u=!0),y(m,s="%"+(o+="."+p)+"%"))c=m[s];else if(null!=c){if(!(p in c)){if(!t)throw new i("base intrinsic for "+e+" exists, but the property is not available.");return}if(l&&f+1>=n.length){var b=l(c,p);c=(h=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:c[p]}else h=y(c,p),c=c[p];h&&!u&&(m[s]=c)}}return c}})),a.register("l5rv7",(function(e,t){"use strict";var n="undefined"!=typeof Symbol&&Symbol,r=a("fPlzF");e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&r())))}})),a.register("2JiOr",(function(e,t){"use strict";var n=a("5DpJt");e.exports=Function.prototype.bind||n})),a.register("5DpJt",(function(e,t){"use strict";var n="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,o=Object.prototype.toString,i="[object Function]";e.exports=function(e){var t=this;if("function"!=typeof t||o.call(t)!==i)throw new TypeError(n+t);for(var a,s=r.call(arguments,1),l=function(){if(this instanceof a){var n=t.apply(this,s.concat(r.call(arguments)));return Object(n)===n?n:this}return t.apply(e,s.concat(r.call(arguments)))},c=Math.max(0,t.length-s.length),u=[],d=0;d<c;d++)u.push("$"+d);if(a=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(l),t.prototype){var f=function(){};f.prototype=t.prototype,a.prototype=new f,f.prototype=null}return a}})),a.register("c5f2w",(function(e,t){"use strict";var n=a("2JiOr");e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)})),a.register("1Mwz1",(function(e,t){"use strict";var n=a("2JiOr"),r=a("3kYrO"),o=r("%Function.prototype.apply%"),i=r("%Function.prototype.call%"),s=r("%Reflect.apply%",!0)||n.call(i,o),l=r("%Object.getOwnPropertyDescriptor%",!0),c=r("%Object.defineProperty%",!0),u=r("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=s(n,i,arguments);if(l&&c){var r=l(t,"length");r.configurable&&c(t,"length",{value:1+u(0,e.length-(arguments.length-1))})}return t};var d=function(){return s(n,o,arguments)};c?c(e.exports,"apply",{value:d}):e.exports.apply=d})),a.register("jgq2W",(function(e,t){"use strict";var n,r=Object.prototype.toString,o=Function.prototype.toString,i=/^\s*(?:function)?\*/,s=a("gp4q4")(),l=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(i.test(o.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===r.call(e);if(!l)return!1;if(void 0===n){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&l(t)}return l(e)===n}})),a.register("8yoeR",(function(e,n){"use strict";var r=a("kz55o"),o=a("5gqKI"),i=a("6pFFa"),s=a("8WWik"),l=i("Object.prototype.toString"),c=a("gp4q4")(),u="undefined"==typeof globalThis?t:globalThis,d=o(),f=i("String.prototype.slice"),h={},p=Object.getPrototypeOf;c&&s&&p&&r(d,(function(e){if("function"==typeof u[e]){var t=new u[e];if(Symbol.toStringTag in t){var n=p(t),r=s(n,Symbol.toStringTag);if(!r){var o=p(n);r=s(o,Symbol.toStringTag)}h[e]=r.get}}}));var m=a("doLxT");e.exports=function(e){return!!m(e)&&(c&&Symbol.toStringTag in e?function(e){var t=!1;return r(h,(function(n,r){if(!t)try{var o=n.call(e);o===r&&(t=o)}catch(e){}})),t}(e):f(l(e),8,-1))}})),a.register("kz55o",(function(e,t){"use strict";var n=a("4Z0y4"),r=Object.prototype.toString,o=Object.prototype.hasOwnProperty,i=function(e,t,n){for(var r=0,i=e.length;r<i;r++)o.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))},s=function(e,t,n){for(var r=0,o=e.length;r<o;r++)null==n?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)},l=function(e,t,n){for(var r in e)o.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))};e.exports=function(e,t,o){if(!n(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=o),"[object Array]"===r.call(e)?i(e,t,a):"string"==typeof e?s(e,t,a):l(e,t,a)}})),a.register("4Z0y4",(function(e,t){"use strict";var n,r,o=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{n=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,n)}catch(e){e!==r&&(i=null)}else i=null;var a=/^\s*class\b/,s=function(e){try{var t=o.call(e);return a.test(t)}catch(e){return!1}},l=function(e){try{return!s(e)&&(o.call(e),!0)}catch(e){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,d=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var h=document.all;c.call(h)===c.call(document.all)&&(f=function(e){if((d||!e)&&(void 0===e||"object"==typeof e))try{var t=c.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=i?function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{i(e,null,n)}catch(e){if(e!==r)return!1}return!s(e)&&l(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(u)return l(e);if(s(e))return!1;var t=c.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&l(e)}})),a.register("5gqKI",(function(e,n){"use strict";var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],o="undefined"==typeof globalThis?t:globalThis;e.exports=function(){for(var e=[],t=0;t<r.length;t++)"function"==typeof o[r[t]]&&(e[e.length]=r[t]);return e}})),a.register("8WWik",(function(e,t){"use strict";var n=a("3kYrO")("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n})),a.register("doLxT",(function(e,n){"use strict";var r=a("kz55o"),o=a("5gqKI"),i=a("6pFFa"),s=i("Object.prototype.toString"),l=a("gp4q4")(),c=a("8WWik"),u="undefined"==typeof globalThis?t:globalThis,d=o(),f=i("Array.prototype.indexOf",!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},h=i("String.prototype.slice"),p={},m=Object.getPrototypeOf;l&&c&&m&&r(d,(function(e){var t=new u[e];if(Symbol.toStringTag in t){var n=m(t),r=c(n,Symbol.toStringTag);if(!r){var o=m(n);r=c(o,Symbol.toStringTag)}p[e]=r.get}}));e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!l||!(Symbol.toStringTag in e)){var t=h(s(e),8,-1);return f(d,t)>-1}return!!c&&function(e){var t=!1;return r(p,(function(n,r){if(!t)try{t=n.call(e)===r}catch(e){}})),t}(e)}})),a.register("jPRhY",(function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}})),a.register("5jAh8",(function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}})),a.register("fnFC9",(function(e,n){var r=a("fB4ch"),o=a("9QxiN"),i=a("iCrCa"),s=a("7X2JB"),l=a("8iXHm"),c=e.exports;c.request=function(e,n){e="string"==typeof e?l.parse(e):i(e);var o=-1===t.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||o,s=e.hostname||e.host,c=e.port,u=e.path||"/";s&&-1!==s.indexOf(":")&&(s="["+s+"]"),e.url=(s?a+"//"+s:"")+(c?":"+c:"")+u,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var d=new r(e);return n&&d.on("response",n),d},c.get=function(e,t){var n=c.request(e,t);return n.end(),n},c.ClientRequest=r,c.IncomingMessage=o.IncomingMessage,c.Agent=function(){},c.Agent.defaultMaxSockets=4,c.globalAgent=new c.Agent,c.STATUS_CODES=s,c.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]})),a.register("fB4ch",(function(e,n){var r=a("ePtPP"),o=a("bqBrJ").Buffer,i=a("7lggT"),s=a("5jAh8"),l=a("9QxiN"),c=a("8IqCp"),u=l.IncomingMessage,d=l.readyStates;var f=e.exports=function(e){var t,n=this;c.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+o.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var r=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!i.abortController)r=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!i.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}n._mode=function(e,t){return i.fetch&&t?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&e?"arraybuffer":"text"}(t,r),n._fetchTimer=null,n._socketTimeout=null,n._socketTimer=null,n.on("finish",(function(){n._onFinish()}))};s(f,c.Writable),f.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===h.indexOf(n)&&(this._headers[n]={name:e,value:t})},f.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},f.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},f.prototype._onFinish=function(){var e=this;if(!e._destroyed){var n=e._opts;"timeout"in n&&0!==n.timeout&&e.setTimeout(n.timeout);var o=e._headers,a=null;"GET"!==n.method&&"HEAD"!==n.method&&(a=new Blob(e._body,{type:(o["content-type"]||{}).value||""}));var s=[];if(Object.keys(o).forEach((function(e){var t=o[e].name,n=o[e].value;Array.isArray(n)?n.forEach((function(e){s.push([t,e])})):s.push([t,n])})),"fetch"===e._mode){var l=null;if(i.abortController){var c=new AbortController;l=c.signal,e._fetchAbortController=c,"requestTimeout"in n&&0!==n.requestTimeout&&(e._fetchTimer=t.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),n.requestTimeout))}t.fetch(e._opts.url,{method:e._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:n.withCredentials?"include":"same-origin",signal:l}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var u=e._xhr=new t.XMLHttpRequest;try{u.open(e._opts.method,e._opts.url,!0)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}"responseType"in u&&(u.responseType=e._mode),"withCredentials"in u&&(u.withCredentials=!!n.withCredentials),"text"===e._mode&&"overrideMimeType"in u&&u.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in n&&(u.timeout=n.requestTimeout,u.ontimeout=function(){e.emit("requestTimeout")}),s.forEach((function(e){u.setRequestHeader(e[0],e[1])})),e._response=null,u.onreadystatechange=function(){switch(u.readyState){case d.LOADING:case d.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(u.onprogress=function(){e._onXHRProgress()}),u.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{u.send(a)}catch(t){return void r.nextTick((function(){e.emit("error",t)}))}}}},f.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},f.prototype._connect=function(){var e=this;e._destroyed||(e._response=new u(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},f.prototype._write=function(e,t,n){this._body.push(e),n()},f.prototype._resetTimers=function(e){var n=this;t.clearTimeout(n._socketTimer),n._socketTimer=null,e?(t.clearTimeout(n._fetchTimer),n._fetchTimer=null):n._socketTimeout&&(n._socketTimer=t.setTimeout((function(){n.emit("timeout")}),n._socketTimeout))},f.prototype.abort=f.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},f.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=void 0),c.Writable.prototype.end.call(this,e,t,n)},f.prototype.setTimeout=function(e,t){var n=this;t&&n.once("timeout",t),n._socketTimeout=e,n._resetTimers(!1)},f.prototype.flushHeaders=function(){},f.prototype.setNoDelay=function(){},f.prototype.setSocketKeepAlive=function(){};var h=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]})),a.register("7lggT",(function(n,r){var o,i,a,s,l,c,u,d;function f(){if(void 0!==d)return d;if(t.XMLHttpRequest){d=new t.XMLHttpRequest;try{d.open("GET",t.XDomainRequest?"/":"https://example.com")}catch(e){d=null}}else d=null;return d}function h(e){var t=f();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function p(e){return"function"==typeof e}e(n.exports,"fetch",(()=>o),(e=>o=e)),e(n.exports,"writableStream",(()=>i),(e=>i=e)),e(n.exports,"abortController",(()=>a),(e=>a=e)),e(n.exports,"arraybuffer",(()=>s),(e=>s=e)),e(n.exports,"msstream",(()=>l),(e=>l=e)),e(n.exports,"mozchunkedarraybuffer",(()=>c),(e=>c=e)),e(n.exports,"overrideMimeType",(()=>u),(e=>u=e)),o=p(t.fetch)&&p(t.ReadableStream),i=p(t.WritableStream),a=p(t.AbortController),s=o||h("arraybuffer"),l=!o&&h("ms-stream"),c=!o&&h("moz-chunked-arraybuffer"),u=o||!!f()&&p(f().overrideMimeType),d=null})),a.register("9QxiN",(function(n,r){var o,i;e(n.exports,"readyStates",(()=>o),(e=>o=e)),e(n.exports,"IncomingMessage",(()=>i),(e=>i=e));var s=a("bqBrJ").Buffer,l=a("ePtPP"),c=a("7lggT"),u=a("5jAh8"),d=a("8IqCp"),f=o={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},h=i=function(e,t,n,r){var o=this;if(d.Readable.call(o),o._mode=n,o.headers={},o.rawHeaders=[],o.trailers={},o.rawTrailers=[],o.on("end",(function(){l.nextTick((function(){o.emit("close")}))})),"fetch"===n){if(o._fetchResponse=t,o.url=t.url,o.statusCode=t.status,o.statusMessage=t.statusText,t.headers.forEach((function(e,t){o.headers[t.toLowerCase()]=e,o.rawHeaders.push(t,e)})),c.writableStream){var i=new WritableStream({write:function(e){return r(!1),new Promise((function(t,n){o._destroyed?n():o.push(s.from(e))?t():o._resumeFetch=t}))},close:function(){r(!0),o._destroyed||o.push(null)},abort:function(e){r(!0),o._destroyed||o.emit("error",e)}});try{return void t.body.pipeTo(i).catch((function(e){r(!0),o._destroyed||o.emit("error",e)}))}catch(e){}}var a=t.body.getReader();!function e(){a.read().then((function(t){o._destroyed||(r(t.done),t.done?o.push(null):(o.push(s.from(t.value)),e()))})).catch((function(e){r(!0),o._destroyed||o.emit("error",e)}))}()}else{if(o._xhr=e,o._pos=0,o.url=e.responseURL,o.statusCode=e.status,o.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===o.headers[n]&&(o.headers[n]=[]),o.headers[n].push(t[2])):void 0!==o.headers[n]?o.headers[n]+=", "+t[2]:o.headers[n]=t[2],o.rawHeaders.push(t[1],t[2])}})),o._charset="x-user-defined",!c.overrideMimeType){var u=o.rawHeaders["mime-type"];if(u){var f=u.match(/;\s*charset=([^;])(;|$)/);f&&(o._charset=f[1].toLowerCase())}o._charset||(o._charset="utf-8")}}};u(h,d.Readable),h.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},h.prototype._onXHRProgress=function(e){var n=this,r=n._xhr,o=null;switch(n._mode){case"text":if((o=r.responseText).length>n._pos){var i=o.substr(n._pos);if("x-user-defined"===n._charset){for(var a=s.alloc(i.length),l=0;l<i.length;l++)a[l]=255&i.charCodeAt(l);n.push(a)}else n.push(i,n._charset);n._pos=o.length}break;case"arraybuffer":if(r.readyState!==f.DONE||!r.response)break;o=r.response,n.push(s.from(new Uint8Array(o)));break;case"moz-chunked-arraybuffer":if(o=r.response,r.readyState!==f.LOADING||!o)break;n.push(s.from(new Uint8Array(o)));break;case"ms-stream":if(o=r.response,r.readyState!==f.LOADING)break;var c=new t.MSStreamReader;c.onprogress=function(){c.result.byteLength>n._pos&&(n.push(s.from(new Uint8Array(c.result.slice(n._pos)))),n._pos=c.result.byteLength)},c.onload=function(){e(!0),n.push(null)},c.readAsArrayBuffer(o)}n._xhr.readyState===f.DONE&&"ms-stream"!==n._mode&&(e(!0),n.push(null))}})),a.register("8IqCp",(function(e,t){(t=e.exports=a("kZTRI")).Stream=t,t.Readable=t,t.Writable=a("gihud"),t.Duplex=a("jqAKP"),t.Transform=a("erC5i"),t.PassThrough=a("3dCe5"),t.finished=a("j5ZwK"),t.pipeline=a("azGNy")})),a.register("kZTRI",(function(e,n){var r,o=a("ePtPP");e.exports=A,A.ReadableState=E;a("3oV8N").EventEmitter;var i=function(e,t){return e.listeners(t).length},s=a("3vqBO"),l=a("bqBrJ").Buffer,c=t.Uint8Array||function(){};var u,d=a("1DJXa");u=d&&d.debuglog?d.debuglog("stream"):function(){};var f,h,p,m=a("k9Eb1"),g=a("6hWXN"),v=a("56mX2").getHighWaterMark,b=a("aOgJu").codes,y=b.ERR_INVALID_ARG_TYPE,w=b.ERR_STREAM_PUSH_AFTER_EOF,x=b.ERR_METHOD_NOT_IMPLEMENTED,S=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;a("5jAh8")(A,s);var M=g.errorOrDestroy,_=["error","close","destroy","pause","resume"];function E(e,t,n){r=r||a("jqAKP"),e=e||{},"boolean"!=typeof n&&(n=t instanceof r),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=v(this,e,"readableHighWaterMark",n),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=a("28kcI").StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function A(e){if(r=r||a("jqAKP"),!(this instanceof A))return new A(e);var t=this instanceof r;this._readableState=new E(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function C(e,t,n,r,o){u("readableAddChunk",t);var i,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(u("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,R(e)))}(e,a);else if(o||(i=function(e,t){var n;r=t,l.isBuffer(r)||r instanceof c||"string"==typeof t||void 0===t||e.objectMode||(n=new y("chunk",["string","Buffer","Uint8Array"],t));var r;return n}(a,t)),i)M(e,i);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),r)a.endEmitted?M(e,new S):k(e,a,t,!0);else if(a.ended)M(e,new w);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?k(e,a,t,!1):P(e,a)):k(e,a,t,!1)}else r||(a.reading=!1,P(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function k(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&O(e)),P(e,t)}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),A.prototype.destroy=g.destroy,A.prototype._undestroy=g.undestroy,A.prototype._destroy=function(e,t){t(e)},A.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=l.from(e,t),t=""),n=!0),C(this,e,t,!1,n)},A.prototype.unshift=function(e){return C(this,e,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(e){f||(f=a("28kcI").StringDecoder);var t=new f(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,r="";null!==n;)r+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==r&&this._readableState.buffer.push(r),this._readableState.length=r.length,this};var T=1073741824;function I(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=T?e=T:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,o.nextTick(R,e))}function R(e){var t=e._readableState;u("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,j(e)}function P(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(N,e,t))}function N(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(u("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}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 B(e){u("readable nexttick read 0"),e.read(0)}function D(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function F(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function z(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,o.nextTick(U,t,e))}function U(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function H(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}A.prototype.read=function(e){u("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?z(this):O(this),null;if(0===(e=I(e,t))&&t.ended)return 0===t.length&&z(this),null;var r,o=t.needReadable;return u("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&u("length less than watermark",o=!0),t.ended||t.reading?u("reading or ended",o=!1):o&&(u("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=I(n,t))),null===(r=e>0?F(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),n!==e&&t.ended&&z(this)),null!==r&&this.emit("data",r),r},A.prototype._read=function(e){M(this,new x("_read()"))},A.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,u("pipe count=%d opts=%j",r.pipesCount,t);var a=(!t||!1!==t.end)&&e!==o.stdout&&e!==o.stderr?l:g;function s(t,o){u("onunpipe"),t===n&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",m),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",s),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",f),d=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function l(){u("onend"),e.end()}r.endEmitted?o.nextTick(a):n.once("end",a),e.on("unpipe",s);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,j(e))}}(n);e.on("drain",c);var d=!1;function f(t){u("ondata");var o=e.write(t);u("dest.write",o),!1===o&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==H(r.pipes,e))&&!d&&(u("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function h(t){u("onerror",t),g(),e.removeListener("error",h),0===i(e,"error")&&M(e,t)}function p(){e.removeListener("finish",m),g()}function m(){u("onfinish"),e.removeListener("close",p),g()}function g(){u("unpipe"),n.unpipe(e)}return n.on("data",f),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",p),e.once("finish",m),e.emit("pipe",n),r.flowing||(u("pipe resume"),n.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,n={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,n)),this;if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)r[i].emit("unpipe",this,{hasUnpiped:!1});return this}var a=H(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,n)),this},A.prototype.on=function(e,t){var n=s.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,u("on readable",r.length,r.reading),r.length?O(this):r.reading||o.nextTick(B,this))),n},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var n=s.prototype.removeListener.call(this,e,t);return"readable"===e&&o.nextTick(L,this),n},A.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||o.nextTick(L,this),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,o.nextTick(D,e,t))}(this,e)),e.paused=!1,this},A.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var o in e.on("end",(function(){if(u("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){(u("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o)||(n.objectMode||o&&o.length)&&(t.push(o)||(r=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var i=0;i<_.length;i++)e.on(_[i],this.emit.bind(this,_[i]));return this._read=function(t){u("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=a("5gKYZ")),h(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),A._fromList=F,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(A.from=function(e,t){return void 0===p&&(p=a("8igDo")),p(A,e,t)})})),a.register("3oV8N",(function(e,t){"use strict";var n,r="object"==typeof Reflect?Reflect:null,o=r&&"function"==typeof r.apply?r.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};n=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}g(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,n)}(e,o,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var o,i,a,s;if(l(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=c(e))>0&&a.length>o&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=d.bind(r);return o.listener=n,r.wrapFn=o,o}function h(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):m(o,o.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)o(l,this,t);else{var c=l.length,u=m(l,c);for(n=0;n<c;++n)o(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return u(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return u(this,e,t,!0)},a.prototype.once=function(e,t){return l(t),this.on(e,f(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,f(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,o,i,a;if(l(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return h(this,e,!0)},a.prototype.rawListeners=function(e){return h(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}})),a.register("3vqBO",(function(e,t){e.exports=a("3oV8N").EventEmitter})),a.register("k9Eb1",(function(e,t){"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=a("bqBrJ").Buffer,s=a("1DJXa").inspect,l=s&&s.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,a,c;return t=e,a=[{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,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return i.alloc(0);for(var t,n,r,o=i.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=o,r=s,i.prototype.copy.call(t,n,r),s+=a.data.length,a=a.next;return o}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var o=t.data,i=e>o.length?o.length:e;if(i===o.length?r+=o:r+=o.slice(0,e),0==(e-=i)){i===o.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(i));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=i.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,a),0==(e-=a)){a===o.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return s(this,function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}],a&&o(t.prototype,a),c&&o(t,c),e}()})),a.register("6hWXN",(function(e,t){var n=a("ePtPP");function r(e,t){i(e,t),o(e)}function o(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var a=this,s=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return s||l?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(i,this,e)):n.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?a._writableState?a._writableState.errorEmitted?n.nextTick(o,a):(a._writableState.errorEmitted=!0,n.nextTick(r,a,e)):n.nextTick(r,a,e):t?(n.nextTick(o,a),t(e)):n.nextTick(o,a)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}})),a.register("56mX2",(function(e,t){"use strict";var n=a("aOgJu").codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,o){var i=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,o,r);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new n(o?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}}})),a.register("aOgJu",(function(t,n){var r;e(t.exports,"codes",(()=>r),(e=>r=e));var o={};function i(e,t,n){n||(n=Error);var r=function(e){var n,r;function o(n,r,o){return e.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,o))||this}return r=e,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,o}(n);r.prototype.name=n.name,r.prototype.code=e,o[e]=r}function a(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,o,i,s;if("string"==typeof t&&(o="not ",t.substr(!i||i<0?0:+i,o.length)===o)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(a(t,"type"));else{var l=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(a(t,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),r=o})),a.register("jqAKP",(function(e,t){var n=a("ePtPP"),r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=u;var o=a("kZTRI"),i=a("gihud");a("5jAh8")(u,o);for(var s=r(i.prototype),l=0;l<s.length;l++){var c=s[l];u.prototype[c]||(u.prototype[c]=i.prototype[c])}function u(e){if(!(this instanceof u))return new u(e);o.call(this,e),i.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",d)))}function d(){this._writableState.ended||n.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.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)}})})),a.register("gihud",(function(e,n){var r,o=a("ePtPP");function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=A,A.WritableState=E;var s={deprecate:a("aAtir")},l=a("3vqBO"),c=a("bqBrJ").Buffer,u=t.Uint8Array||function(){};var d,f=a("6hWXN"),h=a("56mX2").getHighWaterMark,p=a("aOgJu").codes,m=p.ERR_INVALID_ARG_TYPE,g=p.ERR_METHOD_NOT_IMPLEMENTED,v=p.ERR_MULTIPLE_CALLBACK,b=p.ERR_STREAM_CANNOT_PIPE,y=p.ERR_STREAM_DESTROYED,w=p.ERR_STREAM_NULL_VALUES,x=p.ERR_STREAM_WRITE_AFTER_END,S=p.ERR_UNKNOWN_ENCODING,M=f.errorOrDestroy;function _(){}function E(e,t,n){r=r||a("jqAKP"),e=e||{},"boolean"!=typeof n&&(n=t instanceof r),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if("function"!=typeof i)throw new v;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(o.nextTick(i,r),o.nextTick(R,e,t),e._writableState.errorEmitted=!0,M(e,r)):(i(r),e._writableState.errorEmitted=!0,M(e,r),R(e,t))}(e,n,r,t,i);else{var a=I(n)||e.destroyed;a||n.corked||n.bufferProcessing||!n.bufferedRequest||T(e,n),r?o.nextTick(k,e,n,a,i):k(e,n,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function A(e){var t=this instanceof(r=r||a("jqAKP"));if(!t&&!d.call(A,this))return new A(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)),l.call(this)}function C(e,t,n,r,o,i,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function k(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),R(e,t)}function T(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var s=0,l=!0;n;)o[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;o.allBuffers=l,C(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,u=n.encoding,d=n.callback;if(C(e,t,!1,t.objectMode?1:c.length,c,u,d),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function I(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final((function(n){t.pendingcb--,n&&M(e,n),t.prefinished=!0,e.emit("prefinish"),R(e,t)}))}function R(e,t){var n=I(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,o.nextTick(O,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}a("5jAh8")(A,l),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:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===A&&(e&&e._writableState instanceof E)}})):d=function(e){return e instanceof this},A.prototype.pipe=function(){M(this,new b)},A.prototype.write=function(e,t,n){var r,i=this._writableState,a=!1,s=!i.objectMode&&(r=e,c.isBuffer(r)||r instanceof u);return s&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=_),i.ending?function(e,t){var n=new x;M(e,n),o.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var i;return null===n?i=new w:"string"==typeof n||t.objectMode||(i=new m("chunk",["string","Buffer"],n)),!i||(M(e,i),o.nextTick(r,i),!1)}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,n,r,o,i){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,n));return t}(t,r,o);r!==a&&(n=!0,o="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:o,isBuf:n,callback:i,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else C(e,t,!1,s,r,o,i);return l}(this,i,s,e,t,n)),a},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||T(this,e))},A.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 S(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,n){n(new g("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,R(e,t),n&&(t.finished?o.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n),this},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._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=f.destroy,A.prototype._undestroy=f.undestroy,A.prototype._destroy=function(e,t){t(e)}})),a.register("aAtir",(function(e,n){function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}})),a.register("28kcI",(function(t,n){var r;e(t.exports,"StringDecoder",(()=>r),(e=>r=e));var o=a("8ByQm").Buffer,i=o.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(o.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=d,t=4;break;case"utf8":this.fillLast=c,t=4;break;case"base64":this.text=f,this.end=h,t=3;break;default:return this.write=p,void(this.end=m)}this.lastNeed=0,this.lastTotal=0,this.lastChar=o.allocUnsafe(t)}function l(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function c(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function d(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function f(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function m(e){return e&&e.length?this.write(e):""}r=s,s.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var o=l(t[r]);if(o>=0)return o>0&&(e.lastNeed=o-1),o;if(--r<n||-2===o)return 0;if(o=l(t[r]),o>=0)return o>0&&(e.lastNeed=o-2),o;if(--r<n||-2===o)return 0;if(o=l(t[r]),o>=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}})),a.register("8ByQm",(function(e,t){
50
+ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */var r,o;e(t.exports,"read",(()=>r),(e=>r=e)),e(t.exports,"write",(()=>o),(e=>o=e)),r=function(e,t,n,r,o){var i,a,s=8*o-r-1,l=(1<<s)-1,c=l>>1,u=-7,d=n?o-1:0,f=n?-1:1,h=e[t+d];for(d+=f,i=h&(1<<-u)-1,h>>=-u,u+=s;u>0;i=256*i+e[t+d],d+=f,u-=8);for(a=i&(1<<-u)-1,i>>=-u,u+=r;u>0;a=256*a+e[t+d],d+=f,u-=8);if(0===i)i=1-c;else{if(i===l)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,r),i-=c}return(h?-1:1)*a*Math.pow(2,i-r)},o=function(e,t,n,r,o,i){var a,s,l,c=8*i-o-1,u=(1<<c)-1,d=u>>1,f=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?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=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+d>=1?f/l:f*Math.pow(2,1-d))*l>=2&&(a++,l/=2),a+d>=u?(s=0,a=u):a+d>=1?(s=(t*l-1)*Math.pow(2,o),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[n+h]=255&s,h+=p,s/=256,o-=8);for(a=a<<o|s,c+=o;c>0;e[n+h]=255&a,h+=p,a/=256,c-=8);e[n+h-p]|=128*m}})),a.register("9gzJO",(function(e,t){var n=a("ePtPP"),r=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),n={},r=0;r<t.length;r++)n[t[r]]=Object.getOwnPropertyDescriptor(e,t[r]);return n},o=/%[sdj%]/g;e.exports.format=function(e){if(!b(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(l(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,a=String(e).replace(o,(function(e){if("%%"===e)return"%";if(n>=i)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),s=r[n];n<i;s=r[++n])g(s)||!x(s)?a+=" "+s:a+=" "+l(s);return a},e.exports.deprecate=function(t,r){if(void 0!==n&&!0===n.noDeprecation)return t;if(void 0===n)return function(){return e.exports.deprecate(t,r).apply(this,arguments)};var o=!1;return function(){if(!o){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),o=!0}return t.apply(this,arguments)}};var i={},s=/^$/;function l(t,n){var r={seen:[],stylize:u};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(n)?r.showHidden=n:n&&e.exports._extend(r,n),y(r.showHidden)&&(r.showHidden=!1),y(r.depth)&&(r.depth=2),y(r.colors)&&(r.colors=!1),y(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=c),d(r,t,r.depth)}function c(e,t){var n=l.styles[t];return n?"["+l.colors[n][0]+"m"+e+"["+l.colors[n][1]+"m":e}function u(e,t){return e}function d(t,n,r){if(t.customInspect&&n&&_(n.inspect)&&n.inspect!==e.exports.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,t);return b(o)||(o=d(t,o,r)),o}var i=function(e,t){if(y(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}if(v(t))return e.stylize(""+t,"number");if(m(t))return e.stylize(""+t,"boolean");if(g(t))return e.stylize("null","null")}(t,n);if(i)return i;var a=Object.keys(n),s=function(e){var t={};return e.forEach((function(e,n){t[e]=!0})),t}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),M(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(_(n)){var l=n.name?": "+n.name:"";return t.stylize("[Function"+l+"]","special")}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(S(n))return t.stylize(Date.prototype.toString.call(n),"date");if(M(n))return f(n)}var c,u="",x=!1,E=["{","}"];(p(n)&&(x=!0,E=["[","]"]),_(n))&&(u=" [Function"+(n.name?": "+n.name:"")+"]");return w(n)&&(u=" "+RegExp.prototype.toString.call(n)),S(n)&&(u=" "+Date.prototype.toUTCString.call(n)),M(n)&&(u=" "+f(n)),0!==a.length||x&&0!=n.length?r<0?w(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),c=x?function(e,t,n,r,o){for(var i=[],a=0,s=t.length;a<s;++a)T(t,String(a))?i.push(h(e,t,n,r,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(h(e,t,n,r,o,!0))})),i}(t,n,r,s,a):a.map((function(e){return h(t,n,r,s,e,x)})),t.seen.pop(),function(e,t,n){var r=e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);return r>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}(c,u,E)):E[0]+u+E[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function h(e,t,n,r,o,i){var a,s,l;if((l=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?s=l.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):l.set&&(s=e.stylize("[Setter]","special")),T(r,o)||(a="["+o+"]"),s||(e.seen.indexOf(l.value)<0?(s=g(n)?d(e,l.value,null):d(e,l.value,n-1)).indexOf("\n")>-1&&(s=i?s.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+s.split("\n").map((function(e){return" "+e})).join("\n")):s=e.stylize("[Circular]","special")),y(a)){if(i&&o.match(/^\d+$/))return s;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.slice(1,-1),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function g(e){return null===e}function v(e){return"number"==typeof e}function b(e){return"string"==typeof e}function y(e){return void 0===e}function w(e){return x(e)&&"[object RegExp]"===E(e)}function x(e){return"object"==typeof e&&null!==e}function S(e){return x(e)&&"[object Date]"===E(e)}function M(e){return x(e)&&("[object Error]"===E(e)||e instanceof Error)}function _(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function A(e){return e<10?"0"+e.toString(10):e.toString(10)}e.exports.debuglog=function(t){if(t=t.toUpperCase(),!i[t])if(s.test(t)){var r=n.pid;i[t]=function(){var n=e.exports.format.apply(e.exports,arguments);console.error("%s %d: %s",t,r,n)}}else i[t]=function(){};return i[t]},e.exports.inspect=l,l.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.exports.types=a("bM5Oe"),e.exports.isArray=p,e.exports.isBoolean=m,e.exports.isNull=g,e.exports.isNullOrUndefined=function(e){return null==e},e.exports.isNumber=v,e.exports.isString=b,e.exports.isSymbol=function(e){return"symbol"==typeof e},e.exports.isUndefined=y,e.exports.isRegExp=w,e.exports.types.isRegExp=w,e.exports.isObject=x,e.exports.isDate=S,e.exports.types.isDate=S,e.exports.isError=M,e.exports.types.isNativeError=M,e.exports.isFunction=_,e.exports.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},e.exports.isBuffer=a("jPRhY");var C=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(){var e=new Date,t=[A(e.getHours()),A(e.getMinutes()),A(e.getSeconds())].join(":");return[e.getDate(),C[e.getMonth()],t].join(" ")}function T(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports.log=function(){console.log("%s - %s",k(),e.exports.format.apply(e.exports,arguments))},e.exports.inherits=a("5jAh8"),e.exports._extend=function(e,t){if(!t||!x(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e};var I="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function O(e,t){if(!e){var n=new Error("Promise was rejected with a falsy value");n.reason=e,e=n}return t(e)}e.exports.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(I&&e[I]){var t;if("function"!=typeof(t=e[I]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,I,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,n,r=new Promise((function(e,r){t=e,n=r})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(e,r){e?n(e):t(r)}));try{e.apply(this,o)}catch(e){n(e)}return r}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),I&&Object.defineProperty(t,I,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,r(e))},e.exports.promisify.custom=I,e.exports.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var o=t.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};e.apply(this,t).then((function(e){n.nextTick(a.bind(null,null,e))}),(function(e){n.nextTick(O.bind(null,e,a))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,r(e)),t}})),a.register("ePtPP",(function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,c=[],u=!1,d=-1;function f(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&h())}function h(){if(!u){var e=s(f);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d<t;)l&&l[d].run();d=-1,t=c.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||u||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}})),a.register("bM5Oe",(function(e,t){"use strict";var n=a("3vY4Y"),r=a("jgq2W"),o=a("8yoeR"),i=a("doLxT");function s(e){return e.call.bind(e)}var l="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,u=s(Object.prototype.toString),d=s(Number.prototype.valueOf),f=s(String.prototype.valueOf),h=s(Boolean.prototype.valueOf);if(l)var p=s(BigInt.prototype.valueOf);if(c)var m=s(Symbol.prototype.valueOf);function g(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function v(e){return"[object Map]"===u(e)}function b(e){return"[object Set]"===u(e)}function y(e){return"[object WeakMap]"===u(e)}function w(e){return"[object WeakSet]"===u(e)}function x(e){return"[object ArrayBuffer]"===u(e)}function S(e){return"undefined"!=typeof ArrayBuffer&&(x.working?x(e):e instanceof ArrayBuffer)}function M(e){return"[object DataView]"===u(e)}function _(e){return"undefined"!=typeof DataView&&(M.working?M(e):e instanceof DataView)}e.exports.isArgumentsObject=n,e.exports.isGeneratorFunction=r,e.exports.isTypedArray=i,e.exports.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},e.exports.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):i(e)||_(e)},e.exports.isUint8Array=function(e){return"Uint8Array"===o(e)},e.exports.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===o(e)},e.exports.isUint16Array=function(e){return"Uint16Array"===o(e)},e.exports.isUint32Array=function(e){return"Uint32Array"===o(e)},e.exports.isInt8Array=function(e){return"Int8Array"===o(e)},e.exports.isInt16Array=function(e){return"Int16Array"===o(e)},e.exports.isInt32Array=function(e){return"Int32Array"===o(e)},e.exports.isFloat32Array=function(e){return"Float32Array"===o(e)},e.exports.isFloat64Array=function(e){return"Float64Array"===o(e)},e.exports.isBigInt64Array=function(e){return"BigInt64Array"===o(e)},e.exports.isBigUint64Array=function(e){return"BigUint64Array"===o(e)},v.working="undefined"!=typeof Map&&v(new Map),e.exports.isMap=function(e){return"undefined"!=typeof Map&&(v.working?v(e):e instanceof Map)},b.working="undefined"!=typeof Set&&b(new Set),e.exports.isSet=function(e){return"undefined"!=typeof Set&&(b.working?b(e):e instanceof Set)},y.working="undefined"!=typeof WeakMap&&y(new WeakMap),e.exports.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(y.working?y(e):e instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),e.exports.isWeakSet=function(e){return w(e)},x.working="undefined"!=typeof ArrayBuffer&&x(new ArrayBuffer),e.exports.isArrayBuffer=S,M.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&M(new DataView(new ArrayBuffer(1),0,1)),e.exports.isDataView=_;var E="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function A(e){return"[object SharedArrayBuffer]"===u(e)}function C(e){return void 0!==E&&(void 0===A.working&&(A.working=A(new E)),A.working?A(e):e instanceof E)}function k(e){return g(e,d)}function T(e){return g(e,f)}function I(e){return g(e,h)}function O(e){return l&&g(e,p)}function R(e){return c&&g(e,m)}e.exports.isSharedArrayBuffer=C,e.exports.isAsyncFunction=function(e){return"[object AsyncFunction]"===u(e)},e.exports.isMapIterator=function(e){return"[object Map Iterator]"===u(e)},e.exports.isSetIterator=function(e){return"[object Set Iterator]"===u(e)},e.exports.isGeneratorObject=function(e){return"[object Generator]"===u(e)},e.exports.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===u(e)},e.exports.isNumberObject=k,e.exports.isStringObject=T,e.exports.isBooleanObject=I,e.exports.isBigIntObject=O,e.exports.isSymbolObject=R,e.exports.isBoxedPrimitive=function(e){return k(e)||T(e)||I(e)||O(e)||R(e)},e.exports.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(S(e)||C(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e.exports,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))})),a.register("3vY4Y",(function(e,t){"use strict";var n=a("gp4q4")(),r=a("6pFFa")("Object.prototype.toString"),o=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===r(e)},i=function(e){return!!o(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==r(e)&&"[object Function]"===r(e.callee)},s=function(){return o(arguments)}();o.isLegacyArguments=i,e.exports=s?o:i})),a.register("gp4q4",(function(e,t){"use strict";var n=a("fPlzF");e.exports=function(){return n()&&!!Symbol.toStringTag}})),a.register("fPlzF",(function(e,t){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}})),a.register("6pFFa",(function(e,t){"use strict";var n=a("3kYrO"),r=a("1Mwz1"),o=r(n("String.prototype.indexOf"));e.exports=function(e,t){var i=n(e,!!t);return"function"==typeof i&&o(e,".prototype.")>-1?r(i):i}})),a.register("3kYrO",(function(e,t){"use strict";var n,r=SyntaxError,o=Function,i=TypeError,s=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(e){l=null}var c=function(){throw new i},u=l?function(){try{return c}catch(e){try{return l(arguments,"callee").get}catch(e){return c}}}():c,d=a("l5rv7")(),f=Object.getPrototypeOf||function(e){return e.__proto__},h={},p="undefined"==typeof Uint8Array?n:f(Uint8Array),m={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":d?f([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":h,"%AsyncGenerator%":h,"%AsyncGeneratorFunction%":h,"%AsyncIteratorPrototype%":h,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":h,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d?f(f([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&d?f((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&d?f((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":d?f(""[Symbol.iterator]()):n,"%Symbol%":d?Symbol:n,"%SyntaxError%":r,"%ThrowTypeError%":u,"%TypedArray%":p,"%TypeError%":i,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},g=function e(t){var n;if("%AsyncFunction%"===t)n=s("async function () {}");else if("%GeneratorFunction%"===t)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=s("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(n=f(o.prototype))}return m[t]=n,n},v={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=a("2JiOr"),y=a("c5f2w"),w=b.call(Function.call,Array.prototype.concat),x=b.call(Function.apply,Array.prototype.splice),S=b.call(Function.call,String.prototype.replace),M=b.call(Function.call,String.prototype.slice),_=b.call(Function.call,RegExp.prototype.exec),E=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,C=function(e){var t=M(e,0,1),n=M(e,-1);if("%"===t&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new r("invalid intrinsic syntax, expected opening `%`");var o=[];return S(e,E,(function(e,t,n,r){o[o.length]=n?S(r,A,"$1"):t||e})),o},k=function(e,t){var n,o=e;if(y(v,o)&&(o="%"+(n=v[o])[0]+"%"),y(m,o)){var a=m[o];if(a===h&&(a=g(o)),void 0===a&&!t)throw new i("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:o,value:a}}throw new r("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new i('"allowMissing" argument must be a boolean');if(null===_(/^%?[^%]*%?$/,e))throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=C(e),o=n.length>0?n[0]:"",a=k("%"+o+"%",t),s=a.name,c=a.value,u=!1,d=a.alias;d&&(o=d[0],x(n,w([0,1],d)));for(var f=1,h=!0;f<n.length;f+=1){var p=n[f],g=M(p,0,1),v=M(p,-1);if(('"'===g||"'"===g||"`"===g||'"'===v||"'"===v||"`"===v)&&g!==v)throw new r("property names with quotes must have matching quotes");if("constructor"!==p&&h||(u=!0),y(m,s="%"+(o+="."+p)+"%"))c=m[s];else if(null!=c){if(!(p in c)){if(!t)throw new i("base intrinsic for "+e+" exists, but the property is not available.");return}if(l&&f+1>=n.length){var b=l(c,p);c=(h=!!b)&&"get"in b&&!("originalValue"in b.get)?b.get:c[p]}else h=y(c,p),c=c[p];h&&!u&&(m[s]=c)}}return c}})),a.register("l5rv7",(function(e,t){"use strict";var n="undefined"!=typeof Symbol&&Symbol,r=a("fPlzF");e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&r())))}})),a.register("2JiOr",(function(e,t){"use strict";var n=a("5DpJt");e.exports=Function.prototype.bind||n})),a.register("5DpJt",(function(e,t){"use strict";var n="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,o=Object.prototype.toString,i="[object Function]";e.exports=function(e){var t=this;if("function"!=typeof t||o.call(t)!==i)throw new TypeError(n+t);for(var a,s=r.call(arguments,1),l=function(){if(this instanceof a){var n=t.apply(this,s.concat(r.call(arguments)));return Object(n)===n?n:this}return t.apply(e,s.concat(r.call(arguments)))},c=Math.max(0,t.length-s.length),u=[],d=0;d<c;d++)u.push("$"+d);if(a=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")(l),t.prototype){var f=function(){};f.prototype=t.prototype,a.prototype=new f,f.prototype=null}return a}})),a.register("c5f2w",(function(e,t){"use strict";var n=a("2JiOr");e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)})),a.register("1Mwz1",(function(e,t){"use strict";var n=a("2JiOr"),r=a("3kYrO"),o=r("%Function.prototype.apply%"),i=r("%Function.prototype.call%"),s=r("%Reflect.apply%",!0)||n.call(i,o),l=r("%Object.getOwnPropertyDescriptor%",!0),c=r("%Object.defineProperty%",!0),u=r("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=s(n,i,arguments);if(l&&c){var r=l(t,"length");r.configurable&&c(t,"length",{value:1+u(0,e.length-(arguments.length-1))})}return t};var d=function(){return s(n,o,arguments)};c?c(e.exports,"apply",{value:d}):e.exports.apply=d})),a.register("jgq2W",(function(e,t){"use strict";var n,r=Object.prototype.toString,o=Function.prototype.toString,i=/^\s*(?:function)?\*/,s=a("gp4q4")(),l=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(i.test(o.call(e)))return!0;if(!s)return"[object GeneratorFunction]"===r.call(e);if(!l)return!1;if(void 0===n){var t=function(){if(!s)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&l(t)}return l(e)===n}})),a.register("8yoeR",(function(e,n){"use strict";var r=a("kz55o"),o=a("5gqKI"),i=a("6pFFa"),s=a("8WWik"),l=i("Object.prototype.toString"),c=a("gp4q4")(),u="undefined"==typeof globalThis?t:globalThis,d=o(),f=i("String.prototype.slice"),h={},p=Object.getPrototypeOf;c&&s&&p&&r(d,(function(e){if("function"==typeof u[e]){var t=new u[e];if(Symbol.toStringTag in t){var n=p(t),r=s(n,Symbol.toStringTag);if(!r){var o=p(n);r=s(o,Symbol.toStringTag)}h[e]=r.get}}}));var m=a("doLxT");e.exports=function(e){return!!m(e)&&(c&&Symbol.toStringTag in e?function(e){var t=!1;return r(h,(function(n,r){if(!t)try{var o=n.call(e);o===r&&(t=o)}catch(e){}})),t}(e):f(l(e),8,-1))}})),a.register("kz55o",(function(e,t){"use strict";var n=a("4Z0y4"),r=Object.prototype.toString,o=Object.prototype.hasOwnProperty,i=function(e,t,n){for(var r=0,i=e.length;r<i;r++)o.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))},s=function(e,t,n){for(var r=0,o=e.length;r<o;r++)null==n?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)},l=function(e,t,n){for(var r in e)o.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))};e.exports=function(e,t,o){if(!n(t))throw new TypeError("iterator must be a function");var a;arguments.length>=3&&(a=o),"[object Array]"===r.call(e)?i(e,t,a):"string"==typeof e?s(e,t,a):l(e,t,a)}})),a.register("4Z0y4",(function(e,t){"use strict";var n,r,o=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{n=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i((function(){throw 42}),null,n)}catch(e){e!==r&&(i=null)}else i=null;var a=/^\s*class\b/,s=function(e){try{var t=o.call(e);return a.test(t)}catch(e){return!1}},l=function(e){try{return!s(e)&&(o.call(e),!0)}catch(e){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,d=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var h=document.all;c.call(h)===c.call(document.all)&&(f=function(e){if((d||!e)&&(void 0===e||"object"==typeof e))try{var t=c.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=i?function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{i(e,null,n)}catch(e){if(e!==r)return!1}return!s(e)&&l(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(u)return l(e);if(s(e))return!1;var t=c.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&l(e)}})),a.register("5gqKI",(function(e,n){"use strict";var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],o="undefined"==typeof globalThis?t:globalThis;e.exports=function(){for(var e=[],t=0;t<r.length;t++)"function"==typeof o[r[t]]&&(e[e.length]=r[t]);return e}})),a.register("8WWik",(function(e,t){"use strict";var n=a("3kYrO")("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n})),a.register("doLxT",(function(e,n){"use strict";var r=a("kz55o"),o=a("5gqKI"),i=a("6pFFa"),s=i("Object.prototype.toString"),l=a("gp4q4")(),c=a("8WWik"),u="undefined"==typeof globalThis?t:globalThis,d=o(),f=i("Array.prototype.indexOf",!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},h=i("String.prototype.slice"),p={},m=Object.getPrototypeOf;l&&c&&m&&r(d,(function(e){var t=new u[e];if(Symbol.toStringTag in t){var n=m(t),r=c(n,Symbol.toStringTag);if(!r){var o=m(n);r=c(o,Symbol.toStringTag)}p[e]=r.get}}));e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!l||!(Symbol.toStringTag in e)){var t=h(s(e),8,-1);return f(d,t)>-1}return!!c&&function(e){var t=!1;return r(p,(function(n,r){if(!t)try{t=n.call(e)===r}catch(e){}})),t}(e)}})),a.register("jPRhY",(function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}})),a.register("5jAh8",(function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}})),a.register("fnFC9",(function(e,n){var r=a("fB4ch"),o=a("9QxiN"),i=a("iCrCa"),s=a("7X2JB"),l=a("8iXHm"),c=e.exports;c.request=function(e,n){e="string"==typeof e?l.parse(e):i(e);var o=-1===t.location.protocol.search(/^https?:$/)?"http:":"",a=e.protocol||o,s=e.hostname||e.host,c=e.port,u=e.path||"/";s&&-1!==s.indexOf(":")&&(s="["+s+"]"),e.url=(s?a+"//"+s:"")+(c?":"+c:"")+u,e.method=(e.method||"GET").toUpperCase(),e.headers=e.headers||{};var d=new r(e);return n&&d.on("response",n),d},c.get=function(e,t){var n=c.request(e,t);return n.end(),n},c.ClientRequest=r,c.IncomingMessage=o.IncomingMessage,c.Agent=function(){},c.Agent.defaultMaxSockets=4,c.globalAgent=new c.Agent,c.STATUS_CODES=s,c.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]})),a.register("fB4ch",(function(e,n){var r=a("bqBrJ").Buffer,o=a("ePtPP"),i=a("7lggT"),s=a("5jAh8"),l=a("9QxiN"),c=a("8IqCp"),u=l.IncomingMessage,d=l.readyStates;var f=e.exports=function(e){var t,n=this;c.Writable.call(n),n._opts=e,n._body=[],n._headers={},e.auth&&n.setHeader("Authorization","Basic "+r.from(e.auth).toString("base64")),Object.keys(e.headers).forEach((function(t){n.setHeader(t,e.headers[t])}));var o=!0;if("disable-fetch"===e.mode||"requestTimeout"in e&&!i.abortController)o=!1,t=!0;else if("prefer-streaming"===e.mode)t=!1;else if("allow-wrong-content-type"===e.mode)t=!i.overrideMimeType;else{if(e.mode&&"default"!==e.mode&&"prefer-fast"!==e.mode)throw new Error("Invalid value for opts.mode");t=!0}n._mode=function(e,t){return i.fetch&&t?"fetch":i.mozchunkedarraybuffer?"moz-chunked-arraybuffer":i.msstream?"ms-stream":i.arraybuffer&&e?"arraybuffer":"text"}(t,o),n._fetchTimer=null,n._socketTimeout=null,n._socketTimer=null,n.on("finish",(function(){n._onFinish()}))};s(f,c.Writable),f.prototype.setHeader=function(e,t){var n=e.toLowerCase();-1===h.indexOf(n)&&(this._headers[n]={name:e,value:t})},f.prototype.getHeader=function(e){var t=this._headers[e.toLowerCase()];return t?t.value:null},f.prototype.removeHeader=function(e){delete this._headers[e.toLowerCase()]},f.prototype._onFinish=function(){var e=this;if(!e._destroyed){var n=e._opts;"timeout"in n&&0!==n.timeout&&e.setTimeout(n.timeout);var r=e._headers,a=null;"GET"!==n.method&&"HEAD"!==n.method&&(a=new Blob(e._body,{type:(r["content-type"]||{}).value||""}));var s=[];if(Object.keys(r).forEach((function(e){var t=r[e].name,n=r[e].value;Array.isArray(n)?n.forEach((function(e){s.push([t,e])})):s.push([t,n])})),"fetch"===e._mode){var l=null;if(i.abortController){var c=new AbortController;l=c.signal,e._fetchAbortController=c,"requestTimeout"in n&&0!==n.requestTimeout&&(e._fetchTimer=t.setTimeout((function(){e.emit("requestTimeout"),e._fetchAbortController&&e._fetchAbortController.abort()}),n.requestTimeout))}t.fetch(e._opts.url,{method:e._opts.method,headers:s,body:a||void 0,mode:"cors",credentials:n.withCredentials?"include":"same-origin",signal:l}).then((function(t){e._fetchResponse=t,e._resetTimers(!1),e._connect()}),(function(t){e._resetTimers(!0),e._destroyed||e.emit("error",t)}))}else{var u=e._xhr=new t.XMLHttpRequest;try{u.open(e._opts.method,e._opts.url,!0)}catch(t){return void o.nextTick((function(){e.emit("error",t)}))}"responseType"in u&&(u.responseType=e._mode),"withCredentials"in u&&(u.withCredentials=!!n.withCredentials),"text"===e._mode&&"overrideMimeType"in u&&u.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in n&&(u.timeout=n.requestTimeout,u.ontimeout=function(){e.emit("requestTimeout")}),s.forEach((function(e){u.setRequestHeader(e[0],e[1])})),e._response=null,u.onreadystatechange=function(){switch(u.readyState){case d.LOADING:case d.DONE:e._onXHRProgress()}},"moz-chunked-arraybuffer"===e._mode&&(u.onprogress=function(){e._onXHRProgress()}),u.onerror=function(){e._destroyed||(e._resetTimers(!0),e.emit("error",new Error("XHR error")))};try{u.send(a)}catch(t){return void o.nextTick((function(){e.emit("error",t)}))}}}},f.prototype._onXHRProgress=function(){var e=this;e._resetTimers(!1),function(e){try{var t=e.status;return null!==t&&0!==t}catch(e){return!1}}(e._xhr)&&!e._destroyed&&(e._response||e._connect(),e._response._onXHRProgress(e._resetTimers.bind(e)))},f.prototype._connect=function(){var e=this;e._destroyed||(e._response=new u(e._xhr,e._fetchResponse,e._mode,e._resetTimers.bind(e)),e._response.on("error",(function(t){e.emit("error",t)})),e.emit("response",e._response))},f.prototype._write=function(e,t,n){this._body.push(e),n()},f.prototype._resetTimers=function(e){var n=this;t.clearTimeout(n._socketTimer),n._socketTimer=null,e?(t.clearTimeout(n._fetchTimer),n._fetchTimer=null):n._socketTimeout&&(n._socketTimer=t.setTimeout((function(){n.emit("timeout")}),n._socketTimeout))},f.prototype.abort=f.prototype.destroy=function(e){var t=this;t._destroyed=!0,t._resetTimers(!0),t._response&&(t._response._destroyed=!0),t._xhr?t._xhr.abort():t._fetchAbortController&&t._fetchAbortController.abort(),e&&t.emit("error",e)},f.prototype.end=function(e,t,n){"function"==typeof e&&(n=e,e=void 0),c.Writable.prototype.end.call(this,e,t,n)},f.prototype.setTimeout=function(e,t){var n=this;t&&n.once("timeout",t),n._socketTimeout=e,n._resetTimers(!1)},f.prototype.flushHeaders=function(){},f.prototype.setNoDelay=function(){},f.prototype.setSocketKeepAlive=function(){};var h=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","via"]})),a.register("7lggT",(function(n,r){var o,i,a,s,l,c,u,d;function f(){if(void 0!==d)return d;if(t.XMLHttpRequest){d=new t.XMLHttpRequest;try{d.open("GET",t.XDomainRequest?"/":"https://example.com")}catch(e){d=null}}else d=null;return d}function h(e){var t=f();if(!t)return!1;try{return t.responseType=e,t.responseType===e}catch(e){}return!1}function p(e){return"function"==typeof e}e(n.exports,"fetch",(()=>o),(e=>o=e)),e(n.exports,"writableStream",(()=>i),(e=>i=e)),e(n.exports,"abortController",(()=>a),(e=>a=e)),e(n.exports,"arraybuffer",(()=>s),(e=>s=e)),e(n.exports,"msstream",(()=>l),(e=>l=e)),e(n.exports,"mozchunkedarraybuffer",(()=>c),(e=>c=e)),e(n.exports,"overrideMimeType",(()=>u),(e=>u=e)),o=p(t.fetch)&&p(t.ReadableStream),i=p(t.WritableStream),a=p(t.AbortController),s=o||h("arraybuffer"),l=!o&&h("ms-stream"),c=!o&&h("moz-chunked-arraybuffer"),u=o||!!f()&&p(f().overrideMimeType),d=null})),a.register("9QxiN",(function(n,r){var o,i;e(n.exports,"readyStates",(()=>o),(e=>o=e)),e(n.exports,"IncomingMessage",(()=>i),(e=>i=e));var s=a("bqBrJ").Buffer,l=a("ePtPP"),c=a("7lggT"),u=a("5jAh8"),d=a("8IqCp"),f=o={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},h=i=function(e,t,n,r){var o=this;if(d.Readable.call(o),o._mode=n,o.headers={},o.rawHeaders=[],o.trailers={},o.rawTrailers=[],o.on("end",(function(){l.nextTick((function(){o.emit("close")}))})),"fetch"===n){if(o._fetchResponse=t,o.url=t.url,o.statusCode=t.status,o.statusMessage=t.statusText,t.headers.forEach((function(e,t){o.headers[t.toLowerCase()]=e,o.rawHeaders.push(t,e)})),c.writableStream){var i=new WritableStream({write:function(e){return r(!1),new Promise((function(t,n){o._destroyed?n():o.push(s.from(e))?t():o._resumeFetch=t}))},close:function(){r(!0),o._destroyed||o.push(null)},abort:function(e){r(!0),o._destroyed||o.emit("error",e)}});try{return void t.body.pipeTo(i).catch((function(e){r(!0),o._destroyed||o.emit("error",e)}))}catch(e){}}var a=t.body.getReader();!function e(){a.read().then((function(t){o._destroyed||(r(t.done),t.done?o.push(null):(o.push(s.from(t.value)),e()))})).catch((function(e){r(!0),o._destroyed||o.emit("error",e)}))}()}else{if(o._xhr=e,o._pos=0,o.url=e.responseURL,o.statusCode=e.status,o.statusMessage=e.statusText,e.getAllResponseHeaders().split(/\r?\n/).forEach((function(e){var t=e.match(/^([^:]+):\s*(.*)/);if(t){var n=t[1].toLowerCase();"set-cookie"===n?(void 0===o.headers[n]&&(o.headers[n]=[]),o.headers[n].push(t[2])):void 0!==o.headers[n]?o.headers[n]+=", "+t[2]:o.headers[n]=t[2],o.rawHeaders.push(t[1],t[2])}})),o._charset="x-user-defined",!c.overrideMimeType){var u=o.rawHeaders["mime-type"];if(u){var f=u.match(/;\s*charset=([^;])(;|$)/);f&&(o._charset=f[1].toLowerCase())}o._charset||(o._charset="utf-8")}}};u(h,d.Readable),h.prototype._read=function(){var e=this._resumeFetch;e&&(this._resumeFetch=null,e())},h.prototype._onXHRProgress=function(e){var n=this,r=n._xhr,o=null;switch(n._mode){case"text":if((o=r.responseText).length>n._pos){var i=o.substr(n._pos);if("x-user-defined"===n._charset){for(var a=s.alloc(i.length),l=0;l<i.length;l++)a[l]=255&i.charCodeAt(l);n.push(a)}else n.push(i,n._charset);n._pos=o.length}break;case"arraybuffer":if(r.readyState!==f.DONE||!r.response)break;o=r.response,n.push(s.from(new Uint8Array(o)));break;case"moz-chunked-arraybuffer":if(o=r.response,r.readyState!==f.LOADING||!o)break;n.push(s.from(new Uint8Array(o)));break;case"ms-stream":if(o=r.response,r.readyState!==f.LOADING)break;var c=new t.MSStreamReader;c.onprogress=function(){c.result.byteLength>n._pos&&(n.push(s.from(new Uint8Array(c.result.slice(n._pos)))),n._pos=c.result.byteLength)},c.onload=function(){e(!0),n.push(null)},c.readAsArrayBuffer(o)}n._xhr.readyState===f.DONE&&"ms-stream"!==n._mode&&(e(!0),n.push(null))}})),a.register("8IqCp",(function(e,t){(t=e.exports=a("kZTRI")).Stream=t,t.Readable=t,t.Writable=a("gihud"),t.Duplex=a("jqAKP"),t.Transform=a("erC5i"),t.PassThrough=a("3dCe5"),t.finished=a("j5ZwK"),t.pipeline=a("azGNy")})),a.register("kZTRI",(function(e,n){var r,o=a("ePtPP");e.exports=A,A.ReadableState=E;a("3oV8N").EventEmitter;var i=function(e,t){return e.listeners(t).length},s=a("3vqBO"),l=a("bqBrJ").Buffer,c=t.Uint8Array||function(){};var u,d=a("1DJXa");u=d&&d.debuglog?d.debuglog("stream"):function(){};var f,h,p,m=a("k9Eb1"),g=a("6hWXN"),v=a("56mX2").getHighWaterMark,b=a("aOgJu").codes,y=b.ERR_INVALID_ARG_TYPE,w=b.ERR_STREAM_PUSH_AFTER_EOF,x=b.ERR_METHOD_NOT_IMPLEMENTED,S=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;a("5jAh8")(A,s);var M=g.errorOrDestroy,_=["error","close","destroy","pause","resume"];function E(e,t,n){r=r||a("jqAKP"),e=e||{},"boolean"!=typeof n&&(n=t instanceof r),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=v(this,e,"readableHighWaterMark",n),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=a("28kcI").StringDecoder),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function A(e){if(r=r||a("jqAKP"),!(this instanceof A))return new A(e);var t=this instanceof r;this._readableState=new E(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function C(e,t,n,r,o){u("readableAddChunk",t);var i,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(u("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?O(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,R(e)))}(e,a);else if(o||(i=function(e,t){var n;r=t,l.isBuffer(r)||r instanceof c||"string"==typeof t||void 0===t||e.objectMode||(n=new y("chunk",["string","Buffer","Uint8Array"],t));var r;return n}(a,t)),i)M(e,i);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===l.prototype||(t=function(e){return l.from(e)}(t)),r)a.endEmitted?M(e,new S):k(e,a,t,!0);else if(a.ended)M(e,new w);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!n?(t=a.decoder.write(t),a.objectMode||0!==t.length?k(e,a,t,!1):P(e,a)):k(e,a,t,!1)}else r||(a.reading=!1,P(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function k(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&O(e)),P(e,t)}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),A.prototype.destroy=g.destroy,A.prototype._undestroy=g.undestroy,A.prototype._destroy=function(e,t){t(e)},A.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=l.from(e,t),t=""),n=!0),C(this,e,t,!1,n)},A.prototype.unshift=function(e){return C(this,e,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(e){f||(f=a("28kcI").StringDecoder);var t=new f(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,r="";null!==n;)r+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==r&&this._readableState.buffer.push(r),this._readableState.length=r.length,this};var T=1073741824;function I(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=T?e=T:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function O(e){var t=e._readableState;u("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(u("emitReadable",t.flowing),t.emittedReadable=!0,o.nextTick(R,e))}function R(e){var t=e._readableState;u("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,j(e)}function P(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(N,e,t))}function N(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(u("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}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 B(e){u("readable nexttick read 0"),e.read(0)}function D(e,t){u("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(u("flow",t.flowing);t.flowing&&null!==e.read(););}function F(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function z(e){var t=e._readableState;u("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,o.nextTick(U,t,e))}function U(e,t){if(u("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function H(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}A.prototype.read=function(e){u("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return u("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?z(this):O(this),null;if(0===(e=I(e,t))&&t.ended)return 0===t.length&&z(this),null;var r,o=t.needReadable;return u("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&u("length less than watermark",o=!0),t.ended||t.reading?u("reading or ended",o=!1):o&&(u("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=I(n,t))),null===(r=e>0?F(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),n!==e&&t.ended&&z(this)),null!==r&&this.emit("data",r),r},A.prototype._read=function(e){M(this,new x("_read()"))},A.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,u("pipe count=%d opts=%j",r.pipesCount,t);var a=(!t||!1!==t.end)&&e!==o.stdout&&e!==o.stderr?l:g;function s(t,o){u("onunpipe"),t===n&&o&&!1===o.hasUnpiped&&(o.hasUnpiped=!0,u("cleanup"),e.removeListener("close",p),e.removeListener("finish",m),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",s),n.removeListener("end",l),n.removeListener("end",g),n.removeListener("data",f),d=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}function l(){u("onend"),e.end()}r.endEmitted?o.nextTick(a):n.once("end",a),e.on("unpipe",s);var c=function(e){return function(){var t=e._readableState;u("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,j(e))}}(n);e.on("drain",c);var d=!1;function f(t){u("ondata");var o=e.write(t);u("dest.write",o),!1===o&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==H(r.pipes,e))&&!d&&(u("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function h(t){u("onerror",t),g(),e.removeListener("error",h),0===i(e,"error")&&M(e,t)}function p(){e.removeListener("finish",m),g()}function m(){u("onfinish"),e.removeListener("close",p),g()}function g(){u("unpipe"),n.unpipe(e)}return n.on("data",f),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",p),e.once("finish",m),e.emit("pipe",n),r.flowing||(u("pipe resume"),n.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,n={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,n)),this;if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)r[i].emit("unpipe",this,{hasUnpiped:!1});return this}var a=H(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,n)),this},A.prototype.on=function(e,t){var n=s.prototype.on.call(this,e,t),r=this._readableState;return"data"===e?(r.readableListening=this.listenerCount("readable")>0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,u("on readable",r.length,r.reading),r.length?O(this):r.reading||o.nextTick(B,this))),n},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var n=s.prototype.removeListener.call(this,e,t);return"readable"===e&&o.nextTick(L,this),n},A.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||o.nextTick(L,this),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(u("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,o.nextTick(D,e,t))}(this,e)),e.paused=!1,this},A.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var o in e.on("end",(function(){if(u("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){(u("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o)||(n.objectMode||o&&o.length)&&(t.push(o)||(r=!0,e.pause()))})),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var i=0;i<_.length;i++)e.on(_[i],this.emit.bind(this,_[i]));return this._read=function(t){u("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=a("5gKYZ")),h(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),A._fromList=F,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(A.from=function(e,t){return void 0===p&&(p=a("8igDo")),p(A,e,t)})})),a.register("3oV8N",(function(e,t){"use strict";var n,r="object"==typeof Reflect?Reflect:null,o=r&&"function"==typeof r.apply?r.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};n=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function a(){a.init.call(this)}e.exports=a,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}g(e,t,i,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&g(e,"error",t,n)}(e,o,{once:!0})}))},a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function l(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?a.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var o,i,a,s;if(l(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),a=i[t]),void 0===a)a=i[t]=n,++e._eventsCount;else if("function"==typeof a?a=i[t]=r?[n,a]:[a,n]:r?a.unshift(n):a.push(n),(o=c(e))>0&&a.length>o&&!a.warned){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=e,u.type=t,u.count=a.length,s=u,console&&console.warn&&console.warn(s)}return e}function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=d.bind(r);return o.listener=n,r.wrapFn=o,o}function h(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(o):m(o,o.length)}function p(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function m(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function g(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(i){r.once&&e.removeEventListener(t,o),n(i)}))}}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),a.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},a.prototype.getMaxListeners=function(){return c(this)},a.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,i=this._events;if(void 0!==i)r=r&&void 0===i.error;else if(!r)return!1;if(r){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var l=i[e];if(void 0===l)return!1;if("function"==typeof l)o(l,this,t);else{var c=l.length,u=m(l,c);for(n=0;n<c;++n)o(u[n],this,t)}return!0},a.prototype.addListener=function(e,t){return u(this,e,t,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(e,t){return u(this,e,t,!0)},a.prototype.once=function(e,t){return l(t),this.on(e,f(this,e,t)),this},a.prototype.prependOnceListener=function(e,t){return l(t),this.prependListener(e,f(this,e,t)),this},a.prototype.removeListener=function(e,t){var n,r,o,i,a;if(l(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){a=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,a||t)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(o=i[r])&&this.removeAllListeners(o);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},a.prototype.listeners=function(e){return h(this,e,!0)},a.prototype.rawListeners=function(e){return h(this,e,!1)},a.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},a.prototype.listenerCount=p,a.prototype.eventNames=function(){return this._eventsCount>0?n(this._events):[]}})),a.register("3vqBO",(function(e,t){e.exports=a("3oV8N").EventEmitter})),a.register("k9Eb1",(function(e,t){"use strict";function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=a("bqBrJ").Buffer,s=a("1DJXa").inspect,l=s&&s.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,a,c;return t=e,a=[{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,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return i.alloc(0);for(var t,n,r,o=i.allocUnsafe(e>>>0),a=this.head,s=0;a;)t=a.data,n=o,r=s,i.prototype.copy.call(t,n,r),s+=a.data.length,a=a.next;return o}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var o=t.data,i=e>o.length?o.length:e;if(i===o.length?r+=o:r+=o.slice(0,e),0==(e-=i)){i===o.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(i));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=i.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,a),0==(e-=a)){a===o.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(a));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return s(this,function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}],a&&o(t.prototype,a),c&&o(t,c),e}()})),a.register("6hWXN",(function(e,t){var n=a("ePtPP");function r(e,t){i(e,t),o(e)}function o(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var a=this,s=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return s||l?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(i,this,e)):n.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?a._writableState?a._writableState.errorEmitted?n.nextTick(o,a):(a._writableState.errorEmitted=!0,n.nextTick(r,a,e)):n.nextTick(r,a,e):t?(n.nextTick(o,a),t(e)):n.nextTick(o,a)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}})),a.register("56mX2",(function(e,t){"use strict";var n=a("aOgJu").codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,o){var i=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,o,r);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new n(o?r:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}}})),a.register("aOgJu",(function(t,n){var r;e(t.exports,"codes",(()=>r),(e=>r=e));var o={};function i(e,t,n){n||(n=Error);var r=function(e){var n,r;function o(n,r,o){return e.call(this,function(e,n,r){return"string"==typeof t?t:t(e,n,r)}(n,r,o))||this}return r=e,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,o}(n);r.prototype.name=n.name,r.prototype.code=e,o[e]=r}function a(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(e){return String(e)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}i("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),i("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,o,i,s;if("string"==typeof t&&(o="not ",t.substr(!i||i<0?0:+i,o.length)===o)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))s="The ".concat(e," ").concat(r," ").concat(a(t,"type"));else{var l=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";s='The "'.concat(e,'" ').concat(l," ").concat(r," ").concat(a(t,"type"))}return s+=". Received type ".concat(typeof n)}),TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),r=o})),a.register("jqAKP",(function(e,t){var n=a("ePtPP"),r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=u;var o=a("kZTRI"),i=a("gihud");a("5jAh8")(u,o);for(var s=r(i.prototype),l=0;l<s.length;l++){var c=s[l];u.prototype[c]||(u.prototype[c]=i.prototype[c])}function u(e){if(!(this instanceof u))return new u(e);o.call(this,e),i.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",d)))}function d(){this._writableState.ended||n.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(u.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(u.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(u.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(u.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)}})})),a.register("gihud",(function(e,n){var r,o=a("ePtPP");function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=A,A.WritableState=E;var s={deprecate:a("aAtir")},l=a("3vqBO"),c=a("bqBrJ").Buffer,u=t.Uint8Array||function(){};var d,f=a("6hWXN"),h=a("56mX2").getHighWaterMark,p=a("aOgJu").codes,m=p.ERR_INVALID_ARG_TYPE,g=p.ERR_METHOD_NOT_IMPLEMENTED,v=p.ERR_MULTIPLE_CALLBACK,b=p.ERR_STREAM_CANNOT_PIPE,y=p.ERR_STREAM_DESTROYED,w=p.ERR_STREAM_NULL_VALUES,x=p.ERR_STREAM_WRITE_AFTER_END,S=p.ERR_UNKNOWN_ENCODING,M=f.errorOrDestroy;function _(){}function E(e,t,n){r=r||a("jqAKP"),e=e||{},"boolean"!=typeof n&&(n=t instanceof r),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if("function"!=typeof i)throw new v;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,i){--t.pendingcb,n?(o.nextTick(i,r),o.nextTick(R,e,t),e._writableState.errorEmitted=!0,M(e,r)):(i(r),e._writableState.errorEmitted=!0,M(e,r),R(e,t))}(e,n,r,t,i);else{var a=I(n)||e.destroyed;a||n.corked||n.bufferProcessing||!n.bufferedRequest||T(e,n),r?o.nextTick(k,e,n,a,i):k(e,n,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function A(e){var t=this instanceof(r=r||a("jqAKP"));if(!t&&!d.call(A,this))return new A(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)),l.call(this)}function C(e,t,n,r,o,i,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function k(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),R(e,t)}function T(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var s=0,l=!0;n;)o[s]=n,n.isBuf||(l=!1),n=n.next,s+=1;o.allBuffers=l,C(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;n;){var c=n.chunk,u=n.encoding,d=n.callback;if(C(e,t,!1,t.objectMode?1:c.length,c,u,d),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function I(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final((function(n){t.pendingcb--,n&&M(e,n),t.prefinished=!0,e.emit("prefinish"),R(e,t)}))}function R(e,t){var n=I(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,o.nextTick(O,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}a("5jAh8")(A,l),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:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!d.call(this,e)||this===A&&(e&&e._writableState instanceof E)}})):d=function(e){return e instanceof this},A.prototype.pipe=function(){M(this,new b)},A.prototype.write=function(e,t,n){var r,i=this._writableState,a=!1,s=!i.objectMode&&(r=e,c.isBuffer(r)||r instanceof u);return s&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof n&&(n=_),i.ending?function(e,t){var n=new x;M(e,n),o.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var i;return null===n?i=new w:"string"==typeof n||t.objectMode||(i=new m("chunk",["string","Buffer"],n)),!i||(M(e,i),o.nextTick(r,i),!1)}(this,i,e,n))&&(i.pendingcb++,a=function(e,t,n,r,o,i){if(!n){var a=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,n));return t}(t,r,o);r!==a&&(n=!0,o="buffer",r=a)}var s=t.objectMode?1:r.length;t.length+=s;var l=t.length<t.highWaterMark;l||(t.needDrain=!0);if(t.writing||t.corked){var u=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:o,isBuf:n,callback:i,next:null},u?u.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else C(e,t,!1,s,r,o,i);return l}(this,i,s,e,t,n)),a},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||T(this,e))},A.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 S(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,n){n(new g("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,R(e,t),n&&(t.finished?o.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,r,n),this},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._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=f.destroy,A.prototype._undestroy=f.undestroy,A.prototype._destroy=function(e,t){t(e)}})),a.register("aAtir",(function(e,n){function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}}})),a.register("28kcI",(function(t,n){var r;e(t.exports,"StringDecoder",(()=>r),(e=>r=e));var o=a("8ByQm").Buffer,i=o.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function s(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(o.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=d,t=4;break;case"utf8":this.fillLast=c,t=4;break;case"base64":this.text=f,this.end=h,t=3;break;default:return this.write=p,void(this.end=m)}this.lastNeed=0,this.lastTotal=0,this.lastChar=o.allocUnsafe(t)}function l(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function c(e){var t=this.lastTotal-this.lastNeed,n=function(e,t,n){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function d(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function f(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function p(e){return e.toString(this.encoding)}function m(e){return e&&e.length?this.write(e):""}r=s,s.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},s.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},s.prototype.text=function(e,t){var n=function(e,t,n){var r=t.length-1;if(r<n)return 0;var o=l(t[r]);if(o>=0)return o>0&&(e.lastNeed=o-1),o;if(--r<n||-2===o)return 0;if(o=l(t[r]),o>=0)return o>0&&(e.lastNeed=o-2),o;if(--r<n||-2===o)return 0;if(o=l(t[r]),o>=0)return o>0&&(2===o?o=0:e.lastNeed=o-3),o;return 0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},s.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}})),a.register("8ByQm",(function(e,t){
51
51
  /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
52
52
  var n=a("bqBrJ"),r=n.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function i(e,t,n){return r(e,t,n)}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?e.exports=n:(o(n,e.exports),e.exports.Buffer=i),i.prototype=Object.create(r.prototype),o(r,i),i.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return r(e,t,n)},i.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var o=r(e);return void 0!==t?"string"==typeof n?o.fill(t,n):o.fill(t):o.fill(0),o},i.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r(e)},i.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}})),a.register("5gKYZ",(function(e,t){var n,r=a("ePtPP");function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=a("j5ZwK"),s=Symbol("lastResolve"),l=Symbol("lastReject"),c=Symbol("error"),u=Symbol("ended"),d=Symbol("lastPromise"),f=Symbol("handlePromise"),h=Symbol("stream");function p(e,t){return{value:e,done:t}}function m(e){var t=e[s];if(null!==t){var n=e[h].read();null!==n&&(e[d]=null,e[s]=null,e[l]=null,t(p(n,!1)))}}function g(e){r.nextTick(m,e)}var v=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((o(n={get stream(){return this[h]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[u])return Promise.resolve(p(void 0,!0));if(this[h].destroyed)return new Promise((function(t,n){r.nextTick((function(){e[c]?n(e[c]):t(p(void 0,!0))}))}));var n,o=this[d];if(o)n=new Promise(function(e,t){return function(n,r){e.then((function(){t[u]?n(p(void 0,!0)):t[f](n,r)}),r)}}(o,this));else{var i=this[h].read();if(null!==i)return Promise.resolve(p(i,!1));n=new Promise(this[f])}return this[d]=n,n}},Symbol.asyncIterator,(function(){return this})),o(n,"return",(function(){var e=this;return new Promise((function(t,n){e[h].destroy(null,(function(e){e?n(e):t(p(void 0,!0))}))}))})),n),v);e.exports=function(e){var t,n=Object.create(b,(o(t={},h,{value:e,writable:!0}),o(t,s,{value:null,writable:!0}),o(t,l,{value:null,writable:!0}),o(t,c,{value:null,writable:!0}),o(t,u,{value:e._readableState.endEmitted,writable:!0}),o(t,f,{value:function(e,t){var r=n[h].read();r?(n[d]=null,n[s]=null,n[l]=null,e(p(r,!1))):(n[s]=e,n[l]=t)},writable:!0}),t));return n[d]=null,i(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[l];return null!==t&&(n[d]=null,n[s]=null,n[l]=null,t(e)),void(n[c]=e)}var r=n[s];null!==r&&(n[d]=null,n[s]=null,n[l]=null,r(p(void 0,!0))),n[u]=!0})),e.on("readable",g.bind(null,n)),n}})),a.register("j5ZwK",(function(e,t){"use strict";var n=a("aOgJu").codes.ERR_STREAM_PREMATURE_CLOSE;function r(){}e.exports=function e(t,o,i){if("function"==typeof o)return e(t,null,o);o||(o={}),i=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.apply(this,r)}}}(i||r);var a=o.readable||!1!==o.readable&&t.readable,s=o.writable||!1!==o.writable&&t.writable,l=function(){t.writable||u()},c=t._writableState&&t._writableState.finished,u=function(){s=!1,c=!0,a||i.call(t)},d=t._readableState&&t._readableState.endEmitted,f=function(){a=!1,d=!0,s||i.call(t)},h=function(e){i.call(t,e)},p=function(){var e;return a&&!d?(t._readableState&&t._readableState.ended||(e=new n),i.call(t,e)):s&&!c?(t._writableState&&t._writableState.ended||(e=new n),i.call(t,e)):void 0},m=function(){t.req.on("finish",u)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?s&&!t._writableState&&(t.on("end",l),t.on("close",l)):(t.on("complete",u),t.on("abort",p),t.req?m():t.on("request",m)),t.on("end",f),t.on("finish",u),!1!==o.error&&t.on("error",h),t.on("close",p),function(){t.removeListener("complete",u),t.removeListener("abort",p),t.removeListener("request",m),t.req&&t.req.removeListener("finish",u),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",u),t.removeListener("end",f),t.removeListener("error",h),t.removeListener("close",p)}}})),a.register("8igDo",(function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}})),a.register("erC5i",(function(e,t){"use strict";e.exports=u;var n=a("aOgJu").codes,r=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,i=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,l=a("jqAKP");function c(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new o);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function u(e){if(!(this instanceof u))return new u(e);l.call(this,e),this._transformState={afterTransform:c.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",d)}function d(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?f(this,null,null):this._flush((function(t,n){f(e,t,n)}))}function f(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new s;if(e._transformState.transforming)throw new i;return e.push(null)}a("5jAh8")(u,l),u.prototype.push=function(e,t){return this._transformState.needTransform=!1,l.prototype.push.call(this,e,t)},u.prototype._transform=function(e,t,n){n(new r("_transform()"))},u.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var o=this._readableState;(r.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},u.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))},u.prototype._destroy=function(e,t){l.prototype._destroy.call(this,e,(function(e){t(e)}))}})),a.register("3dCe5",(function(e,t){"use strict";e.exports=r;var n=a("erC5i");function r(e){if(!(this instanceof r))return new r(e);n.call(this,e)}a("5jAh8")(r,n),r.prototype._transform=function(e,t,n){n(null,e)}})),a.register("azGNy",(function(e,t){"use strict";var n;var r=a("aOgJu").codes,o=r.ERR_MISSING_ARGS,i=r.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function l(e,t,r,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;e.on("close",(function(){s=!0})),void 0===n&&(n=a("j5ZwK")),n(e,{readable:t,writable:r},(function(e){if(e)return o(e);s=!0,o()}));var l=!1;return function(t){if(!s&&!l)return l=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new i("pipe"))}}function c(e){e()}function u(e,t){return e.pipe(t)}function d(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}e.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,i=d(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var a=t.map((function(e,n){var o=n<t.length-1;return l(e,o,n>0,(function(e){r||(r=e),e&&a.forEach(c),o||(a.forEach(c),i(r))}))}));return t.reduce(u)}})),a.register("iCrCa",(function(e,t){e.exports=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var o in r)n.call(r,o)&&(e[o]=r[o])}return e};var n=Object.prototype.hasOwnProperty})),a.register("7X2JB",(function(e,t){e.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}})),a.register("8iXHm",(function(t,n){var r;e(t.exports,"parse",(()=>r),(e=>r=e));var o=a("izynC"),i=a("f5Jlg");function s(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}r=x;var l=/^([a-z0-9.+-]+:)/i,c=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,d=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(d),h=["%","/","?",";","#"].concat(f),p=["/","?","#"],m=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,v={javascript:!0,"javascript:":!0},b={javascript:!0,"javascript:":!0},y={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},w=a("WCmTO");function x(e,t,n){if(e&&i.isObject(e)&&e instanceof s)return e;var r=new s;return r.parse(e,t,n),r}s.prototype.parse=function(e,t,n){if(!i.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var r=e.indexOf("?"),a=-1!==r&&r<e.indexOf("#")?"?":"#",s=e.split(a);s[0]=s[0].replace(/\\/g,"/");var c=e=s.join(a);if(c=c.trim(),!n&&1===e.split("#").length){var d=u.exec(c);if(d)return this.path=c,this.href=c,this.pathname=d[1],d[2]?(this.search=d[2],this.query=t?w.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search="",this.query={}),this}var x=l.exec(c);if(x){var S=(x=x[0]).toLowerCase();this.protocol=S,c=c.substr(x.length)}if(n||x||c.match(/^\/\/[^@\/]+@[^@\/]+/)){var M="//"===c.substr(0,2);!M||x&&b[x]||(c=c.substr(2),this.slashes=!0)}if(!b[x]&&(M||x&&!y[x])){for(var _,E,A=-1,C=0;C<p.length;C++){-1!==(k=c.indexOf(p[C]))&&(-1===A||k<A)&&(A=k)}-1!==(E=-1===A?c.lastIndexOf("@"):c.lastIndexOf("@",A))&&(_=c.slice(0,E),c=c.slice(E+1),this.auth=decodeURIComponent(_)),A=-1;for(C=0;C<h.length;C++){var k;-1!==(k=c.indexOf(h[C]))&&(-1===A||k<A)&&(A=k)}-1===A&&(A=c.length),this.host=c.slice(0,A),c=c.slice(A),this.parseHost(),this.hostname=this.hostname||"";var T="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!T)for(var I=this.hostname.split(/\./),O=(C=0,I.length);C<O;C++){var R=I[C];if(R&&!R.match(m)){for(var P="",N=0,L=R.length;N<L;N++)R.charCodeAt(N)>127?P+="x":P+=R[N];if(!P.match(m)){var B=I.slice(0,C),D=I.slice(C+1),j=R.match(g);j&&(B.push(j[1]),D.unshift(j[2])),D.length&&(c="/"+D.join(".")+c),this.hostname=B.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=o.toASCII(this.hostname));var F=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+F,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==c[0]&&(c="/"+c))}if(!v[S])for(C=0,O=f.length;C<O;C++){var U=f[C];if(-1!==c.indexOf(U)){var H=encodeURIComponent(U);H===U&&(H=escape(U)),c=c.split(U).join(H)}}var G=c.indexOf("#");-1!==G&&(this.hash=c.substr(G),c=c.slice(0,G));var W=c.indexOf("?");if(-1!==W?(this.search=c.substr(W),this.query=c.substr(W+1),t&&(this.query=w.parse(this.query)),c=c.slice(0,W)):t&&(this.search="",this.query={}),c&&(this.pathname=c),y[S]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var V=this.search||"";this.path=F+V}return this.href=this.format(),this},s.prototype.format=function(){var e=this.auth||"";e&&(e=(e=encodeURIComponent(e)).replace(/%3A/i,":"),e+="@");var t=this.protocol||"",n=this.pathname||"",r=this.hash||"",o=!1,a="";this.host?o=e+this.host:this.hostname&&(o=e+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(a=w.stringify(this.query));var s=this.search||a&&"?"+a||"";return t&&":"!==t.substr(-1)&&(t+=":"),this.slashes||(!t||y[t])&&!1!==o?(o="//"+(o||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):o||(o=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),t+o+(n=n.replace(/[?#]/g,(function(e){return encodeURIComponent(e)})))+(s=s.replace("#","%23"))+r},s.prototype.resolve=function(e){return this.resolveObject(x(e,!1,!0)).format()},s.prototype.resolveObject=function(e){if(i.isString(e)){var t=new s;t.parse(e,!1,!0),e=t}for(var n=new s,r=Object.keys(this),o=0;o<r.length;o++){var a=r[o];n[a]=this[a]}if(n.hash=e.hash,""===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var l=Object.keys(e),c=0;c<l.length;c++){var u=l[c];"protocol"!==u&&(n[u]=e[u])}return y[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname="/"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!y[e.protocol]){for(var d=Object.keys(e),f=0;f<d.length;f++){var h=d[f];n[h]=e[h]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||b[e.protocol])n.pathname=e.pathname;else{for(var p=(e.pathname||"").split("/");p.length&&!(e.host=p.shift()););e.host||(e.host=""),e.hostname||(e.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=e.search,n.query=e.query,n.host=e.host||"",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var m=n.pathname||"",g=n.search||"";n.path=m+g}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var v=n.pathname&&"/"===n.pathname.charAt(0),w=e.host||e.pathname&&"/"===e.pathname.charAt(0),x=w||v||n.host&&e.pathname,S=x,M=n.pathname&&n.pathname.split("/")||[],_=(p=e.pathname&&e.pathname.split("/")||[],n.protocol&&!y[n.protocol]);if(_&&(n.hostname="",n.port=null,n.host&&(""===M[0]?M[0]=n.host:M.unshift(n.host)),n.host="",e.protocol&&(e.hostname=null,e.port=null,e.host&&(""===p[0]?p[0]=e.host:p.unshift(e.host)),e.host=null),x=x&&(""===p[0]||""===M[0])),w)n.host=e.host||""===e.host?e.host:n.host,n.hostname=e.hostname||""===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,M=p;else if(p.length)M||(M=[]),M.pop(),M=M.concat(p),n.search=e.search,n.query=e.query;else if(!i.isNullOrUndefined(e.search)){if(_)n.hostname=n.host=M.shift(),(T=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=T.shift(),n.host=n.hostname=T.shift());return n.search=e.search,n.query=e.query,i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!M.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var E=M.slice(-1)[0],A=(n.host||e.host||M.length>1)&&("."===E||".."===E)||""===E,C=0,k=M.length;k>=0;k--)"."===(E=M[k])?M.splice(k,1):".."===E?(M.splice(k,1),C++):C&&(M.splice(k,1),C--);if(!x&&!S)for(;C--;C)M.unshift("..");!x||""===M[0]||M[0]&&"/"===M[0].charAt(0)||M.unshift(""),A&&"/"!==M.join("/").substr(-1)&&M.push("");var T,I=""===M[0]||M[0]&&"/"===M[0].charAt(0);_&&(n.hostname=n.host=I?"":M.length?M.shift():"",(T=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=T.shift(),n.host=n.hostname=T.shift()));return(x=x||n.host&&M.length)&&!I&&M.unshift(""),M.length?n.pathname=M.join("/"):(n.pathname=null,n.path=null),i.isNull(n.pathname)&&i.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},s.prototype.parseHost=function(){var e=this.host,t=c.exec(e);t&&(":"!==(t=t[0])&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}})),a.register("izynC",(function(e,n){!function(r){var o=n&&!n.nodeType&&n,i=e&&!e.nodeType&&e,a="object"==typeof t&&t;a.global!==a&&a.window!==a&&a.self!==a||(r=a);var s,l,c=2147483647,u=36,d=/^xn--/,f=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,p={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},m=Math.floor,g=String.fromCharCode;function v(e){throw new RangeError(p[e])}function b(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function y(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+b((e=e.replace(h,".")).split("."),t).join(".")}function w(e){for(var t,n,r=[],o=0,i=e.length;o<i;)(t=e.charCodeAt(o++))>=55296&&t<=56319&&o<i?56320==(64512&(n=e.charCodeAt(o++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),o--):r.push(t);return r}function x(e){return b(e,(function(e){var t="";return e>65535&&(t+=g((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=g(e)})).join("")}function S(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function M(e,t,n){var r=0;for(e=n?m(e/700):e>>1,e+=m(e/t);e>455;r+=u)e=m(e/35);return m(r+36*e/(e+38))}function _(e){var t,n,r,o,i,a,s,l,d,f,h,p=[],g=e.length,b=0,y=128,w=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&v("not-basic"),p.push(e.charCodeAt(r));for(o=n>0?n+1:0;o<g;){for(i=b,a=1,s=u;o>=g&&v("invalid-input"),((l=(h=e.charCodeAt(o++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:u)>=u||l>m((c-b)/a))&&v("overflow"),b+=l*a,!(l<(d=s<=w?1:s>=w+26?26:s-w));s+=u)a>m(c/(f=u-d))&&v("overflow"),a*=f;w=M(b-i,t=p.length+1,0==i),m(b/t)>c-y&&v("overflow"),y+=m(b/t),b%=t,p.splice(b++,0,y)}return x(p)}function E(e){var t,n,r,o,i,a,s,l,d,f,h,p,b,y,x,_=[];for(p=(e=w(e)).length,t=128,n=0,i=72,a=0;a<p;++a)(h=e[a])<128&&_.push(g(h));for(r=o=_.length,o&&_.push("-");r<p;){for(s=c,a=0;a<p;++a)(h=e[a])>=t&&h<s&&(s=h);for(s-t>m((c-n)/(b=r+1))&&v("overflow"),n+=(s-t)*b,t=s,a=0;a<p;++a)if((h=e[a])<t&&++n>c&&v("overflow"),h==t){for(l=n,d=u;!(l<(f=d<=i?1:d>=i+26?26:d-i));d+=u)x=l-f,y=u-f,_.push(g(S(f+x%y,0))),l=m(x/y);_.push(g(S(l,0))),i=M(n,b,r==o),n=0,++r}++n,++t}return _.join("")}if(s={version:"1.4.1",ucs2:{decode:w,encode:x},decode:_,encode:E,toASCII:function(e){return y(e,(function(e){return f.test(e)?"xn--"+E(e):e}))},toUnicode:function(e){return y(e,(function(e){return d.test(e)?_(e.slice(4).toLowerCase()):e}))}},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",(function(){return s}));else if(o&&i)if(e.exports==o)i.exports=s;else for(l in s)s.hasOwnProperty(l)&&(o[l]=s[l]);else r.punycode=s}(this)})),a.register("f5Jlg",(function(e,t){"use strict";e.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}})),a.register("WCmTO",(function(t,n){var r,o;e(t.exports,"parse",(()=>r),(e=>r=e)),e(t.exports,"stringify",(()=>o),(e=>o=e)),r=a("irK6S"),o=a("h75Bs")})),a.register("irK6S",(function(e,t){"use strict";function n(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,o,i){t=t||"&",o=o||"=";var a={};if("string"!=typeof e||0===e.length)return a;var s=/\+/g;e=e.split(t);var l=1e3;i&&"number"==typeof i.maxKeys&&(l=i.maxKeys);var c=e.length;l>0&&c>l&&(c=l);for(var u=0;u<c;++u){var d,f,h,p,m=e[u].replace(s,"%20"),g=m.indexOf(o);g>=0?(d=m.substr(0,g),f=m.substr(g+1)):(d=m,f=""),h=decodeURIComponent(d),p=decodeURIComponent(f),n(a,h)?r(a[h])?a[h].push(p):a[h]=[a[h],p]:a[h]=p}return a};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}})),a.register("h75Bs",(function(e,t){"use strict";var n=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,a,s){return t=t||"&",a=a||"=",null===e&&(e=void 0),"object"==typeof e?o(i(e),(function(i){var s=encodeURIComponent(n(i))+a;return r(e[i])?o(e[i],(function(e){return s+encodeURIComponent(n(e))})).join(t):s+encodeURIComponent(n(e[i]))})).join(t):s?encodeURIComponent(n(s))+a+encodeURIComponent(n(e)):""};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function o(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var i=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}})),a.register("hK5aC",(function(e,t){var n=a("fnFC9"),r=a("8iXHm"),o=e.exports;for(var i in n)n.hasOwnProperty(i)&&(o[i]=n[i]);function s(e){if("string"==typeof e&&(e=r.parse(e)),e.protocol||(e.protocol="https:"),"https:"!==e.protocol)throw new Error('Protocol "'+e.protocol+'" not supported. Expected "https:"');return e}o.request=function(e,t){return e=s(e),n.request.call(this,e,t)},o.get=function(e,t){return e=s(e),n.get.call(this,e,t)}})),a.register("805Dg",(function(t,n){var r;e(t.exports,"getOCSPURI",(()=>r),(e=>r=e));var o=a("5U18c"),i=a("1DJXa");i=a("1DJXa");r=function(e,t){var n=i["id-pkix-ocsp"].join("."),r=o.utils.toDER(e,"CERTIFICATE");r=i.Certificate.decode(r,"der"),o.utils.getAuthorityInfo(r,n,t)}})),a.register("9ZaT0",(function(t,n){var r;e(t.exports,"generate",(()=>r),(e=>r=e));var o=a("5U18c"),i=a("dc7aw"),s=a("1DJXa");s=a("1DJXa");function l(e){return i.createHash("sha1").update(e).digest()}r=function(e,t){var n,r;n=e.tbsCertificate?e:s.Certificate.decode(o.utils.toDER(e,"CERTIFICATE"),"der"),r=t.tbsCertificate?t:s.Certificate.decode(o.utils.toDER(t,"CERTIFICATE"),"der");var a=n.tbsCertificate,c=r.tbsCertificate,u={hashAlgorithm:{algorithm:[1,3,14,3,2,26]},issuerNameHash:l(s.Name.encode(a.issuer,"der")),issuerKeyHash:l(c.subjectPublicKeyInfo.subjectPublicKey.data),serialNumber:a.serialNumber},d={tbsRequest:{version:"v1",requestList:[{reqCert:u}],requestExtensions:[{extnID:s["id-pkix-ocsp-nonce"],critical:!1,extnValue:s.Nonce.encode(i.randomBytes(16),"der")}]}};return{id:l(s.CertID.encode(u,"der")),certID:u,data:s.OCSPRequest.encode(d,"der"),cert:n,issuer:r}}})),a.register("dc7aw",(function(t,n){var r,o,i;e(t.exports,"randomBytes",(()=>r),(e=>r=e)),e(t.exports,"createHash",(()=>o),(e=>o=e)),e(t.exports,"createVerify",(()=>i),(e=>i=e)),r=a("3xr1Z"),o=a("d8QYu"),a("7Q3Pj");var s=a("8zF5N"),l=Object.keys(s),c=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(l);var u=a("cabM3");u.pbkdf2,u.pbkdf2Sync;var d=a("3feuT");d.Cipher,d.createCipher,d.Cipheriv,d.createCipheriv,d.Decipher,d.createDecipher,d.Decipheriv,d.createDecipheriv,d.getCiphers,d.listCiphers;var f=a("hzteC");f.DiffieHellmanGroup,f.createDiffieHellmanGroup,f.getDiffieHellman,f.createDiffieHellman,f.DiffieHellman;var h=a("cD2JS");h.createSign,h.Sign,i=h.createVerify,h.Verify,a("5nTVb");var p=a("5IN4o");p.publicEncrypt,p.privateEncrypt,p.publicDecrypt,p.privateDecrypt;var m=a("lPq1P");m.randomFill,m.randomFillSync})),a.register("3xr1Z",(function(e,n){var r=a("ePtPP"),o=65536;var i=a("8ByQm").Buffer,s=t.crypto||t.msCrypto;s&&s.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var n=i.allocUnsafe(e);if(e>0)if(e>o)for(var a=0;a<e;a+=o)s.getRandomValues(n.slice(a,a+o));else s.getRandomValues(n);return"function"==typeof t?r.nextTick((function(){t(null,n)})):n}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}})),a.register("d8QYu",(function(e,t){"use strict";var n=a("5jAh8"),r=a("d5AKh"),o=a("akTKC"),i=a("5eKyq"),s=a("9HuUe");function l(e){s.call(this,"digest"),this._hash=e}n(l,s),l.prototype._update=function(e){this._hash.update(e)},l.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new r:"rmd160"===e||"ripemd160"===e?new o:new l(i(e))}})),a.register("d5AKh",(function(e,t){"use strict";var n=a("5jAh8"),r=a("hbeGo"),o=a("8ByQm").Buffer,i=new Array(16);function s(){r.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function l(e,t){return e<<t|e>>>32-t}function c(e,t,n,r,o,i,a){return l(e+(t&n|~t&r)+o+i|0,a)+t|0}function u(e,t,n,r,o,i,a){return l(e+(t&r|n&~r)+o+i|0,a)+t|0}function d(e,t,n,r,o,i,a){return l(e+(t^n^r)+o+i|0,a)+t|0}function f(e,t,n,r,o,i,a){return l(e+(n^(t|~r))+o+i|0,a)+t|0}n(s,r),s.prototype._update=function(){for(var e=i,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var n=this._a,r=this._b,o=this._c,a=this._d;n=c(n,r,o,a,e[0],3614090360,7),a=c(a,n,r,o,e[1],3905402710,12),o=c(o,a,n,r,e[2],606105819,17),r=c(r,o,a,n,e[3],3250441966,22),n=c(n,r,o,a,e[4],4118548399,7),a=c(a,n,r,o,e[5],1200080426,12),o=c(o,a,n,r,e[6],2821735955,17),r=c(r,o,a,n,e[7],4249261313,22),n=c(n,r,o,a,e[8],1770035416,7),a=c(a,n,r,o,e[9],2336552879,12),o=c(o,a,n,r,e[10],4294925233,17),r=c(r,o,a,n,e[11],2304563134,22),n=c(n,r,o,a,e[12],1804603682,7),a=c(a,n,r,o,e[13],4254626195,12),o=c(o,a,n,r,e[14],2792965006,17),n=u(n,r=c(r,o,a,n,e[15],1236535329,22),o,a,e[1],4129170786,5),a=u(a,n,r,o,e[6],3225465664,9),o=u(o,a,n,r,e[11],643717713,14),r=u(r,o,a,n,e[0],3921069994,20),n=u(n,r,o,a,e[5],3593408605,5),a=u(a,n,r,o,e[10],38016083,9),o=u(o,a,n,r,e[15],3634488961,14),r=u(r,o,a,n,e[4],3889429448,20),n=u(n,r,o,a,e[9],568446438,5),a=u(a,n,r,o,e[14],3275163606,9),o=u(o,a,n,r,e[3],4107603335,14),r=u(r,o,a,n,e[8],1163531501,20),n=u(n,r,o,a,e[13],2850285829,5),a=u(a,n,r,o,e[2],4243563512,9),o=u(o,a,n,r,e[7],1735328473,14),n=d(n,r=u(r,o,a,n,e[12],2368359562,20),o,a,e[5],4294588738,4),a=d(a,n,r,o,e[8],2272392833,11),o=d(o,a,n,r,e[11],1839030562,16),r=d(r,o,a,n,e[14],4259657740,23),n=d(n,r,o,a,e[1],2763975236,4),a=d(a,n,r,o,e[4],1272893353,11),o=d(o,a,n,r,e[7],4139469664,16),r=d(r,o,a,n,e[10],3200236656,23),n=d(n,r,o,a,e[13],681279174,4),a=d(a,n,r,o,e[0],3936430074,11),o=d(o,a,n,r,e[3],3572445317,16),r=d(r,o,a,n,e[6],76029189,23),n=d(n,r,o,a,e[9],3654602809,4),a=d(a,n,r,o,e[12],3873151461,11),o=d(o,a,n,r,e[15],530742520,16),n=f(n,r=d(r,o,a,n,e[2],3299628645,23),o,a,e[0],4096336452,6),a=f(a,n,r,o,e[7],1126891415,10),o=f(o,a,n,r,e[14],2878612391,15),r=f(r,o,a,n,e[5],4237533241,21),n=f(n,r,o,a,e[12],1700485571,6),a=f(a,n,r,o,e[3],2399980690,10),o=f(o,a,n,r,e[10],4293915773,15),r=f(r,o,a,n,e[1],2240044497,21),n=f(n,r,o,a,e[8],1873313359,6),a=f(a,n,r,o,e[15],4264355552,10),o=f(o,a,n,r,e[6],2734768916,15),r=f(r,o,a,n,e[13],1309151649,21),n=f(n,r,o,a,e[4],4149444226,6),a=f(a,n,r,o,e[11],3174756917,10),o=f(o,a,n,r,e[2],718787259,15),r=f(r,o,a,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+r|0,this._c=this._c+o|0,this._d=this._d+a|0},s.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=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=s})),a.register("hbeGo",(function(e,t){"use strict";var n=a("8ByQm").Buffer,r=a("8IqCp").Transform;function o(e){r.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}a("5jAh8")(o,r),o.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(e){r=e}n(r)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(e,"Data"),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,o=0;this._blockOffset+e.length-o>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)r[i++]=e[o++];this._update(),this._blockOffset=0}for(;o<e.length;)r[this._blockOffset++]=e[o++];for(var a=0,s=8*e.length;s>0;++a)this._length[a]+=s,(s=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*s);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.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 n=0;n<4;++n)this._length[n]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o})),a.register("akTKC",(function(e,t){"use strict";var n=a("bqBrJ").Buffer,r=a("5jAh8"),o=a("hbeGo"),i=new Array(16),s=[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],l=[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],c=[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],u=[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],d=[0,1518500249,1859775393,2400959708,2840853838],f=[1352829926,1548603684,1836072691,2053994217,0];function h(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<<t|e>>>32-t}function m(e,t,n,r,o,i,a,s){return p(e+(t^n^r)+i+a|0,s)+o|0}function g(e,t,n,r,o,i,a,s){return p(e+(t&n|~t&r)+i+a|0,s)+o|0}function v(e,t,n,r,o,i,a,s){return p(e+((t|~n)^r)+i+a|0,s)+o|0}function b(e,t,n,r,o,i,a,s){return p(e+(t&r|n&~r)+i+a|0,s)+o|0}function y(e,t,n,r,o,i,a,s){return p(e+(t^(n|~r))+i+a|0,s)+o|0}r(h,o),h.prototype._update=function(){for(var e=i,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var n=0|this._a,r=0|this._b,o=0|this._c,a=0|this._d,h=0|this._e,w=0|this._a,x=0|this._b,S=0|this._c,M=0|this._d,_=0|this._e,E=0;E<80;E+=1){var A,C;E<16?(A=m(n,r,o,a,h,e[s[E]],d[0],c[E]),C=y(w,x,S,M,_,e[l[E]],f[0],u[E])):E<32?(A=g(n,r,o,a,h,e[s[E]],d[1],c[E]),C=b(w,x,S,M,_,e[l[E]],f[1],u[E])):E<48?(A=v(n,r,o,a,h,e[s[E]],d[2],c[E]),C=v(w,x,S,M,_,e[l[E]],f[2],u[E])):E<64?(A=b(n,r,o,a,h,e[s[E]],d[3],c[E]),C=g(w,x,S,M,_,e[l[E]],f[3],u[E])):(A=y(n,r,o,a,h,e[s[E]],d[4],c[E]),C=m(w,x,S,M,_,e[l[E]],f[4],u[E])),n=h,h=a,a=p(o,10),o=r,r=A,w=_,_=M,M=p(S,10),S=x,x=C}var k=this._b+o+M|0;this._b=this._c+a+_|0,this._c=this._d+h+w|0,this._d=this._e+n+x|0,this._e=this._a+r+S|0,this._a=k},h.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=n.alloc?n.alloc(20):new n(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},e.exports=h})),a.register("5eKyq",(function(e,t){var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=a("3WWrs"),n.sha1=a("20KWg"),n.sha224=a("7FU1E"),n.sha256=a("5f2Bs"),n.sha384=a("hSEUB"),n.sha512=a("1Wrwk")})),a.register("3WWrs",(function(e,t){var n=a("5jAh8"),r=a("6TDWC"),o=a("8ByQm").Buffer,i=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function l(){this.init(),this._w=s,r.call(this,64,56)}function c(e){return e<<30|e>>>2}function u(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}n(l,r),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,o=0|this._b,a=0|this._c,s=0|this._d,l=0|this._e,d=0;d<16;++d)n[d]=e.readInt32BE(4*d);for(;d<80;++d)n[d]=n[d-3]^n[d-8]^n[d-14]^n[d-16];for(var f=0;f<80;++f){var h=~~(f/20),p=0|((t=r)<<5|t>>>27)+u(h,o,a,s)+l+n[f]+i[h];l=s,s=a,a=c(o),o=r,r=p}this._a=r+this._a|0,this._b=o+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=o.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},e.exports=l})),a.register("6TDWC",(function(e,t){var n=a("8ByQm").Buffer;function r(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}r.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,o=this._blockSize,i=e.length,a=this._len,s=0;s<i;){for(var l=a%o,c=Math.min(i-s,o-l),u=0;u<c;u++)r[l+u]=e[s+u];s+=c,(a+=c)%o==0&&this._update(r)}return this._len+=i,this},r.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,o=(n-r)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=r})),a.register("20KWg",(function(e,t){var n=a("5jAh8"),r=a("6TDWC"),o=a("8ByQm").Buffer,i=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function l(){this.init(),this._w=s,r.call(this,64,56)}function c(e){return e<<5|e>>>27}function u(e){return e<<30|e>>>2}function d(e,t,n,r){return 0===e?t&n|~t&r:2===e?t&n|t&r|n&r:t^n^r}n(l,r),l.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},l.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,o=0|this._b,a=0|this._c,s=0|this._d,l=0|this._e,f=0;f<16;++f)n[f]=e.readInt32BE(4*f);for(;f<80;++f)n[f]=(t=n[f-3]^n[f-8]^n[f-14]^n[f-16])<<1|t>>>31;for(var h=0;h<80;++h){var p=~~(h/20),m=c(r)+d(p,o,a,s)+l+n[h]+i[p]|0;l=s,s=a,a=u(o),o=r,r=m}this._a=r+this._a|0,this._b=o+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=l+this._e|0},l.prototype._hash=function(){var e=o.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},e.exports=l})),a.register("7FU1E",(function(e,t){var n=a("5jAh8"),r=a("5f2Bs"),o=a("6TDWC"),i=a("8ByQm").Buffer,s=new Array(64);function l(){this.init(),this._w=s,o.call(this,64,56)}n(l,r),l.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},l.prototype._hash=function(){var e=i.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},e.exports=l})),a.register("5f2Bs",(function(e,t){var n=a("5jAh8"),r=a("6TDWC"),o=a("8ByQm").Buffer,i=[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],s=new Array(64);function l(){this.init(),this._w=s,r.call(this,64,56)}function c(e,t,n){return n^e&(t^n)}function u(e,t,n){return e&t|n&(e|t)}function d(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function f(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function h(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(l,r),l.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},l.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,o=0|this._b,a=0|this._c,s=0|this._d,l=0|this._e,p=0|this._f,m=0|this._g,g=0|this._h,v=0;v<16;++v)n[v]=e.readInt32BE(4*v);for(;v<64;++v)n[v]=0|(((t=n[v-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[v-7]+h(n[v-15])+n[v-16];for(var b=0;b<64;++b){var y=g+f(l)+c(l,p,m)+i[b]+n[b]|0,w=d(r)+u(r,o,a)|0;g=m,m=p,p=l,l=s+y|0,s=a,a=o,o=r,r=y+w|0}this._a=r+this._a|0,this._b=o+this._b|0,this._c=a+this._c|0,this._d=s+this._d|0,this._e=l+this._e|0,this._f=p+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},l.prototype._hash=function(){var e=o.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},e.exports=l})),a.register("hSEUB",(function(e,t){var n=a("5jAh8"),r=a("1Wrwk"),o=a("6TDWC"),i=a("8ByQm").Buffer,s=new Array(160);function l(){this.init(),this._w=s,o.call(this,128,112)}n(l,r),l.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},l.prototype._hash=function(){var e=i.allocUnsafe(48);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+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},e.exports=l})),a.register("1Wrwk",(function(e,t){var n=a("5jAh8"),r=a("6TDWC"),o=a("8ByQm").Buffer,i=[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],s=new Array(160);function l(){this.init(),this._w=s,r.call(this,128,112)}function c(e,t,n){return n^e&(t^n)}function u(e,t,n){return e&t|n&(e|t)}function d(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function f(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function h(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function m(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function v(e,t){return e>>>0<t>>>0?1:0}n(l,r),l.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},l.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,o=0|this._ch,a=0|this._dh,s=0|this._eh,l=0|this._fh,b=0|this._gh,y=0|this._hh,w=0|this._al,x=0|this._bl,S=0|this._cl,M=0|this._dl,_=0|this._el,E=0|this._fl,A=0|this._gl,C=0|this._hl,k=0;k<32;k+=2)t[k]=e.readInt32BE(4*k),t[k+1]=e.readInt32BE(4*k+4);for(;k<160;k+=2){var T=t[k-30],I=t[k-30+1],O=h(T,I),R=p(I,T),P=m(T=t[k-4],I=t[k-4+1]),N=g(I,T),L=t[k-14],B=t[k-14+1],D=t[k-32],j=t[k-32+1],F=R+B|0,z=O+L+v(F,R)|0;z=(z=z+P+v(F=F+N|0,N)|0)+D+v(F=F+j|0,j)|0,t[k]=z,t[k+1]=F}for(var U=0;U<160;U+=2){z=t[U],F=t[U+1];var H=u(n,r,o),G=u(w,x,S),W=d(n,w),V=d(w,n),q=f(s,_),K=f(_,s),$=i[U],J=i[U+1],X=c(s,l,b),Q=c(_,E,A),Y=C+K|0,Z=y+q+v(Y,C)|0;Z=(Z=(Z=Z+X+v(Y=Y+Q|0,Q)|0)+$+v(Y=Y+J|0,J)|0)+z+v(Y=Y+F|0,F)|0;var ee=V+G|0,te=W+H+v(ee,V)|0;y=b,C=A,b=l,A=E,l=s,E=_,s=a+Z+v(_=M+Y|0,M)|0,a=o,M=S,o=r,S=x,r=n,x=w,n=Z+te+v(w=Y+ee|0,Y)|0}this._al=this._al+w|0,this._bl=this._bl+x|0,this._cl=this._cl+S|0,this._dl=this._dl+M|0,this._el=this._el+_|0,this._fl=this._fl+E|0,this._gl=this._gl+A|0,this._hl=this._hl+C|0,this._ah=this._ah+n+v(this._al,w)|0,this._bh=this._bh+r+v(this._bl,x)|0,this._ch=this._ch+o+v(this._cl,S)|0,this._dh=this._dh+a+v(this._dl,M)|0,this._eh=this._eh+s+v(this._el,_)|0,this._fh=this._fh+l+v(this._fl,E)|0,this._gh=this._gh+b+v(this._gl,A)|0,this._hh=this._hh+y+v(this._hl,C)|0},l.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+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},e.exports=l})),a.register("9HuUe",(function(e,t){var n=a("8ByQm").Buffer,r=a("hFDuv").Transform,o=a("28kcI").StringDecoder;function i(e){r.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}a("5jAh8")(i,r),i.prototype.update=function(e,t,r){"string"==typeof e&&(e=n.from(e,t));var o=this._update(e);return this.hashMode?this:(r&&(o=this._toString(o,r)),o)},i.prototype.setAutoPadding=function(){},i.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},i.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},i.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},i.prototype._transform=function(e,t,n){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){r=e}finally{n(r)}},i.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},i.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},i.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return n&&(r+=this._decoder.end()),r},e.exports=i})),a.register("hFDuv",(function(e,t){e.exports=r;var n=a("3oV8N").EventEmitter;function r(){n.call(this)}a("5jAh8")(r,n),r.Readable=a("kZTRI"),r.Writable=a("gihud"),r.Duplex=a("jqAKP"),r.Transform=a("erC5i"),r.PassThrough=a("3dCe5"),r.finished=a("j5ZwK"),r.pipeline=a("azGNy"),r.Stream=r,r.prototype.pipe=function(e,t){var r=this;function o(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function i(){r.readable&&r.resume&&r.resume()}r.on("data",o),e.on("drain",i),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",l));var a=!1;function s(){a||(a=!0,e.end())}function l(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===n.listenerCount(this,"error"))throw e}function u(){r.removeListener("data",o),e.removeListener("drain",i),r.removeListener("end",s),r.removeListener("close",l),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}})),a.register("7Q3Pj",(function(e,t){"use strict";var n=a("5jAh8"),r=a("kQpbp"),o=a("9HuUe"),i=a("8ByQm").Buffer,s=a("i7eWY"),l=a("akTKC"),c=a("5eKyq"),u=i.alloc(128);function d(e,t){o.call(this,"digest"),"string"==typeof t&&(t=i.from(t));var n="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>n)?t=("rmd160"===e?new l:c(e)).update(t).digest():t.length<n&&(t=i.concat([t,u],n));for(var r=this._ipad=i.allocUnsafe(n),a=this._opad=i.allocUnsafe(n),s=0;s<n;s++)r[s]=54^t[s],a[s]=92^t[s];this._hash="rmd160"===e?new l:c(e),this._hash.update(r)}n(d,o),d.prototype._update=function(e){this._hash.update(e)},d.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new l:c(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new d("rmd160",t):"md5"===e?new r(s,t):new d(e,t)}})),a.register("kQpbp",(function(e,t){"use strict";var n=a("5jAh8"),r=a("8ByQm").Buffer,o=a("9HuUe"),i=r.alloc(128),s=64;function l(e,t){o.call(this,"digest"),"string"==typeof t&&(t=r.from(t)),this._alg=e,this._key=t,t.length>s?t=e(t):t.length<s&&(t=r.concat([t,i],s));for(var n=this._ipad=r.allocUnsafe(s),a=this._opad=r.allocUnsafe(s),l=0;l<s;l++)n[l]=54^t[l],a[l]=92^t[l];this._hash=[n]}n(l,o),l.prototype._update=function(e){this._hash.push(e)},l.prototype._final=function(){var e=this._alg(r.concat(this._hash));return this._alg(r.concat([this._opad,e]))},e.exports=l})),a.register("i7eWY",(function(e,t){var n=a("d5AKh");e.exports=function(e){return(new n).update(e).digest()}})),a.register("8zF5N",(function(e,t){e.exports=a("aeDps")})),a.register("aeDps",(function(e,t){e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')})),a.register("cabM3",(function(t,n){var r,o;e(t.exports,"pbkdf2",(()=>r),(e=>r=e)),e(t.exports,"pbkdf2Sync",(()=>o),(e=>o=e)),r=a("1dDF3"),o=a("8Rgya")})),a.register("1dDF3",(function(e,n){var r,o,i=a("8ByQm").Buffer,s=a("e25FX"),l=a("zQTLA"),c=a("8Rgya"),u=a("7PgqL"),d=t.crypto&&t.crypto.subtle,f={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 p(){return o||(o=t.process&&t.process.nextTick?t.process.nextTick:t.queueMicrotask?t.queueMicrotask:t.setImmediate?t.setImmediate:t.setTimeout)}function m(e,t,n,r,o){return d.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return d.deriveBits({name:"PBKDF2",salt:t,iterations:n,hash:{name:o}},e,r<<3)})).then((function(e){return i.from(e)}))}e.exports=function(e,n,o,a,g,v){"function"==typeof g&&(v=g,g=void 0);var b=f[(g=g||"sha1").toLowerCase()];if(b&&"function"==typeof t.Promise){if(s(o,a),e=u(e,l,"Password"),n=u(n,l,"Salt"),"function"!=typeof v)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){p()((function(){t(null,e)}))}),(function(e){p()((function(){t(e)}))}))}(function(e){if(t.process&&!t.process.browser)return Promise.resolve(!1);if(!d||!d.importKey||!d.deriveBits)return Promise.resolve(!1);if(void 0!==h[e])return h[e];var n=m(r=r||i.alloc(8),r,10,128,e).then((function(){return!0})).catch((function(){return!1}));return h[e]=n,n}(b).then((function(t){return t?m(e,n,o,a,b):c(e,n,o,a,g)})),v)}else p()((function(){var t;try{t=c(e,n,o,a,g)}catch(e){return v(e)}v(null,t)}))}})),a.register("e25FX",(function(e,t){var n=Math.pow(2,30)-1;e.exports=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>n||t!=t)throw new TypeError("Bad key length")}})),a.register("zQTLA",(function(e,n){var r,o=a("ePtPP");if(t.process&&t.process.browser)r="utf-8";else if(t.process&&t.process.version){r=parseInt(o.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else r="utf-8";e.exports=r})),a.register("8Rgya",(function(e,t){var n=a("i7eWY"),r=a("akTKC"),o=a("5eKyq"),i=a("8ByQm").Buffer,s=a("e25FX"),l=a("zQTLA"),c=a("7PgqL"),u=i.alloc(128),d={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function f(e,t,a){var s=function(e){function t(t){return o(e).update(t).digest()}function i(e){return(new r).update(e).digest()}return"rmd160"===e||"ripemd160"===e?i:"md5"===e?n:t}(e),l="sha512"===e||"sha384"===e?128:64;t.length>l?t=s(t):t.length<l&&(t=i.concat([t,u],l));for(var c=i.allocUnsafe(l+d[e]),f=i.allocUnsafe(l+d[e]),h=0;h<l;h++)c[h]=54^t[h],f[h]=92^t[h];var p=i.allocUnsafe(l+a+4);c.copy(p,0,0,l),this.ipad1=p,this.ipad2=c,this.opad=f,this.alg=e,this.blocksize=l,this.hash=s,this.size=d[e]}f.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=function(e,t,n,r,o){s(n,r);var a=new f(o=o||"sha1",e=c(e,l,"Password"),(t=c(t,l,"Salt")).length),u=i.allocUnsafe(r),h=i.allocUnsafe(t.length+4);t.copy(h,0,0,t.length);for(var p=0,m=d[o],g=Math.ceil(r/m),v=1;v<=g;v++){h.writeUInt32BE(v,t.length);for(var b=a.run(h,a.ipad1),y=b,w=1;w<n;w++){y=a.run(y,a.ipad2);for(var x=0;x<m;x++)b[x]^=y[x]}b.copy(u,p),p+=m}return u}})),a.register("7PgqL",(function(e,t){var n=a("8ByQm").Buffer;e.exports=function(e,t,r){if(n.isBuffer(e))return e;if("string"==typeof e)return n.from(e,t);if(ArrayBuffer.isView(e))return n.from(e.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}})),a.register("3feuT",(function(t,n){var r,o,i,s,l,c,u,d,f,h;e(t.exports,"createCipher",(()=>r),(e=>r=e)),e(t.exports,"Cipher",(()=>o),(e=>o=e)),e(t.exports,"createCipheriv",(()=>i),(e=>i=e)),e(t.exports,"Cipheriv",(()=>s),(e=>s=e)),e(t.exports,"createDecipher",(()=>l),(e=>l=e)),e(t.exports,"Decipher",(()=>c),(e=>c=e)),e(t.exports,"createDecipheriv",(()=>u),(e=>u=e)),e(t.exports,"Decipheriv",(()=>d),(e=>d=e)),e(t.exports,"listCiphers",(()=>f),(e=>f=e)),e(t.exports,"getCiphers",(()=>h),(e=>h=e));var p=a("i5Vju"),m=a("duD0R"),g=a("cD8zA"),v=a("bJC4J"),b=a("2tkTk");function y(e,t,n){if(e=e.toLowerCase(),g[e])return m.createCipheriv(e,t,n);if(v[e])return new p({key:t,iv:n,mode:e});throw new TypeError("invalid suite type")}function w(e,t,n){if(e=e.toLowerCase(),g[e])return m.createDecipheriv(e,t,n);if(v[e])return new p({key:t,iv:n,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}r=o=function(e,t){var n,r;if(e=e.toLowerCase(),g[e])n=g[e].key,r=g[e].iv;else{if(!v[e])throw new TypeError("invalid suite type");n=8*v[e].key,r=v[e].iv}var o=b(t,!1,n,r);return y(e,o.key,o.iv)},i=s=y,l=c=function(e,t){var n,r;if(e=e.toLowerCase(),g[e])n=g[e].key,r=g[e].iv;else{if(!v[e])throw new TypeError("invalid suite type");n=8*v[e].key,r=v[e].iv}var o=b(t,!1,n,r);return w(e,o.key,o.iv)},u=d=w,f=h=function(){return Object.keys(v).concat(m.getCiphers())}})),a.register("i5Vju",(function(e,t){var n=a("9HuUe"),r=a("96ToB"),o=a("5jAh8"),i=a("8ByQm").Buffer,s={"des-ede3-cbc":r.CBC.instantiate(r.EDE),"des-ede3":r.EDE,"des-ede-cbc":r.CBC.instantiate(r.EDE),"des-ede":r.EDE,"des-cbc":r.CBC.instantiate(r.DES),"des-ecb":r.DES};function l(e){n.call(this);var t,r=e.mode.toLowerCase(),o=s[r];t=e.decrypt?"decrypt":"encrypt";var a=e.key;i.isBuffer(a)||(a=i.from(a)),"des-ede"!==r&&"des-ede-cbc"!==r||(a=i.concat([a,a.slice(0,8)]));var l=e.iv;i.isBuffer(l)||(l=i.from(l)),this._des=o.create({key:a,iv:l,type:t})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],e.exports=l,o(l,n),l.prototype._update=function(e){return i.from(this._des.update(e))},l.prototype._final=function(){return i.from(this._des.final())}})),a.register("96ToB",(function(t,n){var r,o,i;e(t.exports,"DES",(()=>r),(e=>r=e)),e(t.exports,"CBC",(()=>o),(e=>o=e)),e(t.exports,"EDE",(()=>i),(e=>i=e)),a("gnnuw"),a("04Bjm"),r=a("gno1I"),o=a("Hz9en"),i=a("8fziB")})),a.register("gnnuw",(function(t,n){var r,o,i,a,s,l,c,u,d,f,h;e(t.exports,"readUInt32BE",(()=>r),(e=>r=e)),e(t.exports,"writeUInt32BE",(()=>o),(e=>o=e)),e(t.exports,"ip",(()=>i),(e=>i=e)),e(t.exports,"rip",(()=>a),(e=>a=e)),e(t.exports,"pc1",(()=>s),(e=>s=e)),e(t.exports,"r28shl",(()=>l),(e=>l=e)),e(t.exports,"pc2",(()=>c),(e=>c=e)),e(t.exports,"expand",(()=>u),(e=>u=e)),e(t.exports,"substitute",(()=>d),(e=>d=e)),e(t.exports,"permute",(()=>f),(e=>f=e)),e(t.exports,"padSplit",(()=>h),(e=>h=e)),r=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},o=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},i=function(e,t,n,r){for(var o=0,i=0,a=6;a>=0;a-=2){for(var s=0;s<=24;s+=8)o<<=1,o|=t>>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>>s+a&1}for(a=6;a>=0;a-=2){for(s=1;s<=25;s+=8)i<<=1,i|=t>>>s+a&1;for(s=1;s<=25;s+=8)i<<=1,i|=e>>>s+a&1}n[r+0]=o>>>0,n[r+1]=i>>>0},a=function(e,t,n,r){for(var o=0,i=0,a=0;a<4;a++)for(var s=24;s>=0;s-=8)o<<=1,o|=t>>>s+a&1,o<<=1,o|=e>>>s+a&1;for(a=4;a<8;a++)for(s=24;s>=0;s-=8)i<<=1,i|=t>>>s+a&1,i<<=1,i|=e>>>s+a&1;n[r+0]=o>>>0,n[r+1]=i>>>0},s=function(e,t,n,r){for(var o=0,i=0,a=7;a>=5;a--){for(var s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(s=0;s<=24;s+=8)o<<=1,o|=e>>s+a&1}for(s=0;s<=24;s+=8)o<<=1,o|=t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)i<<=1,i|=t>>s+a&1;for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1}for(s=0;s<=24;s+=8)i<<=1,i|=e>>s+a&1;n[r+0]=o>>>0,n[r+1]=i>>>0},l=function(e,t){return e<<t&268435455|e>>>28-t};var p=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];c=function(e,t,n,r){for(var o=0,i=0,a=p.length>>>1,s=0;s<a;s++)o<<=1,o|=e>>>p[s]&1;for(s=a;s<p.length;s++)i<<=1,i|=t>>>p[s]&1;n[r+0]=o>>>0,n[r+1]=i>>>0},u=function(e,t,n){var r=0,o=0;r=(1&e)<<5|e>>>27;for(var i=23;i>=15;i-=4)r<<=6,r|=e>>>i&63;for(i=11;i>=3;i-=4)o|=e>>>i&63,o<<=6;o|=(31&e)<<1|e>>>31,t[n+0]=r>>>0,t[n+1]=o>>>0};var m=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];d=function(e,t){for(var n=0,r=0;r<4;r++){n<<=4,n|=m[64*r+(e>>>18-6*r&63)]}for(r=0;r<4;r++){n<<=4,n|=m[256+64*r+(t>>>18-6*r&63)]}return n>>>0};var g=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];f=function(e){for(var t=0,n=0;n<g.length;n++)t<<=1,t|=e>>>g[n]&1;return t>>>0},h=function(e,t,n){for(var r=e.toString(2);r.length<t;)r="0"+r;for(var o=[],i=0;i<t;i+=n)o.push(r.slice(i,i+n));return o.join(" ")}})),a.register("04Bjm",(function(e,t){"use strict";var n=a("iGZtb");function r(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=r,r.prototype._init=function(){},r.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},r.prototype._buffer=function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),r=0;r<n;r++)this.buffer[this.bufferOff+r]=e[t+r];return this.bufferOff+=n,n},r.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},r.prototype._updateEncrypt=function(e){var t=0,n=0,r=(this.bufferOff+e.length)/this.blockSize|0,o=new Array(r*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(o,n)));for(var i=e.length-(e.length-t)%this.blockSize;t<i;t+=this.blockSize)this._update(e,t,o,n),n+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return o},r.prototype._updateDecrypt=function(e){for(var t=0,n=0,r=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,o=new Array(r*this.blockSize);r>0;r--)t+=this._buffer(e,t),n+=this._flushBuffer(o,n);return t+=this._buffer(e,t),o},r.prototype.final=function(e){var t,n;return e&&(t=this.update(e)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},r.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},r.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},r.prototype._unpad=function(e){return e},r.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}})),a.register("iGZtb",(function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}})),a.register("gno1I",(function(e,t){"use strict";var n=a("iGZtb"),r=a("5jAh8"),o=a("gnnuw"),i=a("04Bjm");function s(){this.tmp=new Array(2),this.keys=null}function l(e){i.call(this,e);var t=new s;this._desState=t,this.deriveKeys(t,e.key)}r(l,i),e.exports=l,l.create=function(e){return new l(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];l.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var r=o.readUInt32BE(t,0),i=o.readUInt32BE(t,4);o.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var a=0;a<e.keys.length;a+=2){var s=c[a>>>1];r=o.r28shl(r,s),i=o.r28shl(i,s),o.pc2(r,i,e.keys,a)}},l.prototype._update=function(e,t,n,r){var i=this._desState,a=o.readUInt32BE(e,t),s=o.readUInt32BE(e,t+4);o.ip(a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,s,i.tmp,0):this._decrypt(i,a,s,i.tmp,0),a=i.tmp[0],s=i.tmp[1],o.writeUInt32BE(n,a,r),o.writeUInt32BE(n,s,r+4)},l.prototype._pad=function(e,t){for(var n=e.length-t,r=t;r<e.length;r++)e[r]=n;return!0},l.prototype._unpad=function(e){for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)n.equal(e[r],t);return e.slice(0,e.length-t)},l.prototype._encrypt=function(e,t,n,r,i){for(var a=t,s=n,l=0;l<e.keys.length;l+=2){var c=e.keys[l],u=e.keys[l+1];o.expand(s,e.tmp,0),c^=e.tmp[0],u^=e.tmp[1];var d=o.substitute(c,u),f=s;s=(a^o.permute(d))>>>0,a=f}o.rip(s,a,r,i)},l.prototype._decrypt=function(e,t,n,r,i){for(var a=n,s=t,l=e.keys.length-2;l>=0;l-=2){var c=e.keys[l],u=e.keys[l+1];o.expand(a,e.tmp,0),c^=e.tmp[0],u^=e.tmp[1];var d=o.substitute(c,u),f=a;a=(s^o.permute(d))>>>0,s=f}o.rip(a,s,r,i)}})),a.register("Hz9en",(function(t,n){var r;e(t.exports,"instantiate",(()=>r),(e=>r=e));var o=a("iGZtb"),i=a("5jAh8"),s={};function l(e){o.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}r=function(e){function t(t){e.call(this,t),this._cbcInit()}i(t,e);for(var n=Object.keys(s),r=0;r<n.length;r++){var o=n[r];t.prototype[o]=s[o]}return t.create=function(e){return new t(e)},t},s._cbcInit=function(){var e=new l(this.options.iv);this._cbcState=e},s._update=function(e,t,n,r){var o=this._cbcState,i=this.constructor.super_.prototype,a=o.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)a[s]^=e[t+s];i._update.call(this,a,0,n,r);for(s=0;s<this.blockSize;s++)a[s]=n[r+s]}else{i._update.call(this,e,t,n,r);for(s=0;s<this.blockSize;s++)n[r+s]^=a[s];for(s=0;s<this.blockSize;s++)a[s]=e[t+s]}}})),a.register("8fziB",(function(e,t){"use strict";var n=a("iGZtb"),r=a("5jAh8"),o=a("04Bjm"),i=a("gno1I");function s(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),o=t.slice(8,16),a=t.slice(16,24);this.ciphers="encrypt"===e?[i.create({type:"encrypt",key:r}),i.create({type:"decrypt",key:o}),i.create({type:"encrypt",key:a})]:[i.create({type:"decrypt",key:a}),i.create({type:"encrypt",key:o}),i.create({type:"decrypt",key:r})]}function l(e){o.call(this,e);var t=new s(this.type,this.options.key);this._edeState=t}r(l,o),e.exports=l,l.create=function(e){return new l(e)},l.prototype._update=function(e,t,n,r){var o=this._edeState;o.ciphers[0]._update(e,t,n,r),o.ciphers[1]._update(n,r,n,r),o.ciphers[2]._update(n,r,n,r)},l.prototype._pad=i.prototype._pad,l.prototype._unpad=i.prototype._unpad})),a.register("duD0R",(function(t,n){var r,o,i;e(t.exports,"createCipheriv",(()=>r),(e=>r=e)),e(t.exports,"createDecipheriv",(()=>o),(e=>o=e)),e(t.exports,"getCiphers",(()=>i),(e=>i=e));var s=a("7ArtE"),l=a("4nqK6"),c=a("6P430");s.createCipher,r=s.createCipheriv,l.createDecipher,o=l.createDecipheriv,i=function(){return Object.keys(c)}})),a.register("7ArtE",(function(t,n){var r,o;e(t.exports,"createCipheriv",(()=>r),(e=>r=e)),e(t.exports,"createCipher",(()=>o),(e=>o=e));var i=a("cD8zA"),s=a("dU8tN"),l=a("8ByQm").Buffer,c=a("kqHo3"),u=a("9HuUe"),d=a("5gOZ5"),f=a("2tkTk");function h(e,t,n){u.call(this),this._cache=new m,this._cipher=new d.AES(t),this._prev=l.from(n),this._mode=e,this._autopadding=!0}a("5jAh8")(h,u),h.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get();)n=this._mode.encrypt(this,t),r.push(n);return l.concat(r)};var p=l.alloc(16,16);function m(){this.cache=l.allocUnsafe(0)}function g(e,t,n){var r=i[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=l.from(t)),t.length!==r.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof n&&(n=l.from(n)),"GCM"!==r.mode&&n.length!==r.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===r.type?new c(r.module,t,n):"auth"===r.type?new s(r.module,t,n):new h(r.module,t,n)}h.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(p))throw this._cipher.scrub(),new Error("data not multiple of block length")},h.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},m.prototype.add=function(e){this.cache=l.concat([this.cache,e])},m.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},m.prototype.flush=function(){for(var e=16-this.cache.length,t=l.allocUnsafe(e),n=-1;++n<e;)t.writeUInt8(e,n);return l.concat([this.cache,t])},r=g,o=function(e,t){var n=i[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=f(t,!1,n.key,n.iv);return g(e,r.key,r.iv)}})),a.register("cD8zA",(function(e,t){var n={ECB:a("fmYcl"),CBC:a("hyeta"),CFB:a("dABZp"),CFB8:a("f4OJE"),CFB1:a("hUOdV"),OFB:a("49TA8"),CTR:a("bSabi"),GCM:a("bSabi")},r=a("6P430");for(var o in r)r[o].module=n[r[o].mode];e.exports=r})),a.register("fmYcl",(function(t,n){var r,o;e(t.exports,"encrypt",(()=>r),(e=>r=e)),e(t.exports,"decrypt",(()=>o),(e=>o=e)),r=function(e,t){return e._cipher.encryptBlock(t)},o=function(e,t){return e._cipher.decryptBlock(t)}})),a.register("hyeta",(function(t,n){var r,o;e(t.exports,"encrypt",(()=>r),(e=>r=e)),e(t.exports,"decrypt",(()=>o),(e=>o=e));var i=a("i9W9Q");r=function(e,t){var n=i(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},o=function(e,t){var n=e._prev;e._prev=t;var r=e._cipher.decryptBlock(t);return i(r,n)}})),a.register("i9W9Q",(function(e,t){var n=a("bqBrJ").Buffer;e.exports=function(e,t){for(var r=Math.min(e.length,t.length),o=new n(r),i=0;i<r;++i)o[i]=e[i]^t[i];return o}})),a.register("dABZp",(function(t,n){var r;e(t.exports,"encrypt",(()=>r),(e=>r=e));var o=a("8ByQm").Buffer,i=a("i9W9Q");function s(e,t,n){var r=t.length,a=i(t,e._cache);return e._cache=e._cache.slice(r),e._prev=o.concat([e._prev,n?t:a]),a}r=function(e,t,n){for(var r,i=o.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=o.allocUnsafe(0)),!(e._cache.length<=t.length)){i=o.concat([i,s(e,t,n)]);break}r=e._cache.length,i=o.concat([i,s(e,t.slice(0,r),n)]),t=t.slice(r)}return i}})),a.register("f4OJE",(function(t,n){var r;e(t.exports,"encrypt",(()=>r),(e=>r=e));var o=a("8ByQm").Buffer;function i(e,t,n){var r=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=o.concat([e._prev.slice(1),o.from([n?t:r])]),r}r=function(e,t,n){for(var r=t.length,a=o.allocUnsafe(r),s=-1;++s<r;)a[s]=i(e,t[s],n);return a}})),a.register("hUOdV",(function(t,n){var r;e(t.exports,"encrypt",(()=>r),(e=>r=e));var o=a("8ByQm").Buffer;function i(e,t,n){for(var r,o,i=-1,a=0;++i<8;)r=t&1<<7-i?128:0,a+=(128&(o=e._cipher.encryptBlock(e._prev)[0]^r))>>i%8,e._prev=s(e._prev,n?r:o);return a}function s(e,t){var n=e.length,r=-1,i=o.allocUnsafe(e.length);for(e=o.concat([e,o.from([t])]);++r<n;)i[r]=e[r]<<1|e[r+1]>>7;return i}r=function(e,t,n){for(var r=t.length,a=o.allocUnsafe(r),s=-1;++s<r;)a[s]=i(e,t[s],n);return a}})),a.register("49TA8",(function(t,n){var r;e(t.exports,"encrypt",(()=>r),(e=>r=e));var o=a("bqBrJ").Buffer,i=a("i9W9Q");function s(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}r=function(e,t){for(;e._cache.length<t.length;)e._cache=o.concat([e._cache,s(e)]);var n=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),i(t,n)}})),a.register("bSabi",(function(t,n){var r;e(t.exports,"encrypt",(()=>r),(e=>r=e));var o=a("i9W9Q"),i=a("8ByQm").Buffer,s=a("dPGrC");function l(e){var t=e._cipher.encryptBlockRaw(e._prev);return s(e._prev),t}r=function(e,t){var n=Math.ceil(t.length/16),r=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*n)]);for(var a=0;a<n;a++){var s=l(e),c=r+16*a;e._cache.writeUInt32BE(s[0],c+0),e._cache.writeUInt32BE(s[1],c+4),e._cache.writeUInt32BE(s[2],c+8),e._cache.writeUInt32BE(s[3],c+12)}var u=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),o(t,u)}})),a.register("dPGrC",(function(e,t){e.exports=function(e){for(var t,n=e.length;n--;){if(255!==(t=e.readUInt8(n))){t++,e.writeUInt8(t,n);break}e.writeUInt8(0,n)}}})),a.register("6P430",(function(e,t){e.exports=JSON.parse('{"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"}}')})),a.register("dU8tN",(function(e,t){var n=a("5gOZ5"),r=a("8ByQm").Buffer,o=a("9HuUe"),i=a("5jAh8"),s=a("zwlJI"),l=a("i9W9Q"),c=a("dPGrC");function u(e,t,i,a){o.call(this);var l=r.alloc(4,0);this._cipher=new n.AES(t);var u=this._cipher.encryptBlock(l);this._ghash=new s(u),i=function(e,t,n){if(12===t.length)return e._finID=r.concat([t,r.from([0,0,0,1])]),r.concat([t,r.from([0,0,0,2])]);var o=new s(n),i=t.length,a=i%16;o.update(t),a&&(a=16-a,o.update(r.alloc(a,0))),o.update(r.alloc(8,0));var l=8*i,u=r.alloc(8);u.writeUIntBE(l,0,8),o.update(u),e._finID=o.state;var d=r.from(e._finID);return c(d),d}(this,i,u),this._prev=r.from(i),this._cache=r.allocUnsafe(0),this._secCache=r.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}i(u,o),u.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=r.alloc(t,0),this._ghash.update(t))}this._called=!0;var n=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(n),this._len+=e.length,n},u.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=l(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var n=0;e.length!==t.length&&n++;for(var r=Math.min(e.length,t.length),o=0;o<r;++o)n+=e[o]^t[o];return n}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},u.prototype.getAuthTag=function(){if(this._decrypt||!r.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},u.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},u.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},e.exports=u})),a.register("5gOZ5",(function(t,n){var r;e(t.exports,"AES",(()=>r),(e=>r=e));var o=a("8ByQm").Buffer;function i(e){o.isBuffer(e)||(e=o.from(e));for(var t=e.length/4|0,n=new Array(t),r=0;r<t;r++)n[r]=e.readUInt32BE(4*r);return n}function s(e){for(;0<e.length;e++)e[0]=0}function l(e,t,n,r,o){for(var i,a,s,l,c=n[0],u=n[1],d=n[2],f=n[3],h=e[0]^t[0],p=e[1]^t[1],m=e[2]^t[2],g=e[3]^t[3],v=4,b=1;b<o;b++)i=c[h>>>24]^u[p>>>16&255]^d[m>>>8&255]^f[255&g]^t[v++],a=c[p>>>24]^u[m>>>16&255]^d[g>>>8&255]^f[255&h]^t[v++],s=c[m>>>24]^u[g>>>16&255]^d[h>>>8&255]^f[255&p]^t[v++],l=c[g>>>24]^u[h>>>16&255]^d[p>>>8&255]^f[255&m]^t[v++],h=i,p=a,m=s,g=l;return i=(r[h>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&g])^t[v++],a=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[g>>>8&255]<<8|r[255&h])^t[v++],s=(r[m>>>24]<<24|r[g>>>16&255]<<16|r[h>>>8&255]<<8|r[255&p])^t[v++],l=(r[g>>>24]<<24|r[h>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^t[v++],[i>>>=0,a>>>=0,s>>>=0,l>>>=0]}var c=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],r=[],o=[[],[],[],[]],i=[[],[],[],[]],a=0,s=0,l=0;l<256;++l){var c=s^s<<1^s<<2^s<<3^s<<4;c=c>>>8^255&c^99,n[a]=c,r[c]=a;var u=e[a],d=e[u],f=e[d],h=257*e[c]^16843008*c;o[0][a]=h<<24|h>>>8,o[1][a]=h<<16|h>>>16,o[2][a]=h<<8|h>>>24,o[3][a]=h,h=16843009*f^65537*d^257*u^16843008*a,i[0][c]=h<<24|h>>>8,i[1][c]=h<<16|h>>>16,i[2][c]=h<<8|h>>>24,i[3][c]=h,0===a?a=s=1:(a=u^e[e[e[f^u]]],s^=e[e[s]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:o,INV_SUB_MIX:i}}();function d(e){this._key=i(e),this._reset()}d.blockSize=16,d.keySize=32,d.prototype.blockSize=d.blockSize,d.prototype.keySize=d.keySize,d.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,r=4*(n+1),o=[],i=0;i<t;i++)o[i]=e[i];for(i=t;i<r;i++){var a=o[i-1];i%t==0?(a=a<<8|a>>>24,a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=c[i/t|0]<<24):t>6&&i%t==4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),o[i]=o[i-t]^a}for(var s=[],l=0;l<r;l++){var d=r-l,f=o[d-(l%4?0:4)];s[l]=l<4||d<=4?f:u.INV_SUB_MIX[0][u.SBOX[f>>>24]]^u.INV_SUB_MIX[1][u.SBOX[f>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[f>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&f]]}this._nRounds=n,this._keySchedule=o,this._invKeySchedule=s},d.prototype.encryptBlockRaw=function(e){return l(e=i(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},d.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=o.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},d.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var n=l(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),r=o.allocUnsafe(16);return r.writeUInt32BE(n[0],0),r.writeUInt32BE(n[3],4),r.writeUInt32BE(n[2],8),r.writeUInt32BE(n[1],12),r},d.prototype.scrub=function(){s(this._keySchedule),s(this._invKeySchedule),s(this._key)},r=d})),a.register("zwlJI",(function(e,t){var n=a("8ByQm").Buffer,r=n.alloc(16,0);function o(e){var t=n.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 i(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}i.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},i.prototype._multiply=function(){for(var e,t,n,r=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],a=-1;++a<128;){for(0!=(this.state[~~(a/8)]&1<<7-a%8)&&(i[0]^=r[0],i[1]^=r[1],i[2]^=r[2],i[3]^=r[3]),n=0!=(1&r[3]),t=3;t>0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,n&&(r[0]=-520093696^r[0])}this.state=o(i)},i.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},i.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,r],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=i})),a.register("kqHo3",(function(e,t){var n=a("5gOZ5"),r=a("8ByQm").Buffer,o=a("9HuUe");function i(e,t,i,a){o.call(this),this._cipher=new n.AES(t),this._prev=r.from(i),this._cache=r.allocUnsafe(0),this._secCache=r.allocUnsafe(0),this._decrypt=a,this._mode=e}a("5jAh8")(i,o),i.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},i.prototype._final=function(){this._cipher.scrub()},e.exports=i})),a.register("2tkTk",(function(e,t){var n=a("8ByQm").Buffer,r=a("d5AKh");e.exports=function(e,t,o,i){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var a=o/8,s=n.alloc(a),l=n.alloc(i||0),c=n.alloc(0);a>0||i>0;){var u=new r;u.update(c),u.update(e),t&&u.update(t),c=u.digest();var d=0;if(a>0){var f=s.length-a;d=Math.min(a,c.length),c.copy(s,f,0,d),a-=d}if(d<c.length&&i>0){var h=l.length-i,p=Math.min(i,c.length-d);c.copy(l,h,d,d+p),i-=p}}return c.fill(0),{key:s,iv:l}}})),a.register("4nqK6",(function(t,n){var r,o;e(t.exports,"createDecipher",(()=>r),(e=>r=e)),e(t.exports,"createDecipheriv",(()=>o),(e=>o=e));var i=a("dU8tN"),s=a("8ByQm").Buffer,l=a("cD8zA"),c=a("kqHo3"),u=a("9HuUe"),d=a("5gOZ5"),f=a("2tkTk");function h(e,t,n){u.call(this),this._cache=new p,this._last=void 0,this._cipher=new d.AES(t),this._prev=s.from(n),this._mode=e,this._autopadding=!0}function p(){this.cache=s.allocUnsafe(0)}function m(e,t,n){var r=l[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=s.from(n)),"GCM"!==r.mode&&n.length!==r.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof t&&(t=s.from(t)),t.length!==r.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===r.type?new c(r.module,t,n,!0):"auth"===r.type?new i(r.module,t,n,!0):new h(r.module,t,n)}a("5jAh8")(h,u),h.prototype._update=function(e){var t,n;this._cache.add(e);for(var r=[];t=this._cache.get(this._autopadding);)n=this._mode.decrypt(this,t),r.push(n);return s.concat(r)},h.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var n=-1;for(;++n<t;)if(e[n+(16-t)]!==t)throw new Error("unable to decrypt data");if(16===t)return;return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},h.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},p.prototype.add=function(e){this.cache=s.concat([this.cache,e])},p.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},p.prototype.flush=function(){if(this.cache.length)return this.cache},r=function(e,t){var n=l[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=f(t,!1,n.key,n.iv);return m(e,r.key,r.iv)},o=m})),a.register("bJC4J",(function(t,n){var r,o,i,a,s,l,c,u;e(t.exports,"des-ecb",(()=>r),(e=>r=e)),e(t.exports,"des-cbc",(()=>o),(e=>o=e)),e(t.exports,"des",(()=>i),(e=>i=e)),e(t.exports,"des-ede3-cbc",(()=>a),(e=>a=e)),e(t.exports,"des3",(()=>s),(e=>s=e)),e(t.exports,"des-ede3",(()=>l),(e=>l=e)),e(t.exports,"des-ede-cbc",(()=>c),(e=>c=e)),e(t.exports,"des-ede",(()=>u),(e=>u=e)),r={key:8,iv:0},o=i={key:8,iv:8},a=s={key:24,iv:8},l={key:24,iv:0},c={key:16,iv:8},u={key:16,iv:0}})),a.register("hzteC",(function(t,n){var r,o,i,s,l;e(t.exports,"DiffieHellmanGroup",(()=>r),(e=>r=e)),e(t.exports,"createDiffieHellmanGroup",(()=>o),(e=>o=e)),e(t.exports,"getDiffieHellman",(()=>i),(e=>i=e)),e(t.exports,"createDiffieHellman",(()=>s),(e=>s=e)),e(t.exports,"DiffieHellman",(()=>l),(e=>l=e));var c=a("bqBrJ").Buffer,u=a("iHSaM"),d=a("eDa4Q"),f=a("8cNuf");var h={binary:!0,hex:!0,base64:!0};r=o=i=function(e){var t=new c(d[e].prime,"hex"),n=new c(d[e].gen,"hex");return new f(t,n)},s=l=function e(t,n,r,o){return c.isBuffer(n)||void 0===h[n]?e(t,"binary",n,r):(n=n||"binary",o=o||"binary",r=r||new c([2]),c.isBuffer(r)||(r=new c(r,o)),"number"==typeof t?new f(u(t,r),r,!0):(c.isBuffer(t)||(t=new c(t,n)),new f(t,r,!0)))}})),a.register("iHSaM",(function(e,t){var n=a("3xr1Z");e.exports=v,v.simpleSieve=m,v.fermatTest=g;var r=a("jXr8Y"),o=new r(24),i=new(a("eYSrG")),s=new r(1),l=new r(2),c=new r(5),u=(new r(16),new r(8),new r(10)),d=new r(3),f=(new r(7),new r(11)),h=new r(4),p=(new r(12),null);function m(e){for(var t=function(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,n=3;n<1048576;n+=2){for(var r=Math.ceil(Math.sqrt(n)),o=0;o<t&&e[o]<=r&&n%e[o]!=0;o++);t!==o&&e[o]<=r||(e[t++]=n)}return p=e,e}(),n=0;n<t.length;n++)if(0===e.modn(t[n]))return 0===e.cmpn(t[n]);return!0}function g(e){var t=r.mont(e);return 0===l.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function v(e,t){if(e<16)return new r(2===t||5===t?[140,123]:[140,39]);var a,p;for(t=new r(t);;){for(a=new r(n(Math.ceil(e/8)));a.bitLength()>e;)a.ishrn(1);if(a.isEven()&&a.iadd(s),a.testn(1)||a.iadd(l),t.cmp(l)){if(!t.cmp(c))for(;a.mod(u).cmp(d);)a.iadd(h)}else for(;a.mod(o).cmp(f);)a.iadd(h);if(m(p=a.shrn(1))&&m(a)&&g(p)&&g(a)&&i.test(p)&&i.test(a))return a}}})),a.register("jXr8Y",(function(e,t){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var i;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{i="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:a("1DJXa").Buffer}catch(e){}function s(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function l(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,n,r){for(var o=0,i=Math.min(e.length,n),a=t;a<i;a++){var s=e.charCodeAt(a)-48;o*=r,o+=s>=49?s-49+10:s>=17?s-17+10:s}return o}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o<e.length&&(16===t?this._parseHex(e,o,r):(this._parseBase(e,t,o),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){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):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("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 o=0;o<this.length;o++)this.words[o]=0;var i,a,s=0;if("be"===r)for(o=e.length-1,i=0;o>=0;o-=3)a=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[i]|=a<<s&67108863,this.words[i+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(o=0,i=0;o<e.length;o+=3)a=e[o]|e[o+1]<<8|e[o+2]<<16,this.words[i]|=a<<s&67108863,this.words[i+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this.strip()},o.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var o,i=0,a=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)o=l(e,t,r)<<i,this.words[a]|=67108863&o,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)o=l(e,t,r)<<i,this.words[a]|=67108863&o,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;this.strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,o=1;o<=67108863;o*=t)r++;r--,o=o/t|0;for(var i=e.length-n,a=i%r,s=Math.min(i,i-a)+n,l=0,u=n;u<s;u+=r)l=c(e,u,u+r,t),this.imuln(o),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==a){var d=1;for(l=c(e,u,e.length,t),u=0;u<a;u++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this.strip()},o.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},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.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"],d=[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],f=[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 h(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var o=0|e.words[0],i=0|t.words[0],a=o*i,s=67108863&a,l=a/67108864|0;n.words[0]=s;for(var c=1;c<r;c++){for(var u=l>>>26,d=67108863&l,f=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=f;h++){var p=c-h|0;u+=(a=(o=0|e.words[p])*(i=0|t.words[h])+d)/67108864|0,d=67108863&a}n.words[c]=0|d,l=0|u}return 0!==l?n.words[c]=0|l:n.length--,n.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var o=0,i=0,a=0;a<this.length;a++){var s=this.words[a],l=(16777215&(s<<o|i)).toString(16);r=0!==(i=s>>>24-o&16777215)||a!==this.length-1?u[6-l.length]+l+r:l+r,(o+=2)>=26&&(o-=26,a--)}for(0!==i&&(r=i.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],h=f[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(h).toString(e);r=(p=p.idivn(h)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==i),this.toArrayLike(i,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var o=this.byteLength(),i=r||Math.max(1,o);n(o<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var a,s,l="le"===t,c=new e(i),u=this.clone();if(l){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),c[s]=a;for(;s<i;s++)c[s]=0}else{for(s=0;s<i-o;s++)c[s]=0;for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),c[i-s-1]=a}return c},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.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()},o.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var o=0;o<t;o++)this.words[o]=67108863&~this.words[o];return r>0&&(this.words[o]=~this.words[o]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,o=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<o:this.words[r]&~(1<<o),this.strip()},o.prototype.iadd=function(e){var t,n,r;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?(n=this,r=e):(n=e,r=this);for(var o=0,i=0;i<r.length;i++)t=(0|n.words[i])+(0|r.words[i])+o,this.words[i]=67108863&t,o=t>>>26;for(;0!==o&&i<n.length;i++)t=(0|n.words[i])+o,this.words[i]=67108863&t,o=t>>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;i<n.length;i++)this.words[i]=n.words[i];return this},o.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)},o.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 n,r,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a<r.length;a++)i=(t=(0|n.words[a])-(0|r.words[a])+i)>>26,this.words[a]=67108863&t;for(;0!==i&&a<n.length;a++)i=(t=(0|n.words[a])+i)>>26,this.words[a]=67108863&t;if(0===i&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,n){var r,o,i,a=e.words,s=t.words,l=n.words,c=0,u=0|a[0],d=8191&u,f=u>>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],v=8191&g,b=g>>>13,y=0|a[3],w=8191&y,x=y>>>13,S=0|a[4],M=8191&S,_=S>>>13,E=0|a[5],A=8191&E,C=E>>>13,k=0|a[6],T=8191&k,I=k>>>13,O=0|a[7],R=8191&O,P=O>>>13,N=0|a[8],L=8191&N,B=N>>>13,D=0|a[9],j=8191&D,F=D>>>13,z=0|s[0],U=8191&z,H=z>>>13,G=0|s[1],W=8191&G,V=G>>>13,q=0|s[2],K=8191&q,$=q>>>13,J=0|s[3],X=8191&J,Q=J>>>13,Y=0|s[4],Z=8191&Y,ee=Y>>>13,te=0|s[5],ne=8191&te,re=te>>>13,oe=0|s[6],ie=8191&oe,ae=oe>>>13,se=0|s[7],le=8191&se,ce=se>>>13,ue=0|s[8],de=8191&ue,fe=ue>>>13,he=0|s[9],pe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(c+(r=Math.imul(d,U))|0)+((8191&(o=(o=Math.imul(d,H))+Math.imul(f,U)|0))<<13)|0;c=((i=Math.imul(f,H))+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,U),o=(o=Math.imul(p,H))+Math.imul(m,U)|0,i=Math.imul(m,H);var ve=(c+(r=r+Math.imul(d,W)|0)|0)+((8191&(o=(o=o+Math.imul(d,V)|0)+Math.imul(f,W)|0))<<13)|0;c=((i=i+Math.imul(f,V)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,U),o=(o=Math.imul(v,H))+Math.imul(b,U)|0,i=Math.imul(b,H),r=r+Math.imul(p,W)|0,o=(o=o+Math.imul(p,V)|0)+Math.imul(m,W)|0,i=i+Math.imul(m,V)|0;var be=(c+(r=r+Math.imul(d,K)|0)|0)+((8191&(o=(o=o+Math.imul(d,$)|0)+Math.imul(f,K)|0))<<13)|0;c=((i=i+Math.imul(f,$)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(w,U),o=(o=Math.imul(w,H))+Math.imul(x,U)|0,i=Math.imul(x,H),r=r+Math.imul(v,W)|0,o=(o=o+Math.imul(v,V)|0)+Math.imul(b,W)|0,i=i+Math.imul(b,V)|0,r=r+Math.imul(p,K)|0,o=(o=o+Math.imul(p,$)|0)+Math.imul(m,K)|0,i=i+Math.imul(m,$)|0;var ye=(c+(r=r+Math.imul(d,X)|0)|0)+((8191&(o=(o=o+Math.imul(d,Q)|0)+Math.imul(f,X)|0))<<13)|0;c=((i=i+Math.imul(f,Q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(M,U),o=(o=Math.imul(M,H))+Math.imul(_,U)|0,i=Math.imul(_,H),r=r+Math.imul(w,W)|0,o=(o=o+Math.imul(w,V)|0)+Math.imul(x,W)|0,i=i+Math.imul(x,V)|0,r=r+Math.imul(v,K)|0,o=(o=o+Math.imul(v,$)|0)+Math.imul(b,K)|0,i=i+Math.imul(b,$)|0,r=r+Math.imul(p,X)|0,o=(o=o+Math.imul(p,Q)|0)+Math.imul(m,X)|0,i=i+Math.imul(m,Q)|0;var we=(c+(r=r+Math.imul(d,Z)|0)|0)+((8191&(o=(o=o+Math.imul(d,ee)|0)+Math.imul(f,Z)|0))<<13)|0;c=((i=i+Math.imul(f,ee)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(A,U),o=(o=Math.imul(A,H))+Math.imul(C,U)|0,i=Math.imul(C,H),r=r+Math.imul(M,W)|0,o=(o=o+Math.imul(M,V)|0)+Math.imul(_,W)|0,i=i+Math.imul(_,V)|0,r=r+Math.imul(w,K)|0,o=(o=o+Math.imul(w,$)|0)+Math.imul(x,K)|0,i=i+Math.imul(x,$)|0,r=r+Math.imul(v,X)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(b,X)|0,i=i+Math.imul(b,Q)|0,r=r+Math.imul(p,Z)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(m,Z)|0,i=i+Math.imul(m,ee)|0;var xe=(c+(r=r+Math.imul(d,ne)|0)|0)+((8191&(o=(o=o+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;c=((i=i+Math.imul(f,re)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(T,U),o=(o=Math.imul(T,H))+Math.imul(I,U)|0,i=Math.imul(I,H),r=r+Math.imul(A,W)|0,o=(o=o+Math.imul(A,V)|0)+Math.imul(C,W)|0,i=i+Math.imul(C,V)|0,r=r+Math.imul(M,K)|0,o=(o=o+Math.imul(M,$)|0)+Math.imul(_,K)|0,i=i+Math.imul(_,$)|0,r=r+Math.imul(w,X)|0,o=(o=o+Math.imul(w,Q)|0)+Math.imul(x,X)|0,i=i+Math.imul(x,Q)|0,r=r+Math.imul(v,Z)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(b,Z)|0,i=i+Math.imul(b,ee)|0,r=r+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,re)|0)+Math.imul(m,ne)|0,i=i+Math.imul(m,re)|0;var Se=(c+(r=r+Math.imul(d,ie)|0)|0)+((8191&(o=(o=o+Math.imul(d,ae)|0)+Math.imul(f,ie)|0))<<13)|0;c=((i=i+Math.imul(f,ae)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(R,U),o=(o=Math.imul(R,H))+Math.imul(P,U)|0,i=Math.imul(P,H),r=r+Math.imul(T,W)|0,o=(o=o+Math.imul(T,V)|0)+Math.imul(I,W)|0,i=i+Math.imul(I,V)|0,r=r+Math.imul(A,K)|0,o=(o=o+Math.imul(A,$)|0)+Math.imul(C,K)|0,i=i+Math.imul(C,$)|0,r=r+Math.imul(M,X)|0,o=(o=o+Math.imul(M,Q)|0)+Math.imul(_,X)|0,i=i+Math.imul(_,Q)|0,r=r+Math.imul(w,Z)|0,o=(o=o+Math.imul(w,ee)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,ee)|0,r=r+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,re)|0)+Math.imul(b,ne)|0,i=i+Math.imul(b,re)|0,r=r+Math.imul(p,ie)|0,o=(o=o+Math.imul(p,ae)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,ae)|0;var Me=(c+(r=r+Math.imul(d,le)|0)|0)+((8191&(o=(o=o+Math.imul(d,ce)|0)+Math.imul(f,le)|0))<<13)|0;c=((i=i+Math.imul(f,ce)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,U),o=(o=Math.imul(L,H))+Math.imul(B,U)|0,i=Math.imul(B,H),r=r+Math.imul(R,W)|0,o=(o=o+Math.imul(R,V)|0)+Math.imul(P,W)|0,i=i+Math.imul(P,V)|0,r=r+Math.imul(T,K)|0,o=(o=o+Math.imul(T,$)|0)+Math.imul(I,K)|0,i=i+Math.imul(I,$)|0,r=r+Math.imul(A,X)|0,o=(o=o+Math.imul(A,Q)|0)+Math.imul(C,X)|0,i=i+Math.imul(C,Q)|0,r=r+Math.imul(M,Z)|0,o=(o=o+Math.imul(M,ee)|0)+Math.imul(_,Z)|0,i=i+Math.imul(_,ee)|0,r=r+Math.imul(w,ne)|0,o=(o=o+Math.imul(w,re)|0)+Math.imul(x,ne)|0,i=i+Math.imul(x,re)|0,r=r+Math.imul(v,ie)|0,o=(o=o+Math.imul(v,ae)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,ae)|0,r=r+Math.imul(p,le)|0,o=(o=o+Math.imul(p,ce)|0)+Math.imul(m,le)|0,i=i+Math.imul(m,ce)|0;var _e=(c+(r=r+Math.imul(d,de)|0)|0)+((8191&(o=(o=o+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;c=((i=i+Math.imul(f,fe)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(j,U),o=(o=Math.imul(j,H))+Math.imul(F,U)|0,i=Math.imul(F,H),r=r+Math.imul(L,W)|0,o=(o=o+Math.imul(L,V)|0)+Math.imul(B,W)|0,i=i+Math.imul(B,V)|0,r=r+Math.imul(R,K)|0,o=(o=o+Math.imul(R,$)|0)+Math.imul(P,K)|0,i=i+Math.imul(P,$)|0,r=r+Math.imul(T,X)|0,o=(o=o+Math.imul(T,Q)|0)+Math.imul(I,X)|0,i=i+Math.imul(I,Q)|0,r=r+Math.imul(A,Z)|0,o=(o=o+Math.imul(A,ee)|0)+Math.imul(C,Z)|0,i=i+Math.imul(C,ee)|0,r=r+Math.imul(M,ne)|0,o=(o=o+Math.imul(M,re)|0)+Math.imul(_,ne)|0,i=i+Math.imul(_,re)|0,r=r+Math.imul(w,ie)|0,o=(o=o+Math.imul(w,ae)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,ae)|0,r=r+Math.imul(v,le)|0,o=(o=o+Math.imul(v,ce)|0)+Math.imul(b,le)|0,i=i+Math.imul(b,ce)|0,r=r+Math.imul(p,de)|0,o=(o=o+Math.imul(p,fe)|0)+Math.imul(m,de)|0,i=i+Math.imul(m,fe)|0;var Ee=(c+(r=r+Math.imul(d,pe)|0)|0)+((8191&(o=(o=o+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;c=((i=i+Math.imul(f,me)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(j,W),o=(o=Math.imul(j,V))+Math.imul(F,W)|0,i=Math.imul(F,V),r=r+Math.imul(L,K)|0,o=(o=o+Math.imul(L,$)|0)+Math.imul(B,K)|0,i=i+Math.imul(B,$)|0,r=r+Math.imul(R,X)|0,o=(o=o+Math.imul(R,Q)|0)+Math.imul(P,X)|0,i=i+Math.imul(P,Q)|0,r=r+Math.imul(T,Z)|0,o=(o=o+Math.imul(T,ee)|0)+Math.imul(I,Z)|0,i=i+Math.imul(I,ee)|0,r=r+Math.imul(A,ne)|0,o=(o=o+Math.imul(A,re)|0)+Math.imul(C,ne)|0,i=i+Math.imul(C,re)|0,r=r+Math.imul(M,ie)|0,o=(o=o+Math.imul(M,ae)|0)+Math.imul(_,ie)|0,i=i+Math.imul(_,ae)|0,r=r+Math.imul(w,le)|0,o=(o=o+Math.imul(w,ce)|0)+Math.imul(x,le)|0,i=i+Math.imul(x,ce)|0,r=r+Math.imul(v,de)|0,o=(o=o+Math.imul(v,fe)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,fe)|0;var Ae=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((i=i+Math.imul(m,me)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(j,K),o=(o=Math.imul(j,$))+Math.imul(F,K)|0,i=Math.imul(F,$),r=r+Math.imul(L,X)|0,o=(o=o+Math.imul(L,Q)|0)+Math.imul(B,X)|0,i=i+Math.imul(B,Q)|0,r=r+Math.imul(R,Z)|0,o=(o=o+Math.imul(R,ee)|0)+Math.imul(P,Z)|0,i=i+Math.imul(P,ee)|0,r=r+Math.imul(T,ne)|0,o=(o=o+Math.imul(T,re)|0)+Math.imul(I,ne)|0,i=i+Math.imul(I,re)|0,r=r+Math.imul(A,ie)|0,o=(o=o+Math.imul(A,ae)|0)+Math.imul(C,ie)|0,i=i+Math.imul(C,ae)|0,r=r+Math.imul(M,le)|0,o=(o=o+Math.imul(M,ce)|0)+Math.imul(_,le)|0,i=i+Math.imul(_,ce)|0,r=r+Math.imul(w,de)|0,o=(o=o+Math.imul(w,fe)|0)+Math.imul(x,de)|0,i=i+Math.imul(x,fe)|0;var Ce=(c+(r=r+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,me)|0)+Math.imul(b,pe)|0))<<13)|0;c=((i=i+Math.imul(b,me)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,X),o=(o=Math.imul(j,Q))+Math.imul(F,X)|0,i=Math.imul(F,Q),r=r+Math.imul(L,Z)|0,o=(o=o+Math.imul(L,ee)|0)+Math.imul(B,Z)|0,i=i+Math.imul(B,ee)|0,r=r+Math.imul(R,ne)|0,o=(o=o+Math.imul(R,re)|0)+Math.imul(P,ne)|0,i=i+Math.imul(P,re)|0,r=r+Math.imul(T,ie)|0,o=(o=o+Math.imul(T,ae)|0)+Math.imul(I,ie)|0,i=i+Math.imul(I,ae)|0,r=r+Math.imul(A,le)|0,o=(o=o+Math.imul(A,ce)|0)+Math.imul(C,le)|0,i=i+Math.imul(C,ce)|0,r=r+Math.imul(M,de)|0,o=(o=o+Math.imul(M,fe)|0)+Math.imul(_,de)|0,i=i+Math.imul(_,fe)|0;var ke=(c+(r=r+Math.imul(w,pe)|0)|0)+((8191&(o=(o=o+Math.imul(w,me)|0)+Math.imul(x,pe)|0))<<13)|0;c=((i=i+Math.imul(x,me)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,Z),o=(o=Math.imul(j,ee))+Math.imul(F,Z)|0,i=Math.imul(F,ee),r=r+Math.imul(L,ne)|0,o=(o=o+Math.imul(L,re)|0)+Math.imul(B,ne)|0,i=i+Math.imul(B,re)|0,r=r+Math.imul(R,ie)|0,o=(o=o+Math.imul(R,ae)|0)+Math.imul(P,ie)|0,i=i+Math.imul(P,ae)|0,r=r+Math.imul(T,le)|0,o=(o=o+Math.imul(T,ce)|0)+Math.imul(I,le)|0,i=i+Math.imul(I,ce)|0,r=r+Math.imul(A,de)|0,o=(o=o+Math.imul(A,fe)|0)+Math.imul(C,de)|0,i=i+Math.imul(C,fe)|0;var Te=(c+(r=r+Math.imul(M,pe)|0)|0)+((8191&(o=(o=o+Math.imul(M,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((i=i+Math.imul(_,me)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,ne),o=(o=Math.imul(j,re))+Math.imul(F,ne)|0,i=Math.imul(F,re),r=r+Math.imul(L,ie)|0,o=(o=o+Math.imul(L,ae)|0)+Math.imul(B,ie)|0,i=i+Math.imul(B,ae)|0,r=r+Math.imul(R,le)|0,o=(o=o+Math.imul(R,ce)|0)+Math.imul(P,le)|0,i=i+Math.imul(P,ce)|0,r=r+Math.imul(T,de)|0,o=(o=o+Math.imul(T,fe)|0)+Math.imul(I,de)|0,i=i+Math.imul(I,fe)|0;var Ie=(c+(r=r+Math.imul(A,pe)|0)|0)+((8191&(o=(o=o+Math.imul(A,me)|0)+Math.imul(C,pe)|0))<<13)|0;c=((i=i+Math.imul(C,me)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(j,ie),o=(o=Math.imul(j,ae))+Math.imul(F,ie)|0,i=Math.imul(F,ae),r=r+Math.imul(L,le)|0,o=(o=o+Math.imul(L,ce)|0)+Math.imul(B,le)|0,i=i+Math.imul(B,ce)|0,r=r+Math.imul(R,de)|0,o=(o=o+Math.imul(R,fe)|0)+Math.imul(P,de)|0,i=i+Math.imul(P,fe)|0;var Oe=(c+(r=r+Math.imul(T,pe)|0)|0)+((8191&(o=(o=o+Math.imul(T,me)|0)+Math.imul(I,pe)|0))<<13)|0;c=((i=i+Math.imul(I,me)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,le),o=(o=Math.imul(j,ce))+Math.imul(F,le)|0,i=Math.imul(F,ce),r=r+Math.imul(L,de)|0,o=(o=o+Math.imul(L,fe)|0)+Math.imul(B,de)|0,i=i+Math.imul(B,fe)|0;var Re=(c+(r=r+Math.imul(R,pe)|0)|0)+((8191&(o=(o=o+Math.imul(R,me)|0)+Math.imul(P,pe)|0))<<13)|0;c=((i=i+Math.imul(P,me)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(j,de),o=(o=Math.imul(j,fe))+Math.imul(F,de)|0,i=Math.imul(F,fe);var Pe=(c+(r=r+Math.imul(L,pe)|0)|0)+((8191&(o=(o=o+Math.imul(L,me)|0)+Math.imul(B,pe)|0))<<13)|0;c=((i=i+Math.imul(B,me)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ne=(c+(r=Math.imul(j,pe))|0)+((8191&(o=(o=Math.imul(j,me))+Math.imul(F,pe)|0))<<13)|0;return c=((i=Math.imul(F,me))+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,l[0]=ge,l[1]=ve,l[2]=be,l[3]=ye,l[4]=we,l[5]=xe,l[6]=Se,l[7]=Me,l[8]=_e,l[9]=Ee,l[10]=Ae,l[11]=Ce,l[12]=ke,l[13]=Te,l[14]=Ie,l[15]=Oe,l[16]=Re,l[17]=Pe,l[18]=Ne,0!==c&&(l[19]=c,n.length++),n};function m(e,t,n){return(new g).mulp(e,t,n)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=h),o.prototype.mulTo=function(e,t){var n,r=this.length+e.length;return n=10===this.length&&10===e.length?p(this,e,t):r<63?h(this,e,t):r<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,o=0,i=0;i<n.length-1;i++){var a=o;o=0;for(var s=67108863&r,l=Math.min(i,t.length-1),c=Math.max(0,i-e.length+1);c<=l;c++){var u=i-c,d=(0|e.words[u])*(0|t.words[c]),f=67108863&d;s=67108863&(f=f+s|0),o+=(a=(a=a+(d/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}n.words[i]=s,r=a,a=o}return 0!==r?n.words[i]=r:n.length--,n.strip()}(this,e,t):m(this,e,t),n},g.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},g.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,o=0;o<t;o++)r|=(1&e)<<t-o-1,e>>=1;return r},g.prototype.permute=function(e,t,n,r,o,i){for(var a=0;a<i;a++)r[a]=t[e[a]],o[a]=n[e[a]]},g.prototype.transform=function(e,t,n,r,o,i){this.permute(i,e,t,n,r,o);for(var a=1;a<o;a<<=1)for(var s=a<<1,l=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),u=0;u<o;u+=s)for(var d=l,f=c,h=0;h<a;h++){var p=n[u+h],m=r[u+h],g=n[u+h+a],v=r[u+h+a],b=d*g-f*v;v=d*v+f*g,g=b,n[u+h]=p+g,r[u+h]=m+v,n[u+h+a]=p-g,r[u+h+a]=m-v,h!==s&&(b=l*d-c*f,f=l*f+c*d,d=b)}},g.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,o=0;for(n=n/2|0;n;n>>>=1)o++;return 1<<o+1+r},g.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var o=e[r];e[r]=e[n-r-1],e[n-r-1]=o,o=t[r],t[r]=-t[n-r-1],t[n-r-1]=-o}},g.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var o=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&o,n=o<67108864?0:o/67108864|0}return e},g.prototype.convert13b=function(e,t,r,o){for(var i=0,a=0;a<t;a++)i+=0|e[a],r[2*a]=8191&i,i>>>=13,r[2*a+1]=8191&i,i>>>=13;for(a=2*t;a<o;++a)r[a]=0;n(0===i),n(0==(-8192&i))},g.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},g.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),o=this.makeRBT(r),i=this.stub(r),a=new Array(r),s=new Array(r),l=new Array(r),c=new Array(r),u=new Array(r),d=new Array(r),f=n.words;f.length=r,this.convert13b(e.words,e.length,a,r),this.convert13b(t.words,t.length,c,r),this.transform(a,i,s,l,r,o),this.transform(c,i,u,d,r,o);for(var h=0;h<r;h++){var p=s[h]*u[h]-l[h]*d[h];l[h]=s[h]*d[h]+l[h]*u[h],s[h]=p}return this.conjugate(s,l,r),this.transform(s,l,f,i,r,o),this.conjugate(f,i,r),this.normalize13b(f,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),m(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var o=(0|this.words[r])*e,i=(67108863&o)+(67108863&t);t>>=26,t+=o/67108864|0,t+=i>>>26,this.words[r]=67108863&i}return 0!==t&&(this.words[r]=t,this.length++),this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,o=n%26;t[n]=(e.words[r]&1<<o)>>>o}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,o=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&i,l=(0|this.words[t])-s<<r;this.words[t]=l|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t<o;t++)this.words[t]=0;this.length+=o}return this.strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var o;n("number"==typeof e&&e>=0),o=t?(t-t%26)/26:0;var i=e%26,a=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<<i,l=r;if(o-=a,o=Math.max(0,o),l){for(var c=0;c<a;c++)l.words[c]=this.words[c];l.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=o);c--){var d=0|this.words[c];this.words[c]=u<<26-i|d>>>i,u=d&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,o=1<<t;return!(this.length<=r)&&!!(this.words[r]&o)},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var o=67108863^67108863>>>t<<t;this.words[this.length-1]&=o}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(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)},o.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},o.prototype.isubn=function(e){if(n("number"==typeof e),n(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()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var o,i,a=e.length+r;this._expand(a);var s=0;for(o=0;o<e.length;o++){i=(0|this.words[o+r])+s;var l=(0|e.words[o])*t;s=((i-=67108863&l)>>26)-(l/67108864|0),this.words[o+r]=67108863&i}for(;o<this.length-r;o++)s=(i=(0|this.words[o+r])+s)>>26,this.words[o+r]=67108863&i;if(0===s)return this.strip();for(n(-1===s),s=0,o=0;o<this.length;o++)s=(i=-(0|this.words[o])+s)>>26,this.words[o]=67108863&i;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,l=r.length-i.length;if("mod"!==t){(s=new o(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var u=r.clone()._ishlnsubmul(i,1,l);0===u.negative&&(r=u,s&&(s.words[l]=1));for(var d=l-1;d>=0;d--){var f=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(i,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),r.strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),o=e.andln(1),i=n.cmp(r);return i<0||1===o&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=67108864%e,r=0,o=this.length-1;o>=0;o--)r=(t*r+(0|this.words[o]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var o=(0|this.words[r])+67108864*t;this.words[r]=o/e|0,t=o%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),l=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0==(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(d)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(l)):(r.isub(t),s.isub(i),l.isub(a))}return{a:s,b:l,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var d=0,f=1;0==(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var i=t;t=n,n=i}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,o=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=o,this;for(var i=o,a=r;0!==i&&a<this.length;a++){var s=0|this.words[a];i=(s+=i)>>>26,s&=67108863,this.words[a]=s}return 0!==i&&(this.words[a]=i,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:o<e?-1:1}return 0!==this.negative?0|-t:t},o.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},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],o=0|e.words[n];if(r!==o){r<o?t=-1:r>o&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new M(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var v={k256:null,p224:null,p192:null,p25519:null};function b(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){b.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function x(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function _(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}b.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},b.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},b.prototype.split=function(e,t){e.iushrn(this.n,0,t)},b.prototype.imulK=function(e){return e.imul(this.k)},r(y,b),y.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),o=0;o<r;o++)t.words[o]=e.words[o];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=i&n,o=10;o<e.length;o++){var a=0|e.words[o];e.words[o-10]=(a&n)<<4|i>>>22,i=a}i>>>=22,e.words[o-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(w,b),r(x,b),r(S,b),S.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,o=67108863&r;r>>>=26,e.words[n]=o,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(v[e])return v[e];var t;if("k256"===e)t=new y;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 S}return v[e]=t,t},M.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},M.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},M.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},M.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},M.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},M.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},M.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},M.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},M.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},M.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},M.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},M.prototype.isqr=function(e){return this.imul(e,e.clone())},M.prototype.sqr=function(e){return this.mul(e,e)},M.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var d=this.pow(u,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g<p);var v=this.pow(d,new o(1).iushln(p-g-1));f=f.redMul(v),d=v.redSqr(),h=h.redMul(d),p=g}return f},M.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},M.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],a=0,s=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var c=t.words[r],u=l-1;u>=0;u--){var d=c>>u&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===r&&0===u)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}l=26}return i},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new _(e)},r(_,M),_.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},_.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},_.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},_.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},_.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)})),a.register("eYSrG",(function(e,t){var n=a("jXr8Y"),r=a("hZWXr");function o(e){this.rand=e||new r.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var o=new n(this.rand.generate(r))}while(o.cmp(e)>=0);return o},o.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},o.prototype.test=function(e,t,r){var o=e.bitLength(),i=n.mont(e),a=new n(1).toRed(i);t||(t=Math.max(1,o/48|0));for(var s=e.subn(1),l=0;!s.testn(l);l++);for(var c=e.shrn(l),u=s.toRed(i);t>0;t--){var d=this._randrange(new n(2),s);r&&r(d);var f=d.toRed(i).redPow(c);if(0!==f.cmp(a)&&0!==f.cmp(u)){for(var h=1;h<l;h++){if(0===(f=f.redSqr()).cmp(a))return!1;if(0===f.cmp(u))break}if(h===l)return!1}}return!0},o.prototype.getDivisor=function(e,t){var r=e.bitLength(),o=n.mont(e),i=new n(1).toRed(o);t||(t=Math.max(1,r/48|0));for(var a=e.subn(1),s=0;!a.testn(s);s++);for(var l=e.shrn(s),c=a.toRed(o);t>0;t--){var u=this._randrange(new n(2),a),d=e.gcd(u);if(0!==d.cmpn(1))return d;var f=u.toRed(o).redPow(l);if(0!==f.cmp(i)&&0!==f.cmp(c)){for(var h=1;h<s;h++){if(0===(f=f.redSqr()).cmp(i))return f.fromRed().subn(1).gcd(e);if(0===f.cmp(c))break}if(h===s)return(f=f.redSqr()).fromRed().subn(1).gcd(e)}}return!1}})),a.register("hZWXr",(function(e,t){var n;function r(e){this.rand=e}if(e.exports=function(e){return n||(n=new r(null)),n.generate(e)},e.exports.Rand=r,r.prototype.generate=function(e){return this._rand(e)},r.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?r.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?r.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(r.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=a("1DJXa");if("function"!=typeof o.randomBytes)throw new Error("Not supported");r.prototype._rand=function(e){return o.randomBytes(e)}}catch(e){}})),a.register("eDa4Q",(function(e,t){e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')})),a.register("8cNuf",(function(e,t){var n=a("bqBrJ").Buffer,r=a("jXr8Y"),o=new(a("eYSrG")),i=new r(24),s=new r(11),l=new r(10),c=new r(3),u=new r(7),d=a("iHSaM"),f=a("3xr1Z");function h(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._pub=new r(e),this}function p(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._priv=new r(e),this}e.exports=g;var m={};function g(e,t,n){this.setGenerator(t),this.__prime=new r(e),this._prime=r.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=h,this.setPrivateKey=p):this._primeCode=8}function v(e,t){var r=new n(e.toArray());return t?r.toString(t):r}Object.defineProperty(g.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var n=t.toString("hex"),r=[n,e.toString(16)].join("_");if(r in m)return m[r];var a,f=0;if(e.isEven()||!d.simpleSieve||!d.fermatTest(e)||!o.test(e))return f+=1,f+="02"===n||"05"===n?8:4,m[r]=f,f;switch(o.test(e.shrn(1))||(f+=2),n){case"02":e.mod(i).cmp(s)&&(f+=8);break;case"05":(a=e.mod(l)).cmp(c)&&a.cmp(u)&&(f+=8);break;default:f+=4}return m[r]=f,f}(this.__prime,this.__gen)),this._primeCode}}),g.prototype.generateKeys=function(){return this._priv||(this._priv=new r(f(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},g.prototype.computeSecret=function(e){var t=(e=(e=new r(e)).toRed(this._prime)).redPow(this._priv).fromRed(),o=new n(t.toArray()),i=this.getPrime();if(o.length<i.length){var a=new n(i.length-o.length);a.fill(0),o=n.concat([a,o])}return o},g.prototype.getPublicKey=function(e){return v(this._pub,e)},g.prototype.getPrivateKey=function(e){return v(this._priv,e)},g.prototype.getPrime=function(e){return v(this.__prime,e)},g.prototype.getGenerator=function(e){return v(this._gen,e)},g.prototype.setGenerator=function(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this.__gen=e,this._gen=new r(e),this}})),a.register("cD2JS",(function(e,t){var n=a("8ByQm").Buffer,r=a("d8QYu"),o=a("8IqCp"),i=a("5jAh8"),s=a("hgNoQ"),l=a("ajRoR"),c=a("aeDps");function u(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=r(t.hash),this._tag=t.id,this._signType=t.sign}function d(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=r(t.hash),this._tag=t.id,this._signType=t.sign}function f(e){return new u(e)}function h(e){return new d(e)}Object.keys(c).forEach((function(e){c[e].id=n.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]})),i(u,o.Writable),u.prototype._write=function(e,t,n){this._hash.update(e),n()},u.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},u.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),r=s(n,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},i(d,o.Writable),d.prototype._write=function(e,t,n){this._hash.update(e),n()},d.prototype.update=function(e,t){return"string"==typeof e&&(e=n.from(e,t)),this._hash.update(e),this},d.prototype.verify=function(e,t,r){"string"==typeof t&&(t=n.from(t,r)),this.end();var o=this._hash.digest();return l(t,o,e,this._signType,this._tag)},e.exports={Sign:f,Verify:h,createSign:f,createVerify:h}})),a.register("hgNoQ",(function(e,t){var n=a("8ByQm").Buffer,r=a("7Q3Pj"),o=a("8sAbQ"),i=a("dkUCk").ec,s=a("fmDmL"),l=a("fEs62"),c=a("g4OMi");function u(e,t,o,i){if((e=n.from(e.toArray())).length<t.byteLength()){var a=n.alloc(t.byteLength()-e.length);e=n.concat([a,e])}var s=o.length,l=function(e,t){e=d(e,t),e=e.mod(t);var r=n.from(e.toArray());if(r.length<t.byteLength()){var o=n.alloc(t.byteLength()-r.length);r=n.concat([o,r])}return r}(o,t),c=n.alloc(s);c.fill(1);var u=n.alloc(s);return u=r(i,u).update(c).update(n.from([0])).update(e).update(l).digest(),c=r(i,u).update(c).digest(),{k:u=r(i,u).update(c).update(n.from([1])).update(e).update(l).digest(),v:c=r(i,u).update(c).digest()}}function d(e,t){var n=new s(e),r=(e.length<<3)-t.bitLength();return r>0&&n.ishrn(r),n}function f(e,t,o){var i,a;do{for(i=n.alloc(0);8*i.length<e.bitLength();)t.v=r(o,t.k).update(t.v).digest(),i=n.concat([i,t.v]);a=d(i,e),t.k=r(o,t.k).update(t.v).update(n.from([0])).digest(),t.v=r(o,t.k).update(t.v).digest()}while(-1!==a.cmp(e));return a}function h(e,t,n,r){return e.toRed(s.mont(n)).redPow(t).fromRed().mod(r)}e.exports=function(e,t,r,a,p){var m=l(t);if(m.curve){if("ecdsa"!==a&&"ecdsa/rsa"!==a)throw new Error("wrong private key type");return function(e,t){var r=c[t.curve.join(".")];if(!r)throw new Error("unknown curve "+t.curve.join("."));var o=new i(r).keyFromPrivate(t.privateKey),a=o.sign(e);return n.from(a.toDER())}(e,m)}if("dsa"===m.type){if("dsa"!==a)throw new Error("wrong private key type");return function(e,t,r){var o,i=t.params.priv_key,a=t.params.p,l=t.params.q,c=t.params.g,p=new s(0),m=d(e,l).mod(l),g=!1,v=u(i,l,e,r);for(;!1===g;)p=h(c,o=f(l,v,r),a,l),0===(g=o.invm(l).imul(m.add(i.mul(p))).mod(l)).cmpn(0)&&(g=!1,p=new s(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e));128&t[0]&&(t=[0].concat(t));var r=e.length+t.length+4,o=[48,r,2,e.length];return o=o.concat(e,[2,t.length],t),n.from(o)}(p,g)}(e,m,r)}if("rsa"!==a&&"ecdsa/rsa"!==a)throw new Error("wrong private key type");e=n.concat([p,e]);for(var g=m.modulus.byteLength(),v=[0,1];e.length+v.length+1<g;)v.push(255);v.push(0);for(var b=-1;++b<e.length;)v.push(e[b]);return o(v,m)},e.exports.getKey=u,e.exports.makeKey=f})),a.register("8sAbQ",(function(e,t){var n=a("bqBrJ").Buffer,r=a("7FPic"),o=a("3xr1Z");function i(e){var t,n=e.modulus.byteLength();do{t=new r(o(n))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function s(e,t){var o=function(e){var t=i(e);return{blinder:t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),a=t.modulus.byteLength(),s=new r(e).mul(o.blinder).umod(t.modulus),l=s.toRed(r.mont(t.prime1)),c=s.toRed(r.mont(t.prime2)),u=t.coefficient,d=t.prime1,f=t.prime2,h=l.redPow(t.exponent1).fromRed(),p=c.redPow(t.exponent2).fromRed(),m=h.isub(p).imul(u).umod(d).imul(f);return p.iadd(m).imul(o.unblinder).umod(t.modulus).toArrayLike(n,"be",a)}s.getr=i,e.exports=s})),a.register("7FPic",(function(e,t){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var i;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{i="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:a("1DJXa").Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function l(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,r,o){for(var i=0,a=0,s=Math.min(e.length,r),l=t;l<s;l++){var c=e.charCodeAt(l)-48;i*=o,a=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a<o,"Invalid character"),i+=a}return i}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o<e.length&&(16===t?this._parseHex(e,o,r):(this._parseBase(e,t,o),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){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):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("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 o=0;o<this.length;o++)this.words[o]=0;var i,a,s=0;if("be"===r)for(o=e.length-1,i=0;o>=0;o-=3)a=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[i]|=a<<s&67108863,this.words[i+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(o=0,i=0;o<e.length;o+=3)a=e[o]|e[o+1]<<8|e[o+2]<<16,this.words[i]|=a<<s&67108863,this.words[i+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this._strip()},o.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var o,i=0,a=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)o=l(e,t,r)<<i,this.words[a]|=67108863&o,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)o=l(e,t,r)<<i,this.words[a]|=67108863&o,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;this._strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,o=1;o<=67108863;o*=t)r++;r--,o=o/t|0;for(var i=e.length-n,a=i%r,s=Math.min(i,i-a)+n,l=0,u=n;u<s;u+=r)l=c(e,u,u+r,t),this.imuln(o),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==a){var d=1;for(l=c(e,u,e.length,t),u=0;u<a;u++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},o.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},o.prototype._move=function(e){u(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(e){o.prototype.inspect=d}else o.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var f=["","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"],h=[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],p=[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];o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var o=0,i=0,a=0;a<this.length;a++){var s=this.words[a],l=(16777215&(s<<o|i)).toString(16);i=s>>>24-o&16777215,(o+=2)>=26&&(o-=26,a--),r=0!==i||a!==this.length-1?f[6-l.length]+l+r:l+r}for(0!==i&&(r=i.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],u=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modrn(u).toString(e);r=(d=d.idivn(u)).isZero()?m+r:f[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},i&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(i,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function m(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var o=0|e.words[0],i=0|t.words[0],a=o*i,s=67108863&a,l=a/67108864|0;n.words[0]=s;for(var c=1;c<r;c++){for(var u=l>>>26,d=67108863&l,f=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=f;h++){var p=c-h|0;u+=(a=(o=0|e.words[p])*(i=0|t.words[h])+d)/67108864|0,d=67108863&a}n.words[c]=0|d,l=0|u}return 0!==l?n.words[c]=0|l:n.length--,n._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var o=this.byteLength(),i=r||Math.max(1,o);n(o<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,o),a},o.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,o=0,i=0;o<this.length;o++){var a=this.words[o]<<i|r;e[n++]=255&a,n<e.length&&(e[n++]=a>>8&255),n<e.length&&(e[n++]=a>>16&255),6===i?(n<e.length&&(e[n++]=a>>24&255),r=0,i=0):(r=a>>>24,i+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,o=0,i=0;o<this.length;o++){var a=this.words[o]<<i|r;e[n--]=255&a,n>=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===i?(n>=0&&(e[n--]=a>>24&255),r=0,i=0):(r=a>>>24,i+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.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()},o.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var o=0;o<t;o++)this.words[o]=67108863&~this.words[o];return r>0&&(this.words[o]=~this.words[o]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,o=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<o:this.words[r]&~(1<<o),this._strip()},o.prototype.iadd=function(e){var t,n,r;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?(n=this,r=e):(n=e,r=this);for(var o=0,i=0;i<r.length;i++)t=(0|n.words[i])+(0|r.words[i])+o,this.words[i]=67108863&t,o=t>>>26;for(;0!==o&&i<n.length;i++)t=(0|n.words[i])+o,this.words[i]=67108863&t,o=t>>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;i<n.length;i++)this.words[i]=n.words[i];return this},o.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)},o.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 n,r,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a<r.length;a++)i=(t=(0|n.words[a])-(0|r.words[a])+i)>>26,this.words[a]=67108863&t;for(;0!==i&&a<n.length;a++)i=(t=(0|n.words[a])+i)>>26,this.words[a]=67108863&t;if(0===i&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,n){var r,o,i,a=e.words,s=t.words,l=n.words,c=0,u=0|a[0],d=8191&u,f=u>>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],v=8191&g,b=g>>>13,y=0|a[3],w=8191&y,x=y>>>13,S=0|a[4],M=8191&S,_=S>>>13,E=0|a[5],A=8191&E,C=E>>>13,k=0|a[6],T=8191&k,I=k>>>13,O=0|a[7],R=8191&O,P=O>>>13,N=0|a[8],L=8191&N,B=N>>>13,D=0|a[9],j=8191&D,F=D>>>13,z=0|s[0],U=8191&z,H=z>>>13,G=0|s[1],W=8191&G,V=G>>>13,q=0|s[2],K=8191&q,$=q>>>13,J=0|s[3],X=8191&J,Q=J>>>13,Y=0|s[4],Z=8191&Y,ee=Y>>>13,te=0|s[5],ne=8191&te,re=te>>>13,oe=0|s[6],ie=8191&oe,ae=oe>>>13,se=0|s[7],le=8191&se,ce=se>>>13,ue=0|s[8],de=8191&ue,fe=ue>>>13,he=0|s[9],pe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(c+(r=Math.imul(d,U))|0)+((8191&(o=(o=Math.imul(d,H))+Math.imul(f,U)|0))<<13)|0;c=((i=Math.imul(f,H))+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,U),o=(o=Math.imul(p,H))+Math.imul(m,U)|0,i=Math.imul(m,H);var ve=(c+(r=r+Math.imul(d,W)|0)|0)+((8191&(o=(o=o+Math.imul(d,V)|0)+Math.imul(f,W)|0))<<13)|0;c=((i=i+Math.imul(f,V)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,U),o=(o=Math.imul(v,H))+Math.imul(b,U)|0,i=Math.imul(b,H),r=r+Math.imul(p,W)|0,o=(o=o+Math.imul(p,V)|0)+Math.imul(m,W)|0,i=i+Math.imul(m,V)|0;var be=(c+(r=r+Math.imul(d,K)|0)|0)+((8191&(o=(o=o+Math.imul(d,$)|0)+Math.imul(f,K)|0))<<13)|0;c=((i=i+Math.imul(f,$)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(w,U),o=(o=Math.imul(w,H))+Math.imul(x,U)|0,i=Math.imul(x,H),r=r+Math.imul(v,W)|0,o=(o=o+Math.imul(v,V)|0)+Math.imul(b,W)|0,i=i+Math.imul(b,V)|0,r=r+Math.imul(p,K)|0,o=(o=o+Math.imul(p,$)|0)+Math.imul(m,K)|0,i=i+Math.imul(m,$)|0;var ye=(c+(r=r+Math.imul(d,X)|0)|0)+((8191&(o=(o=o+Math.imul(d,Q)|0)+Math.imul(f,X)|0))<<13)|0;c=((i=i+Math.imul(f,Q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(M,U),o=(o=Math.imul(M,H))+Math.imul(_,U)|0,i=Math.imul(_,H),r=r+Math.imul(w,W)|0,o=(o=o+Math.imul(w,V)|0)+Math.imul(x,W)|0,i=i+Math.imul(x,V)|0,r=r+Math.imul(v,K)|0,o=(o=o+Math.imul(v,$)|0)+Math.imul(b,K)|0,i=i+Math.imul(b,$)|0,r=r+Math.imul(p,X)|0,o=(o=o+Math.imul(p,Q)|0)+Math.imul(m,X)|0,i=i+Math.imul(m,Q)|0;var we=(c+(r=r+Math.imul(d,Z)|0)|0)+((8191&(o=(o=o+Math.imul(d,ee)|0)+Math.imul(f,Z)|0))<<13)|0;c=((i=i+Math.imul(f,ee)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(A,U),o=(o=Math.imul(A,H))+Math.imul(C,U)|0,i=Math.imul(C,H),r=r+Math.imul(M,W)|0,o=(o=o+Math.imul(M,V)|0)+Math.imul(_,W)|0,i=i+Math.imul(_,V)|0,r=r+Math.imul(w,K)|0,o=(o=o+Math.imul(w,$)|0)+Math.imul(x,K)|0,i=i+Math.imul(x,$)|0,r=r+Math.imul(v,X)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(b,X)|0,i=i+Math.imul(b,Q)|0,r=r+Math.imul(p,Z)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(m,Z)|0,i=i+Math.imul(m,ee)|0;var xe=(c+(r=r+Math.imul(d,ne)|0)|0)+((8191&(o=(o=o+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;c=((i=i+Math.imul(f,re)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(T,U),o=(o=Math.imul(T,H))+Math.imul(I,U)|0,i=Math.imul(I,H),r=r+Math.imul(A,W)|0,o=(o=o+Math.imul(A,V)|0)+Math.imul(C,W)|0,i=i+Math.imul(C,V)|0,r=r+Math.imul(M,K)|0,o=(o=o+Math.imul(M,$)|0)+Math.imul(_,K)|0,i=i+Math.imul(_,$)|0,r=r+Math.imul(w,X)|0,o=(o=o+Math.imul(w,Q)|0)+Math.imul(x,X)|0,i=i+Math.imul(x,Q)|0,r=r+Math.imul(v,Z)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(b,Z)|0,i=i+Math.imul(b,ee)|0,r=r+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,re)|0)+Math.imul(m,ne)|0,i=i+Math.imul(m,re)|0;var Se=(c+(r=r+Math.imul(d,ie)|0)|0)+((8191&(o=(o=o+Math.imul(d,ae)|0)+Math.imul(f,ie)|0))<<13)|0;c=((i=i+Math.imul(f,ae)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(R,U),o=(o=Math.imul(R,H))+Math.imul(P,U)|0,i=Math.imul(P,H),r=r+Math.imul(T,W)|0,o=(o=o+Math.imul(T,V)|0)+Math.imul(I,W)|0,i=i+Math.imul(I,V)|0,r=r+Math.imul(A,K)|0,o=(o=o+Math.imul(A,$)|0)+Math.imul(C,K)|0,i=i+Math.imul(C,$)|0,r=r+Math.imul(M,X)|0,o=(o=o+Math.imul(M,Q)|0)+Math.imul(_,X)|0,i=i+Math.imul(_,Q)|0,r=r+Math.imul(w,Z)|0,o=(o=o+Math.imul(w,ee)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,ee)|0,r=r+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,re)|0)+Math.imul(b,ne)|0,i=i+Math.imul(b,re)|0,r=r+Math.imul(p,ie)|0,o=(o=o+Math.imul(p,ae)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,ae)|0;var Me=(c+(r=r+Math.imul(d,le)|0)|0)+((8191&(o=(o=o+Math.imul(d,ce)|0)+Math.imul(f,le)|0))<<13)|0;c=((i=i+Math.imul(f,ce)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,U),o=(o=Math.imul(L,H))+Math.imul(B,U)|0,i=Math.imul(B,H),r=r+Math.imul(R,W)|0,o=(o=o+Math.imul(R,V)|0)+Math.imul(P,W)|0,i=i+Math.imul(P,V)|0,r=r+Math.imul(T,K)|0,o=(o=o+Math.imul(T,$)|0)+Math.imul(I,K)|0,i=i+Math.imul(I,$)|0,r=r+Math.imul(A,X)|0,o=(o=o+Math.imul(A,Q)|0)+Math.imul(C,X)|0,i=i+Math.imul(C,Q)|0,r=r+Math.imul(M,Z)|0,o=(o=o+Math.imul(M,ee)|0)+Math.imul(_,Z)|0,i=i+Math.imul(_,ee)|0,r=r+Math.imul(w,ne)|0,o=(o=o+Math.imul(w,re)|0)+Math.imul(x,ne)|0,i=i+Math.imul(x,re)|0,r=r+Math.imul(v,ie)|0,o=(o=o+Math.imul(v,ae)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,ae)|0,r=r+Math.imul(p,le)|0,o=(o=o+Math.imul(p,ce)|0)+Math.imul(m,le)|0,i=i+Math.imul(m,ce)|0;var _e=(c+(r=r+Math.imul(d,de)|0)|0)+((8191&(o=(o=o+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;c=((i=i+Math.imul(f,fe)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(j,U),o=(o=Math.imul(j,H))+Math.imul(F,U)|0,i=Math.imul(F,H),r=r+Math.imul(L,W)|0,o=(o=o+Math.imul(L,V)|0)+Math.imul(B,W)|0,i=i+Math.imul(B,V)|0,r=r+Math.imul(R,K)|0,o=(o=o+Math.imul(R,$)|0)+Math.imul(P,K)|0,i=i+Math.imul(P,$)|0,r=r+Math.imul(T,X)|0,o=(o=o+Math.imul(T,Q)|0)+Math.imul(I,X)|0,i=i+Math.imul(I,Q)|0,r=r+Math.imul(A,Z)|0,o=(o=o+Math.imul(A,ee)|0)+Math.imul(C,Z)|0,i=i+Math.imul(C,ee)|0,r=r+Math.imul(M,ne)|0,o=(o=o+Math.imul(M,re)|0)+Math.imul(_,ne)|0,i=i+Math.imul(_,re)|0,r=r+Math.imul(w,ie)|0,o=(o=o+Math.imul(w,ae)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,ae)|0,r=r+Math.imul(v,le)|0,o=(o=o+Math.imul(v,ce)|0)+Math.imul(b,le)|0,i=i+Math.imul(b,ce)|0,r=r+Math.imul(p,de)|0,o=(o=o+Math.imul(p,fe)|0)+Math.imul(m,de)|0,i=i+Math.imul(m,fe)|0;var Ee=(c+(r=r+Math.imul(d,pe)|0)|0)+((8191&(o=(o=o+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;c=((i=i+Math.imul(f,me)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(j,W),o=(o=Math.imul(j,V))+Math.imul(F,W)|0,i=Math.imul(F,V),r=r+Math.imul(L,K)|0,o=(o=o+Math.imul(L,$)|0)+Math.imul(B,K)|0,i=i+Math.imul(B,$)|0,r=r+Math.imul(R,X)|0,o=(o=o+Math.imul(R,Q)|0)+Math.imul(P,X)|0,i=i+Math.imul(P,Q)|0,r=r+Math.imul(T,Z)|0,o=(o=o+Math.imul(T,ee)|0)+Math.imul(I,Z)|0,i=i+Math.imul(I,ee)|0,r=r+Math.imul(A,ne)|0,o=(o=o+Math.imul(A,re)|0)+Math.imul(C,ne)|0,i=i+Math.imul(C,re)|0,r=r+Math.imul(M,ie)|0,o=(o=o+Math.imul(M,ae)|0)+Math.imul(_,ie)|0,i=i+Math.imul(_,ae)|0,r=r+Math.imul(w,le)|0,o=(o=o+Math.imul(w,ce)|0)+Math.imul(x,le)|0,i=i+Math.imul(x,ce)|0,r=r+Math.imul(v,de)|0,o=(o=o+Math.imul(v,fe)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,fe)|0;var Ae=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((i=i+Math.imul(m,me)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(j,K),o=(o=Math.imul(j,$))+Math.imul(F,K)|0,i=Math.imul(F,$),r=r+Math.imul(L,X)|0,o=(o=o+Math.imul(L,Q)|0)+Math.imul(B,X)|0,i=i+Math.imul(B,Q)|0,r=r+Math.imul(R,Z)|0,o=(o=o+Math.imul(R,ee)|0)+Math.imul(P,Z)|0,i=i+Math.imul(P,ee)|0,r=r+Math.imul(T,ne)|0,o=(o=o+Math.imul(T,re)|0)+Math.imul(I,ne)|0,i=i+Math.imul(I,re)|0,r=r+Math.imul(A,ie)|0,o=(o=o+Math.imul(A,ae)|0)+Math.imul(C,ie)|0,i=i+Math.imul(C,ae)|0,r=r+Math.imul(M,le)|0,o=(o=o+Math.imul(M,ce)|0)+Math.imul(_,le)|0,i=i+Math.imul(_,ce)|0,r=r+Math.imul(w,de)|0,o=(o=o+Math.imul(w,fe)|0)+Math.imul(x,de)|0,i=i+Math.imul(x,fe)|0;var Ce=(c+(r=r+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,me)|0)+Math.imul(b,pe)|0))<<13)|0;c=((i=i+Math.imul(b,me)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,X),o=(o=Math.imul(j,Q))+Math.imul(F,X)|0,i=Math.imul(F,Q),r=r+Math.imul(L,Z)|0,o=(o=o+Math.imul(L,ee)|0)+Math.imul(B,Z)|0,i=i+Math.imul(B,ee)|0,r=r+Math.imul(R,ne)|0,o=(o=o+Math.imul(R,re)|0)+Math.imul(P,ne)|0,i=i+Math.imul(P,re)|0,r=r+Math.imul(T,ie)|0,o=(o=o+Math.imul(T,ae)|0)+Math.imul(I,ie)|0,i=i+Math.imul(I,ae)|0,r=r+Math.imul(A,le)|0,o=(o=o+Math.imul(A,ce)|0)+Math.imul(C,le)|0,i=i+Math.imul(C,ce)|0,r=r+Math.imul(M,de)|0,o=(o=o+Math.imul(M,fe)|0)+Math.imul(_,de)|0,i=i+Math.imul(_,fe)|0;var ke=(c+(r=r+Math.imul(w,pe)|0)|0)+((8191&(o=(o=o+Math.imul(w,me)|0)+Math.imul(x,pe)|0))<<13)|0;c=((i=i+Math.imul(x,me)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,Z),o=(o=Math.imul(j,ee))+Math.imul(F,Z)|0,i=Math.imul(F,ee),r=r+Math.imul(L,ne)|0,o=(o=o+Math.imul(L,re)|0)+Math.imul(B,ne)|0,i=i+Math.imul(B,re)|0,r=r+Math.imul(R,ie)|0,o=(o=o+Math.imul(R,ae)|0)+Math.imul(P,ie)|0,i=i+Math.imul(P,ae)|0,r=r+Math.imul(T,le)|0,o=(o=o+Math.imul(T,ce)|0)+Math.imul(I,le)|0,i=i+Math.imul(I,ce)|0,r=r+Math.imul(A,de)|0,o=(o=o+Math.imul(A,fe)|0)+Math.imul(C,de)|0,i=i+Math.imul(C,fe)|0;var Te=(c+(r=r+Math.imul(M,pe)|0)|0)+((8191&(o=(o=o+Math.imul(M,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((i=i+Math.imul(_,me)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,ne),o=(o=Math.imul(j,re))+Math.imul(F,ne)|0,i=Math.imul(F,re),r=r+Math.imul(L,ie)|0,o=(o=o+Math.imul(L,ae)|0)+Math.imul(B,ie)|0,i=i+Math.imul(B,ae)|0,r=r+Math.imul(R,le)|0,o=(o=o+Math.imul(R,ce)|0)+Math.imul(P,le)|0,i=i+Math.imul(P,ce)|0,r=r+Math.imul(T,de)|0,o=(o=o+Math.imul(T,fe)|0)+Math.imul(I,de)|0,i=i+Math.imul(I,fe)|0;var Ie=(c+(r=r+Math.imul(A,pe)|0)|0)+((8191&(o=(o=o+Math.imul(A,me)|0)+Math.imul(C,pe)|0))<<13)|0;c=((i=i+Math.imul(C,me)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(j,ie),o=(o=Math.imul(j,ae))+Math.imul(F,ie)|0,i=Math.imul(F,ae),r=r+Math.imul(L,le)|0,o=(o=o+Math.imul(L,ce)|0)+Math.imul(B,le)|0,i=i+Math.imul(B,ce)|0,r=r+Math.imul(R,de)|0,o=(o=o+Math.imul(R,fe)|0)+Math.imul(P,de)|0,i=i+Math.imul(P,fe)|0;var Oe=(c+(r=r+Math.imul(T,pe)|0)|0)+((8191&(o=(o=o+Math.imul(T,me)|0)+Math.imul(I,pe)|0))<<13)|0;c=((i=i+Math.imul(I,me)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,le),o=(o=Math.imul(j,ce))+Math.imul(F,le)|0,i=Math.imul(F,ce),r=r+Math.imul(L,de)|0,o=(o=o+Math.imul(L,fe)|0)+Math.imul(B,de)|0,i=i+Math.imul(B,fe)|0;var Re=(c+(r=r+Math.imul(R,pe)|0)|0)+((8191&(o=(o=o+Math.imul(R,me)|0)+Math.imul(P,pe)|0))<<13)|0;c=((i=i+Math.imul(P,me)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(j,de),o=(o=Math.imul(j,fe))+Math.imul(F,de)|0,i=Math.imul(F,fe);var Pe=(c+(r=r+Math.imul(L,pe)|0)|0)+((8191&(o=(o=o+Math.imul(L,me)|0)+Math.imul(B,pe)|0))<<13)|0;c=((i=i+Math.imul(B,me)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ne=(c+(r=Math.imul(j,pe))|0)+((8191&(o=(o=Math.imul(j,me))+Math.imul(F,pe)|0))<<13)|0;return c=((i=Math.imul(F,me))+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,l[0]=ge,l[1]=ve,l[2]=be,l[3]=ye,l[4]=we,l[5]=xe,l[6]=Se,l[7]=Me,l[8]=_e,l[9]=Ee,l[10]=Ae,l[11]=Ce,l[12]=ke,l[13]=Te,l[14]=Ie,l[15]=Oe,l[16]=Re,l[17]=Pe,l[18]=Ne,0!==c&&(l[19]=c,n.length++),n};function v(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,o=0,i=0;i<n.length-1;i++){var a=o;o=0;for(var s=67108863&r,l=Math.min(i,t.length-1),c=Math.max(0,i-e.length+1);c<=l;c++){var u=i-c,d=(0|e.words[u])*(0|t.words[c]),f=67108863&d;s=67108863&(f=f+s|0),o+=(a=(a=a+(d/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}n.words[i]=s,r=a,a=o}return 0!==r?n.words[i]=r:n.length--,n._strip()}function b(e,t,n){return v(e,t,n)}function y(e,t){this.x=e,this.y=t}Math.imul||(g=m),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):n<63?m(this,e,t):n<1024?v(this,e,t):b(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},y.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,o=0;o<t;o++)r|=(1&e)<<t-o-1,e>>=1;return r},y.prototype.permute=function(e,t,n,r,o,i){for(var a=0;a<i;a++)r[a]=t[e[a]],o[a]=n[e[a]]},y.prototype.transform=function(e,t,n,r,o,i){this.permute(i,e,t,n,r,o);for(var a=1;a<o;a<<=1)for(var s=a<<1,l=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),u=0;u<o;u+=s)for(var d=l,f=c,h=0;h<a;h++){var p=n[u+h],m=r[u+h],g=n[u+h+a],v=r[u+h+a],b=d*g-f*v;v=d*v+f*g,g=b,n[u+h]=p+g,r[u+h]=m+v,n[u+h+a]=p-g,r[u+h+a]=m-v,h!==s&&(b=l*d-c*f,f=l*f+c*d,d=b)}},y.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,o=0;for(n=n/2|0;n;n>>>=1)o++;return 1<<o+1+r},y.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var o=e[r];e[r]=e[n-r-1],e[n-r-1]=o,o=t[r],t[r]=-t[n-r-1],t[n-r-1]=-o}},y.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var o=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&o,n=o<67108864?0:o/67108864|0}return e},y.prototype.convert13b=function(e,t,r,o){for(var i=0,a=0;a<t;a++)i+=0|e[a],r[2*a]=8191&i,i>>>=13,r[2*a+1]=8191&i,i>>>=13;for(a=2*t;a<o;++a)r[a]=0;n(0===i),n(0==(-8192&i))},y.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},y.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),o=this.makeRBT(r),i=this.stub(r),a=new Array(r),s=new Array(r),l=new Array(r),c=new Array(r),u=new Array(r),d=new Array(r),f=n.words;f.length=r,this.convert13b(e.words,e.length,a,r),this.convert13b(t.words,t.length,c,r),this.transform(a,i,s,l,r,o),this.transform(c,i,u,d,r,o);for(var h=0;h<r;h++){var p=s[h]*u[h]-l[h]*d[h];l[h]=s[h]*d[h]+l[h]*u[h],s[h]=p}return this.conjugate(s,l,r),this.transform(s,l,f,i,r,o),this.conjugate(f,i,r),this.normalize13b(f,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),b(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,o=0;o<this.length;o++){var i=(0|this.words[o])*e,a=(67108863&i)+(67108863&r);r>>=26,r+=i/67108864|0,r+=a>>>26,this.words[o]=67108863&a}return 0!==r&&(this.words[o]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,o=n%26;t[n]=e.words[r]>>>o&1}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,o=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&i,l=(0|this.words[t])-s<<r;this.words[t]=l|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t<o;t++)this.words[t]=0;this.length+=o}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var o;n("number"==typeof e&&e>=0),o=t?(t-t%26)/26:0;var i=e%26,a=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<<i,l=r;if(o-=a,o=Math.max(0,o),l){for(var c=0;c<a;c++)l.words[c]=this.words[c];l.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=o);c--){var d=0|this.words[c];this.words[c]=u<<26-i|d>>>i,u=d&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,o=1<<t;return!(this.length<=r)&&!!(this.words[r]&o)},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var o=67108863^67108863>>>t<<t;this.words[this.length-1]&=o}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(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)},o.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},o.prototype.isubn=function(e){if(n("number"==typeof e),n(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()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var o,i,a=e.length+r;this._expand(a);var s=0;for(o=0;o<e.length;o++){i=(0|this.words[o+r])+s;var l=(0|e.words[o])*t;s=((i-=67108863&l)>>26)-(l/67108864|0),this.words[o+r]=67108863&i}for(;o<this.length-r;o++)s=(i=(0|this.words[o+r])+s)>>26,this.words[o+r]=67108863&i;if(0===s)return this._strip();for(n(-1===s),s=0,o=0;o<this.length;o++)s=(i=-(0|this.words[o])+s)>>26,this.words[o]=67108863&i;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,l=r.length-i.length;if("mod"!==t){(s=new o(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var u=r.clone()._ishlnsubmul(i,1,l);0===u.negative&&(r=u,s&&(s.words[l]=1));for(var d=l-1;d>=0;d--){var f=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(i,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),o=e.andln(1),i=n.cmp(r);return i<0||1===o&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=67108864%e,o=0,i=this.length-1;i>=0;i--)o=(r*o+(0|this.words[i]))%e;return t?-o:o},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,o=this.length-1;o>=0;o--){var i=(0|this.words[o])+67108864*r;this.words[o]=i/e|0,r=i%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),l=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0==(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(d)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(l)):(r.isub(t),s.isub(i),l.isub(a))}return{a:s,b:l,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var d=0,f=1;0==(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var i=t;t=n,n=i}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,o=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=o,this;for(var i=o,a=r;0!==i&&a<this.length;a++){var s=0|this.words[a];i=(s+=i)>>>26,s&=67108863,this.words[a]=s}return 0!==i&&(this.words[a]=i,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:o<e?-1:1}return 0!==this.negative?0|-t:t},o.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},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],o=0|e.words[n];if(r!==o){r<o?t=-1:r>o&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new A(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function x(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}x.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},x.prototype.split=function(e,t){e.iushrn(this.n,0,t)},x.prototype.imulK=function(e){return e.imul(this.k)},r(S,x),S.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),o=0;o<r;o++)t.words[o]=e.words[o];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=i&n,o=10;o<e.length;o++){var a=0|e.words[o];e.words[o-10]=(a&n)<<4|i>>>22,i=a}i>>>=22,e.words[o-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},S.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(M,x),r(_,x),r(E,x),E.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,o=67108863&r;r>>>=26,e.words[n]=o,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new S;else if("p224"===e)t=new M;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return w[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},A.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var d=this.pow(u,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g<p);var v=this.pow(d,new o(1).iushln(p-g-1));f=f.redMul(v),d=v.redSqr(),h=h.redMul(d),p=g}return f},A.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},A.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],a=0,s=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var c=t.words[r],u=l-1;u>=0;u--){var d=c>>u&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===r&&0===u)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}l=26}return i},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new C(e)},r(C,A),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)})),a.register("dkUCk",(function(e,t){"use strict";var n=e.exports;n.version=a("ca4g8").version,n.utils=a("fp2gt"),n.rand=a("hZWXr"),n.curve=a("e5bLI"),n.curves=a("gU8eC"),n.ec=a("4hQQJ"),n.eddsa=a("ieJqr")})),a.register("ca4g8",(function(e,t){e.exports=JSON.parse('{"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"}}')})),a.register("fp2gt",(function(e,t){"use strict";var n=e.exports,r=a("jXr8Y"),o=a("iGZtb"),i=a("8Znt4");n.assert=o,n.toArray=i.toArray,n.zero2=i.zero2,n.toHex=i.toHex,n.encode=i.encode,n.getNAF=function(e,t,n){var r=new Array(Math.max(e.bitLength(),n)+1);r.fill(0);for(var o=1<<t+1,i=e.clone(),a=0;a<r.length;a++){var s,l=i.andln(o-1);i.isOdd()?(s=l>(o>>1)-1?(o>>1)-l:l,i.isubn(s)):s=0,r[a]=s,i.iushrn(1)}return r},n.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,o=0,i=0;e.cmpn(-o)>0||t.cmpn(-i)>0;){var a,s,l=e.andln(3)+o&3,c=t.andln(3)+i&3;3===l&&(l=-1),3===c&&(c=-1),a=0==(1&l)?0:3!==(r=e.andln(7)+o&7)&&5!==r||2!==c?l:-l,n[0].push(a),s=0==(1&c)?0:3!==(r=t.andln(7)+i&7)&&5!==r||2!==l?c:-c,n[1].push(s),2*o===a+1&&(o=1-o),2*i===s+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return n},n.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new r(e,"hex","le")}})),a.register("8Znt4",(function(e,t){"use strict";var n=e.exports;function r(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",n=0;n<e.length;n++)t+=r(e[n].toString(16));return t}n.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var r=0;r<e.length;r++)n[r]=0|e[r];return n}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16))}else for(r=0;r<e.length;r++){var o=e.charCodeAt(r),i=o>>8,a=255&o;i?n.push(i,a):n.push(a)}return n},n.zero2=r,n.toHex=o,n.encode=function(e,t){return"hex"===t?o(e):e}})),a.register("e5bLI",(function(e,t){"use strict";var n=e.exports;n.base=a("84G9i"),n.short=a("9nyiD"),n.mont=a("lQ6rN"),n.edwards=a("6iYEY")})),a.register("84G9i",(function(e,t){"use strict";var n=a("jXr8Y"),r=a("fp2gt"),o=r.getNAF,i=r.getJSF,s=r.assert;function l(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(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))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=l,l.prototype.point=function(){throw new Error("Not implemented")},l.prototype.validate=function(){throw new Error("Not implemented")},l.prototype._fixedNafMul=function(e,t){s(e.precomputed);var n=e._getDoubles(),r=o(t,1,this._bitLength),i=(1<<n.step+1)-(n.step%2==0?2:1);i/=3;var a,l,c=[];for(a=0;a<r.length;a+=n.step){l=0;for(var u=a+n.step-1;u>=a;u--)l=(l<<1)+r[u];c.push(l)}for(var d=this.jpoint(null,null,null),f=this.jpoint(null,null,null),h=i;h>0;h--){for(a=0;a<c.length;a++)(l=c[a])===h?f=f.mixedAdd(n.points[a]):l===-h&&(f=f.mixedAdd(n.points[a].neg()));d=d.add(f)}return d.toP()},l.prototype._wnafMul=function(e,t){var n=4,r=e._getNAFPoints(n);n=r.wnd;for(var i=r.points,a=o(t,n,this._bitLength),l=this.jpoint(null,null,null),c=a.length-1;c>=0;c--){for(var u=0;c>=0&&0===a[c];c--)u++;if(c>=0&&u++,l=l.dblp(u),c<0)break;var d=a[c];s(0!==d),l="affine"===e.type?d>0?l.mixedAdd(i[d-1>>1]):l.mixedAdd(i[-d-1>>1].neg()):d>0?l.add(i[d-1>>1]):l.add(i[-d-1>>1].neg())}return"affine"===e.type?l.toP():l},l.prototype._wnafMulAdd=function(e,t,n,r,a){var s,l,c,u=this._wnafT1,d=this._wnafT2,f=this._wnafT3,h=0;for(s=0;s<r;s++){var p=(c=t[s])._getNAFPoints(e);u[s]=p.wnd,d[s]=p.points}for(s=r-1;s>=1;s-=2){var m=s-1,g=s;if(1===u[m]&&1===u[g]){var v=[t[m],null,null,t[g]];0===t[m].y.cmp(t[g].y)?(v[1]=t[m].add(t[g]),v[2]=t[m].toJ().mixedAdd(t[g].neg())):0===t[m].y.cmp(t[g].y.redNeg())?(v[1]=t[m].toJ().mixedAdd(t[g]),v[2]=t[m].add(t[g].neg())):(v[1]=t[m].toJ().mixedAdd(t[g]),v[2]=t[m].toJ().mixedAdd(t[g].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],y=i(n[m],n[g]);for(h=Math.max(y[0].length,h),f[m]=new Array(h),f[g]=new Array(h),l=0;l<h;l++){var w=0|y[0][l],x=0|y[1][l];f[m][l]=b[3*(w+1)+(x+1)],f[g][l]=0,d[m]=v}}else f[m]=o(n[m],u[m],this._bitLength),f[g]=o(n[g],u[g],this._bitLength),h=Math.max(f[m].length,h),h=Math.max(f[g].length,h)}var S=this.jpoint(null,null,null),M=this._wnafT4;for(s=h;s>=0;s--){for(var _=0;s>=0;){var E=!0;for(l=0;l<r;l++)M[l]=0|f[l][s],0!==M[l]&&(E=!1);if(!E)break;_++,s--}if(s>=0&&_++,S=S.dblp(_),s<0)break;for(l=0;l<r;l++){var A=M[l];0!==A&&(A>0?c=d[l][A-1>>1]:A<0&&(c=d[l][-A-1>>1].neg()),S="affine"===c.type?S.mixedAdd(c):S.add(c))}}for(s=0;s<r;s++)d[s]=null;return a?S:S.toP()},l.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},l.prototype.decodePoint=function(e,t){e=r.toArray(e,t);var n=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*n)return 6===e[0]?s(e[e.length-1]%2==0):7===e[0]&&s(e[e.length-1]%2==1),this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));if((2===e[0]||3===e[0])&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),3===e[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(e){return this.encode(e,!0)},c.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},c.prototype.encode=function(e,t){return r.encode(this._encode(t),e)},c.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},c.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)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,o=0;o<t;o+=e){for(var i=0;i<e;i++)r=r.dbl();n.push(r)}return{step:e,points:n}},c.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),o=1;o<n;o++)t[o]=t[o-1].add(r);return{wnd:e,points:t}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t}})),a.register("9nyiD",(function(e,t){"use strict";var n=a("fp2gt"),r=a("jXr8Y"),o=a("5jAh8"),i=a("84G9i"),s=n.assert;function l(e){i.call(this,"short",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(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)}function c(e,t,n,o){i.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new r(t,16),this.y=new r(n,16),o&&(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 u(e,t,n,o){i.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===o?(this.x=this.curve.one,this.y=this.curve.one,this.z=new r(0)):(this.x=new r(t,16),this.y=new r(n,16),this.z=new r(o,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}o(l,i),e.exports=l,l.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new r(e.beta,16).toRed(this.red);else{var o=this._getEndoRoots(this.p);t=(t=o[0].cmp(o[1])<0?o[0]:o[1]).toRed(this.red)}if(e.lambda)n=new r(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?n=i[0]:(n=i[1],s(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:n,basis:e.basis?e.basis.map((function(e){return{a:new r(e.a,16),b:new r(e.b,16)}})):this._getEndoBasis(n)}}},l.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:r.mont(e),n=new r(2).toRed(t).redInvm(),o=n.redNeg(),i=new r(3).toRed(t).redNeg().redSqrt().redMul(n);return[o.redAdd(i).fromRed(),o.redSub(i).fromRed()]},l.prototype._getEndoBasis=function(e){for(var t,n,o,i,a,s,l,c,u,d=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=e,h=this.n.clone(),p=new r(1),m=new r(0),g=new r(0),v=new r(1),b=0;0!==f.cmpn(0);){var y=h.div(f);c=h.sub(y.mul(f)),u=g.sub(y.mul(p));var w=v.sub(y.mul(m));if(!o&&c.cmp(d)<0)t=l.neg(),n=p,o=c.neg(),i=u;else if(o&&2==++b)break;l=c,h=f,f=c,g=p,p=u,v=m,m=w}a=c.neg(),s=u;var x=o.sqr().add(i.sqr());return a.sqr().add(s.sqr()).cmp(x)>=0&&(a=t,s=n),o.negative&&(o=o.neg(),i=i.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:o,b:i},{a:a,b:s}]},l.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],o=r.b.mul(e).divRound(this.n),i=n.b.neg().mul(e).divRound(this.n),a=o.mul(n.a),s=i.mul(r.a),l=o.mul(n.b),c=i.mul(r.b);return{k1:e.sub(a).sub(s),k2:l.add(c).neg()}},l.prototype.pointFromX=function(e,t){(e=new r(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),o=n.redSqrt();if(0!==o.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var i=o.fromRed().isOdd();return(t&&!i||!t&&i)&&(o=o.redNeg()),this.point(e,o)},l.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),o=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(o).cmpn(0)},l.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,o=this._endoWnafT2,i=0;i<e.length;i++){var a=this._endoSplit(t[i]),s=e[i],l=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),l=l.neg(!0)),r[2*i]=s,r[2*i+1]=l,o[2*i]=a.k1,o[2*i+1]=a.k2}for(var c=this._wnafMulAdd(1,r,o,2*i,n),u=0;u<2*i;u++)r[u]=null,o[u]=null;return c},o(c,i.BasePoint),l.prototype.point=function(e,t,n){return new c(this,e,t,n)},l.prototype.pointFromJSON=function(e,t){return c.fromJSON(this,e,t)},c.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 n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}}return t}},c.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]},c.fromJSON=function(e,t,n){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);if(!t[2])return r;function o(t){return e.point(t[0],t[1],n)}var i=t[2];return r.precomputed={beta:null,doubles:i.doubles&&{step:i.doubles.step,points:[r].concat(i.doubles.points.map(o))},naf:i.naf&&{wnd:i.naf.wnd,points:[r].concat(i.naf.points.map(o))}},r},c.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)+">"},c.prototype.isInfinity=function(){return this.inf},c.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 n=t.redSqr().redISub(this.x).redISub(e.x),r=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,r)},c.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,n=this.x.redSqr(),r=e.redInvm(),o=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r),i=o.redSqr().redISub(this.x.redAdd(this.x)),a=o.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,a)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new r(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)},c.prototype.mulAdd=function(e,t,n){var r=[this,t],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,o):this.curve._wnafMulAdd(1,r,o,2)},c.prototype.jmulAdd=function(e,t,n){var r=[this,t],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,o,!0):this.curve._wnafMulAdd(1,r,o,2,!0)},c.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))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,r=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(r)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(r)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(u,i.BasePoint),l.prototype.jpoint=function(e,t,n){return new u(this,e,t,n)},u.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},u.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},u.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),r=this.x.redMul(t),o=e.x.redMul(n),i=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(n.redMul(this.z)),s=r.redSub(o),l=i.redSub(a);if(0===s.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),d=r.redMul(c),f=l.redSqr().redIAdd(u).redISub(d).redISub(d),h=l.redMul(d.redISub(f)).redISub(i.redMul(u)),p=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,h,p)},u.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,r=e.x.redMul(t),o=this.y,i=e.y.redMul(t).redMul(this.z),a=n.redSub(r),s=o.redSub(i);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),c=l.redMul(a),u=n.redMul(l),d=s.redSqr().redIAdd(c).redISub(u).redISub(u),f=s.redMul(u.redISub(d)).redISub(o.redMul(c)),h=this.z.redMul(a);return this.curve.jpoint(d,f,h)},u.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 n=this;for(t=0;t<e;t++)n=n.dbl();return n}var r=this.curve.a,o=this.curve.tinv,i=this.x,a=this.y,s=this.z,l=s.redSqr().redSqr(),c=a.redAdd(a);for(t=0;t<e;t++){var u=i.redSqr(),d=c.redSqr(),f=d.redSqr(),h=u.redAdd(u).redIAdd(u).redIAdd(r.redMul(l)),p=i.redMul(d),m=h.redSqr().redISub(p.redAdd(p)),g=p.redISub(m),v=h.redMul(g);v=v.redIAdd(v).redISub(f);var b=c.redMul(s);t+1<e&&(l=l.redMul(f)),i=m,s=b,c=v}return this.curve.jpoint(i,c.redMul(o),s)},u.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},u.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),o=this.y.redSqr(),i=o.redSqr(),a=this.x.redAdd(o).redSqr().redISub(r).redISub(i);a=a.redIAdd(a);var s=r.redAdd(r).redIAdd(r),l=s.redSqr().redISub(a).redISub(a),c=i.redIAdd(i);c=(c=c.redIAdd(c)).redIAdd(c),e=l,t=s.redMul(a.redISub(l)).redISub(c),n=this.y.redAdd(this.y)}else{var u=this.x.redSqr(),d=this.y.redSqr(),f=d.redSqr(),h=this.x.redAdd(d).redSqr().redISub(u).redISub(f);h=h.redIAdd(h);var p=u.redAdd(u).redIAdd(u),m=p.redSqr(),g=f.redIAdd(f);g=(g=g.redIAdd(g)).redIAdd(g),e=m.redISub(h).redISub(h),t=p.redMul(h.redISub(e)).redISub(g),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(e,t,n)},u.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),o=this.y.redSqr(),i=o.redSqr(),a=this.x.redAdd(o).redSqr().redISub(r).redISub(i);a=a.redIAdd(a);var s=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),l=s.redSqr().redISub(a).redISub(a);e=l;var c=i.redIAdd(i);c=(c=c.redIAdd(c)).redIAdd(c),t=s.redMul(a.redISub(l)).redISub(c),n=this.y.redAdd(this.y)}else{var u=this.z.redSqr(),d=this.y.redSqr(),f=this.x.redMul(d),h=this.x.redSub(u).redMul(this.x.redAdd(u));h=h.redAdd(h).redIAdd(h);var p=f.redIAdd(f),m=(p=p.redIAdd(p)).redAdd(p);e=h.redSqr().redISub(m),n=this.y.redAdd(this.z).redSqr().redISub(d).redISub(u);var g=d.redSqr();g=(g=(g=g.redIAdd(g)).redIAdd(g)).redIAdd(g),t=h.redMul(p.redISub(e)).redISub(g)}return this.curve.jpoint(e,t,n)},u.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,o=r.redSqr().redSqr(),i=t.redSqr(),a=n.redSqr(),s=i.redAdd(i).redIAdd(i).redIAdd(e.redMul(o)),l=t.redAdd(t),c=(l=l.redIAdd(l)).redMul(a),u=s.redSqr().redISub(c.redAdd(c)),d=c.redISub(u),f=a.redSqr();f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var h=s.redMul(d).redISub(f),p=n.redAdd(n).redMul(r);return this.curve.jpoint(u,h,p)},u.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),o=e.redAdd(e).redIAdd(e),i=o.redSqr(),a=this.x.redAdd(t).redSqr().redISub(e).redISub(r),s=(a=(a=(a=a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(i)).redSqr(),l=r.redIAdd(r);l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var c=o.redIAdd(a).redSqr().redISub(i).redISub(s).redISub(l),u=t.redMul(c);u=(u=u.redIAdd(u)).redIAdd(u);var d=this.x.redMul(s).redISub(u);d=(d=d.redIAdd(d)).redIAdd(d);var f=this.y.redMul(c.redMul(l.redISub(c)).redISub(a.redMul(s)));f=(f=(f=f.redIAdd(f)).redIAdd(f)).redIAdd(f);var h=this.z.redAdd(a).redSqr().redISub(n).redISub(s);return this.curve.jpoint(d,f,h)},u.prototype.mul=function(e,t){return e=new r(e,t),this.curve._wnafMul(this,e)},u.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),n=e.z.redSqr();if(0!==this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0))return!1;var r=t.redMul(this.z),o=n.redMul(e.z);return 0===this.y.redMul(o).redISub(e.y.redMul(r)).cmpn(0)},u.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(n))return!0;for(var r=e.clone(),o=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(o),0===this.x.cmp(n))return!0}},u.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)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}})),a.register("lQ6rN",(function(e,t){"use strict";var n=a("jXr8Y"),r=a("5jAh8"),o=a("84G9i"),i=a("fp2gt");function s(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function l(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}r(s,o),e.exports=s,s.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),r=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},r(l,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(i.toArray(e,t),1)},s.prototype.point=function(e,t){return new l(this,e,t)},s.prototype.pointFromJSON=function(e){return l.fromJSON(this,e)},l.prototype.precompute=function(){},l.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},l.fromJSON=function(e,t){return new l(e,t[0],t[1]||e.one)},l.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)+">"},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},l.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),r=e.redMul(t),o=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,o)},l.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),o=e.x.redAdd(e.z),i=e.x.redSub(e.z).redMul(n),a=o.redMul(r),s=t.z.redMul(i.redAdd(a).redSqr()),l=t.x.redMul(i.redISub(a).redSqr());return this.curve.point(s,l)},l.prototype.mul=function(e){for(var t=e.clone(),n=this,r=this.curve.point(null,null),o=[];0!==t.cmpn(0);t.iushrn(1))o.push(t.andln(1));for(var i=o.length-1;i>=0;i--)0===o[i]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},l.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},l.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},l.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},l.prototype.getX=function(){return this.normalize(),this.x.fromRed()}})),a.register("6iYEY",(function(e,t){"use strict";var n=a("fp2gt"),r=a("jXr8Y"),o=a("5jAh8"),i=a("84G9i"),s=n.assert;function l(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,i.call(this,"edwards",e),this.a=new r(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new r(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new r(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,n,o,a){i.BasePoint.call(this,e,"projective"),null===t&&null===n&&null===o?(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 r(t,16),this.y=new r(n,16),this.z=o?new r(o,16):this.curve.one,this.t=a&&new r(a,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()))))}o(l,i),e.exports=l,l.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},l.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},l.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},l.prototype.pointFromX=function(e,t){(e=new r(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),o=this.c2.redSub(this.a.redMul(n)),i=this.one.redSub(this.c2.redMul(this.d).redMul(n)),a=o.redMul(i.redInvm()),s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");var l=s.fromRed().isOdd();return(t&&!l||!t&&l)&&(s=s.redNeg()),this.point(e,s)},l.prototype.pointFromY=function(e,t){(e=new r(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),o=n.redSub(this.c2),i=n.redMul(this.d).redMul(this.c2).redSub(this.a),a=o.redMul(i.redInvm());if(0===a.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var s=a.redSqrt();if(0!==s.redSqr().redSub(a).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==t&&(s=s.redNeg()),this.point(s,e)},l.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),r=t.redMul(this.a).redAdd(n),o=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return 0===r.cmp(o)},o(c,i.BasePoint),l.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},l.prototype.point=function(e,t,n,r){return new c(this,e,t,n,r)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.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)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var r=this.curve._mulA(e),o=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),i=r.redAdd(t),a=i.redSub(n),s=r.redSub(t),l=o.redMul(a),c=i.redMul(s),u=o.redMul(s),d=a.redMul(i);return this.curve.point(l,c,d,u)},c.prototype._projDbl=function(){var e,t,n,r,o,i,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),l=this.y.redSqr();if(this.curve.twisted){var c=(r=this.curve._mulA(s)).redAdd(l);this.zOne?(e=a.redSub(s).redSub(l).redMul(c.redSub(this.curve.two)),t=c.redMul(r.redSub(l)),n=c.redSqr().redSub(c).redSub(c)):(o=this.z.redSqr(),i=c.redSub(o).redISub(o),e=a.redSub(s).redISub(l).redMul(i),t=c.redMul(r.redSub(l)),n=c.redMul(i))}else r=s.redAdd(l),o=this.curve._mulC(this.z).redSqr(),i=r.redSub(o).redSub(o),e=this.curve._mulC(a.redISub(r)).redMul(i),t=this.curve._mulC(r).redMul(s.redISub(l)),n=r.redMul(i);return this.curve.point(e,t,n)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),o=this.z.redMul(e.z.redAdd(e.z)),i=n.redSub(t),a=o.redSub(r),s=o.redAdd(r),l=n.redAdd(t),c=i.redMul(a),u=s.redMul(l),d=i.redMul(l),f=a.redMul(s);return this.curve.point(c,u,f,d)},c.prototype._projAdd=function(e){var t,n,r=this.z.redMul(e.z),o=r.redSqr(),i=this.x.redMul(e.x),a=this.y.redMul(e.y),s=this.curve.d.redMul(i).redMul(a),l=o.redSub(s),c=o.redAdd(s),u=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(a),d=r.redMul(l).redMul(u);return this.curve.twisted?(t=r.redMul(c).redMul(a.redSub(this.curve._mulA(i))),n=l.redMul(c)):(t=r.redMul(c).redMul(a.redSub(i)),n=this.curve._mulC(l).redMul(c)),this.curve.point(d,t,n)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},c.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},c.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},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add})),a.register("gU8eC",(function(e,t){"use strict";var n,r=e.exports,o=a("ba8bl"),i=a("e5bLI"),s=a("fp2gt").assert;function l(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,s(this.g.validate(),"Invalid curve"),s(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var n=new l(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:n}),n}})}r.PresetCurve=l,c("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:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("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:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("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:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("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:o.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"]}),c("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:o.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"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("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:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=a("2OXMU")}catch(e){n=void 0}c("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:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})})),a.register("ba8bl",(function(e,t){var n=e.exports;n.utils=a("7MeDX"),n.common=a("cXjky"),n.sha=a("dBAtQ"),n.ripemd=a("fEnno"),n.hmac=a("aBJ6r"),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160})),a.register("7MeDX",(function(t,n){var r,o,i,s,l,c,u,d,f,h,p,m,g,v,b,y,w,x,S,M,_,E,A,C,k,T;e(t.exports,"inherits",(()=>r),(e=>r=e)),e(t.exports,"toArray",(()=>o),(e=>o=e)),e(t.exports,"toHex",(()=>i),(e=>i=e)),e(t.exports,"htonl",(()=>s),(e=>s=e)),e(t.exports,"toHex32",(()=>l),(e=>l=e)),e(t.exports,"zero2",(()=>c),(e=>c=e)),e(t.exports,"zero8",(()=>u),(e=>u=e)),e(t.exports,"join32",(()=>d),(e=>d=e)),e(t.exports,"split32",(()=>f),(e=>f=e)),e(t.exports,"rotr32",(()=>h),(e=>h=e)),e(t.exports,"rotl32",(()=>p),(e=>p=e)),e(t.exports,"sum32",(()=>m),(e=>m=e)),e(t.exports,"sum32_3",(()=>g),(e=>g=e)),e(t.exports,"sum32_4",(()=>v),(e=>v=e)),e(t.exports,"sum32_5",(()=>b),(e=>b=e)),e(t.exports,"sum64",(()=>y),(e=>y=e)),e(t.exports,"sum64_hi",(()=>w),(e=>w=e)),e(t.exports,"sum64_lo",(()=>x),(e=>x=e)),e(t.exports,"sum64_4_hi",(()=>S),(e=>S=e)),e(t.exports,"sum64_4_lo",(()=>M),(e=>M=e)),e(t.exports,"sum64_5_hi",(()=>_),(e=>_=e)),e(t.exports,"sum64_5_lo",(()=>E),(e=>E=e)),e(t.exports,"rotr64_hi",(()=>A),(e=>A=e)),e(t.exports,"rotr64_lo",(()=>C),(e=>C=e)),e(t.exports,"shr64_hi",(()=>k),(e=>k=e)),e(t.exports,"shr64_lo",(()=>T),(e=>T=e));var I=a("iGZtb"),O=a("5jAh8");function R(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function P(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function N(e){return 1===e.length?"0"+e:e}function L(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}r=O,o=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),o=0;o<e.length;o+=2)n.push(parseInt(e[o]+e[o+1],16))}else for(var r=0,o=0;o<e.length;o++){var i=e.charCodeAt(o);i<128?n[r++]=i:i<2048?(n[r++]=i>>6|192,n[r++]=63&i|128):R(e,o)?(i=65536+((1023&i)<<10)+(1023&e.charCodeAt(++o)),n[r++]=i>>18|240,n[r++]=i>>12&63|128,n[r++]=i>>6&63|128,n[r++]=63&i|128):(n[r++]=i>>12|224,n[r++]=i>>6&63|128,n[r++]=63&i|128)}else for(o=0;o<e.length;o++)n[o]=0|e[o];return n},i=function(e){for(var t="",n=0;n<e.length;n++)t+=N(e[n].toString(16));return t},s=P,l=function(e,t){for(var n="",r=0;r<e.length;r++){var o=e[r];"little"===t&&(o=P(o)),n+=L(o.toString(16))}return n},c=N,u=L,d=function(e,t,n,r){var o=n-t;I(o%4==0);for(var i=new Array(o/4),a=0,s=t;a<i.length;a++,s+=4){var l;l="big"===r?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],i[a]=l>>>0}return i},f=function(e,t){for(var n=new Array(4*e.length),r=0,o=0;r<e.length;r++,o+=4){var i=e[r];"big"===t?(n[o]=i>>>24,n[o+1]=i>>>16&255,n[o+2]=i>>>8&255,n[o+3]=255&i):(n[o+3]=i>>>24,n[o+2]=i>>>16&255,n[o+1]=i>>>8&255,n[o]=255&i)}return n},h=function(e,t){return e>>>t|e<<32-t},p=function(e,t){return e<<t|e>>>32-t},m=function(e,t){return e+t>>>0},g=function(e,t,n){return e+t+n>>>0},v=function(e,t,n,r){return e+t+n+r>>>0},b=function(e,t,n,r,o){return e+t+n+r+o>>>0},y=function(e,t,n,r){var o=e[t],i=r+e[t+1]>>>0,a=(i<r?1:0)+n+o;e[t]=a>>>0,e[t+1]=i},w=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},x=function(e,t,n,r){return t+r>>>0},S=function(e,t,n,r,o,i,a,s){var l=0,c=t;return l+=(c=c+r>>>0)<t?1:0,l+=(c=c+i>>>0)<i?1:0,e+n+o+a+(l+=(c=c+s>>>0)<s?1:0)>>>0},M=function(e,t,n,r,o,i,a,s){return t+r+i+s>>>0},_=function(e,t,n,r,o,i,a,s,l,c){var u=0,d=t;return u+=(d=d+r>>>0)<t?1:0,u+=(d=d+i>>>0)<i?1:0,u+=(d=d+s>>>0)<s?1:0,e+n+o+a+l+(u+=(d=d+c>>>0)<c?1:0)>>>0},E=function(e,t,n,r,o,i,a,s,l,c){return t+r+i+s+c>>>0},A=function(e,t,n){return(t<<32-n|e>>>n)>>>0},C=function(e,t,n){return(e<<32-n|t>>>n)>>>0},k=function(e,t,n){return e>>>n},T=function(e,t,n){return(e<<32-n|t>>>n)>>>0}})),a.register("cXjky",(function(t,n){var r;e(t.exports,"BlockHash",(()=>r),(e=>r=e));var o=a("7MeDX"),i=a("iGZtb");function s(){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}r=s,s.prototype.update=function(e,t){if(e=o.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=o.join32(e,0,e.length-n,this.endian);for(var r=0;r<e.length;r+=this._delta32)this._update(e,r,r+this._delta32)}return this},s.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},s.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var o=1;o<n;o++)r[o]=0;if(e<<=3,"big"===this.endian){for(var i=8;i<this.padLength;i++)r[o++]=0;r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=e>>>24&255,r[o++]=e>>>16&255,r[o++]=e>>>8&255,r[o++]=255&e}else for(r[o++]=255&e,r[o++]=e>>>8&255,r[o++]=e>>>16&255,r[o++]=e>>>24&255,r[o++]=0,r[o++]=0,r[o++]=0,r[o++]=0,i=8;i<this.padLength;i++)r[o++]=0;return r}})),a.register("dBAtQ",(function(t,n){var r,o,i,s,l;e(t.exports,"sha1",(()=>r),(e=>r=e)),e(t.exports,"sha224",(()=>o),(e=>o=e)),e(t.exports,"sha256",(()=>i),(e=>i=e)),e(t.exports,"sha384",(()=>s),(e=>s=e)),e(t.exports,"sha512",(()=>l),(e=>l=e)),r=a("gkYl9"),o=a("dBaTo"),i=a("bMsM7"),s=a("69vgx"),l=a("cvw4e")})),a.register("gkYl9",(function(e,t){"use strict";var n=a("7MeDX"),r=a("cXjky"),o=a("5buio"),i=n.rotl32,s=n.sum32,l=n.sum32_5,c=o.ft_1,u=r.BlockHash,d=[1518500249,1859775393,2400959708,3395469782];function f(){if(!(this instanceof f))return new f;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(f,u),e.exports=f,f.blockSize=512,f.outSize=160,f.hmacStrength=80,f.padLength=64,f.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=i(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var o=this.h[0],a=this.h[1],u=this.h[2],f=this.h[3],h=this.h[4];for(r=0;r<n.length;r++){var p=~~(r/20),m=l(i(o,5),c(p,a,u,f),h,n[r],d[p]);h=f,f=u,u=i(a,30),a=o,o=m}this.h[0]=s(this.h[0],o),this.h[1]=s(this.h[1],a),this.h[2]=s(this.h[2],u),this.h[3]=s(this.h[3],f),this.h[4]=s(this.h[4],h)},f.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}})),a.register("5buio",(function(t,n){var r,o,i,s,l,c,u;e(t.exports,"ft_1",(()=>r),(e=>r=e)),e(t.exports,"ch32",(()=>o),(e=>o=e)),e(t.exports,"maj32",(()=>i),(e=>i=e)),e(t.exports,"s0_256",(()=>s),(e=>s=e)),e(t.exports,"s1_256",(()=>l),(e=>l=e)),e(t.exports,"g0_256",(()=>c),(e=>c=e)),e(t.exports,"g1_256",(()=>u),(e=>u=e));var d=a("7MeDX").rotr32;function f(e,t,n){return e&t^~e&n}function h(e,t,n){return e&t^e&n^t&n}function p(e,t,n){return e^t^n}r=function(e,t,n,r){return 0===e?f(t,n,r):1===e||3===e?p(t,n,r):2===e?h(t,n,r):void 0},o=f,i=h,s=function(e){return d(e,2)^d(e,13)^d(e,22)},l=function(e){return d(e,6)^d(e,11)^d(e,25)},c=function(e){return d(e,7)^d(e,18)^e>>>3},u=function(e){return d(e,17)^d(e,19)^e>>>10}})),a.register("dBaTo",(function(e,t){"use strict";var n=a("7MeDX"),r=a("bMsM7");function o(){if(!(this instanceof o))return new o;r.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,r),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}})),a.register("bMsM7",(function(e,t){"use strict";var n=a("7MeDX"),r=a("cXjky"),o=a("5buio"),i=a("iGZtb"),s=n.sum32,l=n.sum32_4,c=n.sum32_5,u=o.ch32,d=o.maj32,f=o.s0_256,h=o.s1_256,p=o.g0_256,m=o.g1_256,g=r.BlockHash,v=[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 b(){if(!(this instanceof b))return new b;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=v,this.W=new Array(64)}n.inherits(b,g),e.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=l(m(n[r-2]),n[r-7],p(n[r-15]),n[r-16]);var o=this.h[0],a=this.h[1],g=this.h[2],v=this.h[3],b=this.h[4],y=this.h[5],w=this.h[6],x=this.h[7];for(i(this.k.length===n.length),r=0;r<n.length;r++){var S=c(x,h(b),u(b,y,w),this.k[r],n[r]),M=s(f(o),d(o,a,g));x=w,w=y,y=b,b=s(v,S),v=g,g=a,a=o,o=s(S,M)}this.h[0]=s(this.h[0],o),this.h[1]=s(this.h[1],a),this.h[2]=s(this.h[2],g),this.h[3]=s(this.h[3],v),this.h[4]=s(this.h[4],b),this.h[5]=s(this.h[5],y),this.h[6]=s(this.h[6],w),this.h[7]=s(this.h[7],x)},b.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}})),a.register("69vgx",(function(e,t){"use strict";var n=a("7MeDX"),r=a("cvw4e");function o(){if(!(this instanceof o))return new o;r.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,r),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}})),a.register("cvw4e",(function(e,t){"use strict";var n=a("7MeDX"),r=a("cXjky"),o=a("iGZtb"),i=n.rotr64_hi,s=n.rotr64_lo,l=n.shr64_hi,c=n.shr64_lo,u=n.sum64,d=n.sum64_hi,f=n.sum64_lo,h=n.sum64_4_hi,p=n.sum64_4_lo,m=n.sum64_5_hi,g=n.sum64_5_lo,v=r.BlockHash,b=[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 y(){if(!(this instanceof y))return new y;v.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=b,this.W=new Array(160)}function w(e,t,n,r,o){var i=e&n^~e&o;return i<0&&(i+=4294967296),i}function x(e,t,n,r,o,i){var a=t&r^~t&i;return a<0&&(a+=4294967296),a}function S(e,t,n,r,o){var i=e&n^e&o^n&o;return i<0&&(i+=4294967296),i}function M(e,t,n,r,o,i){var a=t&r^t&i^r&i;return a<0&&(a+=4294967296),a}function _(e,t){var n=i(e,t,28)^i(t,e,2)^i(t,e,7);return n<0&&(n+=4294967296),n}function E(e,t){var n=s(e,t,28)^s(t,e,2)^s(t,e,7);return n<0&&(n+=4294967296),n}function A(e,t){var n=i(e,t,14)^i(e,t,18)^i(t,e,9);return n<0&&(n+=4294967296),n}function C(e,t){var n=s(e,t,14)^s(e,t,18)^s(t,e,9);return n<0&&(n+=4294967296),n}function k(e,t){var n=i(e,t,1)^i(e,t,8)^l(e,t,7);return n<0&&(n+=4294967296),n}function T(e,t){var n=s(e,t,1)^s(e,t,8)^c(e,t,7);return n<0&&(n+=4294967296),n}function I(e,t){var n=i(e,t,19)^i(t,e,29)^l(e,t,6);return n<0&&(n+=4294967296),n}function O(e,t){var n=s(e,t,19)^s(t,e,29)^c(e,t,6);return n<0&&(n+=4294967296),n}n.inherits(y,v),e.exports=y,y.blockSize=1024,y.outSize=512,y.hmacStrength=192,y.padLength=128,y.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){var o=I(n[r-4],n[r-3]),i=O(n[r-4],n[r-3]),a=n[r-14],s=n[r-13],l=k(n[r-30],n[r-29]),c=T(n[r-30],n[r-29]),u=n[r-32],d=n[r-31];n[r]=h(o,i,a,s,l,c,u,d),n[r+1]=p(o,i,a,s,l,c,u,d)}},y.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,r=this.h[0],i=this.h[1],a=this.h[2],s=this.h[3],l=this.h[4],c=this.h[5],h=this.h[6],p=this.h[7],v=this.h[8],b=this.h[9],y=this.h[10],k=this.h[11],T=this.h[12],I=this.h[13],O=this.h[14],R=this.h[15];o(this.k.length===n.length);for(var P=0;P<n.length;P+=2){var N=O,L=R,B=A(v,b),D=C(v,b),j=w(v,b,y,k,T),F=x(v,b,y,k,T,I),z=this.k[P],U=this.k[P+1],H=n[P],G=n[P+1],W=m(N,L,B,D,j,F,z,U,H,G),V=g(N,L,B,D,j,F,z,U,H,G);N=_(r,i),L=E(r,i),B=S(r,i,a,s,l),D=M(r,i,a,s,l,c);var q=d(N,L,B,D),K=f(N,L,B,D);O=T,R=I,T=y,I=k,y=v,k=b,v=d(h,p,W,V),b=f(p,p,W,V),h=l,p=c,l=a,c=s,a=r,s=i,r=d(W,V,q,K),i=f(W,V,q,K)}u(this.h,0,r,i),u(this.h,2,a,s),u(this.h,4,l,c),u(this.h,6,h,p),u(this.h,8,v,b),u(this.h,10,y,k),u(this.h,12,T,I),u(this.h,14,O,R)},y.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}})),a.register("fEnno",(function(t,n){var r;e(t.exports,"ripemd160",(()=>r),(e=>r=e));var o=a("7MeDX"),i=a("cXjky"),s=o.rotl32,l=o.sum32,c=o.sum32_3,u=o.sum32_4,d=i.BlockHash;function f(){if(!(this instanceof f))return new f;d.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function p(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function m(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}o.inherits(f,d),r=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],o=this.h[2],i=this.h[3],a=this.h[4],d=n,f=r,w=o,x=i,S=a,M=0;M<80;M++){var _=l(s(u(n,h(M,r,o,i),e[g[M]+t],p(M)),b[M]),a);n=a,a=i,i=s(o,10),o=r,r=_,_=l(s(u(d,h(79-M,f,w,x),e[v[M]+t],m(M)),y[M]),S),d=S,S=x,x=s(w,10),w=f,f=_}_=c(this.h[1],o,x),this.h[1]=c(this.h[2],i,S),this.h[2]=c(this.h[3],a,d),this.h[3]=c(this.h[4],n,f),this.h[4]=c(this.h[0],r,w),this.h[0]=_},f.prototype._digest=function(e){return"hex"===e?o.toHex32(this.h,"little"):o.split32(this.h,"little")};var g=[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],v=[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],b=[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],y=[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]})),a.register("aBJ6r",(function(e,t){"use strict";var n=a("7MeDX"),r=a("iGZtb");function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),r(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)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}})),a.register("2OXMU",(function(e,t){e.exports={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"]]}}})),a.register("4hQQJ",(function(e,t){"use strict";var n=a("jXr8Y"),r=a("h84tF"),o=a("fp2gt"),i=a("gU8eC"),s=a("hZWXr"),l=o.assert,c=a("8HvNn"),u=a("k8sA6");function d(e){if(!(this instanceof d))return new d(e);"string"==typeof e&&(l(Object.prototype.hasOwnProperty.call(i,e),"Unknown curve "+e),e=i[e]),e instanceof i.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}e.exports=d,d.prototype.keyPair=function(e){return new c(this,e)},d.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},d.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},d.prototype.genKeyPair=function(e){e||(e={});for(var t=new r({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||s(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),o=this.n.byteLength(),i=this.n.sub(new n(2));;){var a=new n(t.generate(o));if(!(a.cmp(i)>0))return a.iaddn(1),this.keyFromPrivate(a)}},d.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},d.prototype.sign=function(e,t,o,i){"object"==typeof o&&(i=o,o=null),i||(i={}),t=this.keyFromPrivate(t,o),e=this._truncateToN(new n(e,16));for(var a=this.n.byteLength(),s=t.getPrivate().toArray("be",a),l=e.toArray("be",a),c=new r({hash:this.hash,entropy:s,nonce:l,pers:i.pers,persEnc:i.persEnc||"utf8"}),d=this.n.sub(new n(1)),f=0;;f++){var h=i.k?i.k(f):new n(c.generate(this.n.byteLength()));if(!((h=this._truncateToN(h,!0)).cmpn(1)<=0||h.cmp(d)>=0)){var p=this.g.mul(h);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var v=h.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var b=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return i.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),b^=1),new u({r:g,s:v,recoveryParam:b})}}}}}},d.prototype.verify=function(e,t,r,o){e=this._truncateToN(new n(e,16)),r=this.keyFromPublic(r,o);var i=(t=new u(t,"hex")).r,a=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,l=a.invm(this.n),c=l.mul(e).umod(this.n),d=l.mul(i).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),d)).isInfinity()&&s.eqXToP(i):!(s=this.g.mulAdd(c,r.getPublic(),d)).isInfinity()&&0===s.getX().umod(this.n).cmp(i)},d.prototype.recoverPubKey=function(e,t,r,o){l((3&r)===r,"The recovery param is more than two bits"),t=new u(t,o);var i=this.n,a=new n(e),s=t.r,c=t.s,d=1&r,f=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");s=f?this.curve.pointFromX(s.add(this.curve.n),d):this.curve.pointFromX(s,d);var h=t.r.invm(i),p=i.sub(a).mul(h).umod(i),m=c.mul(h).umod(i);return this.g.mulAdd(p,s,m)},d.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new u(t,r)).recoveryParam)return t.recoveryParam;for(var o=0;o<4;o++){var i;try{i=this.recoverPubKey(e,t,o)}catch(e){continue}if(i.eq(n))return o}throw new Error("Unable to find valid recovery factor")}})),a.register("h84tF",(function(e,t){"use strict";var n=a("ba8bl"),r=a("8Znt4"),o=a("iGZtb");function i(e){if(!(this instanceof i))return new i(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=r.toArray(e.entropy,e.entropyEnc||"hex"),n=r.toArray(e.nonce,e.nonceEnc||"hex"),a=r.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,a)}e.exports=i,i.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o<this.V.length;o++)this.K[o]=0,this.V[o]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},i.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},i.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())},i.prototype.reseed=function(e,t,n,i){"string"!=typeof t&&(i=n,n=t,t=null),e=r.toArray(e,t),n=r.toArray(n,i),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},i.prototype.generate=function(e,t,n,o){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(o=n,n=t,t=null),n&&(n=r.toArray(n,o||"hex"),this._update(n));for(var i=[];i.length<e;)this.V=this._hmac().update(this.V).digest(),i=i.concat(this.V);var a=i.slice(0,e);return this._update(n),this._reseed++,r.encode(a,t)}})),a.register("8HvNn",(function(e,t){"use strict";var n=a("jXr8Y"),r=a("fp2gt").assert;function o(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)}e.exports=o,o.fromPublic=function(e,t,n){return t instanceof o?t:new o(e,{pub:t,pubEnc:n})},o.fromPrivate=function(e,t,n){return t instanceof o?t:new o(e,{priv:t,privEnc:n})},o.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"}},o.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},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?r(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||r(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)},o.prototype.derive=function(e){return e.validate()||r(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}})),a.register("k8sA6",(function(e,t){"use strict";var n=a("jXr8Y"),r=a("fp2gt"),o=r.assert;function i(e,t){if(e instanceof i)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function l(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0===r||r>4)return!1;for(var o=0,i=0,a=t.place;i<r;i++,a++)o<<=8,o|=e[a],o>>>=0;return!(o<=127)&&(t.place=a,o)}function c(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function u(e,t){if(t<128)e.push(t);else{var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}e.exports=i,i.prototype._importDER=function(e,t){e=r.toArray(e,t);var o=new s;if(48!==e[o.place++])return!1;var i=l(e,o);if(!1===i)return!1;if(i+o.place!==e.length)return!1;if(2!==e[o.place++])return!1;var a=l(e,o);if(!1===a)return!1;var c=e.slice(o.place,a+o.place);if(o.place+=a,2!==e[o.place++])return!1;var u=l(e,o);if(!1===u)return!1;if(e.length!==u+o.place)return!1;var d=e.slice(o.place,u+o.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===d[0]){if(!(128&d[1]))return!1;d=d.slice(1)}return this.r=new n(c),this.s=new n(d),this.recoveryParam=null,!0},i.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=c(t),n=c(n);!(n[0]||128&n[1]);)n=n.slice(1);var o=[2];u(o,t.length),(o=o.concat(t)).push(2),u(o,n.length);var i=o.concat(n),a=[48];return u(a,i.length),a=a.concat(i),r.encode(a,e)}})),a.register("ieJqr",(function(e,t){"use strict";var n=a("ba8bl"),r=a("gU8eC"),o=a("fp2gt"),i=o.assert,s=o.parseBytes,l=a("knAIT"),c=a("8CdZY");function u(e){if(i("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof u))return new u(e);e=r[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=n.sha512}e.exports=u,u.prototype.sign=function(e,t){e=s(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),o=this.g.mul(r),i=this.encodePoint(o),a=this.hashInt(i,n.pubBytes(),e).mul(n.priv()),l=r.add(a).umod(this.curve.n);return this.makeSignature({R:o,S:l,Rencoded:i})},u.prototype.verify=function(e,t,n){e=s(e),t=this.makeSignature(t);var r=this.keyFromPublic(n),o=this.hashInt(t.Rencoded(),r.pubBytes(),e),i=this.g.mul(t.S());return t.R().add(r.pub().mul(o)).eq(i)},u.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},u.prototype.keyFromPublic=function(e){return l.fromPublic(this,e)},u.prototype.keyFromSecret=function(e){return l.fromSecret(this,e)},u.prototype.makeSignature=function(e){return e instanceof c?e:new c(this,e)},u.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},u.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,n=e.slice(0,t).concat(-129&e[t]),r=0!=(128&e[t]),i=o.intFromLE(n);return this.curve.pointFromY(i,r)},u.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},u.prototype.decodeInt=function(e){return o.intFromLE(e)},u.prototype.isPoint=function(e){return e instanceof this.pointClass}})),a.register("knAIT",(function(e,t){"use strict";var n=a("fp2gt"),r=n.assert,o=n.parseBytes,i=n.cachedProperty;function s(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}s.fromPublic=function(e,t){return t instanceof s?t:new s(e,{pub:t})},s.fromSecret=function(e,t){return t instanceof s?t:new s(e,{secret:t})},s.prototype.secret=function(){return this._secret},i(s,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),i(s,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),i(s,"privBytes",(function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,r=t.slice(0,e.encodingLength);return r[0]&=248,r[n]&=127,r[n]|=64,r})),i(s,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),i(s,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),i(s,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),s.prototype.sign=function(e){return r(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},s.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},s.prototype.getSecret=function(e){return r(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},s.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=s})),a.register("8CdZY",(function(e,t){"use strict";var n=a("jXr8Y"),r=a("fp2gt"),o=r.assert,i=r.cachedProperty,s=r.parseBytes;function l(e,t){this.eddsa=e,"object"!=typeof t&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}i(l,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),i(l,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),i(l,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),i(l,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),l.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},l.prototype.toHex=function(){return r.encode(this.toBytes(),"hex").toUpperCase()},e.exports=l})),a.register("fmDmL",(function(e,t){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function r(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function o(e,t,n){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}var i;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{i="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:a("1DJXa").Buffer}catch(e){}function s(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function l(e,t,n){var r=s(e,n);return n-1>=t&&(r|=s(e,n-1)<<4),r}function c(e,t,r,o){for(var i=0,a=0,s=Math.min(e.length,r),l=t;l<s;l++){var c=e.charCodeAt(l)-48;i*=o,a=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&a<o,"Invalid character"),i+=a}return i}function u(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o<e.length&&(16===t?this._parseHex(e,o,r):(this._parseBase(e,t,o),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){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):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("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 o=0;o<this.length;o++)this.words[o]=0;var i,a,s=0;if("be"===r)for(o=e.length-1,i=0;o>=0;o-=3)a=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[i]|=a<<s&67108863,this.words[i+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(o=0,i=0;o<e.length;o+=3)a=e[o]|e[o+1]<<8|e[o+2]<<16,this.words[i]|=a<<s&67108863,this.words[i+1]=a>>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this._strip()},o.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var o,i=0,a=0;if("be"===n)for(r=e.length-1;r>=t;r-=2)o=l(e,t,r)<<i,this.words[a]|=67108863&o,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;else for(r=(e.length-t)%2==0?t+1:t;r<e.length;r+=2)o=l(e,t,r)<<i,this.words[a]|=67108863&o,i>=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;this._strip()},o.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var r=0,o=1;o<=67108863;o*=t)r++;r--,o=o/t|0;for(var i=e.length-n,a=i%r,s=Math.min(i,i-a)+n,l=0,u=n;u<s;u+=r)l=c(e,u,u+r,t),this.imuln(o),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l);if(0!==a){var d=1;for(l=c(e,u,e.length,t),u=0;u<a;u++)d*=t;this.imuln(d),this.words[0]+l<67108864?this.words[0]+=l:this._iaddn(l)}this._strip()},o.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},o.prototype._move=function(e){u(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=d}catch(e){o.prototype.inspect=d}else o.prototype.inspect=d;function d(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var f=["","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"],h=[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],p=[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];o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var o=0,i=0,a=0;a<this.length;a++){var s=this.words[a],l=(16777215&(s<<o|i)).toString(16);i=s>>>24-o&16777215,(o+=2)>=26&&(o-=26,a--),r=0!==i||a!==this.length-1?f[6-l.length]+l+r:l+r}for(0!==i&&(r=i.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],u=p[e];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var m=d.modrn(u).toString(e);r=(d=d.idivn(u)).isZero()?m+r:f[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.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&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},i&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(i,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function m(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var o=0|e.words[0],i=0|t.words[0],a=o*i,s=67108863&a,l=a/67108864|0;n.words[0]=s;for(var c=1;c<r;c++){for(var u=l>>>26,d=67108863&l,f=Math.min(c,t.length-1),h=Math.max(0,c-e.length+1);h<=f;h++){var p=c-h|0;u+=(a=(o=0|e.words[p])*(i=0|t.words[h])+d)/67108864|0,d=67108863&a}n.words[c]=0|d,l=0|u}return 0!==l?n.words[c]=0|l:n.length--,n._strip()}o.prototype.toArrayLike=function(e,t,r){this._strip();var o=this.byteLength(),i=r||Math.max(1,o);n(o<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0");var a=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,i);return this["_toArrayLike"+("le"===t?"LE":"BE")](a,o),a},o.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,o=0,i=0;o<this.length;o++){var a=this.words[o]<<i|r;e[n++]=255&a,n<e.length&&(e[n++]=a>>8&255),n<e.length&&(e[n++]=a>>16&255),6===i?(n<e.length&&(e[n++]=a>>24&255),r=0,i=0):(r=a>>>24,i+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,o=0,i=0;o<this.length;o++){var a=this.words[o]<<i|r;e[n--]=255&a,n>=0&&(e[n--]=a>>8&255),n>=0&&(e[n--]=a>>16&255),6===i?(n>=0&&(e[n--]=a>>24&255),r=0,i=0):(r=a>>>24,i+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.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()},o.prototype.ior=function(e){return n(0==(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(0==(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(0==(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var o=0;o<t;o++)this.words[o]=67108863&~this.words[o];return r>0&&(this.words[o]=~this.words[o]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,o=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<o:this.words[r]&~(1<<o),this._strip()},o.prototype.iadd=function(e){var t,n,r;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?(n=this,r=e):(n=e,r=this);for(var o=0,i=0;i<r.length;i++)t=(0|n.words[i])+(0|r.words[i])+o,this.words[i]=67108863&t,o=t>>>26;for(;0!==o&&i<n.length;i++)t=(0|n.words[i])+o,this.words[i]=67108863&t,o=t>>>26;if(this.length=n.length,0!==o)this.words[this.length]=o,this.length++;else if(n!==this)for(;i<n.length;i++)this.words[i]=n.words[i];return this},o.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)},o.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 n,r,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(n=this,r=e):(n=e,r=this);for(var i=0,a=0;a<r.length;a++)i=(t=(0|n.words[a])-(0|r.words[a])+i)>>26,this.words[a]=67108863&t;for(;0!==i&&a<n.length;a++)i=(t=(0|n.words[a])+i)>>26,this.words[a]=67108863&t;if(0===i&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,n){var r,o,i,a=e.words,s=t.words,l=n.words,c=0,u=0|a[0],d=8191&u,f=u>>>13,h=0|a[1],p=8191&h,m=h>>>13,g=0|a[2],v=8191&g,b=g>>>13,y=0|a[3],w=8191&y,x=y>>>13,S=0|a[4],M=8191&S,_=S>>>13,E=0|a[5],A=8191&E,C=E>>>13,k=0|a[6],T=8191&k,I=k>>>13,O=0|a[7],R=8191&O,P=O>>>13,N=0|a[8],L=8191&N,B=N>>>13,D=0|a[9],j=8191&D,F=D>>>13,z=0|s[0],U=8191&z,H=z>>>13,G=0|s[1],W=8191&G,V=G>>>13,q=0|s[2],K=8191&q,$=q>>>13,J=0|s[3],X=8191&J,Q=J>>>13,Y=0|s[4],Z=8191&Y,ee=Y>>>13,te=0|s[5],ne=8191&te,re=te>>>13,oe=0|s[6],ie=8191&oe,ae=oe>>>13,se=0|s[7],le=8191&se,ce=se>>>13,ue=0|s[8],de=8191&ue,fe=ue>>>13,he=0|s[9],pe=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19;var ge=(c+(r=Math.imul(d,U))|0)+((8191&(o=(o=Math.imul(d,H))+Math.imul(f,U)|0))<<13)|0;c=((i=Math.imul(f,H))+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,r=Math.imul(p,U),o=(o=Math.imul(p,H))+Math.imul(m,U)|0,i=Math.imul(m,H);var ve=(c+(r=r+Math.imul(d,W)|0)|0)+((8191&(o=(o=o+Math.imul(d,V)|0)+Math.imul(f,W)|0))<<13)|0;c=((i=i+Math.imul(f,V)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,r=Math.imul(v,U),o=(o=Math.imul(v,H))+Math.imul(b,U)|0,i=Math.imul(b,H),r=r+Math.imul(p,W)|0,o=(o=o+Math.imul(p,V)|0)+Math.imul(m,W)|0,i=i+Math.imul(m,V)|0;var be=(c+(r=r+Math.imul(d,K)|0)|0)+((8191&(o=(o=o+Math.imul(d,$)|0)+Math.imul(f,K)|0))<<13)|0;c=((i=i+Math.imul(f,$)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,r=Math.imul(w,U),o=(o=Math.imul(w,H))+Math.imul(x,U)|0,i=Math.imul(x,H),r=r+Math.imul(v,W)|0,o=(o=o+Math.imul(v,V)|0)+Math.imul(b,W)|0,i=i+Math.imul(b,V)|0,r=r+Math.imul(p,K)|0,o=(o=o+Math.imul(p,$)|0)+Math.imul(m,K)|0,i=i+Math.imul(m,$)|0;var ye=(c+(r=r+Math.imul(d,X)|0)|0)+((8191&(o=(o=o+Math.imul(d,Q)|0)+Math.imul(f,X)|0))<<13)|0;c=((i=i+Math.imul(f,Q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,r=Math.imul(M,U),o=(o=Math.imul(M,H))+Math.imul(_,U)|0,i=Math.imul(_,H),r=r+Math.imul(w,W)|0,o=(o=o+Math.imul(w,V)|0)+Math.imul(x,W)|0,i=i+Math.imul(x,V)|0,r=r+Math.imul(v,K)|0,o=(o=o+Math.imul(v,$)|0)+Math.imul(b,K)|0,i=i+Math.imul(b,$)|0,r=r+Math.imul(p,X)|0,o=(o=o+Math.imul(p,Q)|0)+Math.imul(m,X)|0,i=i+Math.imul(m,Q)|0;var we=(c+(r=r+Math.imul(d,Z)|0)|0)+((8191&(o=(o=o+Math.imul(d,ee)|0)+Math.imul(f,Z)|0))<<13)|0;c=((i=i+Math.imul(f,ee)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(A,U),o=(o=Math.imul(A,H))+Math.imul(C,U)|0,i=Math.imul(C,H),r=r+Math.imul(M,W)|0,o=(o=o+Math.imul(M,V)|0)+Math.imul(_,W)|0,i=i+Math.imul(_,V)|0,r=r+Math.imul(w,K)|0,o=(o=o+Math.imul(w,$)|0)+Math.imul(x,K)|0,i=i+Math.imul(x,$)|0,r=r+Math.imul(v,X)|0,o=(o=o+Math.imul(v,Q)|0)+Math.imul(b,X)|0,i=i+Math.imul(b,Q)|0,r=r+Math.imul(p,Z)|0,o=(o=o+Math.imul(p,ee)|0)+Math.imul(m,Z)|0,i=i+Math.imul(m,ee)|0;var xe=(c+(r=r+Math.imul(d,ne)|0)|0)+((8191&(o=(o=o+Math.imul(d,re)|0)+Math.imul(f,ne)|0))<<13)|0;c=((i=i+Math.imul(f,re)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul(T,U),o=(o=Math.imul(T,H))+Math.imul(I,U)|0,i=Math.imul(I,H),r=r+Math.imul(A,W)|0,o=(o=o+Math.imul(A,V)|0)+Math.imul(C,W)|0,i=i+Math.imul(C,V)|0,r=r+Math.imul(M,K)|0,o=(o=o+Math.imul(M,$)|0)+Math.imul(_,K)|0,i=i+Math.imul(_,$)|0,r=r+Math.imul(w,X)|0,o=(o=o+Math.imul(w,Q)|0)+Math.imul(x,X)|0,i=i+Math.imul(x,Q)|0,r=r+Math.imul(v,Z)|0,o=(o=o+Math.imul(v,ee)|0)+Math.imul(b,Z)|0,i=i+Math.imul(b,ee)|0,r=r+Math.imul(p,ne)|0,o=(o=o+Math.imul(p,re)|0)+Math.imul(m,ne)|0,i=i+Math.imul(m,re)|0;var Se=(c+(r=r+Math.imul(d,ie)|0)|0)+((8191&(o=(o=o+Math.imul(d,ae)|0)+Math.imul(f,ie)|0))<<13)|0;c=((i=i+Math.imul(f,ae)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(R,U),o=(o=Math.imul(R,H))+Math.imul(P,U)|0,i=Math.imul(P,H),r=r+Math.imul(T,W)|0,o=(o=o+Math.imul(T,V)|0)+Math.imul(I,W)|0,i=i+Math.imul(I,V)|0,r=r+Math.imul(A,K)|0,o=(o=o+Math.imul(A,$)|0)+Math.imul(C,K)|0,i=i+Math.imul(C,$)|0,r=r+Math.imul(M,X)|0,o=(o=o+Math.imul(M,Q)|0)+Math.imul(_,X)|0,i=i+Math.imul(_,Q)|0,r=r+Math.imul(w,Z)|0,o=(o=o+Math.imul(w,ee)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,ee)|0,r=r+Math.imul(v,ne)|0,o=(o=o+Math.imul(v,re)|0)+Math.imul(b,ne)|0,i=i+Math.imul(b,re)|0,r=r+Math.imul(p,ie)|0,o=(o=o+Math.imul(p,ae)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,ae)|0;var Me=(c+(r=r+Math.imul(d,le)|0)|0)+((8191&(o=(o=o+Math.imul(d,ce)|0)+Math.imul(f,le)|0))<<13)|0;c=((i=i+Math.imul(f,ce)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul(L,U),o=(o=Math.imul(L,H))+Math.imul(B,U)|0,i=Math.imul(B,H),r=r+Math.imul(R,W)|0,o=(o=o+Math.imul(R,V)|0)+Math.imul(P,W)|0,i=i+Math.imul(P,V)|0,r=r+Math.imul(T,K)|0,o=(o=o+Math.imul(T,$)|0)+Math.imul(I,K)|0,i=i+Math.imul(I,$)|0,r=r+Math.imul(A,X)|0,o=(o=o+Math.imul(A,Q)|0)+Math.imul(C,X)|0,i=i+Math.imul(C,Q)|0,r=r+Math.imul(M,Z)|0,o=(o=o+Math.imul(M,ee)|0)+Math.imul(_,Z)|0,i=i+Math.imul(_,ee)|0,r=r+Math.imul(w,ne)|0,o=(o=o+Math.imul(w,re)|0)+Math.imul(x,ne)|0,i=i+Math.imul(x,re)|0,r=r+Math.imul(v,ie)|0,o=(o=o+Math.imul(v,ae)|0)+Math.imul(b,ie)|0,i=i+Math.imul(b,ae)|0,r=r+Math.imul(p,le)|0,o=(o=o+Math.imul(p,ce)|0)+Math.imul(m,le)|0,i=i+Math.imul(m,ce)|0;var _e=(c+(r=r+Math.imul(d,de)|0)|0)+((8191&(o=(o=o+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;c=((i=i+Math.imul(f,fe)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,r=Math.imul(j,U),o=(o=Math.imul(j,H))+Math.imul(F,U)|0,i=Math.imul(F,H),r=r+Math.imul(L,W)|0,o=(o=o+Math.imul(L,V)|0)+Math.imul(B,W)|0,i=i+Math.imul(B,V)|0,r=r+Math.imul(R,K)|0,o=(o=o+Math.imul(R,$)|0)+Math.imul(P,K)|0,i=i+Math.imul(P,$)|0,r=r+Math.imul(T,X)|0,o=(o=o+Math.imul(T,Q)|0)+Math.imul(I,X)|0,i=i+Math.imul(I,Q)|0,r=r+Math.imul(A,Z)|0,o=(o=o+Math.imul(A,ee)|0)+Math.imul(C,Z)|0,i=i+Math.imul(C,ee)|0,r=r+Math.imul(M,ne)|0,o=(o=o+Math.imul(M,re)|0)+Math.imul(_,ne)|0,i=i+Math.imul(_,re)|0,r=r+Math.imul(w,ie)|0,o=(o=o+Math.imul(w,ae)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,ae)|0,r=r+Math.imul(v,le)|0,o=(o=o+Math.imul(v,ce)|0)+Math.imul(b,le)|0,i=i+Math.imul(b,ce)|0,r=r+Math.imul(p,de)|0,o=(o=o+Math.imul(p,fe)|0)+Math.imul(m,de)|0,i=i+Math.imul(m,fe)|0;var Ee=(c+(r=r+Math.imul(d,pe)|0)|0)+((8191&(o=(o=o+Math.imul(d,me)|0)+Math.imul(f,pe)|0))<<13)|0;c=((i=i+Math.imul(f,me)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,r=Math.imul(j,W),o=(o=Math.imul(j,V))+Math.imul(F,W)|0,i=Math.imul(F,V),r=r+Math.imul(L,K)|0,o=(o=o+Math.imul(L,$)|0)+Math.imul(B,K)|0,i=i+Math.imul(B,$)|0,r=r+Math.imul(R,X)|0,o=(o=o+Math.imul(R,Q)|0)+Math.imul(P,X)|0,i=i+Math.imul(P,Q)|0,r=r+Math.imul(T,Z)|0,o=(o=o+Math.imul(T,ee)|0)+Math.imul(I,Z)|0,i=i+Math.imul(I,ee)|0,r=r+Math.imul(A,ne)|0,o=(o=o+Math.imul(A,re)|0)+Math.imul(C,ne)|0,i=i+Math.imul(C,re)|0,r=r+Math.imul(M,ie)|0,o=(o=o+Math.imul(M,ae)|0)+Math.imul(_,ie)|0,i=i+Math.imul(_,ae)|0,r=r+Math.imul(w,le)|0,o=(o=o+Math.imul(w,ce)|0)+Math.imul(x,le)|0,i=i+Math.imul(x,ce)|0,r=r+Math.imul(v,de)|0,o=(o=o+Math.imul(v,fe)|0)+Math.imul(b,de)|0,i=i+Math.imul(b,fe)|0;var Ae=(c+(r=r+Math.imul(p,pe)|0)|0)+((8191&(o=(o=o+Math.imul(p,me)|0)+Math.imul(m,pe)|0))<<13)|0;c=((i=i+Math.imul(m,me)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(j,K),o=(o=Math.imul(j,$))+Math.imul(F,K)|0,i=Math.imul(F,$),r=r+Math.imul(L,X)|0,o=(o=o+Math.imul(L,Q)|0)+Math.imul(B,X)|0,i=i+Math.imul(B,Q)|0,r=r+Math.imul(R,Z)|0,o=(o=o+Math.imul(R,ee)|0)+Math.imul(P,Z)|0,i=i+Math.imul(P,ee)|0,r=r+Math.imul(T,ne)|0,o=(o=o+Math.imul(T,re)|0)+Math.imul(I,ne)|0,i=i+Math.imul(I,re)|0,r=r+Math.imul(A,ie)|0,o=(o=o+Math.imul(A,ae)|0)+Math.imul(C,ie)|0,i=i+Math.imul(C,ae)|0,r=r+Math.imul(M,le)|0,o=(o=o+Math.imul(M,ce)|0)+Math.imul(_,le)|0,i=i+Math.imul(_,ce)|0,r=r+Math.imul(w,de)|0,o=(o=o+Math.imul(w,fe)|0)+Math.imul(x,de)|0,i=i+Math.imul(x,fe)|0;var Ce=(c+(r=r+Math.imul(v,pe)|0)|0)+((8191&(o=(o=o+Math.imul(v,me)|0)+Math.imul(b,pe)|0))<<13)|0;c=((i=i+Math.imul(b,me)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(j,X),o=(o=Math.imul(j,Q))+Math.imul(F,X)|0,i=Math.imul(F,Q),r=r+Math.imul(L,Z)|0,o=(o=o+Math.imul(L,ee)|0)+Math.imul(B,Z)|0,i=i+Math.imul(B,ee)|0,r=r+Math.imul(R,ne)|0,o=(o=o+Math.imul(R,re)|0)+Math.imul(P,ne)|0,i=i+Math.imul(P,re)|0,r=r+Math.imul(T,ie)|0,o=(o=o+Math.imul(T,ae)|0)+Math.imul(I,ie)|0,i=i+Math.imul(I,ae)|0,r=r+Math.imul(A,le)|0,o=(o=o+Math.imul(A,ce)|0)+Math.imul(C,le)|0,i=i+Math.imul(C,ce)|0,r=r+Math.imul(M,de)|0,o=(o=o+Math.imul(M,fe)|0)+Math.imul(_,de)|0,i=i+Math.imul(_,fe)|0;var ke=(c+(r=r+Math.imul(w,pe)|0)|0)+((8191&(o=(o=o+Math.imul(w,me)|0)+Math.imul(x,pe)|0))<<13)|0;c=((i=i+Math.imul(x,me)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul(j,Z),o=(o=Math.imul(j,ee))+Math.imul(F,Z)|0,i=Math.imul(F,ee),r=r+Math.imul(L,ne)|0,o=(o=o+Math.imul(L,re)|0)+Math.imul(B,ne)|0,i=i+Math.imul(B,re)|0,r=r+Math.imul(R,ie)|0,o=(o=o+Math.imul(R,ae)|0)+Math.imul(P,ie)|0,i=i+Math.imul(P,ae)|0,r=r+Math.imul(T,le)|0,o=(o=o+Math.imul(T,ce)|0)+Math.imul(I,le)|0,i=i+Math.imul(I,ce)|0,r=r+Math.imul(A,de)|0,o=(o=o+Math.imul(A,fe)|0)+Math.imul(C,de)|0,i=i+Math.imul(C,fe)|0;var Te=(c+(r=r+Math.imul(M,pe)|0)|0)+((8191&(o=(o=o+Math.imul(M,me)|0)+Math.imul(_,pe)|0))<<13)|0;c=((i=i+Math.imul(_,me)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(j,ne),o=(o=Math.imul(j,re))+Math.imul(F,ne)|0,i=Math.imul(F,re),r=r+Math.imul(L,ie)|0,o=(o=o+Math.imul(L,ae)|0)+Math.imul(B,ie)|0,i=i+Math.imul(B,ae)|0,r=r+Math.imul(R,le)|0,o=(o=o+Math.imul(R,ce)|0)+Math.imul(P,le)|0,i=i+Math.imul(P,ce)|0,r=r+Math.imul(T,de)|0,o=(o=o+Math.imul(T,fe)|0)+Math.imul(I,de)|0,i=i+Math.imul(I,fe)|0;var Ie=(c+(r=r+Math.imul(A,pe)|0)|0)+((8191&(o=(o=o+Math.imul(A,me)|0)+Math.imul(C,pe)|0))<<13)|0;c=((i=i+Math.imul(C,me)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(j,ie),o=(o=Math.imul(j,ae))+Math.imul(F,ie)|0,i=Math.imul(F,ae),r=r+Math.imul(L,le)|0,o=(o=o+Math.imul(L,ce)|0)+Math.imul(B,le)|0,i=i+Math.imul(B,ce)|0,r=r+Math.imul(R,de)|0,o=(o=o+Math.imul(R,fe)|0)+Math.imul(P,de)|0,i=i+Math.imul(P,fe)|0;var Oe=(c+(r=r+Math.imul(T,pe)|0)|0)+((8191&(o=(o=o+Math.imul(T,me)|0)+Math.imul(I,pe)|0))<<13)|0;c=((i=i+Math.imul(I,me)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(j,le),o=(o=Math.imul(j,ce))+Math.imul(F,le)|0,i=Math.imul(F,ce),r=r+Math.imul(L,de)|0,o=(o=o+Math.imul(L,fe)|0)+Math.imul(B,de)|0,i=i+Math.imul(B,fe)|0;var Re=(c+(r=r+Math.imul(R,pe)|0)|0)+((8191&(o=(o=o+Math.imul(R,me)|0)+Math.imul(P,pe)|0))<<13)|0;c=((i=i+Math.imul(P,me)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(j,de),o=(o=Math.imul(j,fe))+Math.imul(F,de)|0,i=Math.imul(F,fe);var Pe=(c+(r=r+Math.imul(L,pe)|0)|0)+((8191&(o=(o=o+Math.imul(L,me)|0)+Math.imul(B,pe)|0))<<13)|0;c=((i=i+Math.imul(B,me)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863;var Ne=(c+(r=Math.imul(j,pe))|0)+((8191&(o=(o=Math.imul(j,me))+Math.imul(F,pe)|0))<<13)|0;return c=((i=Math.imul(F,me))+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,l[0]=ge,l[1]=ve,l[2]=be,l[3]=ye,l[4]=we,l[5]=xe,l[6]=Se,l[7]=Me,l[8]=_e,l[9]=Ee,l[10]=Ae,l[11]=Ce,l[12]=ke,l[13]=Te,l[14]=Ie,l[15]=Oe,l[16]=Re,l[17]=Pe,l[18]=Ne,0!==c&&(l[19]=c,n.length++),n};function v(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,o=0,i=0;i<n.length-1;i++){var a=o;o=0;for(var s=67108863&r,l=Math.min(i,t.length-1),c=Math.max(0,i-e.length+1);c<=l;c++){var u=i-c,d=(0|e.words[u])*(0|t.words[c]),f=67108863&d;s=67108863&(f=f+s|0),o+=(a=(a=a+(d/67108864|0)|0)+(f>>>26)|0)>>>26,a&=67108863}n.words[i]=s,r=a,a=o}return 0!==r?n.words[i]=r:n.length--,n._strip()}function b(e,t,n){return v(e,t,n)}function y(e,t){this.x=e,this.y=t}Math.imul||(g=m),o.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?g(this,e,t):n<63?m(this,e,t):n<1024?v(this,e,t):b(this,e,t)},y.prototype.makeRBT=function(e){for(var t=new Array(e),n=o.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},y.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,o=0;o<t;o++)r|=(1&e)<<t-o-1,e>>=1;return r},y.prototype.permute=function(e,t,n,r,o,i){for(var a=0;a<i;a++)r[a]=t[e[a]],o[a]=n[e[a]]},y.prototype.transform=function(e,t,n,r,o,i){this.permute(i,e,t,n,r,o);for(var a=1;a<o;a<<=1)for(var s=a<<1,l=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),u=0;u<o;u+=s)for(var d=l,f=c,h=0;h<a;h++){var p=n[u+h],m=r[u+h],g=n[u+h+a],v=r[u+h+a],b=d*g-f*v;v=d*v+f*g,g=b,n[u+h]=p+g,r[u+h]=m+v,n[u+h+a]=p-g,r[u+h+a]=m-v,h!==s&&(b=l*d-c*f,f=l*f+c*d,d=b)}},y.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,o=0;for(n=n/2|0;n;n>>>=1)o++;return 1<<o+1+r},y.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var o=e[r];e[r]=e[n-r-1],e[n-r-1]=o,o=t[r],t[r]=-t[n-r-1],t[n-r-1]=-o}},y.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var o=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&o,n=o<67108864?0:o/67108864|0}return e},y.prototype.convert13b=function(e,t,r,o){for(var i=0,a=0;a<t;a++)i+=0|e[a],r[2*a]=8191&i,i>>>=13,r[2*a+1]=8191&i,i>>>=13;for(a=2*t;a<o;++a)r[a]=0;n(0===i),n(0==(-8192&i))},y.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},y.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),o=this.makeRBT(r),i=this.stub(r),a=new Array(r),s=new Array(r),l=new Array(r),c=new Array(r),u=new Array(r),d=new Array(r),f=n.words;f.length=r,this.convert13b(e.words,e.length,a,r),this.convert13b(t.words,t.length,c,r),this.transform(a,i,s,l,r,o),this.transform(c,i,u,d,r,o);for(var h=0;h<r;h++){var p=s[h]*u[h]-l[h]*d[h];l[h]=s[h]*d[h]+l[h]*u[h],s[h]=p}return this.conjugate(s,l,r),this.transform(s,l,f,i,r,o),this.conjugate(f,i,r),this.normalize13b(f,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),b(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,o=0;o<this.length;o++){var i=(0|this.words[o])*e,a=(67108863&i)+(67108863&r);r>>=26,r+=i/67108864|0,r+=a>>>26,this.words[o]=67108863&a}return 0!==r&&(this.words[o]=r,this.length++),t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,o=n%26;t[n]=e.words[r]>>>o&1}return t}(e);if(0===t.length)return new o(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,o=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t<this.length;t++){var s=this.words[t]&i,l=(0|this.words[t])-s<<r;this.words[t]=l|a,a=s>>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t<o;t++)this.words[t]=0;this.length+=o}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var o;n("number"==typeof e&&e>=0),o=t?(t-t%26)/26:0;var i=e%26,a=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<<i,l=r;if(o-=a,o=Math.max(0,o),l){for(var c=0;c<a;c++)l.words[c]=this.words[c];l.length=a}if(0===a);else if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var u=0;for(c=this.length-1;c>=0&&(0!==u||c>=o);c--){var d=0|this.words[c];this.words[c]=u<<26-i|d>>>i,u=d&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,o=1<<t;return!(this.length<=r)&&!!(this.words[r]&o)},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var o=67108863^67108863>>>t<<t;this.words[this.length-1]&=o}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(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)},o.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},o.prototype.isubn=function(e){if(n("number"==typeof e),n(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()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var o,i,a=e.length+r;this._expand(a);var s=0;for(o=0;o<e.length;o++){i=(0|this.words[o+r])+s;var l=(0|e.words[o])*t;s=((i-=67108863&l)>>26)-(l/67108864|0),this.words[o+r]=67108863&i}for(;o<this.length-r;o++)s=(i=(0|this.words[o+r])+s)>>26,this.words[o+r]=67108863&i;if(0===s)return this._strip();for(n(-1===s),s=0,o=0;o<this.length;o++)s=(i=-(0|this.words[o])+s)>>26,this.words[o]=67108863&i;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var n=(this.length,e.length),r=this.clone(),i=e,a=0|i.words[i.length-1];0!==(n=26-this._countBits(a))&&(i=i.ushln(n),r.iushln(n),a=0|i.words[i.length-1]);var s,l=r.length-i.length;if("mod"!==t){(s=new o(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c<s.length;c++)s.words[c]=0}var u=r.clone()._ishlnsubmul(i,1,l);0===u.negative&&(r=u,s&&(s.words[l]=1));for(var d=l-1;d>=0;d--){var f=67108864*(0|r.words[i.length+d])+(0|r.words[i.length+d-1]);for(f=Math.min(f/a|0,67108863),r._ishlnsubmul(i,f,d);0!==r.negative;)f--,r.negative=0,r._ishlnsubmul(i,1,d),r.isZero()||(r.negative^=1);s&&(s.words[d]=f)}return s&&s._strip(),r._strip(),"div"!==t&&0!==n&&r.iushrn(n),{div:s||null,mod:r}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:i,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!=(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,a,s},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),o=e.andln(1),i=n.cmp(r);return i<0||1===o&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=67108864%e,o=0,i=this.length-1;i>=0;i--)o=(r*o+(0|this.words[i]))%e;return t?-o:o},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,o=this.length-1;o>=0;o--){var i=(0|this.words[o])+67108864*r;this.words[o]=i/e|0,r=i%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),a=new o(0),s=new o(0),l=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var f=0,h=1;0==(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||a.isOdd())&&(i.iadd(u),a.isub(d)),i.iushrn(1),a.iushrn(1);for(var p=0,m=1;0==(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(d)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),a.isub(l)):(r.isub(t),s.isub(i),l.isub(a))}return{a:s,b:l,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,a=new o(1),s=new o(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0==(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var d=0,f=1;0==(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(i=0===t.cmpn(1)?a:s).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var r=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var o=t.cmp(n);if(o<0){var i=t;t=n,n=i}else if(0===o||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,o=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=o,this;for(var i=o,a=r;0!==i&&a<this.length;a++){var s=0|this.words[a];i=(s+=i)>>>26,s&=67108863,this.words[a]=s}return 0!==i&&(this.words[a]=i,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:o<e?-1:1}return 0!==this.negative?0|-t:t},o.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},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;n>=0;n--){var r=0|this.words[n],o=0|e.words[n];if(r!==o){r<o?t=-1:r>o&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new A(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function x(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function S(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function M(){x.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){x.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function E(){x.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function C(e){A.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(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)}x.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},x.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},x.prototype.split=function(e,t){e.iushrn(this.n,0,t)},x.prototype.imulK=function(e){return e.imul(this.k)},r(S,x),S.prototype.split=function(e,t){for(var n=4194303,r=Math.min(e.length,9),o=0;o<r;o++)t.words[o]=e.words[o];if(t.length=r,e.length<=9)return e.words[0]=0,void(e.length=1);var i=e.words[9];for(t.words[t.length++]=i&n,o=10;o<e.length;o++){var a=0|e.words[o];e.words[o-10]=(a&n)<<4|i>>>22,i=a}i>>>=22,e.words[o-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},S.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},r(M,x),r(_,x),r(E,x),E.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,o=67108863&r;r>>>=26,e.words[n]=o,t=r}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new S;else if("p224"===e)t=new M;else if("p192"===e)t=new _;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new E}return w[e]=t,t},A.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},A.prototype._verify2=function(e,t){n(0==(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},A.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(u(e,e.umod(this.m)._forceRed(this)),e)},A.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},A.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},A.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},A.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},A.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},A.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},A.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},A.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},A.prototype.isqr=function(e){return this.imul(e,e.clone())},A.prototype.sqr=function(e){return this.mul(e,e)},A.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),a=0;!i.isZero()&&0===i.andln(1);)a++,i.iushrn(1);n(!i.isZero());var s=new o(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new o(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var d=this.pow(u,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),p=a;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g<p);var v=this.pow(d,new o(1).iushln(p-g-1));f=f.redMul(v),d=v.redSqr(),h=h.redMul(d),p=g}return f},A.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},A.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new o(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],a=0,s=0,l=t.bitLength()%26;for(0===l&&(l=26),r=t.length-1;r>=0;r--){for(var c=t.words[r],u=l-1;u>=0;u--){var d=c>>u&1;i!==n[0]&&(i=this.sqr(i)),0!==d||0!==a?(a<<=1,a|=d,(4===++s||0===r&&0===u)&&(i=this.mul(i,n[a]),s=0,a=0)):s=0}l=26}return i},A.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},A.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new C(e)},r(C,A),C.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},C.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},C.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=n.isub(r).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},C.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var n=e.mul(t),r=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=n.isub(r).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},C.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)})),a.register("fEs62",(function(e,t){var n=a("7BZGE"),r=a("ei3QW"),o=a("3skN1"),i=a("duD0R"),s=a("cabM3"),l=a("8ByQm").Buffer;function c(e){var t;"object"!=typeof e||l.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=l.from(e));var a,c,u=o(e,t),d=u.tag,f=u.data;switch(d){case"CERTIFICATE":c=n.certificate.decode(f,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=n.PublicKey.decode(f,"der")),a=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=n.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+a)}case"ENCRYPTED PRIVATE KEY":f=function(e,t){var n=e.algorithm.decrypt.kde.kdeparams.salt,o=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=r[e.algorithm.decrypt.cipher.algo.join(".")],c=e.algorithm.decrypt.cipher.iv,u=e.subjectPrivateKey,d=parseInt(a.split("-")[1],10)/8,f=s.pbkdf2Sync(t,n,o,d,"sha1"),h=i.createDecipheriv(a,f,c),p=[];return p.push(h.update(u)),p.push(h.final()),l.concat(p)}(f=n.EncryptedPrivateKey.decode(f,"der"),t);case"PRIVATE KEY":switch(a=(c=n.PrivateKey.decode(f,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:n.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=n.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+a)}case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(f,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(f,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(f,"der")};case"EC PRIVATE KEY":return{curve:(f=n.ECPrivateKey.decode(f,"der")).parameters.value,privateKey:f.privateKey};default:throw new Error("unknown key type "+d)}}e.exports=c,c.signature=n.signature})),a.register("7BZGE",(function(t,n){var r,o,i,s,l,c,u,d,f,h;e(t.exports,"certificate",(()=>r),(e=>r=e)),e(t.exports,"RSAPrivateKey",(()=>o),(e=>o=e)),e(t.exports,"RSAPublicKey",(()=>i),(e=>i=e)),e(t.exports,"PublicKey",(()=>s),(e=>s=e)),e(t.exports,"PrivateKey",(()=>l),(e=>l=e)),e(t.exports,"EncryptedPrivateKey",(()=>c),(e=>c=e)),e(t.exports,"DSAPrivateKey",(()=>u),(e=>u=e)),e(t.exports,"DSAparam",(()=>d),(e=>d=e)),e(t.exports,"ECPrivateKey",(()=>f),(e=>f=e)),e(t.exports,"signature",(()=>h),(e=>h=e));var p=a("fXArl");r=a("jT65m");var m=p.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));o=m;var g=p.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));i=g;var v=p.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(b),this.key("subjectPublicKey").bitstr())}));s=v;var b=p.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),y=p.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(b),this.key("subjectPrivateKey").octstr())}));l=y;var w=p.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));c=w;var x=p.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));u=x,d=p.define("DSAparam",(function(){this.int()}));var S=p.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(M),this.key("publicKey").optional().explicit(1).bitstr())}));f=S;var M=p.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));h=p.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))})),a.register("fXArl",(function(e,t){"use strict";const n=e.exports;n.bignum=a("jXr8Y"),n.define=a("i8Q43").define,n.base=a("2LhNZ"),n.constants=a("bPkB2"),n.decoders=a("f0HFe"),n.encoders=a("gxTVa")})),a.register("i8Q43",(function(e,t){"use strict";var n=a("gxTVa"),r=a("f0HFe"),o=a("5jAh8");function i(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}e.exports.define=function(e,t){return new i(e,t)},i.prototype._createNamed=function(e){const t=this.name;function n(e){this._initNamed(e,t)}return o(n,e),n.prototype._initNamed=function(t,n){e.call(this,t,n)},new n(this)},i.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(r[e])),this.decoders[e]},i.prototype.decode=function(e,t,n){return this._getDecoder(t).decode(e,n)},i.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n[e])),this.encoders[e]},i.prototype.encode=function(e,t,n){return this._getEncoder(t).encode(e,n)}})),a.register("gxTVa",(function(e,t){"use strict";const n=e.exports;n.der=a("ak7Mt"),n.pem=a("2SPPK")})),a.register("ak7Mt",(function(e,t){"use strict";var n=a("5jAh8"),r=a("lfHxF").Buffer,o=a("LjaX0"),i=a("jPxyL");function s(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new l,this.tree._init(e.body)}function l(e){o.call(this,"der",e)}function c(e){return e<10?"0"+e:e}e.exports=s,s.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(l,o),l.prototype._encodeComposite=function(e,t,n,o){const a=function(e,t,n,r){let o;"seqof"===e?e="seq":"setof"===e&&(e="set");if(i.tagByName.hasOwnProperty(e))o=i.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);o=e}if(o>=31)return r.error("Multi-octet tag encoding unsupported");t||(o|=32);return o|=i.tagClassByName[n||"universal"]<<6,o}(e,t,n,this.reporter);if(o.length<128){const e=r.alloc(2);return e[0]=a,e[1]=o.length,this._createEncoderBuffer([e,o])}let s=1;for(let e=o.length;e>=256;e>>=8)s++;const l=r.alloc(2+s);l[0]=a,l[1]=128|s;for(let e=1+s,t=o.length;t>0;e--,t>>=8)l[e]=255&t;return this._createEncoderBuffer([l,o])},l.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=r.alloc(2*e.length);for(let n=0;n<e.length;n++)t.writeUInt16BE(e.charCodeAt(n),2*n);return this._createEncoderBuffer(t)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},l.prototype._encodeObjid=function(e,t,n){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s.]+/g);for(let t=0;t<e.length;t++)e[t]|=0}else if(Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!n){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let o=0;for(let t=0;t<e.length;t++){let n=e[t];for(o++;n>=128;n>>=7)o++}const i=r.alloc(o);let a=i.length-1;for(let t=e.length-1;t>=0;t--){let n=e[t];for(i[a--]=127&n;(n>>=7)>0;)i[a--]=128|127&n}return this._createEncoderBuffer(i)},l.prototype._encodeTime=function(e,t){let n;const r=new Date(e);return"gentime"===t?n=[c(r.getUTCFullYear()),c(r.getUTCMonth()+1),c(r.getUTCDate()),c(r.getUTCHours()),c(r.getUTCMinutes()),c(r.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[c(r.getUTCFullYear()%100),c(r.getUTCMonth()+1),c(r.getUTCDate()),c(r.getUTCHours()),c(r.getUTCMinutes()),c(r.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},l.prototype._encodeNull=function(){return this._createEncoderBuffer("")},l.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!r.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=r.from(t)}if(r.isBuffer(e)){let t=e.length;0===e.length&&t++;const n=r.alloc(t);return e.copy(n),0===e.length&&(n[0]=0),this._createEncoderBuffer(n)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let n=1;for(let t=e;t>=256;t>>=8)n++;const o=new Array(n);for(let t=o.length-1;t>=0;t--)o[t]=255&e,e>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(r.from(o))},l.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},l.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},l.prototype._skipDefault=function(e,t,n){const r=this._baseState;let o;if(null===r.default)return!1;const i=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,t,n).join()),i.length!==r.defaultBuffer.length)return!1;for(o=0;o<i.length;o++)if(i[o]!==r.defaultBuffer[o])return!1;return!0}})),a.register("lfHxF",(function(e,t){var n,r=a("ePtPP"),o=a("bqBrJ"),i=o.Buffer,s={};for(n in o)o.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(s[n]=o[n]);var l=s.Buffer={};for(n in i)i.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(l[n]=i[n]);if(s.Buffer.prototype=i.prototype,l.from&&l.from!==Uint8Array.from||(l.from=function(e,t,n){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return i(e,t,n)}),l.alloc||(l.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2147483648)throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=i(e);return t&&0!==t.length?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r}),!s.kStringMaxLength)try{s.kStringMaxLength=r.binding("buffer").kStringMaxLength}catch(e){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),e.exports=s})),a.register("LjaX0",(function(e,t){"use strict";var n=a("9PoU3").Reporter,r=a("bJRdc").EncoderBuffer,o=a("bJRdc").DecoderBuffer,i=a("iGZtb");const s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function c(e,t,n){const r={};this._baseState=r,r.name=n,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=c;const u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){const e=this._baseState,t={};u.forEach((function(n){t[n]=e[n]}));const n=new this.constructor(t.parent);return n._baseState=t,n},c.prototype._wrap=function(){const e=this._baseState;l.forEach((function(t){this[t]=function(){const n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}}),this)},c.prototype._init=function(e){const t=this._baseState;i(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),i.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){const t=this._baseState,n=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==n.length&&(i(null===t.children),t.children=n,n.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(i(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(n){n==(0|n)&&(n|=0);const r=e[n];t[r]=n})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),s.forEach((function(e){c.prototype[e]=function(){const t=this._baseState,n=Array.prototype.slice.call(arguments);return i(null===t.tag),t.tag=e,this._useArgs(n),this}})),c.prototype.use=function(e){i(e);const t=this._baseState;return i(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){const t=this._baseState;return i(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){const t=this._baseState;return i(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){const t=this._baseState;return i(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){const t=this._baseState;return i(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){const t=this._baseState;return i(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){const t=this._baseState;return i(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){const n=this._baseState;if(null===n.parent)return e.wrapResult(n.children[0]._decode(e,t));let r,i=n.default,a=!0,s=null;if(null!==n.key&&(s=e.enterKey(n.key)),n.optional){let r=null;if(null!==n.explicit?r=n.explicit:null!==n.implicit?r=n.implicit:null!==n.tag&&(r=n.tag),null!==r||n.any){if(a=this._peekTag(e,r,n.any),e.isError(a))return a}else{const r=e.save();try{null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),a=!0}catch(e){a=!1}e.restore(r)}}if(n.obj&&a&&(r=e.enterObject()),a){if(null!==n.explicit){const t=this._decodeTag(e,n.explicit);if(e.isError(t))return t;e=t}const r=e.offset;if(null===n.use&&null===n.choice){let t;n.any&&(t=e.save());const r=this._decodeTag(e,null!==n.implicit?n.implicit:n.tag,n.any);if(e.isError(r))return r;n.any?i=e.raw(t):e=r}if(t&&t.track&&null!==n.tag&&t.track(e.path(),r,e.length,"tagged"),t&&t.track&&null!==n.tag&&t.track(e.path(),e.offset,e.length,"content"),n.any||(i=null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(e,t)})),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){const r=new o(i);i=this._getUse(n.contains,e._reporterState.obj)._decode(r,t)}}return n.obj&&a&&(i=e.leaveObject(r)),null===n.key||null===i&&!0!==a?null!==s&&e.exitKey(s):e.leaveKey(s,n.key,i),i},c.prototype._decodeGeneric=function(e,t,n){const r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],n):/str$/.test(e)?this._decodeStr(t,e,n):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],n):"objid"===e?this._decodeObjid(t,null,null,n):"gentime"===e||"utctime"===e?this._decodeTime(t,e,n):"null_"===e?this._decodeNull(t,n):"bool"===e?this._decodeBool(t,n):"objDesc"===e?this._decodeStr(t,e,n):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,n):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){const n=this._baseState;return n.useDecoder=this._use(e,t),i(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},c.prototype._decodeChoice=function(e,t){const n=this._baseState;let r=null,o=!1;return Object.keys(n.choice).some((function(i){const a=e.save(),s=n.choice[i];try{const n=s._decode(e,t);if(e.isError(n))return!1;r={type:i,value:n},o=!0}catch(t){return e.restore(a),!1}return!0}),this),o?r:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new r(e,this.reporter)},c.prototype._encode=function(e,t,n){const r=this._baseState;if(null!==r.default&&r.default===e)return;const o=this._encodeValue(e,t,n);return void 0===o||this._skipDefault(o,t,n)?void 0:o},c.prototype._encodeValue=function(e,t,r){const o=this._baseState;if(null===o.parent)return o.children[0]._encode(e,t||new n);let i=null;if(this.reporter=t,o.optional&&void 0===e){if(null===o.default)return;e=o.default}let a=null,s=!1;if(o.any)i=this._createEncoderBuffer(e);else if(o.choice)i=this._encodeChoice(e,t);else if(o.contains)a=this._getUse(o.contains,r)._encode(e,t),s=!0;else if(o.children)a=o.children.map((function(n){if("null_"===n._baseState.tag)return n._encode(null,t,e);if(null===n._baseState.key)return t.error("Child should have a key");const r=t.enterKey(n._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");const o=n._encode(e[n._baseState.key],t,e);return t.leaveKey(r),o}),this).filter((function(e){return e})),a=this._createEncoderBuffer(a);else if("seqof"===o.tag||"setof"===o.tag){if(!o.args||1!==o.args.length)return t.error("Too many args for : "+o.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");const n=this.clone();n._baseState.implicit=null,a=this._createEncoderBuffer(e.map((function(n){const r=this._baseState;return this._getUse(r.args[0],e)._encode(n,t)}),n))}else null!==o.use?i=this._getUse(o.use,r)._encode(e,t):(a=this._encodePrimitive(o.tag,e),s=!0);if(!o.any&&null===o.choice){const e=null!==o.implicit?o.implicit:o.tag,n=null===o.implicit?"universal":"context";null===e?null===o.use&&t.error("Tag could be omitted only for .use()"):null===o.use&&(i=this._encodeComposite(e,s,n,a))}return null!==o.explicit&&(i=this._encodeComposite(o.explicit,!1,"context",i)),i},c.prototype._encodeChoice=function(e,t){const n=this._baseState,r=n.choice[e.type];return r||i(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){const n=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&n.args)return this._encodeObjid(t,n.reverseArgs[0],n.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,n.args&&n.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}})),a.register("9PoU3",(function(t,n){var r;e(t.exports,"Reporter",(()=>r),(e=>r=e));var o=a("5jAh8");function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function s(e,t){this.path=e,this.rethrow(t)}r=i,i.prototype.isError=function(e){return e instanceof s},i.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){const t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,n){const r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=n)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){const t=this._reporterState,n=t.obj;return t.obj=e,n},i.prototype.error=function(e){let t;const n=this._reporterState,r=e instanceof s;if(t=r?e:new s(n.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!n.options.partial)throw t;return r||n.errors.push(t),t},i.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},o(s,Error),s.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,s),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}})),a.register("bJRdc",(function(t,n){var r,o;e(t.exports,"DecoderBuffer",(()=>r),(e=>r=e)),e(t.exports,"EncoderBuffer",(()=>o),(e=>o=e));var i=a("5jAh8"),s=a("9PoU3").Reporter,l=a("lfHxF").Buffer;function c(e,t){s.call(this,t),l.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function u(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return u.isEncoderBuffer(e)||(e=new u(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=l.byteLength(e);else{if(!l.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}i(c,s),r=c,c.isDecoderBuffer=function(e){if(e instanceof c)return!0;return"object"==typeof e&&l.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},c.prototype.save=function(){return{offset:this.offset,reporter:s.prototype.save.call(this)}},c.prototype.restore=function(e){const t=new c(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,s.prototype.restore.call(this,e.reporter),t},c.prototype.isEmpty=function(){return this.offset===this.length},c.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},c.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const n=new c(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n},c.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},o=u,u.isEncoderBuffer=function(e){if(e instanceof u)return!0;return"object"==typeof e&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},u.prototype.join=function(e,t){return e||(e=l.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(n){n.join(e,t),t+=n.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):l.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}})),a.register("jPxyL",(function(t,n){var r,o,i,a;function s(e){const t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);const r=e[n];t[r]=n})),t}e(t.exports,"tagClass",(()=>r),(e=>r=e)),e(t.exports,"tagClassByName",(()=>o),(e=>o=e)),e(t.exports,"tag",(()=>i),(e=>i=e)),e(t.exports,"tagByName",(()=>a),(e=>a=e)),o=s(r={0:"universal",1:"application",2:"context",3:"private"}),a=s(i={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"})})),a.register("2SPPK",(function(e,t){"use strict";var n=a("5jAh8"),r=a("ak7Mt");function o(e){r.call(this,e),this.enc="pem"}n(o,r),e.exports=o,o.prototype.encode=function(e,t){const n=r.prototype.encode.call(this,e).toString("base64"),o=["-----BEGIN "+t.label+"-----"];for(let e=0;e<n.length;e+=64)o.push(n.slice(e,e+64));return o.push("-----END "+t.label+"-----"),o.join("\n")}})),a.register("f0HFe",(function(e,t){"use strict";const n=e.exports;n.der=a("hGpEk"),n.pem=a("cpbbP")})),a.register("hGpEk",(function(e,t){"use strict";var n=a("5jAh8"),r=a("jXr8Y"),o=a("bJRdc").DecoderBuffer,i=a("LjaX0"),s=a("jPxyL");function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){i.call(this,"der",e)}function u(e,t){let n=e.readUInt8(t);if(e.isError(n))return n;const r=s.tagClass[n>>6],o=0==(32&n);if(31==(31&n)){let r=n;for(n=0;128==(128&r);){if(r=e.readUInt8(t),e.isError(r))return r;n<<=7,n|=127&r}}else n&=31;return{cls:r,primitive:o,tag:n,tagStr:s.tag[n]}}function d(e,t,n){let r=e.readUInt8(n);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;const o=127&r;if(o>4)return e.error("length octect is too long");r=0;for(let t=0;t<o;t++){r<<=8;const t=e.readUInt8(n);if(e.isError(t))return t;r|=t}return r}e.exports=l,l.prototype.decode=function(e,t){return o.isDecoderBuffer(e)||(e=new o(e,t)),this.tree._decode(e,t)},n(c,i),c.prototype._peekTag=function(e,t,n){if(e.isEmpty())return!1;const r=e.save(),o=u(e,'Failed to peek tag: "'+t+'"');return e.isError(o)?o:(e.restore(r),o.tag===t||o.tagStr===t||o.tagStr+"of"===t||n)},c.prototype._decodeTag=function(e,t,n){const r=u(e,'Failed to decode tag of "'+t+'"');if(e.isError(r))return r;let o=d(e,r.primitive,'Failed to get length of "'+t+'"');if(e.isError(o))return o;if(!n&&r.tag!==t&&r.tagStr!==t&&r.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(r.primitive||null!==o)return e.skip(o,'Failed to match body of: "'+t+'"');const i=e.save(),a=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(a)?a:(o=e.offset-i.offset,e.restore(i),e.skip(o,'Failed to match body of: "'+t+'"'))},c.prototype._skipUntilEnd=function(e,t){for(;;){const n=u(e,t);if(e.isError(n))return n;const r=d(e,n.primitive,t);if(e.isError(r))return r;let o;if(o=n.primitive||null!==r?e.skip(r):this._skipUntilEnd(e,t),e.isError(o))return o;if("end"===n.tagStr)break}},c.prototype._decodeList=function(e,t,n,r){const o=[];for(;!e.isEmpty();){const t=this._peekTag(e,"end");if(e.isError(t))return t;const i=n.decode(e,"der",r);if(e.isError(i)&&t)break;o.push(i)}return o},c.prototype._decodeStr=function(e,t){if("bitstr"===t){const t=e.readUInt8();return e.isError(t)?t:{unused:t,data:e.raw()}}if("bmpstr"===t){const t=e.raw();if(t.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");let n="";for(let e=0;e<t.length/2;e++)n+=String.fromCharCode(t.readUInt16BE(2*e));return n}if("numstr"===t){const t=e.raw().toString("ascii");return this._isNumstr(t)?t:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){const t=e.raw().toString("ascii");return this._isPrintstr(t)?t:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},c.prototype._decodeObjid=function(e,t,n){let r;const o=[];let i=0,a=0;for(;!e.isEmpty();)a=e.readUInt8(),i<<=7,i|=127&a,0==(128&a)&&(o.push(i),i=0);128&a&&o.push(i);const s=o[0]/40|0,l=o[0]%40;if(r=n?o:[s,l].concat(o.slice(1)),t){let e=t[r.join(" ")];void 0===e&&(e=t[r.join(".")]),void 0!==e&&(r=e)}return r},c.prototype._decodeTime=function(e,t){const n=e.raw().toString();let r,o,i,a,s,l;if("gentime"===t)r=0|n.slice(0,4),o=0|n.slice(4,6),i=0|n.slice(6,8),a=0|n.slice(8,10),s=0|n.slice(10,12),l=0|n.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");r=0|n.slice(0,2),o=0|n.slice(2,4),i=0|n.slice(4,6),a=0|n.slice(6,8),s=0|n.slice(8,10),l=0|n.slice(10,12),r=r<70?2e3+r:1900+r}return Date.UTC(r,o-1,i,a,s,l,0)},c.prototype._decodeNull=function(){return null},c.prototype._decodeBool=function(e){const t=e.readUInt8();return e.isError(t)?t:0!==t},c.prototype._decodeInt=function(e,t){const n=e.raw();let o=new r(n);return t&&(o=t[o.toString(10)]||o),o},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}})),a.register("cpbbP",(function(e,t){"use strict";var n=a("5jAh8"),r=a("lfHxF").Buffer,o=a("hGpEk");function i(e){o.call(this,e),this.enc="pem"}n(i,o),e.exports=i,i.prototype.decode=function(e,t){const n=e.toString().split(/[\r\n]+/g),i=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/;let s=-1,l=-1;for(let e=0;e<n.length;e++){const t=n[e].match(a);if(null!==t&&t[2]===i){if(-1!==s){if("END"!==t[1])break;l=e;break}if("BEGIN"!==t[1])break;s=e}}if(-1===s||-1===l)throw new Error("PEM section not found for: "+i);const c=n.slice(s+1,l).join("");c.replace(/[^a-z0-9+/=]+/gi,"");const u=r.from(c,"base64");return o.prototype.decode.call(this,u,t)}})),a.register("2LhNZ",(function(e,t){"use strict";const n=e.exports;n.Reporter=a("9PoU3").Reporter,n.DecoderBuffer=a("bJRdc").DecoderBuffer,n.EncoderBuffer=a("bJRdc").EncoderBuffer,n.Node=a("LjaX0")})),a.register("bPkB2",(function(e,t){"use strict";const n=e.exports;n._reverse=function(e){const t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);const r=e[n];t[r]=n})),t},n.der=a("jPxyL")})),a.register("jT65m",(function(e,t){"use strict";var n=a("fXArl"),r=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),i=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(i),this.key("subjectPublicKey").bitstr())})),l=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),c=n.define("RDNSequence",(function(){this.seqof(l)})),u=n.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),d=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(r),this.key("notAfter").use(r))})),f=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),h=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(i),this.key("issuer").use(u),this.key("validity").use(d),this.key("subject").use(u),this.key("subjectPublicKeyInfo").use(s),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(f).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(h),this.key("signatureAlgorithm").use(i),this.key("signatureValue").bitstr())}));e.exports=p})),a.register("ei3QW",(function(e,t){e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')})),a.register("3skN1",(function(e,t){var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,r=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,i=a("2tkTk"),s=a("duD0R"),l=a("8ByQm").Buffer;e.exports=function(e,t){var a,c=e.toString(),u=c.match(n);if(u){var d="aes"+u[1],f=l.from(u[2],"hex"),h=l.from(u[3].replace(/[\r\n]/g,""),"base64"),p=i(t,f.slice(0,8),parseInt(u[1],10)).key,m=[],g=s.createDecipheriv(d,p,f);m.push(g.update(h)),m.push(g.final()),a=l.concat(m)}else{var v=c.match(o);a=l.from(v[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(r)[1],data:a}}})),a.register("g4OMi",(function(e,t){e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')})),a.register("ajRoR",(function(e,t){var n=a("8ByQm").Buffer,r=a("fmDmL"),o=a("dkUCk").ec,i=a("fEs62"),s=a("g4OMi");function l(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}e.exports=function(e,t,a,c,u){var d=i(a);if("ec"===d.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,n){var r=s[n.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var i=new o(r),a=n.data.subjectPrivateKey.data;return i.verify(t,e,a)}(e,t,d)}if("dsa"===d.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,n){var o=n.data.p,a=n.data.q,s=n.data.g,c=n.data.pub_key,u=i.signature.decode(e,"der"),d=u.s,f=u.r;l(d,a),l(f,a);var h=r.mont(o),p=d.invm(a),m=s.toRed(h).redPow(new r(t).mul(p).mod(a)).fromRed().mul(c.toRed(h).redPow(f.mul(p).mod(a)).fromRed()).mod(o).mod(a);return 0===m.cmp(f)}(e,t,d)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");t=n.concat([u,t]);for(var f=d.modulus.byteLength(),h=[1],p=0;t.length+h.length+2<f;)h.push(255),p++;h.push(0);for(var m=-1;++m<t.length;)h.push(t[m]);h=n.from(h);var g=r.mont(d.modulus);e=(e=new r(e).toRed(g)).redPow(new r(d.publicExponent)),e=n.from(e.fromRed().toArray());var v=p<8?1:0;for(f=Math.min(e.length,h.length),e.length!==h.length&&(v=1),m=-1;++m<f;)v|=e[m]^h[m];return 0===v}})),a.register("5nTVb",(function(e,t){var n=a("bqBrJ").Buffer,r=a("dkUCk"),o=a("jXr8Y");e.exports=function(e){return new s(e)};var i={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 s(e){this.curveType=i[e],this.curveType||(this.curveType={name:e}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function l(e,t,r){Array.isArray(e)||(e=e.toArray());var o=new n(e);if(r&&o.length<r){var i=new n(r-o.length);i.fill(0),o=n.concat([i,o])}return t?o.toString(t):o}i.p224=i.secp224r1,i.p256=i.secp256r1=i.prime256v1,i.p192=i.secp192r1=i.prime192v1,i.p384=i.secp384r1,i.p521=i.secp521r1,s.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},s.prototype.computeSecret=function(e,t,r){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),l(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},s.prototype.getPublicKey=function(e,t){var n=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(n[n.length-1]%2?n[0]=7:n[0]=6),l(n,e)},s.prototype.getPrivateKey=function(e){return l(this.keys.getPrivate(),e)},s.prototype.setPublicKey=function(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this.keys._importPublic(e),this},s.prototype.setPrivateKey=function(e,t){t=t||"utf8",n.isBuffer(e)||(e=new n(e,t));var r=new o(e);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}})),a.register("5IN4o",(function(t,n){var r,o,i,s;e(t.exports,"publicEncrypt",(()=>r),(e=>r=e)),e(t.exports,"privateDecrypt",(()=>o),(e=>o=e)),e(t.exports,"privateEncrypt",(()=>i),(e=>i=e)),e(t.exports,"publicDecrypt",(()=>s),(e=>s=e)),r=a("9FMrF"),o=a("42pBv"),i=function(e,t){return r(e,t,!0)},s=function(e,t){return o(e,t,!0)}})),a.register("9FMrF",(function(e,t){var n=a("fEs62"),r=a("3xr1Z"),o=a("d8QYu"),i=a("hvg46"),s=a("f936l"),l=a("jXr8Y"),c=a("3jVNX"),u=a("8sAbQ"),d=a("8ByQm").Buffer;e.exports=function(e,t,a){var f;f=e.padding?e.padding:a?1:4;var h,p=n(e);if(4===f)h=function(e,t){var n=e.modulus.byteLength(),a=t.length,c=o("sha1").update(d.alloc(0)).digest(),u=c.length,f=2*u;if(a>n-f-2)throw new Error("message too long");var h=d.alloc(n-a-f-2),p=n-u-1,m=r(u),g=s(d.concat([c,h,d.alloc(1,1),t],p),i(m,p)),v=s(m,i(g,u));return new l(d.concat([d.alloc(1),v,g],n))}(p,t);else if(1===f)h=function(e,t,n){var o,i=t.length,a=e.modulus.byteLength();if(i>a-11)throw new Error("message too long");o=n?d.alloc(a-i-3,255):function(e){var t,n=d.allocUnsafe(e),o=0,i=r(2*e),a=0;for(;o<e;)a===i.length&&(i=r(2*e),a=0),(t=i[a++])&&(n[o++]=t);return n}(a-i-3);return new l(d.concat([d.from([0,n?1:2]),o,d.alloc(1),t],a))}(p,t,a);else{if(3!==f)throw new Error("unknown padding");if((h=new l(t)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return a?u(h,p):c(h,p)}})),a.register("hvg46",(function(e,t){var n=a("d8QYu"),r=a("8ByQm").Buffer;function o(e){var t=r.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var i,a=r.alloc(0),s=0;a.length<t;)i=o(s++),a=r.concat([a,n("sha1").update(e).update(i).digest()]);return a.slice(0,t)}})),a.register("f936l",(function(e,t){e.exports=function(e,t){for(var n=e.length,r=-1;++r<n;)e[r]^=t[r];return e}})),a.register("3jVNX",(function(e,t){var n=a("jXr8Y"),r=a("8ByQm").Buffer;e.exports=function(e,t){return r.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}})),a.register("42pBv",(function(e,t){var n=a("fEs62"),r=a("hvg46"),o=a("f936l"),i=a("jXr8Y"),s=a("8sAbQ"),l=a("d8QYu"),c=a("3jVNX"),u=a("8ByQm").Buffer;e.exports=function(e,t,a){var d;d=e.padding?e.padding:a?1:4;var f,h=n(e),p=h.modulus.byteLength();if(t.length>p||new i(t).cmp(h.modulus)>=0)throw new Error("decryption error");f=a?c(new i(t),h):s(t,h);var m=u.alloc(p-f.length);if(f=u.concat([m,f],p),4===d)return function(e,t){var n=e.modulus.byteLength(),i=l("sha1").update(u.alloc(0)).digest(),a=i.length;if(0!==t[0])throw new Error("decryption error");var s=t.slice(1,a+1),c=t.slice(a+1),d=o(s,r(c,a)),f=o(c,r(d,n-a-1));if(function(e,t){e=u.from(e),t=u.from(t);var n=0,r=e.length;e.length!==t.length&&(n++,r=Math.min(e.length,t.length));var o=-1;for(;++o<r;)n+=e[o]^t[o];return n}(i,f.slice(0,a)))throw new Error("decryption error");var h=a;for(;0===f[h];)h++;if(1!==f[h++])throw new Error("decryption error");return f.slice(h)}(h,f);if(1===d)return function(e,t,n){var r=t.slice(0,2),o=2,i=0;for(;0!==t[o++];)if(o>=t.length){i++;break}var a=t.slice(2,o-1);("0002"!==r.toString("hex")&&!n||"0001"!==r.toString("hex")&&n)&&i++;a.length<8&&i++;if(i)throw new Error("decryption error");return t.slice(o)}(0,f,a);if(3===d)return f;throw new Error("unknown padding")}})),a.register("lPq1P",(function(n,r){var o,i;e(n.exports,"randomFill",(()=>o),(e=>o=e)),e(n.exports,"randomFillSync",(()=>i),(e=>i=e));var s=a("ePtPP");function l(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var c=a("8ByQm"),u=(a("3xr1Z"),c.Buffer),d=c.kMaxLength,f=t.crypto||t.msCrypto,h=Math.pow(2,32)-1;function p(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>h||e<0)throw new TypeError("offset must be a uint32");if(e>d||e>t)throw new RangeError("offset out of range")}function m(e,t,n){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>h||e<0)throw new TypeError("size must be a uint32");if(e+t>n||e>d)throw new RangeError("buffer too small")}function g(e,t,n,r){var o=e.buffer,i=new Uint8Array(o,t,n);if(f.getRandomValues(i),!r)return e;s.nextTick((function(){r(null,e)}))}f&&f.getRandomValues?(o=function(e,n,r,o){if(!(u.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof n)o=n,n=0,r=e.length;else if("function"==typeof r)o=r,r=e.length-n;else if("function"!=typeof o)throw new TypeError('"cb" argument must be a function');return p(n,e.length),m(r,n,e.length),g(e,n,r,o)},i=function(e,n,r){void 0===n&&(n=0);if(!(u.isBuffer(e)||e instanceof t.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');p(n,e.length),void 0===r&&(r=e.length-n);return m(r,n,e.length),g(e,n,r)}):(o=l,i=l)})),a.register("2bMu7",(function(e,t){var n=a("ePtPP"),r=a("5U18c"),o=a("9gzJO"),i=a("8iXHm"),s=a("1DJXa");e.exports=function(e,t){var a,l=!0;function c(e,r){if(l)return l=!1,void n.nextTick((function(){t(e,r)}));t(e,r)}try{a=r.request.generate(e.cert,e.issuer)}catch(e){return c(e)}var u=s["id-pkix-ocsp"].join(".");r.utils.getAuthorityInfo(a.cert,u,(function(t,n){if(t)return c(t);var s;s=void 0!==e.httpOptions?o._extend(e.httpOptions,i.parse(n)):n,r.utils.getResponse(s,a.data,(function(e,t){if(e)return c(e);r.verify({request:a,response:t},c)}))})),l=!1}})),a.register("ahZQv",(function(e,t){var n=a("ePtPP"),r=a("5U18c"),o=a("1DJXa"),i=a("dc7aw");e.exports=function(e,t){var a,s=e.request;function l(e){n.nextTick((function(){t(e,h&&h.certStatus)}))}try{a=s.issuer||o.Certificate.decode(r.utils.toDER(e.issuer,"CERTIFICATE"),"der"),h=r.utils.parseResponse(e.response)}catch(e){return l(e)}var c=e.response.slice(h.start,h.end),u=h.certs,d=h.certsTbs.map((function(t){return e.response.slice(t.start,t.end)}));h=h.value;var f=r.utils.sign[h.signatureAlgorithm.algorithm.join(".")];if(f){var h,p=function(e,t,n){var a=e.tbsCertificate.subjectPublicKeyInfo;a=r.utils.toPEM(o.SubjectPublicKeyInfo.encode(a,"der"),"PUBLIC KEY");for(var s=0;s<t.length;s++){var l=t[s],c=r.utils.sign[l.signatureAlgorithm.algorithm.join(".")];if(!c)throw new Error("Unknown signature algorithm "+l.signatureAlgorithm.algorithm);var u=i.createVerify(c);if(u.update(n[s]),!u.verify(a,l.signature.data))throw new Error("Invalid signature");var d=l.tbsCertificate.subjectPublicKeyInfo;return r.utils.toPEM(o.SubjectPublicKeyInfo.encode(d,"der"),"PUBLIC KEY")}return a}(a,u,d),m=i.createVerify(f),g=h.tbsResponseData,v=h.signature.data;if(m.update(c),!m.verify(p,v))return l(new Error("Invalid signature"));if(g.responses.length<1)return l(new Error("Expected at least one response"));if((h=g.responses[0]).certId.hashAlgorithm.algorithm.join(".")!==s.certID.hashAlgorithm.algorithm.join("."))return l(new Error("Hash algorithm mismatch"));if(h.certId.issuerNameHash.toString("hex")!==s.certID.issuerNameHash.toString("hex"))return l(new Error("Issuer name hash mismatch"));if(h.certId.issuerKeyHash.toString("hex")!==s.certID.issuerKeyHash.toString("hex"))return l(new Error("Issuer key hash mismatch"));if(0!==h.certId.serialNumber.cmp(s.certID.serialNumber))return l(new Error("Serial number mismatch"));if("good"!==h.certStatus.type)return l(new Error("OCSP Status: "+h.certStatus.type));var b=+new Date,y=e.nudge||6e4;return h.thisUpdate-y>b||h.nextUpdate+y<b?l(new Error("OCSP Response expired")):l(null)}l(new Error("Unknown signature algorithm "+h.signatureAlgorithm.algorithm))}})),a.register("iEMHh",(function(t,n){var r,o,i,s,l,c,u,d,f,h,p,m;e(t.exports,"id-ad-caIssuers",(()=>r),(e=>r=e)),e(t.exports,"id-kp-OCSPSigning",(()=>o),(e=>o=e)),e(t.exports,"getResponse",(()=>i),(e=>i=e)),e(t.exports,"parseResponse",(()=>s),(e=>s=e)),e(t.exports,"digest",(()=>l),(e=>l=e)),e(t.exports,"digestRev",(()=>c),(e=>c=e)),e(t.exports,"sign",(()=>u),(e=>u=e)),e(t.exports,"signRev",(()=>d),(e=>d=e)),e(t.exports,"toPEM",(()=>f),(e=>f=e)),e(t.exports,"toDER",(()=>h),(e=>h=e)),e(t.exports,"getAuthorityInfo",(()=>p),(e=>p=e)),e(t.exports,"RSAPrivateKey",(()=>m),(e=>m=e));var g=a("bqBrJ").Buffer,v=a("fnFC9"),b=a("9gzJO"),y=a("8iXHm"),w=a("fXArl"),x=a("1DJXa");r=[1,3,6,1,5,5,7,48,2],o=[1,3,6,1,5,5,7,3,9],i=function(e,t,n){"object"!=typeof e&&(e=y.parse(e));var r=b._extend({method:"POST",headers:{"Content-Type":"application/ocsp-request","Content-Length":t.length}},e);function o(e,t){n&&n(e,t),n=null}v.request(r,(function(e){if(e.statusCode<200||e.statusCode>=400)return o(new Error("Failed to obtain OCSP response: "+e.statusCode));var t=[];e.on("readable",(function(){var n=e.read();n&&t.push(n)})),e.on("end",(function(){o(null,g.concat(t))}))})).on("error",o).end(t)},s=function(e){var t={start:0,end:e.length},n=x.OCSPResponse.decode(e,"der",{track:function(e,n,r,o){"content"===o&&"responseBytes/response"===e&&(t.start=n,t.end=r)}}),r=n.responseStatus;if("successful"!==r)throw new Error("Bad OCSP response status: "+r);var i=n.responseBytes.responseType;if("id-pkix-ocsp-basic"!==i)throw new Error("Unknown OCSP response type: "+i);var a=n.responseBytes.response,s={start:t.start,end:t.end},l=[],c=x.BasicOCSPResponse.decode(a,"der",{track:function(e,n,r,o){"tagged"===o&&("tbsResponseData"===e?(s.start=t.start+n,s.end=t.start+r):"certs/tbsCertificate"===e&&l.push({start:t.start+n,end:t.start+r}))}}),u=o.join("."),d=(c.certs||[]).filter((function(e){return e.tbsCertificate.extensions.some((function(e){return"extendedKeyUsage"===e.extnID&&e.extnValue.some((function(e){return e.join(".")===u}))}))}));return{start:s.start,end:s.end,value:c,certs:d,certsTbs:l}},l={"1.3.14.3.2.26":"sha1","2.16.840.1.101.3.4.2.1":"sha256"},c={sha1:"1.3.14.3.2.26",sha256:"2.16.840.1.101.3.4.2.1"},u={"1.2.840.113549.1.1.5":"sha1WithRSAEncryption","1.2.840.113549.1.1.11":"sha256WithRSAEncryption","1.2.840.113549.1.1.12":"sha384WithRSAEncryption","1.2.840.113549.1.1.13":"sha512WithRSAEncryption"},d={sha1WithRSAEncryption:[1,2,840,113549,1,1,5],sha256WithRSAEncryption:[1,2,840,113549,1,1,11],sha384WithRSAEncryption:[1,2,840,113549,1,1,12],sha512WithRSAEncryption:[1,2,840,113549,1,1,13]},f=function(e,t){for(var n=e.toString("base64"),r=["-----BEGIN "+t+"-----"],o=0;o<n.length;o+=64)r.push(n.slice(o,o+64));return r.push("-----END "+t+"-----"),r.join("\n")},h=function(e,t){var n=e.toString().match(new RegExp("-----BEGIN "+t+"-----([^-]*)-----END "+t+"-----"));return n=n?new g(n[1].replace(/[\r\n]/g,""),"base64"):"string"==typeof e?new g(e):e},p=function(e,t,n){var r=e.tbsCertificate.extensions;r||(r=[]);var o=r.filter((function(e){return"authorityInformationAccess"===e.extnID}));if(0===o.length)return n(new Error("AuthorityInfoAccess not found in extensions"));var i=null;return o.some((function(e){return e.extnValue.some((function(e){if(e.accessMethod.join(".")!==t)return!1;var n=e.accessLocation;return"uniformResourceIdentifier"===n.type&&(i=n.value+"",!0)}))}))?n(null,i):n(new Error(t+" not found in AuthorityInfoAccess"))};var S=w.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));m=S})),a.register("kagof",(function(e,t){var n=a("7NQ4Y"),r=a("6pNVr"),o=a("krREx"),i=a("bL5iF");e.exports=function(e,t){return n(e)||r(e,t)||o(e,t)||i()},e.exports.__esModule=!0,e.exports.default=e.exports})),a.register("7NQ4Y",(function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports})),a.register("6pNVr",(function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}},e.exports.__esModule=!0,e.exports.default=e.exports})),a.register("krREx",(function(e,t){var n=a("cc2cE");e.exports=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports})),a.register("cc2cE",(function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports})),a.register("bL5iF",(function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports})),a.register("4qTFT",(function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports})),a.register("9uC66",(function(e,t){var n=a("1NHVw");function r(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,n(o.key),o)}}e.exports=function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports})),a.register("1NHVw",(function(e,t){var n=a("CrfWb").default,r=a("dTNrl");e.exports=function(e){var t=r(e,"string");return"symbol"===n(t)?t:String(t)},e.exports.__esModule=!0,e.exports.default=e.exports})),a.register("CrfWb",(function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports})),a.register("dTNrl",(function(e,t){var n=a("CrfWb").default;e.exports=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!==n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)},e.exports.__esModule=!0,e.exports.default=e.exports})),a.register("4IUwl",(function(e,t){
53
53
  /*!
@@ -112,4 +112,4 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
112
112
  LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
113
113
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
114
114
  PERFORMANCE OF THIS SOFTWARE.
115
- ***************************************************************************** */var VK=function(e,t){return VK=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},VK(e,t)};function qK(e,t){function n(){this.constructor=e}VK(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var KK=function(){return KK=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},KK.apply(this,arguments)};Object.create;Object.create;var $K;u=a("85Hg2");function JK(e,t,n,r,o,i){void 0===i&&(i=0);var a=a$(e,t,i),s=a.width,l=a.height,c=Math.min(s,n),u=Math.min(l,r);return c>u*o?{width:u*o,height:u}:{width:c,height:c/o}}function XK(e,t,n,r,o){void 0===o&&(o=0);var i=a$(t.width,t.height,o),a=i.width,s=i.height;return{x:QK(e.x,a,n.width,r),y:QK(e.y,s,n.height,r)}}function QK(e,t,n,r){var o=t*r/2-n/2;return s$(e,-o,o)}function YK(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function ZK(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function e$(e,t,n,r,o,i,a){void 0===i&&(i=0),void 0===a&&(a=!0);var s=a?t$:n$,l=a$(t.width,t.height,i),c=a$(t.naturalWidth,t.naturalHeight,i),u={x:s(100,((l.width-n.width/o)/2-e.x/o)/l.width*100),y:s(100,((l.height-n.height/o)/2-e.y/o)/l.height*100),width:s(100,n.width/l.width*100/o),height:s(100,n.height/l.height*100/o)},d=Math.round(s(c.width,u.width*c.width/100)),f=Math.round(s(c.height,u.height*c.height/100)),h=c.width>=c.height*r?{width:Math.round(f*r),height:f}:{width:d,height:Math.round(d/r)};return{croppedAreaPercentages:u,croppedAreaPixels:KK(KK({},h),{x:Math.round(s(c.width-h.width,u.x*c.width/100)),y:Math.round(s(c.height-h.height,u.y*c.height/100))})}}function t$(e,t){return Math.min(e,Math.max(0,t))}function n$(e,t){return t}function r$(e,t,n,r,o,i){var a=a$(t.width,t.height,n),s=s$(r.width/a.width*(100/e.width),o,i);return{crop:{x:s*a.width/2-r.width/2-a.width*s*(e.x/100),y:s*a.height/2-r.height/2-a.height*s*(e.y/100)},zoom:s}}function o$(e,t,n,r,o,i){void 0===n&&(n=0);var a=a$(t.naturalWidth,t.naturalHeight,n),s=s$(function(e,t,n){var r=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}(e,t,r),o,i),l=r.height>r.width?r.height/e.height:r.width/e.width;return{crop:{x:((a.width-e.width)/2-e.x)*l,y:((a.height-e.height)/2-e.y)*l},zoom:s}}function i$(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function a$(e,t,n){var r=n*Math.PI/180;return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function s$(e,t,n){return Math.min(Math.max(e,t),n)}function l$(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}$K=a("lmpx0");var c$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=r(u).createRef(),n.videoRef=r(u).createRef(),n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=document,n.currentWindow=window,n.state={cropSize:null,hasWheelJustStarted:!1},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd)},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=r$(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=t.crop,o=t.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}else if(n.props.initialCroppedAreaPixels){var i=o$(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);r=i.crop,o=i.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}},n.computeSizes=function(){var e,t,r,o,i,a,s=n.imageRef.current||n.videoRef.current;if(s&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var l=n.containerRect.width/n.containerRect.height,c=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,u=(null===(r=n.imageRef.current)||void 0===r?void 0:r.naturalHeight)||(null===(o=n.videoRef.current)||void 0===o?void 0:o.videoHeight)||0,d=c/u,f=void 0;if(s.offsetWidth<c||s.offsetHeight<u)switch(n.props.objectFit){default:case"contain":f=l>d?{width:n.containerRect.height*d,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/d};break;case"horizontal-cover":f={width:n.containerRect.width,height:n.containerRect.width/d};break;case"vertical-cover":f={width:n.containerRect.height*d,height:n.containerRect.height};break;case"auto-cover":f=c>u?{width:n.containerRect.width,height:n.containerRect.width/d}:{width:n.containerRect.height*d,height:n.containerRect.height}}else f={width:s.offsetWidth,height:s.offsetHeight};n.mediaSize=KK(KK({},f),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var h=n.props.cropSize?n.props.cropSize:JK(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(i=n.state.cropSize)||void 0===i?void 0:i.height)===h.height&&(null===(a=n.state.cropSize)||void 0===a?void 0:a.width)===h.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(h),n.setState({cropSize:h},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(h),h}},n.onMouseDown=function(e){e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){n.isTouching=!0,n.props.onTouchRequest&&!n.props.onTouchRequest(e)||(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0])))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var r=t.getMousePoint(e),o=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(o,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var i=n.gestureRotationStart+e.rotation;n.props.onRotationChange(i)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,r,o=e.x,i=e.y;n.dragStartPosition={x:o,y:i},n.dragStartCrop=KK({},n.props.crop),null===(r=(t=n.props).onInteractionStart)||void 0===r||r.call(t)},n.onDrag=function(e){var t=e.x,r=e.y;n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==r){var e=t-n.dragStartPosition.x,o=r-n.dragStartPosition.y,i={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+o},a=n.props.restrictPosition?XK(i,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):i;n.props.onCropChange(a)}}))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(!n.props.onWheelRequest||n.props.onWheelRequest(e)){e.preventDefault();var o=t.getMousePoint(e),i=r($K)(e).pixelY,a=n.props.zoom-i*n.props.zoomSpeed/200;n.setNewZoom(a,o,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)}},n.getPointOnContainer=function(e){var t=e.x,r=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(r-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,o=n.props,i=o.crop,a=o.zoom;return{x:(t+i.x)/a,y:(r+i.y)/a}},n.setNewZoom=function(e,t,r){var o=(void 0===r?{}:r).shouldUpdatePosition,i=void 0===o||o;if(n.state.cropSize&&n.props.onZoomChange){var a=s$(e,n.props.minZoom,n.props.maxZoom);if(i){var s=n.getPointOnContainer(t),l=n.getPointOnMedia(s),c={x:l.x*a-s.x,y:l.y*a-s.y},u=n.props.restrictPosition?XK(c,n.mediaSize,n.state.cropSize,a,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(a)}},n.getCropData=function(){return n.state.cropSize?e$(n.props.restrictPosition?XK(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?XK(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return qK(t,e),t.prototype.componentDidMount=function(){this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef)},t.prototype.componentWillUnmount=function(){var e;this.currentWindow.removeEventListener("resize",this.computeSizes),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(e=this.styleRef.parentNode)||void 0===e||e.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent()},t.prototype.componentDidUpdate=function(e){var t,n,r,o,i,a,s,l,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(r=e.cropSize)||void 0===r?void 0:r.width)!==(null===(o=this.props.cropSize)||void 0===o?void 0:o.width)?this.computeSizes():(null===(i=e.crop)||void 0===i?void 0:i.x)===(null===(a=this.props.crop)||void 0===a?void 0:a.x)&&(null===(s=e.crop)||void 0===s?void 0:s.y)===(null===(l=this.props.crop)||void 0===l?void 0:l.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(c=this.videoRef.current)||void 0===c||c.load())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=YK(n,r),this.lastPinchRotation=ZK(n,r),this.onDragStart(i$(n,r))},t.prototype.onPinchMove=function(e){var n=this,r=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),i=i$(r,o);this.onDrag(i),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=YK(r,o),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var a=ZK(r,o),s=n.props.rotation+(a-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=a}))},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,i=t.mediaProps,a=t.transform,s=t.crop,l=s.x,c=s.y,d=t.rotation,f=t.zoom,h=t.cropShape,p=t.showGrid,m=t.style,g=m.containerStyle,v=m.cropAreaStyle,b=m.mediaStyle,y=t.classes,w=y.containerClassName,x=y.cropAreaClassName,S=y.mediaClassName,M=t.objectFit;return r(u).createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:g,className:l$("reactEasyCrop_Container",w)},n?r(u).createElement("img",KK({alt:"",className:l$("reactEasyCrop_Image","contain"===M&&"reactEasyCrop_Contain","horizontal-cover"===M&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===M&&"reactEasyCrop_Cover_Vertical","auto-cover"===M&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),S)},i,{src:n,ref:this.imageRef,style:KK(KK({},b),{transform:a||"translate("+l+"px, "+c+"px) rotate("+d+"deg) scale("+f+")"}),onLoad:this.onMediaLoad})):o&&r(u).createElement("video",KK({autoPlay:!0,loop:!0,muted:!0,className:l$("reactEasyCrop_Video","contain"===M&&"reactEasyCrop_Contain","horizontal-cover"===M&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===M&&"reactEasyCrop_Cover_Vertical","auto-cover"===M&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),S)},i,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:KK(KK({},b),{transform:a||"translate("+l+"px, "+c+"px) rotate("+d+"deg) scale("+f+")"}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map((function(e){return r(u).createElement("source",KK({key:e.src},e))}))),this.state.cropSize&&r(u).createElement("div",{style:KK(KK({},v),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:l$("reactEasyCrop_CropArea","round"===h&&"reactEasyCrop_CropAreaRound",p&&"reactEasyCrop_CropAreaGrid",x)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(r(u).Component),u$=c$,d$={};e(d$,"default",(()=>G$),(e=>G$=e));Xd=a("4IUwl");var f$,h$=a("3ju0v");rz=a("hCRLo"),sW=a("a0mDm"),az=a("jp3pO"),u=a("85Hg2"),Xd=a("4IUwl");f$=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<i.length;l++){var c=i[l];if(!s(c))return!1;var u=e[c],d=t[c];if(!1===(o=n?n.call(r,u,d,c):void 0)||void 0===o&&u!==d)return!1}return!0};aW=a("98I6H");var p$=a("3b0np"),m$=(u=a("85Hg2"),aW=a("98I6H"),sz=a("jfn1H"),h$=a("3ju0v"),p$=a("3b0np"),u=a("85Hg2"),Xd=a("4IUwl"),(u=a("85Hg2")).createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0}));function g$(e,t,n){return(e-t)/(n-t)}function v$(e,t,n,r){var o=g$(t,n,r),i={};switch(e){case"rtl":i.right="".concat(100*o,"%"),i.transform="translateX(50%)";break;case"btt":i.bottom="".concat(100*o,"%"),i.transform="translateY(50%)";break;case"ttb":i.top="".concat(100*o,"%"),i.transform="translateY(-50%)";break;default:i.left="".concat(100*o,"%"),i.transform="translateX(-50%)"}return i}function b$(e,t){return Array.isArray(e)?e[t]:e}var y$=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"],w$=u.forwardRef((function(e,t){var n,o,i=e.prefixCls,a=e.value,s=e.valueIndex,l=e.onStartMove,c=e.style,d=e.render,f=e.dragging,h=e.onOffsetChange,p=(0,p$.default)(e,y$),m=u.useContext(m$),g=m.min,v=m.max,b=m.direction,y=m.disabled,w=m.range,x=m.tabIndex,S=m.ariaLabelForHandle,M=m.ariaLabelledByForHandle,_=m.ariaValueTextFormatterForHandle,E="".concat(i,"-handle"),A=function(e){y||l(e,s)},C=v$(b,a,g,v),k=u.createElement("div",(0,aW.default)({ref:t,className:r(Xd)(E,(n={},(0,h$.default)(n,"".concat(E,"-").concat(s+1),w),(0,h$.default)(n,"".concat(E,"-dragging"),f),n)),style:(0,sz.default)((0,sz.default)({},C),c),onMouseDown:A,onTouchStart:A,onKeyDown:function(e){if(!y){var t=null;switch(e.which||e.keyCode){case xW.LEFT:t="ltr"===b||"btt"===b?-1:1;break;case xW.RIGHT:t="ltr"===b||"btt"===b?1:-1;break;case xW.UP:t="ttb"!==b?1:-1;break;case xW.DOWN:t="ttb"!==b?-1:1;break;case xW.HOME:t="min";break;case xW.END:t="max";break;case xW.PAGE_UP:t=2;break;case xW.PAGE_DOWN:t=-2}null!==t&&(e.preventDefault(),h(t,s))}},tabIndex:y?null:b$(x,s),role:"slider","aria-valuemin":g,"aria-valuemax":v,"aria-valuenow":a,"aria-disabled":y,"aria-label":b$(S,s),"aria-labelledby":b$(M,s),"aria-valuetext":null===(o=b$(_,s))||void 0===o?void 0:o(a)},p));return d&&(k=d(k,{index:s,prefixCls:i,value:a,dragging:f})),k})),x$=w$,S$=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"],M$=u.forwardRef((function(e,t){var n=e.prefixCls,r=e.style,o=e.onStartMove,i=e.onOffsetChange,a=e.values,s=e.handleRender,l=e.draggingIndex,c=(0,p$.default)(e,S$),d=u.useRef({});return u.useImperativeHandle(t,(function(){return{focus:function(e){var t;null===(t=d.current[e])||void 0===t||t.focus()}}})),u.createElement(u.Fragment,null,a.map((function(e,t){return u.createElement(x$,(0,aW.default)({ref:function(e){e?d.current[t]=e:delete d.current[t]},dragging:l===t,prefixCls:n,style:b$(r,t),key:t,value:e,valueIndex:t,onStartMove:o,onOffsetChange:i,render:s},c))})))}));rz=a("hCRLo"),sW=a("a0mDm"),u=a("85Hg2");function _$(e){var t="touches"in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function E$(e,t,n,r,o,i,a,s,l){var c=u.useState(null),d=(0,sW.default)(c,2),f=d[0],h=d[1],p=u.useState(-1),m=(0,sW.default)(p,2),g=m[0],v=m[1],b=u.useState(n),y=(0,sW.default)(b,2),w=y[0],x=y[1],S=u.useState(n),M=(0,sW.default)(S,2),_=M[0],E=M[1],A=u.useRef(null),C=u.useRef(null);u.useEffect((function(){-1===g&&x(n)}),[n,g]),u.useEffect((function(){return function(){document.removeEventListener("mousemove",A.current),document.removeEventListener("mouseup",C.current),document.removeEventListener("touchmove",A.current),document.removeEventListener("touchend",C.current)}}),[]);var k=function(e,t){w.some((function(t,n){return t!==e[n]}))&&(void 0!==t&&h(t),x(e),a(e))},T=function(e,t){if(-1===e){var n=_[0],a=_[_.length-1],s=r-n,c=o-a,u=t*(o-r);u=Math.max(u,s),u=Math.min(u,c);var d=i(n+u);u=d-n;var f=_.map((function(e){return e+u}));k(f)}else{var h=(o-r)*t,p=(0,rz.default)(w);p[e]=_[e];var m=l(p,h,e,"dist");k(m.values,m.value)}},I=u.useRef(T);I.current=T;var O=u.useMemo((function(){var e=(0,rz.default)(n).sort((function(e,t){return e-t})),t=(0,rz.default)(w).sort((function(e,t){return e-t}));return e.every((function(e,n){return e===t[n]}))?w:n}),[n,w]);return[g,f,O,function(r,o){r.stopPropagation();var i=n[o];v(o),h(i),E(n);var a=_$(r),l=a.pageX,c=a.pageY,u=function(n){n.preventDefault();var r,i=_$(n),a=i.pageX,s=i.pageY,u=a-l,d=s-c,f=e.current.getBoundingClientRect(),h=f.width,p=f.height;switch(t){case"btt":r=-d/p;break;case"ttb":r=d/p;break;case"rtl":r=-u/h;break;default:r=u/h}I.current(o,r)},d=function e(t){t.preventDefault(),document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",u),document.removeEventListener("touchend",e),document.removeEventListener("touchmove",u),A.current=null,C.current=null,v(-1),s()};document.addEventListener("mouseup",d),document.addEventListener("mousemove",u),document.addEventListener("touchend",d),document.addEventListener("touchmove",u),A.current=u,C.current=d}]}u=a("85Hg2"),sz=a("jfn1H"),u=a("85Hg2"),Xd=a("4IUwl");function A$(e){var t=e.prefixCls,n=e.style,o=e.start,i=e.end,a=e.index,s=e.onStartMove,l=u.useContext(m$),c=l.direction,d=l.min,f=l.max,h=l.disabled,p=l.range,m="".concat(t,"-track"),g=g$(o,d,f),v=g$(i,d,f),b=function(e){!h&&s&&s(e,-1)},y={};switch(c){case"rtl":y.right="".concat(100*g,"%"),y.width="".concat(100*v-100*g,"%");break;case"btt":y.bottom="".concat(100*g,"%"),y.height="".concat(100*v-100*g,"%");break;case"ttb":y.top="".concat(100*g,"%"),y.height="".concat(100*v-100*g,"%");break;default:y.left="".concat(100*g,"%"),y.width="".concat(100*v-100*g,"%")}return u.createElement("div",{className:r(Xd)(m,p&&"".concat(m,"-").concat(a+1)),style:(0,sz.default)((0,sz.default)({},y),n),onMouseDown:b,onTouchStart:b})}function C$(e){var t=e.prefixCls,n=e.style,r=e.values,o=e.startPoint,i=e.onStartMove,a=u.useContext(m$),s=a.included,l=a.range,c=a.min,d=u.useMemo((function(){if(!l){if(0===r.length)return[];var e=null!=o?o:c,t=r[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}for(var n=[],i=0;i<r.length-1;i+=1)n.push({start:r[i],end:r[i+1]});return n}),[r,l,o,c]);return s?d.map((function(e,r){var o=e.start,a=e.end;return u.createElement(A$,{index:r,prefixCls:t,style:b$(n,r),start:o,end:a,key:r,onStartMove:i})})):null}u=a("85Hg2"),sz=a("jfn1H"),h$=a("3ju0v"),u=a("85Hg2"),Xd=a("4IUwl");function k$(e){var t=e.prefixCls,n=e.style,o=e.children,i=e.value,a=e.onClick,s=u.useContext(m$),l=s.min,c=s.max,d=s.direction,f=s.includedStart,h=s.includedEnd,p=s.included,m="".concat(t,"-text"),g=v$(d,i,l,c);return u.createElement("span",{className:r(Xd)(m,(0,h$.default)({},"".concat(m,"-active"),p&&f<=i&&i<=h)),style:(0,sz.default)((0,sz.default)({},g),n),onMouseDown:function(e){e.stopPropagation()},onClick:function(){a(i)}},o)}function T$(e){var t=e.prefixCls,n=e.marks,r=e.onClick,o="".concat(t,"-mark");return n.length?u.createElement("div",{className:o},n.map((function(e){var t=e.value,n=e.style,i=e.label;return u.createElement(k$,{key:t,prefixCls:o,style:n,value:t,onClick:r},i)}))):null}u=a("85Hg2"),h$=a("3ju0v"),sz=a("jfn1H"),u=a("85Hg2"),Xd=a("4IUwl");function I$(e){var t=e.prefixCls,n=e.value,o=e.style,i=e.activeStyle,a=u.useContext(m$),s=a.min,l=a.max,c=a.direction,d=a.included,f=a.includedStart,h=a.includedEnd,p="".concat(t,"-dot"),m=d&&f<=n&&n<=h,g=(0,sz.default)((0,sz.default)({},v$(c,n,s,l)),"function"==typeof o?o(n):o);return m&&(g=(0,sz.default)((0,sz.default)({},g),"function"==typeof i?i(n):i)),u.createElement("span",{className:r(Xd)(p,(0,h$.default)({},"".concat(p,"-active"),m)),style:g})}function O$(e){var t=e.prefixCls,n=e.marks,r=e.dots,o=e.style,i=e.activeStyle,a=u.useContext(m$),s=a.min,l=a.max,c=a.step,d=u.useMemo((function(){var e=new Set;if(n.forEach((function(t){e.add(t.value)})),r&&null!==c)for(var t=s;t<=l;)e.add(t),t+=c;return Array.from(e)}),[s,l,c,r,n]);return u.createElement("div",{className:"".concat(t,"-step")},d.map((function(e){return u.createElement(I$,{prefixCls:t,key:e,value:e,style:o,activeStyle:i})})))}rz=a("hCRLo"),u=a("85Hg2");function R$(e,t,n,r,o,i){var a=u.useCallback((function(n){var r=isFinite(n)?n:e;return r=Math.min(t,n),r=Math.max(e,r)}),[e,t]),s=u.useCallback((function(r){if(null!==n){var o=e+Math.round((a(r)-e)/n)*n,i=function(e){return(String(e).split(".")[1]||"").length},s=Math.max(i(n),i(t),i(e)),l=Number(o.toFixed(s));return e<=l&&l<=t?l:null}return null}),[n,e,t,a]),l=u.useCallback((function(o){var i=a(o),l=r.map((function(e){return e.value}));null!==n&&l.push(s(o)),l.push(e,t);var c=l[0],u=t-e;return l.forEach((function(e){var t=Math.abs(i-e);t<=u&&(c=e,u=t)})),c}),[e,t,r,n,a,s]),c=function o(i,a,l){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit";if("number"==typeof a){var u,d=i[l],f=d+a,h=[];r.forEach((function(e){h.push(e.value)})),h.push(e,t),h.push(s(d));var p=a>0?1:-1;"unit"===c?h.push(s(d+p*n)):h.push(s(f)),h=h.filter((function(e){return null!==e})).filter((function(e){return a<0?e<=d:e>=d})),"unit"===c&&(h=h.filter((function(e){return e!==d})));var m="unit"===c?d:f;u=h[0];var g=Math.abs(u-m);if(h.forEach((function(e){var t=Math.abs(e-m);t<g&&(u=e,g=t)})),void 0===u)return a<0?e:t;if("dist"===c)return u;if(Math.abs(a)>1){var v=(0,rz.default)(i);return v[l]=u,o(v,a-p,l,c)}return u}return"min"===a?e:"max"===a?t:void 0},d=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",o=e[n],i=c(e,t,n,r);return{value:i,changed:i!==o}},f=function(e){return null===i&&0===e||"number"==typeof i&&e<i};return[l,function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",a=e.map(l),s=a[n],u=c(a,t,n,r);if(a[n]=u,!1===o){var h=i||0;n>0&&a[n-1]!==s&&(a[n]=Math.max(a[n],a[n-1]+h)),n<a.length-1&&a[n+1]!==s&&(a[n]=Math.min(a[n],a[n+1]-h))}else if("number"==typeof i||null===i){for(var p=n+1;p<a.length;p+=1)for(var m=!0;f(a[p]-a[p-1])&&m;){var g=d(a,1,p);a[p]=g.value,m=g.changed}for(var v=n;v>0;v-=1)for(var b=!0;f(a[v]-a[v-1])&&b;){var y=d(a,-1,v-1);a[v-1]=y.value,b=y.changed}for(var w=a.length-1;w>0;w-=1)for(var x=!0;f(a[w]-a[w-1])&&x;){var S=d(a,-1,w-1);a[w-1]=S.value,x=S.changed}for(var M=0;M<a.length-1;M+=1)for(var _=!0;f(a[M+1]-a[M])&&_;){var E=d(a,1,M+1);a[M+1]=E.value,_=E.changed}}return{value:a[n],values:a}}]}a("irlKZ");var P$=u.forwardRef((function(e,t){var n,o=e.prefixCls,i=void 0===o?"rc-slider":o,a=e.className,s=e.style,l=e.disabled,c=void 0!==l&&l,d=e.autoFocus,f=e.onFocus,h=e.onBlur,p=e.min,m=void 0===p?0:p,g=e.max,v=void 0===g?100:g,b=e.step,y=void 0===b?1:b,w=e.value,x=e.defaultValue,S=e.range,M=e.count,_=e.onChange,E=e.onBeforeChange,A=e.onAfterChange,C=e.allowCross,k=void 0===C||C,T=e.pushable,I=void 0!==T&&T,O=e.draggableTrack,R=e.reverse,P=e.vertical,N=e.included,L=void 0===N||N,B=e.startPoint,D=e.trackStyle,j=e.handleStyle,F=e.railStyle,z=e.dotStyle,U=e.activeDotStyle,H=e.marks,G=e.dots,W=e.handleRender,V=e.tabIndex,q=void 0===V?0:V,K=e.ariaLabelForHandle,$=e.ariaLabelledByForHandle,J=e.ariaValueTextFormatterForHandle,X=u.useRef(),Q=u.useRef(),Y=u.useMemo((function(){return P?R?"ttb":"btt":R?"rtl":"ltr"}),[R,P]),Z=u.useMemo((function(){return isFinite(m)?m:0}),[m]),ee=u.useMemo((function(){return isFinite(v)?v:100}),[v]),te=u.useMemo((function(){return null!==y&&y<=0?1:y}),[y]),ne=u.useMemo((function(){return!0===I?te:I>=0&&I}),[I,te]),re=u.useMemo((function(){return Object.keys(H||{}).map((function(e){var t=H[e],n={value:Number(e)};return t&&"object"===(0,az.default)(t)&&!u.isValidElement(t)&&("label"in t||"style"in t)?(n.style=t.style,n.label=t.label):n.label=t,n})).filter((function(e){var t=e.label;return t||"number"==typeof t})).sort((function(e,t){return e.value-t.value}))}),[H]),oe=R$(Z,ee,te,re,k,ne),ie=(0,sW.default)(oe,2),ae=ie[0],se=ie[1],le=VV(x,{value:w}),ce=(0,sW.default)(le,2),ue=ce[0],de=ce[1],fe=u.useMemo((function(){var e=null==ue?[]:Array.isArray(ue)?ue:[ue],t=(0,sW.default)(e,1)[0],n=null===ue?[]:[void 0===t?Z:t];if(S){if(n=(0,rz.default)(e),M||void 0===ue){var r=M>=0?M+1:2;for(n=n.slice(0,r);n.length<r;){var o;n.push(null!==(o=n[n.length-1])&&void 0!==o?o:Z)}}n.sort((function(e,t){return e-t}))}return n.forEach((function(e,t){n[t]=ae(e)})),n}),[ue,S,Z,M,ae]),he=u.useRef(fe);he.current=fe;var pe=function(e){return S?e:e[0]},me=function(e){var t=(0,rz.default)(e).sort((function(e,t){return e-t}));_&&!r(f$)(t,he.current)&&_(pe(t)),de(t)},ge=function(e){if(!c){var t=0,n=ee-Z;fe.forEach((function(r,o){var i=Math.abs(e-r);i<=n&&(n=i,t=o)}));var r=(0,rz.default)(fe);r[t]=e,S&&!fe.length&&void 0===M&&r.push(e),null==E||E(pe(r)),me(r),null==A||A(pe(r))}},ve=u.useState(null),be=(0,sW.default)(ve,2),ye=be[0],we=be[1];u.useEffect((function(){if(null!==ye){var e=fe.indexOf(ye);e>=0&&X.current.focus(e)}we(null)}),[ye]);var xe=u.useMemo((function(){return(!O||null!==te)&&O}),[O,te]),Se=E$(Q,Y,fe,Z,ee,ae,me,(function(){null==A||A(pe(he.current))}),se),Me=(0,sW.default)(Se,4),_e=Me[0],Ee=Me[1],Ae=Me[2],Ce=Me[3],ke=function(e,t){Ce(e,t),null==E||E(pe(he.current))},Te=-1!==_e;u.useEffect((function(){if(!Te){var e=fe.lastIndexOf(Ee);X.current.focus(e)}}),[Te]);var Ie=u.useMemo((function(){return(0,rz.default)(Ae).sort((function(e,t){return e-t}))}),[Ae]),Oe=u.useMemo((function(){return S?[Ie[0],Ie[Ie.length-1]]:[Z,Ie[0]]}),[Ie,S,Z]),Re=(0,sW.default)(Oe,2),Pe=Re[0],Ne=Re[1];u.useImperativeHandle(t,(function(){return{focus:function(){X.current.focus(0)},blur:function(){var e=document.activeElement;Q.current.contains(e)&&(null==e||e.blur())}}})),u.useEffect((function(){d&&X.current.focus(0)}),[]);var Le=u.useMemo((function(){return{min:Z,max:ee,direction:Y,disabled:c,step:te,included:L,includedStart:Pe,includedEnd:Ne,range:S,tabIndex:q,ariaLabelForHandle:K,ariaLabelledByForHandle:$,ariaValueTextFormatterForHandle:J}}),[Z,ee,Y,c,te,L,Pe,Ne,S,q,K,$,J]);return u.createElement(m$.Provider,{value:Le},u.createElement("div",{ref:Q,className:r(Xd)(i,a,(n={},(0,h$.default)(n,"".concat(i,"-disabled"),c),(0,h$.default)(n,"".concat(i,"-vertical"),P),(0,h$.default)(n,"".concat(i,"-horizontal"),!P),(0,h$.default)(n,"".concat(i,"-with-marks"),re.length),n)),style:s,onMouseDown:function(e){e.preventDefault();var t,n=Q.current.getBoundingClientRect(),r=n.width,o=n.height,i=n.left,a=n.top,s=n.bottom,l=n.right,c=e.clientX,u=e.clientY;switch(Y){case"btt":t=(s-u)/o;break;case"ttb":t=(u-a)/o;break;case"rtl":t=(l-c)/r;break;default:t=(c-i)/r}ge(ae(Z+t*(ee-Z)))}},u.createElement("div",{className:"".concat(i,"-rail"),style:F}),u.createElement(C$,{prefixCls:i,style:D,values:Ie,startPoint:B,onStartMove:xe?ke:null}),u.createElement(O$,{prefixCls:i,marks:re,dots:G,style:z,activeStyle:U}),u.createElement(M$,{ref:X,prefixCls:i,style:j,values:Ae,draggingIndex:_e,onStartMove:ke,onOffsetChange:function(e,t){if(!c){var n=se(fe,e,t);null==E||E(pe(fe)),me(n.values),null==A||A(pe(n.values)),we(n.value)}},onFocus:f,onBlur:h,handleRender:W}),u.createElement(T$,{prefixCls:i,marks:re,onClick:ge})))})),N$=P$;u=a("85Hg2"),JH=a("ae6os"),WH=a("1w3TK"),u=a("85Hg2");var L$=(u=a("85Hg2")).forwardRef(((e,t)=>{const{open:n}=e,r=(0,u.useRef)(null),o=(0,u.useRef)(null);function i(){JH.default.cancel(o.current),o.current=null}return u.useEffect((()=>(n?o.current=(0,JH.default)((()=>{var e;null===(e=r.current)||void 0===e||e.forcePopupAlign(),o.current=null})):i(),i)),[n,e.title]),u.createElement(Eq.default,Object.assign({ref:(0,WH.composeRef)(r,t)},e))}));Bz=a("LDfY3");const B$=e=>{const{componentCls:t,controlSize:n,dotSize:r,marginFull:o,marginPart:i,colorFillContentHover:a}=e;return{[t]:Object.assign(Object.assign({},eU(e)),{position:"relative",height:n,margin:`${i}px ${o}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${o}px ${i}px`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.colorFillTertiary,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},[`${t}-track`]:{position:"absolute",backgroundColor:e.colorPrimaryBorder,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},"&:hover":{[`${t}-rail`]:{backgroundColor:e.colorFillSecondary},[`${t}-track`]:{backgroundColor:e.colorPrimaryBorderHover},[`${t}-dot`]:{borderColor:a},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.colorPrimary}},[`${t}-handle`]:{position:"absolute",width:e.handleSize,height:e.handleSize,outline:"none",[`${t}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-e.handleLineWidth,insetBlockStart:-e.handleLineWidth,width:e.handleSize+2*e.handleLineWidth,height:e.handleSize+2*e.handleLineWidth,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:e.handleSize,height:e.handleSize,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorder}`,borderRadius:"50%",cursor:"pointer",transition:`\n inset-inline-start ${e.motionDurationMid},\n inset-block-start ${e.motionDurationMid},\n width ${e.motionDurationMid},\n height ${e.motionDurationMid},\n box-shadow ${e.motionDurationMid}\n `},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:-((e.handleSizeHover-e.handleSize)/2+e.handleLineWidthHover),insetBlockStart:-((e.handleSizeHover-e.handleSize)/2+e.handleLineWidthHover),width:e.handleSizeHover+2*e.handleLineWidthHover,height:e.handleSizeHover+2*e.handleLineWidthHover},"&::after":{boxShadow:`0 0 0 ${e.handleLineWidthHover}px ${e.colorPrimary}`,width:e.handleSizeHover,height:e.handleSizeHover,insetInlineStart:(e.handleSize-e.handleSizeHover)/2,insetBlockStart:(e.handleSize-e.handleSizeHover)/2}}},[`${t}-mark`]:{position:"absolute",fontSize:e.fontSize},[`${t}-mark-text`]:{position:"absolute",display:"inline-block",color:e.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:e.colorText}},[`${t}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${t}-dot`]:{position:"absolute",width:r,height:r,backgroundColor:e.colorBgElevated,border:`${e.handleLineWidth}px solid ${e.colorBorderSecondary}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,"&-active":{borderColor:e.colorPrimaryBorder}},"&&-disabled":{cursor:"not-allowed",[`${t}-rail`]:{backgroundColor:`${e.colorFillSecondary} !important`},[`${t}-track`]:{backgroundColor:`${e.colorTextDisabled} !important`},[`\n ${t}-dot\n `]:{backgroundColor:e.colorBgElevated,borderColor:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed"},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:e.handleSize,height:e.handleSize,boxShadow:`0 0 0 ${e.handleLineWidth}px ${new(0,Bz.TinyColor)(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString()}`,insetInlineStart:0,insetBlockStart:0},[`\n ${t}-mark-text,\n ${t}-dot\n `]:{cursor:"not-allowed !important"}}})}},D$=(e,t)=>{const{componentCls:n,railSize:r,handleSize:o,dotSize:i}=e,a=t?"width":"height",s=t?"height":"width",l=t?"insetBlockStart":"insetInlineStart",c=t?"top":"insetInlineStart";return{[t?"paddingBlock":"paddingInline"]:r,[s]:3*r,[`${n}-rail`]:{[a]:"100%",[s]:r},[`${n}-track`]:{[s]:r},[`${n}-handle`]:{[l]:(3*r-o)/2},[`${n}-mark`]:{insetInlineStart:0,top:0,[c]:o,[a]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[c]:r,[a]:"100%",[s]:r},[`${n}-dot`]:{position:"absolute",[l]:(r-i)/2}}},j$=e=>{const{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:Object.assign(Object.assign({},D$(e,!0)),{[`&${t}-with-marks`]:{marginBottom:n}})}},F$=e=>{const{componentCls:t}=e;return{[`${t}-vertical`]:Object.assign(Object.assign({},D$(e,!1)),{height:"100%"})}};var z$=pU("Slider",(e=>{const t=uU(e,{marginPart:(e.controlHeight-e.controlSize)/2,marginFull:e.controlSize/2,marginPartWithMark:e.controlHeightLG-e.controlSize});return[B$(t),j$(t),F$(t)]}),(e=>{const t=e.controlHeightLG/4;return{controlSize:t,railSize:4,handleSize:t,handleSizeHover:e.controlHeightSM/2,dotSize:8,handleLineWidth:e.lineWidth+1,handleLineWidthHover:e.lineWidth+3}})),U$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const H$=e=>"number"==typeof e?e.toString():"";var G$=u.forwardRef(((e,t)=>{const{prefixCls:n,range:o,className:i,tooltipPrefixCls:a,tipFormatter:s,tooltipVisible:l,getTooltipPopupContainer:c,tooltipPlacement:d}=e,f=U$(e,["prefixCls","range","className","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement"]),{getPrefixCls:h,direction:p,getPopupContainer:m}=u.useContext(aU),[g,v]=u.useState({}),b=(e,t)=>{v((n=>Object.assign(Object.assign({},n),{[e]:t})))},y=(e,t)=>e||(t?"rtl"===p?"left":"right":"top"),w=h("slider",n),[x,S]=z$(w),M=r(Xd)(i,{[`${w}-rtl`]:"rtl"===p},S);"rtl"!==p||f.vertical||(f.reverse=!f.reverse);const[_,E]=u.useMemo((()=>o?"object"==typeof o?[!0,o.draggableTrack]:[!0,!1]:[!1]),[o]);return x(u.createElement(N$,Object.assign({},f,{step:f.step,range:_,draggableTrack:E,className:M,ref:t,prefixCls:w,handleRender:(t,n)=>{var r;const{index:o,dragging:i}=n,{tooltip:f={},vertical:p}=e,v=Object.assign({},f),{open:x,placement:S,getPopupContainer:M,prefixCls:_,formatter:E}=v;let A;A=E||null===E?E:s||null===s?s:H$;const C=!!A&&(g[o]||i),k=null!==(r=null!=x?x:l)&&void 0!==r?r:void 0===x&&C,T=Object.assign(Object.assign({},t.props),{onMouseEnter:()=>b(o,!0),onMouseLeave:()=>b(o,!1)}),I=h("tooltip",null!=_?_:a);return u.createElement(L$,{prefixCls:I,title:A?A(n.value):"",open:k,placement:y(null!=S?S:d,p),key:o,overlayClassName:`${w}-tooltip`,getPopupContainer:M||c||m},u.cloneElement(t,T))}})))}));const W$="img-crop",V$=.1,q$=(0,u.forwardRef)(((e,t)=>{const{cropperRef:n,image:r,aspect:o,shape:i,grid:a,zoom:l,rotate:c,minZoom:d,maxZoom:f,cropperProps:h}=e,[p,m]=(0,u.useState)({x:0,y:0}),[g,v]=(0,u.useState)({width:0,height:0}),[b,y]=(0,u.useState)(1),[w,x]=(0,u.useState)(0),S=(0,u.useRef)({width:0,height:0,x:0,y:0}),M=(0,u.useCallback)((e=>{const{width:t,height:n}=e,r=n*o;v(t>r?{width:r,height:n}:{width:t,height:t/o})}),[o]),_=(0,u.useCallback)(((e,t)=>{S.current=t}),[]);return(0,u.useImperativeHandle)(t,(()=>({rotateVal:w,setZoomVal:y,setRotateVal:x,cropPixelsRef:S}))),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u$,Object.assign({},h,{ref:n,image:r,crop:p,cropSize:g,onCropChange:m,aspect:o,cropShape:i,showGrid:a,zoomWithScroll:l,zoom:b,rotation:w,onZoomChange:y,onRotationChange:x,minZoom:d,maxZoom:f,onMediaLoaded:M,onCropComplete:_,classes:{containerClassName:`${W$}-container`,mediaClassName:`${W$}-media`}})),l&&(0,s.jsxs)("section",Object.assign({className:`${W$}-control ${W$}-control-zoom`},{children:[(0,s.jsx)("button",Object.assign({onClick:()=>y(b-V$),disabled:b-V$<d},{children:"-"})),(0,s.jsx)(d$.default,{min:d,max:f,step:V$,value:b,onChange:y}),(0,s.jsx)("button",Object.assign({onClick:()=>y(b+V$),disabled:b+V$>f},{children:"+"}))]})),c&&(0,s.jsxs)("section",Object.assign({className:`${W$}-control ${W$}-control-rotate`},{children:[(0,s.jsx)("button",Object.assign({onClick:()=>x(w-1),disabled:-180===w},{children:"↺"})),(0,s.jsx)(d$.default,{min:-180,max:180,step:1,value:w,onChange:x}),(0,s.jsx)("button",Object.assign({onClick:()=>x(w+1),disabled:180===w},{children:"↻"}))]}))]})}));var K$=(0,u.memo)(q$);!function(e){if(e&&"undefined"!=typeof window){var t=document.createElement("style");t.setAttribute("media","screen"),t.innerHTML=e,document.head.appendChild(t)}}(".img-crop-modal .img-crop-container {\n position: relative;\n width: 100%;\n height: 40vh;\n}\n.img-crop-modal .img-crop-control {\n display: flex;\n align-items: center;\n width: 60%;\n margin-left: auto;\n margin-right: auto;\n}\n.img-crop-modal .img-crop-control:first-of-type {\n margin-top: 16px;\n}\n.img-crop-modal .img-crop-control:last-of-type {\n margin-bottom: -8px;\n}\n.img-crop-modal .img-crop-control button {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 34px;\n height: 34px;\n padding: 0;\n font-style: normal;\n background: transparent;\n border: 0;\n outline: 0;\n cursor: pointer;\n}\n.img-crop-modal .img-crop-control button[disabled] {\n cursor: default;\n}\n.img-crop-modal .img-crop-control button + div:only-of-type {\n flex: 1;\n margin: 0 8px;\n}\n.img-crop-modal .img-crop-control-zoom button {\n font-size: 18px;\n}\n.img-crop-modal .img-crop-control-rotate button {\n font-size: 16px;\n}\n.img-crop-modal .img-crop-control-rotate button:first-of-type {\n transform: rotate(-20deg);\n}\n.img-crop-modal .img-crop-control-rotate button:last-of-type {\n transform: rotate(20deg);\n}\n");const $$=-1===DK(qF,"4.23.0")?{visible:!0}:{open:!0},J$=(0,u.forwardRef)(((e,t)=>{const{aspect:n=1,shape:r="rect",grid:o=!1,quality:i=.4,fillColor:a="white",zoom:l=!0,rotate:c=!1,minZoom:d=1,maxZoom:f=3,modalTitle:h,modalWidth:p,modalOk:m,modalCancel:g,modalMaskTransitionName:v,modalTransitionName:b,modalClassName:y,onModalOk:w,onModalCancel:x,beforeCrop:S,onUploadFail:M,cropperProps:_,children:E}=e,A=(0,u.useRef)({});A.current.onModalOk=w,A.current.onModalCancel=x,A.current.beforeCrop=S,A.current.onUploadFail=M;const[C,k]=(0,u.useState)(""),T=(0,u.useRef)({}),I=(0,u.useRef)(),O=(0,u.useRef)((()=>{})),R=(0,u.useRef)((()=>{})),P=(0,u.useMemo)((()=>{const e=Array.isArray(E)?E[0]:E,t=e.props,{beforeUpload:n,accept:r}=t,o=WF(t,["beforeUpload","accept"]);return I.current=n,Object.assign(Object.assign({},e),{props:Object.assign(Object.assign({},o),{accept:r||"image/*",beforeUpload:(e,t)=>new Promise(((n,r)=>VF(void 0,void 0,void 0,(function*(){if(A.current.beforeCrop){if(!(yield A.current.beforeCrop(e,t)))return r()}T.current=e,O.current=e=>{var t,r;null===(r=(t=A.current).onModalOk)||void 0===r||r.call(t,e),n(e)},R.current=e=>{var t,n;null===(n=(t=A.current).onUploadFail)||void 0===n||n.call(t,e),r()};const o=new FileReader;o.addEventListener("load",(()=>{"string"==typeof o.result&&k(o.result)})),o.readAsDataURL(e)}))))})})}),[E]),N=(0,u.useRef)({}),L=(0,u.useMemo)((()=>{const e={width:p,okText:m,cancelText:g,maskTransitionName:v,transitionName:b};return Object.keys(e).forEach((t=>{const n=t;void 0===e[n]&&delete e[n]})),e}),[g,v,m,b,p]),B=()=>{k(""),N.current.setZoomVal(1),N.current.setRotateVal(0)},D=(0,u.useCallback)((()=>{var e,t;null===(t=(e=A.current).onModalCancel)||void 0===t||t.call(e),B()}),[]),j=(0,u.useCallback)((e=>VF(void 0,void 0,void 0,(function*(){var t;B();const n=document.createElement("canvas"),r=n.getContext("2d"),o=e.target,s=((null===(t=null==o?void 0:o.getRootNode)||void 0===t?void 0:t.call(o))||document).querySelector(`.${W$}-media`),{width:l,height:u,x:d,y:f}=N.current.cropPixelsRef.current;if(c&&0!==N.current.rotateVal){const{naturalWidth:e,naturalHeight:t}=s,o=N.current.rotateVal*(Math.PI/180),i=Math.abs(Math.sin(o)),c=Math.abs(Math.cos(o)),h=e*c+t*i,p=t*c+e*i;n.width=h,n.height=p,r.fillStyle=a,r.fillRect(0,0,h,p);const m=h/2,g=p/2;r.translate(m,g),r.rotate(o),r.translate(-m,-g);const v=(h-e)/2,b=(p-t)/2;r.drawImage(s,0,0,e,t,v,b,e,t);const y=r.getImageData(0,0,h,p);n.width=l,n.height=u,r.putImageData(y,-d,-f)}else n.width=l,n.height=u,r.fillStyle=a,r.fillRect(0,0,l,u),r.drawImage(s,d,f,l,u,0,0,l,u);const{type:h,name:p,uid:m}=T.current;n.toBlob((e=>VF(void 0,void 0,void 0,(function*(){const t=Object.assign(new File([e],p,{type:h}),{uid:m});if(!I.current)return O.current(t);const n=t,r=yield I.current(n,[n]);return!0===r?O.current(t):!1===r?R.current(new Error("beforeUpload return false")):(delete t[BK.LIST_IGNORE],r===BK.LIST_IGNORE?(Object.defineProperty(t,BK.LIST_IGNORE,{value:!0,configurable:!0}),R.current(new Error("beforeUpload return LIST_IGNORE"))):"object"==typeof r&&null!==r?O.current(r):void 0)}))),h,i)}))),[a,i,c]),F=e=>(0,s.jsxs)(s.Fragment,{children:[P,C&&(0,s.jsx)(FV,Object.assign({},$$,{wrapClassName:`${W$}-modal ${y||""}`,title:e,onOk:j,onCancel:D,maskClosable:!1,destroyOnClose:!0},L,{children:(0,s.jsx)(K$,{ref:N,cropperRef:t,image:C,aspect:n,shape:r,grid:o,zoom:l,rotate:c,minZoom:d,maxZoom:f,cropperProps:_})}))]});return h?F(h):(0,s.jsx)(ez,{children:(e,t)=>F("zh-cn"===t?"编辑图片":"Edit image")})}));u=a("85Hg2");var X$=({className:e,title:t})=>r(u).createElement("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t},r(u).createElement("path",{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}));const Q$=["image/jpeg","image/png","image/jpg","image/gif"],Y$=({originNode:e,file:t,tenantID:n,actions:o,resourceType:i})=>{var a,s,l,c;const{t:d}=ea();return r(u).createElement("div",{className:"memori--list-item-wrapper"+("uploading"===t.status?" listItemUploading":"")},r(u).createElement(fp,{spinning:"uploading"===t.status},"error"===t.status?r(u).createElement(Ey,{content:d("media.uploadError")},e.props.children):r(u).createElement(_b,{item:{mediumID:t.uid,mimeType:"uploading"===t.status?"image/png":(null===(a=t.name)||void 0===a?void 0:a.endsWith(".glb"))?"model/gltf-binary":t.type||"image/png",title:null!==(s=t.name)&&void 0!==s?s:"",url:"uploading"===t.status?"":(null===(c=null===(l=t.response)||void 0===l?void 0:l.asset)||void 0===c?void 0:c.assetURL)?t.response.asset.assetURL:Fm({type:i,resourceURI:t.thumbUrl,tenantID:n}),content:`${Fm({resourceURI:t.thumbUrl,type:i})}`},preview:!1})),("success"===t.status||"done"===t.status)&&r(u).createElement("div",{className:"list-item-actions"},r(u).createElement(Zd,{outlined:!0,shape:"circle",icon:r(u).createElement(aj,null),className:"action-button",title:d("edit")||"Edit",onClick:()=>null==o?void 0:o.download(t)}),r(u).createElement(Zd,{outlined:!0,shape:"circle",icon:r(u).createElement(X$,null),className:"action-button",title:d("delete")||"Delete",onClick:()=>null==o?void 0:o.remove(t)})))};var Z$=({uploadMultipleImages:e,maxNumberOfVisualizedUploads:t,uploadUrl:n,tenantID:o,fileList:i,maxFileSizeInMB:a=2,fileResolution:s,useImageCrop:l,uploadMessage:c,imageProportions:d=1,imageProportionsHelper:f,allowedMimeTypes:h,onRemove:p,onFileChanged:m,onUploadFinished:g,onFileNotValid:v,disabled:b,showHelper:y,additionalHelper:w,resourceType:x})=>{var S;const{t:M}=ea(),[_,E]=(0,u.useState)(null!=i?i:[]),[A,C]=(0,u.useState)(),k=r(u).createElement(r(EF),{className:"memori--upload",disabled:null!=b&&b,accept:(null===(S=null!=h?h:Q$)||void 0===S?void 0:S.join(","))+";capture=camera,camcorder",action:n,listType:"picture-card",showUploadList:{showPreviewIcon:!0,showRemoveIcon:!0,showDownloadIcon:!0,downloadIcon:r(u).createElement(aj,{title:M("edit")||"Edit"})},beforeUpload:e=>{if(!(null!=h?h:Q$).find((t=>t===e.type))&&e.type)return console.debug("File not allowed",e,null!=h?h:Q$),Qd.error(M("media.uploadMimeTypeNotAllowed")),v&&v(),Promise.reject(M("media.uploadMimeTypeNotAllowed"));if(!(e.size/1024/1024<(null!=a?a:2)))return Qd.error(M("media.uploadSizeLimitMessage",{size:a})),v&&v(),Promise.reject(M("media.uploadSizeLimitMessage",{size:a}));if(s&&s.length){const t=new FileReader;return t.readAsDataURL(e),new Promise(((n,r)=>{t.addEventListener("load",(t=>{var o,i,a,l=new Image;l.style.padding="0px",l.style.margin="0px",l.onload=()=>{l.width===s[0]&&l.height===s[1]?n(e):(Qd.error(M("media.uploadWrongResolutionMessage",{width:s[0],height:s[1]})),r(),v&&v())},l.src=null!==(a=null===(i=null===(o=t.target)||void 0===o?void 0:o.result)||void 0===i?void 0:i.toString())&&void 0!==a?a:""}))}))}return Promise.resolve(e)},supportServerRender:!0,fileList:_,multiple:e,maxCount:t||(e?100:1),onChange:e=>{E(e.fileList.map((e=>{var t;return{...e,status:null!==(t=e.status)&&void 0!==t?t:"error"}}))),"done"===e.file.status&&g&&g(e.file)},onRemove:p,onDownload:e=>{var t,n;let r=null===(t=e.response)||void 0===t?void 0:t.asset;if(r){let t=r.originalFileName&&e.name.includes(r.originalFileName)?r.originalFileName:e.name;C({...r,title:null!=t?t:r.title})}else C({assetID:e.uid,title:null!==(n=e.name)&&void 0!==n?n:e.fileName})},itemRender:(e,t,n,i)=>r(u).createElement(Y$,{resourceType:x,originNode:e,file:t,fileList:_||n,actions:i,tenantID:o})},c);return r(u).createElement("div",{"aria-live":"polite"},l?r(u).createElement(J$,{rotate:!0,aspect:d,fillColor:"transparent",modalCancel:M("cancel")||"Cancel",modalMaskTransitionName:"none",modalTransitionName:"none"},k):k,r(u).createElement(pp,{open:!!A,title:M("media.editAttributes"),onClose:()=>{C(void 0)},footer:r(u).createElement(r(u).Fragment,null),width:"100%"},r(u).createElement("label",{htmlFor:"media-title-input",className:"media-title-label"},M("media.title")),r(u).createElement("input",{id:"media-title-input",className:"media-title-input",type:"text",name:"title",defaultValue:(null==A?void 0:A.title)||"",onChange:e=>{C({...A,title:e.target.value})}}),r(u).createElement("div",{className:"memori-modal--footer"},r(u).createElement(Zd,{onClick:()=>{C(void 0)}},M("cancel")),r(u).createElement(Zd,{primary:!0,onClick:()=>{m&&(null==A?void 0:A.assetID)&&m(A.assetID,{...A}),E((e=>e.map((e=>{var t,n;return e.uid===(null==A?void 0:A.assetID)||(null===(n=null===(t=e.response)||void 0===t?void 0:t.asset)||void 0===n?void 0:n.assetID)===(null==A?void 0:A.assetID)?{...e,title:null==A?void 0:A.title,name:null==A?void 0:A.title}:e})))),C(void 0)}},M("confirm")))),y&&r(u).createElement("legend",{className:"helper"},r(u).createElement("p",null,M(h?"media.uploadHelper":"media.uploadHelperImages").replace("@size@",(null!=a?a:2).toString())),f&&l&&r(u).createElement("p",null,M("media.scaleRatio"),": ",f),w&&r(u).createElement("p",null,w)))};var eJ=({visible:e,authToken:t,sessionID:n,tenantID:o,uploadAssetURL:i,deleteAsset:a,onCancel:s,onOk:l})=>{const{t:c}=ea(),[d,f]=(0,u.useState)();return r(u).createElement(pp,{open:e,title:c("media.addMediaLabel"),className:"attachment-media-modal",closable:!0,width:"100%",widthMd:"100%",onClose:()=>{s&&s()},footer:r(u).createElement(r(u).Fragment,null,r(u).createElement(Zd,{onClick:s},c("cancel")),r(u).createElement(Zd,{primary:!0,onClick:()=>{d&&l(d),f(void 0)},disabled:!d},c("confirm")))},r(u).createElement(Z$,{tenantID:o,uploadMultipleImages:!1,maxNumberOfVisualizedUploads:1,maxFileSizeInMB:100,uploadUrl:i,useImageCrop:!1,allowedMimeTypes:Qm,fileList:d?[{uid:"-1",name:d.assetID,status:"done",thumbUrl:Fm({resourceURI:d.assetURL,tenantID:o,sessionID:n})}]:[],uploadMessage:c("media.mediaUploadMessage"),imageProportions:1,onUploadFinished:e=>{let t=e.response.asset,n=e.response;0===n.resultCode?f(t):(console.error(n,e),Qd.error(c(gF(n.resultCode))))},onFileChanged:(e,t)=>{f((e=>({...e||{},...t})))},onRemove:async e=>{const n=await a(t,e.thumbUrl);return 0===n.resultCode?f(void 0):(console.error(n,e),Qd.error(c(gF(n.resultCode)))),0===n.resultCode}}))};u=a("85Hg2");var tJ=({visible:e,onCancel:t,onOk:n})=>{var o,i,a;const{t:s}=ea(),[l,c]=(0,u.useState)({url:"",title:""}),d=e=>{if("Enter"===e.key){if(0===(null==l?void 0:l.url.length)||0===(null==l?void 0:l.title.length))return;let e=document.getElementById("save-link-button");e&&e.click()}};return r(u).createElement(pp,{open:e,title:s("media.addLinkLabel"),className:"attachment-link-modal",closable:!0,width:"100%",widthMd:"80%",onClose:()=>{t&&t()},footer:r(u).createElement(r(u).Fragment,null,r(u).createElement(Zd,{onClick:t},s("cancel")),r(u).createElement(Zd,{id:"save-link-button",primary:!0,onClick:()=>{0!==(null==l?void 0:l.url.length)&&0!==(null==l?void 0:l.title.length)&&(n(l),c({url:"",title:""}))},disabled:0===(null==l?void 0:l.url.length)||0===(null==l?void 0:l.title.length)},s("confirm")))},r(u).createElement("div",{className:"attachment-link-modal--row"},r(u).createElement("div",{className:"attachment-link-modal--column"},r(u).createElement("label",{htmlFor:"new-link-url",className:"attachment-link-modal--label"},s("media.linkKey"),":"),r(u).createElement("input",{type:"url",className:"attachment-link-modal--input ",onChange:e=>{let t=e.target.value.startsWith("http")||0===e.target.value.length?e.target.value:`https://${e.target.value}`;c((e=>{var n;return{title:null!==(n=null==e?void 0:e.title)&&void 0!==n?n:"",url:t}}))},placeholder:"https://memori.ai/...",value:null==l?void 0:l.url,name:"url",onKeyDown:d}),r(u).createElement("label",{htmlFor:"new-link-title",className:"attachment-link-modal--label"},s("media.linkValue"),":"),r(u).createElement("input",{type:"text",className:"attachment-link-modal--input ",onChange:e=>c((t=>{var n;return{url:null!==(n=null==t?void 0:t.url)&&void 0!==n?n:"",title:e.target.value}})),value:null==l?void 0:l.title,name:"title",onKeyDown:d})),r(u).createElement("div",{className:"attachment-link-modal--column"},r(u).createElement("div",{className:"attachment-link-modal--centered"},r(u).createElement(qm,{key:null!==(o=null==l?void 0:l.url)&&void 0!==o?o:"",item:{title:null!==(i=null==l?void 0:l.title)&&void 0!==i?i:"",url:null!==(a=null==l?void 0:l.url)&&void 0!==a?a:"",mediumID:"",mimeType:"text/html"},onLinkPreviewInfo:e=>{var t;(null===(t=null==l?void 0:l.title)||void 0===t?void 0:t.length)||c((t=>{var n;return{...t,title:null!==(n=null==e?void 0:e.title)&&void 0!==n?n:""}}))}})))))};window.getMemoriState=e=>{var t,n,r,o,i;let a=e?document.querySelector(`.memori-widget[data-memori-integration="${e}"]`)||(null===(n=null===(t=document.querySelector("memori-client"))||void 0===t?void 0:t.shadowRoot)||void 0===n?void 0:n.querySelector(".memori-widget[data-memori-integration]")):document.querySelector(".memori-widget")||(null===(o=null===(r=document.querySelector("memori-client"))||void 0===r?void 0:r.shadowRoot)||void 0===o?void 0:o.querySelector(".memori-widget"));if(!a)return null;let s=null===(i=a.dataset)||void 0===i?void 0:i.memoriEngineState;return s?JSON.parse(s):null},window.typeMessage=e=>{var t,n;let r=document.querySelector("fieldset#chat-fieldset textarea")||(null===(n=null===(t=document.querySelector("memori-client"))||void 0===t?void 0:t.shadowRoot)||void 0===n?void 0:n.querySelector("fieldset#chat-fieldset textarea"));r&&(!function(e,t){var n,r,o,i;const a=null===(r=null===(n=null==Object?void 0:Object.getOwnPropertyDescriptor)||void 0===n?void 0:n.call(Object,e,"value"))||void 0===r?void 0:r.set,s=Object.getPrototypeOf(e),l=null===(i=null===(o=null==Object?void 0:Object.getOwnPropertyDescriptor)||void 0===o?void 0:o.call(Object,s,"value"))||void 0===i?void 0:i.set;l&&a&&a!==l?l.call(e,t):a&&a.call(e,t)}(r,e),r.dispatchEvent(new Event("input",{bubbles:!0})),setTimeout((()=>{var e,t;let n=document.querySelector("button.memori-chat-inputs--send")||(null===(t=null===(e=document.querySelector("memori-client"))||void 0===e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector("button.memori-chat-inputs--send"));n&&n.click()}),100))};let nJ,rJ,oJ,iJ,aJ;var sJ=({memori:e,memoriConfigs:t,memoriLang:n,integration:o,showInstruct:i=!1,showShare:a=!0,preview:s=!1,embed:l=!1,showInputs:c=!0,showDates:d=!1,showContextPerLine:f=!1,showSettings:h=!1,height:p="100vh",secret:m,baseUrl:g="https://app.twincreator.com",apiUrl:v="https://backend.memori.ai",initialContextVars:b,initialQuestion:y,ogImage:w,sessionID:x,tenant:S,personification:M,authToken:_,AZURE_COGNITIVE_SERVICES_TTS_KEY:E,onStateChange:A})=>{var C,k,T,I,O,R,P,N,L,B,D,j,F,z,U,H,G,W;const{t:V,i18n:q}=ea(),[K,$]=(0,u.useState)(!1);(0,u.useEffect)((()=>{$(!0)}),[]);const J=mi(v),{initSession:X,postTextEnteredEvent:Q,postPlaceChangedEvent:Y,postTimeoutEvent:Z,postTagChangedEvent:ee,getSession:te,getContentQualityIndexes:ne}=J,{uploadAsset:re,getUploadAssetURL:oe,deleteAsset:ie}=J.backend,[ae,se]=(0,u.useState)(!1),[le,ce]=(0,u.useState)(!1),[ue,de]=(0,u.useState)(!1),fe=null===(I=null===(T=null===(k=null===(C=null==t?void 0:t.find((t=>t.memoriConfigID===e.memoriConfigurationID)))||void 0===C?void 0:C.culture)||void 0===k?void 0:k.split("-"))||void 0===T?void 0:T[0])||void 0===I?void 0:I.toUpperCase(),[he,pe]=(0,u.useState)(null!==(L=null!==(N=null!==(P=null!=n?n:null===(R=null===(O=null==e?void 0:e.culture)||void 0===O?void 0:O.split("-"))||void 0===R?void 0:R[0])&&void 0!==P?P:fe)&&void 0!==N?N:q.language)&&void 0!==L?L:"IT"),me=(null==o?void 0:o.customData)?JSON.parse(o.customData):null,ge=!!(null==me?void 0:me.multilanguage),[ve,be]=(0,u.useState)(!1),[ye,we]=(0,u.useState)(!1),[xe,Se]=(0,u.useState)(!1),[Me,_e]=(0,u.useState)(!1),[Ee,Ae]=(0,u.useState)(!1),[Ce,ke]=(0,u.useState)(!1),[Te,Ie]=(0,u.useState)(!1),[Oe,Re]=(0,u.useState)(!0),[Pe,Ne]=(0,u.useState)(3),[Le,Be]=(0,u.useState)(!1);(0,u.useEffect)((()=>{Be(!!oJ)}),[oJ]),(0,u.useEffect)((()=>{Ie(hF("muteSpeaker",!1)),Re(hF("continuousSpeech",!0)),Ne(hF("continuousSpeechTimeout",3))}),[]);const[De,je]=(0,u.useState)(m),[Fe,ze]=(0,u.useState)(),[Ue,He]=(0,u.useState)(null),[Ge,Ve]=(0,u.useState)(),qe=async(e,t)=>{var n;const r=null!=t?t:nt;if(e&&r){const{currentState:t,...o}=await Y({sessionId:r,placeName:e.placeName,latitude:e.latitude,longitude:e.longitude,uncertaintyKm:null!==(n=e.uncertainty)&&void 0!==n?n:0});t&&0===o.resultCode&&at({...ot,...t})}},[Ke,$e]=(0,u.useState)(""),[Je,Xe]=(0,u.useState)(!1),[Qe,Ye]=(0,u.useState)([]),Ze=e=>{Ye((t=>[...t,{...e}]))},et=async(t,n,r,o=!0,i)=>{var a,s,l,c,u;if(!nt||!(null==t?void 0:t.length))return;Ze({text:t,translatedText:i,fromUser:!0,media:null!=n?n:[],initial:!!r}),we(!0);const d=null!==(c=null!==(l=null===(s=null===(a=e.culture)||void 0===a?void 0:a.split("-"))||void 0===s?void 0:s[0])&&void 0!==l?l:q.language)&&void 0!==c?c:"IT";let f=t;if(o&&!ae&&ge&&he.toUpperCase()!==d.toUpperCase()){f=(await Jm(t,d,he,g)).text}const{currentState:h,...p}=await Q({sessionId:null!=r?r:nt,text:f});if(0===p.resultCode&&h){const t=null!==(u=h.emission)&&void 0!==u?u:null==ot?void 0:ot.emission;if("X4"===h.state&&e.giverTag){const{currentState:t,...n}=await ee(nt,e.giverTag);0===n.resultCode?(at(t),t.emission&&(Ze({text:t.emission,media:t.media,fromUser:!1}),St(t.emission))):(console.error(p,n),Qd.error(V(gF(n.resultCode))))}else if("X2d"===h.state&&e.giverTag){const{currentState:t,...n}=await Q({sessionId:null!=r?r:nt,text:Math.random().toString().substring(2,8)});if(0===n.resultCode){const{currentState:t,...n}=await ee(nt,e.giverTag);0===n.resultCode?(at(t),t.emission&&(Ze({text:t.emission,media:t.media,fromUser:!1}),St(t.emission))):(console.error(p,n),Qd.error(V(gF(n.resultCode))))}else console.error(p,n),Qd.error(V(gF(n.resultCode)))}else he.toLowerCase()!==d.toLowerCase()&&t&&!ae&&ge?tt(h,he).then((e=>{e.emission&&St(e.emission)})):(at({...h,emission:t}),t&&(Ze({text:t,media:h.media,fromUser:!1}),St(t)))}else 404===p.resultCode&&(Ye((e=>[...e.slice(0,e.length-1)])),lt(!1,De||e.secretToken,Fe,ae&&e.giverTag?e.giverTag:void 0,ae&&e.giverPIN?e.giverPIN:void 0,b,y).then((e=>{console.info("session timeout"),(null==e?void 0:e.sessionID)&&setTimeout((()=>{et(t,n,null==e?void 0:e.sessionID)}),500)})));we(!1)},tt=async(t,n)=>{var r,o,i,a,s,l;const c=null!==(a=null!==(i=null===(o=null===(r=e.culture)||void 0===r?void 0:r.split("-"))||void 0===o?void 0:o[0])&&void 0!==i?i:q.language)&&void 0!==a?a:"IT",u=null!==(s=t.emission)&&void 0!==s?s:null==ot?void 0:ot.emission;let d={...t},f=null;if(u&&!ae&&c.toUpperCase()!==n.toUpperCase()&&ge){const e=await Jm(u,n,c,g);if(t.hints&&t.hints.length>0){const r=await Promise.all((null!==(l=t.hints)&&void 0!==l?l:[]).map((async e=>{var t;const r=await Jm(e,n,c,g);return{text:null!==(t=null==r?void 0:r.text)&&void 0!==t?t:e,originalText:e}})));d={...t,emission:e.text,translatedHints:r}}else d={...t,emission:e.text};e.text.length>0&&(f={text:e.text,media:t.media,fromUser:!1})}else d={...t,emission:u},u&&(f={text:u,media:t.media,fromUser:!1});return at(d),f&&Ze(f),d},[nt,rt]=(0,u.useState)(x),[ot,it]=(0,u.useState)(),at=e=>{it(e),A&&A(e)},st=async t=>{var n;if("PUBLIC"===e.privacyType||e.secretToken||De||Fe){be(!0);try{if(!e.giverTag&&(null===(n=e.receivedInvitations)||void 0===n?void 0:n.length)){let t=e.receivedInvitations.find((e=>"GIVER"===e.type&&"ACCEPTED"===e.state));t&&(e.giverTag=t.tag,e.giverPIN=t.pin)}const r=await X(t);if((null==r?void 0:r.sessionID)&&(null==r?void 0:r.currentState)&&0===r.resultCode)return rt(r.sessionID),Ge&&qe(Ge,r.sessionID),be(!1),{dialogState:r.currentState,sessionID:r.sessionID};console.error(r),Qd.error(V(gF(null==r?void 0:r.resultCode))),de(!0)}catch(e){console.error(e),new Error("Error fetching session")}}else He("password")},lt=async(t=!1,n,r,o,i,a,s)=>{var l;be(!0);try{const{sessionID:c,currentState:u,...d}=await X({memoriID:null!==(l=e.engineMemoriID)&&void 0!==l?l:"",password:n,recoveryTokens:r,tag:o,pin:i,initialContextVars:a,initialQuestion:s});if(c&&u&&0===d.resultCode)return rt(c),t&&(at(u),u.emission&&(Qe.length<=1?Ye([{text:u.emission,media:u.media,fromUser:!1}]):Ze({text:u.emission,media:u.media,fromUser:!1}))),Ge&&qe(Ge,c),be(!1),{dialogState:u,sessionID:c};console.error(d),Qd.error(V(gF(d.resultCode))),de(!0)}catch(e){console.error(e)}return be(!1),null},ct=async(t,n,r,o)=>{var i;if(!t||!n)return console.error("CHANGETAG/Session not found"),Promise.reject("Session not found");try{const{currentState:t,resultCode:a}=await ee(n,null!=r?r:Ym);if(0===a){let s=0;if(r!==Ym&&o&&("X1a"===t.state||"X1b"===t.state)){const{resultCode:e}=await Q({sessionId:n,text:null!=o?o:""});s=e}if(0===s){const{currentState:e,...t}=await te(n);if(0===t.resultCode&&e)return{currentState:e,sessionId:n,...t}}else if([400,401,403,404,500].includes(a))console.warn("[APPCONTEXT/CHANGETAG]",a),st({memoriID:null!==(i=e.engineMemoriID)&&void 0!==i?i:"",password:m||e.secretToken,tag:e.giverTag,pin:e.giverPIN,initialContextVars:b,initialQuestion:y});else if(t)return{currentState:t,sessionId:n,resultCode:a}}}catch(e){let t=e;return console.error("[APPCONTEXT/CHANGETAG]",t),Promise.reject(t)}return null};(0,u.useEffect)((()=>()=>{ot&&(null==ot?void 0:ot.currentTag)===e.giverTag||(async()=>{nt&&e.giverTag&&e.giverPIN&&(Ye([]),await ct(e.engineMemoriID,nt,e.giverTag,e.giverPIN))})()}),[]);const[ut,dt]=(0,u.useState)(),ft=(0,u.useRef)(),ht=()=>{ut&&(clearTimeout(ut),dt(void 0)),(null==ft?void 0:ft.current)&&(clearTimeout(ft.current),ft.current=void 0)},pt=()=>{ht(),!(null==ot?void 0:ot.acceptsTimeout)||oJ||Le||Ke.length||Je||gt()},mt=async()=>{if(oJ||Le||Ke.length||Je)pt();else if(nt&&xe&&(null==ot?void 0:ot.acceptsTimeout)){const{currentState:e,...t}=await Z(nt);if(0===t.resultCode&&e){const t=e.emission;!ae&&ge&&he!==(null==q?void 0:q.language)&&t&&t.length>0?tt({...e,emission:t},he).then((e=>{e.emission&&St(e.emission)})):t&&t.length>0&&(Ze({text:t,media:e.media,fromUser:!1}),St(t),at(e))}}},gt=()=>{let e=null==ot?void 0:ot.timeout;if(!e){let t=40,n=25;if(e=Math.floor(Math.random()*(t-n))+n,null==ot?void 0:ot.emission){e+=ot.emission.length/26.5}}let t=setTimeout(mt,1e3*e);dt(t),ft.current=t};(0,u.useEffect)((()=>{(Ke.length||Le)&&ht(),nt&&!Ke.length&&pt()}),[null==ot?void 0:ot.acceptsTimeout,null==ot?void 0:ot.timeout,null==ot?void 0:ot.state,Le,nt,Qe,Ke]),(0,u.useEffect)((()=>()=>{Se(!1),ce(!1),ht(),ft.current=void 0}),[]);const vt=(0,u.useCallback)((t=>{var n,r,o,i;let a="";switch((null!==(i=null!==(o=null!=t?t:null===(r=null===(n=e.culture)||void 0===n?void 0:n.split("-"))||void 0===r?void 0:r[0])&&void 0!==o?o:q.language)&&void 0!==i?i:"IT").toUpperCase()){case"IT":a=""+("MALE"===e.voiceType?"it-IT-DiegoNeural":"it-IT-ElsaNeural");break;case"DE":a=""+("MALE"===e.voiceType?"de-DE-ConradNeural":"de-DE-KatjaNeural");break;case"EN":a=""+("MALE"===e.voiceType?"en-GB-RyanNeural":"en-GB-SoniaNeural");break;case"ES":a=""+("MALE"===e.voiceType?"es-ES-AlvaroNeural":"es-ES-ElviraNeural");break;case"FR":a=""+("MALE"===e.voiceType?"fr-FR-HenriNeural":"fr-FR-DeniseNeural");break;case"PT":a=""+("MALE"===e.voiceType?"pt-PT-DuarteNeural":"pt-PT-RaquelNeural");break;case"UK":a=""+("MALE"===e.voiceType?"uk-UA-OstapNeural":"uk-UA-PolinaNeural");break;case"RU":a=""+("MALE"===e.voiceType?"ru-RU-DmitryNeural":"ru-RU-SvetlanaNeural");break;default:a=""+("MALE"===e.voiceType?"it-IT-DiegoNeural":"it-IT-IsabellaNeural")}return a}),[e.voiceType,q.language,e.culture]),yt=t=>{var n,r;let o="";switch((t||(null===(r=null===(n=e.culture)||void 0===n?void 0:n.split("-"))||void 0===r?void 0:r[0])||q.language||"IT").toUpperCase()){case"IT":default:o="it-IT";break;case"DE":o="de-DE";break;case"EN":o="en-GB";break;case"ES":o="es-ES";break;case"FR":o="fr-FR";break;case"PT":o="pt-PT";break;case"UK":o="uk-UK";break;case"RU":o="ru-RU"}return o},[wt,xt]=(0,u.useState)();(0,u.useEffect)((()=>{(async()=>{try{const e=await fetch(`${g||"https://app.twincreator.com"}/api/lexiconmap`);return await e.json()}catch(e){console.error(e)}})().then((e=>{xt(e)}))}),[]);const St=e=>{if(console.log(E,xe,s),!E)return;if(s)return;iJ&&iJ.pause();let t=window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome"),n=/iPad|iPhone|iPod/.test(navigator.userAgent);if(n&&t)aJ.suspend();else if("suspended"===aJ.state){Mt(),aJ=new Ad;let e=aJ.createBuffer(1,1e4,22050),t=aJ.createBufferSource();t.buffer=e,t.connect(aJ.destination)}if(!oJ){iJ=new uo.SpeakerAudioDestination;let e=vo.fromSpeakerOutput(iJ);oJ=new Io.SpeechSynthesizer(rJ,e)}Te?Oe&&Tt():(iJ.onAudioEnd=()=>{Be(!1),Oe&&document.dispatchEvent(new Event("endSpeakStartListen"))},Be(!0),oJ.speakSsmlAsync(`<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:mstts="https://www.w3.org/2001/mstts" xmlns:emo="http://www.w3.org/2009/10/emotionml" xml:lang="${yt(he)}"><voice name="${vt(he)}"><s>${((e,t)=>{var n;if(!wt)return e;const r={...null!==(n=wt.common)&&void 0!==n?n:{},...(null==S?void 0:S.id)&&wt[S.id]?wt[S.id]:{}},o=Object.keys(r).map((e=>{var n;return{word:e,phoneme:null!==(n=r[e][t])&&void 0!==n?n:r[e].default}}));return o.reduce(((e,{word:t,phoneme:n})=>e.replace(new RegExp(t,"gi"),`<phoneme alphabet="ipa" ph="${n}">${t}</phoneme>`)),e)})(e,he.toLowerCase())}</s></voice></speak>`,(r=>{if(r){console.log("result",r);try{aJ.decodeAudioData(r.audioData,(function(e){const r=aJ.createBufferSource();r.buffer=e,r.connect(aJ.destination),(Qe.length<1||t&&n)&&r.start(0)})),aJ.resume(),oJ&&(oJ.close(),oJ=null)}catch(t){console.error("speak error: ",t),window.speechSynthesis.speak(new SpeechSynthesisUtterance(e)),Be(!1),oJ&&(oJ.close(),oJ=null)}}else aJ.resume(),Be(!1)}),(t=>{console.error("speak:",t),window.speechSynthesis.speak(new SpeechSynthesisUtterance(e)),Be(!1)})),Be(!1),we(!1))},Mt=()=>{oJ&&(oJ.close(),oJ=null),aJ&&aJ.close(),iJ&&(iJ.pause(),iJ.close())};(0,u.useEffect)((()=>{let e=document.querySelector("#chat-fieldset textarea");e&&e.focus()}),[null==ot?void 0:ot.emission]);const[_t,Et]=(0,u.useState)(""),At=()=>Et(""),[Ct,kt]=(0,u.useState)(null),Tt=()=>{let e=setTimeout((async()=>{Pt();const e=jm(_t);e.length>0?(et(e),At(),$e("")):Je&&pt()}),1e3*Pe);kt(e)},It=()=>{Ct&&(clearTimeout(Ct),kt(null))};(0,u.useEffect)((()=>{It(),Oe&&Tt(),pt()}),[_t]);const Ot=()=>{if(console.log("start listening"),E){Pt(),Et("");try{navigator.mediaDevices.getUserMedia({audio:!0}).then((function(e){console.log("is listening"),_e(!0),rJ||(rJ=hn.fromSubscription(E,"eastus"),rJ.speechRecognitionLanguage=yt(he),rJ.speechSynthesisLanguage=yt(he),rJ.speechSynthesisVoiceName=vt(he));const t=vo.fromDefaultMicrophoneInput();nJ=new wo.SpeechRecognizer(rJ,t),Xe(!0),nJ.recognized=(e,t)=>{if(t.result.reason===bt.RecognizedSpeech){let e=t.result.text;if(Et(e||""),(null==e?void 0:e.length)>0){const t=jm(e);t.length>0&&$e(t)}}else t.result.reason===bt.NoMatch&&console.debug("NOMATCH: Speech could not be recognized.")},nJ.canceled=(e,t)=>{t.reason===We.Error&&(console.debug(`"CANCELED: ErrorCode=${t.errorCode}`),console.debug(`"CANCELED: ErrorDetails=${t.errorDetails}`),console.debug("CANCELED: Did you set the speech resource key and region values?")),Rt()},nJ.sessionStopped=(e,t)=>{nJ&&nJ.stopContinuousRecognitionAsync()},nJ.startContinuousRecognitionAsync()})).catch(console.error)}catch(e){console.error(e)}}},Rt=()=>{nJ&&(nJ.stopContinuousRecognitionAsync(),nJ.close(),nJ=null,Xe(!1))},Pt=()=>{_e(!1),Rt(),It()};(0,u.useEffect)((()=>()=>Pt()),[]),(0,u.useEffect)((()=>{"Z0"===(null==ot?void 0:ot.state)&&Pt()}),[null==ot?void 0:ot.state]);const[Nt,Lt]=(0,u.useState)(!1),Bt=(0,u.useCallback)((e=>{Le&&oJ&&(oJ.close(),oJ=null),!Oe||!Me&&Nt||(Lt(!0),Ot())}),[Oe,Me]);(0,u.useEffect)((()=>{!Le&&Oe&&Me?Ot():Le&&Je&&Rt()}),[Le]),(0,u.useEffect)((()=>(document.addEventListener("endSpeakStartListen",Bt),()=>{document.removeEventListener("endSpeakStartListen",Bt)})),[Bt]),(0,u.useEffect)((()=>{Je&&(Pt(),At(),$e(""),Ot())}),[fe]);const[Dt,jt]=(0,u.useState)("keypress");(0,u.useEffect)((()=>{const e=hF("sendOnEnter","keypress");jt(e)}),[]),(0,u.useEffect)((()=>{pF("sendOnEnter",Dt)}),[Dt]);const[Ft,zt]=(0,u.useState)(),Ut=null==me?void 0:me.globalBackground,Ht=Ut?`url(${Ut})`:null,Gt=o?{"--memori-chat-bubble-bg":"#fff",...me&&!i?{"--memori-text-color":null!==(B=me.textColor)&&void 0!==B?B:"#000"}:{},...(null==me?void 0:me.buttonBgColor)?{"--memori-button-bg":me.buttonBgColor,"--memori-primary":me.buttonBgColor}:{},...(null==me?void 0:me.buttonTextColor)?{"--memori-button-text":me.buttonTextColor}:{},...(null==me?void 0:me.blurBackground)?{"--memori-blur-background":"5px"}:{"--memori-blur-background":"0px"},...(null==me?void 0:me.innerBgColor)?{"--memori-inner-bg":`rgba(${"dark"===me.innerBgColor?"0, 0, 0":"255, 255, 255"}, ${null!==(D=me.innerBgAlpha)&&void 0!==D?D:.4})`,"--memori-inner-content-pad":"1.5rem","--memori-nav-bg-image":"none","--memori-nav-bg":`rgba(${"dark"===me.innerBgColor?"0, 0, 0":"255, 255, 255"}, ${null!==(j=null==me?void 0:me.innerBgAlpha)&&void 0!==j?j:.4})`}:{"--memori-inner-content-pad":"0px"}}:{},Wt=`\n ${s?"#preview":":root"}, .memori-widget {\n ${Object.entries(Gt).map((([e,t])=>`${e}: ${t};`)).join("\n")}\n }\n `,[Vt,qt]=(0,u.useState)(!0),[Kt,$t]=(0,u.useState)();(0,u.useEffect)((()=>{e.engineMemoriID&&(async e=>{let t,n;try{const{contentQualityIndex:r,answerQualityIndex:o,unansweredQuestions:i,...a}=await ne(e);0===a.resultCode&&(t=r,n=i)}catch(e){let t=e;console.error("[APPCONTEXT/QUERYGAMIFICATIONPOINTS]",t)}return{points:null!=t?t:0,unansweredQuestions:null!=n?n:0}})(e.engineMemoriID).then((e=>{$t(_F(e.points))})).catch(console.error)}),[e.engineMemoriID]),(0,u.useEffect)((()=>{if(null==me?void 0:me.seoTitle){let e=document.createElement("meta");e.setAttribute("property","og:title"),e.setAttribute("content",me.seoTitle),document.head.append(e)}if(null==me?void 0:me.seoDescription){let e=document.createElement("meta");e.setAttribute("property","og:description"),e.setAttribute("content",me.seoDescription),document.head.append(e)}if(null==me?void 0:me.seoUrl){let e=document.createElement("meta");e.setAttribute("property","og:url"),e.setAttribute("content",me.seoUrl),document.head.append(e)}let t=w||e.avatarURL;if((null==me?void 0:me.seoImageShowAvatar)&&t){let e=document.createElement("meta");e.setAttribute("property","og:image"),e.setAttribute("content",t),document.head.append(e)}}),[me,e.avatarURL,w]);const Jt=async t=>{const n=(null==t?void 0:t.sessionID)||nt,r=(null==t?void 0:t.dialogState)||ot;ce(!0);let o=document.getElementById("memori-audio"),i=window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome");if(o&&i&&(o.muted=!1,o.play().catch((e=>{console.error("error playing intro audio",e)}))),!n&&"PUBLIC"!==e.privacyType&&!e.secretToken&&!De&&!Fe||!n&&ue)return He("password"),void ce(!1);if(n)if(x){const{currentState:t,...r}=await te(n);if(0!==r.resultCode||!t)return console.debug("session expired, opening new session"),de(!0),rt(void 0),ce(!1),void await Jt();if(Ye([]),ae&&e.giverTag&&(null==ot?void 0:ot.currentTag)!==e.giverTag)try{console.debug("change tag #0"),await ct(e.engineMemoriID,n,"-");const t=await ct(e.engineMemoriID,n,e.giverTag,e.giverPIN);if(!t||0!==t.resultCode)throw console.error("session #1",t),new Error("No session");tt(t.currentState,he).then((e=>{e.emission&&St(e.emission)})).finally((()=>{Se(!0)}))}catch(t){console.error("session #2",t),lt(!0,null==e?void 0:e.secretToken,void 0,null==e?void 0:e.giverTag,null==e?void 0:e.giverPIN,b,y).then((()=>{Se(!0)}))}else if(!ae&&M&&(null==ot?void 0:ot.currentTag)!==M.tag)try{console.debug("change tag #3"),await ct(e.engineMemoriID,n,"-");const t=await ct(e.engineMemoriID,n,M.tag,M.pin);if(!t||0!==t.resultCode)throw console.error("session #4",t),new Error("No session");tt(t.currentState,he).then((e=>{e.emission&&St(e.emission)})).finally((()=>{Se(!0)}))}catch(t){console.error("session #5",t),lt(!0,null==e?void 0:e.secretToken,void 0,M.tag,M.pin,b,y).then((()=>{Se(!0)}))}else if(ae||M||(null==ot?void 0:ot.currentTag)===Ym)tt(t,he).then((e=>{e.emission&&St(e.emission)})).finally((()=>{Se(!0)}));else try{console.debug("change tag #6"),await ct(e.engineMemoriID,n,"-");const t=await ct(e.engineMemoriID,n,Ym);if(!t||0!==t.resultCode)throw console.error("session #7",t),new Error("No session");tt(t.currentState,he).then((e=>{e.emission&&St(e.emission)})).finally((()=>{Se(!0)}))}catch(t){console.error("session #8",t),lt(!0,null==e?void 0:e.secretToken,void 0,void 0,void 0,b,y).then((()=>{Se(!0)}))}}else Ye([]),tt(r,he).then((e=>{e.emission&&St(e.emission)})).finally((()=>{Se(!0)}));else{ce(!1),de(!1);const t=await st({memoriID:e.engineMemoriID,password:m||e.secretToken,tag:null==M?void 0:M.tag,pin:null==M?void 0:M.pin,initialContextVars:b,initialQuestion:y});await Jt(t||void 0)}},[Xt,Qt]=(0,u.useState)(_);(0,u.useEffect)((()=>{const t=document.querySelector(`memori-client[memoriname="${e.name}"]`)||document.querySelector(`memori-client[memoriid="${e.memoriID}"]`)||document.querySelector("memori-client");if(!t)return;const n=new MutationObserver(((e,t)=>{var n,r,o;for(const t of e)"attributes"===t.type&&"authtoken"===(null===(n=t.attributeName)||void 0===n?void 0:n.toLowerCase())&&(console.log("FUCK",t),"MEMORI-CLIENT"===t.target.nodeName?Qt(t.target.getAttribute("authtoken")||void 0):Qt((null===(o=null===(r=t.target)||void 0===r?void 0:r.parentElement)||void 0===o?void 0:o.getAttribute("authtoken"))||void 0))}));return n.observe(t,{attributes:!0,childList:!1,subtree:!1}),()=>{n.disconnect()}}),[]);const Zt=r(u).createElement(uF,{memori:e,history:Qe,showShare:a,position:Ge,setShowPositionDrawer:Ae,setShowSettingsDrawer:ke,speakerMuted:Te,setSpeakerMuted:e=>{if(Ie(e),e)Mt();else{aJ=new Ad;let e=aJ.createBuffer(1,1e4,22050),t=aJ.createBufferSource();t.buffer=e,t.connect(aJ.destination)}},showSettings:h,hasUserActivatedSpeak:xe}),en=r(u).createElement(sj,{memori:e,integration:o,integrationConfig:me,tenant:S,instruct:ae,avatar3dVisible:Vt,setAvatar3dVisible:qt,hasUserActivatedSpeak:xe,isPlayingAudio:Le,baseUrl:g}),tn=r(u).createElement(Ty,{memori:e,tenant:S,gamificationLevel:Kt,language:fe,userLang:he,setUserLang:pe,baseUrl:g,position:Ge,openPositionDrawer:()=>Ae(!0),integrationConfig:me,instruct:ae,sessionId:nt,clickedStart:le,onClickStart:Jt,initializeTTS:()=>{if(!E)return;rJ=hn.fromSubscription(E,"eastus"),rJ.speechSynthesisLanguage=yt(he),rJ.speechSynthesisVoiceName=vt(he),rJ.speechRecognitionLanguage=yt(he),Dm()&&(rJ.speechSynthesisOutputFormat=Yt.Audio16Khz32KBitRateMonoMp3),aJ=new Ad;let e=aJ.createBuffer(1,1e4,22050),t=aJ.createBufferSource();t.buffer=e,t.connect(aJ.destination),iJ=new uo.SpeakerAudioDestination;let n=vo.fromSpeakerOutput(iJ);oJ=new Io.SpeechSynthesizer(rJ,n)}}),nn=nt?r(u).createElement(_y,{memori:e,sessionID:nt,tenant:S,translateTo:ge&&he.toUpperCase()!==(null===(G=null!==(H=null!==(U=null===(z=null===(F=e.culture)||void 0===F?void 0:F.split("-"))||void 0===z?void 0:z[0])&&void 0!==U?U:q.language)&&void 0!==H?H:"IT")||void 0===G?void 0:G.toUpperCase())?he:void 0,baseUrl:g,memoriTyping:ye,history:Qe,authToken:Xt,dialogState:ot,setDialogState:at,pushMessage:Ze,simulateUserPrompt:(e,t)=>{Rt(),et(e,void 0,void 0,!1,t)},showDates:d,showContextPerLine:f,client:J,selectReceiverTag:async t=>{var n;if(nt)try{const{currentState:r,...o}=await ee(nt,t);if(0===o.resultCode)if(Ze({text:t,fromUser:!0}),"X4"===r.state&&e.giverTag){const{currentState:t,...n}=await J.postTagChangedEvent(nt,e.giverTag);0===n.resultCode?(at(t),t.emission&&Ze({text:t.emission,media:t.media,fromUser:!1})):(console.error(n),Qd.error(V(gF(n.resultCode))))}else at(r),r.emission&&Ze({text:r.emission,media:r.media,fromUser:!1});else console.error(o,t,null===(n=null==ot?void 0:ot.knownTags)||void 0===n?void 0:n[t]),Qd.error(V(gF(o.resultCode)))}catch(e){let t=e;console.error(t),Qd.error(t.message)}},preview:s,sendOnEnter:Dt,setSendOnEnter:jt,attachmentsMenuOpen:Ft,setAttachmentsMenuOpen:zt,instruct:ae,showInputs:c,showMicrophone:!!E,userMessage:Ke,onChangeUserMessage:e=>{if(!e||"\n"===e||""===e.trim())return $e(""),void pt();$e(e),ht()},sendMessage:e=>{Rt(),et(e),$e(""),At()},stopListening:Pt,startListening:Ot,stopAudio:Mt,resetTranscript:At,listening:Je,isPlayingAudio:Le}):null,rn=o&&Ht?r(u).createElement("div",{className:"memori--global-background"},r(u).createElement("div",{className:"memori--global-background-image",style:{backgroundImage:Ht}})):null,on=o?r(u).createElement("style",{dangerouslySetInnerHTML:{__html:Wt}}):null,an=r(u).createElement(lj,{canInstruct:!!e.giverTag,instruct:ae,onChangeMode:e=>{se("instruct"===e),Se(!1),ce(!1)}});return r(u).createElement("div",{className:r(Xd)("memori","memori-widget",{"memori--preview":s,"memori--embed":l,"memori--with-integration":o,"memori--active":xe}),"data-memori-name":null==e?void 0:e.name,"data-memori-id":null==e?void 0:e.engineMemoriID,"data-memori-secondary-id":null==e?void 0:e.memoriID,"data-memori-session-id":nt,"data-memori-integration":null==o?void 0:o.integrationID,"data-memori-engine-state":JSON.stringify({...ot,sessionID:nt}),style:{height:p}},r(u).createElement(dF,{header:Zt,avatar:en,chat:nn,startPanel:tn,integrationStyle:on,integrationBackground:rn,changeMode:an,sessionId:nt,hasUserActivatedSpeak:xe,showInstruct:i,loading:ve}),r(u).createElement("audio",{id:"memori-audio",style:{display:"none"},src:"https://app.twincreator.com/intro.mp3"}),K&&r(u).createElement(Bm,{withModal:!0,pwdOrTokens:Ue,openModal:!!Ue,setPwdOrTokens:He,showTokens:"SECRET"===e.privacyType,onFinish:async t=>{t.password&&je(t.password),t.tokens&&ze(t.tokens),lt(!nt,t.password,t.tokens,ae?e.giverTag:void 0,ae?e.giverPIN:void 0,b,y).then((e=>{He(null),Jt(e||void 0)})).catch((()=>{He(null),de(!0)}))},minimumNumberOfRecoveryTokens:null!==(W=null==e?void 0:e.minimumNumberOfRecoveryTokens)&&void 0!==W?W:1}),nt&&r(u).createElement(tJ,{visible:"link"===Ft,onCancel:()=>zt(void 0),onOk:async e=>{if(!nt)return;let t={mediumID:"",mimeType:"text/html",url:e.url,title:e.title};Ze({text:V("media.insertThisLink",{url:t.url,title:t.title}),fromUser:!0,media:[t]});try{const{currentState:e,...n}=await J.postMediumSelectedEvent(nt,t);e&&0===n.resultCode?(at(e),e.emission&&(Ze({text:e.emission,media:e.media,fromUser:!1}),St(e.emission))):(console.error(n,e,t),Qd.error(V(gF(n.resultCode),{ns:"common"})))}catch(e){let t=e;console.error(t),Qd.error(t.message)}zt(void 0)}}),Xt&&nt&&(null==S?void 0:S.id)&&r(u).createElement(eJ,{visible:"media"===Ft,authToken:Xt,tenantID:null==S?void 0:S.id,sessionID:nt,uploadAssetURL:J.backend.getUploadAssetURL(Xt,e.memoriID),deleteAsset:J.backend.deleteAsset,onCancel:()=>zt(void 0),onOk:async e=>{if(!nt)return;let t={mediumID:"",mimeType:e.mimeType,url:e.assetURL,title:e.title||e.assetID};Ze({text:V("media.insertThisMediaMsg"),fromUser:!0,media:[t]});try{const{currentState:e,...n}=await J.postMediumSelectedEvent(nt,t);e&&0===n.resultCode?(at(e),e.emission&&(Ze({text:e.emission,media:e.media,fromUser:!1}),St(e.emission))):(console.error(n,e,t),Qd.error(V(gF(n.resultCode),{ns:"common"})))}catch(e){let t=e;console.error(t),Qd.error(t.message)}zt(void 0)}}))};function lJ(e){return lJ="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},lJ(e)}function cJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uJ(e,t){if("object"!==lJ(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==lJ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function dJ(e){var t=uJ(e,"string");return"symbol"===lJ(t)?t:String(t)}function fJ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dJ(r.key),r)}}function hJ(e,t,n){return t&&fJ(e.prototype,t),n&&fJ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function pJ(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mJ(e,t){return mJ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},mJ(e,t)}function gJ(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mJ(e,t)}function vJ(e,t){if(t&&("object"===lJ(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pJ(e)}function bJ(e){return bJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bJ(e)}function yJ(e,t,n){return(t=dJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wJ(e){if(Array.isArray(e))return e}function xJ(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function SJ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function MJ(e,t){if(e){if("string"==typeof e)return SJ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?SJ(e,t):void 0}}function _J(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function EJ(e){return wJ(e)||xJ(e)||MJ(e)||_J()}function AJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function CJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AJ(Object(n),!0).forEach((function(t){yJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AJ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kJ={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},TJ=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};cJ(this,e),this.init(t,n)}return hJ(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||kJ,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,CJ(CJ({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}(),IJ=new TJ,OJ=function(){function e(){cJ(this,e),this.observers={}}return hJ(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function RJ(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function PJ(e){return null==e?"":""+e}function NJ(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function LJ(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function BJ(e,t,n){var r=LJ(e,t,Object);r.obj[r.k]=n}function DJ(e,t){var n=LJ(e,t),r=n.obj,o=n.k;if(r)return r[o]}function jJ(e,t,n){var r=DJ(e,n);return void 0!==r?r:DJ(t,n)}function FJ(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):FJ(e[r],t[r],n):e[r]=t[r]);return e}function zJ(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var UJ={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function HJ(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return UJ[e]})):e}var GJ="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,WJ=[" ",",","?","!",";"];function VJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VJ(Object(n),!0).forEach((function(t){yJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VJ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function KJ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=bJ(e);if(t){var o=bJ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return vJ(this,n)}}function $J(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,i=0;i<r.length;++i){if(!o)return;if("string"==typeof o[r[i]]&&i+1<r.length)return;if(void 0===o[r[i]]){for(var a=2,s=r.slice(i,i+a).join(n),l=o[s];void 0===l&&r.length>i+a;)a++,l=o[s=r.slice(i,i+a).join(n)];if(void 0===l)return;if(null===l)return null;if(t.endsWith(s)){if("string"==typeof l)return l;if(s&&"string"==typeof l[s])return l[s]}var c=r.slice(i+a).join(n);return c?$J(l,c,n):void 0}o=o[r[i]]}return o}}var JJ=function(e){gJ(n,e);var t=KJ(n);function n(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return cJ(this,n),r=t.call(this),GJ&&OJ.call(pJ(r)),r.data=e||{},r.options=o,void 0===r.options.keySeparator&&(r.options.keySeparator="."),void 0===r.options.ignoreJSONStructure&&(r.options.ignoreJSONStructure=!0),r}return hJ(n,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."));var s=DJ(this.data,a);return s||!i||"string"!=typeof n?s:$J(this.data&&this.data[e]&&this.data[e][t],n,o)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),BJ(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=DJ(this.data,a)||{};r?FJ(s,n,o):s=qJ(qJ({},s),n),BJ(this.data,a,s),i.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?qJ(qJ({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),n}(OJ),XJ={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}};function QJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function YJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QJ(Object(n),!0).forEach((function(t){yJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QJ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ZJ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=bJ(e);if(t){var o=bJ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return vJ(this,n)}}var eX={},tX=function(e){gJ(n,e);var t=ZJ(n);function n(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return cJ(this,n),r=t.call(this),GJ&&OJ.call(pJ(r)),NJ(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,pJ(r)),r.options=o,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=IJ.create("translator"),r}return hJ(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var r=WJ.filter((function(e){return t.indexOf(e)<0&&n.indexOf(e)<0}));if(0===r.length)return!0;var o=new RegExp("(".concat(r.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}(e,n,r));if(i&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:o};var l=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(l[0])>-1)&&(o=l.shift()),e=l.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,r){var o=this;if("object"!==lJ(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),l=s.key,c=s.namespaces,u=c[c.length-1],d=t.lng||this.language,f=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(f){var h=t.nsSeparator||this.options.nsSeparator;return i?(p.res="".concat(u).concat(h).concat(l),p):"".concat(u).concat(h).concat(l)}return i?(p.res=l,p):l}var p=this.resolve(e,t),m=p&&p.res,g=p&&p.usedKey||l,v=p&&p.exactUsedKey||l,b=Object.prototype.toString.apply(m),y=["[object Number]","[object Function]","[object RegExp]"],w=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,S="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(x&&m&&S&&y.indexOf(b)<0&&("string"!=typeof w||"[object Array]"!==b)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var M=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,m,YJ(YJ({},t),{},{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return i?(p.res=M,p):M}if(a){var _="[object Array]"===b,E=_?[]:{},A=_?v:g;for(var C in m)if(Object.prototype.hasOwnProperty.call(m,C)){var k="".concat(A).concat(a).concat(C);E[C]=this.translate(k,YJ(YJ({},t),{joinArrays:!1,ns:c})),E[C]===k&&(E[C]=m[C])}m=E}}else if(x&&"string"==typeof w&&"[object Array]"===b)(m=m.join(w))&&(m=this.extendTranslation(m,e,t,r));else{var T=!1,I=!1,O=void 0!==t.count&&"string"!=typeof t.count,R=n.hasDefaultValue(t),P=O?this.pluralResolver.getSuffix(d,t.count,t):"",N=t["defaultValue".concat(P)]||t.defaultValue;!this.isValidLookup(m)&&R&&(T=!0,m=N),this.isValidLookup(m)||(I=!0,m=l);var L=t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,B=L&&I?void 0:m,D=R&&N!==m&&this.options.updateMissing;if(I||T||D){if(this.logger.log(D?"updateKey":"missingKey",d,u,l,D?N:m),a){var j=this.resolve(l,YJ(YJ({},t),{},{keySeparator:!1}));j&&j.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var F=[],z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&z&&z[0])for(var U=0;U<z.length;U++)F.push(z[U]);else"all"===this.options.saveMissingTo?F=this.languageUtils.toResolveHierarchy(t.lng||this.language):F.push(t.lng||this.language);var H=function(e,n,r){var i=R&&r!==m?r:B;o.options.missingKeyHandler?o.options.missingKeyHandler(e,u,n,i,D,t):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,u,n,i,D,t),o.emit("missingKey",e,u,n,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?F.forEach((function(e){o.pluralResolver.getSuffixes(e,t).forEach((function(n){H([e],l+n,t["defaultValue".concat(n)]||N)}))})):H(F,l,N))}m=this.extendTranslation(m,e,t,p,r),I&&m===l&&this.options.appendNamespaceToMissingKey&&(m="".concat(u,":").concat(l)),(I||T)&&this.options.parseMissingKeyHandler&&(m="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(l):l,T?m:void 0):this.options.parseMissingKeyHandler(m))}return i?(p.res=m,p):m}},{key:"extendTranslation",value:function(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,YJ(YJ({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(YJ(YJ({},n),{interpolation:YJ(YJ({},this.options.interpolation),n.interpolation)}));var a,s="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var l=e.match(this.interpolator.nestingRegexp);a=l&&l.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=YJ(YJ({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),s){var u=e.match(this.interpolator.nestingRegexp);a<(u&&u.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):i.translate.apply(i,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var d=n.postProcess||this.options.postProcess,f="string"==typeof d?[d]:d;return null!=e&&f&&f.length&&!1!==n.applyPostProcessor&&(e=XJ.handle(f,e,t,this.options&&this.options.postProcessPassResolved?YJ({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var l=a.extractFromKey(e,s),c=l.key;n=c;var u=l.namespaces;a.options.fallbackNS&&(u=u.concat(a.options.fallbackNS));var d=void 0!==s.count&&"string"!=typeof s.count,f=d&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),h=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,p=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);u.forEach((function(e){a.isValidLookup(t)||(i=e,!eX["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(eX["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,l=[c];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(l,c,n,e,s);else{var u;d&&(u=a.pluralResolver.getSuffix(n,s.count,s));var p="".concat(a.options.pluralSeparator,"zero");if(d&&(l.push(c+u),f&&l.push(c+p)),h){var m="".concat(c).concat(a.options.contextSeparator).concat(s.context);l.push(m),d&&(l.push(m+u),f&&l.push(m+p))}}for(;i=l.pop();)a.isValidLookup(t)||(r=i,t=a.getResource(n,e,i,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),n}(OJ);function nX(e){return e.charAt(0).toUpperCase()+e.slice(1)}var rX=function(){function e(t){cJ(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=IJ.create("languageUtils")}return hJ(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=nX(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=nX(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=nX(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),oX=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],iX={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},aX=["v1","v2","v3"],sX={zero:0,one:1,two:2,few:3,many:4,other:5};function lX(){var e={};return oX.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:iX[t.fc]}}))})),e}var cX=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};cJ(this,e),this.languageUtils=t,this.options=n,this.logger=IJ.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=lX()}return hJ(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(e,t){return sX[e]-sX[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):r.numbers.map((function(r){return t.getSuffix(e,r,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var i=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!aX.includes(this.options.compatibilityJSON)}}]),e}();function uX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uX(Object(n),!0).forEach((function(t){yJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uX(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var fX=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};cJ(this,e),this.logger=IJ.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return hJ(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:HJ,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?zJ(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?zJ(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?zJ(t.nestingPrefix):t.nestingPrefixEscaped||zJ("$t("),this.nestingSuffix=t.nestingSuffix?zJ(t.nestingSuffix):t.nestingSuffixEscaped||zJ(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(s.formatSeparator)<0){var o=jJ(t,l,e);return s.alwaysFormat?s.format(o,void 0,n,dX(dX(dX({},r),t),{},{interpolationkey:e})):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),c=i.join(s.formatSeparator).trim();return s.format(jJ(t,l,a),c,n,dX(dX(dX({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,f=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?c(s.escape(e)):c(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){var n=o[1].trim();if(void 0===(i=u(n)))if("function"==typeof d){var l=d(e,o,r);i="string"==typeof l?l:""}else if(r&&r.hasOwnProperty(n))i="";else{if(f){i=o[0];continue}s.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),i=""}else"string"==typeof i||s.useRawValueToEscape||(i=PJ(i));var c=t.safeValue(i);if(e=e.replace(o[0],c),f?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=dX({},i);function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0];var i=(o=this.interpolate(o,a)).match(/'/g),s=o.match(/"/g);(i&&i.length%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{a=JSON.parse(o),t&&(a=dX(dX({},t),a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var l=[],c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var u=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=u.shift(),l=u,c=!0}if((r=t(s.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=PJ(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=l.reduce((function(e,t){return o.format(e,t,i.lng,dX(dX({},i),{},{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function hX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hX(Object(n),!0).forEach((function(t){yJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hX(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mX(e){var t={};return function(n,r,o){var i=r+JSON.stringify(o),a=t[i];return a||(a=e(r,o),t[i]=a),a(n)}}var gX=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};cJ(this,e),this.logger=IJ.create("formatter"),this.options=t,this.formats={number:mX((function(e,t){var n=new Intl.NumberFormat(e,t);return function(e){return n.format(e)}})),currency:mX((function(e,t){var n=new Intl.NumberFormat(e,pX(pX({},t),{},{style:"currency"}));return function(e){return n.format(e)}})),datetime:mX((function(e,t){var n=new Intl.DateTimeFormat(e,pX({},t));return function(e){return n.format(e)}})),relativetime:mX((function(e,t){var n=new Intl.RelativeTimeFormat(e,pX({},t));return function(e){return n.format(e,t.range||"day")}})),list:mX((function(e,t){var n=new Intl.ListFormat(e,pX({},t));return function(e){return n.format(e)}}))},this.init(t)}return hJ(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=t.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=mX(t)}},{key:"format",value:function(e,t,n,r){var o=this,i=t.split(this.formatSeparator).reduce((function(e,t){var i=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((function(e){if(e){var t=EJ(e.split(":")),r=t[0],o=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=o),"false"===o&&(n[r.trim()]=!1),"true"===o&&(n[r.trim()]=!0),isNaN(o)||(n[r.trim()]=parseInt(o,10))}}))}return{formatName:t,formatOptions:n}}(t),a=i.formatName,s=i.formatOptions;if(o.formats[a]){var l=e;try{var c=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},u=c.locale||c.lng||r.locale||r.lng||n;l=o.formats[a](e,u,pX(pX(pX({},s),r),c))}catch(e){o.logger.warn(e)}return l}return o.logger.warn("there was no format function for ".concat(a)),e}),e);return i}}]),e}();function vX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vX(Object(n),!0).forEach((function(t){yJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vX(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yX(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=bJ(e);if(t){var o=bJ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return vJ(this,n)}}var wX=function(e){gJ(n,e);var t=yX(n);function n(e,r,o){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return cJ(this,n),i=t.call(this),GJ&&OJ.call(pJ(i)),i.backend=e,i.store=r,i.services=o,i.languageUtils=o.languageUtils,i.options=a,i.logger=IJ.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=a.maxParallelReads||10,i.readingCalls=0,i.maxRetries=a.maxRetries>=0?a.maxRetries:5,i.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(o,a.backend,a),i}return hJ(n,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i={},a={},s={},l={};return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?void 0===a[s]&&(a[s]=!0):(o.state[s]=1,r=!1,void 0===a[s]&&(a[s]=!0),void 0===i[s]&&(i[s]=!0),void 0===l[t]&&(l[t]=!0)))})),r||(s[e]=!0)})),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,s,l,c,u,d;r=n.loaded,s=i,c=LJ(r,[o],Object),u=c.obj,d=c.k,u[d]=u[d]||[],l&&(u[d]=u[d].concat(s)),l||u[d].push(s),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]={});var t=n.loaded[e];t.length&&t.forEach((function(t){void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:o,wait:i,callback:a}):(this.readingCalls++,this.backend[n](e,t,(function(s,l){if(r.readingCalls--,r.waitingReads.length>0){var c=r.waitingReads.shift();r.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}s&&l&&o<r.maxRetries?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,l)}))):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,bX(bX({},i),{},{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),n}(OJ);function xX(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===lJ(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===lJ(e[2])||"object"===lJ(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function SX(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function MX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MX(Object(n),!0).forEach((function(t){yJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MX(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function EX(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=bJ(e);if(t){var o=bJ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return vJ(this,n)}}function AX(){}function CX(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}))}var kX=function(e){gJ(n,e);var t=EX(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(cJ(this,n),e=t.call(this),GJ&&OJ.call(pJ(e)),e.options=SX(r),e.services={},e.logger=IJ,e.modules={external:[]},CX(pJ(e)),o&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,o),vJ(e,pJ(e));setTimeout((function(){e.init(r,o)}),0)}return e}return hJ(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r=xX();function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=_X(_X(_X({},r),this.options),SX(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=_X(_X({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var i;this.modules.logger?IJ.init(o(this.modules.logger),this.options):IJ.init(null,this.options),this.modules.formatter?i=this.modules.formatter:"undefined"!=typeof Intl&&(i=gX);var a=new rX(this.options);this.store=new JJ(this.options.resources,this.options);var s=this.services;s.logger=IJ,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new cX(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!i||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(s.formatter=o(i),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new fX(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new wX(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new tX(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,n||(n=AX),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var c=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];c.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var u=["addResource","addResources","addResourceBundle","removeResourceBundle"];u.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var d=RJ(),f=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),d.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?f():setTimeout(f,0),d}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:AX,r=n,o="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return r();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){i.indexOf(e)<0&&i.push(e)}))};if(o)a(o);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(i,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),r(e)}))}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=RJ();return e||(e=this.languages),t||(t=this.options.ns),n||(n=AX),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&XJ.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=RJ();this.emit("languageChanging",e);var o=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},i=function(i){e||i||!n.services.languageDetector||(i=[]);var a="string"==typeof i?i:n.services.languageUtils.getBestMatchFromCodes(i);a&&(n.language||o(a),n.translator.language||n.translator.changeLanguage(a),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(a)),n.loadResources(a,(function(e){!function(e,i){i?(o(i),n.translator.changeLanguage(i),n.isLanguageChangingTo=void 0,n.emit("languageChanged",i),n.logger.log("languageChanged",i)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,a)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,o=function e(t,o){var i;if("object"!==lJ(o)){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];i=r.options.overloadTranslationOptionHandler([t,o].concat(s))}else i=_X({},o);i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,i.keyPrefix=i.keyPrefix||n||e.keyPrefix;var c=r.options.keySeparator||".",u=i.keyPrefix?"".concat(i.keyPrefix).concat(c).concat(t):t;return r.t(u,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!a(r,e)||o&&!a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=RJ();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=RJ();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:AX,o=_X(_X(_X({},this.options),t),{isClone:!0}),i=new n(o);void 0===t.debug&&void 0===t.prefix||(i.logger=i.logger.clone(t));var a=["store","services","language"];return a.forEach((function(t){i[t]=e[t]})),i.services=_X({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new tX(i.services,i.options),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit.apply(i,[e].concat(n))})),i.init(o,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(OJ);yJ(kX,"createInstance",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new kX(e,t)}));var TX=kX.createInstance();TX.createInstance=kX.createInstance;TX.createInstance,TX.init,TX.loadResources,TX.reloadResources,TX.use,TX.changeLanguage,TX.getFixedT,TX.t,TX.exists,TX.setDefaultNamespace,TX.hasLoadedNamespace,TX.loadNamespaces,TX.loadLanguages;var IX,OX=TX;IX=JSON.parse('{"yes":"Si","no":"No","confirm":"Conferma","cancel":"Annulla","show":"Mostra","hide":"Nascondi","send":"Invia","close":"Chiudi","edit":"Modifica","delete":"Elimina","loading":"Caricamento","copy":"Copia","copyToClipboard":"Copia negli appunti","showOriginalText":"Mostra originale","showTranslatedText":"Mostra traduzione","memoriBlockedTitle":"Bloccato","memoriBlockedUntil":"Memori bloccato fino al {{date}}","memoriBlockedAnon":"Attualmente \\"{{name}}\\" non può rispondere, torna qui il {{date}}","memoriBlockedReasonExceedChats":"perchè ha superato la soglia mensile di chat ammesse.","memoriBlockedGiverHelper":"Puoi sempre gestirlo in qualità di amministratore, ma altri utenti non potranno interrogarlo.","auth":{"useRecoveryTokens":"Utilizza i token di recupero","tokens":"Token","addToken":"Aggiungi token","usePassword":"Utilizza la password","atLeast":"Almeno"},"widget":{"instruct":"Istruisci","test":"Prova","sound":"Audio","position":"Posizione","settings":"Impostazioni","share":"Condividi","sendOnKeypress":"Premi Invio per inviare","sendOnClick":"Clicca sul bottone di invio","goToIntegrationsToCustomizeAvatar":"Per personalizzare l\'avatar, vai a Condividimi e configura la pagina pubblica"},"write_and_speak":{"micButtonPopover":"Premi il pulsante per parlare","micButtonPopoverListening":"Premi il pulsante per smettere di parlare","pageInstructExplanation":"Per insegnarmi nuove cose clicca sul pulsante ISTRUISCIMI per cominciare","pageTryMeExplanation":"Per parlare con me clicca sul pulsante INIZIAMO per cominciare","instructButton":"ISTRUISCIMI","tryMeButton":"INIZIAMO","chatHistory":"Cronologia chat","exportChatHistory":"Esporta la cronologia chat","exportChatHistoryMessage":"Vuoi esportare la cronologia chat?","chatBotButtonText":"CLICCA QUI PER APRIRE LA CHAT","conversationStartedLabel":"Conversazione avvenuta il","settingsHeaderLabel":"Configura qui il memori se vuoi impostare una conversazione continua. Setta i secondi di silenzio prima dell\'invio.","continuousSpeechLabel":"Conversazione continua","secondsLabel":"Secondi","tryMeHeaderLabel":"PROVA","unknownPosition":"Posizione sconosciuta","fieldPlace":"Indica la posizione (es \'Milano\')","showMapLinkFor":"Visualizza sulla mappa la posizione","useMyPosition":"Usa la mia posizione","myPosition":"Posizione corrente","updatingPosition":"Aggiorno la posizione...","placeNotFound":"Luogo sconosciuto!","requirePosition":"Inserisci la posizione prima di iniziare","attachmentsLabel":"Arricchisci il tuo messaggio","iWantToTalkToIn":"Voglio parlare con {{name}} in"},"media":{"title":"Titolo","editAttributes":"Modifica attributi media","uploadMimeTypeNotAllowed":"Il tipo di file non è permesso","uploadSizeLimitMessage":"Il file caricato è troppo grande (max {{size}}MB)","uploadWrongResolutionMessage":"La risoluzione deve essere {{width}}x{{height}} pixel","memoriNameAlreadyUsed":"Hai già un Twin con questo nome","uploadHelperImages":"Caricare un file con estensione png, jpg, jpeg o gif e con dimensione massima di {{size}}MB","uploadHelper":"Caricare un file di dimensione massima di {{size}}MB","uploadError":"Errore nel caricamento","square":"quadrato","scaleRatio":"Proporzioni","addMediaLabel":"Aggiungi media","insertThisMediaMsg":"Inserisci questi media","mediaUploadMessage":"Clicca per caricare un nuovo media","addLinkLabel":"Aggiungi un link","linkKey":"URL","linkValue":"Titolo link","insertThisLink":"Inserisci un link a {{url}} con titolo {{title}}"},"gamification":{"level":"Livello","points":"punti","memoriReachedLevel":"è diventato più evoluto ed ha raggiunto il livello","levelGoToStatistics":"{{memori}} è al livello {{level}} con {{points}} punti. Clicca per andare alle statistiche.","congratulationsNewLevel":"Congratulazioni, hai raggiunto un nuovo livello!","congratulationsNewLevelDescription":"Il tuo Memori è diventato più evoluto con {{points}} punti, guarda le","statistics":"statistiche"},"success":"Operazione andata a buon fine","Error":"Errore","internal server error":"Ops, scusa... qualcosa è andato storto nel server","error":"Errore","error.loading":"Errore durante il caricamento dei contenuti.","error.notFound":"Ops, non abbiamo trovato ciò che cercavi.","error.generic":"Ops, qualcosa è andato storto.","error.serverNotResponding":"Stiamo facendo manutenzione o rilasciando aggiornamenti. Riprova più tardi.","error.unprocessableEntity":"Errore durante il salvataggio dei dati. Ricontrolla i dati inseriti.","error.goBackTo":"Prova a tornare alla","error.reloadPage":"Ricarica la pagina","error.tryAgain":"Riprova","error.unauthorized":"Non sei autorizzato a visualizzare questo contenuto.","errors":{"TENANT_NOT_FOUND":"Tenant non trovato","TENANT_REGISTRATION_DISABLED":"La registrazione su questa piattaforma è disabilitata","TENANT_MISSING_NAME":"Tenant: nome mancante","TENANT_MAX_USERS_REACHED":"Numero massimo di utenti raggiunto","TENANT_MAX_ADMINS_REACHED":"Numero massimo di utenti amministratori raggiunto","USER_NOT_CONFIRMED":"Utente ancora non confermato","USER_NOT_FOUND":"Utente non trovato","USER_OR_PASSWORD_INVALID":"Utente o password non validi","USER_MUST_CHANGE_PASSWORD":"Devi cambiare la password","USER_MUST_ENTER_VERIFICATION_CODE":"Devi inserire il codice di verifica","USER_MISSING_TENANT":"Utente: tenant mancante","USER_MISSING_NAME":"Utente: nome mancante","USER_MISSING_PASSWORD":"Utente: password mancante","USER_MISSING_EMAIL":"Utente: email mancante","USER_MISSING_VERIFICATION_CODE":"Utente: codice di verifica mancante","USER_NAME_ALREADY_USED":"Nome utente già in uso","USER_PASSWORD_NOT_CONFORMING_TO_POLICY":"La password non rispetta le regole di sicurezza","USER_EMAIL_ALREADY_USED":"Email già in uso","USER_EMAIL_INVALID":"Email non valida","USER_VERIFICATION_CODE_INVALID":"Codice di verifica non valido","USER_MISSING_NAME_OR_EMAIL":"Nome utente o email mancante","USER_NAME_INVALID":"Nome utente non valido","USER_HAS_ONE_OR_MORE_MEMORI":"L\'utente ha uno o più memori","USER_MISSING_NEW_PASSWORD":"Utente: nuova password mancante","USER_NOTHING_TO_DO":"Niente da fare","USER_CANT_CREATE_MEMORI":"Utente non abilitato a creare Memori","USER_MAX_MEMORI_REACHED":"Massimo numero di Memori raggiunto","USER_CANT_EDIT_INTEGRATIONS":"Utente non abilitato a gestire integrazioni","MEMORI_NOT_FOUND":"Memori non trovato","MEMORI_NOT_ACCESSIBLE":"Memori non accessibile","MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN":"Solo il proprietario può cambiare il tag e il pin","SESSION_NOT_FOUND":"Sessione non trovata","SESSION_IS_NOT_ADMINISTRATIVE":"Sessione non amministrativa","MEMORI_MISSING_CONFIGURATION":"Memori: configurazione mancante","MEMORI_CONFIGURATION_NOT_FOUND":"Memori: configurazione non trovata","MEMORI_INVALID_PRIVACY_TYPE":"Memori: tipo di privacy non valido","MEMORI_MISSING_PASSWORD":"Memori: password mancante","MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS":"Memori: numero totale di token di recupero non valido","MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS":"Memori: numero minimo di token di recupero non valido","MEMORI_INVALID_VOICE_TYPE":"Memori: tipo di voce non valido","MEMORI_MISSING_NAME":"Memori: nome mancante","MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS":"Memori: password o token di recupero mancanti","MEMORI_INVALID_ID":"Memori: ID non valido","MEMORI_NAME_ALREADY_USED":"Nome memori già in uso","MEMORI_INVALID_PIN":"Memori: PIN non valido","MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION":"Memori: cambio TAG e PIN richiedono operazioni separate","MEMORI_NO_PASSWORD_WHEN_PUBLIC":"Memori: password non richiesta su Memori pubblico","MEMORI_TRANSFER_MISSING_DESTINATION_USER":"Trasferimento: utente di destinazione mancante","MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID":"Trasferimento: ID utente di destinazione non valido","MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT":"Trasferimento: dati utente di destinazione non validi","MEMORI_TRANSFER_NOTHING_TO_DO":"Trasferimento: alcuna operazione da fare","MEMORI_CONFIGURATION_CANT_BE_CHANGED":"Memori: la configurazione non può essere modificata","MEMORI_MISSING_NEW_PASSWORD":"Memori: nuova password mancante","INTEGRATION_NOT_FOUND":"Integrazione non trovata","MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT":"Formato non valido data a partire da","MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT":"Formato non valido data fino a","INTEGRATION_INVALID_TYPE":"Tipo integrazione non valido","INTEGRATION_ALREADY_EXISTS":"Integrazione già esistente","INTEGRATION_MEMORI_IS_NOT_PUBLIC":"Memori non pubblici non possono essere integrati","INTEGRATION_MISSING_INVOCATION_TEXT":"Integrazione: testo di invocazione mancante","INTEGRATION_MISSING_DEVICE_EMAILS":"Integrazione: email del dispositivo mancante","INTEGRATION_MEMORI_IS_EMPTY":"Memori vuoti non possono essere integrati","INTEGRATION_MISSING_PRIVACY_POLICY":"Integrazione: privacy policy mancante","INTEGRATION_MISSING_CATEGORY":"Categoria integrazione mancante","INTEGRATION_MISSING_DESCRIPTION":"Descrizione integrazione mancante","INTEGRATION_INVALID_INVOCATION_TEXT":"Testo di invocazione non valido","INTEGRATION_GOOGLE_NO_MORE_AVAILABLE":"Google Home non più disponibile","UPLOAD_REQUIRES_MULTIPART_ENCODING":"L\'upload richiede l\'encoding multipart","UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY":"Upload: manca il content type boundary","UPLOAD_MAX_LENGTH_EXCEEDED":"Upload: dimensione massima superata","UPLOAD_FILE_IS_EMPTY":"Upload: file vuoto","UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE":"Upload: tipo di file o firma non validi","UPLOAD_MISSING_FILE_NAME":"Upload: nome file mancante","UPLOAD_INVALID_MEMORY_ID":"Upload: ID contenuto non valido","UPLOAD_MISSING_FILE_CONTENT":"Upload: contenuto file mancante","ASSET_NOT_FOUND":"Asset non trovato","ASSET_NOT_ACCESSIBLE":"Asset non accessibile","ASSET_MISSING_SESSION_ID":"Asset: ID sessione mancante","ASSET_INVALID_FILE_NAME":"Asset: nome file non valido","INVITATION_NOT_FOUND":"Invito non trovato","INVITATION_NOT_ACCESSIBLE":"Invito non accessibile","INVITATION_ALREADY_ACCEPTED":"Invito già accettato","INVITATION_ALREADY_REJECTED":"Invito già rifiutato","INVITATION_MISSING_DESTINATION_EMAIL":"Invito: email di destinazione mancante","INVITATION_DESTINATION_EMAIL_INVALID":"Invito: email di destinazione non valida","INVITATION_MISSING_TAG":"Invito: tag mancante","INVITATION_MISSING_PIN":"Invito: PIN mancante","INVITATION_INVALID_PIN":"Invito: PIN non valido","INVITATION_INVALID_TYPE":"Invito: tipo non valido","INVITATION_MISSING_DESTINATION_NAME":"Invito: nome destinatario mancante","INVITATION_TAG_PIN_CANT_BE_CHANGED":"Invito: tag e pin non possono essere cambiati","INVITATION_CANT_BE_CHANGED":"Invito: non può essere modificato","ACTIONLOG_INVALID_USER_ID":"ID utente non valido","ACTIONLOG_INVALID_DATE_FROM_FORMAT":"Data a partire da: formato non valido","ACTIONLOG_INVALID_DATE_TO_FORMAT":"Data fino a: formato non valido","ACTIONLOG_INVALID_MEMORI_ID":"ID Memori non valido","CONSUMPTIONLOG_INVALID_TYPE":"Tipo di log non valido","CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT":"Data a partire da: formato non valido","CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT":"Data fino a: formato non valido","CONSUMPTIONLOG_INVALID_USER_ID":"ID utente non valido","CONSUMPTIONLOG_INVALID_MEMORI_ID":"Memori ID non valido"}}');const RX={en:{translation:r(JSON.parse('{"yes":"Yes","no":"No","confirm":"Confirm","cancel":"Cancel","show":"Show","hide":"Hide","send":"Send","close":"Close","edit":"Edit","delete":"Delete","loading":"Loading","copy":"Copy","copyToClipboard":"Copy to clipboard","showOriginalText":"Show original","showTranslatedText":"Show translation","memoriBlockedTitle":"Blocked","memoriBlockedUntil":"Memori blocked until {{date}}","memoriBlockedAnon":"Currently \\"{{name}}\\" can\'t answer, come back here on {{date}}","memoriBlockedReasonExceedChats":"because it has exceeded the monthly threshold of allowed chats.","memoriBlockedGiverHelper":"You can still manage it as administrator, but other users will not be able to interact with it.","auth":{"useRecoveryTokens":"Use recovery tokens","tokens":"Tokens","addToken":"Add token","usePassword":"Use password","atLeast":"At least"},"widget":{"instruct":"Instruct","test":"Test","sound":"Sound","position":"Position","settings":"Settings","share":"Share","sendOnKeypress":"Hit Enter to send","sendOnClick":"Click on Submit","goToIntegrationsToCustomizeAvatar":"To customize the avatar, go to Share and customize the public page"},"write_and_speak":{"micButtonPopover":"Click the button to speak","micButtonPopoverListening":"Click the button to stop speak","pageInstructExplanation":"To teach me new things click on the INSTRUCT ME button to get started","pageTryMeExplanation":"To talk to me click on the START button to get started","instructButton":"INSTRUCT ME","tryMeButton":"START","chatHistory":"Chat history","exportChatHistory":"Export chat history","exportChatHistoryMessage":"Do you want to export chat history?","chatBotButtonText":"CLICK HERE TO OPEN CHATBOT","conversationStartedLabel":"Conversation started on","settingsHeaderLabel":"Setup here if you want to set the memori as continuous speech, and change the silence seconds if you want to customize them.","continuousSpeechLabel":"Continuous speech","secondsLabel":"Set seconds","tryMeHeaderLabel":"TRY","unknownPosition":"Unknown position","fieldPlace":"Write the place (eg \'Milano\')","showMapLinkFor":"Show the position on the map","useMyPosition":"Use my position","myPosition":"Your position","updatingPosition":"Updating position...","placeNotFound":"Place not found!","requirePosition":"Insert your position before start","attachmentsLabel":"Enrich your message","iWantToTalkToIn":"I want to talk to {{name}} in"},"media":{"title":"Title","editAttributes":"Edit media attributes","uploadMimeTypeNotAllowed":"The file type is not allowed","uploadSizeLimitMessage":"The uploaded size is too big (max {{size}}MB)","uploadWrongResolutionMessage":"The resolution must be {{width}}x{{height}} pixel","memoriNameAlreadyUsed":"You already have a Twin with this name","uploadHelperImages":"Upload a file with extension png, jpg, jpeg or gif, and having at maximum a size of {{size}}MB","uploadHelper":"Upload a file having at maximum a size of {{size}}MB","uploadError":"Upload failed","square":"square","scaleRatio":"Scale ratio","addMediaLabel":"Add a media","insertThisMediaMsg":"Insert these media","mediaUploadMessage":"Click to load a new media","addLinkLabel":"Add a link","linkKey":"URL","linkValue":"Link title","insertThisLink":"Insert a link to {{url}} with title {{title}}"},"gamification":{"level":"Level","points":"points","memoriReachedLevel":"became more evolved and reached level","levelGoToStatistics":"{{memori}} is at level {{level}} with {{points}} points. Click to go to statistics.","congratulationsNewLevel":"Congratulations, you have reached a new level!","congratulationsNewLevelDescription":"Your Memori became more evolved with {{points}} points, look at the","statistics":"statistics"},"success":"Success","Error":"Error","internal server error":"Oupsie, sorry... Something went wrong on the server","error":"Error","error.loading":"Error while loading content.","error.generic":"Oupsie, sorry... something went wrong.","error.serverNotResponding":"We are doing maintenance or releasing updates. Please try again later.","error.notFound":"Oupsie, we didn\'t find the page you were looking for.","error.goBackTo":"You can try to go back to the","error.reloadPage":"Reload the page","error.tryAgain":"Try again","error.unauthorized":"You are unauthorized to view this content.","error.unprocessableEntity":"Error while processing the request. Check the data you entered.","errors":{"TENANT_NOT_FOUND":"Tenant not found","TENANT_REGISTRATION_DISABLED":"Registration on this platform is disabled","TENANT_MISSING_NAME":"Tenant: name missing","TENANT_MAX_USERS_REACHED":"Maximum number of users reached","TENANT_MAX_ADMINS_REACHED":"Maximum number of admin users reached","USER_NOT_CONFIRMED":"User still not confirmed","USER_NOT_FOUND":"User not found","USER_OR_PASSWORD_INVALID":"Invalid user or password","USER_MUST_CHANGE_PASSWORD":"You must change your password","USER_MUST_ENTER_VERIFICATION_CODE":"You must enter the verification code","USER_MISSING_TENANT":"User: missing tenant","USER_MISSING_NAME":"User: name is missing","USER_MISSING_PASSWORD":"User: password missing","USER_MISSING_EMAIL":"User: Missing email","USER_MISSING_VERIFICATION_CODE":"User: Missing verification code","USER_NAME_ALREADY_USED":"User name already in use","USER_PASSWORD_NOT_CONFORMING_TO_POLICY":"The password does not meet the security rules","USER_EMAIL_ALREADY_USED":"Email already in use","USER_EMAIL_INVALID":"Invalid email","USER_VERIFICATION_CODE_INVALID":"Invalid verification code","USER_MISSING_NAME_OR_EMAIL":"Missing username or email","USER_NAME_INVALID":"Invalid user name","USER_HAS_ONE_OR_MORE_MEMORI":"The user has one or more memories","USER_MISSING_NEW_PASSWORD":"User: new password missing","USER_NOTHING_TO_DO":"Nothing to do","USER_CANT_CREATE_MEMORI":"User not allowed to create Memori","USER_MAX_MEMORI_REACHED":"Maximum number of Memori reached","USER_CANT_EDIT_INTEGRATIONS":"User not allowed to manage integrations","MEMORI_NOT_FOUND":"Memori not found","MEMORI_NOT_ACCESSIBLE":"Memori not accessible","MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN":"Only owner can change tag or pin","SESSION_NOT_FOUND":"Session not found","SESSION_IS_NOT_ADMINISTRATIVE":"Non-administrative session","MEMORI_MISSING_CONFIGURATION":"Memori: missing configuration","MEMORI_CONFIGURATION_NOT_FOUND":"Memories: configuration not found","MEMORI_INVALID_PRIVACY_TYPE":"Memories: invalid privacy type","MEMORI_MISSING_PASSWORD":"Memori: missing password","MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS":"Memories: total number of invalid recovery tokens","MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS":"Memories: minimum number of invalid recovery tokens","MEMORI_INVALID_VOICE_TYPE":"Memories: invalid voice type","MEMORI_MISSING_NAME":"Memories: missing name","MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS":"Memories: missing password or recovery token","MEMORI_INVALID_ID":"Memories: invalid ID","MEMORI_NAME_ALREADY_USED":"Memory name already in use","MEMORI_INVALID_PIN":"Memories: Invalid PIN","MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION":"Memories: TAG and PIN change require separate operations","MEMORI_NO_PASSWORD_WHEN_PUBLIC":"Memories: no password required when public","MEMORI_TRANSFER_MISSING_DESTINATION_USER":"Transfer: missing destination user","MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID":"Transfer: invalid destination user ID","MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT":"Transfer: invalid destination user data","MEMORI_TRANSFER_NOTHING_TO_DO":"Transfer: nothing to do","MEMORI_CONFIGURATION_CANT_BE_CHANGED":"Memories: configuration cannot be changed","MEMORI_MISSING_NEW_PASSWORD":"Memories: new password missing","INTEGRATION_NOT_FOUND":"Integration not found","MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT":"Invalid date from format","MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT":"Invalid date to format","INTEGRATION_INVALID_TYPE":"Invalid integration type","INTEGRATION_ALREADY_EXISTS":"Integration already exists","INTEGRATION_MEMORI_IS_NOT_PUBLIC":"Non-public memories cannot be integrated","INTEGRATION_MISSING_INVOCATION_TEXT":"Integration: missing invocation text","INTEGRATION_MISSING_DEVICE_EMAILS":"Integration: missing device email","INTEGRATION_MEMORI_IS_EMPTY":"Empty memories cannot be integrated","INTEGRATION_MISSING_PRIVACY_POLICY":"Integration: privacy policy missing","INTEGRATION_MISSING_CATEGORY":"Integration category missing","INTEGRATION_MISSING_DESCRIPTION":"Missing integration description","INTEGRATION_INVALID_INVOCATION_TEXT":"Invalid invocation text","INTEGRATION_GOOGLE_NO_MORE_AVAILABLE":"Google Home no more available","UPLOAD_REQUIRES_MULTIPART_ENCODING":"Upload requires multipart encoding","UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY":"Upload: missing content type boundary","UPLOAD_MAX_LENGTH_EXCEEDED":"Upload: maximum size exceeded","UPLOAD_FILE_IS_EMPTY":"Upload: empty file","UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE":"Upload: invalid file type or signature","UPLOAD_MISSING_FILE_NAME":"Upload: missing file name","UPLOAD_INVALID_MEMORY_ID":"Upload: Invalid content ID","UPLOAD_MISSING_FILE_CONTENT":"Upload: Missing file content","ASSET_NOT_FOUND":"Asset not found","ASSET_NOT_ACCESSIBLE":"Asset not accessible","ASSET_MISSING_SESSION_ID":"Asset: missing session ID","ASSET_INVALID_FILE_NAME":"Asset: invalid file name","INVITATION_NOT_FOUND":"Invitation not found","INVITATION_NOT_ACCESSIBLE":"Invitation not accessible","INVITATION_ALREADY_ACCEPTED":"Invitation already accepted","INVITATION_ALREADY_REJECTED":"Invitation already rejected","INVITATION_MISSING_DESTINATION_EMAIL":"Invitation: missing destination email","INVITATION_DESTINATION_EMAIL_INVALID":"Invitation: destination email invalid","INVITATION_MISSING_TAG":"Invitation: missing tag","INVITATION_MISSING_PIN":"Invitation: PIN missing","INVITATION_INVALID_PIN":"Invitation: invalid PIN","INVITATION_INVALID_TYPE":"Invitation: invalid type","INVITATION_MISSING_DESTINATION_NAME":"Invitation: destination name missing","INVITATION_TAG_PIN_CANT_BE_CHANGED":"Invitation: tag and pin can\'t be changed","INVITATION_CANT_BE_CHANGED":"Intation: can\'t be changed","ACTIONLOG_INVALID_USER_ID":"Invalid user ID","ACTIONLOG_INVALID_DATE_FROM_FORMAT":"Date from: invalid format","ACTIONLOG_INVALID_DATE_TO_FORMAT":"Date to: invalid format","ACTIONLOG_INVALID_MEMORI_ID":"Invalid Memori ID","CONSUMPTIONLOG_INVALID_TYPE":"Invalid log type","CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT":"Date from: invalid format","CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT":"Date to: invalid format","CONSUMPTIONLOG_INVALID_USER_ID":"Invalid user ID","CONSUMPTIONLOG_INVALID_MEMORI_ID":"Invalid Memori ID"}}'))},it:{translation:r(IX)}};OX.use(Gi).init({resources:RX,lng:"en",fallbackLng:"it",supportedLngs:["en","it"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1}});var PX=OX;const NX=({ownerUserName:e,ownerUserID:t,memoriName:n,memoriID:o,integrationID:i,tenantID:a,secretToken:s,sessionID:l,showShare:c=!0,showSettings:d=!1,showInstruct:f=!1,height:h="100%",baseURL:p,apiURL:m="https://backend.memori.ai",tag:g,pin:v,context:b,initialQuestion:y,uiLang:w,spokenLang:x,authToken:S,AZURE_COGNITIVE_SERVICES_TTS_KEY:M,onStateChange:_})=>{var E,A,C;const[k,T]=(0,u.useState)(),{t:I}=ea();if(!(o&&t||n&&e))throw new Error("Identifier pair required: please provide either memoriID and ownerUserID or memoriName and ownerUserName");const O=mi(m),R=(0,u.useCallback)((async()=>{if(o&&t){const{memori:e,...n}=await O.backend.getMemoriByUserAndId(a,t,o);0===n.resultCode&&e?T(e):console.error("[MEMORI]",n,e)}else if(n&&e){const{memori:t,...r}=await O.backend.getMemori(a,e,n);0===r.resultCode&&t?T(t):console.error("[MEMORI]",r,t)}}),[o,t,n,e,a]);return(0,u.useEffect)((()=>{R()}),[R,a]),(0,u.useEffect)((()=>{if(w)PX.changeLanguage(w.toLowerCase());else{const{lng:e,fallbackLng:t}=(()=>{const e=navigator.language;if(e){let t=e.split("-")[0];if(["en","it"].includes(t))return{lng:t,fallbackLng:"en"===t?"it":"en"}}return{lng:"en",fallbackLng:"it"}})();PX.changeLanguage(e).catch((()=>{PX.changeLanguage(t)}))}}),[w]),k?r(u).createElement(sJ,{height:h,baseUrl:p||(a.startsWith("https://")?a:`https://${a}`),apiUrl:m,memori:{...k,secretToken:s},memoriLang:null!=x?x:null===(A=null===(E=k.culture)||void 0===E?void 0:E.split("-"))||void 0===A?void 0:A[0],tenant:{id:a,theme:"twincreator",config:{name:a,showNewUser:!1,requirePosition:!!k.needsPosition}},secret:s,sessionID:l,showShare:c,showSettings:d,showInstruct:f,integration:null===(C=null==k?void 0:k.integrations)||void 0===C?void 0:C.find((e=>i?e.integrationID===i:!!e.publish&&"LANDING_EXPERIENCE"===e.type)),initialContextVars:b,initialQuestion:y,authToken:S,AZURE_COGNITIVE_SERVICES_TTS_KEY:M,onStateChange:_,...g&&v?{personification:{tag:g,pin:v}}:{}}):r(u).createElement("div",null,r(u).createElement("p",{style:{textAlign:"center",margin:"2rem auto"}},I("loading"),"..."))};NX.propTypes={memoriName:r(l).string,memoriID:r(l).string,ownerUserName:r(l).string,ownerUserID:r(l).string,integrationID:r(l).string,tenantID:r(l).string.isRequired,secretToken:r(l).string,sessionID:r(l).string,showShare:r(l).bool,showSettings:r(l).bool,showInstruct:r(l).bool,height:r(l).oneOfType([r(l).string,r(l).number]),baseURL:r(l).string,apiURL:r(l).string,tag:r(l).string,pin:r(l).string,context:r(l).objectOf(r(l).any),initialQuestion:r(l).string,uiLang:r(l).oneOf(["en","it"]),spokenLang:r(l).string,authToken:r(l).string,AZURE_COGNITIVE_SERVICES_TTS_KEY:r(l).string,onStateChange:r(l).func};var LX=NX;class BX extends HTMLElement{connectedCallback(){const e=document.createElement("div"),t=document.createElement("div");t.setAttribute("id","memori-root");const n=document.createElement("style");n.innerHTML="\n @import url('https://unpkg.com/@memori.ai/memori-webcomponent/dist/memori-webcomponent.css');\n ",e.appendChild(n),e.appendChild(t),this.appendChild(e);const o=Object.keys(LX.propTypes).reduce(((e,t)=>(this.hasAttribute(t)&&(e[t]=this.getAttribute(t)),e)),{}),i=this.getAttribute("tenantId"),a=this.getAttribute("context")?.split(",")?.reduce(((e,t)=>{const[n,r]=t.split(":").map((e=>e.trim()));return{...e,[n]:r}}),{});i?r(c).render((0,s.jsx)(LX,{...o,context:a,tenantID:i}),t):console.error("No tenantId attribute found")}}customElements.define("memori-client",BX)})();
115
+ ***************************************************************************** */var VK=function(e,t){return VK=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},VK(e,t)};function qK(e,t){function n(){this.constructor=e}VK(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var KK=function(){return KK=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},KK.apply(this,arguments)};Object.create;Object.create;var $K;u=a("85Hg2");function JK(e,t,n,r,o,i){void 0===i&&(i=0);var a=a$(e,t,i),s=a.width,l=a.height,c=Math.min(s,n),u=Math.min(l,r);return c>u*o?{width:u*o,height:u}:{width:c,height:c/o}}function XK(e,t,n,r,o){void 0===o&&(o=0);var i=a$(t.width,t.height,o),a=i.width,s=i.height;return{x:QK(e.x,a,n.width,r),y:QK(e.y,s,n.height,r)}}function QK(e,t,n,r){var o=t*r/2-n/2;return s$(e,-o,o)}function YK(e,t){return Math.sqrt(Math.pow(e.y-t.y,2)+Math.pow(e.x-t.x,2))}function ZK(e,t){return 180*Math.atan2(t.y-e.y,t.x-e.x)/Math.PI}function e$(e,t,n,r,o,i,a){void 0===i&&(i=0),void 0===a&&(a=!0);var s=a?t$:n$,l=a$(t.width,t.height,i),c=a$(t.naturalWidth,t.naturalHeight,i),u={x:s(100,((l.width-n.width/o)/2-e.x/o)/l.width*100),y:s(100,((l.height-n.height/o)/2-e.y/o)/l.height*100),width:s(100,n.width/l.width*100/o),height:s(100,n.height/l.height*100/o)},d=Math.round(s(c.width,u.width*c.width/100)),f=Math.round(s(c.height,u.height*c.height/100)),h=c.width>=c.height*r?{width:Math.round(f*r),height:f}:{width:d,height:Math.round(d/r)};return{croppedAreaPercentages:u,croppedAreaPixels:KK(KK({},h),{x:Math.round(s(c.width-h.width,u.x*c.width/100)),y:Math.round(s(c.height-h.height,u.y*c.height/100))})}}function t$(e,t){return Math.min(e,Math.max(0,t))}function n$(e,t){return t}function r$(e,t,n,r,o,i){var a=a$(t.width,t.height,n),s=s$(r.width/a.width*(100/e.width),o,i);return{crop:{x:s*a.width/2-r.width/2-a.width*s*(e.x/100),y:s*a.height/2-r.height/2-a.height*s*(e.y/100)},zoom:s}}function o$(e,t,n,r,o,i){void 0===n&&(n=0);var a=a$(t.naturalWidth,t.naturalHeight,n),s=s$(function(e,t,n){var r=function(e){return e.width>e.height?e.width/e.naturalWidth:e.height/e.naturalHeight}(t);return n.height>n.width?n.height/(e.height*r):n.width/(e.width*r)}(e,t,r),o,i),l=r.height>r.width?r.height/e.height:r.width/e.width;return{crop:{x:((a.width-e.width)/2-e.x)*l,y:((a.height-e.height)/2-e.y)*l},zoom:s}}function i$(e,t){return{x:(t.x+e.x)/2,y:(t.y+e.y)/2}}function a$(e,t,n){var r=n*Math.PI/180;return{width:Math.abs(Math.cos(r)*e)+Math.abs(Math.sin(r)*t),height:Math.abs(Math.sin(r)*e)+Math.abs(Math.cos(r)*t)}}function s$(e,t,n){return Math.min(Math.max(e,t),n)}function l$(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.filter((function(e){return"string"==typeof e&&e.length>0})).join(" ").trim()}$K=a("lmpx0");var c$=function(e){function t(){var n=null!==e&&e.apply(this,arguments)||this;return n.imageRef=r(u).createRef(),n.videoRef=r(u).createRef(),n.containerRef=null,n.styleRef=null,n.containerRect=null,n.mediaSize={width:0,height:0,naturalWidth:0,naturalHeight:0},n.dragStartPosition={x:0,y:0},n.dragStartCrop={x:0,y:0},n.gestureZoomStart=0,n.gestureRotationStart=0,n.isTouching=!1,n.lastPinchDistance=0,n.lastPinchRotation=0,n.rafDragTimeout=null,n.rafPinchTimeout=null,n.wheelTimer=null,n.currentDoc=document,n.currentWindow=window,n.state={cropSize:null,hasWheelJustStarted:!1},n.preventZoomSafari=function(e){return e.preventDefault()},n.cleanEvents=function(){n.currentDoc.removeEventListener("mousemove",n.onMouseMove),n.currentDoc.removeEventListener("mouseup",n.onDragStopped),n.currentDoc.removeEventListener("touchmove",n.onTouchMove),n.currentDoc.removeEventListener("touchend",n.onDragStopped),n.currentDoc.removeEventListener("gesturemove",n.onGestureMove),n.currentDoc.removeEventListener("gestureend",n.onGestureEnd)},n.clearScrollEvent=function(){n.containerRef&&n.containerRef.removeEventListener("wheel",n.onWheel),n.wheelTimer&&clearTimeout(n.wheelTimer)},n.onMediaLoad=function(){var e=n.computeSizes();e&&(n.emitCropData(),n.setInitialCrop(e)),n.props.onMediaLoaded&&n.props.onMediaLoaded(n.mediaSize)},n.setInitialCrop=function(e){if(n.props.initialCroppedAreaPercentages){var t=r$(n.props.initialCroppedAreaPercentages,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom),r=t.crop,o=t.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}else if(n.props.initialCroppedAreaPixels){var i=o$(n.props.initialCroppedAreaPixels,n.mediaSize,n.props.rotation,e,n.props.minZoom,n.props.maxZoom);r=i.crop,o=i.zoom;n.props.onCropChange(r),n.props.onZoomChange&&n.props.onZoomChange(o)}},n.computeSizes=function(){var e,t,r,o,i,a,s=n.imageRef.current||n.videoRef.current;if(s&&n.containerRef){n.containerRect=n.containerRef.getBoundingClientRect();var l=n.containerRect.width/n.containerRect.height,c=(null===(e=n.imageRef.current)||void 0===e?void 0:e.naturalWidth)||(null===(t=n.videoRef.current)||void 0===t?void 0:t.videoWidth)||0,u=(null===(r=n.imageRef.current)||void 0===r?void 0:r.naturalHeight)||(null===(o=n.videoRef.current)||void 0===o?void 0:o.videoHeight)||0,d=c/u,f=void 0;if(s.offsetWidth<c||s.offsetHeight<u)switch(n.props.objectFit){default:case"contain":f=l>d?{width:n.containerRect.height*d,height:n.containerRect.height}:{width:n.containerRect.width,height:n.containerRect.width/d};break;case"horizontal-cover":f={width:n.containerRect.width,height:n.containerRect.width/d};break;case"vertical-cover":f={width:n.containerRect.height*d,height:n.containerRect.height};break;case"auto-cover":f=c>u?{width:n.containerRect.width,height:n.containerRect.width/d}:{width:n.containerRect.height*d,height:n.containerRect.height}}else f={width:s.offsetWidth,height:s.offsetHeight};n.mediaSize=KK(KK({},f),{naturalWidth:c,naturalHeight:u}),n.props.setMediaSize&&n.props.setMediaSize(n.mediaSize);var h=n.props.cropSize?n.props.cropSize:JK(n.mediaSize.width,n.mediaSize.height,n.containerRect.width,n.containerRect.height,n.props.aspect,n.props.rotation);return(null===(i=n.state.cropSize)||void 0===i?void 0:i.height)===h.height&&(null===(a=n.state.cropSize)||void 0===a?void 0:a.width)===h.width||n.props.onCropSizeChange&&n.props.onCropSizeChange(h),n.setState({cropSize:h},n.recomputeCropPosition),n.props.setCropSize&&n.props.setCropSize(h),h}},n.onMouseDown=function(e){e.preventDefault(),n.currentDoc.addEventListener("mousemove",n.onMouseMove),n.currentDoc.addEventListener("mouseup",n.onDragStopped),n.onDragStart(t.getMousePoint(e))},n.onMouseMove=function(e){return n.onDrag(t.getMousePoint(e))},n.onTouchStart=function(e){n.isTouching=!0,n.props.onTouchRequest&&!n.props.onTouchRequest(e)||(n.currentDoc.addEventListener("touchmove",n.onTouchMove,{passive:!1}),n.currentDoc.addEventListener("touchend",n.onDragStopped),2===e.touches.length?n.onPinchStart(e):1===e.touches.length&&n.onDragStart(t.getTouchPoint(e.touches[0])))},n.onTouchMove=function(e){e.preventDefault(),2===e.touches.length?n.onPinchMove(e):1===e.touches.length&&n.onDrag(t.getTouchPoint(e.touches[0]))},n.onGestureStart=function(e){e.preventDefault(),n.currentDoc.addEventListener("gesturechange",n.onGestureMove),n.currentDoc.addEventListener("gestureend",n.onGestureEnd),n.gestureZoomStart=n.props.zoom,n.gestureRotationStart=n.props.rotation},n.onGestureMove=function(e){if(e.preventDefault(),!n.isTouching){var r=t.getMousePoint(e),o=n.gestureZoomStart-1+e.scale;if(n.setNewZoom(o,r,{shouldUpdatePosition:!0}),n.props.onRotationChange){var i=n.gestureRotationStart+e.rotation;n.props.onRotationChange(i)}}},n.onGestureEnd=function(e){n.cleanEvents()},n.onDragStart=function(e){var t,r,o=e.x,i=e.y;n.dragStartPosition={x:o,y:i},n.dragStartCrop=KK({},n.props.crop),null===(r=(t=n.props).onInteractionStart)||void 0===r||r.call(t)},n.onDrag=function(e){var t=e.x,r=e.y;n.rafDragTimeout&&n.currentWindow.cancelAnimationFrame(n.rafDragTimeout),n.rafDragTimeout=n.currentWindow.requestAnimationFrame((function(){if(n.state.cropSize&&void 0!==t&&void 0!==r){var e=t-n.dragStartPosition.x,o=r-n.dragStartPosition.y,i={x:n.dragStartCrop.x+e,y:n.dragStartCrop.y+o},a=n.props.restrictPosition?XK(i,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):i;n.props.onCropChange(a)}}))},n.onDragStopped=function(){var e,t;n.isTouching=!1,n.cleanEvents(),n.emitCropData(),null===(t=(e=n.props).onInteractionEnd)||void 0===t||t.call(e)},n.onWheel=function(e){if(!n.props.onWheelRequest||n.props.onWheelRequest(e)){e.preventDefault();var o=t.getMousePoint(e),i=r($K)(e).pixelY,a=n.props.zoom-i*n.props.zoomSpeed/200;n.setNewZoom(a,o,{shouldUpdatePosition:!0}),n.state.hasWheelJustStarted||n.setState({hasWheelJustStarted:!0},(function(){var e,t;return null===(t=(e=n.props).onInteractionStart)||void 0===t?void 0:t.call(e)})),n.wheelTimer&&clearTimeout(n.wheelTimer),n.wheelTimer=n.currentWindow.setTimeout((function(){return n.setState({hasWheelJustStarted:!1},(function(){var e,t;return null===(t=(e=n.props).onInteractionEnd)||void 0===t?void 0:t.call(e)}))}),250)}},n.getPointOnContainer=function(e){var t=e.x,r=e.y;if(!n.containerRect)throw new Error("The Cropper is not mounted");return{x:n.containerRect.width/2-(t-n.containerRect.left),y:n.containerRect.height/2-(r-n.containerRect.top)}},n.getPointOnMedia=function(e){var t=e.x,r=e.y,o=n.props,i=o.crop,a=o.zoom;return{x:(t+i.x)/a,y:(r+i.y)/a}},n.setNewZoom=function(e,t,r){var o=(void 0===r?{}:r).shouldUpdatePosition,i=void 0===o||o;if(n.state.cropSize&&n.props.onZoomChange){var a=s$(e,n.props.minZoom,n.props.maxZoom);if(i){var s=n.getPointOnContainer(t),l=n.getPointOnMedia(s),c={x:l.x*a-s.x,y:l.y*a-s.y},u=n.props.restrictPosition?XK(c,n.mediaSize,n.state.cropSize,a,n.props.rotation):c;n.props.onCropChange(u)}n.props.onZoomChange(a)}},n.getCropData=function(){return n.state.cropSize?e$(n.props.restrictPosition?XK(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop,n.mediaSize,n.state.cropSize,n.getAspect(),n.props.zoom,n.props.rotation,n.props.restrictPosition):null},n.emitCropData=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropComplete&&n.props.onCropComplete(t,r),n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.emitCropAreaChange=function(){var e=n.getCropData();if(e){var t=e.croppedAreaPercentages,r=e.croppedAreaPixels;n.props.onCropAreaChange&&n.props.onCropAreaChange(t,r)}},n.recomputeCropPosition=function(){if(n.state.cropSize){var e=n.props.restrictPosition?XK(n.props.crop,n.mediaSize,n.state.cropSize,n.props.zoom,n.props.rotation):n.props.crop;n.props.onCropChange(e),n.emitCropData()}},n}return qK(t,e),t.prototype.componentDidMount=function(){this.containerRef&&(this.containerRef.ownerDocument&&(this.currentDoc=this.containerRef.ownerDocument),this.currentDoc.defaultView&&(this.currentWindow=this.currentDoc.defaultView),this.currentWindow.addEventListener("resize",this.computeSizes),this.props.zoomWithScroll&&this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}),this.containerRef.addEventListener("gesturestart",this.onGestureStart)),this.props.disableAutomaticStylesInjection||(this.styleRef=this.currentDoc.createElement("style"),this.styleRef.setAttribute("type","text/css"),this.props.nonce&&this.styleRef.setAttribute("nonce",this.props.nonce),this.styleRef.innerHTML=".reactEasyCrop_Container {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n user-select: none;\n touch-action: none;\n cursor: move;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n.reactEasyCrop_Image,\n.reactEasyCrop_Video {\n will-change: transform; /* this improves performances and prevent painting issues on iOS Chrome */\n}\n\n.reactEasyCrop_Contain {\n max-width: 100%;\n max-height: 100%;\n margin: auto;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n}\n.reactEasyCrop_Cover_Horizontal {\n width: 100%;\n height: auto;\n}\n.reactEasyCrop_Cover_Vertical {\n width: auto;\n height: 100%;\n}\n\n.reactEasyCrop_CropArea {\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n border: 1px solid rgba(255, 255, 255, 0.5);\n box-sizing: border-box;\n box-shadow: 0 0 0 9999em;\n color: rgba(0, 0, 0, 0.5);\n overflow: hidden;\n}\n\n.reactEasyCrop_CropAreaRound {\n border-radius: 50%;\n}\n\n.reactEasyCrop_CropAreaGrid::before {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 0;\n bottom: 0;\n left: 33.33%;\n right: 33.33%;\n border-top: 0;\n border-bottom: 0;\n}\n\n.reactEasyCrop_CropAreaGrid::after {\n content: ' ';\n box-sizing: border-box;\n position: absolute;\n border: 1px solid rgba(255, 255, 255, 0.5);\n top: 33.33%;\n bottom: 33.33%;\n left: 0;\n right: 0;\n border-left: 0;\n border-right: 0;\n}\n",this.currentDoc.head.appendChild(this.styleRef)),this.imageRef.current&&this.imageRef.current.complete&&this.onMediaLoad(),this.props.setImageRef&&this.props.setImageRef(this.imageRef),this.props.setVideoRef&&this.props.setVideoRef(this.videoRef)},t.prototype.componentWillUnmount=function(){var e;this.currentWindow.removeEventListener("resize",this.computeSizes),this.containerRef&&this.containerRef.removeEventListener("gesturestart",this.preventZoomSafari),this.styleRef&&(null===(e=this.styleRef.parentNode)||void 0===e||e.removeChild(this.styleRef)),this.cleanEvents(),this.props.zoomWithScroll&&this.clearScrollEvent()},t.prototype.componentDidUpdate=function(e){var t,n,r,o,i,a,s,l,c;e.rotation!==this.props.rotation?(this.computeSizes(),this.recomputeCropPosition()):e.aspect!==this.props.aspect?this.computeSizes():e.zoom!==this.props.zoom?this.recomputeCropPosition():(null===(t=e.cropSize)||void 0===t?void 0:t.height)!==(null===(n=this.props.cropSize)||void 0===n?void 0:n.height)||(null===(r=e.cropSize)||void 0===r?void 0:r.width)!==(null===(o=this.props.cropSize)||void 0===o?void 0:o.width)?this.computeSizes():(null===(i=e.crop)||void 0===i?void 0:i.x)===(null===(a=this.props.crop)||void 0===a?void 0:a.x)&&(null===(s=e.crop)||void 0===s?void 0:s.y)===(null===(l=this.props.crop)||void 0===l?void 0:l.y)||this.emitCropAreaChange(),e.zoomWithScroll!==this.props.zoomWithScroll&&this.containerRef&&(this.props.zoomWithScroll?this.containerRef.addEventListener("wheel",this.onWheel,{passive:!1}):this.clearScrollEvent()),e.video!==this.props.video&&(null===(c=this.videoRef.current)||void 0===c||c.load())},t.prototype.getAspect=function(){var e=this.props,t=e.cropSize,n=e.aspect;return t?t.width/t.height:n},t.prototype.onPinchStart=function(e){var n=t.getTouchPoint(e.touches[0]),r=t.getTouchPoint(e.touches[1]);this.lastPinchDistance=YK(n,r),this.lastPinchRotation=ZK(n,r),this.onDragStart(i$(n,r))},t.prototype.onPinchMove=function(e){var n=this,r=t.getTouchPoint(e.touches[0]),o=t.getTouchPoint(e.touches[1]),i=i$(r,o);this.onDrag(i),this.rafPinchTimeout&&this.currentWindow.cancelAnimationFrame(this.rafPinchTimeout),this.rafPinchTimeout=this.currentWindow.requestAnimationFrame((function(){var e=YK(r,o),t=n.props.zoom*(e/n.lastPinchDistance);n.setNewZoom(t,i,{shouldUpdatePosition:!1}),n.lastPinchDistance=e;var a=ZK(r,o),s=n.props.rotation+(a-n.lastPinchRotation);n.props.onRotationChange&&n.props.onRotationChange(s),n.lastPinchRotation=a}))},t.prototype.render=function(){var e=this,t=this.props,n=t.image,o=t.video,i=t.mediaProps,a=t.transform,s=t.crop,l=s.x,c=s.y,d=t.rotation,f=t.zoom,h=t.cropShape,p=t.showGrid,m=t.style,g=m.containerStyle,v=m.cropAreaStyle,b=m.mediaStyle,y=t.classes,w=y.containerClassName,x=y.cropAreaClassName,S=y.mediaClassName,M=t.objectFit;return r(u).createElement("div",{onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,ref:function(t){return e.containerRef=t},"data-testid":"container",style:g,className:l$("reactEasyCrop_Container",w)},n?r(u).createElement("img",KK({alt:"",className:l$("reactEasyCrop_Image","contain"===M&&"reactEasyCrop_Contain","horizontal-cover"===M&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===M&&"reactEasyCrop_Cover_Vertical","auto-cover"===M&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),S)},i,{src:n,ref:this.imageRef,style:KK(KK({},b),{transform:a||"translate("+l+"px, "+c+"px) rotate("+d+"deg) scale("+f+")"}),onLoad:this.onMediaLoad})):o&&r(u).createElement("video",KK({autoPlay:!0,loop:!0,muted:!0,className:l$("reactEasyCrop_Video","contain"===M&&"reactEasyCrop_Contain","horizontal-cover"===M&&"reactEasyCrop_Cover_Horizontal","vertical-cover"===M&&"reactEasyCrop_Cover_Vertical","auto-cover"===M&&(this.mediaSize.naturalWidth>this.mediaSize.naturalHeight?"reactEasyCrop_Cover_Horizontal":"reactEasyCrop_Cover_Vertical"),S)},i,{ref:this.videoRef,onLoadedMetadata:this.onMediaLoad,style:KK(KK({},b),{transform:a||"translate("+l+"px, "+c+"px) rotate("+d+"deg) scale("+f+")"}),controls:!1}),(Array.isArray(o)?o:[{src:o}]).map((function(e){return r(u).createElement("source",KK({key:e.src},e))}))),this.state.cropSize&&r(u).createElement("div",{style:KK(KK({},v),{width:this.state.cropSize.width,height:this.state.cropSize.height}),"data-testid":"cropper",className:l$("reactEasyCrop_CropArea","round"===h&&"reactEasyCrop_CropAreaRound",p&&"reactEasyCrop_CropAreaGrid",x)}))},t.defaultProps={zoom:1,rotation:0,aspect:4/3,maxZoom:3,minZoom:1,cropShape:"rect",objectFit:"contain",showGrid:!0,style:{},classes:{},mediaProps:{},zoomSpeed:1,restrictPosition:!0,zoomWithScroll:!0},t.getMousePoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t.getTouchPoint=function(e){return{x:Number(e.clientX),y:Number(e.clientY)}},t}(r(u).Component),u$=c$,d$={};e(d$,"default",(()=>G$),(e=>G$=e));Xd=a("4IUwl");var f$,h$=a("3ju0v");rz=a("hCRLo"),sW=a("a0mDm"),az=a("jp3pO"),u=a("85Hg2"),Xd=a("4IUwl");f$=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<i.length;l++){var c=i[l];if(!s(c))return!1;var u=e[c],d=t[c];if(!1===(o=n?n.call(r,u,d,c):void 0)||void 0===o&&u!==d)return!1}return!0};aW=a("98I6H");var p$=a("3b0np"),m$=(u=a("85Hg2"),aW=a("98I6H"),sz=a("jfn1H"),h$=a("3ju0v"),p$=a("3b0np"),u=a("85Hg2"),Xd=a("4IUwl"),(u=a("85Hg2")).createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0}));function g$(e,t,n){return(e-t)/(n-t)}function v$(e,t,n,r){var o=g$(t,n,r),i={};switch(e){case"rtl":i.right="".concat(100*o,"%"),i.transform="translateX(50%)";break;case"btt":i.bottom="".concat(100*o,"%"),i.transform="translateY(50%)";break;case"ttb":i.top="".concat(100*o,"%"),i.transform="translateY(-50%)";break;default:i.left="".concat(100*o,"%"),i.transform="translateX(-50%)"}return i}function b$(e,t){return Array.isArray(e)?e[t]:e}var y$=["prefixCls","value","valueIndex","onStartMove","style","render","dragging","onOffsetChange"],w$=u.forwardRef((function(e,t){var n,o,i=e.prefixCls,a=e.value,s=e.valueIndex,l=e.onStartMove,c=e.style,d=e.render,f=e.dragging,h=e.onOffsetChange,p=(0,p$.default)(e,y$),m=u.useContext(m$),g=m.min,v=m.max,b=m.direction,y=m.disabled,w=m.range,x=m.tabIndex,S=m.ariaLabelForHandle,M=m.ariaLabelledByForHandle,_=m.ariaValueTextFormatterForHandle,E="".concat(i,"-handle"),A=function(e){y||l(e,s)},C=v$(b,a,g,v),k=u.createElement("div",(0,aW.default)({ref:t,className:r(Xd)(E,(n={},(0,h$.default)(n,"".concat(E,"-").concat(s+1),w),(0,h$.default)(n,"".concat(E,"-dragging"),f),n)),style:(0,sz.default)((0,sz.default)({},C),c),onMouseDown:A,onTouchStart:A,onKeyDown:function(e){if(!y){var t=null;switch(e.which||e.keyCode){case xW.LEFT:t="ltr"===b||"btt"===b?-1:1;break;case xW.RIGHT:t="ltr"===b||"btt"===b?1:-1;break;case xW.UP:t="ttb"!==b?1:-1;break;case xW.DOWN:t="ttb"!==b?-1:1;break;case xW.HOME:t="min";break;case xW.END:t="max";break;case xW.PAGE_UP:t=2;break;case xW.PAGE_DOWN:t=-2}null!==t&&(e.preventDefault(),h(t,s))}},tabIndex:y?null:b$(x,s),role:"slider","aria-valuemin":g,"aria-valuemax":v,"aria-valuenow":a,"aria-disabled":y,"aria-label":b$(S,s),"aria-labelledby":b$(M,s),"aria-valuetext":null===(o=b$(_,s))||void 0===o?void 0:o(a)},p));return d&&(k=d(k,{index:s,prefixCls:i,value:a,dragging:f})),k})),x$=w$,S$=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","draggingIndex"],M$=u.forwardRef((function(e,t){var n=e.prefixCls,r=e.style,o=e.onStartMove,i=e.onOffsetChange,a=e.values,s=e.handleRender,l=e.draggingIndex,c=(0,p$.default)(e,S$),d=u.useRef({});return u.useImperativeHandle(t,(function(){return{focus:function(e){var t;null===(t=d.current[e])||void 0===t||t.focus()}}})),u.createElement(u.Fragment,null,a.map((function(e,t){return u.createElement(x$,(0,aW.default)({ref:function(e){e?d.current[t]=e:delete d.current[t]},dragging:l===t,prefixCls:n,style:b$(r,t),key:t,value:e,valueIndex:t,onStartMove:o,onOffsetChange:i,render:s},c))})))}));rz=a("hCRLo"),sW=a("a0mDm"),u=a("85Hg2");function _$(e){var t="touches"in e?e.touches[0]:e;return{pageX:t.pageX,pageY:t.pageY}}function E$(e,t,n,r,o,i,a,s,l){var c=u.useState(null),d=(0,sW.default)(c,2),f=d[0],h=d[1],p=u.useState(-1),m=(0,sW.default)(p,2),g=m[0],v=m[1],b=u.useState(n),y=(0,sW.default)(b,2),w=y[0],x=y[1],S=u.useState(n),M=(0,sW.default)(S,2),_=M[0],E=M[1],A=u.useRef(null),C=u.useRef(null);u.useEffect((function(){-1===g&&x(n)}),[n,g]),u.useEffect((function(){return function(){document.removeEventListener("mousemove",A.current),document.removeEventListener("mouseup",C.current),document.removeEventListener("touchmove",A.current),document.removeEventListener("touchend",C.current)}}),[]);var k=function(e,t){w.some((function(t,n){return t!==e[n]}))&&(void 0!==t&&h(t),x(e),a(e))},T=function(e,t){if(-1===e){var n=_[0],a=_[_.length-1],s=r-n,c=o-a,u=t*(o-r);u=Math.max(u,s),u=Math.min(u,c);var d=i(n+u);u=d-n;var f=_.map((function(e){return e+u}));k(f)}else{var h=(o-r)*t,p=(0,rz.default)(w);p[e]=_[e];var m=l(p,h,e,"dist");k(m.values,m.value)}},I=u.useRef(T);I.current=T;var O=u.useMemo((function(){var e=(0,rz.default)(n).sort((function(e,t){return e-t})),t=(0,rz.default)(w).sort((function(e,t){return e-t}));return e.every((function(e,n){return e===t[n]}))?w:n}),[n,w]);return[g,f,O,function(r,o){r.stopPropagation();var i=n[o];v(o),h(i),E(n);var a=_$(r),l=a.pageX,c=a.pageY,u=function(n){n.preventDefault();var r,i=_$(n),a=i.pageX,s=i.pageY,u=a-l,d=s-c,f=e.current.getBoundingClientRect(),h=f.width,p=f.height;switch(t){case"btt":r=-d/p;break;case"ttb":r=d/p;break;case"rtl":r=-u/h;break;default:r=u/h}I.current(o,r)},d=function e(t){t.preventDefault(),document.removeEventListener("mouseup",e),document.removeEventListener("mousemove",u),document.removeEventListener("touchend",e),document.removeEventListener("touchmove",u),A.current=null,C.current=null,v(-1),s()};document.addEventListener("mouseup",d),document.addEventListener("mousemove",u),document.addEventListener("touchend",d),document.addEventListener("touchmove",u),A.current=u,C.current=d}]}u=a("85Hg2"),sz=a("jfn1H"),u=a("85Hg2"),Xd=a("4IUwl");function A$(e){var t=e.prefixCls,n=e.style,o=e.start,i=e.end,a=e.index,s=e.onStartMove,l=u.useContext(m$),c=l.direction,d=l.min,f=l.max,h=l.disabled,p=l.range,m="".concat(t,"-track"),g=g$(o,d,f),v=g$(i,d,f),b=function(e){!h&&s&&s(e,-1)},y={};switch(c){case"rtl":y.right="".concat(100*g,"%"),y.width="".concat(100*v-100*g,"%");break;case"btt":y.bottom="".concat(100*g,"%"),y.height="".concat(100*v-100*g,"%");break;case"ttb":y.top="".concat(100*g,"%"),y.height="".concat(100*v-100*g,"%");break;default:y.left="".concat(100*g,"%"),y.width="".concat(100*v-100*g,"%")}return u.createElement("div",{className:r(Xd)(m,p&&"".concat(m,"-").concat(a+1)),style:(0,sz.default)((0,sz.default)({},y),n),onMouseDown:b,onTouchStart:b})}function C$(e){var t=e.prefixCls,n=e.style,r=e.values,o=e.startPoint,i=e.onStartMove,a=u.useContext(m$),s=a.included,l=a.range,c=a.min,d=u.useMemo((function(){if(!l){if(0===r.length)return[];var e=null!=o?o:c,t=r[0];return[{start:Math.min(e,t),end:Math.max(e,t)}]}for(var n=[],i=0;i<r.length-1;i+=1)n.push({start:r[i],end:r[i+1]});return n}),[r,l,o,c]);return s?d.map((function(e,r){var o=e.start,a=e.end;return u.createElement(A$,{index:r,prefixCls:t,style:b$(n,r),start:o,end:a,key:r,onStartMove:i})})):null}u=a("85Hg2"),sz=a("jfn1H"),h$=a("3ju0v"),u=a("85Hg2"),Xd=a("4IUwl");function k$(e){var t=e.prefixCls,n=e.style,o=e.children,i=e.value,a=e.onClick,s=u.useContext(m$),l=s.min,c=s.max,d=s.direction,f=s.includedStart,h=s.includedEnd,p=s.included,m="".concat(t,"-text"),g=v$(d,i,l,c);return u.createElement("span",{className:r(Xd)(m,(0,h$.default)({},"".concat(m,"-active"),p&&f<=i&&i<=h)),style:(0,sz.default)((0,sz.default)({},g),n),onMouseDown:function(e){e.stopPropagation()},onClick:function(){a(i)}},o)}function T$(e){var t=e.prefixCls,n=e.marks,r=e.onClick,o="".concat(t,"-mark");return n.length?u.createElement("div",{className:o},n.map((function(e){var t=e.value,n=e.style,i=e.label;return u.createElement(k$,{key:t,prefixCls:o,style:n,value:t,onClick:r},i)}))):null}u=a("85Hg2"),h$=a("3ju0v"),sz=a("jfn1H"),u=a("85Hg2"),Xd=a("4IUwl");function I$(e){var t=e.prefixCls,n=e.value,o=e.style,i=e.activeStyle,a=u.useContext(m$),s=a.min,l=a.max,c=a.direction,d=a.included,f=a.includedStart,h=a.includedEnd,p="".concat(t,"-dot"),m=d&&f<=n&&n<=h,g=(0,sz.default)((0,sz.default)({},v$(c,n,s,l)),"function"==typeof o?o(n):o);return m&&(g=(0,sz.default)((0,sz.default)({},g),"function"==typeof i?i(n):i)),u.createElement("span",{className:r(Xd)(p,(0,h$.default)({},"".concat(p,"-active"),m)),style:g})}function O$(e){var t=e.prefixCls,n=e.marks,r=e.dots,o=e.style,i=e.activeStyle,a=u.useContext(m$),s=a.min,l=a.max,c=a.step,d=u.useMemo((function(){var e=new Set;if(n.forEach((function(t){e.add(t.value)})),r&&null!==c)for(var t=s;t<=l;)e.add(t),t+=c;return Array.from(e)}),[s,l,c,r,n]);return u.createElement("div",{className:"".concat(t,"-step")},d.map((function(e){return u.createElement(I$,{prefixCls:t,key:e,value:e,style:o,activeStyle:i})})))}rz=a("hCRLo"),u=a("85Hg2");function R$(e,t,n,r,o,i){var a=u.useCallback((function(n){var r=isFinite(n)?n:e;return r=Math.min(t,n),r=Math.max(e,r)}),[e,t]),s=u.useCallback((function(r){if(null!==n){var o=e+Math.round((a(r)-e)/n)*n,i=function(e){return(String(e).split(".")[1]||"").length},s=Math.max(i(n),i(t),i(e)),l=Number(o.toFixed(s));return e<=l&&l<=t?l:null}return null}),[n,e,t,a]),l=u.useCallback((function(o){var i=a(o),l=r.map((function(e){return e.value}));null!==n&&l.push(s(o)),l.push(e,t);var c=l[0],u=t-e;return l.forEach((function(e){var t=Math.abs(i-e);t<=u&&(c=e,u=t)})),c}),[e,t,r,n,a,s]),c=function o(i,a,l){var c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit";if("number"==typeof a){var u,d=i[l],f=d+a,h=[];r.forEach((function(e){h.push(e.value)})),h.push(e,t),h.push(s(d));var p=a>0?1:-1;"unit"===c?h.push(s(d+p*n)):h.push(s(f)),h=h.filter((function(e){return null!==e})).filter((function(e){return a<0?e<=d:e>=d})),"unit"===c&&(h=h.filter((function(e){return e!==d})));var m="unit"===c?d:f;u=h[0];var g=Math.abs(u-m);if(h.forEach((function(e){var t=Math.abs(e-m);t<g&&(u=e,g=t)})),void 0===u)return a<0?e:t;if("dist"===c)return u;if(Math.abs(a)>1){var v=(0,rz.default)(i);return v[l]=u,o(v,a-p,l,c)}return u}return"min"===a?e:"max"===a?t:void 0},d=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",o=e[n],i=c(e,t,n,r);return{value:i,changed:i!==o}},f=function(e){return null===i&&0===e||"number"==typeof i&&e<i};return[l,function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unit",a=e.map(l),s=a[n],u=c(a,t,n,r);if(a[n]=u,!1===o){var h=i||0;n>0&&a[n-1]!==s&&(a[n]=Math.max(a[n],a[n-1]+h)),n<a.length-1&&a[n+1]!==s&&(a[n]=Math.min(a[n],a[n+1]-h))}else if("number"==typeof i||null===i){for(var p=n+1;p<a.length;p+=1)for(var m=!0;f(a[p]-a[p-1])&&m;){var g=d(a,1,p);a[p]=g.value,m=g.changed}for(var v=n;v>0;v-=1)for(var b=!0;f(a[v]-a[v-1])&&b;){var y=d(a,-1,v-1);a[v-1]=y.value,b=y.changed}for(var w=a.length-1;w>0;w-=1)for(var x=!0;f(a[w]-a[w-1])&&x;){var S=d(a,-1,w-1);a[w-1]=S.value,x=S.changed}for(var M=0;M<a.length-1;M+=1)for(var _=!0;f(a[M+1]-a[M])&&_;){var E=d(a,1,M+1);a[M+1]=E.value,_=E.changed}}return{value:a[n],values:a}}]}a("irlKZ");var P$=u.forwardRef((function(e,t){var n,o=e.prefixCls,i=void 0===o?"rc-slider":o,a=e.className,s=e.style,l=e.disabled,c=void 0!==l&&l,d=e.autoFocus,f=e.onFocus,h=e.onBlur,p=e.min,m=void 0===p?0:p,g=e.max,v=void 0===g?100:g,b=e.step,y=void 0===b?1:b,w=e.value,x=e.defaultValue,S=e.range,M=e.count,_=e.onChange,E=e.onBeforeChange,A=e.onAfterChange,C=e.allowCross,k=void 0===C||C,T=e.pushable,I=void 0!==T&&T,O=e.draggableTrack,R=e.reverse,P=e.vertical,N=e.included,L=void 0===N||N,B=e.startPoint,D=e.trackStyle,j=e.handleStyle,F=e.railStyle,z=e.dotStyle,U=e.activeDotStyle,H=e.marks,G=e.dots,W=e.handleRender,V=e.tabIndex,q=void 0===V?0:V,K=e.ariaLabelForHandle,$=e.ariaLabelledByForHandle,J=e.ariaValueTextFormatterForHandle,X=u.useRef(),Q=u.useRef(),Y=u.useMemo((function(){return P?R?"ttb":"btt":R?"rtl":"ltr"}),[R,P]),Z=u.useMemo((function(){return isFinite(m)?m:0}),[m]),ee=u.useMemo((function(){return isFinite(v)?v:100}),[v]),te=u.useMemo((function(){return null!==y&&y<=0?1:y}),[y]),ne=u.useMemo((function(){return!0===I?te:I>=0&&I}),[I,te]),re=u.useMemo((function(){return Object.keys(H||{}).map((function(e){var t=H[e],n={value:Number(e)};return t&&"object"===(0,az.default)(t)&&!u.isValidElement(t)&&("label"in t||"style"in t)?(n.style=t.style,n.label=t.label):n.label=t,n})).filter((function(e){var t=e.label;return t||"number"==typeof t})).sort((function(e,t){return e.value-t.value}))}),[H]),oe=R$(Z,ee,te,re,k,ne),ie=(0,sW.default)(oe,2),ae=ie[0],se=ie[1],le=VV(x,{value:w}),ce=(0,sW.default)(le,2),ue=ce[0],de=ce[1],fe=u.useMemo((function(){var e=null==ue?[]:Array.isArray(ue)?ue:[ue],t=(0,sW.default)(e,1)[0],n=null===ue?[]:[void 0===t?Z:t];if(S){if(n=(0,rz.default)(e),M||void 0===ue){var r=M>=0?M+1:2;for(n=n.slice(0,r);n.length<r;){var o;n.push(null!==(o=n[n.length-1])&&void 0!==o?o:Z)}}n.sort((function(e,t){return e-t}))}return n.forEach((function(e,t){n[t]=ae(e)})),n}),[ue,S,Z,M,ae]),he=u.useRef(fe);he.current=fe;var pe=function(e){return S?e:e[0]},me=function(e){var t=(0,rz.default)(e).sort((function(e,t){return e-t}));_&&!r(f$)(t,he.current)&&_(pe(t)),de(t)},ge=function(e){if(!c){var t=0,n=ee-Z;fe.forEach((function(r,o){var i=Math.abs(e-r);i<=n&&(n=i,t=o)}));var r=(0,rz.default)(fe);r[t]=e,S&&!fe.length&&void 0===M&&r.push(e),null==E||E(pe(r)),me(r),null==A||A(pe(r))}},ve=u.useState(null),be=(0,sW.default)(ve,2),ye=be[0],we=be[1];u.useEffect((function(){if(null!==ye){var e=fe.indexOf(ye);e>=0&&X.current.focus(e)}we(null)}),[ye]);var xe=u.useMemo((function(){return(!O||null!==te)&&O}),[O,te]),Se=E$(Q,Y,fe,Z,ee,ae,me,(function(){null==A||A(pe(he.current))}),se),Me=(0,sW.default)(Se,4),_e=Me[0],Ee=Me[1],Ae=Me[2],Ce=Me[3],ke=function(e,t){Ce(e,t),null==E||E(pe(he.current))},Te=-1!==_e;u.useEffect((function(){if(!Te){var e=fe.lastIndexOf(Ee);X.current.focus(e)}}),[Te]);var Ie=u.useMemo((function(){return(0,rz.default)(Ae).sort((function(e,t){return e-t}))}),[Ae]),Oe=u.useMemo((function(){return S?[Ie[0],Ie[Ie.length-1]]:[Z,Ie[0]]}),[Ie,S,Z]),Re=(0,sW.default)(Oe,2),Pe=Re[0],Ne=Re[1];u.useImperativeHandle(t,(function(){return{focus:function(){X.current.focus(0)},blur:function(){var e=document.activeElement;Q.current.contains(e)&&(null==e||e.blur())}}})),u.useEffect((function(){d&&X.current.focus(0)}),[]);var Le=u.useMemo((function(){return{min:Z,max:ee,direction:Y,disabled:c,step:te,included:L,includedStart:Pe,includedEnd:Ne,range:S,tabIndex:q,ariaLabelForHandle:K,ariaLabelledByForHandle:$,ariaValueTextFormatterForHandle:J}}),[Z,ee,Y,c,te,L,Pe,Ne,S,q,K,$,J]);return u.createElement(m$.Provider,{value:Le},u.createElement("div",{ref:Q,className:r(Xd)(i,a,(n={},(0,h$.default)(n,"".concat(i,"-disabled"),c),(0,h$.default)(n,"".concat(i,"-vertical"),P),(0,h$.default)(n,"".concat(i,"-horizontal"),!P),(0,h$.default)(n,"".concat(i,"-with-marks"),re.length),n)),style:s,onMouseDown:function(e){e.preventDefault();var t,n=Q.current.getBoundingClientRect(),r=n.width,o=n.height,i=n.left,a=n.top,s=n.bottom,l=n.right,c=e.clientX,u=e.clientY;switch(Y){case"btt":t=(s-u)/o;break;case"ttb":t=(u-a)/o;break;case"rtl":t=(l-c)/r;break;default:t=(c-i)/r}ge(ae(Z+t*(ee-Z)))}},u.createElement("div",{className:"".concat(i,"-rail"),style:F}),u.createElement(C$,{prefixCls:i,style:D,values:Ie,startPoint:B,onStartMove:xe?ke:null}),u.createElement(O$,{prefixCls:i,marks:re,dots:G,style:z,activeStyle:U}),u.createElement(M$,{ref:X,prefixCls:i,style:j,values:Ae,draggingIndex:_e,onStartMove:ke,onOffsetChange:function(e,t){if(!c){var n=se(fe,e,t);null==E||E(pe(fe)),me(n.values),null==A||A(pe(n.values)),we(n.value)}},onFocus:f,onBlur:h,handleRender:W}),u.createElement(T$,{prefixCls:i,marks:re,onClick:ge})))})),N$=P$;u=a("85Hg2"),JH=a("ae6os"),WH=a("1w3TK"),u=a("85Hg2");var L$=(u=a("85Hg2")).forwardRef(((e,t)=>{const{open:n}=e,r=(0,u.useRef)(null),o=(0,u.useRef)(null);function i(){JH.default.cancel(o.current),o.current=null}return u.useEffect((()=>(n?o.current=(0,JH.default)((()=>{var e;null===(e=r.current)||void 0===e||e.forcePopupAlign(),o.current=null})):i(),i)),[n,e.title]),u.createElement(Eq.default,Object.assign({ref:(0,WH.composeRef)(r,t)},e))}));Bz=a("LDfY3");const B$=e=>{const{componentCls:t,controlSize:n,dotSize:r,marginFull:o,marginPart:i,colorFillContentHover:a}=e;return{[t]:Object.assign(Object.assign({},eU(e)),{position:"relative",height:n,margin:`${i}px ${o}px`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${o}px ${i}px`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.colorFillTertiary,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},[`${t}-track`]:{position:"absolute",backgroundColor:e.colorPrimaryBorder,borderRadius:e.borderRadiusXS,transition:`background-color ${e.motionDurationMid}`},"&:hover":{[`${t}-rail`]:{backgroundColor:e.colorFillSecondary},[`${t}-track`]:{backgroundColor:e.colorPrimaryBorderHover},[`${t}-dot`]:{borderColor:a},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.colorPrimary}},[`${t}-handle`]:{position:"absolute",width:e.handleSize,height:e.handleSize,outline:"none",[`${t}-dragging`]:{zIndex:1},"&::before":{content:'""',position:"absolute",insetInlineStart:-e.handleLineWidth,insetBlockStart:-e.handleLineWidth,width:e.handleSize+2*e.handleLineWidth,height:e.handleSize+2*e.handleLineWidth,backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:e.handleSize,height:e.handleSize,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${e.handleLineWidth}px ${e.colorPrimaryBorder}`,borderRadius:"50%",cursor:"pointer",transition:`\n inset-inline-start ${e.motionDurationMid},\n inset-block-start ${e.motionDurationMid},\n width ${e.motionDurationMid},\n height ${e.motionDurationMid},\n box-shadow ${e.motionDurationMid}\n `},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:-((e.handleSizeHover-e.handleSize)/2+e.handleLineWidthHover),insetBlockStart:-((e.handleSizeHover-e.handleSize)/2+e.handleLineWidthHover),width:e.handleSizeHover+2*e.handleLineWidthHover,height:e.handleSizeHover+2*e.handleLineWidthHover},"&::after":{boxShadow:`0 0 0 ${e.handleLineWidthHover}px ${e.colorPrimary}`,width:e.handleSizeHover,height:e.handleSizeHover,insetInlineStart:(e.handleSize-e.handleSizeHover)/2,insetBlockStart:(e.handleSize-e.handleSizeHover)/2}}},[`${t}-mark`]:{position:"absolute",fontSize:e.fontSize},[`${t}-mark-text`]:{position:"absolute",display:"inline-block",color:e.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:e.colorText}},[`${t}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${t}-dot`]:{position:"absolute",width:r,height:r,backgroundColor:e.colorBgElevated,border:`${e.handleLineWidth}px solid ${e.colorBorderSecondary}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,"&-active":{borderColor:e.colorPrimaryBorder}},"&&-disabled":{cursor:"not-allowed",[`${t}-rail`]:{backgroundColor:`${e.colorFillSecondary} !important`},[`${t}-track`]:{backgroundColor:`${e.colorTextDisabled} !important`},[`\n ${t}-dot\n `]:{backgroundColor:e.colorBgElevated,borderColor:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed"},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:e.handleSize,height:e.handleSize,boxShadow:`0 0 0 ${e.handleLineWidth}px ${new(0,Bz.TinyColor)(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString()}`,insetInlineStart:0,insetBlockStart:0},[`\n ${t}-mark-text,\n ${t}-dot\n `]:{cursor:"not-allowed !important"}}})}},D$=(e,t)=>{const{componentCls:n,railSize:r,handleSize:o,dotSize:i}=e,a=t?"width":"height",s=t?"height":"width",l=t?"insetBlockStart":"insetInlineStart",c=t?"top":"insetInlineStart";return{[t?"paddingBlock":"paddingInline"]:r,[s]:3*r,[`${n}-rail`]:{[a]:"100%",[s]:r},[`${n}-track`]:{[s]:r},[`${n}-handle`]:{[l]:(3*r-o)/2},[`${n}-mark`]:{insetInlineStart:0,top:0,[c]:o,[a]:"100%"},[`${n}-step`]:{insetInlineStart:0,top:0,[c]:r,[a]:"100%",[s]:r},[`${n}-dot`]:{position:"absolute",[l]:(r-i)/2}}},j$=e=>{const{componentCls:t,marginPartWithMark:n}=e;return{[`${t}-horizontal`]:Object.assign(Object.assign({},D$(e,!0)),{[`&${t}-with-marks`]:{marginBottom:n}})}},F$=e=>{const{componentCls:t}=e;return{[`${t}-vertical`]:Object.assign(Object.assign({},D$(e,!1)),{height:"100%"})}};var z$=pU("Slider",(e=>{const t=uU(e,{marginPart:(e.controlHeight-e.controlSize)/2,marginFull:e.controlSize/2,marginPartWithMark:e.controlHeightLG-e.controlSize});return[B$(t),j$(t),F$(t)]}),(e=>{const t=e.controlHeightLG/4;return{controlSize:t,railSize:4,handleSize:t,handleSizeHover:e.controlHeightSM/2,dotSize:8,handleLineWidth:e.lineWidth+1,handleLineWidthHover:e.lineWidth+3}})),U$=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const H$=e=>"number"==typeof e?e.toString():"";var G$=u.forwardRef(((e,t)=>{const{prefixCls:n,range:o,className:i,tooltipPrefixCls:a,tipFormatter:s,tooltipVisible:l,getTooltipPopupContainer:c,tooltipPlacement:d}=e,f=U$(e,["prefixCls","range","className","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement"]),{getPrefixCls:h,direction:p,getPopupContainer:m}=u.useContext(aU),[g,v]=u.useState({}),b=(e,t)=>{v((n=>Object.assign(Object.assign({},n),{[e]:t})))},y=(e,t)=>e||(t?"rtl"===p?"left":"right":"top"),w=h("slider",n),[x,S]=z$(w),M=r(Xd)(i,{[`${w}-rtl`]:"rtl"===p},S);"rtl"!==p||f.vertical||(f.reverse=!f.reverse);const[_,E]=u.useMemo((()=>o?"object"==typeof o?[!0,o.draggableTrack]:[!0,!1]:[!1]),[o]);return x(u.createElement(N$,Object.assign({},f,{step:f.step,range:_,draggableTrack:E,className:M,ref:t,prefixCls:w,handleRender:(t,n)=>{var r;const{index:o,dragging:i}=n,{tooltip:f={},vertical:p}=e,v=Object.assign({},f),{open:x,placement:S,getPopupContainer:M,prefixCls:_,formatter:E}=v;let A;A=E||null===E?E:s||null===s?s:H$;const C=!!A&&(g[o]||i),k=null!==(r=null!=x?x:l)&&void 0!==r?r:void 0===x&&C,T=Object.assign(Object.assign({},t.props),{onMouseEnter:()=>b(o,!0),onMouseLeave:()=>b(o,!1)}),I=h("tooltip",null!=_?_:a);return u.createElement(L$,{prefixCls:I,title:A?A(n.value):"",open:k,placement:y(null!=S?S:d,p),key:o,overlayClassName:`${w}-tooltip`,getPopupContainer:M||c||m},u.cloneElement(t,T))}})))}));const W$="img-crop",V$=.1,q$=(0,u.forwardRef)(((e,t)=>{const{cropperRef:n,image:r,aspect:o,shape:i,grid:a,zoom:l,rotate:c,minZoom:d,maxZoom:f,cropperProps:h}=e,[p,m]=(0,u.useState)({x:0,y:0}),[g,v]=(0,u.useState)({width:0,height:0}),[b,y]=(0,u.useState)(1),[w,x]=(0,u.useState)(0),S=(0,u.useRef)({width:0,height:0,x:0,y:0}),M=(0,u.useCallback)((e=>{const{width:t,height:n}=e,r=n*o;v(t>r?{width:r,height:n}:{width:t,height:t/o})}),[o]),_=(0,u.useCallback)(((e,t)=>{S.current=t}),[]);return(0,u.useImperativeHandle)(t,(()=>({rotateVal:w,setZoomVal:y,setRotateVal:x,cropPixelsRef:S}))),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u$,Object.assign({},h,{ref:n,image:r,crop:p,cropSize:g,onCropChange:m,aspect:o,cropShape:i,showGrid:a,zoomWithScroll:l,zoom:b,rotation:w,onZoomChange:y,onRotationChange:x,minZoom:d,maxZoom:f,onMediaLoaded:M,onCropComplete:_,classes:{containerClassName:`${W$}-container`,mediaClassName:`${W$}-media`}})),l&&(0,s.jsxs)("section",Object.assign({className:`${W$}-control ${W$}-control-zoom`},{children:[(0,s.jsx)("button",Object.assign({onClick:()=>y(b-V$),disabled:b-V$<d},{children:"-"})),(0,s.jsx)(d$.default,{min:d,max:f,step:V$,value:b,onChange:y}),(0,s.jsx)("button",Object.assign({onClick:()=>y(b+V$),disabled:b+V$>f},{children:"+"}))]})),c&&(0,s.jsxs)("section",Object.assign({className:`${W$}-control ${W$}-control-rotate`},{children:[(0,s.jsx)("button",Object.assign({onClick:()=>x(w-1),disabled:-180===w},{children:"↺"})),(0,s.jsx)(d$.default,{min:-180,max:180,step:1,value:w,onChange:x}),(0,s.jsx)("button",Object.assign({onClick:()=>x(w+1),disabled:180===w},{children:"↻"}))]}))]})}));var K$=(0,u.memo)(q$);!function(e){if(e&&"undefined"!=typeof window){var t=document.createElement("style");t.setAttribute("media","screen"),t.innerHTML=e,document.head.appendChild(t)}}(".img-crop-modal .img-crop-container {\n position: relative;\n width: 100%;\n height: 40vh;\n}\n.img-crop-modal .img-crop-control {\n display: flex;\n align-items: center;\n width: 60%;\n margin-left: auto;\n margin-right: auto;\n}\n.img-crop-modal .img-crop-control:first-of-type {\n margin-top: 16px;\n}\n.img-crop-modal .img-crop-control:last-of-type {\n margin-bottom: -8px;\n}\n.img-crop-modal .img-crop-control button {\n display: flex;\n justify-content: center;\n align-items: center;\n width: 34px;\n height: 34px;\n padding: 0;\n font-style: normal;\n background: transparent;\n border: 0;\n outline: 0;\n cursor: pointer;\n}\n.img-crop-modal .img-crop-control button[disabled] {\n cursor: default;\n}\n.img-crop-modal .img-crop-control button + div:only-of-type {\n flex: 1;\n margin: 0 8px;\n}\n.img-crop-modal .img-crop-control-zoom button {\n font-size: 18px;\n}\n.img-crop-modal .img-crop-control-rotate button {\n font-size: 16px;\n}\n.img-crop-modal .img-crop-control-rotate button:first-of-type {\n transform: rotate(-20deg);\n}\n.img-crop-modal .img-crop-control-rotate button:last-of-type {\n transform: rotate(20deg);\n}\n");const $$=-1===DK(qF,"4.23.0")?{visible:!0}:{open:!0},J$=(0,u.forwardRef)(((e,t)=>{const{aspect:n=1,shape:r="rect",grid:o=!1,quality:i=.4,fillColor:a="white",zoom:l=!0,rotate:c=!1,minZoom:d=1,maxZoom:f=3,modalTitle:h,modalWidth:p,modalOk:m,modalCancel:g,modalMaskTransitionName:v,modalTransitionName:b,modalClassName:y,onModalOk:w,onModalCancel:x,beforeCrop:S,onUploadFail:M,cropperProps:_,children:E}=e,A=(0,u.useRef)({});A.current.onModalOk=w,A.current.onModalCancel=x,A.current.beforeCrop=S,A.current.onUploadFail=M;const[C,k]=(0,u.useState)(""),T=(0,u.useRef)({}),I=(0,u.useRef)(),O=(0,u.useRef)((()=>{})),R=(0,u.useRef)((()=>{})),P=(0,u.useMemo)((()=>{const e=Array.isArray(E)?E[0]:E,t=e.props,{beforeUpload:n,accept:r}=t,o=WF(t,["beforeUpload","accept"]);return I.current=n,Object.assign(Object.assign({},e),{props:Object.assign(Object.assign({},o),{accept:r||"image/*",beforeUpload:(e,t)=>new Promise(((n,r)=>VF(void 0,void 0,void 0,(function*(){if(A.current.beforeCrop){if(!(yield A.current.beforeCrop(e,t)))return r()}T.current=e,O.current=e=>{var t,r;null===(r=(t=A.current).onModalOk)||void 0===r||r.call(t,e),n(e)},R.current=e=>{var t,n;null===(n=(t=A.current).onUploadFail)||void 0===n||n.call(t,e),r()};const o=new FileReader;o.addEventListener("load",(()=>{"string"==typeof o.result&&k(o.result)})),o.readAsDataURL(e)}))))})})}),[E]),N=(0,u.useRef)({}),L=(0,u.useMemo)((()=>{const e={width:p,okText:m,cancelText:g,maskTransitionName:v,transitionName:b};return Object.keys(e).forEach((t=>{const n=t;void 0===e[n]&&delete e[n]})),e}),[g,v,m,b,p]),B=()=>{k(""),N.current.setZoomVal(1),N.current.setRotateVal(0)},D=(0,u.useCallback)((()=>{var e,t;null===(t=(e=A.current).onModalCancel)||void 0===t||t.call(e),B()}),[]),j=(0,u.useCallback)((e=>VF(void 0,void 0,void 0,(function*(){var t;B();const n=document.createElement("canvas"),r=n.getContext("2d"),o=e.target,s=((null===(t=null==o?void 0:o.getRootNode)||void 0===t?void 0:t.call(o))||document).querySelector(`.${W$}-media`),{width:l,height:u,x:d,y:f}=N.current.cropPixelsRef.current;if(c&&0!==N.current.rotateVal){const{naturalWidth:e,naturalHeight:t}=s,o=N.current.rotateVal*(Math.PI/180),i=Math.abs(Math.sin(o)),c=Math.abs(Math.cos(o)),h=e*c+t*i,p=t*c+e*i;n.width=h,n.height=p,r.fillStyle=a,r.fillRect(0,0,h,p);const m=h/2,g=p/2;r.translate(m,g),r.rotate(o),r.translate(-m,-g);const v=(h-e)/2,b=(p-t)/2;r.drawImage(s,0,0,e,t,v,b,e,t);const y=r.getImageData(0,0,h,p);n.width=l,n.height=u,r.putImageData(y,-d,-f)}else n.width=l,n.height=u,r.fillStyle=a,r.fillRect(0,0,l,u),r.drawImage(s,d,f,l,u,0,0,l,u);const{type:h,name:p,uid:m}=T.current;n.toBlob((e=>VF(void 0,void 0,void 0,(function*(){const t=Object.assign(new File([e],p,{type:h}),{uid:m});if(!I.current)return O.current(t);const n=t,r=yield I.current(n,[n]);return!0===r?O.current(t):!1===r?R.current(new Error("beforeUpload return false")):(delete t[BK.LIST_IGNORE],r===BK.LIST_IGNORE?(Object.defineProperty(t,BK.LIST_IGNORE,{value:!0,configurable:!0}),R.current(new Error("beforeUpload return LIST_IGNORE"))):"object"==typeof r&&null!==r?O.current(r):void 0)}))),h,i)}))),[a,i,c]),F=e=>(0,s.jsxs)(s.Fragment,{children:[P,C&&(0,s.jsx)(FV,Object.assign({},$$,{wrapClassName:`${W$}-modal ${y||""}`,title:e,onOk:j,onCancel:D,maskClosable:!1,destroyOnClose:!0},L,{children:(0,s.jsx)(K$,{ref:N,cropperRef:t,image:C,aspect:n,shape:r,grid:o,zoom:l,rotate:c,minZoom:d,maxZoom:f,cropperProps:_})}))]});return h?F(h):(0,s.jsx)(ez,{children:(e,t)=>F("zh-cn"===t?"编辑图片":"Edit image")})}));u=a("85Hg2");var X$=({className:e,title:t})=>r(u).createElement("svg",{...t?{}:{"aria-hidden":"true"},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",focusable:"false",role:"img",className:e,"aria-label":t},r(u).createElement("path",{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}));const Q$=["image/jpeg","image/png","image/jpg","image/gif"],Y$=({originNode:e,file:t,tenantID:n,actions:o,resourceType:i})=>{var a,s,l,c;const{t:d}=ea();return r(u).createElement("div",{className:"memori--list-item-wrapper"+("uploading"===t.status?" listItemUploading":"")},r(u).createElement(fp,{spinning:"uploading"===t.status},"error"===t.status?r(u).createElement(Ey,{content:d("media.uploadError")},e.props.children):r(u).createElement(_b,{item:{mediumID:t.uid,mimeType:"uploading"===t.status?"image/png":(null===(a=t.name)||void 0===a?void 0:a.endsWith(".glb"))?"model/gltf-binary":t.type||"image/png",title:null!==(s=t.name)&&void 0!==s?s:"",url:"uploading"===t.status?"":(null===(c=null===(l=t.response)||void 0===l?void 0:l.asset)||void 0===c?void 0:c.assetURL)?t.response.asset.assetURL:Fm({type:i,resourceURI:t.thumbUrl,tenantID:n}),content:`${Fm({resourceURI:t.thumbUrl,type:i})}`},preview:!1})),("success"===t.status||"done"===t.status)&&r(u).createElement("div",{className:"list-item-actions"},r(u).createElement(Zd,{outlined:!0,shape:"circle",icon:r(u).createElement(aj,null),className:"action-button",title:d("edit")||"Edit",onClick:()=>null==o?void 0:o.download(t)}),r(u).createElement(Zd,{outlined:!0,shape:"circle",icon:r(u).createElement(X$,null),className:"action-button",title:d("delete")||"Delete",onClick:()=>null==o?void 0:o.remove(t)})))};var Z$=({uploadMultipleImages:e,maxNumberOfVisualizedUploads:t,uploadUrl:n,tenantID:o,fileList:i,maxFileSizeInMB:a=2,fileResolution:s,useImageCrop:l,uploadMessage:c,imageProportions:d=1,imageProportionsHelper:f,allowedMimeTypes:h,onRemove:p,onFileChanged:m,onUploadFinished:g,onFileNotValid:v,disabled:b,showHelper:y,additionalHelper:w,resourceType:x})=>{var S;const{t:M}=ea(),[_,E]=(0,u.useState)(null!=i?i:[]),[A,C]=(0,u.useState)(),k=r(u).createElement(r(EF),{className:"memori--upload",disabled:null!=b&&b,accept:(null===(S=null!=h?h:Q$)||void 0===S?void 0:S.join(","))+";capture=camera,camcorder",action:n,listType:"picture-card",showUploadList:{showPreviewIcon:!0,showRemoveIcon:!0,showDownloadIcon:!0,downloadIcon:r(u).createElement(aj,{title:M("edit")||"Edit"})},beforeUpload:e=>{if(!(null!=h?h:Q$).find((t=>t===e.type))&&e.type)return console.debug("File not allowed",e,null!=h?h:Q$),Qd.error(M("media.uploadMimeTypeNotAllowed")),v&&v(),Promise.reject(M("media.uploadMimeTypeNotAllowed"));if(!(e.size/1024/1024<(null!=a?a:2)))return Qd.error(M("media.uploadSizeLimitMessage",{size:a})),v&&v(),Promise.reject(M("media.uploadSizeLimitMessage",{size:a}));if(s&&s.length){const t=new FileReader;return t.readAsDataURL(e),new Promise(((n,r)=>{t.addEventListener("load",(t=>{var o,i,a,l=new Image;l.style.padding="0px",l.style.margin="0px",l.onload=()=>{l.width===s[0]&&l.height===s[1]?n(e):(Qd.error(M("media.uploadWrongResolutionMessage",{width:s[0],height:s[1]})),r(),v&&v())},l.src=null!==(a=null===(i=null===(o=t.target)||void 0===o?void 0:o.result)||void 0===i?void 0:i.toString())&&void 0!==a?a:""}))}))}return Promise.resolve(e)},supportServerRender:!0,fileList:_,multiple:e,maxCount:t||(e?100:1),onChange:e=>{E(e.fileList.map((e=>{var t;return{...e,status:null!==(t=e.status)&&void 0!==t?t:"error"}}))),"done"===e.file.status&&g&&g(e.file)},onRemove:p,onDownload:e=>{var t,n;let r=null===(t=e.response)||void 0===t?void 0:t.asset;if(r){let t=r.originalFileName&&e.name.includes(r.originalFileName)?r.originalFileName:e.name;C({...r,title:null!=t?t:r.title})}else C({assetID:e.uid,title:null!==(n=e.name)&&void 0!==n?n:e.fileName})},itemRender:(e,t,n,i)=>r(u).createElement(Y$,{resourceType:x,originNode:e,file:t,fileList:_||n,actions:i,tenantID:o})},c);return r(u).createElement("div",{"aria-live":"polite"},l?r(u).createElement(J$,{rotate:!0,aspect:d,fillColor:"transparent",modalCancel:M("cancel")||"Cancel",modalMaskTransitionName:"none",modalTransitionName:"none"},k):k,r(u).createElement(pp,{open:!!A,title:M("media.editAttributes"),onClose:()=>{C(void 0)},footer:r(u).createElement(r(u).Fragment,null),width:"100%"},r(u).createElement("label",{htmlFor:"media-title-input",className:"media-title-label"},M("media.title")),r(u).createElement("input",{id:"media-title-input",className:"media-title-input",type:"text",name:"title",defaultValue:(null==A?void 0:A.title)||"",onChange:e=>{C({...A,title:e.target.value})}}),r(u).createElement("div",{className:"memori-modal--footer"},r(u).createElement(Zd,{onClick:()=>{C(void 0)}},M("cancel")),r(u).createElement(Zd,{primary:!0,onClick:()=>{m&&(null==A?void 0:A.assetID)&&m(A.assetID,{...A}),E((e=>e.map((e=>{var t,n;return e.uid===(null==A?void 0:A.assetID)||(null===(n=null===(t=e.response)||void 0===t?void 0:t.asset)||void 0===n?void 0:n.assetID)===(null==A?void 0:A.assetID)?{...e,title:null==A?void 0:A.title,name:null==A?void 0:A.title}:e})))),C(void 0)}},M("confirm")))),y&&r(u).createElement("legend",{className:"helper"},r(u).createElement("p",null,M(h?"media.uploadHelper":"media.uploadHelperImages").replace("@size@",(null!=a?a:2).toString())),f&&l&&r(u).createElement("p",null,M("media.scaleRatio"),": ",f),w&&r(u).createElement("p",null,w)))};var eJ=({visible:e,authToken:t,sessionID:n,tenantID:o,uploadAssetURL:i,deleteAsset:a,onCancel:s,onOk:l})=>{const{t:c}=ea(),[d,f]=(0,u.useState)();return r(u).createElement(pp,{open:e,title:c("media.addMediaLabel"),className:"attachment-media-modal",closable:!0,width:"100%",widthMd:"100%",onClose:()=>{s&&s()},footer:r(u).createElement(r(u).Fragment,null,r(u).createElement(Zd,{onClick:s},c("cancel")),r(u).createElement(Zd,{primary:!0,onClick:()=>{d&&l(d),f(void 0)},disabled:!d},c("confirm")))},r(u).createElement(Z$,{tenantID:o,uploadMultipleImages:!1,maxNumberOfVisualizedUploads:1,maxFileSizeInMB:100,uploadUrl:i,useImageCrop:!1,allowedMimeTypes:Qm,fileList:d?[{uid:"-1",name:d.assetID,status:"done",thumbUrl:Fm({resourceURI:d.assetURL,tenantID:o,sessionID:n})}]:[],uploadMessage:c("media.mediaUploadMessage"),imageProportions:1,onUploadFinished:e=>{let t=e.response.asset,n=e.response;0===n.resultCode?f(t):(console.error(n,e),Qd.error(c(gF(n.resultCode))))},onFileChanged:(e,t)=>{f((e=>({...e||{},...t})))},onRemove:async e=>{const n=await a(t,e.thumbUrl);return 0===n.resultCode?f(void 0):(console.error(n,e),Qd.error(c(gF(n.resultCode)))),0===n.resultCode}}))};u=a("85Hg2");var tJ=({visible:e,onCancel:t,onOk:n})=>{var o,i,a;const{t:s}=ea(),[l,c]=(0,u.useState)({url:"",title:""}),d=e=>{if("Enter"===e.key){if(0===(null==l?void 0:l.url.length)||0===(null==l?void 0:l.title.length))return;let e=document.getElementById("save-link-button");e&&e.click()}};return r(u).createElement(pp,{open:e,title:s("media.addLinkLabel"),className:"attachment-link-modal",closable:!0,width:"100%",widthMd:"80%",onClose:()=>{t&&t()},footer:r(u).createElement(r(u).Fragment,null,r(u).createElement(Zd,{onClick:t},s("cancel")),r(u).createElement(Zd,{id:"save-link-button",primary:!0,onClick:()=>{0!==(null==l?void 0:l.url.length)&&0!==(null==l?void 0:l.title.length)&&(n(l),c({url:"",title:""}))},disabled:0===(null==l?void 0:l.url.length)||0===(null==l?void 0:l.title.length)},s("confirm")))},r(u).createElement("div",{className:"attachment-link-modal--row"},r(u).createElement("div",{className:"attachment-link-modal--column"},r(u).createElement("label",{htmlFor:"new-link-url",className:"attachment-link-modal--label"},s("media.linkKey"),":"),r(u).createElement("input",{type:"url",className:"attachment-link-modal--input ",onChange:e=>{let t=e.target.value.startsWith("http")||0===e.target.value.length?e.target.value:`https://${e.target.value}`;c((e=>{var n;return{title:null!==(n=null==e?void 0:e.title)&&void 0!==n?n:"",url:t}}))},placeholder:"https://memori.ai/...",value:null==l?void 0:l.url,name:"url",onKeyDown:d}),r(u).createElement("label",{htmlFor:"new-link-title",className:"attachment-link-modal--label"},s("media.linkValue"),":"),r(u).createElement("input",{type:"text",className:"attachment-link-modal--input ",onChange:e=>c((t=>{var n;return{url:null!==(n=null==t?void 0:t.url)&&void 0!==n?n:"",title:e.target.value}})),value:null==l?void 0:l.title,name:"title",onKeyDown:d})),r(u).createElement("div",{className:"attachment-link-modal--column"},r(u).createElement("div",{className:"attachment-link-modal--centered"},r(u).createElement(qm,{key:null!==(o=null==l?void 0:l.url)&&void 0!==o?o:"",item:{title:null!==(i=null==l?void 0:l.title)&&void 0!==i?i:"",url:null!==(a=null==l?void 0:l.url)&&void 0!==a?a:"",mediumID:"",mimeType:"text/html"},onLinkPreviewInfo:e=>{var t;(null===(t=null==l?void 0:l.title)||void 0===t?void 0:t.length)||c((t=>{var n;return{...t,title:null!==(n=null==e?void 0:e.title)&&void 0!==n?n:""}}))}})))))};window.getMemoriState=e=>{var t,n,r,o,i;let a=e?document.querySelector(`.memori-widget[data-memori-integration="${e}"]`)||(null===(n=null===(t=document.querySelector("memori-client"))||void 0===t?void 0:t.shadowRoot)||void 0===n?void 0:n.querySelector(".memori-widget[data-memori-integration]")):document.querySelector(".memori-widget")||(null===(o=null===(r=document.querySelector("memori-client"))||void 0===r?void 0:r.shadowRoot)||void 0===o?void 0:o.querySelector(".memori-widget"));if(!a)return null;let s=null===(i=a.dataset)||void 0===i?void 0:i.memoriEngineState;return s?JSON.parse(s):null},window.typeMessage=e=>{var t,n;let r=document.querySelector("fieldset#chat-fieldset textarea")||(null===(n=null===(t=document.querySelector("memori-client"))||void 0===t?void 0:t.shadowRoot)||void 0===n?void 0:n.querySelector("fieldset#chat-fieldset textarea"));r&&(!function(e,t){var n,r,o,i;const a=null===(r=null===(n=null==Object?void 0:Object.getOwnPropertyDescriptor)||void 0===n?void 0:n.call(Object,e,"value"))||void 0===r?void 0:r.set,s=Object.getPrototypeOf(e),l=null===(i=null===(o=null==Object?void 0:Object.getOwnPropertyDescriptor)||void 0===o?void 0:o.call(Object,s,"value"))||void 0===i?void 0:i.set;l&&a&&a!==l?l.call(e,t):a&&a.call(e,t)}(r,e),r.dispatchEvent(new Event("input",{bubbles:!0})),setTimeout((()=>{var e,t;let n=document.querySelector("button.memori-chat-inputs--send")||(null===(t=null===(e=document.querySelector("memori-client"))||void 0===e?void 0:e.shadowRoot)||void 0===t?void 0:t.querySelector("button.memori-chat-inputs--send"));n&&n.click()}),100))};let nJ,rJ,oJ,iJ,aJ;var sJ=({memori:e,memoriConfigs:t,memoriLang:n,integration:o,showInstruct:i=!1,showShare:a=!0,preview:s=!1,embed:l=!1,showInputs:c=!0,showDates:d=!1,showContextPerLine:f=!1,showSettings:h=!1,height:p="100vh",secret:m,baseUrl:g="https://app.twincreator.com",apiUrl:v="https://backend.memori.ai",initialContextVars:b,initialQuestion:y,ogImage:w,sessionID:x,tenant:S,personification:M,authToken:_,AZURE_COGNITIVE_SERVICES_TTS_KEY:E,onStateChange:A})=>{var C,k,T,I,O,R,P,N,L,B,D,j,F,z,U,H,G,W;const{t:V,i18n:q}=ea(),[K,$]=(0,u.useState)(!1);(0,u.useEffect)((()=>{$(!0)}),[]);const J=mi(v),{initSession:X,postTextEnteredEvent:Q,postPlaceChangedEvent:Y,postTimeoutEvent:Z,postTagChangedEvent:ee,getSession:te,getContentQualityIndexes:ne}=J,{uploadAsset:re,getUploadAssetURL:oe,deleteAsset:ie}=J.backend,[ae,se]=(0,u.useState)(!1),[le,ce]=(0,u.useState)(!1),[ue,de]=(0,u.useState)(!1),fe=null===(I=null===(T=null===(k=null===(C=null==t?void 0:t.find((t=>t.memoriConfigID===e.memoriConfigurationID)))||void 0===C?void 0:C.culture)||void 0===k?void 0:k.split("-"))||void 0===T?void 0:T[0])||void 0===I?void 0:I.toUpperCase(),[he,pe]=(0,u.useState)(null!==(L=null!==(N=null!==(P=null!=n?n:null===(R=null===(O=null==e?void 0:e.culture)||void 0===O?void 0:O.split("-"))||void 0===R?void 0:R[0])&&void 0!==P?P:fe)&&void 0!==N?N:q.language)&&void 0!==L?L:"IT"),me=(null==o?void 0:o.customData)?JSON.parse(o.customData):null,ge=!!(null==me?void 0:me.multilanguage),[ve,be]=(0,u.useState)(!1),[ye,we]=(0,u.useState)(!1),[xe,Se]=(0,u.useState)(!1),[Me,_e]=(0,u.useState)(!1),[Ee,Ae]=(0,u.useState)(!1),[Ce,ke]=(0,u.useState)(!1),[Te,Ie]=(0,u.useState)(!1),[Oe,Re]=(0,u.useState)(!0),[Pe,Ne]=(0,u.useState)(3),[Le,Be]=(0,u.useState)(!1);(0,u.useEffect)((()=>{Be(!!oJ)}),[oJ]),(0,u.useEffect)((()=>{Ie(hF("muteSpeaker",!1)),Re(hF("continuousSpeech",!0)),Ne(hF("continuousSpeechTimeout",3))}),[]);const[De,je]=(0,u.useState)(m),[Fe,ze]=(0,u.useState)(),[Ue,He]=(0,u.useState)(null),[Ge,Ve]=(0,u.useState)(),qe=async(e,t)=>{var n;const r=null!=t?t:nt;if(e&&r){const{currentState:t,...o}=await Y({sessionId:r,placeName:e.placeName,latitude:e.latitude,longitude:e.longitude,uncertaintyKm:null!==(n=e.uncertainty)&&void 0!==n?n:0});t&&0===o.resultCode&&at({...ot,...t})}},[Ke,$e]=(0,u.useState)(""),[Je,Xe]=(0,u.useState)(!1),[Qe,Ye]=(0,u.useState)([]),Ze=e=>{Ye((t=>[...t,{...e}]))},et=async(t,n,r,o=!0,i)=>{var a,s,l,c,u;if(!nt||!(null==t?void 0:t.length))return;Ze({text:t,translatedText:i,fromUser:!0,media:null!=n?n:[],initial:!!r}),we(!0);const d=null!==(c=null!==(l=null===(s=null===(a=e.culture)||void 0===a?void 0:a.split("-"))||void 0===s?void 0:s[0])&&void 0!==l?l:q.language)&&void 0!==c?c:"IT";let f=t;if(o&&!ae&&ge&&he.toUpperCase()!==d.toUpperCase()){f=(await Jm(t,d,he,g)).text}const{currentState:h,...p}=await Q({sessionId:null!=r?r:nt,text:f});if(0===p.resultCode&&h){const t=null!==(u=h.emission)&&void 0!==u?u:null==ot?void 0:ot.emission;if("X4"===h.state&&e.giverTag){const{currentState:t,...n}=await ee(nt,e.giverTag);0===n.resultCode?(at(t),t.emission&&(Ze({text:t.emission,media:t.media,fromUser:!1}),St(t.emission))):(console.error(p,n),Qd.error(V(gF(n.resultCode))))}else if("X2d"===h.state&&e.giverTag){const{currentState:t,...n}=await Q({sessionId:null!=r?r:nt,text:Math.random().toString().substring(2,8)});if(0===n.resultCode){const{currentState:t,...n}=await ee(nt,e.giverTag);0===n.resultCode?(at(t),t.emission&&(Ze({text:t.emission,media:t.media,fromUser:!1}),St(t.emission))):(console.error(p,n),Qd.error(V(gF(n.resultCode))))}else console.error(p,n),Qd.error(V(gF(n.resultCode)))}else he.toLowerCase()!==d.toLowerCase()&&t&&!ae&&ge?tt(h,he).then((e=>{e.emission&&St(e.emission)})):(at({...h,emission:t}),t&&(Ze({text:t,media:h.media,fromUser:!1}),St(t)))}else 404===p.resultCode&&(Ye((e=>[...e.slice(0,e.length-1)])),lt(!1,De||e.secretToken,Fe,ae&&e.giverTag?e.giverTag:void 0,ae&&e.giverPIN?e.giverPIN:void 0,b,y).then((e=>{console.info("session timeout"),(null==e?void 0:e.sessionID)&&setTimeout((()=>{et(t,n,null==e?void 0:e.sessionID)}),500)})));we(!1)},tt=async(t,n)=>{var r,o,i,a,s,l;const c=null!==(a=null!==(i=null===(o=null===(r=e.culture)||void 0===r?void 0:r.split("-"))||void 0===o?void 0:o[0])&&void 0!==i?i:q.language)&&void 0!==a?a:"IT",u=null!==(s=t.emission)&&void 0!==s?s:null==ot?void 0:ot.emission;let d={...t},f=null;if(u&&!ae&&c.toUpperCase()!==n.toUpperCase()&&ge){const e=await Jm(u,n,c,g);if(t.hints&&t.hints.length>0){const r=await Promise.all((null!==(l=t.hints)&&void 0!==l?l:[]).map((async e=>{var t;const r=await Jm(e,n,c,g);return{text:null!==(t=null==r?void 0:r.text)&&void 0!==t?t:e,originalText:e}})));d={...t,emission:e.text,translatedHints:r}}else d={...t,emission:e.text};e.text.length>0&&(f={text:e.text,media:t.media,fromUser:!1})}else d={...t,emission:u},u&&(f={text:u,media:t.media,fromUser:!1});return at(d),f&&Ze(f),d},[nt,rt]=(0,u.useState)(x),[ot,it]=(0,u.useState)(),at=e=>{it(e),A&&A(e)},st=async t=>{var n;if("PUBLIC"===e.privacyType||e.secretToken||De||Fe){be(!0);try{if(!e.giverTag&&(null===(n=e.receivedInvitations)||void 0===n?void 0:n.length)){let t=e.receivedInvitations.find((e=>"GIVER"===e.type&&"ACCEPTED"===e.state));t&&(e.giverTag=t.tag,e.giverPIN=t.pin)}const r=await X(t);if((null==r?void 0:r.sessionID)&&(null==r?void 0:r.currentState)&&0===r.resultCode)return rt(r.sessionID),Ge&&qe(Ge,r.sessionID),be(!1),{dialogState:r.currentState,sessionID:r.sessionID};console.error(r),Qd.error(V(gF(null==r?void 0:r.resultCode))),de(!0)}catch(e){console.error(e),new Error("Error fetching session")}}else He("password")},lt=async(t=!1,n,r,o,i,a,s)=>{var l;be(!0);try{const{sessionID:c,currentState:u,...d}=await X({memoriID:null!==(l=e.engineMemoriID)&&void 0!==l?l:"",password:n,recoveryTokens:r,tag:o,pin:i,initialContextVars:a,initialQuestion:s});if(c&&u&&0===d.resultCode)return rt(c),t&&(at(u),u.emission&&(Qe.length<=1?Ye([{text:u.emission,media:u.media,fromUser:!1}]):Ze({text:u.emission,media:u.media,fromUser:!1}))),Ge&&qe(Ge,c),be(!1),{dialogState:u,sessionID:c};console.error(d),Qd.error(V(gF(d.resultCode))),de(!0)}catch(e){console.error(e)}return be(!1),null},ct=async(t,n,r,o)=>{var i;if(!t||!n)return console.error("CHANGETAG/Session not found"),Promise.reject("Session not found");try{const{currentState:t,resultCode:a}=await ee(n,null!=r?r:Ym);if(0===a){let s=0;if(r!==Ym&&o&&("X1a"===t.state||"X1b"===t.state)){const{resultCode:e}=await Q({sessionId:n,text:null!=o?o:""});s=e}if(0===s){const{currentState:e,...t}=await te(n);if(0===t.resultCode&&e)return{currentState:e,sessionId:n,...t}}else if([400,401,403,404,500].includes(a))console.warn("[APPCONTEXT/CHANGETAG]",a),st({memoriID:null!==(i=e.engineMemoriID)&&void 0!==i?i:"",password:m||e.secretToken,tag:e.giverTag,pin:e.giverPIN,initialContextVars:b,initialQuestion:y});else if(t)return{currentState:t,sessionId:n,resultCode:a}}}catch(e){let t=e;return console.error("[APPCONTEXT/CHANGETAG]",t),Promise.reject(t)}return null};(0,u.useEffect)((()=>()=>{ot&&(null==ot?void 0:ot.currentTag)===e.giverTag||(async()=>{nt&&e.giverTag&&e.giverPIN&&(Ye([]),await ct(e.engineMemoriID,nt,e.giverTag,e.giverPIN))})()}),[]);const[ut,dt]=(0,u.useState)(),ft=(0,u.useRef)(),ht=()=>{ut&&(clearTimeout(ut),dt(void 0)),(null==ft?void 0:ft.current)&&(clearTimeout(ft.current),ft.current=void 0)},pt=()=>{ht(),!(null==ot?void 0:ot.acceptsTimeout)||oJ||Le||Ke.length||Je||gt()},mt=async()=>{if(oJ||Le||Ke.length||Je)pt();else if(nt&&xe&&(null==ot?void 0:ot.acceptsTimeout)){const{currentState:e,...t}=await Z(nt);if(0===t.resultCode&&e){const t=e.emission;!ae&&ge&&he!==(null==q?void 0:q.language)&&t&&t.length>0?tt({...e,emission:t},he).then((e=>{e.emission&&St(e.emission)})):t&&t.length>0&&(Ze({text:t,media:e.media,fromUser:!1}),St(t),at(e))}}},gt=()=>{let e=null==ot?void 0:ot.timeout;if(!e){let t=40,n=25;if(e=Math.floor(Math.random()*(t-n))+n,null==ot?void 0:ot.emission){e+=ot.emission.length/26.5}}let t=setTimeout(mt,1e3*e);dt(t),ft.current=t};(0,u.useEffect)((()=>{(Ke.length||Le)&&ht(),nt&&!Ke.length&&pt()}),[null==ot?void 0:ot.acceptsTimeout,null==ot?void 0:ot.timeout,null==ot?void 0:ot.state,Le,nt,Qe,Ke]),(0,u.useEffect)((()=>()=>{Se(!1),ce(!1),ht(),ft.current=void 0}),[]);const vt=(0,u.useCallback)((t=>{var n,r,o,i;let a="";switch((null!==(i=null!==(o=null!=t?t:null===(r=null===(n=e.culture)||void 0===n?void 0:n.split("-"))||void 0===r?void 0:r[0])&&void 0!==o?o:q.language)&&void 0!==i?i:"IT").toUpperCase()){case"IT":a=""+("MALE"===e.voiceType?"it-IT-DiegoNeural":"it-IT-ElsaNeural");break;case"DE":a=""+("MALE"===e.voiceType?"de-DE-ConradNeural":"de-DE-KatjaNeural");break;case"EN":a=""+("MALE"===e.voiceType?"en-GB-RyanNeural":"en-GB-SoniaNeural");break;case"ES":a=""+("MALE"===e.voiceType?"es-ES-AlvaroNeural":"es-ES-ElviraNeural");break;case"FR":a=""+("MALE"===e.voiceType?"fr-FR-HenriNeural":"fr-FR-DeniseNeural");break;case"PT":a=""+("MALE"===e.voiceType?"pt-PT-DuarteNeural":"pt-PT-RaquelNeural");break;case"UK":a=""+("MALE"===e.voiceType?"uk-UA-OstapNeural":"uk-UA-PolinaNeural");break;case"RU":a=""+("MALE"===e.voiceType?"ru-RU-DmitryNeural":"ru-RU-SvetlanaNeural");break;default:a=""+("MALE"===e.voiceType?"it-IT-DiegoNeural":"it-IT-IsabellaNeural")}return a}),[e.voiceType,q.language,e.culture]),yt=t=>{var n,r;let o="";switch((t||(null===(r=null===(n=e.culture)||void 0===n?void 0:n.split("-"))||void 0===r?void 0:r[0])||q.language||"IT").toUpperCase()){case"IT":default:o="it-IT";break;case"DE":o="de-DE";break;case"EN":o="en-GB";break;case"ES":o="es-ES";break;case"FR":o="fr-FR";break;case"PT":o="pt-PT";break;case"UK":o="uk-UK";break;case"RU":o="ru-RU"}return o},[wt,xt]=(0,u.useState)();(0,u.useEffect)((()=>{(async()=>{try{const e=await fetch(`${g||"https://app.twincreator.com"}/api/lexiconmap`);return await e.json()}catch(e){console.error(e)}})().then((e=>{xt(e)}))}),[]);const St=e=>{if(console.log(E,xe,s),!E)return;if(Je&&Rt(),s)return;iJ&&iJ.pause();let t=window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome"),n=/iPad|iPhone|iPod/.test(navigator.userAgent);if(n&&t)aJ.suspend();else if("suspended"===aJ.state){Mt(),aJ=new Ad;let e=aJ.createBuffer(1,1e4,22050),t=aJ.createBufferSource();t.buffer=e,t.connect(aJ.destination)}if(!oJ){iJ=new uo.SpeakerAudioDestination;let e=vo.fromSpeakerOutput(iJ);oJ=new Io.SpeechSynthesizer(rJ,e)}Te?Oe&&Tt():(iJ.onAudioEnd=()=>{Be(!1),Oe&&document.dispatchEvent(new Event("endSpeakStartListen"))},Be(!0),oJ.synthesisCompleted=(e,t)=>{console.log("synthesisCompleted",e,t),Be(!1)},oJ.speakSsmlAsync(`<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xmlns:mstts="https://www.w3.org/2001/mstts" xmlns:emo="http://www.w3.org/2009/10/emotionml" xml:lang="${yt(he)}"><voice name="${vt(he)}"><s>${((e,t)=>{var n;if(!wt)return e;const r={...null!==(n=wt.common)&&void 0!==n?n:{},...(null==S?void 0:S.id)&&wt[S.id]?wt[S.id]:{}},o=Object.keys(r).map((e=>{var n;return{word:e,phoneme:null!==(n=r[e][t])&&void 0!==n?n:r[e].default}}));return o.reduce(((e,{word:t,phoneme:n})=>e.replace(new RegExp(t,"gi"),`<phoneme alphabet="ipa" ph="${n}">${t}</phoneme>`)),e)})(e,he.toLowerCase())}</s></voice></speak>`,(r=>{if(r){console.log("result",r);try{aJ.decodeAudioData(r.audioData,(function(e){const r=aJ.createBufferSource();r.buffer=e,r.connect(aJ.destination),(Qe.length<1||t&&n)&&r.start(0)})),aJ.resume(),oJ&&(oJ.close(),oJ=null)}catch(t){console.error("speak error: ",t),window.speechSynthesis.speak(new SpeechSynthesisUtterance(e)),Be(!1),oJ&&(oJ.close(),oJ=null)}}else aJ.resume(),Be(!1)}),(t=>{console.error("speak:",t),window.speechSynthesis.speak(new SpeechSynthesisUtterance(e)),Be(!1)})),Be(!1),we(!1))},Mt=()=>{oJ&&(oJ.close(),oJ=null),aJ&&aJ.close(),iJ&&(iJ.pause(),iJ.close())};(0,u.useEffect)((()=>{let e=document.querySelector("#chat-fieldset textarea");e&&e.focus()}),[null==ot?void 0:ot.emission]);const[_t,Et]=(0,u.useState)(""),At=()=>Et(""),[Ct,kt]=(0,u.useState)(null),Tt=()=>{let e=setTimeout((async()=>{Pt();const e=jm(_t);e.length>0?(et(e),At(),$e("")):Je&&pt()}),1e3*Pe);kt(e)},It=()=>{Ct&&(clearTimeout(Ct),kt(null))};(0,u.useEffect)((()=>{It(),Oe&&Tt(),pt()}),[_t]);const Ot=()=>{if(console.log("start listening"),E){Pt(),Et("");try{navigator.mediaDevices.getUserMedia({audio:!0}).then((function(e){console.log("is listening"),_e(!0),rJ||(rJ=hn.fromSubscription(E,"eastus"),rJ.speechRecognitionLanguage=yt(he),rJ.speechSynthesisLanguage=yt(he),rJ.speechSynthesisVoiceName=vt(he));const t=vo.fromDefaultMicrophoneInput();nJ=new wo.SpeechRecognizer(rJ,t),Xe(!0),nJ.recognized=(e,t)=>{if(t.result.reason===bt.RecognizedSpeech){let e=t.result.text;if(Et(e||""),(null==e?void 0:e.length)>0){const t=jm(e);t.length>0&&$e(t)}}else t.result.reason===bt.NoMatch&&console.debug("NOMATCH: Speech could not be recognized.")},nJ.canceled=(e,t)=>{t.reason===We.Error&&(console.debug(`"CANCELED: ErrorCode=${t.errorCode}`),console.debug(`"CANCELED: ErrorDetails=${t.errorDetails}`),console.debug("CANCELED: Did you set the speech resource key and region values?")),Rt()},nJ.sessionStopped=(e,t)=>{Rt()},nJ.startContinuousRecognitionAsync()})).catch(console.error)}catch(e){console.error(e)}}},Rt=()=>{nJ&&(nJ.stopContinuousRecognitionAsync(),nJ.close(),nJ=null),Xe(!1)},Pt=()=>{_e(!1),Rt(),It()};(0,u.useEffect)((()=>()=>Pt()),[]),(0,u.useEffect)((()=>{"Z0"===(null==ot?void 0:ot.state)&&Pt()}),[null==ot?void 0:ot.state]);const[Nt,Lt]=(0,u.useState)(!1),Bt=(0,u.useCallback)((e=>{Le&&oJ&&(oJ.close(),oJ=null),!Oe||!Me&&Nt||(Lt(!0),Ot())}),[Oe,Me]);(0,u.useEffect)((()=>{!Le&&Oe&&Me?Ot():Le&&Je&&Rt()}),[Le]),(0,u.useEffect)((()=>(document.addEventListener("endSpeakStartListen",Bt),()=>{document.removeEventListener("endSpeakStartListen",Bt)})),[Bt]),(0,u.useEffect)((()=>{Je&&(Pt(),At(),$e(""),Ot())}),[fe]);const[Dt,jt]=(0,u.useState)("keypress");(0,u.useEffect)((()=>{const e=hF("sendOnEnter","keypress");jt(e)}),[]),(0,u.useEffect)((()=>{pF("sendOnEnter",Dt)}),[Dt]);const[Ft,zt]=(0,u.useState)(),Ut=null==me?void 0:me.globalBackground,Ht=Ut?`url(${Ut})`:null,Gt=o?{"--memori-chat-bubble-bg":"#fff",...me&&!i?{"--memori-text-color":null!==(B=me.textColor)&&void 0!==B?B:"#000"}:{},...(null==me?void 0:me.buttonBgColor)?{"--memori-button-bg":me.buttonBgColor,"--memori-primary":me.buttonBgColor}:{},...(null==me?void 0:me.buttonTextColor)?{"--memori-button-text":me.buttonTextColor}:{},...(null==me?void 0:me.blurBackground)?{"--memori-blur-background":"5px"}:{"--memori-blur-background":"0px"},...(null==me?void 0:me.innerBgColor)?{"--memori-inner-bg":`rgba(${"dark"===me.innerBgColor?"0, 0, 0":"255, 255, 255"}, ${null!==(D=me.innerBgAlpha)&&void 0!==D?D:.4})`,"--memori-inner-content-pad":"1.5rem","--memori-nav-bg-image":"none","--memori-nav-bg":`rgba(${"dark"===me.innerBgColor?"0, 0, 0":"255, 255, 255"}, ${null!==(j=null==me?void 0:me.innerBgAlpha)&&void 0!==j?j:.4})`}:{"--memori-inner-content-pad":"0px"}}:{},Wt=`\n ${s?"#preview":":root"}, .memori-widget {\n ${Object.entries(Gt).map((([e,t])=>`${e}: ${t};`)).join("\n")}\n }\n `,[Vt,qt]=(0,u.useState)(!0),[Kt,$t]=(0,u.useState)();(0,u.useEffect)((()=>{e.engineMemoriID&&(async e=>{let t,n;try{const{contentQualityIndex:r,answerQualityIndex:o,unansweredQuestions:i,...a}=await ne(e);0===a.resultCode&&(t=r,n=i)}catch(e){let t=e;console.error("[APPCONTEXT/QUERYGAMIFICATIONPOINTS]",t)}return{points:null!=t?t:0,unansweredQuestions:null!=n?n:0}})(e.engineMemoriID).then((e=>{$t(_F(e.points))})).catch(console.error)}),[e.engineMemoriID]),(0,u.useEffect)((()=>{if(null==me?void 0:me.seoTitle){let e=document.createElement("meta");e.setAttribute("property","og:title"),e.setAttribute("content",me.seoTitle),document.head.append(e)}if(null==me?void 0:me.seoDescription){let e=document.createElement("meta");e.setAttribute("property","og:description"),e.setAttribute("content",me.seoDescription),document.head.append(e)}if(null==me?void 0:me.seoUrl){let e=document.createElement("meta");e.setAttribute("property","og:url"),e.setAttribute("content",me.seoUrl),document.head.append(e)}let t=w||e.avatarURL;if((null==me?void 0:me.seoImageShowAvatar)&&t){let e=document.createElement("meta");e.setAttribute("property","og:image"),e.setAttribute("content",t),document.head.append(e)}}),[me,e.avatarURL,w]);const Jt=async t=>{const n=(null==t?void 0:t.sessionID)||nt,r=(null==t?void 0:t.dialogState)||ot;ce(!0);let o=document.getElementById("memori-audio"),i=window.navigator.userAgent.includes("Safari")&&!window.navigator.userAgent.includes("Chrome");if(o&&i&&(o.muted=!1,o.play().catch((e=>{console.error("error playing intro audio",e)}))),!n&&"PUBLIC"!==e.privacyType&&!e.secretToken&&!De&&!Fe||!n&&ue)return He("password"),void ce(!1);if(n)if(x){const{currentState:t,...r}=await te(n);if(0!==r.resultCode||!t)return console.debug("session expired, opening new session"),de(!0),rt(void 0),ce(!1),void await Jt();if(Ye([]),ae&&e.giverTag&&(null==ot?void 0:ot.currentTag)!==e.giverTag)try{console.debug("change tag #0"),await ct(e.engineMemoriID,n,"-");const t=await ct(e.engineMemoriID,n,e.giverTag,e.giverPIN);if(!t||0!==t.resultCode)throw console.error("session #1",t),new Error("No session");tt(t.currentState,he).then((e=>{e.emission&&St(e.emission)})).finally((()=>{Se(!0)}))}catch(t){console.error("session #2",t),lt(!0,null==e?void 0:e.secretToken,void 0,null==e?void 0:e.giverTag,null==e?void 0:e.giverPIN,b,y).then((()=>{Se(!0)}))}else if(!ae&&M&&(null==ot?void 0:ot.currentTag)!==M.tag)try{console.debug("change tag #3"),await ct(e.engineMemoriID,n,"-");const t=await ct(e.engineMemoriID,n,M.tag,M.pin);if(!t||0!==t.resultCode)throw console.error("session #4",t),new Error("No session");tt(t.currentState,he).then((e=>{e.emission&&St(e.emission)})).finally((()=>{Se(!0)}))}catch(t){console.error("session #5",t),lt(!0,null==e?void 0:e.secretToken,void 0,M.tag,M.pin,b,y).then((()=>{Se(!0)}))}else if(ae||M||(null==ot?void 0:ot.currentTag)===Ym)tt(t,he).then((e=>{e.emission&&St(e.emission)})).finally((()=>{Se(!0)}));else try{console.debug("change tag #6"),await ct(e.engineMemoriID,n,"-");const t=await ct(e.engineMemoriID,n,Ym);if(!t||0!==t.resultCode)throw console.error("session #7",t),new Error("No session");tt(t.currentState,he).then((e=>{e.emission&&St(e.emission)})).finally((()=>{Se(!0)}))}catch(t){console.error("session #8",t),lt(!0,null==e?void 0:e.secretToken,void 0,void 0,void 0,b,y).then((()=>{Se(!0)}))}}else Ye([]),tt(r,he).then((e=>{e.emission&&St(e.emission)})).finally((()=>{Se(!0)}));else{ce(!1),de(!1);const t=await st({memoriID:e.engineMemoriID,password:m||e.secretToken,tag:null==M?void 0:M.tag,pin:null==M?void 0:M.pin,initialContextVars:b,initialQuestion:y});await Jt(t||void 0)}},[Xt,Qt]=(0,u.useState)(_);(0,u.useEffect)((()=>{const t=document.querySelector(`memori-client[memoriname="${e.name}"]`)||document.querySelector(`memori-client[memoriid="${e.memoriID}"]`)||document.querySelector("memori-client");if(!t)return;const n=new MutationObserver(((e,t)=>{var n,r,o;for(const t of e)"attributes"===t.type&&"authtoken"===(null===(n=t.attributeName)||void 0===n?void 0:n.toLowerCase())&&(console.log("FUCK",t),"MEMORI-CLIENT"===t.target.nodeName?Qt(t.target.getAttribute("authtoken")||void 0):Qt((null===(o=null===(r=t.target)||void 0===r?void 0:r.parentElement)||void 0===o?void 0:o.getAttribute("authtoken"))||void 0))}));return n.observe(t,{attributes:!0,childList:!1,subtree:!1}),()=>{n.disconnect()}}),[]);const Zt=r(u).createElement(uF,{memori:e,history:Qe,showShare:a,position:Ge,setShowPositionDrawer:Ae,setShowSettingsDrawer:ke,speakerMuted:Te,setSpeakerMuted:e=>{if(Ie(e),e)Mt();else{aJ=new Ad;let e=aJ.createBuffer(1,1e4,22050),t=aJ.createBufferSource();t.buffer=e,t.connect(aJ.destination)}},showSettings:h,hasUserActivatedSpeak:xe}),en=r(u).createElement(sj,{memori:e,integration:o,integrationConfig:me,tenant:S,instruct:ae,avatar3dVisible:Vt,setAvatar3dVisible:qt,hasUserActivatedSpeak:xe,isPlayingAudio:Le,baseUrl:g}),tn=r(u).createElement(Ty,{memori:e,tenant:S,gamificationLevel:Kt,language:fe,userLang:he,setUserLang:pe,baseUrl:g,position:Ge,openPositionDrawer:()=>Ae(!0),integrationConfig:me,instruct:ae,sessionId:nt,clickedStart:le,onClickStart:Jt,initializeTTS:()=>{if(!E)return;rJ=hn.fromSubscription(E,"eastus"),rJ.speechSynthesisLanguage=yt(he),rJ.speechSynthesisVoiceName=vt(he),rJ.speechRecognitionLanguage=yt(he),Dm()&&(rJ.speechSynthesisOutputFormat=Yt.Audio16Khz32KBitRateMonoMp3),aJ=new Ad;let e=aJ.createBuffer(1,1e4,22050),t=aJ.createBufferSource();t.buffer=e,t.connect(aJ.destination),iJ=new uo.SpeakerAudioDestination;let n=vo.fromSpeakerOutput(iJ);oJ=new Io.SpeechSynthesizer(rJ,n)}}),nn=nt?r(u).createElement(_y,{memori:e,sessionID:nt,tenant:S,translateTo:ge&&he.toUpperCase()!==(null===(G=null!==(H=null!==(U=null===(z=null===(F=e.culture)||void 0===F?void 0:F.split("-"))||void 0===z?void 0:z[0])&&void 0!==U?U:q.language)&&void 0!==H?H:"IT")||void 0===G?void 0:G.toUpperCase())?he:void 0,baseUrl:g,memoriTyping:ye,history:Qe,authToken:Xt,dialogState:ot,setDialogState:at,pushMessage:Ze,simulateUserPrompt:(e,t)=>{Rt(),et(e,void 0,void 0,!1,t)},showDates:d,showContextPerLine:f,client:J,selectReceiverTag:async t=>{var n;if(nt)try{const{currentState:r,...o}=await ee(nt,t);if(0===o.resultCode)if(Ze({text:t,fromUser:!0}),"X4"===r.state&&e.giverTag){const{currentState:t,...n}=await J.postTagChangedEvent(nt,e.giverTag);0===n.resultCode?(at(t),t.emission&&Ze({text:t.emission,media:t.media,fromUser:!1})):(console.error(n),Qd.error(V(gF(n.resultCode))))}else at(r),r.emission&&Ze({text:r.emission,media:r.media,fromUser:!1});else console.error(o,t,null===(n=null==ot?void 0:ot.knownTags)||void 0===n?void 0:n[t]),Qd.error(V(gF(o.resultCode)))}catch(e){let t=e;console.error(t),Qd.error(t.message)}},preview:s,sendOnEnter:Dt,setSendOnEnter:jt,attachmentsMenuOpen:Ft,setAttachmentsMenuOpen:zt,instruct:ae,showInputs:c,showMicrophone:!!E,userMessage:Ke,onChangeUserMessage:e=>{if(!e||"\n"===e||""===e.trim())return $e(""),void pt();$e(e),ht()},sendMessage:e=>{Rt(),et(e),$e(""),At()},stopListening:Pt,startListening:Ot,stopAudio:Mt,resetTranscript:At,listening:Je,isPlayingAudio:Le}):null,rn=o&&Ht?r(u).createElement("div",{className:"memori--global-background"},r(u).createElement("div",{className:"memori--global-background-image",style:{backgroundImage:Ht}})):null,on=o?r(u).createElement("style",{dangerouslySetInnerHTML:{__html:Wt}}):null,an=r(u).createElement(lj,{canInstruct:!!e.giverTag,instruct:ae,onChangeMode:e=>{se("instruct"===e),Se(!1),ce(!1)}});return r(u).createElement("div",{className:r(Xd)("memori","memori-widget",{"memori--preview":s,"memori--embed":l,"memori--with-integration":o,"memori--active":xe}),"data-memori-name":null==e?void 0:e.name,"data-memori-id":null==e?void 0:e.engineMemoriID,"data-memori-secondary-id":null==e?void 0:e.memoriID,"data-memori-session-id":nt,"data-memori-integration":null==o?void 0:o.integrationID,"data-memori-engine-state":JSON.stringify({...ot,sessionID:nt}),style:{height:p}},r(u).createElement(dF,{header:Zt,avatar:en,chat:nn,startPanel:tn,integrationStyle:on,integrationBackground:rn,changeMode:an,sessionId:nt,hasUserActivatedSpeak:xe,showInstruct:i,loading:ve}),r(u).createElement("audio",{id:"memori-audio",style:{display:"none"},src:"https://app.twincreator.com/intro.mp3"}),K&&r(u).createElement(Bm,{withModal:!0,pwdOrTokens:Ue,openModal:!!Ue,setPwdOrTokens:He,showTokens:"SECRET"===e.privacyType,onFinish:async t=>{t.password&&je(t.password),t.tokens&&ze(t.tokens),lt(!nt,t.password,t.tokens,ae?e.giverTag:void 0,ae?e.giverPIN:void 0,b,y).then((e=>{He(null),Jt(e||void 0)})).catch((()=>{He(null),de(!0)}))},minimumNumberOfRecoveryTokens:null!==(W=null==e?void 0:e.minimumNumberOfRecoveryTokens)&&void 0!==W?W:1}),nt&&r(u).createElement(tJ,{visible:"link"===Ft,onCancel:()=>zt(void 0),onOk:async e=>{if(!nt)return;let t={mediumID:"",mimeType:"text/html",url:e.url,title:e.title};Ze({text:V("media.insertThisLink",{url:t.url,title:t.title}),fromUser:!0,media:[t]});try{const{currentState:e,...n}=await J.postMediumSelectedEvent(nt,t);e&&0===n.resultCode?(at(e),e.emission&&(Ze({text:e.emission,media:e.media,fromUser:!1}),St(e.emission))):(console.error(n,e,t),Qd.error(V(gF(n.resultCode),{ns:"common"})))}catch(e){let t=e;console.error(t),Qd.error(t.message)}zt(void 0)}}),Xt&&nt&&(null==S?void 0:S.id)&&r(u).createElement(eJ,{visible:"media"===Ft,authToken:Xt,tenantID:null==S?void 0:S.id,sessionID:nt,uploadAssetURL:J.backend.getUploadAssetURL(Xt,e.memoriID),deleteAsset:J.backend.deleteAsset,onCancel:()=>zt(void 0),onOk:async e=>{if(!nt)return;let t={mediumID:"",mimeType:e.mimeType,url:e.assetURL,title:e.title||e.assetID};Ze({text:V("media.insertThisMediaMsg"),fromUser:!0,media:[t]});try{const{currentState:e,...n}=await J.postMediumSelectedEvent(nt,t);e&&0===n.resultCode?(at(e),e.emission&&(Ze({text:e.emission,media:e.media,fromUser:!1}),St(e.emission))):(console.error(n,e,t),Qd.error(V(gF(n.resultCode),{ns:"common"})))}catch(e){let t=e;console.error(t),Qd.error(t.message)}zt(void 0)}}))};function lJ(e){return lJ="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},lJ(e)}function cJ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uJ(e,t){if("object"!==lJ(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==lJ(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function dJ(e){var t=uJ(e,"string");return"symbol"===lJ(t)?t:String(t)}function fJ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dJ(r.key),r)}}function hJ(e,t,n){return t&&fJ(e.prototype,t),n&&fJ(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function pJ(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mJ(e,t){return mJ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},mJ(e,t)}function gJ(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mJ(e,t)}function vJ(e,t){if(t&&("object"===lJ(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pJ(e)}function bJ(e){return bJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},bJ(e)}function yJ(e,t,n){return(t=dJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wJ(e){if(Array.isArray(e))return e}function xJ(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function SJ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function MJ(e,t){if(e){if("string"==typeof e)return SJ(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?SJ(e,t):void 0}}function _J(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function EJ(e){return wJ(e)||xJ(e)||MJ(e)||_J()}function AJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function CJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?AJ(Object(n),!0).forEach((function(t){yJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):AJ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var kJ={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},TJ=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};cJ(this,e),this.init(t,n)}return hJ(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||kJ,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,CJ(CJ({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}(),IJ=new TJ,OJ=function(){function e(){cJ(this,e),this.observers={}}return hJ(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];if(this.observers[e]){var o=[].concat(this.observers[e]);o.forEach((function(e){e.apply(void 0,n)}))}if(this.observers["*"]){var i=[].concat(this.observers["*"]);i.forEach((function(t){t.apply(t,[e].concat(n))}))}}}]),e}();function RJ(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function PJ(e){return null==e?"":""+e}function NJ(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}function LJ(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var i="string"!=typeof t?[].concat(t):t.split(".");i.length>1;){if(o())return{};var a=r(i.shift());!e[a]&&n&&(e[a]=new n),e=Object.prototype.hasOwnProperty.call(e,a)?e[a]:{}}return o()?{}:{obj:e,k:r(i.shift())}}function BJ(e,t,n){var r=LJ(e,t,Object);r.obj[r.k]=n}function DJ(e,t){var n=LJ(e,t),r=n.obj,o=n.k;if(r)return r[o]}function jJ(e,t,n){var r=DJ(e,n);return void 0!==r?r:DJ(t,n)}function FJ(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):FJ(e[r],t[r],n):e[r]=t[r]);return e}function zJ(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var UJ={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function HJ(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return UJ[e]})):e}var GJ="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,WJ=[" ",",","?","!",";"];function VJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?VJ(Object(n),!0).forEach((function(t){yJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VJ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function KJ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=bJ(e);if(t){var o=bJ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return vJ(this,n)}}function $J(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,i=0;i<r.length;++i){if(!o)return;if("string"==typeof o[r[i]]&&i+1<r.length)return;if(void 0===o[r[i]]){for(var a=2,s=r.slice(i,i+a).join(n),l=o[s];void 0===l&&r.length>i+a;)a++,l=o[s=r.slice(i,i+a).join(n)];if(void 0===l)return;if(null===l)return null;if(t.endsWith(s)){if("string"==typeof l)return l;if(s&&"string"==typeof l[s])return l[s]}var c=r.slice(i+a).join(n);return c?$J(l,c,n):void 0}o=o[r[i]]}return o}}var JJ=function(e){gJ(n,e);var t=KJ(n);function n(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return cJ(this,n),r=t.call(this),GJ&&OJ.call(pJ(r)),r.data=e||{},r.options=o,void 0===r.options.keySeparator&&(r.options.keySeparator="."),void 0===r.options.ignoreJSONStructure&&(r.options.ignoreJSONStructure=!0),r}return hJ(n,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,a=[e,t];n&&"string"!=typeof n&&(a=a.concat(n)),n&&"string"==typeof n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."));var s=DJ(this.data,a);return s||!i||"string"!=typeof n?s:$J(this.data&&this.data[e]&&this.data[e][t],n,o)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},i=this.options.keySeparator;void 0===i&&(i=".");var a=[e,t];n&&(a=a.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(r=t,t=(a=e.split("."))[1]),this.addNamespaces(t),BJ(this.data,a,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},a=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(a=e.split("."))[1]),this.addNamespaces(t);var s=DJ(this.data,a)||{};r?FJ(s,n,o):s=qJ(qJ({},s),n),BJ(this.data,a,s),i.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?qJ(qJ({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),n}(OJ),XJ={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var i=this;return e.forEach((function(e){i.processors[e]&&(t=i.processors[e].process(t,n,r,o))})),t}};function QJ(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function YJ(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?QJ(Object(n),!0).forEach((function(t){yJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QJ(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ZJ(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=bJ(e);if(t){var o=bJ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return vJ(this,n)}}var eX={},tX=function(e){gJ(n,e);var t=ZJ(n);function n(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return cJ(this,n),r=t.call(this),GJ&&OJ.call(pJ(r)),NJ(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,pJ(r)),r.options=o,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=IJ.create("translator"),r}return hJ(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],i=n&&e.indexOf(n)>-1,a=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var r=WJ.filter((function(e){return t.indexOf(e)<0&&n.indexOf(e)<0}));if(0===r.length)return!0;var o=new RegExp("(".concat(r.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),i=!o.test(e);if(!i){var a=e.indexOf(n);a>0&&!o.test(e.substring(0,a))&&(i=!0)}return i}(e,n,r));if(i&&!a){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:o};var l=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(l[0])>-1)&&(o=l.shift()),e=l.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,r){var o=this;if("object"!==lJ(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var i=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,a=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),l=s.key,c=s.namespaces,u=c[c.length-1],d=t.lng||this.language,f=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(f){var h=t.nsSeparator||this.options.nsSeparator;return i?(p.res="".concat(u).concat(h).concat(l),p):"".concat(u).concat(h).concat(l)}return i?(p.res=l,p):l}var p=this.resolve(e,t),m=p&&p.res,g=p&&p.usedKey||l,v=p&&p.exactUsedKey||l,b=Object.prototype.toString.apply(m),y=["[object Number]","[object Function]","[object RegExp]"],w=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,S="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(x&&m&&S&&y.indexOf(b)<0&&("string"!=typeof w||"[object Array]"!==b)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var M=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,m,YJ(YJ({},t),{},{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return i?(p.res=M,p):M}if(a){var _="[object Array]"===b,E=_?[]:{},A=_?v:g;for(var C in m)if(Object.prototype.hasOwnProperty.call(m,C)){var k="".concat(A).concat(a).concat(C);E[C]=this.translate(k,YJ(YJ({},t),{joinArrays:!1,ns:c})),E[C]===k&&(E[C]=m[C])}m=E}}else if(x&&"string"==typeof w&&"[object Array]"===b)(m=m.join(w))&&(m=this.extendTranslation(m,e,t,r));else{var T=!1,I=!1,O=void 0!==t.count&&"string"!=typeof t.count,R=n.hasDefaultValue(t),P=O?this.pluralResolver.getSuffix(d,t.count,t):"",N=t["defaultValue".concat(P)]||t.defaultValue;!this.isValidLookup(m)&&R&&(T=!0,m=N),this.isValidLookup(m)||(I=!0,m=l);var L=t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,B=L&&I?void 0:m,D=R&&N!==m&&this.options.updateMissing;if(I||T||D){if(this.logger.log(D?"updateKey":"missingKey",d,u,l,D?N:m),a){var j=this.resolve(l,YJ(YJ({},t),{},{keySeparator:!1}));j&&j.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var F=[],z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&z&&z[0])for(var U=0;U<z.length;U++)F.push(z[U]);else"all"===this.options.saveMissingTo?F=this.languageUtils.toResolveHierarchy(t.lng||this.language):F.push(t.lng||this.language);var H=function(e,n,r){var i=R&&r!==m?r:B;o.options.missingKeyHandler?o.options.missingKeyHandler(e,u,n,i,D,t):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,u,n,i,D,t),o.emit("missingKey",e,u,n,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?F.forEach((function(e){o.pluralResolver.getSuffixes(e,t).forEach((function(n){H([e],l+n,t["defaultValue".concat(n)]||N)}))})):H(F,l,N))}m=this.extendTranslation(m,e,t,p,r),I&&m===l&&this.options.appendNamespaceToMissingKey&&(m="".concat(u,":").concat(l)),(I||T)&&this.options.parseMissingKeyHandler&&(m="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(l):l,T?m:void 0):this.options.parseMissingKeyHandler(m))}return i?(p.res=m,p):m}},{key:"extendTranslation",value:function(e,t,n,r,o){var i=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,YJ(YJ({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(YJ(YJ({},n),{interpolation:YJ(YJ({},this.options.interpolation),n.interpolation)}));var a,s="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var l=e.match(this.interpolator.nestingRegexp);a=l&&l.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=YJ(YJ({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),s){var u=e.match(this.interpolator.nestingRegexp);a<(u&&u.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),a=0;a<e;a++)r[a]=arguments[a];return o&&o[0]===r[0]&&!n.context?(i.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):i.translate.apply(i,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var d=n.postProcess||this.options.postProcess,f="string"==typeof d?[d]:d;return null!=e&&f&&f.length&&!1!==n.applyPostProcessor&&(e=XJ.handle(f,e,t,this.options&&this.options.postProcessPassResolved?YJ({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,i,a=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!a.isValidLookup(t)){var l=a.extractFromKey(e,s),c=l.key;n=c;var u=l.namespaces;a.options.fallbackNS&&(u=u.concat(a.options.fallbackNS));var d=void 0!==s.count&&"string"!=typeof s.count,f=d&&!s.ordinal&&0===s.count&&a.pluralResolver.shouldUseIntlApi(),h=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,p=s.lngs?s.lngs:a.languageUtils.toResolveHierarchy(s.lng||a.language,s.fallbackLng);u.forEach((function(e){a.isValidLookup(t)||(i=e,!eX["".concat(p[0],"-").concat(e)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(i)&&(eX["".concat(p[0],"-").concat(e)]=!0,a.logger.warn('key "'.concat(n,'" for languages "').concat(p.join(", "),'" won\'t get resolved as namespace "').concat(i,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach((function(n){if(!a.isValidLookup(t)){o=n;var i,l=[c];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(l,c,n,e,s);else{var u;d&&(u=a.pluralResolver.getSuffix(n,s.count,s));var p="".concat(a.options.pluralSeparator,"zero");if(d&&(l.push(c+u),f&&l.push(c+p)),h){var m="".concat(c).concat(a.options.contextSeparator).concat(s.context);l.push(m),d&&(l.push(m+u),f&&l.push(m+p))}}for(;i=l.pop();)a.isValidLookup(t)||(r=i,t=a.getResource(n,e,i,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:i}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),n}(OJ);function nX(e){return e.charAt(0).toUpperCase()+e.slice(1)}var rX=function(){function e(t){cJ(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=IJ.create("languageUtils")}return hJ(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=nX(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=nX(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=nX(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],i=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&i(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&i(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&i(this.getLanguagePartFromCode(e))):"string"==typeof e&&i(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&i(n.formatLanguageCode(e))})),o}}]),e}(),oX=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],iX={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},aX=["v1","v2","v3"],sX={zero:0,one:1,two:2,few:3,many:4,other:5};function lX(){var e={};return oX.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:iX[t.fc]}}))})),e}var cX=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};cJ(this,e),this.languageUtils=t,this.options=n,this.logger=IJ.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=lX()}return hJ(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(e,t){return sX[e]-sX[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):r.numbers.map((function(r){return t.getSuffix(e,r,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var i=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):i():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?i():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!aX.includes(this.options.compatibilityJSON)}}]),e}();function uX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function dX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?uX(Object(n),!0).forEach((function(t){yJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uX(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var fX=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};cJ(this,e),this.logger=IJ.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return hJ(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:HJ,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?zJ(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?zJ(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?zJ(t.nestingPrefix):t.nestingPrefixEscaped||zJ("$t("),this.nestingSuffix=t.nestingSuffix?zJ(t.nestingSuffix):t.nestingSuffixEscaped||zJ(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,i,a,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(s.formatSeparator)<0){var o=jJ(t,l,e);return s.alwaysFormat?s.format(o,void 0,n,dX(dX(dX({},r),t),{},{interpolationkey:e})):o}var i=e.split(s.formatSeparator),a=i.shift().trim(),c=i.join(s.formatSeparator).trim();return s.format(jJ(t,l,a),c,n,dX(dX(dX({},r),t),{},{interpolationkey:a}))};this.resetRegExp();var d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,f=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?c(s.escape(e)):c(e)}}].forEach((function(t){for(a=0;o=t.regex.exec(e);){var n=o[1].trim();if(void 0===(i=u(n)))if("function"==typeof d){var l=d(e,o,r);i="string"==typeof l?l:""}else if(r&&r.hasOwnProperty(n))i="";else{if(f){i=o[0];continue}s.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),i=""}else"string"==typeof i||s.useRawValueToEscape||(i=PJ(i));var c=t.safeValue(i);if(e=e.replace(o[0],c),f?(t.regex.lastIndex+=i.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++a>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=dX({},i);function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0];var i=(o=this.interpolate(o,a)).match(/'/g),s=o.match(/"/g);(i&&i.length%2==0&&!s||s.length%2!=0)&&(o=o.replace(/'/g,'"'));try{a=JSON.parse(o),t&&(a=dX(dX({},t),a))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete a.defaultValue,e}for(a.applyPostProcessor=!1,delete a.defaultValue;n=this.nestingRegexp.exec(e);){var l=[],c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var u=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=u.shift(),l=u,c=!0}if((r=t(s.call(this,n[1].trim(),a),a))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=PJ(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=l.reduce((function(e,t){return o.format(e,t,i.lng,dX(dX({},i),{},{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function hX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?hX(Object(n),!0).forEach((function(t){yJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hX(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function mX(e){var t={};return function(n,r,o){var i=r+JSON.stringify(o),a=t[i];return a||(a=e(r,o),t[i]=a),a(n)}}var gX=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};cJ(this,e),this.logger=IJ.create("formatter"),this.options=t,this.formats={number:mX((function(e,t){var n=new Intl.NumberFormat(e,t);return function(e){return n.format(e)}})),currency:mX((function(e,t){var n=new Intl.NumberFormat(e,pX(pX({},t),{},{style:"currency"}));return function(e){return n.format(e)}})),datetime:mX((function(e,t){var n=new Intl.DateTimeFormat(e,pX({},t));return function(e){return n.format(e)}})),relativetime:mX((function(e,t){var n=new Intl.RelativeTimeFormat(e,pX({},t));return function(e){return n.format(e,t.range||"day")}})),list:mX((function(e,t){var n=new Intl.ListFormat(e,pX({},t));return function(e){return n.format(e)}}))},this.init(t)}return hJ(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=t.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=mX(t)}},{key:"format",value:function(e,t,n,r){var o=this,i=t.split(this.formatSeparator).reduce((function(e,t){var i=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((function(e){if(e){var t=EJ(e.split(":")),r=t[0],o=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=o),"false"===o&&(n[r.trim()]=!1),"true"===o&&(n[r.trim()]=!0),isNaN(o)||(n[r.trim()]=parseInt(o,10))}}))}return{formatName:t,formatOptions:n}}(t),a=i.formatName,s=i.formatOptions;if(o.formats[a]){var l=e;try{var c=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},u=c.locale||c.lng||r.locale||r.lng||n;l=o.formats[a](e,u,pX(pX(pX({},s),r),c))}catch(e){o.logger.warn(e)}return l}return o.logger.warn("there was no format function for ".concat(a)),e}),e);return i}}]),e}();function vX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function bX(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vX(Object(n),!0).forEach((function(t){yJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vX(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function yX(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=bJ(e);if(t){var o=bJ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return vJ(this,n)}}var wX=function(e){gJ(n,e);var t=yX(n);function n(e,r,o){var i,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return cJ(this,n),i=t.call(this),GJ&&OJ.call(pJ(i)),i.backend=e,i.store=r,i.services=o,i.languageUtils=o.languageUtils,i.options=a,i.logger=IJ.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=a.maxParallelReads||10,i.readingCalls=0,i.maxRetries=a.maxRetries>=0?a.maxRetries:5,i.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(o,a.backend,a),i}return hJ(n,[{key:"queueLoad",value:function(e,t,n,r){var o=this,i={},a={},s={},l={};return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?void 0===a[s]&&(a[s]=!0):(o.state[s]=1,r=!1,void 0===a[s]&&(a[s]=!0),void 0===i[s]&&(i[s]=!0),void 0===l[t]&&(l[t]=!0)))})),r||(s[e]=!0)})),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],i=r[1];t&&this.emit("failedLoading",o,i,t),n&&this.store.addResourceBundle(o,i,n),this.state[e]=t?-1:2;var a={};this.queue.forEach((function(n){var r,s,l,c,u,d;r=n.loaded,s=i,c=LJ(r,[o],Object),u=c.obj,d=c.k,u[d]=u[d]||[],l&&(u[d]=u[d].concat(s)),l||u[d].push(s),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((function(e){a[e]||(a[e]={});var t=n.loaded[e];t.length&&t.forEach((function(t){void 0===a[e][t]&&(a[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",a),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;return e.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:o,wait:i,callback:a}):(this.readingCalls++,this.backend[n](e,t,(function(s,l){if(r.readingCalls--,r.waitingReads.length>0){var c=r.waitingReads.shift();r.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}s&&l&&o<r.maxRetries?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*i,a)}),i):a(s,l)}))):a(null,{})}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var i=this.queueLoad(e,t,r,o);if(!i.toLoad.length)return i.pending.length||o(),null;i.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],i=r[1];this.read(o,i,"read",void 0,void 0,(function(r,a){r&&t.logger.warn("".concat(n,"loading namespace ").concat(i," for language ").concat(o," failed"),r),!r&&a&&t.logger.log("".concat(n,"loaded namespace ").concat(i," for language ").concat(o),a),t.loaded(e,r,a)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t)?this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!"):null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(e,t,n,r,null,bX(bX({},i),{},{isUpdate:o})),e&&e[0]&&this.store.addResource(e[0],t,n,r))}}]),n}(OJ);function xX(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===lJ(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===lJ(e[2])||"object"===lJ(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function SX(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function MX(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?MX(Object(n),!0).forEach((function(t){yJ(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MX(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function EX(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=bJ(e);if(t){var o=bJ(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return vJ(this,n)}}function AX(){}function CX(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(t){"function"==typeof e[t]&&(e[t]=e[t].bind(e))}))}var kX=function(e){gJ(n,e);var t=EX(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(cJ(this,n),e=t.call(this),GJ&&OJ.call(pJ(e)),e.options=SX(r),e.services={},e.logger=IJ,e.modules={external:[]},CX(pJ(e)),o&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,o),vJ(e,pJ(e));setTimeout((function(){e.init(r,o)}),0)}return e}return hJ(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r=xX();function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=_X(_X(_X({},r),this.options),SX(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=_X(_X({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var i;this.modules.logger?IJ.init(o(this.modules.logger),this.options):IJ.init(null,this.options),this.modules.formatter?i=this.modules.formatter:"undefined"!=typeof Intl&&(i=gX);var a=new rX(this.options);this.store=new JJ(this.options.resources,this.options);var s=this.services;s.logger=IJ,s.resourceStore=this.store,s.languageUtils=a,s.pluralResolver=new cX(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!i||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(s.formatter=o(i),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new fX(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new wX(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new tX(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,n||(n=AX),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var c=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];c.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var u=["addResource","addResources","addResourceBundle","removeResourceBundle"];u.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var d=RJ(),f=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),d.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?f():setTimeout(f,0),d}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:AX,r=n,o="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(o&&"cimode"===o.toLowerCase())return r();var i=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){i.indexOf(e)<0&&i.push(e)}))};if(o)a(o);else{var s=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);s.forEach((function(e){return a(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(i,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),r(e)}))}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=RJ();return e||(e=this.languages),t||(t=this.options.ns),n||(n=AX),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&XJ.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=RJ();this.emit("languageChanging",e);var o=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},i=function(i){e||i||!n.services.languageDetector||(i=[]);var a="string"==typeof i?i:n.services.languageUtils.getBestMatchFromCodes(i);a&&(n.language||o(a),n.translator.language||n.translator.changeLanguage(a),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(a)),n.loadResources(a,(function(e){!function(e,i){i?(o(i),n.translator.changeLanguage(i),n.isLanguageChangingTo=void 0,n.emit("languageChanged",i),n.logger.log("languageChanged",i)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,a)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(i):i(e):i(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,o=function e(t,o){var i;if("object"!==lJ(o)){for(var a=arguments.length,s=new Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];i=r.options.overloadTranslationOptionHandler([t,o].concat(s))}else i=_X({},o);i.lng=i.lng||e.lng,i.lngs=i.lngs||e.lngs,i.ns=i.ns||e.ns,i.keyPrefix=i.keyPrefix||n||e.keyPrefix;var c=r.options.keySeparator||".",u=i.keyPrefix?"".concat(i.keyPrefix).concat(c).concat(t):t;return r.t(u,i)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,i=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,a);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!a(r,e)||o&&!a(i,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=RJ();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=RJ();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:AX,o=_X(_X(_X({},this.options),t),{isClone:!0}),i=new n(o);void 0===t.debug&&void 0===t.prefix||(i.logger=i.logger.clone(t));var a=["store","services","language"];return a.forEach((function(t){i[t]=e[t]})),i.services=_X({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new tX(i.services,i.options),i.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];i.emit.apply(i,[e].concat(n))})),i.init(o,r),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(OJ);yJ(kX,"createInstance",(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new kX(e,t)}));var TX=kX.createInstance();TX.createInstance=kX.createInstance;TX.createInstance,TX.init,TX.loadResources,TX.reloadResources,TX.use,TX.changeLanguage,TX.getFixedT,TX.t,TX.exists,TX.setDefaultNamespace,TX.hasLoadedNamespace,TX.loadNamespaces,TX.loadLanguages;var IX,OX=TX;IX=JSON.parse('{"yes":"Si","no":"No","confirm":"Conferma","cancel":"Annulla","show":"Mostra","hide":"Nascondi","send":"Invia","close":"Chiudi","edit":"Modifica","delete":"Elimina","loading":"Caricamento","copy":"Copia","copyToClipboard":"Copia negli appunti","showOriginalText":"Mostra originale","showTranslatedText":"Mostra traduzione","memoriBlockedTitle":"Bloccato","memoriBlockedUntil":"Memori bloccato fino al {{date}}","memoriBlockedAnon":"Attualmente \\"{{name}}\\" non può rispondere, torna qui il {{date}}","memoriBlockedReasonExceedChats":"perchè ha superato la soglia mensile di chat ammesse.","memoriBlockedGiverHelper":"Puoi sempre gestirlo in qualità di amministratore, ma altri utenti non potranno interrogarlo.","auth":{"useRecoveryTokens":"Utilizza i token di recupero","tokens":"Token","addToken":"Aggiungi token","usePassword":"Utilizza la password","atLeast":"Almeno"},"widget":{"instruct":"Istruisci","test":"Prova","sound":"Audio","position":"Posizione","settings":"Impostazioni","share":"Condividi","sendOnKeypress":"Premi Invio per inviare","sendOnClick":"Clicca sul bottone di invio","goToIntegrationsToCustomizeAvatar":"Per personalizzare l\'avatar, vai a Condividimi e configura la pagina pubblica"},"write_and_speak":{"micButtonPopover":"Premi il pulsante per parlare","micButtonPopoverListening":"Premi il pulsante per smettere di parlare","pageInstructExplanation":"Per insegnarmi nuove cose clicca sul pulsante ISTRUISCIMI per cominciare","pageTryMeExplanation":"Per parlare con me clicca sul pulsante INIZIAMO per cominciare","instructButton":"ISTRUISCIMI","tryMeButton":"INIZIAMO","chatHistory":"Cronologia chat","exportChatHistory":"Esporta la cronologia chat","exportChatHistoryMessage":"Vuoi esportare la cronologia chat?","chatBotButtonText":"CLICCA QUI PER APRIRE LA CHAT","conversationStartedLabel":"Conversazione avvenuta il","settingsHeaderLabel":"Configura qui il memori se vuoi impostare una conversazione continua. Setta i secondi di silenzio prima dell\'invio.","continuousSpeechLabel":"Conversazione continua","secondsLabel":"Secondi","tryMeHeaderLabel":"PROVA","unknownPosition":"Posizione sconosciuta","fieldPlace":"Indica la posizione (es \'Milano\')","showMapLinkFor":"Visualizza sulla mappa la posizione","useMyPosition":"Usa la mia posizione","myPosition":"Posizione corrente","updatingPosition":"Aggiorno la posizione...","placeNotFound":"Luogo sconosciuto!","requirePosition":"Inserisci la posizione prima di iniziare","attachmentsLabel":"Arricchisci il tuo messaggio","iWantToTalkToIn":"Voglio parlare con {{name}} in"},"media":{"title":"Titolo","editAttributes":"Modifica attributi media","uploadMimeTypeNotAllowed":"Il tipo di file non è permesso","uploadSizeLimitMessage":"Il file caricato è troppo grande (max {{size}}MB)","uploadWrongResolutionMessage":"La risoluzione deve essere {{width}}x{{height}} pixel","memoriNameAlreadyUsed":"Hai già un Twin con questo nome","uploadHelperImages":"Caricare un file con estensione png, jpg, jpeg o gif e con dimensione massima di {{size}}MB","uploadHelper":"Caricare un file di dimensione massima di {{size}}MB","uploadError":"Errore nel caricamento","square":"quadrato","scaleRatio":"Proporzioni","addMediaLabel":"Aggiungi media","insertThisMediaMsg":"Inserisci questi media","mediaUploadMessage":"Clicca per caricare un nuovo media","addLinkLabel":"Aggiungi un link","linkKey":"URL","linkValue":"Titolo link","insertThisLink":"Inserisci un link a {{url}} con titolo {{title}}"},"gamification":{"level":"Livello","points":"punti","memoriReachedLevel":"è diventato più evoluto ed ha raggiunto il livello","levelGoToStatistics":"{{memori}} è al livello {{level}} con {{points}} punti. Clicca per andare alle statistiche.","congratulationsNewLevel":"Congratulazioni, hai raggiunto un nuovo livello!","congratulationsNewLevelDescription":"Il tuo Memori è diventato più evoluto con {{points}} punti, guarda le","statistics":"statistiche"},"success":"Operazione andata a buon fine","Error":"Errore","internal server error":"Ops, scusa... qualcosa è andato storto nel server","error":"Errore","error.loading":"Errore durante il caricamento dei contenuti.","error.notFound":"Ops, non abbiamo trovato ciò che cercavi.","error.generic":"Ops, qualcosa è andato storto.","error.serverNotResponding":"Stiamo facendo manutenzione o rilasciando aggiornamenti. Riprova più tardi.","error.unprocessableEntity":"Errore durante il salvataggio dei dati. Ricontrolla i dati inseriti.","error.goBackTo":"Prova a tornare alla","error.reloadPage":"Ricarica la pagina","error.tryAgain":"Riprova","error.unauthorized":"Non sei autorizzato a visualizzare questo contenuto.","errors":{"TENANT_NOT_FOUND":"Tenant non trovato","TENANT_REGISTRATION_DISABLED":"La registrazione su questa piattaforma è disabilitata","TENANT_MISSING_NAME":"Tenant: nome mancante","TENANT_MAX_USERS_REACHED":"Numero massimo di utenti raggiunto","TENANT_MAX_ADMINS_REACHED":"Numero massimo di utenti amministratori raggiunto","USER_NOT_CONFIRMED":"Utente ancora non confermato","USER_NOT_FOUND":"Utente non trovato","USER_OR_PASSWORD_INVALID":"Utente o password non validi","USER_MUST_CHANGE_PASSWORD":"Devi cambiare la password","USER_MUST_ENTER_VERIFICATION_CODE":"Devi inserire il codice di verifica","USER_MISSING_TENANT":"Utente: tenant mancante","USER_MISSING_NAME":"Utente: nome mancante","USER_MISSING_PASSWORD":"Utente: password mancante","USER_MISSING_EMAIL":"Utente: email mancante","USER_MISSING_VERIFICATION_CODE":"Utente: codice di verifica mancante","USER_NAME_ALREADY_USED":"Nome utente già in uso","USER_PASSWORD_NOT_CONFORMING_TO_POLICY":"La password non rispetta le regole di sicurezza","USER_EMAIL_ALREADY_USED":"Email già in uso","USER_EMAIL_INVALID":"Email non valida","USER_VERIFICATION_CODE_INVALID":"Codice di verifica non valido","USER_MISSING_NAME_OR_EMAIL":"Nome utente o email mancante","USER_NAME_INVALID":"Nome utente non valido","USER_HAS_ONE_OR_MORE_MEMORI":"L\'utente ha uno o più memori","USER_MISSING_NEW_PASSWORD":"Utente: nuova password mancante","USER_NOTHING_TO_DO":"Niente da fare","USER_CANT_CREATE_MEMORI":"Utente non abilitato a creare Memori","USER_MAX_MEMORI_REACHED":"Massimo numero di Memori raggiunto","USER_CANT_EDIT_INTEGRATIONS":"Utente non abilitato a gestire integrazioni","MEMORI_NOT_FOUND":"Memori non trovato","MEMORI_NOT_ACCESSIBLE":"Memori non accessibile","MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN":"Solo il proprietario può cambiare il tag e il pin","SESSION_NOT_FOUND":"Sessione non trovata","SESSION_IS_NOT_ADMINISTRATIVE":"Sessione non amministrativa","MEMORI_MISSING_CONFIGURATION":"Memori: configurazione mancante","MEMORI_CONFIGURATION_NOT_FOUND":"Memori: configurazione non trovata","MEMORI_INVALID_PRIVACY_TYPE":"Memori: tipo di privacy non valido","MEMORI_MISSING_PASSWORD":"Memori: password mancante","MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS":"Memori: numero totale di token di recupero non valido","MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS":"Memori: numero minimo di token di recupero non valido","MEMORI_INVALID_VOICE_TYPE":"Memori: tipo di voce non valido","MEMORI_MISSING_NAME":"Memori: nome mancante","MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS":"Memori: password o token di recupero mancanti","MEMORI_INVALID_ID":"Memori: ID non valido","MEMORI_NAME_ALREADY_USED":"Nome memori già in uso","MEMORI_INVALID_PIN":"Memori: PIN non valido","MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION":"Memori: cambio TAG e PIN richiedono operazioni separate","MEMORI_NO_PASSWORD_WHEN_PUBLIC":"Memori: password non richiesta su Memori pubblico","MEMORI_TRANSFER_MISSING_DESTINATION_USER":"Trasferimento: utente di destinazione mancante","MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID":"Trasferimento: ID utente di destinazione non valido","MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT":"Trasferimento: dati utente di destinazione non validi","MEMORI_TRANSFER_NOTHING_TO_DO":"Trasferimento: alcuna operazione da fare","MEMORI_CONFIGURATION_CANT_BE_CHANGED":"Memori: la configurazione non può essere modificata","MEMORI_MISSING_NEW_PASSWORD":"Memori: nuova password mancante","INTEGRATION_NOT_FOUND":"Integrazione non trovata","MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT":"Formato non valido data a partire da","MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT":"Formato non valido data fino a","INTEGRATION_INVALID_TYPE":"Tipo integrazione non valido","INTEGRATION_ALREADY_EXISTS":"Integrazione già esistente","INTEGRATION_MEMORI_IS_NOT_PUBLIC":"Memori non pubblici non possono essere integrati","INTEGRATION_MISSING_INVOCATION_TEXT":"Integrazione: testo di invocazione mancante","INTEGRATION_MISSING_DEVICE_EMAILS":"Integrazione: email del dispositivo mancante","INTEGRATION_MEMORI_IS_EMPTY":"Memori vuoti non possono essere integrati","INTEGRATION_MISSING_PRIVACY_POLICY":"Integrazione: privacy policy mancante","INTEGRATION_MISSING_CATEGORY":"Categoria integrazione mancante","INTEGRATION_MISSING_DESCRIPTION":"Descrizione integrazione mancante","INTEGRATION_INVALID_INVOCATION_TEXT":"Testo di invocazione non valido","INTEGRATION_GOOGLE_NO_MORE_AVAILABLE":"Google Home non più disponibile","UPLOAD_REQUIRES_MULTIPART_ENCODING":"L\'upload richiede l\'encoding multipart","UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY":"Upload: manca il content type boundary","UPLOAD_MAX_LENGTH_EXCEEDED":"Upload: dimensione massima superata","UPLOAD_FILE_IS_EMPTY":"Upload: file vuoto","UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE":"Upload: tipo di file o firma non validi","UPLOAD_MISSING_FILE_NAME":"Upload: nome file mancante","UPLOAD_INVALID_MEMORY_ID":"Upload: ID contenuto non valido","UPLOAD_MISSING_FILE_CONTENT":"Upload: contenuto file mancante","ASSET_NOT_FOUND":"Asset non trovato","ASSET_NOT_ACCESSIBLE":"Asset non accessibile","ASSET_MISSING_SESSION_ID":"Asset: ID sessione mancante","ASSET_INVALID_FILE_NAME":"Asset: nome file non valido","INVITATION_NOT_FOUND":"Invito non trovato","INVITATION_NOT_ACCESSIBLE":"Invito non accessibile","INVITATION_ALREADY_ACCEPTED":"Invito già accettato","INVITATION_ALREADY_REJECTED":"Invito già rifiutato","INVITATION_MISSING_DESTINATION_EMAIL":"Invito: email di destinazione mancante","INVITATION_DESTINATION_EMAIL_INVALID":"Invito: email di destinazione non valida","INVITATION_MISSING_TAG":"Invito: tag mancante","INVITATION_MISSING_PIN":"Invito: PIN mancante","INVITATION_INVALID_PIN":"Invito: PIN non valido","INVITATION_INVALID_TYPE":"Invito: tipo non valido","INVITATION_MISSING_DESTINATION_NAME":"Invito: nome destinatario mancante","INVITATION_TAG_PIN_CANT_BE_CHANGED":"Invito: tag e pin non possono essere cambiati","INVITATION_CANT_BE_CHANGED":"Invito: non può essere modificato","ACTIONLOG_INVALID_USER_ID":"ID utente non valido","ACTIONLOG_INVALID_DATE_FROM_FORMAT":"Data a partire da: formato non valido","ACTIONLOG_INVALID_DATE_TO_FORMAT":"Data fino a: formato non valido","ACTIONLOG_INVALID_MEMORI_ID":"ID Memori non valido","CONSUMPTIONLOG_INVALID_TYPE":"Tipo di log non valido","CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT":"Data a partire da: formato non valido","CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT":"Data fino a: formato non valido","CONSUMPTIONLOG_INVALID_USER_ID":"ID utente non valido","CONSUMPTIONLOG_INVALID_MEMORI_ID":"Memori ID non valido"}}');const RX={en:{translation:r(JSON.parse('{"yes":"Yes","no":"No","confirm":"Confirm","cancel":"Cancel","show":"Show","hide":"Hide","send":"Send","close":"Close","edit":"Edit","delete":"Delete","loading":"Loading","copy":"Copy","copyToClipboard":"Copy to clipboard","showOriginalText":"Show original","showTranslatedText":"Show translation","memoriBlockedTitle":"Blocked","memoriBlockedUntil":"Memori blocked until {{date}}","memoriBlockedAnon":"Currently \\"{{name}}\\" can\'t answer, come back here on {{date}}","memoriBlockedReasonExceedChats":"because it has exceeded the monthly threshold of allowed chats.","memoriBlockedGiverHelper":"You can still manage it as administrator, but other users will not be able to interact with it.","auth":{"useRecoveryTokens":"Use recovery tokens","tokens":"Tokens","addToken":"Add token","usePassword":"Use password","atLeast":"At least"},"widget":{"instruct":"Instruct","test":"Test","sound":"Sound","position":"Position","settings":"Settings","share":"Share","sendOnKeypress":"Hit Enter to send","sendOnClick":"Click on Submit","goToIntegrationsToCustomizeAvatar":"To customize the avatar, go to Share and customize the public page"},"write_and_speak":{"micButtonPopover":"Click the button to speak","micButtonPopoverListening":"Click the button to stop speak","pageInstructExplanation":"To teach me new things click on the INSTRUCT ME button to get started","pageTryMeExplanation":"To talk to me click on the START button to get started","instructButton":"INSTRUCT ME","tryMeButton":"START","chatHistory":"Chat history","exportChatHistory":"Export chat history","exportChatHistoryMessage":"Do you want to export chat history?","chatBotButtonText":"CLICK HERE TO OPEN CHATBOT","conversationStartedLabel":"Conversation started on","settingsHeaderLabel":"Setup here if you want to set the memori as continuous speech, and change the silence seconds if you want to customize them.","continuousSpeechLabel":"Continuous speech","secondsLabel":"Set seconds","tryMeHeaderLabel":"TRY","unknownPosition":"Unknown position","fieldPlace":"Write the place (eg \'Milano\')","showMapLinkFor":"Show the position on the map","useMyPosition":"Use my position","myPosition":"Your position","updatingPosition":"Updating position...","placeNotFound":"Place not found!","requirePosition":"Insert your position before start","attachmentsLabel":"Enrich your message","iWantToTalkToIn":"I want to talk to {{name}} in"},"media":{"title":"Title","editAttributes":"Edit media attributes","uploadMimeTypeNotAllowed":"The file type is not allowed","uploadSizeLimitMessage":"The uploaded size is too big (max {{size}}MB)","uploadWrongResolutionMessage":"The resolution must be {{width}}x{{height}} pixel","memoriNameAlreadyUsed":"You already have a Twin with this name","uploadHelperImages":"Upload a file with extension png, jpg, jpeg or gif, and having at maximum a size of {{size}}MB","uploadHelper":"Upload a file having at maximum a size of {{size}}MB","uploadError":"Upload failed","square":"square","scaleRatio":"Scale ratio","addMediaLabel":"Add a media","insertThisMediaMsg":"Insert these media","mediaUploadMessage":"Click to load a new media","addLinkLabel":"Add a link","linkKey":"URL","linkValue":"Link title","insertThisLink":"Insert a link to {{url}} with title {{title}}"},"gamification":{"level":"Level","points":"points","memoriReachedLevel":"became more evolved and reached level","levelGoToStatistics":"{{memori}} is at level {{level}} with {{points}} points. Click to go to statistics.","congratulationsNewLevel":"Congratulations, you have reached a new level!","congratulationsNewLevelDescription":"Your Memori became more evolved with {{points}} points, look at the","statistics":"statistics"},"success":"Success","Error":"Error","internal server error":"Oupsie, sorry... Something went wrong on the server","error":"Error","error.loading":"Error while loading content.","error.generic":"Oupsie, sorry... something went wrong.","error.serverNotResponding":"We are doing maintenance or releasing updates. Please try again later.","error.notFound":"Oupsie, we didn\'t find the page you were looking for.","error.goBackTo":"You can try to go back to the","error.reloadPage":"Reload the page","error.tryAgain":"Try again","error.unauthorized":"You are unauthorized to view this content.","error.unprocessableEntity":"Error while processing the request. Check the data you entered.","errors":{"TENANT_NOT_FOUND":"Tenant not found","TENANT_REGISTRATION_DISABLED":"Registration on this platform is disabled","TENANT_MISSING_NAME":"Tenant: name missing","TENANT_MAX_USERS_REACHED":"Maximum number of users reached","TENANT_MAX_ADMINS_REACHED":"Maximum number of admin users reached","USER_NOT_CONFIRMED":"User still not confirmed","USER_NOT_FOUND":"User not found","USER_OR_PASSWORD_INVALID":"Invalid user or password","USER_MUST_CHANGE_PASSWORD":"You must change your password","USER_MUST_ENTER_VERIFICATION_CODE":"You must enter the verification code","USER_MISSING_TENANT":"User: missing tenant","USER_MISSING_NAME":"User: name is missing","USER_MISSING_PASSWORD":"User: password missing","USER_MISSING_EMAIL":"User: Missing email","USER_MISSING_VERIFICATION_CODE":"User: Missing verification code","USER_NAME_ALREADY_USED":"User name already in use","USER_PASSWORD_NOT_CONFORMING_TO_POLICY":"The password does not meet the security rules","USER_EMAIL_ALREADY_USED":"Email already in use","USER_EMAIL_INVALID":"Invalid email","USER_VERIFICATION_CODE_INVALID":"Invalid verification code","USER_MISSING_NAME_OR_EMAIL":"Missing username or email","USER_NAME_INVALID":"Invalid user name","USER_HAS_ONE_OR_MORE_MEMORI":"The user has one or more memories","USER_MISSING_NEW_PASSWORD":"User: new password missing","USER_NOTHING_TO_DO":"Nothing to do","USER_CANT_CREATE_MEMORI":"User not allowed to create Memori","USER_MAX_MEMORI_REACHED":"Maximum number of Memori reached","USER_CANT_EDIT_INTEGRATIONS":"User not allowed to manage integrations","MEMORI_NOT_FOUND":"Memori not found","MEMORI_NOT_ACCESSIBLE":"Memori not accessible","MEMORI_ONLY_OWNER_CAN_CHANGE_GIVER_TAG_AND_PIN":"Only owner can change tag or pin","SESSION_NOT_FOUND":"Session not found","SESSION_IS_NOT_ADMINISTRATIVE":"Non-administrative session","MEMORI_MISSING_CONFIGURATION":"Memori: missing configuration","MEMORI_CONFIGURATION_NOT_FOUND":"Memories: configuration not found","MEMORI_INVALID_PRIVACY_TYPE":"Memories: invalid privacy type","MEMORI_MISSING_PASSWORD":"Memori: missing password","MEMORI_INVALID_TOTAL_NUMBER_OF_RECOVERY_TOKENS":"Memories: total number of invalid recovery tokens","MEMORI_INVALID_MINIMUM_NUMBER_OF_RECOVERY_TOKENS":"Memories: minimum number of invalid recovery tokens","MEMORI_INVALID_VOICE_TYPE":"Memories: invalid voice type","MEMORI_MISSING_NAME":"Memories: missing name","MEMORI_MISSING_PASSWORD_OR_RECOVERY_TOKENS":"Memories: missing password or recovery token","MEMORI_INVALID_ID":"Memories: invalid ID","MEMORI_NAME_ALREADY_USED":"Memory name already in use","MEMORI_INVALID_PIN":"Memories: Invalid PIN","MEMORI_GIVER_TAG_PIN_CHANGE_REQUIRES_SEPARATE_OPERATION":"Memories: TAG and PIN change require separate operations","MEMORI_NO_PASSWORD_WHEN_PUBLIC":"Memories: no password required when public","MEMORI_TRANSFER_MISSING_DESTINATION_USER":"Transfer: missing destination user","MEMORI_TRANSFER_INVALID_DESTINATION_USER_ID":"Transfer: invalid destination user ID","MEMORI_TRANSFER_DESTINATION_USER_DATA_INCONSISTENT":"Transfer: invalid destination user data","MEMORI_TRANSFER_NOTHING_TO_DO":"Transfer: nothing to do","MEMORI_CONFIGURATION_CANT_BE_CHANGED":"Memories: configuration cannot be changed","MEMORI_MISSING_NEW_PASSWORD":"Memories: new password missing","INTEGRATION_NOT_FOUND":"Integration not found","MEMORI_SESSIONS_INVALID_DATE_FROM_FORMAT":"Invalid date from format","MEMORI_SESSIONS_INVALID_DATE_TO_FORMAT":"Invalid date to format","INTEGRATION_INVALID_TYPE":"Invalid integration type","INTEGRATION_ALREADY_EXISTS":"Integration already exists","INTEGRATION_MEMORI_IS_NOT_PUBLIC":"Non-public memories cannot be integrated","INTEGRATION_MISSING_INVOCATION_TEXT":"Integration: missing invocation text","INTEGRATION_MISSING_DEVICE_EMAILS":"Integration: missing device email","INTEGRATION_MEMORI_IS_EMPTY":"Empty memories cannot be integrated","INTEGRATION_MISSING_PRIVACY_POLICY":"Integration: privacy policy missing","INTEGRATION_MISSING_CATEGORY":"Integration category missing","INTEGRATION_MISSING_DESCRIPTION":"Missing integration description","INTEGRATION_INVALID_INVOCATION_TEXT":"Invalid invocation text","INTEGRATION_GOOGLE_NO_MORE_AVAILABLE":"Google Home no more available","UPLOAD_REQUIRES_MULTIPART_ENCODING":"Upload requires multipart encoding","UPLOAD_MISSING_CONTENT_TYPE_BOUNDARY":"Upload: missing content type boundary","UPLOAD_MAX_LENGTH_EXCEEDED":"Upload: maximum size exceeded","UPLOAD_FILE_IS_EMPTY":"Upload: empty file","UPLOAD_INVALID_FILE_TYPE_OR_SIGNATURE":"Upload: invalid file type or signature","UPLOAD_MISSING_FILE_NAME":"Upload: missing file name","UPLOAD_INVALID_MEMORY_ID":"Upload: Invalid content ID","UPLOAD_MISSING_FILE_CONTENT":"Upload: Missing file content","ASSET_NOT_FOUND":"Asset not found","ASSET_NOT_ACCESSIBLE":"Asset not accessible","ASSET_MISSING_SESSION_ID":"Asset: missing session ID","ASSET_INVALID_FILE_NAME":"Asset: invalid file name","INVITATION_NOT_FOUND":"Invitation not found","INVITATION_NOT_ACCESSIBLE":"Invitation not accessible","INVITATION_ALREADY_ACCEPTED":"Invitation already accepted","INVITATION_ALREADY_REJECTED":"Invitation already rejected","INVITATION_MISSING_DESTINATION_EMAIL":"Invitation: missing destination email","INVITATION_DESTINATION_EMAIL_INVALID":"Invitation: destination email invalid","INVITATION_MISSING_TAG":"Invitation: missing tag","INVITATION_MISSING_PIN":"Invitation: PIN missing","INVITATION_INVALID_PIN":"Invitation: invalid PIN","INVITATION_INVALID_TYPE":"Invitation: invalid type","INVITATION_MISSING_DESTINATION_NAME":"Invitation: destination name missing","INVITATION_TAG_PIN_CANT_BE_CHANGED":"Invitation: tag and pin can\'t be changed","INVITATION_CANT_BE_CHANGED":"Intation: can\'t be changed","ACTIONLOG_INVALID_USER_ID":"Invalid user ID","ACTIONLOG_INVALID_DATE_FROM_FORMAT":"Date from: invalid format","ACTIONLOG_INVALID_DATE_TO_FORMAT":"Date to: invalid format","ACTIONLOG_INVALID_MEMORI_ID":"Invalid Memori ID","CONSUMPTIONLOG_INVALID_TYPE":"Invalid log type","CONSUMPTIONLOG_INVALID_DATE_FROM_FORMAT":"Date from: invalid format","CONSUMPTIONLOG_INVALID_DATE_TO_FORMAT":"Date to: invalid format","CONSUMPTIONLOG_INVALID_USER_ID":"Invalid user ID","CONSUMPTIONLOG_INVALID_MEMORI_ID":"Invalid Memori ID"}}'))},it:{translation:r(IX)}};OX.use(Gi).init({resources:RX,lng:"en",fallbackLng:"it",supportedLngs:["en","it"],nonExplicitSupportedLngs:!0,interpolation:{escapeValue:!1}});var PX=OX;const NX=({ownerUserName:e,ownerUserID:t,memoriName:n,memoriID:o,integrationID:i,tenantID:a,secretToken:s,sessionID:l,showShare:c=!0,showSettings:d=!1,showInstruct:f=!1,height:h="100%",baseURL:p,apiURL:m="https://backend.memori.ai",tag:g,pin:v,context:b,initialQuestion:y,uiLang:w,spokenLang:x,authToken:S,AZURE_COGNITIVE_SERVICES_TTS_KEY:M,onStateChange:_})=>{var E,A,C;const[k,T]=(0,u.useState)(),{t:I}=ea();if(!(o&&t||n&&e))throw new Error("Identifier pair required: please provide either memoriID and ownerUserID or memoriName and ownerUserName");const O=mi(m),R=(0,u.useCallback)((async()=>{if(o&&t){const{memori:e,...n}=await O.backend.getMemoriByUserAndId(a,t,o);0===n.resultCode&&e?T(e):console.error("[MEMORI]",n,e)}else if(n&&e){const{memori:t,...r}=await O.backend.getMemori(a,e,n);0===r.resultCode&&t?T(t):console.error("[MEMORI]",r,t)}}),[o,t,n,e,a]);return(0,u.useEffect)((()=>{R()}),[R,a]),(0,u.useEffect)((()=>{if(w)PX.changeLanguage(w.toLowerCase());else{const{lng:e,fallbackLng:t}=(()=>{const e=navigator.language;if(e){let t=e.split("-")[0];if(["en","it"].includes(t))return{lng:t,fallbackLng:"en"===t?"it":"en"}}return{lng:"en",fallbackLng:"it"}})();PX.changeLanguage(e).catch((()=>{PX.changeLanguage(t)}))}}),[w]),k?r(u).createElement(sJ,{height:h,baseUrl:p||(a.startsWith("https://")?a:`https://${a}`),apiUrl:m,memori:{...k,secretToken:s},memoriLang:null!=x?x:null===(A=null===(E=k.culture)||void 0===E?void 0:E.split("-"))||void 0===A?void 0:A[0],tenant:{id:a,theme:"twincreator",config:{name:a,showNewUser:!1,requirePosition:!!k.needsPosition}},secret:s,sessionID:l,showShare:c,showSettings:d,showInstruct:f,integration:null===(C=null==k?void 0:k.integrations)||void 0===C?void 0:C.find((e=>i?e.integrationID===i:!!e.publish&&"LANDING_EXPERIENCE"===e.type)),initialContextVars:b,initialQuestion:y,authToken:S,AZURE_COGNITIVE_SERVICES_TTS_KEY:M,onStateChange:_,...g&&v?{personification:{tag:g,pin:v}}:{}}):r(u).createElement("div",null,r(u).createElement("p",{style:{textAlign:"center",margin:"2rem auto"}},I("loading"),"..."))};NX.propTypes={memoriName:r(l).string,memoriID:r(l).string,ownerUserName:r(l).string,ownerUserID:r(l).string,integrationID:r(l).string,tenantID:r(l).string.isRequired,secretToken:r(l).string,sessionID:r(l).string,showShare:r(l).bool,showSettings:r(l).bool,showInstruct:r(l).bool,height:r(l).oneOfType([r(l).string,r(l).number]),baseURL:r(l).string,apiURL:r(l).string,tag:r(l).string,pin:r(l).string,context:r(l).objectOf(r(l).any),initialQuestion:r(l).string,uiLang:r(l).oneOf(["en","it"]),spokenLang:r(l).string,authToken:r(l).string,AZURE_COGNITIVE_SERVICES_TTS_KEY:r(l).string,onStateChange:r(l).func};var LX=NX;class BX extends HTMLElement{connectedCallback(){const e=document.createElement("div"),t=document.createElement("div");t.setAttribute("id","memori-root");const n=document.createElement("style");n.innerHTML="\n @import url('https://unpkg.com/@memori.ai/memori-webcomponent/dist/memori-webcomponent.css');\n ",e.appendChild(n),e.appendChild(t),this.appendChild(e);const o=Object.keys(LX.propTypes).reduce(((e,t)=>(this.hasAttribute(t)&&(e[t]=this.getAttribute(t)),e)),{}),i=this.getAttribute("tenantId"),a=this.getAttribute("context")?.split(",")?.reduce(((e,t)=>{const[n,r]=t.split(":").map((e=>e.trim()));return{...e,[n]:r}}),{});i?r(c).render((0,s.jsx)(LX,{...o,context:a,tenantID:i}),t):console.error("No tenantId attribute found")}}customElements.define("memori-client",BX)})();