@smartledger/bsv 6.1.2 → 6.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +38 -38
  3. package/SECURITY.md +39 -12
  4. package/bsv-anchor.min.js +18 -11
  5. package/bsv-covenant.min.js +2 -48
  6. package/bsv-didweb.min.js +18 -11
  7. package/bsv-ecies.min.js +2 -20
  8. package/bsv-gdaf.min.js +103 -45
  9. package/bsv-ltp.min.js +103 -45
  10. package/bsv-message.min.js +3 -10
  11. package/bsv-mnemonic.min.js +20 -11
  12. package/bsv-script-helper.min.js +2 -10
  13. package/bsv-security.min.js +2 -10
  14. package/bsv-shamir.min.js +20 -11
  15. package/bsv-smartcontract.min.js +26 -48
  16. package/bsv-statuslist.min.js +74 -17
  17. package/bsv-vcjwt.min.js +18 -11
  18. package/bsv.bundle.js +103 -45
  19. package/bsv.min.js +103 -45
  20. package/build/esbuild/empty.js +2 -0
  21. package/build/esbuild/globals.js +6 -0
  22. package/build/esbuild.js +129 -0
  23. package/docs/MODULE_REFERENCE_COMPLETE.md +27 -27
  24. package/docs/THREAT_MODEL.md +127 -0
  25. package/docs/advanced/UTXO_MANAGER_GUIDE.md +1 -1
  26. package/docs/getting-started/INSTALLATION.md +23 -23
  27. package/docs/getting-started/QUICK_START.md +7 -7
  28. package/docs/migration/FROM_BSV_1_5_6.md +5 -5
  29. package/index.js +3 -2
  30. package/lib/smart_contract/index.js +1 -1
  31. package/package.json +5 -23
  32. package/test/build/bundle_smoke.js +55 -0
  33. package/test/build/esbuild_main.js +65 -0
  34. package/test/build/version_sync.js +14 -0
  35. package/test/security/threat_model_coverage.js +31 -0
  36. package/version.js +3 -0
  37. package/build/webpack.anchor.config.js +0 -15
  38. package/build/webpack.base.js +0 -125
  39. package/build/webpack.bundle.config.js +0 -15
  40. package/build/webpack.config.js +0 -17
  41. package/build/webpack.covenant.config.js +0 -17
  42. package/build/webpack.didweb.config.js +0 -15
  43. package/build/webpack.ecies.config.js +0 -15
  44. package/build/webpack.gdaf.config.js +0 -15
  45. package/build/webpack.ltp.config.js +0 -15
  46. package/build/webpack.message.config.js +0 -15
  47. package/build/webpack.mnemonic.config.js +0 -15
  48. package/build/webpack.script-helper.config.js +0 -17
  49. package/build/webpack.security.config.js +0 -15
  50. package/build/webpack.shamir.config.js +0 -15
  51. package/build/webpack.smartcontract.config.js +0 -18
  52. package/build/webpack.statuslist.config.js +0 -15
  53. package/build/webpack.vcjwt.config.js +0 -15
package/bsv-shamir.min.js CHANGED
@@ -1,11 +1,20 @@
1
- var bsvShamir;(()=>{var __webpack_modules__={9043(t,e,r){"use strict";var n=r(8287).Buffer,i=r(9404),o=r(6365),s=r(4799),a=function(t){for(var e=n.alloc(t.length),r=0;r<t.length;r++)e[r]=t[t.length-1-r];return e};i.Zero=new i(0),i.One=new i(1),i.Minus1=new i(-1),i.fromNumber=function(t){return o.checkArgument(s.isNumber(t)),new i(t)},i.fromString=function(t,e){return o.checkArgument(s.isString(t)),new i(t,e)},i.fromBuffer=function(t,e){void 0!==e&&"little"===e.endian&&(t=a(t));var r=t.toString("hex");return new i(r,16)},i.fromSM=function(t,e){var r;if(0===t.length)return i.fromBuffer(n.from([0]));var o="big";return e&&(o=e.endian),"little"===o&&(t=a(t)),128&t[0]?(t[0]=127&t[0],(r=i.fromBuffer(t)).neg().copy(r)):r=i.fromBuffer(t),r},i.prototype.toNumber=function(){return parseInt(this.toString(10),10)},i.prototype.toBuffer=function(t){var e,r;if(t&&t.size){var o=(r=this.toString(16,2)).length/2;e=n.from(r,"hex"),o===t.size||(o>t.size?e=i.trim(e,o):o<t.size&&(e=i.pad(e,o,t.size)))}else r=this.toString(16,2),e=n.from(r,"hex");return void 0!==t&&"little"===t.endian&&(e=a(e)),e},i.prototype.toSMBigEndian=function(){var t;return-1===this.cmp(i.Zero)?128&(t=this.neg().toBuffer())[0]?t=n.concat([n.from([128]),t]):t[0]=128|t[0]:128&(t=this.toBuffer())[0]&&(t=n.concat([n.from([0]),t])),1===t.length&0===t[0]&&(t=n.from([])),t},i.prototype.toSM=function(t){var e=t?t.endian:"big",r=this.toSMBigEndian();return"little"===e&&(r=a(r)),r},i.fromScriptNumBuffer=function(t,e,r){var n=r||4;if(o.checkArgument(t.length<=n,new Error("script number overflow")),e&&t.length>0&&!(127&t[t.length-1]||!(t.length<=1)&&128&t[t.length-2]))throw new Error("non-minimally encoded script number");return i.fromSM(t,{endian:"little"})},i.prototype.toScriptNumBuffer=function(){return this.toSM({endian:"little"})},i.trim=function(t,e){return t.slice(e-t.length,t.length)},i.pad=function(t,e,r){for(var i=n.alloc(r),o=0;o<t.length;o++)i[i.length-1-o]=t[t.length-1-o];for(o=0;o<r-e;o++)i[o]=0;return i},i.prototype.toHex=function(...t){return this.toBuffer(...t).toString("hex")},i.fromHex=function(t,...e){return i.fromBuffer(n.from(t,"hex"),...e)},t.exports=i},6773(t,e,r){"use strict";var n=r(8287).Buffer,i=r(7952),o=r(6365),s=t.exports;s.sha1=function(t){return o.checkArgument(n.isBuffer(t)),n.from(i.sha1().update(t).digest("hex"),"hex")},s.sha1.blocksize=512,s.sha256=function(t){return o.checkArgument(n.isBuffer(t)),n.from(i.sha256().update(t).digest("hex"),"hex")},s.sha256.blocksize=512,s.sha256sha256=function(t){return o.checkArgument(n.isBuffer(t)),s.sha256(s.sha256(t))},s.ripemd160=function(t){return o.checkArgument(n.isBuffer(t)),n.from(i.ripemd160().update(t).digest("hex"),"hex")},s.sha256ripemd160=function(t){return o.checkArgument(n.isBuffer(t)),s.ripemd160(s.sha256(t))},s.sha512=function(t){return o.checkArgument(n.isBuffer(t)),n.from(i.sha512().update(t).digest("hex"),"hex")},s.sha512.blocksize=1024,s.hmac=function(t,e,r){o.checkArgument(n.isBuffer(e)),o.checkArgument(n.isBuffer(r)),o.checkArgument(t.blocksize);var i=t.blocksize/8;if(r.length>i)r=t(r);else if(r<i){var s=n.alloc(i);s.fill(0),r.copy(s),r=s}var a=n.alloc(i);a.fill(92);var h=n.alloc(i);h.fill(54);for(var u=n.alloc(i),f=n.alloc(i),l=0;l<i;l++)u[l]=a[l]^r[l],f[l]=h[l]^r[l];return t(n.concat([u,t(n.concat([f,e]))]))},s.sha256hmac=function(t,e){return s.hmac(s.sha256,t,e)},s.sha512hmac=function(t,e){return s.hmac(s.sha512,t,e)}},5067(t,e,r){r(5606).browser?t.exports=r(6773):t.exports=r(7581)},7581(t,e,r){"use strict";var n=r(8287).Buffer,i=r(1565),o=r(6365),s=t.exports;s.sha1=function(t){return o.checkArgument(n.isBuffer(t)),i.createHash("sha1").update(t).digest()},s.sha1.blocksize=512,s.sha256=function(t){return o.checkArgument(n.isBuffer(t)),i.createHash("sha256").update(t).digest()},s.sha256.blocksize=512,s.sha256sha256=function(t){return o.checkArgument(n.isBuffer(t)),s.sha256(s.sha256(t))},s.ripemd160=function(t){return o.checkArgument(n.isBuffer(t)),i.createHash("ripemd160").update(t).digest()},s.sha256ripemd160=function(t){return o.checkArgument(n.isBuffer(t)),s.ripemd160(s.sha256(t))},s.sha512=function(t){return o.checkArgument(n.isBuffer(t)),i.createHash("sha512").update(t).digest()},s.sha512.blocksize=1024,s.hmac=function(t,e,r){o.checkArgument(n.isBuffer(e)),o.checkArgument(n.isBuffer(r)),o.checkArgument(t.blocksize);var i=t.blocksize/8;if(r.length>i)r=t(r);else if(r<i){var s=n.alloc(i);s.fill(0),r.copy(s),r=s}var a=n.alloc(i);a.fill(92);var h=n.alloc(i);h.fill(54);for(var u=n.alloc(i),f=n.alloc(i),l=0;l<i;l++)u[l]=a[l]^r[l],f[l]=h[l]^r[l];return t(n.concat([u,t(n.concat([f,e]))]))},s.sha256hmac=function(t,e){return s.hmac(s.sha256,t,e)},s.sha512hmac=function(t,e){return s.hmac(s.sha512,t,e)}},9968(t,e,r){"use strict";var n=r(5606),i=r(8287).Buffer;function o(){}o.getRandomBuffer=function(t){return n.browser?o.getRandomBufferBrowser(t):o.getRandomBufferNode(t)},o.getRandomBufferNode=function(t){return r(1565).randomBytes(t)},o.getRandomBufferBrowser=function(t){if(!window.crypto&&!window.msCrypto)throw new Error("window.crypto not available");var e;if(window.crypto&&window.crypto.getRandomValues)e=window.crypto;else{if(!window.msCrypto||!window.msCrypto.getRandomValues)throw new Error("window.crypto.getRandomValues not available");e=window.msCrypto}var r=new Uint8Array(t);return e.getRandomValues(r),i.from(r)},t.exports=o},261(t,e,r){"use strict";var n=r(8287).Buffer,i=r(9043),o=r(9968),s=r(5067),a=null;function h(){if(a)return a;var t=r(8015);return t.setRNG(function(t){for(var e=0;e<64;e++){for(var r=o.getRandomBuffer(Math.ceil(t/8)),n="",i=0;i<r.length;i++)n+=("00000000"+r[i].toString(2)).slice(-8);if(n=n.slice(0,t),/1/.test(n))return n}throw new Error("shamir: CSPRNG returned all-zero draws 64 times in a row — refusing to hang on a degenerate/stubbed random source")}),a=t}var u="ff";function f(t){return this instanceof f?(this.options=t||{},this):new f(t)}f.split=function(t,e,r,i){if(i=i||{},null==t)throw new Error("Secret is required");if(e<2)throw new Error("Threshold must be at least 2");if(r<e)throw new Error("Number of shares must be at least threshold");if(e>255||r>255)throw new Error("Threshold and shares must be <= 255");for(var a=n.isBuffer(t)?t:n.from(t,"utf8"),f=u+a.toString("hex"),l=h().share(f,r,e),c=o.getRandomBuffer(8).toString("hex"),d=!0===i.checksum?s.sha256(a).slice(0,4).toString("hex"):null,p=[],m=0;m<l.length;m++)p.push({v:2,id:m+1,threshold:e,shares:r,length:a.length,splitId:c,share:l[m],checksum:d});return p},f.combine=function(t){if(!t||0===t.length)throw new Error("Shares array is required");if(t[0]&&Array.isArray(t[0].bytes)&&void 0===t[0].share)return f._combineLegacy(t);var e=t[0].threshold,r=t[0].splitId;if(t.length<e)throw new Error("Insufficient shares: need "+e+", got "+t.length);for(var i=[],o=0;o<t.length;o++){var a=t[o];if(!a||"string"!=typeof a.share)throw new Error("Invalid share at index "+o);if(void 0!==r&&a.splitId!==r)throw new Error("Shares are from different splits (splitId mismatch)");if(a.threshold!==e)throw new Error("Shares have inconsistent threshold");i.push(a.share)}var l=h().combine(i);if(l.slice(0,2)!==u)throw new Error("Reconstruction failed: invalid or insufficient shares");var c=n.from(l.slice(2),"hex"),d=t[0].checksum;if(d&&s.sha256(c).slice(0,4).toString("hex")!==d)throw new Error("Integrity check failed: shares are inconsistent or tampered");return c},f.verifyShare=function(t){try{return!(!t||"object"!=typeof t)&&(Array.isArray(t.bytes)&&void 0===t.share?f._verifyLegacyShare(t):2===t.v&&(!("string"!=typeof t.share||!/^[0-9a-fA-F]+$/.test(t.share))&&("number"==typeof t.threshold&&"number"==typeof t.shares&&(!(t.threshold<2||t.shares<t.threshold||t.shares>255)&&(!(t.id<1||t.id>t.shares)&&(!(null!==t.checksum&&void 0!==t.checksum&&!/^[0-9a-fA-F]{8}$/.test(t.checksum))&&(h().extractShareComponents(t.share),!0)))))))}catch(t){return!1}},f.generateTestVectors=function(){var t="Hello, Bitcoin SV!",e=f.split(t,3,5),r=f.combine(e.slice(0,3));return{secret:t,threshold:3,totalShares:5,shares:e,reconstructed:r.toString("utf8"),valid:r.toString("utf8")===t}};var l=new i(2147483647);f._combineLegacy=function(t){var e=t[0].threshold,r=t[0].shares,i=t[0].length;if(t.length<e)throw new Error("Insufficient shares: need "+e+", got "+t.length);for(var o=0;o<t.length;o++){if(t[o].threshold!==e||t[o].shares!==r)throw new Error("Shares have inconsistent parameters");if(t[o].length!==i)throw new Error("Shares have different secret lengths")}for(var s=[],a=0;a<i;a++){for(var h=[],u=0;u<Math.min(t.length,e);u++)h.push(t[u].bytes[a]);s.push(f._combineByteLegacy(h))}return n.from(s)},f._combineByteLegacy=function(t){for(var e=new i(0),r=0;r<t.length;r++){for(var n=new i(t[r].x),o=new i(t[r].y,16),s=new i(1),a=new i(1),h=0;h<t.length;h++)if(r!==h){var u=new i(t[h].x),c=new i(0).sub(u);c.lt(new i(0))&&(c=c.add(l)),s=s.mul(c).mod(l);var d=n.sub(u);d.lt(new i(0))&&(d=d.add(l)),a=a.mul(d).mod(l)}var p=f._modInverseLegacy(a,l),m=s.mul(p).mod(l);e=e.add(o.mul(m)).mod(l)}return e.mod(l).mod(new i(256)).toNumber()},f._modInverseLegacy=function(t,e){t.lt(new i(0))&&(t=t.mod(e).add(e));var r=f._extendedGCDLegacy(t,e);if(!r.gcd.eq(new i(1)))throw new Error("Modular inverse does not exist");return r.x.mod(e).add(e).mod(e)},f._extendedGCDLegacy=function(t,e){if(t.eq(new i(0)))return{gcd:e,x:new i(0),y:new i(1)};var r=f._extendedGCDLegacy(e.mod(t),t);return{gcd:r.gcd,x:r.y.sub(e.div(t).mul(r.x)),y:r.x}},f._verifyLegacyShare=function(t){if(!(t.id&&t.threshold&&t.shares&&t.bytes&&"number"==typeof t.length))return!1;if(t.threshold<2||t.shares<t.threshold)return!1;if(!Array.isArray(t.bytes)||t.bytes.length!==t.length)return!1;for(var e=0;e<t.bytes.length;e++){var r=t.bytes[e];if(!r||!r.x||!r.y)return!1;if(r.x<1||r.x>t.shares)return!1;if(!/^[0-9a-fA-F]+$/.test(r.y))return!1}return!0},t.exports=f},3649(t,e,r){"use strict";var n=r(4799);var i=function(t,e){var r=function(){if(n.isString(e.message))this.message=(t=e.message,r=arguments,t.replace("{0}",r[0]).replace("{1}",r[1]).replace("{2}",r[2]));else{if(!n.isFunction(e.message))throw new Error("Invalid error definition for "+e.name);this.message=e.message.apply(null,arguments)}var t,r;this.stack=this.message+"\n"+(new Error).stack};return(r.prototype=Object.create(t.prototype)).name=t.prototype.name+e.name,t[e.name]=r,e.errors&&o(r,e.errors),r},o=function(t,e){n.each(e,function(e){i(t,e)})},s={Error:function(){this.message="Internal error",this.stack=this.message+"\n"+(new Error).stack}};s.Error.prototype=Object.create(Error.prototype),s.Error.prototype.name="bsv.Error";var a,h=r(5486);a=s.Error,o(a,h),t.exports=s.Error,t.exports.extend=function(t){return i(s.Error,t)}},5486(t){"use strict";t.exports=[{name:"InvalidB58Char",message:"Invalid Base58 character: {0} in {1}"},{name:"InvalidB58Checksum",message:"Invalid Base58 checksum for {0}"},{name:"InvalidNetwork",message:"Invalid version for network: got {0}"},{name:"InvalidState",message:"Invalid state: {0}"},{name:"NotImplemented",message:"Function {0} was not implemented yet"},{name:"InvalidNetworkArgument",message:'Invalid network: must be "livenet" or "testnet", got {0}'},{name:"InvalidArgument",message:function(){return"Invalid Argument"+(arguments[0]?": "+arguments[0]:"")+(arguments[1]?" Documentation: https://docs.moneybutton.com/"+arguments[1]:"")}},{name:"AbstractMethodInvoked",message:"Abstract Method Invocation: {0}"},{name:"InvalidArgumentType",message:function(){return"Invalid Argument for "+arguments[2]+", expected "+arguments[1]+" but got "+typeof arguments[0]}},{name:"Unit",message:"Internal Error on Unit {0}",errors:[{name:"UnknownCode",message:"Unrecognized unit code: {0}"},{name:"InvalidRate",message:"Invalid exchange rate: {0}"}]},{name:"MerkleBlock",message:"Internal Error on MerkleBlock {0}",errors:[{name:"InvalidMerkleTree",message:"This MerkleBlock contain an invalid Merkle Tree"}]},{name:"Transaction",message:"Internal Error on Transaction {0}",errors:[{name:"Input",message:"Internal Error on Input {0}",errors:[{name:"MissingScript",message:"Need a script to create an input"},{name:"UnsupportedScript",message:"Unsupported input script type: {0}"},{name:"MissingPreviousOutput",message:"No previous output information."}]},{name:"NeedMoreInfo",message:"{0}"},{name:"InvalidSorting",message:"The sorting function provided did not return the change output as one of the array elements"},{name:"InvalidOutputAmountSum",message:"{0}"},{name:"MissingSignatures",message:"Some inputs have not been fully signed"},{name:"InvalidIndex",message:"Invalid index: {0} is not between 0, {1}"},{name:"UnableToVerifySignature",message:"Unable to verify signature: {0}"},{name:"DustOutputs",message:"Dust amount detected in one output"},{name:"InvalidSatoshis",message:"Output satoshis are invalid"},{name:"FeeError",message:"Internal Error on Fee {0}",errors:[{name:"TooSmall",message:"Fee is too small: {0}"},{name:"TooLarge",message:"Fee is too large: {0}"},{name:"Different",message:"Unspent value is different from specified fee: {0}"}]},{name:"ChangeAddressMissing",message:"Change address is missing"},{name:"BlockHeightTooHigh",message:"Block Height can be at most 2^32 -1"},{name:"NLockTimeOutOfRange",message:"Block Height can only be between 0 and 499 999 999"},{name:"LockTimeTooEarly",message:"Lock Time can't be earlier than UNIX date 500 000 000"}]},{name:"Script",message:"Internal Error on Script {0}",errors:[{name:"UnrecognizedAddress",message:"Expected argument {0} to be an address"},{name:"CantDeriveAddress",message:"Can't derive address associated with script {0}, needs to be p2pkh in, p2pkh out, p2sh in, or p2sh out."},{name:"InvalidBuffer",message:"Invalid script buffer: can't parse valid script from given buffer {0}"}]},{name:"HDPrivateKey",message:"Internal Error on HDPrivateKey {0}",errors:[{name:"InvalidDerivationArgument",message:"Invalid derivation argument {0}, expected string, or number and boolean"},{name:"InvalidEntropyArgument",message:"Invalid entropy: must be an hexa string or binary buffer, got {0}",errors:[{name:"TooMuchEntropy",message:'Invalid entropy: more than 512 bits is non standard, got "{0}"'},{name:"NotEnoughEntropy",message:'Invalid entropy: at least 128 bits needed, got "{0}"'}]},{name:"InvalidLength",message:"Invalid length for xprivkey string in {0}"},{name:"InvalidPath",message:"Invalid derivation path: {0}"},{name:"UnrecognizedArgument",message:'Invalid argument: creating a HDPrivateKey requires a string, buffer, json or object, got "{0}"'}]},{name:"HDPublicKey",message:"Internal Error on HDPublicKey {0}",errors:[{name:"ArgumentIsPrivateExtended",message:"Argument is an extended private key: {0}"},{name:"InvalidDerivationArgument",message:"Invalid derivation argument: got {0}"},{name:"InvalidLength",message:'Invalid length for xpubkey: got "{0}"'},{name:"InvalidPath",message:'Invalid derivation path, it should look like: "m/1/100", got "{0}"'},{name:"InvalidIndexCantDeriveHardened",message:"Invalid argument: creating a hardened path requires an HDPrivateKey"},{name:"MustSupplyArgument",message:"Must supply an argument to create a HDPublicKey"},{name:"UnrecognizedArgument",message:"Invalid argument for creation, must be string, json, buffer, or object"}]}]},4799(t,e,r){"use strict";var n=r(9968),i={isArray:t=>Array.isArray(t),isNumber:t=>"number"==typeof t,isObject:t=>t&&"object"==typeof t,isString:t=>"string"==typeof t,isUndefined:t=>void 0===t,isFunction:t=>"function"==typeof t,isNull:t=>null===t,isDate:t=>t instanceof Date,extend:(t,e)=>Object.assign(t,e),noop:()=>{},every:(t,e)=>t.every(e||(t=>t)),map:(t,e)=>Array.from(t).map(e||(t=>t)),includes:(t,e)=>t.includes(e),each:(t,e)=>t.forEach(e),clone:t=>Object.assign({},t),pick:(t,e)=>{const r={};return e.forEach(e=>{void 0!==t[e]&&(r[e]=t[e])}),r},values:t=>Object.values(t),filter:(t,e)=>t.filter(e),reduce:(t,e,r)=>t.reduce(e,r),without:(t,e)=>t.filter(t=>t!==e),shuffle:t=>{const e=t.slice(0);for(let t=e.length-1;t>0;t--){const r=n.getRandomBuffer(4).readUInt32BE(0)/4294967296,i=Math.floor(r*(t+1));[e[t],e[i]]=[e[i],e[t]]}return e},difference:(t,e)=>t.filter(t=>!e.includes(t)),findIndex:(t,e)=>t.findIndex(e),some:(t,e)=>t.some(e),range:t=>[...Array(t).keys()]};t.exports=i},6365(t,e,r){"use strict";var n=r(3649),i=r(4799);t.exports={checkState:function(t,e){if(!t)throw new n.InvalidState(e)},checkArgument:function(t,e,r,i){if(!t)throw new n.InvalidArgument(e,r,i)},checkArgumentType:function(t,e,o){if(o=o||"(unknown name)",i.isString(e)){if("Buffer"===e){if(!r(8287).Buffer.isBuffer(t))throw new n.InvalidArgumentType(t,e,o)}else if(typeof t!==e)throw new n.InvalidArgumentType(t,e,o)}else if(!(t instanceof e))throw new n.InvalidArgumentType(t,e.name,o)}}},7568(t,e,r){var n=e;n.bignum=r(9404),n.define=r(7363).define,n.base=r(9673),n.constants=r(2153),n.decoders=r(2853),n.encoders=r(4669)},7363(t,e,r){var n=r(7568),i=r(6698);function o(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new o(t,e)},o.prototype._createNamed=function(t){var e;try{e=r(8961).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(t){e=function(t){this._initNamed(t)}}return i(e,t),e.prototype._initNamed=function(e){t.call(this,e)},new e(this)},o.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(n.decoders[t])),this.decoders[t]},o.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},o.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(n.encoders[t])),this.encoders[t]},o.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}},7227(t,e,r){var n=r(6698),i=r(9673).Reporter,o=r(8287).Buffer;function s(t,e){i.call(this,e),o.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function a(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(t){return t instanceof a||(t=new a(t,e)),this.length+=t.length,t},this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=o.byteLength(t);else{if(!o.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}n(s,i),e.t=s,s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(t){var e=new s(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,i.prototype.restore.call(this,t.reporter),e},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},s.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");var r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},s.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.d=a,a.prototype.join=function(t,e){return t||(t=new o(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach(function(r){r.join(t,e),e+=r.length}):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):o.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t}},9673(t,e,r){var n=e;n.Reporter=r(9220).a,n.DecoderBuffer=r(7227).t,n.EncoderBuffer=r(7227).d,n.Node=r(993)},993(t,e,r){var n=r(9673).Reporter,i=r(9673).EncoderBuffer,o=r(9673).DecoderBuffer,s=r(3349),a=["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"],h=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function u(t,e){var r={};this._baseState=r,r.enc=t,r.parent=e||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())}t.exports=u;var f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];u.prototype.clone=function(){var t=this._baseState,e={};f.forEach(function(r){e[r]=t[r]});var r=new this.constructor(e.parent);return r._baseState=e,r},u.prototype._wrap=function(){var t=this._baseState;h.forEach(function(e){this[e]=function(){var r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}},this)},u.prototype._init=function(t){var e=this._baseState;s(null===e.parent),t.call(this),e.children=e.children.filter(function(t){return t._baseState.parent===this},this),s.equal(e.children.length,1,"Root node can have only one child")},u.prototype._useArgs=function(t){var e=this._baseState,r=t.filter(function(t){return t instanceof this.constructor},this);t=t.filter(function(t){return!(t instanceof this.constructor)},this),0!==r.length&&(s(null===e.children),e.children=r,r.forEach(function(t){t._baseState.parent=this},this)),0!==t.length&&(s(null===e.args),e.args=t,e.reverseArgs=t.map(function(t){if("object"!=typeof t||t.constructor!==Object)return t;var e={};return Object.keys(t).forEach(function(r){r==(0|r)&&(r|=0);var n=t[r];e[n]=r}),e}))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach(function(t){u.prototype[t]=function(){var e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}}),a.forEach(function(t){u.prototype[t]=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===e.tag),e.tag=t,this._useArgs(r),this}}),u.prototype.use=function(t){s(t);var e=this._baseState;return s(null===e.use),e.use=t,this},u.prototype.optional=function(){return this._baseState.optional=!0,this},u.prototype.def=function(t){var e=this._baseState;return s(null===e.default),e.default=t,e.optional=!0,this},u.prototype.explicit=function(t){var e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.explicit=t,this},u.prototype.implicit=function(t){var e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.implicit=t,this},u.prototype.obj=function(){var t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},u.prototype.key=function(t){var e=this._baseState;return s(null===e.key),e.key=t,this},u.prototype.any=function(){return this._baseState.any=!0,this},u.prototype.choice=function(t){var e=this._baseState;return s(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map(function(e){return t[e]})),this},u.prototype.contains=function(t){var e=this._baseState;return s(null===e.use),e.contains=t,this},u.prototype._decode=function(t,e){var r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));var n,i=r.default,s=!0,a=null;if(null!==r.key&&(a=t.enterKey(r.key)),r.optional){var h=null;if(null!==r.explicit?h=r.explicit:null!==r.implicit?h=r.implicit:null!==r.tag&&(h=r.tag),null!==h||r.any){if(s=this._peekTag(t,h,r.any),t.isError(s))return s}else{var u=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),s=!0}catch(t){s=!1}t.restore(u)}}if(r.obj&&s&&(n=t.enterObject()),s){if(null!==r.explicit){var f=this._decodeTag(t,r.explicit);if(t.isError(f))return f;t=f}var l=t.offset;if(null===r.use&&null===r.choice){if(r.any)u=t.save();var c=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(c))return c;r.any?i=t.raw(u):t=c}if(e&&e.track&&null!==r.tag&&e.track(t.path(),l,t.length,"tagged"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e)),t.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach(function(r){r._decode(t,e)}),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var d=new o(i);i=this._getUse(r.contains,t._reporterState.obj)._decode(d,e)}}return r.obj&&s&&(i=t.leaveObject(n)),null===r.key||null===i&&!0!==s?null!==a&&t.exitKey(a):t.leaveKey(a,r.key,i),i},u.prototype._decodeGeneric=function(t,e,r){var n=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,n.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):"objid"===t&&n.args?this._decodeObjid(e,n.args[0],n.args[1],r):"objid"===t?this._decodeObjid(e,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(e,t,r):"null_"===t?this._decodeNull(e,r):"bool"===t?this._decodeBool(e,r):"objDesc"===t?this._decodeStr(e,t,r):"int"===t||"enum"===t?this._decodeInt(e,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,e._reporterState.obj)._decode(e,r):e.error("unknown tag: "+t)},u.prototype._getUse=function(t,e){var r=this._baseState;return r.useDecoder=this._use(t,e),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},u.prototype._decodeChoice=function(t,e){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some(function(o){var s=t.save(),a=r.choice[o];try{var h=a._decode(t,e);if(t.isError(h))return!1;n={type:o,value:h},i=!0}catch(e){return t.restore(s),!1}return!0},this),i?n:t.error("Choice not matched")},u.prototype._createEncoderBuffer=function(t){return new i(t,this.reporter)},u.prototype._encode=function(t,e,r){var n=this._baseState;if(null===n.default||n.default!==t){var i=this._encodeValue(t,e,r);if(void 0!==i&&!this._skipDefault(i,e,r))return i}},u.prototype._encodeValue=function(t,e,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new n);var o=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}var s=null,a=!1;if(i.any)o=this._createEncoderBuffer(t);else if(i.choice)o=this._encodeChoice(t,e);else if(i.contains)s=this._getUse(i.contains,r)._encode(t,e),a=!0;else if(i.children)s=i.children.map(function(r){if("null_"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error("Child should have a key");var n=e.enterKey(r._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");var i=r._encode(t[r._baseState.key],e,t);return e.leaveKey(n),i},this).filter(function(t){return t}),s=this._createEncoderBuffer(s);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return e.error("Too many args for : "+i.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");var h=this.clone();h._baseState.implicit=null,s=this._createEncoderBuffer(t.map(function(r){var n=this._baseState;return this._getUse(n.args[0],t)._encode(r,e)},h))}else null!==i.use?o=this._getUse(i.use,r)._encode(t,e):(s=this._encodePrimitive(i.tag,t),a=!0);if(!i.any&&null===i.choice){var u=null!==i.implicit?i.implicit:i.tag,f=null===i.implicit?"universal":"context";null===u?null===i.use&&e.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(u,a,f,s))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},u.prototype._encodeChoice=function(t,e){var r=this._baseState,n=r.choice[t.type];return n||s(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(t.value,e)},u.prototype._encodePrimitive=function(t,e){var r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},u.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},u.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(t)}},9220(t,e,r){var n=r(6698);function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function o(t,e){this.path=t,this.rethrow(e)}e.a=i,i.prototype.isError=function(t){return t instanceof o},i.prototype.save=function(){var t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){var e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){var e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,r){var n=this._reporterState;this.exitKey(t),null!==n.obj&&(n.obj[e]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){var e=this._reporterState,r=e.obj;return e.obj=t,r},i.prototype.error=function(t){var e,r=this._reporterState,n=t instanceof o;if(e=n?t:new o(r.path.map(function(t){return"["+JSON.stringify(t)+"]"}).join(""),t.message||t,t.stack),!r.options.partial)throw e;return n||r.errors.push(e),e},i.prototype.wrapResult=function(t){var e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},n(o,Error),o.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},4598(t,e,r){var n=r(2153);e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=n._reverse(e.tagClass),e.tag={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"},e.tagByName=n._reverse(e.tag)},2153(t,e,r){var n=e;n._reverse=function(t){var e={};return Object.keys(t).forEach(function(r){(0|r)==r&&(r|=0);var n=t[r];e[n]=r}),e},n.der=r(4598)},2010(t,e,r){var n=r(6698),i=r(7568),o=i.base,s=i.bignum,a=i.constants.der;function h(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){o.Node.call(this,"der",t)}function f(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var n=a.tagClass[r>>6],i=!(32&r);if(31&~r)r&=31;else{var o=r;for(r=0;!(128&~o);){if(o=t.readUInt8(e),t.isError(o))return o;r<<=7,r|=127&o}}return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function l(t,e,r){var n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(!(128&n))return n;var i=127&n;if(i>4)return t.error("length octect is too long");n=0;for(var o=0;o<i;o++){n<<=8;var s=t.readUInt8(r);if(t.isError(s))return s;n|=s}return n}t.exports=h,h.prototype.decode=function(t,e){return t instanceof o.DecoderBuffer||(t=new o.DecoderBuffer(t,e)),this.tree._decode(t,e)},n(u,o.Node),u.prototype._peekTag=function(t,e,r){if(t.isEmpty())return!1;var n=t.save(),i=f(t,'Failed to peek tag: "'+e+'"');return t.isError(i)?i:(t.restore(n),i.tag===e||i.tagStr===e||i.tagStr+"of"===e||r)},u.prototype._decodeTag=function(t,e,r){var n=f(t,'Failed to decode tag of "'+e+'"');if(t.isError(n))return n;var i=l(t,n.primitive,'Failed to get length of "'+e+'"');if(t.isError(i))return i;if(!r&&n.tag!==e&&n.tagStr!==e&&n.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(n.primitive||null!==i)return t.skip(i,'Failed to match body of: "'+e+'"');var o=t.save(),s=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(s)?s:(i=t.offset-o.offset,t.restore(o),t.skip(i,'Failed to match body of: "'+e+'"'))},u.prototype._skipUntilEnd=function(t,e){for(;;){var r=f(t,e);if(t.isError(r))return r;var n,i=l(t,r.primitive,e);if(t.isError(i))return i;if(n=r.primitive||null!==i?t.skip(i):this._skipUntilEnd(t,e),t.isError(n))return n;if("end"===r.tagStr)break}},u.prototype._decodeList=function(t,e,r,n){for(var i=[];!t.isEmpty();){var o=this._peekTag(t,"end");if(t.isError(o))return o;var s=r.decode(t,"der",n);if(t.isError(s)&&o)break;i.push(s)}return i},u.prototype._decodeStr=function(t,e){if("bitstr"===e){var r=t.readUInt8();return t.isError(r)?r:{unused:r,data:t.raw()}}if("bmpstr"===e){var n=t.raw();if(n.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");for(var i="",o=0;o<n.length/2;o++)i+=String.fromCharCode(n.readUInt16BE(2*o));return i}if("numstr"===e){var s=t.raw().toString("ascii");return this._isNumstr(s)?s:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){var a=t.raw().toString("ascii");return this._isPrintstr(a)?a:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},u.prototype._decodeObjid=function(t,e,r){for(var n,i=[],o=0;!t.isEmpty();){var s=t.readUInt8();o<<=7,o|=127&s,128&s||(i.push(o),o=0)}128&s&&i.push(o);var a=i[0]/40|0,h=i[0]%40;if(n=r?i:[a,h].concat(i.slice(1)),e){var u=e[n.join(" ")];void 0===u&&(u=e[n.join(".")]),void 0!==u&&(n=u)}return n},u.prototype._decodeTime=function(t,e){var r=t.raw().toString();if("gentime"===e)var n=0|r.slice(0,4),i=0|r.slice(4,6),o=0|r.slice(6,8),s=0|r.slice(8,10),a=0|r.slice(10,12),h=0|r.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),o=0|r.slice(4,6),s=0|r.slice(6,8),a=0|r.slice(8,10),h=0|r.slice(10,12);n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,o,s,a,h,0)},u.prototype._decodeNull=function(t){return null},u.prototype._decodeBool=function(t){var e=t.readUInt8();return t.isError(e)?e:0!==e},u.prototype._decodeInt=function(t,e){var r=t.raw(),n=new s(r);return e&&(n=e[n.toString(10)]||n),n},u.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree}},2853(t,e,r){var n=e;n.der=r(2010),n.pem=r(8903)},8903(t,e,r){var n=r(6698),i=r(8287).Buffer,o=r(2010);function s(t){o.call(this,t),this.enc="pem"}n(s,o),t.exports=s,s.prototype.decode=function(t,e){for(var r=t.toString().split(/[\r\n]+/g),n=e.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,h=-1,u=0;u<r.length;u++){var f=r[u].match(s);if(null!==f&&f[2]===n){if(-1!==a){if("END"!==f[1])break;h=u;break}if("BEGIN"!==f[1])break;a=u}}if(-1===a||-1===h)throw new Error("PEM section not found for: "+n);var l=r.slice(a+1,h).join("");l.replace(/[^a-z0-9\+\/=]+/gi,"");var c=new i(l,"base64");return o.prototype.decode.call(this,c,e)}},82(t,e,r){var n=r(6698),i=r(8287).Buffer,o=r(7568),s=o.base,a=o.constants.der;function h(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){s.Node.call(this,"der",t)}function f(t){return t<10?"0"+t:t}t.exports=h,h.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},n(u,s.Node),u.prototype._encodeComposite=function(t,e,r,n){var o,s=function(t,e,r,n){var i;"seqof"===t?t="seq":"setof"===t&&(t="set");if(a.tagByName.hasOwnProperty(t))i=a.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return n.error("Unknown tag: "+t);i=t}if(i>=31)return n.error("Multi-octet tag encoding unsupported");e||(i|=32);return i|=a.tagClassByName[r||"universal"]<<6,i}(t,e,r,this.reporter);if(n.length<128)return(o=new i(2))[0]=s,o[1]=n.length,this._createEncoderBuffer([o,n]);for(var h=1,u=n.length;u>=256;u>>=8)h++;(o=new i(2+h))[0]=s,o[1]=128|h;u=1+h;for(var f=n.length;f>0;u--,f>>=8)o[u]=255&f;return this._createEncoderBuffer([o,n])},u.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){for(var r=new i(2*t.length),n=0;n<t.length;n++)r.writeUInt16BE(t.charCodeAt(n),2*n);return this._createEncoderBuffer(r)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):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(e)||"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},u.prototype._encodeObjid=function(t,e,r){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s\.]+/g);for(var n=0;n<t.length;n++)t[n]|=0}else if(Array.isArray(t)){t=t.slice();for(n=0;n<t.length;n++)t[n]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!r){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}var o=0;for(n=0;n<t.length;n++){var s=t[n];for(o++;s>=128;s>>=7)o++}var a=new i(o),h=a.length-1;for(n=t.length-1;n>=0;n--){s=t[n];for(a[h--]=127&s;(s>>=7)>0;)a[h--]=128|127&s}return this._createEncoderBuffer(a)},u.prototype._encodeTime=function(t,e){var r,n=new Date(t);return"gentime"===e?r=[f(n.getFullYear()),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[f(n.getFullYear()%100),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!i.isBuffer(t)){var r=t.toArray();!t.sign&&128&r[0]&&r.unshift(0),t=new i(r)}if(i.isBuffer(t)){var n=t.length;0===t.length&&n++;var o=new i(n);return t.copy(o),0===t.length&&(o[0]=0),this._createEncoderBuffer(o)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);n=1;for(var s=t;s>=256;s>>=8)n++;for(s=(o=new Array(n)).length-1;s>=0;s--)o[s]=255&t,t>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},u.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},u.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},u.prototype._skipDefault=function(t,e,r){var n,i=this._baseState;if(null===i.default)return!1;var o=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n<o.length;n++)if(o[n]!==i.defaultBuffer[n])return!1;return!0}},4669(t,e,r){var n=e;n.der=r(82),n.pem=r(735)},735(t,e,r){var n=r(6698),i=r(82);function o(t){i.call(this,t),this.enc="pem"}n(o,i),t.exports=o,o.prototype.encode=function(t,e){for(var r=i.prototype.encode.call(this,t).toString("base64"),n=["-----BEGIN "+e.label+"-----"],o=0;o<r.length;o+=64)n.push(r.slice(o,o+64));return n.push("-----END "+e.label+"-----"),n.join("\n")}},7526(t,e){"use strict";e.toByteArray=function(t){var e,r,o=a(t),s=o[0],h=o[1],u=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,h)),f=0,l=h>0?s-4:s;for(r=0;r<l;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],u[f++]=e>>16&255,u[f++]=e>>8&255,u[f++]=255&e;2===h&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,u[f++]=255&e);1===h&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e);return u},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,h=n-i;a<h;a+=s)o.push(u(t,a,a+s>h?h:a+s));1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function h(t){return r[t>>18&63]+r[t>>12&63]+r[t>>6&63]+r[63&t]}function u(t,e,r){for(var n,i=[],o=e;o<r;o+=3)n=(t[o]<<16&16711680)+(t[o+1]<<8&65280)+(255&t[o+2]),i.push(h(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},9404(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(7790).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function h(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function u(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=h(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=h(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,h=0,f=r;f<a;f+=n)h=u(t,f,f+n,e),this.imuln(i),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this.strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)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 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"],l=[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],c=[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 d(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,h=s/67108864|0;r.words[0]=a;for(var u=1;u<n;u++){for(var f=h>>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],h=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?f[6-h.length]+h+r:h+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=l[t],d=c[t];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);r=(p=p.idivn(d)).isZero()?m+r:f[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==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 t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,h="le"===e,u=new t(o),f=this.clone();if(h){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a<o;a++)u[a]=0}else{for(a=0;a<o-i;a++)u[a]=0;for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[o-a-1]=s}return u},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).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(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0===(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0===(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0===(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var p=function(t,e,r){var n,i,o,s=t.words,a=e.words,h=r.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,y=0|s[2],g=8191&y,b=y>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,k=0|s[5],A=8191&k,B=k>>>13,x=0|s[6],R=8191&x,I=x>>>13,T=0|s[7],O=8191&T,j=T>>>13,C=0|s[8],P=8191&C,U=C>>>13,L=0|s[9],N=8191&L,D=L>>>13,q=0|a[0],F=8191&q,z=q>>>13,H=0|a[1],K=8191&H,W=H>>>13,G=0|a[2],V=8191&G,Z=G>>>13,$=0|a[3],Y=8191&$,X=$>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,ct=ft>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(u+(n=Math.imul(l,F))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(c,F)|0))<<13)|0;u=((o=Math.imul(c,z))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(p,F),i=(i=Math.imul(p,z))+Math.imul(m,F)|0,o=Math.imul(m,z);var gt=(u+(n=n+Math.imul(l,K)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,W)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(g,F),i=(i=Math.imul(g,z))+Math.imul(b,F)|0,o=Math.imul(b,z),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,W)|0;var bt=(u+(n=n+Math.imul(l,V)|0)|0)+((8191&(i=(i=i+Math.imul(l,Z)|0)+Math.imul(c,V)|0))<<13)|0;u=((o=o+Math.imul(c,Z)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,F),i=(i=Math.imul(w,z))+Math.imul(_,F)|0,o=Math.imul(_,z),n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var vt=(u+(n=n+Math.imul(l,Y)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(c,Y)|0))<<13)|0;u=((o=o+Math.imul(c,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(S,F),i=(i=Math.imul(S,z))+Math.imul(E,F)|0,o=Math.imul(E,z),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(g,V)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,X)|0;var wt=(u+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(c,Q)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(A,F),i=(i=Math.imul(A,z))+Math.imul(B,F)|0,o=Math.imul(B,z),n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,W)|0,n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(g,Y)|0,i=(i=i+Math.imul(g,X)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(u+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(c,rt)|0))<<13)|0;u=((o=o+Math.imul(c,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(R,F),i=(i=Math.imul(R,z))+Math.imul(I,F)|0,o=Math.imul(I,z),n=n+Math.imul(A,K)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(S,V)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Mt=(u+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(O,F),i=(i=Math.imul(O,z))+Math.imul(j,F)|0,o=Math.imul(j,z),n=n+Math.imul(R,K)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(g,rt)|0,i=(i=i+Math.imul(g,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(n=n+Math.imul(l,ht)|0)|0)+((8191&(i=(i=i+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(P,F),i=(i=Math.imul(P,z))+Math.imul(U,F)|0,o=Math.imul(U,z),n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(R,V)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(g,ot)|0,i=(i=i+Math.imul(g,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,F),i=(i=Math.imul(N,z))+Math.imul(D,F)|0,o=Math.imul(D,z),n=n+Math.imul(P,K)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(U,K)|0,o=o+Math.imul(U,W)|0,n=n+Math.imul(O,V)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,Z)|0,n=n+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(g,ht)|0,i=(i=i+Math.imul(g,ut)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ut)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var kt=(u+(n=n+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,W))+Math.imul(D,K)|0,o=Math.imul(D,W),n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(U,V)|0,o=o+Math.imul(U,Z)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,n=n+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,ut)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,n=n+Math.imul(g,lt)|0,i=(i=i+Math.imul(g,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var At=(u+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,V),i=(i=Math.imul(N,Z))+Math.imul(D,V)|0,o=Math.imul(D,Z),n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(U,Y)|0,o=o+Math.imul(U,X)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(S,ht)|0,i=(i=i+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,n=n+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ct)|0;var Bt=(u+(n=n+Math.imul(g,pt)|0)|0)+((8191&(i=(i=i+Math.imul(g,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(N,Y),i=(i=Math.imul(N,X))+Math.imul(D,Y)|0,o=Math.imul(D,X),n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(U,Q)|0,o=o+Math.imul(U,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,st)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,n=n+Math.imul(A,ht)|0,i=(i=i+Math.imul(A,ut)|0)+Math.imul(B,ht)|0,o=o+Math.imul(B,ut)|0,n=n+Math.imul(S,lt)|0,i=(i=i+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var xt=(u+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(U,rt)|0,o=o+Math.imul(U,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,st)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,st)|0,n=n+Math.imul(R,ht)|0,i=(i=i+Math.imul(R,ut)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,ut)|0,n=n+Math.imul(A,lt)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(B,lt)|0,o=o+Math.imul(B,ct)|0;var Rt=(u+(n=n+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,st)|0)+Math.imul(U,ot)|0,o=o+Math.imul(U,st)|0,n=n+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,ut)|0)+Math.imul(j,ht)|0,o=o+Math.imul(j,ut)|0,n=n+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,ct)|0)+Math.imul(I,lt)|0,o=o+Math.imul(I,ct)|0;var It=(u+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(B,pt)|0))<<13)|0;u=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(N,ot),i=(i=Math.imul(N,st))+Math.imul(D,ot)|0,o=Math.imul(D,st),n=n+Math.imul(P,ht)|0,i=(i=i+Math.imul(P,ut)|0)+Math.imul(U,ht)|0,o=o+Math.imul(U,ut)|0,n=n+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(j,lt)|0,o=o+Math.imul(j,ct)|0;var Tt=(u+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,mt)|0)+Math.imul(I,pt)|0))<<13)|0;u=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,ht),i=(i=Math.imul(N,ut))+Math.imul(D,ht)|0,o=Math.imul(D,ut),n=n+Math.imul(P,lt)|0,i=(i=i+Math.imul(P,ct)|0)+Math.imul(U,lt)|0,o=o+Math.imul(U,ct)|0;var Ot=(u+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(j,pt)|0))<<13)|0;u=((o=o+Math.imul(j,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(N,lt),i=(i=Math.imul(N,ct))+Math.imul(D,lt)|0,o=Math.imul(D,ct);var jt=(u+(n=n+Math.imul(P,pt)|0)|0)+((8191&(i=(i=i+Math.imul(P,mt)|0)+Math.imul(U,pt)|0))<<13)|0;u=((o=o+Math.imul(U,mt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863;var Ct=(u+(n=Math.imul(N,pt))|0)+((8191&(i=(i=Math.imul(N,mt))+Math.imul(D,pt)|0))<<13)|0;return u=((o=Math.imul(D,mt))+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,h[0]=yt,h[1]=gt,h[2]=bt,h[3]=vt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=Et,h[9]=kt,h[10]=At,h[11]=Bt,h[12]=xt,h[13]=Rt,h[14]=It,h[15]=Tt,h[16]=Ot,h[17]=jt,h[18]=Ct,0!==u&&(h[19]=u,r.length++),r};function m(t,e,r){return(new y).mulp(t,e,r)}function y(t,e){this.x=t,this.y=e}Math.imul||(p=d),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?p(this,t,e):n<63?d(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,h=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=h;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;a=67108863&(c=c+a|0),i+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):m(this,t,e),r},y.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},y.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},y.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},y.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,h=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),f=0;f<i;f+=a)for(var l=h,c=u,d=0;d<s;d++){var p=r[f+d],m=n[f+d],y=r[f+d+s],g=n[f+d+s],b=l*y-c*g;g=l*g+c*y,y=b,r[f+d]=p+y,n[f+d]=m+g,r[f+d+s]=p-y,n[f+d+s]=m-g,d!==a&&(b=h*l-u*c,c=h*c+u*l,l=b)}},y.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},y.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},y.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},y.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(!(-8192&o))},y.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},y.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),h=new Array(n),u=new Array(n),f=new Array(n),l=new Array(n),c=r.words;c.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,u,n),this.transform(s,o,a,h,n,i),this.transform(u,o,f,l,n,i);for(var d=0;d<n;d++){var p=a[d]*f[d]-h[d]*l[d];h[d]=a[d]*l[d]+h[d]*f[d],a[d]=p}return this.conjugate(a,h,n),this.transform(a,h,c,o,n,i),this.conjugate(c,o,n),this.normalize13b(c,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this.length=0===t?1:this.length,this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,h=(0|this.words[e])-a<<r;this.words[e]=h|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,h=r;if(i-=s,i=Math.max(0,i),h){for(var u=0;u<s;u++)h.words[u]=this.words[u];h.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=i);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return 0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var h=(0|t.words[i])*e;a=((o-=67108863&h)>>26)-(h/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,h=n.length-i.length;if("mod"!==e){(a=new o(null)).length=h+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var f=n.clone()._ishlnsubmul(i,1,h);0===f.negative&&(n=f,a&&(a.words[h]=1));for(var l=h-1;l>=0;l--){var c=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(c=Math.min(c/s|0,67108863),n._ishlnsubmul(i,c,l);0!==n.negative;)c--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);a&&(a.words[l]=c)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),h=new o(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0===(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(f),s.isub(l)),i.iushrn(1),s.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;)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(h)):(r.isub(e),a.isub(i),h.isub(s))}return{a,b:h,gcd:r.iushln(u)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),h=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0===(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;0===(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new S(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},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(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function b(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){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 _(){b.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function M(){b.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function E(t){S.call(this,t),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 t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},b.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},b.prototype.split=function(t,e){t.iushrn(this.n,0,e)},b.prototype.imulK=function(t){return t.imul(this.k)},i(v,b),v.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,b),i(_,b),i(M,b),M.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new w;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new M}return g[t]=e,e},S.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},S.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},S.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},S.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},S.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},S.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},S.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},S.prototype.isqr=function(t){return this.imul(t,t.clone())},S.prototype.sqr=function(t){return this.mul(t,t)},S.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,i),c=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y<p);var g=this.pow(l,new o(1).iushln(p-y-1));c=c.redMul(g),l=g.redSqr(),d=d.redMul(l),p=y}return c},S.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},S.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,h=e.bitLength()%26;for(0===h&&(h=26),n=e.length-1;n>=0;n--){for(var u=e.words[n],f=h-1;f>=0;f--){var l=u>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4===++a||0===n&&0===f)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}h=26}return i},S.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},S.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new E(t)},i(E,S),E.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},E.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},E.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},E.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},E.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},5037(t,e,r){var n;function i(t){this.rand=t}if(t.exports=function(t){return n||(n=new i(null)),n.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(3776);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(t){return o.randomBytes(t)}}catch(t){}},462(t,e,r){var n=r(2861).Buffer;function i(t){n.isBuffer(t)||(t=n.from(t));for(var e=t.length/4|0,r=new Array(e),i=0;i<e;i++)r[i]=t.readUInt32BE(4*i);return r}function o(t){for(;0<t.length;t++)t[0]=0}function s(t,e,r,n,i){for(var o,s,a,h,u=r[0],f=r[1],l=r[2],c=r[3],d=t[0]^e[0],p=t[1]^e[1],m=t[2]^e[2],y=t[3]^e[3],g=4,b=1;b<i;b++)o=u[d>>>24]^f[p>>>16&255]^l[m>>>8&255]^c[255&y]^e[g++],s=u[p>>>24]^f[m>>>16&255]^l[y>>>8&255]^c[255&d]^e[g++],a=u[m>>>24]^f[y>>>16&255]^l[d>>>8&255]^c[255&p]^e[g++],h=u[y>>>24]^f[d>>>16&255]^l[p>>>8&255]^c[255&m]^e[g++],d=o,p=s,m=a,y=h;return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[m>>>8&255]<<8|n[255&y])^e[g++],s=(n[p>>>24]<<24|n[m>>>16&255]<<16|n[y>>>8&255]<<8|n[255&d])^e[g++],a=(n[m>>>24]<<24|n[y>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^e[g++],h=(n[y>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&m])^e[g++],[o>>>=0,s>>>=0,a>>>=0,h>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],h=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,h=0;h<256;++h){var u=a^a<<1^a<<2^a<<3^a<<4;u=u>>>8^255&u^99,r[s]=u,n[u]=s;var f=t[s],l=t[f],c=t[l],d=257*t[u]^16843008*u;i[0][s]=d<<24|d>>>8,i[1][s]=d<<16|d>>>16,i[2][s]=d<<8|d>>>24,i[3][s]=d,d=16843009*c^65537*l^257*f^16843008*s,o[0][u]=d<<24|d>>>8,o[1][u]=d<<16|d>>>16,o[2][u]=d<<8|d>>>24,o[3][u]=d,0===s?s=a=1:(s=f^t[t[t[c^f]]],a^=t[t[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function u(t){this._key=i(t),this._reset()}u.blockSize=16,u.keySize=32,u.prototype.blockSize=u.blockSize,u.prototype.keySize=u.keySize,u.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o<e;o++)i[o]=t[o];for(o=e;o<n;o++){var s=i[o-1];o%e===0?(s=s<<8|s>>>24,s=h.SBOX[s>>>24]<<24|h.SBOX[s>>>16&255]<<16|h.SBOX[s>>>8&255]<<8|h.SBOX[255&s],s^=a[o/e|0]<<24):e>6&&o%e===4&&(s=h.SBOX[s>>>24]<<24|h.SBOX[s>>>16&255]<<16|h.SBOX[s>>>8&255]<<8|h.SBOX[255&s]),i[o]=i[o-e]^s}for(var u=[],f=0;f<n;f++){var l=n-f,c=i[l-(f%4?0:4)];u[f]=f<4||l<=4?c:h.INV_SUB_MIX[0][h.SBOX[c>>>24]]^h.INV_SUB_MIX[1][h.SBOX[c>>>16&255]]^h.INV_SUB_MIX[2][h.SBOX[c>>>8&255]]^h.INV_SUB_MIX[3][h.SBOX[255&c]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=u},u.prototype.encryptBlockRaw=function(t){return s(t=i(t),this._keySchedule,h.SUB_MIX,h.SBOX,this._nRounds)},u.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=n.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},u.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var r=s(t,this._invKeySchedule,h.INV_SUB_MIX,h.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},u.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=u},2356(t,e,r){var n=r(462),i=r(2861).Buffer,o=r(6168),s=r(6698),a=r(5892),h=r(295),u=r(5122);function f(t,e,r,s){o.call(this);var h=i.alloc(4,0);this._cipher=new n.AES(e);var f=this._cipher.encryptBlock(h);this._ghash=new a(f),r=function(t,e,r){if(12===e.length)return t._finID=i.concat([e,i.from([0,0,0,1])]),i.concat([e,i.from([0,0,0,2])]);var n=new a(r),o=e.length,s=o%16;n.update(e),s&&(s=16-s,n.update(i.alloc(s,0))),n.update(i.alloc(8,0));var h=8*o,f=i.alloc(8);f.writeUIntBE(h,0,8),n.update(f),t._finID=n.state;var l=i.from(t._finID);return u(l),l}(this,r,f),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}s(f,o),f.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=i.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=h(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i<n;++i)r+=t[i]^e[i];return r}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},f.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},f.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},f.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length},t.exports=f},1241(t,e,r){var n=r(5799),i=r(6171),o=r(3219);e.createCipher=e.Cipher=n.createCipher,e.createCipheriv=e.Cipheriv=n.createCipheriv,e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},6171(t,e,r){var n=r(2356),i=r(2861).Buffer,o=r(530),s=r(650),a=r(6168),h=r(462),u=r(8078);function f(t,e,r){a.call(this),this._cache=new l,this._last=void 0,this._cipher=new h.AES(e),this._prev=i.from(r),this._mode=t,this._autopadding=!0}function l(){this.cache=i.allocUnsafe(0)}function c(t,e,r){var a=o[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof e&&(e=i.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===a.type?new s(a.module,e,r,!0):"auth"===a.type?new n(a.module,e,r,!0):new f(a.module,e,r)}r(6698)(f,a),f.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),n.push(r);return i.concat(n)},f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");var r=-1;for(;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(16===e)return;return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},l.prototype.add=function(t){this.cache=i.concat([this.cache,t])},l.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},l.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var r=o[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=u(e,!1,r.key,r.iv);return c(t,n.key,n.iv)},e.createDecipheriv=c},5799(t,e,r){var n=r(530),i=r(2356),o=r(2861).Buffer,s=r(650),a=r(6168),h=r(462),u=r(8078);function f(t,e,r){a.call(this),this._cache=new c,this._cipher=new h.AES(e),this._prev=o.from(r),this._mode=t,this._autopadding=!0}r(6698)(f,a),f.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return o.concat(n)};var l=o.alloc(16,16);function c(){this.cache=o.allocUnsafe(0)}function d(t,e,r){var a=n[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=o.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===a.type?new s(a.module,e,r):"auth"===a.type?new i(a.module,e,r):new f(a.module,e,r)}f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(l))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},c.prototype.add=function(t){this.cache=o.concat([this.cache,t])},c.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},c.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return o.concat([this.cache,e])},e.createCipheriv=d,e.createCipher=function(t,e){var r=n[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=u(e,!1,r.key,r.iv);return d(t,i.key,i.iv)}},5892(t,e,r){var n=r(2861).Buffer,i=n.alloc(16,0);function o(t){var e=n.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function s(t){this.h=t,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},s.prototype._multiply=function(){for(var t,e,r,n=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],i=[0,0,0,0],s=-1;++s<128;){for(!!(this.state[~~(s/8)]&1<<7-s%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=!!(1&n[3]),e=3;e>0;e--)n[e]=n[e]>>>1|(1&n[e-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},s.prototype.update=function(t){var e;for(this.cache=n.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},s.prototype.final=function(t,e){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=s},5122(t){t.exports=function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}},2884(t,e,r){var n=r(295);e.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},6383(t,e,r){var n=r(2861).Buffer,i=r(295);function o(t,e,r){var o=e.length,s=i(e,t._cache);return t._cache=t._cache.slice(o),t._prev=n.concat([t._prev,r?e:s]),s}e.encrypt=function(t,e,r){for(var i,s=n.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=n.allocUnsafe(0)),!(t._cache.length<=e.length)){s=n.concat([s,o(t,e,r)]);break}i=t._cache.length,s=n.concat([s,o(t,e.slice(0,i),r)]),e=e.slice(i)}return s}},5264(t,e,r){var n=r(2861).Buffer;function i(t,e,r){for(var n,i,s=-1,a=0;++s<8;)n=e&1<<7-s?128:0,a+=(128&(i=t._cipher.encryptBlock(t._prev)[0]^n))>>s%8,t._prev=o(t._prev,r?n:i);return a}function o(t,e){var r=t.length,i=-1,o=n.allocUnsafe(t.length);for(t=n.concat([t,n.from([e])]);++i<r;)o[i]=t[i]<<1|t[i+1]>>7;return o}e.encrypt=function(t,e,r){for(var o=e.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=i(t,e[a],r);return s}},6975(t,e,r){var n=r(2861).Buffer;function i(t,e,r){var i=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=n.concat([t._prev.slice(1),n.from([r?e:i])]),i}e.encrypt=function(t,e,r){for(var o=e.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=i(t,e[a],r);return s}},3053(t,e,r){var n=r(295),i=r(2861).Buffer,o=r(5122);function s(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}e.encrypt=function(t,e){var r=Math.ceil(e.length/16),o=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*r)]);for(var a=0;a<r;a++){var h=s(t),u=o+16*a;t._cache.writeUInt32BE(h[0],u+0),t._cache.writeUInt32BE(h[1],u+4),t._cache.writeUInt32BE(h[2],u+8),t._cache.writeUInt32BE(h[3],u+12)}var f=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),n(e,f)}},2632(t,e){e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},530(t,e,r){var n={ECB:r(2632),CBC:r(2884),CFB:r(6383),CFB8:r(6975),CFB1:r(5264),OFB:r(6843),CTR:r(3053),GCM:r(3053)},i=r(3219);for(var o in i)i[o].module=n[i[o].mode];t.exports=i},6843(t,e,r){var n=r(8287).Buffer,i=r(295);function o(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=n.concat([t._cache,o(t)]);var r=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),i(e,r)}},650(t,e,r){var n=r(462),i=r(2861).Buffer,o=r(6168);function s(t,e,r,s){o.call(this),this._cipher=new n.AES(e),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._mode=t}r(6698)(s,o),s.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},t.exports=s},125(t,e,r){var n=r(4050),i=r(1241),o=r(530),s=r(2438),a=r(8078);function h(t,e,r){if(t=t.toLowerCase(),o[t])return i.createCipheriv(t,e,r);if(s[t])return new n({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function u(t,e,r){if(t=t.toLowerCase(),o[t])return i.createDecipheriv(t,e,r);if(s[t])return new n({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}e.createCipher=e.Cipher=function(t,e){var r,n;if(t=t.toLowerCase(),o[t])r=o[t].key,n=o[t].iv;else{if(!s[t])throw new TypeError("invalid suite type");r=8*s[t].key,n=s[t].iv}var i=a(e,!1,r,n);return h(t,i.key,i.iv)},e.createCipheriv=e.Cipheriv=h,e.createDecipher=e.Decipher=function(t,e){var r,n;if(t=t.toLowerCase(),o[t])r=o[t].key,n=o[t].iv;else{if(!s[t])throw new TypeError("invalid suite type");r=8*s[t].key,n=s[t].iv}var i=a(e,!1,r,n);return u(t,i.key,i.iv)},e.createDecipheriv=e.Decipheriv=u,e.listCiphers=e.getCiphers=function(){return Object.keys(s).concat(i.getCiphers())}},4050(t,e,r){var n=r(6168),i=r(9560),o=r(6698),s=r(2861).Buffer,a={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function h(t){n.call(this);var e,r=t.mode.toLowerCase(),i=a[r];e=t.decrypt?"decrypt":"encrypt";var o=t.key;s.isBuffer(o)||(o=s.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=s.concat([o,o.slice(0,8)]));var h=t.iv;s.isBuffer(h)||(h=s.from(h)),this._des=i.create({key:o,iv:h,type:e})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],t.exports=h,o(h,n),h.prototype._update=function(t){return s.from(this._des.update(t))},h.prototype._final=function(){return s.from(this._des.final())}},2438(t,e){e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},7332(t,e,r){"use strict";var n=r(8893),i=r(3209),o=r(2861).Buffer;function s(t){var e,r=t.modulus.byteLength();do{e=new n(i(r))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function a(t,e){var r=function(t){var e=s(t);return{blinder:e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),i=e.modulus.byteLength(),a=new n(t).mul(r.blinder).umod(e.modulus),h=a.toRed(n.mont(e.prime1)),u=a.toRed(n.mont(e.prime2)),f=e.coefficient,l=e.prime1,c=e.prime2,d=h.redPow(e.exponent1).fromRed(),p=u.redPow(e.exponent2).fromRed(),m=d.isub(p).imul(f).umod(l).imul(c);return p.iadd(m).imul(r.unblinder).umod(e.modulus).toArrayLike(o,"be",i)}a.getr=s,t.exports=a},8893(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(8285).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);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 "+t)}function h(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function u(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),h=e;h<a;h++){var u=t.charCodeAt(h)-48;o*=i,s=u>=49?u-49+10:u>=17?u-17+10:u,n(u>=0&&s<i,"Invalid character"),o+=s}return o}function f(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=h(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=h(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,h=0,f=r;f<a;f+=n)h=u(t,f,f+n,e),this.imuln(i),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h);if(0!==s){var l=1;for(h=u(t,f,t.length,e),f=0;f<s;f++)l*=e;this.imuln(l),this.words[0]+h<67108864?this.words[0]+=h:this._iaddn(h)}this._strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){f(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)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")]=l}catch(t){o.prototype.inspect=l}else o.prototype.inspect=l;function l(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var c=["","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],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(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],h=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?c[6-h.length]+h+r:h+r}for(0!==o&&(r=o.toString(16)+r);r.length%e!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var u=d[t],f=p[t];r="";var l=this.clone();for(l.negative=0;!l.isZero();){var m=l.modrn(f).toString(t);r=(l=l.idivn(f)).isZero()?m+r:c[u-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%e!==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 t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)};function m(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,h=s/67108864|0;r.words[0]=a;for(var u=1;u<n;u++){for(var f=h>>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(i=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r._strip()}o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r++]=255&s,r<t.length&&(t[r++]=s>>8&255),r<t.length&&(t[r++]=s>>16&255),6===o?(r<t.length&&(t[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r--]=255&s,r>=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 8191&e||(r+=13,e>>>=13),127&e||(r+=7,e>>>=7),15&e||(r+=4,e>>>=4),3&e||(r+=2,e>>>=2),1&e||r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).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(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return n(0===(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return n(0===(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return n(0===(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var y=function(t,e,r){var n,i,o,s=t.words,a=e.words,h=r.words,u=0,f=0|s[0],l=8191&f,c=f>>>13,d=0|s[1],p=8191&d,m=d>>>13,y=0|s[2],g=8191&y,b=y>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,k=0|s[5],A=8191&k,B=k>>>13,x=0|s[6],R=8191&x,I=x>>>13,T=0|s[7],O=8191&T,j=T>>>13,C=0|s[8],P=8191&C,U=C>>>13,L=0|s[9],N=8191&L,D=L>>>13,q=0|a[0],F=8191&q,z=q>>>13,H=0|a[1],K=8191&H,W=H>>>13,G=0|a[2],V=8191&G,Z=G>>>13,$=0|a[3],Y=8191&$,X=$>>>13,J=0|a[4],Q=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,ct=ft>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(u+(n=Math.imul(l,F))|0)+((8191&(i=(i=Math.imul(l,z))+Math.imul(c,F)|0))<<13)|0;u=((o=Math.imul(c,z))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(p,F),i=(i=Math.imul(p,z))+Math.imul(m,F)|0,o=Math.imul(m,z);var gt=(u+(n=n+Math.imul(l,K)|0)|0)+((8191&(i=(i=i+Math.imul(l,W)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,W)|0)+(i>>>13)|0)+(gt>>>26)|0,gt&=67108863,n=Math.imul(g,F),i=(i=Math.imul(g,z))+Math.imul(b,F)|0,o=Math.imul(b,z),n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,W)|0;var bt=(u+(n=n+Math.imul(l,V)|0)|0)+((8191&(i=(i=i+Math.imul(l,Z)|0)+Math.imul(c,V)|0))<<13)|0;u=((o=o+Math.imul(c,Z)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(w,F),i=(i=Math.imul(w,z))+Math.imul(_,F)|0,o=Math.imul(_,z),n=n+Math.imul(g,K)|0,i=(i=i+Math.imul(g,W)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,W)|0,n=n+Math.imul(p,V)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,Z)|0;var vt=(u+(n=n+Math.imul(l,Y)|0)|0)+((8191&(i=(i=i+Math.imul(l,X)|0)+Math.imul(c,Y)|0))<<13)|0;u=((o=o+Math.imul(c,X)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(S,F),i=(i=Math.imul(S,z))+Math.imul(E,F)|0,o=Math.imul(E,z),n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,W)|0,n=n+Math.imul(g,V)|0,i=(i=i+Math.imul(g,Z)|0)+Math.imul(b,V)|0,o=o+Math.imul(b,Z)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Y)|0,o=o+Math.imul(m,X)|0;var wt=(u+(n=n+Math.imul(l,Q)|0)|0)+((8191&(i=(i=i+Math.imul(l,tt)|0)+Math.imul(c,Q)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(A,F),i=(i=Math.imul(A,z))+Math.imul(B,F)|0,o=Math.imul(B,z),n=n+Math.imul(S,K)|0,i=(i=i+Math.imul(S,W)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,W)|0,n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,Z)|0,n=n+Math.imul(g,Y)|0,i=(i=i+Math.imul(g,X)|0)+Math.imul(b,Y)|0,o=o+Math.imul(b,X)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,tt)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,tt)|0;var _t=(u+(n=n+Math.imul(l,rt)|0)|0)+((8191&(i=(i=i+Math.imul(l,nt)|0)+Math.imul(c,rt)|0))<<13)|0;u=((o=o+Math.imul(c,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(R,F),i=(i=Math.imul(R,z))+Math.imul(I,F)|0,o=Math.imul(I,z),n=n+Math.imul(A,K)|0,i=(i=i+Math.imul(A,W)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(S,V)|0,i=(i=i+Math.imul(S,Z)|0)+Math.imul(E,V)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(w,Y)|0,i=(i=i+Math.imul(w,X)|0)+Math.imul(_,Y)|0,o=o+Math.imul(_,X)|0,n=n+Math.imul(g,Q)|0,i=(i=i+Math.imul(g,tt)|0)+Math.imul(b,Q)|0,o=o+Math.imul(b,tt)|0,n=n+Math.imul(p,rt)|0,i=(i=i+Math.imul(p,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0;var Mt=(u+(n=n+Math.imul(l,ot)|0)|0)+((8191&(i=(i=i+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(O,F),i=(i=Math.imul(O,z))+Math.imul(j,F)|0,o=Math.imul(j,z),n=n+Math.imul(R,K)|0,i=(i=i+Math.imul(R,W)|0)+Math.imul(I,K)|0,o=o+Math.imul(I,W)|0,n=n+Math.imul(A,V)|0,i=(i=i+Math.imul(A,Z)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(S,Y)|0,i=(i=i+Math.imul(S,X)|0)+Math.imul(E,Y)|0,o=o+Math.imul(E,X)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,Q)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(g,rt)|0,i=(i=i+Math.imul(g,nt)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,nt)|0,n=n+Math.imul(p,ot)|0,i=(i=i+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(n=n+Math.imul(l,ht)|0)|0)+((8191&(i=(i=i+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(P,F),i=(i=Math.imul(P,z))+Math.imul(U,F)|0,o=Math.imul(U,z),n=n+Math.imul(O,K)|0,i=(i=i+Math.imul(O,W)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(R,V)|0,i=(i=i+Math.imul(R,Z)|0)+Math.imul(I,V)|0,o=o+Math.imul(I,Z)|0,n=n+Math.imul(A,Y)|0,i=(i=i+Math.imul(A,X)|0)+Math.imul(B,Y)|0,o=o+Math.imul(B,X)|0,n=n+Math.imul(S,Q)|0,i=(i=i+Math.imul(S,tt)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(g,ot)|0,i=(i=i+Math.imul(g,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,n=n+Math.imul(p,ht)|0,i=(i=i+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(n=n+Math.imul(l,lt)|0)|0)+((8191&(i=(i=i+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,F),i=(i=Math.imul(N,z))+Math.imul(D,F)|0,o=Math.imul(D,z),n=n+Math.imul(P,K)|0,i=(i=i+Math.imul(P,W)|0)+Math.imul(U,K)|0,o=o+Math.imul(U,W)|0,n=n+Math.imul(O,V)|0,i=(i=i+Math.imul(O,Z)|0)+Math.imul(j,V)|0,o=o+Math.imul(j,Z)|0,n=n+Math.imul(R,Y)|0,i=(i=i+Math.imul(R,X)|0)+Math.imul(I,Y)|0,o=o+Math.imul(I,X)|0,n=n+Math.imul(A,Q)|0,i=(i=i+Math.imul(A,tt)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(S,rt)|0,i=(i=i+Math.imul(S,nt)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(g,ht)|0,i=(i=i+Math.imul(g,ut)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ut)|0,n=n+Math.imul(p,lt)|0,i=(i=i+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var kt=(u+(n=n+Math.imul(l,pt)|0)|0)+((8191&(i=(i=i+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(N,K),i=(i=Math.imul(N,W))+Math.imul(D,K)|0,o=Math.imul(D,W),n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,Z)|0)+Math.imul(U,V)|0,o=o+Math.imul(U,Z)|0,n=n+Math.imul(O,Y)|0,i=(i=i+Math.imul(O,X)|0)+Math.imul(j,Y)|0,o=o+Math.imul(j,X)|0,n=n+Math.imul(R,Q)|0,i=(i=i+Math.imul(R,tt)|0)+Math.imul(I,Q)|0,o=o+Math.imul(I,tt)|0,n=n+Math.imul(A,rt)|0,i=(i=i+Math.imul(A,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(S,ot)|0,i=(i=i+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,n=n+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,ut)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,n=n+Math.imul(g,lt)|0,i=(i=i+Math.imul(g,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var At=(u+(n=n+Math.imul(p,pt)|0)|0)+((8191&(i=(i=i+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(N,V),i=(i=Math.imul(N,Z))+Math.imul(D,V)|0,o=Math.imul(D,Z),n=n+Math.imul(P,Y)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(U,Y)|0,o=o+Math.imul(U,X)|0,n=n+Math.imul(O,Q)|0,i=(i=i+Math.imul(O,tt)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,tt)|0,n=n+Math.imul(R,rt)|0,i=(i=i+Math.imul(R,nt)|0)+Math.imul(I,rt)|0,o=o+Math.imul(I,nt)|0,n=n+Math.imul(A,ot)|0,i=(i=i+Math.imul(A,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(S,ht)|0,i=(i=i+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,n=n+Math.imul(w,lt)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ct)|0;var Bt=(u+(n=n+Math.imul(g,pt)|0)|0)+((8191&(i=(i=i+Math.imul(g,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863,n=Math.imul(N,Y),i=(i=Math.imul(N,X))+Math.imul(D,Y)|0,o=Math.imul(D,X),n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(U,Q)|0,o=o+Math.imul(U,tt)|0,n=n+Math.imul(O,rt)|0,i=(i=i+Math.imul(O,nt)|0)+Math.imul(j,rt)|0,o=o+Math.imul(j,nt)|0,n=n+Math.imul(R,ot)|0,i=(i=i+Math.imul(R,st)|0)+Math.imul(I,ot)|0,o=o+Math.imul(I,st)|0,n=n+Math.imul(A,ht)|0,i=(i=i+Math.imul(A,ut)|0)+Math.imul(B,ht)|0,o=o+Math.imul(B,ut)|0,n=n+Math.imul(S,lt)|0,i=(i=i+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var xt=(u+(n=n+Math.imul(w,pt)|0)|0)+((8191&(i=(i=i+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((o=o+Math.imul(_,mt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(N,Q),i=(i=Math.imul(N,tt))+Math.imul(D,Q)|0,o=Math.imul(D,tt),n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(U,rt)|0,o=o+Math.imul(U,nt)|0,n=n+Math.imul(O,ot)|0,i=(i=i+Math.imul(O,st)|0)+Math.imul(j,ot)|0,o=o+Math.imul(j,st)|0,n=n+Math.imul(R,ht)|0,i=(i=i+Math.imul(R,ut)|0)+Math.imul(I,ht)|0,o=o+Math.imul(I,ut)|0,n=n+Math.imul(A,lt)|0,i=(i=i+Math.imul(A,ct)|0)+Math.imul(B,lt)|0,o=o+Math.imul(B,ct)|0;var Rt=(u+(n=n+Math.imul(S,pt)|0)|0)+((8191&(i=(i=i+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,n=Math.imul(N,rt),i=(i=Math.imul(N,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,st)|0)+Math.imul(U,ot)|0,o=o+Math.imul(U,st)|0,n=n+Math.imul(O,ht)|0,i=(i=i+Math.imul(O,ut)|0)+Math.imul(j,ht)|0,o=o+Math.imul(j,ut)|0,n=n+Math.imul(R,lt)|0,i=(i=i+Math.imul(R,ct)|0)+Math.imul(I,lt)|0,o=o+Math.imul(I,ct)|0;var It=(u+(n=n+Math.imul(A,pt)|0)|0)+((8191&(i=(i=i+Math.imul(A,mt)|0)+Math.imul(B,pt)|0))<<13)|0;u=((o=o+Math.imul(B,mt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(N,ot),i=(i=Math.imul(N,st))+Math.imul(D,ot)|0,o=Math.imul(D,st),n=n+Math.imul(P,ht)|0,i=(i=i+Math.imul(P,ut)|0)+Math.imul(U,ht)|0,o=o+Math.imul(U,ut)|0,n=n+Math.imul(O,lt)|0,i=(i=i+Math.imul(O,ct)|0)+Math.imul(j,lt)|0,o=o+Math.imul(j,ct)|0;var Tt=(u+(n=n+Math.imul(R,pt)|0)|0)+((8191&(i=(i=i+Math.imul(R,mt)|0)+Math.imul(I,pt)|0))<<13)|0;u=((o=o+Math.imul(I,mt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(N,ht),i=(i=Math.imul(N,ut))+Math.imul(D,ht)|0,o=Math.imul(D,ut),n=n+Math.imul(P,lt)|0,i=(i=i+Math.imul(P,ct)|0)+Math.imul(U,lt)|0,o=o+Math.imul(U,ct)|0;var Ot=(u+(n=n+Math.imul(O,pt)|0)|0)+((8191&(i=(i=i+Math.imul(O,mt)|0)+Math.imul(j,pt)|0))<<13)|0;u=((o=o+Math.imul(j,mt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(N,lt),i=(i=Math.imul(N,ct))+Math.imul(D,lt)|0,o=Math.imul(D,ct);var jt=(u+(n=n+Math.imul(P,pt)|0)|0)+((8191&(i=(i=i+Math.imul(P,mt)|0)+Math.imul(U,pt)|0))<<13)|0;u=((o=o+Math.imul(U,mt)|0)+(i>>>13)|0)+(jt>>>26)|0,jt&=67108863;var Ct=(u+(n=Math.imul(N,pt))|0)+((8191&(i=(i=Math.imul(N,mt))+Math.imul(D,pt)|0))<<13)|0;return u=((o=Math.imul(D,mt))+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,h[0]=yt,h[1]=gt,h[2]=bt,h[3]=vt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=Et,h[9]=kt,h[10]=At,h[11]=Bt,h[12]=xt,h[13]=Rt,h[14]=It,h[15]=Tt,h[16]=Ot,h[17]=jt,h[18]=Ct,0!==u&&(h[19]=u,r.length++),r};function g(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,h=Math.min(o,e.length-1),u=Math.max(0,o-t.length+1);u<=h;u++){var f=o-u,l=(0|t.words[f])*(0|e.words[u]),c=67108863&l;a=67108863&(c=c+a|0),i+=(s=(s=s+(l/67108864|0)|0)+(c>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function b(t,e,r){return g(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(y=m),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?y(this,t,e):r<63?m(this,t,e):r<1024?g(this,t,e):b(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},v.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},v.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},v.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,h=Math.cos(2*Math.PI/a),u=Math.sin(2*Math.PI/a),f=0;f<i;f+=a)for(var l=h,c=u,d=0;d<s;d++){var p=r[f+d],m=n[f+d],y=r[f+d+s],g=n[f+d+s],b=l*y-c*g;g=l*g+c*y,y=b,r[f+d]=p+y,n[f+d]=m+g,r[f+d+s]=p-y,n[f+d+s]=m-g,d!==a&&(b=h*l-u*c,c=h*c+u*l,l=b)}},v.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},v.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},v.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(!(-8192&o))},v.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},v.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),h=new Array(n),u=new Array(n),f=new Array(n),l=new Array(n),c=r.words;c.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,u,n),this.transform(s,o,a,h,n,i),this.transform(u,o,f,l,n,i);for(var d=0;d<n;d++){var p=a[d]*f[d]-h[d]*l[d];h[d]=a[d]*l[d]+h[d]*f[d],a[d]=p}return this.conjugate(a,h,n),this.transform(a,h,c,o,n,i),this.conjugate(c,o,n),this.normalize13b(c,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),b(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),n("number"==typeof t),n(t<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),this.length=0===t?1:this.length,e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,h=(0|this.words[e])-a<<r;this.words[e]=h|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,h=r;if(i-=s,i=Math.max(0,i),h){for(var u=0;u<s;u++)h.words[u]=this.words[u];h.length=s}if(0===s);else if(this.length>s)for(this.length-=s,u=0;u<this.length;u++)this.words[u]=this.words[u+s];else this.words[0]=0,this.length=1;var f=0;for(u=this.length-1;u>=0&&(0!==f||u>=i);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r)&&!!(this.words[r]&i)},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return 0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var h=(0|t.words[i])*e;a=((o-=67108863&h)>>26)-(h/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!==(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,h=n.length-i.length;if("mod"!==e){(a=new o(null)).length=h+1,a.words=new Array(a.length);for(var u=0;u<a.length;u++)a.words[u]=0}var f=n.clone()._ishlnsubmul(i,1,h);0===f.negative&&(n=f,a&&(a.words[h]=1));for(var l=h-1;l>=0;l--){var c=67108864*(0|n.words[i.length+l])+(0|n.words[i.length+l-1]);for(c=Math.min(c/s|0,67108863),n._ishlnsubmul(i,c,l);0!==n.negative;)c--,n.negative=0,n._ishlnsubmul(i,1,l),n.isZero()||(n.negative^=1);a&&(a.words[l]=c)}return a&&a._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),h=new o(1),u=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++u;for(var f=r.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0===(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(f),s.isub(l)),i.iushrn(1),s.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;)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(h)):(r.isub(e),a.isub(i),h.isub(s))}return{a,b:h,gcd:r.iushln(u)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),h=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var u=0,f=1;0===(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;0===(r.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(r.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new A(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},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(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function M(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function S(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function A(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function B(t){A.call(this,t),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)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(M,_),M.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},M.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(S,_),i(E,_),i(k,_),k.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new M;else if("p224"===t)e=new S;else if("p192"===t)e=new E;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new k}return w[t]=e,e},A.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},A.prototype._verify2=function(t,e){n(0===(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},A.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(f(t,t.umod(this.m)._forceRed(this)),t)},A.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},A.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},A.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},A.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},A.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},A.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},A.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},A.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},A.prototype.isqr=function(t){return this.imul(t,t.clone())},A.prototype.sqr=function(t){return this.mul(t,t)},A.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,i),c=this.pow(t,i.addn(1).iushrn(1)),d=this.pow(t,i),p=s;0!==d.cmp(a);){for(var m=d,y=0;0!==m.cmp(a);y++)m=m.redSqr();n(y<p);var g=this.pow(l,new o(1).iushln(p-y-1));c=c.redMul(g),l=g.redSqr(),d=d.redMul(l),p=y}return c},A.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},A.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,h=e.bitLength()%26;for(0===h&&(h=26),n=e.length-1;n>=0;n--){for(var u=e.words[n],f=h-1;f>=0;f--){var l=u>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==l||0!==s?(s<<=1,s|=l,(4===++a||0===n&&0===f)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}h=26}return i},A.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},A.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new B(t)},i(B,A),B.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},B.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},B.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},B.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},B.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},295(t,e,r){var n=r(8287).Buffer;t.exports=function(t,e){for(var r=Math.min(t.length,e.length),i=new n(r),o=0;o<r;++o)i[o]=t[o]^e[o];return i}},8287(t,e,r){"use strict";
2
- /*!
3
- * The buffer module from node.js, for the browser.
4
- *
5
- * @author Feross Aboukhadijeh <https://feross.org>
6
- * @license MIT
7
- */const n=r(7526),i=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=h,e.SlowBuffer=function(t){+t!=t&&(t=0);return h.alloc(+t)},e.INSPECT_MAX_BYTES=50;const s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');const e=new Uint8Array(t);return Object.setPrototypeOf(e,h.prototype),e}function h(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return u(t,e,r)}function u(t,e,r){if("string"==typeof t)return function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!h.isEncoding(e))throw new TypeError("Unknown encoding: "+e);const r=0|m(t,e);let n=a(r);const i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e);if(ArrayBuffer.isView(t))return function(t){if($(t,Uint8Array)){const e=new Uint8Array(t);return d(e.buffer,e.byteOffset,e.byteLength)}return c(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if($(t,ArrayBuffer)||t&&$(t.buffer,ArrayBuffer))return d(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&($(t,SharedArrayBuffer)||t&&$(t.buffer,SharedArrayBuffer)))return d(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return h.from(n,e,r);const i=function(t){if(h.isBuffer(t)){const e=0|p(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}if(void 0!==t.length)return"number"!=typeof t.length||Y(t.length)?a(0):c(t);if("Buffer"===t.type&&Array.isArray(t.data))return c(t.data)}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return h.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function l(t){return f(t),a(t<0?0:0|p(t))}function c(t){const e=t.length<0?0:0|p(t.length),r=a(e);for(let n=0;n<e;n+=1)r[n]=255&t[n];return r}function d(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,h.prototype),n}function p(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function m(t,e){if(h.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||$(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);const r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return V(t).length;default:if(i)return n?-1:G(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,r){let n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return I(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return x(this,e,r);case"latin1":case"binary":return R(this,e,r);case"base64":return k(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function b(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Y(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=h.from(e,n)),h.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){let o,s=1,a=t.length,h=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,h/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){let n=-1;for(o=r;o<a;o++)if(u(t,o)===u(e,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===h)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+h>a&&(r=a-h),o=r;o>=0;o--){let r=!0;for(let n=0;n<h;n++)if(u(t,o+n)!==u(e,n)){r=!1;break}if(r)return o}return-1}function w(t,e,r,n){r=Number(r)||0;const i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=e.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(e.substr(2*s,2),16);if(Y(n))return s;t[r+s]=n}return s}function _(t,e,r,n){return Z(G(e,t.length-r),t,r,n)}function M(t,e,r,n){return Z(function(t){const e=[];for(let r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function S(t,e,r,n){return Z(V(e),t,r,n)}function E(t,e,r,n){return Z(function(t,e){let r,n,i;const o=[];for(let s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function k(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);const n=[];let i=e;for(;i<r;){const e=t[i];let o=null,s=e>239?4:e>223?3:e>191?2:1;if(i+s<=r){let r,n,a,h;switch(s){case 1:e<128&&(o=e);break;case 2:r=t[i+1],128==(192&r)&&(h=(31&e)<<6|63&r,h>127&&(o=h));break;case 3:r=t[i+1],n=t[i+2],128==(192&r)&&128==(192&n)&&(h=(15&e)<<12|(63&r)<<6|63&n,h>2047&&(h<55296||h>57343)&&(o=h));break;case 4:r=t[i+1],n=t[i+2],a=t[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(h=(15&e)<<18|(63&r)<<12|(63&n)<<6|63&a,h>65535&&h<1114112&&(o=h))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(t){const e=t.length;if(e<=B)return String.fromCharCode.apply(String,t);let r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=B));return r}(n)}e.kMaxLength=s,h.TYPED_ARRAY_SUPPORT=function(){try{const t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),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(t,e,r){return u(t,e,r)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array),h.alloc=function(t,e,r){return function(t,e,r){return f(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},h.allocUnsafe=function(t){return l(t)},h.allocUnsafeSlow=function(t){return l(t)},h.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==h.prototype},h.compare=function(t,e){if($(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),$(e,Uint8Array)&&(e=h.from(e,e.offset,e.byteLength)),!h.isBuffer(t)||!h.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;let r=t.length,n=e.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},h.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return h.alloc(0);let r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;const n=h.allocUnsafe(e);let i=0;for(r=0;r<t.length;++r){let e=t[r];if($(e,Uint8Array))i+e.length>n.length?(h.isBuffer(e)||(e=h.from(e)),e.copy(n,i)):Uint8Array.prototype.set.call(n,e,i);else{if(!h.isBuffer(e))throw new TypeError('"list" argument must be an Array of Buffers');e.copy(n,i)}i+=e.length}return n},h.byteLength=m,h.prototype._isBuffer=!0,h.prototype.swap16=function(){const t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let e=0;e<t;e+=2)g(this,e,e+1);return this},h.prototype.swap32=function(){const t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},h.prototype.swap64=function(){const t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},h.prototype.toString=function(){const t=this.length;return 0===t?"":0===arguments.length?A(this,0,t):y.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(t){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===h.compare(this,t)},h.prototype.inspect=function(){let t="";const r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(h.prototype[o]=h.prototype.inspect),h.prototype.compare=function(t,e,r,n,i){if($(t,Uint8Array)&&(t=h.from(t,t.offset,t.byteLength)),!h.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0);const a=Math.min(o,s),u=this.slice(n,i),f=t.slice(e,r);for(let t=0;t<a;++t)if(u[t]!==f[t]){o=u[t],s=f[t];break}return o<s?-1:s<o?1:0},h.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},h.prototype.indexOf=function(t,e,r){return b(this,t,e,r,!0)},h.prototype.lastIndexOf=function(t,e,r){return b(this,t,e,r,!1)},h.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":case"latin1":case"binary":return M(this,t,e,r);case"base64":return S(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const B=4096;function x(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function R(t,e,r){let n="";r=Math.min(t.length,r);for(let i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function I(t,e,r){const n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=e;n<r;++n)i+=X[t[n]];return i}function T(t,e,r){const n=t.slice(e,r);let i="";for(let t=0;t<n.length-1;t+=2)i+=String.fromCharCode(n[t]+256*n[t+1]);return i}function O(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function j(t,e,r,n,i,o){if(!h.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function C(t,e,r,n,i){z(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o,o>>=8,t[r++]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,s>>=8,t[r++]=s,r}function P(t,e,r,n,i){z(e,n,i,t,r,7);let o=Number(e&BigInt(4294967295));t[r+7]=o,o>>=8,t[r+6]=o,o>>=8,t[r+5]=o,o>>=8,t[r+4]=o;let s=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=s,s>>=8,t[r+2]=s,s>>=8,t[r+1]=s,s>>=8,t[r]=s,r+8}function U(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(t,e,r,n,o){return e=+e,r>>>=0,o||U(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function N(t,e,r,n,o){return e=+e,r>>>=0,o||U(t,0,r,8),i.write(t,e,r,n,52,8),r+8}h.prototype.slice=function(t,e){const r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);const n=this.subarray(t,e);return Object.setPrototypeOf(n,h.prototype),n},h.prototype.readUintLE=h.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return n},h.prototype.readUintBE=h.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t+--e],i=1;for(;e>0&&(i*=256);)n+=this[t+--e]*i;return n},h.prototype.readUint8=h.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readBigUInt64LE=J(function(t){H(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||K(t,this.length-8);const n=e+256*this[++t]+65536*this[++t]+this[++t]*2**24,i=this[++t]+256*this[++t]+65536*this[++t]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))}),h.prototype.readBigUInt64BE=J(function(t){H(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||K(t,this.length-8);const n=e*2**24+65536*this[++t]+256*this[++t]+this[++t],i=this[++t]*2**24+65536*this[++t]+256*this[++t]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),h.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=this[t],i=1,o=0;for(;++o<e&&(i*=256);)n+=this[t+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*e)),n},h.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);let n=e,i=1,o=this[t+--n];for(;n>0&&(i*=256);)o+=this[t+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*e)),o},h.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);const r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},h.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readBigInt64LE=J(function(t){H(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||K(t,this.length-8);const n=this[t+4]+256*this[t+5]+65536*this[t+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(e+256*this[++t]+65536*this[++t]+this[++t]*2**24)}),h.prototype.readBigInt64BE=J(function(t){H(t>>>=0,"offset");const e=this[t],r=this[t+7];void 0!==e&&void 0!==r||K(t,this.length-8);const n=(e<<24)+65536*this[++t]+256*this[++t]+this[++t];return(BigInt(n)<<BigInt(32))+BigInt(this[++t]*2**24+65536*this[++t]+256*this[++t]+r)}),h.prototype.readFloatLE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){j(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(t,e,r,n){if(t=+t,e>>>=0,r>>>=0,!n){j(this,t,e,r,Math.pow(2,8*r)-1,0)}let i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},h.prototype.writeUint8=h.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,1,255,0),this[e]=255&t,e+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},h.prototype.writeBigUInt64LE=J(function(t,e=0){return C(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=J(function(t,e=0){return P(this,t,e,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);j(this,t,e,r,n-1,-n)}let i=0,o=1,s=0;for(this[e]=255&t;++i<r&&(o*=256);)t<0&&0===s&&0!==this[e+i-1]&&(s=1),this[e+i]=(t/o|0)-s&255;return e+r},h.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){const n=Math.pow(2,8*r-1);j(this,t,e,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[e+i]=255&t;--i>=0&&(o*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/o|0)-s&255;return e+r},h.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},h.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},h.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},h.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},h.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},h.prototype.writeBigInt64LE=J(function(t,e=0){return C(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=J(function(t,e=0){return P(this,t,e,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeFloatLE=function(t,e,r){return L(this,t,e,!0,r)},h.prototype.writeFloatBE=function(t,e,r){return L(this,t,e,!1,r)},h.prototype.writeDoubleLE=function(t,e,r){return N(this,t,e,!0,r)},h.prototype.writeDoubleBE=function(t,e,r){return N(this,t,e,!1,r)},h.prototype.copy=function(t,e,r,n){if(!h.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);const i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},h.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!h.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){const e=t.charCodeAt(0);("utf8"===n&&e<128||"latin1"===n)&&(t=e)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;let i;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i<r;++i)this[i]=t;else{const o=h.isBuffer(t)?t:h.from(t,n),s=o.length;if(0===s)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(i=0;i<r-e;++i)this[i+e]=o[i%s]}return this};const D={};function q(t,e,r){D[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(t){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:t,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}function F(t){let e="",r=t.length;const n="-"===t[0]?1:0;for(;r>=n+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function z(t,e,r,n,i,o){if(t>r||t<e){const n="bigint"==typeof e?"n":"";let i;throw i=o>3?0===e||e===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${e}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE("value",i,t)}!function(t,e,r){H(e,"offset"),void 0!==t[e]&&void 0!==t[e+r]||K(e,t.length-(r+1))}(n,i,o)}function H(t,e){if("number"!=typeof t)throw new D.ERR_INVALID_ARG_TYPE(e,"number",t)}function K(t,e,r){if(Math.floor(t)!==t)throw H(t,r),new D.ERR_OUT_OF_RANGE(r||"offset","an integer",t);if(e<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}q("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),q("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError),q("ERR_OUT_OF_RANGE",function(t,e,r){let n=`The value of "${t}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=F(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=F(i)),i+="n"),n+=` It must be ${e}. Received ${i}`,n},RangeError);const W=/[^+/0-9A-Za-z-_]/g;function G(t,e){let r;e=e||1/0;const n=t.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=t.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function V(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Z(t,e,r,n){let i;for(i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function $(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Y(t){return t!=t}const X=function(){const t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)e[n+i]=t[r]+t[i]}return e}();function J(t){return"undefined"==typeof BigInt?Q:t}function Q(){throw new Error("BigInt not supported")}},3144(t,e,r){"use strict";var n=r(6743),i=r(1002),o=r(76),s=r(7119);t.exports=s||n.call(o,i)},2205(t,e,r){"use strict";var n=r(6743),i=r(1002),o=r(3144);t.exports=function(){return o(n,i,arguments)}},1002(t){"use strict";t.exports=Function.prototype.apply},76(t){"use strict";t.exports=Function.prototype.call},3126(t,e,r){"use strict";var n=r(6743),i=r(9675),o=r(76),s=r(3144);t.exports=function(t){if(t.length<1||"function"!=typeof t[0])throw new i("a function is required");return s(n,o,t)}},7119(t){"use strict";t.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},487(t,e,r){"use strict";var n=r(6897),i=r(655),o=r(3126),s=r(2205);t.exports=function(t){var e=o(arguments),r=1+t.length-(arguments.length-1);return n(e,r>0?r:0,!0)},i?i(t.exports,"apply",{value:s}):t.exports.apply=s},6556(t,e,r){"use strict";var n=r(453),i=r(3126),o=i([n("%String.prototype.indexOf%")]);t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&o(t,".prototype.")>-1?i([r]):r}},6168(t,e,r){"use strict";var n=r(2861).Buffer,i=r(8310).Transform,o=r(3141).I,s=r(941),a=r(5377);function h(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}s(h,i),h.prototype.update=function(t,e,r){var n=a(t,e),i=this._update(n);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},h.prototype.setAutoPadding=function(){},h.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},h.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},h.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},h.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},h.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},h.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},h.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can’t switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},t.exports=h},941(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},5622(t,e,r){function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(8287).Buffer.isBuffer},7108(t,e,r){"use strict";var n=r(6698),i=r(8276),o=r(6011),s=r(2802),a=r(6168);function h(t){a.call(this,"digest"),this._hash=t}n(h,a),h.prototype._update=function(t){this._hash.update(t)},h.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new o:new h(s(t))}},320(t,e,r){var n=r(8276);t.exports=function(t){return(new n).update(t).digest()}},3507(t,e,r){"use strict";var n=r(6698),i=r(1800),o=r(6168),s=r(2861).Buffer,a=r(320),h=r(6011),u=r(2802),f=s.alloc(128);function l(t,e){o.call(this,"digest"),"string"==typeof e&&(e=s.from(e));var r="sha512"===t||"sha384"===t?128:64;(this._alg=t,this._key=e,e.length>r)?e=("rmd160"===t?new h:u(t)).update(e).digest():e.length<r&&(e=s.concat([e,f],r));for(var n=this._ipad=s.allocUnsafe(r),i=this._opad=s.allocUnsafe(r),a=0;a<r;a++)n[a]=54^e[a],i[a]=92^e[a];this._hash="rmd160"===t?new h:u(t),this._hash.update(n)}n(l,o),l.prototype._update=function(t){this._hash.update(t)},l.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new h:u(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new l("rmd160",e):"md5"===t?new i(a,e):new l(t,e)}},1800(t,e,r){"use strict";var n=r(6698),i=r(2861).Buffer,o=r(6168),s=i.alloc(128),a=64;function h(t,e){o.call(this,"digest"),"string"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>a?e=t(e):e.length<a&&(e=i.concat([e,s],a));for(var r=this._ipad=i.allocUnsafe(a),n=this._opad=i.allocUnsafe(a),h=0;h<a;h++)r[h]=54^e[h],n[h]=92^e[h];this._hash=[r]}n(h,o),h.prototype._update=function(t){this._hash.push(t)},h.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},t.exports=h},1565(t,e,r){"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=r(3209),e.createHash=e.Hash=r(7108),e.createHmac=e.Hmac=r(3507);var n=r(8216),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);e.getHashes=function(){return o};var s=r(8396);e.pbkdf2=s.pbkdf2,e.pbkdf2Sync=s.pbkdf2Sync;var a=r(125);e.Cipher=a.Cipher,e.createCipher=a.createCipher,e.Cipheriv=a.Cipheriv,e.createCipheriv=a.createCipheriv,e.Decipher=a.Decipher,e.createDecipher=a.createDecipher,e.Decipheriv=a.Decipheriv,e.createDecipheriv=a.createDecipheriv,e.getCiphers=a.getCiphers,e.listCiphers=a.listCiphers;var h=r(5380);e.DiffieHellmanGroup=h.DiffieHellmanGroup,e.createDiffieHellmanGroup=h.createDiffieHellmanGroup,e.getDiffieHellman=h.getDiffieHellman,e.createDiffieHellman=h.createDiffieHellman,e.DiffieHellman=h.DiffieHellman;var u=r(4581);e.createSign=u.createSign,e.Sign=u.Sign,e.createVerify=u.createVerify,e.Verify=u.Verify,e.createECDH=r(9004);var f=r(7168);e.publicEncrypt=f.publicEncrypt,e.privateEncrypt=f.privateEncrypt,e.publicDecrypt=f.publicDecrypt,e.privateDecrypt=f.privateDecrypt;var l=r(6983);e.randomFill=l.randomFill,e.randomFillSync=l.randomFillSync,e.createCredentials=function(){throw new Error("sorry, createCredentials is not implemented yet\nwe accept pull requests\nhttps://github.com/browserify/crypto-browserify")},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},41(t,e,r){"use strict";var n=r(655),i=r(8068),o=r(9675),s=r(5795);t.exports=function(t,e,r){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new o("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new o("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,h=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,f=arguments.length>6&&arguments[6],l=!!s&&s(t,e);if(n)n(t,e,{configurable:null===u&&l?l.configurable:!u,enumerable:null===a&&l?l.enumerable:!a,value:r,writable:null===h&&l?l.writable:!h});else{if(!f&&(a||h||u))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=r}}},9560(t,e,r){"use strict";e.utils=r(7626),e.Cipher=r(2808),e.DES=r(2211),e.CBC=r(3389),e.EDE=r(5279)},3389(t,e,r){"use strict";var n=r(3349),i=r(6698),o={};function s(t){n.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}e.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}i(e,t);for(var r=Object.keys(o),n=0;n<r.length;n++){var s=r[n];e.prototype[s]=o[s]}return e.create=function(t){return new e(t)},e},o._cbcInit=function(){var t=new s(this.options.iv);this._cbcState=t},o._update=function(t,e,r,n){var i=this._cbcState,o=this.constructor.super_.prototype,s=i.iv;if("encrypt"===this.type){for(var a=0;a<this.blockSize;a++)s[a]^=t[e+a];o._update.call(this,s,0,r,n);for(a=0;a<this.blockSize;a++)s[a]=r[n+a]}else{o._update.call(this,t,e,r,n);for(a=0;a<this.blockSize;a++)r[n+a]^=s[a];for(a=0;a<this.blockSize;a++)s[a]=t[e+a]}}},2808(t,e,r){"use strict";var n=r(3349);function i(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==t.padding}t.exports=i,i.prototype._init=function(){},i.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},i.prototype._buffer=function(t,e){for(var r=Math.min(this.buffer.length-this.bufferOff,t.length-e),n=0;n<r;n++)this.buffer[this.bufferOff+n]=t[e+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(t){var e=0,r=0,n=(this.bufferOff+t.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var o=t.length-(t.length-e)%this.blockSize;e<o;e+=this.blockSize)this._update(t,e,i,r),r+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return i},i.prototype._updateDecrypt=function(t){for(var e=0,r=0,n=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)e+=this._buffer(t,e),r+=this._flushBuffer(i,r);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},i.prototype._unpad=function(t){return t},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}},2211(t,e,r){"use strict";var n=r(3349),i=r(6698),o=r(7626),s=r(2808);function a(){this.tmp=new Array(2),this.keys=null}function h(t){s.call(this,t);var e=new a;this._desState=e,this.deriveKeys(e,t.key)}i(h,s),t.exports=h,h.create=function(t){return new h(t)};var u=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];h.prototype.deriveKeys=function(t,e){t.keys=new Array(32),n.equal(e.length,this.blockSize,"Invalid key length");var r=o.readUInt32BE(e,0),i=o.readUInt32BE(e,4);o.pc1(r,i,t.tmp,0),r=t.tmp[0],i=t.tmp[1];for(var s=0;s<t.keys.length;s+=2){var a=u[s>>>1];r=o.r28shl(r,a),i=o.r28shl(i,a),o.pc2(r,i,t.keys,s)}},h.prototype._update=function(t,e,r,n){var i=this._desState,s=o.readUInt32BE(t,e),a=o.readUInt32BE(t,e+4);o.ip(s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],"encrypt"===this.type?this._encrypt(i,s,a,i.tmp,0):this._decrypt(i,s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],o.writeUInt32BE(r,s,n),o.writeUInt32BE(r,a,n+4)},h.prototype._pad=function(t,e){if(!1===this.padding)return!1;for(var r=t.length-e,n=e;n<t.length;n++)t[n]=r;return!0},h.prototype._unpad=function(t){if(!1===this.padding)return t;for(var e=t[t.length-1],r=t.length-e;r<t.length;r++)n.equal(t[r],e);return t.slice(0,t.length-e)},h.prototype._encrypt=function(t,e,r,n,i){for(var s=e,a=r,h=0;h<t.keys.length;h+=2){var u=t.keys[h],f=t.keys[h+1];o.expand(a,t.tmp,0),u^=t.tmp[0],f^=t.tmp[1];var l=o.substitute(u,f),c=a;a=(s^o.permute(l))>>>0,s=c}o.rip(a,s,n,i)},h.prototype._decrypt=function(t,e,r,n,i){for(var s=r,a=e,h=t.keys.length-2;h>=0;h-=2){var u=t.keys[h],f=t.keys[h+1];o.expand(s,t.tmp,0),u^=t.tmp[0],f^=t.tmp[1];var l=o.substitute(u,f),c=s;s=(a^o.permute(l))>>>0,a=c}o.rip(s,a,n,i)}},5279(t,e,r){"use strict";var n=r(3349),i=r(6698),o=r(2808),s=r(2211);function a(t,e){n.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),i=e.slice(8,16),o=e.slice(16,24);this.ciphers="encrypt"===t?[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:o})]:[s.create({type:"decrypt",key:o}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:r})]}function h(t){o.call(this,t);var e=new a(this.type,this.options.key);this._edeState=e}i(h,o),t.exports=h,h.create=function(t){return new h(t)},h.prototype._update=function(t,e,r,n){var i=this._edeState;i.ciphers[0]._update(t,e,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},h.prototype._pad=s.prototype._pad,h.prototype._unpad=s.prototype._unpad},7626(t,e){"use strict";e.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},e.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},e.ip=function(t,e,r,n){for(var i=0,o=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)i<<=1,i|=e>>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=t>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1}r[n+0]=i>>>0,r[n+1]=o>>>0},e.rip=function(t,e,r,n){for(var i=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)i<<=1,i|=e>>>a+s&1,i<<=1,i|=t>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=e>>>a+s&1,o<<=1,o|=t>>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.pc1=function(t,e,r,n){for(var i=0,o=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1}for(a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.r28shl=function(t,e){return t<<e&268435455|t>>>28-e};var r=[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];e.pc2=function(t,e,n,i){for(var o=0,s=0,a=r.length>>>1,h=0;h<a;h++)o<<=1,o|=t>>>r[h]&1;for(h=a;h<r.length;h++)s<<=1,s|=e>>>r[h]&1;n[i+0]=o>>>0,n[i+1]=s>>>0},e.expand=function(t,e,r){var n=0,i=0;n=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[r+0]=n>>>0,e[r+1]=i>>>0};var n=[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];e.substitute=function(t,e){for(var r=0,i=0;i<4;i++){r<<=4,r|=n[64*i+(t>>>18-6*i&63)]}for(i=0;i<4;i++){r<<=4,r|=n[256+64*i+(e>>>18-6*i&63)]}return r>>>0};var i=[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];e.permute=function(t){for(var e=0,r=0;r<i.length;r++)e<<=1,e|=t>>>i[r]&1;return e>>>0},e.padSplit=function(t,e,r){for(var n=t.toString(2);n.length<e;)n="0"+n;for(var i=[],o=0;o<e;o+=r)i.push(n.slice(o,o+r));return i.join(" ")}},5380(t,e,r){var n=r(8287).Buffer,i=r(4934),o=r(3241),s=r(4910);var a={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(t){var e=new n(o[t].prime,"hex"),r=new n(o[t].gen,"hex");return new s(e,r)},e.createDiffieHellman=e.DiffieHellman=function t(e,r,o,h){return n.isBuffer(r)||void 0===a[r]?t(e,"binary",r,o):(r=r||"binary",h=h||"binary",o=o||new n([2]),n.isBuffer(o)||(o=new n(o,h)),"number"==typeof e?new s(i(e,o),o,!0):(n.isBuffer(e)||(e=new n(e,r)),new s(e,o,!0)))}},4910(t,e,r){var n=r(8287).Buffer,i=r(9404),o=new(r(2244)),s=new i(24),a=new i(11),h=new i(10),u=new i(3),f=new i(7),l=r(4934),c=r(3209);function d(t,e){return e=e||"utf8",n.isBuffer(t)||(t=new n(t,e)),this._pub=new i(t),this}function p(t,e){return e=e||"utf8",n.isBuffer(t)||(t=new n(t,e)),this._priv=new i(t),this}t.exports=y;var m={};function y(t,e,r){this.setGenerator(e),this.__prime=new i(t),this._prime=i.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=d,this.setPrivateKey=p):this._primeCode=8}function g(t,e){var r=new n(t.toArray());return e?r.toString(e):r}Object.defineProperty(y.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,e){var r=e.toString("hex"),n=[r,t.toString(16)].join("_");if(n in m)return m[n];var i,c=0;if(t.isEven()||!l.simpleSieve||!l.fermatTest(t)||!o.test(t))return c+=1,c+="02"===r||"05"===r?8:4,m[n]=c,c;switch(o.test(t.shrn(1))||(c+=2),r){case"02":t.mod(s).cmp(a)&&(c+=8);break;case"05":(i=t.mod(h)).cmp(u)&&i.cmp(f)&&(c+=8);break;default:c+=4}return m[n]=c,c}(this.__prime,this.__gen)),this._primeCode}}),y.prototype.generateKeys=function(){return this._priv||(this._priv=new i(c(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},y.prototype.computeSecret=function(t){var e=(t=(t=new i(t)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new n(e.toArray()),o=this.getPrime();if(r.length<o.length){var s=new n(o.length-r.length);s.fill(0),r=n.concat([s,r])}return r},y.prototype.getPublicKey=function(t){return g(this._pub,t)},y.prototype.getPrivateKey=function(t){return g(this._priv,t)},y.prototype.getPrime=function(t){return g(this.__prime,t)},y.prototype.getGenerator=function(t){return g(this._gen,t)},y.prototype.setGenerator=function(t,e){return e=e||"utf8",n.isBuffer(t)||(t=new n(t,e)),this.__gen=t,this._gen=new i(t),this}},4934(t,e,r){var n=r(3209);t.exports=b,b.simpleSieve=y,b.fermatTest=g;var i=r(9404),o=new i(24),s=new(r(2244)),a=new i(1),h=new i(2),u=new i(5),f=(new i(16),new i(8),new i(10)),l=new i(3),c=(new i(7),new i(11)),d=new i(4),p=(new i(12),null);function m(){if(null!==p)return p;var t=[];t[0]=2;for(var e=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<e&&t[i]<=n&&r%t[i]!==0;i++);e!==i&&t[i]<=n||(t[e++]=r)}return p=t,t}function y(t){for(var e=m(),r=0;r<e.length;r++)if(0===t.modn(e[r]))return 0===t.cmpn(e[r]);return!0}function g(t){var e=i.mont(t);return 0===h.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)}function b(t,e){if(t<16)return new i(2===e||5===e?[140,123]:[140,39]);var r,p;for(e=new i(e);;){for(r=new i(n(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(a),r.testn(1)||r.iadd(h),e.cmp(h)){if(!e.cmp(u))for(;r.mod(f).cmp(l);)r.iadd(d)}else for(;r.mod(o).cmp(c);)r.iadd(d);if(y(p=r.shrn(1))&&y(r)&&g(p)&&g(r)&&s.test(p)&&s.test(r))return r}}},7176(t,e,r){"use strict";var n,i=r(3126),o=r(5795);try{n=[].__proto__===Array.prototype}catch(t){if(!t||"object"!=typeof t||!("code"in t)||"ERR_PROTO_ACCESS"!==t.code)throw t}var s=!!n&&o&&o(Object.prototype,"__proto__"),a=Object,h=a.getPrototypeOf;t.exports=s&&"function"==typeof s.get?i([s.get]):"function"==typeof h&&function(t){return h(null==t?t:a(t))}},655(t){"use strict";var e=Object.defineProperty||!1;if(e)try{e({},"a",{value:1})}catch(t){e=!1}t.exports=e},1237(t){"use strict";t.exports=EvalError},9383(t){"use strict";t.exports=Error},9290(t){"use strict";t.exports=RangeError},9538(t){"use strict";t.exports=ReferenceError},8068(t){"use strict";t.exports=SyntaxError},9675(t){"use strict";t.exports=TypeError},5345(t){"use strict";t.exports=URIError},9612(t){"use strict";t.exports=Object},7007(t){"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise(function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}m(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&m(t,"error",e,r)}(t,i,{once:!0})})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function h(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function u(t,e,r,n){var i,o,s,u;if(a(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),void 0===s)s=o[e]=r,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=h(t))>0&&s.length>i&&!s.warned){s.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=e,f.count=s.length,u=f,console&&console.warn&&console.warn(u)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=f.bind(n);return i.listener=r,n.wrapFn=i,i}function c(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):p(i,i.length)}function d(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function m(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,function i(o){n.once&&t.removeEventListener(e,i),r(o)})}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),o.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},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return h(this)},o.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var h=o[t];if(void 0===h)return!1;if("function"==typeof h)n(h,this,e);else{var u=h.length,f=p(h,u);for(r=0;r<u;++r)n(f[r],this,e)}return!0},o.prototype.addListener=function(t,e){return u(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return u(this,t,e,!0)},o.prototype.once=function(t,e){return a(e),this.on(t,l(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,l(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,n,i,o,s;if(a(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0===--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return c(this,t,!0)},o.prototype.rawListeners=function(t){return c(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):d.call(t,e)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},8078(t,e,r){var n=r(2861).Buffer,i=r(8276);t.exports=function(t,e,r,o){if(n.isBuffer(t)||(t=n.from(t,"binary")),e&&(n.isBuffer(e)||(e=n.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=r/8,a=n.alloc(s),h=n.alloc(o||0),u=n.alloc(0);s>0||o>0;){var f=new i;f.update(u),f.update(t),e&&f.update(e),u=f.digest();var l=0;if(s>0){var c=a.length-s;l=Math.min(s,u.length),u.copy(a,c,0,l),s-=l}if(l<u.length&&o>0){var d=h.length-o,p=Math.min(o,u.length-l);u.copy(h,d,l,l+p),o-=p}}return u.fill(0),{key:a,iv:h}}},2682(t,e,r){"use strict";var n=r(9600),i=Object.prototype.toString,o=Object.prototype.hasOwnProperty;t.exports=function(t,e,r){if(!n(e))throw new TypeError("iterator must be a function");var s,a;arguments.length>=3&&(s=r),a=t,"[object Array]"===i.call(a)?function(t,e,r){for(var n=0,i=t.length;n<i;n++)o.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,s):"string"==typeof t?function(t,e,r){for(var n=0,i=t.length;n<i;n++)null==r?e(t.charAt(n),n,t):e.call(r,t.charAt(n),n,t)}(t,e,s):function(t,e,r){for(var n in t)o.call(t,n)&&(null==r?e(t[n],n,t):e.call(r,t[n],n,t))}(t,e,s)}},9353(t){"use strict";var e=Object.prototype.toString,r=Math.max,n=function(t,e){for(var r=[],n=0;n<t.length;n+=1)r[n]=t[n];for(var i=0;i<e.length;i+=1)r[i+t.length]=e[i];return r};t.exports=function(t){var i=this;if("function"!=typeof i||"[object Function]"!==e.apply(i))throw new TypeError("Function.prototype.bind called on incompatible "+i);for(var o,s=function(t,e){for(var r=[],n=e||0,i=0;n<t.length;n+=1,i+=1)r[i]=t[n];return r}(arguments,1),a=r(0,i.length-s.length),h=[],u=0;u<a;u++)h[u]="$"+u;if(o=Function("binder","return function ("+function(t,e){for(var r="",n=0;n<t.length;n+=1)r+=t[n],n+1<t.length&&(r+=e);return r}(h,",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof o){var e=i.apply(this,n(s,arguments));return Object(e)===e?e:this}return i.apply(t,n(s,arguments))}),i.prototype){var f=function(){};f.prototype=i.prototype,o.prototype=new f,f.prototype=null}return o}},6743(t,e,r){"use strict";var n=r(9353);t.exports=Function.prototype.bind||n},453(t,e,r){"use strict";var n,i=r(9612),o=r(9383),s=r(1237),a=r(9290),h=r(9538),u=r(8068),f=r(9675),l=r(5345),c=r(1514),d=r(8968),p=r(6188),m=r(8002),y=r(5880),g=r(414),b=r(3093),v=Function,w=function(t){try{return v('"use strict"; return ('+t+").constructor;")()}catch(t){}},_=r(5795),M=r(655),S=function(){throw new f},E=_?function(){try{return S}catch(t){try{return _(arguments,"callee").get}catch(t){return S}}}():S,k=r(4039)(),A=r(3628),B=r(1064),x=r(8648),R=r(1002),I=r(76),T={},O="undefined"!=typeof Uint8Array&&A?A(Uint8Array):n,j={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":k&&A?A([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":T,"%AsyncGenerator%":T,"%AsyncGeneratorFunction%":T,"%AsyncIteratorPrototype%":T,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":s,"%Float16Array%":"undefined"==typeof Float16Array?n:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":T,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":k&&A?A(A([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&k&&A?A((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":_,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":a,"%ReferenceError%":h,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&k&&A?A((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":k&&A?A(""[Symbol.iterator]()):n,"%Symbol%":k?Symbol:n,"%SyntaxError%":u,"%ThrowTypeError%":E,"%TypedArray%":O,"%TypeError%":f,"%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%":l,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet,"%Function.prototype.call%":I,"%Function.prototype.apply%":R,"%Object.defineProperty%":M,"%Object.getPrototypeOf%":B,"%Math.abs%":c,"%Math.floor%":d,"%Math.max%":p,"%Math.min%":m,"%Math.pow%":y,"%Math.round%":g,"%Math.sign%":b,"%Reflect.getPrototypeOf%":x};if(A)try{null.error}catch(t){var C=A(A(t));j["%Error.prototype%"]=C}var P=function t(e){var r;if("%AsyncFunction%"===e)r=w("async function () {}");else if("%GeneratorFunction%"===e)r=w("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=w("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&A&&(r=A(i.prototype))}return j[e]=r,r},U={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},L=r(6743),N=r(9957),D=L.call(I,Array.prototype.concat),q=L.call(R,Array.prototype.splice),F=L.call(I,String.prototype.replace),z=L.call(I,String.prototype.slice),H=L.call(I,RegExp.prototype.exec),K=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,W=/\\(\\)?/g,G=function(t,e){var r,n=t;if(N(U,n)&&(n="%"+(r=U[n])[0]+"%"),N(j,n)){var i=j[n];if(i===T&&(i=P(n)),void 0===i&&!e)throw new f("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new u("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new f("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new f('"allowMissing" argument must be a boolean');if(null===H(/^%?[^%]*%?$/,t))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(t){var e=z(t,0,1),r=z(t,-1);if("%"===e&&"%"!==r)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new u("invalid intrinsic syntax, expected opening `%`");var n=[];return F(t,K,function(t,e,r,i){n[n.length]=r?F(i,W,"$1"):e||t}),n}(t),n=r.length>0?r[0]:"",i=G("%"+n+"%",e),o=i.name,s=i.value,a=!1,h=i.alias;h&&(n=h[0],q(r,D([0,1],h)));for(var l=1,c=!0;l<r.length;l+=1){var d=r[l],p=z(d,0,1),m=z(d,-1);if(('"'===p||"'"===p||"`"===p||'"'===m||"'"===m||"`"===m)&&p!==m)throw new u("property names with quotes must have matching quotes");if("constructor"!==d&&c||(a=!0),N(j,o="%"+(n+="."+d)+"%"))s=j[o];else if(null!=s){if(!(d in s)){if(!e)throw new f("base intrinsic for "+t+" exists, but the property is not available.");return}if(_&&l+1>=r.length){var y=_(s,d);s=(c=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:s[d]}else c=N(s,d),s=s[d];c&&!a&&(j[o]=s)}}return s}},1064(t,e,r){"use strict";var n=r(9612);t.exports=n.getPrototypeOf||null},8648(t){"use strict";t.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},3628(t,e,r){"use strict";var n=r(8648),i=r(1064),o=r(7176);t.exports=n?function(t){return n(t)}:i?function(t){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("getProto: not an object");return i(t)}:o?function(t){return o(t)}:null},6549(t){"use strict";t.exports=Object.getOwnPropertyDescriptor},5795(t,e,r){"use strict";var n=r(6549);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},592(t,e,r){"use strict";var n=r(655),i=function(){return!!n};i.hasArrayLengthDefineBug=function(){if(!n)return null;try{return 1!==n([],"length",{value:1}).length}catch(t){return!0}},t.exports=i},4039(t,e,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(1333);t.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},1333(t){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var i=Object.getOwnPropertySymbols(t);if(1!==i.length||i[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(t,e);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},9092(t,e,r){"use strict";var n=r(1333);t.exports=function(){return n()&&!!Symbol.toStringTag}},4729(t,e,r){"use strict";var n=r(2861).Buffer,i=r(8310).Transform;function o(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(9094)(o,i),o.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)};var s="undefined"!=typeof Uint8Array,a="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&ArrayBuffer.isView&&(n.prototype instanceof Uint8Array||n.TYPED_ARRAY_SUPPORT);o.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");t=function(t,e){if(t instanceof n)return t;if("string"==typeof t)return n.from(t,e);if(a&&ArrayBuffer.isView(t)){if(0===t.byteLength)return n.alloc(0);var r=n.from(t.buffer,t.byteOffset,t.byteLength);if(r.byteLength===t.byteLength)return r}if(s&&t instanceof Uint8Array)return n.from(t);if(n.isBuffer(t)&&t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return n.from(t);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}(t,e);for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var h=0,u=8*t.length;u>0;++h)this._length[h]+=u,(u=this._length[h]/4294967296|0)>0&&(this._length[h]-=4294967296*u);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},9094(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},7952(t,e,r){var n=e;n.utils=r(7426),n.common=r(6166),n.sha=r(6229),n.ripemd=r(6784),n.hmac=r(8948),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},6166(t,e,r){"use strict";var n=r(7426),i=r(3349);function o(){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}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},8948(t,e,r){"use strict";var n=r(7426),i=r(3349);function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},6784(t,e,r){"use strict";var n=r(7426),i=r(6166),o=n.rotl32,s=n.sum32,a=n.sum32_3,h=n.sum32_4,u=i.BlockHash;function f(){if(!(this instanceof f))return new f;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function c(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function d(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(f,u),e.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],u=this.h[3],f=this.h[4],b=r,v=n,w=i,_=u,M=f,S=0;S<80;S++){var E=s(o(h(r,l(S,n,i,u),t[p[S]+e],c(S)),y[S]),f);r=f,f=u,u=o(i,10),i=n,n=E,E=s(o(h(b,l(79-S,v,w,_),t[m[S]+e],d(S)),g[S]),M),b=M,M=_,_=o(w,10),w=v,v=E}E=a(this.h[1],i,_),this.h[1]=a(this.h[2],u,M),this.h[2]=a(this.h[3],f,b),this.h[3]=a(this.h[4],r,v),this.h[4]=a(this.h[0],n,w),this.h[0]=E},f.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[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],m=[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],y=[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],g=[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]},6229(t,e,r){"use strict";e.sha1=r(3917),e.sha224=r(7714),e.sha256=r(2287),e.sha384=r(1911),e.sha512=r(7766)},3917(t,e,r){"use strict";var n=r(7426),i=r(6166),o=r(6225),s=n.rotl32,a=n.sum32,h=n.sum32_5,u=o.ft_1,f=i.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function c(){if(!(this instanceof c))return new c;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(c,f),t.exports=c,c.blockSize=512,c.outSize=160,c.hmacStrength=80,c.padLength=64,c.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],f=this.h[2],c=this.h[3],d=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),m=h(s(i,5),u(p,o,f,c),d,r[n],l[p]);d=c,c=f,f=s(o,30),o=i,i=m}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],f),this.h[3]=a(this.h[3],c),this.h[4]=a(this.h[4],d)},c.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},7714(t,e,r){"use strict";var n=r(7426),i=r(2287);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},2287(t,e,r){"use strict";var n=r(7426),i=r(6166),o=r(6225),s=r(3349),a=n.sum32,h=n.sum32_4,u=n.sum32_5,f=o.ch32,l=o.maj32,c=o.s0_256,d=o.s1_256,p=o.g0_256,m=o.g1_256,y=i.BlockHash,g=[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;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=g,this.W=new Array(64)}n.inherits(b,y),t.exports=b,b.blockSize=512,b.outSize=256,b.hmacStrength=192,b.padLength=64,b.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=h(m(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],y=this.h[2],g=this.h[3],b=this.h[4],v=this.h[5],w=this.h[6],_=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var M=u(_,d(b),f(b,v,w),this.k[n],r[n]),S=a(c(i),l(i,o,y));_=w,w=v,v=b,b=a(g,M),g=y,y=o,o=i,i=a(M,S)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],y),this.h[3]=a(this.h[3],g),this.h[4]=a(this.h[4],b),this.h[5]=a(this.h[5],v),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],_)},b.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},1911(t,e,r){"use strict";var n=r(7426),i=r(7766);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},7766(t,e,r){"use strict";var n=r(7426),i=r(6166),o=r(3349),s=n.rotr64_hi,a=n.rotr64_lo,h=n.shr64_hi,u=n.shr64_lo,f=n.sum64,l=n.sum64_hi,c=n.sum64_lo,d=n.sum64_4_hi,p=n.sum64_4_lo,m=n.sum64_5_hi,y=n.sum64_5_lo,g=i.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 v(){if(!(this instanceof v))return new v;g.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(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function _(t,e,r,n,i,o){var s=e&n^~e&o;return s<0&&(s+=4294967296),s}function M(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function S(t,e,r,n,i,o){var s=e&n^e&o^n&o;return s<0&&(s+=4294967296),s}function E(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=4294967296),r}function k(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r<0&&(r+=4294967296),r}function A(t,e){var r=s(t,e,14)^s(t,e,18)^s(e,t,9);return r<0&&(r+=4294967296),r}function B(t,e){var r=a(t,e,14)^a(t,e,18)^a(e,t,9);return r<0&&(r+=4294967296),r}function x(t,e){var r=s(t,e,1)^s(t,e,8)^h(t,e,7);return r<0&&(r+=4294967296),r}function R(t,e){var r=a(t,e,1)^a(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function I(t,e){var r=s(t,e,19)^s(e,t,29)^h(t,e,6);return r<0&&(r+=4294967296),r}function T(t,e){var r=a(t,e,19)^a(e,t,29)^u(t,e,6);return r<0&&(r+=4294967296),r}n.inherits(v,g),t.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=I(r[n-4],r[n-3]),o=T(r[n-4],r[n-3]),s=r[n-14],a=r[n-13],h=x(r[n-30],r[n-29]),u=R(r[n-30],r[n-29]),f=r[n-32],l=r[n-31];r[n]=d(i,o,s,a,h,u,f,l),r[n+1]=p(i,o,s,a,h,u,f,l)}},v.prototype._update=function(t,e){this._prepareBlock(t,e);var r=this.W,n=this.h[0],i=this.h[1],s=this.h[2],a=this.h[3],h=this.h[4],u=this.h[5],d=this.h[6],p=this.h[7],g=this.h[8],b=this.h[9],v=this.h[10],x=this.h[11],R=this.h[12],I=this.h[13],T=this.h[14],O=this.h[15];o(this.k.length===r.length);for(var j=0;j<r.length;j+=2){var C=T,P=O,U=A(g,b),L=B(g,b),N=w(g,b,v,x,R),D=_(g,b,v,x,R,I),q=this.k[j],F=this.k[j+1],z=r[j],H=r[j+1],K=m(C,P,U,L,N,D,q,F,z,H),W=y(C,P,U,L,N,D,q,F,z,H);C=E(n,i),P=k(n,i),U=M(n,i,s,a,h),L=S(n,i,s,a,h,u);var G=l(C,P,U,L),V=c(C,P,U,L);T=R,O=I,R=v,I=x,v=g,x=b,g=l(d,p,K,W),b=c(p,p,K,W),d=h,p=u,h=s,u=a,s=n,a=i,n=l(K,W,G,V),i=c(K,W,G,V)}f(this.h,0,n,i),f(this.h,2,s,a),f(this.h,4,h,u),f(this.h,6,d,p),f(this.h,8,g,b),f(this.h,10,v,x),f(this.h,12,R,I),f(this.h,14,T,O)},v.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},6225(t,e,r){"use strict";var n=r(7426).rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function s(t,e,r){return t^e^r}e.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?s(e,r,n):2===t?o(e,r,n):void 0},e.ch32=i,e.maj32=o,e.p32=s,e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},7426(t,e,r){"use strict";var n=r(3349),i=r(6698);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function h(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i<t.length;i++)r[i]=0|t[i];return r},e.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=a(t[r].toString(16));return e},e.htonl=s,e.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];"little"===e&&(i=s(i)),r+=h(i.toString(16))}return r},e.zero2=a,e.zero8=h,e.join32=function(t,e,r,i){var o=r-e;n(o%4==0);for(var s=new Array(o/4),a=0,h=e;a<s.length;a++,h+=4){var u;u="big"===i?t[h]<<24|t[h+1]<<16|t[h+2]<<8|t[h+3]:t[h+3]<<24|t[h+2]<<16|t[h+1]<<8|t[h],s[a]=u>>>0}return s},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];"big"===e?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,s=(o<n?1:0)+r+i;t[e]=s>>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,s,a){var h=0,u=e;return h+=(u=u+n>>>0)<e?1:0,h+=(u=u+o>>>0)<o?1:0,t+r+i+s+(h+=(u=u+a>>>0)<a?1:0)>>>0},e.sum64_4_lo=function(t,e,r,n,i,o,s,a){return e+n+o+a>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,s,a,h,u){var f=0,l=e;return f+=(l=l+n>>>0)<e?1:0,f+=(l=l+o>>>0)<o?1:0,f+=(l=l+a>>>0)<a?1:0,t+r+i+s+h+(f+=(l=l+u>>>0)<u?1:0)>>>0},e.sum64_5_lo=function(t,e,r,n,i,o,s,a,h,u){return e+n+o+a+u>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},9957(t,e,r){"use strict";var n=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=r(6743);t.exports=o.call(n,i)},251(t,e){
8
- /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
9
- e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,h=(1<<a)-1,u=h>>1,f=-7,l=r?i-1:0,c=r?-1:1,d=t[e+l];for(l+=c,o=d&(1<<-f)-1,d>>=-f,f+=a;f>0;o=256*o+t[e+l],l+=c,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+l],l+=c,f-=8);if(0===o)o=1-u;else{if(o===h)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=u}return(d?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,h,u=8*o-i-1,f=(1<<u)-1,l=f>>1,c=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-s))<1&&(s--,h*=2),(e+=s+l>=1?c/h:c*Math.pow(2,1-l))*h>=2&&(s++,h/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(e*h-1)*Math.pow(2,i),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,i),s=0));i>=8;t[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,u+=i;u>0;t[r+d]=255&s,d+=p,s/=256,u-=8);t[r+d-p]|=128*m}},6698(t){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},9600(t){"use strict";var e,r,n=Function.prototype.toString,i="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof i&&"function"==typeof Object.defineProperty)try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},i(function(){throw 42},null,e)}catch(t){t!==r&&(i=null)}else i=null;var o=/^\s*class\b/,s=function(t){try{var e=n.call(t);return o.test(e)}catch(t){return!1}},a=function(t){try{return!s(t)&&(n.call(t),!0)}catch(t){return!1}},h=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,f=!(0 in[,]),l=function(){return!1};if("object"==typeof document){var c=document.all;h.call(c)===h.call(document.all)&&(l=function(t){if((f||!t)&&(void 0===t||"object"==typeof t))try{var e=h.call(t);return("[object HTMLAllCollection]"===e||"[object HTML document.all class]"===e||"[object HTMLCollection]"===e||"[object Object]"===e)&&null==t("")}catch(t){}return!1})}t.exports=i?function(t){if(l(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;try{i(t,null,e)}catch(t){if(t!==r)return!1}return!s(t)&&a(t)}:function(t){if(l(t))return!0;if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(u)return a(t);if(s(t))return!1;var e=h.call(t);return!("[object Function]"!==e&&"[object GeneratorFunction]"!==e&&!/^\[object HTML/.test(e))&&a(t)}},5680(t,e,r){"use strict";var n=r(5767);t.exports=function(t){return!!n(t)}},1514(t){"use strict";t.exports=Math.abs},8968(t){"use strict";t.exports=Math.floor},4459(t){"use strict";t.exports=Number.isNaN||function(t){return t!=t}},6188(t){"use strict";t.exports=Math.max},8002(t){"use strict";t.exports=Math.min},5880(t){"use strict";t.exports=Math.pow},414(t){"use strict";t.exports=Math.round},3093(t,e,r){"use strict";var n=r(4459);t.exports=function(t){return n(t)||0===t?t:t<0?-1:1}},8276(t,e,r){"use strict";var n=r(6698),i=r(4729),o=r(2861).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function h(t,e){return t<<e|t>>>32-e}function u(t,e,r,n,i,o,s){return h(t+(e&r|~e&n)+i+o|0,s)+e|0}function f(t,e,r,n,i,o,s){return h(t+(e&n|r&~n)+i+o|0,s)+e|0}function l(t,e,r,n,i,o,s){return h(t+(e^r^n)+i+o|0,s)+e|0}function c(t,e,r,n,i,o,s){return h(t+(r^(e|~n))+i+o|0,s)+e|0}n(a,i),a.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d;r=u(r,n,i,o,t[0],3614090360,7),o=u(o,r,n,i,t[1],3905402710,12),i=u(i,o,r,n,t[2],606105819,17),n=u(n,i,o,r,t[3],3250441966,22),r=u(r,n,i,o,t[4],4118548399,7),o=u(o,r,n,i,t[5],1200080426,12),i=u(i,o,r,n,t[6],2821735955,17),n=u(n,i,o,r,t[7],4249261313,22),r=u(r,n,i,o,t[8],1770035416,7),o=u(o,r,n,i,t[9],2336552879,12),i=u(i,o,r,n,t[10],4294925233,17),n=u(n,i,o,r,t[11],2304563134,22),r=u(r,n,i,o,t[12],1804603682,7),o=u(o,r,n,i,t[13],4254626195,12),i=u(i,o,r,n,t[14],2792965006,17),r=f(r,n=u(n,i,o,r,t[15],1236535329,22),i,o,t[1],4129170786,5),o=f(o,r,n,i,t[6],3225465664,9),i=f(i,o,r,n,t[11],643717713,14),n=f(n,i,o,r,t[0],3921069994,20),r=f(r,n,i,o,t[5],3593408605,5),o=f(o,r,n,i,t[10],38016083,9),i=f(i,o,r,n,t[15],3634488961,14),n=f(n,i,o,r,t[4],3889429448,20),r=f(r,n,i,o,t[9],568446438,5),o=f(o,r,n,i,t[14],3275163606,9),i=f(i,o,r,n,t[3],4107603335,14),n=f(n,i,o,r,t[8],1163531501,20),r=f(r,n,i,o,t[13],2850285829,5),o=f(o,r,n,i,t[2],4243563512,9),i=f(i,o,r,n,t[7],1735328473,14),r=l(r,n=f(n,i,o,r,t[12],2368359562,20),i,o,t[5],4294588738,4),o=l(o,r,n,i,t[8],2272392833,11),i=l(i,o,r,n,t[11],1839030562,16),n=l(n,i,o,r,t[14],4259657740,23),r=l(r,n,i,o,t[1],2763975236,4),o=l(o,r,n,i,t[4],1272893353,11),i=l(i,o,r,n,t[7],4139469664,16),n=l(n,i,o,r,t[10],3200236656,23),r=l(r,n,i,o,t[13],681279174,4),o=l(o,r,n,i,t[0],3936430074,11),i=l(i,o,r,n,t[3],3572445317,16),n=l(n,i,o,r,t[6],76029189,23),r=l(r,n,i,o,t[9],3654602809,4),o=l(o,r,n,i,t[12],3873151461,11),i=l(i,o,r,n,t[15],530742520,16),r=c(r,n=l(n,i,o,r,t[2],3299628645,23),i,o,t[0],4096336452,6),o=c(o,r,n,i,t[7],1126891415,10),i=c(i,o,r,n,t[14],2878612391,15),n=c(n,i,o,r,t[5],4237533241,21),r=c(r,n,i,o,t[12],1700485571,6),o=c(o,r,n,i,t[3],2399980690,10),i=c(i,o,r,n,t[10],4293915773,15),n=c(n,i,o,r,t[1],2240044497,21),r=c(r,n,i,o,t[8],1873313359,6),o=c(o,r,n,i,t[15],4264355552,10),i=c(i,o,r,n,t[6],2734768916,15),n=c(n,i,o,r,t[13],1309151649,21),r=c(r,n,i,o,t[4],4149444226,6),o=c(o,r,n,i,t[11],3174756917,10),i=c(i,o,r,n,t[2],718787259,15),n=c(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.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 t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=a},2244(t,e,r){var n=r(9404),i=r(5037);function o(t){this.rand=t||new i.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(t)>=0);return i},o.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},o.prototype.test=function(t,e,r){var i=t.bitLength(),o=n.mont(t),s=new n(1).toRed(o);e||(e=Math.max(1,i/48|0));for(var a=t.subn(1),h=0;!a.testn(h);h++);for(var u=t.shrn(h),f=a.toRed(o);e>0;e--){var l=this._randrange(new n(2),a);r&&r(l);var c=l.toRed(o).redPow(u);if(0!==c.cmp(s)&&0!==c.cmp(f)){for(var d=1;d<h;d++){if(0===(c=c.redSqr()).cmp(s))return!1;if(0===c.cmp(f))break}if(d===h)return!1}}return!0},o.prototype.getDivisor=function(t,e){var r=t.bitLength(),i=n.mont(t),o=new n(1).toRed(i);e||(e=Math.max(1,r/48|0));for(var s=t.subn(1),a=0;!s.testn(a);a++);for(var h=t.shrn(a),u=s.toRed(i);e>0;e--){var f=this._randrange(new n(2),s),l=t.gcd(f);if(0!==l.cmpn(1))return l;var c=f.toRed(i).redPow(h);if(0!==c.cmp(o)&&0!==c.cmp(u)){for(var d=1;d<a;d++){if(0===(c=c.redSqr()).cmp(o))return c.fromRed().subn(1).gcd(t);if(0===c.cmp(u))break}if(d===a)return(c=c.redSqr()).fromRed().subn(1).gcd(t)}}return!1}},3349(t){function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},1137(t,e,r){"use strict";var n=r(7568);e.certificate=r(6413);var i=n.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())});e.RSAPrivateKey=i;var o=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});e.RSAPublicKey=o;var s=n.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())}),a=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())});e.PublicKey=a;var h=n.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())});e.PrivateKey=h;var u=n.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())});e.EncryptedPrivateKey=u;var f=n.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())});e.DSAPrivateKey=f,e.DSAparam=n.define("DSAparam",function(){this.int()});var l=n.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),c=n.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(l),this.key("publicKey").optional().explicit(1).bitstr())});e.ECPrivateKey=c,e.signature=n.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},6413(t,e,r){"use strict";var n=r(7568),i=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())}),s=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),a=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}),h=n.define("RelativeDistinguishedName",function(){this.setof(o)}),u=n.define("RDNSequence",function(){this.seqof(h)}),f=n.define("Name",function(){this.choice({rdnSequence:this.use(u)})}),l=n.define("Validity",function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))}),c=n.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),d=n.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(f),this.key("validity").use(l),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(c).optional())}),p=n.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())});t.exports=p},4101(t,e,r){"use strict";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,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=r(8078),a=r(1241),h=r(2861).Buffer;t.exports=function(t,e){var r,u=t.toString(),f=u.match(n);if(f){var l="aes"+f[1],c=h.from(f[2],"hex"),d=h.from(f[3].replace(/[\r\n]/g,""),"base64"),p=s(e,c.slice(0,8),parseInt(f[1],10)).key,m=[],y=a.createDecipheriv(l,p,c);m.push(y.update(d)),m.push(y.final()),r=h.concat(m)}else{var g=u.match(o);r=h.from(g[2].replace(/[\r\n]/g,""),"base64")}return{tag:u.match(i)[1],data:r}}},8170(t,e,r){"use strict";var n=r(1137),i=r(5579),o=r(4101),s=r(1241),a=r(8396).pbkdf2Sync,h=r(2861).Buffer;function u(t){var e;"object"!=typeof t||h.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=h.from(t));var r,u,f=o(t,e),l=f.tag,c=f.data;switch(l){case"CERTIFICATE":u=n.certificate.decode(c,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(u||(u=n.PublicKey.decode(c,"der")),r=u.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(u.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return u.subjectPrivateKey=u.subjectPublicKey,{type:"ec",data:u};case"1.2.840.10040.4.1":return u.algorithm.params.pub_key=n.DSAparam.decode(u.subjectPublicKey.data,"der"),{type:"dsa",data:u.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":c=function(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[t.algorithm.decrypt.cipher.algo.join(".")],u=t.algorithm.decrypt.cipher.iv,f=t.subjectPrivateKey,l=parseInt(o.split("-")[1],10)/8,c=a(e,r,n,l,"sha1"),d=s.createDecipheriv(o,c,u),p=[];return p.push(d.update(f)),p.push(d.final()),h.concat(p)}(c=n.EncryptedPrivateKey.decode(c,"der"),e);case"PRIVATE KEY":switch(r=(u=n.PrivateKey.decode(c,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(u.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:u.algorithm.curve,privateKey:n.ECPrivateKey.decode(u.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return u.algorithm.params.priv_key=n.DSAparam.decode(u.subjectPrivateKey,"der"),{type:"dsa",params:u.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(c,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(c,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(c,"der")};case"EC PRIVATE KEY":return{curve:(c=n.ECPrivateKey.decode(c,"der")).parameters.value,privateKey:c.privateKey};default:throw new Error("unknown key type "+l)}}u.signature=n.signature,t.exports=u},8396(t,e,r){"use strict";e.pbkdf2=r(3832),e.pbkdf2Sync=r(1352)},3832(t,e,r){"use strict";var n,i,o=r(2861).Buffer,s=r(4196),a=r(2455),h=r(1352),u=r(3382),f=r.g.crypto&&r.g.crypto.subtle,l={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"},c=[];function d(){return i||(i=r.g.process&&r.g.process.nextTick?r.g.process.nextTick:r.g.queueMicrotask?r.g.queueMicrotask:r.g.setImmediate?r.g.setImmediate:r.g.setTimeout)}function p(t,e,r,n,i){return f.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(function(t){return f.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:i}},t,n<<3)}).then(function(t){return o.from(t)})}t.exports=function(t,e,i,m,y,g){if("function"==typeof y&&(g=y,y=void 0),s(i,m),t=u(t,a,"Password"),e=u(e,a,"Salt"),"function"!=typeof g)throw new Error("No callback provided to pbkdf2");var b=l[(y=y||"sha1").toLowerCase()];b&&"function"==typeof r.g.Promise?function(t,e){t.then(function(t){d()(function(){e(null,t)})},function(t){d()(function(){e(t)})})}(function(t){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!f||!f.importKey||!f.deriveBits)return Promise.resolve(!1);if(void 0!==c[t])return c[t];var e=p(n=n||o.alloc(8),n,10,128,t).then(function(){return!0},function(){return!1});return c[t]=e,e}(b).then(function(r){return r?p(t,e,i,m,b):h(t,e,i,m,y)}),g):d()(function(){var r;try{r=h(t,e,i,m,y)}catch(t){return void g(t)}g(null,r)})}},2455(t,e,r){"use strict";var n,i=r(5606);if(r.g.process&&r.g.process.browser)n="utf-8";else if(r.g.process&&r.g.process.version){n=parseInt(i.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else n="utf-8";t.exports=n},4196(t){"use strict";var e=isFinite,r=Math.pow(2,30)-1;t.exports=function(t,n){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0||!e(t))throw new TypeError("Bad iterations");if("number"!=typeof n)throw new TypeError("Key length not a number");if(n<0||n>r||n!=n)throw new TypeError("Bad key length")}},1352(t,e,r){"use strict";var n=r(320),i=r(6011),o=r(2802),s=r(2861).Buffer,a=r(4196),h=r(2455),u=r(3382),f=s.alloc(128),l={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},c={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function d(t){return(new i).update(t).digest()}function p(t,e,r){var i=function(t){return"rmd160"===t||"ripemd160"===t?d:"md5"===t?n:function(e){return o(t).update(e).digest()}}(t),a="sha512"===t||"sha384"===t?128:64;e.length>a?e=i(e):e.length<a&&(e=s.concat([e,f],a));for(var h=s.allocUnsafe(a+l[t]),u=s.allocUnsafe(a+l[t]),c=0;c<a;c++)h[c]=54^e[c],u[c]=92^e[c];var p=s.allocUnsafe(a+r+4);h.copy(p,0,0,a),this.ipad1=p,this.ipad2=h,this.opad=u,this.alg=t,this.blocksize=a,this.hash=i,this.size=l[t]}p.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(t,e,r,n,i){a(r,n),t=u(t,h,"Password"),e=u(e,h,"Salt");var o=(i||"sha1").toLowerCase(),f=c[o]||o,d=l[f];if("number"!=typeof d||!d)throw new TypeError("Digest algorithm not supported: "+i);var m=new p(f,t,e.length),y=s.allocUnsafe(n),g=s.allocUnsafe(e.length+4);e.copy(g,0,0,e.length);for(var b=0,v=d,w=Math.ceil(n/v),_=1;_<=w;_++){g.writeUInt32BE(_,e.length);for(var M=m.run(g,m.ipad1),S=M,E=1;E<r;E++){S=m.run(S,m.ipad2);for(var k=0;k<v;k++)M[k]^=S[k]}M.copy(y,b),b+=v}return y}},3382(t,e,r){"use strict";var n=r(2861).Buffer,i=r(5377),o="undefined"!=typeof Uint8Array,s=o&&"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView;t.exports=function(t,e,r){if("string"==typeof t||n.isBuffer(t)||o&&t instanceof Uint8Array||s&&s(t))return i(t,e);throw new TypeError(r+" must be a string, a Buffer, a Uint8Array, or a DataView")}},6578(t){"use strict";t.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},3225(t,e,r){"use strict";var n=r(5606);void 0===n||!n.version||0===n.version.indexOf("v0.")||0===n.version.indexOf("v1.")&&0!==n.version.indexOf("v1.8.")?t.exports={nextTick:function(t,e,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return n.nextTick(t);case 2:return n.nextTick(function(){t.call(null,e)});case 3:return n.nextTick(function(){t.call(null,e,r)});case 4:return n.nextTick(function(){t.call(null,e,r,i)});default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return n.nextTick(function(){t.apply(null,o)})}}}:t.exports=n},5606(t){var e,r,n=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var a,h=[],u=!1,f=-1;function l(){u&&a&&(u=!1,a.length?h=a.concat(h):f=-1,h.length&&c())}function c(){if(!u){var t=s(l);u=!0;for(var e=h.length;e;){for(a=h,h=[];++f<e;)a&&a[f].run();f=-1,e=h.length}a=null,u=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{return r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function d(t,e){this.fun=t,this.array=e}function p(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];h.push(new d(t,e)),1!==h.length||u||s(c)},d.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},7168(t,e,r){e.publicEncrypt=r(8902),e.privateDecrypt=r(7362),e.privateEncrypt=function(t,r){return e.publicEncrypt(t,r,!0)},e.publicDecrypt=function(t,r){return e.privateDecrypt(t,r,!0)}},8206(t,e,r){var n=r(7108),i=r(2861).Buffer;function o(t){var e=i.allocUnsafe(4);return e.writeUInt32BE(t,0),e}t.exports=function(t,e){for(var r,s=i.alloc(0),a=0;s.length<e;)r=o(a++),s=i.concat([s,n("sha1").update(t).update(r).digest()]);return s.slice(0,e)}},7362(t,e,r){var n=r(8170),i=r(8206),o=r(2061),s=r(9404),a=r(7332),h=r(7108),u=r(9247),f=r(2861).Buffer;t.exports=function(t,e,r){var l;l=t.padding?t.padding:r?1:4;var c,d=n(t),p=d.modulus.byteLength();if(e.length>p||new s(e).cmp(d.modulus)>=0)throw new Error("decryption error");c=r?u(new s(e),d):a(e,d);var m=f.alloc(p-c.length);if(c=f.concat([m,c],p),4===l)return function(t,e){var r=t.modulus.byteLength(),n=h("sha1").update(f.alloc(0)).digest(),s=n.length;if(0!==e[0])throw new Error("decryption error");var a=e.slice(1,s+1),u=e.slice(s+1),l=o(a,i(u,s)),c=o(u,i(l,r-s-1));if(function(t,e){t=f.from(t),e=f.from(e);var r=0,n=t.length;t.length!==e.length&&(r++,n=Math.min(t.length,e.length));var i=-1;for(;++i<n;)r+=t[i]^e[i];return r}(n,c.slice(0,s)))throw new Error("decryption error");var d=s;for(;0===c[d];)d++;if(1!==c[d++])throw new Error("decryption error");return c.slice(d)}(d,c);if(1===l)return function(t,e,r){var n=e.slice(0,2),i=2,o=0;for(;0!==e[i++];)if(i>=e.length){o++;break}var s=e.slice(2,i-1);("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++;s.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(i)}(0,c,r);if(3===l)return c;throw new Error("unknown padding")}},8902(t,e,r){var n=r(8170),i=r(3209),o=r(7108),s=r(8206),a=r(2061),h=r(9404),u=r(9247),f=r(7332),l=r(2861).Buffer;t.exports=function(t,e,r){var c;c=t.padding?t.padding:r?1:4;var d,p=n(t);if(4===c)d=function(t,e){var r=t.modulus.byteLength(),n=e.length,u=o("sha1").update(l.alloc(0)).digest(),f=u.length,c=2*f;if(n>r-c-2)throw new Error("message too long");var d=l.alloc(r-n-c-2),p=r-f-1,m=i(f),y=a(l.concat([u,d,l.alloc(1,1),e],p),s(m,p)),g=a(m,s(y,f));return new h(l.concat([l.alloc(1),g,y],r))}(p,e);else if(1===c)d=function(t,e,r){var n,o=e.length,s=t.modulus.byteLength();if(o>s-11)throw new Error("message too long");n=r?l.alloc(s-o-3,255):function(t){var e,r=l.allocUnsafe(t),n=0,o=i(2*t),s=0;for(;n<t;)s===o.length&&(o=i(2*t),s=0),(e=o[s++])&&(r[n++]=e);return r}(s-o-3);return new h(l.concat([l.from([0,r?1:2]),n,l.alloc(1),e],s))}(p,e,r);else{if(3!==c)throw new Error("unknown padding");if((d=new h(e)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return r?f(d,p):u(d,p)}},9247(t,e,r){var n=r(9404),i=r(2861).Buffer;t.exports=function(t,e){return i.from(t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed().toArray())}},2061(t){t.exports=function(t,e){for(var r=t.length,n=-1;++n<r;)t[n]^=e[n];return t}},3209(t,e,r){"use strict";var n=r(5606),i=65536,o=4294967295;var s=r(2861).Buffer,a=r.g.crypto||r.g.msCrypto;a&&a.getRandomValues?t.exports=function(t,e){if(t>o)throw new RangeError("requested too many random bytes");var r=s.allocUnsafe(t);if(t>0)if(t>i)for(var h=0;h<t;h+=i)a.getRandomValues(r.slice(h,h+i));else a.getRandomValues(r);if("function"==typeof e)return n.nextTick(function(){e(null,r)});return r}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}},6983(t,e,r){"use strict";var n=r(5606);function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(2861),s=r(3209),a=o.Buffer,h=o.kMaxLength,u=r.g.crypto||r.g.msCrypto,f=Math.pow(2,32)-1;function l(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>f||t<0)throw new TypeError("offset must be a uint32");if(t>h||t>e)throw new RangeError("offset out of range")}function c(t,e,r){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>f||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>h)throw new RangeError("buffer too small")}function d(t,e,r,i){if(n.browser){var o=t.buffer,a=new Uint8Array(o,e,r);return u.getRandomValues(a),i?void n.nextTick(function(){i(null,t)}):t}if(!i)return s(r).copy(t,e),t;s(r,function(r,n){if(r)return i(r);n.copy(t,e),i(null,t)})}u&&u.getRandomValues||!n.browser?(e.randomFill=function(t,e,n,i){if(!(a.isBuffer(t)||t instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof e)i=e,e=0,n=t.length;else if("function"==typeof n)i=n,n=t.length-e;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return l(e,t.length),c(n,e,t.length),d(t,e,n,i)},e.randomFillSync=function(t,e,n){void 0===e&&(e=0);if(!(a.isBuffer(t)||t instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');l(e,t.length),void 0===n&&(n=t.length-e);return c(n,e,t.length),d(t,e,n)}):(e.randomFill=i,e.randomFillSync=i)},5382(t,e,r){"use strict";var n=r(3225),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=l;var o=Object.create(r(5622));o.inherits=r(6698);var s=r(5412),a=r(6708);o.inherits(l,s);for(var h=i(a.prototype),u=0;u<h.length;u++){var f=h[u];l.prototype[f]||(l.prototype[f]=a.prototype[f])}function l(t){if(!(this instanceof l))return new l(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",c)}function c(){this.allowHalfOpen||this._writableState.ended||n.nextTick(d,this)}function d(t){t.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),l.prototype._destroy=function(t,e){this.push(null),this.end(),n.nextTick(e,t)}},3600(t,e,r){"use strict";t.exports=o;var n=r(4610),i=Object.create(r(5622));function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=r(6698),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},5412(t,e,r){"use strict";var n=r(5606),i=r(3225);t.exports=v;var o,s=r(7225);v.ReadableState=b;r(7007).EventEmitter;var a=function(t,e){return t.listeners(e).length},h=r(345),u=r(4106).Buffer,f=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var l=Object.create(r(5622));l.inherits=r(6698);var c=r(9838),d=void 0;d=c&&c.debuglog?c.debuglog("stream"):function(){};var p,m=r(3222),y=r(5896);l.inherits(v,h);var g=["error","close","destroy","pause","resume"];function b(t,e){t=t||{};var n=e instanceof(o=o||r(5382));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new m,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(p||(p=r(3141).I),this.decoder=new p(t.encoding),this.encoding=t.encoding)}function v(t){if(o=o||r(5382),!(this instanceof v))return new v(t);this._readableState=new b(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),h.call(this)}function w(t,e,r,n,i){var o,s=t._readableState;null===e?(s.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,E(t)}(t,s)):(i||(o=function(t,e){var r;n=e,u.isBuffer(n)||n instanceof f||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(t){return u.from(t)}(e)),n?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?_(t,s,e,!1):A(t,s)):_(t,s,e,!1))):n||(s.reading=!1));return function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function _(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&E(t)),A(t,e)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(t,e){this.push(null),e(t)},v.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=u.from(t,e),e=""),r=!0),w(this,t,e,!1,r)},v.prototype.unshift=function(t){return w(this,t,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(t){return p||(p=r(3141).I),this._readableState.decoder=new p(t),this._readableState.encoding=t,this};var M=8388608;function S(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=M?t=M:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function E(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(d("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(k,t):k(t))}function k(t){d("emit readable"),t.emit("readable"),I(t)}function A(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(B,t,e))}function B(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(d("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function x(t){d("readable nexttick read 0"),t.read(0)}function R(t,e){e.reading||(d("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),I(t),e.flowing&&!e.reading&&t.read(0)}function I(t){var e=t._readableState;for(d("flow",e.flowing);e.flowing&&null!==t.read(););}function T(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0===(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=u.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function O(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(j,e,t))}function j(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function C(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}v.prototype.read=function(t){d("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return d("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?O(this):E(this),null;if(0===(t=S(t,e))&&e.ended)return 0===e.length&&O(this),null;var n,i=e.needReadable;return d("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&d("length less than watermark",i=!0),e.ended||e.reading?d("reading or ended",i=!1):i&&(d("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=S(r,e))),null===(n=t>0?T(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&O(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,e);var h=(!e||!1!==e.end)&&t!==n.stdout&&t!==n.stderr?f:v;function u(e,n){d("onunpipe"),e===r&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,d("cleanup"),t.removeListener("close",g),t.removeListener("finish",b),t.removeListener("drain",l),t.removeListener("error",y),t.removeListener("unpipe",u),r.removeListener("end",f),r.removeListener("end",v),r.removeListener("data",m),c=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||l())}function f(){d("onend"),t.end()}o.endEmitted?i.nextTick(h):r.once("end",h),t.on("unpipe",u);var l=function(t){return function(){var e=t._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,I(t))}}(r);t.on("drain",l);var c=!1;var p=!1;function m(e){d("ondata"),p=!1,!1!==t.write(e)||p||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==C(o.pipes,t))&&!c&&(d("false write response, pause",o.awaitDrain),o.awaitDrain++,p=!0),r.pause())}function y(e){d("onerror",e),v(),t.removeListener("error",y),0===a(t,"error")&&t.emit("error",e)}function g(){t.removeListener("finish",b),v()}function b(){d("onfinish"),t.removeListener("close",g),v()}function v(){d("unpipe"),r.unpipe(t)}return r.on("data",m),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",y),t.once("close",g),t.once("finish",b),t.emit("pipe",r),o.flowing||(d("pipe resume"),r.resume()),t},v.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=C(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},v.prototype.on=function(t,e){var r=h.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&E(this):i.nextTick(x,this))}return r},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var t=this._readableState;return t.flowing||(d("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(R,t,e))}(this,t)),this},v.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",function(){if(d("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(i){(d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))}),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<g.length;o++)t.on(g[o],this.emit.bind(this,g[o]));return this._read=function(e){d("wrapped _read",e),n&&(n=!1,t.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=T},4610(t,e,r){"use strict";t.exports=s;var n=r(5382),i=Object.create(r(5622));function o(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(t){if(!(this instanceof s))return new s(t);n.call(this,t),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",a)}function a(){var t=this;"function"==typeof this._flush?this._flush(function(e,r){h(t,e,r)}):h(this,null,null)}function h(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=r(6698),i.inherits(s,n),s.prototype.push=function(t,e){return this._transformState.needTransform=!1,n.prototype.push.call(this,t,e)},s.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},s.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},s.prototype._destroy=function(t,e){var r=this;n.prototype._destroy.call(this,t,function(t){e(t),r.emit("close")})}},6708(t,e,r){"use strict";var n=r(5606),i=r(3225);function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=g;var s,a=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?setImmediate:i.nextTick;g.WritableState=y;var h=Object.create(r(5622));h.inherits=r(6698);var u={deprecate:r(4643)},f=r(345),l=r(4106).Buffer,c=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var d,p=r(5896);function m(){}function y(t,e){s=s||r(5382),t=t||{};var n=e instanceof s;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var h=t.highWaterMark,u=t.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=h||0===h?h:n&&(u||0===u)?u:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var l=!1===t.decodeStrings;this.decodeStrings=!l,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,o=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,o){--e.pendingcb,r?(i.nextTick(o,n),i.nextTick(S,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(o(n),t._writableState.errorEmitted=!0,t.emit("error",n),S(t,e))}(t,r,n,e,o);else{var s=_(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),n?a(v,t,r,s,o):v(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function g(t){if(s=s||r(5382),!(d.call(g,this)||this instanceof s))return new g(t);this._writableState=new y(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),f.call(this)}function b(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function v(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),S(t,e)}function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,h=!0;r;)i[a]=r,r.isBuf||(h=!1),r=r.next,a+=1;i.allBuffers=h,b(t,e,!0,e.length,i,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,l=r.callback;if(b(t,e,!1,e.objectMode?1:u.length,u,f,l),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function _(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function M(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),S(t,e)})}function S(t,e){var r=_(e);return r&&(!function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,i.nextTick(M,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}h.inherits(g,f),y.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(y.prototype,"buffer",{get:u.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(d=Function.prototype[Symbol.hasInstance],Object.defineProperty(g,Symbol.hasInstance,{value:function(t){return!!d.call(this,t)||this===g&&(t&&t._writableState instanceof y)}})):d=function(t){return t instanceof this},g.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},g.prototype.write=function(t,e,r){var n,o=this._writableState,s=!1,a=!o.objectMode&&(n=t,l.isBuffer(n)||n instanceof c);return a&&!l.isBuffer(t)&&(t=function(t){return l.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=m),o.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),i.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var o=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),i.nextTick(n,s),o=!1),o}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=l.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var h=e.length<e.highWaterMark;h||(e.needDrain=!0);if(e.writing||e.corked){var u=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},u?u.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else b(t,e,!1,a,n,i,o);return h}(this,o,a,t,e,r)),s},g.prototype.cork=function(){this._writableState.corked++},g.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||w(this,t))},g.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(g.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),g.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},g.prototype._writev=null,g.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,S(t,e),r&&(e.finished?i.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(g.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),g.prototype.destroy=p.destroy,g.prototype._undestroy=p.undestroy,g.prototype._destroy=function(t,e){this.end(),e(t)}},3222(t,e,r){"use strict";var n=r(4106).Buffer,i=r(5340);function o(t,e,r){t.copy(e,r)}t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);for(var e=n.allocUnsafe(t>>>0),r=this.head,i=0;r;)o(r.data,e,i),i+=r.data.length,r=r.next;return e},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},5896(t,e,r){"use strict";var n=r(3225);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(i,this,t)):n.nextTick(i,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(i,r,t)):n.nextTick(i,r,t):e&&e(t)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},345(t,e,r){t.exports=r(7007).EventEmitter},7225(t){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},4106(t,e,r){var n=r(8287),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},8399(t,e,r){(e=t.exports=r(5412)).Stream=e,e.Readable=e,e.Writable=r(6708),e.Duplex=r(5382),e.Transform=r(4610),e.PassThrough=r(3600)},6011(t,e,r){"use strict";var n=r(8287).Buffer,i=r(4744),o=r(1147),s=new Array(16),a=[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],h=[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],u=[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],f=[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],l=[0,1518500249,1859775393,2400959708,2840853838],c=[1352829926,1548603684,1836072691,2053994217,0];function d(t,e){return t<<e|t>>>32-e}function p(t,e,r,n,i,o,s,a){return d(t+(e^r^n)+o+s|0,a)+i|0}function m(t,e,r,n,i,o,s,a){return d(t+(e&r|~e&n)+o+s|0,a)+i|0}function y(t,e,r,n,i,o,s,a){return d(t+((e|~r)^n)+o+s|0,a)+i|0}function g(t,e,r,n,i,o,s,a){return d(t+(e&n|r&~n)+o+s|0,a)+i|0}function b(t,e,r,n,i,o,s,a){return d(t+(e^(r|~n))+o+s|0,a)+i|0}function v(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}i(v,o),v.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,v=0|this._e,w=0|this._a,_=0|this._b,M=0|this._c,S=0|this._d,E=0|this._e,k=0;k<80;k+=1){var A,B;k<16?(A=p(r,n,i,o,v,t[a[k]],l[0],u[k]),B=b(w,_,M,S,E,t[h[k]],c[0],f[k])):k<32?(A=m(r,n,i,o,v,t[a[k]],l[1],u[k]),B=g(w,_,M,S,E,t[h[k]],c[1],f[k])):k<48?(A=y(r,n,i,o,v,t[a[k]],l[2],u[k]),B=y(w,_,M,S,E,t[h[k]],c[2],f[k])):k<64?(A=g(r,n,i,o,v,t[a[k]],l[3],u[k]),B=m(w,_,M,S,E,t[h[k]],c[3],f[k])):(A=b(r,n,i,o,v,t[a[k]],l[4],u[k]),B=p(w,_,M,S,E,t[h[k]],c[4],f[k])),r=v,v=o,o=d(i,10),i=n,n=A,w=E,E=S,S=d(M,10),M=_,_=B}var x=this._b+i+S|0;this._b=this._c+o+E|0,this._c=this._d+v+w|0,this._d=this._e+r+_|0,this._e=this._a+n+M|0,this._a=x},v.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,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 t=n.alloc?n.alloc(20):new n(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=v},1147(t,e,r){"use strict";var n=r(2861).Buffer,i=r(8537),o=r(8399).Transform;function s(t){o.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(4744)(s,o),s.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},s.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},s.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");for(var r=i(t,e),n=this._block,o=0;this._blockOffset+r.length-o>=this._blockSize;){for(var s=this._blockOffset;s<this._blockSize;)n[s]=r[o],s+=1,o+=1;this._update(),this._blockOffset=0}for(;o<r.length;)n[this._blockOffset]=r[o],this._blockOffset+=1,o+=1;for(var a=0,h=8*r.length;h>0;++a)this._length[a]+=h,(h=this._length[a]/4294967296|0)>0&&(this._length[a]-=4294967296*h);return this},s.prototype._update=function(){throw new Error("_update is not implemented")},s.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},s.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=s},8537(t,e,r){"use strict";var n=r(2861).Buffer,i=r(5377),o="undefined"!=typeof Uint8Array,s=o&&"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView;t.exports=function(t,e){if("string"==typeof t||n.isBuffer(t)||o&&t instanceof Uint8Array||s&&s(t))return i(t,e);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')}},4744(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},2861(t,e,r){
10
- /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
11
- var n=r(8287),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},8015(t,e,r){!function(e,n){"use strict";"function"==typeof define&&define.amd?define([],function(){return e.secrets=n()}):t.exports=n(r(1565))}(this,function(t){"use strict";var e,r,n,i,o;function s(){e={bits:8,radix:16,minBits:3,maxBits:20,bytesPerChar:2,maxBytesPerChar:6,primitivePolynomials:[null,null,1,3,3,5,3,3,29,17,9,5,83,27,43,3,45,9,39,39,9,5,3,33,27,9,71,39,9,5,83]},r={},n=new Array(1024).join("0"),i=!0,o=["nodeCryptoRandomBytes","browserCryptoGetRandomValues","testRandom"]}function a(){return!(!r||!r.rng||"function"!=typeof r.rng)}function h(t,e){var i;if(0===e||1===e)return t;if(e&&e>1024)throw new Error("Padding must be multiples of no larger than 1024 bits.");return e=e||r.bits,t&&(i=t.length%e),i?(n+t).slice(-(e-i+t.length)):t}function u(t){var e,r,n="";for(r=t.length-1;r>=0;r--){if(e=parseInt(t[r],16),isNaN(e))throw new Error("Invalid hex character.");n=h(e.toString(2),4)+n}return n}function f(t){var e,r,n="";for(r=(t=h(t,4)).length;r>=4;r-=4){if(e=parseInt(t.slice(r-4,r),2),isNaN(e))throw new Error("Invalid binary character.");n=e.toString(16)+n}return n}function l(){return!(!t||"object"!=typeof t||"function"!=typeof t.getRandomValues&&"object"!=typeof t.getRandomValues||"function"!=typeof Uint32Array&&"object"!=typeof Uint32Array)}function c(){return"object"==typeof t&&"function"==typeof t.randomBytes}function d(e){function n(t,e,r,n){var i,o=0,s="";for(e&&(i=e.length-1);o<i||s.length<t;)s+=h(Math.abs(parseInt(e[o],r)).toString(2),n),o++;return((s=s.substr(-t)).match(/0/g)||[]).length===s.length?null:s}function i(e){var r,i=null;for(r=Math.ceil(e/8);null===i;)i=n(e,t.randomBytes(r).toString("hex"),16,4);return i}function o(e){var r,i=null;for(r=Math.ceil(e/32);null===i;)i=n(e,t.getRandomValues(new Uint32Array(r)),10,32);return i}return e&&"testRandom"===e?(r.typeCSPRNG=e,function(t){var e,r,i=null;r=Math.ceil(t/32),e=new Uint32Array(r);for(var o=0;o<e.length;o++)e[o]=123456789;for(;null===i;)i=n(t,e,10,32);return i}):e&&"nodeCryptoRandomBytes"===e?(r.typeCSPRNG=e,i):e&&"browserCryptoGetRandomValues"===e?(r.typeCSPRNG=e,o):c()?(r.typeCSPRNG="nodeCryptoRandomBytes",i):l()?(r.typeCSPRNG="browserCryptoGetRandomValues",o):void 0}function p(t,e){var n,i=[];for(e&&(t=h(t,e)),n=t.length;n>r.bits;n-=r.bits)i.push(parseInt(t.slice(n-r.bits,n),2));return i.push(parseInt(t.slice(0,n),2)),i}function m(t,e){var n,i=r.logs[t],o=0;for(n=e.length-1;n>=0;n--)o=0!==o?r.exps[(i+r.logs[o])%r.maxShares]^e[n]:e[n];return o}function y(t,e,n){var i,o,s,a,h=0;for(s=0,i=e.length;s<i;s++)if(n[s]){for(o=r.logs[n[s]],a=0;a<i;a++)if(s!==a){if(t===e[a]){o=-1;break}o=(o+r.logs[t^e[a]]-r.logs[e[s]^e[a]]+r.maxShares)%r.maxShares}h=-1===o?h:h^r.exps[o]}return h}function g(t,e,n){var i,o,s=[],a=[t];for(i=1;i<n;i++)a[i]=parseInt(r.rng(r.bits),2);for(i=1,o=e+1;i<o;i++)s[i-1]={x:i,y:m(i,a)};return s}function b(t,e,n){var i,o,s,a;if(e=parseInt(e,r.radix),i=(t=parseInt(t,10)||r.bits).toString(36).toUpperCase(),a=(s=Math.pow(2,t)-1).toString(r.radix).length,o=h(e.toString(r.radix),a),"number"!=typeof e||e%1!=0||e<1||e>s)throw new Error("Share id must be an integer between 1 and "+s+", inclusive.");return i+o+n}var v={init:function(t,n){var i,h,u=[],f=[],l=1;if(s(),t&&("number"!=typeof t||t%1!=0||t<e.minBits||t>e.maxBits))throw new Error("Number of bits must be an integer between "+e.minBits+" and "+e.maxBits+", inclusive.");if(n&&-1===o.indexOf(n))throw new Error("Invalid RNG type argument : '"+n+"'");for(r.radix=e.radix,r.bits=t||e.bits,r.size=Math.pow(2,r.bits),r.maxShares=r.size-1,i=e.primitivePolynomials[r.bits],h=0;h<r.size;h++)f[h]=l,u[l]=h,(l<<=1)>=r.size&&(l^=i,l&=r.maxShares);if(r.logs=u,r.exps=f,n&&this.setRNG(n),a()||this.setRNG(),!(a()&&r.bits&&r.size&&r.maxShares&&r.logs&&r.exps&&r.logs.length===r.size&&r.exps.length===r.size))throw new Error("Initialization failed.")},combine:function(t,e){var n,i,o,s,a,l,c,d="",m=[],g=[];for(e=e||0,n=0,o=t.length;n<o;n++){if(l=this.extractShareComponents(t[n]),void 0===a)a=l.bits;else if(l.bits!==a)throw new Error("Mismatched shares: Different bit settings.");if(r.bits!==a&&this.init(a),-1===m.indexOf(l.id))for(m.push(l.id),i=0,s=(c=p(u(l.data))).length;i<s;i++)g[i]=g[i]||[],g[i][m.length-1]=c[i]}for(n=0,o=g.length;n<o;n++)d=h(y(e,m,g[n]).toString(2))+d;return f(e>=1?d:d.slice(d.indexOf("1")+1))},getConfig:function(){var t={};return t.radix=r.radix,t.bits=r.bits,t.maxShares=r.maxShares,t.hasCSPRNG=a(),t.typeCSPRNG=r.typeCSPRNG,t},extractShareComponents:function(t){var n,i,o,s,a,h={};if((n=parseInt(t.substr(0,1),36))&&("number"!=typeof n||n%1!=0||n<e.minBits||n>e.maxBits))throw new Error("Invalid share : Number of bits must be an integer between "+e.minBits+" and "+e.maxBits+", inclusive.");if(s=Math.pow(2,n)-1,o=(Math.pow(2,n)-1).toString(r.radix).length,(a=new RegExp("^([a-kA-K3-9]{1})([a-fA-F0-9]{"+o+"})([a-fA-F0-9]+)$").exec(t))&&(i=parseInt(a[2],r.radix)),"number"!=typeof i||i%1!=0||i<1||i>s)throw new Error("Invalid share : Share id must be an integer between 1 and "+r.maxShares+", inclusive.");if(a&&a[3])return h.bits=n,h.id=i,h.data=a[3],h;throw new Error("The share data provided is invalid : "+t)},setRNG:function(t){var e="Random number generator is invalid ",n=" Supply an CSPRNG of the form function(bits){} that returns a string containing 'bits' number of random 1's and 0's.";if(t&&"string"==typeof t&&-1===o.indexOf(t))throw new Error("Invalid RNG type argument : '"+t+"'");if(t||(t=d()),t&&"string"==typeof t&&(t=d(t)),i){if(t&&"function"!=typeof t)throw new Error(e+"(Not a function)."+n);if(t&&"string"!=typeof t(r.bits))throw new Error(e+"(Output is not a string)."+n);if(t&&!parseInt(t(r.bits),2))throw new Error(e+"(Binary string output not parseable to an Integer)."+n);if(t&&t(r.bits).length>r.bits)throw new Error(e+"(Output length is greater than config.bits)."+n);if(t&&t(r.bits).length<r.bits)throw new Error(e+"(Output length is less than config.bits)."+n)}return r.rng=t,!0},str2hex:function(t,r){var n,i,o,s,a,u,f="";if("string"!=typeof t)throw new Error("Input must be a character string.");if(r||(r=e.bytesPerChar),"number"!=typeof r||r<1||r>e.maxBytesPerChar||r%1!=0)throw new Error("Bytes per character must be an integer between 1 and "+e.maxBytesPerChar+", inclusive.");for(n=2*r,i=Math.pow(16,n)-1,a=0,u=t.length;a<u;a++){if(s=t[a].charCodeAt(),isNaN(s))throw new Error("Invalid character: "+t[a]);if(s>i)throw o=Math.ceil(Math.log(s+1)/Math.log(256)),new Error("Invalid character code ("+s+"). Maximum allowable is 256^bytes-1 ("+i+"). To convert this character, use at least "+o+" bytes.");f=h(s.toString(16),n)+f}return f},hex2str:function(t,r){var n,i,o,s="";if("string"!=typeof t)throw new Error("Input must be a hexadecimal string.");if("number"!=typeof(r=r||e.bytesPerChar)||r%1!=0||r<1||r>e.maxBytesPerChar)throw new Error("Bytes per character must be an integer between 1 and "+e.maxBytesPerChar+", inclusive.");for(i=0,o=(t=h(t,n=2*r)).length;i<o;i+=n)s=String.fromCharCode(parseInt(t.slice(i,i+n),16))+s;return s},random:function(t){if("number"!=typeof t||t%1!=0||t<2||t>65536)throw new Error("Number of bits must be an Integer between 1 and 65536.");return f(r.rng(t))},share:function(t,e,n,i){var o,s,a,l,c,d=new Array(e),m=new Array(e);if(i=i||128,"string"!=typeof t)throw new Error("Secret must be a string.");if("number"!=typeof e||e%1!=0||e<2)throw new Error("Number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive.");if(e>r.maxShares)throw o=Math.ceil(Math.log(e+1)/Math.LN2),new Error("Number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive. To create "+e+" shares, use at least "+o+" bits.");if("number"!=typeof n||n%1!=0||n<2)throw new Error("Threshold number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive.");if(n>r.maxShares)throw o=Math.ceil(Math.log(n+1)/Math.LN2),new Error("Threshold number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive. To use a threshold of "+n+", use at least "+o+" bits.");if(n>e)throw new Error("Threshold number of shares was "+n+" but must be less than or equal to the "+e+" shares specified as the total to generate.");if("number"!=typeof i||i%1!=0||i<0||i>1024)throw new Error("Zero-pad length must be an integer between 0 and 1024 inclusive.");for(a=0,c=(t=p(t="1"+u(t),i)).length;a<c;a++)for(s=g(t[a],e,n),l=0;l<e;l++)d[l]=d[l]||s[l].x.toString(r.radix),m[l]=h(s[l].y.toString(2))+(m[l]||"");for(a=0;a<e;a++)d[a]=b(r.bits,d[a],f(m[a]));return d},newShare:function(t,e){var n;if(t&&"string"==typeof t&&(t=parseInt(t,r.radix)),n=t.toString(r.radix),t&&n&&e&&e[0])return b(this.extractShareComponents(e[0]).bits,n,this.combine(e,t));throw new Error("Invalid 'id' or 'shares' Array argument to newShare().")},_reset:s,_padLeft:h,_hex2bin:u,_bin2hex:f,_hasCryptoGetRandomValues:l,_hasCryptoRandomBytes:c,_getRNG:d,_isSetRNG:a,_splitNumStringToIntArray:p,_horner:m,_lagrange:y,_getShares:g,_constructPublicShareString:b};return v.init(),v})},6897(t,e,r){"use strict";var n=r(453),i=r(41),o=r(592)(),s=r(5795),a=r(9675),h=n("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||h(e)!==e)throw new a("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,u=!0;if("length"in t&&s){var f=s(t,"length");f&&!f.configurable&&(n=!1),f&&!f.writable&&(u=!1)}return(n||u||!r)&&(o?i(t,"length",e,!0,!0):i(t,"length",e)),t}},392(t,e,r){"use strict";var n=r(2861).Buffer,i=r(5377);function o(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}o.prototype.update=function(t,e){t=i(t,e||"utf8");for(var r=this._block,n=this._blockSize,o=t.length,s=this._len,a=0;a<o;){for(var h=s%n,u=Math.min(o-a,n-h),f=0;f<u;f++)r[h+f]=t[a+f];a+=u,(s+=u)%n===0&&this._update(r)}return this._len+=o,this},o.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=o},2802(t,e,r){"use strict";t.exports=function(e){var r=e.toLowerCase(),n=t.exports[r];if(!n)throw new Error(r+" is not supported (we accept pull requests)");return new n},t.exports.sha=r(7816),t.exports.sha1=r(3737),t.exports.sha224=r(6710),t.exports.sha256=r(4107),t.exports.sha384=r(2827),t.exports.sha512=r(2890)},231(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},7816(t,e,r){"use strict";var n=r(231),i=r(392),o=r(2861).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function h(){this.init(),this._w=a,i.call(this,64,56)}function u(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function l(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(h,i),h.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},h.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,h=0;h<16;++h)e[h]=t.readInt32BE(4*h);for(;h<80;++h)e[h]=e[h-3]^e[h-8]^e[h-14]^e[h-16];for(var c=0;c<80;++c){var d=~~(c/20),p=u(r)+l(d,n,i,o)+a+e[c]+s[d]|0;a=o,o=i,i=f(n),n=r,r=p}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0},h.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=h},3737(t,e,r){"use strict";var n=r(231),i=r(392),o=r(2861).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function h(){this.init(),this._w=a,i.call(this,64,56)}function u(t){return t<<1|t>>>31}function f(t){return t<<5|t>>>27}function l(t){return t<<30|t>>>2}function c(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(h,i),h.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},h.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,h=0;h<16;++h)e[h]=t.readInt32BE(4*h);for(;h<80;++h)e[h]=u(e[h-3]^e[h-8]^e[h-14]^e[h-16]);for(var d=0;d<80;++d){var p=~~(d/20),m=f(r)+c(p,n,i,o)+a+e[d]+s[p]|0;a=o,o=i,i=l(n),n=r,r=m}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0},h.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=h},6710(t,e,r){"use strict";var n=r(231),i=r(4107),o=r(392),s=r(2861).Buffer,a=new Array(64);function h(){this.init(),this._w=a,o.call(this,64,56)}n(h,i),h.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},h.prototype._hash=function(){var t=s.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=h},4107(t,e,r){"use strict";var n=r(231),i=r(392),o=r(2861).Buffer,s=[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],a=new Array(64);function h(){this.init(),this._w=a,i.call(this,64,56)}function u(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function l(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function c(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function d(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function p(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}n(h,i),h.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},h.prototype._update=function(t){for(var e=this._w,r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,a=0|this._e,h=0|this._f,m=0|this._g,y=0|this._h,g=0;g<16;++g)e[g]=t.readInt32BE(4*g);for(;g<64;++g)e[g]=p(e[g-2])+e[g-7]+d(e[g-15])+e[g-16]|0;for(var b=0;b<64;++b){var v=y+c(a)+u(a,h,m)+s[b]+e[b]|0,w=l(r)+f(r,n,i)|0;y=m,m=h,h=a,a=o+v|0,o=i,i=n,n=r,r=v+w|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=a+this._e|0,this._f=h+this._f|0,this._g=m+this._g|0,this._h=y+this._h|0},h.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=h},2827(t,e,r){"use strict";var n=r(231),i=r(2890),o=r(392),s=r(2861).Buffer,a=new Array(160);function h(){this.init(),this._w=a,o.call(this,128,112)}n(h,i),h.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},h.prototype._hash=function(){var t=s.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=h},2890(t,e,r){"use strict";var n=r(231),i=r(392),o=r(2861).Buffer,s=[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],a=new Array(160);function h(){this.init(),this._w=a,i.call(this,128,112)}function u(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function l(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function c(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function m(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function y(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function g(t,e){return t>>>0<e>>>0?1:0}n(h,i),h.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},h.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,h=0|this._fh,b=0|this._gh,v=0|this._hh,w=0|this._al,_=0|this._bl,M=0|this._cl,S=0|this._dl,E=0|this._el,k=0|this._fl,A=0|this._gl,B=0|this._hl,x=0;x<32;x+=2)e[x]=t.readInt32BE(4*x),e[x+1]=t.readInt32BE(4*x+4);for(;x<160;x+=2){var R=e[x-30],I=e[x-30+1],T=d(R,I),O=p(I,R),j=m(R=e[x-4],I=e[x-4+1]),C=y(I,R),P=e[x-14],U=e[x-14+1],L=e[x-32],N=e[x-32+1],D=O+U|0,q=T+P+g(D,O)|0;q=(q=q+j+g(D=D+C|0,C)|0)+L+g(D=D+N|0,N)|0,e[x]=q,e[x+1]=D}for(var F=0;F<160;F+=2){q=e[F],D=e[F+1];var z=f(r,n,i),H=f(w,_,M),K=l(r,w),W=l(w,r),G=c(a,E),V=c(E,a),Z=s[F],$=s[F+1],Y=u(a,h,b),X=u(E,k,A),J=B+V|0,Q=v+G+g(J,B)|0;Q=(Q=(Q=Q+Y+g(J=J+X|0,X)|0)+Z+g(J=J+$|0,$)|0)+q+g(J=J+D|0,D)|0;var tt=W+H|0,et=K+z+g(tt,W)|0;v=b,B=A,b=h,A=k,h=a,k=E,a=o+Q+g(E=S+J|0,S)|0,o=i,S=M,i=n,M=_,n=r,_=w,r=Q+et+g(w=J+tt|0,J)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+M|0,this._dl=this._dl+S|0,this._el=this._el+E|0,this._fl=this._fl+k|0,this._gl=this._gl+A|0,this._hl=this._hl+B|0,this._ah=this._ah+r+g(this._al,w)|0,this._bh=this._bh+n+g(this._bl,_)|0,this._ch=this._ch+i+g(this._cl,M)|0,this._dh=this._dh+o+g(this._dl,S)|0,this._eh=this._eh+a+g(this._el,E)|0,this._fh=this._fh+h+g(this._fl,k)|0,this._gh=this._gh+b+g(this._gl,A)|0,this._hh=this._hh+v+g(this._hl,B)|0},h.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=h},8310(t,e,r){t.exports=i;var n=r(7007).EventEmitter;function i(){n.call(this)}r(1939)(i,n),i.Readable=r(6891),i.Writable=r(1999),i.Duplex=r(8101),i.Transform=r(9083),i.PassThrough=r(3681),i.finished=r(4257),i.pipeline=r(5267),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",h));var s=!1;function a(){s||(s=!0,t.end())}function h(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function u(t){if(f(),0===n.listenerCount(this,"error"))throw t}function f(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",h),r.removeListener("error",u),t.removeListener("error",u),r.removeListener("end",f),r.removeListener("close",f),t.removeListener("close",f)}return r.on("error",u),t.on("error",u),r.on("end",f),r.on("close",f),t.on("close",f),t.emit("pipe",r),t}},1939(t){"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},2463(t){"use strict";var e={};function r(t,r,n){n||(n=Error);var i=function(t){var e,n;function i(e,n,i){return t.call(this,function(t,e,n){return"string"==typeof r?r:r(t,e,n)}(e,n,i))||this}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=t,e[t]=i}function n(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(t){return String(t)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(t,e,r){var i,o,s,a;if("string"==typeof e&&(o="not ",e.substr(!s||s<0?0:+s,o.length)===o)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))a="The ".concat(t," ").concat(i," ").concat(n(e,"type"));else{var h=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";a='The "'.concat(t,'" ').concat(h," ").concat(i," ").concat(n(e,"type"))}return a+=". Received type ".concat(typeof r)},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.F=e},8101(t,e,r){"use strict";var n=r(5606),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var o=r(6891),s=r(1999);r(1939)(f,o);for(var a=i(s.prototype),h=0;h<a.length;h++){var u=a[h];f.prototype[u]||(f.prototype[u]=s.prototype[u])}function f(t){if(!(this instanceof f))return new f(t);o.call(this,t),s.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||n.nextTick(c,this)}function c(t){t.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})},3681(t,e,r){"use strict";t.exports=i;var n=r(9083);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(1939)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},6891(t,e,r){"use strict";var n,i=r(5606);t.exports=k,k.ReadableState=E;r(7007).EventEmitter;var o=function(t,e){return t.listeners(e).length},s=r(1396),a=r(8287).Buffer,h=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var u,f=r(7199);u=f&&f.debuglog?f.debuglog("stream"):function(){};var l,c,d,p=r(1766),m=r(4347),y=r(6644).getHighWaterMark,g=r(2463).F,b=g.ERR_INVALID_ARG_TYPE,v=g.ERR_STREAM_PUSH_AFTER_EOF,w=g.ERR_METHOD_NOT_IMPLEMENTED,_=g.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(1939)(k,s);var M=m.errorOrDestroy,S=["error","close","destroy","pause","resume"];function E(t,e,i){n=n||r(8101),t=t||{},"boolean"!=typeof i&&(i=e instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=y(this,t,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(l||(l=r(3141).I),this.decoder=new l(t.encoding),this.encoding=t.encoding)}function k(t){if(n=n||r(8101),!(this instanceof k))return new k(t);var e=this instanceof n;this._readableState=new E(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),s.call(this)}function A(t,e,r,n,i){u("readableAddChunk",e);var o,s=t._readableState;if(null===e)s.reading=!1,function(t,e){if(u("onEofChunk"),e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?I(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,T(t)))}(t,s);else if(i||(o=function(t,e){var r;n=e,a.isBuffer(n)||n instanceof h||"string"==typeof e||void 0===e||t.objectMode||(r=new b("chunk",["string","Buffer","Uint8Array"],e));var n;return r}(s,e)),o)M(t,o);else if(s.objectMode||e&&e.length>0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=function(t){return a.from(t)}(e)),n)s.endEmitted?M(t,new _):B(t,s,e,!0);else if(s.ended)M(t,new v);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?B(t,s,e,!1):O(t,s)):B(t,s,e,!1)}else n||(s.reading=!1,O(t,s));return!s.ended&&(s.length<s.highWaterMark||0===s.length)}function B(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&I(t)),O(t,e)}Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),k.prototype.destroy=m.destroy,k.prototype._undestroy=m.undestroy,k.prototype._destroy=function(t,e){e(t)},k.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=a.from(t,e),e=""),r=!0),A(this,t,e,!1,r)},k.prototype.unshift=function(t){return A(this,t,null,!0,!1)},k.prototype.isPaused=function(){return!1===this._readableState.flowing},k.prototype.setEncoding=function(t){l||(l=r(3141).I);var e=new l(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var x=1073741824;function R(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=x?t=x:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function I(t){var e=t._readableState;u("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(u("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(T,t))}function T(t){var e=t._readableState;u("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,L(t)}function O(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(j,t,e))}function j(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(u("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function C(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function P(t){u("readable nexttick read 0"),t.read(0)}function U(t,e){u("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),L(t),e.flowing&&!e.reading&&t.read(0)}function L(t){var e=t._readableState;for(u("flow",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function D(t){var e=t._readableState;u("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(q,e,t))}function q(t,e){if(u("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function F(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}k.prototype.read=function(t){u("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return u("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?D(this):I(this),null;if(0===(t=R(t,e))&&e.ended)return 0===e.length&&D(this),null;var n,i=e.needReadable;return u("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&u("length less than watermark",i=!0),e.ended||e.reading?u("reading or ended",i=!1):i&&(u("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=R(r,e))),null===(n=t>0?N(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&D(this)),null!==n&&this.emit("data",n),n},k.prototype._read=function(t){M(this,new w("_read()"))},k.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,u("pipe count=%d opts=%j",n.pipesCount,e);var s=(!e||!1!==e.end)&&t!==i.stdout&&t!==i.stderr?h:y;function a(e,i){u("onunpipe"),e===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,u("cleanup"),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("drain",f),t.removeListener("error",d),t.removeListener("unpipe",a),r.removeListener("end",h),r.removeListener("end",y),r.removeListener("data",c),l=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}function h(){u("onend"),t.end()}n.endEmitted?i.nextTick(s):r.once("end",s),t.on("unpipe",a);var f=function(t){return function(){var e=t._readableState;u("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(t,"data")&&(e.flowing=!0,L(t))}}(r);t.on("drain",f);var l=!1;function c(e){u("ondata");var i=t.write(e);u("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==F(n.pipes,t))&&!l&&(u("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function d(e){u("onerror",e),y(),t.removeListener("error",d),0===o(t,"error")&&M(t,e)}function p(){t.removeListener("finish",m),y()}function m(){u("onfinish"),t.removeListener("close",p),y()}function y(){u("unpipe"),r.unpipe(t)}return r.on("data",c),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",d),t.once("close",p),t.once("finish",m),t.emit("pipe",r),n.flowing||(u("pipe resume"),r.resume()),t},k.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=F(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},k.prototype.on=function(t,e){var r=s.prototype.on.call(this,t,e),n=this._readableState;return"data"===t?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,u("on readable",n.length,n.reading),n.length?I(this):n.reading||i.nextTick(P,this))),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(t,e){var r=s.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(C,this),r},k.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(C,this),e},k.prototype.resume=function(){var t=this._readableState;return t.flowing||(u("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(U,t,e))}(this,t)),t.paused=!1,this},k.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},k.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",function(){if(u("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)}),t.on("data",function(i){(u("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i)||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))}),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<S.length;o++)t.on(S[o],this.emit.bind(this,S[o]));return this._read=function(e){u("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=r(5034)),c(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),k._fromList=N,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(k.from=function(t,e){return void 0===d&&(d=r(968)),d(k,t,e)})},9083(t,e,r){"use strict";t.exports=f;var n=r(2463).F,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,h=r(8101);function u(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function f(t){if(!(this instanceof f))return new f(t);h.call(this,t),this._transformState={afterTransform:u.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",l)}function l(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?c(this,null,null):this._flush(function(e,r){c(t,e,r)})}function c(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(1939)(f,h),f.prototype.push=function(t,e){return this._transformState.needTransform=!1,h.prototype.push.call(this,t,e)},f.prototype._transform=function(t,e,r){r(new i("_transform()"))},f.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},f.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},f.prototype._destroy=function(t,e){h.prototype._destroy.call(this,t,function(t){e(t)})}},1999(t,e,r){"use strict";var n,i=r(5606);function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=k,k.WritableState=E;var s={deprecate:r(4643)},a=r(1396),h=r(8287).Buffer,u=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var f,l=r(4347),c=r(6644).getHighWaterMark,d=r(2463).F,p=d.ERR_INVALID_ARG_TYPE,m=d.ERR_METHOD_NOT_IMPLEMENTED,y=d.ERR_MULTIPLE_CALLBACK,g=d.ERR_STREAM_CANNOT_PIPE,b=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,_=d.ERR_UNKNOWN_ENCODING,M=l.errorOrDestroy;function S(){}function E(t,e,s){n=n||r(8101),t=t||{},"boolean"!=typeof s&&(s=e instanceof n),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=c(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new y;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,o){--e.pendingcb,r?(i.nextTick(o,n),i.nextTick(T,t,e),t._writableState.errorEmitted=!0,M(t,n)):(o(n),t._writableState.errorEmitted=!0,M(t,n),T(t,e))}(t,r,n,e,o);else{var s=R(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||x(t,r),n?i.nextTick(B,t,r,s,o):B(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function k(t){var e=this instanceof(n=n||r(8101));if(!e&&!f.call(k,this))return new k(t);this._writableState=new E(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),a.call(this)}function A(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new b("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function B(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),T(t,e)}function x(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,h=!0;r;)i[a]=r,r.isBuf||(h=!1),r=r.next,a+=1;i.allBuffers=h,A(t,e,!0,e.length,i,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;r;){var u=r.chunk,f=r.encoding,l=r.callback;if(A(t,e,!1,e.objectMode?1:u.length,u,f,l),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function R(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function I(t,e){t._final(function(r){e.pendingcb--,r&&M(t,r),e.prefinished=!0,t.emit("prefinish"),T(t,e)})}function T(t,e){var r=R(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,i.nextTick(I,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}r(1939)(k,a),E.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(E.prototype,"buffer",{get:s.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(f=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(t){return!!f.call(this,t)||this===k&&(t&&t._writableState instanceof E)}})):f=function(t){return t instanceof this},k.prototype.pipe=function(){M(this,new g)},k.prototype.write=function(t,e,r){var n,o=this._writableState,s=!1,a=!o.objectMode&&(n=t,h.isBuffer(n)||n instanceof u);return a&&!h.isBuffer(t)&&(t=function(t){return h.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=S),o.ending?function(t,e){var r=new w;M(t,r),i.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var o;return null===r?o=new v:"string"==typeof r||e.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(M(t,o),i.nextTick(n,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=h.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else A(t,e,!1,a,n,i,o);return u}(this,o,a,t,e,r)),s},k.prototype.cork=function(){this._writableState.corked++},k.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||x(this,t))},k.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(t,e,r){r(new m("_write()"))},k.prototype._writev=null,k.prototype.end=function(t,e,r){var n=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,T(t,e),r&&(e.finished?i.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),k.prototype.destroy=l.destroy,k.prototype._undestroy=l.undestroy,k.prototype._destroy=function(t,e){e(t)}},5034(t,e,r){"use strict";var n,i=r(5606);function o(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(4257),a=Symbol("lastResolve"),h=Symbol("lastReject"),u=Symbol("error"),f=Symbol("ended"),l=Symbol("lastPromise"),c=Symbol("handlePromise"),d=Symbol("stream");function p(t,e){return{value:t,done:e}}function m(t){var e=t[a];if(null!==e){var r=t[d].read();null!==r&&(t[l]=null,t[a]=null,t[h]=null,e(p(r,!1)))}}function y(t){i.nextTick(m,t)}var g=Object.getPrototypeOf(function(){}),b=Object.setPrototypeOf((o(n={get stream(){return this[d]},next:function(){var t=this,e=this[u];if(null!==e)return Promise.reject(e);if(this[f])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise(function(e,r){i.nextTick(function(){t[u]?r(t[u]):e(p(void 0,!0))})});var r,n=this[l];if(n)r=new Promise(function(t,e){return function(r,n){t.then(function(){e[f]?r(p(void 0,!0)):e[c](r,n)},n)}}(n,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(p(o,!1));r=new Promise(this[c])}return this[l]=r,r}},Symbol.asyncIterator,function(){return this}),o(n,"return",function(){var t=this;return new Promise(function(e,r){t[d].destroy(null,function(t){t?r(t):e(p(void 0,!0))})})}),n),g);t.exports=function(t){var e,r=Object.create(b,(o(e={},d,{value:t,writable:!0}),o(e,a,{value:null,writable:!0}),o(e,h,{value:null,writable:!0}),o(e,u,{value:null,writable:!0}),o(e,f,{value:t._readableState.endEmitted,writable:!0}),o(e,c,{value:function(t,e){var n=r[d].read();n?(r[l]=null,r[a]=null,r[h]=null,t(p(n,!1))):(r[a]=t,r[h]=e)},writable:!0}),e));return r[l]=null,s(t,function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[h];return null!==e&&(r[l]=null,r[a]=null,r[h]=null,e(t)),void(r[u]=t)}var n=r[a];null!==n&&(r[l]=null,r[a]=null,r[h]=null,n(p(void 0,!0))),r[f]=!0}),t.on("readable",y.bind(null,r)),r}},1766(t,e,r){"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,n)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach(function(e){o(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function o(t,e,r){return(e=a(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function a(t){var e=function(t,e){if("object"!=typeof t||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:String(e)}var h=r(8287).Buffer,u=r(3779).inspect,f=u&&u.custom||"inspect";function l(t,e,r){h.prototype.copy.call(t,e,r)}t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r,n;return e=t,(r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return h.alloc(0);for(var e=h.allocUnsafe(t>>>0),r=this.head,n=0;r;)l(r.data,e,n),n+=r.data.length,r=r.next;return e}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0===(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=h.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0===(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:f,value:function(t,e){return u(this,i(i({},e),{},{depth:0,customInspect:!1}))}}])&&s(e.prototype,r),n&&s(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()},4347(t,e,r){"use strict";var n=r(5606);function i(t,e){s(t,e),o(t)}function o(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function s(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,a=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return a||h?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(s,this,t)):n.nextTick(s,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?r._writableState?r._writableState.errorEmitted?n.nextTick(o,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,t)):n.nextTick(i,r,t):e?(n.nextTick(o,r),e(t)):n.nextTick(o,r)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}},4257(t,e,r){"use strict";var n=r(2463).F.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,h=function(){e.writable||f()},u=e._writableState&&e._writableState.finished,f=function(){a=!1,u=!0,s||o.call(e)},l=e._readableState&&e._readableState.endEmitted,c=function(){s=!1,l=!0,a||o.call(e)},d=function(t){o.call(e,t)},p=function(){var t;return s&&!l?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!u?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},m=function(){e.req.on("finish",f)};return!function(t){return t.setHeader&&"function"==typeof t.abort}(e)?a&&!e._writableState&&(e.on("end",h),e.on("close",h)):(e.on("complete",f),e.on("abort",p),e.req?m():e.on("request",m)),e.on("end",c),e.on("finish",f),!1!==r.error&&e.on("error",d),e.on("close",p),function(){e.removeListener("complete",f),e.removeListener("abort",p),e.removeListener("request",m),e.req&&e.req.removeListener("finish",f),e.removeListener("end",h),e.removeListener("close",h),e.removeListener("finish",f),e.removeListener("end",c),e.removeListener("error",d),e.removeListener("close",p)}}},968(t){t.exports=function(){throw new Error("Readable.from is not available in the browser")}},5267(t,e,r){"use strict";var n;var i=r(2463).F,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function h(t){t()}function u(t,e){return t.pipe(e)}t.exports=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];var f,l=function(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var c=e.map(function(t,i){var o=i<e.length-1;return function(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",function(){a=!0}),void 0===n&&(n=r(4257)),n(t,{readable:e,writable:i},function(t){if(t)return o(t);a=!0,o()});var h=!1;return function(e){if(!a&&!h)return h=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}(t,o,i>0,function(t){f||(f=t),t&&c.forEach(h),o||(c.forEach(h),l(f))})});return e.reduce(u)}},6644(t,e,r){"use strict";var n=r(2463).F.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},1396(t,e,r){t.exports=r(7007).EventEmitter},3141(t,e,r){"use strict";var n=r(5003).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=h,this.end=u,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=f,this.end=l,e=3;break;default:return this.write=c,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function h(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function u(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function l(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function c(t){return t.toString(this.encoding)}function d(t){return t&&t.length?this.write(t):""}e.I=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r||-2===i)return 0;if(i=s(e[n]),i>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r||-2===i)return 0;if(i=s(e[n]),i>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},5003(t,e,r){var n=r(8287),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},5377(t,e,r){"use strict";var n=r(2861).Buffer,i=r(2006),o=r(4372),s=ArrayBuffer.isView||function(t){try{return o(t),!0}catch(t){return!1}},a="undefined"!=typeof Uint8Array,h="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,u=h&&(n.prototype instanceof Uint8Array||n.TYPED_ARRAY_SUPPORT);t.exports=function(t,e){if(n.isBuffer(t))return t.constructor&&!("isBuffer"in t)?n.from(t):t;if("string"==typeof t)return n.from(t,e);if(h&&s(t)){if(0===t.byteLength)return n.alloc(0);if(u){var r=n.from(t.buffer,t.byteOffset,t.byteLength);if(r.byteLength===t.byteLength)return r}var o=t instanceof Uint8Array?t:new Uint8Array(t.buffer,t.byteOffset,t.byteLength),f=n.from(o);if(f.length===t.byteLength)return f}if(a&&t instanceof Uint8Array)return n.from(t);var l=i(t);if(l)for(var c=0;c<t.length;c+=1){var d=t[c];if("number"!=typeof d||d<0||d>255||~~d!==d)throw new RangeError("Array items must be numbers in the range 0-255.")}if(l||n.isBuffer(t)&&t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t))return n.from(t);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}},2006(t){var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},4372(t,e,r){"use strict";var n=r(9675),i=r(6556)("TypedArray.prototype.buffer",!0),o=r(5680);t.exports=i||function(t){if(!o(t))throw new n("Not a Typed Array");return t.buffer}},4643(t,e,r){function n(t){try{if(!r.g.localStorage)return!1}catch(t){return!1}var e=r.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}},8961(__unused_webpack_module,exports){var indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0;r<t.length;r++)if(t[r]===e)return r;return-1},Object_keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var r in t)e.push(r);return e},forEach=function(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e(t[r],r,t)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(t,e,r){Object.defineProperty(t,e,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(t){return function(t,e,r){t[e]=r}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(t){if(!(this instanceof Script))return new Script(t);this.code=t};Script.prototype.runInContext=function(t){if(!(t instanceof Context))throw new TypeError("needs a 'context' argument.");var e=document.createElement("iframe");e.style||(e.style={}),e.style.display="none",document.body.appendChild(e);var r=e.contentWindow,n=r.eval,i=r.execScript;!n&&i&&(i.call(r,"null"),n=r.eval),forEach(Object_keys(t),function(e){r[e]=t[e]}),forEach(globals,function(e){t[e]&&(r[e]=t[e])});var o=Object_keys(r),s=n.call(r,this.code);return forEach(Object_keys(r),function(e){(e in t||-1===indexOf(o,e))&&(t[e]=r[e])}),forEach(globals,function(e){e in t||defineProp(t,e,r[e])}),document.body.removeChild(e),s},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(t){var e=Script.createContext(t),r=this.runInContext(e);return t&&forEach(Object_keys(e),function(r){t[r]=e[r]}),r},forEach(Object_keys(Script.prototype),function(t){exports[t]=Script[t]=function(e){var r=Script(e);return r[t].apply(r,[].slice.call(arguments,1))}}),exports.isContext=function(t){return t instanceof Context},exports.createScript=function(t){return exports.Script(t)},exports.createContext=Script.createContext=function(t){var e=new Context;return"object"==typeof t&&forEach(Object_keys(t),function(r){e[r]=t[r]}),e}},5767(t,e,r){"use strict";var n=r(2682),i=r(9209),o=r(487),s=r(6556),a=r(5795),h=r(3628),u=s("Object.prototype.toString"),f=r(9092)(),l="undefined"==typeof globalThis?r.g:globalThis,c=i(),d=s("String.prototype.slice"),p=s("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r<t.length;r+=1)if(t[r]===e)return r;return-1},m={__proto__:null};n(c,f&&a&&h?function(t){var e=new l[t];if(Symbol.toStringTag in e&&h){var r=h(e),n=a(r,Symbol.toStringTag);if(!n&&r){var i=h(r);n=a(i,Symbol.toStringTag)}if(n&&n.get){var s=o(n.get);m["$"+t]=s}}}:function(t){var e=new l[t],r=e.slice||e.set;if(r){var n=o(r);m["$"+t]=n}});t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(!f){var e=d(u(t),8,-1);return p(c,e)>-1?e:"Object"===e&&function(t){var e=!1;return n(m,function(r,n){if(!e)try{r(t),e=d(n,1)}catch(t){}}),e}(t)}return a?function(t){var e=!1;return n(m,function(r,n){if(!e)try{"$"+r(t)===n&&(e=d(n,1))}catch(t){}}),e}(t):null}},742(t,e,r){t.exports=r(261)},7790(){},3776(){},8285(){},4581(){},8216(){},9004(){},5340(){},9838(){},3779(){},7199(){},9209(t,e,r){"use strict";var n=r(6578),i="undefined"==typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e<n.length;e++)"function"==typeof i[n[e]]&&(t[t.length]=n[e]);return t}},3219(t){"use strict";t.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"}}')},3241(t){"use strict";t.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"}}')},5579(t){"use strict";t.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"}')}},__webpack_module_cache__={};function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var r=__webpack_module_cache__[t]={id:t,loaded:!1,exports:{}};return __webpack_modules__[t].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var __webpack_exports__=__webpack_require__(742);bsvShamir=__webpack_exports__})();
1
+ var bsvShamir=(()=>{var Gb=Object.create;var Bl=Object.defineProperty;var Vb=Object.getOwnPropertyDescriptor;var $b=Object.getOwnPropertyNames;var Zb=Object.getPrototypeOf,Yb=Object.prototype.hasOwnProperty;var Xb=(t,e,r)=>()=>{if(r)throw r[0];try{return t&&(e=t(t=0)),e}catch(i){throw r=[i],i}};var R=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}};var Jb=(t,e,r,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of $b(e))!Yb.call(t,n)&&n!==r&&Bl(t,n,{get:()=>e[n],enumerable:!(i=Vb(e,n))||i.enumerable});return t};var Al=(t,e,r)=>(r=t!=null?Gb(Zb(t)):{},Jb(e||!t||!t.__esModule?Bl(r,"default",{value:t,enumerable:!0}):r,t));var Tl=R((KB,kl)=>{b();var Ze=kl.exports={},zt,Gt;function rs(){throw new Error("setTimeout has not been defined")}function is(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?zt=setTimeout:zt=rs}catch{zt=rs}try{typeof clearTimeout=="function"?Gt=clearTimeout:Gt=is}catch{Gt=is}})();function Rl(t){if(zt===setTimeout)return setTimeout(t,0);if((zt===rs||!zt)&&setTimeout)return zt=setTimeout,setTimeout(t,0);try{return zt(t,0)}catch{try{return zt.call(null,t,0)}catch{return zt.call(this,t,0)}}}function Qb(t){if(Gt===clearTimeout)return clearTimeout(t);if((Gt===is||!Gt)&&clearTimeout)return Gt=clearTimeout,clearTimeout(t);try{return Gt(t)}catch{try{return Gt.call(null,t)}catch{return Gt.call(this,t)}}}var sr=[],Fi=!1,ai,Xa=-1;function e2(){!Fi||!ai||(Fi=!1,ai.length?sr=ai.concat(sr):Xa=-1,sr.length&&ql())}function ql(){if(!Fi){var t=Rl(e2);Fi=!0;for(var e=sr.length;e;){for(ai=sr,sr=[];++Xa<e;)ai&&ai[Xa].run();Xa=-1,e=sr.length}ai=null,Fi=!1,Qb(t)}}Ze.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];sr.push(new Il(t,e)),sr.length===1&&!Fi&&Rl(ql)};function Il(t,e){this.fun=t,this.array=e}Il.prototype.run=function(){this.fun.apply(null,this.array)};Ze.title="browser";Ze.browser=!0;Ze.env={};Ze.argv=[];Ze.version="";Ze.versions={};function ur(){}Ze.on=ur;Ze.addListener=ur;Ze.once=ur;Ze.off=ur;Ze.removeListener=ur;Ze.removeAllListeners=ur;Ze.emit=ur;Ze.prependListener=ur;Ze.prependOnceListener=ur;Ze.listeners=function(t){return[]};Ze.binding=function(t){throw new Error("process.binding is not supported")};Ze.cwd=function(){return"/"};Ze.chdir=function(t){throw new Error("process.chdir is not supported")};Ze.umask=function(){return 0}});var Pl=R(Ja=>{"use strict";b();Ja.byteLength=r2;Ja.toByteArray=n2;Ja.fromByteArray=f2;var Vt=[],wt=[],t2=typeof Uint8Array<"u"?Uint8Array:Array,ns="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(oi=0,Cl=ns.length;oi<Cl;++oi)Vt[oi]=ns[oi],wt[ns.charCodeAt(oi)]=oi;var oi,Cl;wt[45]=62;wt[95]=63;function Ol(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var i=r===e?0:4-r%4;return[r,i]}function r2(t){var e=Ol(t),r=e[0],i=e[1];return(r+i)*3/4-i}function i2(t,e,r){return(e+r)*3/4-r}function n2(t){var e,r=Ol(t),i=r[0],n=r[1],a=new t2(i2(t,i,n)),f=0,v=n>0?i-4:i,m;for(m=0;m<v;m+=4)e=wt[t.charCodeAt(m)]<<18|wt[t.charCodeAt(m+1)]<<12|wt[t.charCodeAt(m+2)]<<6|wt[t.charCodeAt(m+3)],a[f++]=e>>16&255,a[f++]=e>>8&255,a[f++]=e&255;return n===2&&(e=wt[t.charCodeAt(m)]<<2|wt[t.charCodeAt(m+1)]>>4,a[f++]=e&255),n===1&&(e=wt[t.charCodeAt(m)]<<10|wt[t.charCodeAt(m+1)]<<4|wt[t.charCodeAt(m+2)]>>2,a[f++]=e>>8&255,a[f++]=e&255),a}function a2(t){return Vt[t>>18&63]+Vt[t>>12&63]+Vt[t>>6&63]+Vt[t&63]}function o2(t,e,r){for(var i,n=[],a=e;a<r;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(t[a+2]&255),n.push(a2(i));return n.join("")}function f2(t){for(var e,r=t.length,i=r%3,n=[],a=16383,f=0,v=r-i;f<v;f+=a)n.push(o2(t,f,f+a>v?v:f+a));return i===1?(e=t[r-1],n.push(Vt[e>>2]+Vt[e<<4&63]+"==")):i===2&&(e=(t[r-2]<<8)+t[r-1],n.push(Vt[e>>10]+Vt[e>>4&63]+Vt[e<<2&63]+"=")),n.join("")}});var Dl=R(as=>{b();as.read=function(t,e,r,i,n){var a,f,v=n*8-i-1,m=(1<<v)-1,E=m>>1,A=-7,q=r?n-1:0,I=r?-1:1,C=t[e+q];for(q+=I,a=C&(1<<-A)-1,C>>=-A,A+=v;A>0;a=a*256+t[e+q],q+=I,A-=8);for(f=a&(1<<-A)-1,a>>=-A,A+=i;A>0;f=f*256+t[e+q],q+=I,A-=8);if(a===0)a=1-E;else{if(a===m)return f?NaN:(C?-1:1)*(1/0);f=f+Math.pow(2,i),a=a-E}return(C?-1:1)*f*Math.pow(2,a-i)};as.write=function(t,e,r,i,n,a){var f,v,m,E=a*8-n-1,A=(1<<E)-1,q=A>>1,I=n===23?Math.pow(2,-24)-Math.pow(2,-77):0,C=i?0:a-1,j=i?1:-1,V=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(v=isNaN(e)?1:0,f=A):(f=Math.floor(Math.log(e)/Math.LN2),e*(m=Math.pow(2,-f))<1&&(f--,m*=2),f+q>=1?e+=I/m:e+=I*Math.pow(2,1-q),e*m>=2&&(f++,m/=2),f+q>=A?(v=0,f=A):f+q>=1?(v=(e*m-1)*Math.pow(2,n),f=f+q):(v=e*Math.pow(2,q-1)*Math.pow(2,n),f=0));n>=8;t[r+C]=v&255,C+=j,v/=256,n-=8);for(f=f<<n|v,E+=n;E>0;t[r+C]=f&255,C+=j,f/=256,E-=8);t[r+C-j]|=V*128}});var ft=R(Wi=>{"use strict";b();var os=Pl(),Hi=Dl(),Ul=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Wi.Buffer=T;Wi.SlowBuffer=d2;Wi.INSPECT_MAX_BYTES=50;var Qa=2147483647;Wi.kMaxLength=Qa;T.TYPED_ARRAY_SUPPORT=s2();!T.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function s2(){try{let t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),t.foo()===42}catch{return!1}}Object.defineProperty(T.prototype,"parent",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.buffer}});Object.defineProperty(T.prototype,"offset",{enumerable:!0,get:function(){if(T.isBuffer(this))return this.byteOffset}});function hr(t){if(t>Qa)throw new RangeError('The value "'+t+'" is invalid for option "size"');let e=new Uint8Array(t);return Object.setPrototypeOf(e,T.prototype),e}function T(t,e,r){if(typeof t=="number"){if(typeof e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return hs(t)}return jl(t,e,r)}T.poolSize=8192;function jl(t,e,r){if(typeof t=="string")return h2(t,e);if(ArrayBuffer.isView(t))return l2(t);if(t==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if($t(t,ArrayBuffer)||t&&$t(t.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&($t(t,SharedArrayBuffer)||t&&$t(t.buffer,SharedArrayBuffer)))return ss(t,e,r);if(typeof t=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let i=t.valueOf&&t.valueOf();if(i!=null&&i!==t)return T.from(i,e,r);let n=c2(t);if(n)return n;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof t[Symbol.toPrimitive]=="function")return T.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}T.from=function(t,e,r){return jl(t,e,r)};Object.setPrototypeOf(T.prototype,Uint8Array.prototype);Object.setPrototypeOf(T,Uint8Array);function Hl(t){if(typeof t!="number")throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function u2(t,e,r){return Hl(t),t<=0?hr(t):e!==void 0?typeof r=="string"?hr(t).fill(e,r):hr(t).fill(e):hr(t)}T.alloc=function(t,e,r){return u2(t,e,r)};function hs(t){return Hl(t),hr(t<0?0:ls(t)|0)}T.allocUnsafe=function(t){return hs(t)};T.allocUnsafeSlow=function(t){return hs(t)};function h2(t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!T.isEncoding(e))throw new TypeError("Unknown encoding: "+e);let r=Kl(t,e)|0,i=hr(r),n=i.write(t,e);return n!==r&&(i=i.slice(0,n)),i}function fs(t){let e=t.length<0?0:ls(t.length)|0,r=hr(e);for(let i=0;i<e;i+=1)r[i]=t[i]&255;return r}function l2(t){if($t(t,Uint8Array)){let e=new Uint8Array(t);return ss(e.buffer,e.byteOffset,e.byteLength)}return fs(t)}function ss(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');let i;return e===void 0&&r===void 0?i=new Uint8Array(t):r===void 0?i=new Uint8Array(t,e):i=new Uint8Array(t,e,r),Object.setPrototypeOf(i,T.prototype),i}function c2(t){if(T.isBuffer(t)){let e=ls(t.length)|0,r=hr(e);return r.length===0||t.copy(r,0,0,e),r}if(t.length!==void 0)return typeof t.length!="number"||ds(t.length)?hr(0):fs(t);if(t.type==="Buffer"&&Array.isArray(t.data))return fs(t.data)}function ls(t){if(t>=Qa)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Qa.toString(16)+" bytes");return t|0}function d2(t){return+t!=t&&(t=0),T.alloc(+t)}T.isBuffer=function(e){return e!=null&&e._isBuffer===!0&&e!==T.prototype};T.compare=function(e,r){if($t(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),$t(r,Uint8Array)&&(r=T.from(r,r.offset,r.byteLength)),!T.isBuffer(e)||!T.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===r)return 0;let i=e.length,n=r.length;for(let a=0,f=Math.min(i,n);a<f;++a)if(e[a]!==r[a]){i=e[a],n=r[a];break}return i<n?-1:n<i?1:0};T.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}};T.concat=function(e,r){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(e.length===0)return T.alloc(0);let i;if(r===void 0)for(r=0,i=0;i<e.length;++i)r+=e[i].length;let n=T.allocUnsafe(r),a=0;for(i=0;i<e.length;++i){let f=e[i];if($t(f,Uint8Array))a+f.length>n.length?(T.isBuffer(f)||(f=T.from(f)),f.copy(n,a)):Uint8Array.prototype.set.call(n,f,a);else if(T.isBuffer(f))f.copy(n,a);else throw new TypeError('"list" argument must be an Array of Buffers');a+=f.length}return n};function Kl(t,e){if(T.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||$t(t,ArrayBuffer))return t.byteLength;if(typeof t!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);let r=t.length,i=arguments.length>2&&arguments[2]===!0;if(!i&&r===0)return 0;let n=!1;for(;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return us(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Jl(t).length;default:if(n)return i?-1:us(t).length;e=(""+e).toLowerCase(),n=!0}}T.byteLength=Kl;function p2(t,e,r){let i=!1;if((e===void 0||e<0)&&(e=0),e>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,e>>>=0,r<=e))return"";for(t||(t="utf8");;)switch(t){case"hex":return E2(this,e,r);case"utf8":case"utf-8":return zl(this,e,r);case"ascii":return x2(this,e,r);case"latin1":case"binary":return M2(this,e,r);case"base64":return w2(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S2(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}T.prototype._isBuffer=!0;function fi(t,e,r){let i=t[e];t[e]=t[r],t[r]=i}T.prototype.swap16=function(){let e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;r<e;r+=2)fi(this,r,r+1);return this};T.prototype.swap32=function(){let e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let r=0;r<e;r+=4)fi(this,r,r+3),fi(this,r+1,r+2);return this};T.prototype.swap64=function(){let e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let r=0;r<e;r+=8)fi(this,r,r+7),fi(this,r+1,r+6),fi(this,r+2,r+5),fi(this,r+3,r+4);return this};T.prototype.toString=function(){let e=this.length;return e===0?"":arguments.length===0?zl(this,0,e):p2.apply(this,arguments)};T.prototype.toLocaleString=T.prototype.toString;T.prototype.equals=function(e){if(!T.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:T.compare(this,e)===0};T.prototype.inspect=function(){let e="",r=Wi.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"};Ul&&(T.prototype[Ul]=T.prototype.inspect);T.prototype.compare=function(e,r,i,n,a){if($t(e,Uint8Array)&&(e=T.from(e,e.offset,e.byteLength)),!T.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(r===void 0&&(r=0),i===void 0&&(i=e?e.length:0),n===void 0&&(n=0),a===void 0&&(a=this.length),r<0||i>e.length||n<0||a>this.length)throw new RangeError("out of range index");if(n>=a&&r>=i)return 0;if(n>=a)return-1;if(r>=i)return 1;if(r>>>=0,i>>>=0,n>>>=0,a>>>=0,this===e)return 0;let f=a-n,v=i-r,m=Math.min(f,v),E=this.slice(n,a),A=e.slice(r,i);for(let q=0;q<m;++q)if(E[q]!==A[q]){f=E[q],v=A[q];break}return f<v?-1:v<f?1:0};function Wl(t,e,r,i,n){if(t.length===0)return-1;if(typeof r=="string"?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,ds(r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0)if(n)r=0;else return-1;if(typeof e=="string"&&(e=T.from(e,i)),T.isBuffer(e))return e.length===0?-1:Nl(t,e,r,i,n);if(typeof e=="number")return e=e&255,typeof Uint8Array.prototype.indexOf=="function"?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Nl(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function Nl(t,e,r,i,n){let a=1,f=t.length,v=e.length;if(i!==void 0&&(i=String(i).toLowerCase(),i==="ucs2"||i==="ucs-2"||i==="utf16le"||i==="utf-16le")){if(t.length<2||e.length<2)return-1;a=2,f/=2,v/=2,r/=2}function m(A,q){return a===1?A[q]:A.readUInt16BE(q*a)}let E;if(n){let A=-1;for(E=r;E<f;E++)if(m(t,E)===m(e,A===-1?0:E-A)){if(A===-1&&(A=E),E-A+1===v)return A*a}else A!==-1&&(E-=E-A),A=-1}else for(r+v>f&&(r=f-v),E=r;E>=0;E--){let A=!0;for(let q=0;q<v;q++)if(m(t,E+q)!==m(e,q)){A=!1;break}if(A)return E}return-1}T.prototype.includes=function(e,r,i){return this.indexOf(e,r,i)!==-1};T.prototype.indexOf=function(e,r,i){return Wl(this,e,r,i,!0)};T.prototype.lastIndexOf=function(e,r,i){return Wl(this,e,r,i,!1)};function v2(t,e,r,i){r=Number(r)||0;let n=t.length-r;i?(i=Number(i),i>n&&(i=n)):i=n;let a=e.length;i>a/2&&(i=a/2);let f;for(f=0;f<i;++f){let v=parseInt(e.substr(f*2,2),16);if(ds(v))return f;t[r+f]=v}return f}function y2(t,e,r,i){return eo(us(e,t.length-r),t,r,i)}function g2(t,e,r,i){return eo(q2(e),t,r,i)}function m2(t,e,r,i){return eo(Jl(e),t,r,i)}function b2(t,e,r,i){return eo(I2(e,t.length-r),t,r,i)}T.prototype.write=function(e,r,i,n){if(r===void 0)n="utf8",i=this.length,r=0;else if(i===void 0&&typeof r=="string")n=r,i=this.length,r=0;else if(isFinite(r))r=r>>>0,isFinite(i)?(i=i>>>0,n===void 0&&(n="utf8")):(n=i,i=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let a=this.length-r;if((i===void 0||i>a)&&(i=a),e.length>0&&(i<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let f=!1;for(;;)switch(n){case"hex":return v2(this,e,r,i);case"utf8":case"utf-8":return y2(this,e,r,i);case"ascii":case"latin1":case"binary":return g2(this,e,r,i);case"base64":return m2(this,e,r,i);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b2(this,e,r,i);default:if(f)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}};T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function w2(t,e,r){return e===0&&r===t.length?os.fromByteArray(t):os.fromByteArray(t.slice(e,r))}function zl(t,e,r){r=Math.min(t.length,r);let i=[],n=e;for(;n<r;){let a=t[n],f=null,v=a>239?4:a>223?3:a>191?2:1;if(n+v<=r){let m,E,A,q;switch(v){case 1:a<128&&(f=a);break;case 2:m=t[n+1],(m&192)===128&&(q=(a&31)<<6|m&63,q>127&&(f=q));break;case 3:m=t[n+1],E=t[n+2],(m&192)===128&&(E&192)===128&&(q=(a&15)<<12|(m&63)<<6|E&63,q>2047&&(q<55296||q>57343)&&(f=q));break;case 4:m=t[n+1],E=t[n+2],A=t[n+3],(m&192)===128&&(E&192)===128&&(A&192)===128&&(q=(a&15)<<18|(m&63)<<12|(E&63)<<6|A&63,q>65535&&q<1114112&&(f=q))}}f===null?(f=65533,v=1):f>65535&&(f-=65536,i.push(f>>>10&1023|55296),f=56320|f&1023),i.push(f),n+=v}return _2(i)}var Ll=4096;function _2(t){let e=t.length;if(e<=Ll)return String.fromCharCode.apply(String,t);let r="",i=0;for(;i<e;)r+=String.fromCharCode.apply(String,t.slice(i,i+=Ll));return r}function x2(t,e,r){let i="";r=Math.min(t.length,r);for(let n=e;n<r;++n)i+=String.fromCharCode(t[n]&127);return i}function M2(t,e,r){let i="";r=Math.min(t.length,r);for(let n=e;n<r;++n)i+=String.fromCharCode(t[n]);return i}function E2(t,e,r){let i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);let n="";for(let a=e;a<r;++a)n+=k2[t[a]];return n}function S2(t,e,r){let i=t.slice(e,r),n="";for(let a=0;a<i.length-1;a+=2)n+=String.fromCharCode(i[a]+i[a+1]*256);return n}T.prototype.slice=function(e,r){let i=this.length;e=~~e,r=r===void 0?i:~~r,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),r<0?(r+=i,r<0&&(r=0)):r>i&&(r=i),r<e&&(r=e);let n=this.subarray(e,r);return Object.setPrototypeOf(n,T.prototype),n};function rt(t,e,r){if(t%1!==0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUintLE=T.prototype.readUIntLE=function(e,r,i){e=e>>>0,r=r>>>0,i||rt(e,r,this.length);let n=this[e],a=1,f=0;for(;++f<r&&(a*=256);)n+=this[e+f]*a;return n};T.prototype.readUintBE=T.prototype.readUIntBE=function(e,r,i){e=e>>>0,r=r>>>0,i||rt(e,r,this.length);let n=this[e+--r],a=1;for(;r>0&&(a*=256);)n+=this[e+--r]*a;return n};T.prototype.readUint8=T.prototype.readUInt8=function(e,r){return e=e>>>0,r||rt(e,1,this.length),this[e]};T.prototype.readUint16LE=T.prototype.readUInt16LE=function(e,r){return e=e>>>0,r||rt(e,2,this.length),this[e]|this[e+1]<<8};T.prototype.readUint16BE=T.prototype.readUInt16BE=function(e,r){return e=e>>>0,r||rt(e,2,this.length),this[e]<<8|this[e+1]};T.prototype.readUint32LE=T.prototype.readUInt32LE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};T.prototype.readUint32BE=T.prototype.readUInt32BE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};T.prototype.readBigUInt64LE=Ir(function(e){e=e>>>0,Ki(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&Yn(e,this.length-8);let n=r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24,a=this[++e]+this[++e]*2**8+this[++e]*2**16+i*2**24;return BigInt(n)+(BigInt(a)<<BigInt(32))});T.prototype.readBigUInt64BE=Ir(function(e){e=e>>>0,Ki(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&Yn(e,this.length-8);let n=r*2**24+this[++e]*2**16+this[++e]*2**8+this[++e],a=this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i;return(BigInt(n)<<BigInt(32))+BigInt(a)});T.prototype.readIntLE=function(e,r,i){e=e>>>0,r=r>>>0,i||rt(e,r,this.length);let n=this[e],a=1,f=0;for(;++f<r&&(a*=256);)n+=this[e+f]*a;return a*=128,n>=a&&(n-=Math.pow(2,8*r)),n};T.prototype.readIntBE=function(e,r,i){e=e>>>0,r=r>>>0,i||rt(e,r,this.length);let n=r,a=1,f=this[e+--n];for(;n>0&&(a*=256);)f+=this[e+--n]*a;return a*=128,f>=a&&(f-=Math.pow(2,8*r)),f};T.prototype.readInt8=function(e,r){return e=e>>>0,r||rt(e,1,this.length),this[e]&128?(255-this[e]+1)*-1:this[e]};T.prototype.readInt16LE=function(e,r){e=e>>>0,r||rt(e,2,this.length);let i=this[e]|this[e+1]<<8;return i&32768?i|4294901760:i};T.prototype.readInt16BE=function(e,r){e=e>>>0,r||rt(e,2,this.length);let i=this[e+1]|this[e]<<8;return i&32768?i|4294901760:i};T.prototype.readInt32LE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};T.prototype.readInt32BE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};T.prototype.readBigInt64LE=Ir(function(e){e=e>>>0,Ki(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&Yn(e,this.length-8);let n=this[e+4]+this[e+5]*2**8+this[e+6]*2**16+(i<<24);return(BigInt(n)<<BigInt(32))+BigInt(r+this[++e]*2**8+this[++e]*2**16+this[++e]*2**24)});T.prototype.readBigInt64BE=Ir(function(e){e=e>>>0,Ki(e,"offset");let r=this[e],i=this[e+7];(r===void 0||i===void 0)&&Yn(e,this.length-8);let n=(r<<24)+this[++e]*2**16+this[++e]*2**8+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+this[++e]*2**16+this[++e]*2**8+i)});T.prototype.readFloatLE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),Hi.read(this,e,!0,23,4)};T.prototype.readFloatBE=function(e,r){return e=e>>>0,r||rt(e,4,this.length),Hi.read(this,e,!1,23,4)};T.prototype.readDoubleLE=function(e,r){return e=e>>>0,r||rt(e,8,this.length),Hi.read(this,e,!0,52,8)};T.prototype.readDoubleBE=function(e,r){return e=e>>>0,r||rt(e,8,this.length),Hi.read(this,e,!1,52,8)};function vt(t,e,r,i,n,a){if(!T.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||e<a)throw new RangeError('"value" argument is out of bounds');if(r+i>t.length)throw new RangeError("Index out of range")}T.prototype.writeUintLE=T.prototype.writeUIntLE=function(e,r,i,n){if(e=+e,r=r>>>0,i=i>>>0,!n){let v=Math.pow(2,8*i)-1;vt(this,e,r,i,v,0)}let a=1,f=0;for(this[r]=e&255;++f<i&&(a*=256);)this[r+f]=e/a&255;return r+i};T.prototype.writeUintBE=T.prototype.writeUIntBE=function(e,r,i,n){if(e=+e,r=r>>>0,i=i>>>0,!n){let v=Math.pow(2,8*i)-1;vt(this,e,r,i,v,0)}let a=i-1,f=1;for(this[r+a]=e&255;--a>=0&&(f*=256);)this[r+a]=e/f&255;return r+i};T.prototype.writeUint8=T.prototype.writeUInt8=function(e,r,i){return e=+e,r=r>>>0,i||vt(this,e,r,1,255,0),this[r]=e&255,r+1};T.prototype.writeUint16LE=T.prototype.writeUInt16LE=function(e,r,i){return e=+e,r=r>>>0,i||vt(this,e,r,2,65535,0),this[r]=e&255,this[r+1]=e>>>8,r+2};T.prototype.writeUint16BE=T.prototype.writeUInt16BE=function(e,r,i){return e=+e,r=r>>>0,i||vt(this,e,r,2,65535,0),this[r]=e>>>8,this[r+1]=e&255,r+2};T.prototype.writeUint32LE=T.prototype.writeUInt32LE=function(e,r,i){return e=+e,r=r>>>0,i||vt(this,e,r,4,4294967295,0),this[r+3]=e>>>24,this[r+2]=e>>>16,this[r+1]=e>>>8,this[r]=e&255,r+4};T.prototype.writeUint32BE=T.prototype.writeUInt32BE=function(e,r,i){return e=+e,r=r>>>0,i||vt(this,e,r,4,4294967295,0),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};function Gl(t,e,r,i,n){Xl(e,i,n,t,r,7);let a=Number(e&BigInt(4294967295));t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a,a=a>>8,t[r++]=a;let f=Number(e>>BigInt(32)&BigInt(4294967295));return t[r++]=f,f=f>>8,t[r++]=f,f=f>>8,t[r++]=f,f=f>>8,t[r++]=f,r}function Vl(t,e,r,i,n){Xl(e,i,n,t,r,7);let a=Number(e&BigInt(4294967295));t[r+7]=a,a=a>>8,t[r+6]=a,a=a>>8,t[r+5]=a,a=a>>8,t[r+4]=a;let f=Number(e>>BigInt(32)&BigInt(4294967295));return t[r+3]=f,f=f>>8,t[r+2]=f,f=f>>8,t[r+1]=f,f=f>>8,t[r]=f,r+8}T.prototype.writeBigUInt64LE=Ir(function(e,r=0){return Gl(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeBigUInt64BE=Ir(function(e,r=0){return Vl(this,e,r,BigInt(0),BigInt("0xffffffffffffffff"))});T.prototype.writeIntLE=function(e,r,i,n){if(e=+e,r=r>>>0,!n){let m=Math.pow(2,8*i-1);vt(this,e,r,i,m-1,-m)}let a=0,f=1,v=0;for(this[r]=e&255;++a<i&&(f*=256);)e<0&&v===0&&this[r+a-1]!==0&&(v=1),this[r+a]=(e/f>>0)-v&255;return r+i};T.prototype.writeIntBE=function(e,r,i,n){if(e=+e,r=r>>>0,!n){let m=Math.pow(2,8*i-1);vt(this,e,r,i,m-1,-m)}let a=i-1,f=1,v=0;for(this[r+a]=e&255;--a>=0&&(f*=256);)e<0&&v===0&&this[r+a+1]!==0&&(v=1),this[r+a]=(e/f>>0)-v&255;return r+i};T.prototype.writeInt8=function(e,r,i){return e=+e,r=r>>>0,i||vt(this,e,r,1,127,-128),e<0&&(e=255+e+1),this[r]=e&255,r+1};T.prototype.writeInt16LE=function(e,r,i){return e=+e,r=r>>>0,i||vt(this,e,r,2,32767,-32768),this[r]=e&255,this[r+1]=e>>>8,r+2};T.prototype.writeInt16BE=function(e,r,i){return e=+e,r=r>>>0,i||vt(this,e,r,2,32767,-32768),this[r]=e>>>8,this[r+1]=e&255,r+2};T.prototype.writeInt32LE=function(e,r,i){return e=+e,r=r>>>0,i||vt(this,e,r,4,2147483647,-2147483648),this[r]=e&255,this[r+1]=e>>>8,this[r+2]=e>>>16,this[r+3]=e>>>24,r+4};T.prototype.writeInt32BE=function(e,r,i){return e=+e,r=r>>>0,i||vt(this,e,r,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[r]=e>>>24,this[r+1]=e>>>16,this[r+2]=e>>>8,this[r+3]=e&255,r+4};T.prototype.writeBigInt64LE=Ir(function(e,r=0){return Gl(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});T.prototype.writeBigInt64BE=Ir(function(e,r=0){return Vl(this,e,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function $l(t,e,r,i,n,a){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Zl(t,e,r,i,n){return e=+e,r=r>>>0,n||$l(t,e,r,4,34028234663852886e22,-34028234663852886e22),Hi.write(t,e,r,i,23,4),r+4}T.prototype.writeFloatLE=function(e,r,i){return Zl(this,e,r,!0,i)};T.prototype.writeFloatBE=function(e,r,i){return Zl(this,e,r,!1,i)};function Yl(t,e,r,i,n){return e=+e,r=r>>>0,n||$l(t,e,r,8,17976931348623157e292,-17976931348623157e292),Hi.write(t,e,r,i,52,8),r+8}T.prototype.writeDoubleLE=function(e,r,i){return Yl(this,e,r,!0,i)};T.prototype.writeDoubleBE=function(e,r,i){return Yl(this,e,r,!1,i)};T.prototype.copy=function(e,r,i,n){if(!T.isBuffer(e))throw new TypeError("argument should be a Buffer");if(i||(i=0),!n&&n!==0&&(n=this.length),r>=e.length&&(r=e.length),r||(r=0),n>0&&n<i&&(n=i),n===i||e.length===0||this.length===0)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-r<n-i&&(n=e.length-r+i);let a=n-i;return this===e&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(r,i,n):Uint8Array.prototype.set.call(e,this.subarray(i,n),r),a};T.prototype.fill=function(e,r,i,n){if(typeof e=="string"){if(typeof r=="string"?(n=r,r=0,i=this.length):typeof i=="string"&&(n=i,i=this.length),n!==void 0&&typeof n!="string")throw new TypeError("encoding must be a string");if(typeof n=="string"&&!T.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(e.length===1){let f=e.charCodeAt(0);(n==="utf8"&&f<128||n==="latin1")&&(e=f)}}else typeof e=="number"?e=e&255:typeof e=="boolean"&&(e=Number(e));if(r<0||this.length<r||this.length<i)throw new RangeError("Out of range index");if(i<=r)return this;r=r>>>0,i=i===void 0?this.length:i>>>0,e||(e=0);let a;if(typeof e=="number")for(a=r;a<i;++a)this[a]=e;else{let f=T.isBuffer(e)?e:T.from(e,n),v=f.length;if(v===0)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<i-r;++a)this[a+r]=f[a%v]}return this};var ji={};function cs(t,e,r){ji[t]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:e.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${t}]`,this.stack,delete this.name}get code(){return t}set code(n){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:n,writable:!0})}toString(){return`${this.name} [${t}]: ${this.message}`}}}cs("ERR_BUFFER_OUT_OF_BOUNDS",function(t){return t?`${t} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError);cs("ERR_INVALID_ARG_TYPE",function(t,e){return`The "${t}" argument must be of type number. Received type ${typeof e}`},TypeError);cs("ERR_OUT_OF_RANGE",function(t,e,r){let i=`The value of "${t}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>2**32?n=Fl(String(r)):typeof r=="bigint"&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=Fl(n)),n+="n"),i+=` It must be ${e}. Received ${n}`,i},RangeError);function Fl(t){let e="",r=t.length,i=t[0]==="-"?1:0;for(;r>=i+4;r-=3)e=`_${t.slice(r-3,r)}${e}`;return`${t.slice(0,r)}${e}`}function B2(t,e,r){Ki(e,"offset"),(t[e]===void 0||t[e+r]===void 0)&&Yn(e,t.length-(r+1))}function Xl(t,e,r,i,n,a){if(t>r||t<e){let f=typeof e=="bigint"?"n":"",v;throw a>3?e===0||e===BigInt(0)?v=`>= 0${f} and < 2${f} ** ${(a+1)*8}${f}`:v=`>= -(2${f} ** ${(a+1)*8-1}${f}) and < 2 ** ${(a+1)*8-1}${f}`:v=`>= ${e}${f} and <= ${r}${f}`,new ji.ERR_OUT_OF_RANGE("value",v,t)}B2(i,n,a)}function Ki(t,e){if(typeof t!="number")throw new ji.ERR_INVALID_ARG_TYPE(e,"number",t)}function Yn(t,e,r){throw Math.floor(t)!==t?(Ki(t,r),new ji.ERR_OUT_OF_RANGE(r||"offset","an integer",t)):e<0?new ji.ERR_BUFFER_OUT_OF_BOUNDS:new ji.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${e}`,t)}var A2=/[^+/0-9A-Za-z-_]/g;function R2(t){if(t=t.split("=")[0],t=t.trim().replace(A2,""),t.length<2)return"";for(;t.length%4!==0;)t=t+"=";return t}function us(t,e){e=e||1/0;let r,i=t.length,n=null,a=[];for(let f=0;f<i;++f){if(r=t.charCodeAt(f),r>55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&a.push(239,191,189);continue}else if(f+1===i){(e-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&a.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(e-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;a.push(r)}else if(r<2048){if((e-=2)<0)break;a.push(r>>6|192,r&63|128)}else if(r<65536){if((e-=3)<0)break;a.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((e-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return a}function q2(t){let e=[];for(let r=0;r<t.length;++r)e.push(t.charCodeAt(r)&255);return e}function I2(t,e){let r,i,n,a=[];for(let f=0;f<t.length&&!((e-=2)<0);++f)r=t.charCodeAt(f),i=r>>8,n=r%256,a.push(n),a.push(i);return a}function Jl(t){return os.toByteArray(R2(t))}function eo(t,e,r,i){let n;for(n=0;n<i&&!(n+r>=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function $t(t,e){return t instanceof e||t!=null&&t.constructor!=null&&t.constructor.name!=null&&t.constructor.name===e.name}function ds(t){return t!==t}var k2=(function(){let t="0123456789abcdef",e=new Array(256);for(let r=0;r<16;++r){let i=r*16;for(let n=0;n<16;++n)e[i+n]=t[r]+t[n]}return e})();function Ir(t){return typeof BigInt>"u"?T2:t}function T2(){throw new Error("BigInt not supported")}});var S,B,b=Xb(()=>{S=Al(Tl()),B=Al(ft())});var lr=R((Ql,ps)=>{b();(function(t,e){"use strict";function r(M,h){if(!M)throw new Error(h||"Assertion failed")}function i(M,h){M.super_=h;var y=function(){};y.prototype=h.prototype,M.prototype=new y,M.prototype.constructor=M}function n(M,h,y){if(n.isBN(M))return M;this.negative=0,this.words=null,this.length=0,this.red=null,M!==null&&((h==="le"||h==="be")&&(y=h,h=10),this._init(M||0,h||10,y||"be"))}typeof t=="object"?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=ft().Buffer}catch{}n.isBN=function(h){return h instanceof n?!0:h!==null&&typeof h=="object"&&h.constructor.wordSize===n.wordSize&&Array.isArray(h.words)},n.max=function(h,y){return h.cmp(y)>0?h:y},n.min=function(h,y){return h.cmp(y)<0?h:y},n.prototype._init=function(h,y,l){if(typeof h=="number")return this._initNumber(h,y,l);if(typeof h=="object")return this._initArray(h,y,l);y==="hex"&&(y=16),r(y===(y|0)&&y>=2&&y<=36),h=h.toString().replace(/\s+/g,"");var o=0;h[0]==="-"&&(o++,this.negative=1),o<h.length&&(y===16?this._parseHex(h,o,l):(this._parseBase(h,y,o),l==="le"&&this._initArray(this.toArray(),y,l)))},n.prototype._initNumber=function(h,y,l){h<0&&(this.negative=1,h=-h),h<67108864?(this.words=[h&67108863],this.length=1):h<4503599627370496?(this.words=[h&67108863,h/67108864&67108863],this.length=2):(r(h<9007199254740992),this.words=[h&67108863,h/67108864&67108863,1],this.length=3),l==="le"&&this._initArray(this.toArray(),y,l)},n.prototype._initArray=function(h,y,l){if(r(typeof h.length=="number"),h.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(h.length/3),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var s,d,g=0;if(l==="be")for(o=h.length-1,s=0;o>=0;o-=3)d=h[o]|h[o-1]<<8|h[o-2]<<16,this.words[s]|=d<<g&67108863,this.words[s+1]=d>>>26-g&67108863,g+=24,g>=26&&(g-=26,s++);else if(l==="le")for(o=0,s=0;o<h.length;o+=3)d=h[o]|h[o+1]<<8|h[o+2]<<16,this.words[s]|=d<<g&67108863,this.words[s+1]=d>>>26-g&67108863,g+=24,g>=26&&(g-=26,s++);return this.strip()};function f(M,h){var y=M.charCodeAt(h);return y>=65&&y<=70?y-55:y>=97&&y<=102?y-87:y-48&15}function v(M,h,y){var l=f(M,y);return y-1>=h&&(l|=f(M,y-1)<<4),l}n.prototype._parseHex=function(h,y,l){this.length=Math.ceil((h.length-y)/6),this.words=new Array(this.length);for(var o=0;o<this.length;o++)this.words[o]=0;var s=0,d=0,g;if(l==="be")for(o=h.length-1;o>=y;o-=2)g=v(h,y,o)<<s,this.words[d]|=g&67108863,s>=18?(s-=18,d+=1,this.words[d]|=g>>>26):s+=8;else{var p=h.length-y;for(o=p%2===0?y+1:y;o<h.length;o+=2)g=v(h,y,o)<<s,this.words[d]|=g&67108863,s>=18?(s-=18,d+=1,this.words[d]|=g>>>26):s+=8}this.strip()};function m(M,h,y,l){for(var o=0,s=Math.min(M.length,y),d=h;d<s;d++){var g=M.charCodeAt(d)-48;o*=l,g>=49?o+=g-49+10:g>=17?o+=g-17+10:o+=g}return o}n.prototype._parseBase=function(h,y,l){this.words=[0],this.length=1;for(var o=0,s=1;s<=67108863;s*=y)o++;o--,s=s/y|0;for(var d=h.length-l,g=d%o,p=Math.min(d,d-g)+l,u=0,w=l;w<p;w+=o)u=m(h,w,w+o,y),this.imuln(s),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(g!==0){var _=1;for(u=m(h,w,h.length,y),w=0;w<g;w++)_*=y;this.imuln(_),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},n.prototype.copy=function(h){h.words=new Array(this.length);for(var y=0;y<this.length;y++)h.words[y]=this.words[y];h.length=this.length,h.negative=this.negative,h.red=this.red},n.prototype.clone=function(){var h=new n(null);return this.copy(h),h},n.prototype._expand=function(h){for(;this.length<h;)this.words[this.length++]=0;return this},n.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var E=["","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"],A=[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],q=[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];n.prototype.toString=function(h,y){h=h||10,y=y|0||1;var l;if(h===16||h==="hex"){l="";for(var o=0,s=0,d=0;d<this.length;d++){var g=this.words[d],p=((g<<o|s)&16777215).toString(16);s=g>>>24-o&16777215,o+=2,o>=26&&(o-=26,d--),s!==0||d!==this.length-1?l=E[6-p.length]+p+l:l=p+l}for(s!==0&&(l=s.toString(16)+l);l.length%y!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}if(h===(h|0)&&h>=2&&h<=36){var u=A[h],w=q[h];l="";var _=this.clone();for(_.negative=0;!_.isZero();){var c=_.modn(w).toString(h);_=_.idivn(w),_.isZero()?l=c+l:l=E[u-c.length]+c+l}for(this.isZero()&&(l="0"+l);l.length%y!==0;)l="0"+l;return this.negative!==0&&(l="-"+l),l}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var h=this.words[0];return this.length===2?h+=this.words[1]*67108864:this.length===3&&this.words[2]===1?h+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-h:h},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(h,y){return r(typeof a<"u"),this.toArrayLike(a,h,y)},n.prototype.toArray=function(h,y){return this.toArrayLike(Array,h,y)},n.prototype.toArrayLike=function(h,y,l){var o=this.byteLength(),s=l||Math.max(1,o);r(o<=s,"byte array longer than desired length"),r(s>0,"Requested array length <= 0"),this.strip();var d=y==="le",g=new h(s),p,u,w=this.clone();if(d){for(u=0;!w.isZero();u++)p=w.andln(255),w.iushrn(8),g[u]=p;for(;u<s;u++)g[u]=0}else{for(u=0;u<s-o;u++)g[u]=0;for(u=0;!w.isZero();u++)p=w.andln(255),w.iushrn(8),g[s-u-1]=p}return g},Math.clz32?n.prototype._countBits=function(h){return 32-Math.clz32(h)}:n.prototype._countBits=function(h){var y=h,l=0;return y>=4096&&(l+=13,y>>>=13),y>=64&&(l+=7,y>>>=7),y>=8&&(l+=4,y>>>=4),y>=2&&(l+=2,y>>>=2),l+y},n.prototype._zeroBits=function(h){if(h===0)return 26;var y=h,l=0;return(y&8191)===0&&(l+=13,y>>>=13),(y&127)===0&&(l+=7,y>>>=7),(y&15)===0&&(l+=4,y>>>=4),(y&3)===0&&(l+=2,y>>>=2),(y&1)===0&&l++,l},n.prototype.bitLength=function(){var h=this.words[this.length-1],y=this._countBits(h);return(this.length-1)*26+y};function I(M){for(var h=new Array(M.bitLength()),y=0;y<h.length;y++){var l=y/26|0,o=y%26;h[y]=(M.words[l]&1<<o)>>>o}return h}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var h=0,y=0;y<this.length;y++){var l=this._zeroBits(this.words[y]);if(h+=l,l!==26)break}return h},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(h){return this.negative!==0?this.abs().inotn(h).iaddn(1):this.clone()},n.prototype.fromTwos=function(h){return this.testn(h-1)?this.notn(h).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(h){for(;this.length<h.length;)this.words[this.length++]=0;for(var y=0;y<h.length;y++)this.words[y]=this.words[y]|h.words[y];return this.strip()},n.prototype.ior=function(h){return r((this.negative|h.negative)===0),this.iuor(h)},n.prototype.or=function(h){return this.length>h.length?this.clone().ior(h):h.clone().ior(this)},n.prototype.uor=function(h){return this.length>h.length?this.clone().iuor(h):h.clone().iuor(this)},n.prototype.iuand=function(h){var y;this.length>h.length?y=h:y=this;for(var l=0;l<y.length;l++)this.words[l]=this.words[l]&h.words[l];return this.length=y.length,this.strip()},n.prototype.iand=function(h){return r((this.negative|h.negative)===0),this.iuand(h)},n.prototype.and=function(h){return this.length>h.length?this.clone().iand(h):h.clone().iand(this)},n.prototype.uand=function(h){return this.length>h.length?this.clone().iuand(h):h.clone().iuand(this)},n.prototype.iuxor=function(h){var y,l;this.length>h.length?(y=this,l=h):(y=h,l=this);for(var o=0;o<l.length;o++)this.words[o]=y.words[o]^l.words[o];if(this!==y)for(;o<y.length;o++)this.words[o]=y.words[o];return this.length=y.length,this.strip()},n.prototype.ixor=function(h){return r((this.negative|h.negative)===0),this.iuxor(h)},n.prototype.xor=function(h){return this.length>h.length?this.clone().ixor(h):h.clone().ixor(this)},n.prototype.uxor=function(h){return this.length>h.length?this.clone().iuxor(h):h.clone().iuxor(this)},n.prototype.inotn=function(h){r(typeof h=="number"&&h>=0);var y=Math.ceil(h/26)|0,l=h%26;this._expand(y),l>0&&y--;for(var o=0;o<y;o++)this.words[o]=~this.words[o]&67108863;return l>0&&(this.words[o]=~this.words[o]&67108863>>26-l),this.strip()},n.prototype.notn=function(h){return this.clone().inotn(h)},n.prototype.setn=function(h,y){r(typeof h=="number"&&h>=0);var l=h/26|0,o=h%26;return this._expand(l+1),y?this.words[l]=this.words[l]|1<<o:this.words[l]=this.words[l]&~(1<<o),this.strip()},n.prototype.iadd=function(h){var y;if(this.negative!==0&&h.negative===0)return this.negative=0,y=this.isub(h),this.negative^=1,this._normSign();if(this.negative===0&&h.negative!==0)return h.negative=0,y=this.isub(h),h.negative=1,y._normSign();var l,o;this.length>h.length?(l=this,o=h):(l=h,o=this);for(var s=0,d=0;d<o.length;d++)y=(l.words[d]|0)+(o.words[d]|0)+s,this.words[d]=y&67108863,s=y>>>26;for(;s!==0&&d<l.length;d++)y=(l.words[d]|0)+s,this.words[d]=y&67108863,s=y>>>26;if(this.length=l.length,s!==0)this.words[this.length]=s,this.length++;else if(l!==this)for(;d<l.length;d++)this.words[d]=l.words[d];return this},n.prototype.add=function(h){var y;return h.negative!==0&&this.negative===0?(h.negative=0,y=this.sub(h),h.negative^=1,y):h.negative===0&&this.negative!==0?(this.negative=0,y=h.sub(this),this.negative=1,y):this.length>h.length?this.clone().iadd(h):h.clone().iadd(this)},n.prototype.isub=function(h){if(h.negative!==0){h.negative=0;var y=this.iadd(h);return h.negative=1,y._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(h),this.negative=1,this._normSign();var l=this.cmp(h);if(l===0)return this.negative=0,this.length=1,this.words[0]=0,this;var o,s;l>0?(o=this,s=h):(o=h,s=this);for(var d=0,g=0;g<s.length;g++)y=(o.words[g]|0)-(s.words[g]|0)+d,d=y>>26,this.words[g]=y&67108863;for(;d!==0&&g<o.length;g++)y=(o.words[g]|0)+d,d=y>>26,this.words[g]=y&67108863;if(d===0&&g<o.length&&o!==this)for(;g<o.length;g++)this.words[g]=o.words[g];return this.length=Math.max(this.length,g),o!==this&&(this.negative=1),this.strip()},n.prototype.sub=function(h){return this.clone().isub(h)};function C(M,h,y){y.negative=h.negative^M.negative;var l=M.length+h.length|0;y.length=l,l=l-1|0;var o=M.words[0]|0,s=h.words[0]|0,d=o*s,g=d&67108863,p=d/67108864|0;y.words[0]=g;for(var u=1;u<l;u++){for(var w=p>>>26,_=p&67108863,c=Math.min(u,h.length-1),x=Math.max(0,u-M.length+1);x<=c;x++){var P=u-x|0;o=M.words[P]|0,s=h.words[x]|0,d=o*s+_,w+=d/67108864|0,_=d&67108863}y.words[u]=_|0,p=w|0}return p!==0?y.words[u]=p|0:y.length--,y.strip()}var j=function(h,y,l){var o=h.words,s=y.words,d=l.words,g=0,p,u,w,_=o[0]|0,c=_&8191,x=_>>>13,P=o[1]|0,N=P&8191,U=P>>>13,W=o[2]|0,K=W&8191,G=W>>>13,It=o[3]|0,Z=It&8191,Y=It>>>13,On=o[4]|0,J=On&8191,Q=On>>>13,Pn=o[5]|0,ee=Pn&8191,te=Pn>>>13,Dn=o[6]|0,re=Dn&8191,ie=Dn>>>13,Un=o[7]|0,ne=Un&8191,ae=Un>>>13,Nn=o[8]|0,oe=Nn&8191,fe=Nn>>>13,Ln=o[9]|0,se=Ln&8191,ue=Ln>>>13,Fn=s[0]|0,he=Fn&8191,le=Fn>>>13,jn=s[1]|0,ce=jn&8191,de=jn>>>13,Hn=s[2]|0,pe=Hn&8191,ve=Hn>>>13,Kn=s[3]|0,ye=Kn&8191,ge=Kn>>>13,Wn=s[4]|0,me=Wn&8191,be=Wn>>>13,zn=s[5]|0,we=zn&8191,_e=zn>>>13,Gn=s[6]|0,xe=Gn&8191,Me=Gn>>>13,Vn=s[7]|0,Ee=Vn&8191,Se=Vn>>>13,$n=s[8]|0,Be=$n&8191,Ae=$n>>>13,Zn=s[9]|0,Re=Zn&8191,qe=Zn>>>13;l.negative=h.negative^y.negative,l.length=19,p=Math.imul(c,he),u=Math.imul(c,le),u=u+Math.imul(x,he)|0,w=Math.imul(x,le);var Li=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Li>>>26)|0,Li&=67108863,p=Math.imul(N,he),u=Math.imul(N,le),u=u+Math.imul(U,he)|0,w=Math.imul(U,le),p=p+Math.imul(c,ce)|0,u=u+Math.imul(c,de)|0,u=u+Math.imul(x,ce)|0,w=w+Math.imul(x,de)|0;var Ge=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Ge>>>26)|0,Ge&=67108863,p=Math.imul(K,he),u=Math.imul(K,le),u=u+Math.imul(G,he)|0,w=Math.imul(G,le),p=p+Math.imul(N,ce)|0,u=u+Math.imul(N,de)|0,u=u+Math.imul(U,ce)|0,w=w+Math.imul(U,de)|0,p=p+Math.imul(c,pe)|0,u=u+Math.imul(c,ve)|0,u=u+Math.imul(x,pe)|0,w=w+Math.imul(x,ve)|0;var Ve=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,p=Math.imul(Z,he),u=Math.imul(Z,le),u=u+Math.imul(Y,he)|0,w=Math.imul(Y,le),p=p+Math.imul(K,ce)|0,u=u+Math.imul(K,de)|0,u=u+Math.imul(G,ce)|0,w=w+Math.imul(G,de)|0,p=p+Math.imul(N,pe)|0,u=u+Math.imul(N,ve)|0,u=u+Math.imul(U,pe)|0,w=w+Math.imul(U,ve)|0,p=p+Math.imul(c,ye)|0,u=u+Math.imul(c,ge)|0,u=u+Math.imul(x,ye)|0,w=w+Math.imul(x,ge)|0;var Kr=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Kr>>>26)|0,Kr&=67108863,p=Math.imul(J,he),u=Math.imul(J,le),u=u+Math.imul(Q,he)|0,w=Math.imul(Q,le),p=p+Math.imul(Z,ce)|0,u=u+Math.imul(Z,de)|0,u=u+Math.imul(Y,ce)|0,w=w+Math.imul(Y,de)|0,p=p+Math.imul(K,pe)|0,u=u+Math.imul(K,ve)|0,u=u+Math.imul(G,pe)|0,w=w+Math.imul(G,ve)|0,p=p+Math.imul(N,ye)|0,u=u+Math.imul(N,ge)|0,u=u+Math.imul(U,ye)|0,w=w+Math.imul(U,ge)|0,p=p+Math.imul(c,me)|0,u=u+Math.imul(c,be)|0,u=u+Math.imul(x,me)|0,w=w+Math.imul(x,be)|0;var Wr=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,p=Math.imul(ee,he),u=Math.imul(ee,le),u=u+Math.imul(te,he)|0,w=Math.imul(te,le),p=p+Math.imul(J,ce)|0,u=u+Math.imul(J,de)|0,u=u+Math.imul(Q,ce)|0,w=w+Math.imul(Q,de)|0,p=p+Math.imul(Z,pe)|0,u=u+Math.imul(Z,ve)|0,u=u+Math.imul(Y,pe)|0,w=w+Math.imul(Y,ve)|0,p=p+Math.imul(K,ye)|0,u=u+Math.imul(K,ge)|0,u=u+Math.imul(G,ye)|0,w=w+Math.imul(G,ge)|0,p=p+Math.imul(N,me)|0,u=u+Math.imul(N,be)|0,u=u+Math.imul(U,me)|0,w=w+Math.imul(U,be)|0,p=p+Math.imul(c,we)|0,u=u+Math.imul(c,_e)|0,u=u+Math.imul(x,we)|0,w=w+Math.imul(x,_e)|0;var zr=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(zr>>>26)|0,zr&=67108863,p=Math.imul(re,he),u=Math.imul(re,le),u=u+Math.imul(ie,he)|0,w=Math.imul(ie,le),p=p+Math.imul(ee,ce)|0,u=u+Math.imul(ee,de)|0,u=u+Math.imul(te,ce)|0,w=w+Math.imul(te,de)|0,p=p+Math.imul(J,pe)|0,u=u+Math.imul(J,ve)|0,u=u+Math.imul(Q,pe)|0,w=w+Math.imul(Q,ve)|0,p=p+Math.imul(Z,ye)|0,u=u+Math.imul(Z,ge)|0,u=u+Math.imul(Y,ye)|0,w=w+Math.imul(Y,ge)|0,p=p+Math.imul(K,me)|0,u=u+Math.imul(K,be)|0,u=u+Math.imul(G,me)|0,w=w+Math.imul(G,be)|0,p=p+Math.imul(N,we)|0,u=u+Math.imul(N,_e)|0,u=u+Math.imul(U,we)|0,w=w+Math.imul(U,_e)|0,p=p+Math.imul(c,xe)|0,u=u+Math.imul(c,Me)|0,u=u+Math.imul(x,xe)|0,w=w+Math.imul(x,Me)|0;var Gr=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,p=Math.imul(ne,he),u=Math.imul(ne,le),u=u+Math.imul(ae,he)|0,w=Math.imul(ae,le),p=p+Math.imul(re,ce)|0,u=u+Math.imul(re,de)|0,u=u+Math.imul(ie,ce)|0,w=w+Math.imul(ie,de)|0,p=p+Math.imul(ee,pe)|0,u=u+Math.imul(ee,ve)|0,u=u+Math.imul(te,pe)|0,w=w+Math.imul(te,ve)|0,p=p+Math.imul(J,ye)|0,u=u+Math.imul(J,ge)|0,u=u+Math.imul(Q,ye)|0,w=w+Math.imul(Q,ge)|0,p=p+Math.imul(Z,me)|0,u=u+Math.imul(Z,be)|0,u=u+Math.imul(Y,me)|0,w=w+Math.imul(Y,be)|0,p=p+Math.imul(K,we)|0,u=u+Math.imul(K,_e)|0,u=u+Math.imul(G,we)|0,w=w+Math.imul(G,_e)|0,p=p+Math.imul(N,xe)|0,u=u+Math.imul(N,Me)|0,u=u+Math.imul(U,xe)|0,w=w+Math.imul(U,Me)|0,p=p+Math.imul(c,Ee)|0,u=u+Math.imul(c,Se)|0,u=u+Math.imul(x,Ee)|0,w=w+Math.imul(x,Se)|0;var Vr=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,p=Math.imul(oe,he),u=Math.imul(oe,le),u=u+Math.imul(fe,he)|0,w=Math.imul(fe,le),p=p+Math.imul(ne,ce)|0,u=u+Math.imul(ne,de)|0,u=u+Math.imul(ae,ce)|0,w=w+Math.imul(ae,de)|0,p=p+Math.imul(re,pe)|0,u=u+Math.imul(re,ve)|0,u=u+Math.imul(ie,pe)|0,w=w+Math.imul(ie,ve)|0,p=p+Math.imul(ee,ye)|0,u=u+Math.imul(ee,ge)|0,u=u+Math.imul(te,ye)|0,w=w+Math.imul(te,ge)|0,p=p+Math.imul(J,me)|0,u=u+Math.imul(J,be)|0,u=u+Math.imul(Q,me)|0,w=w+Math.imul(Q,be)|0,p=p+Math.imul(Z,we)|0,u=u+Math.imul(Z,_e)|0,u=u+Math.imul(Y,we)|0,w=w+Math.imul(Y,_e)|0,p=p+Math.imul(K,xe)|0,u=u+Math.imul(K,Me)|0,u=u+Math.imul(G,xe)|0,w=w+Math.imul(G,Me)|0,p=p+Math.imul(N,Ee)|0,u=u+Math.imul(N,Se)|0,u=u+Math.imul(U,Ee)|0,w=w+Math.imul(U,Se)|0,p=p+Math.imul(c,Be)|0,u=u+Math.imul(c,Ae)|0,u=u+Math.imul(x,Be)|0,w=w+Math.imul(x,Ae)|0;var $r=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+($r>>>26)|0,$r&=67108863,p=Math.imul(se,he),u=Math.imul(se,le),u=u+Math.imul(ue,he)|0,w=Math.imul(ue,le),p=p+Math.imul(oe,ce)|0,u=u+Math.imul(oe,de)|0,u=u+Math.imul(fe,ce)|0,w=w+Math.imul(fe,de)|0,p=p+Math.imul(ne,pe)|0,u=u+Math.imul(ne,ve)|0,u=u+Math.imul(ae,pe)|0,w=w+Math.imul(ae,ve)|0,p=p+Math.imul(re,ye)|0,u=u+Math.imul(re,ge)|0,u=u+Math.imul(ie,ye)|0,w=w+Math.imul(ie,ge)|0,p=p+Math.imul(ee,me)|0,u=u+Math.imul(ee,be)|0,u=u+Math.imul(te,me)|0,w=w+Math.imul(te,be)|0,p=p+Math.imul(J,we)|0,u=u+Math.imul(J,_e)|0,u=u+Math.imul(Q,we)|0,w=w+Math.imul(Q,_e)|0,p=p+Math.imul(Z,xe)|0,u=u+Math.imul(Z,Me)|0,u=u+Math.imul(Y,xe)|0,w=w+Math.imul(Y,Me)|0,p=p+Math.imul(K,Ee)|0,u=u+Math.imul(K,Se)|0,u=u+Math.imul(G,Ee)|0,w=w+Math.imul(G,Se)|0,p=p+Math.imul(N,Be)|0,u=u+Math.imul(N,Ae)|0,u=u+Math.imul(U,Be)|0,w=w+Math.imul(U,Ae)|0,p=p+Math.imul(c,Re)|0,u=u+Math.imul(c,qe)|0,u=u+Math.imul(x,Re)|0,w=w+Math.imul(x,qe)|0;var Zr=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,p=Math.imul(se,ce),u=Math.imul(se,de),u=u+Math.imul(ue,ce)|0,w=Math.imul(ue,de),p=p+Math.imul(oe,pe)|0,u=u+Math.imul(oe,ve)|0,u=u+Math.imul(fe,pe)|0,w=w+Math.imul(fe,ve)|0,p=p+Math.imul(ne,ye)|0,u=u+Math.imul(ne,ge)|0,u=u+Math.imul(ae,ye)|0,w=w+Math.imul(ae,ge)|0,p=p+Math.imul(re,me)|0,u=u+Math.imul(re,be)|0,u=u+Math.imul(ie,me)|0,w=w+Math.imul(ie,be)|0,p=p+Math.imul(ee,we)|0,u=u+Math.imul(ee,_e)|0,u=u+Math.imul(te,we)|0,w=w+Math.imul(te,_e)|0,p=p+Math.imul(J,xe)|0,u=u+Math.imul(J,Me)|0,u=u+Math.imul(Q,xe)|0,w=w+Math.imul(Q,Me)|0,p=p+Math.imul(Z,Ee)|0,u=u+Math.imul(Z,Se)|0,u=u+Math.imul(Y,Ee)|0,w=w+Math.imul(Y,Se)|0,p=p+Math.imul(K,Be)|0,u=u+Math.imul(K,Ae)|0,u=u+Math.imul(G,Be)|0,w=w+Math.imul(G,Ae)|0,p=p+Math.imul(N,Re)|0,u=u+Math.imul(N,qe)|0,u=u+Math.imul(U,Re)|0,w=w+Math.imul(U,qe)|0;var Yr=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Yr>>>26)|0,Yr&=67108863,p=Math.imul(se,pe),u=Math.imul(se,ve),u=u+Math.imul(ue,pe)|0,w=Math.imul(ue,ve),p=p+Math.imul(oe,ye)|0,u=u+Math.imul(oe,ge)|0,u=u+Math.imul(fe,ye)|0,w=w+Math.imul(fe,ge)|0,p=p+Math.imul(ne,me)|0,u=u+Math.imul(ne,be)|0,u=u+Math.imul(ae,me)|0,w=w+Math.imul(ae,be)|0,p=p+Math.imul(re,we)|0,u=u+Math.imul(re,_e)|0,u=u+Math.imul(ie,we)|0,w=w+Math.imul(ie,_e)|0,p=p+Math.imul(ee,xe)|0,u=u+Math.imul(ee,Me)|0,u=u+Math.imul(te,xe)|0,w=w+Math.imul(te,Me)|0,p=p+Math.imul(J,Ee)|0,u=u+Math.imul(J,Se)|0,u=u+Math.imul(Q,Ee)|0,w=w+Math.imul(Q,Se)|0,p=p+Math.imul(Z,Be)|0,u=u+Math.imul(Z,Ae)|0,u=u+Math.imul(Y,Be)|0,w=w+Math.imul(Y,Ae)|0,p=p+Math.imul(K,Re)|0,u=u+Math.imul(K,qe)|0,u=u+Math.imul(G,Re)|0,w=w+Math.imul(G,qe)|0;var Xr=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,p=Math.imul(se,ye),u=Math.imul(se,ge),u=u+Math.imul(ue,ye)|0,w=Math.imul(ue,ge),p=p+Math.imul(oe,me)|0,u=u+Math.imul(oe,be)|0,u=u+Math.imul(fe,me)|0,w=w+Math.imul(fe,be)|0,p=p+Math.imul(ne,we)|0,u=u+Math.imul(ne,_e)|0,u=u+Math.imul(ae,we)|0,w=w+Math.imul(ae,_e)|0,p=p+Math.imul(re,xe)|0,u=u+Math.imul(re,Me)|0,u=u+Math.imul(ie,xe)|0,w=w+Math.imul(ie,Me)|0,p=p+Math.imul(ee,Ee)|0,u=u+Math.imul(ee,Se)|0,u=u+Math.imul(te,Ee)|0,w=w+Math.imul(te,Se)|0,p=p+Math.imul(J,Be)|0,u=u+Math.imul(J,Ae)|0,u=u+Math.imul(Q,Be)|0,w=w+Math.imul(Q,Ae)|0,p=p+Math.imul(Z,Re)|0,u=u+Math.imul(Z,qe)|0,u=u+Math.imul(Y,Re)|0,w=w+Math.imul(Y,qe)|0;var Jr=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,p=Math.imul(se,me),u=Math.imul(se,be),u=u+Math.imul(ue,me)|0,w=Math.imul(ue,be),p=p+Math.imul(oe,we)|0,u=u+Math.imul(oe,_e)|0,u=u+Math.imul(fe,we)|0,w=w+Math.imul(fe,_e)|0,p=p+Math.imul(ne,xe)|0,u=u+Math.imul(ne,Me)|0,u=u+Math.imul(ae,xe)|0,w=w+Math.imul(ae,Me)|0,p=p+Math.imul(re,Ee)|0,u=u+Math.imul(re,Se)|0,u=u+Math.imul(ie,Ee)|0,w=w+Math.imul(ie,Se)|0,p=p+Math.imul(ee,Be)|0,u=u+Math.imul(ee,Ae)|0,u=u+Math.imul(te,Be)|0,w=w+Math.imul(te,Ae)|0,p=p+Math.imul(J,Re)|0,u=u+Math.imul(J,qe)|0,u=u+Math.imul(Q,Re)|0,w=w+Math.imul(Q,qe)|0;var Qr=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,p=Math.imul(se,we),u=Math.imul(se,_e),u=u+Math.imul(ue,we)|0,w=Math.imul(ue,_e),p=p+Math.imul(oe,xe)|0,u=u+Math.imul(oe,Me)|0,u=u+Math.imul(fe,xe)|0,w=w+Math.imul(fe,Me)|0,p=p+Math.imul(ne,Ee)|0,u=u+Math.imul(ne,Se)|0,u=u+Math.imul(ae,Ee)|0,w=w+Math.imul(ae,Se)|0,p=p+Math.imul(re,Be)|0,u=u+Math.imul(re,Ae)|0,u=u+Math.imul(ie,Be)|0,w=w+Math.imul(ie,Ae)|0,p=p+Math.imul(ee,Re)|0,u=u+Math.imul(ee,qe)|0,u=u+Math.imul(te,Re)|0,w=w+Math.imul(te,qe)|0;var ei=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(ei>>>26)|0,ei&=67108863,p=Math.imul(se,xe),u=Math.imul(se,Me),u=u+Math.imul(ue,xe)|0,w=Math.imul(ue,Me),p=p+Math.imul(oe,Ee)|0,u=u+Math.imul(oe,Se)|0,u=u+Math.imul(fe,Ee)|0,w=w+Math.imul(fe,Se)|0,p=p+Math.imul(ne,Be)|0,u=u+Math.imul(ne,Ae)|0,u=u+Math.imul(ae,Be)|0,w=w+Math.imul(ae,Ae)|0,p=p+Math.imul(re,Re)|0,u=u+Math.imul(re,qe)|0,u=u+Math.imul(ie,Re)|0,w=w+Math.imul(ie,qe)|0;var ti=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(ti>>>26)|0,ti&=67108863,p=Math.imul(se,Ee),u=Math.imul(se,Se),u=u+Math.imul(ue,Ee)|0,w=Math.imul(ue,Se),p=p+Math.imul(oe,Be)|0,u=u+Math.imul(oe,Ae)|0,u=u+Math.imul(fe,Be)|0,w=w+Math.imul(fe,Ae)|0,p=p+Math.imul(ne,Re)|0,u=u+Math.imul(ne,qe)|0,u=u+Math.imul(ae,Re)|0,w=w+Math.imul(ae,qe)|0;var ri=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(ri>>>26)|0,ri&=67108863,p=Math.imul(se,Be),u=Math.imul(se,Ae),u=u+Math.imul(ue,Be)|0,w=Math.imul(ue,Ae),p=p+Math.imul(oe,Re)|0,u=u+Math.imul(oe,qe)|0,u=u+Math.imul(fe,Re)|0,w=w+Math.imul(fe,qe)|0;var ii=(g+p|0)+((u&8191)<<13)|0;g=(w+(u>>>13)|0)+(ii>>>26)|0,ii&=67108863,p=Math.imul(se,Re),u=Math.imul(se,qe),u=u+Math.imul(ue,Re)|0,w=Math.imul(ue,qe);var ni=(g+p|0)+((u&8191)<<13)|0;return g=(w+(u>>>13)|0)+(ni>>>26)|0,ni&=67108863,d[0]=Li,d[1]=Ge,d[2]=Ve,d[3]=Kr,d[4]=Wr,d[5]=zr,d[6]=Gr,d[7]=Vr,d[8]=$r,d[9]=Zr,d[10]=Yr,d[11]=Xr,d[12]=Jr,d[13]=Qr,d[14]=ei,d[15]=ti,d[16]=ri,d[17]=ii,d[18]=ni,g!==0&&(d[19]=g,l.length++),l};Math.imul||(j=C);function V(M,h,y){y.negative=h.negative^M.negative,y.length=M.length+h.length;for(var l=0,o=0,s=0;s<y.length-1;s++){var d=o;o=0;for(var g=l&67108863,p=Math.min(s,h.length-1),u=Math.max(0,s-M.length+1);u<=p;u++){var w=s-u,_=M.words[w]|0,c=h.words[u]|0,x=_*c,P=x&67108863;d=d+(x/67108864|0)|0,P=P+g|0,g=P&67108863,d=d+(P>>>26)|0,o+=d>>>26,d&=67108863}y.words[s]=g,l=d,d=o}return l!==0?y.words[s]=l:y.length--,y.strip()}function X(M,h,y){var l=new z;return l.mulp(M,h,y)}n.prototype.mulTo=function(h,y){var l,o=this.length+h.length;return this.length===10&&h.length===10?l=j(this,h,y):o<63?l=C(this,h,y):o<1024?l=V(this,h,y):l=X(this,h,y),l};function z(M,h){this.x=M,this.y=h}z.prototype.makeRBT=function(h){for(var y=new Array(h),l=n.prototype._countBits(h)-1,o=0;o<h;o++)y[o]=this.revBin(o,l,h);return y},z.prototype.revBin=function(h,y,l){if(h===0||h===l-1)return h;for(var o=0,s=0;s<y;s++)o|=(h&1)<<y-s-1,h>>=1;return o},z.prototype.permute=function(h,y,l,o,s,d){for(var g=0;g<d;g++)o[g]=y[h[g]],s[g]=l[h[g]]},z.prototype.transform=function(h,y,l,o,s,d){this.permute(d,h,y,l,o,s);for(var g=1;g<s;g<<=1)for(var p=g<<1,u=Math.cos(2*Math.PI/p),w=Math.sin(2*Math.PI/p),_=0;_<s;_+=p)for(var c=u,x=w,P=0;P<g;P++){var N=l[_+P],U=o[_+P],W=l[_+P+g],K=o[_+P+g],G=c*W-x*K;K=c*K+x*W,W=G,l[_+P]=N+W,o[_+P]=U+K,l[_+P+g]=N-W,o[_+P+g]=U-K,P!==p&&(G=u*c-w*x,x=u*x+w*c,c=G)}},z.prototype.guessLen13b=function(h,y){var l=Math.max(y,h)|1,o=l&1,s=0;for(l=l/2|0;l;l=l>>>1)s++;return 1<<s+1+o},z.prototype.conjugate=function(h,y,l){if(!(l<=1))for(var o=0;o<l/2;o++){var s=h[o];h[o]=h[l-o-1],h[l-o-1]=s,s=y[o],y[o]=-y[l-o-1],y[l-o-1]=-s}},z.prototype.normalize13b=function(h,y){for(var l=0,o=0;o<y/2;o++){var s=Math.round(h[2*o+1]/y)*8192+Math.round(h[2*o]/y)+l;h[o]=s&67108863,s<67108864?l=0:l=s/67108864|0}return h},z.prototype.convert13b=function(h,y,l,o){for(var s=0,d=0;d<y;d++)s=s+(h[d]|0),l[2*d]=s&8191,s=s>>>13,l[2*d+1]=s&8191,s=s>>>13;for(d=2*y;d<o;++d)l[d]=0;r(s===0),r((s&-8192)===0)},z.prototype.stub=function(h){for(var y=new Array(h),l=0;l<h;l++)y[l]=0;return y},z.prototype.mulp=function(h,y,l){var o=2*this.guessLen13b(h.length,y.length),s=this.makeRBT(o),d=this.stub(o),g=new Array(o),p=new Array(o),u=new Array(o),w=new Array(o),_=new Array(o),c=new Array(o),x=l.words;x.length=o,this.convert13b(h.words,h.length,g,o),this.convert13b(y.words,y.length,w,o),this.transform(g,d,p,u,o,s),this.transform(w,d,_,c,o,s);for(var P=0;P<o;P++){var N=p[P]*_[P]-u[P]*c[P];u[P]=p[P]*c[P]+u[P]*_[P],p[P]=N}return this.conjugate(p,u,o),this.transform(p,u,x,d,o,s),this.conjugate(x,d,o),this.normalize13b(x,o),l.negative=h.negative^y.negative,l.length=h.length+y.length,l.strip()},n.prototype.mul=function(h){var y=new n(null);return y.words=new Array(this.length+h.length),this.mulTo(h,y)},n.prototype.mulf=function(h){var y=new n(null);return y.words=new Array(this.length+h.length),X(this,h,y)},n.prototype.imul=function(h){return this.clone().mulTo(h,this)},n.prototype.imuln=function(h){r(typeof h=="number"),r(h<67108864);for(var y=0,l=0;l<this.length;l++){var o=(this.words[l]|0)*h,s=(o&67108863)+(y&67108863);y>>=26,y+=o/67108864|0,y+=s>>>26,this.words[l]=s&67108863}return y!==0&&(this.words[l]=y,this.length++),this.length=h===0?1:this.length,this},n.prototype.muln=function(h){return this.clone().imuln(h)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(h){var y=I(h);if(y.length===0)return new n(1);for(var l=this,o=0;o<y.length&&y[o]===0;o++,l=l.sqr());if(++o<y.length)for(var s=l.sqr();o<y.length;o++,s=s.sqr())y[o]!==0&&(l=l.mul(s));return l},n.prototype.iushln=function(h){r(typeof h=="number"&&h>=0);var y=h%26,l=(h-y)/26,o=67108863>>>26-y<<26-y,s;if(y!==0){var d=0;for(s=0;s<this.length;s++){var g=this.words[s]&o,p=(this.words[s]|0)-g<<y;this.words[s]=p|d,d=g>>>26-y}d&&(this.words[s]=d,this.length++)}if(l!==0){for(s=this.length-1;s>=0;s--)this.words[s+l]=this.words[s];for(s=0;s<l;s++)this.words[s]=0;this.length+=l}return this.strip()},n.prototype.ishln=function(h){return r(this.negative===0),this.iushln(h)},n.prototype.iushrn=function(h,y,l){r(typeof h=="number"&&h>=0);var o;y?o=(y-y%26)/26:o=0;var s=h%26,d=Math.min((h-s)/26,this.length),g=67108863^67108863>>>s<<s,p=l;if(o-=d,o=Math.max(0,o),p){for(var u=0;u<d;u++)p.words[u]=this.words[u];p.length=d}if(d!==0)if(this.length>d)for(this.length-=d,u=0;u<this.length;u++)this.words[u]=this.words[u+d];else this.words[0]=0,this.length=1;var w=0;for(u=this.length-1;u>=0&&(w!==0||u>=o);u--){var _=this.words[u]|0;this.words[u]=w<<26-s|_>>>s,w=_&g}return p&&w!==0&&(p.words[p.length++]=w),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(h,y,l){return r(this.negative===0),this.iushrn(h,y,l)},n.prototype.shln=function(h){return this.clone().ishln(h)},n.prototype.ushln=function(h){return this.clone().iushln(h)},n.prototype.shrn=function(h){return this.clone().ishrn(h)},n.prototype.ushrn=function(h){return this.clone().iushrn(h)},n.prototype.testn=function(h){r(typeof h=="number"&&h>=0);var y=h%26,l=(h-y)/26,o=1<<y;if(this.length<=l)return!1;var s=this.words[l];return!!(s&o)},n.prototype.imaskn=function(h){r(typeof h=="number"&&h>=0);var y=h%26,l=(h-y)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=l)return this;if(y!==0&&l++,this.length=Math.min(l,this.length),y!==0){var o=67108863^67108863>>>y<<y;this.words[this.length-1]&=o}return this.length===0&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.maskn=function(h){return this.clone().imaskn(h)},n.prototype.iaddn=function(h){return r(typeof h=="number"),r(h<67108864),h<0?this.isubn(-h):this.negative!==0?this.length===1&&(this.words[0]|0)<h?(this.words[0]=h-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(h),this.negative=1,this):this._iaddn(h)},n.prototype._iaddn=function(h){this.words[0]+=h;for(var y=0;y<this.length&&this.words[y]>=67108864;y++)this.words[y]-=67108864,y===this.length-1?this.words[y+1]=1:this.words[y+1]++;return this.length=Math.max(this.length,y+1),this},n.prototype.isubn=function(h){if(r(typeof h=="number"),r(h<67108864),h<0)return this.iaddn(-h);if(this.negative!==0)return this.negative=0,this.iaddn(h),this.negative=1,this;if(this.words[0]-=h,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var y=0;y<this.length&&this.words[y]<0;y++)this.words[y]+=67108864,this.words[y+1]-=1;return this.strip()},n.prototype.addn=function(h){return this.clone().iaddn(h)},n.prototype.subn=function(h){return this.clone().isubn(h)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(h,y,l){var o=h.length+l,s;this._expand(o);var d,g=0;for(s=0;s<h.length;s++){d=(this.words[s+l]|0)+g;var p=(h.words[s]|0)*y;d-=p&67108863,g=(d>>26)-(p/67108864|0),this.words[s+l]=d&67108863}for(;s<this.length-l;s++)d=(this.words[s+l]|0)+g,g=d>>26,this.words[s+l]=d&67108863;if(g===0)return this.strip();for(r(g===-1),g=0,s=0;s<this.length;s++)d=-(this.words[s]|0)+g,g=d>>26,this.words[s]=d&67108863;return this.negative=1,this.strip()},n.prototype._wordDiv=function(h,y){var l=this.length-h.length,o=this.clone(),s=h,d=s.words[s.length-1]|0,g=this._countBits(d);l=26-g,l!==0&&(s=s.ushln(l),o.iushln(l),d=s.words[s.length-1]|0);var p=o.length-s.length,u;if(y!=="mod"){u=new n(null),u.length=p+1,u.words=new Array(u.length);for(var w=0;w<u.length;w++)u.words[w]=0}var _=o.clone()._ishlnsubmul(s,1,p);_.negative===0&&(o=_,u&&(u.words[p]=1));for(var c=p-1;c>=0;c--){var x=(o.words[s.length+c]|0)*67108864+(o.words[s.length+c-1]|0);for(x=Math.min(x/d|0,67108863),o._ishlnsubmul(s,x,c);o.negative!==0;)x--,o.negative=0,o._ishlnsubmul(s,1,c),o.isZero()||(o.negative^=1);u&&(u.words[c]=x)}return u&&u.strip(),o.strip(),y!=="div"&&l!==0&&o.iushrn(l),{div:u||null,mod:o}},n.prototype.divmod=function(h,y,l){if(r(!h.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var o,s,d;return this.negative!==0&&h.negative===0?(d=this.neg().divmod(h,y),y!=="mod"&&(o=d.div.neg()),y!=="div"&&(s=d.mod.neg(),l&&s.negative!==0&&s.iadd(h)),{div:o,mod:s}):this.negative===0&&h.negative!==0?(d=this.divmod(h.neg(),y),y!=="mod"&&(o=d.div.neg()),{div:o,mod:d.mod}):(this.negative&h.negative)!==0?(d=this.neg().divmod(h.neg(),y),y!=="div"&&(s=d.mod.neg(),l&&s.negative!==0&&s.isub(h)),{div:d.div,mod:s}):h.length>this.length||this.cmp(h)<0?{div:new n(0),mod:this}:h.length===1?y==="div"?{div:this.divn(h.words[0]),mod:null}:y==="mod"?{div:null,mod:new n(this.modn(h.words[0]))}:{div:this.divn(h.words[0]),mod:new n(this.modn(h.words[0]))}:this._wordDiv(h,y)},n.prototype.div=function(h){return this.divmod(h,"div",!1).div},n.prototype.mod=function(h){return this.divmod(h,"mod",!1).mod},n.prototype.umod=function(h){return this.divmod(h,"mod",!0).mod},n.prototype.divRound=function(h){var y=this.divmod(h);if(y.mod.isZero())return y.div;var l=y.div.negative!==0?y.mod.isub(h):y.mod,o=h.ushrn(1),s=h.andln(1),d=l.cmp(o);return d<0||s===1&&d===0?y.div:y.div.negative!==0?y.div.isubn(1):y.div.iaddn(1)},n.prototype.modn=function(h){r(h<=67108863);for(var y=(1<<26)%h,l=0,o=this.length-1;o>=0;o--)l=(y*l+(this.words[o]|0))%h;return l},n.prototype.idivn=function(h){r(h<=67108863);for(var y=0,l=this.length-1;l>=0;l--){var o=(this.words[l]|0)+y*67108864;this.words[l]=o/h|0,y=o%h}return this.strip()},n.prototype.divn=function(h){return this.clone().idivn(h)},n.prototype.egcd=function(h){r(h.negative===0),r(!h.isZero());var y=this,l=h.clone();y.negative!==0?y=y.umod(h):y=y.clone();for(var o=new n(1),s=new n(0),d=new n(0),g=new n(1),p=0;y.isEven()&&l.isEven();)y.iushrn(1),l.iushrn(1),++p;for(var u=l.clone(),w=y.clone();!y.isZero();){for(var _=0,c=1;(y.words[0]&c)===0&&_<26;++_,c<<=1);if(_>0)for(y.iushrn(_);_-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(u),s.isub(w)),o.iushrn(1),s.iushrn(1);for(var x=0,P=1;(l.words[0]&P)===0&&x<26;++x,P<<=1);if(x>0)for(l.iushrn(x);x-- >0;)(d.isOdd()||g.isOdd())&&(d.iadd(u),g.isub(w)),d.iushrn(1),g.iushrn(1);y.cmp(l)>=0?(y.isub(l),o.isub(d),s.isub(g)):(l.isub(y),d.isub(o),g.isub(s))}return{a:d,b:g,gcd:l.iushln(p)}},n.prototype._invmp=function(h){r(h.negative===0),r(!h.isZero());var y=this,l=h.clone();y.negative!==0?y=y.umod(h):y=y.clone();for(var o=new n(1),s=new n(0),d=l.clone();y.cmpn(1)>0&&l.cmpn(1)>0;){for(var g=0,p=1;(y.words[0]&p)===0&&g<26;++g,p<<=1);if(g>0)for(y.iushrn(g);g-- >0;)o.isOdd()&&o.iadd(d),o.iushrn(1);for(var u=0,w=1;(l.words[0]&w)===0&&u<26;++u,w<<=1);if(u>0)for(l.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(d),s.iushrn(1);y.cmp(l)>=0?(y.isub(l),o.isub(s)):(l.isub(y),s.isub(o))}var _;return y.cmpn(1)===0?_=o:_=s,_.cmpn(0)<0&&_.iadd(h),_},n.prototype.gcd=function(h){if(this.isZero())return h.abs();if(h.isZero())return this.abs();var y=this.clone(),l=h.clone();y.negative=0,l.negative=0;for(var o=0;y.isEven()&&l.isEven();o++)y.iushrn(1),l.iushrn(1);do{for(;y.isEven();)y.iushrn(1);for(;l.isEven();)l.iushrn(1);var s=y.cmp(l);if(s<0){var d=y;y=l,l=d}else if(s===0||l.cmpn(1)===0)break;y.isub(l)}while(!0);return l.iushln(o)},n.prototype.invm=function(h){return this.egcd(h).a.umod(h)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(h){return this.words[0]&h},n.prototype.bincn=function(h){r(typeof h=="number");var y=h%26,l=(h-y)/26,o=1<<y;if(this.length<=l)return this._expand(l+1),this.words[l]|=o,this;for(var s=o,d=l;s!==0&&d<this.length;d++){var g=this.words[d]|0;g+=s,s=g>>>26,g&=67108863,this.words[d]=g}return s!==0&&(this.words[d]=s,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(h){var y=h<0;if(this.negative!==0&&!y)return-1;if(this.negative===0&&y)return 1;this.strip();var l;if(this.length>1)l=1;else{y&&(h=-h),r(h<=67108863,"Number is too big");var o=this.words[0]|0;l=o===h?0:o<h?-1:1}return this.negative!==0?-l|0:l},n.prototype.cmp=function(h){if(this.negative!==0&&h.negative===0)return-1;if(this.negative===0&&h.negative!==0)return 1;var y=this.ucmp(h);return this.negative!==0?-y|0:y},n.prototype.ucmp=function(h){if(this.length>h.length)return 1;if(this.length<h.length)return-1;for(var y=0,l=this.length-1;l>=0;l--){var o=this.words[l]|0,s=h.words[l]|0;if(o!==s){o<s?y=-1:o>s&&(y=1);break}}return y},n.prototype.gtn=function(h){return this.cmpn(h)===1},n.prototype.gt=function(h){return this.cmp(h)===1},n.prototype.gten=function(h){return this.cmpn(h)>=0},n.prototype.gte=function(h){return this.cmp(h)>=0},n.prototype.ltn=function(h){return this.cmpn(h)===-1},n.prototype.lt=function(h){return this.cmp(h)===-1},n.prototype.lten=function(h){return this.cmpn(h)<=0},n.prototype.lte=function(h){return this.cmp(h)<=0},n.prototype.eqn=function(h){return this.cmpn(h)===0},n.prototype.eq=function(h){return this.cmp(h)===0},n.red=function(h){return new F(h)},n.prototype.toRed=function(h){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),h.convertTo(this)._forceRed(h)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(h){return this.red=h,this},n.prototype.forceRed=function(h){return r(!this.red,"Already a number in reduction context"),this._forceRed(h)},n.prototype.redAdd=function(h){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,h)},n.prototype.redIAdd=function(h){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,h)},n.prototype.redSub=function(h){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,h)},n.prototype.redISub=function(h){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,h)},n.prototype.redShl=function(h){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,h)},n.prototype.redMul=function(h){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.mul(this,h)},n.prototype.redIMul=function(h){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,h),this.red.imul(this,h)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(h){return r(this.red&&!h.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,h)};var $={k256:null,p224:null,p192:null,p25519:null};function Le(M,h){this.name=M,this.p=new n(h,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}Le.prototype._tmp=function(){var h=new n(null);return h.words=new Array(Math.ceil(this.n/13)),h},Le.prototype.ireduce=function(h){var y=h,l;do this.split(y,this.tmp),y=this.imulK(y),y=y.iadd(this.tmp),l=y.bitLength();while(l>this.n);var o=l<this.n?-1:y.ucmp(this.p);return o===0?(y.words[0]=0,y.length=1):o>0?y.isub(this.p):y.strip!==void 0?y.strip():y._strip(),y},Le.prototype.split=function(h,y){h.iushrn(this.n,0,y)},Le.prototype.imulK=function(h){return h.imul(this.k)};function k(){Le.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(k,Le),k.prototype.split=function(h,y){for(var l=4194303,o=Math.min(h.length,9),s=0;s<o;s++)y.words[s]=h.words[s];if(y.length=o,h.length<=9){h.words[0]=0,h.length=1;return}var d=h.words[9];for(y.words[y.length++]=d&l,s=10;s<h.length;s++){var g=h.words[s]|0;h.words[s-10]=(g&l)<<4|d>>>22,d=g}d>>>=22,h.words[s-10]=d,d===0&&h.length>10?h.length-=10:h.length-=9},k.prototype.imulK=function(h){h.words[h.length]=0,h.words[h.length+1]=0,h.length+=2;for(var y=0,l=0;l<h.length;l++){var o=h.words[l]|0;y+=o*977,h.words[l]=y&67108863,y=o*64+(y/67108864|0)}return h.words[h.length-1]===0&&(h.length--,h.words[h.length-1]===0&&h.length--),h};function O(){Le.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(O,Le);function D(){Le.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(D,Le);function L(){Le.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(L,Le),L.prototype.imulK=function(h){for(var y=0,l=0;l<h.length;l++){var o=(h.words[l]|0)*19+y,s=o&67108863;o>>>=26,h.words[l]=s,y=o}return y!==0&&(h.words[h.length++]=y),h},n._prime=function(h){if($[h])return $[h];var y;if(h==="k256")y=new k;else if(h==="p224")y=new O;else if(h==="p192")y=new D;else if(h==="p25519")y=new L;else throw new Error("Unknown prime "+h);return $[h]=y,y};function F(M){if(typeof M=="string"){var h=n._prime(M);this.m=h.p,this.prime=h}else r(M.gtn(1),"modulus must be greater than 1"),this.m=M,this.prime=null}F.prototype._verify1=function(h){r(h.negative===0,"red works only with positives"),r(h.red,"red works only with red numbers")},F.prototype._verify2=function(h,y){r((h.negative|y.negative)===0,"red works only with positives"),r(h.red&&h.red===y.red,"red works only with red numbers")},F.prototype.imod=function(h){return this.prime?this.prime.ireduce(h)._forceRed(this):h.umod(this.m)._forceRed(this)},F.prototype.neg=function(h){return h.isZero()?h.clone():this.m.sub(h)._forceRed(this)},F.prototype.add=function(h,y){this._verify2(h,y);var l=h.add(y);return l.cmp(this.m)>=0&&l.isub(this.m),l._forceRed(this)},F.prototype.iadd=function(h,y){this._verify2(h,y);var l=h.iadd(y);return l.cmp(this.m)>=0&&l.isub(this.m),l},F.prototype.sub=function(h,y){this._verify2(h,y);var l=h.sub(y);return l.cmpn(0)<0&&l.iadd(this.m),l._forceRed(this)},F.prototype.isub=function(h,y){this._verify2(h,y);var l=h.isub(y);return l.cmpn(0)<0&&l.iadd(this.m),l},F.prototype.shl=function(h,y){return this._verify1(h),this.imod(h.ushln(y))},F.prototype.imul=function(h,y){return this._verify2(h,y),this.imod(h.imul(y))},F.prototype.mul=function(h,y){return this._verify2(h,y),this.imod(h.mul(y))},F.prototype.isqr=function(h){return this.imul(h,h.clone())},F.prototype.sqr=function(h){return this.mul(h,h)},F.prototype.sqrt=function(h){if(h.isZero())return h.clone();var y=this.m.andln(3);if(r(y%2===1),y===3){var l=this.m.add(new n(1)).iushrn(2);return this.pow(h,l)}for(var o=this.m.subn(1),s=0;!o.isZero()&&o.andln(1)===0;)s++,o.iushrn(1);r(!o.isZero());var d=new n(1).toRed(this),g=d.redNeg(),p=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new n(2*u*u).toRed(this);this.pow(u,p).cmp(g)!==0;)u.redIAdd(g);for(var w=this.pow(u,o),_=this.pow(h,o.addn(1).iushrn(1)),c=this.pow(h,o),x=s;c.cmp(d)!==0;){for(var P=c,N=0;P.cmp(d)!==0;N++)P=P.redSqr();r(N<x);var U=this.pow(w,new n(1).iushln(x-N-1));_=_.redMul(U),w=U.redSqr(),c=c.redMul(w),x=N}return _},F.prototype.invm=function(h){var y=h._invmp(this.m);return y.negative!==0?(y.negative=0,this.imod(y).redNeg()):this.imod(y)},F.prototype.pow=function(h,y){if(y.isZero())return new n(1).toRed(this);if(y.cmpn(1)===0)return h.clone();var l=4,o=new Array(1<<l);o[0]=new n(1).toRed(this),o[1]=h;for(var s=2;s<o.length;s++)o[s]=this.mul(o[s-1],h);var d=o[0],g=0,p=0,u=y.bitLength()%26;for(u===0&&(u=26),s=y.length-1;s>=0;s--){for(var w=y.words[s],_=u-1;_>=0;_--){var c=w>>_&1;if(d!==o[0]&&(d=this.sqr(d)),c===0&&g===0){p=0;continue}g<<=1,g|=c,p++,!(p!==l&&(s!==0||_!==0))&&(d=this.mul(d,o[g]),p=0,g=0)}u=26}return d},F.prototype.convertTo=function(h){var y=h.umod(this.m);return y===h?y.clone():y},F.prototype.convertFrom=function(h){var y=h.clone();return y.red=null,y},n.mont=function(h){return new H(h)};function H(M){F.call(this,M),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(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)}i(H,F),H.prototype.convertTo=function(h){return this.imod(h.ushln(this.shift))},H.prototype.convertFrom=function(h){var y=this.imod(h.mul(this.rinv));return y.red=null,y},H.prototype.imul=function(h,y){if(h.isZero()||y.isZero())return h.words[0]=0,h.length=1,h;var l=h.imul(y),o=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=l.isub(o).iushrn(this.shift),d=s;return s.cmp(this.m)>=0?d=s.isub(this.m):s.cmpn(0)<0&&(d=s.iadd(this.m)),d._forceRed(this)},H.prototype.mul=function(h,y){if(h.isZero()||y.isZero())return new n(0)._forceRed(this);var l=h.mul(y),o=l.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),s=l.isub(o).iushrn(this.shift),d=s;return s.cmp(this.m)>=0?d=s.isub(this.m):s.cmpn(0)<0&&(d=s.iadd(this.m)),d._forceRed(this)},H.prototype.invm=function(h){var y=this.imod(h._invmp(this.m).mul(this.r2));return y._forceRed(this)}})(typeof ps>"u"||ps,Ql)});var Ie=R((vs,t0)=>{b();var to=ft(),Zt=to.Buffer;function e0(t,e){for(var r in t)e[r]=t[r]}Zt.from&&Zt.alloc&&Zt.allocUnsafe&&Zt.allocUnsafeSlow?t0.exports=to:(e0(to,vs),vs.Buffer=si);function si(t,e,r){return Zt(t,e,r)}si.prototype=Object.create(Zt.prototype);e0(Zt,si);si.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return Zt(t,e,r)};si.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=Zt(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};si.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Zt(t)};si.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return to.SlowBuffer(t)}});var ui=R((t7,gs)=>{"use strict";b();var ys=65536,C2=4294967295;function O2(){throw new Error(`Secure random number generation is not supported by this browser.
2
+ Use Chrome, Firefox or Internet Explorer 11`)}var P2=Ie().Buffer,ro=globalThis.crypto||globalThis.msCrypto;ro&&ro.getRandomValues?gs.exports=D2:gs.exports=O2;function D2(t,e){if(t>C2)throw new RangeError("requested too many random bytes");var r=P2.allocUnsafe(t);if(t>0)if(t>ys)for(var i=0;i<t;i+=ys)ro.getRandomValues(r.slice(i,i+ys));else ro.getRandomValues(r);return typeof e=="function"?S.default.nextTick(function(){e(null,r)}):r}});var He=R((i7,ms)=>{b();typeof Object.create=="function"?ms.exports=function(e,r){e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:ms.exports=function(e,r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}});var Gi=R((a7,bs)=>{"use strict";b();var zi=typeof Reflect=="object"?Reflect:null,r0=zi&&typeof zi.apply=="function"?zi.apply:function(e,r,i){return Function.prototype.apply.call(e,r,i)},io;zi&&typeof zi.ownKeys=="function"?io=zi.ownKeys:Object.getOwnPropertySymbols?io=function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:io=function(e){return Object.getOwnPropertyNames(e)};function U2(t){console&&console.warn&&console.warn(t)}var n0=Number.isNaN||function(e){return e!==e};function Fe(){Fe.init.call(this)}bs.exports=Fe;bs.exports.once=j2;Fe.EventEmitter=Fe;Fe.prototype._events=void 0;Fe.prototype._eventsCount=0;Fe.prototype._maxListeners=void 0;var i0=10;function no(t){if(typeof t!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}Object.defineProperty(Fe,"defaultMaxListeners",{enumerable:!0,get:function(){return i0},set:function(t){if(typeof t!="number"||t<0||n0(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");i0=t}});Fe.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};Fe.prototype.setMaxListeners=function(e){if(typeof e!="number"||e<0||n0(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};function a0(t){return t._maxListeners===void 0?Fe.defaultMaxListeners:t._maxListeners}Fe.prototype.getMaxListeners=function(){return a0(this)};Fe.prototype.emit=function(e){for(var r=[],i=1;i<arguments.length;i++)r.push(arguments[i]);var n=e==="error",a=this._events;if(a!==void 0)n=n&&a.error===void 0;else if(!n)return!1;if(n){var f;if(r.length>0&&(f=r[0]),f instanceof Error)throw f;var v=new Error("Unhandled error."+(f?" ("+f.message+")":""));throw v.context=f,v}var m=a[e];if(m===void 0)return!1;if(typeof m=="function")r0(m,this,r);else for(var E=m.length,A=h0(m,E),i=0;i<E;++i)r0(A[i],this,r);return!0};function o0(t,e,r,i){var n,a,f;if(no(r),a=t._events,a===void 0?(a=t._events=Object.create(null),t._eventsCount=0):(a.newListener!==void 0&&(t.emit("newListener",e,r.listener?r.listener:r),a=t._events),f=a[e]),f===void 0)f=a[e]=r,++t._eventsCount;else if(typeof f=="function"?f=a[e]=i?[r,f]:[f,r]:i?f.unshift(r):f.push(r),n=a0(t),n>0&&f.length>n&&!f.warned){f.warned=!0;var v=new Error("Possible EventEmitter memory leak detected. "+f.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");v.name="MaxListenersExceededWarning",v.emitter=t,v.type=e,v.count=f.length,U2(v)}return t}Fe.prototype.addListener=function(e,r){return o0(this,e,r,!1)};Fe.prototype.on=Fe.prototype.addListener;Fe.prototype.prependListener=function(e,r){return o0(this,e,r,!0)};function N2(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f0(t,e,r){var i={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},n=N2.bind(i);return n.listener=r,i.wrapFn=n,n}Fe.prototype.once=function(e,r){return no(r),this.on(e,f0(this,e,r)),this};Fe.prototype.prependOnceListener=function(e,r){return no(r),this.prependListener(e,f0(this,e,r)),this};Fe.prototype.removeListener=function(e,r){var i,n,a,f,v;if(no(r),n=this._events,n===void 0)return this;if(i=n[e],i===void 0)return this;if(i===r||i.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,i.listener||r));else if(typeof i!="function"){for(a=-1,f=i.length-1;f>=0;f--)if(i[f]===r||i[f].listener===r){v=i[f].listener,a=f;break}if(a<0)return this;a===0?i.shift():L2(i,a),i.length===1&&(n[e]=i[0]),n.removeListener!==void 0&&this.emit("removeListener",e,v||r)}return this};Fe.prototype.off=Fe.prototype.removeListener;Fe.prototype.removeAllListeners=function(e){var r,i,n;if(i=this._events,i===void 0)return this;if(i.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):i[e]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete i[e]),this;if(arguments.length===0){var a=Object.keys(i),f;for(n=0;n<a.length;++n)f=a[n],f!=="removeListener"&&this.removeAllListeners(f);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(r=i[e],typeof r=="function")this.removeListener(e,r);else if(r!==void 0)for(n=r.length-1;n>=0;n--)this.removeListener(e,r[n]);return this};function s0(t,e,r){var i=t._events;if(i===void 0)return[];var n=i[e];return n===void 0?[]:typeof n=="function"?r?[n.listener||n]:[n]:r?F2(n):h0(n,n.length)}Fe.prototype.listeners=function(e){return s0(this,e,!0)};Fe.prototype.rawListeners=function(e){return s0(this,e,!1)};Fe.listenerCount=function(t,e){return typeof t.listenerCount=="function"?t.listenerCount(e):u0.call(t,e)};Fe.prototype.listenerCount=u0;function u0(t){var e=this._events;if(e!==void 0){var r=e[t];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}Fe.prototype.eventNames=function(){return this._eventsCount>0?io(this._events):[]};function h0(t,e){for(var r=new Array(e),i=0;i<e;++i)r[i]=t[i];return r}function L2(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}function F2(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}function j2(t,e){return new Promise(function(r,i){function n(f){t.removeListener(e,a),i(f)}function a(){typeof t.removeListener=="function"&&t.removeListener("error",n),r([].slice.call(arguments))}l0(t,e,a,{once:!0}),e!=="error"&&H2(t,n,{once:!0})})}function H2(t,e,r){typeof t.on=="function"&&l0(t,"error",e,r)}function l0(t,e,r,i){if(typeof t.on=="function")i.once?t.once(e,r):t.on(e,r);else if(typeof t.addEventListener=="function")t.addEventListener(e,function n(a){i.once&&t.removeEventListener(e,n),r(a)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t)}});var hi=R((f7,ws)=>{b();typeof Object.create=="function"?ws.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:ws.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var _s=R((u7,c0)=>{b();c0.exports=Gi().EventEmitter});var xs=R((l7,d0)=>{"use strict";b();d0.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},r=Symbol("test"),i=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[r]=n;for(var a in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var f=Object.getOwnPropertySymbols(e);if(f.length!==1||f[0]!==r||!Object.prototype.propertyIsEnumerable.call(e,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var v=Object.getOwnPropertyDescriptor(e,r);if(v.value!==n||v.enumerable!==!0)return!1}return!0}});var Xn=R((d7,p0)=>{"use strict";b();var K2=xs();p0.exports=function(){return K2()&&!!Symbol.toStringTag}});var Ms=R((v7,v0)=>{"use strict";b();v0.exports=Object});var g0=R((g7,y0)=>{"use strict";b();y0.exports=Error});var b0=R((b7,m0)=>{"use strict";b();m0.exports=EvalError});var _0=R((_7,w0)=>{"use strict";b();w0.exports=RangeError});var M0=R((M7,x0)=>{"use strict";b();x0.exports=ReferenceError});var Es=R((S7,E0)=>{"use strict";b();E0.exports=SyntaxError});var li=R((A7,S0)=>{"use strict";b();S0.exports=TypeError});var A0=R((q7,B0)=>{"use strict";b();B0.exports=URIError});var q0=R((k7,R0)=>{"use strict";b();R0.exports=Math.abs});var k0=R((C7,I0)=>{"use strict";b();I0.exports=Math.floor});var C0=R((P7,T0)=>{"use strict";b();T0.exports=Math.max});var P0=R((U7,O0)=>{"use strict";b();O0.exports=Math.min});var U0=R((L7,D0)=>{"use strict";b();D0.exports=Math.pow});var L0=R((j7,N0)=>{"use strict";b();N0.exports=Math.round});var j0=R((K7,F0)=>{"use strict";b();F0.exports=Number.isNaN||function(e){return e!==e}});var K0=R((z7,H0)=>{"use strict";b();var W2=j0();H0.exports=function(e){return W2(e)||e===0?e:e<0?-1:1}});var z0=R((V7,W0)=>{"use strict";b();W0.exports=Object.getOwnPropertyDescriptor});var ci=R((Z7,G0)=>{"use strict";b();var ao=z0();if(ao)try{ao([],"length")}catch{ao=null}G0.exports=ao});var Jn=R((X7,V0)=>{"use strict";b();var oo=Object.defineProperty||!1;if(oo)try{oo({},"a",{value:1})}catch{oo=!1}V0.exports=oo});var Y0=R((Q7,Z0)=>{"use strict";b();var $0=typeof Symbol<"u"&&Symbol,z2=xs();Z0.exports=function(){return typeof $0!="function"||typeof Symbol!="function"||typeof $0("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:z2()}});var Ss=R((tA,X0)=>{"use strict";b();X0.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Bs=R((iA,J0)=>{"use strict";b();var G2=Ms();J0.exports=G2.getPrototypeOf||null});var tc=R((aA,ec)=>{"use strict";b();var V2="Function.prototype.bind called on incompatible ",$2=Object.prototype.toString,Z2=Math.max,Y2="[object Function]",Q0=function(e,r){for(var i=[],n=0;n<e.length;n+=1)i[n]=e[n];for(var a=0;a<r.length;a+=1)i[a+e.length]=r[a];return i},X2=function(e,r){for(var i=[],n=r||0,a=0;n<e.length;n+=1,a+=1)i[a]=e[n];return i},J2=function(t,e){for(var r="",i=0;i<t.length;i+=1)r+=t[i],i+1<t.length&&(r+=e);return r};ec.exports=function(e){var r=this;if(typeof r!="function"||$2.apply(r)!==Y2)throw new TypeError(V2+r);for(var i=X2(arguments,1),n,a=function(){if(this instanceof n){var A=r.apply(this,Q0(i,arguments));return Object(A)===A?A:this}return r.apply(e,Q0(i,arguments))},f=Z2(0,r.length-i.length),v=[],m=0;m<f;m++)v[m]="$"+m;if(n=Function("binder","return function ("+J2(v,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var E=function(){};E.prototype=r.prototype,n.prototype=new E,E.prototype=null}return n}});var Vi=R((fA,rc)=>{"use strict";b();var Q2=tc();rc.exports=Function.prototype.bind||Q2});var fo=R((uA,ic)=>{"use strict";b();ic.exports=Function.prototype.call});var so=R((lA,nc)=>{"use strict";b();nc.exports=Function.prototype.apply});var oc=R((dA,ac)=>{"use strict";b();ac.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var As=R((vA,fc)=>{"use strict";b();var ew=Vi(),tw=so(),rw=fo(),iw=oc();fc.exports=iw||ew.call(rw,tw)});var uo=R((gA,sc)=>{"use strict";b();var nw=Vi(),aw=li(),ow=fo(),fw=As();sc.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new aw("a function is required");return fw(nw,ow,e)}});var pc=R((bA,dc)=>{"use strict";b();var sw=uo(),uc=ci(),lc;try{lc=[].__proto__===Array.prototype}catch(t){if(!t||typeof t!="object"||!("code"in t)||t.code!=="ERR_PROTO_ACCESS")throw t}var Rs=!!lc&&uc&&uc(Object.prototype,"__proto__"),cc=Object,hc=cc.getPrototypeOf;dc.exports=Rs&&typeof Rs.get=="function"?sw([Rs.get]):typeof hc=="function"?function(e){return hc(e==null?e:cc(e))}:!1});var ho=R((_A,mc)=>{"use strict";b();var vc=Ss(),yc=Bs(),gc=pc();mc.exports=vc?function(e){return vc(e)}:yc?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return yc(e)}:gc?function(e){return gc(e)}:null});var qs=R((MA,bc)=>{"use strict";b();var uw=Function.prototype.call,hw=Object.prototype.hasOwnProperty,lw=Vi();bc.exports=lw.call(uw,hw)});var Ts=R((SA,Sc)=>{"use strict";b();var Ce,cw=Ms(),dw=g0(),pw=b0(),vw=_0(),yw=M0(),Xi=Es(),Yi=li(),gw=A0(),mw=q0(),bw=k0(),ww=C0(),_w=P0(),xw=U0(),Mw=L0(),Ew=K0(),Mc=Function,Is=function(t){try{return Mc('"use strict"; return ('+t+").constructor;")()}catch{}},Qn=ci(),Sw=Jn(),ks=function(){throw new Yi},Bw=Qn?(function(){try{return arguments.callee,ks}catch{try{return Qn(arguments,"callee").get}catch{return ks}}})():ks,$i=Y0()(),it=ho(),Aw=Bs(),Rw=Ss(),Ec=so(),ea=fo(),Zi={},qw=typeof Uint8Array>"u"||!it?Ce:it(Uint8Array),di={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Ce:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Ce:ArrayBuffer,"%ArrayIteratorPrototype%":$i&&it?it([][Symbol.iterator]()):Ce,"%AsyncFromSyncIteratorPrototype%":Ce,"%AsyncFunction%":Zi,"%AsyncGenerator%":Zi,"%AsyncGeneratorFunction%":Zi,"%AsyncIteratorPrototype%":Zi,"%Atomics%":typeof Atomics>"u"?Ce:Atomics,"%BigInt%":typeof BigInt>"u"?Ce:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Ce:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Ce:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Ce:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":dw,"%eval%":eval,"%EvalError%":pw,"%Float16Array%":typeof Float16Array>"u"?Ce:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Ce:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Ce:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Ce:FinalizationRegistry,"%Function%":Mc,"%GeneratorFunction%":Zi,"%Int8Array%":typeof Int8Array>"u"?Ce:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Ce:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Ce:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":$i&&it?it(it([][Symbol.iterator]())):Ce,"%JSON%":typeof JSON=="object"?JSON:Ce,"%Map%":typeof Map>"u"?Ce:Map,"%MapIteratorPrototype%":typeof Map>"u"||!$i||!it?Ce:it(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":cw,"%Object.getOwnPropertyDescriptor%":Qn,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Ce:Promise,"%Proxy%":typeof Proxy>"u"?Ce:Proxy,"%RangeError%":vw,"%ReferenceError%":yw,"%Reflect%":typeof Reflect>"u"?Ce:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Ce:Set,"%SetIteratorPrototype%":typeof Set>"u"||!$i||!it?Ce:it(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Ce:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":$i&&it?it(""[Symbol.iterator]()):Ce,"%Symbol%":$i?Symbol:Ce,"%SyntaxError%":Xi,"%ThrowTypeError%":Bw,"%TypedArray%":qw,"%TypeError%":Yi,"%Uint8Array%":typeof Uint8Array>"u"?Ce:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Ce:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Ce:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Ce:Uint32Array,"%URIError%":gw,"%WeakMap%":typeof WeakMap>"u"?Ce:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Ce:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Ce:WeakSet,"%Function.prototype.call%":ea,"%Function.prototype.apply%":Ec,"%Object.defineProperty%":Sw,"%Object.getPrototypeOf%":Aw,"%Math.abs%":mw,"%Math.floor%":bw,"%Math.max%":ww,"%Math.min%":_w,"%Math.pow%":xw,"%Math.round%":Mw,"%Math.sign%":Ew,"%Reflect.getPrototypeOf%":Rw};if(it)try{null.error}catch(t){wc=it(it(t)),di["%Error.prototype%"]=wc}var wc,Iw=function t(e){var r;if(e==="%AsyncFunction%")r=Is("async function () {}");else if(e==="%GeneratorFunction%")r=Is("function* () {}");else if(e==="%AsyncGeneratorFunction%")r=Is("async function* () {}");else if(e==="%AsyncGenerator%"){var i=t("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=t("%AsyncGenerator%");n&&it&&(r=it(n.prototype))}return di[e]=r,r},_c={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},ta=Vi(),lo=qs(),kw=ta.call(ea,Array.prototype.concat),Tw=ta.call(Ec,Array.prototype.splice),xc=ta.call(ea,String.prototype.replace),co=ta.call(ea,String.prototype.slice),Cw=ta.call(ea,RegExp.prototype.exec),Ow=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Pw=/\\(\\)?/g,Dw=function(e){var r=co(e,0,1),i=co(e,-1);if(r==="%"&&i!=="%")throw new Xi("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&r!=="%")throw new Xi("invalid intrinsic syntax, expected opening `%`");var n=[];return xc(e,Ow,function(a,f,v,m){n[n.length]=v?xc(m,Pw,"$1"):f||a}),n},Uw=function(e,r){var i=e,n;if(lo(_c,i)&&(n=_c[i],i="%"+n[0]+"%"),lo(di,i)){var a=di[i];if(a===Zi&&(a=Iw(i)),typeof a>"u"&&!r)throw new Yi("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:a}}throw new Xi("intrinsic "+e+" does not exist!")};Sc.exports=function(e,r){if(typeof e!="string"||e.length===0)throw new Yi("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Yi('"allowMissing" argument must be a boolean');if(Cw(/^%?[^%]*%?$/,e)===null)throw new Xi("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var i=Dw(e),n=i.length>0?i[0]:"",a=Uw("%"+n+"%",r),f=a.name,v=a.value,m=!1,E=a.alias;E&&(n=E[0],Tw(i,kw([0,1],E)));for(var A=1,q=!0;A<i.length;A+=1){var I=i[A],C=co(I,0,1),j=co(I,-1);if((C==='"'||C==="'"||C==="`"||j==='"'||j==="'"||j==="`")&&C!==j)throw new Xi("property names with quotes must have matching quotes");if((I==="constructor"||!q)&&(m=!0),n+="."+I,f="%"+n+"%",lo(di,f))v=di[f];else if(v!=null){if(!(I in v)){if(!r)throw new Yi("base intrinsic for "+e+" exists, but the property is not available.");return}if(Qn&&A+1>=i.length){var V=Qn(v,I);q=!!V,q&&"get"in V&&!("originalValue"in V.get)?v=V.get:v=v[I]}else q=lo(v,I),v=v[I];q&&!m&&(di[f]=v)}}return v}});var pi=R((AA,Rc)=>{"use strict";b();var Bc=Ts(),Ac=uo(),Nw=Ac([Bc("%String.prototype.indexOf%")]);Rc.exports=function(e,r){var i=Bc(e,!!r);return typeof i=="function"&&Nw(e,".prototype.")>-1?Ac([i]):i}});var kc=R((qA,Ic)=>{"use strict";b();var Lw=Xn()(),Fw=pi(),Cs=Fw("Object.prototype.toString"),po=function(e){return Lw&&e&&typeof e=="object"&&Symbol.toStringTag in e?!1:Cs(e)==="[object Arguments]"},qc=function(e){return po(e)?!0:e!==null&&typeof e=="object"&&"length"in e&&typeof e.length=="number"&&e.length>=0&&Cs(e)!=="[object Array]"&&"callee"in e&&Cs(e.callee)==="[object Function]"},jw=(function(){return po(arguments)})();po.isLegacyArguments=qc;Ic.exports=jw?po:qc});var Uc=R((kA,Dc)=>{"use strict";b();var Tc=pi(),Hw=Xn()(),Kw=qs(),Ww=ci(),Ds;Hw?(Cc=Tc("RegExp.prototype.exec"),Os={},vo=function(){throw Os},Ps={toString:vo,valueOf:vo},typeof Symbol.toPrimitive=="symbol"&&(Ps[Symbol.toPrimitive]=vo),Ds=function(e){if(!e||typeof e!="object")return!1;var r=Ww(e,"lastIndex"),i=r&&Kw(r,"value");if(!i)return!1;try{Cc(e,Ps)}catch(n){return n===Os}}):(Oc=Tc("Object.prototype.toString"),Pc="[object RegExp]",Ds=function(e){return!e||typeof e!="object"&&typeof e!="function"?!1:Oc(e)===Pc});var Cc,Os,vo,Ps,Oc,Pc;Dc.exports=Ds});var Lc=R((CA,Nc)=>{"use strict";b();var zw=pi(),Gw=Uc(),Vw=zw("RegExp.prototype.exec"),$w=li();Nc.exports=function(e){if(!Gw(e))throw new $w("`regex` must be a RegExp");return function(i){return Vw(e,i)!==null}}});var jc=R((PA,Fc)=>{"use strict";b();var Zw=function*(){}.constructor;Fc.exports=()=>Zw});var zc=R((UA,Wc)=>{"use strict";b();var Kc=pi(),Yw=Lc(),Xw=Yw(/^\s*(?:function)?\*/),Jw=Xn()(),Hc=ho(),Qw=Kc("Object.prototype.toString"),e_=Kc("Function.prototype.toString"),t_=jc();Wc.exports=function(e){if(typeof e!="function")return!1;if(Xw(e_(e)))return!0;if(!Jw){var r=Qw(e);return r==="[object GeneratorFunction]"}if(!Hc)return!1;var i=t_();return i&&Hc(e)===i.prototype}});var Zc=R((LA,$c)=>{"use strict";b();var Vc=Function.prototype.toString,Ji=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Ns,yo;if(typeof Ji=="function"&&typeof Object.defineProperty=="function")try{Ns=Object.defineProperty({},"length",{get:function(){throw yo}}),yo={},Ji(function(){throw 42},null,Ns)}catch(t){t!==yo&&(Ji=null)}else Ji=null;var r_=/^\s*class\b/,Ls=function(e){try{var r=Vc.call(e);return r_.test(r)}catch{return!1}},Us=function(e){try{return Ls(e)?!1:(Vc.call(e),!0)}catch{return!1}},go=Object.prototype.toString,i_="[object Object]",n_="[object Function]",a_="[object GeneratorFunction]",o_="[object HTMLAllCollection]",f_="[object HTML document.all class]",s_="[object HTMLCollection]",u_=typeof Symbol=="function"&&!!Symbol.toStringTag,h_=!(0 in[,]),Fs=function(){return!1};typeof document=="object"&&(Gc=document.all,go.call(Gc)===go.call(document.all)&&(Fs=function(e){if((h_||!e)&&(typeof e>"u"||typeof e=="object"))try{var r=go.call(e);return(r===o_||r===f_||r===s_||r===i_)&&e("")==null}catch{}return!1}));var Gc;$c.exports=Ji?function(e){if(Fs(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{Ji(e,null,Ns)}catch(r){if(r!==yo)return!1}return!Ls(e)&&Us(e)}:function(e){if(Fs(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(u_)return Us(e);if(Ls(e))return!1;var r=go.call(e);return r!==n_&&r!==a_&&!/^\[object HTML/.test(r)?!1:Us(e)}});var Jc=R((jA,Xc)=>{"use strict";b();var l_=Zc(),c_=Object.prototype.toString,Yc=Object.prototype.hasOwnProperty,d_=function(e,r,i){for(var n=0,a=e.length;n<a;n++)Yc.call(e,n)&&(i==null?r(e[n],n,e):r.call(i,e[n],n,e))},p_=function(e,r,i){for(var n=0,a=e.length;n<a;n++)i==null?r(e.charAt(n),n,e):r.call(i,e.charAt(n),n,e)},v_=function(e,r,i){for(var n in e)Yc.call(e,n)&&(i==null?r(e[n],n,e):r.call(i,e[n],n,e))};function y_(t){return c_.call(t)==="[object Array]"}Xc.exports=function(e,r,i){if(!l_(r))throw new TypeError("iterator must be a function");var n;arguments.length>=3&&(n=i),y_(e)?d_(e,r,n):typeof e=="string"?p_(e,r,n):v_(e,r,n)}});var ed=R((KA,Qc)=>{"use strict";b();Qc.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var rd=R((zA,td)=>{"use strict";b();var js=ed(),g_=globalThis;td.exports=function(){for(var e=[],r=0;r<js.length;r++)typeof g_[js[r]]=="function"&&(e[e.length]=js[r]);return e}});var od=R((VA,ad)=>{"use strict";b();var id=Jn(),m_=Es(),Qi=li(),nd=ci();ad.exports=function(e,r,i){if(!e||typeof e!="object"&&typeof e!="function")throw new Qi("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Qi("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Qi("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Qi("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Qi("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Qi("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,v=arguments.length>6?arguments[6]:!1,m=!!nd&&nd(e,r);if(id)id(e,r,{configurable:f===null&&m?m.configurable:!f,enumerable:n===null&&m?m.enumerable:!n,value:i,writable:a===null&&m?m.writable:!a});else if(v||!n&&!a&&!f)e[r]=i;else throw new m_("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var ud=R((ZA,sd)=>{"use strict";b();var Hs=Jn(),fd=function(){return!!Hs};fd.hasArrayLengthDefineBug=function(){if(!Hs)return null;try{return Hs([],"length",{value:1}).length!==1}catch{return!0}};sd.exports=fd});var pd=R((XA,dd)=>{"use strict";b();var b_=Ts(),hd=od(),w_=ud()(),ld=ci(),cd=li(),__=b_("%Math.floor%");dd.exports=function(e,r){if(typeof e!="function")throw new cd("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||__(r)!==r)throw new cd("`length` must be a positive 32-bit integer");var i=arguments.length>2&&!!arguments[2],n=!0,a=!0;if("length"in e&&ld){var f=ld(e,"length");f&&!f.configurable&&(n=!1),f&&!f.writable&&(a=!1)}return(n||a||!i)&&(w_?hd(e,"length",r,!0,!0):hd(e,"length",r)),e}});var yd=R((QA,vd)=>{"use strict";b();var x_=Vi(),M_=so(),E_=As();vd.exports=function(){return E_(x_,M_,arguments)}});var bd=R((t9,mo)=>{"use strict";b();var S_=pd(),gd=Jn(),B_=uo(),md=yd();mo.exports=function(e){var r=B_(arguments),i=1+e.length-(arguments.length-1);return S_(r,i>0?i:0,!0)};gd?gd(mo.exports,"apply",{value:md}):mo.exports.apply=md});var Gs=R((i9,Md)=>{"use strict";b();var _o=Jc(),A_=rd(),wd=bd(),Ws=pi(),wo=ci(),bo=ho(),R_=Ws("Object.prototype.toString"),xd=Xn()(),_d=globalThis,Ks=A_(),zs=Ws("String.prototype.slice"),q_=Ws("Array.prototype.indexOf",!0)||function(e,r){for(var i=0;i<e.length;i+=1)if(e[i]===r)return i;return-1},xo={__proto__:null};xd&&wo&&bo?_o(Ks,function(t){var e=new _d[t];if(Symbol.toStringTag in e&&bo){var r=bo(e),i=wo(r,Symbol.toStringTag);if(!i&&r){var n=bo(r);i=wo(n,Symbol.toStringTag)}if(i&&i.get){var a=wd(i.get);xo["$"+t]=a}}}):_o(Ks,function(t){var e=new _d[t],r=e.slice||e.set;if(r){var i=wd(r);xo["$"+t]=i}});var I_=function(e){var r=!1;return _o(xo,function(i,n){if(!r)try{"$"+i(e)===n&&(r=zs(n,1))}catch{}}),r},k_=function(e){var r=!1;return _o(xo,function(i,n){if(!r)try{i(e),r=zs(n,1)}catch{}}),r};Md.exports=function(e){if(!e||typeof e!="object")return!1;if(!xd){var r=zs(R_(e),8,-1);return q_(Ks,r)>-1?r:r!=="Object"?!1:k_(e)}return wo?I_(e):null}});var Vs=R((a9,Ed)=>{"use strict";b();var T_=Gs();Ed.exports=function(e){return!!T_(e)}});var Nd=R(Oe=>{"use strict";b();var C_=kc(),O_=zc(),kt=Gs(),Sd=Vs();function en(t){return t.call.bind(t)}var Bd=typeof BigInt<"u",Ad=typeof Symbol<"u",_t=en(Object.prototype.toString),P_=en(Number.prototype.valueOf),D_=en(String.prototype.valueOf),U_=en(Boolean.prototype.valueOf);Bd&&(Rd=en(BigInt.prototype.valueOf));var Rd;Ad&&(qd=en(Symbol.prototype.valueOf));var qd;function ia(t,e){if(typeof t!="object")return!1;try{return e(t),!0}catch{return!1}}Oe.isArgumentsObject=C_;Oe.isGeneratorFunction=O_;Oe.isTypedArray=Sd;function N_(t){return typeof Promise<"u"&&t instanceof Promise||t!==null&&typeof t=="object"&&typeof t.then=="function"&&typeof t.catch=="function"}Oe.isPromise=N_;function L_(t){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(t):Sd(t)||kd(t)}Oe.isArrayBufferView=L_;function F_(t){return kt(t)==="Uint8Array"}Oe.isUint8Array=F_;function j_(t){return kt(t)==="Uint8ClampedArray"}Oe.isUint8ClampedArray=j_;function H_(t){return kt(t)==="Uint16Array"}Oe.isUint16Array=H_;function K_(t){return kt(t)==="Uint32Array"}Oe.isUint32Array=K_;function W_(t){return kt(t)==="Int8Array"}Oe.isInt8Array=W_;function z_(t){return kt(t)==="Int16Array"}Oe.isInt16Array=z_;function G_(t){return kt(t)==="Int32Array"}Oe.isInt32Array=G_;function V_(t){return kt(t)==="Float32Array"}Oe.isFloat32Array=V_;function $_(t){return kt(t)==="Float64Array"}Oe.isFloat64Array=$_;function Z_(t){return kt(t)==="BigInt64Array"}Oe.isBigInt64Array=Z_;function Y_(t){return kt(t)==="BigUint64Array"}Oe.isBigUint64Array=Y_;function Mo(t){return _t(t)==="[object Map]"}Mo.working=typeof Map<"u"&&Mo(new Map);function X_(t){return typeof Map>"u"?!1:Mo.working?Mo(t):t instanceof Map}Oe.isMap=X_;function Eo(t){return _t(t)==="[object Set]"}Eo.working=typeof Set<"u"&&Eo(new Set);function J_(t){return typeof Set>"u"?!1:Eo.working?Eo(t):t instanceof Set}Oe.isSet=J_;function So(t){return _t(t)==="[object WeakMap]"}So.working=typeof WeakMap<"u"&&So(new WeakMap);function Q_(t){return typeof WeakMap>"u"?!1:So.working?So(t):t instanceof WeakMap}Oe.isWeakMap=Q_;function Zs(t){return _t(t)==="[object WeakSet]"}Zs.working=typeof WeakSet<"u"&&Zs(new WeakSet);function ex(t){return Zs(t)}Oe.isWeakSet=ex;function Bo(t){return _t(t)==="[object ArrayBuffer]"}Bo.working=typeof ArrayBuffer<"u"&&Bo(new ArrayBuffer);function Id(t){return typeof ArrayBuffer>"u"?!1:Bo.working?Bo(t):t instanceof ArrayBuffer}Oe.isArrayBuffer=Id;function Ao(t){return _t(t)==="[object DataView]"}Ao.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&Ao(new DataView(new ArrayBuffer(1),0,1));function kd(t){return typeof DataView>"u"?!1:Ao.working?Ao(t):t instanceof DataView}Oe.isDataView=kd;var $s=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ra(t){return _t(t)==="[object SharedArrayBuffer]"}function Td(t){return typeof $s>"u"?!1:(typeof ra.working>"u"&&(ra.working=ra(new $s)),ra.working?ra(t):t instanceof $s)}Oe.isSharedArrayBuffer=Td;function tx(t){return _t(t)==="[object AsyncFunction]"}Oe.isAsyncFunction=tx;function rx(t){return _t(t)==="[object Map Iterator]"}Oe.isMapIterator=rx;function ix(t){return _t(t)==="[object Set Iterator]"}Oe.isSetIterator=ix;function nx(t){return _t(t)==="[object Generator]"}Oe.isGeneratorObject=nx;function ax(t){return _t(t)==="[object WebAssembly.Module]"}Oe.isWebAssemblyCompiledModule=ax;function Cd(t){return ia(t,P_)}Oe.isNumberObject=Cd;function Od(t){return ia(t,D_)}Oe.isStringObject=Od;function Pd(t){return ia(t,U_)}Oe.isBooleanObject=Pd;function Dd(t){return Bd&&ia(t,Rd)}Oe.isBigIntObject=Dd;function Ud(t){return Ad&&ia(t,qd)}Oe.isSymbolObject=Ud;function ox(t){return Cd(t)||Od(t)||Pd(t)||Dd(t)||Ud(t)}Oe.isBoxedPrimitive=ox;function fx(t){return typeof Uint8Array<"u"&&(Id(t)||Td(t))}Oe.isAnyArrayBuffer=fx;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(t){Object.defineProperty(Oe,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})})});var Fd=R((u9,Ld)=>{b();Ld.exports=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}});var oa=R(Pe=>{b();var jd=Object.getOwnPropertyDescriptors||function(e){for(var r=Object.keys(e),i={},n=0;n<r.length;n++)i[r[n]]=Object.getOwnPropertyDescriptor(e,r[n]);return i},sx=/%[sdj%]/g;Pe.format=function(t){if(!Oo(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(kr(arguments[r]));return e.join(" ")}for(var r=1,i=arguments,n=i.length,a=String(t).replace(sx,function(v){if(v==="%%")return"%";if(r>=n)return v;switch(v){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch{return"[Circular]"}default:return v}}),f=i[r];r<n;f=i[++r])Co(f)||!tn(f)?a+=" "+f:a+=" "+kr(f);return a};Pe.deprecate=function(t,e){if(typeof S.default<"u"&&S.default.noDeprecation===!0)return t;if(typeof S.default>"u")return function(){return Pe.deprecate(t,e).apply(this,arguments)};var r=!1;function i(){if(!r){if(S.default.throwDeprecation)throw new Error(e);S.default.traceDeprecation?console.trace(e):console.error(e),r=!0}return t.apply(this,arguments)}return i};var Ro={},Hd=/^$/;S.default.env.NODE_DEBUG&&(qo=S.default.env.NODE_DEBUG,qo=qo.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),Hd=new RegExp("^"+qo+"$","i"));var qo;Pe.debuglog=function(t){if(t=t.toUpperCase(),!Ro[t])if(Hd.test(t)){var e=S.default.pid;Ro[t]=function(){var r=Pe.format.apply(Pe,arguments);console.error("%s %d: %s",t,e,r)}}else Ro[t]=function(){};return Ro[t]};function kr(t,e){var r={seen:[],stylize:hx};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Qs(e)?r.showHidden=e:e&&Pe._extend(r,e),yi(r.showHidden)&&(r.showHidden=!1),yi(r.depth)&&(r.depth=2),yi(r.colors)&&(r.colors=!1),yi(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=ux),ko(r,t,r.depth)}Pe.inspect=kr;kr.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]};kr.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function ux(t,e){var r=kr.styles[e];return r?"\x1B["+kr.colors[r][0]+"m"+t+"\x1B["+kr.colors[r][1]+"m":t}function hx(t,e){return t}function lx(t){var e={};return t.forEach(function(r,i){e[r]=!0}),e}function ko(t,e,r){if(t.customInspect&&e&&Io(e.inspect)&&e.inspect!==Pe.inspect&&!(e.constructor&&e.constructor.prototype===e)){var i=e.inspect(r,t);return Oo(i)||(i=ko(t,i,r)),i}var n=cx(t,e);if(n)return n;var a=Object.keys(e),f=lx(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(e)),aa(e)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return Ys(e);if(a.length===0){if(Io(e)){var v=e.name?": "+e.name:"";return t.stylize("[Function"+v+"]","special")}if(na(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(To(e))return t.stylize(Date.prototype.toString.call(e),"date");if(aa(e))return Ys(e)}var m="",E=!1,A=["{","}"];if(Kd(e)&&(E=!0,A=["[","]"]),Io(e)){var q=e.name?": "+e.name:"";m=" [Function"+q+"]"}if(na(e)&&(m=" "+RegExp.prototype.toString.call(e)),To(e)&&(m=" "+Date.prototype.toUTCString.call(e)),aa(e)&&(m=" "+Ys(e)),a.length===0&&(!E||e.length==0))return A[0]+m+A[1];if(r<0)return na(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special");t.seen.push(e);var I;return E?I=dx(t,e,r,f,a):I=a.map(function(C){return Js(t,e,r,f,C,E)}),t.seen.pop(),px(I,m,A)}function cx(t,e){if(yi(e))return t.stylize("undefined","undefined");if(Oo(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(Wd(e))return t.stylize(""+e,"number");if(Qs(e))return t.stylize(""+e,"boolean");if(Co(e))return t.stylize("null","null")}function Ys(t){return"["+Error.prototype.toString.call(t)+"]"}function dx(t,e,r,i,n){for(var a=[],f=0,v=e.length;f<v;++f)zd(e,String(f))?a.push(Js(t,e,r,i,String(f),!0)):a.push("");return n.forEach(function(m){m.match(/^\d+$/)||a.push(Js(t,e,r,i,m,!0))}),a}function Js(t,e,r,i,n,a){var f,v,m;if(m=Object.getOwnPropertyDescriptor(e,n)||{value:e[n]},m.get?m.set?v=t.stylize("[Getter/Setter]","special"):v=t.stylize("[Getter]","special"):m.set&&(v=t.stylize("[Setter]","special")),zd(i,n)||(f="["+n+"]"),v||(t.seen.indexOf(m.value)<0?(Co(r)?v=ko(t,m.value,null):v=ko(t,m.value,r-1),v.indexOf(`
3
+ `)>-1&&(a?v=v.split(`
4
+ `).map(function(E){return" "+E}).join(`
5
+ `).slice(2):v=`
6
+ `+v.split(`
7
+ `).map(function(E){return" "+E}).join(`
8
+ `))):v=t.stylize("[Circular]","special")),yi(f)){if(a&&n.match(/^\d+$/))return v;f=JSON.stringify(""+n),f.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(f=f.slice(1,-1),f=t.stylize(f,"name")):(f=f.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),f=t.stylize(f,"string"))}return f+": "+v}function px(t,e,r){var i=0,n=t.reduce(function(a,f){return i++,f.indexOf(`
9
+ `)>=0&&i++,a+f.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(e===""?"":e+`
10
+ `)+" "+t.join(`,
11
+ `)+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}Pe.types=Nd();function Kd(t){return Array.isArray(t)}Pe.isArray=Kd;function Qs(t){return typeof t=="boolean"}Pe.isBoolean=Qs;function Co(t){return t===null}Pe.isNull=Co;function vx(t){return t==null}Pe.isNullOrUndefined=vx;function Wd(t){return typeof t=="number"}Pe.isNumber=Wd;function Oo(t){return typeof t=="string"}Pe.isString=Oo;function yx(t){return typeof t=="symbol"}Pe.isSymbol=yx;function yi(t){return t===void 0}Pe.isUndefined=yi;function na(t){return tn(t)&&eu(t)==="[object RegExp]"}Pe.isRegExp=na;Pe.types.isRegExp=na;function tn(t){return typeof t=="object"&&t!==null}Pe.isObject=tn;function To(t){return tn(t)&&eu(t)==="[object Date]"}Pe.isDate=To;Pe.types.isDate=To;function aa(t){return tn(t)&&(eu(t)==="[object Error]"||t instanceof Error)}Pe.isError=aa;Pe.types.isNativeError=aa;function Io(t){return typeof t=="function"}Pe.isFunction=Io;function gx(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}Pe.isPrimitive=gx;Pe.isBuffer=Fd();function eu(t){return Object.prototype.toString.call(t)}function Xs(t){return t<10?"0"+t.toString(10):t.toString(10)}var mx=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function bx(){var t=new Date,e=[Xs(t.getHours()),Xs(t.getMinutes()),Xs(t.getSeconds())].join(":");return[t.getDate(),mx[t.getMonth()],e].join(" ")}Pe.log=function(){console.log("%s - %s",bx(),Pe.format.apply(Pe,arguments))};Pe.inherits=He();Pe._extend=function(t,e){if(!e||!tn(e))return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t};function zd(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var vi=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;Pe.promisify=function(e){if(typeof e!="function")throw new TypeError('The "original" argument must be of type Function');if(vi&&e[vi]){var r=e[vi];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,vi,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var i,n,a=new Promise(function(m,E){i=m,n=E}),f=[],v=0;v<arguments.length;v++)f.push(arguments[v]);f.push(function(m,E){m?n(m):i(E)});try{e.apply(this,f)}catch(m){n(m)}return a}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),vi&&Object.defineProperty(r,vi,{value:r,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(r,jd(e))};Pe.promisify.custom=vi;function wx(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}function _x(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');function e(){for(var r=[],i=0;i<arguments.length;i++)r.push(arguments[i]);var n=r.pop();if(typeof n!="function")throw new TypeError("The last argument must be of type Function");var a=this,f=function(){return n.apply(a,arguments)};t.apply(this,r).then(function(v){S.default.nextTick(f.bind(null,null,v))},function(v){S.default.nextTick(wx.bind(null,v,f))})}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,jd(t)),e}Pe.callbackify=_x});var Xd=R((d9,Yd)=>{"use strict";b();function Gd(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable})),r.push.apply(r,i)}return r}function Vd(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Gd(Object(r),!0).forEach(function(i){xx(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Gd(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function xx(t,e,r){return e=Zd(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Mx(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function $d(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Zd(i.key),i)}}function Ex(t,e,r){return e&&$d(t.prototype,e),r&&$d(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Zd(t){var e=Sx(t,"string");return typeof e=="symbol"?e:String(e)}function Sx(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Bx=ft(),Po=Bx.Buffer,Ax=oa(),tu=Ax.inspect,Rx=tu&&tu.custom||"inspect";function qx(t,e,r){Po.prototype.copy.call(t,e,r)}Yd.exports=(function(){function t(){Mx(this,t),this.head=null,this.tail=null,this.length=0}return Ex(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n}},{key:"concat",value:function(r){if(this.length===0)return Po.alloc(0);for(var i=Po.allocUnsafe(r>>>0),n=this.head,a=0;n;)qx(n.data,i,a),a+=n.data.length,n=n.next;return i}},{key:"consume",value:function(r,i){var n;return r<this.head.data.length?(n=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?n=this.shift():n=i?this._getString(r):this._getBuffer(r),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,n=1,a=i.data;for(r-=a.length;i=i.next;){var f=i.data,v=r>f.length?f.length:r;if(v===f.length?a+=f:a+=f.slice(0,r),r-=v,r===0){v===f.length?(++n,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=f.slice(v));break}++n}return this.length-=n,a}},{key:"_getBuffer",value:function(r){var i=Po.allocUnsafe(r),n=this.head,a=1;for(n.data.copy(i),r-=n.data.length;n=n.next;){var f=n.data,v=r>f.length?f.length:r;if(f.copy(i,i.length-r,0,v),r-=v,r===0){v===f.length?(++a,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=f.slice(v));break}++a}return this.length-=a,i}},{key:Rx,value:function(r,i){return tu(this,Vd(Vd({},i),{},{depth:0,customInspect:!1}))}}]),t})()});var iu=R((v9,Qd)=>{"use strict";b();function Ix(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,S.default.nextTick(ru,this,t)):S.default.nextTick(ru,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(a){!e&&a?r._writableState?r._writableState.errorEmitted?S.default.nextTick(Do,r):(r._writableState.errorEmitted=!0,S.default.nextTick(Jd,r,a)):S.default.nextTick(Jd,r,a):e?(S.default.nextTick(Do,r),e(a)):S.default.nextTick(Do,r)}),this)}function Jd(t,e){ru(t,e),Do(t)}function Do(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function kx(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function ru(t,e){t.emit("error",e)}function Tx(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}Qd.exports={destroy:Ix,undestroy:kx,errorOrDestroy:Tx}});var gi=R((g9,rp)=>{"use strict";b();function Cx(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}var tp={};function xt(t,e,r){r||(r=Error);function i(a,f,v){return typeof e=="string"?e:e(a,f,v)}var n=(function(a){Cx(f,a);function f(v,m,E){return a.call(this,i(v,m,E))||this}return f})(r);n.prototype.name=r.name,n.prototype.code=t,tp[t]=n}function ep(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map(function(i){return String(i)}),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:r===2?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}else return"of ".concat(e," ").concat(String(t))}function Ox(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function Px(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function Dx(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}xt("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);xt("ERR_INVALID_ARG_TYPE",function(t,e,r){var i;typeof e=="string"&&Ox(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";var n;if(Px(t," argument"))n="The ".concat(t," ").concat(i," ").concat(ep(e,"type"));else{var a=Dx(t,".")?"property":"argument";n='The "'.concat(t,'" ').concat(a," ").concat(i," ").concat(ep(e,"type"))}return n+=". Received type ".concat(typeof r),n},TypeError);xt("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");xt("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});xt("ERR_STREAM_PREMATURE_CLOSE","Premature close");xt("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});xt("ERR_MULTIPLE_CALLBACK","Callback called multiple times");xt("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");xt("ERR_STREAM_WRITE_AFTER_END","write after end");xt("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);xt("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);xt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");rp.exports.codes=tp});var nu=R((b9,ip)=>{"use strict";b();var Ux=gi().codes.ERR_INVALID_OPT_VALUE;function Nx(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Lx(t,e,r,i){var n=Nx(e,i,r);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var a=i?r:"highWaterMark";throw new Ux(a,n)}return Math.floor(n)}return t.objectMode?16:16*1024}ip.exports={getHighWaterMark:Lx}});var ou=R((_9,np)=>{b();np.exports=Fx;function Fx(t,e){if(au("noDeprecation"))return t;var r=!1;function i(){if(!r){if(au("throwDeprecation"))throw new Error(e);au("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return i}function au(t){try{if(!globalThis.localStorage)return!1}catch{return!1}var e=globalThis.localStorage[t];return e==null?!1:String(e).toLowerCase()==="true"}});var uu=R((M9,hp)=>{"use strict";b();hp.exports=$e;function op(t){var e=this;this.next=null,this.entry=null,this.finish=function(){d6(e,t)}}var rn;$e.WritableState=sa;var jx={deprecate:ou()},fp=_s(),No=ft().Buffer,Hx=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function Kx(t){return No.from(t)}function Wx(t){return No.isBuffer(t)||t instanceof Hx}var su=iu(),zx=nu(),Gx=zx.getHighWaterMark,Tr=gi().codes,Vx=Tr.ERR_INVALID_ARG_TYPE,$x=Tr.ERR_METHOD_NOT_IMPLEMENTED,Zx=Tr.ERR_MULTIPLE_CALLBACK,Yx=Tr.ERR_STREAM_CANNOT_PIPE,Xx=Tr.ERR_STREAM_DESTROYED,Jx=Tr.ERR_STREAM_NULL_VALUES,Qx=Tr.ERR_STREAM_WRITE_AFTER_END,e6=Tr.ERR_UNKNOWN_ENCODING,nn=su.errorOrDestroy;hi()($e,fp);function t6(){}function sa(t,e,r){rn=rn||mi(),t=t||{},typeof r!="boolean"&&(r=e instanceof rn),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=Gx(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(n){s6(e,n)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new op(this)}sa.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(sa.prototype,"buffer",{get:jx.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var Uo;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Uo=Function.prototype[Symbol.hasInstance],Object.defineProperty($e,Symbol.hasInstance,{value:function(e){return Uo.call(this,e)?!0:this!==$e?!1:e&&e._writableState instanceof sa}})):Uo=function(e){return e instanceof this};function $e(t){rn=rn||mi();var e=this instanceof rn;if(!e&&!Uo.call($e,this))return new $e(t);this._writableState=new sa(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),fp.call(this)}$e.prototype.pipe=function(){nn(this,new Yx)};function r6(t,e){var r=new Qx;nn(t,r),S.default.nextTick(e,r)}function i6(t,e,r,i){var n;return r===null?n=new Jx:typeof r!="string"&&!e.objectMode&&(n=new Vx("chunk",["string","Buffer"],r)),n?(nn(t,n),S.default.nextTick(i,n),!1):!0}$e.prototype.write=function(t,e,r){var i=this._writableState,n=!1,a=!i.objectMode&&Wx(t);return a&&!No.isBuffer(t)&&(t=Kx(t)),typeof e=="function"&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=t6),i.ending?r6(this,r):(a||i6(this,i,t,r))&&(i.pendingcb++,n=a6(this,i,a,t,e,r)),n};$e.prototype.cork=function(){this._writableState.corked++};$e.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&sp(this,t))};$e.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new e6(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty($e.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function n6(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=No.from(e,r)),e}Object.defineProperty($e.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function a6(t,e,r,i,n,a){if(!r){var f=n6(e,i,n);i!==f&&(r=!0,n="buffer",i=f)}var v=e.objectMode?1:i.length;e.length+=v;var m=e.length<e.highWaterMark;if(m||(e.needDrain=!0),e.writing||e.corked){var E=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},E?E.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else fu(t,e,!1,v,i,n,a);return m}function fu(t,e,r,i,n,a,f){e.writelen=i,e.writecb=f,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new Xx("write")):r?t._writev(n,e.onwrite):t._write(n,a,e.onwrite),e.sync=!1}function o6(t,e,r,i,n){--e.pendingcb,r?(S.default.nextTick(n,i),S.default.nextTick(fa,t,e),t._writableState.errorEmitted=!0,nn(t,i)):(n(i),t._writableState.errorEmitted=!0,nn(t,i),fa(t,e))}function f6(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function s6(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(typeof n!="function")throw new Zx;if(f6(r),e)o6(t,r,i,e,n);else{var a=up(r)||t.destroyed;!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&sp(t,r),i?S.default.nextTick(ap,t,r,a,n):ap(t,r,a,n)}}function ap(t,e,r,i){r||u6(t,e),e.pendingcb--,i(),fa(t,e)}function u6(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function sp(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),a=e.corkedRequestsFree;a.entry=r;for(var f=0,v=!0;r;)n[f]=r,r.isBuf||(v=!1),r=r.next,f+=1;n.allBuffers=v,fu(t,e,!0,e.length,n,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new op(e),e.bufferedRequestCount=0}else{for(;r;){var m=r.chunk,E=r.encoding,A=r.callback,q=e.objectMode?1:m.length;if(fu(t,e,!1,q,m,E,A),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}$e.prototype._write=function(t,e,r){r(new $x("_write()"))};$e.prototype._writev=null;$e.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||c6(this,i,r),this};Object.defineProperty($e.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function up(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function h6(t,e){t._final(function(r){e.pendingcb--,r&&nn(t,r),e.prefinished=!0,t.emit("prefinish"),fa(t,e)})}function l6(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,S.default.nextTick(h6,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function fa(t,e){var r=up(e);if(r&&(l6(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}function c6(t,e,r){e.ending=!0,fa(t,e),r&&(e.finished?S.default.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function d6(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty($e.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}});$e.prototype.destroy=su.destroy;$e.prototype._undestroy=su.undestroy;$e.prototype._destroy=function(t,e){e(t)}});var mi=R((S9,cp)=>{"use strict";b();var p6=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};cp.exports=Yt;var lp=cu(),lu=uu();hi()(Yt,lp);for(hu=p6(lu.prototype),Lo=0;Lo<hu.length;Lo++)Fo=hu[Lo],Yt.prototype[Fo]||(Yt.prototype[Fo]=lu.prototype[Fo]);var hu,Fo,Lo;function Yt(t){if(!(this instanceof Yt))return new Yt(t);lp.call(this,t),lu.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",v6)))}Object.defineProperty(Yt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(Yt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(Yt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function v6(){this._writableState.ended||S.default.nextTick(y6,this)}function y6(t){t.end()}Object.defineProperty(Yt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e)}})});var vp=R((du,pp)=>{b();var jo=ft(),cr=jo.Buffer;function dp(t,e){for(var r in t)e[r]=t[r]}cr.from&&cr.alloc&&cr.allocUnsafe&&cr.allocUnsafeSlow?pp.exports=jo:(dp(jo,du),du.Buffer=an);function an(t,e,r){return cr(t,e,r)}dp(cr,an);an.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return cr(t,e,r)};an.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=cr(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};an.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return cr(t)};an.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return jo.SlowBuffer(t)}});var on=R(gp=>{"use strict";b();var vu=vp().Buffer,yp=vu.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function g6(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function m6(t){var e=g6(t);if(typeof e!="string"&&(vu.isEncoding===yp||!yp(t)))throw new Error("Unknown encoding: "+t);return e||t}gp.StringDecoder=ua;function ua(t){this.encoding=m6(t);var e;switch(this.encoding){case"utf16le":this.text=E6,this.end=S6,e=4;break;case"utf8":this.fillLast=_6,e=4;break;case"base64":this.text=B6,this.end=A6,e=3;break;default:this.write=R6,this.end=q6;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=vu.allocUnsafe(e)}ua.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};ua.prototype.end=M6;ua.prototype.text=x6;ua.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length};function pu(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function b6(t,e,r){var i=e.length-1;if(i<r)return 0;var n=pu(e[i]);return n>=0?(n>0&&(t.lastNeed=n-1),n):--i<r||n===-2?0:(n=pu(e[i]),n>=0?(n>0&&(t.lastNeed=n-2),n):--i<r||n===-2?0:(n=pu(e[i]),n>=0?(n>0&&(n===2?n=0:t.lastNeed=n-3),n):0))}function w6(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function _6(t){var e=this.lastTotal-this.lastNeed,r=w6(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function x6(t,e){var r=b6(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function M6(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function E6(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function S6(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function B6(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function A6(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function R6(t){return t.toString(this.encoding)}function q6(t){return t&&t.length?this.write(t):""}});var Ho=R((I9,wp)=>{"use strict";b();var mp=gi().codes.ERR_STREAM_PREMATURE_CLOSE;function I6(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];t.apply(this,i)}}}function k6(){}function T6(t){return t.setHeader&&typeof t.abort=="function"}function bp(t,e,r){if(typeof e=="function")return bp(t,null,e);e||(e={}),r=I6(r||k6);var i=e.readable||e.readable!==!1&&t.readable,n=e.writable||e.writable!==!1&&t.writable,a=function(){t.writable||v()},f=t._writableState&&t._writableState.finished,v=function(){n=!1,f=!0,i||r.call(t)},m=t._readableState&&t._readableState.endEmitted,E=function(){i=!1,m=!0,n||r.call(t)},A=function(j){r.call(t,j)},q=function(){var j;if(i&&!m)return(!t._readableState||!t._readableState.ended)&&(j=new mp),r.call(t,j);if(n&&!f)return(!t._writableState||!t._writableState.ended)&&(j=new mp),r.call(t,j)},I=function(){t.req.on("finish",v)};return T6(t)?(t.on("complete",v),t.on("abort",q),t.req?I():t.on("request",I)):n&&!t._writableState&&(t.on("end",a),t.on("close",a)),t.on("end",E),t.on("finish",v),e.error!==!1&&t.on("error",A),t.on("close",q),function(){t.removeListener("complete",v),t.removeListener("abort",q),t.removeListener("request",I),t.req&&t.req.removeListener("finish",v),t.removeListener("end",a),t.removeListener("close",a),t.removeListener("finish",v),t.removeListener("end",E),t.removeListener("error",A),t.removeListener("close",q)}}wp.exports=bp});var xp=R((T9,_p)=>{"use strict";b();var Ko;function Cr(t,e,r){return e=C6(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function C6(t){var e=O6(t,"string");return typeof e=="symbol"?e:String(e)}function O6(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var P6=Ho(),Or=Symbol("lastResolve"),bi=Symbol("lastReject"),ha=Symbol("error"),Wo=Symbol("ended"),wi=Symbol("lastPromise"),yu=Symbol("handlePromise"),_i=Symbol("stream");function Pr(t,e){return{value:t,done:e}}function D6(t){var e=t[Or];if(e!==null){var r=t[_i].read();r!==null&&(t[wi]=null,t[Or]=null,t[bi]=null,e(Pr(r,!1)))}}function U6(t){S.default.nextTick(D6,t)}function N6(t,e){return function(r,i){t.then(function(){if(e[Wo]){r(Pr(void 0,!0));return}e[yu](r,i)},i)}}var L6=Object.getPrototypeOf(function(){}),F6=Object.setPrototypeOf((Ko={get stream(){return this[_i]},next:function(){var e=this,r=this[ha];if(r!==null)return Promise.reject(r);if(this[Wo])return Promise.resolve(Pr(void 0,!0));if(this[_i].destroyed)return new Promise(function(f,v){S.default.nextTick(function(){e[ha]?v(e[ha]):f(Pr(void 0,!0))})});var i=this[wi],n;if(i)n=new Promise(N6(i,this));else{var a=this[_i].read();if(a!==null)return Promise.resolve(Pr(a,!1));n=new Promise(this[yu])}return this[wi]=n,n}},Cr(Ko,Symbol.asyncIterator,function(){return this}),Cr(Ko,"return",function(){var e=this;return new Promise(function(r,i){e[_i].destroy(null,function(n){if(n){i(n);return}r(Pr(void 0,!0))})})}),Ko),L6),j6=function(e){var r,i=Object.create(F6,(r={},Cr(r,_i,{value:e,writable:!0}),Cr(r,Or,{value:null,writable:!0}),Cr(r,bi,{value:null,writable:!0}),Cr(r,ha,{value:null,writable:!0}),Cr(r,Wo,{value:e._readableState.endEmitted,writable:!0}),Cr(r,yu,{value:function(a,f){var v=i[_i].read();v?(i[wi]=null,i[Or]=null,i[bi]=null,a(Pr(v,!1))):(i[Or]=a,i[bi]=f)},writable:!0}),r));return i[wi]=null,P6(e,function(n){if(n&&n.code!=="ERR_STREAM_PREMATURE_CLOSE"){var a=i[bi];a!==null&&(i[wi]=null,i[Or]=null,i[bi]=null,a(n)),i[ha]=n;return}var f=i[Or];f!==null&&(i[wi]=null,i[Or]=null,i[bi]=null,f(Pr(void 0,!0))),i[Wo]=!0}),e.on("readable",U6.bind(null,i)),i};_p.exports=j6});var Ep=R((O9,Mp)=>{b();Mp.exports=function(){throw new Error("Readable.from is not available in the browser")}});var cu=R((U9,Op)=>{"use strict";b();Op.exports=De;var fn;De.ReadableState=Rp;var D9=Gi().EventEmitter,Ap=function(e,r){return e.listeners(r).length},ca=_s(),zo=ft().Buffer,H6=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function K6(t){return zo.from(t)}function W6(t){return zo.isBuffer(t)||t instanceof H6}var gu=oa(),Te;gu&&gu.debuglog?Te=gu.debuglog("stream"):Te=function(){};var z6=Xd(),Eu=iu(),G6=nu(),V6=G6.getHighWaterMark,Go=gi().codes,$6=Go.ERR_INVALID_ARG_TYPE,Z6=Go.ERR_STREAM_PUSH_AFTER_EOF,Y6=Go.ERR_METHOD_NOT_IMPLEMENTED,X6=Go.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,sn,mu,bu;hi()(De,ca);var la=Eu.errorOrDestroy,wu=["error","close","destroy","pause","resume"];function J6(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Rp(t,e,r){fn=fn||mi(),t=t||{},typeof r!="boolean"&&(r=e instanceof fn),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=V6(this,t,"readableHighWaterMark",r),this.buffer=new z6,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=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(sn||(sn=on().StringDecoder),this.decoder=new sn(t.encoding),this.encoding=t.encoding)}function De(t){if(fn=fn||mi(),!(this instanceof De))return new De(t);var e=this instanceof fn;this._readableState=new Rp(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),ca.call(this)}Object.defineProperty(De.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}});De.prototype.destroy=Eu.destroy;De.prototype._undestroy=Eu.undestroy;De.prototype._destroy=function(t,e){e(t)};De.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=zo.from(t,e),e=""),i=!0),qp(this,t,e,!1,i)};De.prototype.unshift=function(t){return qp(this,t,null,!0,!1)};function qp(t,e,r,i,n){Te("readableAddChunk",e);var a=t._readableState;if(e===null)a.reading=!1,t3(t,a);else{var f;if(n||(f=Q6(a,e)),f)la(t,f);else if(a.objectMode||e&&e.length>0)if(typeof e!="string"&&!a.objectMode&&Object.getPrototypeOf(e)!==zo.prototype&&(e=K6(e)),i)a.endEmitted?la(t,new X6):_u(t,a,e,!0);else if(a.ended)la(t,new Z6);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||e.length!==0?_u(t,a,e,!1):Mu(t,a)):_u(t,a,e,!1)}else i||(a.reading=!1,Mu(t,a))}return!a.ended&&(a.length<a.highWaterMark||a.length===0)}function _u(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Vo(t)),Mu(t,e)}function Q6(t,e){var r;return!W6(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new $6("chunk",["string","Buffer","Uint8Array"],e)),r}De.prototype.isPaused=function(){return this._readableState.flowing===!1};De.prototype.setEncoding=function(t){sn||(sn=on().StringDecoder);var e=new sn(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var Sp=1073741824;function e3(t){return t>=Sp?t=Sp:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function Bp(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=e3(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}De.prototype.read=function(t){Te("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return Te("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?xu(this):Vo(this),null;if(t=Bp(t,e),t===0&&e.ended)return e.length===0&&xu(this),null;var i=e.needReadable;Te("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,Te("length less than watermark",i)),e.ended||e.reading?(i=!1,Te("reading or ended",i)):i&&(Te("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=Bp(r,e)));var n;return t>0?n=Tp(t,e):n=null,n===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&xu(this)),n!==null&&this.emit("data",n),n};function t3(t,e){if(Te("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?Vo(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,Ip(t)))}}function Vo(t){var e=t._readableState;Te("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(Te("emitReadable",e.flowing),e.emittedReadable=!0,S.default.nextTick(Ip,t))}function Ip(t){var e=t._readableState;Te("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Su(t)}function Mu(t,e){e.readingMore||(e.readingMore=!0,S.default.nextTick(r3,t,e))}function r3(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if(Te("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}De.prototype._read=function(t){la(this,new Y6("_read()"))};De.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,Te("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==S.default.stdout&&t!==S.default.stderr,a=n?v:V;i.endEmitted?S.default.nextTick(a):r.once("end",a),t.on("unpipe",f);function f(X,z){Te("onunpipe"),X===r&&z&&z.hasUnpiped===!1&&(z.hasUnpiped=!0,A())}function v(){Te("onend"),t.end()}var m=i3(r);t.on("drain",m);var E=!1;function A(){Te("cleanup"),t.removeListener("close",C),t.removeListener("finish",j),t.removeListener("drain",m),t.removeListener("error",I),t.removeListener("unpipe",f),r.removeListener("end",v),r.removeListener("end",V),r.removeListener("data",q),E=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&m()}r.on("data",q);function q(X){Te("ondata");var z=t.write(X);Te("dest.write",z),z===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Cp(i.pipes,t)!==-1)&&!E&&(Te("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause())}function I(X){Te("onerror",X),V(),t.removeListener("error",I),Ap(t,"error")===0&&la(t,X)}J6(t,"error",I);function C(){t.removeListener("finish",j),V()}t.once("close",C);function j(){Te("onfinish"),t.removeListener("close",C),V()}t.once("finish",j);function V(){Te("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(Te("pipe resume"),r.resume()),t};function i3(t){return function(){var r=t._readableState;Te("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Ap(t,"data")&&(r.flowing=!0,Su(t))}}De.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:!1});return this}var f=Cp(e.pipes,t);return f===-1?this:(e.pipes.splice(f,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};De.prototype.on=function(t,e){var r=ca.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,Te("on readable",i.length,i.reading),i.length?Vo(this):i.reading||S.default.nextTick(n3,this)),r};De.prototype.addListener=De.prototype.on;De.prototype.removeListener=function(t,e){var r=ca.prototype.removeListener.call(this,t,e);return t==="readable"&&S.default.nextTick(kp,this),r};De.prototype.removeAllListeners=function(t){var e=ca.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&S.default.nextTick(kp,this),e};function kp(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function n3(t){Te("readable nexttick read 0"),t.read(0)}De.prototype.resume=function(){var t=this._readableState;return t.flowing||(Te("resume"),t.flowing=!t.readableListening,a3(this,t)),t.paused=!1,this};function a3(t,e){e.resumeScheduled||(e.resumeScheduled=!0,S.default.nextTick(o3,t,e))}function o3(t,e){Te("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Su(t),e.flowing&&!e.reading&&t.read(0)}De.prototype.pause=function(){return Te("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Te("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Su(t){var e=t._readableState;for(Te("flow",e.flowing);e.flowing&&t.read()!==null;);}De.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(Te("wrapped end"),r.decoder&&!r.ended){var f=r.decoder.end();f&&f.length&&e.push(f)}e.push(null)}),t.on("data",function(f){if(Te("wrapped data"),r.decoder&&(f=r.decoder.write(f)),!(r.objectMode&&f==null)&&!(!r.objectMode&&(!f||!f.length))){var v=e.push(f);v||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(v){return function(){return t[v].apply(t,arguments)}})(n));for(var a=0;a<wu.length;a++)t.on(wu[a],this.emit.bind(this,wu[a]));return this._read=function(f){Te("wrapped _read",f),i&&(i=!1,t.resume())},this};typeof Symbol=="function"&&(De.prototype[Symbol.asyncIterator]=function(){return mu===void 0&&(mu=xp()),mu(this)});Object.defineProperty(De.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(De.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(De.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}});De._fromList=Tp;Object.defineProperty(De.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Tp(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function xu(t){var e=t._readableState;Te("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,S.default.nextTick(f3,e,t))}function f3(t,e){if(Te("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(De.from=function(t,e){return bu===void 0&&(bu=Ep()),bu(De,t,e)});function Cp(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Bu=R((L9,Dp)=>{"use strict";b();Dp.exports=dr;var $o=gi().codes,s3=$o.ERR_METHOD_NOT_IMPLEMENTED,u3=$o.ERR_MULTIPLE_CALLBACK,h3=$o.ERR_TRANSFORM_ALREADY_TRANSFORMING,l3=$o.ERR_TRANSFORM_WITH_LENGTH_0,Zo=mi();hi()(dr,Zo);function c3(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(i===null)return this.emit("error",new u3);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function dr(t){if(!(this instanceof dr))return new dr(t);Zo.call(this,t),this._transformState={afterTransform:c3.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",d3)}function d3(){var t=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(e,r){Pp(t,e,r)}):Pp(this,null,null)}dr.prototype.push=function(t,e){return this._transformState.needTransform=!1,Zo.prototype.push.call(this,t,e)};dr.prototype._transform=function(t,e,r){r(new s3("_transform()"))};dr.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};dr.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};dr.prototype._destroy=function(t,e){Zo.prototype._destroy.call(this,t,function(r){e(r)})};function Pp(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new l3;if(t._transformState.transforming)throw new h3;return t.push(null)}});var Lp=R((j9,Np)=>{"use strict";b();Np.exports=da;var Up=Bu();hi()(da,Up);function da(t){if(!(this instanceof da))return new da(t);Up.call(this,t)}da.prototype._transform=function(t,e,r){r(null,t)}});var Wp=R((K9,Kp)=>{"use strict";b();var Au;function p3(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var Hp=gi().codes,v3=Hp.ERR_MISSING_ARGS,y3=Hp.ERR_STREAM_DESTROYED;function Fp(t){if(t)throw t}function g3(t){return t.setHeader&&typeof t.abort=="function"}function m3(t,e,r,i){i=p3(i);var n=!1;t.on("close",function(){n=!0}),Au===void 0&&(Au=Ho()),Au(t,{readable:e,writable:r},function(f){if(f)return i(f);n=!0,i()});var a=!1;return function(f){if(!n&&!a){if(a=!0,g3(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();i(f||new y3("pipe"))}}}function jp(t){t()}function b3(t,e){return t.pipe(e)}function w3(t){return!t.length||typeof t[t.length-1]!="function"?Fp:t.pop()}function _3(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=w3(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new v3("streams");var n,a=e.map(function(f,v){var m=v<e.length-1,E=v>0;return m3(f,m,E,function(A){n||(n=A),A&&a.forEach(jp),!m&&(a.forEach(jp),i(n))})});return e.reduce(b3)}Kp.exports=_3});var qu=R((z9,zp)=>{b();zp.exports=Mt;var Ru=Gi().EventEmitter,x3=hi();x3(Mt,Ru);Mt.Readable=cu();Mt.Writable=uu();Mt.Duplex=mi();Mt.Transform=Bu();Mt.PassThrough=Lp();Mt.finished=Ho();Mt.pipeline=Wp();Mt.Stream=Mt;function Mt(){Ru.call(this)}Mt.prototype.pipe=function(t,e){var r=this;function i(A){t.writable&&t.write(A)===!1&&r.pause&&r.pause()}r.on("data",i);function n(){r.readable&&r.resume&&r.resume()}t.on("drain",n),!t._isStdio&&(!e||e.end!==!1)&&(r.on("end",f),r.on("close",v));var a=!1;function f(){a||(a=!0,t.end())}function v(){a||(a=!0,typeof t.destroy=="function"&&t.destroy())}function m(A){if(E(),Ru.listenerCount(this,"error")===0)throw A}r.on("error",m),t.on("error",m);function E(){r.removeListener("data",i),t.removeListener("drain",n),r.removeListener("end",f),r.removeListener("close",v),r.removeListener("error",m),t.removeListener("error",m),r.removeListener("end",E),r.removeListener("close",E),t.removeListener("close",E)}return r.on("end",E),r.on("close",E),t.on("close",E),t.emit("pipe",r),t}});var Gp=R((V9,Iu)=>{b();typeof Object.create=="function"?Iu.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Iu.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var Zp=R((Z9,$p)=>{"use strict";b();var Xt=Ie().Buffer,Vp=qu().Transform,M3=Gp();function Dr(t){Vp.call(this),this._block=Xt.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}M3(Dr,Vp);Dr.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(n){i=n}r(i)};Dr.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};var E3=typeof Uint8Array<"u",S3=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&ArrayBuffer.isView&&(Xt.prototype instanceof Uint8Array||Xt.TYPED_ARRAY_SUPPORT);function B3(t,e){if(t instanceof Xt)return t;if(typeof t=="string")return Xt.from(t,e);if(S3&&ArrayBuffer.isView(t)){if(t.byteLength===0)return Xt.alloc(0);var r=Xt.from(t.buffer,t.byteOffset,t.byteLength);if(r.byteLength===t.byteLength)return r}if(E3&&t instanceof Uint8Array||Xt.isBuffer(t)&&t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t))return Xt.from(t);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}Dr.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");t=B3(t,e);for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var n=this._blockOffset;n<this._blockSize;)r[n++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var a=0,f=t.length*8;f>0;++a)this._length[a]+=f,f=this._length[a]/4294967296|0,f>0&&(this._length[a]-=4294967296*f);return this};Dr.prototype._update=function(){throw new Error("_update is not implemented")};Dr.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};Dr.prototype._digest=function(){throw new Error("_digest is not implemented")};$p.exports=Dr});var Jo=R((X9,Xp)=>{"use strict";b();var A3=He(),Yp=Zp(),R3=Ie().Buffer,q3=new Array(16);function Yo(){Yp.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}A3(Yo,Yp);Yo.prototype._update=function(){for(var t=q3,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);var r=this._a,i=this._b,n=this._c,a=this._d;r=st(r,i,n,a,t[0],3614090360,7),a=st(a,r,i,n,t[1],3905402710,12),n=st(n,a,r,i,t[2],606105819,17),i=st(i,n,a,r,t[3],3250441966,22),r=st(r,i,n,a,t[4],4118548399,7),a=st(a,r,i,n,t[5],1200080426,12),n=st(n,a,r,i,t[6],2821735955,17),i=st(i,n,a,r,t[7],4249261313,22),r=st(r,i,n,a,t[8],1770035416,7),a=st(a,r,i,n,t[9],2336552879,12),n=st(n,a,r,i,t[10],4294925233,17),i=st(i,n,a,r,t[11],2304563134,22),r=st(r,i,n,a,t[12],1804603682,7),a=st(a,r,i,n,t[13],4254626195,12),n=st(n,a,r,i,t[14],2792965006,17),i=st(i,n,a,r,t[15],1236535329,22),r=ut(r,i,n,a,t[1],4129170786,5),a=ut(a,r,i,n,t[6],3225465664,9),n=ut(n,a,r,i,t[11],643717713,14),i=ut(i,n,a,r,t[0],3921069994,20),r=ut(r,i,n,a,t[5],3593408605,5),a=ut(a,r,i,n,t[10],38016083,9),n=ut(n,a,r,i,t[15],3634488961,14),i=ut(i,n,a,r,t[4],3889429448,20),r=ut(r,i,n,a,t[9],568446438,5),a=ut(a,r,i,n,t[14],3275163606,9),n=ut(n,a,r,i,t[3],4107603335,14),i=ut(i,n,a,r,t[8],1163531501,20),r=ut(r,i,n,a,t[13],2850285829,5),a=ut(a,r,i,n,t[2],4243563512,9),n=ut(n,a,r,i,t[7],1735328473,14),i=ut(i,n,a,r,t[12],2368359562,20),r=ht(r,i,n,a,t[5],4294588738,4),a=ht(a,r,i,n,t[8],2272392833,11),n=ht(n,a,r,i,t[11],1839030562,16),i=ht(i,n,a,r,t[14],4259657740,23),r=ht(r,i,n,a,t[1],2763975236,4),a=ht(a,r,i,n,t[4],1272893353,11),n=ht(n,a,r,i,t[7],4139469664,16),i=ht(i,n,a,r,t[10],3200236656,23),r=ht(r,i,n,a,t[13],681279174,4),a=ht(a,r,i,n,t[0],3936430074,11),n=ht(n,a,r,i,t[3],3572445317,16),i=ht(i,n,a,r,t[6],76029189,23),r=ht(r,i,n,a,t[9],3654602809,4),a=ht(a,r,i,n,t[12],3873151461,11),n=ht(n,a,r,i,t[15],530742520,16),i=ht(i,n,a,r,t[2],3299628645,23),r=lt(r,i,n,a,t[0],4096336452,6),a=lt(a,r,i,n,t[7],1126891415,10),n=lt(n,a,r,i,t[14],2878612391,15),i=lt(i,n,a,r,t[5],4237533241,21),r=lt(r,i,n,a,t[12],1700485571,6),a=lt(a,r,i,n,t[3],2399980690,10),n=lt(n,a,r,i,t[10],4293915773,15),i=lt(i,n,a,r,t[1],2240044497,21),r=lt(r,i,n,a,t[8],1873313359,6),a=lt(a,r,i,n,t[15],4264355552,10),n=lt(n,a,r,i,t[6],2734768916,15),i=lt(i,n,a,r,t[13],1309151649,21),r=lt(r,i,n,a,t[4],4149444226,6),a=lt(a,r,i,n,t[11],3174756917,10),n=lt(n,a,r,i,t[2],718787259,15),i=lt(i,n,a,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+a|0};Yo.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 t=R3.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};function Xo(t,e){return t<<e|t>>>32-e}function st(t,e,r,i,n,a,f){return Xo(t+(e&r|~e&i)+n+a|0,f)+e|0}function ut(t,e,r,i,n,a,f){return Xo(t+(e&i|r&~i)+n+a|0,f)+e|0}function ht(t,e,r,i,n,a,f){return Xo(t+(e^r^i)+n+a|0,f)+e|0}function lt(t,e,r,i,n,a,f){return Xo(t+(r^(e|~i))+n+a|0,f)+e|0}Xp.exports=Yo});var Tu=R((Q9,ku)=>{b();typeof Object.create=="function"?ku.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:ku.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var Qp=R((tR,Jp)=>{b();var I3={}.toString;Jp.exports=Array.isArray||function(t){return I3.call(t)=="[object Array]"}});var tv=R((iR,ev)=>{"use strict";b();var k3=li(),T3=pi(),C3=T3("TypedArray.prototype.buffer",!0),O3=Vs();ev.exports=C3||function(e){if(!O3(e))throw new k3("Not a Typed Array");return e.buffer}});var pa=R((aR,iv)=>{"use strict";b();var Tt=Ie().Buffer,P3=Qp(),D3=tv(),U3=ArrayBuffer.isView||function(e){try{return D3(e),!0}catch{return!1}},N3=typeof Uint8Array<"u",rv=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",L3=rv&&(Tt.prototype instanceof Uint8Array||Tt.TYPED_ARRAY_SUPPORT);iv.exports=function(e,r){if(Tt.isBuffer(e))return e.constructor&&!("isBuffer"in e)?Tt.from(e):e;if(typeof e=="string")return Tt.from(e,r);if(rv&&U3(e)){if(e.byteLength===0)return Tt.alloc(0);if(L3){var i=Tt.from(e.buffer,e.byteOffset,e.byteLength);if(i.byteLength===e.byteLength)return i}var n=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),a=Tt.from(n);if(a.length===e.byteLength)return a}if(N3&&e instanceof Uint8Array)return Tt.from(e);var f=P3(e);if(f)for(var v=0;v<e.length;v+=1){var m=e[v];if(typeof m!="number"||m<0||m>255||~~m!==m)throw new RangeError("Array items must be numbers in the range 0-255.")}if(f||Tt.isBuffer(e)&&e.constructor&&typeof e.constructor.isBuffer=="function"&&e.constructor.isBuffer(e))return Tt.from(e);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}});var fv=R((fR,ov)=>{"use strict";b();var F3=Ie().Buffer,j3=pa(),av=typeof Uint8Array<"u",H3=av&&typeof ArrayBuffer<"u",nv=H3&&ArrayBuffer.isView;ov.exports=function(t,e){if(typeof t=="string"||F3.isBuffer(t)||av&&t instanceof Uint8Array||nv&&nv(t))return j3(t,e);throw new TypeError('The "data" argument must be a string, a Buffer, a Uint8Array, or a DataView')}});var va=R((uR,Cu)=>{"use strict";b();typeof S.default>"u"||!S.default.version||S.default.version.indexOf("v0.")===0||S.default.version.indexOf("v1.")===0&&S.default.version.indexOf("v1.8.")!==0?Cu.exports={nextTick:K3}:Cu.exports=S.default;function K3(t,e,r,i){if(typeof t!="function")throw new TypeError('"callback" argument must be a function');var n=arguments.length,a,f;switch(n){case 0:case 1:return S.default.nextTick(t);case 2:return S.default.nextTick(function(){t.call(null,e)});case 3:return S.default.nextTick(function(){t.call(null,e,r)});case 4:return S.default.nextTick(function(){t.call(null,e,r,i)});default:for(a=new Array(n-1),f=0;f<a.length;)a[f++]=arguments[f];return S.default.nextTick(function(){t.apply(null,a)})}}});var uv=R((lR,sv)=>{b();var W3={}.toString;sv.exports=Array.isArray||function(t){return W3.call(t)=="[object Array]"}});var Ou=R((dR,hv)=>{b();hv.exports=Gi().EventEmitter});var ef=R((Pu,cv)=>{b();var Qo=ft(),pr=Qo.Buffer;function lv(t,e){for(var r in t)e[r]=t[r]}pr.from&&pr.alloc&&pr.allocUnsafe&&pr.allocUnsafeSlow?cv.exports=Qo:(lv(Qo,Pu),Pu.Buffer=un);function un(t,e,r){return pr(t,e,r)}lv(pr,un);un.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return pr(t,e,r)};un.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=pr(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};un.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return pr(t)};un.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return Qo.SlowBuffer(t)}});var hn=R(ct=>{b();function z3(t){return Array.isArray?Array.isArray(t):tf(t)==="[object Array]"}ct.isArray=z3;function G3(t){return typeof t=="boolean"}ct.isBoolean=G3;function V3(t){return t===null}ct.isNull=V3;function $3(t){return t==null}ct.isNullOrUndefined=$3;function Z3(t){return typeof t=="number"}ct.isNumber=Z3;function Y3(t){return typeof t=="string"}ct.isString=Y3;function X3(t){return typeof t=="symbol"}ct.isSymbol=X3;function J3(t){return t===void 0}ct.isUndefined=J3;function Q3(t){return tf(t)==="[object RegExp]"}ct.isRegExp=Q3;function e4(t){return typeof t=="object"&&t!==null}ct.isObject=e4;function t4(t){return tf(t)==="[object Date]"}ct.isDate=t4;function r4(t){return tf(t)==="[object Error]"||t instanceof Error}ct.isError=r4;function i4(t){return typeof t=="function"}ct.isFunction=i4;function n4(t){return t===null||typeof t=="boolean"||typeof t=="number"||typeof t=="string"||typeof t=="symbol"||typeof t>"u"}ct.isPrimitive=n4;ct.isBuffer=ft().Buffer.isBuffer;function tf(t){return Object.prototype.toString.call(t)}});var pv=R((mR,Du)=>{"use strict";b();function a4(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var dv=ef().Buffer,ya=oa();function o4(t,e,r){t.copy(e,r)}Du.exports=(function(){function t(){a4(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length},t.prototype.unshift=function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length},t.prototype.shift=function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(r){if(this.length===0)return"";for(var i=this.head,n=""+i.data;i=i.next;)n+=r+i.data;return n},t.prototype.concat=function(r){if(this.length===0)return dv.alloc(0);for(var i=dv.allocUnsafe(r>>>0),n=this.head,a=0;n;)o4(n.data,i,a),a+=n.data.length,n=n.next;return i},t})();ya&&ya.inspect&&ya.inspect.custom&&(Du.exports.prototype[ya.inspect.custom]=function(){var t=ya.inspect({length:this.length});return this.constructor.name+" "+t})});var Uu=R((wR,vv)=>{"use strict";b();var rf=va();function f4(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,rf.nextTick(nf,this,t)):rf.nextTick(nf,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(a){!e&&a?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,rf.nextTick(nf,r,a)):rf.nextTick(nf,r,a):e&&e(a)}),this)}function s4(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function nf(t,e){t.emit("error",e)}vv.exports={destroy:f4,undestroy:s4}});var Lu=R((xR,Mv)=>{"use strict";b();var xi=va();Mv.exports=Ye;function gv(t){var e=this;this.next=null,this.entry=null,this.finish=function(){B4(e,t)}}var u4=!S.default.browser&&["v0.10","v0.9."].indexOf(S.default.version.slice(0,5))>-1?setImmediate:xi.nextTick,ln;Ye.WritableState=ma;var mv=Object.create(hn());mv.inherits=He();var h4={deprecate:ou()},bv=Ou(),of=ef().Buffer,l4=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function c4(t){return of.from(t)}function d4(t){return of.isBuffer(t)||t instanceof l4}var wv=Uu();mv.inherits(Ye,bv);function p4(){}function ma(t,e){ln=ln||Mi(),t=t||{};var r=e instanceof ln;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var i=t.highWaterMark,n=t.writableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=t.decodeStrings===!1;this.decodeStrings=!f,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(v){_4(e,v)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new gv(this)}ma.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(ma.prototype,"buffer",{get:h4.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var af;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(af=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ye,Symbol.hasInstance,{value:function(t){return af.call(this,t)?!0:this!==Ye?!1:t&&t._writableState instanceof ma}})):af=function(t){return t instanceof this};function Ye(t){if(ln=ln||Mi(),!af.call(Ye,this)&&!(this instanceof ln))return new Ye(t);this._writableState=new ma(t,this),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),bv.call(this)}Ye.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))};function v4(t,e){var r=new Error("write after end");t.emit("error",r),xi.nextTick(e,r)}function y4(t,e,r,i){var n=!0,a=!1;return r===null?a=new TypeError("May not write null values to stream"):typeof r!="string"&&r!==void 0&&!e.objectMode&&(a=new TypeError("Invalid non-string/buffer chunk")),a&&(t.emit("error",a),xi.nextTick(i,a),n=!1),n}Ye.prototype.write=function(t,e,r){var i=this._writableState,n=!1,a=!i.objectMode&&d4(t);return a&&!of.isBuffer(t)&&(t=c4(t)),typeof e=="function"&&(r=e,e=null),a?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=p4),i.ended?v4(this,r):(a||y4(this,i,t,r))&&(i.pendingcb++,n=m4(this,i,a,t,e,r)),n};Ye.prototype.cork=function(){var t=this._writableState;t.corked++};Ye.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&_v(this,t))};Ye.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this};function g4(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=of.from(e,r)),e}Object.defineProperty(Ye.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function m4(t,e,r,i,n,a){if(!r){var f=g4(e,i,n);i!==f&&(r=!0,n="buffer",i=f)}var v=e.objectMode?1:i.length;e.length+=v;var m=e.length<e.highWaterMark;if(m||(e.needDrain=!0),e.writing||e.corked){var E=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:n,isBuf:r,callback:a,next:null},E?E.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else Nu(t,e,!1,v,i,n,a);return m}function Nu(t,e,r,i,n,a,f){e.writelen=i,e.writecb=f,e.writing=!0,e.sync=!0,r?t._writev(n,e.onwrite):t._write(n,a,e.onwrite),e.sync=!1}function b4(t,e,r,i,n){--e.pendingcb,r?(xi.nextTick(n,i),xi.nextTick(ga,t,e),t._writableState.errorEmitted=!0,t.emit("error",i)):(n(i),t._writableState.errorEmitted=!0,t.emit("error",i),ga(t,e))}function w4(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}function _4(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if(w4(r),e)b4(t,r,i,e,n);else{var a=xv(r);!a&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&_v(t,r),i?u4(yv,t,r,a,n):yv(t,r,a,n)}}function yv(t,e,r,i){r||x4(t,e),e.pendingcb--,i(),ga(t,e)}function x4(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}function _v(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,n=new Array(i),a=e.corkedRequestsFree;a.entry=r;for(var f=0,v=!0;r;)n[f]=r,r.isBuf||(v=!1),r=r.next,f+=1;n.allBuffers=v,Nu(t,e,!0,e.length,n,"",a.finish),e.pendingcb++,e.lastBufferedRequest=null,a.next?(e.corkedRequestsFree=a.next,a.next=null):e.corkedRequestsFree=new gv(e),e.bufferedRequestCount=0}else{for(;r;){var m=r.chunk,E=r.encoding,A=r.callback,q=e.objectMode?1:m.length;if(Nu(t,e,!1,q,m,E,A),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}Ye.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))};Ye.prototype._writev=null;Ye.prototype.end=function(t,e,r){var i=this._writableState;typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||S4(this,i,r)};function xv(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function M4(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),ga(t,e)})}function E4(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"?(e.pendingcb++,e.finalCalled=!0,xi.nextTick(M4,t,e)):(e.prefinished=!0,t.emit("prefinish")))}function ga(t,e){var r=xv(e);return r&&(E4(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"))),r}function S4(t,e,r){e.ending=!0,ga(t,e),r&&(e.finished?xi.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}function B4(t,e,r){var i=t.entry;for(t.entry=null;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}Object.defineProperty(Ye.prototype,"destroyed",{get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}});Ye.prototype.destroy=wv.destroy;Ye.prototype._undestroy=wv.undestroy;Ye.prototype._destroy=function(t,e){this.end(),e(t)}});var Mi=R((ER,Av)=>{"use strict";b();var Ev=va(),A4=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};Av.exports=vr;var Sv=Object.create(hn());Sv.inherits=He();var Bv=Hu(),ju=Lu();Sv.inherits(vr,Bv);for(Fu=A4(ju.prototype),ff=0;ff<Fu.length;ff++)sf=Fu[ff],vr.prototype[sf]||(vr.prototype[sf]=ju.prototype[sf]);var Fu,sf,ff;function vr(t){if(!(this instanceof vr))return new vr(t);Bv.call(this,t),ju.call(this,t),t&&t.readable===!1&&(this.readable=!1),t&&t.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,t&&t.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",R4)}Object.defineProperty(vr.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function R4(){this.allowHalfOpen||this._writableState.ended||Ev.nextTick(q4,this)}function q4(t){t.end()}Object.defineProperty(vr.prototype,"destroyed",{get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(t){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=t,this._writableState.destroyed=t)}});vr.prototype._destroy=function(t,e){this.push(null),this.end(),Ev.nextTick(e,t)}});var Hu=R((AR,Lv)=>{"use strict";b();var dn=va();Lv.exports=ze;var I4=uv(),ba;ze.ReadableState=Ov;var BR=Gi().EventEmitter,kv=function(t,e){return t.listeners(e).length},Vu=Ou(),wa=ef().Buffer,k4=(typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function T4(t){return wa.from(t)}function C4(t){return wa.isBuffer(t)||t instanceof k4}var Tv=Object.create(hn());Tv.inherits=He();var Ku=oa(),Ne=void 0;Ku&&Ku.debuglog?Ne=Ku.debuglog("stream"):Ne=function(){};var O4=pv(),Cv=Uu(),cn;Tv.inherits(ze,Vu);var Wu=["error","close","destroy","pause","resume"];function P4(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):I4(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function Ov(t,e){ba=ba||Mi(),t=t||{};var r=e instanceof ba;this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,n=t.readableHighWaterMark,a=this.objectMode?16:16*1024;i||i===0?this.highWaterMark=i:r&&(n||n===0)?this.highWaterMark=n:this.highWaterMark=a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new O4,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(cn||(cn=on().StringDecoder),this.decoder=new cn(t.encoding),this.encoding=t.encoding)}function ze(t){if(ba=ba||Mi(),!(this instanceof ze))return new ze(t);this._readableState=new Ov(t,this),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),Vu.call(this)}Object.defineProperty(ze.prototype,"destroyed",{get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});ze.prototype.destroy=Cv.destroy;ze.prototype._undestroy=Cv.undestroy;ze.prototype._destroy=function(t,e){this.push(null),e(t)};ze.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=wa.from(t,e),e=""),i=!0),Pv(this,t,e,!1,i)};ze.prototype.unshift=function(t){return Pv(this,t,null,!0,!1)};function Pv(t,e,r,i,n){var a=t._readableState;if(e===null)a.reading=!1,L4(t,a);else{var f;n||(f=D4(a,e)),f?t.emit("error",f):a.objectMode||e&&e.length>0?(typeof e!="string"&&!a.objectMode&&Object.getPrototypeOf(e)!==wa.prototype&&(e=T4(e)),i?a.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):zu(t,a,e,!0):a.ended?t.emit("error",new Error("stream.push() after EOF")):(a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||e.length!==0?zu(t,a,e,!1):Dv(t,a)):zu(t,a,e,!1))):i||(a.reading=!1)}return U4(a)}function zu(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&uf(t)),Dv(t,e)}function D4(t,e){var r;return!C4(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new TypeError("Invalid non-string/buffer chunk")),r}function U4(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||t.length===0)}ze.prototype.isPaused=function(){return this._readableState.flowing===!1};ze.prototype.setEncoding=function(t){return cn||(cn=on().StringDecoder),this._readableState.decoder=new cn(t),this._readableState.encoding=t,this};var Rv=8388608;function N4(t){return t>=Rv?t=Rv:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function qv(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=N4(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}ze.prototype.read=function(t){Ne("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return Ne("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?Gu(this):uf(this),null;if(t=qv(t,e),t===0&&e.ended)return e.length===0&&Gu(this),null;var i=e.needReadable;Ne("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,Ne("length less than watermark",i)),e.ended||e.reading?(i=!1,Ne("reading or ended",i)):i&&(Ne("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=qv(r,e)));var n;return t>0?n=Uv(t,e):n=null,n===null?(e.needReadable=!0,t=0):e.length-=t,e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&Gu(this)),n!==null&&this.emit("data",n),n};function L4(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,uf(t)}}function uf(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(Ne("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?dn.nextTick(Iv,t):Iv(t))}function Iv(t){Ne("emit readable"),t.emit("readable"),$u(t)}function Dv(t,e){e.readingMore||(e.readingMore=!0,dn.nextTick(F4,t,e))}function F4(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(Ne("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}ze.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))};ze.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,Ne("pipe count=%d opts=%j",i.pipesCount,e);var n=(!e||e.end!==!1)&&t!==S.default.stdout&&t!==S.default.stderr,a=n?v:X;i.endEmitted?dn.nextTick(a):r.once("end",a),t.on("unpipe",f);function f(z,$){Ne("onunpipe"),z===r&&$&&$.hasUnpiped===!1&&($.hasUnpiped=!0,A())}function v(){Ne("onend"),t.end()}var m=j4(r);t.on("drain",m);var E=!1;function A(){Ne("cleanup"),t.removeListener("close",j),t.removeListener("finish",V),t.removeListener("drain",m),t.removeListener("error",C),t.removeListener("unpipe",f),r.removeListener("end",v),r.removeListener("end",X),r.removeListener("data",I),E=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&m()}var q=!1;r.on("data",I);function I(z){Ne("ondata"),q=!1;var $=t.write(z);$===!1&&!q&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&Nv(i.pipes,t)!==-1)&&!E&&(Ne("false write response, pause",i.awaitDrain),i.awaitDrain++,q=!0),r.pause())}function C(z){Ne("onerror",z),X(),t.removeListener("error",C),kv(t,"error")===0&&t.emit("error",z)}P4(t,"error",C);function j(){t.removeListener("finish",V),X()}t.once("close",j);function V(){Ne("onfinish"),t.removeListener("close",j),X()}t.once("finish",V);function X(){Ne("unpipe"),r.unpipe(t)}return t.emit("pipe",r),i.flowing||(Ne("pipe resume"),r.resume()),t};function j4(t){return function(){var e=t._readableState;Ne("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,e.awaitDrain===0&&kv(t,"data")&&(e.flowing=!0,$u(t))}}ze.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var a=0;a<n;a++)i[a].emit("unpipe",this,{hasUnpiped:!1});return this}var f=Nv(e.pipes,t);return f===-1?this:(e.pipes.splice(f,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};ze.prototype.on=function(t,e){var r=Vu.prototype.on.call(this,t,e);if(t==="data")this._readableState.flowing!==!1&&this.resume();else if(t==="readable"){var i=this._readableState;!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.emittedReadable=!1,i.reading?i.length&&uf(this):dn.nextTick(H4,this))}return r};ze.prototype.addListener=ze.prototype.on;function H4(t){Ne("readable nexttick read 0"),t.read(0)}ze.prototype.resume=function(){var t=this._readableState;return t.flowing||(Ne("resume"),t.flowing=!0,K4(this,t)),this};function K4(t,e){e.resumeScheduled||(e.resumeScheduled=!0,dn.nextTick(W4,t,e))}function W4(t,e){e.reading||(Ne("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),$u(t),e.flowing&&!e.reading&&t.read(0)}ze.prototype.pause=function(){return Ne("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Ne("pause"),this._readableState.flowing=!1,this.emit("pause")),this};function $u(t){var e=t._readableState;for(Ne("flow",e.flowing);e.flowing&&t.read()!==null;);}ze.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if(Ne("wrapped end"),r.decoder&&!r.ended){var f=r.decoder.end();f&&f.length&&e.push(f)}e.push(null)}),t.on("data",function(f){if(Ne("wrapped data"),r.decoder&&(f=r.decoder.write(f)),!(r.objectMode&&f==null)&&!(!r.objectMode&&(!f||!f.length))){var v=e.push(f);v||(i=!0,t.pause())}});for(var n in t)this[n]===void 0&&typeof t[n]=="function"&&(this[n]=(function(f){return function(){return t[f].apply(t,arguments)}})(n));for(var a=0;a<Wu.length;a++)t.on(Wu[a],this.emit.bind(this,Wu[a]));return this._read=function(f){Ne("wrapped _read",f),i&&(i=!1,t.resume())},this};Object.defineProperty(ze.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});ze._fromList=Uv;function Uv(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.head.data:r=e.buffer.concat(e.length),e.buffer.clear()):r=z4(t,e.buffer,e.decoder),r}function z4(t,e,r){var i;return t<e.head.data.length?(i=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):t===e.head.data.length?i=e.shift():i=r?G4(t,e):V4(t,e),i}function G4(t,e){var r=e.head,i=1,n=r.data;for(t-=n.length;r=r.next;){var a=r.data,f=t>a.length?a.length:t;if(f===a.length?n+=a:n+=a.slice(0,t),t-=f,t===0){f===a.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=a.slice(f));break}++i}return e.length-=i,n}function V4(t,e){var r=wa.allocUnsafe(t),i=e.head,n=1;for(i.data.copy(r),t-=i.data.length;i=i.next;){var a=i.data,f=t>a.length?a.length:t;if(a.copy(r,r.length-t,0,f),t-=f,t===0){f===a.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=a.slice(f));break}++n}return e.length-=n,r}function Gu(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,dn.nextTick($4,e,t))}function $4(t,e){!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function Nv(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return-1}});var Zu=R((qR,Hv)=>{"use strict";b();Hv.exports=yr;var hf=Mi(),jv=Object.create(hn());jv.inherits=He();jv.inherits(yr,hf);function Z4(t,e){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(!i)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,e!=null&&this.push(e),i(t);var n=this._readableState;n.reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}function yr(t){if(!(this instanceof yr))return new yr(t);hf.call(this,t),this._transformState={afterTransform:Z4.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&(typeof t.transform=="function"&&(this._transform=t.transform),typeof t.flush=="function"&&(this._flush=t.flush)),this.on("prefinish",Y4)}function Y4(){var t=this;typeof this._flush=="function"?this._flush(function(e,r){Fv(t,e,r)}):Fv(this,null,null)}yr.prototype.push=function(t,e){return this._transformState.needTransform=!1,hf.prototype.push.call(this,t,e)};yr.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")};yr.prototype._write=function(t,e,r){var i=this._transformState;if(i.writecb=r,i.writechunk=t,i.writeencoding=e,!i.transforming){var n=this._readableState;(i.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}};yr.prototype._read=function(t){var e=this._transformState;e.writechunk!==null&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0};yr.prototype._destroy=function(t,e){var r=this;hf.prototype._destroy.call(this,t,function(i){e(i),r.emit("close")})};function Fv(t,e,r){if(e)return t.emit("error",e);if(r!=null&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}});var Gv=R((kR,zv)=>{"use strict";b();zv.exports=_a;var Kv=Zu(),Wv=Object.create(hn());Wv.inherits=He();Wv.inherits(_a,Kv);function _a(t){if(!(this instanceof _a))return new _a(t);Kv.call(this,t)}_a.prototype._transform=function(t,e,r){r(null,t)}});var $v=R((Jt,Vv)=>{b();Jt=Vv.exports=Hu();Jt.Stream=Jt;Jt.Readable=Jt;Jt.Writable=Lu();Jt.Duplex=Mi();Jt.Transform=Zu();Jt.PassThrough=Gv()});var Xv=R((OR,Yv)=>{"use strict";b();var X4=Ie().Buffer,J4=fv(),Zv=$v().Transform,Q4=Tu();function Ur(t){Zv.call(this),this._block=X4.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Q4(Ur,Zv);Ur.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(n){i=n}r(i)};Ur.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(r){e=r}t(e)};Ur.prototype.update=function(t,e){if(this._finalized)throw new Error("Digest already called");for(var r=J4(t,e),i=this._block,n=0;this._blockOffset+r.length-n>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)i[a]=r[n],a+=1,n+=1;this._update(),this._blockOffset=0}for(;n<r.length;)i[this._blockOffset]=r[n],this._blockOffset+=1,n+=1;for(var f=0,v=r.length*8;v>0;++f)this._length[f]+=v,v=this._length[f]/4294967296|0,v>0&&(this._length[f]-=4294967296*v);return this};Ur.prototype._update=function(){throw new Error("_update is not implemented")};Ur.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();t!==void 0&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e};Ur.prototype._digest=function(){throw new Error("_digest is not implemented")};Yv.exports=Ur});var cf=R((DR,n1)=>{"use strict";b();var Yu=ft().Buffer,e8=Tu(),i1=Xv(),t8=new Array(16),xa=[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],Ma=[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],Ea=[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],Sa=[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],Ba=[0,1518500249,1859775393,2400959708,2840853838],Aa=[1352829926,1548603684,1836072691,2053994217,0];function Ei(t,e){return t<<e|t>>>32-e}function Jv(t,e,r,i,n,a,f,v){return Ei(t+(e^r^i)+a+f|0,v)+n|0}function Qv(t,e,r,i,n,a,f,v){return Ei(t+(e&r|~e&i)+a+f|0,v)+n|0}function e1(t,e,r,i,n,a,f,v){return Ei(t+((e|~r)^i)+a+f|0,v)+n|0}function t1(t,e,r,i,n,a,f,v){return Ei(t+(e&i|r&~i)+a+f|0,v)+n|0}function r1(t,e,r,i,n,a,f,v){return Ei(t+(e^(r|~i))+a+f|0,v)+n|0}function lf(){i1.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}e8(lf,i1);lf.prototype._update=function(){for(var t=t8,e=0;e<16;++e)t[e]=this._block.readInt32LE(e*4);for(var r=this._a|0,i=this._b|0,n=this._c|0,a=this._d|0,f=this._e|0,v=this._a|0,m=this._b|0,E=this._c|0,A=this._d|0,q=this._e|0,I=0;I<80;I+=1){var C,j;I<16?(C=Jv(r,i,n,a,f,t[xa[I]],Ba[0],Ea[I]),j=r1(v,m,E,A,q,t[Ma[I]],Aa[0],Sa[I])):I<32?(C=Qv(r,i,n,a,f,t[xa[I]],Ba[1],Ea[I]),j=t1(v,m,E,A,q,t[Ma[I]],Aa[1],Sa[I])):I<48?(C=e1(r,i,n,a,f,t[xa[I]],Ba[2],Ea[I]),j=e1(v,m,E,A,q,t[Ma[I]],Aa[2],Sa[I])):I<64?(C=t1(r,i,n,a,f,t[xa[I]],Ba[3],Ea[I]),j=Qv(v,m,E,A,q,t[Ma[I]],Aa[3],Sa[I])):(C=r1(r,i,n,a,f,t[xa[I]],Ba[4],Ea[I]),j=Jv(v,m,E,A,q,t[Ma[I]],Aa[4],Sa[I])),r=f,f=a,a=Ei(n,10),n=i,i=C,v=q,q=A,A=Ei(E,10),E=m,m=j}var V=this._b+n+A|0;this._b=this._c+a+q|0,this._c=this._d+f+v|0,this._d=this._e+r+m|0,this._e=this._a+i+E|0,this._a=V};lf.prototype._digest=function(){this._block[this._blockOffset]=128,this._blockOffset+=1,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 t=Yu.alloc?Yu.alloc(20):new Yu(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};n1.exports=lf});var Si=R((NR,Xu)=>{b();typeof Object.create=="function"?Xu.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:Xu.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var Bi=R((FR,a1)=>{"use strict";b();var r8=Ie().Buffer,i8=pa();function df(t,e){this._block=r8.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}df.prototype.update=function(t,e){t=i8(t,e||"utf8");for(var r=this._block,i=this._blockSize,n=t.length,a=this._len,f=0;f<n;){for(var v=a%i,m=Math.min(n-f,i-v),E=0;E<m;E++)r[v+E]=t[f+E];a+=m,f+=m,a%i===0&&this._update(r)}return this._len+=n,this};df.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=this._len*8;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(r&4294967295)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var a=this._hash();return t?a.toString(t):a};df.prototype._update=function(){throw new Error("_update must be implemented by subclass")};a1.exports=df});var s1=R((HR,f1)=>{"use strict";b();var n8=Si(),o1=Bi(),a8=Ie().Buffer,o8=[1518500249,1859775393,-1894007588,-899497514],f8=new Array(80);function Ra(){this.init(),this._w=f8,o1.call(this,64,56)}n8(Ra,o1);Ra.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function s8(t){return t<<5|t>>>27}function u8(t){return t<<30|t>>>2}function h8(t,e,r,i){return t===0?e&r|~e&i:t===2?e&r|e&i|r&i:e^r^i}Ra.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,n=this._c|0,a=this._d|0,f=this._e|0,v=0;v<16;++v)e[v]=t.readInt32BE(v*4);for(;v<80;++v)e[v]=e[v-3]^e[v-8]^e[v-14]^e[v-16];for(var m=0;m<80;++m){var E=~~(m/20),A=s8(r)+h8(E,i,n,a)+f+e[m]+o8[E]|0;f=a,a=n,n=u8(i),i=r,r=A}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0};Ra.prototype._hash=function(){var t=a8.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};f1.exports=Ra});var l1=R((WR,h1)=>{"use strict";b();var l8=Si(),u1=Bi(),c8=Ie().Buffer,d8=[1518500249,1859775393,-1894007588,-899497514],p8=new Array(80);function qa(){this.init(),this._w=p8,u1.call(this,64,56)}l8(qa,u1);qa.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function v8(t){return t<<1|t>>>31}function y8(t){return t<<5|t>>>27}function g8(t){return t<<30|t>>>2}function m8(t,e,r,i){return t===0?e&r|~e&i:t===2?e&r|e&i|r&i:e^r^i}qa.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,n=this._c|0,a=this._d|0,f=this._e|0,v=0;v<16;++v)e[v]=t.readInt32BE(v*4);for(;v<80;++v)e[v]=v8(e[v-3]^e[v-8]^e[v-14]^e[v-16]);for(var m=0;m<80;++m){var E=~~(m/20),A=y8(r)+m8(E,i,n,a)+f+e[m]+d8[E]|0;f=a,a=n,n=g8(i),i=r,r=A}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0};qa.prototype._hash=function(){var t=c8.allocUnsafe(20);return t.writeInt32BE(this._a|0,0),t.writeInt32BE(this._b|0,4),t.writeInt32BE(this._c|0,8),t.writeInt32BE(this._d|0,12),t.writeInt32BE(this._e|0,16),t};h1.exports=qa});var Ju=R((GR,d1)=>{"use strict";b();var b8=Si(),c1=Bi(),w8=Ie().Buffer,_8=[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],x8=new Array(64);function Ia(){this.init(),this._w=x8,c1.call(this,64,56)}b8(Ia,c1);Ia.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};function M8(t,e,r){return r^t&(e^r)}function E8(t,e,r){return t&e|r&(t|e)}function S8(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function B8(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function A8(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}function R8(t){return(t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10}Ia.prototype._update=function(t){for(var e=this._w,r=this._a|0,i=this._b|0,n=this._c|0,a=this._d|0,f=this._e|0,v=this._f|0,m=this._g|0,E=this._h|0,A=0;A<16;++A)e[A]=t.readInt32BE(A*4);for(;A<64;++A)e[A]=R8(e[A-2])+e[A-7]+A8(e[A-15])+e[A-16]|0;for(var q=0;q<64;++q){var I=E+B8(f)+M8(f,v,m)+_8[q]+e[q]|0,C=S8(r)+E8(r,i,n)|0;E=m,m=v,v=f,f=a+I|0,a=n,n=i,i=r,r=I+C|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=n+this._c|0,this._d=a+this._d|0,this._e=f+this._e|0,this._f=v+this._f|0,this._g=m+this._g|0,this._h=E+this._h|0};Ia.prototype._hash=function(){var t=w8.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};d1.exports=Ia});var v1=R(($R,p1)=>{"use strict";b();var q8=Si(),I8=Ju(),k8=Bi(),T8=Ie().Buffer,C8=new Array(64);function pf(){this.init(),this._w=C8,k8.call(this,64,56)}q8(pf,I8);pf.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};pf.prototype._hash=function(){var t=T8.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};p1.exports=pf});var Qu=R((YR,x1)=>{"use strict";b();var O8=Si(),_1=Bi(),P8=Ie().Buffer,y1=[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],D8=new Array(160);function ka(){this.init(),this._w=D8,_1.call(this,128,112)}O8(ka,_1);ka.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};function g1(t,e,r){return r^t&(e^r)}function m1(t,e,r){return t&e|r&(t|e)}function b1(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function w1(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function U8(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function N8(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function L8(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function F8(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function nt(t,e){return t>>>0<e>>>0?1:0}ka.prototype._update=function(t){for(var e=this._w,r=this._ah|0,i=this._bh|0,n=this._ch|0,a=this._dh|0,f=this._eh|0,v=this._fh|0,m=this._gh|0,E=this._hh|0,A=this._al|0,q=this._bl|0,I=this._cl|0,C=this._dl|0,j=this._el|0,V=this._fl|0,X=this._gl|0,z=this._hl|0,$=0;$<32;$+=2)e[$]=t.readInt32BE($*4),e[$+1]=t.readInt32BE($*4+4);for(;$<160;$+=2){var Le=e[$-30],k=e[$-30+1],O=U8(Le,k),D=N8(k,Le);Le=e[$-4],k=e[$-4+1];var L=L8(Le,k),F=F8(k,Le),H=e[$-14],M=e[$-14+1],h=e[$-32],y=e[$-32+1],l=D+M|0,o=O+H+nt(l,D)|0;l=l+F|0,o=o+L+nt(l,F)|0,l=l+y|0,o=o+h+nt(l,y)|0,e[$]=o,e[$+1]=l}for(var s=0;s<160;s+=2){o=e[s],l=e[s+1];var d=m1(r,i,n),g=m1(A,q,I),p=b1(r,A),u=b1(A,r),w=w1(f,j),_=w1(j,f),c=y1[s],x=y1[s+1],P=g1(f,v,m),N=g1(j,V,X),U=z+_|0,W=E+w+nt(U,z)|0;U=U+N|0,W=W+P+nt(U,N)|0,U=U+x|0,W=W+c+nt(U,x)|0,U=U+l|0,W=W+o+nt(U,l)|0;var K=u+g|0,G=p+d+nt(K,u)|0;E=m,z=X,m=v,X=V,v=f,V=j,j=C+U|0,f=a+W+nt(j,C)|0,a=n,C=I,n=i,I=q,i=r,q=A,A=U+K|0,r=W+G+nt(A,U)|0}this._al=this._al+A|0,this._bl=this._bl+q|0,this._cl=this._cl+I|0,this._dl=this._dl+C|0,this._el=this._el+j|0,this._fl=this._fl+V|0,this._gl=this._gl+X|0,this._hl=this._hl+z|0,this._ah=this._ah+r+nt(this._al,A)|0,this._bh=this._bh+i+nt(this._bl,q)|0,this._ch=this._ch+n+nt(this._cl,I)|0,this._dh=this._dh+a+nt(this._dl,C)|0,this._eh=this._eh+f+nt(this._el,j)|0,this._fh=this._fh+v+nt(this._fl,V)|0,this._gh=this._gh+m+nt(this._gl,X)|0,this._hh=this._hh+E+nt(this._hl,z)|0};ka.prototype._hash=function(){var t=P8.allocUnsafe(64);function e(r,i,n){t.writeInt32BE(r,n),t.writeInt32BE(i,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};x1.exports=ka});var E1=R((JR,M1)=>{"use strict";b();var j8=Si(),H8=Qu(),K8=Bi(),W8=Ie().Buffer,z8=new Array(160);function vf(){this.init(),this._w=z8,K8.call(this,128,112)}j8(vf,H8);vf.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};vf.prototype._hash=function(){var t=W8.allocUnsafe(48);function e(r,i,n){t.writeInt32BE(r,n),t.writeInt32BE(i,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};M1.exports=vf});var yf=R((eq,gr)=>{"use strict";b();gr.exports=function(e){var r=e.toLowerCase(),i=gr.exports[r];if(!i)throw new Error(r+" is not supported (we accept pull requests)");return new i};gr.exports.sha=s1();gr.exports.sha1=l1();gr.exports.sha224=v1();gr.exports.sha256=Ju();gr.exports.sha384=E1();gr.exports.sha512=Qu()});var S1=R((rq,eh)=>{b();typeof Object.create=="function"?eh.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:eh.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e}}});var mr=R((nq,A1)=>{"use strict";b();var G8=Ie().Buffer,B1=qu().Transform,V8=on().StringDecoder,$8=S1(),Z8=pa();function Ct(t){B1.call(this),this.hashMode=typeof t=="string",this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}$8(Ct,B1);Ct.prototype.update=function(t,e,r){var i=Z8(t,e),n=this._update(i);return this.hashMode?this:(r&&(n=this._toString(n,r)),n)};Ct.prototype.setAutoPadding=function(){};Ct.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")};Ct.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")};Ct.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")};Ct.prototype._transform=function(t,e,r){var i;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(n){i=n}finally{r(i)}};Ct.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(r){e=r}t(e)};Ct.prototype._finalOrDigest=function(t){var e=this.__final()||G8.alloc(0);return t&&(e=this._toString(e,t,!0)),e};Ct.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new V8(e),this._encoding=e),this._encoding!==e)throw new Error("can\u2019t switch encodings");var i=this._decoder.write(t);return r&&(i+=this._decoder.end()),i};A1.exports=Ct});var Ta=R((oq,q1)=>{"use strict";b();var Y8=He(),X8=Jo(),J8=cf(),Q8=yf(),R1=mr();function gf(t){R1.call(this,"digest"),this._hash=t}Y8(gf,R1);gf.prototype._update=function(t){this._hash.update(t)};gf.prototype._final=function(){return this._hash.digest()};q1.exports=function(e){return e=e.toLowerCase(),e==="md5"?new X8:e==="rmd160"||e==="ripemd160"?new J8:new gf(Q8(e))}});var T1=R((sq,k1)=>{"use strict";b();var e5=He(),Ai=Ie().Buffer,I1=mr(),t5=Ai.alloc(128),pn=64;function mf(t,e){I1.call(this,"digest"),typeof e=="string"&&(e=Ai.from(e)),this._alg=t,this._key=e,e.length>pn?e=t(e):e.length<pn&&(e=Ai.concat([e,t5],pn));for(var r=this._ipad=Ai.allocUnsafe(pn),i=this._opad=Ai.allocUnsafe(pn),n=0;n<pn;n++)r[n]=e[n]^54,i[n]=e[n]^92;this._hash=[r]}e5(mf,I1);mf.prototype._update=function(t){this._hash.push(t)};mf.prototype._final=function(){var t=this._alg(Ai.concat(this._hash));return this._alg(Ai.concat([this._opad,t]))};k1.exports=mf});var th=R((hq,C1)=>{b();var r5=Jo();C1.exports=function(t){return new r5().update(t).digest()}});var D1=R((cq,P1)=>{"use strict";b();var i5=He(),n5=T1(),O1=mr(),Ca=Ie().Buffer,a5=th(),rh=cf(),ih=yf(),o5=Ca.alloc(128);function Oa(t,e){O1.call(this,"digest"),typeof e=="string"&&(e=Ca.from(e));var r=t==="sha512"||t==="sha384"?128:64;if(this._alg=t,this._key=e,e.length>r){var i=t==="rmd160"?new rh:ih(t);e=i.update(e).digest()}else e.length<r&&(e=Ca.concat([e,o5],r));for(var n=this._ipad=Ca.allocUnsafe(r),a=this._opad=Ca.allocUnsafe(r),f=0;f<r;f++)n[f]=e[f]^54,a[f]=e[f]^92;this._hash=t==="rmd160"?new rh:ih(t),this._hash.update(n)}i5(Oa,O1);Oa.prototype._update=function(t){this._hash.update(t)};Oa.prototype._final=function(){var t=this._hash.digest(),e=this._alg==="rmd160"?new rh:ih(this._alg);return e.update(this._opad).update(t).digest()};P1.exports=function(e,r){return e=e.toLowerCase(),e==="rmd160"||e==="ripemd160"?new Oa("rmd160",r):e==="md5"?new n5(a5,r):new Oa(e,r)}});var bf=R((pq,U1)=>{"use strict";b();U1.exports={}});var nh=R((yq,N1)=>{"use strict";b();var f5=isFinite,s5=Math.pow(2,30)-1;N1.exports=function(t,e){if(typeof t!="number")throw new TypeError("Iterations not a number");if(t<0||!f5(t))throw new TypeError("Bad iterations");if(typeof e!="number")throw new TypeError("Key length not a number");if(e<0||e>s5||e!==e)throw new TypeError("Bad key length")}});var ah=R((mq,F1)=>{"use strict";b();var wf;globalThis.process&&globalThis.process.browser?wf="utf-8":globalThis.process&&globalThis.process.version?(L1=parseInt(S.default.version.split(".")[0].slice(1),10),wf=L1>=6?"utf-8":"binary"):wf="utf-8";var L1;F1.exports=wf});var oh=R((wq,K1)=>{"use strict";b();var u5=Ie().Buffer,h5=pa(),H1=typeof Uint8Array<"u",l5=H1&&typeof ArrayBuffer<"u",j1=l5&&ArrayBuffer.isView;K1.exports=function(t,e,r){if(typeof t=="string"||u5.isBuffer(t)||H1&&t instanceof Uint8Array||j1&&j1(t))return h5(t,e);throw new TypeError(r+" must be a string, a Buffer, a Uint8Array, or a DataView")}});var fh=R((xq,V1)=>{"use strict";b();var c5=th(),d5=cf(),p5=yf(),Ri=Ie().Buffer,v5=nh(),W1=ah(),z1=oh(),y5=Ri.alloc(128),_f={__proto__:null,md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,"sha512-256":32,ripemd160:20,rmd160:20},g5={__proto__:null,"sha-1":"sha1","sha-224":"sha224","sha-256":"sha256","sha-384":"sha384","sha-512":"sha512","ripemd-160":"ripemd160"};function m5(t){return new d5().update(t).digest()}function b5(t){function e(r){return p5(t).update(r).digest()}return t==="rmd160"||t==="ripemd160"?m5:t==="md5"?c5:e}function G1(t,e,r){var i=b5(t),n=t==="sha512"||t==="sha384"?128:64;e.length>n?e=i(e):e.length<n&&(e=Ri.concat([e,y5],n));for(var a=Ri.allocUnsafe(n+_f[t]),f=Ri.allocUnsafe(n+_f[t]),v=0;v<n;v++)a[v]=e[v]^54,f[v]=e[v]^92;var m=Ri.allocUnsafe(n+r+4);a.copy(m,0,0,n),this.ipad1=m,this.ipad2=a,this.opad=f,this.alg=t,this.blocksize=n,this.hash=i,this.size=_f[t]}G1.prototype.run=function(t,e){t.copy(e,this.blocksize);var r=this.hash(e);return r.copy(this.opad,this.blocksize),this.hash(this.opad)};function w5(t,e,r,i,n){v5(r,i),t=z1(t,W1,"Password"),e=z1(e,W1,"Salt");var a=(n||"sha1").toLowerCase(),f=g5[a]||a,v=_f[f];if(typeof v!="number"||!v)throw new TypeError("Digest algorithm not supported: "+n);var m=new G1(f,t,e.length),E=Ri.allocUnsafe(i),A=Ri.allocUnsafe(e.length+4);e.copy(A,0,0,e.length);for(var q=0,I=v,C=Math.ceil(i/I),j=1;j<=C;j++){A.writeUInt32BE(j,e.length);for(var V=m.run(A,m.ipad1),X=V,z=1;z<r;z++){X=m.run(X,m.ipad2);for(var $=0;$<I;$++)V[$]^=X[$]}V.copy(E,q),q+=I}return E}V1.exports=w5});var ey=R((Eq,Q1)=>{"use strict";b();var X1=Ie().Buffer,_5=nh(),$1=ah(),Z1=fh(),Y1=oh(),xf,Pa=globalThis.crypto&&globalThis.crypto.subtle,x5={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"},sh=[],qi;function uh(){return qi||(globalThis.process&&globalThis.process.nextTick?qi=globalThis.process.nextTick:globalThis.queueMicrotask?qi=globalThis.queueMicrotask:globalThis.setImmediate?qi=globalThis.setImmediate:qi=globalThis.setTimeout,qi)}function J1(t,e,r,i,n){return Pa.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then(function(a){return Pa.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:n}},a,i<<3)}).then(function(a){return X1.from(a)})}function M5(t){if(globalThis.process&&!globalThis.process.browser||!Pa||!Pa.importKey||!Pa.deriveBits)return Promise.resolve(!1);if(sh[t]!==void 0)return sh[t];xf=xf||X1.alloc(8);var e=J1(xf,xf,10,128,t).then(function(){return!0},function(){return!1});return sh[t]=e,e}function E5(t,e){t.then(function(r){uh()(function(){e(null,r)})},function(r){uh()(function(){e(r)})})}Q1.exports=function(t,e,r,i,n,a){if(typeof n=="function"&&(a=n,n=void 0),_5(r,i),t=Y1(t,$1,"Password"),e=Y1(e,$1,"Salt"),typeof a!="function")throw new Error("No callback provided to pbkdf2");n=n||"sha1";var f=x5[n.toLowerCase()];if(!f||typeof globalThis.Promise!="function"){uh()(function(){var v;try{v=Z1(t,e,r,i,n)}catch(m){a(m);return}a(null,v)});return}E5(M5(f).then(function(v){return v?J1(t,e,r,i,f):Z1(t,e,r,i,n)}),a)}});var lh=R(hh=>{"use strict";b();hh.pbkdf2=ey();hh.pbkdf2Sync=fh()});var ch=R(Et=>{"use strict";b();Et.readUInt32BE=function(e,r){var i=e[0+r]<<24|e[1+r]<<16|e[2+r]<<8|e[3+r];return i>>>0};Et.writeUInt32BE=function(e,r,i){e[0+i]=r>>>24,e[1+i]=r>>>16&255,e[2+i]=r>>>8&255,e[3+i]=r&255};Et.ip=function(e,r,i,n){for(var a=0,f=0,v=6;v>=0;v-=2){for(var m=0;m<=24;m+=8)a<<=1,a|=r>>>m+v&1;for(var m=0;m<=24;m+=8)a<<=1,a|=e>>>m+v&1}for(var v=6;v>=0;v-=2){for(var m=1;m<=25;m+=8)f<<=1,f|=r>>>m+v&1;for(var m=1;m<=25;m+=8)f<<=1,f|=e>>>m+v&1}i[n+0]=a>>>0,i[n+1]=f>>>0};Et.rip=function(e,r,i,n){for(var a=0,f=0,v=0;v<4;v++)for(var m=24;m>=0;m-=8)a<<=1,a|=r>>>m+v&1,a<<=1,a|=e>>>m+v&1;for(var v=4;v<8;v++)for(var m=24;m>=0;m-=8)f<<=1,f|=r>>>m+v&1,f<<=1,f|=e>>>m+v&1;i[n+0]=a>>>0,i[n+1]=f>>>0};Et.pc1=function(e,r,i,n){for(var a=0,f=0,v=7;v>=5;v--){for(var m=0;m<=24;m+=8)a<<=1,a|=r>>m+v&1;for(var m=0;m<=24;m+=8)a<<=1,a|=e>>m+v&1}for(var m=0;m<=24;m+=8)a<<=1,a|=r>>m+v&1;for(var v=1;v<=3;v++){for(var m=0;m<=24;m+=8)f<<=1,f|=r>>m+v&1;for(var m=0;m<=24;m+=8)f<<=1,f|=e>>m+v&1}for(var m=0;m<=24;m+=8)f<<=1,f|=e>>m+v&1;i[n+0]=a>>>0,i[n+1]=f>>>0};Et.r28shl=function(e,r){return e<<r&268435455|e>>>28-r};var Mf=[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];Et.pc2=function(e,r,i,n){for(var a=0,f=0,v=Mf.length>>>1,m=0;m<v;m++)a<<=1,a|=e>>>Mf[m]&1;for(var m=v;m<Mf.length;m++)f<<=1,f|=r>>>Mf[m]&1;i[n+0]=a>>>0,i[n+1]=f>>>0};Et.expand=function(e,r,i){var n=0,a=0;n=(e&1)<<5|e>>>27;for(var f=23;f>=15;f-=4)n<<=6,n|=e>>>f&63;for(var f=11;f>=3;f-=4)a|=e>>>f&63,a<<=6;a|=(e&31)<<1|e>>>31,r[i+0]=n>>>0,r[i+1]=a>>>0};var ty=[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];Et.substitute=function(e,r){for(var i=0,n=0;n<4;n++){var a=e>>>18-n*6&63,f=ty[n*64+a];i<<=4,i|=f}for(var n=0;n<4;n++){var a=r>>>18-n*6&63,f=ty[256+n*64+a];i<<=4,i|=f}return i>>>0};var ry=[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];Et.permute=function(e){for(var r=0,i=0;i<ry.length;i++)r<<=1,r|=e>>>ry[i]&1;return r>>>0};Et.padSplit=function(e,r,i){for(var n=e.toString(2);n.length<r;)n="0"+n;for(var a=[],f=0;f<r;f+=i)a.push(n.slice(f,f+i));return a.join(" ")}});var Ot=R((Iq,ny)=>{b();ny.exports=iy;function iy(t,e){if(!t)throw new Error(e||"Assertion failed")}iy.equal=function(e,r,i){if(e!=r)throw new Error(i||"Assertion failed: "+e+" != "+r)}});var Ef=R((Tq,ay)=>{"use strict";b();var S5=Ot();function St(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=t.padding!==!1}ay.exports=St;St.prototype._init=function(){};St.prototype.update=function(e){return e.length===0?[]:this.type==="decrypt"?this._updateDecrypt(e):this._updateEncrypt(e)};St.prototype._buffer=function(e,r){for(var i=Math.min(this.buffer.length-this.bufferOff,e.length-r),n=0;n<i;n++)this.buffer[this.bufferOff+n]=e[r+n];return this.bufferOff+=i,i};St.prototype._flushBuffer=function(e,r){return this._update(this.buffer,0,e,r),this.bufferOff=0,this.blockSize};St.prototype._updateEncrypt=function(e){var r=0,i=0,n=(this.bufferOff+e.length)/this.blockSize|0,a=new Array(n*this.blockSize);this.bufferOff!==0&&(r+=this._buffer(e,r),this.bufferOff===this.buffer.length&&(i+=this._flushBuffer(a,i)));for(var f=e.length-(e.length-r)%this.blockSize;r<f;r+=this.blockSize)this._update(e,r,a,i),i+=this.blockSize;for(;r<e.length;r++,this.bufferOff++)this.buffer[this.bufferOff]=e[r];return a};St.prototype._updateDecrypt=function(e){for(var r=0,i=0,n=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,a=new Array(n*this.blockSize);n>0;n--)r+=this._buffer(e,r),i+=this._flushBuffer(a,i);return r+=this._buffer(e,r),a};St.prototype.final=function(e){var r;e&&(r=this.update(e));var i;return this.type==="encrypt"?i=this._finalEncrypt():i=this._finalDecrypt(),r?r.concat(i):i};St.prototype._pad=function(e,r){if(r===0)return!1;for(;r<e.length;)e[r++]=0;return!0};St.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};St.prototype._unpad=function(e){return e};St.prototype._finalDecrypt=function(){S5.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}});var dh=R((Oq,sy)=>{"use strict";b();var oy=Ot(),B5=He(),tt=ch(),fy=Ef();function A5(){this.tmp=new Array(2),this.keys=null}function Qt(t){fy.call(this,t);var e=new A5;this._desState=e,this.deriveKeys(e,t.key)}B5(Qt,fy);sy.exports=Qt;Qt.create=function(e){return new Qt(e)};var R5=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];Qt.prototype.deriveKeys=function(e,r){e.keys=new Array(32),oy.equal(r.length,this.blockSize,"Invalid key length");var i=tt.readUInt32BE(r,0),n=tt.readUInt32BE(r,4);tt.pc1(i,n,e.tmp,0),i=e.tmp[0],n=e.tmp[1];for(var a=0;a<e.keys.length;a+=2){var f=R5[a>>>1];i=tt.r28shl(i,f),n=tt.r28shl(n,f),tt.pc2(i,n,e.keys,a)}};Qt.prototype._update=function(e,r,i,n){var a=this._desState,f=tt.readUInt32BE(e,r),v=tt.readUInt32BE(e,r+4);tt.ip(f,v,a.tmp,0),f=a.tmp[0],v=a.tmp[1],this.type==="encrypt"?this._encrypt(a,f,v,a.tmp,0):this._decrypt(a,f,v,a.tmp,0),f=a.tmp[0],v=a.tmp[1],tt.writeUInt32BE(i,f,n),tt.writeUInt32BE(i,v,n+4)};Qt.prototype._pad=function(e,r){if(this.padding===!1)return!1;for(var i=e.length-r,n=r;n<e.length;n++)e[n]=i;return!0};Qt.prototype._unpad=function(e){if(this.padding===!1)return e;for(var r=e[e.length-1],i=e.length-r;i<e.length;i++)oy.equal(e[i],r);return e.slice(0,e.length-r)};Qt.prototype._encrypt=function(e,r,i,n,a){for(var f=r,v=i,m=0;m<e.keys.length;m+=2){var E=e.keys[m],A=e.keys[m+1];tt.expand(v,e.tmp,0),E^=e.tmp[0],A^=e.tmp[1];var q=tt.substitute(E,A),I=tt.permute(q),C=v;v=(f^I)>>>0,f=C}tt.rip(v,f,n,a)};Qt.prototype._decrypt=function(e,r,i,n,a){for(var f=i,v=r,m=e.keys.length-2;m>=0;m-=2){var E=e.keys[m],A=e.keys[m+1];tt.expand(f,e.tmp,0),E^=e.tmp[0],A^=e.tmp[1];var q=tt.substitute(E,A),I=tt.permute(q),C=f;f=(v^I)>>>0,v=C}tt.rip(f,v,n,a)}});var hy=R(uy=>{"use strict";b();var q5=Ot(),I5=He(),Sf={};function k5(t){q5.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}function T5(t){function e(a){t.call(this,a),this._cbcInit()}I5(e,t);for(var r=Object.keys(Sf),i=0;i<r.length;i++){var n=r[i];e.prototype[n]=Sf[n]}return e.create=function(f){return new e(f)},e}uy.instantiate=T5;Sf._cbcInit=function(){var e=new k5(this.options.iv);this._cbcState=e};Sf._update=function(e,r,i,n){var a=this._cbcState,f=this.constructor.super_.prototype,v=a.iv;if(this.type==="encrypt"){for(var m=0;m<this.blockSize;m++)v[m]^=e[r+m];f._update.call(this,v,0,i,n);for(var m=0;m<this.blockSize;m++)v[m]=i[n+m]}else{f._update.call(this,e,r,i,n);for(var m=0;m<this.blockSize;m++)i[n+m]^=v[m];for(var m=0;m<this.blockSize;m++)v[m]=e[r+m]}}});var dy=R((Nq,cy)=>{"use strict";b();var C5=Ot(),O5=He(),ly=Ef(),Nr=dh();function P5(t,e){C5.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),i=e.slice(8,16),n=e.slice(16,24);t==="encrypt"?this.ciphers=[Nr.create({type:"encrypt",key:r}),Nr.create({type:"decrypt",key:i}),Nr.create({type:"encrypt",key:n})]:this.ciphers=[Nr.create({type:"decrypt",key:n}),Nr.create({type:"encrypt",key:i}),Nr.create({type:"decrypt",key:r})]}function Ii(t){ly.call(this,t);var e=new P5(this.type,this.options.key);this._edeState=e}O5(Ii,ly);cy.exports=Ii;Ii.create=function(e){return new Ii(e)};Ii.prototype._update=function(e,r,i,n){var a=this._edeState;a.ciphers[0]._update(e,r,i,n),a.ciphers[1]._update(i,n,i,n),a.ciphers[2]._update(i,n,i,n)};Ii.prototype._pad=Nr.prototype._pad;Ii.prototype._unpad=Nr.prototype._unpad});var py=R(vn=>{"use strict";b();vn.utils=ch();vn.Cipher=Ef();vn.DES=dh();vn.CBC=hy();vn.EDE=dy()});var gy=R((Hq,yy)=>{b();var vy=mr(),br=py(),D5=He(),ki=Ie().Buffer,Da={"des-ede3-cbc":br.CBC.instantiate(br.EDE),"des-ede3":br.EDE,"des-ede-cbc":br.CBC.instantiate(br.EDE),"des-ede":br.EDE,"des-cbc":br.CBC.instantiate(br.DES),"des-ecb":br.DES};Da.des=Da["des-cbc"];Da.des3=Da["des-ede3-cbc"];yy.exports=Bf;D5(Bf,vy);function Bf(t){vy.call(this);var e=t.mode.toLowerCase(),r=Da[e],i;t.decrypt?i="decrypt":i="encrypt";var n=t.key;ki.isBuffer(n)||(n=ki.from(n)),(e==="des-ede"||e==="des-ede-cbc")&&(n=ki.concat([n,n.slice(0,8)]));var a=t.iv;ki.isBuffer(a)||(a=ki.from(a)),this._des=r.create({key:n,iv:a,type:i})}Bf.prototype._update=function(t){return ki.from(this._des.update(t))};Bf.prototype._final=function(){return ki.from(this._des.final())}});var my=R(ph=>{b();ph.encrypt=function(t,e){return t._cipher.encryptBlock(e)};ph.decrypt=function(t,e){return t._cipher.decryptBlock(e)}});var yn=R((Gq,by)=>{b();by.exports=function(e,r){for(var i=Math.min(e.length,r.length),n=new B.Buffer(i),a=0;a<i;++a)n[a]=e[a]^r[a];return n}});var _y=R(vh=>{b();var wy=yn();vh.encrypt=function(t,e){var r=wy(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev};vh.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return wy(i,r)}});var Ey=R(My=>{b();var Ua=Ie().Buffer,U5=yn();function xy(t,e,r){var i=e.length,n=U5(e,t._cache);return t._cache=t._cache.slice(i),t._prev=Ua.concat([t._prev,r?e:n]),n}My.encrypt=function(t,e,r){for(var i=Ua.allocUnsafe(0),n;e.length;)if(t._cache.length===0&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=Ua.allocUnsafe(0)),t._cache.length<=e.length)n=t._cache.length,i=Ua.concat([i,xy(t,e.slice(0,n),r)]),e=e.slice(n);else{i=Ua.concat([i,xy(t,e,r)]);break}return i}});var By=R(Sy=>{b();var yh=Ie().Buffer;function N5(t,e,r){var i=t._cipher.encryptBlock(t._prev),n=i[0]^e;return t._prev=yh.concat([t._prev.slice(1),yh.from([r?e:n])]),n}Sy.encrypt=function(t,e,r){for(var i=e.length,n=yh.allocUnsafe(i),a=-1;++a<i;)n[a]=N5(t,e[a],r);return n}});var Ry=R(Ay=>{b();var Af=Ie().Buffer;function L5(t,e,r){for(var i,n=-1,a=8,f=0,v,m;++n<a;)i=t._cipher.encryptBlock(t._prev),v=e&1<<7-n?128:0,m=i[0]^v,f+=(m&128)>>n%8,t._prev=F5(t._prev,r?v:m);return f}function F5(t,e){var r=t.length,i=-1,n=Af.allocUnsafe(t.length);for(t=Af.concat([t,Af.from([e])]);++i<r;)n[i]=t[i]<<1|t[i+1]>>7;return n}Ay.encrypt=function(t,e,r){for(var i=e.length,n=Af.allocUnsafe(i),a=-1;++a<i;)n[a]=L5(t,e[a],r);return n}});var Iy=R(qy=>{b();var j5=yn();function H5(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}qy.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=B.Buffer.concat([t._cache,H5(t)]);var r=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),j5(e,r)}});var gh=R((nI,ky)=>{b();function K5(t){for(var e=t.length,r;e--;)if(r=t.readUInt8(e),r===255)t.writeUInt8(0,e);else{r++,t.writeUInt8(r,e);break}}ky.exports=K5});var bh=R(Cy=>{b();var W5=yn(),Ty=Ie().Buffer,z5=gh();function G5(t){var e=t._cipher.encryptBlockRaw(t._prev);return z5(t._prev),e}var mh=16;Cy.encrypt=function(t,e){var r=Math.ceil(e.length/mh),i=t._cache.length;t._cache=Ty.concat([t._cache,Ty.allocUnsafe(r*mh)]);for(var n=0;n<r;n++){var a=G5(t),f=i+n*mh;t._cache.writeUInt32BE(a[0],f+0),t._cache.writeUInt32BE(a[1],f+4),t._cache.writeUInt32BE(a[2],f+8),t._cache.writeUInt32BE(a[3],f+12)}var v=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),W5(e,v)}});var wh=R((sI,V5)=>{V5.exports={"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"}}});var qf=R((uI,Oy)=>{b();var $5={ECB:my(),CBC:_y(),CFB:Ey(),CFB8:By(),CFB1:Ry(),OFB:Iy(),CTR:bh(),GCM:bh()},Rf=wh();for(_h in Rf)Rf[_h].module=$5[Rf[_h].mode];var _h;Oy.exports=Rf});var Na=R((lI,Dy)=>{b();var If=Ie().Buffer;function Mh(t){If.isBuffer(t)||(t=If.from(t));for(var e=t.length/4|0,r=new Array(e),i=0;i<e;i++)r[i]=t.readUInt32BE(i*4);return r}function xh(t){for(var e=0;e<t.length;t++)t[e]=0}function Py(t,e,r,i,n){for(var a=r[0],f=r[1],v=r[2],m=r[3],E=t[0]^e[0],A=t[1]^e[1],q=t[2]^e[2],I=t[3]^e[3],C,j,V,X,z=4,$=1;$<n;$++)C=a[E>>>24]^f[A>>>16&255]^v[q>>>8&255]^m[I&255]^e[z++],j=a[A>>>24]^f[q>>>16&255]^v[I>>>8&255]^m[E&255]^e[z++],V=a[q>>>24]^f[I>>>16&255]^v[E>>>8&255]^m[A&255]^e[z++],X=a[I>>>24]^f[E>>>16&255]^v[A>>>8&255]^m[q&255]^e[z++],E=C,A=j,q=V,I=X;return C=(i[E>>>24]<<24|i[A>>>16&255]<<16|i[q>>>8&255]<<8|i[I&255])^e[z++],j=(i[A>>>24]<<24|i[q>>>16&255]<<16|i[I>>>8&255]<<8|i[E&255])^e[z++],V=(i[q>>>24]<<24|i[I>>>16&255]<<16|i[E>>>8&255]<<8|i[A&255])^e[z++],X=(i[I>>>24]<<24|i[E>>>16&255]<<16|i[A>>>8&255]<<8|i[q&255])^e[z++],C=C>>>0,j=j>>>0,V=V>>>0,X=X>>>0,[C,j,V,X]}var Z5=[0,1,2,4,8,16,32,64,128,27,54],Xe=(function(){for(var t=new Array(256),e=0;e<256;e++)e<128?t[e]=e<<1:t[e]=e<<1^283;for(var r=[],i=[],n=[[],[],[],[]],a=[[],[],[],[]],f=0,v=0,m=0;m<256;++m){var E=v^v<<1^v<<2^v<<3^v<<4;E=E>>>8^E&255^99,r[f]=E,i[E]=f;var A=t[f],q=t[A],I=t[q],C=t[E]*257^E*16843008;n[0][f]=C<<24|C>>>8,n[1][f]=C<<16|C>>>16,n[2][f]=C<<8|C>>>24,n[3][f]=C,C=I*16843009^q*65537^A*257^f*16843008,a[0][E]=C<<24|C>>>8,a[1][E]=C<<16|C>>>16,a[2][E]=C<<8|C>>>24,a[3][E]=C,f===0?f=v=1:(f=A^t[t[t[I^A]]],v^=t[t[v]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:a}})();function Bt(t){this._key=Mh(t),this._reset()}Bt.blockSize=16;Bt.keySize=256/8;Bt.prototype.blockSize=Bt.blockSize;Bt.prototype.keySize=Bt.keySize;Bt.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,i=(r+1)*4,n=[],a=0;a<e;a++)n[a]=t[a];for(a=e;a<i;a++){var f=n[a-1];a%e===0?(f=f<<8|f>>>24,f=Xe.SBOX[f>>>24]<<24|Xe.SBOX[f>>>16&255]<<16|Xe.SBOX[f>>>8&255]<<8|Xe.SBOX[f&255],f^=Z5[a/e|0]<<24):e>6&&a%e===4&&(f=Xe.SBOX[f>>>24]<<24|Xe.SBOX[f>>>16&255]<<16|Xe.SBOX[f>>>8&255]<<8|Xe.SBOX[f&255]),n[a]=n[a-e]^f}for(var v=[],m=0;m<i;m++){var E=i-m,A=n[E-(m%4?0:4)];m<4||E<=4?v[m]=A:v[m]=Xe.INV_SUB_MIX[0][Xe.SBOX[A>>>24]]^Xe.INV_SUB_MIX[1][Xe.SBOX[A>>>16&255]]^Xe.INV_SUB_MIX[2][Xe.SBOX[A>>>8&255]]^Xe.INV_SUB_MIX[3][Xe.SBOX[A&255]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=v};Bt.prototype.encryptBlockRaw=function(t){return t=Mh(t),Py(t,this._keySchedule,Xe.SUB_MIX,Xe.SBOX,this._nRounds)};Bt.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=If.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r};Bt.prototype.decryptBlock=function(t){t=Mh(t);var e=t[1];t[1]=t[3],t[3]=e;var r=Py(t,this._invKeySchedule,Xe.INV_SUB_MIX,Xe.INV_SBOX,this._nRounds),i=If.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i};Bt.prototype.scrub=function(){xh(this._keySchedule),xh(this._invKeySchedule),xh(this._key)};Dy.exports.AES=Bt});var Ly=R((dI,Ny)=>{b();var gn=Ie().Buffer,Y5=gn.alloc(16,0);function X5(t){return[t.readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)]}function Uy(t){var e=gn.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function La(t){this.h=t,this.state=gn.alloc(16,0),this.cache=gn.allocUnsafe(0)}La.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()};La.prototype._multiply=function(){for(var t=X5(this.h),e=[0,0,0,0],r,i,n,a=-1;++a<128;){for(i=(this.state[~~(a/8)]&1<<7-a%8)!==0,i&&(e[0]^=t[0],e[1]^=t[1],e[2]^=t[2],e[3]^=t[3]),n=(t[3]&1)!==0,r=3;r>0;r--)t[r]=t[r]>>>1|(t[r-1]&1)<<31;t[0]=t[0]>>>1,n&&(t[0]=t[0]^225<<24)}this.state=Uy(e)};La.prototype.update=function(t){this.cache=gn.concat([this.cache,t]);for(var e;this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)};La.prototype.final=function(t,e){return this.cache.length&&this.ghash(gn.concat([this.cache,Y5],16)),this.ghash(Uy([0,t,0,e])),this.state};Ny.exports=La});var Eh=R((vI,Hy)=>{b();var J5=Na(),yt=Ie().Buffer,Fy=mr(),Q5=He(),jy=Ly(),eM=yn(),tM=gh();function rM(t,e){var r=0;t.length!==e.length&&r++;for(var i=Math.min(t.length,e.length),n=0;n<i;++n)r+=t[n]^e[n];return r}function iM(t,e,r){if(e.length===12)return t._finID=yt.concat([e,yt.from([0,0,0,1])]),yt.concat([e,yt.from([0,0,0,2])]);var i=new jy(r),n=e.length,a=n%16;i.update(e),a&&(a=16-a,i.update(yt.alloc(a,0))),i.update(yt.alloc(8,0));var f=n*8,v=yt.alloc(8);v.writeUIntBE(f,0,8),i.update(v),t._finID=i.state;var m=yt.from(t._finID);return tM(m),m}function Ti(t,e,r,i){Fy.call(this);var n=yt.alloc(4,0);this._cipher=new J5.AES(e);var a=this._cipher.encryptBlock(n);this._ghash=new jy(a),r=iM(this,r,a),this._prev=yt.from(r),this._cache=yt.allocUnsafe(0),this._secCache=yt.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}Q5(Ti,Fy);Ti.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=yt.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r};Ti.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=eM(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&rM(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()};Ti.prototype.getAuthTag=function(){if(this._decrypt||!yt.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag};Ti.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e};Ti.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};Hy.exports=Ti});var Bh=R((gI,Wy)=>{b();var nM=Na(),Sh=Ie().Buffer,Ky=mr(),aM=He();function kf(t,e,r,i){Ky.call(this),this._cipher=new nM.AES(e),this._prev=Sh.from(r),this._cache=Sh.allocUnsafe(0),this._secCache=Sh.allocUnsafe(0),this._decrypt=i,this._mode=t}aM(kf,Ky);kf.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)};kf.prototype._final=function(){this._cipher.scrub()};Wy.exports=kf});var Fa=R((bI,zy)=>{b();var Ci=Ie().Buffer,oM=Jo();function fM(t,e,r,i){if(Ci.isBuffer(t)||(t=Ci.from(t,"binary")),e&&(Ci.isBuffer(e)||(e=Ci.from(e,"binary")),e.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var n=r/8,a=Ci.alloc(n),f=Ci.alloc(i||0),v=Ci.alloc(0);n>0||i>0;){var m=new oM;m.update(v),m.update(t),e&&m.update(e),v=m.digest();var E=0;if(n>0){var A=a.length-n;E=Math.min(n,v.length),v.copy(a,A,0,E),n-=E}if(E<v.length&&i>0){var q=f.length-i,I=Math.min(i,v.length-E);v.copy(f,q,E,E+I),i-=I}}return v.fill(0),{key:a,iv:f}}zy.exports=fM});var Zy=R(Ah=>{b();var Gy=qf(),sM=Eh(),wr=Ie().Buffer,uM=Bh(),Vy=mr(),hM=Na(),lM=Fa(),cM=He();function ja(t,e,r){Vy.call(this),this._cache=new Tf,this._cipher=new hM.AES(e),this._prev=wr.from(r),this._mode=t,this._autopadding=!0}cM(ja,Vy);ja.prototype._update=function(t){this._cache.add(t);for(var e,r,i=[];e=this._cache.get();)r=this._mode.encrypt(this,e),i.push(r);return wr.concat(i)};var dM=wr.alloc(16,16);ja.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(dM))throw this._cipher.scrub(),new Error("data not multiple of block length")};ja.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function Tf(){this.cache=wr.allocUnsafe(0)}Tf.prototype.add=function(t){this.cache=wr.concat([this.cache,t])};Tf.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null};Tf.prototype.flush=function(){for(var t=16-this.cache.length,e=wr.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return wr.concat([this.cache,e])};function $y(t,e,r){var i=Gy[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof e=="string"&&(e=wr.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);if(typeof r=="string"&&(r=wr.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return i.type==="stream"?new uM(i.module,e,r):i.type==="auth"?new sM(i.module,e,r):new ja(i.module,e,r)}function pM(t,e){var r=Gy[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=lM(e,!1,r.key,r.iv);return $y(t,i.key,i.iv)}Ah.createCipheriv=$y;Ah.createCipher=pM});var Qy=R(Rh=>{b();var vM=Eh(),mn=Ie().Buffer,Yy=qf(),yM=Bh(),Xy=mr(),gM=Na(),mM=Fa(),bM=He();function Ha(t,e,r){Xy.call(this),this._cache=new Cf,this._last=void 0,this._cipher=new gM.AES(e),this._prev=mn.from(r),this._mode=t,this._autopadding=!0}bM(Ha,Xy);Ha.prototype._update=function(t){this._cache.add(t);for(var e,r,i=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),i.push(r);return mn.concat(i)};Ha.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return wM(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")};Ha.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this};function Cf(){this.cache=mn.allocUnsafe(0)}Cf.prototype.add=function(t){this.cache=mn.concat([this.cache,t])};Cf.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null};Cf.prototype.flush=function(){if(this.cache.length)return this.cache};function wM(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");for(var r=-1;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(e!==16)return t.slice(0,16-e)}function Jy(t,e,r){var i=Yy[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if(typeof r=="string"&&(r=mn.from(r)),i.mode!=="GCM"&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);if(typeof e=="string"&&(e=mn.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);return i.type==="stream"?new yM(i.module,e,r,!0):i.type==="auth"?new vM(i.module,e,r,!0):new Ha(i.module,e,r)}function _M(t,e){var r=Yy[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=mM(e,!1,r.key,r.iv);return Jy(t,i.key,i.iv)}Rh.createDecipher=_M;Rh.createDecipheriv=Jy});var Of=R(Pt=>{b();var eg=Zy(),tg=Qy(),xM=wh();function MM(){return Object.keys(xM)}Pt.createCipher=Pt.Cipher=eg.createCipher;Pt.createCipheriv=Pt.Cipheriv=eg.createCipheriv;Pt.createDecipher=Pt.Decipher=tg.createDecipher;Pt.createDecipheriv=Pt.Decipheriv=tg.createDecipheriv;Pt.listCiphers=Pt.getCiphers=MM});var rg=R(_r=>{b();_r["des-ecb"]={key:8,iv:0};_r["des-cbc"]=_r.des={key:8,iv:8};_r["des-ede3-cbc"]=_r.des3={key:24,iv:8};_r["des-ede3"]={key:24,iv:0};_r["des-ede-cbc"]={key:16,iv:8};_r["des-ede"]={key:16,iv:0}});var fg=R(Dt=>{b();var ig=gy(),qh=Of(),Lr=qf(),xr=rg(),ng=Fa();function EM(t,e){t=t.toLowerCase();var r,i;if(Lr[t])r=Lr[t].key,i=Lr[t].iv;else if(xr[t])r=xr[t].key*8,i=xr[t].iv;else throw new TypeError("invalid suite type");var n=ng(e,!1,r,i);return ag(t,n.key,n.iv)}function SM(t,e){t=t.toLowerCase();var r,i;if(Lr[t])r=Lr[t].key,i=Lr[t].iv;else if(xr[t])r=xr[t].key*8,i=xr[t].iv;else throw new TypeError("invalid suite type");var n=ng(e,!1,r,i);return og(t,n.key,n.iv)}function ag(t,e,r){if(t=t.toLowerCase(),Lr[t])return qh.createCipheriv(t,e,r);if(xr[t])return new ig({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function og(t,e,r){if(t=t.toLowerCase(),Lr[t])return qh.createDecipheriv(t,e,r);if(xr[t])return new ig({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}function BM(){return Object.keys(xr).concat(qh.getCiphers())}Dt.createCipher=Dt.Cipher=EM;Dt.createCipheriv=Dt.Cipheriv=ag;Dt.createDecipher=Dt.Decipher=SM;Dt.createDecipheriv=Dt.Decipheriv=og;Dt.listCiphers=Dt.getCiphers=BM});var sg=R((kI,Th)=>{b();var Ih;Th.exports=function(e){return Ih||(Ih=new Fr(null)),Ih.generate(e)};function Fr(t){this.rand=t}Th.exports.Rand=Fr;Fr.prototype.generate=function(e){return this._rand(e)};Fr.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var r=new Uint8Array(e),i=0;i<r.length;i++)r[i]=this.rand.getByte();return r};if(typeof self=="object")self.crypto&&self.crypto.getRandomValues?Fr.prototype._rand=function(e){var r=new Uint8Array(e);return self.crypto.getRandomValues(r),r}:self.msCrypto&&self.msCrypto.getRandomValues?Fr.prototype._rand=function(e){var r=new Uint8Array(e);return self.msCrypto.getRandomValues(r),r}:typeof window=="object"&&(Fr.prototype._rand=function(){throw new Error("Not implemented yet")});else try{if(kh=Ka(),typeof kh.randomBytes!="function")throw new Error("Not supported");Fr.prototype._rand=function(e){return kh.randomBytes(e)}}catch{}var kh});var Ch=R((CI,ug)=>{b();var Oi=lr(),AM=sg();function Pi(t){this.rand=t||new AM.Rand}ug.exports=Pi;Pi.create=function(e){return new Pi(e)};Pi.prototype._randbelow=function(e){var r=e.bitLength(),i=Math.ceil(r/8);do var n=new Oi(this.rand.generate(i));while(n.cmp(e)>=0);return n};Pi.prototype._randrange=function(e,r){var i=r.sub(e);return e.add(this._randbelow(i))};Pi.prototype.test=function(e,r,i){var n=e.bitLength(),a=Oi.mont(e),f=new Oi(1).toRed(a);r||(r=Math.max(1,n/48|0));for(var v=e.subn(1),m=0;!v.testn(m);m++);for(var E=e.shrn(m),A=v.toRed(a),q=!0;r>0;r--){var I=this._randrange(new Oi(2),v);i&&i(I);var C=I.toRed(a).redPow(E);if(!(C.cmp(f)===0||C.cmp(A)===0)){for(var j=1;j<m;j++){if(C=C.redSqr(),C.cmp(f)===0)return!1;if(C.cmp(A)===0)break}if(j===m)return!1}}return q};Pi.prototype.getDivisor=function(e,r){var i=e.bitLength(),n=Oi.mont(e),a=new Oi(1).toRed(n);r||(r=Math.max(1,i/48|0));for(var f=e.subn(1),v=0;!f.testn(v);v++);for(var m=e.shrn(v),E=f.toRed(n);r>0;r--){var A=this._randrange(new Oi(2),f),q=e.gcd(A);if(q.cmpn(1)!==0)return q;var I=A.toRed(n).redPow(m);if(!(I.cmp(a)===0||I.cmp(E)===0)){for(var C=1;C<v;C++){if(I=I.redSqr(),I.cmp(a)===0)return I.fromRed().subn(1).gcd(e);if(I.cmp(E)===0)break}if(C===v)return I=I.redSqr(),I.fromRed().subn(1).gcd(e)}}return!1}});var Lh=R((LI,cg)=>{b();var RM=ui();cg.exports=Nh;Nh.simpleSieve=Dh;Nh.fermatTest=Uh;var at=lr(),qM=new at(24),IM=Ch(),hg=new IM,kM=new at(1),Ph=new at(2),TM=new at(5),PI=new at(16),DI=new at(8),CM=new at(10),OM=new at(3),UI=new at(7),PM=new at(11),lg=new at(4),NI=new at(12),Oh=null;function DM(){if(Oh!==null)return Oh;var t=1048576,e=[];e[0]=2;for(var r=1,i=3;i<t;i+=2){for(var n=Math.ceil(Math.sqrt(i)),a=0;a<r&&e[a]<=n&&i%e[a]!==0;a++);r!==a&&e[a]<=n||(e[r++]=i)}return Oh=e,e}function Dh(t){for(var e=DM(),r=0;r<e.length;r++)if(t.modn(e[r])===0)return t.cmpn(e[r])===0;return!0}function Uh(t){var e=at.mont(t);return Ph.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)===0}function Nh(t,e){if(t<16)return e===2||e===5?new at([140,123]):new at([140,39]);e=new at(e);for(var r,i;;){for(r=new at(RM(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(kM),r.testn(1)||r.iadd(Ph),e.cmp(Ph)){if(!e.cmp(TM))for(;r.mod(CM).cmp(OM);)r.iadd(lg)}else for(;r.mod(qM).cmp(PM);)r.iadd(lg);if(i=r.shrn(1),Dh(i)&&Dh(r)&&Uh(i)&&Uh(r)&&hg.test(i)&&hg.test(r))return r}}});var dg=R((jI,UM)=>{UM.exports={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"}}});var gg=R((HI,yg)=>{b();var At=lr(),NM=Ch(),pg=new NM,LM=new At(24),FM=new At(11),jM=new At(10),HM=new At(3),KM=new At(7),vg=Lh(),WM=ui();yg.exports=Mr;function zM(t,e){return e=e||"utf8",B.Buffer.isBuffer(t)||(t=new B.Buffer(t,e)),this._pub=new At(t),this}function GM(t,e){return e=e||"utf8",B.Buffer.isBuffer(t)||(t=new B.Buffer(t,e)),this._priv=new At(t),this}var Pf={};function VM(t,e){var r=e.toString("hex"),i=[r,t.toString(16)].join("_");if(i in Pf)return Pf[i];var n=0;if(t.isEven()||!vg.simpleSieve||!vg.fermatTest(t)||!pg.test(t))return n+=1,r==="02"||r==="05"?n+=8:n+=4,Pf[i]=n,n;pg.test(t.shrn(1))||(n+=2);var a;switch(r){case"02":t.mod(LM).cmp(FM)&&(n+=8);break;case"05":a=t.mod(jM),a.cmp(HM)&&a.cmp(KM)&&(n+=8);break;default:n+=4}return Pf[i]=n,n}function Mr(t,e,r){this.setGenerator(e),this.__prime=new At(t),this._prime=At.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=zM,this.setPrivateKey=GM):this._primeCode=8}Object.defineProperty(Mr.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=VM(this.__prime,this.__gen)),this._primeCode}});Mr.prototype.generateKeys=function(){return this._priv||(this._priv=new At(WM(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()};Mr.prototype.computeSecret=function(t){t=new At(t),t=t.toRed(this._prime);var e=t.redPow(this._priv).fromRed(),r=new B.Buffer(e.toArray()),i=this.getPrime();if(r.length<i.length){var n=new B.Buffer(i.length-r.length);n.fill(0),r=B.Buffer.concat([n,r])}return r};Mr.prototype.getPublicKey=function(e){return Df(this._pub,e)};Mr.prototype.getPrivateKey=function(e){return Df(this._priv,e)};Mr.prototype.getPrime=function(t){return Df(this.__prime,t)};Mr.prototype.getGenerator=function(t){return Df(this._gen,t)};Mr.prototype.setGenerator=function(t,e){return e=e||"utf8",B.Buffer.isBuffer(t)||(t=new B.Buffer(t,e)),this.__gen=t,this._gen=new At(t),this};function Df(t,e){var r=new B.Buffer(t.toArray());return e?r.toString(e):r}});var wg=R(bn=>{b();var $M=Lh(),mg=dg(),Fh=gg();function ZM(t){var e=new B.Buffer(mg[t].prime,"hex"),r=new B.Buffer(mg[t].gen,"hex");return new Fh(e,r)}var YM={binary:!0,hex:!0,base64:!0};function bg(t,e,r,i){return B.Buffer.isBuffer(e)||YM[e]===void 0?bg(t,"binary",e,r):(e=e||"binary",i=i||"binary",r=r||new B.Buffer([2]),B.Buffer.isBuffer(r)||(r=new B.Buffer(r,i)),typeof t=="number"?new Fh($M(t,r),r,!0):(B.Buffer.isBuffer(t)||(t=new B.Buffer(t,e)),new Fh(t,r,!0)))}bn.DiffieHellmanGroup=bn.createDiffieHellmanGroup=bn.getDiffieHellman=ZM;bn.createDiffieHellman=bn.DiffieHellman=bg});var _g=R((exports,module)=>{b();var indexOf=function(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0;r<t.length;r++)if(t[r]===e)return r;return-1},Object_keys=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var r in t)e.push(r);return e},forEach=function(t,e){if(t.forEach)return t.forEach(e);for(var r=0;r<t.length;r++)e(t[r],r,t)},defineProp=(function(){try{return Object.defineProperty({},"_",{}),function(t,e,r){Object.defineProperty(t,e,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch{return function(e,r,i){e[r]=i}}})(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(t){if(!(t instanceof Context))throw new TypeError("needs a 'context' argument.");var e=document.createElement("iframe");e.style||(e.style={}),e.style.display="none",document.body.appendChild(e);var r=e.contentWindow,i=r.eval,n=r.execScript;!i&&n&&(n.call(r,"null"),i=r.eval),forEach(Object_keys(t),function(v){r[v]=t[v]}),forEach(globals,function(v){t[v]&&(r[v]=t[v])});var a=Object_keys(r),f=i.call(r,this.code);return forEach(Object_keys(r),function(v){(v in t||indexOf(a,v)===-1)&&(t[v]=r[v])}),forEach(globals,function(v){v in t||defineProp(t,v,r[v])}),document.body.removeChild(e),f};Script.prototype.runInThisContext=function(){return eval(this.code)};Script.prototype.runInNewContext=function(t){var e=Script.createContext(t),r=this.runInContext(e);return t&&forEach(Object_keys(e),function(i){t[i]=e[i]}),r};forEach(Object_keys(Script.prototype),function(t){exports[t]=Script[t]=function(e){var r=Script(e);return r[t].apply(r,[].slice.call(arguments,1))}});exports.isContext=function(t){return t instanceof Context};exports.createScript=function(t){return exports.Script(t)};exports.createContext=Script.createContext=function(t){var e=new Context;return typeof t=="object"&&forEach(Object_keys(t),function(r){e[r]=t[r]}),e}});var Eg=R(Mg=>{b();var xg=_n(),XM=He(),JM=Mg;JM.define=function(e,r){return new wn(e,r)};function wn(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}wn.prototype._createNamed=function(e){var r;try{r=_g().runInThisContext("(function "+this.name+`(entity) {
12
+ this._initNamed(entity);
13
+ })`)}catch{r=function(n){this._initNamed(n)}}return XM(r,e),r.prototype._initNamed=function(n){e.call(this,n)},new r(this)};wn.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(xg.decoders[e])),this.decoders[e]};wn.prototype.decode=function(e,r,i){return this._getDecoder(r).decode(e,i)};wn.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(xg.encoders[e])),this.encoders[e]};wn.prototype.encode=function(e,r,i){return this._getEncoder(r).encode(e,i)}});var Bg=R(Sg=>{b();var QM=He();function Rt(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}Sg.Reporter=Rt;Rt.prototype.isError=function(e){return e instanceof xn};Rt.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}};Rt.prototype.restore=function(e){var r=this._reporterState;r.obj=e.obj,r.path=r.path.slice(0,e.pathLen)};Rt.prototype.enterKey=function(e){return this._reporterState.path.push(e)};Rt.prototype.exitKey=function(e){var r=this._reporterState;r.path=r.path.slice(0,e-1)};Rt.prototype.leaveKey=function(e,r,i){var n=this._reporterState;this.exitKey(e),n.obj!==null&&(n.obj[r]=i)};Rt.prototype.path=function(){return this._reporterState.path.join("/")};Rt.prototype.enterObject=function(){var e=this._reporterState,r=e.obj;return e.obj={},r};Rt.prototype.leaveObject=function(e){var r=this._reporterState,i=r.obj;return r.obj=e,i};Rt.prototype.error=function(e){var r,i=this._reporterState,n=e instanceof xn;if(n?r=e:r=new xn(i.path.map(function(a){return"["+JSON.stringify(a)+"]"}).join(""),e.message||e,e.stack),!i.options.partial)throw r;return n||i.errors.push(r),r};Rt.prototype.wrapResult=function(e){var r=this._reporterState;return r.options.partial?{result:this.isError(e)?null:e,errors:r.errors}:e};function xn(t,e){this.path=t,this.rethrow(e)}QM(xn,Error);xn.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,xn),!this.stack)try{throw new Error(this.message)}catch(r){this.stack=r.stack}return this}});var Hh=R(jh=>{b();var eE=He(),Nf=Mn().Reporter,Wa=ft().Buffer;function er(t,e){if(Nf.call(this,e),!Wa.isBuffer(t)){this.error("Input not Buffer");return}this.base=t,this.offset=0,this.length=t.length}eE(er,Nf);jh.DecoderBuffer=er;er.prototype.save=function(){return{offset:this.offset,reporter:Nf.prototype.save.call(this)}};er.prototype.restore=function(e){var r=new er(this.base);return r.offset=e.offset,r.length=this.offset,this.offset=e.offset,Nf.prototype.restore.call(this,e.reporter),r};er.prototype.isEmpty=function(){return this.offset===this.length};er.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")};er.prototype.skip=function(e,r){if(!(this.offset+e<=this.length))return this.error(r||"DecoderBuffer overrun");var i=new er(this.base);return i._reporterState=this._reporterState,i.offset=this.offset,i.length=this.offset+e,this.offset+=e,i};er.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)};function Uf(t,e){if(Array.isArray(t))this.length=0,this.value=t.map(function(r){return r instanceof Uf||(r=new Uf(r,e)),this.length+=r.length,r},this);else if(typeof t=="number"){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if(typeof t=="string")this.value=t,this.length=Wa.byteLength(t);else if(Wa.isBuffer(t))this.value=t,this.length=t.length;else return e.error("Unsupported type: "+typeof t)}jh.EncoderBuffer=Uf;Uf.prototype.join=function(e,r){return e||(e=new Wa(this.length)),r||(r=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(i){i.join(e,r),r+=i.length}):(typeof this.value=="number"?e[r]=this.value:typeof this.value=="string"?e.write(this.value,r):Wa.isBuffer(this.value)&&this.value.copy(e,r),r+=this.length)),e}});var qg=R((QI,Rg)=>{b();var tE=Mn().Reporter,rE=Mn().EncoderBuffer,iE=Mn().DecoderBuffer,pt=Ot(),Ag=["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"],nE=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(Ag),aE=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function je(t,e){var r={};this._baseState=r,r.enc=t,r.parent=e||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())}Rg.exports=je;var oE=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];je.prototype.clone=function(){var e=this._baseState,r={};oE.forEach(function(n){r[n]=e[n]});var i=new this.constructor(r.parent);return i._baseState=r,i};je.prototype._wrap=function(){var e=this._baseState;nE.forEach(function(r){this[r]=function(){var n=new this.constructor(this);return e.children.push(n),n[r].apply(n,arguments)}},this)};je.prototype._init=function(e){var r=this._baseState;pt(r.parent===null),e.call(this),r.children=r.children.filter(function(i){return i._baseState.parent===this},this),pt.equal(r.children.length,1,"Root node can have only one child")};je.prototype._useArgs=function(e){var r=this._baseState,i=e.filter(function(n){return n instanceof this.constructor},this);e=e.filter(function(n){return!(n instanceof this.constructor)},this),i.length!==0&&(pt(r.children===null),r.children=i,i.forEach(function(n){n._baseState.parent=this},this)),e.length!==0&&(pt(r.args===null),r.args=e,r.reverseArgs=e.map(function(n){if(typeof n!="object"||n.constructor!==Object)return n;var a={};return Object.keys(n).forEach(function(f){f==(f|0)&&(f|=0);var v=n[f];a[v]=f}),a}))};aE.forEach(function(t){je.prototype[t]=function(){var r=this._baseState;throw new Error(t+" not implemented for encoding: "+r.enc)}});Ag.forEach(function(t){je.prototype[t]=function(){var r=this._baseState,i=Array.prototype.slice.call(arguments);return pt(r.tag===null),r.tag=t,this._useArgs(i),this}});je.prototype.use=function(e){pt(e);var r=this._baseState;return pt(r.use===null),r.use=e,this};je.prototype.optional=function(){var e=this._baseState;return e.optional=!0,this};je.prototype.def=function(e){var r=this._baseState;return pt(r.default===null),r.default=e,r.optional=!0,this};je.prototype.explicit=function(e){var r=this._baseState;return pt(r.explicit===null&&r.implicit===null),r.explicit=e,this};je.prototype.implicit=function(e){var r=this._baseState;return pt(r.explicit===null&&r.implicit===null),r.implicit=e,this};je.prototype.obj=function(){var e=this._baseState,r=Array.prototype.slice.call(arguments);return e.obj=!0,r.length!==0&&this._useArgs(r),this};je.prototype.key=function(e){var r=this._baseState;return pt(r.key===null),r.key=e,this};je.prototype.any=function(){var e=this._baseState;return e.any=!0,this};je.prototype.choice=function(e){var r=this._baseState;return pt(r.choice===null),r.choice=e,this._useArgs(Object.keys(e).map(function(i){return e[i]})),this};je.prototype.contains=function(e){var r=this._baseState;return pt(r.use===null),r.contains=e,this};je.prototype._decode=function(e,r){var i=this._baseState;if(i.parent===null)return e.wrapResult(i.children[0]._decode(e,r));var n=i.default,a=!0,f=null;if(i.key!==null&&(f=e.enterKey(i.key)),i.optional){var v=null;if(i.explicit!==null?v=i.explicit:i.implicit!==null?v=i.implicit:i.tag!==null&&(v=i.tag),v===null&&!i.any){var m=e.save();try{i.choice===null?this._decodeGeneric(i.tag,e,r):this._decodeChoice(e,r),a=!0}catch{a=!1}e.restore(m)}else if(a=this._peekTag(e,v,i.any),e.isError(a))return a}var E;if(i.obj&&a&&(E=e.enterObject()),a){if(i.explicit!==null){var A=this._decodeTag(e,i.explicit);if(e.isError(A))return A;e=A}var q=e.offset;if(i.use===null&&i.choice===null){if(i.any)var m=e.save();var I=this._decodeTag(e,i.implicit!==null?i.implicit:i.tag,i.any);if(e.isError(I))return I;i.any?n=e.raw(m):e=I}if(r&&r.track&&i.tag!==null&&r.track(e.path(),q,e.length,"tagged"),r&&r.track&&i.tag!==null&&r.track(e.path(),e.offset,e.length,"content"),i.any?n=n:i.choice===null?n=this._decodeGeneric(i.tag,e,r):n=this._decodeChoice(e,r),e.isError(n))return n;if(!i.any&&i.choice===null&&i.children!==null&&i.children.forEach(function(V){V._decode(e,r)}),i.contains&&(i.tag==="octstr"||i.tag==="bitstr")){var C=new iE(n);n=this._getUse(i.contains,e._reporterState.obj)._decode(C,r)}}return i.obj&&a&&(n=e.leaveObject(E)),i.key!==null&&(n!==null||a===!0)?e.leaveKey(f,i.key,n):f!==null&&e.exitKey(f),n};je.prototype._decodeGeneric=function(e,r,i){var n=this._baseState;return e==="seq"||e==="set"?null:e==="seqof"||e==="setof"?this._decodeList(r,e,n.args[0],i):/str$/.test(e)?this._decodeStr(r,e,i):e==="objid"&&n.args?this._decodeObjid(r,n.args[0],n.args[1],i):e==="objid"?this._decodeObjid(r,null,null,i):e==="gentime"||e==="utctime"?this._decodeTime(r,e,i):e==="null_"?this._decodeNull(r,i):e==="bool"?this._decodeBool(r,i):e==="objDesc"?this._decodeStr(r,e,i):e==="int"||e==="enum"?this._decodeInt(r,n.args&&n.args[0],i):n.use!==null?this._getUse(n.use,r._reporterState.obj)._decode(r,i):r.error("unknown tag: "+e)};je.prototype._getUse=function(e,r){var i=this._baseState;return i.useDecoder=this._use(e,r),pt(i.useDecoder._baseState.parent===null),i.useDecoder=i.useDecoder._baseState.children[0],i.implicit!==i.useDecoder._baseState.implicit&&(i.useDecoder=i.useDecoder.clone(),i.useDecoder._baseState.implicit=i.implicit),i.useDecoder};je.prototype._decodeChoice=function(e,r){var i=this._baseState,n=null,a=!1;return Object.keys(i.choice).some(function(f){var v=e.save(),m=i.choice[f];try{var E=m._decode(e,r);if(e.isError(E))return!1;n={type:f,value:E},a=!0}catch{return e.restore(v),!1}return!0},this),a?n:e.error("Choice not matched")};je.prototype._createEncoderBuffer=function(e){return new rE(e,this.reporter)};je.prototype._encode=function(e,r,i){var n=this._baseState;if(!(n.default!==null&&n.default===e)){var a=this._encodeValue(e,r,i);if(a!==void 0&&!this._skipDefault(a,r,i))return a}};je.prototype._encodeValue=function(e,r,i){var n=this._baseState;if(n.parent===null)return n.children[0]._encode(e,r||new tE);var m=null;if(this.reporter=r,n.optional&&e===void 0)if(n.default!==null)e=n.default;else return;var a=null,f=!1;if(n.any)m=this._createEncoderBuffer(e);else if(n.choice)m=this._encodeChoice(e,r);else if(n.contains)a=this._getUse(n.contains,i)._encode(e,r),f=!0;else if(n.children)a=n.children.map(function(q){if(q._baseState.tag==="null_")return q._encode(null,r,e);if(q._baseState.key===null)return r.error("Child should have a key");var I=r.enterKey(q._baseState.key);if(typeof e!="object")return r.error("Child expected, but input is not object");var C=q._encode(e[q._baseState.key],r,e);return r.leaveKey(I),C},this).filter(function(q){return q}),a=this._createEncoderBuffer(a);else if(n.tag==="seqof"||n.tag==="setof"){if(!(n.args&&n.args.length===1))return r.error("Too many args for : "+n.tag);if(!Array.isArray(e))return r.error("seqof/setof, but data is not Array");var v=this.clone();v._baseState.implicit=null,a=this._createEncoderBuffer(e.map(function(q){var I=this._baseState;return this._getUse(I.args[0],e)._encode(q,r)},v))}else n.use!==null?m=this._getUse(n.use,i)._encode(e,r):(a=this._encodePrimitive(n.tag,e),f=!0);var m;if(!n.any&&n.choice===null){var E=n.implicit!==null?n.implicit:n.tag,A=n.implicit===null?"universal":"context";E===null?n.use===null&&r.error("Tag could be omitted only for .use()"):n.use===null&&(m=this._encodeComposite(E,f,A,a))}return n.explicit!==null&&(m=this._encodeComposite(n.explicit,!1,"context",m)),m};je.prototype._encodeChoice=function(e,r){var i=this._baseState,n=i.choice[e.type];return n||pt(!1,e.type+" not found in "+JSON.stringify(Object.keys(i.choice))),n._encode(e.value,r)};je.prototype._encodePrimitive=function(e,r){var i=this._baseState;if(/str$/.test(e))return this._encodeStr(r,e);if(e==="objid"&&i.args)return this._encodeObjid(r,i.reverseArgs[0],i.args[1]);if(e==="objid")return this._encodeObjid(r,null,null);if(e==="gentime"||e==="utctime")return this._encodeTime(r,e);if(e==="null_")return this._encodeNull();if(e==="int"||e==="enum")return this._encodeInt(r,i.args&&i.reverseArgs[0]);if(e==="bool")return this._encodeBool(r);if(e==="objDesc")return this._encodeStr(r,e);throw new Error("Unsupported tag: "+e)};je.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)};je.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}});var Mn=R(Ig=>{b();var Lf=Ig;Lf.Reporter=Bg().Reporter;Lf.DecoderBuffer=Hh().DecoderBuffer;Lf.EncoderBuffer=Hh().EncoderBuffer;Lf.Node=qg()});var Tg=R(Di=>{b();var kg=Kh();Di.tagClass={0:"universal",1:"application",2:"context",3:"private"};Di.tagClassByName=kg._reverse(Di.tagClass);Di.tag={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"};Di.tagByName=kg._reverse(Di.tag)});var Kh=R(Og=>{b();var Cg=Og;Cg._reverse=function(e){var r={};return Object.keys(e).forEach(function(i){(i|0)==i&&(i=i|0);var n=e[i];r[n]=i}),r};Cg.der=Tg()});var Gh=R((fk,Ng)=>{b();var fE=He(),Wh=_n(),Ff=Wh.base,sE=Wh.bignum,Pg=Wh.constants.der;function Dg(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new bt,this.tree._init(t.body)}Ng.exports=Dg;Dg.prototype.decode=function(e,r){return e instanceof Ff.DecoderBuffer||(e=new Ff.DecoderBuffer(e,r)),this.tree._decode(e,r)};function bt(t){Ff.Node.call(this,"der",t)}fE(bt,Ff.Node);bt.prototype._peekTag=function(e,r,i){if(e.isEmpty())return!1;var n=e.save(),a=zh(e,'Failed to peek tag: "'+r+'"');return e.isError(a)?a:(e.restore(n),a.tag===r||a.tagStr===r||a.tagStr+"of"===r||i)};bt.prototype._decodeTag=function(e,r,i){var n=zh(e,'Failed to decode tag of "'+r+'"');if(e.isError(n))return n;var a=Ug(e,n.primitive,'Failed to get length of "'+r+'"');if(e.isError(a))return a;if(!i&&n.tag!==r&&n.tagStr!==r&&n.tagStr+"of"!==r)return e.error('Failed to match tag: "'+r+'"');if(n.primitive||a!==null)return e.skip(a,'Failed to match body of: "'+r+'"');var f=e.save(),v=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(v)?v:(a=e.offset-f.offset,e.restore(f),e.skip(a,'Failed to match body of: "'+r+'"'))};bt.prototype._skipUntilEnd=function(e,r){for(;;){var i=zh(e,r);if(e.isError(i))return i;var n=Ug(e,i.primitive,r);if(e.isError(n))return n;var a;if(i.primitive||n!==null?a=e.skip(n):a=this._skipUntilEnd(e,r),e.isError(a))return a;if(i.tagStr==="end")break}};bt.prototype._decodeList=function(e,r,i,n){for(var a=[];!e.isEmpty();){var f=this._peekTag(e,"end");if(e.isError(f))return f;var v=i.decode(e,"der",n);if(e.isError(v)&&f)break;a.push(v)}return a};bt.prototype._decodeStr=function(e,r){if(r==="bitstr"){var i=e.readUInt8();return e.isError(i)?i:{unused:i,data:e.raw()}}else if(r==="bmpstr"){var n=e.raw();if(n.length%2===1)return e.error("Decoding of string type: bmpstr length mismatch");for(var a="",f=0;f<n.length/2;f++)a+=String.fromCharCode(n.readUInt16BE(f*2));return a}else if(r==="numstr"){var v=e.raw().toString("ascii");return this._isNumstr(v)?v:e.error("Decoding of string type: numstr unsupported characters")}else{if(r==="octstr")return e.raw();if(r==="objDesc")return e.raw();if(r==="printstr"){var m=e.raw().toString("ascii");return this._isPrintstr(m)?m:e.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(r)?e.raw().toString():e.error("Decoding of string type: "+r+" unsupported")}};bt.prototype._decodeObjid=function(e,r,i){for(var n,a=[],f=0;!e.isEmpty();){var v=e.readUInt8();f<<=7,f|=v&127,(v&128)===0&&(a.push(f),f=0)}v&128&&a.push(f);var m=a[0]/40|0,E=a[0]%40;if(i?n=a:n=[m,E].concat(a.slice(1)),r){var A=r[n.join(" ")];A===void 0&&(A=r[n.join(".")]),A!==void 0&&(n=A)}return n};bt.prototype._decodeTime=function(e,r){var i=e.raw().toString();if(r==="gentime")var n=i.slice(0,4)|0,a=i.slice(4,6)|0,f=i.slice(6,8)|0,v=i.slice(8,10)|0,m=i.slice(10,12)|0,E=i.slice(12,14)|0;else if(r==="utctime"){var n=i.slice(0,2)|0,a=i.slice(2,4)|0,f=i.slice(4,6)|0,v=i.slice(6,8)|0,m=i.slice(8,10)|0,E=i.slice(10,12)|0;n<70?n=2e3+n:n=1900+n}else return e.error("Decoding "+r+" time is not supported yet");return Date.UTC(n,a-1,f,v,m,E,0)};bt.prototype._decodeNull=function(e){return null};bt.prototype._decodeBool=function(e){var r=e.readUInt8();return e.isError(r)?r:r!==0};bt.prototype._decodeInt=function(e,r){var i=e.raw(),n=new sE(i);return r&&(n=r[n.toString(10)]||n),n};bt.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getDecoder("der").tree};function zh(t,e){var r=t.readUInt8(e);if(t.isError(r))return r;var i=Pg.tagClass[r>>6],n=(r&32)===0;if((r&31)===31){var a=r;for(r=0;(a&128)===128;){if(a=t.readUInt8(e),t.isError(a))return a;r<<=7,r|=a&127}}else r&=31;var f=Pg.tag[r];return{cls:i,primitive:n,tag:r,tagStr:f}}function Ug(t,e,r){var i=t.readUInt8(r);if(t.isError(i))return i;if(!e&&i===128)return null;if((i&128)===0)return i;var n=i&127;if(n>4)return t.error("length octect is too long");i=0;for(var a=0;a<n;a++){i<<=8;var f=t.readUInt8(r);if(t.isError(f))return f;i|=f}return i}});var Fg=R((uk,Lg)=>{b();var uE=He(),hE=ft().Buffer,Vh=Gh();function $h(t){Vh.call(this,t),this.enc="pem"}uE($h,Vh);Lg.exports=$h;$h.prototype.decode=function(e,r){for(var i=e.toString().split(/[\r\n]+/g),n=r.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,f=-1,v=-1,m=0;m<i.length;m++){var E=i[m].match(a);if(E!==null&&E[2]===n)if(f===-1){if(E[1]!=="BEGIN")break;f=m}else{if(E[1]!=="END")break;v=m;break}}if(f===-1||v===-1)throw new Error("PEM section not found for: "+n);var A=i.slice(f+1,v).join("");A.replace(/[^a-z0-9\+\/=]+/gi,"");var q=new hE(A,"base64");return Vh.prototype.decode.call(this,q,r)}});var Kg=R(Hg=>{b();var jg=Hg;jg.der=Gh();jg.pem=Fg()});var Yh=R((dk,Vg)=>{b();var lE=He(),Er=ft().Buffer,Wg=_n(),zg=Wg.base,Zh=Wg.constants.der;function Gg(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Ut,this.tree._init(t.body)}Vg.exports=Gg;Gg.prototype.encode=function(e,r){return this.tree._encode(e,r).join()};function Ut(t){zg.Node.call(this,"der",t)}lE(Ut,zg.Node);Ut.prototype._encodeComposite=function(e,r,i,n){var a=cE(e,r,i,this.reporter);if(n.length<128){var m=new Er(2);return m[0]=a,m[1]=n.length,this._createEncoderBuffer([m,n])}for(var f=1,v=n.length;v>=256;v>>=8)f++;var m=new Er(2+f);m[0]=a,m[1]=128|f;for(var v=1+f,E=n.length;E>0;v--,E>>=8)m[v]=E&255;return this._createEncoderBuffer([m,n])};Ut.prototype._encodeStr=function(e,r){if(r==="bitstr")return this._createEncoderBuffer([e.unused|0,e.data]);if(r==="bmpstr"){for(var i=new Er(e.length*2),n=0;n<e.length;n++)i.writeUInt16BE(e.charCodeAt(n),n*2);return this._createEncoderBuffer(i)}else return r==="numstr"?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):r==="printstr"?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(r)?this._createEncoderBuffer(e):r==="objDesc"?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+r+" unsupported")};Ut.prototype._encodeObjid=function(e,r,i){if(typeof e=="string"){if(!r)return this.reporter.error("string objid given, but no values map found");if(!r.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=r[e].split(/[\s\.]+/g);for(var n=0;n<e.length;n++)e[n]|=0}else if(Array.isArray(e)){e=e.slice();for(var n=0;n<e.length;n++)e[n]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!i){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,e[0]*40+e[1])}for(var a=0,n=0;n<e.length;n++){var f=e[n];for(a++;f>=128;f>>=7)a++}for(var v=new Er(a),m=v.length-1,n=e.length-1;n>=0;n--){var f=e[n];for(v[m--]=f&127;(f>>=7)>0;)v[m--]=128|f&127}return this._createEncoderBuffer(v)};function qt(t){return t<10?"0"+t:t}Ut.prototype._encodeTime=function(e,r){var i,n=new Date(e);return r==="gentime"?i=[qt(n.getFullYear()),qt(n.getUTCMonth()+1),qt(n.getUTCDate()),qt(n.getUTCHours()),qt(n.getUTCMinutes()),qt(n.getUTCSeconds()),"Z"].join(""):r==="utctime"?i=[qt(n.getFullYear()%100),qt(n.getUTCMonth()+1),qt(n.getUTCDate()),qt(n.getUTCHours()),qt(n.getUTCMinutes()),qt(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+r+" time is not supported yet"),this._encodeStr(i,"octstr")};Ut.prototype._encodeNull=function(){return this._createEncoderBuffer("")};Ut.prototype._encodeInt=function(e,r){if(typeof e=="string"){if(!r)return this.reporter.error("String int or enum given, but no values map");if(!r.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=r[e]}if(typeof e!="number"&&!Er.isBuffer(e)){var i=e.toArray();!e.sign&&i[0]&128&&i.unshift(0),e=new Er(i)}if(Er.isBuffer(e)){var n=e.length;e.length===0&&n++;var f=new Er(n);return e.copy(f),e.length===0&&(f[0]=0),this._createEncoderBuffer(f)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var n=1,a=e;a>=256;a>>=8)n++;for(var f=new Array(n),a=f.length-1;a>=0;a--)f[a]=e&255,e>>=8;return f[0]&128&&f.unshift(0),this._createEncoderBuffer(new Er(f))};Ut.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)};Ut.prototype._use=function(e,r){return typeof e=="function"&&(e=e(r)),e._getEncoder("der").tree};Ut.prototype._skipDefault=function(e,r,i){var n=this._baseState,a;if(n.default===null)return!1;var f=e.join();if(n.defaultBuffer===void 0&&(n.defaultBuffer=this._encodeValue(n.default,r,i).join()),f.length!==n.defaultBuffer.length)return!1;for(a=0;a<f.length;a++)if(f[a]!==n.defaultBuffer[a])return!1;return!0};function cE(t,e,r,i){var n;if(t==="seqof"?t="seq":t==="setof"&&(t="set"),Zh.tagByName.hasOwnProperty(t))n=Zh.tagByName[t];else if(typeof t=="number"&&(t|0)===t)n=t;else return i.error("Unknown tag: "+t);return n>=31?i.error("Multi-octet tag encoding unsupported"):(e||(n|=32),n|=Zh.tagClassByName[r||"universal"]<<6,n)}});var Zg=R((vk,$g)=>{b();var dE=He(),Xh=Yh();function Jh(t){Xh.call(this,t),this.enc="pem"}dE(Jh,Xh);$g.exports=Jh;Jh.prototype.encode=function(e,r){for(var i=Xh.prototype.encode.call(this,e),n=i.toString("base64"),a=["-----BEGIN "+r.label+"-----"],f=0;f<n.length;f+=64)a.push(n.slice(f,f+64));return a.push("-----END "+r.label+"-----"),a.join(`
14
+ `)}});var Jg=R(Xg=>{b();var Yg=Xg;Yg.der=Yh();Yg.pem=Zg()});var _n=R(Qg=>{b();var En=Qg;En.bignum=lr();En.define=Eg().define;En.base=Mn();En.constants=Kh();En.decoders=Kg();En.encoders=Jg()});var im=R((_k,rm)=>{"use strict";b();var Nt=_n(),em=Nt.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),pE=Nt.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),Qh=Nt.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),vE=Nt.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(Qh),this.key("subjectPublicKey").bitstr())}),yE=Nt.define("RelativeDistinguishedName",function(){this.setof(pE)}),gE=Nt.define("RDNSequence",function(){this.seqof(yE)}),tm=Nt.define("Name",function(){this.choice({rdnSequence:this.use(gE)})}),mE=Nt.define("Validity",function(){this.seq().obj(this.key("notBefore").use(em),this.key("notAfter").use(em))}),bE=Nt.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),wE=Nt.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(Qh),this.key("issuer").use(tm),this.key("validity").use(mE),this.key("subject").use(tm),this.key("subjectPublicKeyInfo").use(vE),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(bE).optional())}),_E=Nt.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(wE),this.key("signatureAlgorithm").use(Qh),this.key("signatureValue").bitstr())});rm.exports=_E});var am=R(Ft=>{"use strict";b();var Lt=_n();Ft.certificate=im();var xE=Lt.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())});Ft.RSAPrivateKey=xE;var ME=Lt.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});Ft.RSAPublicKey=ME;var nm=Lt.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())}),EE=Lt.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(nm),this.key("subjectPublicKey").bitstr())});Ft.PublicKey=EE;var SE=Lt.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(nm),this.key("subjectPrivateKey").octstr())});Ft.PrivateKey=SE;var BE=Lt.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())});Ft.EncryptedPrivateKey=BE;var AE=Lt.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())});Ft.DSAPrivateKey=AE;Ft.DSAparam=Lt.define("DSAparam",function(){this.int()});var RE=Lt.define("ECParameters",function(){this.choice({namedCurve:this.objid()})}),qE=Lt.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(RE),this.key("publicKey").optional().explicit(1).bitstr())});Ft.ECPrivateKey=qE;Ft.signature=Lt.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})});var om=R((Sk,IE)=>{IE.exports={"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"}});var sm=R((Bk,fm)=>{"use strict";b();var kE=/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,TE=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,CE=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,OE=Fa(),PE=Of(),jf=Ie().Buffer;fm.exports=function(t,e){var r=t.toString(),i=r.match(kE),n;if(i){var f="aes"+i[1],v=jf.from(i[2],"hex"),m=jf.from(i[3].replace(/[\r\n]/g,""),"base64"),E=OE(e,v.slice(0,8),parseInt(i[1],10)).key,A=[],q=PE.createDecipheriv(f,E,v);A.push(q.update(m)),A.push(q.final()),n=jf.concat(A)}else{var a=r.match(CE);n=jf.from(a[2].replace(/[\r\n]/g,""),"base64")}var I=r.match(TE)[1];return{tag:I,data:n}}});var tl=R((Rk,hm)=>{"use strict";b();var gt=am(),DE=om(),UE=sm(),NE=Of(),LE=lh().pbkdf2Sync,el=Ie().Buffer;function FE(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),n=DE[t.algorithm.decrypt.cipher.algo.join(".")],a=t.algorithm.decrypt.cipher.iv,f=t.subjectPrivateKey,v=parseInt(n.split("-")[1],10)/8,m=LE(e,r,i,v,"sha1"),E=NE.createDecipheriv(n,m,a),A=[];return A.push(E.update(f)),A.push(E.final()),el.concat(A)}function um(t){var e;typeof t=="object"&&!el.isBuffer(t)&&(e=t.passphrase,t=t.key),typeof t=="string"&&(t=el.from(t));var r=UE(t,e),i=r.tag,n=r.data,a,f;switch(i){case"CERTIFICATE":f=gt.certificate.decode(n,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=gt.PublicKey.decode(n,"der")),a=f.algorithm.algorithm.join("."),a){case"1.2.840.113549.1.1.1":return gt.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=gt.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+a)}case"ENCRYPTED PRIVATE KEY":n=gt.EncryptedPrivateKey.decode(n,"der"),n=FE(n,e);case"PRIVATE KEY":switch(f=gt.PrivateKey.decode(n,"der"),a=f.algorithm.algorithm.join("."),a){case"1.2.840.113549.1.1.1":return gt.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:gt.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=gt.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+a)}case"RSA PUBLIC KEY":return gt.RSAPublicKey.decode(n,"der");case"RSA PRIVATE KEY":return gt.RSAPrivateKey.decode(n,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:gt.DSAPrivateKey.decode(n,"der")};case"EC PRIVATE KEY":return n=gt.ECPrivateKey.decode(n,"der"),{curve:n.parameters.value,privateKey:n.privateKey};default:throw new Error("unknown key type "+i)}}um.signature=gt.signature;hm.exports=um});var il=R((Ik,lm)=>{b();var jE=Ta(),rl=Ie().Buffer;lm.exports=function(t,e){for(var r=rl.alloc(0),i=0,n;r.length<e;)n=HE(i++),r=rl.concat([r,jE("sha1").update(t).update(n).digest()]);return r.slice(0,e)};function HE(t){var e=rl.allocUnsafe(4);return e.writeUInt32BE(t,0),e}});var nl=R((Tk,cm)=>{b();cm.exports=function(e,r){for(var i=e.length,n=-1;++n<i;)e[n]^=r[n];return e}});var al=R((Ok,pm)=>{b();var dm=lr(),KE=Ie().Buffer;function WE(t,e){return KE.from(t.toRed(dm.mont(e.modulus)).redPow(new dm(e.publicExponent)).fromRed().toArray())}pm.exports=WE});var ym=R((vm,ol)=>{b();(function(t,e){"use strict";function r(l,o){if(!l)throw new Error(o||"Assertion failed")}function i(l,o){l.super_=o;var s=function(){};s.prototype=o.prototype,l.prototype=new s,l.prototype.constructor=l}function n(l,o,s){if(n.isBN(l))return l;this.negative=0,this.words=null,this.length=0,this.red=null,l!==null&&((o==="le"||o==="be")&&(s=o,o=10),this._init(l||0,o||10,s||"be"))}typeof t=="object"?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;var a;try{typeof window<"u"&&typeof window.Buffer<"u"?a=window.Buffer:a=ft().Buffer}catch{}n.isBN=function(o){return o instanceof n?!0:o!==null&&typeof o=="object"&&o.constructor.wordSize===n.wordSize&&Array.isArray(o.words)},n.max=function(o,s){return o.cmp(s)>0?o:s},n.min=function(o,s){return o.cmp(s)<0?o:s},n.prototype._init=function(o,s,d){if(typeof o=="number")return this._initNumber(o,s,d);if(typeof o=="object")return this._initArray(o,s,d);s==="hex"&&(s=16),r(s===(s|0)&&s>=2&&s<=36),o=o.toString().replace(/\s+/g,"");var g=0;o[0]==="-"&&(g++,this.negative=1),g<o.length&&(s===16?this._parseHex(o,g,d):(this._parseBase(o,s,g),d==="le"&&this._initArray(this.toArray(),s,d)))},n.prototype._initNumber=function(o,s,d){o<0&&(this.negative=1,o=-o),o<67108864?(this.words=[o&67108863],this.length=1):o<4503599627370496?(this.words=[o&67108863,o/67108864&67108863],this.length=2):(r(o<9007199254740992),this.words=[o&67108863,o/67108864&67108863,1],this.length=3),d==="le"&&this._initArray(this.toArray(),s,d)},n.prototype._initArray=function(o,s,d){if(r(typeof o.length=="number"),o.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(o.length/3),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var p,u,w=0;if(d==="be")for(g=o.length-1,p=0;g>=0;g-=3)u=o[g]|o[g-1]<<8|o[g-2]<<16,this.words[p]|=u<<w&67108863,this.words[p+1]=u>>>26-w&67108863,w+=24,w>=26&&(w-=26,p++);else if(d==="le")for(g=0,p=0;g<o.length;g+=3)u=o[g]|o[g+1]<<8|o[g+2]<<16,this.words[p]|=u<<w&67108863,this.words[p+1]=u>>>26-w&67108863,w+=24,w>=26&&(w-=26,p++);return this._strip()};function f(l,o){var s=l.charCodeAt(o);if(s>=48&&s<=57)return s-48;if(s>=65&&s<=70)return s-55;if(s>=97&&s<=102)return s-87;r(!1,"Invalid character in "+l)}function v(l,o,s){var d=f(l,s);return s-1>=o&&(d|=f(l,s-1)<<4),d}n.prototype._parseHex=function(o,s,d){this.length=Math.ceil((o.length-s)/6),this.words=new Array(this.length);for(var g=0;g<this.length;g++)this.words[g]=0;var p=0,u=0,w;if(d==="be")for(g=o.length-1;g>=s;g-=2)w=v(o,s,g)<<p,this.words[u]|=w&67108863,p>=18?(p-=18,u+=1,this.words[u]|=w>>>26):p+=8;else{var _=o.length-s;for(g=_%2===0?s+1:s;g<o.length;g+=2)w=v(o,s,g)<<p,this.words[u]|=w&67108863,p>=18?(p-=18,u+=1,this.words[u]|=w>>>26):p+=8}this._strip()};function m(l,o,s,d){for(var g=0,p=0,u=Math.min(l.length,s),w=o;w<u;w++){var _=l.charCodeAt(w)-48;g*=d,_>=49?p=_-49+10:_>=17?p=_-17+10:p=_,r(_>=0&&p<d,"Invalid character"),g+=p}return g}n.prototype._parseBase=function(o,s,d){this.words=[0],this.length=1;for(var g=0,p=1;p<=67108863;p*=s)g++;g--,p=p/s|0;for(var u=o.length-d,w=u%g,_=Math.min(u,u-w)+d,c=0,x=d;x<_;x+=g)c=m(o,x,x+g,s),this.imuln(p),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c);if(w!==0){var P=1;for(c=m(o,x,o.length,s),x=0;x<w;x++)P*=s;this.imuln(P),this.words[0]+c<67108864?this.words[0]+=c:this._iaddn(c)}this._strip()},n.prototype.copy=function(o){o.words=new Array(this.length);for(var s=0;s<this.length;s++)o.words[s]=this.words[s];o.length=this.length,o.negative=this.negative,o.red=this.red};function E(l,o){l.words=o.words,l.length=o.length,l.negative=o.negative,l.red=o.red}if(n.prototype._move=function(o){E(o,this)},n.prototype.clone=function(){var o=new n(null);return this.copy(o),o},n.prototype._expand=function(o){for(;this.length<o;)this.words[this.length++]=0;return this},n.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},n.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol<"u"&&typeof Symbol.for=="function")try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=A}catch{n.prototype.inspect=A}else n.prototype.inspect=A;function A(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var q=["","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"],I=[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],C=[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];n.prototype.toString=function(o,s){o=o||10,s=s|0||1;var d;if(o===16||o==="hex"){d="";for(var g=0,p=0,u=0;u<this.length;u++){var w=this.words[u],_=((w<<g|p)&16777215).toString(16);p=w>>>24-g&16777215,g+=2,g>=26&&(g-=26,u--),p!==0||u!==this.length-1?d=q[6-_.length]+_+d:d=_+d}for(p!==0&&(d=p.toString(16)+d);d.length%s!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}if(o===(o|0)&&o>=2&&o<=36){var c=I[o],x=C[o];d="";var P=this.clone();for(P.negative=0;!P.isZero();){var N=P.modrn(x).toString(o);P=P.idivn(x),P.isZero()?d=N+d:d=q[c-N.length]+N+d}for(this.isZero()&&(d="0"+d);d.length%s!==0;)d="0"+d;return this.negative!==0&&(d="-"+d),d}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var o=this.words[0];return this.length===2?o+=this.words[1]*67108864:this.length===3&&this.words[2]===1?o+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-o:o},n.prototype.toJSON=function(){return this.toString(16,2)},a&&(n.prototype.toBuffer=function(o,s){return this.toArrayLike(a,o,s)}),n.prototype.toArray=function(o,s){return this.toArrayLike(Array,o,s)};var j=function(o,s){return o.allocUnsafe?o.allocUnsafe(s):new o(s)};n.prototype.toArrayLike=function(o,s,d){this._strip();var g=this.byteLength(),p=d||Math.max(1,g);r(g<=p,"byte array longer than desired length"),r(p>0,"Requested array length <= 0");var u=j(o,p),w=s==="le"?"LE":"BE";return this["_toArrayLike"+w](u,g),u},n.prototype._toArrayLikeLE=function(o,s){for(var d=0,g=0,p=0,u=0;p<this.length;p++){var w=this.words[p]<<u|g;o[d++]=w&255,d<o.length&&(o[d++]=w>>8&255),d<o.length&&(o[d++]=w>>16&255),u===6?(d<o.length&&(o[d++]=w>>24&255),g=0,u=0):(g=w>>>24,u+=2)}if(d<o.length)for(o[d++]=g;d<o.length;)o[d++]=0},n.prototype._toArrayLikeBE=function(o,s){for(var d=o.length-1,g=0,p=0,u=0;p<this.length;p++){var w=this.words[p]<<u|g;o[d--]=w&255,d>=0&&(o[d--]=w>>8&255),d>=0&&(o[d--]=w>>16&255),u===6?(d>=0&&(o[d--]=w>>24&255),g=0,u=0):(g=w>>>24,u+=2)}if(d>=0)for(o[d--]=g;d>=0;)o[d--]=0},Math.clz32?n.prototype._countBits=function(o){return 32-Math.clz32(o)}:n.prototype._countBits=function(o){var s=o,d=0;return s>=4096&&(d+=13,s>>>=13),s>=64&&(d+=7,s>>>=7),s>=8&&(d+=4,s>>>=4),s>=2&&(d+=2,s>>>=2),d+s},n.prototype._zeroBits=function(o){if(o===0)return 26;var s=o,d=0;return(s&8191)===0&&(d+=13,s>>>=13),(s&127)===0&&(d+=7,s>>>=7),(s&15)===0&&(d+=4,s>>>=4),(s&3)===0&&(d+=2,s>>>=2),(s&1)===0&&d++,d},n.prototype.bitLength=function(){var o=this.words[this.length-1],s=this._countBits(o);return(this.length-1)*26+s};function V(l){for(var o=new Array(l.bitLength()),s=0;s<o.length;s++){var d=s/26|0,g=s%26;o[s]=l.words[d]>>>g&1}return o}n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var o=0,s=0;s<this.length;s++){var d=this._zeroBits(this.words[s]);if(o+=d,d!==26)break}return o},n.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},n.prototype.toTwos=function(o){return this.negative!==0?this.abs().inotn(o).iaddn(1):this.clone()},n.prototype.fromTwos=function(o){return this.testn(o-1)?this.notn(o).iaddn(1).ineg():this.clone()},n.prototype.isNeg=function(){return this.negative!==0},n.prototype.neg=function(){return this.clone().ineg()},n.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},n.prototype.iuor=function(o){for(;this.length<o.length;)this.words[this.length++]=0;for(var s=0;s<o.length;s++)this.words[s]=this.words[s]|o.words[s];return this._strip()},n.prototype.ior=function(o){return r((this.negative|o.negative)===0),this.iuor(o)},n.prototype.or=function(o){return this.length>o.length?this.clone().ior(o):o.clone().ior(this)},n.prototype.uor=function(o){return this.length>o.length?this.clone().iuor(o):o.clone().iuor(this)},n.prototype.iuand=function(o){var s;this.length>o.length?s=o:s=this;for(var d=0;d<s.length;d++)this.words[d]=this.words[d]&o.words[d];return this.length=s.length,this._strip()},n.prototype.iand=function(o){return r((this.negative|o.negative)===0),this.iuand(o)},n.prototype.and=function(o){return this.length>o.length?this.clone().iand(o):o.clone().iand(this)},n.prototype.uand=function(o){return this.length>o.length?this.clone().iuand(o):o.clone().iuand(this)},n.prototype.iuxor=function(o){var s,d;this.length>o.length?(s=this,d=o):(s=o,d=this);for(var g=0;g<d.length;g++)this.words[g]=s.words[g]^d.words[g];if(this!==s)for(;g<s.length;g++)this.words[g]=s.words[g];return this.length=s.length,this._strip()},n.prototype.ixor=function(o){return r((this.negative|o.negative)===0),this.iuxor(o)},n.prototype.xor=function(o){return this.length>o.length?this.clone().ixor(o):o.clone().ixor(this)},n.prototype.uxor=function(o){return this.length>o.length?this.clone().iuxor(o):o.clone().iuxor(this)},n.prototype.inotn=function(o){r(typeof o=="number"&&o>=0);var s=Math.ceil(o/26)|0,d=o%26;this._expand(s),d>0&&s--;for(var g=0;g<s;g++)this.words[g]=~this.words[g]&67108863;return d>0&&(this.words[g]=~this.words[g]&67108863>>26-d),this._strip()},n.prototype.notn=function(o){return this.clone().inotn(o)},n.prototype.setn=function(o,s){r(typeof o=="number"&&o>=0);var d=o/26|0,g=o%26;return this._expand(d+1),s?this.words[d]=this.words[d]|1<<g:this.words[d]=this.words[d]&~(1<<g),this._strip()},n.prototype.iadd=function(o){var s;if(this.negative!==0&&o.negative===0)return this.negative=0,s=this.isub(o),this.negative^=1,this._normSign();if(this.negative===0&&o.negative!==0)return o.negative=0,s=this.isub(o),o.negative=1,s._normSign();var d,g;this.length>o.length?(d=this,g=o):(d=o,g=this);for(var p=0,u=0;u<g.length;u++)s=(d.words[u]|0)+(g.words[u]|0)+p,this.words[u]=s&67108863,p=s>>>26;for(;p!==0&&u<d.length;u++)s=(d.words[u]|0)+p,this.words[u]=s&67108863,p=s>>>26;if(this.length=d.length,p!==0)this.words[this.length]=p,this.length++;else if(d!==this)for(;u<d.length;u++)this.words[u]=d.words[u];return this},n.prototype.add=function(o){var s;return o.negative!==0&&this.negative===0?(o.negative=0,s=this.sub(o),o.negative^=1,s):o.negative===0&&this.negative!==0?(this.negative=0,s=o.sub(this),this.negative=1,s):this.length>o.length?this.clone().iadd(o):o.clone().iadd(this)},n.prototype.isub=function(o){if(o.negative!==0){o.negative=0;var s=this.iadd(o);return o.negative=1,s._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(o),this.negative=1,this._normSign();var d=this.cmp(o);if(d===0)return this.negative=0,this.length=1,this.words[0]=0,this;var g,p;d>0?(g=this,p=o):(g=o,p=this);for(var u=0,w=0;w<p.length;w++)s=(g.words[w]|0)-(p.words[w]|0)+u,u=s>>26,this.words[w]=s&67108863;for(;u!==0&&w<g.length;w++)s=(g.words[w]|0)+u,u=s>>26,this.words[w]=s&67108863;if(u===0&&w<g.length&&g!==this)for(;w<g.length;w++)this.words[w]=g.words[w];return this.length=Math.max(this.length,w),g!==this&&(this.negative=1),this._strip()},n.prototype.sub=function(o){return this.clone().isub(o)};function X(l,o,s){s.negative=o.negative^l.negative;var d=l.length+o.length|0;s.length=d,d=d-1|0;var g=l.words[0]|0,p=o.words[0]|0,u=g*p,w=u&67108863,_=u/67108864|0;s.words[0]=w;for(var c=1;c<d;c++){for(var x=_>>>26,P=_&67108863,N=Math.min(c,o.length-1),U=Math.max(0,c-l.length+1);U<=N;U++){var W=c-U|0;g=l.words[W]|0,p=o.words[U]|0,u=g*p+P,x+=u/67108864|0,P=u&67108863}s.words[c]=P|0,_=x|0}return _!==0?s.words[c]=_|0:s.length--,s._strip()}var z=function(o,s,d){var g=o.words,p=s.words,u=d.words,w=0,_,c,x,P=g[0]|0,N=P&8191,U=P>>>13,W=g[1]|0,K=W&8191,G=W>>>13,It=g[2]|0,Z=It&8191,Y=It>>>13,On=g[3]|0,J=On&8191,Q=On>>>13,Pn=g[4]|0,ee=Pn&8191,te=Pn>>>13,Dn=g[5]|0,re=Dn&8191,ie=Dn>>>13,Un=g[6]|0,ne=Un&8191,ae=Un>>>13,Nn=g[7]|0,oe=Nn&8191,fe=Nn>>>13,Ln=g[8]|0,se=Ln&8191,ue=Ln>>>13,Fn=g[9]|0,he=Fn&8191,le=Fn>>>13,jn=p[0]|0,ce=jn&8191,de=jn>>>13,Hn=p[1]|0,pe=Hn&8191,ve=Hn>>>13,Kn=p[2]|0,ye=Kn&8191,ge=Kn>>>13,Wn=p[3]|0,me=Wn&8191,be=Wn>>>13,zn=p[4]|0,we=zn&8191,_e=zn>>>13,Gn=p[5]|0,xe=Gn&8191,Me=Gn>>>13,Vn=p[6]|0,Ee=Vn&8191,Se=Vn>>>13,$n=p[7]|0,Be=$n&8191,Ae=$n>>>13,Zn=p[8]|0,Re=Zn&8191,qe=Zn>>>13,Li=p[9]|0,Ge=Li&8191,Ve=Li>>>13;d.negative=o.negative^s.negative,d.length=19,_=Math.imul(N,ce),c=Math.imul(N,de),c=c+Math.imul(U,ce)|0,x=Math.imul(U,de);var Kr=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(Kr>>>26)|0,Kr&=67108863,_=Math.imul(K,ce),c=Math.imul(K,de),c=c+Math.imul(G,ce)|0,x=Math.imul(G,de),_=_+Math.imul(N,pe)|0,c=c+Math.imul(N,ve)|0,c=c+Math.imul(U,pe)|0,x=x+Math.imul(U,ve)|0;var Wr=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,_=Math.imul(Z,ce),c=Math.imul(Z,de),c=c+Math.imul(Y,ce)|0,x=Math.imul(Y,de),_=_+Math.imul(K,pe)|0,c=c+Math.imul(K,ve)|0,c=c+Math.imul(G,pe)|0,x=x+Math.imul(G,ve)|0,_=_+Math.imul(N,ye)|0,c=c+Math.imul(N,ge)|0,c=c+Math.imul(U,ye)|0,x=x+Math.imul(U,ge)|0;var zr=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(zr>>>26)|0,zr&=67108863,_=Math.imul(J,ce),c=Math.imul(J,de),c=c+Math.imul(Q,ce)|0,x=Math.imul(Q,de),_=_+Math.imul(Z,pe)|0,c=c+Math.imul(Z,ve)|0,c=c+Math.imul(Y,pe)|0,x=x+Math.imul(Y,ve)|0,_=_+Math.imul(K,ye)|0,c=c+Math.imul(K,ge)|0,c=c+Math.imul(G,ye)|0,x=x+Math.imul(G,ge)|0,_=_+Math.imul(N,me)|0,c=c+Math.imul(N,be)|0,c=c+Math.imul(U,me)|0,x=x+Math.imul(U,be)|0;var Gr=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,_=Math.imul(ee,ce),c=Math.imul(ee,de),c=c+Math.imul(te,ce)|0,x=Math.imul(te,de),_=_+Math.imul(J,pe)|0,c=c+Math.imul(J,ve)|0,c=c+Math.imul(Q,pe)|0,x=x+Math.imul(Q,ve)|0,_=_+Math.imul(Z,ye)|0,c=c+Math.imul(Z,ge)|0,c=c+Math.imul(Y,ye)|0,x=x+Math.imul(Y,ge)|0,_=_+Math.imul(K,me)|0,c=c+Math.imul(K,be)|0,c=c+Math.imul(G,me)|0,x=x+Math.imul(G,be)|0,_=_+Math.imul(N,we)|0,c=c+Math.imul(N,_e)|0,c=c+Math.imul(U,we)|0,x=x+Math.imul(U,_e)|0;var Vr=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(Vr>>>26)|0,Vr&=67108863,_=Math.imul(re,ce),c=Math.imul(re,de),c=c+Math.imul(ie,ce)|0,x=Math.imul(ie,de),_=_+Math.imul(ee,pe)|0,c=c+Math.imul(ee,ve)|0,c=c+Math.imul(te,pe)|0,x=x+Math.imul(te,ve)|0,_=_+Math.imul(J,ye)|0,c=c+Math.imul(J,ge)|0,c=c+Math.imul(Q,ye)|0,x=x+Math.imul(Q,ge)|0,_=_+Math.imul(Z,me)|0,c=c+Math.imul(Z,be)|0,c=c+Math.imul(Y,me)|0,x=x+Math.imul(Y,be)|0,_=_+Math.imul(K,we)|0,c=c+Math.imul(K,_e)|0,c=c+Math.imul(G,we)|0,x=x+Math.imul(G,_e)|0,_=_+Math.imul(N,xe)|0,c=c+Math.imul(N,Me)|0,c=c+Math.imul(U,xe)|0,x=x+Math.imul(U,Me)|0;var $r=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+($r>>>26)|0,$r&=67108863,_=Math.imul(ne,ce),c=Math.imul(ne,de),c=c+Math.imul(ae,ce)|0,x=Math.imul(ae,de),_=_+Math.imul(re,pe)|0,c=c+Math.imul(re,ve)|0,c=c+Math.imul(ie,pe)|0,x=x+Math.imul(ie,ve)|0,_=_+Math.imul(ee,ye)|0,c=c+Math.imul(ee,ge)|0,c=c+Math.imul(te,ye)|0,x=x+Math.imul(te,ge)|0,_=_+Math.imul(J,me)|0,c=c+Math.imul(J,be)|0,c=c+Math.imul(Q,me)|0,x=x+Math.imul(Q,be)|0,_=_+Math.imul(Z,we)|0,c=c+Math.imul(Z,_e)|0,c=c+Math.imul(Y,we)|0,x=x+Math.imul(Y,_e)|0,_=_+Math.imul(K,xe)|0,c=c+Math.imul(K,Me)|0,c=c+Math.imul(G,xe)|0,x=x+Math.imul(G,Me)|0,_=_+Math.imul(N,Ee)|0,c=c+Math.imul(N,Se)|0,c=c+Math.imul(U,Ee)|0,x=x+Math.imul(U,Se)|0;var Zr=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(Zr>>>26)|0,Zr&=67108863,_=Math.imul(oe,ce),c=Math.imul(oe,de),c=c+Math.imul(fe,ce)|0,x=Math.imul(fe,de),_=_+Math.imul(ne,pe)|0,c=c+Math.imul(ne,ve)|0,c=c+Math.imul(ae,pe)|0,x=x+Math.imul(ae,ve)|0,_=_+Math.imul(re,ye)|0,c=c+Math.imul(re,ge)|0,c=c+Math.imul(ie,ye)|0,x=x+Math.imul(ie,ge)|0,_=_+Math.imul(ee,me)|0,c=c+Math.imul(ee,be)|0,c=c+Math.imul(te,me)|0,x=x+Math.imul(te,be)|0,_=_+Math.imul(J,we)|0,c=c+Math.imul(J,_e)|0,c=c+Math.imul(Q,we)|0,x=x+Math.imul(Q,_e)|0,_=_+Math.imul(Z,xe)|0,c=c+Math.imul(Z,Me)|0,c=c+Math.imul(Y,xe)|0,x=x+Math.imul(Y,Me)|0,_=_+Math.imul(K,Ee)|0,c=c+Math.imul(K,Se)|0,c=c+Math.imul(G,Ee)|0,x=x+Math.imul(G,Se)|0,_=_+Math.imul(N,Be)|0,c=c+Math.imul(N,Ae)|0,c=c+Math.imul(U,Be)|0,x=x+Math.imul(U,Ae)|0;var Yr=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(Yr>>>26)|0,Yr&=67108863,_=Math.imul(se,ce),c=Math.imul(se,de),c=c+Math.imul(ue,ce)|0,x=Math.imul(ue,de),_=_+Math.imul(oe,pe)|0,c=c+Math.imul(oe,ve)|0,c=c+Math.imul(fe,pe)|0,x=x+Math.imul(fe,ve)|0,_=_+Math.imul(ne,ye)|0,c=c+Math.imul(ne,ge)|0,c=c+Math.imul(ae,ye)|0,x=x+Math.imul(ae,ge)|0,_=_+Math.imul(re,me)|0,c=c+Math.imul(re,be)|0,c=c+Math.imul(ie,me)|0,x=x+Math.imul(ie,be)|0,_=_+Math.imul(ee,we)|0,c=c+Math.imul(ee,_e)|0,c=c+Math.imul(te,we)|0,x=x+Math.imul(te,_e)|0,_=_+Math.imul(J,xe)|0,c=c+Math.imul(J,Me)|0,c=c+Math.imul(Q,xe)|0,x=x+Math.imul(Q,Me)|0,_=_+Math.imul(Z,Ee)|0,c=c+Math.imul(Z,Se)|0,c=c+Math.imul(Y,Ee)|0,x=x+Math.imul(Y,Se)|0,_=_+Math.imul(K,Be)|0,c=c+Math.imul(K,Ae)|0,c=c+Math.imul(G,Be)|0,x=x+Math.imul(G,Ae)|0,_=_+Math.imul(N,Re)|0,c=c+Math.imul(N,qe)|0,c=c+Math.imul(U,Re)|0,x=x+Math.imul(U,qe)|0;var Xr=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(Xr>>>26)|0,Xr&=67108863,_=Math.imul(he,ce),c=Math.imul(he,de),c=c+Math.imul(le,ce)|0,x=Math.imul(le,de),_=_+Math.imul(se,pe)|0,c=c+Math.imul(se,ve)|0,c=c+Math.imul(ue,pe)|0,x=x+Math.imul(ue,ve)|0,_=_+Math.imul(oe,ye)|0,c=c+Math.imul(oe,ge)|0,c=c+Math.imul(fe,ye)|0,x=x+Math.imul(fe,ge)|0,_=_+Math.imul(ne,me)|0,c=c+Math.imul(ne,be)|0,c=c+Math.imul(ae,me)|0,x=x+Math.imul(ae,be)|0,_=_+Math.imul(re,we)|0,c=c+Math.imul(re,_e)|0,c=c+Math.imul(ie,we)|0,x=x+Math.imul(ie,_e)|0,_=_+Math.imul(ee,xe)|0,c=c+Math.imul(ee,Me)|0,c=c+Math.imul(te,xe)|0,x=x+Math.imul(te,Me)|0,_=_+Math.imul(J,Ee)|0,c=c+Math.imul(J,Se)|0,c=c+Math.imul(Q,Ee)|0,x=x+Math.imul(Q,Se)|0,_=_+Math.imul(Z,Be)|0,c=c+Math.imul(Z,Ae)|0,c=c+Math.imul(Y,Be)|0,x=x+Math.imul(Y,Ae)|0,_=_+Math.imul(K,Re)|0,c=c+Math.imul(K,qe)|0,c=c+Math.imul(G,Re)|0,x=x+Math.imul(G,qe)|0,_=_+Math.imul(N,Ge)|0,c=c+Math.imul(N,Ve)|0,c=c+Math.imul(U,Ge)|0,x=x+Math.imul(U,Ve)|0;var Jr=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(Jr>>>26)|0,Jr&=67108863,_=Math.imul(he,pe),c=Math.imul(he,ve),c=c+Math.imul(le,pe)|0,x=Math.imul(le,ve),_=_+Math.imul(se,ye)|0,c=c+Math.imul(se,ge)|0,c=c+Math.imul(ue,ye)|0,x=x+Math.imul(ue,ge)|0,_=_+Math.imul(oe,me)|0,c=c+Math.imul(oe,be)|0,c=c+Math.imul(fe,me)|0,x=x+Math.imul(fe,be)|0,_=_+Math.imul(ne,we)|0,c=c+Math.imul(ne,_e)|0,c=c+Math.imul(ae,we)|0,x=x+Math.imul(ae,_e)|0,_=_+Math.imul(re,xe)|0,c=c+Math.imul(re,Me)|0,c=c+Math.imul(ie,xe)|0,x=x+Math.imul(ie,Me)|0,_=_+Math.imul(ee,Ee)|0,c=c+Math.imul(ee,Se)|0,c=c+Math.imul(te,Ee)|0,x=x+Math.imul(te,Se)|0,_=_+Math.imul(J,Be)|0,c=c+Math.imul(J,Ae)|0,c=c+Math.imul(Q,Be)|0,x=x+Math.imul(Q,Ae)|0,_=_+Math.imul(Z,Re)|0,c=c+Math.imul(Z,qe)|0,c=c+Math.imul(Y,Re)|0,x=x+Math.imul(Y,qe)|0,_=_+Math.imul(K,Ge)|0,c=c+Math.imul(K,Ve)|0,c=c+Math.imul(G,Ge)|0,x=x+Math.imul(G,Ve)|0;var Qr=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(Qr>>>26)|0,Qr&=67108863,_=Math.imul(he,ye),c=Math.imul(he,ge),c=c+Math.imul(le,ye)|0,x=Math.imul(le,ge),_=_+Math.imul(se,me)|0,c=c+Math.imul(se,be)|0,c=c+Math.imul(ue,me)|0,x=x+Math.imul(ue,be)|0,_=_+Math.imul(oe,we)|0,c=c+Math.imul(oe,_e)|0,c=c+Math.imul(fe,we)|0,x=x+Math.imul(fe,_e)|0,_=_+Math.imul(ne,xe)|0,c=c+Math.imul(ne,Me)|0,c=c+Math.imul(ae,xe)|0,x=x+Math.imul(ae,Me)|0,_=_+Math.imul(re,Ee)|0,c=c+Math.imul(re,Se)|0,c=c+Math.imul(ie,Ee)|0,x=x+Math.imul(ie,Se)|0,_=_+Math.imul(ee,Be)|0,c=c+Math.imul(ee,Ae)|0,c=c+Math.imul(te,Be)|0,x=x+Math.imul(te,Ae)|0,_=_+Math.imul(J,Re)|0,c=c+Math.imul(J,qe)|0,c=c+Math.imul(Q,Re)|0,x=x+Math.imul(Q,qe)|0,_=_+Math.imul(Z,Ge)|0,c=c+Math.imul(Z,Ve)|0,c=c+Math.imul(Y,Ge)|0,x=x+Math.imul(Y,Ve)|0;var ei=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(ei>>>26)|0,ei&=67108863,_=Math.imul(he,me),c=Math.imul(he,be),c=c+Math.imul(le,me)|0,x=Math.imul(le,be),_=_+Math.imul(se,we)|0,c=c+Math.imul(se,_e)|0,c=c+Math.imul(ue,we)|0,x=x+Math.imul(ue,_e)|0,_=_+Math.imul(oe,xe)|0,c=c+Math.imul(oe,Me)|0,c=c+Math.imul(fe,xe)|0,x=x+Math.imul(fe,Me)|0,_=_+Math.imul(ne,Ee)|0,c=c+Math.imul(ne,Se)|0,c=c+Math.imul(ae,Ee)|0,x=x+Math.imul(ae,Se)|0,_=_+Math.imul(re,Be)|0,c=c+Math.imul(re,Ae)|0,c=c+Math.imul(ie,Be)|0,x=x+Math.imul(ie,Ae)|0,_=_+Math.imul(ee,Re)|0,c=c+Math.imul(ee,qe)|0,c=c+Math.imul(te,Re)|0,x=x+Math.imul(te,qe)|0,_=_+Math.imul(J,Ge)|0,c=c+Math.imul(J,Ve)|0,c=c+Math.imul(Q,Ge)|0,x=x+Math.imul(Q,Ve)|0;var ti=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(ti>>>26)|0,ti&=67108863,_=Math.imul(he,we),c=Math.imul(he,_e),c=c+Math.imul(le,we)|0,x=Math.imul(le,_e),_=_+Math.imul(se,xe)|0,c=c+Math.imul(se,Me)|0,c=c+Math.imul(ue,xe)|0,x=x+Math.imul(ue,Me)|0,_=_+Math.imul(oe,Ee)|0,c=c+Math.imul(oe,Se)|0,c=c+Math.imul(fe,Ee)|0,x=x+Math.imul(fe,Se)|0,_=_+Math.imul(ne,Be)|0,c=c+Math.imul(ne,Ae)|0,c=c+Math.imul(ae,Be)|0,x=x+Math.imul(ae,Ae)|0,_=_+Math.imul(re,Re)|0,c=c+Math.imul(re,qe)|0,c=c+Math.imul(ie,Re)|0,x=x+Math.imul(ie,qe)|0,_=_+Math.imul(ee,Ge)|0,c=c+Math.imul(ee,Ve)|0,c=c+Math.imul(te,Ge)|0,x=x+Math.imul(te,Ve)|0;var ri=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(ri>>>26)|0,ri&=67108863,_=Math.imul(he,xe),c=Math.imul(he,Me),c=c+Math.imul(le,xe)|0,x=Math.imul(le,Me),_=_+Math.imul(se,Ee)|0,c=c+Math.imul(se,Se)|0,c=c+Math.imul(ue,Ee)|0,x=x+Math.imul(ue,Se)|0,_=_+Math.imul(oe,Be)|0,c=c+Math.imul(oe,Ae)|0,c=c+Math.imul(fe,Be)|0,x=x+Math.imul(fe,Ae)|0,_=_+Math.imul(ne,Re)|0,c=c+Math.imul(ne,qe)|0,c=c+Math.imul(ae,Re)|0,x=x+Math.imul(ae,qe)|0,_=_+Math.imul(re,Ge)|0,c=c+Math.imul(re,Ve)|0,c=c+Math.imul(ie,Ge)|0,x=x+Math.imul(ie,Ve)|0;var ii=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(ii>>>26)|0,ii&=67108863,_=Math.imul(he,Ee),c=Math.imul(he,Se),c=c+Math.imul(le,Ee)|0,x=Math.imul(le,Se),_=_+Math.imul(se,Be)|0,c=c+Math.imul(se,Ae)|0,c=c+Math.imul(ue,Be)|0,x=x+Math.imul(ue,Ae)|0,_=_+Math.imul(oe,Re)|0,c=c+Math.imul(oe,qe)|0,c=c+Math.imul(fe,Re)|0,x=x+Math.imul(fe,qe)|0,_=_+Math.imul(ne,Ge)|0,c=c+Math.imul(ne,Ve)|0,c=c+Math.imul(ae,Ge)|0,x=x+Math.imul(ae,Ve)|0;var ni=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(ni>>>26)|0,ni&=67108863,_=Math.imul(he,Be),c=Math.imul(he,Ae),c=c+Math.imul(le,Be)|0,x=Math.imul(le,Ae),_=_+Math.imul(se,Re)|0,c=c+Math.imul(se,qe)|0,c=c+Math.imul(ue,Re)|0,x=x+Math.imul(ue,qe)|0,_=_+Math.imul(oe,Ge)|0,c=c+Math.imul(oe,Ve)|0,c=c+Math.imul(fe,Ge)|0,x=x+Math.imul(fe,Ve)|0;var Qf=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(Qf>>>26)|0,Qf&=67108863,_=Math.imul(he,Re),c=Math.imul(he,qe),c=c+Math.imul(le,Re)|0,x=Math.imul(le,qe),_=_+Math.imul(se,Ge)|0,c=c+Math.imul(se,Ve)|0,c=c+Math.imul(ue,Ge)|0,x=x+Math.imul(ue,Ve)|0;var es=(w+_|0)+((c&8191)<<13)|0;w=(x+(c>>>13)|0)+(es>>>26)|0,es&=67108863,_=Math.imul(he,Ge),c=Math.imul(he,Ve),c=c+Math.imul(le,Ge)|0,x=Math.imul(le,Ve);var ts=(w+_|0)+((c&8191)<<13)|0;return w=(x+(c>>>13)|0)+(ts>>>26)|0,ts&=67108863,u[0]=Kr,u[1]=Wr,u[2]=zr,u[3]=Gr,u[4]=Vr,u[5]=$r,u[6]=Zr,u[7]=Yr,u[8]=Xr,u[9]=Jr,u[10]=Qr,u[11]=ei,u[12]=ti,u[13]=ri,u[14]=ii,u[15]=ni,u[16]=Qf,u[17]=es,u[18]=ts,w!==0&&(u[19]=w,d.length++),d};Math.imul||(z=X);function $(l,o,s){s.negative=o.negative^l.negative,s.length=l.length+o.length;for(var d=0,g=0,p=0;p<s.length-1;p++){var u=g;g=0;for(var w=d&67108863,_=Math.min(p,o.length-1),c=Math.max(0,p-l.length+1);c<=_;c++){var x=p-c,P=l.words[x]|0,N=o.words[c]|0,U=P*N,W=U&67108863;u=u+(U/67108864|0)|0,W=W+w|0,w=W&67108863,u=u+(W>>>26)|0,g+=u>>>26,u&=67108863}s.words[p]=w,d=u,u=g}return d!==0?s.words[p]=d:s.length--,s._strip()}function Le(l,o,s){return $(l,o,s)}n.prototype.mulTo=function(o,s){var d,g=this.length+o.length;return this.length===10&&o.length===10?d=z(this,o,s):g<63?d=X(this,o,s):g<1024?d=$(this,o,s):d=Le(this,o,s),d};function k(l,o){this.x=l,this.y=o}k.prototype.makeRBT=function(o){for(var s=new Array(o),d=n.prototype._countBits(o)-1,g=0;g<o;g++)s[g]=this.revBin(g,d,o);return s},k.prototype.revBin=function(o,s,d){if(o===0||o===d-1)return o;for(var g=0,p=0;p<s;p++)g|=(o&1)<<s-p-1,o>>=1;return g},k.prototype.permute=function(o,s,d,g,p,u){for(var w=0;w<u;w++)g[w]=s[o[w]],p[w]=d[o[w]]},k.prototype.transform=function(o,s,d,g,p,u){this.permute(u,o,s,d,g,p);for(var w=1;w<p;w<<=1)for(var _=w<<1,c=Math.cos(2*Math.PI/_),x=Math.sin(2*Math.PI/_),P=0;P<p;P+=_)for(var N=c,U=x,W=0;W<w;W++){var K=d[P+W],G=g[P+W],It=d[P+W+w],Z=g[P+W+w],Y=N*It-U*Z;Z=N*Z+U*It,It=Y,d[P+W]=K+It,g[P+W]=G+Z,d[P+W+w]=K-It,g[P+W+w]=G-Z,W!==_&&(Y=c*N-x*U,U=c*U+x*N,N=Y)}},k.prototype.guessLen13b=function(o,s){var d=Math.max(s,o)|1,g=d&1,p=0;for(d=d/2|0;d;d=d>>>1)p++;return 1<<p+1+g},k.prototype.conjugate=function(o,s,d){if(!(d<=1))for(var g=0;g<d/2;g++){var p=o[g];o[g]=o[d-g-1],o[d-g-1]=p,p=s[g],s[g]=-s[d-g-1],s[d-g-1]=-p}},k.prototype.normalize13b=function(o,s){for(var d=0,g=0;g<s/2;g++){var p=Math.round(o[2*g+1]/s)*8192+Math.round(o[2*g]/s)+d;o[g]=p&67108863,p<67108864?d=0:d=p/67108864|0}return o},k.prototype.convert13b=function(o,s,d,g){for(var p=0,u=0;u<s;u++)p=p+(o[u]|0),d[2*u]=p&8191,p=p>>>13,d[2*u+1]=p&8191,p=p>>>13;for(u=2*s;u<g;++u)d[u]=0;r(p===0),r((p&-8192)===0)},k.prototype.stub=function(o){for(var s=new Array(o),d=0;d<o;d++)s[d]=0;return s},k.prototype.mulp=function(o,s,d){var g=2*this.guessLen13b(o.length,s.length),p=this.makeRBT(g),u=this.stub(g),w=new Array(g),_=new Array(g),c=new Array(g),x=new Array(g),P=new Array(g),N=new Array(g),U=d.words;U.length=g,this.convert13b(o.words,o.length,w,g),this.convert13b(s.words,s.length,x,g),this.transform(w,u,_,c,g,p),this.transform(x,u,P,N,g,p);for(var W=0;W<g;W++){var K=_[W]*P[W]-c[W]*N[W];c[W]=_[W]*N[W]+c[W]*P[W],_[W]=K}return this.conjugate(_,c,g),this.transform(_,c,U,u,g,p),this.conjugate(U,u,g),this.normalize13b(U,g),d.negative=o.negative^s.negative,d.length=o.length+s.length,d._strip()},n.prototype.mul=function(o){var s=new n(null);return s.words=new Array(this.length+o.length),this.mulTo(o,s)},n.prototype.mulf=function(o){var s=new n(null);return s.words=new Array(this.length+o.length),Le(this,o,s)},n.prototype.imul=function(o){return this.clone().mulTo(o,this)},n.prototype.imuln=function(o){var s=o<0;s&&(o=-o),r(typeof o=="number"),r(o<67108864);for(var d=0,g=0;g<this.length;g++){var p=(this.words[g]|0)*o,u=(p&67108863)+(d&67108863);d>>=26,d+=p/67108864|0,d+=u>>>26,this.words[g]=u&67108863}return d!==0&&(this.words[g]=d,this.length++),this.length=o===0?1:this.length,s?this.ineg():this},n.prototype.muln=function(o){return this.clone().imuln(o)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(o){var s=V(o);if(s.length===0)return new n(1);for(var d=this,g=0;g<s.length&&s[g]===0;g++,d=d.sqr());if(++g<s.length)for(var p=d.sqr();g<s.length;g++,p=p.sqr())s[g]!==0&&(d=d.mul(p));return d},n.prototype.iushln=function(o){r(typeof o=="number"&&o>=0);var s=o%26,d=(o-s)/26,g=67108863>>>26-s<<26-s,p;if(s!==0){var u=0;for(p=0;p<this.length;p++){var w=this.words[p]&g,_=(this.words[p]|0)-w<<s;this.words[p]=_|u,u=w>>>26-s}u&&(this.words[p]=u,this.length++)}if(d!==0){for(p=this.length-1;p>=0;p--)this.words[p+d]=this.words[p];for(p=0;p<d;p++)this.words[p]=0;this.length+=d}return this._strip()},n.prototype.ishln=function(o){return r(this.negative===0),this.iushln(o)},n.prototype.iushrn=function(o,s,d){r(typeof o=="number"&&o>=0);var g;s?g=(s-s%26)/26:g=0;var p=o%26,u=Math.min((o-p)/26,this.length),w=67108863^67108863>>>p<<p,_=d;if(g-=u,g=Math.max(0,g),_){for(var c=0;c<u;c++)_.words[c]=this.words[c];_.length=u}if(u!==0)if(this.length>u)for(this.length-=u,c=0;c<this.length;c++)this.words[c]=this.words[c+u];else this.words[0]=0,this.length=1;var x=0;for(c=this.length-1;c>=0&&(x!==0||c>=g);c--){var P=this.words[c]|0;this.words[c]=x<<26-p|P>>>p,x=P&w}return _&&x!==0&&(_.words[_.length++]=x),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(o,s,d){return r(this.negative===0),this.iushrn(o,s,d)},n.prototype.shln=function(o){return this.clone().ishln(o)},n.prototype.ushln=function(o){return this.clone().iushln(o)},n.prototype.shrn=function(o){return this.clone().ishrn(o)},n.prototype.ushrn=function(o){return this.clone().iushrn(o)},n.prototype.testn=function(o){r(typeof o=="number"&&o>=0);var s=o%26,d=(o-s)/26,g=1<<s;if(this.length<=d)return!1;var p=this.words[d];return!!(p&g)},n.prototype.imaskn=function(o){r(typeof o=="number"&&o>=0);var s=o%26,d=(o-s)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=d)return this;if(s!==0&&d++,this.length=Math.min(d,this.length),s!==0){var g=67108863^67108863>>>s<<s;this.words[this.length-1]&=g}return this.length===0&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.maskn=function(o){return this.clone().imaskn(o)},n.prototype.iaddn=function(o){return r(typeof o=="number"),r(o<67108864),o<0?this.isubn(-o):this.negative!==0?this.length===1&&(this.words[0]|0)<=o?(this.words[0]=o-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(o),this.negative=1,this):this._iaddn(o)},n.prototype._iaddn=function(o){this.words[0]+=o;for(var s=0;s<this.length&&this.words[s]>=67108864;s++)this.words[s]-=67108864,s===this.length-1?this.words[s+1]=1:this.words[s+1]++;return this.length=Math.max(this.length,s+1),this},n.prototype.isubn=function(o){if(r(typeof o=="number"),r(o<67108864),o<0)return this.iaddn(-o);if(this.negative!==0)return this.negative=0,this.iaddn(o),this.negative=1,this;if(this.words[0]-=o,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var s=0;s<this.length&&this.words[s]<0;s++)this.words[s]+=67108864,this.words[s+1]-=1;return this._strip()},n.prototype.addn=function(o){return this.clone().iaddn(o)},n.prototype.subn=function(o){return this.clone().isubn(o)},n.prototype.iabs=function(){return this.negative=0,this},n.prototype.abs=function(){return this.clone().iabs()},n.prototype._ishlnsubmul=function(o,s,d){var g=o.length+d,p;this._expand(g);var u,w=0;for(p=0;p<o.length;p++){u=(this.words[p+d]|0)+w;var _=(o.words[p]|0)*s;u-=_&67108863,w=(u>>26)-(_/67108864|0),this.words[p+d]=u&67108863}for(;p<this.length-d;p++)u=(this.words[p+d]|0)+w,w=u>>26,this.words[p+d]=u&67108863;if(w===0)return this._strip();for(r(w===-1),w=0,p=0;p<this.length;p++)u=-(this.words[p]|0)+w,w=u>>26,this.words[p]=u&67108863;return this.negative=1,this._strip()},n.prototype._wordDiv=function(o,s){var d=this.length-o.length,g=this.clone(),p=o,u=p.words[p.length-1]|0,w=this._countBits(u);d=26-w,d!==0&&(p=p.ushln(d),g.iushln(d),u=p.words[p.length-1]|0);var _=g.length-p.length,c;if(s!=="mod"){c=new n(null),c.length=_+1,c.words=new Array(c.length);for(var x=0;x<c.length;x++)c.words[x]=0}var P=g.clone()._ishlnsubmul(p,1,_);P.negative===0&&(g=P,c&&(c.words[_]=1));for(var N=_-1;N>=0;N--){var U=(g.words[p.length+N]|0)*67108864+(g.words[p.length+N-1]|0);for(U=Math.min(U/u|0,67108863),g._ishlnsubmul(p,U,N);g.negative!==0;)U--,g.negative=0,g._ishlnsubmul(p,1,N),g.isZero()||(g.negative^=1);c&&(c.words[N]=U)}return c&&c._strip(),g._strip(),s!=="div"&&d!==0&&g.iushrn(d),{div:c||null,mod:g}},n.prototype.divmod=function(o,s,d){if(r(!o.isZero()),this.isZero())return{div:new n(0),mod:new n(0)};var g,p,u;return this.negative!==0&&o.negative===0?(u=this.neg().divmod(o,s),s!=="mod"&&(g=u.div.neg()),s!=="div"&&(p=u.mod.neg(),d&&p.negative!==0&&p.iadd(o)),{div:g,mod:p}):this.negative===0&&o.negative!==0?(u=this.divmod(o.neg(),s),s!=="mod"&&(g=u.div.neg()),{div:g,mod:u.mod}):(this.negative&o.negative)!==0?(u=this.neg().divmod(o.neg(),s),s!=="div"&&(p=u.mod.neg(),d&&p.negative!==0&&p.isub(o)),{div:u.div,mod:p}):o.length>this.length||this.cmp(o)<0?{div:new n(0),mod:this}:o.length===1?s==="div"?{div:this.divn(o.words[0]),mod:null}:s==="mod"?{div:null,mod:new n(this.modrn(o.words[0]))}:{div:this.divn(o.words[0]),mod:new n(this.modrn(o.words[0]))}:this._wordDiv(o,s)},n.prototype.div=function(o){return this.divmod(o,"div",!1).div},n.prototype.mod=function(o){return this.divmod(o,"mod",!1).mod},n.prototype.umod=function(o){return this.divmod(o,"mod",!0).mod},n.prototype.divRound=function(o){var s=this.divmod(o);if(s.mod.isZero())return s.div;var d=s.div.negative!==0?s.mod.isub(o):s.mod,g=o.ushrn(1),p=o.andln(1),u=d.cmp(g);return u<0||p===1&&u===0?s.div:s.div.negative!==0?s.div.isubn(1):s.div.iaddn(1)},n.prototype.modrn=function(o){var s=o<0;s&&(o=-o),r(o<=67108863);for(var d=(1<<26)%o,g=0,p=this.length-1;p>=0;p--)g=(d*g+(this.words[p]|0))%o;return s?-g:g},n.prototype.modn=function(o){return this.modrn(o)},n.prototype.idivn=function(o){var s=o<0;s&&(o=-o),r(o<=67108863);for(var d=0,g=this.length-1;g>=0;g--){var p=(this.words[g]|0)+d*67108864;this.words[g]=p/o|0,d=p%o}return this._strip(),s?this.ineg():this},n.prototype.divn=function(o){return this.clone().idivn(o)},n.prototype.egcd=function(o){r(o.negative===0),r(!o.isZero());var s=this,d=o.clone();s.negative!==0?s=s.umod(o):s=s.clone();for(var g=new n(1),p=new n(0),u=new n(0),w=new n(1),_=0;s.isEven()&&d.isEven();)s.iushrn(1),d.iushrn(1),++_;for(var c=d.clone(),x=s.clone();!s.isZero();){for(var P=0,N=1;(s.words[0]&N)===0&&P<26;++P,N<<=1);if(P>0)for(s.iushrn(P);P-- >0;)(g.isOdd()||p.isOdd())&&(g.iadd(c),p.isub(x)),g.iushrn(1),p.iushrn(1);for(var U=0,W=1;(d.words[0]&W)===0&&U<26;++U,W<<=1);if(U>0)for(d.iushrn(U);U-- >0;)(u.isOdd()||w.isOdd())&&(u.iadd(c),w.isub(x)),u.iushrn(1),w.iushrn(1);s.cmp(d)>=0?(s.isub(d),g.isub(u),p.isub(w)):(d.isub(s),u.isub(g),w.isub(p))}return{a:u,b:w,gcd:d.iushln(_)}},n.prototype._invmp=function(o){r(o.negative===0),r(!o.isZero());var s=this,d=o.clone();s.negative!==0?s=s.umod(o):s=s.clone();for(var g=new n(1),p=new n(0),u=d.clone();s.cmpn(1)>0&&d.cmpn(1)>0;){for(var w=0,_=1;(s.words[0]&_)===0&&w<26;++w,_<<=1);if(w>0)for(s.iushrn(w);w-- >0;)g.isOdd()&&g.iadd(u),g.iushrn(1);for(var c=0,x=1;(d.words[0]&x)===0&&c<26;++c,x<<=1);if(c>0)for(d.iushrn(c);c-- >0;)p.isOdd()&&p.iadd(u),p.iushrn(1);s.cmp(d)>=0?(s.isub(d),g.isub(p)):(d.isub(s),p.isub(g))}var P;return s.cmpn(1)===0?P=g:P=p,P.cmpn(0)<0&&P.iadd(o),P},n.prototype.gcd=function(o){if(this.isZero())return o.abs();if(o.isZero())return this.abs();var s=this.clone(),d=o.clone();s.negative=0,d.negative=0;for(var g=0;s.isEven()&&d.isEven();g++)s.iushrn(1),d.iushrn(1);do{for(;s.isEven();)s.iushrn(1);for(;d.isEven();)d.iushrn(1);var p=s.cmp(d);if(p<0){var u=s;s=d,d=u}else if(p===0||d.cmpn(1)===0)break;s.isub(d)}while(!0);return d.iushln(g)},n.prototype.invm=function(o){return this.egcd(o).a.umod(o)},n.prototype.isEven=function(){return(this.words[0]&1)===0},n.prototype.isOdd=function(){return(this.words[0]&1)===1},n.prototype.andln=function(o){return this.words[0]&o},n.prototype.bincn=function(o){r(typeof o=="number");var s=o%26,d=(o-s)/26,g=1<<s;if(this.length<=d)return this._expand(d+1),this.words[d]|=g,this;for(var p=g,u=d;p!==0&&u<this.length;u++){var w=this.words[u]|0;w+=p,p=w>>>26,w&=67108863,this.words[u]=w}return p!==0&&(this.words[u]=p,this.length++),this},n.prototype.isZero=function(){return this.length===1&&this.words[0]===0},n.prototype.cmpn=function(o){var s=o<0;if(this.negative!==0&&!s)return-1;if(this.negative===0&&s)return 1;this._strip();var d;if(this.length>1)d=1;else{s&&(o=-o),r(o<=67108863,"Number is too big");var g=this.words[0]|0;d=g===o?0:g<o?-1:1}return this.negative!==0?-d|0:d},n.prototype.cmp=function(o){if(this.negative!==0&&o.negative===0)return-1;if(this.negative===0&&o.negative!==0)return 1;var s=this.ucmp(o);return this.negative!==0?-s|0:s},n.prototype.ucmp=function(o){if(this.length>o.length)return 1;if(this.length<o.length)return-1;for(var s=0,d=this.length-1;d>=0;d--){var g=this.words[d]|0,p=o.words[d]|0;if(g!==p){g<p?s=-1:g>p&&(s=1);break}}return s},n.prototype.gtn=function(o){return this.cmpn(o)===1},n.prototype.gt=function(o){return this.cmp(o)===1},n.prototype.gten=function(o){return this.cmpn(o)>=0},n.prototype.gte=function(o){return this.cmp(o)>=0},n.prototype.ltn=function(o){return this.cmpn(o)===-1},n.prototype.lt=function(o){return this.cmp(o)===-1},n.prototype.lten=function(o){return this.cmpn(o)<=0},n.prototype.lte=function(o){return this.cmp(o)<=0},n.prototype.eqn=function(o){return this.cmpn(o)===0},n.prototype.eq=function(o){return this.cmp(o)===0},n.red=function(o){return new h(o)},n.prototype.toRed=function(o){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),o.convertTo(this)._forceRed(o)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(o){return this.red=o,this},n.prototype.forceRed=function(o){return r(!this.red,"Already a number in reduction context"),this._forceRed(o)},n.prototype.redAdd=function(o){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,o)},n.prototype.redIAdd=function(o){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,o)},n.prototype.redSub=function(o){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,o)},n.prototype.redISub=function(o){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,o)},n.prototype.redShl=function(o){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,o)},n.prototype.redMul=function(o){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.mul(this,o)},n.prototype.redIMul=function(o){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,o),this.red.imul(this,o)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(o){return r(this.red&&!o.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,o)};var O={k256:null,p224:null,p192:null,p25519:null};function D(l,o){this.name=l,this.p=new n(o,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}D.prototype._tmp=function(){var o=new n(null);return o.words=new Array(Math.ceil(this.n/13)),o},D.prototype.ireduce=function(o){var s=o,d;do this.split(s,this.tmp),s=this.imulK(s),s=s.iadd(this.tmp),d=s.bitLength();while(d>this.n);var g=d<this.n?-1:s.ucmp(this.p);return g===0?(s.words[0]=0,s.length=1):g>0?s.isub(this.p):s.strip!==void 0?s.strip():s._strip(),s},D.prototype.split=function(o,s){o.iushrn(this.n,0,s)},D.prototype.imulK=function(o){return o.imul(this.k)};function L(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(L,D),L.prototype.split=function(o,s){for(var d=4194303,g=Math.min(o.length,9),p=0;p<g;p++)s.words[p]=o.words[p];if(s.length=g,o.length<=9){o.words[0]=0,o.length=1;return}var u=o.words[9];for(s.words[s.length++]=u&d,p=10;p<o.length;p++){var w=o.words[p]|0;o.words[p-10]=(w&d)<<4|u>>>22,u=w}u>>>=22,o.words[p-10]=u,u===0&&o.length>10?o.length-=10:o.length-=9},L.prototype.imulK=function(o){o.words[o.length]=0,o.words[o.length+1]=0,o.length+=2;for(var s=0,d=0;d<o.length;d++){var g=o.words[d]|0;s+=g*977,o.words[d]=s&67108863,s=g*64+(s/67108864|0)}return o.words[o.length-1]===0&&(o.length--,o.words[o.length-1]===0&&o.length--),o};function F(){D.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}i(F,D);function H(){D.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}i(H,D);function M(){D.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}i(M,D),M.prototype.imulK=function(o){for(var s=0,d=0;d<o.length;d++){var g=(o.words[d]|0)*19+s,p=g&67108863;g>>>=26,o.words[d]=p,s=g}return s!==0&&(o.words[o.length++]=s),o},n._prime=function(o){if(O[o])return O[o];var s;if(o==="k256")s=new L;else if(o==="p224")s=new F;else if(o==="p192")s=new H;else if(o==="p25519")s=new M;else throw new Error("Unknown prime "+o);return O[o]=s,s};function h(l){if(typeof l=="string"){var o=n._prime(l);this.m=o.p,this.prime=o}else r(l.gtn(1),"modulus must be greater than 1"),this.m=l,this.prime=null}h.prototype._verify1=function(o){r(o.negative===0,"red works only with positives"),r(o.red,"red works only with red numbers")},h.prototype._verify2=function(o,s){r((o.negative|s.negative)===0,"red works only with positives"),r(o.red&&o.red===s.red,"red works only with red numbers")},h.prototype.imod=function(o){return this.prime?this.prime.ireduce(o)._forceRed(this):(E(o,o.umod(this.m)._forceRed(this)),o)},h.prototype.neg=function(o){return o.isZero()?o.clone():this.m.sub(o)._forceRed(this)},h.prototype.add=function(o,s){this._verify2(o,s);var d=o.add(s);return d.cmp(this.m)>=0&&d.isub(this.m),d._forceRed(this)},h.prototype.iadd=function(o,s){this._verify2(o,s);var d=o.iadd(s);return d.cmp(this.m)>=0&&d.isub(this.m),d},h.prototype.sub=function(o,s){this._verify2(o,s);var d=o.sub(s);return d.cmpn(0)<0&&d.iadd(this.m),d._forceRed(this)},h.prototype.isub=function(o,s){this._verify2(o,s);var d=o.isub(s);return d.cmpn(0)<0&&d.iadd(this.m),d},h.prototype.shl=function(o,s){return this._verify1(o),this.imod(o.ushln(s))},h.prototype.imul=function(o,s){return this._verify2(o,s),this.imod(o.imul(s))},h.prototype.mul=function(o,s){return this._verify2(o,s),this.imod(o.mul(s))},h.prototype.isqr=function(o){return this.imul(o,o.clone())},h.prototype.sqr=function(o){return this.mul(o,o)},h.prototype.sqrt=function(o){if(o.isZero())return o.clone();var s=this.m.andln(3);if(r(s%2===1),s===3){var d=this.m.add(new n(1)).iushrn(2);return this.pow(o,d)}for(var g=this.m.subn(1),p=0;!g.isZero()&&g.andln(1)===0;)p++,g.iushrn(1);r(!g.isZero());var u=new n(1).toRed(this),w=u.redNeg(),_=this.m.subn(1).iushrn(1),c=this.m.bitLength();for(c=new n(2*c*c).toRed(this);this.pow(c,_).cmp(w)!==0;)c.redIAdd(w);for(var x=this.pow(c,g),P=this.pow(o,g.addn(1).iushrn(1)),N=this.pow(o,g),U=p;N.cmp(u)!==0;){for(var W=N,K=0;W.cmp(u)!==0;K++)W=W.redSqr();r(K<U);var G=this.pow(x,new n(1).iushln(U-K-1));P=P.redMul(G),x=G.redSqr(),N=N.redMul(x),U=K}return P},h.prototype.invm=function(o){var s=o._invmp(this.m);return s.negative!==0?(s.negative=0,this.imod(s).redNeg()):this.imod(s)},h.prototype.pow=function(o,s){if(s.isZero())return new n(1).toRed(this);if(s.cmpn(1)===0)return o.clone();var d=4,g=new Array(1<<d);g[0]=new n(1).toRed(this),g[1]=o;for(var p=2;p<g.length;p++)g[p]=this.mul(g[p-1],o);var u=g[0],w=0,_=0,c=s.bitLength()%26;for(c===0&&(c=26),p=s.length-1;p>=0;p--){for(var x=s.words[p],P=c-1;P>=0;P--){var N=x>>P&1;if(u!==g[0]&&(u=this.sqr(u)),N===0&&w===0){_=0;continue}w<<=1,w|=N,_++,!(_!==d&&(p!==0||P!==0))&&(u=this.mul(u,g[w]),_=0,w=0)}c=26}return u},h.prototype.convertTo=function(o){var s=o.umod(this.m);return s===o?s.clone():s},h.prototype.convertFrom=function(o){var s=o.clone();return s.red=null,s},n.mont=function(o){return new y(o)};function y(l){h.call(this,l),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new n(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)}i(y,h),y.prototype.convertTo=function(o){return this.imod(o.ushln(this.shift))},y.prototype.convertFrom=function(o){var s=this.imod(o.mul(this.rinv));return s.red=null,s},y.prototype.imul=function(o,s){if(o.isZero()||s.isZero())return o.words[0]=0,o.length=1,o;var d=o.imul(s),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=d.isub(g).iushrn(this.shift),u=p;return p.cmp(this.m)>=0?u=p.isub(this.m):p.cmpn(0)<0&&(u=p.iadd(this.m)),u._forceRed(this)},y.prototype.mul=function(o,s){if(o.isZero()||s.isZero())return new n(0)._forceRed(this);var d=o.mul(s),g=d.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),p=d.isub(g).iushrn(this.shift),u=p;return p.cmp(this.m)>=0?u=p.isub(this.m):p.cmpn(0)<0&&(u=p.iadd(this.m)),u._forceRed(this)},y.prototype.invm=function(o){var s=this.imod(o._invmp(this.m).mul(this.r2));return s._forceRed(this)}})(typeof ol>"u"||ol,vm)});var fl=R((Uk,bm)=>{"use strict";b();var Sn=ym(),zE=ui(),GE=Ie().Buffer;function gm(t){var e=t.modulus.byteLength(),r;do r=new Sn(zE(e));while(r.cmp(t.modulus)>=0||!r.umod(t.prime1)||!r.umod(t.prime2));return r}function VE(t){var e=gm(t),r=e.toRed(Sn.mont(t.modulus)).redPow(new Sn(t.publicExponent)).fromRed();return{blinder:r,unblinder:e.invm(t.modulus)}}function mm(t,e){var r=VE(e),i=e.modulus.byteLength(),n=new Sn(t).mul(r.blinder).umod(e.modulus),a=n.toRed(Sn.mont(e.prime1)),f=n.toRed(Sn.mont(e.prime2)),v=e.coefficient,m=e.prime1,E=e.prime2,A=a.redPow(e.exponent1).fromRed(),q=f.redPow(e.exponent2).fromRed(),I=A.isub(q).imul(v).umod(m).imul(E);return q.iadd(I).imul(r.unblinder).umod(e.modulus).toArrayLike(GE,"be",i)}mm.getr=gm;bm.exports=mm});var Mm=R((Lk,xm)=>{b();var $E=tl(),sl=ui(),ZE=Ta(),wm=il(),_m=nl(),ul=lr(),YE=al(),XE=fl(),jt=Ie().Buffer;xm.exports=function(e,r,i){var n;e.padding?n=e.padding:i?n=1:n=4;var a=$E(e),f;if(n===4)f=JE(a,r);else if(n===1)f=QE(a,r,i);else if(n===3){if(f=new ul(r),f.cmp(a.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return i?XE(f,a):YE(f,a)};function JE(t,e){var r=t.modulus.byteLength(),i=e.length,n=ZE("sha1").update(jt.alloc(0)).digest(),a=n.length,f=2*a;if(i>r-f-2)throw new Error("message too long");var v=jt.alloc(r-i-f-2),m=r-a-1,E=sl(a),A=_m(jt.concat([n,v,jt.alloc(1,1),e],m),wm(E,m)),q=_m(E,wm(A,a));return new ul(jt.concat([jt.alloc(1),q,A],r))}function QE(t,e,r){var i=e.length,n=t.modulus.byteLength();if(i>n-11)throw new Error("message too long");var a;return r?a=jt.alloc(n-i-3,255):a=eS(n-i-3),new ul(jt.concat([jt.from([0,r?1:2]),a,jt.alloc(1),e],n))}function eS(t){for(var e=jt.allocUnsafe(t),r=0,i=sl(t*2),n=0,a;r<t;)n===i.length&&(i=sl(t*2),n=0),a=i[n++],a&&(e[r++]=a);return e}});var Rm=R((jk,Am)=>{b();var tS=tl(),Em=il(),Sm=nl(),Bm=lr(),rS=fl(),iS=Ta(),nS=al(),za=Ie().Buffer;Am.exports=function(e,r,i){var n;e.padding?n=e.padding:i?n=1:n=4;var a=tS(e),f=a.modulus.byteLength();if(r.length>f||new Bm(r).cmp(a.modulus)>=0)throw new Error("decryption error");var v;i?v=nS(new Bm(r),a):v=rS(r,a);var m=za.alloc(f-v.length);if(v=za.concat([m,v],f),n===4)return aS(a,v);if(n===1)return oS(a,v,i);if(n===3)return v;throw new Error("unknown padding")};function aS(t,e){var r=t.modulus.byteLength(),i=iS("sha1").update(za.alloc(0)).digest(),n=i.length;if(e[0]!==0)throw new Error("decryption error");var a=e.slice(1,n+1),f=e.slice(n+1),v=Sm(a,Em(f,n)),m=Sm(f,Em(v,r-n-1));if(fS(i,m.slice(0,n)))throw new Error("decryption error");for(var E=n;m[E]===0;)E++;if(m[E++]!==1)throw new Error("decryption error");return m.slice(E)}function oS(t,e,r){for(var i=e.slice(0,2),n=2,a=0;e[n++]!==0;)if(n>=e.length){a++;break}var f=e.slice(2,n-1);if((i.toString("hex")!=="0002"&&!r||i.toString("hex")!=="0001"&&r)&&a++,f.length<8&&a++,a)throw new Error("decryption error");return e.slice(n)}function fS(t,e){t=za.from(t),e=za.from(e);var r=0,i=t.length;t.length!==e.length&&(r++,i=Math.min(t.length,e.length));for(var n=-1;++n<i;)r+=t[n]^e[n];return r}});var qm=R(Ui=>{b();Ui.publicEncrypt=Mm();Ui.privateDecrypt=Rm();Ui.privateEncrypt=function(e,r){return Ui.publicEncrypt(e,r,!0)};Ui.publicDecrypt=function(e,r){return Ui.privateDecrypt(e,r,!0)}});var Lm=R(Ga=>{"use strict";b();function Im(){throw new Error(`secure random number generation not supported by this browser
15
+ use chrome, FireFox or Internet Explorer 11`)}var Tm=Ie(),km=ui(),Cm=Tm.Buffer,Om=Tm.kMaxLength,hl=globalThis.crypto||globalThis.msCrypto,Pm=Math.pow(2,32)-1;function Dm(t,e){if(typeof t!="number"||t!==t)throw new TypeError("offset must be a number");if(t>Pm||t<0)throw new TypeError("offset must be a uint32");if(t>Om||t>e)throw new RangeError("offset out of range")}function Um(t,e,r){if(typeof t!="number"||t!==t)throw new TypeError("size must be a number");if(t>Pm||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>Om)throw new RangeError("buffer too small")}hl&&hl.getRandomValues||!S.default.browser?(Ga.randomFill=sS,Ga.randomFillSync=uS):(Ga.randomFill=Im,Ga.randomFillSync=Im);function sS(t,e,r,i){if(!Cm.isBuffer(t)&&!(t instanceof globalThis.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof e=="function")i=e,e=0,r=t.length;else if(typeof r=="function")i=r,r=t.length-e;else if(typeof i!="function")throw new TypeError('"cb" argument must be a function');return Dm(e,t.length),Um(r,e,t.length),Nm(t,e,r,i)}function Nm(t,e,r,i){if(S.default.browser){var n=t.buffer,a=new Uint8Array(n,e,r);if(hl.getRandomValues(a),i){S.default.nextTick(function(){i(null,t)});return}return t}if(i){km(r,function(v,m){if(v)return i(v);m.copy(t,e),i(null,t)});return}var f=km(r);return f.copy(t,e),t}function uS(t,e,r){if(typeof e>"u"&&(e=0),!Cm.isBuffer(t)&&!(t instanceof globalThis.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return Dm(e,t.length),r===void 0&&(r=t.length-e),Um(r,e,t.length),Nm(t,e,r)}});var Ka=R(ke=>{"use strict";b();ke.randomBytes=ke.rng=ke.pseudoRandomBytes=ke.prng=ui();ke.createHash=ke.Hash=Ta();ke.createHmac=ke.Hmac=D1();var hS=bf(),lS=Object.keys(hS),cS=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(lS);ke.getHashes=function(){return cS};var Fm=lh();ke.pbkdf2=Fm.pbkdf2;ke.pbkdf2Sync=Fm.pbkdf2Sync;var tr=fg();ke.Cipher=tr.Cipher;ke.createCipher=tr.createCipher;ke.Cipheriv=tr.Cipheriv;ke.createCipheriv=tr.createCipheriv;ke.Decipher=tr.Decipher;ke.createDecipher=tr.createDecipher;ke.Decipheriv=tr.Decipheriv;ke.createDecipheriv=tr.createDecipheriv;ke.getCiphers=tr.getCiphers;ke.listCiphers=tr.listCiphers;var Va=wg();ke.DiffieHellmanGroup=Va.DiffieHellmanGroup;ke.createDiffieHellmanGroup=Va.createDiffieHellmanGroup;ke.getDiffieHellman=Va.getDiffieHellman;ke.createDiffieHellman=Va.createDiffieHellman;ke.DiffieHellman=Va.DiffieHellman;var Hf=bf();ke.createSign=Hf.createSign;ke.Sign=Hf.Sign;ke.createVerify=Hf.createVerify;ke.Verify=Hf.Verify;ke.createECDH=bf();var Kf=qm();ke.publicEncrypt=Kf.publicEncrypt;ke.privateEncrypt=Kf.privateEncrypt;ke.publicDecrypt=Kf.publicDecrypt;ke.privateDecrypt=Kf.privateDecrypt;var jm=Lm();ke.randomFill=jm.randomFill;ke.randomFillSync=jm.randomFillSync;ke.createCredentials=function(){throw new Error(`sorry, createCredentials is not implemented yet
16
+ we accept pull requests
17
+ https://github.com/browserify/crypto-browserify`)};ke.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}});var ll=R((Zk,Hm)=>{"use strict";b();function Bn(){}Bn.getRandomBuffer=function(t){return S.default.browser?Bn.getRandomBufferBrowser(t):Bn.getRandomBufferNode(t)};Bn.getRandomBufferNode=function(t){var e=Ka();return e.randomBytes(t)};Bn.getRandomBufferBrowser=function(t){if(!window.crypto&&!window.msCrypto)throw new Error("window.crypto not available");var e;if(window.crypto&&window.crypto.getRandomValues)e=window.crypto;else if(window.msCrypto&&window.msCrypto.getRandomValues)e=window.msCrypto;else throw new Error("window.crypto.getRandomValues not available");var r=new Uint8Array(t);e.getRandomValues(r);var i=B.Buffer.from(r);return i};Hm.exports=Bn});var Wf=R((Xk,Km)=>{"use strict";b();var dS=ll(),We={};We.isArray=t=>Array.isArray(t);We.isNumber=t=>typeof t=="number";We.isObject=t=>t&&typeof t=="object";We.isString=t=>typeof t=="string";We.isUndefined=t=>typeof t>"u";We.isFunction=t=>typeof t=="function";We.isNull=t=>t===null;We.isDate=t=>t instanceof Date;We.extend=(t,e)=>Object.assign(t,e);We.noop=()=>{};We.every=(t,e)=>t.every(e||(r=>r));We.map=(t,e)=>Array.from(t).map(e||(r=>r));We.includes=(t,e)=>t.includes(e);We.each=(t,e)=>t.forEach(e);We.clone=t=>Object.assign({},t);We.pick=(t,e)=>{let r={};return e.forEach(i=>{typeof t[i]<"u"&&(r[i]=t[i])}),r};We.values=t=>Object.values(t);We.filter=(t,e)=>t.filter(e);We.reduce=(t,e,r)=>t.reduce(e,r);We.without=(t,e)=>t.filter(r=>r!==e);We.shuffle=t=>{let e=t.slice(0);for(let r=e.length-1;r>0;r--){let n=dS.getRandomBuffer(4).readUInt32BE(0)/4294967296,a=Math.floor(n*(r+1));[e[r],e[a]]=[e[a],e[r]]}return e};We.difference=(t,e)=>t.filter(r=>!e.includes(r));We.findIndex=(t,e)=>t.findIndex(e);We.some=(t,e)=>t.some(e);We.range=t=>[...Array(t).keys()];Km.exports=We});var zm=R((Qk,Wm)=>{"use strict";b();var pS="https://docs.moneybutton.com/";Wm.exports=[{name:"InvalidB58Char",message:"Invalid Base58 character: {0} in {1}"},{name:"InvalidB58Checksum",message:"Invalid Base58 checksum for {0}"},{name:"InvalidNetwork",message:"Invalid version for network: got {0}"},{name:"InvalidState",message:"Invalid state: {0}"},{name:"NotImplemented",message:"Function {0} was not implemented yet"},{name:"InvalidNetworkArgument",message:'Invalid network: must be "livenet" or "testnet", got {0}'},{name:"InvalidArgument",message:function(){return"Invalid Argument"+(arguments[0]?": "+arguments[0]:"")+(arguments[1]?" Documentation: "+pS+arguments[1]:"")}},{name:"AbstractMethodInvoked",message:"Abstract Method Invocation: {0}"},{name:"InvalidArgumentType",message:function(){return"Invalid Argument for "+arguments[2]+", expected "+arguments[1]+" but got "+typeof arguments[0]}},{name:"Unit",message:"Internal Error on Unit {0}",errors:[{name:"UnknownCode",message:"Unrecognized unit code: {0}"},{name:"InvalidRate",message:"Invalid exchange rate: {0}"}]},{name:"MerkleBlock",message:"Internal Error on MerkleBlock {0}",errors:[{name:"InvalidMerkleTree",message:"This MerkleBlock contain an invalid Merkle Tree"}]},{name:"Transaction",message:"Internal Error on Transaction {0}",errors:[{name:"Input",message:"Internal Error on Input {0}",errors:[{name:"MissingScript",message:"Need a script to create an input"},{name:"UnsupportedScript",message:"Unsupported input script type: {0}"},{name:"MissingPreviousOutput",message:"No previous output information."}]},{name:"NeedMoreInfo",message:"{0}"},{name:"InvalidSorting",message:"The sorting function provided did not return the change output as one of the array elements"},{name:"InvalidOutputAmountSum",message:"{0}"},{name:"MissingSignatures",message:"Some inputs have not been fully signed"},{name:"InvalidIndex",message:"Invalid index: {0} is not between 0, {1}"},{name:"UnableToVerifySignature",message:"Unable to verify signature: {0}"},{name:"DustOutputs",message:"Dust amount detected in one output"},{name:"InvalidSatoshis",message:"Output satoshis are invalid"},{name:"FeeError",message:"Internal Error on Fee {0}",errors:[{name:"TooSmall",message:"Fee is too small: {0}"},{name:"TooLarge",message:"Fee is too large: {0}"},{name:"Different",message:"Unspent value is different from specified fee: {0}"}]},{name:"ChangeAddressMissing",message:"Change address is missing"},{name:"BlockHeightTooHigh",message:"Block Height can be at most 2^32 -1"},{name:"NLockTimeOutOfRange",message:"Block Height can only be between 0 and 499 999 999"},{name:"LockTimeTooEarly",message:"Lock Time can't be earlier than UNIX date 500 000 000"}]},{name:"Script",message:"Internal Error on Script {0}",errors:[{name:"UnrecognizedAddress",message:"Expected argument {0} to be an address"},{name:"CantDeriveAddress",message:"Can't derive address associated with script {0}, needs to be p2pkh in, p2pkh out, p2sh in, or p2sh out."},{name:"InvalidBuffer",message:"Invalid script buffer: can't parse valid script from given buffer {0}"}]},{name:"HDPrivateKey",message:"Internal Error on HDPrivateKey {0}",errors:[{name:"InvalidDerivationArgument",message:"Invalid derivation argument {0}, expected string, or number and boolean"},{name:"InvalidEntropyArgument",message:"Invalid entropy: must be an hexa string or binary buffer, got {0}",errors:[{name:"TooMuchEntropy",message:'Invalid entropy: more than 512 bits is non standard, got "{0}"'},{name:"NotEnoughEntropy",message:'Invalid entropy: at least 128 bits needed, got "{0}"'}]},{name:"InvalidLength",message:"Invalid length for xprivkey string in {0}"},{name:"InvalidPath",message:"Invalid derivation path: {0}"},{name:"UnrecognizedArgument",message:'Invalid argument: creating a HDPrivateKey requires a string, buffer, json or object, got "{0}"'}]},{name:"HDPublicKey",message:"Internal Error on HDPublicKey {0}",errors:[{name:"ArgumentIsPrivateExtended",message:"Argument is an extended private key: {0}"},{name:"InvalidDerivationArgument",message:"Invalid derivation argument: got {0}"},{name:"InvalidLength",message:'Invalid length for xpubkey: got "{0}"'},{name:"InvalidPath",message:'Invalid derivation path, it should look like: "m/1/100", got "{0}"'},{name:"InvalidIndexCantDeriveHardened",message:"Invalid argument: creating a hardened path requires an HDPrivateKey"},{name:"MustSupplyArgument",message:"Must supply an argument to create a HDPublicKey"},{name:"UnrecognizedArgument",message:"Invalid argument for creation, must be string, json, buffer, or object"}]}]});var $m=R((tT,dl)=>{"use strict";b();var cl=Wf();function vS(t,e){return t.replace("{0}",e[0]).replace("{1}",e[1]).replace("{2}",e[2])}var Gm=function(t,e){var r=function(){if(cl.isString(e.message))this.message=vS(e.message,arguments);else if(cl.isFunction(e.message))this.message=e.message.apply(null,arguments);else throw new Error("Invalid error definition for "+e.name);this.stack=this.message+`
18
+ `+new Error().stack};return r.prototype=Object.create(t.prototype),r.prototype.name=t.prototype.name+e.name,t[e.name]=r,e.errors&&Vm(r,e.errors),r},Vm=function(t,e){cl.each(e,function(r){Gm(t,r)})},yS=function(t,e){return Vm(t,e),t},An={};An.Error=function(){this.message="Internal error",this.stack=this.message+`
19
+ `+new Error().stack};An.Error.prototype=Object.create(Error.prototype);An.Error.prototype.name="bsv.Error";var gS=zm();yS(An.Error,gS);dl.exports=An.Error;dl.exports.extend=function(t){return Gm(An.Error,t)}});var zf=R((iT,Zm)=>{"use strict";b();var $a=$m(),mS=Wf();Zm.exports={checkState:function(t,e){if(!t)throw new $a.InvalidState(e)},checkArgument:function(t,e,r,i){if(!t)throw new $a.InvalidArgument(e,r,i)},checkArgumentType:function(t,e,r){if(r=r||"(unknown name)",mS.isString(e)){if(e==="Buffer"){var i=ft();if(!i.Buffer.isBuffer(t))throw new $a.InvalidArgumentType(t,e,r)}else if(typeof t!==e)throw new $a.InvalidArgumentType(t,e,r)}else if(!(t instanceof e))throw new $a.InvalidArgumentType(t,e.name,r)}}});var Jm=R((aT,Xm)=>{"use strict";b();var Ue=lr(),pl=zf(),Ym=Wf(),Gf=function(t){for(var e=B.Buffer.alloc(t.length),r=0;r<t.length;r++)e[r]=t[t.length-1-r];return e};Ue.Zero=new Ue(0);Ue.One=new Ue(1);Ue.Minus1=new Ue(-1);Ue.fromNumber=function(t){return pl.checkArgument(Ym.isNumber(t)),new Ue(t)};Ue.fromString=function(t,e){return pl.checkArgument(Ym.isString(t)),new Ue(t,e)};Ue.fromBuffer=function(t,e){typeof e<"u"&&e.endian==="little"&&(t=Gf(t));var r=t.toString("hex"),i=new Ue(r,16);return i};Ue.fromSM=function(t,e){var r;if(t.length===0)return Ue.fromBuffer(B.Buffer.from([0]));var i="big";return e&&(i=e.endian),i==="little"&&(t=Gf(t)),t[0]&128?(t[0]=t[0]&127,r=Ue.fromBuffer(t),r.neg().copy(r)):r=Ue.fromBuffer(t),r};Ue.prototype.toNumber=function(){return parseInt(this.toString(10),10)};Ue.prototype.toBuffer=function(t){var e,r;if(t&&t.size){r=this.toString(16,2);var i=r.length/2;e=B.Buffer.from(r,"hex"),i===t.size||(i>t.size?e=Ue.trim(e,i):i<t.size&&(e=Ue.pad(e,i,t.size)))}else r=this.toString(16,2),e=B.Buffer.from(r,"hex");return typeof t<"u"&&t.endian==="little"&&(e=Gf(e)),e};Ue.prototype.toSMBigEndian=function(){var t;return this.cmp(Ue.Zero)===-1?(t=this.neg().toBuffer(),t[0]&128?t=B.Buffer.concat([B.Buffer.from([128]),t]):t[0]=t[0]|128):(t=this.toBuffer(),t[0]&128&&(t=B.Buffer.concat([B.Buffer.from([0]),t]))),t.length===1&t[0]===0&&(t=B.Buffer.from([])),t};Ue.prototype.toSM=function(t){var e=t?t.endian:"big",r=this.toSMBigEndian();return e==="little"&&(r=Gf(r)),r};Ue.fromScriptNumBuffer=function(t,e,r){var i=r||4;if(pl.checkArgument(t.length<=i,new Error("script number overflow")),e&&t.length>0&&(t[t.length-1]&127)===0&&(t.length<=1||(t[t.length-2]&128)===0))throw new Error("non-minimally encoded script number");return Ue.fromSM(t,{endian:"little"})};Ue.prototype.toScriptNumBuffer=function(){return this.toSM({endian:"little"})};Ue.trim=function(t,e){return t.slice(e-t.length,t.length)};Ue.pad=function(t,e,r){for(var i=B.Buffer.alloc(r),n=0;n<t.length;n++)i[i.length-1-n]=t[t.length-1-n];for(n=0;n<r-e;n++)i[n]=0;return i};Ue.prototype.toHex=function(...t){return this.toBuffer(...t).toString("hex")};Ue.fromHex=function(t,...e){return Ue.fromBuffer(B.Buffer.from(t,"hex"),...e)};Xm.exports=Ue});var Ht=R(Ke=>{"use strict";b();var bS=Ot(),wS=He();Ke.inherits=wS;function _S(t,e){return(t.charCodeAt(e)&64512)!==55296||e<0||e+1>=t.length?!1:(t.charCodeAt(e+1)&64512)===56320}function xS(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if(typeof t=="string")if(e){if(e==="hex")for(t=t.replace(/[^a-z0-9]+/ig,""),t.length%2!==0&&(t="0"+t),n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16))}else for(var i=0,n=0;n<t.length;n++){var a=t.charCodeAt(n);a<128?r[i++]=a:a<2048?(r[i++]=a>>6|192,r[i++]=a&63|128):_S(t,n)?(a=65536+((a&1023)<<10)+(t.charCodeAt(++n)&1023),r[i++]=a>>18|240,r[i++]=a>>12&63|128,r[i++]=a>>6&63|128,r[i++]=a&63|128):(r[i++]=a>>12|224,r[i++]=a>>6&63|128,r[i++]=a&63|128)}else for(n=0;n<t.length;n++)r[n]=t[n]|0;return r}Ke.toArray=xS;function MS(t){for(var e="",r=0;r<t.length;r++)e+=eb(t[r].toString(16));return e}Ke.toHex=MS;function Qm(t){var e=t>>>24|t>>>8&65280|t<<8&16711680|(t&255)<<24;return e>>>0}Ke.htonl=Qm;function ES(t,e){for(var r="",i=0;i<t.length;i++){var n=t[i];e==="little"&&(n=Qm(n)),r+=tb(n.toString(16))}return r}Ke.toHex32=ES;function eb(t){return t.length===1?"0"+t:t}Ke.zero2=eb;function tb(t){return t.length===7?"0"+t:t.length===6?"00"+t:t.length===5?"000"+t:t.length===4?"0000"+t:t.length===3?"00000"+t:t.length===2?"000000"+t:t.length===1?"0000000"+t:t}Ke.zero8=tb;function SS(t,e,r,i){var n=r-e;bS(n%4===0);for(var a=new Array(n/4),f=0,v=e;f<a.length;f++,v+=4){var m;i==="big"?m=t[v]<<24|t[v+1]<<16|t[v+2]<<8|t[v+3]:m=t[v+3]<<24|t[v+2]<<16|t[v+1]<<8|t[v],a[f]=m>>>0}return a}Ke.join32=SS;function BS(t,e){for(var r=new Array(t.length*4),i=0,n=0;i<t.length;i++,n+=4){var a=t[i];e==="big"?(r[n]=a>>>24,r[n+1]=a>>>16&255,r[n+2]=a>>>8&255,r[n+3]=a&255):(r[n+3]=a>>>24,r[n+2]=a>>>16&255,r[n+1]=a>>>8&255,r[n]=a&255)}return r}Ke.split32=BS;function AS(t,e){return t>>>e|t<<32-e}Ke.rotr32=AS;function RS(t,e){return t<<e|t>>>32-e}Ke.rotl32=RS;function qS(t,e){return t+e>>>0}Ke.sum32=qS;function IS(t,e,r){return t+e+r>>>0}Ke.sum32_3=IS;function kS(t,e,r,i){return t+e+r+i>>>0}Ke.sum32_4=kS;function TS(t,e,r,i,n){return t+e+r+i+n>>>0}Ke.sum32_5=TS;function CS(t,e,r,i){var n=t[e],a=t[e+1],f=i+a>>>0,v=(f<i?1:0)+r+n;t[e]=v>>>0,t[e+1]=f}Ke.sum64=CS;function OS(t,e,r,i){var n=e+i>>>0,a=(n<e?1:0)+t+r;return a>>>0}Ke.sum64_hi=OS;function PS(t,e,r,i){var n=e+i;return n>>>0}Ke.sum64_lo=PS;function DS(t,e,r,i,n,a,f,v){var m=0,E=e;E=E+i>>>0,m+=E<e?1:0,E=E+a>>>0,m+=E<a?1:0,E=E+v>>>0,m+=E<v?1:0;var A=t+r+n+f+m;return A>>>0}Ke.sum64_4_hi=DS;function US(t,e,r,i,n,a,f,v){var m=e+i+a+v;return m>>>0}Ke.sum64_4_lo=US;function NS(t,e,r,i,n,a,f,v,m,E){var A=0,q=e;q=q+i>>>0,A+=q<e?1:0,q=q+a>>>0,A+=q<a?1:0,q=q+v>>>0,A+=q<v?1:0,q=q+E>>>0,A+=q<E?1:0;var I=t+r+n+f+m+A;return I>>>0}Ke.sum64_5_hi=NS;function LS(t,e,r,i,n,a,f,v,m,E){var A=e+i+a+v+E;return A>>>0}Ke.sum64_5_lo=LS;function FS(t,e,r){var i=e<<32-r|t>>>r;return i>>>0}Ke.rotr64_hi=FS;function jS(t,e,r){var i=t<<32-r|e>>>r;return i>>>0}Ke.rotr64_lo=jS;function HS(t,e,r){return t>>>r}Ke.shr64_hi=HS;function KS(t,e,r){var i=t<<32-r|e>>>r;return i>>>0}Ke.shr64_lo=KS});var Rn=R(ib=>{"use strict";b();var rb=Ht(),WS=Ot();function Vf(){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}ib.BlockHash=Vf;Vf.prototype.update=function(e,r){if(e=rb.toArray(e,r),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var i=e.length%this._delta8;this.pending=e.slice(e.length-i,e.length),this.pending.length===0&&(this.pending=null),e=rb.join32(e,0,e.length-i,this.endian);for(var n=0;n<e.length;n+=this._delta32)this._update(e,n,n+this._delta32)}return this};Vf.prototype.digest=function(e){return this.update(this._pad()),WS(this.pending===null),this._digest(e)};Vf.prototype._pad=function(){var e=this.pendingTotal,r=this._delta8,i=r-(e+this.padLength)%r,n=new Array(i+this.padLength);n[0]=128;for(var a=1;a<i;a++)n[a]=0;if(e<<=3,this.endian==="big"){for(var f=8;f<this.padLength;f++)n[a++]=0;n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=e>>>24&255,n[a++]=e>>>16&255,n[a++]=e>>>8&255,n[a++]=e&255}else for(n[a++]=e&255,n[a++]=e>>>8&255,n[a++]=e>>>16&255,n[a++]=e>>>24&255,n[a++]=0,n[a++]=0,n[a++]=0,n[a++]=0,f=8;f<this.padLength;f++)n[a++]=0;return n}});var vl=R(Sr=>{"use strict";b();var zS=Ht(),rr=zS.rotr32;function GS(t,e,r,i){if(t===0)return nb(e,r,i);if(t===1||t===3)return ob(e,r,i);if(t===2)return ab(e,r,i)}Sr.ft_1=GS;function nb(t,e,r){return t&e^~t&r}Sr.ch32=nb;function ab(t,e,r){return t&e^t&r^e&r}Sr.maj32=ab;function ob(t,e,r){return t^e^r}Sr.p32=ob;function VS(t){return rr(t,2)^rr(t,13)^rr(t,22)}Sr.s0_256=VS;function $S(t){return rr(t,6)^rr(t,11)^rr(t,25)}Sr.s1_256=$S;function ZS(t){return rr(t,7)^rr(t,18)^t>>>3}Sr.g0_256=ZS;function YS(t){return rr(t,17)^rr(t,19)^t>>>10}Sr.g1_256=YS});var ub=R((dT,sb)=>{"use strict";b();var qn=Ht(),XS=Rn(),JS=vl(),yl=qn.rotl32,Za=qn.sum32,QS=qn.sum32_5,eB=JS.ft_1,fb=XS.BlockHash,tB=[1518500249,1859775393,2400959708,3395469782];function ir(){if(!(this instanceof ir))return new ir;fb.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}qn.inherits(ir,fb);sb.exports=ir;ir.blockSize=512;ir.outSize=160;ir.hmacStrength=80;ir.padLength=64;ir.prototype._update=function(e,r){for(var i=this.W,n=0;n<16;n++)i[n]=e[r+n];for(;n<i.length;n++)i[n]=yl(i[n-3]^i[n-8]^i[n-14]^i[n-16],1);var a=this.h[0],f=this.h[1],v=this.h[2],m=this.h[3],E=this.h[4];for(n=0;n<i.length;n++){var A=~~(n/20),q=QS(yl(a,5),eB(A,f,v,m),E,i[n],tB[A]);E=m,m=v,v=yl(f,30),f=a,a=q}this.h[0]=Za(this.h[0],a),this.h[1]=Za(this.h[1],f),this.h[2]=Za(this.h[2],v),this.h[3]=Za(this.h[3],m),this.h[4]=Za(this.h[4],E)};ir.prototype._digest=function(e){return e==="hex"?qn.toHex32(this.h,"big"):qn.split32(this.h,"big")}});var gl=R((vT,lb)=>{"use strict";b();var In=Ht(),rB=Rn(),kn=vl(),iB=Ot(),Kt=In.sum32,nB=In.sum32_4,aB=In.sum32_5,oB=kn.ch32,fB=kn.maj32,sB=kn.s0_256,uB=kn.s1_256,hB=kn.g0_256,lB=kn.g1_256,hb=rB.BlockHash,cB=[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 nr(){if(!(this instanceof nr))return new nr;hb.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=cB,this.W=new Array(64)}In.inherits(nr,hb);lb.exports=nr;nr.blockSize=512;nr.outSize=256;nr.hmacStrength=192;nr.padLength=64;nr.prototype._update=function(e,r){for(var i=this.W,n=0;n<16;n++)i[n]=e[r+n];for(;n<i.length;n++)i[n]=nB(lB(i[n-2]),i[n-7],hB(i[n-15]),i[n-16]);var a=this.h[0],f=this.h[1],v=this.h[2],m=this.h[3],E=this.h[4],A=this.h[5],q=this.h[6],I=this.h[7];for(iB(this.k.length===i.length),n=0;n<i.length;n++){var C=aB(I,uB(E),oB(E,A,q),this.k[n],i[n]),j=Kt(sB(a),fB(a,f,v));I=q,q=A,A=E,E=Kt(m,C),m=v,v=f,f=a,a=Kt(C,j)}this.h[0]=Kt(this.h[0],a),this.h[1]=Kt(this.h[1],f),this.h[2]=Kt(this.h[2],v),this.h[3]=Kt(this.h[3],m),this.h[4]=Kt(this.h[4],E),this.h[5]=Kt(this.h[5],A),this.h[6]=Kt(this.h[6],q),this.h[7]=Kt(this.h[7],I)};nr.prototype._digest=function(e){return e==="hex"?In.toHex32(this.h,"big"):In.split32(this.h,"big")}});var pb=R((gT,db)=>{"use strict";b();var ml=Ht(),cb=gl();function Br(){if(!(this instanceof Br))return new Br;cb.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}ml.inherits(Br,cb);db.exports=Br;Br.blockSize=512;Br.outSize=224;Br.hmacStrength=192;Br.padLength=64;Br.prototype._digest=function(e){return e==="hex"?ml.toHex32(this.h.slice(0,7),"big"):ml.split32(this.h.slice(0,7),"big")}});var _l=R((bT,mb)=>{"use strict";b();var mt=Ht(),dB=Rn(),pB=Ot(),ar=mt.rotr64_hi,or=mt.rotr64_lo,vb=mt.shr64_hi,yb=mt.shr64_lo,jr=mt.sum64,bl=mt.sum64_hi,wl=mt.sum64_lo,vB=mt.sum64_4_hi,yB=mt.sum64_4_lo,gB=mt.sum64_5_hi,mB=mt.sum64_5_lo,gb=dB.BlockHash,bB=[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 Wt(){if(!(this instanceof Wt))return new Wt;gb.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=bB,this.W=new Array(160)}mt.inherits(Wt,gb);mb.exports=Wt;Wt.blockSize=1024;Wt.outSize=512;Wt.hmacStrength=192;Wt.padLength=128;Wt.prototype._prepareBlock=function(e,r){for(var i=this.W,n=0;n<32;n++)i[n]=e[r+n];for(;n<i.length;n+=2){var a=IB(i[n-4],i[n-3]),f=kB(i[n-4],i[n-3]),v=i[n-14],m=i[n-13],E=RB(i[n-30],i[n-29]),A=qB(i[n-30],i[n-29]),q=i[n-32],I=i[n-31];i[n]=vB(a,f,v,m,E,A,q,I),i[n+1]=yB(a,f,v,m,E,A,q,I)}};Wt.prototype._update=function(e,r){this._prepareBlock(e,r);var i=this.W,n=this.h[0],a=this.h[1],f=this.h[2],v=this.h[3],m=this.h[4],E=this.h[5],A=this.h[6],q=this.h[7],I=this.h[8],C=this.h[9],j=this.h[10],V=this.h[11],X=this.h[12],z=this.h[13],$=this.h[14],Le=this.h[15];pB(this.k.length===i.length);for(var k=0;k<i.length;k+=2){var O=$,D=Le,L=BB(I,C),F=AB(I,C),H=wB(I,C,j,V,X,z),M=_B(I,C,j,V,X,z),h=this.k[k],y=this.k[k+1],l=i[k],o=i[k+1],s=gB(O,D,L,F,H,M,h,y,l,o),d=mB(O,D,L,F,H,M,h,y,l,o);O=EB(n,a),D=SB(n,a),L=xB(n,a,f,v,m,E),F=MB(n,a,f,v,m,E);var g=bl(O,D,L,F),p=wl(O,D,L,F);$=X,Le=z,X=j,z=V,j=I,V=C,I=bl(A,q,s,d),C=wl(q,q,s,d),A=m,q=E,m=f,E=v,f=n,v=a,n=bl(s,d,g,p),a=wl(s,d,g,p)}jr(this.h,0,n,a),jr(this.h,2,f,v),jr(this.h,4,m,E),jr(this.h,6,A,q),jr(this.h,8,I,C),jr(this.h,10,j,V),jr(this.h,12,X,z),jr(this.h,14,$,Le)};Wt.prototype._digest=function(e){return e==="hex"?mt.toHex32(this.h,"big"):mt.split32(this.h,"big")};function wB(t,e,r,i,n){var a=t&r^~t&n;return a<0&&(a+=4294967296),a}function _B(t,e,r,i,n,a){var f=e&i^~e&a;return f<0&&(f+=4294967296),f}function xB(t,e,r,i,n){var a=t&r^t&n^r&n;return a<0&&(a+=4294967296),a}function MB(t,e,r,i,n,a){var f=e&i^e&a^i&a;return f<0&&(f+=4294967296),f}function EB(t,e){var r=ar(t,e,28),i=ar(e,t,2),n=ar(e,t,7),a=r^i^n;return a<0&&(a+=4294967296),a}function SB(t,e){var r=or(t,e,28),i=or(e,t,2),n=or(e,t,7),a=r^i^n;return a<0&&(a+=4294967296),a}function BB(t,e){var r=ar(t,e,14),i=ar(t,e,18),n=ar(e,t,9),a=r^i^n;return a<0&&(a+=4294967296),a}function AB(t,e){var r=or(t,e,14),i=or(t,e,18),n=or(e,t,9),a=r^i^n;return a<0&&(a+=4294967296),a}function RB(t,e){var r=ar(t,e,1),i=ar(t,e,8),n=vb(t,e,7),a=r^i^n;return a<0&&(a+=4294967296),a}function qB(t,e){var r=or(t,e,1),i=or(t,e,8),n=yb(t,e,7),a=r^i^n;return a<0&&(a+=4294967296),a}function IB(t,e){var r=ar(t,e,19),i=ar(e,t,29),n=vb(t,e,6),a=r^i^n;return a<0&&(a+=4294967296),a}function kB(t,e){var r=or(t,e,19),i=or(e,t,29),n=yb(t,e,6),a=r^i^n;return a<0&&(a+=4294967296),a}});var _b=R((_T,wb)=>{"use strict";b();var xl=Ht(),bb=_l();function Ar(){if(!(this instanceof Ar))return new Ar;bb.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}xl.inherits(Ar,bb);wb.exports=Ar;Ar.blockSize=1024;Ar.outSize=384;Ar.hmacStrength=192;Ar.padLength=128;Ar.prototype._digest=function(e){return e==="hex"?xl.toHex32(this.h.slice(0,12),"big"):xl.split32(this.h.slice(0,12),"big")}});var xb=R(Tn=>{"use strict";b();Tn.sha1=ub();Tn.sha224=pb();Tn.sha256=gl();Tn.sha384=_b();Tn.sha512=_l()});var Rb=R(Ab=>{"use strict";b();var Ni=Ht(),TB=Rn(),$f=Ni.rotl32,Mb=Ni.sum32,Ya=Ni.sum32_3,Eb=Ni.sum32_4,Bb=TB.BlockHash;function fr(){if(!(this instanceof fr))return new fr;Bb.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}Ni.inherits(fr,Bb);Ab.ripemd160=fr;fr.blockSize=512;fr.outSize=160;fr.hmacStrength=192;fr.padLength=64;fr.prototype._update=function(e,r){for(var i=this.h[0],n=this.h[1],a=this.h[2],f=this.h[3],v=this.h[4],m=i,E=n,A=a,q=f,I=v,C=0;C<80;C++){var j=Mb($f(Eb(i,Sb(C,n,a,f),e[PB[C]+r],CB(C)),UB[C]),v);i=v,v=f,f=$f(a,10),a=n,n=j,j=Mb($f(Eb(m,Sb(79-C,E,A,q),e[DB[C]+r],OB(C)),NB[C]),I),m=I,I=q,q=$f(A,10),A=E,E=j}j=Ya(this.h[1],a,q),this.h[1]=Ya(this.h[2],f,I),this.h[2]=Ya(this.h[3],v,m),this.h[3]=Ya(this.h[4],i,E),this.h[4]=Ya(this.h[0],n,A),this.h[0]=j};fr.prototype._digest=function(e){return e==="hex"?Ni.toHex32(this.h,"little"):Ni.split32(this.h,"little")};function Sb(t,e,r,i){return t<=15?e^r^i:t<=31?e&r|~e&i:t<=47?(e|~r)^i:t<=63?e&i|r&~i:e^(r|~i)}function CB(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function OB(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}var PB=[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],DB=[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],UB=[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],NB=[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]});var Ib=R((AT,qb)=>{"use strict";b();var LB=Ht(),FB=Ot();function Cn(t,e,r){if(!(this instanceof Cn))return new Cn(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(LB.toArray(e,r))}qb.exports=Cn;Cn.prototype._init=function(e){e.length>this.blockSize&&(e=new this.Hash().update(e).digest()),FB(e.length<=this.blockSize);for(var r=e.length;r<this.blockSize;r++)e.push(0);for(r=0;r<e.length;r++)e[r]^=54;for(this.inner=new this.Hash().update(e),r=0;r<e.length;r++)e[r]^=106;this.outer=new this.Hash().update(e)};Cn.prototype.update=function(e,r){return this.inner.update(e,r),this};Cn.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}});var Tb=R(kb=>{b();var ot=kb;ot.utils=Ht();ot.common=Rn();ot.sha=xb();ot.ripemd=Rb();ot.hmac=Ib();ot.sha1=ot.sha.sha1;ot.sha256=ot.sha.sha256;ot.sha224=ot.sha.sha224;ot.sha384=ot.sha.sha384;ot.sha512=ot.sha.sha512;ot.ripemd160=ot.ripemd.ripemd160});var Ob=R((kT,Cb)=>{"use strict";b();var Zf=Tb(),Rr=zf(),Je=Cb.exports;Je.sha1=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),B.Buffer.from(Zf.sha1().update(t).digest("hex"),"hex")};Je.sha1.blocksize=512;Je.sha256=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),B.Buffer.from(Zf.sha256().update(t).digest("hex"),"hex")};Je.sha256.blocksize=512;Je.sha256sha256=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),Je.sha256(Je.sha256(t))};Je.ripemd160=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),B.Buffer.from(Zf.ripemd160().update(t).digest("hex"),"hex")};Je.sha256ripemd160=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),Je.ripemd160(Je.sha256(t))};Je.sha512=function(t){return Rr.checkArgument(B.Buffer.isBuffer(t)),B.Buffer.from(Zf.sha512().update(t).digest("hex"),"hex")};Je.sha512.blocksize=1024;Je.hmac=function(t,e,r){Rr.checkArgument(B.Buffer.isBuffer(e)),Rr.checkArgument(B.Buffer.isBuffer(r)),Rr.checkArgument(t.blocksize);var i=t.blocksize/8;if(r.length>i)r=t(r);else if(r<i){var n=B.Buffer.alloc(i);n.fill(0),r.copy(n),r=n}var a=B.Buffer.alloc(i);a.fill(92);var f=B.Buffer.alloc(i);f.fill(54);for(var v=B.Buffer.alloc(i),m=B.Buffer.alloc(i),E=0;E<i;E++)v[E]=a[E]^r[E],m[E]=f[E]^r[E];return t(B.Buffer.concat([v,t(B.Buffer.concat([m,e]))]))};Je.sha256hmac=function(t,e){return Je.hmac(Je.sha256,t,e)};Je.sha512hmac=function(t,e){return Je.hmac(Je.sha512,t,e)}});var Db=R((CT,Pb)=>{"use strict";b();var Yf=Ka(),qr=zf(),Qe=Pb.exports;Qe.sha1=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),Yf.createHash("sha1").update(t).digest()};Qe.sha1.blocksize=512;Qe.sha256=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),Yf.createHash("sha256").update(t).digest()};Qe.sha256.blocksize=512;Qe.sha256sha256=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),Qe.sha256(Qe.sha256(t))};Qe.ripemd160=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),Yf.createHash("ripemd160").update(t).digest()};Qe.sha256ripemd160=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),Qe.ripemd160(Qe.sha256(t))};Qe.sha512=function(t){return qr.checkArgument(B.Buffer.isBuffer(t)),Yf.createHash("sha512").update(t).digest()};Qe.sha512.blocksize=1024;Qe.hmac=function(t,e,r){qr.checkArgument(B.Buffer.isBuffer(e)),qr.checkArgument(B.Buffer.isBuffer(r)),qr.checkArgument(t.blocksize);var i=t.blocksize/8;if(r.length>i)r=t(r);else if(r<i){var n=B.Buffer.alloc(i);n.fill(0),r.copy(n),r=n}var a=B.Buffer.alloc(i);a.fill(92);var f=B.Buffer.alloc(i);f.fill(54);for(var v=B.Buffer.alloc(i),m=B.Buffer.alloc(i),E=0;E<i;E++)v[E]=a[E]^r[E],m[E]=f[E]^r[E];return t(B.Buffer.concat([v,t(B.Buffer.concat([m,e]))]))};Qe.sha256hmac=function(t,e){return Qe.hmac(Qe.sha256,t,e)};Qe.sha512hmac=function(t,e){return Qe.hmac(Qe.sha512,t,e)}});var Ub=R((PT,Ml)=>{b();S.default.browser?Ml.exports=Ob():Ml.exports=Db()});var Lb=R((El,Nb)=>{b();(function(t,e){"use strict";typeof define=="function"&&define.amd?define([],function(){return t.secrets=e()}):typeof El=="object"?Nb.exports=e(Ka()):t.secrets=e(t.crypto)})(El,function(t){"use strict";var e,r,i,n,a;function f(){e={bits:8,radix:16,minBits:3,maxBits:20,bytesPerChar:2,maxBytesPerChar:6,primitivePolynomials:[null,null,1,3,3,5,3,3,29,17,9,5,83,27,43,3,45,9,39,39,9,5,3,33,27,9,71,39,9,5,83]},r={},i=new Array(1024).join("0"),n=!0,a=["nodeCryptoRandomBytes","browserCryptoGetRandomValues","testRandom"]}function v(){return!!(r&&r.rng&&typeof r.rng=="function")}function m(k,O){var D;if(O===0||O===1)return k;if(O&&O>1024)throw new Error("Padding must be multiples of no larger than 1024 bits.");return O=O||r.bits,k&&(D=k.length%O),D?(i+k).slice(-(O-D+k.length)):k}function E(k){var O="",D,L;for(L=k.length-1;L>=0;L--){if(D=parseInt(k[L],16),isNaN(D))throw new Error("Invalid hex character.");O=m(D.toString(2),4)+O}return O}function A(k){var O="",D,L;for(k=m(k,4),L=k.length;L>=4;L-=4){if(D=parseInt(k.slice(L-4,L),2),isNaN(D))throw new Error("Invalid binary character.");O=D.toString(16)+O}return O}function q(){return!!(t&&typeof t=="object"&&(typeof t.getRandomValues=="function"||typeof t.getRandomValues=="object")&&(typeof Uint32Array=="function"||typeof Uint32Array=="object"))}function I(){return typeof t=="object"&&typeof t.randomBytes=="function"}function C(k){function O(H,M,h,y){var l=0,o,s="",d;for(M&&(o=M.length-1);l<o||s.length<H;)d=Math.abs(parseInt(M[l],h)),s=s+m(d.toString(2),y),l++;return s=s.substr(-H),(s.match(/0/g)||[]).length===s.length?null:s}function D(H){var M,h,y,l,o=null;for(y=16,l=4,h=Math.ceil(H/8);o===null;)M=t.randomBytes(h),o=O(H,M.toString("hex"),y,l);return o}function L(H){var M,h,y,l=null;for(h=10,y=32,M=Math.ceil(H/32);l===null;)l=O(H,t.getRandomValues(new Uint32Array(M)),h,y);return l}function F(H){var M,h,y,l,o,s=null;l=10,o=32,h=Math.ceil(H/32),y=123456789,M=new Uint32Array(h);for(var d=0;d<M.length;d++)M[d]=y;for(;s===null;)s=O(H,M,l,o);return s}if(k&&k==="testRandom")return r.typeCSPRNG=k,F;if(k&&k==="nodeCryptoRandomBytes")return r.typeCSPRNG=k,D;if(k&&k==="browserCryptoGetRandomValues")return r.typeCSPRNG=k,L;if(I())return r.typeCSPRNG="nodeCryptoRandomBytes",D;if(q())return r.typeCSPRNG="browserCryptoGetRandomValues",L}function j(k,O){var D=[],L;for(O&&(k=m(k,O)),L=k.length;L>r.bits;L-=r.bits)D.push(parseInt(k.slice(L-r.bits,L),2));return D.push(parseInt(k.slice(0,L),2)),D}function V(k,O){var D=r.logs[k],L=0,F;for(F=O.length-1;F>=0;F--)L!==0?L=r.exps[(D+r.logs[L])%r.maxShares]^O[F]:L=O[F];return L}function X(k,O,D){var L=0,F,H,M,h;for(M=0,F=O.length;M<F;M++)if(D[M]){for(H=r.logs[D[M]],h=0;h<F;h++)if(M!==h){if(k===O[h]){H=-1;break}H=(H+r.logs[k^O[h]]-r.logs[O[M]^O[h]]+r.maxShares)%r.maxShares}L=H===-1?L:L^r.exps[H]}return L}function z(k,O,D){var L=[],F=[k],H,M;for(H=1;H<D;H++)F[H]=parseInt(r.rng(r.bits),2);for(H=1,M=O+1;H<M;H++)L[H-1]={x:H,y:V(H,F)};return L}function $(k,O,D){var L,F,H,M,h;if(O=parseInt(O,r.radix),k=parseInt(k,10)||r.bits,L=k.toString(36).toUpperCase(),H=Math.pow(2,k)-1,M=H.toString(r.radix).length,F=m(O.toString(r.radix),M),typeof O!="number"||O%1!==0||O<1||O>H)throw new Error("Share id must be an integer between 1 and "+H+", inclusive.");return h=L+F+D,h}var Le={init:function(k,O){var D=[],L=[],F=1,H,M;if(f(),k&&(typeof k!="number"||k%1!==0||k<e.minBits||k>e.maxBits))throw new Error("Number of bits must be an integer between "+e.minBits+" and "+e.maxBits+", inclusive.");if(O&&a.indexOf(O)===-1)throw new Error("Invalid RNG type argument : '"+O+"'");for(r.radix=e.radix,r.bits=k||e.bits,r.size=Math.pow(2,r.bits),r.maxShares=r.size-1,H=e.primitivePolynomials[r.bits],M=0;M<r.size;M++)L[M]=F,D[F]=M,F=F<<1,F>=r.size&&(F=F^H,F=F&r.maxShares);if(r.logs=D,r.exps=L,O&&this.setRNG(O),v()||this.setRNG(),!v()||!r.bits||!r.size||!r.maxShares||!r.logs||!r.exps||r.logs.length!==r.size||r.exps.length!==r.size)throw new Error("Initialization failed.")},combine:function(k,O){var D,L,F,H,M="",h,y,l,o=[],s=[];for(O=O||0,D=0,F=k.length;D<F;D++){if(y=this.extractShareComponents(k[D]),h===void 0)h=y.bits;else if(y.bits!==h)throw new Error("Mismatched shares: Different bit settings.");if(r.bits!==h&&this.init(h),o.indexOf(y.id)===-1)for(o.push(y.id),l=j(E(y.data)),L=0,H=l.length;L<H;L++)s[L]=s[L]||[],s[L][o.length-1]=l[L]}for(D=0,F=s.length;D<F;D++)M=m(X(O,o,s[D]).toString(2))+M;return A(O>=1?M:M.slice(M.indexOf("1")+1))},getConfig:function(){var k={};return k.radix=r.radix,k.bits=r.bits,k.maxShares=r.maxShares,k.hasCSPRNG=v(),k.typeCSPRNG=r.typeCSPRNG,k},extractShareComponents:function(k){var O,D,L,F,H={},M,h;if(O=parseInt(k.substr(0,1),36),O&&(typeof O!="number"||O%1!==0||O<e.minBits||O>e.maxBits))throw new Error("Invalid share : Number of bits must be an integer between "+e.minBits+" and "+e.maxBits+", inclusive.");if(F=Math.pow(2,O)-1,L=(Math.pow(2,O)-1).toString(r.radix).length,M="^([a-kA-K3-9]{1})([a-fA-F0-9]{"+L+"})([a-fA-F0-9]+)$",h=new RegExp(M).exec(k),h&&(D=parseInt(h[2],r.radix)),typeof D!="number"||D%1!==0||D<1||D>F)throw new Error("Invalid share : Share id must be an integer between 1 and "+r.maxShares+", inclusive.");if(h&&h[3])return H.bits=O,H.id=D,H.data=h[3],H;throw new Error("The share data provided is invalid : "+k)},setRNG:function(k){var O="Random number generator is invalid ",D=" Supply an CSPRNG of the form function(bits){} that returns a string containing 'bits' number of random 1's and 0's.";if(k&&typeof k=="string"&&a.indexOf(k)===-1)throw new Error("Invalid RNG type argument : '"+k+"'");if(k||(k=C()),k&&typeof k=="string"&&(k=C(k)),n){if(k&&typeof k!="function")throw new Error(O+"(Not a function)."+D);if(k&&typeof k(r.bits)!="string")throw new Error(O+"(Output is not a string)."+D);if(k&&!parseInt(k(r.bits),2))throw new Error(O+"(Binary string output not parseable to an Integer)."+D);if(k&&k(r.bits).length>r.bits)throw new Error(O+"(Output length is greater than config.bits)."+D);if(k&&k(r.bits).length<r.bits)throw new Error(O+"(Output length is less than config.bits)."+D)}return r.rng=k,!0},str2hex:function(k,O){var D,L,F="",H,M,h,y;if(typeof k!="string")throw new Error("Input must be a character string.");if(O||(O=e.bytesPerChar),typeof O!="number"||O<1||O>e.maxBytesPerChar||O%1!==0)throw new Error("Bytes per character must be an integer between 1 and "+e.maxBytesPerChar+", inclusive.");for(D=2*O,L=Math.pow(16,D)-1,h=0,y=k.length;h<y;h++){if(M=k[h].charCodeAt(),isNaN(M))throw new Error("Invalid character: "+k[h]);if(M>L)throw H=Math.ceil(Math.log(M+1)/Math.log(256)),new Error("Invalid character code ("+M+"). Maximum allowable is 256^bytes-1 ("+L+"). To convert this character, use at least "+H+" bytes.");F=m(M.toString(16),D)+F}return F},hex2str:function(k,O){var D,L="",F,H;if(typeof k!="string")throw new Error("Input must be a hexadecimal string.");if(O=O||e.bytesPerChar,typeof O!="number"||O%1!==0||O<1||O>e.maxBytesPerChar)throw new Error("Bytes per character must be an integer between 1 and "+e.maxBytesPerChar+", inclusive.");for(D=2*O,k=m(k,D),F=0,H=k.length;F<H;F+=D)L=String.fromCharCode(parseInt(k.slice(F,F+D),16))+L;return L},random:function(k){if(typeof k!="number"||k%1!==0||k<2||k>65536)throw new Error("Number of bits must be an Integer between 1 and 65536.");return A(r.rng(k))},share:function(k,O,D,L){var F,H,M=new Array(O),h=new Array(O),y,l,o;if(L=L||128,typeof k!="string")throw new Error("Secret must be a string.");if(typeof O!="number"||O%1!==0||O<2)throw new Error("Number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive.");if(O>r.maxShares)throw F=Math.ceil(Math.log(O+1)/Math.LN2),new Error("Number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive. To create "+O+" shares, use at least "+F+" bits.");if(typeof D!="number"||D%1!==0||D<2)throw new Error("Threshold number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive.");if(D>r.maxShares)throw F=Math.ceil(Math.log(D+1)/Math.LN2),new Error("Threshold number of shares must be an integer between 2 and 2^bits-1 ("+r.maxShares+"), inclusive. To use a threshold of "+D+", use at least "+F+" bits.");if(D>O)throw new Error("Threshold number of shares was "+D+" but must be less than or equal to the "+O+" shares specified as the total to generate.");if(typeof L!="number"||L%1!==0||L<0||L>1024)throw new Error("Zero-pad length must be an integer between 0 and 1024 inclusive.");for(k="1"+E(k),k=j(k,L),y=0,o=k.length;y<o;y++)for(H=z(k[y],O,D),l=0;l<O;l++)M[l]=M[l]||H[l].x.toString(r.radix),h[l]=m(H[l].y.toString(2))+(h[l]||"");for(y=0;y<O;y++)M[y]=$(r.bits,M[y],A(h[y]));return M},newShare:function(k,O){var D,L;if(k&&typeof k=="string"&&(k=parseInt(k,r.radix)),L=k.toString(r.radix),k&&L&&O&&O[0])return D=this.extractShareComponents(O[0]),$(D.bits,L,this.combine(O,k));throw new Error("Invalid 'id' or 'shares' Array argument to newShare().")},_reset:f,_padLeft:m,_hex2bin:E,_bin2hex:A,_hasCryptoGetRandomValues:q,_hasCryptoRandomBytes:I,_getRNG:C,_isSetRNG:v,_splitNumStringToIntArray:j,_horner:V,_lagrange:X,_getShares:z,_constructPublicShareString:$};return Le.init(),Le})});var Wb=R((NT,Kb)=>{"use strict";b();var dt=Jm(),Fb=ll(),jb=Ub(),Xf=null;function Sl(){if(Xf)return Xf;var t=Lb();return t.setRNG(function(e){for(var r=64,i=0;i<r;i++){for(var n=Fb.getRandomBuffer(Math.ceil(e/8)),a="",f=0;f<n.length;f++)a+=("00000000"+n[f].toString(2)).slice(-8);if(a=a.slice(0,e),/1/.test(a))return a}throw new Error("shamir: CSPRNG returned all-zero draws "+r+" times in a row \u2014 refusing to hang on a degenerate/stubbed random source")}),Xf=t,Xf}var Jf="ff",Hb=2;function et(t){return this instanceof et?(this.options=t||{},this):new et(t)}et.split=function(t,e,r,i){if(i=i||{},t==null)throw new Error("Secret is required");if(e<2)throw new Error("Threshold must be at least 2");if(r<e)throw new Error("Number of shares must be at least threshold");if(e>255||r>255)throw new Error("Threshold and shares must be <= 255");for(var n=B.Buffer.isBuffer(t)?t:B.Buffer.from(t,"utf8"),a=Jf+n.toString("hex"),f=Sl().share(a,r,e),v=Fb.getRandomBuffer(8).toString("hex"),m=i.checksum===!0,E=m?jb.sha256(n).slice(0,4).toString("hex"):null,A=[],q=0;q<f.length;q++)A.push({v:Hb,id:q+1,threshold:e,shares:r,length:n.length,splitId:v,share:f[q],checksum:E});return A};et.combine=function(t){if(!t||t.length===0)throw new Error("Shares array is required");if(t[0]&&Array.isArray(t[0].bytes)&&t[0].share===void 0)return et._combineLegacy(t);var e=t[0].threshold,r=t[0].splitId;if(t.length<e)throw new Error("Insufficient shares: need "+e+", got "+t.length);for(var i=[],n=0;n<t.length;n++){var a=t[n];if(!a||typeof a.share!="string")throw new Error("Invalid share at index "+n);if(r!==void 0&&a.splitId!==r)throw new Error("Shares are from different splits (splitId mismatch)");if(a.threshold!==e)throw new Error("Shares have inconsistent threshold");i.push(a.share)}var f=Sl().combine(i);if(f.slice(0,Jf.length)!==Jf)throw new Error("Reconstruction failed: invalid or insufficient shares");var v=B.Buffer.from(f.slice(Jf.length),"hex"),m=t[0].checksum;if(m){var E=jb.sha256(v).slice(0,4).toString("hex");if(E!==m)throw new Error("Integrity check failed: shares are inconsistent or tampered")}return v};et.verifyShare=function(t){try{return!t||typeof t!="object"?!1:Array.isArray(t.bytes)&&t.share===void 0?et._verifyLegacyShare(t):t.v!==Hb||typeof t.share!="string"||!/^[0-9a-fA-F]+$/.test(t.share)||typeof t.threshold!="number"||typeof t.shares!="number"||t.threshold<2||t.shares<t.threshold||t.shares>255||t.id<1||t.id>t.shares||t.checksum!==null&&t.checksum!==void 0&&!/^[0-9a-fA-F]{8}$/.test(t.checksum)?!1:(Sl().extractShareComponents(t.share),!0)}catch{return!1}};et.generateTestVectors=function(){var t="Hello, Bitcoin SV!",e=3,r=5,i=et.split(t,e,r),n=et.combine(i.slice(0,e));return{secret:t,threshold:e,totalShares:r,shares:i,reconstructed:n.toString("utf8"),valid:n.toString("utf8")===t}};var Hr=new dt(2147483647);et._combineLegacy=function(t){var e=t[0].threshold,r=t[0].shares,i=t[0].length;if(t.length<e)throw new Error("Insufficient shares: need "+e+", got "+t.length);for(var n=0;n<t.length;n++){if(t[n].threshold!==e||t[n].shares!==r)throw new Error("Shares have inconsistent parameters");if(t[n].length!==i)throw new Error("Shares have different secret lengths")}for(var a=[],f=0;f<i;f++){for(var v=[],m=0;m<Math.min(t.length,e);m++)v.push(t[m].bytes[f]);a.push(et._combineByteLegacy(v))}return B.Buffer.from(a)};et._combineByteLegacy=function(t){for(var e=new dt(0),r=0;r<t.length;r++){for(var i=new dt(t[r].x),n=new dt(t[r].y,16),a=new dt(1),f=new dt(1),v=0;v<t.length;v++)if(r!==v){var m=new dt(t[v].x),E=new dt(0).sub(m);E.lt(new dt(0))&&(E=E.add(Hr)),a=a.mul(E).mod(Hr);var A=i.sub(m);A.lt(new dt(0))&&(A=A.add(Hr)),f=f.mul(A).mod(Hr)}var q=et._modInverseLegacy(f,Hr),I=a.mul(q).mod(Hr);e=e.add(n.mul(I)).mod(Hr)}return e.mod(Hr).mod(new dt(256)).toNumber()};et._modInverseLegacy=function(t,e){t.lt(new dt(0))&&(t=t.mod(e).add(e));var r=et._extendedGCDLegacy(t,e);if(!r.gcd.eq(new dt(1)))throw new Error("Modular inverse does not exist");return r.x.mod(e).add(e).mod(e)};et._extendedGCDLegacy=function(t,e){if(t.eq(new dt(0)))return{gcd:e,x:new dt(0),y:new dt(1)};var r=et._extendedGCDLegacy(e.mod(t),t);return{gcd:r.gcd,x:r.y.sub(e.div(t).mul(r.x)),y:r.x}};et._verifyLegacyShare=function(t){if(!t.id||!t.threshold||!t.shares||!t.bytes||typeof t.length!="number"||t.threshold<2||t.shares<t.threshold||!Array.isArray(t.bytes)||t.bytes.length!==t.length)return!1;for(var e=0;e<t.bytes.length;e++){var r=t.bytes[e];if(!r||!r.x||!r.y||r.x<1||r.x>t.shares||!/^[0-9a-fA-F]+$/.test(r.y))return!1}return!0};Kb.exports=et});var jB=R((FT,zb)=>{b();zb.exports=Wb()});return jB();})();
20
+ if(typeof module!=="undefined"&&module.exports){module.exports=bsvShamir}else if(typeof define==="function"&&define.amd){define([],function(){return bsvShamir})}